[gtk-engines] More dead code removal and GSEAL fixing



commit 330b990e185f06aba2da164aaf856db316ad35fa
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jun 10 22:36:45 2010 +0100

    More dead code removal and GSEAL fixing
    
    Also fix a number of warnings that didn't show up in my
    normal builds.

 engines/clearlooks/src/clearlooks_style.c  |   37 ++++++---------
 engines/clearlooks/src/support.c           |   43 ++++++++++-------
 engines/crux/src/crux-draw.c               |    2 +-
 engines/glide/src/glide_gtk2_drawing.c     |    2 +-
 engines/glide/src/glide_gtk2_support.c     |    4 +-
 engines/hc/src/hc_gtk2_support.c           |    4 +-
 engines/redmond/src/redmond_gtk2_drawing.c |    2 +-
 engines/redmond/src/redmond_gtk2_misc.c    |    4 +-
 engines/support/widget-information.c       |   68 ++++++++++++++--------------
 9 files changed, 83 insertions(+), 83 deletions(-)
---
diff --git a/engines/clearlooks/src/clearlooks_style.c b/engines/clearlooks/src/clearlooks_style.c
index 7c4be09..1f9a26c 100644
--- a/engines/clearlooks/src/clearlooks_style.c
+++ b/engines/clearlooks/src/clearlooks_style.c
@@ -542,19 +542,12 @@ clearlooks_style_draw_box (DRAW_ARGS)
 
 		params.corners = CR_CORNER_NONE;
 
-		if (GE_IS_TREE_VIEW (widget->parent))
+		if (GE_IS_TREE_VIEW (gtk_widget_get_parent (widget)))
 		{
-			clearlooks_treeview_get_header_index (GTK_TREE_VIEW(widget->parent),
+			clearlooks_treeview_get_header_index (GTK_TREE_VIEW(gtk_widget_get_parent (widget)),
 			                                      widget, &column_index, &columns,
 			                                      &resizable);
 		}
-#ifndef GTK_DISABLE_DEPRECATED
-		else if (GE_IS_CLIST (widget->parent))
-		{
-			clearlooks_clist_get_header_index (GTK_CLIST(widget->parent),
-			                                   widget, &column_index, &columns);
-		}
-#endif
 
 		header.resizable = resizable;
 
@@ -925,23 +918,23 @@ clearlooks_style_draw_box (DRAW_ARGS)
 			/* We got an entry, but well, we may not be drawing to
 			 * this particular widget ... it may not even be realized.
 			 * Also, we need to be drawing on a window obviously ... */
-			if (GTK_WIDGET_REALIZED (widget) &&
+			if (gtk_widget_get_realized (widget) &&
 			    GDK_IS_WINDOW (window) &&
-			    gdk_window_is_visible (widget->window))
+			    gdk_window_is_visible (gtk_widget_get_window (widget)))
 			{
 				/* Assumptions done by this code:
 				 *  - GtkEntry has some nested windows.
-				 *  - widget->window is the entries window
-				 *  - widget->window is the size of the entry part
+				 *  - gtk_widget_get_window (widget) is the entries window
+				 *  - gtk_widget_get_window (widget) is the size of the entry part
 				 *    (and not larger)
 				 *  - only one layer of subwindows
 				 * These should be true with any GTK+ 2.x version.
 				 */
 
-				if (widget->window == window)
+				if (gtk_widget_get_window (widget) == window)
 				{
 					progress.max_size_known = TRUE;
-					gdk_drawable_get_size (widget->window,
+					gdk_drawable_get_size (gtk_widget_get_window (widget),
 					                       &progress.max_size.width,
 					                       &progress.max_size.height);
 				}
@@ -949,10 +942,10 @@ clearlooks_style_draw_box (DRAW_ARGS)
 				{
 					GdkWindow *parent;
 					parent = gdk_window_get_parent (window);
-					if (widget->window == parent)
+					if (gtk_widget_get_window (widget) == parent)
 					{
 						gint pos_x, pos_y;
-						/* widget->window is the parent window
+						/* gtk_widget_get_window (widget) is the parent window
 						 * of the current one. This means we can
 						 * calculate the correct offsets. */
 						gdk_window_get_position (window, &pos_x, &pos_y);
@@ -960,7 +953,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
 						progress.max_size.y = -pos_y;
 
 						progress.max_size_known = TRUE;
-						gdk_drawable_get_size (widget->window,
+						gdk_drawable_get_size (gtk_widget_get_window (widget),
 						                       &progress.max_size.width,
 						                       &progress.max_size.height);
 					} /* Nothing we can do in this case ... */
@@ -1236,7 +1229,7 @@ clearlooks_style_draw_option (DRAW_ARGS)
 	colors = &clearlooks_style->colors;
 
 	checkbox.shadow_type = shadow_type;
-	checkbox.in_menu = (widget && GTK_IS_MENU(widget->parent));
+	checkbox.in_menu = (widget && GTK_IS_MENU(gtk_widget_get_parent (widget)));
 
 	clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
@@ -1265,7 +1258,7 @@ clearlooks_style_draw_check (DRAW_ARGS)
 	checkbox.shadow_type = shadow_type;
 	checkbox.in_cell = DETAIL("cellcheck");
 
-	checkbox.in_menu = (widget && widget->parent && GTK_IS_MENU(widget->parent));
+	checkbox.in_menu = (widget && gtk_widget_get_parent (widget) && GTK_IS_MENU(gtk_widget_get_parent (widget)));
 
 	STYLE_FUNCTION(draw_checkbox) (cr, &clearlooks_style->colors, &params, &checkbox,
 	                               x, y, width, height);
@@ -1481,7 +1474,7 @@ clearlooks_style_draw_arrow (GtkStyle  *style,
 
 	/* I have no idea why, but the arrow of GtkCombo is larger than in other places.
 	 * Subtracting 3 seems to fix this. */
-	if (widget && widget->parent && GE_IS_COMBO (widget->parent->parent))
+	if (widget && gtk_widget_get_parent (widget) && GE_IS_COMBO (gtk_widget_get_parent (gtk_widget_get_parent (widget))))
 	{
 		if (params.ltr)
 			x += 1;
@@ -1890,7 +1883,7 @@ clearlooks_style_draw_layout (GtkStyle * style,
 		if (gtk_widget_get_has_window (widget))
 			ge_shade_color (&params.parentbg, 1.2, &temp);
 		else
-			ge_shade_color (&colors->bg[widget->state], 1.2, &temp);
+			ge_shade_color (&colors->bg[gtk_widget_get_state (widget)], 1.2, &temp);
 
 		etched.red = (int) (temp.r * 65535);
 		etched.green = (int) (temp.g * 65535);
diff --git a/engines/clearlooks/src/support.c b/engines/clearlooks/src/support.c
index 6be462c..05af83f 100644
--- a/engines/clearlooks/src/support.c
+++ b/engines/clearlooks/src/support.c
@@ -34,12 +34,12 @@ void clearlooks_treeview_get_header_index (GtkTreeView *tv, GtkWidget *header,
 	do
 	{
 		GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(list->data);
-		if ( column->button == header )
+		if ( gtk_tree_view_column_get_widget (column) == header )
 		{
 			*column_index = *columns;
-			*resizable = column->resizable;
+			*resizable = gtk_tree_view_column_get_resizable (column);
 		}
-		if ( column->visible )
+		if ( gtk_tree_view_column_get_visible (column) )
 			(*columns)++;
 	} while ((list = g_list_next(list)));
 
@@ -53,11 +53,12 @@ clearlooks_get_parent_bg (const GtkWidget *widget, CairoColor *color)
 	const GtkWidget *parent;
 	GdkColor *gcolor;
 	gboolean stop;
+	GtkStyle *style;
 	
 	if (widget == NULL)
 		return;
 	
-	parent = widget->parent;
+	parent = gtk_widget_get_parent ((GtkWidget *) widget);
 	stop = FALSE;
 	
 	while (parent && !stop)
@@ -78,15 +79,16 @@ clearlooks_get_parent_bg (const GtkWidget *widget, CairoColor *color)
 		}
 
 		if (!stop)
-			parent = parent->parent;
+			parent = gtk_widget_get_parent ((GtkWidget *) parent);
 	}
 
 	if (parent == NULL)
 		return;
 	
 	state_type = gtk_widget_get_state ((GtkWidget *) parent);
-	
-	gcolor = &parent->style->bg[state_type];
+
+	style = gtk_widget_get_style ((GtkWidget *) parent);
+	gcolor = &style->bg[state_type];
 	
 	ge_gdk_color_to_cairo (gcolor, color);
 }
@@ -99,18 +101,20 @@ clearlooks_scrollbar_get_stepper (GtkWidget    *widget,
 	GdkRectangle tmp;
 	GdkRectangle check_rectangle;
 	GtkOrientation orientation;
+	GtkAllocation allocation;
 
 	if (!GE_IS_RANGE (widget))
 		return CL_STEPPER_UNKNOWN;
 
-	check_rectangle.x      = widget->allocation.x;
-	check_rectangle.y      = widget->allocation.y;
+	gtk_widget_get_allocation (widget, &allocation);
+	check_rectangle.x      = allocation.x;
+	check_rectangle.y      = allocation.y;
 	check_rectangle.width  = stepper->width;
 	check_rectangle.height = stepper->height;
 	
-	orientation = GTK_RANGE (widget)->orientation;
+	orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
 	
-	if (widget->allocation.x == -1 && widget->allocation.y == -1)
+	if (allocation.x == -1 && allocation.y == -1)
 		return CL_STEPPER_UNKNOWN;
 		
 	if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
@@ -119,9 +123,9 @@ clearlooks_scrollbar_get_stepper (GtkWidget    *widget,
 	if (value == CL_STEPPER_UNKNOWN) /* Haven't found a match */
 	{
 		if (orientation == GTK_ORIENTATION_HORIZONTAL)
-			check_rectangle.x = widget->allocation.x + stepper->width;
+			check_rectangle.x = allocation.x + stepper->width;
 		else
-			check_rectangle.y = widget->allocation.y + stepper->height;
+			check_rectangle.y = allocation.y + stepper->height;
 		
 		if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
 			value = CL_STEPPER_B;
@@ -130,9 +134,9 @@ clearlooks_scrollbar_get_stepper (GtkWidget    *widget,
 	if (value == CL_STEPPER_UNKNOWN) /* Still haven't found a match */
 	{
 		if (orientation == GTK_ORIENTATION_HORIZONTAL)
-			check_rectangle.x = widget->allocation.x + widget->allocation.width - (stepper->width * 2);
+			check_rectangle.x = allocation.x + allocation.width - (stepper->width * 2);
 		else
-			check_rectangle.y = widget->allocation.y + widget->allocation.height - (stepper->height * 2);
+			check_rectangle.y = allocation.y + allocation.height - (stepper->height * 2);
 		
 		if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
 			value = CL_STEPPER_C;
@@ -141,9 +145,9 @@ clearlooks_scrollbar_get_stepper (GtkWidget    *widget,
 	if (value == CL_STEPPER_UNKNOWN) /* STILL haven't found a match */
 	{
 		if (orientation == GTK_ORIENTATION_HORIZONTAL)
-			check_rectangle.x = widget->allocation.x + widget->allocation.width - stepper->width;
+			check_rectangle.x = allocation.x + allocation.width - stepper->width;
 		else
-			check_rectangle.y = widget->allocation.y + widget->allocation.height - stepper->height;
+			check_rectangle.y = allocation.y + allocation.height - stepper->height;
 		
 		if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
 			value = CL_STEPPER_D;
@@ -215,10 +219,13 @@ clearlooks_set_toolbar_parameters (ToolbarParameters *toolbar,
                                    GdkWindow *window,
                                    gint x, gint y)
 {
+	GtkAllocation allocation;
+
+	gtk_widget_get_allocation (widget, &allocation);
 	toolbar->topmost = FALSE;
 
 	if (x == 0 && y == 0) {
-		if (widget && widget->allocation.x == 0 && widget->allocation.y == 0)
+		if (widget && allocation.x == 0 && allocation.y == 0)
 		{
 			if (widget->window == window && GE_IS_TOOLBAR (widget))
 			{
diff --git a/engines/crux/src/crux-draw.c b/engines/crux/src/crux-draw.c
index 457158f..b587562 100644
--- a/engines/crux/src/crux-draw.c
+++ b/engines/crux/src/crux-draw.c
@@ -817,7 +817,7 @@ draw_shadow (GtkStyle *style,
 	area2.width = width;
 	area2.height = height;
 
-	if (widget != 0 && !GTK_WIDGET_IS_SENSITIVE (widget))
+	if (widget != 0 && !gtk_widget_get_sensitive (widget))
 		state_type = GTK_STATE_INSENSITIVE;
 
 	debug ("draw_shadow: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n",
diff --git a/engines/glide/src/glide_gtk2_drawing.c b/engines/glide/src/glide_gtk2_drawing.c
index 53d56c4..3d4cc3e 100644
--- a/engines/glide/src/glide_gtk2_drawing.c
+++ b/engines/glide/src/glide_gtk2_drawing.c
@@ -1221,7 +1221,7 @@ glide_draw_box (GtkStyle * style,
               {
 	        if (GE_IS_BONOBO_DOCK_ITEM_GRIP(child->data))
                   has_grip = (gtk_widget_get_visible (child->data) && 
-                              GTK_WIDGET_REALIZED(child->data) && 
+                              gtk_widget_get_realized(child->data) && 
                               GTK_WIDGET(child->data)->allocation.width > 1) &&
                               (GTK_WIDGET(child->data)->allocation.height > 1);
               }	            
diff --git a/engines/glide/src/glide_gtk2_support.c b/engines/glide/src/glide_gtk2_support.c
index 5891d5a..f2e2364 100644
--- a/engines/glide/src/glide_gtk2_support.c
+++ b/engines/glide/src/glide_gtk2_support.c
@@ -1175,9 +1175,9 @@ glide_gtk2_engine_hack_menu_shell_leave(GtkWidget *widget,
                   (gtk_widget_get_state (GTK_WIDGET(child->data)) != GTK_STATE_INSENSITIVE))
 	        {
                   if ((!GE_IS_MENU(GTK_MENU_ITEM(child->data)->submenu)) || 
-                      (!(GTK_WIDGET_REALIZED(GTK_MENU_ITEM(child->data)->submenu) && 
+                      (!(gtk_widget_get_realized(GTK_MENU_ITEM(child->data)->submenu) && 
                          gtk_widget_get_visible (GTK_MENU_ITEM(child->data)->submenu) &&
-                         GTK_WIDGET_REALIZED(GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel) &&
+                         gtk_widget_get_realized(GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel) &&
                          gtk_widget_get_visible (GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel))))
 	          {
                     gtk_widget_set_state (GTK_WIDGET(child->data), GTK_STATE_NORMAL);
diff --git a/engines/hc/src/hc_gtk2_support.c b/engines/hc/src/hc_gtk2_support.c
index c51e06b..e2657ed 100644
--- a/engines/hc/src/hc_gtk2_support.c
+++ b/engines/hc/src/hc_gtk2_support.c
@@ -395,9 +395,9 @@ hc_gtk2_engine_hack_menu_shell_leave(GtkWidget *widget,
                   (gtk_widget_get_state (GTK_WIDGET(child->data)) != GTK_STATE_INSENSITIVE))
 	        {
                   if ((!GE_IS_MENU(GTK_MENU_ITEM(child->data)->submenu)) || 
-                      (!(GTK_WIDGET_REALIZED(GTK_MENU_ITEM(child->data)->submenu) && 
+                      (!(gtk_widget_get_realized(GTK_MENU_ITEM(child->data)->submenu) && 
                          gtk_widget_get_visible (GTK_MENU_ITEM(child->data)->submenu) &&
-                         GTK_WIDGET_REALIZED(GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel) &&
+                         gtk_widget_get_realized(GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel) &&
                          gtk_widget_get_visible (GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel))))
 	          {
                     gtk_widget_set_state (GTK_WIDGET(child->data), GTK_STATE_NORMAL);
diff --git a/engines/redmond/src/redmond_gtk2_drawing.c b/engines/redmond/src/redmond_gtk2_drawing.c
index 13ccc94..31d8b3b 100644
--- a/engines/redmond/src/redmond_gtk2_drawing.c
+++ b/engines/redmond/src/redmond_gtk2_drawing.c
@@ -1027,7 +1027,7 @@ redmond_draw_box (GtkStyle * style,
               {
 	        if (GE_IS_BONOBO_DOCK_ITEM_GRIP(child->data))
                   has_grip = (gtk_widget_get_visible (child->data) && 
-                              GTK_WIDGET_REALIZED(child->data) && 
+                              gtk_widget_get_realized(child->data) && 
                               GTK_WIDGET(child->data)->allocation.width > 1) &&
                               (GTK_WIDGET(child->data)->allocation.height > 1);
               }	            
diff --git a/engines/redmond/src/redmond_gtk2_misc.c b/engines/redmond/src/redmond_gtk2_misc.c
index 5ffebf3..3ecfe26 100644
--- a/engines/redmond/src/redmond_gtk2_misc.c
+++ b/engines/redmond/src/redmond_gtk2_misc.c
@@ -502,9 +502,9 @@ redmond_gtk2_engine_hack_menu_shell_leave(GtkWidget *widget,
                   (gtk_widget_get_state (GTK_WIDGET(child->data)) != GTK_STATE_INSENSITIVE))
 	        {
                   if ((!GE_IS_MENU(GTK_MENU_ITEM(child->data)->submenu)) || 
-                      (!(GTK_WIDGET_REALIZED(GTK_MENU_ITEM(child->data)->submenu) && 
+                      (!(gtk_widget_get_realized(GTK_MENU_ITEM(child->data)->submenu) && 
                          gtk_widget_get_visible (GTK_MENU_ITEM(child->data)->submenu) &&
-                         GTK_WIDGET_REALIZED(GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel) &&
+                         gtk_widget_get_realized(GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel) &&
                          gtk_widget_get_visible (GTK_MENU(GTK_MENU_ITEM(child->data)->submenu)->toplevel))))
 	          {
                     gtk_widget_set_state (GTK_WIDGET(child->data), GTK_STATE_NORMAL);
diff --git a/engines/support/widget-information.c b/engines/support/widget-information.c
index c69741c..59d73ed 100644
--- a/engines/support/widget-information.c
+++ b/engines/support/widget-information.c
@@ -126,15 +126,15 @@ ge_check_hint (GEHint      hint,
 	/* Try to do something based on the passed in widget pointer. */
 	switch (hint) {
 		case GE_HINT_TREEVIEW:
-			if (widget->parent && (ge_object_is_a (G_OBJECT (widget->parent), "GtkTreeView")))
+			if (gtk_widget_get_parent (widget) && (ge_object_is_a (G_OBJECT (gtk_widget_get_parent (widget)), "GtkTreeView")))
 				return TRUE;
 		break;
 		case GE_HINT_TREEVIEW_HEADER:
-			if (ge_object_is_a (G_OBJECT (widget), "GtkButton") && widget->parent &&
-			    (ge_object_is_a (G_OBJECT (widget->parent), "GtkTreeView") || ge_object_is_a (G_OBJECT (widget->parent), "GtkCList") ||
-			     ge_object_is_a (G_OBJECT (widget->parent), "GtkCTree")))
+			if (ge_object_is_a (G_OBJECT (widget), "GtkButton") && gtk_widget_get_parent (widget) &&
+			    (ge_object_is_a (G_OBJECT (gtk_widget_get_parent (widget)), "GtkTreeView") || ge_object_is_a (G_OBJECT (gtk_widget_get_parent (widget)), "GtkCList") ||
+			     ge_object_is_a (G_OBJECT (gtk_widget_get_parent (widget)), "GtkCTree")))
 				return TRUE;
-			if (widget->parent && ge_object_is_a (G_OBJECT (widget->parent), "ETreeView"))
+			if (gtk_widget_get_parent (widget) && ge_object_is_a (G_OBJECT (gtk_widget_get_parent (widget)), "ETreeView"))
 				return TRUE;
 		break;
 		case GE_HINT_COMBOBOX_ENTRY:
@@ -146,7 +146,7 @@ ge_check_hint (GEHint      hint,
 				return TRUE;
 		break;
 		case GE_HINT_STATUSBAR:
-			if (widget->parent && ge_object_is_a (G_OBJECT (widget), "GtkStatusbar"))
+			if (gtk_widget_get_parent (widget) && ge_object_is_a (G_OBJECT (widget), "GtkStatusbar"))
 				return TRUE;
 		break;
 		case GE_HINT_SCALE:
@@ -179,7 +179,7 @@ ge_check_hint (GEHint      hint,
 		break;
 		case GE_HINT_MENUBAR:
 			if (ge_object_is_a (G_OBJECT (widget), "GtkMenuBar") ||
-			    ge_object_is_a (G_OBJECT (widget->parent), "GtkMenuBar"))
+			    ge_object_is_a (G_OBJECT (gtk_widget_get_parent (widget)), "GtkMenuBar"))
 				return TRUE;
 		break;
 
@@ -219,12 +219,12 @@ ge_is_combo_box_entry (GtkWidget * widget)
 {
   gboolean result = FALSE;
  
-  if ((widget) && (widget->parent))
+  if ((widget) && (gtk_widget_get_parent (widget)))
     {
-      if (GE_IS_COMBO_BOX_ENTRY (widget->parent))
+      if (GE_IS_COMBO_BOX_ENTRY (gtk_widget_get_parent (widget)))
 	result = TRUE;
       else
-	result = ge_is_combo_box_entry (widget->parent);
+	result = ge_is_combo_box_entry (gtk_widget_get_parent (widget));
     }
   return result;
 }
@@ -245,17 +245,17 @@ ge_is_combo_box (GtkWidget * widget, gboolean as_list)
 {
   gboolean result = FALSE;
  
-  if ((widget) && (widget->parent))
+  if ((widget) && (gtk_widget_get_parent (widget)))
     {
-      if (GE_IS_COMBO_BOX (widget->parent))
+      if (GE_IS_COMBO_BOX (gtk_widget_get_parent (widget)))
         {
           if (as_list)
-            result = (ge_combo_box_is_using_list(widget->parent));
+            result = (ge_combo_box_is_using_list(gtk_widget_get_parent (widget)));
           else
-            result = (!ge_combo_box_is_using_list(widget->parent));
+            result = (!ge_combo_box_is_using_list(gtk_widget_get_parent (widget)));
         }
       else
-	result = ge_is_combo_box (widget->parent, as_list);
+	result = ge_is_combo_box (gtk_widget_get_parent (widget), as_list);
     }
   return result;
 }
@@ -265,12 +265,12 @@ ge_is_combo (GtkWidget * widget)
 {
   gboolean result = FALSE;
  
-  if ((widget) && (widget->parent))
+  if ((widget) && (gtk_widget_get_parent (widget)))
     {
-      if (GE_IS_COMBO (widget->parent))
+      if (GE_IS_COMBO (gtk_widget_get_parent (widget)))
 	result = TRUE;
       else
-	result = ge_is_combo (widget->parent);
+	result = ge_is_combo (gtk_widget_get_parent (widget));
     }
   return result;
 }
@@ -286,15 +286,15 @@ ge_is_toolbar_item (GtkWidget * widget)
 {
   gboolean result = FALSE;
  
-  if ((widget) && (widget->parent)) {
-    if ((GE_IS_BONOBO_TOOLBAR (widget->parent))
-	|| (GE_IS_BONOBO_DOCK_ITEM (widget->parent))
-	|| (GE_IS_EGG_TOOLBAR (widget->parent))
-	|| (GE_IS_TOOLBAR (widget->parent))
-	|| (GE_IS_HANDLE_BOX (widget->parent)))
+  if ((widget) && (gtk_widget_get_parent (widget))) {
+    if ((GE_IS_BONOBO_TOOLBAR (gtk_widget_get_parent (widget)))
+	|| (GE_IS_BONOBO_DOCK_ITEM (gtk_widget_get_parent (widget)))
+	|| (GE_IS_EGG_TOOLBAR (gtk_widget_get_parent (widget)))
+	|| (GE_IS_TOOLBAR (gtk_widget_get_parent (widget)))
+	|| (GE_IS_HANDLE_BOX (gtk_widget_get_parent (widget))))
       result = TRUE;
     else
-      result = ge_is_toolbar_item (widget->parent);
+      result = ge_is_toolbar_item (gtk_widget_get_parent (widget));
   }
   return result;
 }
@@ -304,12 +304,12 @@ ge_is_panel_widget_item (GtkWidget * widget)
 {
   gboolean result = FALSE;
  
-  if ((widget) && (widget->parent))
+  if ((widget) && (gtk_widget_get_parent (widget)))
     {
-      if (GE_IS_PANEL_WIDGET (widget->parent))
+      if (GE_IS_PANEL_WIDGET (gtk_widget_get_parent (widget)))
 	result = TRUE;
       else
-	result = ge_is_panel_widget_item (widget->parent);
+	result = ge_is_panel_widget_item (gtk_widget_get_parent (widget));
     }
   return result;
 }
@@ -321,11 +321,11 @@ ge_is_bonobo_dock_item (GtkWidget * widget)
  
   if ((widget))
     {
-      if (GE_IS_BONOBO_DOCK_ITEM(widget) || GE_IS_BONOBO_DOCK_ITEM (widget->parent))
+      if (GE_IS_BONOBO_DOCK_ITEM(widget) || GE_IS_BONOBO_DOCK_ITEM (gtk_widget_get_parent (widget)))
 	result = TRUE;
-      else if (GE_IS_BOX(widget) || GE_IS_BOX(widget->parent))
+      else if (GE_IS_BOX(widget) || GE_IS_BOX(gtk_widget_get_parent (widget)))
         {
-          GtkContainer *box = GE_IS_BOX(widget)?GTK_CONTAINER(widget):GTK_CONTAINER(widget->parent);
+          GtkContainer *box = GE_IS_BOX(widget)?GTK_CONTAINER(widget):GTK_CONTAINER(gtk_widget_get_parent (widget));
           GList *children = NULL, *child = NULL;
  
           children = gtk_container_get_children(box);
@@ -356,7 +356,7 @@ ge_find_combo_box_entry_widget (GtkWidget * widget)
       if (GE_IS_COMBO_BOX_ENTRY (widget))
 	result = widget;
       else
-	result = ge_find_combo_box_entry_widget (widget->parent);
+	result = ge_find_combo_box_entry_widget (gtk_widget_get_parent (widget));
     }
 
   return result;
@@ -377,7 +377,7 @@ ge_find_combo_box_widget (GtkWidget * widget, gboolean as_list)
             result = (!ge_combo_box_is_using_list(widget))?widget:NULL;
         }
       else
-	result = ge_find_combo_box_widget (widget->parent, as_list);
+	result = ge_find_combo_box_widget (gtk_widget_get_parent (widget), as_list);
     }
   return result;
 }
@@ -392,7 +392,7 @@ ge_find_combo_widget (GtkWidget * widget)
       if (GE_IS_COMBO (widget))
 	result = widget;
       else
-	result = ge_find_combo_widget(widget->parent);
+	result = ge_find_combo_widget(gtk_widget_get_parent (widget));
     }
   return result;
 }



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