diff options
author | raveit65 <[email protected]> | 2019-06-25 19:10:05 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-20 00:11:57 +0200 |
commit | 98f6467aff286f84cb0594bc919e8a582a6da737 (patch) | |
tree | 25903b2dcb912f733a48c2ffe481a30d6be28e60 | |
parent | c1982c95d1a37b34e25f0949f5db856d4817e6c6 (diff) | |
download | caja-98f6467aff286f84cb0594bc919e8a582a6da737.tar.bz2 caja-98f6467aff286f84cb0594bc919e8a582a6da737.tar.xz |
caja-navigation-window-menus: suppress GtkAction warnings
-rw-r--r-- | src/caja-navigation-window-menus.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/caja-navigation-window-menus.c b/src/caja-navigation-window-menus.c index c8bfcce0..9976a6ca 100644 --- a/src/caja-navigation-window-menus.c +++ b/src/caja-navigation-window-menus.c @@ -190,6 +190,7 @@ action_show_hide_toolbar_callback (GtkAction *action, window = CAJA_NAVIGATION_WINDOW (user_data); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) { caja_navigation_window_show_toolbar (window); @@ -198,6 +199,7 @@ action_show_hide_toolbar_callback (GtkAction *action, { caja_navigation_window_hide_toolbar (window); } + G_GNUC_END_IGNORE_DEPRECATIONS; } @@ -210,6 +212,7 @@ action_show_hide_sidebar_callback (GtkAction *action, window = CAJA_NAVIGATION_WINDOW (user_data); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) { caja_navigation_window_show_sidebar (window); @@ -218,6 +221,7 @@ action_show_hide_sidebar_callback (GtkAction *action, { caja_navigation_window_hide_sidebar (window); } + G_GNUC_END_IGNORE_DEPRECATIONS; } static void @@ -246,7 +250,9 @@ action_show_hide_location_bar_callback (GtkAction *action, window = CAJA_WINDOW (user_data); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; is_active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); + G_GNUC_END_IGNORE_DEPRECATIONS; /* Do the active pane first, because this will trigger an update of the menu items, * which in turn relies on the active pane. */ @@ -266,6 +272,7 @@ action_show_hide_statusbar_callback (GtkAction *action, window = CAJA_NAVIGATION_WINDOW (user_data); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) { caja_navigation_window_show_status_bar (window); @@ -274,6 +281,7 @@ action_show_hide_statusbar_callback (GtkAction *action, { caja_navigation_window_hide_status_bar (window); } + G_GNUC_END_IGNORE_DEPRECATIONS; } static void @@ -285,7 +293,9 @@ action_split_view_callback (GtkAction *action, window = CAJA_NAVIGATION_WINDOW (user_data); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; is_active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); + G_GNUC_END_IGNORE_DEPRECATIONS; if (is_active != caja_navigation_window_split_view_showing (window)) { CajaWindow *caja_window; @@ -313,6 +323,7 @@ caja_navigation_window_update_show_hide_menu_items (CajaNavigationWindow *window g_assert (CAJA_IS_NAVIGATION_WINDOW (window)); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; action = gtk_action_group_get_action (window->details->navigation_action_group, CAJA_ACTION_SHOW_HIDE_TOOLBAR); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), @@ -337,6 +348,7 @@ caja_navigation_window_update_show_hide_menu_items (CajaNavigationWindow *window CAJA_ACTION_SHOW_HIDE_EXTRA_PANE); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), caja_navigation_window_split_view_showing (window)); + G_GNUC_END_IGNORE_DEPRECATIONS; } void @@ -346,10 +358,12 @@ caja_navigation_window_update_spatial_menu_item (CajaNavigationWindow *window) g_assert (CAJA_IS_NAVIGATION_WINDOW (window)); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; action = gtk_action_group_get_action (window->details->navigation_action_group, CAJA_ACTION_FOLDER_WINDOW); gtk_action_set_visible (action, !g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_ALWAYS_USE_BROWSER)); + G_GNUC_END_IGNORE_DEPRECATIONS; } static void @@ -460,7 +474,9 @@ refresh_go_menu (CajaNavigationWindow *window) ui_manager = caja_window_get_ui_manager (CAJA_WINDOW (window)); window->details->go_menu_merge_id = gtk_ui_manager_new_merge_id (ui_manager); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; window->details->go_menu_action_group = gtk_action_group_new ("GoMenuGroup"); + G_GNUC_END_IGNORE_DEPRECATIONS; g_signal_connect (window->details->go_menu_action_group, "connect-proxy", G_CALLBACK (connect_proxy_cb), NULL); @@ -565,6 +581,7 @@ caja_navigation_window_update_split_view_actions_sensitivity (CajaNavigationWind next_pane_is_in_same_location = FALSE; } + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* switch to next pane */ action = gtk_action_group_get_action (action_group, "SplitViewNextPane"); gtk_action_set_sensitive (action, have_multiple_panes); @@ -572,6 +589,7 @@ caja_navigation_window_update_split_view_actions_sensitivity (CajaNavigationWind /* same location */ action = gtk_action_group_get_action (action_group, "SplitViewSameLocation"); gtk_action_set_sensitive (action, have_multiple_panes && !next_pane_is_in_same_location); + G_GNUC_END_IGNORE_DEPRECATIONS; /* clean up */ if (active_pane_location) @@ -657,6 +675,7 @@ action_show_search_callback (GtkAction *action, window = CAJA_NAVIGATION_WINDOW (user_data); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; search_action = gtk_action_group_get_action (window->details->navigation_action_group, CAJA_ACTION_SEARCH); @@ -672,12 +691,14 @@ action_show_search_callback (GtkAction *action, gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (search_action), TRUE); } + G_GNUC_END_IGNORE_DEPRECATIONS; } static void action_show_hide_search_callback (GtkAction *action, gpointer user_data) { + gboolean var_action; CajaNavigationWindow *window; /* This is used when toggling the action for updating the UI @@ -689,7 +710,11 @@ action_show_hide_search_callback (GtkAction *action, window = CAJA_NAVIGATION_WINDOW (user_data); - if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + var_action = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); + G_GNUC_END_IGNORE_DEPRECATIONS; + + if (var_action) { caja_navigation_window_show_search (window); } @@ -922,6 +947,7 @@ caja_navigation_window_initialize_actions (CajaNavigationWindow *window) GtkAction *action; int i; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; action_group = gtk_action_group_new ("NavigationActions"); gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); window->details->navigation_action_group = action_group; @@ -986,6 +1012,7 @@ caja_navigation_window_initialize_actions (CajaNavigationWindow *window) gtk_action_group_add_action (action_group, action); g_object_unref (action); + G_GNUC_END_IGNORE_DEPRECATIONS; ui_manager = caja_window_get_ui_manager (CAJA_WINDOW (window)); @@ -996,6 +1023,7 @@ caja_navigation_window_initialize_actions (CajaNavigationWindow *window) gchar accelerator[80]; snprintf(action_name, sizeof (action_name), "Tab%d", i); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; action = gtk_action_new (action_name, NULL, NULL, NULL); g_object_set_data (G_OBJECT (action), "num", GINT_TO_POINTER (i)); g_signal_connect (action, "activate", @@ -1003,6 +1031,7 @@ caja_navigation_window_initialize_actions (CajaNavigationWindow *window) snprintf(accelerator, sizeof (accelerator), "<alt>%d", (i+1)%10); gtk_action_group_add_action_with_accel (action_group, action, accelerator); g_object_unref (action); + G_GNUC_END_IGNORE_DEPRECATIONS; gtk_ui_manager_add_ui (ui_manager, gtk_ui_manager_new_merge_id (ui_manager), "/", @@ -1013,11 +1042,13 @@ caja_navigation_window_initialize_actions (CajaNavigationWindow *window) } + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; action = gtk_action_group_get_action (action_group, CAJA_ACTION_SEARCH); g_object_set (action, "short_label", _("_Search"), NULL); action = gtk_action_group_get_action (action_group, "ShowSearch"); gtk_action_set_sensitive (action, TRUE); + G_GNUC_END_IGNORE_DEPRECATIONS; gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); g_object_unref (action_group); /* owned by ui_manager */ |