[gtk+/wip/gbsneto/placessidebar-locations] placessidebar: add Connect to Server back



commit 12f49526734ee35ec96ce04107f9028ccade2cdb
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue May 26 16:09:52 2015 -0300

    placessidebar: add Connect to Server back
    
    In order to maintain some backwards compatibility, keep
    the Connect to Server item. It is, however, a deprecated
    item.

 gtk/gtkplacessidebar.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index b76b0fc..e27f328 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -1339,6 +1339,17 @@ update_places (GtkPlacesSidebar *sidebar)
           g_free (mount_uri);
           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);
+        }
     }
 
   g_list_free_full (network_volumes, g_object_unref);
@@ -3981,14 +3992,6 @@ places_sidebar_sort_func (GtkTreeModel *model,
     {
       retval = -1;
     }
-  else if (place_type_a == PLACES_CONNECT_TO_SERVER)
-    {
-      retval = 1;
-    }
-  else if (place_type_b == PLACES_CONNECT_TO_SERVER)
-    {
-      retval = -1;
-    }
 
   return retval;
 }


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