From: Georges Basile Stavracas Neto Date: Thu, 16 Jul 2015 12:37:56 +0000 (-0300) Subject: placessidebar: fix Connect to Server position X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~24^2~9043 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a39b8f67ba914cd2d6c2df50ce8b1659d9714d30;p=gtk4.git 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. --- 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);