[nautilus] files-view: connect to the correct signal
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] files-view: connect to the correct signal
- Date: Sat, 4 Mar 2017 12:03:11 +0000 (UTC)
commit 55e1d1b4b057728095685431096f063e1d4e5353
Author: Ernestas Kulik <ernestask gnome org>
Date: Sat Mar 4 12:51:31 2017 +0200
files-view: connect to the correct signal
1d166b5e3b34195efe04df950a3f5397c2c99ef7 changed the add-file signal to
add-files, but did not update one of the handlers. This commit makes the
code connect to the new signal and updates the handler.
https://bugzilla.gnome.org/show_bug.cgi?id=779564
src/nautilus-files-view.c | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index bf4ec44..3f2b9fb 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1740,7 +1740,7 @@ typedef struct
static void
track_newly_added_locations (NautilusFilesView *view,
- NautilusFile *new_file,
+ GList *new_files,
NautilusDirectory *directory,
gpointer user_data)
{
@@ -1748,7 +1748,17 @@ track_newly_added_locations (NautilusFilesView *view,
added_locations = user_data;
- g_hash_table_add (added_locations, nautilus_file_get_location (new_file));
+ while (new_files)
+ {
+ NautilusFile *new_file;
+
+ new_file = NAUTILUS_FILE (new_files->data);
+
+ g_hash_table_add (added_locations,
+ nautilus_file_get_location (new_file));
+
+ new_files = new_files->next;
+ }
}
static void
@@ -1994,7 +2004,7 @@ new_folder_dialog_controller_on_name_accepted (NautilusFileNameWidgetController
name = nautilus_file_name_widget_controller_get_new_name (controller);
g_signal_connect_data (view,
- "add-file",
+ "add-files",
G_CALLBACK (track_newly_added_locations),
data->added_locations,
(GClosureNotify) NULL,
@@ -2177,7 +2187,7 @@ compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *c
(gpointer *) &data->view);
g_signal_connect_data (view,
- "add-file",
+ "add-files",
G_CALLBACK (track_newly_added_locations),
data->added_locations,
NULL,
@@ -2303,7 +2313,7 @@ setup_new_folder_data (NautilusFilesView *directory_view)
data = new_folder_data_new (directory_view, FALSE);
g_signal_connect_data (directory_view,
- "add-file",
+ "add-files",
G_CALLBACK (track_newly_added_locations),
data->added_locations,
(GClosureNotify) NULL,
@@ -6378,7 +6388,7 @@ extract_files (NautilusFilesView *view,
(gpointer *) &data->view);
g_signal_connect_data (view,
- "add-file",
+ "add-files",
G_CALLBACK (track_newly_added_locations),
data->added_locations,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]