From 1c03da2b897eb3aac1f4206b44ab6f6f08b325b9 Mon Sep 17 00:00:00 2001 From: Carlos Soriano Date: Thu, 5 Apr 2018 23:05:48 +0200 Subject: 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. --- src/nautilus-view.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/nautilus-view.c') 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, @@ -61,6 +61,17 @@ nautilus_view_default_init (NautilusViewInterface *iface) G_TYPE_FILE, 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: * -- cgit v1.2.1