summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2019-06-25 20:15:54 +0200
committerraveit65 <[email protected]>2022-07-20 00:13:23 +0200
commitdc6fe11e23657db015497a565a1cffcdc3550dc2 (patch)
tree94b56c19b8e67a2b9ea5df0c3a0890e769f5048a /src
parenta6bea2e4bc3c0e7389d0ddd9260937418ad77cb4 (diff)
downloadcaja-dc6fe11e23657db015497a565a1cffcdc3550dc2.tar.bz2
caja-dc6fe11e23657db015497a565a1cffcdc3550dc2.tar.xz
caja-window-menus: suppress GtkAction warnings
Diffstat (limited to 'src')
-rw-r--r--src/caja-window-menus.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/caja-window-menus.c b/src/caja-window-menus.c
index 7e31c122..5fa00c26 100644
--- a/src/caja-window-menus.c
+++ b/src/caja-window-menus.c
@@ -193,10 +193,12 @@ caja_menus_append_bookmark_to_menu (CajaWindow *window,
g_snprintf (action_name, sizeof (action_name), "%s%d", parent_id, index_in_parent);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action = gtk_action_new (action_name,
name,
_("Go to the location specified by this bookmark"),
NULL);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
g_object_set_data_full (G_OBJECT (action), "menu-icon",
cairo_surface_reference (surface),
@@ -207,8 +209,10 @@ caja_menus_append_bookmark_to_menu (CajaWindow *window,
bookmark_holder,
bookmark_holder_free_cover, 0);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_action_group_add_action (action_group,
GTK_ACTION (action));
+ G_GNUC_END_IGNORE_DEPRECATIONS;
g_object_unref (action);
@@ -395,6 +399,7 @@ action_show_hidden_files_callback (GtkAction *action,
window = CAJA_WINDOW (callback_data);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
{
mode = CAJA_WINDOW_SHOW_HIDDEN_FILES_ENABLE;
@@ -403,6 +408,7 @@ action_show_hidden_files_callback (GtkAction *action,
{
mode = CAJA_WINDOW_SHOW_HIDDEN_FILES_DISABLE;
}
+ G_GNUC_END_IGNORE_DEPRECATIONS;
caja_window_info_set_hidden_files_mode (window, mode);
}
@@ -416,6 +422,7 @@ action_show_backup_files_callback (GtkAction *action,
window = CAJA_WINDOW (callback_data);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
{
mode = CAJA_WINDOW_SHOW_BACKUP_FILES_ENABLE;
@@ -424,6 +431,7 @@ action_show_backup_files_callback (GtkAction *action,
{
mode = CAJA_WINDOW_SHOW_BACKUP_FILES_DISABLE;
}
+ G_GNUC_END_IGNORE_DEPRECATIONS;
caja_window_info_set_backup_files_mode (window, mode);
}
@@ -439,6 +447,7 @@ show_hidden_files_preference_callback (gpointer callback_data)
{
GtkAction *action;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action = gtk_action_group_get_action (window->details->main_action_group, CAJA_ACTION_SHOW_HIDDEN_FILES);
g_assert (GTK_IS_ACTION (action));
@@ -446,6 +455,7 @@ show_hidden_files_preference_callback (gpointer callback_data)
g_signal_handlers_block_by_func (action, action_show_hidden_files_callback, window);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_HIDDEN_FILES));
+ G_GNUC_END_IGNORE_DEPRECATIONS;
g_signal_handlers_unblock_by_func (action, action_show_hidden_files_callback, window);
/* inform views */
@@ -465,6 +475,7 @@ show_backup_files_preference_callback (gpointer callback_data)
{
GtkAction *action;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action = gtk_action_group_get_action (window->details->main_action_group, CAJA_ACTION_SHOW_BACKUP_FILES);
g_assert (GTK_IS_ACTION (action));
@@ -472,6 +483,7 @@ show_backup_files_preference_callback (gpointer callback_data)
g_signal_handlers_block_by_func (action, action_show_backup_files_callback, window);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_BACKUP_FILES));
+ G_GNUC_END_IGNORE_DEPRECATIONS;
g_signal_handlers_unblock_by_func (action, action_show_backup_files_callback, window);
/* inform views */
@@ -633,7 +645,9 @@ menu_item_select_cb (GtkMenuItem *proxy,
GtkAction *action;
char *message;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy));
+ G_GNUC_END_IGNORE_DEPRECATIONS;
g_return_if_fail (action != NULL);
g_object_get (G_OBJECT (action), "tooltip", &message, NULL);
@@ -803,8 +817,10 @@ trash_state_changed_cb (CajaTrashMonitor *monitor,
GtkAction *action;
GIcon *gicon;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action_group = window->details->main_action_group;
action = gtk_action_group_get_action (action_group, "Go to Trash");
+ G_GNUC_END_IGNORE_DEPRECATIONS;
gicon = caja_trash_monitor_get_icon ();
@@ -972,6 +988,7 @@ caja_window_initialize_menus (CajaWindow *window)
GtkAction *action;
const char *ui;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action_group = gtk_action_group_new ("ShellActions");
gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
window->details->main_action_group = action_group;
@@ -1001,6 +1018,7 @@ caja_window_initialize_menus (CajaWindow *window)
g_signal_handlers_block_by_func (action, action_show_backup_files_callback, window);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_BACKUP_FILES));
+ G_GNUC_END_IGNORE_DEPRECATIONS;
g_signal_handlers_unblock_by_func (action, action_show_backup_files_callback, window);
g_signal_connect_swapped (caja_preferences, "changed::" CAJA_PREFERENCES_SHOW_BACKUP_FILES,
@@ -1091,20 +1109,24 @@ add_extension_menu_items (CajaWindow *window,
CajaMenu *menu;
GtkAction *action;
char *path;
+ const gchar *action_name;
item = CAJA_MENU_ITEM (l->data);
g_object_get (item, "menu", &menu, NULL);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action = caja_action_from_menu_item (item, GTK_WIDGET (window));
gtk_action_group_add_action_with_accel (action_group, action, NULL);
+ action_name = gtk_action_get_name (action);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
path = g_build_path ("/", POPUP_PATH_EXTENSION_ACTIONS, subdirectory, NULL);
gtk_ui_manager_add_ui (ui_manager,
merge_id,
path,
- gtk_action_get_name (action),
- gtk_action_get_name (action),
+ action_name,
+ action_name,
(menu != NULL) ? GTK_UI_MANAGER_MENU : GTK_UI_MANAGER_MENUITEM,
FALSE);
g_free (path);
@@ -1113,8 +1135,8 @@ add_extension_menu_items (CajaWindow *window,
gtk_ui_manager_add_ui (ui_manager,
merge_id,
path,
- gtk_action_get_name (action),
- gtk_action_get_name (action),
+ action_name,
+ action_name,
(menu != NULL) ? GTK_UI_MANAGER_MENU : GTK_UI_MANAGER_MENUITEM,
FALSE);
g_free (path);
@@ -1127,7 +1149,9 @@ add_extension_menu_items (CajaWindow *window,
children = caja_menu_get_items (menu);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
subdir = g_build_path ("/", subdirectory, "/", gtk_action_get_name (action), NULL);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
add_extension_menu_items (window,
merge_id,
action_group,
@@ -1163,9 +1187,11 @@ caja_window_load_extension_menus (CajaWindow *window)
merge_id = gtk_ui_manager_new_merge_id (window->details->ui_manager);
window->details->extensions_menu_merge_id = merge_id;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
action_group = gtk_action_group_new ("ExtensionsMenuGroup");
window->details->extensions_menu_action_group = action_group;
gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
gtk_ui_manager_insert_action_group (window->details->ui_manager, action_group, 0);
g_object_unref (action_group); /* owned by ui manager */