Commit 4e2b60ac authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Patch from Matthias Clasen to remove remove all instances of

Wed Jul 18 19:28:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/*.c: Patch from Matthias Clasen to remove remove
	all instances of g_return_if_fail (foo != NULL); that are
	immediately before a g_return_if_fail (GTK_IS_FOO (foo));
	since the second check catches the NULL anyways.
parent b613a74c
Wed Jul 18 19:28:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Matthias Clasen to remove remove
all instances of g_return_if_fail (foo != NULL); that are
immediately before a g_return_if_fail (GTK_IS_FOO (foo));
since the second check catches the NULL anyways.
Wed Jul 18 18:23:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtktextview.c
......
Wed Jul 18 19:28:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Matthias Clasen to remove remove
all instances of g_return_if_fail (foo != NULL); that are
immediately before a g_return_if_fail (GTK_IS_FOO (foo));
since the second check catches the NULL anyways.
Wed Jul 18 18:23:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtktextview.c
......
Wed Jul 18 19:28:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Matthias Clasen to remove remove
all instances of g_return_if_fail (foo != NULL); that are
immediately before a g_return_if_fail (GTK_IS_FOO (foo));
since the second check catches the NULL anyways.
Wed Jul 18 18:23:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtktextview.c
......
Wed Jul 18 19:28:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Matthias Clasen to remove remove
all instances of g_return_if_fail (foo != NULL); that are
immediately before a g_return_if_fail (GTK_IS_FOO (foo));
since the second check catches the NULL anyways.
Wed Jul 18 18:23:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtktextview.c
......
Wed Jul 18 19:28:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Matthias Clasen to remove remove
all instances of g_return_if_fail (foo != NULL); that are
immediately before a g_return_if_fail (GTK_IS_FOO (foo));
since the second check catches the NULL anyways.
Wed Jul 18 18:23:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtktextview.c
......
Wed Jul 18 19:28:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Matthias Clasen to remove remove
all instances of g_return_if_fail (foo != NULL); that are
immediately before a g_return_if_fail (GTK_IS_FOO (foo));
since the second check catches the NULL anyways.
Wed Jul 18 18:23:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtktextview.c
......
Wed Jul 18 19:28:46 2001 Owen Taylor <otaylor@redhat.com>
* gtk/*.c: Patch from Matthias Clasen to remove remove
all instances of g_return_if_fail (foo != NULL); that are
immediately before a g_return_if_fail (GTK_IS_FOO (foo));
since the second check catches the NULL anyways.
Wed Jul 18 18:23:05 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtktextview.c
......
......@@ -183,7 +183,6 @@ gtk_accel_group_attach (GtkAccelGroup *accel_group,
GSList *slist;
g_return_if_fail (accel_group != NULL);
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
g_return_if_fail (g_slist_find (accel_group->attach_objects, object) == NULL);
......@@ -206,7 +205,6 @@ gtk_accel_group_detach (GtkAccelGroup *accel_group,
GSList *slist;
g_return_if_fail (accel_group != NULL);
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
g_return_if_fail (g_slist_find (accel_group->attach_objects, object) != NULL);
......@@ -276,7 +274,6 @@ gtk_accel_groups_activate (GtkObject *object,
guint accel_key,
GdkModifierType accel_mods)
{
g_return_val_if_fail (object != NULL, FALSE);
g_return_val_if_fail (GTK_IS_OBJECT (object), FALSE);
if (gtk_accelerator_valid (accel_key, accel_mods))
......@@ -349,7 +346,6 @@ gtk_accel_group_add (GtkAccelGroup *accel_group,
GtkAccelEntry *entry;
g_return_if_fail (accel_group != NULL);
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
g_return_if_fail (accel_signal != NULL);
......@@ -511,7 +507,6 @@ gtk_accel_group_handle_add (GtkObject *object,
{
GtkAccelEntry *entry;
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
g_return_if_fail (accel_group != NULL);
g_return_if_fail (accel_signal_id > 0);
......@@ -557,7 +552,6 @@ gtk_accel_group_remove (GtkAccelGroup *accel_group,
guint remove_accelerator_signal_id = 0;
g_return_if_fail (accel_group != NULL);
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
/* check for required signals in the objects branch
......@@ -612,7 +606,6 @@ gtk_accel_group_handle_remove (GtkObject *object,
{
GtkAccelEntry *entry;
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_OBJECT (object));
g_return_if_fail (accel_group != NULL);
......@@ -688,7 +681,6 @@ gtk_accel_group_create_remove (GtkType class_type,
GSList*
gtk_accel_groups_from_object (GtkObject *object)
{
g_return_val_if_fail (object != NULL, NULL);
g_return_val_if_fail (GTK_IS_OBJECT (object), NULL);
return gtk_object_get_data_by_id (object, accel_groups_key_id);
......@@ -697,7 +689,6 @@ gtk_accel_groups_from_object (GtkObject *object)
GSList*
gtk_accel_group_entries_from_object (GtkObject *object)
{
g_return_val_if_fail (object != NULL, NULL);
g_return_val_if_fail (GTK_IS_OBJECT (object), NULL);
return gtk_object_get_data_by_id (object, accel_entries_key_id);
......
......@@ -202,7 +202,6 @@ gtk_accel_label_destroy (GtkObject *object)
{
GtkAccelLabel *accel_label;
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_ACCEL_LABEL (object));
accel_label = GTK_ACCEL_LABEL (object);
......@@ -247,7 +246,6 @@ gtk_accel_label_get_accel_widget (GtkAccelLabel *accel_label)
guint
gtk_accel_label_get_accel_width (GtkAccelLabel *accel_label)
{
g_return_val_if_fail (accel_label != NULL, 0);
g_return_val_if_fail (GTK_IS_ACCEL_LABEL (accel_label), 0);
return (accel_label->accel_string_width +
......@@ -262,7 +260,6 @@ gtk_accel_label_size_request (GtkWidget *widget,
PangoLayout *layout;
gint width;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_ACCEL_LABEL (widget));
g_return_if_fail (requisition != NULL);
......@@ -286,7 +283,6 @@ gtk_accel_label_expose_event (GtkWidget *widget,
GtkAccelLabel *accel_label;
PangoLayout *layout;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_ACCEL_LABEL (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
......@@ -343,7 +339,6 @@ gtk_accel_label_expose_event (GtkWidget *widget,
static void
gtk_accel_label_queue_refetch (GtkAccelLabel *accel_label)
{
g_return_if_fail (accel_label != NULL);
g_return_if_fail (GTK_IS_ACCEL_LABEL (accel_label));
if (accel_label->queue_id == 0)
......@@ -356,7 +351,6 @@ void
gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label,
GtkWidget *accel_widget)
{
g_return_if_fail (accel_label != NULL);
g_return_if_fail (GTK_IS_ACCEL_LABEL (accel_label));
if (accel_widget != NULL)
g_return_if_fail (GTK_IS_WIDGET (accel_widget));
......@@ -409,7 +403,6 @@ gtk_accel_label_refetch (GtkAccelLabel *accel_label)
{
GtkAccelLabelClass *class;
g_return_val_if_fail (accel_label != NULL, FALSE);
g_return_val_if_fail (GTK_IS_ACCEL_LABEL (accel_label), FALSE);
class = GTK_ACCEL_LABEL_GET_CLASS (accel_label);
......
......@@ -71,7 +71,6 @@ gtk_accessible_connect_widget_destroyed (GtkAccessible *accessible)
{
GtkAccessibleClass *class;
g_return_if_fail (accessible != NULL);
g_return_if_fail (GTK_IS_ACCESSIBLE (accessible));
class = GTK_ACCESSIBLE_GET_CLASS (accessible);
......
......@@ -147,7 +147,6 @@ void
gtk_adjustment_set_value (GtkAdjustment *adjustment,
gdouble value)
{
g_return_if_fail (adjustment != NULL);
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
value = CLAMP (value, adjustment->lower, adjustment->upper);
......@@ -163,7 +162,6 @@ gtk_adjustment_set_value (GtkAdjustment *adjustment,
void
gtk_adjustment_changed (GtkAdjustment *adjustment)
{
g_return_if_fail (adjustment != NULL);
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
gtk_signal_emit (GTK_OBJECT (adjustment), adjustment_signals[CHANGED]);
......@@ -172,7 +170,6 @@ gtk_adjustment_changed (GtkAdjustment *adjustment)
void
gtk_adjustment_value_changed (GtkAdjustment *adjustment)
{
g_return_if_fail (adjustment != NULL);
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
gtk_signal_emit (GTK_OBJECT (adjustment), adjustment_signals[VALUE_CHANGED]);
......@@ -185,7 +182,6 @@ gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
{
gboolean need_emission;
g_return_if_fail (adjustment != NULL);
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
lower = CLAMP (lower, adjustment->lower, adjustment->upper);
......
......@@ -249,7 +249,6 @@ gtk_alignment_set (GtkAlignment *alignment,
{
gboolean values_changed = FALSE;
g_return_if_fail (alignment != NULL);
g_return_if_fail (GTK_IS_ALIGNMENT (alignment));
xalign = CLAMP (xalign, 0.0, 1.0);
......@@ -297,7 +296,6 @@ gtk_alignment_size_request (GtkWidget *widget,
GtkAlignment *alignment;
GtkBin *bin;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_ALIGNMENT (widget));
g_return_if_fail (requisition != NULL);
......@@ -329,7 +327,6 @@ gtk_alignment_size_allocate (GtkWidget *widget,
gint width, height;
gint x, y;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_ALIGNMENT (widget));
g_return_if_fail (allocation != NULL);
......
......@@ -196,7 +196,6 @@ gtk_arrow_set (GtkArrow *arrow,
{
gboolean changed = FALSE;
g_return_if_fail (arrow != NULL);
g_return_if_fail (GTK_IS_ARROW (arrow));
if ((GtkArrowType) arrow->arrow_type != arrow_type)
......
......@@ -243,7 +243,6 @@ gtk_aspect_frame_set (GtkAspectFrame *aspect_frame,
{
gboolean needs_resize = FALSE;
g_return_if_fail (aspect_frame != NULL);
g_return_if_fail (GTK_IS_ASPECT_FRAME (aspect_frame));
xalign = CLAMP (xalign, 0.0, 1.0);
......
......@@ -395,7 +395,6 @@ _gtk_button_box_child_requisition (GtkWidget *widget,
gint ipad_x;
gint ipad_y;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_BUTTON_BOX (widget));
bbox = GTK_BUTTON_BOX (widget);
......
......@@ -115,7 +115,6 @@ gtk_bin_map (GtkWidget *widget)
{
GtkBin *bin;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_BIN (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
......@@ -135,7 +134,6 @@ gtk_bin_unmap (GtkWidget *widget)
{
GtkBin *bin;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_BIN (widget));
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
......@@ -154,9 +152,7 @@ gtk_bin_add (GtkContainer *container,
{
GtkBin *bin;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_BIN (container));
g_return_if_fail (child != NULL);
g_return_if_fail (GTK_IS_WIDGET (child));
bin = GTK_BIN (container);
......@@ -195,9 +191,7 @@ gtk_bin_remove (GtkContainer *container,
GtkBin *bin;
gboolean widget_was_visible;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_BIN (container));
g_return_if_fail (child != NULL);
g_return_if_fail (GTK_IS_WIDGET (child));
bin = GTK_BIN (container);
......@@ -223,7 +217,6 @@ gtk_bin_forall (GtkContainer *container,
{
GtkBin *bin;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_BIN (container));
g_return_if_fail (callback != NULL);
......
......@@ -360,7 +360,6 @@ gtk_box_pack_start (GtkBox *box,
{
GtkBoxChild *child_info;
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
g_return_if_fail (child->parent == NULL);
......@@ -406,7 +405,6 @@ gtk_box_pack_end (GtkBox *box,
{
GtkBoxChild *child_info;
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
g_return_if_fail (child->parent == NULL);
......@@ -447,7 +445,6 @@ void
gtk_box_pack_start_defaults (GtkBox *box,
GtkWidget *child)
{
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
......@@ -458,7 +455,6 @@ void
gtk_box_pack_end_defaults (GtkBox *box,
GtkWidget *child)
{
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
......@@ -469,7 +465,6 @@ void
gtk_box_set_homogeneous (GtkBox *box,
gboolean homogeneous)
{
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
if ((homogeneous ? TRUE : FALSE) != box->homogeneous)
......@@ -501,7 +496,6 @@ void
gtk_box_set_spacing (GtkBox *box,
gint spacing)
{
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
if (spacing != box->spacing)
......@@ -535,7 +529,6 @@ gtk_box_reorder_child (GtkBox *box,
{
GList *list;
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
......@@ -603,7 +596,6 @@ gtk_box_query_child_packing (GtkBox *box,
GList *list;
GtkBoxChild *child_info = NULL;
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
......@@ -641,7 +633,6 @@ gtk_box_set_child_packing (GtkBox *box,
GList *list;
GtkBoxChild *child_info = NULL;
g_return_if_fail (box != NULL);
g_return_if_fail (GTK_IS_BOX (box));
g_return_if_fail (child != NULL);
......@@ -683,7 +674,6 @@ gtk_box_map (GtkWidget *widget)
GtkBoxChild *child;
GList *children;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_BOX (widget));
box = GTK_BOX (widget);
......@@ -708,7 +698,6 @@ gtk_box_unmap (GtkWidget *widget)
GtkBoxChild *child;
GList *children;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_BOX (widget));
box = GTK_BOX (widget);
......@@ -730,7 +719,6 @@ static void
gtk_box_add (GtkContainer *container,
GtkWidget *widget)
{
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_BOX (container));
g_return_if_fail (widget != NULL);
......@@ -745,7 +733,6 @@ gtk_box_remove (GtkContainer *container,
GtkBoxChild *child;
GList *children;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_BOX (container));
g_return_if_fail (widget != NULL);
......@@ -790,7 +777,6 @@ gtk_box_forall (GtkContainer *container,
GtkBoxChild *child;
GList *children;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_BOX (container));
g_return_if_fail (callback != NULL);
......
......@@ -431,7 +431,6 @@ gtk_button_new_with_mnemonic (const gchar *label)
void
gtk_button_pressed (GtkButton *button)
{
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[PRESSED]);
......@@ -440,7 +439,6 @@ gtk_button_pressed (GtkButton *button)
void
gtk_button_released (GtkButton *button)
{
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[RELEASED]);
......@@ -449,7 +447,6 @@ gtk_button_released (GtkButton *button)
void
gtk_button_clicked (GtkButton *button)
{
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[CLICKED]);
......@@ -458,7 +455,6 @@ gtk_button_clicked (GtkButton *button)
void
gtk_button_enter (GtkButton *button)
{
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[ENTER]);
......@@ -467,7 +463,6 @@ gtk_button_enter (GtkButton *button)
void
gtk_button_leave (GtkButton *button)
{
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[LEAVE]);
......@@ -477,7 +472,6 @@ void
gtk_button_set_relief (GtkButton *button,
GtkReliefStyle newrelief)
{
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
button->relief = newrelief;
......@@ -502,7 +496,6 @@ gtk_button_realize (GtkWidget *widget)
gint attributes_mask;
gint border_width;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_BUTTON (widget));
button = GTK_BUTTON (widget);
......@@ -946,7 +939,6 @@ gtk_real_button_pressed (GtkButton *button)
{
GtkStateType new_state;
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
if (button->activate_timeout)
......@@ -968,7 +960,6 @@ gtk_real_button_released (GtkButton *button)
{
GtkStateType new_state;
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
if (button->button_down)
......@@ -999,7 +990,6 @@ gtk_real_button_enter (GtkButton *button)
{
GtkStateType new_state;
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
new_state = (button->button_down ? GTK_STATE_ACTIVE : GTK_STATE_PRELIGHT);
......@@ -1017,7 +1007,6 @@ gtk_real_button_enter (GtkButton *button)
static void
gtk_real_button_leave (GtkButton *button)
{
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
if (button->activate_timeout)
......@@ -1047,7 +1036,6 @@ gtk_real_button_activate (GtkButton *button)
{
GtkWidget *widget = GTK_WIDGET (button);
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
if (GTK_WIDGET_REALIZED (button) && !button->activate_timeout)
......
......@@ -675,7 +675,6 @@ gtk_calendar_set_month_next (GtkCalendar *calendar)
{
gint month_len;
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_WIDGET (calendar));
if (calendar->display_flags & GTK_CALENDAR_NO_MONTH_CHANGE)
......@@ -716,7 +715,6 @@ gtk_calendar_set_year_prev (GtkCalendar *calendar)
{
gint month_len;
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_WIDGET (calendar));
calendar->year--;
......@@ -747,7 +745,6 @@ gtk_calendar_set_year_next (GtkCalendar *calendar)
gint month_len;
GtkWidget *widget;
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_WIDGET (calendar));
widget = GTK_WIDGET (calendar);
......@@ -831,7 +828,6 @@ gtk_calendar_realize_arrows (GtkWidget *widget)
gint attributes_mask;
gint i;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -898,7 +894,6 @@ gtk_calendar_realize_header (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -941,7 +936,6 @@ gtk_calendar_realize_day_names (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -985,7 +979,6 @@ gtk_calendar_realize_week_numbers (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -1028,7 +1021,6 @@ gtk_calendar_realize (GtkWidget *widget)
gint attributes_mask;
GdkGCValues values;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -1103,7 +1095,6 @@ gtk_calendar_unrealize (GtkWidget *widget)
GtkCalendarPrivateData *private_data;
gint i;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -1328,7 +1319,6 @@ gtk_calendar_size_allocate (GtkWidget *widget,
GtkCalendar *calendar;
GtkCalendarPrivateData *private_data;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
g_return_if_fail (allocation != NULL);
......@@ -1425,7 +1415,6 @@ gtk_calendar_draw_focus (GtkWidget *widget)
gint width, height;
gint x, y;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -1490,9 +1479,8 @@ gtk_calendar_paint (GtkWidget *widget,
GtkCalendar *calendar;
GtkCalendarPrivateData *private_data;
g_return_if_fail (widget != NULL);
g_return_if_fail (widget->window != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
g_return_if_fail (widget->window != NULL);
calendar = GTK_CALENDAR (widget);
private_data = GTK_CALENDAR_PRIVATE_DATA (widget);
......@@ -1608,7 +1596,6 @@ gtk_calendar_paint_day_names (GtkWidget *widget)
PangoRectangle logical_rect;
GtkCalendarPrivateData *private_data;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
private_data = GTK_CALENDAR_PRIVATE_DATA (widget);
......@@ -1698,9 +1685,8 @@ gtk_calendar_paint_week_numbers (GtkWidget *widget)
PangoLayout *layout;
PangoRectangle logical_rect;
g_return_if_fail (widget != NULL);
g_return_if_fail (widget->window != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
g_return_if_fail (widget->window != NULL);
calendar = GTK_CALENDAR (widget);
private_data = GTK_CALENDAR_PRIVATE_DATA (widget);
gc = calendar->gc;
......@@ -1781,7 +1767,6 @@ gtk_calendar_paint_day_num (GtkWidget *widget,
GtkCalendar *calendar;
gint r, c, row, col;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -1822,7 +1807,6 @@ gtk_calendar_paint_day (GtkWidget *widget,
PangoLayout *layout;
PangoRectangle logical_rect;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
g_return_if_fail (row < 6);
g_return_if_fail (col < 7);
......@@ -1925,9 +1909,8 @@ gtk_calendar_paint_main (GtkWidget *widget)
GtkCalendarPrivateData *private_data;
gint row, col;
g_return_if_fail (widget != NULL);
g_return_if_fail (widget->window != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
g_return_if_fail (widget->window != NULL);
calendar = GTK_CALENDAR (widget);
private_data = GTK_CALENDAR_PRIVATE_DATA (widget);
......@@ -1959,7 +1942,6 @@ gtk_calendar_compute_days (GtkCalendar *calendar)
gint col;
gint day;
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_CALENDAR (calendar));
year = calendar->year;
......@@ -2044,7 +2026,6 @@ gtk_calendar_display_options (GtkCalendar *calendar,
GtkWidget *widget;
gint i;
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_CALENDAR (calendar));
widget = GTK_WIDGET (calendar);
......@@ -2187,7 +2168,6 @@ void
gtk_calendar_select_day (GtkCalendar *calendar,
guint day)
{
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_CALENDAR (calendar));
g_return_if_fail (day <= 31);
......@@ -2222,7 +2202,6 @@ gtk_calendar_clear_marks (GtkCalendar *calendar)
{
guint day;
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_CALENDAR (calendar));
for (day = 0; day < 31; day++)
......@@ -2285,7 +2264,6 @@ gtk_calendar_get_date (GtkCalendar *calendar,
guint *month,
guint *day)
{
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_CALENDAR (calendar));
if (year)
......@@ -2519,7 +2497,6 @@ gtk_calendar_paint_arrow (GtkWidget *widget,
void
gtk_calendar_freeze (GtkCalendar *calendar)
{
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_CALENDAR (calendar));
GTK_CALENDAR_PRIVATE_DATA (calendar)->freeze_count++;
......@@ -2530,7 +2507,6 @@ gtk_calendar_thaw (GtkCalendar *calendar)
{
GtkCalendarPrivateData *private_data;
g_return_if_fail (calendar != NULL);
g_return_if_fail (GTK_IS_CALENDAR (calendar));
private_data = GTK_CALENDAR_PRIVATE_DATA (calendar);
......@@ -2563,7 +2539,6 @@ gtk_calendar_set_background (GtkWidget *widget)
GtkCalendarPrivateData *private_data;
gint i;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));
calendar = GTK_CALENDAR (widget);
......@@ -2599,7 +2574,6 @@ static void
gtk_calendar_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_CALENDAR (widget));