Bug#646237: Patch
On Tue, 1 Nov 2011 18:23:04 +0100 Ricardo Mones wrote: > > Heya Gustavo, > > Sorry, couldn't answer before... > > On Tue, 01 Nov 2011 10:20:14 -0200 > Gustavo Noronha Silva wrote: > > > Hey, > > > > On Tue, 2011-11-01 at 13:01 +0100, Julien Cristau wrote: > > > > I guess that means a final upload of 1.6.1 is in order to add a > > > > Breaks for midori and claws fancy with the appropriate versions, > > > > and I'll be done with this =) > > > > > > > Would be nice to have this done asap. > > > > I'll do it tonight if we can figure out the version number the new > > upload will have =) > > The claws-mail-extra-plugins will be 3.7.10-3, and I planned to > upload it today (though still will take some hours before it can be > done and I may need an sponsor in case my key update still isn't > merged in the keyring) with the upstream patch instead (attached). > > Please have a look in case you see something wrong in it. As suspected my key update remains unmerged and the upload has been rejected, so I need an sponsor, like in the old times ;-) I've uploaded the packages here: http://hydra.debian.net/mones/ thanks in adcance, -- Ricardo Mones http://people.debian.org/~mones «I think we are in Rats' Alley where the dead men lost their bones. -- T.S. Eliot» signature.asc Description: PGP signature
Bug#646237: Patch
Heya Gustavo, Sorry, couldn't answer before... On Tue, 01 Nov 2011 10:20:14 -0200 Gustavo Noronha Silva wrote: > Hey, > > On Tue, 2011-11-01 at 13:01 +0100, Julien Cristau wrote: > > > I guess that means a final upload of 1.6.1 is in order to add a > > > Breaks for midori and claws fancy with the appropriate versions, > > > and I'll be done with this =) > > > > > Would be nice to have this done asap. > > I'll do it tonight if we can figure out the version number the new > upload will have =) The claws-mail-extra-plugins will be 3.7.10-3, and I planned to upload it today (though still will take some hours before it can be done and I may need an sponsor in case my key update still isn't merged in the keyring) with the upstream patch instead (attached). Please have a look in case you see something wrong in it. regards, -- Ricardo Mones http://people.debian.org/~mones «Every cloud engenders not a storm. -- William Shakespeare, "Henry VI"» 0.9.14cvs1.patchset Description: Binary data signature.asc Description: PGP signature
Bug#646237: Patch
Hey, On Tue, 2011-11-01 at 13:01 +0100, Julien Cristau wrote: > > I guess that means a final upload of 1.6.1 is in order to add a Breaks > > for midori and claws fancy with the appropriate versions, and I'll be > > done with this =) > > > Would be nice to have this done asap. I'll do it tonight if we can figure out the version number the new upload will have =) Thanks, -- Gustavo Noronha Silva Debian signature.asc Description: This is a digitally signed message part
Bug#646237: Patch
Ricardo, Gustavo, On Thu, Oct 27, 2011 at 15:07:00 -0200, Gustavo Noronha Silva wrote: > Hey! > > On Thu, 2011-10-27 at 10:46 +0200, Ricardo Mones wrote: > > Well, it's a little embarrassing but seems the bug was already fixed > > upstream since some time ago but my forwarded report wasn't marked as > > duplicated until today :/ I completely overlooked this was an already > > reported bug upstream so happily created a new one instead. > > when do you expect to upload the fixed claws-mail-extra-plugins? What version number will that have (for purposes of properly versioning the Breaks in webkit)? > > I'm very sorry for making you work in a patch which won't be useful, > > I hope it was somewhat fun at least. > > > > my apologies and best regards, > > No problem at all! Had fun =D > > I guess that means a final upload of 1.6.1 is in order to add a Breaks > for midori and claws fancy with the appropriate versions, and I'll be > done with this =) > Would be nice to have this done asap. Thanks, Julien -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#646237: Patch
Hey! On Thu, 2011-10-27 at 10:46 +0200, Ricardo Mones wrote: > Well, it's a little embarrassing but seems the bug was already fixed > upstream since some time ago but my forwarded report wasn't marked as > duplicated until today :/ I completely overlooked this was an already > reported bug upstream so happily created a new one instead. > > I'm very sorry for making you work in a patch which won't be useful, > I hope it was somewhat fun at least. > > my apologies and best regards, No problem at all! Had fun =D I guess that means a final upload of 1.6.1 is in order to add a Breaks for midori and claws fancy with the appropriate versions, and I'll be done with this =) Cheers, -- Gustavo Noronha Silva Debian signature.asc Description: This is a digitally signed message part
Bug#646237: Patch
tags 646237 fixed-upstream pending thanks Heya Gustavo! On Wed, 26 Oct 2011 14:17:33 -0200 Gustavo Noronha Silva wrote: > Here's a patch for this issue! I noticed, though, that this > functionality (search the web) doesn't seem to be available, and the > function doesn't seem to be used anywhere, so might be a candidate for > removal, even? In any case, this replaces the code that uses private > API by supported, public API, and bumps the dependency in > configure.ac. Well, it's a little embarrassing but seems the bug was already fixed upstream since some time ago but my forwarded report wasn't marked as duplicated until today :/ I completely overlooked this was an already reported bug upstream so happily created a new one instead. I'm very sorry for making you work in a patch which won't be useful, I hope it was somewhat fun at least. my apologies and best regards, -- Ricardo Mones http://people.debian.org/~mones «Avert misunderstanding by calm, poise, and balance.» signature.asc Description: PGP signature
Bug#646237: Patch
Hey, Here's a patch for this issue! I noticed, though, that this functionality (search the web) doesn't seem to be available, and the function doesn't seem to be used anywhere, so might be a candidate for removal, even? In any case, this replaces the code that uses private API by supported, public API, and bumps the dependency in configure.ac. Cheers, -- Gustavo Noronha Silva Debian Description: removes usage of a private API call by using supported DOM functions Rewrite the code to get selected text to use the DOM APIs. Author: Gustavo Noronha Silva --- claws-mail-extra-plugins-3.7.10.orig/fancy-0.9.14/configure.ac +++ claws-mail-extra-plugins-3.7.10/fancy-0.9.14/configure.ac @@ -100,7 +100,7 @@ dnl Check for GTK+ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6) dnl Check for WebKit -PKG_CHECK_MODULES(WEBKIT, webkit-1.0, , +PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= 1.4.3, , AC_MSG_ERROR([Can't find GTK+ WebKit library.])) AC_SUBST(WEBKIT_LIBS) AC_SUBST(WEBKIT_CFLAGS) --- claws-mail-extra-plugins-3.7.10.orig/fancy-0.9.14/src/fancy_viewer.c 2011-10-26 11:21:45.569118784 -0200 +++ claws-mail-extra-plugins-3.7.10/fancy-0.9.14/src/fancy_viewer.c 2011-10-26 11:33:09.700996789 -0200 @@ -83,8 +83,6 @@ static void download_file_cb(GtkWidget *widget, FancyViewer *viewer); #endif -/*FIXME substitute webkitwebsettings.cpp functions with their API when available */ -gchar* webkit_web_view_get_selected_text(WebKitWebView* webView); /*--*/ static GtkWidget *fancy_get_widget(MimeViewer *_viewer) { @@ -289,17 +287,40 @@ } #endif -static gchar *fancy_get_selection (MimeViewer *_viewer) +static gchar *fancy_viewer_get_selection(FancyViewer *viewer) { - debug_print("fancy_get_selection\n"); - FancyViewer *viewer = (FancyViewer *) _viewer; - gchar *sel = webkit_web_view_get_selected_text(viewer->view); - if (!viewer->view || strlen(sel) == 0) { + debug_print("fancy_viewer_get_selection\n"); + if (!viewer->view) { + return NULL; + } + + WebKitDOMDocument *doc = webkit_web_view_get_dom_document(viewer->view); + WebKitDOMDOMWindow *window = webkit_dom_document_get_default_view(doc); + WebKitDOMDOMSelection *selection = webkit_dom_dom_window_get_selection(window); + if (!selection) { + return NULL; + } + + WebKitDOMRange *range = webkit_dom_dom_selection_get_range_at(selection, 0, NULL); + if (!range) { + return NULL; + } + + gchar *sel = webkit_dom_range_get_text(range); + if (strlen(sel) == 0) { g_free(sel); return NULL; } - return sel; + return sel; } + +static gchar *fancy_get_selection(MimeViewer *_viewer) +{ + debug_print("fancy_get_selection\n"); + FancyViewer *viewer = (FancyViewer *) _viewer; + return fancy_viewer_get_selection(viewer); +} + static void fancy_clear_viewer(MimeViewer *_viewer) { FancyViewer *viewer = (FancyViewer *) _viewer; @@ -686,7 +707,7 @@ debug_print("Clicked on Search on Web\n"); if (webkit_web_view_has_selection(viewer->view)) { gchar *search; - gchar *tmp = webkit_web_view_get_selected_text(viewer->view); + gchar *tmp = fancy_viewer_get_selection(viewer); search = g_strconcat(GOOGLE_SEARCH, tmp, NULL); webkit_web_view_open(viewer->view, search); g_free(search); @@ -933,20 +954,7 @@ } return FALSE; } -#if !WEBKIT_CHECK_VERSION (1,1,12) -static gboolean release_button_cb (WebKitWebView *view, GdkEvent *ev, - gpointer data) -{ - /* Make the copy/paste works as usual */ - if (webkit_web_view_can_copy_clipboard(view)) { - GtkClipboard *wv_clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); - const gchar *sel_text; - sel_text = (const gchar*)webkit_web_view_get_selected_text(view); - gtk_clipboard_set_text(wv_clipboard, sel_text, -1); - } - return FALSE; -} -#endif + static void zoom_100_cb(GtkWidget *widget, GdkEvent *ev, FancyViewer *viewer) { gtk_widget_grab_focus(widget); @@ -1091,16 +1099,10 @@ G_CALLBACK(load_progress_cb), viewer); g_signal_connect(G_OBJECT(viewer->view), "navigation-requested", G_CALLBACK(navigation_requested_cb), viewer); -#if WEBKIT_CHECK_VERSION (1,1,14) g_signal_connect(G_OBJECT(viewer->view), "resource-request-starting", G_CALLBACK(resource_request_starting_cb), viewer); -#endif g_signal_connect(G_OBJECT(viewer->view), "populate-popup", G_CALLBACK(populate_popup_cb), viewer); -#if !WEBKIT_CHECK_VERSION (1,1,12) - g_signal_connect(G_OBJECT(viewer->view), "button-release-event", - G_CALLBACK(release_button_cb), viewer); -#endif g_signal_connect(G_OBJECT(viewer->ev_zoom_100), "button-press-event", G_CALLBACK(zoom_100_cb), (gpointer*)viewer); g_signal_connect(G_OBJECT(viewer->ev_zoom_in), "button-press-event", signature.asc Description: This is a digitally signed message part