summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--gtk/gtkcalendar.c16
2 files changed, 17 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 566a7dd166..7e573a38a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-12-17 Mathias Hasselmann <mathias@openismus.com>
+
+ 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.
+
2007-12-19 17:05:31 Tim Janik <timj@imendio.com>
* modules/other/Makefile.am: include Makefile.decl to unbreak test rules.
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);