summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-10-14 19:08:08 -0400
committerGitHub <[email protected]>2016-10-14 19:08:08 -0400
commit682877311e273282314ce40fc925209cd719a5af (patch)
tree1e23e11ab8451341a381c76f9c853b7742d46741
parentc27cc572f8f33bdfbbc3dfea8786d05a1818b910 (diff)
parenta4822f6221c000f4db2a38a8b63e22ff64f6ee7e (diff)
downloadcaja-682877311e273282314ce40fc925209cd719a5af.tar.bz2
caja-682877311e273282314ce40fc925209cd719a5af.tar.xz
Merge pull request #661 from lukefromdc/dev-gtk2fix-maybe
Fix GTK2 builds
-rw-r--r--configure.ac6
-rw-r--r--src/caja-application.c82
-rw-r--r--src/caja-application.h15
-rw-r--r--src/caja-bookmarks-window.c2
-rw-r--r--src/caja-connect-server-dialog-nonmain.c2
-rw-r--r--src/caja-location-bar.c2
-rw-r--r--src/caja-main.c10
-rw-r--r--src/caja-navigation-window-menus.c4
-rw-r--r--src/caja-navigation-window.c2
-rw-r--r--src/caja-places-sidebar.c4
-rw-r--r--src/caja-spatial-window.c2
-rw-r--r--src/caja-window-manage-views.c8
-rw-r--r--src/caja-window.c10
13 files changed, 77 insertions, 72 deletions
diff --git a/configure.ac b/configure.ac
index bf46174a..908483b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,10 +240,12 @@ AC_ARG_ENABLE(libunique,
msg_libunique=no
if test "x$enable_libunique" != "xno"; then
msg_libunique=yes
- AM_CONDITIONAL([ENABLE_LIBUNIQUE], = "1")
+ AM_CONDITIONAL([ENABLE_LIBUNIQUE], true)
+ AC_DEFINE(ENABLE_LIBUNIQUE, 1, [define to enable libunique])
else
msg_libunique=no
- AM_CONDITIONAL([ENABLE_LIBUNIQUE], = "0")
+ AM_CONDITIONAL([ENABLE_LIBUNIQUE], false)
+ AC_DEFINE(ENABLE_LIBUNIQUE, 0, [define to disable libunique])
fi
dnl =====
diff --git a/src/caja-application.c b/src/caja-application.c
index f469eccf..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,9 +701,11 @@ 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)
+ caja_main_event_loop_register (GTK_WIDGET (dialog));
#else
caja_main_event_loop_register (GTK_OBJECT (dialog));
#endif
@@ -992,7 +994,7 @@ do_initialize_screensaver (CajaApplication *application)
NULL);
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static void
do_upgrades_once (CajaApplication *self)
@@ -1536,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;
@@ -1545,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;
@@ -1573,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));
}
@@ -1591,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
@@ -1606,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;
@@ -1780,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)
@@ -1808,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)
@@ -1821,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);
@@ -1830,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
@@ -1879,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);
@@ -1924,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)
@@ -1934,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);
@@ -1970,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)
@@ -2126,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 ());
@@ -2145,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,
@@ -2243,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 ();
@@ -2362,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
@@ -2372,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;
@@ -2405,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);
@@ -2428,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
@@ -2529,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))
@@ -2595,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);
@@ -2658,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 ());
@@ -2784,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,
diff --git a/src/caja-application.h b/src/caja-application.h
index 6eb54138..7aeaa8a4 100644
--- a/src/caja-application.h
+++ b/src/caja-application.h
@@ -27,10 +27,11 @@
#ifndef CAJA_APPLICATION_H
#define CAJA_APPLICATION_H
+#include <config.h>
#include <gdk/gdk.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include <unique/unique.h>
#endif
#include <libegg/eggsmclient.h>
@@ -60,7 +61,7 @@ typedef struct CajaWindow CajaWindow;
typedef struct _CajaSpatialWindow CajaSpatialWindow;
#endif
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
typedef struct _CajaApplicationPriv CajaApplicationPriv;
#else
typedef struct CajaShell CajaShell;
@@ -68,7 +69,7 @@ typedef struct CajaShell CajaShell;
typedef struct
{
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
GtkApplication parent;
CajaApplicationPriv *priv;
#else
@@ -85,7 +86,7 @@ typedef struct
} CajaApplication;
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
typedef struct
{
GtkApplicationClass parent_class;
@@ -121,18 +122,18 @@ CajaWindow * caja_application_get_spatial_window (CajaApplication *appli
gboolean *existing);
CajaWindow * caja_application_create_navigation_window (CajaApplication *application,
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
const char *startup_id,
#endif
GdkScreen *screen);
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
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)
+#if ENABLE_LIBUNIQUE == (TRUE)
void caja_application_open_desktop (CajaApplication *application);
void caja_application_close_desktop (void);
gboolean caja_application_save_accel_map (gpointer data);
diff --git a/src/caja-bookmarks-window.c b/src/caja-bookmarks-window.c
index 5b13f811..1f94cc4b 100644
--- a/src/caja-bookmarks-window.c
+++ b/src/caja-bookmarks-window.c
@@ -595,7 +595,7 @@ open_selected_bookmark (gpointer user_data, GdkScreen *screen)
} else { /* window that opened bookmarks window has been closed */
if (parent_is_browser_window || 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
screen);
diff --git a/src/caja-connect-server-dialog-nonmain.c b/src/caja-connect-server-dialog-nonmain.c
index 2e4d83f9..72ce9a06 100644
--- a/src/caja-connect-server-dialog-nonmain.c
+++ b/src/caja-connect-server-dialog-nonmain.c
@@ -83,7 +83,7 @@ caja_connect_server_dialog_display_location_async (CajaConnectServerDialog *self
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
gtk_widget_get_screen (widget));
diff --git a/src/caja-location-bar.c b/src/caja-location-bar.c
index 57262bb9..a40c3e96 100644
--- a/src/caja-location-bar.c
+++ b/src/caja-location-bar.c
@@ -229,7 +229,7 @@ drag_data_received_callback (GtkWidget *widget,
for (i = 1; names[i] != NULL; ++i)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
+#if ENABLE_LIBUNIQUE == (FALSE)
new_window = caja_application_create_navigation_window (application, screen);
#else
new_window = caja_application_create_navigation_window (application, NULL, screen);
diff --git a/src/caja-main.c b/src/caja-main.c
index 6b411887..51ecbd93 100644
--- a/src/caja-main.c
+++ b/src/caja-main.c
@@ -29,7 +29,7 @@
#include <config.h>
#include "caja-main.h"
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include "caja-application.h"
#include "caja-self-check-functions.h"
#endif
@@ -39,7 +39,7 @@
#include <eel/eel-debug.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-self-checks.h>
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include <libegg/eggsmclient.h>
#endif
#include <libegg/eggdesktopfile.h>
@@ -49,7 +49,7 @@
#include <gio/gdesktopappinfo.h>
#include <libcaja-private/caja-debug-log.h>
#include <libcaja-private/caja-global-preferences.h>
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include <libcaja-private/caja-lib-self-check-functions.h>
#endif
#include <libcaja-private/caja-icon-names.h>
@@ -68,7 +68,7 @@
#include <exempi/xmp.h>
#endif
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
/* Keeps track of everyone who wants the main event loop kept active */
static GSList* event_loop_registrants;
@@ -334,7 +334,7 @@ running_as_root (void)
{
return geteuid () == 0;
}
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
int
main (int argc, char *argv[])
{
diff --git a/src/caja-navigation-window-menus.c b/src/caja-navigation-window-menus.c
index ad61fcc9..2f7a1f5b 100644
--- a/src/caja-navigation-window-menus.c
+++ b/src/caja-navigation-window-menus.c
@@ -64,7 +64,7 @@
static void schedule_refresh_go_menu (CajaNavigationWindow *window);
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
static void
action_close_all_windows_callback (GtkAction *action,
gpointer user_data)
@@ -622,7 +622,7 @@ 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)
+#if ENABLE_LIBUNIQUE == (TRUE)
NULL,
#endif
gtk_window_get_screen (GTK_WINDOW (current_window)));
diff --git a/src/caja-navigation-window.c b/src/caja-navigation-window.c
index 52cbd16a..a0c75ae6 100644
--- a/src/caja-navigation-window.c
+++ b/src/caja-navigation-window.c
@@ -34,7 +34,7 @@
#include "caja-actions.h"
#include "caja-application.h"
#include "caja-bookmarks-window.h"
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include "caja-main.h"
#endif
#include "caja-location-bar.h"
diff --git a/src/caja-places-sidebar.c b/src/caja-places-sidebar.c
index fff63ea5..a66bbc5c 100644
--- a/src/caja-places-sidebar.c
+++ b/src/caja-places-sidebar.c
@@ -1895,7 +1895,7 @@ volume_mounted_cb (GVolume *volume,
cur = CAJA_WINDOW (sidebar->window);
new = caja_application_create_navigation_window (cur->application,
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
NULL,
#endif
gtk_window_get_screen (GTK_WINDOW (cur)));
@@ -1980,7 +1980,7 @@ open_selected_bookmark (CajaPlacesSidebar *sidebar,
cur = CAJA_WINDOW (sidebar->window);
new = caja_application_create_navigation_window (cur->application,
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
NULL,
#endif
gtk_window_get_screen (GTK_WINDOW (cur)));
diff --git a/src/caja-spatial-window.c b/src/caja-spatial-window.c
index 809b0894..ab716c3d 100644
--- a/src/caja-spatial-window.c
+++ b/src/caja-spatial-window.c
@@ -37,7 +37,7 @@
#include "caja-desktop-window.h"
#include "caja-bookmarks-window.h"
#include "caja-location-dialog.h"
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include "caja-main.h"
#endif
#include "caja-query-editor.h"
diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c
index 2fa24e2a..74578525 100644
--- a/src/caja-window-manage-views.c
+++ b/src/caja-window-manage-views.c
@@ -33,7 +33,7 @@
#include "caja-location-bar.h"
#include "caja-search-bar.h"
#include "caja-pathbar.h"
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include "caja-main.h"
#endif
#include "caja-window-private.h"
@@ -603,7 +603,7 @@ caja_window_slot_open_location_full (CajaWindowSlot *slot,
} else if (target_navigation) {
target_window = caja_application_create_navigation_window
(window->application,
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
NULL,
#endif
gtk_window_get_screen (GTK_WINDOW (window)));
@@ -1199,7 +1199,7 @@ got_file_info_for_view_selection_callback (CajaFile *file,
GFile *location;
GMountOperation *mount_op;
MountNotMountedData *data;
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
CajaApplication *app;
#endif
slot = callback_data;
@@ -1314,7 +1314,7 @@ got_file_info_for_view_selection_callback (CajaFile *file,
* happens when a new window cannot display its initial URI.
*/
/* if this is the only window, we don't want to quit, so we redirect it to home */
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
app = CAJA_APPLICATION (g_application_get_default ());
if (g_list_length (gtk_application_get_windows (GTK_APPLICATION (app))) == 1) {
diff --git a/src/caja-window.c b/src/caja-window.c
index 398ec91c..69c62429 100644
--- a/src/caja-window.c
+++ b/src/caja-window.c
@@ -32,7 +32,7 @@
#include "caja-application.h"
#include "caja-bookmarks-window.h"
#include "caja-information-panel.h"
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
#include "caja-main.h"
#endif
#include "caja-window-manage-views.h"
@@ -238,7 +238,7 @@ caja_window_init (CajaWindow *window)
/* Register to menu provider extension signal managing menu updates */
g_signal_connect_object (caja_signaller_get_current (), "popup_menu_changed",
G_CALLBACK (caja_window_load_extension_menus), window, G_CONNECT_SWAPPED);
-#if ENABLE_LIBUNIQUE == (1)
+#if ENABLE_LIBUNIQUE == (TRUE)
/* Keep the main event loop alive as long as the window exists */
#if GTK_CHECK_VERSION(3, 0, 0)
/* FIXME: port to GtkApplication with GTK3 */
@@ -1907,7 +1907,7 @@ caja_forget_history (void)
CajaWindowSlot *slot;
CajaNavigationWindowSlot *navigation_slot;
GList *window_node, *l, *walk;
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
CajaApplication *app;
app = CAJA_APPLICATION (g_application_get_default ());
@@ -1916,7 +1916,7 @@ caja_forget_history (void)
* each window's current location bookmark from history list
* so it doesn't get clobbered.
*/
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
for (window_node = gtk_application_get_windows (GTK_APPLICATION (app));
#else
for (window_node = caja_application_get_window_list ();
@@ -1963,7 +1963,7 @@ caja_forget_history (void)
free_history_list ();
/* Re-add each window's current location to history list. */
-#if ENABLE_LIBUNIQUE == (0)
+#if ENABLE_LIBUNIQUE == (FALSE)
for (window_node = gtk_application_get_windows (GTK_APPLICATION (app));
#else
for (window_node = caja_application_get_window_list ();