diff options
author | Carlos Soriano <csoriano@gnome.org> | 2015-08-28 21:11:52 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-08-28 22:24:25 +0200 |
commit | eb6d31e070135872a4d2e8777312dedd4647d944 (patch) | |
tree | f93098d4448da91b59c2077cc57a9a6990b4baab /src/nautilus-application.c | |
parent | 7ebdf7cb99af2db52df14c7133039656004c3d69 (diff) | |
download | nautilus-wip/csoriano/slot-cleanup.tar.gz |
slot: use location propertywip/csoriano/slot-cleanup
We were using a custom signal that reports the previous
location and the new one, given that was needed by files-view
for its bookmarks in the file chooser.
Previous patch removed that, so now the only client is the application
which updates the dbus locations available to FileManager dbus.
We want to have some consistency between the handling of the
views/slots/windows, and we are moving forward to use properties
instead of signals since makes it clearer and cleaner, and allow
bindings and other nice things.
For that, match what the view does and expose a location property
on the slot.
In future, if the window has some client that listen to the current
viewed location, a property binding to the active slot would do.
In this case, we can't bind the property to the one of the view, since
there is still some management done on the slot, but this will change
soon when we move the remaining location management to the view itself.
Diffstat (limited to 'src/nautilus-application.c')
-rw-r--r-- | src/nautilus-application.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c index a1f3f3fa9..bb6312c91 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -1145,10 +1145,9 @@ update_dbus_opened_locations (NautilusApplication *app) } static void -on_slot_location_changed (NautilusWindowSlot *slot, - const char *from, - const char *to, - NautilusApplication *application) +on_slot_location_changed (NautilusWindowSlot *slot, + GParamSpec *pspec, + NautilusApplication *application) { update_dbus_opened_locations (application); } @@ -1162,7 +1161,7 @@ on_slot_added (NautilusWindow *window, update_dbus_opened_locations (application); } - g_signal_connect (slot, "location-changed", G_CALLBACK (on_slot_location_changed), application); + g_signal_connect (slot, "notify::location", G_CALLBACK (on_slot_location_changed), application); } static void |