summaryrefslogtreecommitdiff
path: root/gtk/gtkhandlebox.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-01-30 22:29:03 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-01-30 22:29:03 +0000
commit4dddfb2dc62a68196f0f3e52712a25c427275b37 (patch)
tree63c2d56da9bbafaf5d90b9a87d22ef483a7ad40f /gtk/gtkhandlebox.c
parent95ab2a72b4ba0a84b9c430d941f778367e02584b (diff)
downloadgtk+-4dddfb2dc62a68196f0f3e52712a25c427275b37.tar.gz
Remove excess calls to g_return_if_fail from static and virtual functions.
Diffstat (limited to 'gtk/gtkhandlebox.c')
-rw-r--r--gtk/gtkhandlebox.c55
1 files changed, 6 insertions, 49 deletions
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index d4d0125654..729c9aafd0 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -328,11 +328,7 @@ gtk_handle_box_new (void)
static void
gtk_handle_box_destroy (GtkObject *object)
{
- GtkHandleBox *hb;
-
- g_return_if_fail (GTK_IS_HANDLE_BOX (object));
-
- hb = GTK_HANDLE_BOX (object);
+ GtkHandleBox *hb = GTK_HANDLE_BOX (object);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
@@ -344,8 +340,6 @@ gtk_handle_box_map (GtkWidget *widget)
GtkBin *bin;
GtkHandleBox *hb;
- g_return_if_fail (GTK_IS_HANDLE_BOX (widget));
-
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
bin = GTK_BIN (widget);
@@ -371,8 +365,6 @@ gtk_handle_box_unmap (GtkWidget *widget)
{
GtkHandleBox *hb;
- g_return_if_fail (GTK_IS_HANDLE_BOX (widget));
-
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
hb = GTK_HANDLE_BOX (widget);
@@ -392,8 +384,6 @@ gtk_handle_box_realize (GtkWidget *widget)
gint attributes_mask;
GtkHandleBox *hb;
- g_return_if_fail (GTK_IS_HANDLE_BOX (widget));
-
hb = GTK_HANDLE_BOX (widget);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
@@ -459,11 +449,7 @@ gtk_handle_box_realize (GtkWidget *widget)
static void
gtk_handle_box_unrealize (GtkWidget *widget)
{
- GtkHandleBox *hb;
-
- g_return_if_fail (GTK_IS_HANDLE_BOX (widget));
-
- hb = GTK_HANDLE_BOX (widget);
+ GtkHandleBox *hb = GTK_HANDLE_BOX (widget);
gdk_window_set_user_data (hb->bin_window, NULL);
gdk_window_destroy (hb->bin_window);
@@ -480,11 +466,7 @@ static void
gtk_handle_box_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
- GtkHandleBox *hb;
-
- g_return_if_fail (GTK_IS_HANDLE_BOX (widget));
-
- hb = GTK_HANDLE_BOX (widget);
+ GtkHandleBox *hb = GTK_HANDLE_BOX (widget);
if (GTK_WIDGET_REALIZED (widget) &&
!GTK_WIDGET_NO_WINDOW (widget))
@@ -504,9 +486,6 @@ gtk_handle_box_size_request (GtkWidget *widget,
GtkHandleBox *hb;
GtkRequisition child_requisition;
- g_return_if_fail (GTK_IS_HANDLE_BOX (widget));
- g_return_if_fail (requisition != NULL);
-
bin = GTK_BIN (widget);
hb = GTK_HANDLE_BOX (widget);
@@ -579,9 +558,6 @@ gtk_handle_box_size_allocate (GtkWidget *widget,
GtkHandleBox *hb;
GtkRequisition child_requisition;
- g_return_if_fail (GTK_IS_HANDLE_BOX (widget));
- g_return_if_fail (allocation != NULL);
-
bin = GTK_BIN (widget);
hb = GTK_HANDLE_BOX (widget);
@@ -770,6 +746,8 @@ void
gtk_handle_box_set_handle_position (GtkHandleBox *handle_box,
GtkPositionType position)
{
+ g_return_if_fail (GTK_IS_HANDLE_BOX (handle_box));
+
if ((GtkPositionType) handle_box->handle_position != position)
{
handle_box->handle_position = position;
@@ -919,9 +897,6 @@ gtk_handle_box_expose (GtkWidget *widget,
{
GtkHandleBox *hb;
- g_return_val_if_fail (GTK_IS_HANDLE_BOX (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
if (GTK_WIDGET_DRAWABLE (widget))
{
hb = GTK_HANDLE_BOX (widget);
@@ -946,9 +921,6 @@ gtk_handle_box_button_changed (GtkWidget *widget,
gboolean event_handled;
GdkCursor *fleur;
- g_return_val_if_fail (GTK_IS_HANDLE_BOX (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
hb = GTK_HANDLE_BOX (widget);
event_handled = FALSE;
@@ -1064,9 +1036,6 @@ gtk_handle_box_motion (GtkWidget *widget,
gint snap_edge;
gboolean is_snapped = FALSE;
- g_return_val_if_fail (GTK_IS_HANDLE_BOX (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
hb = GTK_HANDLE_BOX (widget);
if (!hb->in_drag)
return FALSE;
@@ -1242,10 +1211,6 @@ static void
gtk_handle_box_add (GtkContainer *container,
GtkWidget *widget)
{
- g_return_if_fail (GTK_IS_HANDLE_BOX (container));
- g_return_if_fail (GTK_BIN (container)->child == NULL);
- g_return_if_fail (widget->parent == NULL);
-
gtk_widget_set_parent_window (widget, GTK_HANDLE_BOX (container)->bin_window);
GTK_CONTAINER_CLASS (parent_class)->add (container, widget);
}
@@ -1254,9 +1219,6 @@ static void
gtk_handle_box_remove (GtkContainer *container,
GtkWidget *widget)
{
- g_return_if_fail (GTK_IS_HANDLE_BOX (container));
- g_return_if_fail (GTK_BIN (container)->child == widget);
-
GTK_CONTAINER_CLASS (parent_class)->remove (container, widget);
gtk_handle_box_reattach (GTK_HANDLE_BOX (container));
@@ -1266,12 +1228,7 @@ static gint
gtk_handle_box_delete_event (GtkWidget *widget,
GdkEventAny *event)
{
- GtkHandleBox *hb;
-
- g_return_val_if_fail (GTK_IS_HANDLE_BOX (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- hb = GTK_HANDLE_BOX (widget);
+ GtkHandleBox *hb = GTK_HANDLE_BOX (widget);
if (event->window == hb->float_window)
{