summaryrefslogtreecommitdiff
path: root/src/nautilus-application.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2019-07-06 22:26:44 -0700
committerCosimo Cecchi <cosimoc@gnome.org>2019-08-29 16:20:05 -0700
commit0f9823b05e5a1371b3b0d8a1838aef8f78f08d30 (patch)
treee4daf101a284a9b58b71a7a8944c5d61ef431df0 /src/nautilus-application.c
parent2d3dcbcfb78df09f8707a12b33468cd63da2b020 (diff)
downloadnautilus-0f9823b05e5a1371b3b0d8a1838aef8f78f08d30.tar.gz
Add support for the SelectionEvent previewer signal
And handle it by moving the selection in the current view. Once in a following commit we have the previewer follow the view selection, we'll achieve the desired effect of moving the preview with the selection.
Diffstat (limited to 'src/nautilus-application.c')
-rw-r--r--src/nautilus-application.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 3deae733f..d146147ed 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -84,6 +84,8 @@ typedef struct
NautilusTagManager *tag_manager;
GCancellable *tag_manager_cancellable;
+
+ guint previewer_selection_id;
} NautilusApplicationPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (NautilusApplication, nautilus_application, GTK_TYPE_APPLICATION);
@@ -1343,6 +1345,8 @@ nautilus_application_dbus_register (GApplication *app,
return FALSE;
}
+ priv->previewer_selection_id = nautilus_previewer_connect_selection_event (connection);
+
return TRUE;
}
@@ -1366,6 +1370,13 @@ nautilus_application_dbus_unregister (GApplication *app,
nautilus_shell_search_provider_unregister (priv->search_provider);
g_clear_object (&priv->search_provider);
}
+
+ if (priv->previewer_selection_id != 0)
+ {
+ nautilus_previewer_disconnect_selection_event (connection,
+ priv->previewer_selection_id);
+ priv->previewer_selection_id = 0;
+ }
}
static void