From d217da2730dfa703993f410f5024d64f39268273 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Jun 29 2009 11:38:51 +0000 Subject: really fix help browser crash with new WebKit versions (#508301) --- diff --git a/gimp-2.6.6-help-browser-webkit.patch b/gimp-2.6.6-help-browser-webkit.patch index a2d3e9d..bec5ff7 100644 --- a/gimp-2.6.6-help-browser-webkit.patch +++ b/gimp-2.6.6-help-browser-webkit.patch @@ -1,11 +1,23 @@ -commit 1d38c1c2daabb7dac94a37fa87caa0f1bb4d95f9 +commit 76c11122dd72e2c47675da394dadcca53c9069dd Author: Nils Philippsen -Date: Sat Jun 27 17:04:48 2009 +0200 +Date: Mon Jun 29 13:34:13 2009 +0200 patch: help-browser-webkit Squashed commit of the following: + commit 7f26593f67532850a2c3e1141f5c7f5e667b9064 + Author: Sven Neumann + Date: Tue May 12 09:39:21 2009 +0200 + + help-browser: fix history menus + + The history menus located at the back and forward buttons stopped working + after a webkit update some time ago. With these changes the menus work + again, at least with recent webkit releases. + + Signed-off-by: Nils Philippsen + commit 7647788dbf37369b602361a6abd598388a4cb923 Author: Sven Neumann Date: Sat Mar 28 16:42:50 2009 +0000 @@ -23,6 +35,100 @@ Date: Sat Jun 27 17:04:48 2009 +0200 Signed-off-by: Nils Philippsen +diff --git a/plug-ins/help-browser/dialog.c b/plug-ins/help-browser/dialog.c +index 5ad6a06..159c67a 100644 +--- a/plug-ins/help-browser/dialog.c ++++ b/plug-ins/help-browser/dialog.c +@@ -886,27 +886,30 @@ close_callback (GtkAction *action, + } + + static void +-menu_callback (GtkWidget *menu, +- WebKitWebHistoryItem *item) ++menu_callback (GtkWidget *menu, ++ gpointer data) + { +- browser_dialog_load (webkit_web_history_item_get_uri (item)); ++ gint steps = GPOINTER_TO_INT (data); ++ ++ webkit_web_view_go_back_or_forward (WEBKIT_WEB_VIEW (view), steps); + } + +-/* this function unrefs the items and frees the list */ + static GtkWidget * +-build_menu (GList *items) ++build_menu (const GList *items, ++ gboolean back) + { +- GtkWidget *menu; +- GList *list; ++ GtkWidget *menu; ++ const GList *iter; ++ gint steps; + + if (! items) + return NULL; + + menu = gtk_menu_new (); + +- for (list = items; list; list = g_list_next (list)) ++ for (iter = items, steps = 1; iter; iter = g_list_next (iter), steps++) + { +- WebKitWebHistoryItem *item = list->data; ++ WebKitWebHistoryItem *item = iter->data; + const gchar *title; + + title = webkit_web_history_item_get_title (item); +@@ -918,16 +921,12 @@ build_menu (GList *items) + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); + gtk_widget_show (menu_item); + +- g_signal_connect_object (menu_item, "activate", +- G_CALLBACK (menu_callback), +- item, 0); +- +- g_object_unref (item); ++ g_signal_connect (menu_item, "activate", ++ G_CALLBACK (menu_callback), ++ GINT_TO_POINTER (back ? - steps : steps)); + } + } + +- g_list_free (items); +- + return menu; + } + +@@ -950,12 +949,12 @@ update_actions (void) + + if (back_forward_list) + { +- GList *list; ++ const GList *list; + + list = webkit_web_back_forward_list_get_back_list_with_limit (back_forward_list, + 12); + gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (button_prev), +- build_menu (list)); ++ build_menu (list, TRUE)); + } + else + { +@@ -971,12 +970,12 @@ update_actions (void) + + if (back_forward_list) + { +- GList *list; ++ const GList *list; + + list = webkit_web_back_forward_list_get_forward_list_with_limit (back_forward_list, + 12); + gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (button_next), +- build_menu (list)); ++ build_menu (list, FALSE)); + } + else + { diff --git a/plug-ins/help-browser/help-browser.c b/plug-ins/help-browser/help-browser.c index efbabfe..d632d9c 100644 --- a/plug-ins/help-browser/help-browser.c diff --git a/gimp.spec b/gimp.spec index f3b328d..063d471 100644 --- a/gimp.spec +++ b/gimp.spec @@ -31,7 +31,7 @@ Summary: GNU Image Manipulation Program Name: gimp Epoch: 2 Version: 2.6.6 -Release: 5%{?dist} +Release: 6%{?dist} %define binver 2.6 %define gimp_lang_ver 20 %define interfacever 2.0 @@ -498,6 +498,9 @@ fi %{_libdir}/gimp/%{interfacever}/plug-ins/help-browser %changelog +* Mon Jun 29 2009 Nils Philippsen - 2:2.6.6-6 +- really fix help browser crash with new WebKit versions (#508301) + * Sat Jun 27 2009 Nils Philippsen - 2:2.6.6-5 - fix help browser crash with new WebKit versions (#508301) - BR: webkitgtk-devel from F-11 on