summaryrefslogtreecommitdiff
path: root/src/caja-application.h
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-application.h
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-application.h')
-rw-r--r--src/caja-application.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/caja-application.h b/src/caja-application.h
index 699083a8..6eb54138 100644
--- a/src/caja-application.h
+++ b/src/caja-application.h
@@ -29,7 +29,10 @@
#include <gdk/gdk.h>
#include <gio/gio.h>
+#include <gtk/gtk.h>
+#if ENABLE_LIBUNIQUE == (1)
#include <unique/unique.h>
+#endif
#include <libegg/eggsmclient.h>
#define CAJA_DESKTOP_ICON_VIEW_IID "OAFIID:Caja_File_Manager_Desktop_Icon_View"
@@ -57,12 +60,21 @@ typedef struct CajaWindow CajaWindow;
typedef struct _CajaSpatialWindow CajaSpatialWindow;
#endif
+#if ENABLE_LIBUNIQUE == (0)
+typedef struct _CajaApplicationPriv CajaApplicationPriv;
+#else
typedef struct CajaShell CajaShell;
+#endif
typedef struct
{
+#if ENABLE_LIBUNIQUE == (0)
+ GtkApplication parent;
+ CajaApplicationPriv *priv;
+#else
GObject parent;
UniqueApp* unique_app;
+#endif
EggSMClient* smclient;
GVolumeMonitor* volume_monitor;
unsigned int automount_idle_id;
@@ -72,6 +84,17 @@ typedef struct
GList *volume_queue;
} CajaApplication;
+
+#if ENABLE_LIBUNIQUE == (0)
+typedef struct
+{
+ GtkApplicationClass parent_class;
+} CajaApplicationClass;
+
+GType caja_application_get_type (void);
+
+CajaApplication *caja_application_new (void);
+#else
typedef struct
{
GObjectClass parent_class;
@@ -89,7 +112,7 @@ void caja_application_startup (CajaApplication *applic
GList * caja_application_get_window_list (void);
GList * caja_application_get_spatial_window_list (void);
unsigned int caja_application_get_n_windows (void);
-
+#endif
CajaWindow * caja_application_get_spatial_window (CajaApplication *application,
CajaWindow *requesting_window,
const char *startup_id,
@@ -98,15 +121,22 @@ CajaWindow * caja_application_get_spatial_window (CajaApplication *appli
gboolean *existing);
CajaWindow * caja_application_create_navigation_window (CajaApplication *application,
+#if ENABLE_LIBUNIQUE == (1)
const char *startup_id,
+#endif
GdkScreen *screen);
-
+#if ENABLE_LIBUNIQUE == (0)
+void caja_application_close_all_navigation_windows (CajaApplication *self);
+#else
void caja_application_close_all_navigation_windows (void);
+#endif
void caja_application_close_parent_windows (CajaSpatialWindow *window);
void caja_application_close_all_spatial_windows (void);
+#if ENABLE_LIBUNIQUE == (1)
void caja_application_open_desktop (CajaApplication *application);
void caja_application_close_desktop (void);
gboolean caja_application_save_accel_map (gpointer data);
+#endif
void caja_application_open_location (CajaApplication *application,
GFile *location,
GFile *selection,