[gnome-calendar/gbsneto/gtk4: 32/37] XXX Temporarily disable year view




commit bf475480e3b17c6dd0dae5fe5165f715792d0dd4
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Jan 26 12:50:55 2022 -0300

    XXX Temporarily disable year view

 src/gui/gcal-window.c     | 15 ++++++++-------
 src/gui/gcal-window.ui    |  2 ++
 src/gui/views/meson.build |  2 +-
 3 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/src/gui/gcal-window.c b/src/gui/gcal-window.c
index f39c37cd..eaa70be9 100644
--- a/src/gui/gcal-window.c
+++ b/src/gui/gcal-window.c
@@ -104,7 +104,7 @@ struct _GcalWindow
   AdwViewStack       *views_stack;
   GtkWidget          *week_view;
   GtkWidget          *month_view;
-  GtkWidget          *year_view;
+  //GtkWidget          *year_view;
   GtkWidget          *notification;
   GtkWidget          *notification_label;
   GtkWidget          *notification_action_button;
@@ -244,7 +244,7 @@ maybe_add_subscribers_to_timeline (GcalWindow *self)
   timeline = gcal_manager_get_timeline (gcal_context_get_manager (self->context));
   gcal_timeline_add_subscriber (timeline, GCAL_TIMELINE_SUBSCRIBER (self->week_view));
   gcal_timeline_add_subscriber (timeline, GCAL_TIMELINE_SUBSCRIBER (self->month_view));
-  gcal_timeline_add_subscriber (timeline, GCAL_TIMELINE_SUBSCRIBER (self->year_view));
+  //gcal_timeline_add_subscriber (timeline, GCAL_TIMELINE_SUBSCRIBER (self->year_view));
 
   self->subscribed = TRUE;
 }
@@ -263,7 +263,8 @@ update_active_date (GcalWindow *window,
 
   gcal_set_date_time (&window->active_date, new_date);
 
-  for (i = GCAL_WINDOW_VIEW_WEEK; i <= GCAL_WINDOW_VIEW_YEAR; i++)
+  //for (i = GCAL_WINDOW_VIEW_WEEK; i <= GCAL_WINDOW_VIEW_YEAR; i++)
+  for (i = GCAL_WINDOW_VIEW_WEEK; i < GCAL_WINDOW_VIEW_YEAR; i++)
     gcal_view_set_date (GCAL_VIEW (window->views[i]), new_date);
 
   update_today_button_sensitive (window);
@@ -896,7 +897,7 @@ gcal_window_constructed (GObject *object)
   g_object_bind_property (self, "context", self->calendar_management_dialog, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
   g_object_bind_property (self, "context", self->week_view, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
   g_object_bind_property (self, "context", self->month_view, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
-  g_object_bind_property (self, "context", self->year_view, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
+  //g_object_bind_property (self, "context", self->year_view, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
   g_object_bind_property (self, "context", self->event_editor, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
   g_object_bind_property (self, "context", self->quick_add_popover, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
   g_object_bind_property (self, "context", self->search_button, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
@@ -1033,7 +1034,7 @@ gcal_window_class_init (GcalWindowClass *klass)
   g_type_ensure (GCAL_TYPE_SEARCH_BUTTON);
   g_type_ensure (GCAL_TYPE_WEATHER_SETTINGS);
   g_type_ensure (GCAL_TYPE_WEEK_VIEW);
-  g_type_ensure (GCAL_TYPE_YEAR_VIEW);
+  //g_type_ensure (GCAL_TYPE_YEAR_VIEW);
 
   object_class = G_OBJECT_CLASS (klass);
   object_class->finalize = gcal_window_finalize;
@@ -1094,7 +1095,7 @@ gcal_window_class_init (GcalWindowClass *klass)
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, views_switcher);
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, weather_settings);
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, week_view);
-  gtk_widget_class_bind_template_child (widget_class, GcalWindow, year_view);
+  //gtk_widget_class_bind_template_child (widget_class, GcalWindow, year_view);
 
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, notification);
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, notification_label);
@@ -1148,7 +1149,7 @@ gcal_window_init (GcalWindow *self)
 
   self->views[GCAL_WINDOW_VIEW_WEEK] = self->week_view;
   self->views[GCAL_WINDOW_VIEW_MONTH] = self->month_view;
-  self->views[GCAL_WINDOW_VIEW_YEAR] = self->year_view;
+  //self->views[GCAL_WINDOW_VIEW_YEAR] = self->year_view;
 
   self->active_date = g_date_time_new_from_unix_local (0);
   self->rtl = gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL;
diff --git a/src/gui/gcal-window.ui b/src/gui/gcal-window.ui
index 78d98cbe..f02578c7 100644
--- a/src/gui/gcal-window.ui
+++ b/src/gui/gcal-window.ui
@@ -167,6 +167,7 @@
                         </property>
                       </object>
                     </child>
+                    <!-- TODO
                     <child>
                       <object class="AdwViewStackPage">
                         <property name="name">year</property>
@@ -182,6 +183,7 @@
                         </property>
                       </object>
                     </child>
+                    -->
                   </object>
                 </child>
               </object>
diff --git a/src/gui/views/meson.build b/src/gui/views/meson.build
index 2306458b..1edf6bab 100644
--- a/src/gui/views/meson.build
+++ b/src/gui/views/meson.build
@@ -16,5 +16,5 @@ sources += files(
   'gcal-week-hour-bar.c',
   'gcal-week-view.c',
   'gcal-week-view-common.c',
-  'gcal-year-view.c',
+  #'gcal-year-view.c',
 )


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