[libhandy] Deprecate HdyTitleBar



commit 8cbe12a1360843ebb436b478125679a83ff0bad2
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed May 5 23:33:21 2021 +0500

    Deprecate HdyTitleBar

 doc/handy-docs.xml      |  6 +++++-
 glade/glade-catalog.dtd |  3 ++-
 glade/libhandy.xml      |  2 +-
 src/handy.h             |  2 ++
 src/hdy-title-bar.c     | 19 ++++++++++++++++++-
 src/hdy-title-bar.h     |  6 +++---
 6 files changed, 31 insertions(+), 7 deletions(-)
---
diff --git a/doc/handy-docs.xml b/doc/handy-docs.xml
index 435171d6..87358052 100644
--- a/doc/handy-docs.xml
+++ b/doc/handy-docs.xml
@@ -65,7 +65,6 @@
     <xi:include href="xml/hdy-swipe-tracker.xml"/>
     <xi:include href="xml/hdy-tab-bar.xml"/>
     <xi:include href="xml/hdy-tab-view.xml"/>
-    <xi:include href="xml/hdy-title-bar.xml"/>
     <xi:include href="xml/hdy-value-object.xml"/>
     <xi:include href="xml/hdy-view-switcher.xml"/>
     <xi:include href="xml/hdy-view-switcher-bar.xml"/>
@@ -80,6 +79,11 @@
     <xi:include href="xml/hdy-main.xml"/>
   </chapter>
 
+  <chapter id="deprecated">
+    <title>Deprecated</title>
+    <xi:include href="xml/hdy-title-bar.xml"/>
+  </chapter>
+
   <chapter id="migrating">
     <title>Migrating from Previous Versions of Handy</title>
 
diff --git a/glade/glade-catalog.dtd b/glade/glade-catalog.dtd
index c0d073e5..1519a88c 100644
--- a/glade/glade-catalog.dtd
+++ b/glade/glade-catalog.dtd
@@ -51,7 +51,8 @@
                              title        CDATA #REQUIRED
                              parent       CDATA #IMPLIED
                              get-type-function CDATA #IMPLIED
-                             adaptor      CDATA #IMPLIED>
+                             adaptor      CDATA #IMPLIED
+                             deprecated-since CDATA #IMPLIED>
 
 <!ELEMENT properties (property+)>
 
diff --git a/glade/libhandy.xml b/glade/libhandy.xml
index 555e49f8..532b0216 100644
--- a/glade/libhandy.xml
+++ b/glade/libhandy.xml
@@ -403,7 +403,7 @@
         </property>
       </properties>
     </glade-widget-class>
-    <glade-widget-class name="HdyTitleBar" generic-name="titlebar" title="Title Bar"/>
+    <glade-widget-class name="HdyTitleBar" generic-name="titlebar" title="Title Bar" deprecated-since="1.4"/>
     <glade-widget-class name="HdyViewSwitcher" generic-name="viewswitcher" title="View Switcher" 
since="0.0.10"/>
     <glade-widget-class name="HdyViewSwitcherBar" generic-name="viewswitcherbar" title="View Switcher Bar" 
since="0.0.10"/>
     <glade-widget-class name="HdyViewSwitcherTitle" generic-name="viewswitchertitle" title="View Switcher 
Title" since="1.0">
diff --git a/src/handy.h b/src/handy.h
index 07257f82..87a23631 100644
--- a/src/handy.h
+++ b/src/handy.h
@@ -52,7 +52,9 @@ G_BEGIN_DECLS
 #include "hdy-swipeable.h"
 #include "hdy-tab-bar.h"
 #include "hdy-tab-view.h"
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 #include "hdy-title-bar.h"
+G_GNUC_END_IGNORE_DEPRECATIONS
 #include "hdy-types.h"
 #include "hdy-value-object.h"
 #include "hdy-view-switcher.h"
diff --git a/src/hdy-title-bar.c b/src/hdy-title-bar.c
index fd5371a3..f7b21134 100644
--- a/src/hdy-title-bar.c
+++ b/src/hdy-title-bar.c
@@ -9,6 +9,8 @@
 
 #include <glib/gi18n-lib.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 /**
  * SECTION:hdy-title-bar
  * @short_description: A simple title bar container.
@@ -22,9 +24,14 @@
  * HdyTitleBar becomes really useful when you want to animate header bars, like
  * an adaptive application using #HdyLeaflet would do.
  *
+ * #HdyTitleBar has been deprecated, header bars can be animated without it
+ * when placed inside #HdyWindow or #HdyApplicationWindow.
+ *
  * # CSS nodes
  *
  * #HdyTitleBar has a single CSS node with name headerbar.
+ *
+ * Deprecated: 1.4
  */
 
 enum {
@@ -50,6 +57,8 @@ static GParamSpec *props[LAST_PROP];
  * @selection_mode: %TRUE to enable the selection mode
  *
  * Sets whether @self is in selection mode.
+ *
+ * Deprecated: 1.4
  */
 void
 hdy_title_bar_set_selection_mode (HdyTitleBar *self,
@@ -83,6 +92,8 @@ hdy_title_bar_set_selection_mode (HdyTitleBar *self,
  * Returns whether whether @self is in selection mode.
  *
  * Returns: %TRUE if the title bar is in selection mode
+ *
+ * Deprecated: 1.4
  */
 gboolean
 hdy_title_bar_get_selection_mode (HdyTitleBar *self)
@@ -302,13 +313,15 @@ hdy_title_bar_class_init (HdyTitleBarClass *klass)
    * HdyTitleBar:selection_mode:
    *
    * %TRUE if the title bar is in selection mode.
+   *
+   * Deprecated: 1.4
    */
   props[PROP_SELECTION_MODE] =
       g_param_spec_boolean ("selection-mode",
                             _("Selection mode"),
                             _("Whether or not the title bar is in selection mode"),
                             FALSE,
-                            G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+                            G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_DEPRECATED);
 
   g_object_class_install_properties (object_class, LAST_PROP, props);
 
@@ -339,9 +352,13 @@ hdy_title_bar_init (HdyTitleBar *self)
  * Creates a new #HdyTitleBar.
  *
  * Returns: a new #HdyTitleBar
+ *
+ * Deprecated: 1.4
  */
 GtkWidget *
 hdy_title_bar_new (void)
 {
   return g_object_new (HDY_TYPE_TITLE_BAR, NULL);
 }
+
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/src/hdy-title-bar.h b/src/hdy-title-bar.h
index 275f4ea7..6db1804e 100644
--- a/src/hdy-title-bar.h
+++ b/src/hdy-title-bar.h
@@ -21,12 +21,12 @@ G_BEGIN_DECLS
 HDY_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (HdyTitleBar, hdy_title_bar, HDY, TITLE_BAR, GtkBin)
 
-HDY_AVAILABLE_IN_ALL
+HDY_DEPRECATED_IN_1_4
 GtkWidget *hdy_title_bar_new (void);
 
-HDY_AVAILABLE_IN_ALL
+HDY_DEPRECATED_IN_1_4
 gboolean hdy_title_bar_get_selection_mode (HdyTitleBar *self);
-HDY_AVAILABLE_IN_ALL
+HDY_DEPRECATED_IN_1_4
 void hdy_title_bar_set_selection_mode (HdyTitleBar *self,
                                        gboolean     selection_mode);
 


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