diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 23:13:25 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-29 00:13:23 +0800 |
commit | fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056 (patch) | |
tree | ae78be371695c3dc18847b87d3f014f985aa3a40 /calendar/gui/weekday-picker.c | |
parent | 6f5464f34ceec9e5701e3e3e651a40f9e6b3a072 (diff) | |
download | gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.gz gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.zst gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.zip |
Prefer GLib basic types over C types.
Diffstat (limited to 'calendar/gui/weekday-picker.c')
-rw-r--r-- | calendar/gui/weekday-picker.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c index 56a7386d4b..913144d4a7 100644 --- a/calendar/gui/weekday-picker.c +++ b/calendar/gui/weekday-picker.c @@ -48,14 +48,14 @@ struct _WeekdayPickerPrivate { guint8 blocked_day_mask; /* Day that defines the start of the week; 0 = Sunday, ..., 6 = Saturday */ - int week_start_day; + gint week_start_day; /* Current keyboard focus day */ - int focus_day; + gint focus_day; /* Metrics */ - int font_ascent, font_descent; - int max_letter_width; + gint font_ascent, font_descent; + gint max_letter_width; /* Components */ GnomeCanvasItem *boxes[7]; @@ -114,7 +114,7 @@ weekday_picker_class_init (WeekdayPickerClass *class) } static void -day_clicked (WeekdayPicker *wp, int index) +day_clicked (WeekdayPicker *wp, gint index) { WeekdayPickerPrivate *priv = wp->priv; guint8 day_mask; @@ -172,7 +172,7 @@ day_event_cb (GnomeCanvasItem *item, GdkEvent *event, gpointer data) { WeekdayPicker *wp; WeekdayPickerPrivate *priv; - int i; + gint i; wp = WEEKDAY_PICKER (data); priv = wp->priv; @@ -210,7 +210,7 @@ create_items (WeekdayPicker *wp) { WeekdayPickerPrivate *priv; GnomeCanvasGroup *parent; - int i; + gint i; priv = wp->priv; @@ -270,7 +270,7 @@ colorize_items (WeekdayPicker *wp) GdkColor *outline, *focus_outline; GdkColor *fill, *sel_fill; GdkColor *text_fill, *sel_text_fill; - int i; + gint i; priv = wp->priv; @@ -284,7 +284,7 @@ colorize_items (WeekdayPicker *wp) sel_text_fill = >K_WIDGET (wp)->style->fg[GTK_STATE_SELECTED]; for (i = 0; i < 7; i++) { - int day; + gint day; GdkColor *f, *t, *o; day = i + priv->week_start_day; @@ -316,8 +316,8 @@ colorize_items (WeekdayPicker *wp) } /* Configures the items in the weekday picker by setting their attributes. */ -static char * -get_day_text (int day_index) +static gchar * +get_day_text (gint day_index) { GDateWeekday weekday; @@ -331,9 +331,9 @@ static void configure_items (WeekdayPicker *wp) { WeekdayPickerPrivate *priv; - int width, height; - int box_width; - int i; + gint width, height; + gint box_width; + gint i; priv = wp->priv; @@ -343,8 +343,8 @@ configure_items (WeekdayPicker *wp) box_width = (width - 1) / 7; for (i = 0; i < 7; i++) { - char *c; - int day; + gchar *c; + gint day; day = i + priv->week_start_day; if (day >= 7) @@ -422,8 +422,8 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style) { WeekdayPicker *wp; WeekdayPickerPrivate *priv; - int max_width; - int i; + gint max_width; + gint i; PangoFontDescription *font_desc; PangoContext *pango_context; PangoFontMetrics *font_metrics; @@ -445,8 +445,8 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style) max_width = 0; for (i = 0; i < 7; i++) { - char *c; - int w; + gchar *c; + gint w; c = get_day_text (i); pango_layout_set_text (layout, c, strlen (c)); @@ -580,7 +580,7 @@ weekday_picker_get_blocked_days (WeekdayPicker *wp) * Sets the day that defines the start of the week for a weekday picker. **/ void -weekday_picker_set_week_start_day (WeekdayPicker *wp, int week_start_day) +weekday_picker_set_week_start_day (WeekdayPicker *wp, gint week_start_day) { WeekdayPickerPrivate *priv; @@ -603,7 +603,7 @@ weekday_picker_set_week_start_day (WeekdayPicker *wp, int week_start_day) * Return value: Index of the day that defines the start of the week. See * weekday_picker_set_week_start_day() to see how this is represented. **/ -int +gint weekday_picker_get_week_start_day (WeekdayPicker *wp) { WeekdayPickerPrivate *priv; |