[gtk+/quartz-integration: 475/563] Drop use of gail_return_if_fail



commit 37782f17a1c659b25620fdd70fe75b45c0a23593
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 28 22:48:37 2011 -0400

    Drop use of gail_return_if_fail

 gtk/a11y/gailmenuitem.c |    1 -
 gtk/a11y/gailwindow.c   |   55 ++++------------------------------------------
 2 files changed, 5 insertions(+), 51 deletions(-)
---
diff --git a/gtk/a11y/gailmenuitem.c b/gtk/a11y/gailmenuitem.c
index 73889c7..04e1c64 100644
--- a/gtk/a11y/gailmenuitem.c
+++ b/gtk/a11y/gailmenuitem.c
@@ -22,7 +22,6 @@
 #include <gdk/gdkkeysyms.h>
 #include "gailmenuitem.h"
 #include "gailsubmenuitem.h"
-#include <libgail-util/gailmisc.h>
 
 #define KEYBINDING_SEPARATOR ";"
 
diff --git a/gtk/a11y/gailwindow.c b/gtk/a11y/gailwindow.c
index 6cf1066..80d2732 100644
--- a/gtk/a11y/gailwindow.c
+++ b/gtk/a11y/gailwindow.c
@@ -25,7 +25,6 @@
 
 #include "gailwindow.h"
 #include "gailtoplevel.h"
-#include "gail-private-macros.h"
 
 enum {
   ACTIVATE,
@@ -191,9 +190,8 @@ gail_window_real_initialize (AtkObject *obj,
   /*
    * A GailWindow can be created for a GtkHandleBox or a GtkWindow
    */
-  if (!GTK_IS_WINDOW (widget) &&
-      !GTK_IS_HANDLE_BOX (widget))
-    gail_return_if_fail (FALSE);
+  if (!GTK_IS_WINDOW (widget) && !GTK_IS_HANDLE_BOX (widget))
+    return;
 
   ATK_OBJECT_CLASS (gail_window_parent_class)->initialize (obj, data);
 
@@ -277,13 +275,8 @@ gail_window_get_name (AtkObject *accessible)
       GtkWidget* widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
       if (widget == NULL)
-        /*
-         * State is defunct
-         */
         return NULL;
 
-      gail_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
-
       if (GTK_IS_WINDOW (widget))
         {
           GtkWindow *window = GTK_WINDOW (widget);
@@ -345,13 +338,8 @@ gail_window_get_index_in_parent (AtkObject *accessible)
   gint index = -1;
 
   if (widget == NULL)
-    /*
-     * State is defunct
-     */
     return -1;
 
-  gail_return_val_if_fail (GTK_IS_WIDGET (widget), -1);
-
   index = ATK_OBJECT_CLASS (gail_window_parent_class)->get_index_in_parent (accessible);
   if (index != -1)
     return index;
@@ -399,13 +387,8 @@ gail_window_ref_relation_set (AtkObject *obj)
   AtkRelation* relation;
   GtkWidget *current_widget;
 
-  gail_return_val_if_fail (GAIL_IS_WIDGET (obj), NULL);
-
   widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
-    /*
-     * State is defunct
-     */
     return NULL;
 
   relation_set = ATK_OBJECT_CLASS (gail_window_parent_class)->ref_relation_set (obj);
@@ -558,13 +541,8 @@ gail_window_get_extents (AtkComponent  *component,
   gint x_toplevel, y_toplevel;
 
   if (widget == NULL)
-    /*
-     * State is defunct
-     */
     return;
 
-  gail_return_if_fail (GTK_IS_WINDOW (widget));
-
   if (!gtk_widget_is_toplevel (widget))
     {
       AtkComponentIface *parent_iface;
@@ -605,13 +583,8 @@ gail_window_get_size (AtkComponent *component,
   GdkRectangle rect;
 
   if (widget == NULL)
-    /*
-     * State is defunct
-     */
     return;
 
-  gail_return_if_fail (GTK_IS_WINDOW (widget));
-
   if (!gtk_widget_is_toplevel (widget))
     {
       AtkComponentIface *parent_iface;
@@ -934,9 +907,7 @@ init_gail_screen (GdkScreen *screen,
 static GailScreenInfo *
 get_screen_info (GdkScreen *screen)
 {
-  int screen_n;
-
-  gail_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
+  gint screen_n;
 
   screen_n = gdk_screen_get_number (screen);
 
@@ -964,11 +935,10 @@ get_window_zorder (GdkWindow *window)
   int             zorder;
   int             w_desktop;
 
-  gail_return_val_if_fail (GDK_IS_WINDOW (window), -1);
-
   info = get_screen_info (gdk_window_get_screen (window));
 
-  gail_return_val_if_fail (info->stacked_windows != NULL, -1);
+  if (info->stacked_windows == NULL)
+    return -1;
 
   xid = GDK_WINDOW_XID (window);
 
@@ -1007,13 +977,8 @@ gail_window_get_mdi_zorder (AtkComponent *component)
   GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
-    /*
-     * State is defunct
-     */
     return -1;
 
-  gail_return_val_if_fail (GTK_IS_WINDOW (widget), -1);
-
   return get_window_zorder (gtk_widget_get_window (widget));
 }
 
@@ -1025,13 +990,8 @@ gail_window_get_mdi_zorder (AtkComponent *component)
   GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
-    /*
-     * State is defunct
-     */
     return -1;
 
-  gail_return_val_if_fail (GTK_IS_WINDOW (widget), -1);
-
   return 0;			/* Punt, FIXME */
 }
 
@@ -1043,13 +1003,8 @@ gail_window_get_mdi_zorder (AtkComponent *component)
   GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
-    /*
-     * State is defunct
-     */
     return -1;
 
-  gail_return_val_if_fail (GTK_IS_WINDOW (widget), -1);
-
   return 0;			/* Punt, FIXME */
 }
 



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