[gthumb] browser: set the location source only if the location was changed



commit 69897a69d78b7a5eb24ce77e5068fcb525c326c3
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Apr 20 22:28:00 2012 +0200

    browser: set the location source only if the location was changed

 gthumb/gth-browser.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 2cc05af..fefb90a 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -1198,11 +1198,6 @@ load_data_done (LoadData *load_data,
 		g_free (uri);
 	}
 
-	if (error == NULL) {
-		_g_object_unref (browser->priv->location_source);
-		browser->priv->location_source = g_object_ref (load_data->file_source);
-	}
-
 	/* moving the "gth-browser-load-location-after" after the
 	 * LOCATION_READY signal emition can brake the extensions */
 
@@ -1212,6 +1207,10 @@ load_data_done (LoadData *load_data,
 	    || (load_data->action == GTH_ACTION_GO_UP)
 	    || (load_data->action == GTH_ACTION_VIEW))
 	{
+		if (error == NULL) {
+			_g_object_unref (browser->priv->location_source);
+			browser->priv->location_source = g_object_ref (load_data->file_source);
+		}
 		gth_browser_update_extra_widget (browser);
 		gth_hook_invoke ("gth-browser-load-location-after", browser, browser->priv->location, error);
 	}



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