summaryrefslogtreecommitdiff
path: root/src/caja-application.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-10-14 16:28:27 -0400
committerlukefromdc <[email protected]>2016-10-14 16:28:27 -0400
commita4822f6221c000f4db2a38a8b63e22ff64f6ee7e (patch)
tree1e23e11ab8451341a381c76f9c853b7742d46741 /src/caja-application.c
parent15a9e9a073a799341c18ace6b568e5317135056c (diff)
downloadcaja-a4822f6221c000f4db2a38a8b63e22ff64f6ee7e.tar.bz2
caja-a4822f6221c000f4db2a38a8b63e22ff64f6ee7e.tar.xz
GTK2: Use emanuele-f 's patch for build failure, fix build w/o libunique
Apply https://github.com/mate-desktop/caja/pull/658/commits/4b36a91af42d8efe0f594a95d28ab8448fd73b31 then fix the selectors in source files to use the boolean selectors for libunique
Diffstat (limited to 'src/caja-application.c')
-rw-r--r--src/caja-application.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/caja-application.c b/src/caja-application.c
index d3e90182..ab38e593 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -39,7 +39,7 @@
#include "caja-information-panel.h"
#include "caja-history-sidebar.h"
#include "caja-places-sidebar.h"
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
#include "caja-self-check-functions.h"
#endif
#include "caja-notes-viewer.h"
@@ -49,7 +49,7 @@
#include <string.h>
#include <unistd.h>
#include "caja-desktop-window.h"
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include "caja-main.h"
#endif
#include "caja-spatial-window.h"
@@ -73,7 +73,7 @@
#include <libcaja-private/caja-debug-log.h>
#include <libcaja-private/caja-file-utilities.h>
#include <libcaja-private/caja-global-preferences.h>
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
#include <libcaja-private/caja-lib-self-check-functions.h>
#endif
#include <libcaja-private/caja-extensions.h>
@@ -86,7 +86,7 @@
#define MATE_DESKTOP_USE_UNSTABLE_API
#include <libmate-desktop/mate-bg.h>
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -108,7 +108,7 @@ enum {
/* Keeps track of all the desktop windows. */
static GList *caja_application_desktop_windows;
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
/* Keeps track of all the caja windows. */
static GList *caja_application_window_list;
#endif
@@ -122,7 +122,7 @@ static gboolean save_of_accel_map_requested = FALSE;
static CajaFreedesktopDBus *fdb_manager = NULL;
static void desktop_changed_callback (gpointer user_data);
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
static void desktop_location_changed_callback (gpointer user_data);
#endif
static void mount_removed_callback (GVolumeMonitor *monitor,
@@ -142,7 +142,7 @@ static void volume_removed_callback (GVolumeMonitor *mo
CajaApplication *application);
static void drive_listen_for_eject_button (GDrive *drive,
CajaApplication *application);
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static void caja_application_load_session (CajaApplication *application);
static char * caja_application_get_session_data (CajaApplication *self);
void caja_application_quit (CajaApplication *self);
@@ -150,7 +150,7 @@ void caja_application_quit (CajaApplication *self);
static void caja_application_load_session (CajaApplication *application);
static char * caja_application_get_session_data (void);
#endif
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
G_DEFINE_TYPE (CajaApplication, caja_application, GTK_TYPE_APPLICATION);
struct _CajaApplicationPriv {
GVolumeMonitor *volume_monitor;
@@ -252,7 +252,7 @@ caja_application_get_spatial_window_list (void)
return caja_application_spatial_window_list;
}
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
unsigned int
caja_application_get_n_windows (void)
{
@@ -278,7 +278,7 @@ automount_all_volumes (CajaApplication *application)
if (g_settings_get_boolean (caja_media_preferences, CAJA_PREFERENCES_MEDIA_AUTOMOUNT))
{
/* automount all mountable volumes at start-up */
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
volumes = g_volume_monitor_get_volumes (application->priv->volume_monitor);
#else
volumes = g_volume_monitor_get_volumes (application->volume_monitor);
@@ -314,7 +314,7 @@ smclient_save_state_cb (EggSMClient *client,
CajaApplication *application)
{
char *data;
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
data = caja_application_get_session_data (application);
if (data != NULL)
@@ -336,14 +336,14 @@ static void
smclient_quit_cb (EggSMClient *client,
CajaApplication *application)
{
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
caja_application_quit (application);
#else
caja_main_event_loop_quit (TRUE);
#endif
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static void
caja_application_smclient_initialize (CajaApplication *self)
@@ -589,7 +589,7 @@ caja_application_finalize (GObject *object)
application = CAJA_APPLICATION (object);
caja_bookmarks_exiting ();
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
if (application->volume_monitor)
{
g_object_unref (application->priv->volume_monitor);
@@ -701,7 +701,7 @@ check_required_directories (CajaApplication *application)
dialog = eel_show_error_dialog (error_string, detail_string, NULL);
/* We need the main event loop so the user has a chance to see the dialog. */
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
gtk_application_add_window (GTK_APPLICATION (application),
GTK_WINDOW (dialog));
#elif GTK_CHECK_VERSION (3, 0, 0)
@@ -994,7 +994,7 @@ do_initialize_screensaver (CajaApplication *application)
NULL);
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static void
do_upgrades_once (CajaApplication *self)
@@ -1538,7 +1538,7 @@ selection_clear_event_cb (GtkWidget *widget,
static void
caja_application_create_desktop_windows (CajaApplication *application)
{
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
static gboolean create_in_progress = FALSE;
#endif
GdkDisplay *display;
@@ -1547,7 +1547,7 @@ caja_application_create_desktop_windows (CajaApplication *application)
g_return_if_fail (caja_application_desktop_windows == NULL);
g_return_if_fail (CAJA_IS_APPLICATION (application));
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
if (create_in_progress)
{
return;
@@ -1575,7 +1575,7 @@ caja_application_create_desktop_windows (CajaApplication *application)
caja_application_desktop_windows =
g_list_prepend (caja_application_desktop_windows, window);
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
gtk_application_add_window (GTK_APPLICATION (application),
GTK_WINDOW (window));
}
@@ -1593,7 +1593,7 @@ caja_application_open_desktop (CajaApplication *application)
caja_application_create_desktop_windows (application);
}
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static void
#else
void
@@ -1608,7 +1608,7 @@ caja_application_close_desktop (void)
}
void
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
caja_application_close_all_navigation_windows (CajaApplication *self)
{
GList *list_copy;
@@ -1782,7 +1782,7 @@ caja_application_close_all_spatial_windows (void)
g_list_free (list_copy);
}
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
static void
#if GTK_CHECK_VERSION (3, 0, 0)
caja_application_destroyed_window (GtkWidget *object, CajaApplication *application)
@@ -1810,7 +1810,7 @@ caja_window_delete_event_callback (GtkWidget *widget,
static CajaWindow *
create_window (CajaApplication *application,
GType window_type,
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
const char *startup_id,
#endif
GdkScreen *screen)
@@ -1823,7 +1823,7 @@ create_window (CajaApplication *application,
"app", application,
"screen", screen,
NULL));
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
if (startup_id)
{
gtk_window_set_startup_id (GTK_WINDOW (window), startup_id);
@@ -1832,7 +1832,7 @@ create_window (CajaApplication *application,
g_signal_connect_data (window, "delete_event",
G_CALLBACK (caja_window_delete_event_callback), NULL, NULL,
G_CONNECT_AFTER);
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
gtk_application_add_window (GTK_APPLICATION (application),
GTK_WINDOW (window));
#else
@@ -1881,7 +1881,7 @@ caja_application_get_spatial_window (CajaApplication *application,
if (existing != NULL) {
*existing = FALSE;
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
window = create_window (application, CAJA_TYPE_SPATIAL_WINDOW, screen);
#else
window = create_window (application, CAJA_TYPE_SPATIAL_WINDOW, startup_id, screen);
@@ -1926,7 +1926,7 @@ caja_application_get_spatial_window (CajaApplication *application,
CajaWindow *
caja_application_create_navigation_window (CajaApplication *application,
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
const char *startup_id,
#endif
GdkScreen *screen)
@@ -1936,7 +1936,7 @@ caja_application_create_navigation_window (CajaApplication *application,
gboolean maximized;
g_return_val_if_fail (CAJA_IS_APPLICATION (application), NULL);
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
window = create_window (application, CAJA_TYPE_NAVIGATION_WINDOW, screen);
#else
window = create_window (application, CAJA_TYPE_NAVIGATION_WINDOW, startup_id, screen);
@@ -1972,7 +1972,7 @@ caja_application_create_navigation_window (CajaApplication *application,
return window;
}
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
/* callback for changing the directory the desktop points to */
static void
desktop_location_changed_callback (gpointer user_data)
@@ -2128,7 +2128,7 @@ autorun_show_window (GMount *mount, gpointer user_data)
/* There should probably be an easier way to do this */
if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_ALWAYS_USE_BROWSER)) {
window = caja_application_create_navigation_window (application,
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
NULL,
#endif
gdk_screen_get_default ());
@@ -2147,7 +2147,7 @@ autorun_show_window (GMount *mount, gpointer user_data)
g_object_unref (location);
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static void
mount_added_callback (GVolumeMonitor *monitor,
GMount *mount,
@@ -2245,7 +2245,7 @@ mount_removed_callback (GVolumeMonitor *monitor,
unclosed_slot = FALSE;
/* Check and see if any of the open windows are displaying contents from the unmounted mount */
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
window_list = gtk_application_get_windows (GTK_APPLICATION (application));
#else
window_list = caja_application_get_window_list ();
@@ -2364,7 +2364,7 @@ icon_from_string (const char *string)
}
return NULL;
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static char *
caja_application_get_session_data (CajaApplication *self)
#else
@@ -2374,7 +2374,7 @@ caja_application_get_session_data (void)
{
xmlDocPtr doc;
xmlNodePtr root_node, history_node;
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
GList *l, *window_list;
#else
GList *l;
@@ -2407,7 +2407,7 @@ caja_application_get_session_data (void)
g_free (tmp);
icon = caja_bookmark_get_icon (bookmark);
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
tmp = g_icon_to_string (icon);
#else
tmp = icon_to_string (icon);
@@ -2430,7 +2430,7 @@ caja_application_get_session_data (void)
break;
}
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
window_list = gtk_application_get_windows (GTK_APPLICATION (self));
for (l = window_list; l != NULL; l = l->next) {
#else
@@ -2531,7 +2531,7 @@ caja_application_load_session (CajaApplication *application)
xmlNodePtr root_node;
GKeyFile *state_file;
char *data;
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
caja_application_smclient_initialize (application);
#endif
if (!egg_sm_client_is_resumed (application->smclient))
@@ -2597,7 +2597,7 @@ caja_application_load_session (CajaApplication *application)
icon = NULL;
if (icon_str)
{
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
icon = g_icon_new_for_string (icon_str, NULL);
#else
icon = icon_from_string (icon_str);
@@ -2660,7 +2660,7 @@ caja_application_load_session (CajaApplication *application)
if (g_strcmp0 (type, "navigation") == 0)
{
xmlChar *geometry;
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
window = caja_application_create_navigation_window (application, gdk_screen_get_default ());
#else
window = caja_application_create_navigation_window (application, NULL, gdk_screen_get_default ());
@@ -2786,7 +2786,7 @@ caja_application_load_session (CajaApplication *application)
}
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static gboolean
do_cmdline_sanity_checks (CajaApplication *self,
gboolean perform_self_check,