[Xfce4-commits] <midori:master> Hide redundant items from the default context menu on Hildon

Christian Dywan noreply at xfce.org
Tue Oct 13 03:50:01 CEST 2009


Updating branch refs/heads/master
         to 8a9599d5a971f97b98b0f5cb6808a60c4b5c2308 (commit)
       from e4f163447c33db4341f01317013e8e1a47b10301 (commit)

commit 8a9599d5a971f97b98b0f5cb6808a60c4b5c2308
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Oct 13 02:40:38 2009 +0200

    Hide redundant items from the default context menu on Hildon

 midori/midori-view.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index fdeaa34..f87e444 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1844,6 +1844,12 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
         gtk_menu_shell_append (menu_shell, menuitem);
         #else
         items = gtk_container_get_children (GTK_CONTAINER (menu));
+        #if HAVE_HILDON
+        gtk_widget_hide (g_list_nth_data (items, 2));
+        gtk_widget_set_no_show_all (g_list_nth_data (items, 2), TRUE);
+        gtk_widget_hide (g_list_nth_data (items, 3));
+        gtk_widget_set_no_show_all (g_list_nth_data (items, 3), TRUE);
+        #endif
         menuitem = (GtkWidget*)g_list_nth_data (items, 3);
         /* hack to localize menu item */
         if (GTK_IS_BIN (menuitem))
@@ -1921,6 +1927,7 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
             }
         }
 
+        #if !HAVE_HILDON
         gtk_menu_shell_append (menu_shell, gtk_separator_menu_item_new ());
         menuitem = sokoke_action_create_popup_menu_item (
                 gtk_action_group_get_action (actions, "BookmarkAdd"));
@@ -1935,6 +1942,7 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
         menuitem = sokoke_action_create_popup_menu_item (
                 gtk_action_group_get_action (actions, "AddDesktopShortcut"));
         gtk_menu_shell_append (menu_shell, menuitem);
+        #endif
 
         menuitem = sokoke_action_create_popup_menu_item (
                 gtk_action_group_get_action (actions, "SaveAs"));



More information about the Xfce4-commits mailing list