[nautilus] window: removed loading-uri



commit 861842108d08fa27e515bbdd1b2688e827df14f5
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Aug 28 17:48:50 2015 +0200

    window: removed loading-uri
    
    With the latest patches where we separated the management
    of each component to its own class, this is no longer necesary,
    since the only component that takes care about the view loading
    is the slot.

 src/nautilus-window-slot.c |   24 ++----------------------
 src/nautilus-window.c      |   36 ------------------------------------
 2 files changed, 2 insertions(+), 58 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index d48be27..7d3cea0 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -2172,11 +2172,6 @@ nautilus_window_slot_switch_new_content_view (NautilusWindowSlot *slot)
 static void
 change_view (NautilusWindowSlot *slot)
 {
-       NautilusWindow *window;
-       GFile *location;
-
-       window = nautilus_window_slot_get_window (slot);
-
        /* Switch to the new content view.
         * Destroy the extra location widgets first, since they might hold
         * a pointer to the old view, which will possibly be destroyed inside
@@ -2194,21 +2189,6 @@ change_view (NautilusWindowSlot *slot)
         * add back the extra location widgets.
         */
        nautilus_window_slot_setup_extra_location_widgets (slot);
-
-       location = nautilus_window_slot_get_location (slot);
-       if (location != NULL) {
-               g_object_ref (location);
-
-               if (nautilus_window_slot_get_active (slot)) {
-                       char *uri;
-
-                       uri = g_file_get_uri (location);
-                       g_signal_emit_by_name (window, "loading-uri", uri);
-                       g_free (uri);
-               }
-
-               g_object_unref (location);
-       }
 }
 
 static void
@@ -2422,11 +2402,11 @@ nautilus_window_slot_set_window (NautilusWindowSlot *slot,
 }
 
 /* nautilus_window_slot_update_title:
- * 
+ *
  * Re-calculate the slot title.
  * Called when the location or view has changed.
  * @slot: The NautilusWindowSlot in question.
- * 
+ *
  */
 void
 nautilus_window_slot_update_title (NautilusWindowSlot *slot)
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 23df900..209719f 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -82,7 +82,6 @@ static void mouse_forward_button_changed           (gpointer                  callbac
 static void use_extra_mouse_buttons_changed          (gpointer                  callback_data);
 static void nautilus_window_initialize_actions              (NautilusWindow *window);
 static GtkWidget * nautilus_window_ensure_location_entry (NautilusWindow *window);
-static void nautilus_window_report_location_change (NautilusWindow *window);
 
 /* Sanity check: highest mouse button value I could find was 14. 5 is our 
  * lower threshold (well-documented to be the one of the button events for the 
@@ -147,7 +146,6 @@ enum {
 };
 
 enum {
-       LOADING_URI,
        SLOT_ADDED,
        SLOT_REMOVED,
        LAST_SIGNAL
@@ -478,8 +476,6 @@ undo_manager_changed (NautilusWindow *window)
 static void
 on_location_changed (NautilusWindow *window)
 {
-
-        nautilus_window_report_location_change (window);
         gtk_places_sidebar_set_location (GTK_PLACES_SIDEBAR (window->priv->places_sidebar),
                                          nautilus_window_slot_get_location (nautilus_window_get_active_slot 
(window)));
 }
@@ -2166,28 +2162,6 @@ nautilus_window_close (NautilusWindow *window)
        NAUTILUS_WINDOW_CLASS (G_OBJECT_GET_CLASS (window))->close (window);
 }
 
-/* reports location change to window's "loading-uri" clients, i.e.
- * sidebar panels [used when switching tabs]. It will emit the pending
- * location, or the existing location if none is pending.
- */
-static void
-nautilus_window_report_location_change (NautilusWindow *window)
-{
-       NautilusWindowSlot *slot;
-        GFile *location;
-       gchar *uri;
-
-       slot = nautilus_window_get_active_slot (window);
-       location = nautilus_window_slot_get_location (slot);
-
-        /* location can be null on creating for first time the slot */
-       if (location != NULL) {
-                uri = g_file_get_uri (location);
-               g_signal_emit (window, signals[LOADING_URI], 0, uri);
-               g_free (uri);
-       }
-}
-
 void
 nautilus_window_set_active_slot (NautilusWindow *window, NautilusWindowSlot *new_slot)
 {
@@ -2489,16 +2463,6 @@ nautilus_window_class_init (NautilusWindowClass *class)
                                      FALSE,
                                      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
                                      G_PARAM_STATIC_STRINGS);
-
-       signals[LOADING_URI] =
-               g_signal_new ("loading-uri",
-                             G_TYPE_FROM_CLASS (class),
-                             G_SIGNAL_RUN_LAST,
-                             0,
-                             NULL, NULL,
-                             g_cclosure_marshal_VOID__STRING,
-                             G_TYPE_NONE, 1,
-                             G_TYPE_STRING);
        signals[SLOT_ADDED] =
                g_signal_new ("slot-added",
                              G_TYPE_FROM_CLASS (class),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]