[nautilus] batch-renaming: disable if compiled without tracker
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] batch-renaming: disable if compiled without tracker
- Date: Mon, 12 Sep 2016 19:02:16 +0000 (UTC)
commit 70dda95b8593599189c0d0d905d89ce32ab5c911
Author: Carlos Soriano <csoriano gnome org>
Date: Mon Sep 12 20:56:59 2016 +0200
batch-renaming: disable if compiled without tracker
We have a compile option to not use tracker. Batch renaming relies on
tracker for part of its functionality, and disabling that would mess the
code with ifdefs.
I think doesn't make much sense to have a compile time switch for
tracker anymore (tracker can still be disabled in runtime and it's fine)
so I would like to remove that switch.
Since it's late in the cycle, better to not do that, but let's try for
next release. For now just make the batch-renaming disabled in case
the compilation was done without tracker.
https://bugzilla.gnome.org/show_bug.cgi?id=771158
src/Makefile.am | 13 +++++++++----
src/nautilus-files-view.c | 8 ++++++++
2 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index d514569..b9bc25a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -119,6 +119,14 @@ nautilus_tracker_engine_sources = \
nautilus-search-engine-tracker.h
endif
+if ENABLE_TRACKER
+nautilus_batch_renaming_tracker_sources = \
+ nautilus-batch-renaming-dialog.c \
+ nautilus-batch-renaming-dialog.h
+ nautilus-batch-renaming-utilities.c \
+ nautilus-batch-renaming-utilities.h
+endif
+
nautilus_built_sources = \
$(dbus_built_sources) \
$(dbus_freedesktop_built_sources) \
@@ -136,8 +144,6 @@ nautilus_no_main_sources = \
gtk/nautilusgtkplacesviewrowprivate.h \
nautilus-application.c \
nautilus-application.h \
- nautilus-batch-rename-dialog.c \
- nautilus-batch-rename-dialog.h \
nautilus-bookmark-list.c \
nautilus-bookmark-list.h \
nautilus-canvas-view.c \
@@ -191,8 +197,6 @@ nautilus_no_main_sources = \
nautilus-properties-window.h \
nautilus-query-editor.c \
nautilus-query-editor.h \
- nautilus-batch-rename-utilities.c \
- nautilus-batch-rename-utilities.h \
nautilus-search-popover.c \
nautilus-search-popover.h \
nautilus-self-check-functions.c \
@@ -335,6 +339,7 @@ nautilus_no_main_sources = \
nautilus-file-undo-manager.c \
nautilus-file-undo-manager.h \
$(nautilus_tracker_engine_sources) \
+ $(nautilus_batch_renaming_tracker_sources) \
$(NULL)
libnautilus_la_SOURCES = \
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 332e78c..d00c5ee 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -28,8 +28,10 @@
#include "nautilus-files-view.h"
#include "nautilus-application.h"
+#ifdef ENABLE_TRACKER
#include "nautilus-batch-rename-dialog.h"
#include "nautilus-batch-rename-utilities.h"
+#endif
#include "nautilus-error-reporting.h"
#include "nautilus-file-undo-manager.h"
#include "nautilus-floating-bar.h"
@@ -5935,6 +5937,7 @@ real_action_rename (NautilusFilesView *view)
{
invoke_external_bulk_rename_utility (view, selection);
}
+#ifdef ENABLE_TRACKER
else
{
GdkCursor *cursor;
@@ -5952,6 +5955,7 @@ real_action_rename (NautilusFilesView *view)
gtk_widget_show (GTK_WIDGET (dialog));
}
+#endif
}
else
{
@@ -7079,8 +7083,12 @@ real_update_actions_state (NautilusFilesView *view)
}
else
{
+#ifdef ENABLE_TRACKER
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
nautilus_file_can_rename_files (selection));
+#else
+ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
+#endif
}
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]