[gnome-calendar] Moved from guint to gint to match libical internal data.



commit c6887e9a3740ed46cc4ca0b751a3eefc86b5d630
Author: Erick PÃrez Castellanos <erick red gmail com>
Date:   Sun Nov 18 16:37:51 2012 -0500

    Moved from guint to gint to match libical internal data.
    
    The internal attributes of both widgets were guint types, but
    since libical library has those values (day,month,hour) as int
    inside icaltimetype struct, I decided t move to gint in order to
    avoid compiler warnings, and ugly hidden things.

 src/gcal-date-entry.c |   18 +++++++++---------
 src/gcal-date-entry.h |   12 ++++++------
 src/gcal-time-entry.c |   16 ++++++++--------
 src/gcal-time-entry.h |    8 ++++----
 4 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/src/gcal-date-entry.c b/src/gcal-date-entry.c
index 56835d5..36d59f6 100644
--- a/src/gcal-date-entry.c
+++ b/src/gcal-date-entry.c
@@ -27,9 +27,9 @@ struct _GcalDateEntryPrivate
 {
   gboolean  internal_skip;
 
-  guint     day;              /* 1 - 28 || 29 || 30 || 31 */
-  guint     month;            /* 1 - 12 */
-  guint     year;
+  gint      day;              /* 1 - 28 || 29 || 30 || 31 */
+  gint      month;            /* 1 - 12 */
+  gint      year;
 
   gchar    *mask;
   guint     day_pos;
@@ -368,9 +368,9 @@ gcal_date_entry_new (void)
 
 void
 gcal_date_entry_set_date (GcalDateEntry *entry,
-                          guint          day,
-                          guint          month,
-                          guint          year)
+                          gint           day,
+                          gint           month,
+                          gint           year)
 {
   GcalDateEntryPrivate *priv;
 
@@ -386,9 +386,9 @@ gcal_date_entry_set_date (GcalDateEntry *entry,
 
 void
 gcal_date_entry_get_date (GcalDateEntry *entry,
-                          guint         *day,
-                          guint         *month,
-                          guint         *year)
+                          gint          *day,
+                          gint          *month,
+                          gint          *year)
 {
   GcalDateEntryPrivate *priv;
 
diff --git a/src/gcal-date-entry.h b/src/gcal-date-entry.h
index 38ba706..a59e17b 100644
--- a/src/gcal-date-entry.h
+++ b/src/gcal-date-entry.h
@@ -55,14 +55,14 @@ GType            gcal_date_entry_get_type        (void);
 GtkWidget*       gcal_date_entry_new             (void);
 
 void             gcal_date_entry_set_date        (GcalDateEntry *entry,
-                                                  guint          day,
-                                                  guint          month,
-                                                  guint          year);
+                                                  gint           day,
+                                                  gint           month,
+                                                  gint           year);
 
 void             gcal_date_entry_get_date        (GcalDateEntry *entry,
-                                                  guint         *day,
-                                                  guint         *month,
-                                                  guint         *year);
+                                                  gint          *day,
+                                                  gint          *month,
+                                                  gint          *year);
 
 G_END_DECLS
 
diff --git a/src/gcal-time-entry.c b/src/gcal-time-entry.c
index 5bd2e8a..de1aed2 100644
--- a/src/gcal-time-entry.c
+++ b/src/gcal-time-entry.c
@@ -25,8 +25,8 @@ struct _GcalTimeEntryPrivate
 {
   gboolean internal_delete;
 
-  guint    hours;
-  guint    minutes;
+  gint    hours;
+  gint    minutes;
 };
 
 static void     gtk_editable_iface_init                        (GtkEditableInterface *iface);
@@ -292,9 +292,9 @@ gcal_time_entry_insert_text (GtkEditable *editable,
 
   /* setting hours, minutes */
   hours_text = g_strdup_printf ("%.2s", old_text);
-  priv->hours = (guint) g_ascii_strtoull (hours_text, NULL, 10);
+  priv->hours = (gint) g_ascii_strtoull (hours_text, NULL, 10);
   g_free (hours_text);
-  priv->minutes = (guint) g_ascii_strtoull (old_text + 3, NULL, 10);
+  priv->minutes = (gint) g_ascii_strtoull (old_text + 3, NULL, 10);
 
   priv->internal_delete = TRUE;
   gtk_editable_delete_text (editable, 0, 5);
@@ -322,8 +322,8 @@ gcal_time_entry_new (void)
 
 void
 gcal_time_entry_set_time (GcalTimeEntry *entry,
-                          guint          hours,
-                          guint          minutes)
+                          gint           hours,
+                          gint           minutes)
 {
   GcalTimeEntryPrivate *priv;
   gchar *new_time;
@@ -343,8 +343,8 @@ gcal_time_entry_set_time (GcalTimeEntry *entry,
 
 void
 gcal_time_entry_get_time (GcalTimeEntry *entry,
-                          guint         *hours,
-                          guint         *minutes)
+                          gint          *hours,
+                          gint          *minutes)
 {
   GcalTimeEntryPrivate *priv;
 
diff --git a/src/gcal-time-entry.h b/src/gcal-time-entry.h
index afc20c0..40c382c 100644
--- a/src/gcal-time-entry.h
+++ b/src/gcal-time-entry.h
@@ -53,12 +53,12 @@ GType            gcal_time_entry_get_type        (void);
 GtkWidget*       gcal_time_entry_new             (void);
 
 void             gcal_time_entry_set_time        (GcalTimeEntry *entry,
-                                                  guint          hours,
-                                                  guint          minutes);
+                                                  gint           hours,
+                                                  gint           minutes);
 
 void             gcal_time_entry_get_time        (GcalTimeEntry *entry,
-                                                  guint         *hours,
-                                                  guint         *minutes);
+                                                  gint          *hours,
+                                                  gint          *minutes);
 
 G_END_DECLS
 



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