[gnome-todo] task-list-view: Remove unused GtkStack
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-list-view: Remove unused GtkStack
- Date: Mon, 10 May 2021 12:06:09 +0000 (UTC)
commit 28bd27c385c96c428bac3ac693c0f6acb41fdf5e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat May 8 12:09:12 2021 -0300
task-list-view: Remove unused GtkStack
It was used back when we showed a spinner while To Do was loading a task
list, but we're actually moving to a widget that won't require this kind
of workaround.
src/gui/gtd-task-list-view.c | 2 --
src/gui/gtd-task-list-view.ui | 84 ++++++++++++++++---------------------------
2 files changed, 30 insertions(+), 56 deletions(-)
---
diff --git a/src/gui/gtd-task-list-view.c b/src/gui/gtd-task-list-view.c
index abe68e19..a4f797df 100644
--- a/src/gui/gtd-task-list-view.c
+++ b/src/gui/gtd-task-list-view.c
@@ -70,7 +70,6 @@ typedef struct
GtkStack *main_stack;
GtkListBoxRow *new_task_row;
GtkWidget *scrolled_window;
- GtkStack *stack;
/* internal */
gboolean can_toggle;
@@ -1056,7 +1055,6 @@ gtd_task_list_view_class_init (GtdTaskListViewClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GtdTaskListView, new_task_row);
gtk_widget_class_bind_template_child_private (widget_class, GtdTaskListView, tasklist_name_sizegroup);
gtk_widget_class_bind_template_child_private (widget_class, GtdTaskListView, scrolled_window);
- gtk_widget_class_bind_template_child_private (widget_class, GtdTaskListView, stack);
gtk_widget_class_bind_template_callback (widget_class, on_empty_list_widget_add_tasks_cb);
gtk_widget_class_bind_template_callback (widget_class, on_listbox_row_activated_cb);
diff --git a/src/gui/gtd-task-list-view.ui b/src/gui/gtd-task-list-view.ui
index a9c30247..60e7aeaf 100644
--- a/src/gui/gtd-task-list-view.ui
+++ b/src/gui/gtd-task-list-view.ui
@@ -26,67 +26,43 @@
<property name="min-content-height">320</property>
<property name="hscrollbar-policy">never</property>
<child>
- <object class="GtkStack" id="stack">
- <property name="hexpand">true</property>
- <property name="vexpand">true</property>
- <property name="transition-type">crossfade</property>
+ <object class="GtdWidget">
+ <property name="hexpand">1</property>
+ <property name="vexpand">1</property>
+ <property name="halign">center</property>
+ <property name="layout-manager">
+ <object class="GtdMaxSizeLayout">
+ <property name="max-width">700</property>
+ </object>
+ </property>
<child>
- <object class="GtkStackPage">
- <property name="name">listbox</property>
- <property name="child">
- <object class="GtdWidget">
+ <object class="GtkBox">
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">64</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkListBox" id="listbox">
<property name="hexpand">1</property>
- <property name="vexpand">1</property>
- <property name="halign">center</property>
- <property name="layout-manager">
- <object class="GtdMaxSizeLayout">
- <property name="max-width">700</property>
- </object>
- </property>
- <child>
- <object class="GtkBox">
- <property name="margin-top">6</property>
- <property name="margin-bottom">64</property>
- <property name="margin-start">18</property>
- <property name="margin-end">18</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkListBox" id="listbox">
- <property name="hexpand">1</property>
- <property name="selection_mode">none</property>
- <signal name="row-activated" handler="on_listbox_row_activated_cb"
object="GtdTaskListView" swapped="no"/>
- <style>
- <class name="transparent"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtdNewTaskRow" id="new_task_row">
- <property name="margin-bottom">24</property>
- <signal name="enter" handler="on_new_task_row_entered_cb"
object="GtdTaskListView" swapped="yes"/>
- <signal name="exit" handler="on_new_task_row_exited_cb"
object="GtdTaskListView" swapped="yes"/>
- </object>
- </child>
- </object>
- </child>
+ <property name="selection_mode">none</property>
+ <signal name="row-activated" handler="on_listbox_row_activated_cb"
object="GtdTaskListView" swapped="no"/>
+ <style>
+ <class name="transparent"/>
+ </style>
</object>
-
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">loading</property>
- <property name="child">
- <object class="GtkSpinner">
- <property name="spinning">true</property>
- <property name="width-request">96</property>
- <property name="height-request">96</property>
+ </child>
+ <child>
+ <object class="GtdNewTaskRow" id="new_task_row">
+ <property name="margin-bottom">24</property>
+ <signal name="enter" handler="on_new_task_row_entered_cb"
object="GtdTaskListView" swapped="yes"/>
+ <signal name="exit" handler="on_new_task_row_exited_cb" object="GtdTaskListView"
swapped="yes"/>
</object>
- </property>
+ </child>
</object>
</child>
</object>
+
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]