[gtk+/gtk-2-22] Revert commit a9b778931c6ba0d1bb37eb29b5ec13dc76339820



commit f23c956473bb8cbb44ece39a4df1046a56708a1c
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 29 21:07:54 2010 -0400

    Revert commit a9b778931c6ba0d1bb37eb29b5ec13dc76339820
    
    The change turned out to break the pygtk build. So add the
    pointless return values back, and document them as going
    away in the future.

 gtk/gtkcalendar.c |   38 +++++++++++++++++++++++++++++++-------
 gtk/gtkcalendar.h |    6 +++---
 2 files changed, 34 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 668ebae..c087f61 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -3678,14 +3678,20 @@ gtk_calendar_set_display_options (GtkCalendar	       *calendar,
  * @year: the year the month is in.
  *
  * Shifts the calendar to a different month.
+ *
+ * Note that this function always returns %TRUE, and you should
+ * ignore the return value. In GTK+ 3, this function will not
+ * return a value.
+ *
+ * Returns: %TRUE, always
  **/
-void
+gboolean
 gtk_calendar_select_month (GtkCalendar *calendar,
 			   guint	month,
 			   guint	year)
 {
-  g_return_if_fail (GTK_IS_CALENDAR (calendar));
-  g_return_if_fail (month <= 11);
+  g_return_val_if_fail (GTK_IS_CALENDAR (calendar), FALSE);
+  g_return_val_if_fail (month <= 11, FALSE);
 
   calendar->month = month;
   calendar->year  = year;
@@ -3701,6 +3707,8 @@ gtk_calendar_select_month (GtkCalendar *calendar,
   g_signal_emit (calendar,
 		 gtk_calendar_signals[MONTH_CHANGED_SIGNAL],
 		 0);
+
+  return TRUE;
 }
 
 /**
@@ -3773,12 +3781,18 @@ gtk_calendar_clear_marks (GtkCalendar *calendar)
  * @day: the day number to mark between 1 and 31.
  *
  * Places a visual marker on a particular day.
+ *
+ * Note that this function always returns %TRUE, and you should
+ * ignore the return value. In GTK+ 3, this function will not
+ * return a value.
+ *
+ * Returns: %TRUE, always
  */
-void
+gboolean
 gtk_calendar_mark_day (GtkCalendar *calendar,
 		       guint	    day)
 {
-  g_return_if_fail (GTK_IS_CALENDAR (calendar));
+  g_return_val_if_fail (GTK_IS_CALENDAR (calendar), FALSE);
 
   if (day >= 1 && day <= 31 && !calendar->marked_date[day-1])
     {
@@ -3786,6 +3800,8 @@ gtk_calendar_mark_day (GtkCalendar *calendar,
       calendar->num_marked_dates++;
       calendar_invalidate_day_num (calendar, day);
     }
+
+  return TRUE;
 }
 
 /**
@@ -3794,12 +3810,18 @@ gtk_calendar_mark_day (GtkCalendar *calendar,
  * @day: the day number to unmark between 1 and 31.
  *
  * Removes the visual marker from a particular day.
+ *
+ * Note that this function always returns %TRUE, and you should
+ * ignore the return value. In GTK+ 3, this function will not
+ * return a value.
+ *
+ * Returns: %TRUE, always
  */
-void
+gboolean
 gtk_calendar_unmark_day (GtkCalendar *calendar,
 			 guint	      day)
 {
-  g_return_if_fail (GTK_IS_CALENDAR (calendar));
+  g_return_val_if_fail (GTK_IS_CALENDAR (calendar), FALSE);
 
   if (day >= 1 && day <= 31 && calendar->marked_date[day-1])
     {
@@ -3807,6 +3829,8 @@ gtk_calendar_unmark_day (GtkCalendar *calendar,
       calendar->num_marked_dates--;
       calendar_invalidate_day_num (calendar, day);
     }
+
+  return TRUE;
 }
 
 /**
diff --git a/gtk/gtkcalendar.h b/gtk/gtkcalendar.h
index 73092d1..631f13d 100644
--- a/gtk/gtkcalendar.h
+++ b/gtk/gtkcalendar.h
@@ -159,15 +159,15 @@ struct _GtkCalendarClass
 GType	   gtk_calendar_get_type	(void) G_GNUC_CONST;
 GtkWidget* gtk_calendar_new		(void);
 
-void       gtk_calendar_select_month	(GtkCalendar *calendar,
+gboolean   gtk_calendar_select_month	(GtkCalendar *calendar,
 					 guint	      month,
 					 guint	      year);
 void	   gtk_calendar_select_day	(GtkCalendar *calendar,
 					 guint	      day);
 
-void       gtk_calendar_mark_day	(GtkCalendar *calendar,
+gboolean   gtk_calendar_mark_day	(GtkCalendar *calendar,
 					 guint	      day);
-void       gtk_calendar_unmark_day	(GtkCalendar *calendar,
+gboolean   gtk_calendar_unmark_day	(GtkCalendar *calendar,
 					 guint	      day);
 void	   gtk_calendar_clear_marks	(GtkCalendar *calendar);
 



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