From a39b8f67ba914cd2d6c2df50ce8b1659d9714d30 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 16 Jul 2015 09:37:56 -0300 Subject: [PATCH] placessidebar: fix Connect to Server position Commit 7db399d975b8f9626c21761dde5f2d5feeb6e305 introduces the Other Locations item, as well as some behavioral changes to GtkPlacesSidebar. It, howevers, wrongly changes the section of code that handles the Connect to Server item, with various side effects depending on the environment setup. Fix that by adding the Connect to Server at the right section of code. --- gtk/gtkplacessidebar.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 1781f3973f..39291bca75 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -1223,6 +1223,17 @@ update_places (GtkPlacesSidebar *sidebar) /* network */ if (!sidebar->local_only) { + if (sidebar->show_connect_to_server) + { + icon = g_themed_icon_new_with_default_fallbacks (ICON_NAME_NETWORK_SERVER); + add_place (sidebar, PLACES_CONNECT_TO_SERVER, + SECTION_MOUNTS, + _("Connect to Server"), icon, NULL, + NULL, NULL, NULL, 0, + _("Connect to a network server address")); + g_object_unref (icon); + } + network_volumes = g_list_reverse (network_volumes); for (l = network_volumes; l != NULL; l = l->next) { @@ -1248,17 +1259,6 @@ update_places (GtkPlacesSidebar *sidebar) g_free (name); g_free (tooltip); } - - if (sidebar->show_connect_to_server) - { - icon = g_themed_icon_new_with_default_fallbacks (ICON_NAME_NETWORK_SERVER); - add_place (sidebar, PLACES_CONNECT_TO_SERVER, - SECTION_MOUNTS, - _("Connect to Server"), icon, NULL, - NULL, NULL, NULL, 0, - _("Connect to a network server address")); - g_object_unref (icon); - } } network_mounts = g_list_reverse (network_mounts); -- 2.30.2