[gnome-calendar] window: Remove search popover



commit b967f047bf140f8650fc1347618f6befc7e5b3b8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Apr 27 20:39:42 2019 -0300

    window: Remove search popover
    
    Won't be missed.

 data/ui/window.ui         |   5 -
 src/gcal-search-popover.c | 758 ----------------------------------------------
 src/gcal-search-popover.h |  41 ---
 src/gcal-window.c         |  20 --
 4 files changed, 824 deletions(-)
---
diff --git a/data/ui/window.ui b/data/ui/window.ui
index f68cd288..4e9f247c 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -9,7 +9,6 @@
     <property name="show_menubar">False</property>
     <signal name="key-press-event" handler="key_pressed" object="GcalWindow" swapped="no"/>
     <signal name="window-state-event" handler="window_state_changed" object="GcalWindow" swapped="no"/>
-    <property name="active-date" bind-source="search_popover" bind-property="active-date" 
bind-flags="default|sync-create"/>
     <style>
       <class name="org-gnome-Calendar"/>
     </style>    
@@ -272,10 +271,6 @@
       </object>
     </child>
   </template>
-  <object class="GcalSearchPopover" id="search_popover">
-    <property name="position">bottom</property>
-    <signal name="event-activated" handler="search_event_selected" object="GcalWindow" swapped="no"/>
-  </object>
   <object class="GtkPopover" id="calendar_popover">
     <property name="border_width">6</property>
     <child>
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 7bd94482..24e6f24b 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -27,7 +27,6 @@
 #include "gcal-month-view.h"
 #include "gcal-quick-add-popover.h"
 #include "gcal-search-button.h"
-#include "gcal-search-popover.h"
 #include "gcal-source-dialog.h"
 #include "gcal-view.h"
 #include "gcal-weather-settings.h"
@@ -129,8 +128,6 @@ struct _GcalWindow
   /* new event popover widgets */
   GtkWidget          *quick_add_popover;
 
-  GtkWidget          *search_popover;
-
   /* day, week, month, year, list */
   GtkWidget          *views [6];
   GtkWidget          *edit_dialog;
@@ -446,15 +443,6 @@ on_view_action_activated (GSimpleAction *action,
   g_object_notify_by_pspec (G_OBJECT (user_data), properties[PROP_ACTIVE_VIEW]);
 }
 
-static void
-search_event_selected (GcalSearchPopover *search_view,
-                       icaltimetype      *date,
-                       gpointer           user_data)
-{
-  g_object_set (user_data, "active-date", date, NULL);
-  gcal_window_set_search_mode (GCAL_WINDOW (user_data), FALSE);
-}
-
 static gint
 calendar_listbox_sort_func (GtkListBoxRow *row1,
                             GtkListBoxRow *row2,
@@ -1159,7 +1147,6 @@ gcal_window_constructed (GObject *object)
   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->edit_dialog, "context", G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
-  g_object_bind_property (self, "context", self->search_popover, "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);
 
@@ -1220,8 +1207,6 @@ gcal_window_set_property (GObject      *object,
           g_signal_connect_swapped (manager, "source-enabled", G_CALLBACK (source_enabled), object);
           g_signal_connect_swapped (manager, "source-changed", G_CALLBACK (source_changed), object);
 
-          gcal_search_popover_connect (GCAL_SEARCH_POPOVER (self->search_popover), manager);
-
           g_object_notify_by_pspec (object, properties[PROP_CONTEXT]);
         }
       break;
@@ -1297,7 +1282,6 @@ gcal_window_class_init (GcalWindowClass *klass)
   g_type_ensure (GCAL_TYPE_MONTH_VIEW);
   g_type_ensure (GCAL_TYPE_QUICK_ADD_POPOVER);
   g_type_ensure (GCAL_TYPE_SEARCH_BUTTON);
-  g_type_ensure (GCAL_TYPE_SEARCH_POPOVER);
   g_type_ensure (GCAL_TYPE_SOURCE_DIALOG);
   g_type_ensure (GCAL_TYPE_WEATHER_SETTINGS);
   g_type_ensure (GCAL_TYPE_WEEK_VIEW);
@@ -1356,7 +1340,6 @@ gcal_window_class_init (GcalWindowClass *klass)
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, quick_add_popover);
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, search_button);
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, source_dialog);
-  gtk_widget_class_bind_template_child (widget_class, GcalWindow, search_popover);
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, today_button);
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, views_overlay);
   gtk_widget_class_bind_template_child (widget_class, GcalWindow, views_stack);
@@ -1390,9 +1373,6 @@ gcal_window_class_init (GcalWindowClass *klass)
   /* Syncronization related */
   gtk_widget_class_bind_template_callback (widget_class, window_state_changed);
 
-  /* search related */
-  gtk_widget_class_bind_template_callback (widget_class, search_event_selected);
-
   /* Edit dialog related */
   gtk_widget_class_bind_template_callback (widget_class, edit_dialog_closed);
 }


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