summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
diff options
context:
space:
mode:
authorMathias Hasselmann <hasselmm@src.gnome.org>2007-12-19 22:57:01 +0000
committerMathias Hasselmann <hasselmm@src.gnome.org>2007-12-19 22:57:01 +0000
commit2967c27e6a69ed747ddad5533b7cd19f330320aa (patch)
treeeeba284070efa7048649eddb76912539446386a7 /gtk/gtkcalendar.c
parent8c3c173239333521143bf7197acc2ac764bdb274 (diff)
downloadgtk+-2967c27e6a69ed747ddad5533b7cd19f330320aa.tar.gz
Avoid some compiler warnings and remove obsolete code. (#339540)
* gtk/gtkcalendar.c: Change week and year variable in calendar_paint_week_numbers from gint to guint. Remove obsolete "#if 0" block from calendar_paint_day: The feature in question is handled few lines above. Cast data returned by gtk_selection_data_get_text() to (gchar*) in gtk_calendar_drag_data_received. svn path=/trunk/; revision=19201
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r--gtk/gtkcalendar.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 61a832ac3f..e5b11ae6df 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2008,10 +2008,11 @@ calendar_paint_week_numbers (GtkCalendar *calendar)
GtkWidget *widget = GTK_WIDGET (calendar);
GtkCalendarPrivate *priv = GTK_CALENDAR_GET_PRIVATE (calendar);
cairo_t *cr;
- gint row, week = 0, year;
- gint x_loc;
+
+ guint week = 0, year;
+ gint row, x_loc, y_loc;
+ gint day_height;
char buffer[32];
- gint y_loc, day_height;
PangoLayout *layout;
PangoRectangle logical_rect;
gint focus_padding;
@@ -2233,10 +2234,6 @@ calendar_paint_day (GtkCalendar *calendar,
gtk_paint_focus (widget->style,
priv->main_win,
state,
-#if 0
- (calendar->selected_day == day)
- ? GTK_STATE_SELECTED : GTK_STATE_NORMAL,
-#endif
NULL, widget, "calendar-day",
day_rect.x, day_rect.y,
day_rect.width, day_rect.height);
@@ -3075,7 +3072,8 @@ gtk_calendar_drag_data_received (GtkWidget *widget,
* supposed to call drag_status, not actually paste in the
* data.
*/
- str = gtk_selection_data_get_text (selection_data);
+ str = (gchar*) gtk_selection_data_get_text (selection_data);
+
if (str)
{
date = g_date_new ();
@@ -3094,7 +3092,7 @@ gtk_calendar_drag_data_received (GtkWidget *widget,
}
date = g_date_new ();
- str = gtk_selection_data_get_text (selection_data);
+ str = (gchar*) gtk_selection_data_get_text (selection_data);
if (str)
{
g_date_set_parse (date, str);