[gtk-engines/gnome3] GTK_WIDGET_HAS_FOCUS -> gtk_widget_has_focus



commit 3dc97817e3af04f81a59e1d896e92ae84297dc0e
Author: Bastien Nocera <hadess hadess net>
Date:   Wed May 12 16:18:35 2010 +0100

    GTK_WIDGET_HAS_FOCUS -> gtk_widget_has_focus

 engines/clearlooks/src/clearlooks_style.c |    4 ++--
 engines/crux/src/crux-draw.c              |   10 +++++-----
 engines/glide/src/glide_gtk2_drawing.c    |    6 +++---
 engines/lua/src/lua_style.c               |    6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/engines/clearlooks/src/clearlooks_style.c b/engines/clearlooks/src/clearlooks_style.c
index bdd8691..ad0c72e 100644
--- a/engines/clearlooks/src/clearlooks_style.c
+++ b/engines/clearlooks/src/clearlooks_style.c
@@ -73,7 +73,7 @@ clearlooks_set_widget_parameters (const GtkWidget      *widget,
 	params->state_type    = state_type;
 	params->corners       = CR_CORNER_ALL;
 	params->ltr           = ge_widget_is_ltr ((GtkWidget*)widget);
-	params->focus         = !CLEARLOOKS_STYLE (style)->disable_focus && widget && GTK_WIDGET_HAS_FOCUS (widget);
+	params->focus         = !CLEARLOOKS_STYLE (style)->disable_focus && widget && gtk_widget_has_focus (widget);
 	params->is_default    = widget && GE_WIDGET_HAS_DEFAULT (widget);
 	params->enable_shadow = FALSE;
 	params->radius        = CLEARLOOKS_STYLE (style)->radius;
@@ -969,7 +969,7 @@ clearlooks_style_draw_box (DRAW_ARGS)
 
 				/* Now, one more thing needs to be done. If interior-focus
 				 * is off, then the entry may be a bit smaller. */
-				if (progress.max_size_known && GTK_WIDGET_HAS_FOCUS (widget))
+				if (progress.max_size_known && gtk_widget_has_focus (widget))
 				{
 					gboolean interior_focus = TRUE;
 					gint focus_line_width = 1;
diff --git a/engines/crux/src/crux-draw.c b/engines/crux/src/crux-draw.c
index dcb5e55..dae191f 100644
--- a/engines/crux/src/crux-draw.c
+++ b/engines/crux/src/crux-draw.c
@@ -823,7 +823,7 @@ draw_shadow (GtkStyle *style,
 	debug ("draw_shadow: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n",
 	        detail, state_type, shadow_type, x, y, width, height);
 
-	if (widget != NULL && GTK_WIDGET_HAS_FOCUS (widget))
+	if (widget != NULL && gtk_widget_has_focus (widget))
 		focused = TRUE;
 
 	if (widget && (GE_IS_COMBO (widget->parent) || GE_IS_COMBO_BOX_ENTRY (widget->parent)))
@@ -894,7 +894,7 @@ draw_box (GtkStyle *style,
 		gboolean focused = FALSE;
 		if (widget) {
 			state_type = GTK_WIDGET_STATE (widget);
-			focused = GTK_WIDGET_HAS_FOCUS (widget);
+			focused = gtk_widget_has_focus (widget);
 		}
 		width += 3;
 		if (ge_widget_is_ltr (widget))
@@ -916,7 +916,7 @@ draw_box (GtkStyle *style,
 		gboolean focused = FALSE;
 
 		if (widget)
-			focused = GTK_WIDGET_HAS_FOCUS (widget);
+			focused = gtk_widget_has_focus (widget);
 
 		if (DETAIL ("spinbutton_down") || DETAIL ("spinbutton_up"))
 		{
@@ -945,7 +945,7 @@ draw_box (GtkStyle *style,
 
 			if ((entry = g_object_get_data ((GObject*) widget->parent, "entry")))
 			{
-				entry_focused = (GTK_WIDGET_HAS_FOCUS (entry));
+				entry_focused = (gtk_widget_has_focus (entry));
 				state_type = GTK_WIDGET_STATE (entry);
 			}
 
@@ -1876,7 +1876,7 @@ draw_slider (GtkStyle *style,
 	/* dark */
 	CRUX_DARK (c2, c2);
 
-	if (widget != NULL && GTK_WIDGET_HAS_FOCUS (widget))
+	if (widget != NULL && gtk_widget_has_focus (widget))
 	{
 		ge_cairo_rounded_rectangle (cr, x+0.5, y+0.5, width-1.0, height-1.0, 2, CR_CORNER_ALL);
 	}
diff --git a/engines/glide/src/glide_gtk2_drawing.c b/engines/glide/src/glide_gtk2_drawing.c
index dbd38e7..7e4c6c5 100644
--- a/engines/glide/src/glide_gtk2_drawing.c
+++ b/engines/glide/src/glide_gtk2_drawing.c
@@ -599,7 +599,7 @@ glide_draw_combobox_button (GtkStyle * style,
 
   g_object_set_data(G_OBJECT(ge_find_combo_box_widget_parent(widget)), "button", widget);
 
-  if (GTK_WIDGET_HAS_FOCUS(widget))
+  if (gtk_widget_has_focus (widget))
   {
 	gtk_widget_style_get (widget, "focus_line_width", &focus_line_width, NULL);
 	gtk_widget_style_get (widget, "focus_padding", &focus_padding, NULL);
@@ -621,7 +621,7 @@ glide_draw_combobox_button (GtkStyle * style,
 
 		for (child = children; child; child = child->next)
 		{
-			if (GE_IS_ENTRY(child->data) && GTK_WIDGET_HAS_FOCUS(child->data))
+			if (GE_IS_ENTRY(child->data) && gtk_widget_has_focus (child->data))
 			{
 				gtk_widget_style_get (widget, "focus_line_width", &focus_line_width, NULL);
 				gtk_widget_style_get (widget, "focus_padding", &focus_padding, NULL);
@@ -953,7 +953,7 @@ glide_draw_spinbutton_stepper (GtkStyle * style,
   spin_area.width = width;
   spin_area.height = height;
  
-  if (widget && GTK_WIDGET_HAS_FOCUS(widget))
+  if (widget && gtk_widget_has_focus (widget))
   {
 	gtk_widget_style_get (widget, "focus_line_width", &focus_line_width, NULL);
 	gtk_widget_style_get (widget, "focus_padding", &focus_padding, NULL);
diff --git a/engines/lua/src/lua_style.c b/engines/lua/src/lua_style.c
index 61dc186..6fe6713 100644
--- a/engines/lua/src/lua_style.c
+++ b/engines/lua/src/lua_style.c
@@ -129,7 +129,7 @@ lua_style_push_widget_params (LuaStyle *style, GtkWidget *widget, GtkStateType s
 		lua_pushboolean (style->L, state_type == GTK_STATE_ACTIVE);
 	lua_setfield (style->L, -2, "active");
 	
-	lua_pushboolean (style->L, widget && GTK_WIDGET_HAS_FOCUS (widget));
+	lua_pushboolean (style->L, widget && gtk_widget_has_focus (widget));
 	lua_setfield (style->L, -2, "has_focus");
 	
 	lua_pushnumber (style->L, (int)widget);
@@ -455,10 +455,10 @@ lua_style_draw_box (DRAW_ARGS)
 			gboolean combo_has_focus = FALSE;
 			
 			if (ge_is_combo_box_entry (widget))
-				combo_has_focus = GTK_WIDGET_HAS_FOCUS (gtk_bin_get_child (GTK_BIN (ge_find_combo_box_widget_parent (widget))));
+				combo_has_focus = gtk_widget_has_focus (gtk_bin_get_child (GTK_BIN (ge_find_combo_box_widget_parent (widget))));
 				
 			if (ge_is_combo (widget))
-				combo_has_focus = GTK_WIDGET_HAS_FOCUS (GTK_COMBO (ge_find_combo_box_widget_parent (widget))->entry);
+				combo_has_focus = gtk_widget_has_focus (GTK_COMBO (ge_find_combo_box_widget_parent (widget))->entry);
 		
 			lua_newtable (lua_style->L);
 			lua_pushboolean (lua_style->L, combo_has_focus);



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