[gnome-calendar] date-selector: initial implementetation



commit 40683e5e104b63f0d7fde062b76ea7dbc17169c6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Dec 18 14:20:20 2014 -0200

    date-selector: initial implementetation
    
    No functionality is ready, only project settings and class type.

 data/Makefile.am            |    1 +
 data/calendar.gresource.xml |    1 +
 data/theme/gtk-styles.css   |    8 +
 data/ui/date-selector.ui    |   74 ++++++++
 data/ui/edit-dialog.ui      |    4 +-
 src/Makefile.am             |    4 +-
 src/gcal-date-entry.c       |  439 -------------------------------------------
 src/gcal-date-entry.h       |   72 -------
 src/gcal-date-selector.c    |  156 +++++++++++++++
 src/gcal-date-selector.h    |   69 +++++++
 src/gcal-edit-dialog.c      |   52 +++---
 11 files changed, 340 insertions(+), 540 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 6e4adb8..a33de3e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -33,6 +33,7 @@ gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
 EXTRA_DIST=                     \
   org.gnome.Calendar.desktop    \
   calendar.gresource.xml        \
+  ui/date-selector.ui           \
   ui/edit-dialog.ui             \
   ui/menus.ui                   \
   ui/nav_bar.ui                 \
diff --git a/data/calendar.gresource.xml b/data/calendar.gresource.xml
index 0ce5b82..f574933 100644
--- a/data/calendar.gresource.xml
+++ b/data/calendar.gresource.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
   <gresource prefix="/org/gnome/calendar">
+    <file alias="date-selector.ui" compressed="true" preprocess="xml-stripblanks">ui/date-selector.ui</file>
     <file alias="edit-dialog.ui" compressed="true" preprocess="xml-stripblanks">ui/edit-dialog.ui</file>
     <file alias="menus.ui" compressed="true" preprocess="xml-stripblanks">ui/menus.ui</file>
     <file alias="nav_bar.ui" compressed="true" preprocess="xml-stripblanks">ui/nav_bar.ui</file>
diff --git a/data/theme/gtk-styles.css b/data/theme/gtk-styles.css
index 9a4a498..8f87a2d 100644
--- a/data/theme/gtk-styles.css
+++ b/data/theme/gtk-styles.css
@@ -83,3 +83,11 @@ GcalEventWidget.color-light {
 GcalEventWidget.color-light:backdrop {
     color: rgba(0, 0, 0, 0.3);
 }
+
+.middle-entry {
+    border-left: 0px;
+    border-bottom-left-radius: 0px;
+    border-top-left-radius: 0px;
+    border-bottom-right-radius: 0px;
+    border-top-right-radius: 0px;
+}
diff --git a/data/ui/date-selector.ui b/data/ui/date-selector.ui
new file mode 100644
index 0000000..997de6e
--- /dev/null
+++ b/data/ui/date-selector.ui
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <object class="GtkGrid" id="grid">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="row_spacing">6</property>
+    <child>
+      <object class="GtkBox" id="date_box">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkEntry" id="entry1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="entry2">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <style>
+              <class name="middle-entry"/>
+            </style>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="entry3">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <style>
+          <class name="linked"/>
+        </style>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCalendar" id="calendar">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="year">2014</property>
+        <property name="month">11</property>
+        <property name="day">18</property>
+        <property name="show_week_numbers">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/data/ui/edit-dialog.ui b/data/ui/edit-dialog.ui
index 9544ec7..9206f56 100644
--- a/data/ui/edit-dialog.ui
+++ b/data/ui/edit-dialog.ui
@@ -247,7 +247,7 @@
               </packing>
             </child>
             <child>
-              <object class="GcalDateEntry" id="start_date_entry">
+              <object class="GcalDateSelector" id="start_date_selector">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
               </object>
@@ -267,7 +267,7 @@
               </packing>
             </child>
             <child>
-              <object class="GcalDateEntry" id="end_date_entry">
+              <object class="GcalDateSelector" id="end_date_selector">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
               </object>
diff --git a/src/Makefile.am b/src/Makefile.am
index aa64ec2..c0919ad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -45,8 +45,8 @@ gnome_calendar_SOURCES =                                  \
     gcal-edit-dialog.h                                    \
     gcal-time-selector.c                                  \
     gcal-time-selector.h                                  \
-    gcal-date-entry.c                                     \
-    gcal-date-entry.h                                     \
+    gcal-date-selector.c                                  \
+    gcal-date-selector.h                                  \
     gcal-manager.c                                        \
     gcal-manager.h                                        \
     gcal-nav-bar.h                                        \
diff --git a/src/gcal-date-selector.c b/src/gcal-date-selector.c
new file mode 100644
index 0000000..1fdd459
--- /dev/null
+++ b/src/gcal-date-selector.c
@@ -0,0 +1,156 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * gcal-date-selector.c
+ * Copyright (C) 2012 Erick Pérez Castellanos <erickpc gnome org>
+ *
+ * gnome-calendar is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * gnome-calendar is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "gcal-date-selector.h"
+
+#include <locale.h>
+#include <langinfo.h>
+#include <glib/gi18n.h>
+
+struct _GcalDateSelectorPrivate
+{
+  gboolean  internal_skip;
+
+  gint      day;
+  gint      month;
+  gint      year;
+
+  gchar    *mask;
+  guint     day_pos;
+  guint     month_pos;
+  guint     year_pos;
+  gboolean  have_long_year;
+};
+
+enum
+{
+  MODIFIED,
+  NUM_SIGNALS
+};
+
+static guint signals[NUM_SIGNALS] = { 0, };
+
+static void     gcal_date_selector_constructed                    (GObject              *object);
+
+G_DEFINE_TYPE_WITH_PRIVATE (GcalDateSelector, gcal_date_selector, GTK_TYPE_TOGGLE_BUTTON);
+
+static void
+gcal_date_selector_class_init (GcalDateSelectorClass *klass)
+{
+  GObjectClass *object_class;
+
+  object_class = G_OBJECT_CLASS (klass);
+  object_class->constructed = gcal_date_selector_constructed;
+
+  signals[MODIFIED] = g_signal_new ("modified",
+                                    GCAL_TYPE_DATE_SELECTOR,
+                                    G_SIGNAL_RUN_LAST,
+                                    G_STRUCT_OFFSET (GcalDateSelectorClass, modified),
+                                    NULL, NULL, NULL,
+                                    G_TYPE_NONE, 0);
+}
+
+static void
+gcal_date_selector_init (GcalDateSelector *self)
+{
+  GcalDateSelectorPrivate *priv;
+  gchar *have_y;
+
+  gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
+
+  priv = gcal_date_selector_get_instance_private (GCAL_DATE_SELECTOR (self));;
+
+  priv->internal_skip = FALSE;
+  priv->day = 1;
+  priv->month = 1;
+  priv->year = 1970;
+
+  setlocale (LC_ALL,"");
+  priv->mask = nl_langinfo (D_FMT);
+
+  priv->day_pos = - (priv->mask - g_strstr_len (priv->mask, -1, "%d"));
+  priv->month_pos = - (priv->mask - g_strstr_len (priv->mask, -1, "%m"));
+  if ((have_y = g_strstr_len (priv->mask, - 1, "%y")) != NULL)
+    {
+      priv->have_long_year = FALSE;
+      priv->year_pos = - (priv->mask - have_y);
+    }
+  else
+    {
+      priv->have_long_year = TRUE;
+      priv->year_pos = - (priv->mask - g_strstr_len (priv->mask, -1, "%Y"));
+      if (priv->year_pos < priv->day_pos)
+        priv->day_pos += 2;
+      if (priv->year_pos < priv->month_pos)
+        priv->month_pos += 2;
+    }
+}
+
+static void
+gcal_date_selector_constructed (GObject *object)
+{
+  GcalDateSelectorPrivate *priv;
+
+  priv = gcal_date_selector_get_instance_private (GCAL_DATE_SELECTOR (object));
+
+  /* chaining up */
+  G_OBJECT_CLASS (gcal_date_selector_parent_class)->constructed (object);
+}
+
+/* Public API */
+GtkWidget*
+gcal_date_selector_new (void)
+{
+  return g_object_new (GCAL_TYPE_DATE_SELECTOR, NULL);
+}
+
+void
+gcal_date_selector_set_date (GcalDateSelector *selector,
+                             gint              day,
+                             gint              month,
+                             gint              year)
+{
+  GcalDateSelectorPrivate *priv;
+
+  g_return_if_fail (GCAL_IS_DATE_SELECTOR (selector));
+  priv = gcal_date_selector_get_instance_private (selector);
+
+  priv->day = day;
+  priv->month = month;
+  priv->year = year;
+}
+
+void
+gcal_date_selector_get_date (GcalDateSelector *selector,
+                             gint             *day,
+                             gint             *month,
+                             gint             *year)
+{
+  GcalDateSelectorPrivate *priv;
+
+  g_return_if_fail (GCAL_IS_DATE_SELECTOR (selector));
+  priv = gcal_date_selector_get_instance_private (selector);
+
+  if (day != NULL)
+    *day = priv->day;
+  if (month != NULL)
+    *month = priv->month;
+  if (year != NULL)
+    *year = priv->year;
+}
diff --git a/src/gcal-date-selector.h b/src/gcal-date-selector.h
new file mode 100644
index 0000000..99762cd
--- /dev/null
+++ b/src/gcal-date-selector.h
@@ -0,0 +1,69 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * gcal-date-selector.h
+ * Copyright (C) 2012 Erick Pérez Castellanos <erickpc gnome org>
+ *
+ * gnome-calendar is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * gnome-calendar is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GCAL_DATE_SELECTOR_H__
+#define __GCAL_DATE_SELECTOR_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GCAL_TYPE_DATE_SELECTOR             (gcal_date_selector_get_type ())
+#define GCAL_DATE_SELECTOR(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GCAL_TYPE_DATE_SELECTOR, 
GcalDateSelector))
+#define GCAL_DATE_SELECTOR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GCAL_TYPE_DATE_SELECTOR, 
GcalDateSelectorClass))
+#define GCAL_IS_DATE_SELECTOR(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), GCAL_TYPE_DATE_SELECTOR))
+#define GCAL_IS_DATE_SELECTOR_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GCAL_TYPE_DATE_SELECTOR))
+#define GCAL_DATE_SELECTOR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GCAL_TYPE_DATE_SELECTOR, 
GcalDateSelectorClass))
+
+typedef struct _GcalTime GcalTime;
+
+typedef struct _GcalDateSelector             GcalDateSelector;
+typedef struct _GcalDateSelectorClass        GcalDateSelectorClass;
+typedef struct _GcalDateSelectorPrivate      GcalDateSelectorPrivate;
+
+struct _GcalDateSelector
+{
+  GtkToggleButton parent;
+};
+
+struct _GcalDateSelectorClass
+{
+  GtkToggleButtonClass parent_class;
+
+  /* signals */
+  void (*modified)  (GcalDateSelector *selector);
+};
+
+GType            gcal_date_selector_get_type        (void);
+
+GtkWidget*       gcal_date_selector_new             (void);
+
+void             gcal_date_selector_set_date        (GcalDateSelector *selector,
+                                                     gint              day,
+                                                     gint              month,
+                                                     gint              year);
+
+void             gcal_date_selector_get_date        (GcalDateSelector *selector,
+                                                     gint             *day,
+                                                     gint             *month,
+                                                     gint             *year);
+
+G_END_DECLS
+
+#endif /* __GCAL_DATE_SELECTOR_H__ */
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index d4c19f8..efdd746 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -19,7 +19,7 @@
 
 #include "gcal-edit-dialog.h"
 #include "gcal-time-selector.h"
-#include "gcal-date-entry.h"
+#include "gcal-date-selector.h"
 #include "gcal-utils.h"
 
 #include <libecal/libecal.h>
@@ -47,8 +47,8 @@ typedef struct
 
   GtkWidget        *summary_entry;
 
-  GtkWidget        *start_date_entry;
-  GtkWidget        *end_date_entry;
+  GtkWidget        *start_date_selector;
+  GtkWidget        *end_date_selector;
   GtkWidget        *all_day_check;
   GtkWidget        *start_time_selector;
   GtkWidget        *end_time_selector;
@@ -234,7 +234,7 @@ update_date (GtkEntry   *entry,
   if (icaltime_compare (*start_date, *end_date) != -1)
     {
       /* change the non-editing entry */
-      if (GTK_WIDGET (entry) == priv->start_date_entry)
+      if (GTK_WIDGET (entry) == priv->start_date_selector)
         {
           end_date->day = start_date->day;
           end_date->month = start_date->month;
@@ -260,26 +260,26 @@ update_date (GtkEntry   *entry,
         }
 
       /* update the entries with the new sane values */
-      g_signal_handlers_block_by_func (priv->start_date_entry,
+      g_signal_handlers_block_by_func (priv->start_date_selector,
                                        update_date,
                                        user_data);
-      g_signal_handlers_block_by_func (priv->end_date_entry,
+      g_signal_handlers_block_by_func (priv->end_date_selector,
                                        update_date,
                                        user_data);
 
-      gcal_date_entry_set_date (GCAL_DATE_ENTRY (priv->start_date_entry),
+      gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->start_date_selector),
                                 start_date->day,
                                 start_date->month,
                                 start_date->year);
-      gcal_date_entry_set_date (GCAL_DATE_ENTRY (priv->end_date_entry),
+      gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->end_date_selector),
                                 end_date->day,
                                 end_date->month,
                                 end_date->year);
 
-      g_signal_handlers_unblock_by_func (priv->start_date_entry,
+      g_signal_handlers_unblock_by_func (priv->start_date_selector,
                                        update_date,
                                        user_data);
-      g_signal_handlers_unblock_by_func (priv->end_date_entry,
+      g_signal_handlers_unblock_by_func (priv->end_date_selector,
                                        update_date,
                                        user_data);
     }
@@ -406,14 +406,14 @@ update_time (GtkEntry   *entry,
       gcal_time_selector_set_time (GCAL_TIME_SELECTOR (priv->start_time_selector),
                                 start_date->hour,
                                 start_date->minute);
-      gcal_date_entry_set_date (GCAL_DATE_ENTRY (priv->start_date_entry),
+      gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->start_date_selector),
                                 start_date->day,
                                 start_date->month,
                                 start_date->year);
       gcal_time_selector_set_time (GCAL_TIME_SELECTOR (priv->end_time_selector),
                                 end_date->hour,
                                 end_date->minute);
-      gcal_date_entry_set_date (GCAL_DATE_ENTRY (priv->end_date_entry),
+      gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->end_date_selector),
                                 end_date->day,
                                 end_date->month,
                                 end_date->year);
@@ -468,9 +468,9 @@ gcal_edit_dialog_class_init (GcalEditDialogClass *klass)
   /* Entries */
   gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, summary_entry);
   gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, start_time_selector);
-  gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, start_date_entry);
+  gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, start_date_selector);
   gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, end_time_selector);
-  gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, end_date_entry);
+  gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, end_date_selector);
   gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, location_entry);
   /* Other */
   gtk_widget_class_bind_template_child_private (widget_class, GcalEditDialog, notes_text);
@@ -582,12 +582,12 @@ gcal_edit_dialog_constructed (GObject* object)
                     G_CALLBACK (update_location),
                     object);
 
-  g_signal_connect (priv->start_date_entry,
+  g_signal_connect (priv->start_date_selector,
                     "modified",
                     G_CALLBACK (update_date),
                     object);
 
-  g_signal_connect (priv->end_date_entry,
+  g_signal_connect (priv->end_date_selector,
                     "modified",
                     G_CALLBACK (update_date),
                     object);
@@ -651,8 +651,6 @@ gcal_edit_dialog_set_writable (GcalEditDialog *dialog,
     }
 
   gtk_editable_set_editable (GTK_EDITABLE (priv->summary_entry), writable);
-  gtk_editable_set_editable (GTK_EDITABLE (priv->start_date_entry), writable);
-  gtk_editable_set_editable (GTK_EDITABLE (priv->end_date_entry), writable);
   gtk_editable_set_editable (GTK_EDITABLE (priv->location_entry), writable);
 
   gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->notes_text), writable);
@@ -663,11 +661,15 @@ gcal_edit_dialog_set_writable (GcalEditDialog *dialog,
     {
       gtk_widget_set_sensitive (priv->start_time_selector, FALSE);
       gtk_widget_set_sensitive (priv->end_time_selector, FALSE);
+      gtk_widget_set_sensitive (priv->start_date_selector, FALSE);
+      gtk_widget_set_sensitive (priv->end_date_selector, FALSE);
     }
   else
     {
       gtk_widget_set_sensitive (priv->start_time_selector, TRUE);
       gtk_widget_set_sensitive (priv->end_time_selector, TRUE);
+      gtk_widget_set_sensitive (priv->start_date_selector, TRUE);
+      gtk_widget_set_sensitive (priv->end_date_selector, TRUE);
     }
 
   gtk_button_set_label (GTK_BUTTON (priv->done_button),
@@ -701,9 +703,9 @@ gcal_edit_dialog_clear_data (GcalEditDialog *dialog)
     }
 
   /* date and time */
-  gtk_entry_set_text (GTK_ENTRY (priv->start_date_entry), "");
+  gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->start_date_selector), 0, 0, 0);
   gcal_time_selector_set_time (GCAL_TIME_SELECTOR (priv->start_time_selector), 0, 0);
-  gtk_entry_set_text (GTK_ENTRY (priv->end_date_entry), "");
+  gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->end_date_selector), 0, 0, 0);
   gcal_time_selector_set_time (GCAL_TIME_SELECTOR (priv->end_time_selector), 0, 0);
 
   /* location */
@@ -874,7 +876,7 @@ gcal_edit_dialog_set_event_data (GcalEditDialog *dialog,
   /* start date */
   e_cal_component_get_dtstart (priv->component, &dtstart);
 
-  gcal_date_entry_set_date (GCAL_DATE_ENTRY (priv->start_date_entry),
+  gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->start_date_selector),
                             dtstart.value->day,
                             dtstart.value->month,
                             dtstart.value->year);
@@ -891,7 +893,7 @@ gcal_edit_dialog_set_event_data (GcalEditDialog *dialog,
   e_cal_component_get_dtend (priv->component, &dtend);
   if (dtend.value != NULL)
     {
-      gcal_date_entry_set_date (GCAL_DATE_ENTRY (priv->end_date_entry),
+      gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->end_date_selector),
                                 dtend.value->day, dtend.value->month, dtend.value->year);
       all_day = (dtstart.value->is_date == 1 && dtend.value->is_date == 1);
 
@@ -900,7 +902,7 @@ gcal_edit_dialog_set_event_data (GcalEditDialog *dialog,
     }
   else
     {
-      gcal_date_entry_set_date (GCAL_DATE_ENTRY (priv->end_date_entry),
+      gcal_date_selector_set_date (GCAL_DATE_SELECTOR (priv->end_date_selector),
                                 dtstart.value->day, dtstart.value->month, dtstart.value->year);
       gcal_time_selector_set_time (GCAL_TIME_SELECTOR (priv->end_time_selector), dtstart.value->hour, 
dtstart.value->minute);
       all_day = FALSE;
@@ -1036,7 +1038,7 @@ gcal_edit_dialog_get_start_date (GcalEditDialog *dialog)
   icaltime_set_timezone (date,
                          gcal_manager_get_system_timezone (priv->manager));
 
-  gcal_date_entry_get_date (GCAL_DATE_ENTRY (priv->start_date_entry),
+  gcal_date_selector_get_date (GCAL_DATE_SELECTOR (priv->start_date_selector),
                             &value1,
                             &value2,
                             &value3);
@@ -1077,7 +1079,7 @@ gcal_edit_dialog_get_end_date (GcalEditDialog *dialog)
   icaltime_set_timezone (date,
                          gcal_manager_get_system_timezone (priv->manager));
 
-  gcal_date_entry_get_date (GCAL_DATE_ENTRY (priv->end_date_entry),
+  gcal_date_selector_get_date (GCAL_DATE_SELECTOR (priv->end_date_selector),
                             &value1,
                             &value2,
                             &value3);


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