Commit 18d52a72 authored by Ernestas Kulik's avatar Ernestas Kulik Committed by Carlos Soriano Sánchez

general: fix failing builds with tracker disabled

Batch rename-related source files are conditionally built depending on
whether Tracker support is enabled. Despite that, some code that depends
on batch rename support is included in some core source files without
being conditionally compiled as well.

https://bugzilla.gnome.org/show_bug.cgi?id=775935
parent 82a2d53e
......@@ -31,8 +31,10 @@
#include "nautilus-file-operations.h"
#include "nautilus-file.h"
#include "nautilus-file-undo-manager.h"
#ifdef ENABLE_TRACKER
#include "nautilus-batch-rename-dialog.h"
#include "nautilus-batch-rename-utilities.h"
#endif /* ENABLE_TRACKER */
/* Since we use g_get_current_time for setting "orig_trash_time" in the undo
......@@ -1086,6 +1088,7 @@ nautilus_file_undo_info_rename_set_data_post (NautilusFileUndoInfoRename *self,
self->priv->new_file = g_object_ref (new_file);
}
#ifdef ENABLE_TRACKER
/* batch rename */
G_DEFINE_TYPE (NautilusFileUndoInfoBatchRename, nautilus_file_undo_info_batch_rename, NAUTILUS_TYPE_FILE_UNDO_INFO);
......@@ -1303,6 +1306,7 @@ nautilus_file_undo_info_batch_rename_set_data_post (NautilusFileUndoInfoBatchRen
self->priv->new_display_names = g_list_reverse (self->priv->new_display_names);
}
#endif /* ENABLE_TRACKER */
/* trash */
G_DEFINE_TYPE (NautilusFileUndoInfoTrash, nautilus_file_undo_info_trash, NAUTILUS_TYPE_FILE_UNDO_INFO)
......
......@@ -1990,6 +1990,7 @@ rename_get_info_callback (GObject *source_object,
}
}
#ifdef ENABLE_TRACKER
typedef struct
{
NautilusFileOperation *op;
......@@ -2077,6 +2078,7 @@ batch_rename_get_info_callback (GObject *source_object,
g_error_free (error);
}
}
#endif /* ENABLE_TRACKER */
static void
rename_callback (GObject *source_object,
......@@ -2272,6 +2274,7 @@ nautilus_file_can_rename_file (NautilusFile *file,
return new_file_name;
}
#ifdef ENABLE_TRACKER
static void
real_batch_rename (GList *files,
GList *new_names,
......@@ -2380,6 +2383,7 @@ real_batch_rename (GList *files,
nautilus_file_operation_complete (op, NULL, error);
}
}
#endif /* ENABLE_TRACKER */
gboolean
nautilus_file_rename_handle_file_gone (NautilusFile *file,
......@@ -2409,6 +2413,7 @@ nautilus_file_rename_handle_file_gone (NautilusFile *file,
return FALSE;
}
#ifdef ENABLE_TRACKER
void
nautilus_file_batch_rename (GList *files,
GList *new_names,
......@@ -2420,6 +2425,7 @@ nautilus_file_batch_rename (GList *files,
callback,
callback_data);
}
#endif /* ENABLE_TRACKER */
static void
real_rename (NautilusFile *file,
......
......@@ -327,10 +327,12 @@ void nautilus_file_rename (Nautilu
const char *new_name,
NautilusFileOperationCallback callback,
gpointer callback_data);
#ifdef ENABLE_TRACKER
void nautilus_file_batch_rename (GList *files,
GList *new_names,
NautilusFileOperationCallback callback,
gpointer callback_data);
#endif /* ENABLE_TRACKER */
void nautilus_file_cancel (NautilusFile *file,
NautilusFileOperationCallback callback,
gpointer callback_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment