placessidebar: fix Connect to Server position
Commit 7db399d975 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.
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user