gtk+3: fix dependencies for new gnome/accessibility/at-spi2-core
[oi-userland.git] / components / desktop / mate / caja / patches / 11-timeslider-caja-window-menus.patch
blob5d7a6178ad20fef4e007ba0755a4ac82e27e7d0e
1 --- caja-1.28.0/src/caja-window-menus.c.orig 2024-02-20 01:30:36.000000000 +0100
2 +++ caja-1.28.0/src/caja-window-menus.c 2024-02-26 08:42:41.000000000 +0100
3 @@ -57,6 +57,8 @@
4 #include "caja-window-private.h"
5 #include "caja-desktop-window.h"
6 #include "caja-search-bar.h"
7 +#include "caja-navigation-window.h"
8 +#include "caja-zfs-bar.h"
10 #define MENU_PATH_EXTENSION_ACTIONS "/MenuBar/File/Extension Actions"
11 #define POPUP_PATH_EXTENSION_ACTIONS "/background/Before Zoom Items/Extension Actions"
12 @@ -370,6 +372,33 @@
15 static void
16 +action_restore_callback (GtkToggleAction *action,
17 + gpointer user_data)
19 + CajaWindowSlot *slot;
20 + GFile *directory;
21 + CajaDirectory *n_dir;
22 + GtkWidget *bar = CAJA_NAVIGATION_WINDOW (user_data)->zfs_bar;
24 + slot = caja_window_get_active_slot (CAJA_WINDOW (user_data));
25 + directory = caja_window_slot_get_location (slot);
26 + n_dir = caja_directory_get (directory);
28 + if (gtk_toggle_action_get_active (action))
29 + {
30 + caja_zfs_bar_setup (CAJA_ZFS_BAR (bar), n_dir, slot, action);
31 + gtk_widget_show (bar);
32 + }
33 + else
34 + {
35 + caja_zfs_bar_hide (CAJA_ZFS_BAR (bar));
36 + caja_window_reload (CAJA_WINDOW (user_data), FALSE);
37 + }
38 + g_object_unref (n_dir);
39 + g_object_unref (directory);
42 +static void
43 action_zoom_in_callback (GtkAction *action,
44 gpointer user_data)
46 @@ -962,6 +991,12 @@
48 static const GtkToggleActionEntry main_toggle_entries[] =
50 + /* name, stock id */ { "Restore", NULL,
51 + /* label, accelerator */ N_("R_estore"), "<control>E",
52 + /* tooltip */ N_("Browse the current location snapshot history"),
53 + G_CALLBACK (action_restore_callback),
54 + FALSE
55 + },
56 /* name, icon name */ { "Show Hidden Files", NULL,
57 /* label, accelerator */ N_("Show _Hidden Files"), "<control>H",
58 /* tooltip */ N_("Toggle the display of hidden files in the current window"),