summaryrefslogtreecommitdiff
path: root/src/caja-navigation-window-menus.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-10-08 15:01:44 -0400
committerlukefromdc <[email protected]>2016-10-08 15:01:44 -0400
commit9e5ea15d104720cfee752c193b77f8b03558c6b9 (patch)
treec20e965e974ccdecfe95f576681144442cc6225e /src/caja-navigation-window-menus.c
parent24bb72b321c044479728fd1d43c941afc0309f18 (diff)
downloadcaja-9e5ea15d104720cfee752c193b77f8b03558c6b9.tar.bz2
caja-9e5ea15d104720cfee752c193b77f8b03558c6b9.tar.xz
GTK3: port libunique ->GtkApplication as build time option
Add --disable-libunique configuration option for GTK3 builds. This builds a port from libunique to GtkApplication. keep GTK2 builds unchanged Caja can now be build with GTK2 and libunique, GTK3 and libunique, or GTK3 without libunique using GtkApplication instead GtkApplication port Based on cherrypicked nautilus commits from https://github.com/GNOME/nautilus/commit/a8481ee4bd8d34e792d63598fa5efb47736f9de4 main: adapt to GtkApplication changes through https://github.com/GNOME/nautilus/commit/c3382e0415d51082545f277c380d37be160e8d2d application: move nautilus_application_new() to its own function GTK3/GtkApplication builds: add --force-desktop option This is useful for other DE's All: StartupNotify=false in .desktop files, as caja never connects to notification daemons and in GtkApplication builds this causes busy spinning curors
Diffstat (limited to 'src/caja-navigation-window-menus.c')
-rw-r--r--src/caja-navigation-window-menus.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/caja-navigation-window-menus.c b/src/caja-navigation-window-menus.c
index a9214476..ad61fcc9 100644
--- a/src/caja-navigation-window-menus.c
+++ b/src/caja-navigation-window-menus.c
@@ -63,13 +63,25 @@
static void schedule_refresh_go_menu (CajaNavigationWindow *window);
+
+#if ENABLE_LIBUNIQUE == (0)
+static void
+action_close_all_windows_callback (GtkAction *action,
+ gpointer user_data)
+{
+ CajaApplication *app;
+
+ app = CAJA_APPLICATION (g_application_get_default ());
+ caja_application_close_all_navigation_windows (app);
+}
+#else
static void
action_close_all_windows_callback (GtkAction *action,
gpointer user_data)
{
caja_application_close_all_navigation_windows ();
}
-
+#endif
static gboolean
should_open_in_new_tab (void)
{
@@ -610,7 +622,9 @@ action_new_window_callback (GtkAction *action,
current_window = CAJA_WINDOW (user_data);
new_window = caja_application_create_navigation_window (
current_window->application,
+#if ENABLE_LIBUNIQUE == (1)
NULL,
+#endif
gtk_window_get_screen (GTK_WINDOW (current_window)));
caja_window_go_home (new_window);
}