diff options
author | Carlos Soriano <csoriano@gnome.org> | 2018-04-05 23:05:48 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2018-05-03 22:33:44 +0200 |
commit | 1c03da2b897eb3aac1f4206b44ab6f6f08b325b9 (patch) | |
tree | 6d53e6a7925b2e976d2bcf4b70ea033d802e1542 /src/nautilus-view.c | |
parent | 68d6a01c9258015c9d5e5c0edc5413b36e739ea0 (diff) | |
download | nautilus-1c03da2b897eb3aac1f4206b44ab6f6f08b325b9.tar.gz |
views: Proxy the view main values and states
So they can be accessed easily from outside the view or window-slot.
This is useful for preventing layer violation, as we had in the past.
Diffstat (limited to 'src/nautilus-view.c')
-rw-r--r-- | src/nautilus-view.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/nautilus-view.c b/src/nautilus-view.c index 7b3a3c973..6f2fa4698 100644 --- a/src/nautilus-view.c +++ b/src/nautilus-view.c @@ -26,24 +26,24 @@ static void nautilus_view_default_init (NautilusViewInterface *iface) { /** - * NautilusView::is-loading: + * NautilusView::loading: * * %TRUE if the view is loading the location, %FALSE otherwise. */ g_object_interface_install_property (iface, - g_param_spec_boolean ("is-loading", + g_param_spec_boolean ("loading", "Current view is loading", "Whether the current view is loading the location or not", FALSE, G_PARAM_READABLE)); /** - * NautilusView::is-searching: + * NautilusView::searching: * * %TRUE if the view is searching, %FALSE otherwise. */ g_object_interface_install_property (iface, - g_param_spec_boolean ("is-searching", + g_param_spec_boolean ("searching", "Current view is searching", "Whether the current view is searching or not", FALSE, @@ -62,6 +62,17 @@ nautilus_view_default_init (NautilusViewInterface *iface) G_PARAM_READWRITE)); /** + * NautilusView::selection: + * + * The current selection of the view. + */ + g_object_interface_install_property (iface, + g_param_spec_pointer ("selection", + "Selection of the view", + "The current selection of the view", + G_PARAM_READWRITE)); + + /** * NautilusView::search-query: * * The search query being performed, or NULL. |