[libadwaita] view-switcher: Use AdwViewStack instead of GtkStack
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita] view-switcher: Use AdwViewStack instead of GtkStack
- Date: Thu, 8 Jul 2021 14:11:40 +0000 (UTC)
commit 3245be87279c377ec70034f8b70f97fc4b2539ca
Author: CodedOre <CodedOre>
Date: Mon Jun 28 13:50:28 2021 +0500
view-switcher: Use AdwViewStack instead of GtkStack
examples/adw-view-switcher-demo-window.ui | 11 ++++----
src/adw-preferences-window.c | 18 ++++++-------
src/adw-preferences-window.ui | 3 +--
src/adw-view-switcher-bar.c | 20 +++++++--------
src/adw-view-switcher-bar.h | 6 ++---
src/adw-view-switcher-title.c | 20 +++++++--------
src/adw-view-switcher-title.h | 6 ++---
src/adw-view-switcher.c | 42 ++++++++++++++-----------------
src/adw-view-switcher.h | 8 +++---
tests/test-view-switcher-bar.c | 4 +--
tests/test-view-switcher.c | 4 +--
11 files changed, 69 insertions(+), 73 deletions(-)
---
diff --git a/examples/adw-view-switcher-demo-window.ui b/examples/adw-view-switcher-demo-window.ui
index 06fb8476..a5b853be 100644
--- a/examples/adw-view-switcher-demo-window.ui
+++ b/examples/adw-view-switcher-demo-window.ui
@@ -21,11 +21,10 @@
</object>
</child>
<child>
- <object class="GtkStack" id="stack">
- <property name="transition-type">crossfade</property>
+ <object class="AdwViewStack" id="stack">
<property name="vexpand">True</property>
<child>
- <object class="GtkStackPage">
+ <object class="AdwViewStackPage">
<property name="name">page1</property>
<property name="title" translatable="yes">World</property>
<property name="icon-name">clock-world-symbolic</property>
@@ -41,7 +40,7 @@
</object>
</child>
<child>
- <object class="GtkStackPage">
+ <object class="AdwViewStackPage">
<property name="name">page2</property>
<property name="title" translatable="yes">Alarm</property>
<property name="icon-name">clock-alarm-symbolic</property>
@@ -57,7 +56,7 @@
</object>
</child>
<child>
- <object class="GtkStackPage">
+ <object class="AdwViewStackPage">
<property name="name">page3</property>
<property name="title" translatable="yes">Stopwatch</property>
<property name="icon-name">clock-stopwatch-symbolic</property>
@@ -73,7 +72,7 @@
</object>
</child>
<child>
- <object class="GtkStackPage">
+ <object class="AdwViewStackPage">
<property name="name">page4</property>
<property name="title" translatable="yes">Timer</property>
<property name="icon-name">clock-timer-symbolic</property>
diff --git a/src/adw-preferences-window.c b/src/adw-preferences-window.c
index e65a0ed8..0e90fd16 100644
--- a/src/adw-preferences-window.c
+++ b/src/adw-preferences-window.c
@@ -40,7 +40,7 @@ typedef struct
AdwLeaflet *subpages_leaflet;
GtkWidget *preferences;
GtkStack *content_stack;
- GtkStack *pages_stack;
+ AdwViewStack *pages_stack;
GtkToggleButton *search_button;
GtkSearchEntry *search_entry;
GtkListBox *search_results;
@@ -163,9 +163,9 @@ get_n_pages (AdwPreferencesWindow *self)
for (child = gtk_widget_get_first_child (GTK_WIDGET (priv->pages_stack));
child;
child = gtk_widget_get_next_sibling (child)) {
- GtkStackPage *page = gtk_stack_get_page (priv->pages_stack, child);
+ AdwViewStackPage *page = adw_view_stack_get_page (priv->pages_stack, child);
- if (gtk_stack_page_get_visible (page))
+ if (adw_view_stack_page_get_visible (page))
count++;
}
@@ -256,7 +256,7 @@ search_result_activated_cb (AdwPreferencesWindow *self,
g_assert (page != NULL);
g_assert (row != NULL);
- gtk_stack_set_visible_child (priv->pages_stack, GTK_WIDGET (page));
+ adw_view_stack_set_visible_child (priv->pages_stack, GTK_WIDGET (page));
gtk_widget_set_can_focus (GTK_WIDGET (row), TRUE);
gtk_widget_grab_focus (GTK_WIDGET (row));
gtk_window_set_focus_visible (GTK_WINDOW (self), TRUE);
@@ -540,7 +540,7 @@ static gpointer
preferences_page_to_rows (gpointer page,
gpointer user_data)
{
- GtkWidget *child = gtk_stack_page_get_child (GTK_STACK_PAGE (page));
+ GtkWidget *child = adw_view_stack_page_get_child (ADW_VIEW_STACK_PAGE (page));
return adw_preferences_page_get_rows (ADW_PREFERENCES_PAGE (child));
}
@@ -559,7 +559,7 @@ adw_preferences_window_init (AdwPreferencesWindow *self)
priv->filter = GTK_FILTER (gtk_custom_filter_new ((GtkCustomFilterFunc) filter_search_results, self,
NULL));
expr = gtk_property_expression_new (GTK_TYPE_STACK_PAGE, NULL, "visible");
- model = G_LIST_MODEL (gtk_stack_get_pages (priv->pages_stack));
+ model = G_LIST_MODEL (adw_view_stack_get_pages (priv->pages_stack));
model = G_LIST_MODEL (gtk_filter_list_model_new (model, GTK_FILTER (gtk_bool_filter_new (expr))));
model = G_LIST_MODEL (gtk_map_list_model_new (model, preferences_page_to_rows, NULL, NULL));
model = G_LIST_MODEL (gtk_flatten_list_model_new (model));
@@ -792,14 +792,14 @@ adw_preferences_window_add (AdwPreferencesWindow *self,
AdwPreferencesPage *page)
{
AdwPreferencesWindowPrivate *priv;
- GtkStackPage *stack_page;
+ AdwViewStackPage *stack_page;
g_return_if_fail (ADW_IS_PREFERENCES_WINDOW (self));
g_return_if_fail (ADW_IS_PREFERENCES_PAGE (page));
priv = adw_preferences_window_get_instance_private (self);
- stack_page = gtk_stack_add_child (priv->pages_stack, GTK_WIDGET (page));
+ stack_page = adw_view_stack_add (priv->pages_stack, GTK_WIDGET (page));
g_object_bind_property (page, "icon-name", stack_page, "icon-name", G_BINDING_SYNC_CREATE);
g_object_bind_property (page, "title", stack_page, "title", G_BINDING_SYNC_CREATE);
@@ -827,7 +827,7 @@ adw_preferences_window_remove (AdwPreferencesWindow *self,
priv = adw_preferences_window_get_instance_private (self);
if (gtk_widget_get_parent (GTK_WIDGET (page)) == GTK_WIDGET (priv->pages_stack))
- gtk_stack_remove (priv->pages_stack, GTK_WIDGET (page));
+ adw_view_stack_remove (priv->pages_stack, GTK_WIDGET (page));
else
ADW_CRITICAL_CANNOT_REMOVE_CHILD (self, page);
}
diff --git a/src/adw-preferences-window.ui b/src/adw-preferences-window.ui
index 10d90f31..45c5960a 100644
--- a/src/adw-preferences-window.ui
+++ b/src/adw-preferences-window.ui
@@ -83,8 +83,7 @@
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
- <object class="GtkStack" id="pages_stack">
- <property name="transition-type">crossfade</property>
+ <object class="AdwViewStack" id="pages_stack">
<property name="vexpand">True</property>
</object>
</child>
diff --git a/src/adw-view-switcher-bar.c b/src/adw-view-switcher-bar.c
index 3900af78..aad32000 100644
--- a/src/adw-view-switcher-bar.c
+++ b/src/adw-view-switcher-bar.c
@@ -16,7 +16,7 @@
* A view switcher action bar.
*
* An action bar letting you switch between multiple views contained in a
- * [class@Gtk.Stack], via an [class@Adw.ViewSwitcher]. It is designed to be put
+ * [class@Adw.ViewStack], via an [class@Adw.ViewSwitcher]. It is designed to be put
* at the bottom of a window and to be revealed only on really narrow windows,
* e.g. on mobile phones. It can't be revealed if there are less than two pages.
*
@@ -42,7 +42,7 @@
* <child>
* <object class="GtkBox">
* <child>
- * <object class="GtkStack" id="stack"/>
+ * <object class="AdwViewStack" id="stack"/>
* </child>
* <child>
* <object class="AdwViewSwitcherBar">
@@ -101,9 +101,9 @@ update_bar_revealed (AdwViewSwitcherBar *self) {
n = g_list_model_get_n_items (G_LIST_MODEL (self->pages));
for (i = 0; i < n; i++) {
- GtkStackPage *page = g_list_model_get_item (G_LIST_MODEL (self->pages), i);
+ AdwViewStackPage *page = g_list_model_get_item (G_LIST_MODEL (self->pages), i);
- if (gtk_stack_page_get_visible (page))
+ if (adw_view_stack_page_get_visible (page))
count++;
}
}
@@ -206,7 +206,7 @@ adw_view_switcher_bar_class_init (AdwViewSwitcherBarClass *klass)
g_param_spec_object ("stack",
"Stack",
"The stack the view switcher controls",
- GTK_TYPE_STACK,
+ ADW_TYPE_VIEW_STACK,
G_PARAM_EXPLICIT_NOTIFY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
@@ -317,7 +317,7 @@ adw_view_switcher_bar_set_policy (AdwViewSwitcherBar *self,
*
* Since: 1.0
*/
-GtkStack *
+AdwViewStack *
adw_view_switcher_bar_get_stack (AdwViewSwitcherBar *self)
{
g_return_val_if_fail (ADW_IS_VIEW_SWITCHER_BAR (self), NULL);
@@ -336,12 +336,12 @@ adw_view_switcher_bar_get_stack (AdwViewSwitcherBar *self)
*/
void
adw_view_switcher_bar_set_stack (AdwViewSwitcherBar *self,
- GtkStack *stack)
+ AdwViewStack *stack)
{
- GtkStack *previous_stack;
+ AdwViewStack *previous_stack;
g_return_if_fail (ADW_IS_VIEW_SWITCHER_BAR (self));
- g_return_if_fail (stack == NULL || GTK_IS_STACK (stack));
+ g_return_if_fail (stack == NULL || ADW_IS_VIEW_STACK (stack));
previous_stack = adw_view_switcher_get_stack (self->view_switcher);
@@ -356,7 +356,7 @@ adw_view_switcher_bar_set_stack (AdwViewSwitcherBar *self,
adw_view_switcher_set_stack (self->view_switcher, stack);
if (stack) {
- self->pages = gtk_stack_get_pages (stack);
+ self->pages = adw_view_stack_get_pages (stack);
g_signal_connect_swapped (self->pages, "items-changed", G_CALLBACK (update_bar_revealed), self);
}
diff --git a/src/adw-view-switcher-bar.h b/src/adw-view-switcher-bar.h
index a3fc38f0..c6e4ec9a 100644
--- a/src/adw-view-switcher-bar.h
+++ b/src/adw-view-switcher-bar.h
@@ -34,10 +34,10 @@ void adw_view_switcher_bar_set_policy (AdwViewSwitcherBar *s
AdwViewSwitcherPolicy policy);
ADW_AVAILABLE_IN_ALL
-GtkStack *adw_view_switcher_bar_get_stack (AdwViewSwitcherBar *self);
+AdwViewStack *adw_view_switcher_bar_get_stack (AdwViewSwitcherBar *self);
ADW_AVAILABLE_IN_ALL
-void adw_view_switcher_bar_set_stack (AdwViewSwitcherBar *self,
- GtkStack *stack);
+void adw_view_switcher_bar_set_stack (AdwViewSwitcherBar *self,
+ AdwViewStack *stack);
ADW_AVAILABLE_IN_ALL
gboolean adw_view_switcher_bar_get_reveal (AdwViewSwitcherBar *self);
diff --git a/src/adw-view-switcher-title.c b/src/adw-view-switcher-title.c
index bd2b396c..2163d119 100644
--- a/src/adw-view-switcher-title.c
+++ b/src/adw-view-switcher-title.c
@@ -17,7 +17,7 @@
* A view switcher title.
*
* A widget letting you switch between multiple views contained by a
- * [class@Gtk.Stack] via an [class@Adw.ViewSwitcher].
+ * [class@Adw.ViewStack] via an [class@Adw.ViewSwitcher].
*
* It is designed to be used as the title widget of a [class@Adw.HeaderBar], and
* will display the window's title when the window is too narrow to fit the view
@@ -45,7 +45,7 @@
* <child>
* <object class="GtkBox">
* <child>
- * <object class="GtkStack" id="stack"/>
+ * <object class="AdwViewStack" id="stack"/>
* </child>
* <child>
* <object class="AdwViewSwitcherBar">
@@ -108,9 +108,9 @@ update_view_switcher_visible (AdwViewSwitcherTitle *self)
n = g_list_model_get_n_items (G_LIST_MODEL (self->pages));
for (i = 0; i < n; i++) {
- GtkStackPage *page = g_list_model_get_item (G_LIST_MODEL (self->pages), i);
+ AdwViewStackPage *page = g_list_model_get_item (G_LIST_MODEL (self->pages), i);
- if (gtk_stack_page_get_visible (page))
+ if (adw_view_stack_page_get_visible (page))
count++;
}
}
@@ -237,7 +237,7 @@ adw_view_switcher_title_class_init (AdwViewSwitcherTitleClass *klass)
g_param_spec_object ("stack",
"Stack",
"The stack the view switcher controls",
- GTK_TYPE_STACK,
+ ADW_TYPE_VIEW_STACK,
G_PARAM_EXPLICIT_NOTIFY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
@@ -405,7 +405,7 @@ adw_view_switcher_title_set_policy (AdwViewSwitcherTitle *self,
*
* Since: 1.0
*/
-GtkStack *
+AdwViewStack *
adw_view_switcher_title_get_stack (AdwViewSwitcherTitle *self)
{
g_return_val_if_fail (ADW_IS_VIEW_SWITCHER_TITLE (self), NULL);
@@ -424,12 +424,12 @@ adw_view_switcher_title_get_stack (AdwViewSwitcherTitle *self)
*/
void
adw_view_switcher_title_set_stack (AdwViewSwitcherTitle *self,
- GtkStack *stack)
+ AdwViewStack *stack)
{
- GtkStack *previous_stack;
+ AdwViewStack *previous_stack;
g_return_if_fail (ADW_IS_VIEW_SWITCHER_TITLE (self));
- g_return_if_fail (stack == NULL || GTK_IS_STACK (stack));
+ g_return_if_fail (stack == NULL || ADW_IS_VIEW_STACK (stack));
previous_stack = adw_view_switcher_get_stack (self->view_switcher);
@@ -444,7 +444,7 @@ adw_view_switcher_title_set_stack (AdwViewSwitcherTitle *self,
adw_view_switcher_set_stack (self->view_switcher, stack);
if (stack) {
- self->pages = gtk_stack_get_pages (stack);
+ self->pages = adw_view_stack_get_pages (stack);
g_signal_connect_swapped (self->pages, "items-changed", G_CALLBACK (update_view_switcher_visible), self);
}
diff --git a/src/adw-view-switcher-title.h b/src/adw-view-switcher-title.h
index b11c6e82..d24519c6 100644
--- a/src/adw-view-switcher-title.h
+++ b/src/adw-view-switcher-title.h
@@ -34,10 +34,10 @@ void adw_view_switcher_title_set_policy (AdwViewSwitcherTitle
AdwViewSwitcherPolicy policy);
ADW_AVAILABLE_IN_ALL
-GtkStack *adw_view_switcher_title_get_stack (AdwViewSwitcherTitle *self);
+AdwViewStack *adw_view_switcher_title_get_stack (AdwViewSwitcherTitle *self);
ADW_AVAILABLE_IN_ALL
-void adw_view_switcher_title_set_stack (AdwViewSwitcherTitle *self,
- GtkStack *stack);
+void adw_view_switcher_title_set_stack (AdwViewSwitcherTitle *self,
+ AdwViewStack *stack);
ADW_AVAILABLE_IN_ALL
const char *adw_view_switcher_title_get_title (AdwViewSwitcherTitle *self);
diff --git a/src/adw-view-switcher.c b/src/adw-view-switcher.c
index f71dbea4..eeebea4b 100644
--- a/src/adw-view-switcher.c
+++ b/src/adw-view-switcher.c
@@ -20,7 +20,7 @@
* An adaptive view switcher.
*
* An adaptive view switcher designed to switch between multiple views
- * contained in a [class@Gtk.Stack] in a similar fashion to
+ * contained in a [class@Adw.ViewStack] in a similar fashion to
* [class@Gtk.StackSwitcher].
*
* Depending on the available width, the view switcher can adapt from a wide
@@ -63,7 +63,7 @@ struct _AdwViewSwitcher
{
GtkWidget parent_instance;
- GtkStack *stack;
+ AdwViewStack *stack;
GtkSelectionModel *pages;
GHashTable *buttons;
GtkBox *box;
@@ -96,9 +96,9 @@ on_button_toggled (GtkWidget *button,
}
static void
-update_button (AdwViewSwitcher *self,
- GtkStackPage *page,
- GtkWidget *button)
+update_button (AdwViewSwitcher *self,
+ AdwViewStackPage *page,
+ GtkWidget *button)
{
g_autofree char *title = NULL;
g_autofree char *icon_name = NULL;
@@ -125,9 +125,9 @@ update_button (AdwViewSwitcher *self,
}
static void
-on_page_updated (GtkStackPage *page,
- GParamSpec *pspec,
- AdwViewSwitcher *self)
+on_page_updated (AdwViewStackPage *page,
+ GParamSpec *pspec,
+ AdwViewSwitcher *self)
{
GtkWidget *button;
@@ -140,7 +140,7 @@ add_child (AdwViewSwitcher *self,
guint position)
{
AdwViewSwitcherButton *button = ADW_VIEW_SWITCHER_BUTTON (adw_view_switcher_button_new ());
- GtkStackPage *page;
+ AdwViewStackPage *page;
gboolean selected;
page = g_list_model_get_item (G_LIST_MODEL (self->pages), position);
@@ -156,10 +156,6 @@ add_child (AdwViewSwitcher *self,
GTK_ACCESSIBLE_STATE_SELECTED, selected,
-1);
- gtk_accessible_update_relation (GTK_ACCESSIBLE (button),
- GTK_ACCESSIBLE_RELATION_CONTROLS, page, NULL,
- -1);
-
adw_view_switcher_button_set_narrow_ellipsize (button, self->narrow_ellipsize);
g_signal_connect (button, "notify::active", G_CALLBACK (on_button_toggled), self);
@@ -211,7 +207,7 @@ selection_changed_cb (AdwViewSwitcher *self,
guint i;
for (i = position; i < position + n_items; i++) {
- GtkStackPage *page = NULL;
+ AdwViewStackPage *page = NULL;
GtkWidget *button;
gboolean selected;
@@ -247,13 +243,13 @@ connect_stack_signals (AdwViewSwitcher *self)
static void
set_stack (AdwViewSwitcher *self,
- GtkStack *stack)
+ AdwViewStack *stack)
{
if (!stack)
return;
self->stack = g_object_ref (stack);
- self->pages = gtk_stack_get_pages (stack);
+ self->pages = adw_view_stack_get_pages (stack);
populate_switcher (self);
connect_stack_signals (self);
}
@@ -350,7 +346,7 @@ adw_view_switcher_measure (GtkWidget *widget,
{
AdwViewSwitcher *self = ADW_VIEW_SWITCHER (widget);
GHashTableIter iter;
- GtkStackPage *page;
+ AdwViewStackPage *page;
AdwViewSwitcherButton *button;
int max_h_min = 0, max_h_nat = 0, max_v_min = 0, max_v_nat = 0;
int min = 0, nat = 0;
@@ -362,7 +358,7 @@ adw_view_switcher_measure (GtkWidget *widget,
while (g_hash_table_iter_next (&iter, (gpointer *) &page, (gpointer *) &button)) {
int h_min = 0, h_nat = 0, v_min = 0, v_nat = 0;
- if (!gtk_stack_page_get_visible (page))
+ if (!adw_view_stack_page_get_visible (page))
continue;
adw_view_switcher_button_get_size (button, &h_min, &h_nat, &v_min, &v_nat);
@@ -399,7 +395,7 @@ adw_view_switcher_measure (GtkWidget *widget,
while (g_hash_table_iter_next (&iter, (gpointer *) &page, (gpointer *) &button)) {
int child_min, child_nat;
- if (!gtk_stack_page_get_visible (page))
+ if (!adw_view_stack_page_get_visible (page))
continue;
gtk_widget_measure (GTK_WIDGET (button), GTK_ORIENTATION_VERTICAL, -1,
@@ -532,7 +528,7 @@ adw_view_switcher_class_init (AdwViewSwitcherClass *klass)
g_param_spec_object ("stack",
"Stack",
"The stack the view switcher controls",
- GTK_TYPE_STACK,
+ ADW_TYPE_VIEW_STACK,
G_PARAM_EXPLICIT_NOTIFY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, LAST_PROP, props);
@@ -669,7 +665,7 @@ adw_view_switcher_set_narrow_ellipsize (AdwViewSwitcher *self,
*
* Since: 1.0
*/
-GtkStack *
+AdwViewStack *
adw_view_switcher_get_stack (AdwViewSwitcher *self)
{
g_return_val_if_fail (ADW_IS_VIEW_SWITCHER (self), NULL);
@@ -688,10 +684,10 @@ adw_view_switcher_get_stack (AdwViewSwitcher *self)
*/
void
adw_view_switcher_set_stack (AdwViewSwitcher *self,
- GtkStack *stack)
+ AdwViewStack *stack)
{
g_return_if_fail (ADW_IS_VIEW_SWITCHER (self));
- g_return_if_fail (stack == NULL || GTK_IS_STACK (stack));
+ g_return_if_fail (stack == NULL || ADW_IS_VIEW_STACK (stack));
if (self->stack == stack)
return;
diff --git a/src/adw-view-switcher.h b/src/adw-view-switcher.h
index bc9227cc..58c070c5 100644
--- a/src/adw-view-switcher.h
+++ b/src/adw-view-switcher.h
@@ -15,6 +15,8 @@
#include <gtk/gtk.h>
+#include "adw-view-stack.h"
+
G_BEGIN_DECLS
#define ADW_TYPE_VIEW_SWITCHER (adw_view_switcher_get_type())
@@ -44,9 +46,9 @@ void adw_view_switcher_set_narrow_ellipsize (AdwViewSwitcher *s
PangoEllipsizeMode mode);
ADW_AVAILABLE_IN_ALL
-GtkStack *adw_view_switcher_get_stack (AdwViewSwitcher *self);
+AdwViewStack *adw_view_switcher_get_stack (AdwViewSwitcher *self);
ADW_AVAILABLE_IN_ALL
-void adw_view_switcher_set_stack (AdwViewSwitcher *self,
- GtkStack *stack);
+void adw_view_switcher_set_stack (AdwViewSwitcher *self,
+ AdwViewStack *stack);
G_END_DECLS
diff --git a/tests/test-view-switcher-bar.c b/tests/test-view-switcher-bar.c
index 5e925dbc..bd6c4a1f 100644
--- a/tests/test-view-switcher-bar.c
+++ b/tests/test-view-switcher-bar.c
@@ -32,12 +32,12 @@ static void
test_adw_view_switcher_bar_stack (void)
{
g_autoptr (AdwViewSwitcherBar) bar = NULL;
- GtkStack *stack;
+ AdwViewStack *stack;
bar = g_object_ref_sink (ADW_VIEW_SWITCHER_BAR (adw_view_switcher_bar_new ()));
g_assert_nonnull (bar);
- stack = GTK_STACK (gtk_stack_new ());
+ stack = ADW_VIEW_STACK (adw_view_stack_new ());
g_assert_nonnull (stack);
g_assert_null (adw_view_switcher_bar_get_stack (bar));
diff --git a/tests/test-view-switcher.c b/tests/test-view-switcher.c
index 374fbe60..fbbf0239 100644
--- a/tests/test-view-switcher.c
+++ b/tests/test-view-switcher.c
@@ -50,12 +50,12 @@ static void
test_adw_view_switcher_stack (void)
{
g_autoptr (AdwViewSwitcher) view_switcher = NULL;
- GtkStack *stack;
+ AdwViewStack *stack;
view_switcher = g_object_ref_sink (ADW_VIEW_SWITCHER (adw_view_switcher_new ()));
g_assert_nonnull (view_switcher);
- stack = GTK_STACK (gtk_stack_new ());
+ stack = ADW_VIEW_STACK (adw_view_stack_new ());
g_assert_nonnull (stack);
g_assert_null (adw_view_switcher_get_stack (view_switcher));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]