[gnome-software: 1/2] page: Replace implementing GtkScrollable by a virtual property




commit 71b439ee0b7d0356883c8e1058060cbe34fc46d3
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Jun 11 10:15:12 2021 +0000

    page: Replace implementing GtkScrollable by a virtual property

 src/gs-extras-page.c    | 42 ++-------------------------------------
 src/gs-installed-page.c | 42 ++-------------------------------------
 src/gs-overview-page.c  | 42 ++-------------------------------------
 src/gs-page.c           | 52 ++++++++++++++++++++++++++++++++++++++++++++-----
 src/gs-page.h           |  1 +
 src/gs-search-page.c    | 39 ++-----------------------------------
 src/gs-updates-page.c   | 42 ++-------------------------------------
 7 files changed, 58 insertions(+), 202 deletions(-)
---
diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c
index 60103140f..1998930d4 100644
--- a/src/gs-extras-page.c
+++ b/src/gs-extras-page.c
@@ -65,16 +65,10 @@ struct _GsExtrasPage
        GtkWidget                *stack;
 };
 
-static void gs_extras_page_scrollable_init (GtkScrollable *iface);
-
-G_DEFINE_TYPE_WITH_CODE (GsExtrasPage, gs_extras_page, GS_TYPE_PAGE,
-                        G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, gs_extras_page_scrollable_init))
+G_DEFINE_TYPE (GsExtrasPage, gs_extras_page, GS_TYPE_PAGE)
 
 typedef enum {
-       PROP_HADJUSTMENT = 1,
-       PROP_VADJUSTMENT,
-       PROP_HSCROLL_POLICY,
-       PROP_VSCROLL_POLICY,
+       PROP_VADJUSTMENT = 1,
        PROP_TITLE,
 } GsExtrasPageProperty;
 
@@ -1213,18 +1207,9 @@ gs_extras_page_get_property (GObject    *object,
        GsExtrasPage *self = GS_EXTRAS_PAGE (object);
 
        switch ((GsExtrasPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               g_value_set_object (value, gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow)));
-               break;
        case PROP_VADJUSTMENT:
                g_value_set_object (value, gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow)));
                break;
-       case PROP_HSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
-       case PROP_VSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
        case PROP_TITLE:
                switch (self->state) {
                case GS_EXTRAS_PAGE_STATE_LOADING:
@@ -1252,22 +1237,8 @@ gs_extras_page_set_property (GObject      *object,
                              const GValue *value,
                              GParamSpec   *pspec)
 {
-       GsExtrasPage *self = GS_EXTRAS_PAGE (object);
-
        switch ((GsExtrasPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow),
-                                                    g_value_get_object (value));
-               break;
        case PROP_VADJUSTMENT:
-               gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow),
-                                                    g_value_get_object (value));
-               break;
-       case PROP_HSCROLL_POLICY:
-       case PROP_VSCROLL_POLICY:
-               /* Not supported yet */
-               g_assert_not_reached ();
-               break;
        case PROP_TITLE:
                /* Read-only */
                g_assert_not_reached ();
@@ -1337,10 +1308,7 @@ gs_extras_page_class_init (GsExtrasPageClass *klass)
        page_class->reload = gs_extras_page_reload;
        page_class->setup = gs_extras_page_setup;
 
-       g_object_class_override_property (object_class, PROP_HADJUSTMENT, "hadjustment");
        g_object_class_override_property (object_class, PROP_VADJUSTMENT, "vadjustment");
-       g_object_class_override_property (object_class, PROP_HSCROLL_POLICY, "hscroll-policy");
-       g_object_class_override_property (object_class, PROP_VSCROLL_POLICY, "vscroll-policy");
        g_object_class_override_property (object_class, PROP_TITLE, "title");
 
        gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/gs-extras-page.ui");
@@ -1353,12 +1321,6 @@ gs_extras_page_class_init (GsExtrasPageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsExtrasPage, stack);
 }
 
-static void
-gs_extras_page_scrollable_init (GtkScrollable *iface)
-{
-       /* Nothing to do here; all defined in properties */
-}
-
 GsExtrasPage *
 gs_extras_page_new (void)
 {
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index c5314e372..8f0a92f57 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -41,16 +41,10 @@ struct _GsInstalledPage
        GtkWidget               *stack_install;
 };
 
-static void gs_installed_page_scrollable_init (GtkScrollable *iface);
-
-G_DEFINE_TYPE_WITH_CODE (GsInstalledPage, gs_installed_page, GS_TYPE_PAGE,
-                        G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, gs_installed_page_scrollable_init))
+G_DEFINE_TYPE (GsInstalledPage, gs_installed_page, GS_TYPE_PAGE)
 
 typedef enum {
-       PROP_HADJUSTMENT = 1,
-       PROP_VADJUSTMENT,
-       PROP_HSCROLL_POLICY,
-       PROP_VSCROLL_POLICY,
+       PROP_VADJUSTMENT = 1,
        PROP_TITLE,
 } GsInstalledPageProperty;
 
@@ -604,18 +598,9 @@ gs_installed_page_get_property (GObject    *object,
        GsInstalledPage *self = GS_INSTALLED_PAGE (object);
 
        switch ((GsInstalledPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               g_value_set_object (value, gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow_install)));
-               break;
        case PROP_VADJUSTMENT:
                g_value_set_object (value, gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow_install)));
                break;
-       case PROP_HSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
-       case PROP_VSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
        case PROP_TITLE:
                /* Translators: This is in the context of a list of apps which are installed on the system. */
                g_value_set_string (value, _("Installed"));
@@ -632,22 +617,8 @@ gs_installed_page_set_property (GObject      *object,
                                 const GValue *value,
                                 GParamSpec   *pspec)
 {
-       GsInstalledPage *self = GS_INSTALLED_PAGE (object);
-
        switch ((GsInstalledPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_install),
-                                                    g_value_get_object (value));
-               break;
        case PROP_VADJUSTMENT:
-               gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_install),
-                                                    g_value_get_object (value));
-               break;
-       case PROP_HSCROLL_POLICY:
-       case PROP_VSCROLL_POLICY:
-               /* Not supported yet */
-               g_assert_not_reached ();
-               break;
        case PROP_TITLE:
                /* Read only. */
                g_assert_not_reached ();
@@ -691,10 +662,7 @@ gs_installed_page_class_init (GsInstalledPageClass *klass)
        page_class->reload = gs_installed_page_reload;
        page_class->setup = gs_installed_page_setup;
 
-       g_object_class_override_property (object_class, PROP_HADJUSTMENT, "hadjustment");
        g_object_class_override_property (object_class, PROP_VADJUSTMENT, "vadjustment");
-       g_object_class_override_property (object_class, PROP_HSCROLL_POLICY, "hscroll-policy");
-       g_object_class_override_property (object_class, PROP_VSCROLL_POLICY, "vscroll-policy");
        g_object_class_override_property (object_class, PROP_TITLE, "title");
 
        gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/Software/gs-installed-page.ui");
@@ -705,12 +673,6 @@ gs_installed_page_class_init (GsInstalledPageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsInstalledPage, stack_install);
 }
 
-static void
-gs_installed_page_scrollable_init (GtkScrollable *iface)
-{
-       /* Nothing to do here; all defined in properties */
-}
-
 static void
 gs_installed_page_init (GsInstalledPage *self)
 {
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 28702b3da..e092a56ae 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -59,16 +59,10 @@ struct _GsOverviewPage
        GtkWidget               *stack_overview;
 };
 
-static void gs_overview_page_scrollable_init (GtkScrollable *iface);
-
-G_DEFINE_TYPE_WITH_CODE (GsOverviewPage, gs_overview_page, GS_TYPE_PAGE,
-                        G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, gs_overview_page_scrollable_init))
+G_DEFINE_TYPE (GsOverviewPage, gs_overview_page, GS_TYPE_PAGE)
 
 typedef enum {
-       PROP_HADJUSTMENT = 1,
-       PROP_VADJUSTMENT,
-       PROP_HSCROLL_POLICY,
-       PROP_VSCROLL_POLICY,
+       PROP_VADJUSTMENT = 1,
        PROP_TITLE,
 } GsOverviewPageProperty;
 
@@ -883,18 +877,9 @@ gs_overview_page_get_property (GObject    *object,
        GsOverviewPage *self = GS_OVERVIEW_PAGE (object);
 
        switch ((GsOverviewPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               g_value_set_object (value, gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow_overview)));
-               break;
        case PROP_VADJUSTMENT:
                g_value_set_object (value, gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow_overview)));
                break;
-       case PROP_HSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
-       case PROP_VSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
        case PROP_TITLE:
                /* Translators: This is the title of the main page of the UI. */
                g_value_set_string (value, _("Explore"));
@@ -911,22 +896,8 @@ gs_overview_page_set_property (GObject      *object,
                                const GValue *value,
                                GParamSpec   *pspec)
 {
-       GsOverviewPage *self = GS_OVERVIEW_PAGE (object);
-
        switch ((GsOverviewPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_overview),
-                                                    g_value_get_object (value));
-               break;
        case PROP_VADJUSTMENT:
-               gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_overview),
-                                                    g_value_get_object (value));
-               break;
-       case PROP_HSCROLL_POLICY:
-       case PROP_VSCROLL_POLICY:
-               /* Not supported yet */
-               g_assert_not_reached ();
-               break;
        case PROP_TITLE:
                /* Read only. */
                g_assert_not_reached ();
@@ -967,10 +938,7 @@ gs_overview_page_class_init (GsOverviewPageClass *klass)
        page_class->reload = gs_overview_page_reload;
        page_class->setup = gs_overview_page_setup;
 
-       g_object_class_override_property (object_class, PROP_HADJUSTMENT, "hadjustment");
        g_object_class_override_property (object_class, PROP_VADJUSTMENT, "vadjustment");
-       g_object_class_override_property (object_class, PROP_HSCROLL_POLICY, "hscroll-policy");
-       g_object_class_override_property (object_class, PROP_VSCROLL_POLICY, "vscroll-policy");
        g_object_class_override_property (object_class, PROP_TITLE, "title");
 
        signals [SIGNAL_REFRESHED] =
@@ -997,12 +965,6 @@ gs_overview_page_class_init (GsOverviewPageClass *klass)
        gtk_widget_class_bind_template_callback (widget_class, featured_carousel_app_clicked_cb);
 }
 
-static void
-gs_overview_page_scrollable_init (GtkScrollable *iface)
-{
-       /* Nothing to do here; all defined in properties */
-}
-
 GsOverviewPage *
 gs_overview_page_new (void)
 {
diff --git a/src/gs-page.c b/src/gs-page.c
index 91183e7ff..a09f04cc0 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -31,9 +31,10 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GsPage, gs_page, GTK_TYPE_BIN)
 typedef enum {
        PROP_TITLE = 1,
        PROP_COUNTER,
+       PROP_VADJUSTMENT,
 } GsPageProperty;
 
-static GParamSpec *obj_props[PROP_COUNTER + 1] = { NULL, };
+static GParamSpec *obj_props[PROP_VADJUSTMENT + 1] = { NULL, };
 
 GsShell *
 gs_page_get_shell (GsPage *page)
@@ -673,6 +674,30 @@ gs_page_get_counter (GsPage *page)
        return g_value_get_uint (&value);
 }
 
+/**
+ * gs_page_get_vadjustment:
+ * @page: a #GsPage
+ *
+ * Get the #GtkAdjustment used for vertical scrolling.
+ *
+ * Returns: (nullable) (transfer none): the #GtkAdjustment used for vertical scrolling
+ *
+ * Since: 41
+ */
+GtkAdjustment *
+gs_page_get_vadjustment (GsPage *page)
+{
+       g_auto(GValue) value = G_VALUE_INIT;
+
+       g_return_val_if_fail (GS_IS_PAGE (page), NULL);
+
+       /* The property is typically overridden by subclasses; the
+        * implementation in #GsPage itself is just a placeholder. */
+       g_object_get_property (G_OBJECT (page), "vadjustment", &value);
+
+       return g_value_get_object (&value);
+}
+
 /**
  * gs_page_switch_to:
  *
@@ -718,13 +743,13 @@ gs_page_switch_from (GsPage *page)
 void
 gs_page_scroll_up (GsPage *page)
 {
+       GtkAdjustment *adj;
+
        g_return_if_fail (GS_IS_PAGE (page));
 
-       if (GTK_IS_SCROLLABLE (page)) {
-               GtkAdjustment *adj;
-               adj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (page));
+       adj = gs_page_get_vadjustment (page);
+       if (adj)
                gtk_adjustment_set_value (adj, gtk_adjustment_get_lower (adj));
-       }
 }
 
 void
@@ -773,6 +798,10 @@ gs_page_get_property (GObject    *object,
                /* Should be overridden by subclasses. */
                g_value_set_uint (value, 0);
                break;
+       case PROP_VADJUSTMENT:
+               /* Should be overridden by subclasses. */
+               g_value_set_object (value, NULL);
+               break;
        default:
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                break;
@@ -831,6 +860,19 @@ gs_page_class_init (GsPageClass *klass)
                                   0, G_MAXUINT, 0,
                                   G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
 
+       /**
+        * GsPage:vadjustment: (nullable)
+        *
+        * The #GtkAdjustment used for vertical scrolling.
+        * This will be %NULL if the page is not vertically scrollable.
+        *
+        * Since: 41
+        */
+       obj_props[PROP_VADJUSTMENT] =
+               g_param_spec_object ("vadjustment", NULL, NULL,
+                                    GTK_TYPE_ADJUSTMENT,
+                                    G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
        g_object_class_install_properties (object_class, G_N_ELEMENTS (obj_props), obj_props);
 }
 
diff --git a/src/gs-page.h b/src/gs-page.h
index 0865c8338..186186b20 100644
--- a/src/gs-page.h
+++ b/src/gs-page.h
@@ -75,5 +75,6 @@ gboolean       gs_page_is_active                      (GsPage         *page);
 
 const gchar    *gs_page_get_title                      (GsPage         *page);
 guint           gs_page_get_counter                    (GsPage         *page);
+GtkAdjustment  *gs_page_get_vadjustment                (GsPage         *page);
 
 G_END_DECLS
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index ec028b30c..ecbb26b8d 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -43,16 +43,10 @@ struct _GsSearchPage
        GtkWidget               *stack_search;
 };
 
-static void gs_search_page_scrollable_init (GtkScrollable *iface);
-
-G_DEFINE_TYPE_WITH_CODE (GsSearchPage, gs_search_page, GS_TYPE_PAGE,
-                        G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, gs_search_page_scrollable_init))
+G_DEFINE_TYPE (GsSearchPage, gs_search_page, GS_TYPE_PAGE)
 
 typedef enum {
-       PROP_HADJUSTMENT = 1,
-       PROP_VADJUSTMENT,
-       PROP_HSCROLL_POLICY,
-       PROP_VSCROLL_POLICY,
+       PROP_VADJUSTMENT = 1,
 } GsSearchPageProperty;
 
 static void
@@ -452,18 +446,9 @@ gs_search_page_get_property (GObject    *object,
        GsSearchPage *self = GS_SEARCH_PAGE (object);
 
        switch ((GsSearchPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               g_value_set_object (value, gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow_search)));
-               break;
        case PROP_VADJUSTMENT:
                g_value_set_object (value, gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow_search)));
                break;
-       case PROP_HSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
-       case PROP_VSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
        default:
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                break;
@@ -476,19 +461,8 @@ gs_search_page_set_property (GObject      *object,
                              const GValue *value,
                              GParamSpec   *pspec)
 {
-       GsSearchPage *self = GS_SEARCH_PAGE (object);
-
        switch ((GsSearchPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_search),
-                                                    g_value_get_object (value));
-               break;
        case PROP_VADJUSTMENT:
-               gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_search),
-                                                    g_value_get_object (value));
-               break;
-       case PROP_HSCROLL_POLICY:
-       case PROP_VSCROLL_POLICY:
                /* Not supported yet */
                g_assert_not_reached ();
                break;
@@ -545,10 +519,7 @@ gs_search_page_class_init (GsSearchPageClass *klass)
        page_class->reload = gs_search_page_reload;
        page_class->setup = gs_search_page_setup;
 
-       g_object_class_override_property (object_class, PROP_HADJUSTMENT, "hadjustment");
        g_object_class_override_property (object_class, PROP_VADJUSTMENT, "vadjustment");
-       g_object_class_override_property (object_class, PROP_HSCROLL_POLICY, "hscroll-policy");
-       g_object_class_override_property (object_class, PROP_VSCROLL_POLICY, "vscroll-policy");
 
        gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/gs-search-page.ui");
 
@@ -558,12 +529,6 @@ gs_search_page_class_init (GsSearchPageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsSearchPage, stack_search);
 }
 
-static void
-gs_search_page_scrollable_init (GtkScrollable *iface)
-{
-       /* Nothing to do here; all defined in properties */
-}
-
 static void
 gs_search_page_init (GsSearchPage *self)
 {
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 745b8a751..08476ae0e 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -93,16 +93,10 @@ enum {
        COLUMN_UPDATE_LAST
 };
 
-static void gs_updates_page_scrollable_init (GtkScrollable *iface);
-
-G_DEFINE_TYPE_WITH_CODE (GsUpdatesPage, gs_updates_page, GS_TYPE_PAGE,
-                        G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, gs_updates_page_scrollable_init))
+G_DEFINE_TYPE (GsUpdatesPage, gs_updates_page, GS_TYPE_PAGE)
 
 typedef enum {
-       PROP_HADJUSTMENT = 1,
-       PROP_VADJUSTMENT,
-       PROP_HSCROLL_POLICY,
-       PROP_VSCROLL_POLICY,
+       PROP_VADJUSTMENT = 1,
        PROP_TITLE,
        PROP_COUNTER,
 } GsUpdatesPageProperty;
@@ -1288,18 +1282,9 @@ gs_updates_page_get_property (GObject    *object,
        GsUpdatesPage *self = GS_UPDATES_PAGE (object);
 
        switch ((GsUpdatesPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               g_value_set_object (value, gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow_updates)));
-               break;
        case PROP_VADJUSTMENT:
                g_value_set_object (value, gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW 
(self->scrolledwindow_updates)));
                break;
-       case PROP_HSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
-       case PROP_VSCROLL_POLICY:
-               g_value_set_enum (value, GTK_SCROLL_MINIMUM);
-               break;
        case PROP_TITLE:
                g_value_set_string (value, _("Updates"));
                break;
@@ -1318,22 +1303,8 @@ gs_updates_page_set_property (GObject      *object,
                               const GValue *value,
                               GParamSpec   *pspec)
 {
-       GsUpdatesPage *self = GS_UPDATES_PAGE (object);
-
        switch ((GsUpdatesPageProperty) prop_id) {
-       case PROP_HADJUSTMENT:
-               gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_updates),
-                                                    g_value_get_object (value));
-               break;
        case PROP_VADJUSTMENT:
-               gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_updates),
-                                                    g_value_get_object (value));
-               break;
-       case PROP_HSCROLL_POLICY:
-       case PROP_VSCROLL_POLICY:
-               /* Not supported yet */
-               g_assert_not_reached ();
-               break;
        case PROP_TITLE:
        case PROP_COUNTER:
                /* Read only */
@@ -1391,10 +1362,7 @@ gs_updates_page_class_init (GsUpdatesPageClass *klass)
        page_class->reload = gs_updates_page_reload;
        page_class->setup = gs_updates_page_setup;
 
-       g_object_class_override_property (object_class, PROP_HADJUSTMENT, "hadjustment");
        g_object_class_override_property (object_class, PROP_VADJUSTMENT, "vadjustment");
-       g_object_class_override_property (object_class, PROP_HSCROLL_POLICY, "hscroll-policy");
-       g_object_class_override_property (object_class, PROP_VSCROLL_POLICY, "vscroll-policy");
        g_object_class_override_property (object_class, PROP_TITLE, "title");
        g_object_class_override_property (object_class, PROP_COUNTER, "counter");
 
@@ -1414,12 +1382,6 @@ gs_updates_page_class_init (GsUpdatesPageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsUpdatesPage, label_end_of_life);
 }
 
-static void
-gs_updates_page_scrollable_init (GtkScrollable *iface)
-{
-       /* Nothing to do here; all defined in properties */
-}
-
 static void
 gs_updates_page_init (GsUpdatesPage *self)
 {


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