[gtk+/wip/ricotz/deprecated] gtkplacessidebar: Remove deprecated show-connect-to-server property



commit 88b5c9a137e9306f0b230ab576a560087e68bcc5
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Oct 23 17:13:14 2016 +0200

    gtkplacessidebar: Remove deprecated show-connect-to-server property

 docs/reference/gtk/gtk4-sections.txt |    2 -
 gtk/gtkplacessidebar.c               |   80 ----------------------------------
 gtk/gtkplacessidebar.h               |    5 --
 3 files changed, 0 insertions(+), 87 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 69b7e6f..3124bbd 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -2267,8 +2267,6 @@ gtk_places_sidebar_add_shortcut
 gtk_places_sidebar_remove_shortcut
 gtk_places_sidebar_list_shortcuts
 gtk_places_sidebar_get_nth_bookmark
-gtk_places_sidebar_get_show_connect_to_server
-gtk_places_sidebar_set_show_connect_to_server
 gtk_places_sidebar_get_local_only
 gtk_places_sidebar_set_local_only
 gtk_places_sidebar_get_show_enter_location
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index a66d4c6..69ebd38 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -237,7 +237,6 @@ enum {
   PROP_OPEN_FLAGS,
   PROP_SHOW_RECENT,
   PROP_SHOW_DESKTOP,
-  PROP_SHOW_CONNECT_TO_SERVER,
   PROP_SHOW_ENTER_LOCATION,
   PROP_SHOW_TRASH,
   PROP_LOCAL_ONLY,
@@ -334,12 +333,6 @@ emit_show_error_message (GtkPlacesSidebar *sidebar,
 }
 
 static void
-emit_show_connect_to_server (GtkPlacesSidebar *sidebar)
-{
-  g_signal_emit (sidebar, places_sidebar_signals[SHOW_CONNECT_TO_SERVER], 0);
-}
-
-static void
 emit_show_enter_location (GtkPlacesSidebar *sidebar)
 {
   g_signal_emit (sidebar, places_sidebar_signals[SHOW_ENTER_LOCATION], 0);
@@ -2348,10 +2341,6 @@ open_row (GtkSidebarRow      *row,
     {
       open_uri (sidebar, uri, open_flags);
     }
-  else if (place_type == PLACES_CONNECT_TO_SERVER)
-    {
-      emit_show_connect_to_server (sidebar);
-    }
   else if (place_type == PLACES_ENTER_LOCATION)
     {
       emit_show_enter_location (sidebar);
@@ -3932,12 +3921,6 @@ gtk_places_sidebar_set_property (GObject      *obj,
       gtk_places_sidebar_set_show_desktop (sidebar, g_value_get_boolean (value));
       break;
 
-    case PROP_SHOW_CONNECT_TO_SERVER:
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-      gtk_places_sidebar_set_show_connect_to_server (sidebar, g_value_get_boolean (value));
-G_GNUC_END_IGNORE_DEPRECATIONS
-      break;
-
     case PROP_SHOW_ENTER_LOCATION:
       gtk_places_sidebar_set_show_enter_location (sidebar, g_value_get_boolean (value));
       break;
@@ -3994,12 +3977,6 @@ gtk_places_sidebar_get_property (GObject    *obj,
       g_value_set_boolean (value, gtk_places_sidebar_get_show_desktop (sidebar));
       break;
 
-    case PROP_SHOW_CONNECT_TO_SERVER:
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-      g_value_set_boolean (value, gtk_places_sidebar_get_show_connect_to_server (sidebar));
-G_GNUC_END_IGNORE_DEPRECATIONS
-      break;
-
     case PROP_SHOW_ENTER_LOCATION:
       g_value_set_boolean (value, gtk_places_sidebar_get_show_enter_location (sidebar));
       break;
@@ -4471,12 +4448,6 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
                                 P_("Whether the sidebar includes a builtin shortcut to the Desktop folder"),
                                 TRUE,
                                 G_PARAM_READWRITE);
-  properties[PROP_SHOW_CONNECT_TO_SERVER] =
-          g_param_spec_boolean ("show-connect-to-server",
-                                P_("Show 'Connect to Server'"),
-                                P_("Whether the sidebar includes a builtin shortcut to a 'Connect to server' 
dialog"),
-                                FALSE,
-                                G_PARAM_READWRITE | G_PARAM_DEPRECATED);
   properties[PROP_SHOW_ENTER_LOCATION] =
           g_param_spec_boolean ("show-enter-location",
                                 P_("Show 'Enter Location'"),
@@ -4814,57 +4785,6 @@ gtk_places_sidebar_get_show_desktop (GtkPlacesSidebar *sidebar)
 }
 
 /**
- * gtk_places_sidebar_set_show_connect_to_server:
- * @sidebar: a places sidebar
- * @show_connect_to_server: whether to show an item for the Connect to Server command
- *
- * Sets whether the @sidebar should show an item for connecting to a network server;
- * this is off by default. An application may want to turn this on if it implements
- * a way for the user to connect to network servers directly.
- *
- * If you enable this, you should connect to the
- * #GtkPlacesSidebar::show-connect-to-server signal.
- *
- * Since: 3.10
- *
- * Deprecated: 3.18: It is recommended to group this functionality with the drives
- *     and network location under the new 'Other Location' item
- */
-void
-gtk_places_sidebar_set_show_connect_to_server (GtkPlacesSidebar *sidebar,
-                                               gboolean          show_connect_to_server)
-{
-  g_return_if_fail (GTK_IS_PLACES_SIDEBAR (sidebar));
-
-  show_connect_to_server = !!show_connect_to_server;
-  if (sidebar->show_connect_to_server != show_connect_to_server)
-    {
-      sidebar->show_connect_to_server = show_connect_to_server;
-      update_places (sidebar);
-      g_object_notify_by_pspec (G_OBJECT (sidebar), properties[PROP_SHOW_CONNECT_TO_SERVER]);
-    }
-}
-
-/**
- * gtk_places_sidebar_get_show_connect_to_server:
- * @sidebar: a places sidebar
- *
- * Returns the value previously set with gtk_places_sidebar_set_show_connect_to_server()
- *
- * Returns: %TRUE if the sidebar will display a “Connect to Server” item.
- *
- * Deprecated: 3.18: It is recommended to group this functionality with the drives
- *     and network location under the new 'Other Location' item
- */
-gboolean
-gtk_places_sidebar_get_show_connect_to_server (GtkPlacesSidebar *sidebar)
-{
-  g_return_val_if_fail (GTK_IS_PLACES_SIDEBAR (sidebar), FALSE);
-
-  return sidebar->show_connect_to_server;
-}
-
-/**
  * gtk_places_sidebar_set_show_enter_location:
  * @sidebar: a places sidebar
  * @show_enter_location: whether to show an item to enter a location
diff --git a/gtk/gtkplacessidebar.h b/gtk/gtkplacessidebar.h
index 80f2df4..482cad8 100644
--- a/gtk/gtkplacessidebar.h
+++ b/gtk/gtkplacessidebar.h
@@ -104,11 +104,6 @@ GDK_AVAILABLE_IN_3_10
 void               gtk_places_sidebar_set_show_desktop           (GtkPlacesSidebar   *sidebar,
                                                                   gboolean            show_desktop);
 
-GDK_DEPRECATED_IN_3_18
-gboolean           gtk_places_sidebar_get_show_connect_to_server (GtkPlacesSidebar   *sidebar);
-GDK_DEPRECATED_IN_3_18
-void               gtk_places_sidebar_set_show_connect_to_server (GtkPlacesSidebar   *sidebar,
-                                                                  gboolean            
show_connect_to_server);
 GDK_AVAILABLE_IN_3_14
 gboolean           gtk_places_sidebar_get_show_enter_location    (GtkPlacesSidebar   *sidebar);
 GDK_AVAILABLE_IN_3_14


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