[gtk+/gdk-backend-deprecations: 3/9] Deprecate gdk_set_sm_client_id



commit ae69b1fa9aff0920d0cb60c770024a95d763d74c
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Dec 17 00:17:00 2010 -0500

    Deprecate gdk_set_sm_client_id
    
    And add a gdk_x11_set_sm_client_id to replace it.

 gdk/gdk.symbols       |    1 +
 gdk/gdkdisplay.c      |    2 ++
 gdk/gdkwindow.h       |    2 ++
 gdk/x11/gdkmain-x11.c |   20 ++++++++++++++++++++
 gdk/x11/gdkx.h        |    2 ++
 5 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 2c805be..92c9014 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -1323,6 +1323,7 @@ gdk_x11_get_default_screen
 gdk_x11_get_default_xdisplay
 gdk_x11_grab_server
 gdk_x11_ungrab_server
+gdk_x11_set_sm_client_id
 #endif
 
 #if IN_FILE(__GDK_EVENTS_X11_C__)
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 3f9cece..3fd96a3 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -432,6 +432,8 @@ gdk_display_get_core_pointer (GdkDisplay *display)
  * session management and the Inter-Client Communication Conventions Manual
  * (ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property. 
  * (Both documents are part of the X Window System distribution.)
+ *
+ * Deprecated:2.24: Use gdk_x11_set_sm_client_id() instead
  **/
 void
 gdk_set_sm_client_id (const gchar* sm_client_id)
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 07834a1..e2ac52d 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -516,7 +516,9 @@ void gdk_window_set_urgency_hint      (GdkWindow *window,
 void          gdk_window_set_geometry_hints (GdkWindow          *window,
 					     const GdkGeometry  *geometry,
 					     GdkWindowHints      geom_mask);
+#if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION)
 void          gdk_set_sm_client_id          (const gchar        *sm_client_id);
+#endif
 
 void	      gdk_window_begin_paint_rect   (GdkWindow          *window,
 					     const GdkRectangle *rectangle);
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index f12c709..db03fb5 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -395,6 +395,26 @@ _gdk_windowing_display_set_sm_client_id (GdkDisplay  *display,
 		     gdk_x11_get_xatom_by_name_for_display (display, "SM_CLIENT_ID"));
 }
 
+/**
+ * gdk_x11_set_sm_client_id:
+ * @sm_client_id: the client id assigned by the session manager when the
+ *    connection was opened, or %NULL to remove the property.
+ *
+ * Sets the <literal>SM_CLIENT_ID</literal> property on the application's leader window so that
+ * the window manager can save the application's state using the X11R6 ICCCM
+ * session management protocol.
+ *
+ * See the X Session Management Library documentation for more information on
+ * session management and the Inter-Client Communication Conventions Manual
+ *
+ * Since: 2.24
+ */
+void
+gdk_x11_set_sm_client_id (const gchar *sm_client_id)
+{
+  gdk_set_sm_client_id (sm_client_id);
+}
+
 /* Close all open displays
  */
 void
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index 6c53b60..17483dd 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -217,6 +217,8 @@ G_CONST_RETURN char *gdk_x11_font_get_name     (GdkFont *font);
 #endif /* GDK_MULTIHEAD_SAFE */
 #endif /* GDK_DISABLE_DEPRECATED */
 
+void        gdk_x11_set_sm_client_id (const gchar *sm_client_id);
+
 G_END_DECLS
 
 #endif /* __GDK_X_H__ */



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