From fd7d778e0ce4f5d1c3e22b30359513b24385c1e9 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 15 Nov 2009 18:00:33 +0100 Subject: [PATCH] Remove sokoke_widget_popup and replace all call sites --- extensions/feed-panel/feed-panel.c | 4 ++-- extensions/tab-panel.c | 3 +-- midori/midori-browser.c | 3 +-- midori/midori-panel.c | 2 +- midori/midori-searchaction.c | 3 +-- midori/midori-view.c | 2 +- midori/sokoke.c | 9 --------- midori/sokoke.h | 12 ------------ panels/midori-bookmarks.c | 3 +-- panels/midori-extensions.c | 3 +-- panels/midori-history.c | 3 +-- panels/midori-transfers.c | 3 +-- 12 files changed, 11 insertions(+), 39 deletions(-) diff --git a/extensions/feed-panel/feed-panel.c b/extensions/feed-panel/feed-panel.c index 6e4d310c..e3a7da40 100644 --- a/extensions/feed-panel/feed-panel.c +++ b/extensions/feed-panel/feed-panel.c @@ -553,8 +553,8 @@ feed_panel_popup (GtkWidget* widget, item, feed_panel_delete_activate_cb, panel); } - sokoke_widget_popup (widget, GTK_MENU (menu), - event, SOKOKE_MENU_POSITION_CURSOR); + katze_widget_popup (widget, GTK_MENU (menu), + event, KATZE_MENU_POSITION_CURSOR); } static gboolean diff --git a/extensions/tab-panel.c b/extensions/tab-panel.c index df6c70d1..1b82de6e 100644 --- a/extensions/tab-panel.c +++ b/extensions/tab-panel.c @@ -196,8 +196,7 @@ tab_panel_popup (GtkWidget* widget, { GtkWidget* menu = midori_view_get_tab_menu (MIDORI_VIEW (view)); - sokoke_widget_popup (widget, GTK_MENU (menu), - event, SOKOKE_MENU_POSITION_CURSOR); + katze_widget_popup (widget, GTK_MENU (menu), event, KATZE_MENU_POSITION_CURSOR); } static gboolean diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 31dd872f..593f6eaf 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3852,8 +3852,7 @@ midori_browser_bookmark_popup (GtkWidget* widget, midori_browser_bookmark_popup_item (menu, GTK_STOCK_DELETE, NULL, item, midori_browser_bookmark_delete_activate_cb, browser); - sokoke_widget_popup (widget, GTK_MENU (menu), - event, SOKOKE_MENU_POSITION_CURSOR); + katze_widget_popup (widget, GTK_MENU (menu), event, KATZE_MENU_POSITION_CURSOR); } static void diff --git a/midori/midori-panel.c b/midori/midori-panel.c index 9f0447ab..02e2f3de 100644 --- a/midori/midori-panel.c +++ b/midori/midori-panel.c @@ -711,7 +711,7 @@ midori_panel_options_clicked_cb (GtkToolItem* toolitem, g_signal_emit_by_name (viewable, "populate-option-menu", menu); katze_widget_popup (GTK_WIDGET (toolitem), GTK_MENU (menu), - NULL, SOKOKE_MENU_POSITION_LEFT); + NULL, KATZE_MENU_POSITION_LEFT); } #endif diff --git a/midori/midori-searchaction.c b/midori/midori-searchaction.c index 816f1e1b..94a45161 100644 --- a/midori/midori-searchaction.c +++ b/midori/midori-searchaction.c @@ -501,8 +501,7 @@ midori_search_action_icon_released_cb (GtkWidget* entry, g_signal_connect (menuitem, "activate", G_CALLBACK (midori_search_action_manage_activate_cb), action); gtk_widget_show (menuitem); - sokoke_widget_popup (entry, GTK_MENU (menu), - NULL, SOKOKE_MENU_POSITION_LEFT); + katze_widget_popup (entry, GTK_MENU (menu), NULL, KATZE_MENU_POSITION_LEFT); } static gboolean diff --git a/midori/midori-view.c b/midori/midori-view.c index 1cdf41f2..265b4188 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -3362,7 +3362,7 @@ midori_view_tab_label_button_release_event (GtkWidget* tab_label, GtkWidget* menu = midori_view_get_tab_menu (MIDORI_VIEW (widget)); katze_widget_popup (widget, GTK_MENU (menu), - event, SOKOKE_MENU_POSITION_CURSOR); + event, KATZE_MENU_POSITION_CURSOR); return TRUE; } diff --git a/midori/sokoke.c b/midori/sokoke.c index fbc112f9..72030cdd 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -485,15 +485,6 @@ sokoke_container_show_children (GtkContainer* container) gtk_container_foreach (container, (GtkCallback)(gtk_widget_show_all), NULL); } -void -sokoke_widget_popup (GtkWidget* widget, - GtkMenu* menu, - GdkEventButton* event, - SokokeMenuPos pos) -{ - katze_widget_popup (widget, menu, event, (KatzeMenuPos)pos); -} - typedef enum { SOKOKE_DESKTOP_UNTESTED, diff --git a/midori/sokoke.h b/midori/sokoke.h index a178d92c..36a59e0c 100644 --- a/midori/sokoke.h +++ b/midori/sokoke.h @@ -55,12 +55,6 @@ sokoke_magic_uri (const gchar* uri, gchar* sokoke_format_uri_for_display (const gchar* uri); -typedef enum { - SOKOKE_MENU_POSITION_CURSOR = 0, - SOKOKE_MENU_POSITION_LEFT, - SOKOKE_MENU_POSITION_RIGHT -} SokokeMenuPos; - void sokoke_combo_box_add_strings (GtkComboBox* combobox, const gchar* label_first, @@ -73,12 +67,6 @@ sokoke_widget_set_visible (GtkWidget* widget, void sokoke_container_show_children (GtkContainer* container); -void -sokoke_widget_popup (GtkWidget* widget, - GtkMenu* menu, - GdkEventButton* event, - SokokeMenuPos pos); - GtkWidget* sokoke_xfce_header_new (const gchar* icon, const gchar* title); diff --git a/panels/midori-bookmarks.c b/panels/midori-bookmarks.c index 0196eda2..97b3a00c 100644 --- a/panels/midori-bookmarks.c +++ b/panels/midori-bookmarks.c @@ -797,8 +797,7 @@ midori_bookmarks_popup (GtkWidget* widget, midori_bookmarks_popup_item (menu, GTK_STOCK_DELETE, NULL, item, midori_bookmarks_delete_activate_cb, bookmarks); - sokoke_widget_popup (widget, GTK_MENU (menu), - event, SOKOKE_MENU_POSITION_CURSOR); + katze_widget_popup (widget, GTK_MENU (menu), event, KATZE_MENU_POSITION_CURSOR); } static gboolean diff --git a/panels/midori-extensions.c b/panels/midori-extensions.c index b08db861..329a67e4 100644 --- a/panels/midori-extensions.c +++ b/panels/midori-extensions.c @@ -382,8 +382,7 @@ midori_extensions_popup (GtkWidget* widget, midori_extensions_about_activate_cb, FALSE, extensions); - sokoke_widget_popup (widget, GTK_MENU (menu), - event, SOKOKE_MENU_POSITION_CURSOR); + katze_widget_popup (widget, GTK_MENU (menu), event, KATZE_MENU_POSITION_CURSOR); g_free (website); } diff --git a/panels/midori-history.c b/panels/midori-history.c index cf117e92..eefb5ed1 100644 --- a/panels/midori-history.c +++ b/panels/midori-history.c @@ -840,8 +840,7 @@ midori_history_popup (GtkWidget* widget, midori_history_popup_item (menu, GTK_STOCK_DELETE, NULL, item, midori_history_delete_activate_cb, history); - sokoke_widget_popup (widget, GTK_MENU (menu), - event, SOKOKE_MENU_POSITION_CURSOR); + katze_widget_popup (widget, GTK_MENU (menu), event, KATZE_MENU_POSITION_CURSOR); } static gboolean diff --git a/panels/midori-transfers.c b/panels/midori-transfers.c index cb0e89e5..46783370 100644 --- a/panels/midori-transfers.c +++ b/panels/midori-transfers.c @@ -483,8 +483,7 @@ midori_transfers_popup (GtkWidget* widget, _("Copy Link Loc_ation"), download, midori_transfers_copy_address_activate_cb, FALSE, transfers); - sokoke_widget_popup (widget, GTK_MENU (menu), - event, SOKOKE_MENU_POSITION_CURSOR); + katze_widget_popup (widget, GTK_MENU (menu), event, KATZE_MENU_POSITION_CURSOR); } #endif -- 2.39.5