From c6887e9a3740ed46cc4ca0b751a3eefc86b5d630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Sun, 18 Nov 2012 16:37:51 -0500 Subject: [PATCH] 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 56835d5a..36d59f6a 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 38ba7060..a59e17b5 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 5bd2e8aa..de1aed26 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 afc20c09..40c382c0 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