[libhandy] Deprecate HdySwipeGroup
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] Deprecate HdySwipeGroup
- Date: Thu, 6 May 2021 09:26:17 +0000 (UTC)
commit 758a8bfe637ff31027602a2ea82ddf77b0a3ecc8
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed May 5 23:39:16 2021 +0500
Deprecate HdySwipeGroup
doc/handy-docs.xml | 2 +-
glade/libhandy.xml | 2 +-
src/handy.h | 2 ++
src/hdy-swipe-group.c | 18 ++++++++++++++++++
src/hdy-swipe-group.h | 8 ++++----
tests/test-swipe-group.c | 4 ++++
6 files changed, 30 insertions(+), 6 deletions(-)
---
diff --git a/doc/handy-docs.xml b/doc/handy-docs.xml
index 87358052..2486b0d8 100644
--- a/doc/handy-docs.xml
+++ b/doc/handy-docs.xml
@@ -61,7 +61,6 @@
<xi:include href="xml/hdy-squeezer.xml"/>
<xi:include href="xml/hdy-status-page.xml"/>
<xi:include href="xml/hdy-swipeable.xml"/>
- <xi:include href="xml/hdy-swipe-group.xml"/>
<xi:include href="xml/hdy-swipe-tracker.xml"/>
<xi:include href="xml/hdy-tab-bar.xml"/>
<xi:include href="xml/hdy-tab-view.xml"/>
@@ -81,6 +80,7 @@
<chapter id="deprecated">
<title>Deprecated</title>
+ <xi:include href="xml/hdy-swipe-group.xml"/>
<xi:include href="xml/hdy-title-bar.xml"/>
</chapter>
diff --git a/glade/libhandy.xml b/glade/libhandy.xml
index 532b0216..9ffed087 100644
--- a/glade/libhandy.xml
+++ b/glade/libhandy.xml
@@ -389,7 +389,7 @@
<property id="icon-name" themed-icon="True" />
</properties>
</glade-widget-class>
- <glade-widget-class name="HdySwipeGroup" generic-name="swipegroup" title="Swipe Group" toplevel="True">
+ <glade-widget-class name="HdySwipeGroup" generic-name="swipegroup" title="Swipe Group" toplevel="True"
deprecated-since="1.4">
<read-widget-function>glade_hdy_swipe_group_read_widget</read-widget-function>
<write-widget-function>glade_hdy_swipe_group_write_widget</write-widget-function>
<set-property-function>glade_hdy_swipe_group_set_property</set-property-function>
diff --git a/src/handy.h b/src/handy.h
index 87a23631..dfbc74dc 100644
--- a/src/handy.h
+++ b/src/handy.h
@@ -47,7 +47,9 @@ G_BEGIN_DECLS
#include "hdy-search-bar.h"
#include "hdy-squeezer.h"
#include "hdy-status-page.h"
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
#include "hdy-swipe-group.h"
+G_GNUC_END_IGNORE_DEPRECATIONS
#include "hdy-swipe-tracker.h"
#include "hdy-swipeable.h"
#include "hdy-tab-bar.h"
diff --git a/src/hdy-swipe-group.c b/src/hdy-swipe-group.c
index 303c898f..843b8060 100644
--- a/src/hdy-swipe-group.c
+++ b/src/hdy-swipe-group.c
@@ -16,6 +16,8 @@
#define BUILDABLE_TAG_SWIPEABLES "swipeables"
#define BUILDABLE_TAG_TEMPLATE "template"
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/**
* SECTION:hdy-swipe-group
* @short_description: An object for syncing swipeable widgets.
@@ -45,7 +47,13 @@
* </object>
* ]|
*
+ * #HdySwipeGroup has been deprecated, #HdyWindow and #HdyApplicationWindow
+ * allow using a single leaflet for both content and header bar, without the
+ * need to sync them.
+ *
* Since: 0.0.12
+ *
+ * Deprecated: 1.4
*/
struct _HdySwipeGroup
@@ -95,6 +103,8 @@ swipeable_destroyed (HdySwipeGroup *self,
* Returns: The newly created #HdySwipeGroup object
*
* Since: 0.0.12
+ *
+ * Deprecated: 1.4
*/
HdySwipeGroup *
hdy_swipe_group_new (void)
@@ -218,6 +228,8 @@ end_swipe_cb (HdySwipeGroup *self,
* be removed from the swipe group.
*
* Since: 0.0.12
+ *
+ * Deprecated: 1.4
*/
void
hdy_swipe_group_add_swipeable (HdySwipeGroup *self,
@@ -253,6 +265,8 @@ hdy_swipe_group_add_swipeable (HdySwipeGroup *self,
* Removes a widget from a #HdySwipeGroup.
*
* Since: 0.0.12
+ *
+ * Deprecated: 1.4
**/
void
hdy_swipe_group_remove_swipeable (HdySwipeGroup *self,
@@ -285,6 +299,8 @@ hdy_swipe_group_remove_swipeable (HdySwipeGroup *self,
* swipeables. The list is owned by libhandy and should not be modified.
*
* Since: 0.0.12
+ *
+ * Deprecated: 1.4
**/
GSList *
hdy_swipe_group_get_swipeables (HdySwipeGroup *self)
@@ -570,3 +586,5 @@ hdy_swipe_group_buildable_init (GtkBuildableIface *iface)
iface->custom_tag_start = hdy_swipe_group_buildable_custom_tag_start;
iface->custom_finished = hdy_swipe_group_buildable_custom_finished;
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/src/hdy-swipe-group.h b/src/hdy-swipe-group.h
index 791962ea..5264d6bf 100644
--- a/src/hdy-swipe-group.h
+++ b/src/hdy-swipe-group.h
@@ -22,15 +22,15 @@ G_BEGIN_DECLS
HDY_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (HdySwipeGroup, hdy_swipe_group, HDY, SWIPE_GROUP, GObject)
-HDY_AVAILABLE_IN_ALL
+HDY_DEPRECATED_IN_1_4
HdySwipeGroup *hdy_swipe_group_new (void);
-HDY_AVAILABLE_IN_ALL
+HDY_DEPRECATED_IN_1_4
void hdy_swipe_group_add_swipeable (HdySwipeGroup *self,
HdySwipeable *swipeable);
-HDY_AVAILABLE_IN_ALL
+HDY_DEPRECATED_IN_1_4
GSList * hdy_swipe_group_get_swipeables (HdySwipeGroup *self);
-HDY_AVAILABLE_IN_ALL
+HDY_DEPRECATED_IN_1_4
void hdy_swipe_group_remove_swipeable (HdySwipeGroup *self,
HdySwipeable *swipeable);
diff --git a/tests/test-swipe-group.c b/tests/test-swipe-group.c
index 41b174fc..09f263f1 100644
--- a/tests/test-swipe-group.c
+++ b/tests/test-swipe-group.c
@@ -6,6 +6,8 @@
#include <handy.h>
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void
test_hdy_swipe_group_add_remove (void)
{
@@ -33,6 +35,8 @@ test_hdy_swipe_group_add_remove (void)
g_assert_cmpint (g_slist_length (hdy_swipe_group_get_swipeables (group)), ==, 0);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
+
gint
main (gint argc,
gchar *argv[])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]