[epiphany] Use the new GTK_STATE_FLAG_NORMAL flag



commit b2bbeb102c9a2fe3817d01959681a82b6b11d177
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Sat Jan 8 09:26:55 2011 -0500

    Use the new GTK_STATE_FLAG_NORMAL flag
    
    Until 2.99.0 GtkStyleContext didn't have a "normal" flag, the closest thing was
    GTK_STATE_FLAG_ACTIVE, but it is not necessarily correct.
    
    Bug #636501

 embed/ephy-web-view.c             |    2 +-
 lib/widgets/ephy-location-entry.c |   10 +++++-----
 src/ephy-notebook.c               |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index af7e771..e11eab6 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1187,7 +1187,7 @@ _ephy_web_view_draw_statusbar (GtkWidget *widget, cairo_t *cr)
   context = gtk_widget_get_style_context (widget);
   gtk_style_context_save (context);
 
-  gtk_style_context_set_state (context, GTK_STATE_FLAG_ACTIVE);
+  gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL);
   gtk_render_background (context, cr,
                          priv->text_rectangle.x,
                          priv->text_rectangle.y,
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index f7ea32e..8624363 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -791,7 +791,7 @@ favicon_create_drag_surface (EphyLocationEntry *entry,
 
 	style = gtk_widget_get_style_context (priv->entry);
 	metrics = pango_context_get_metrics (context,
-		                             gtk_style_context_get_font (style, GTK_STATE_FLAG_ACTIVE),
+		                             gtk_style_context_get_font (style, GTK_STATE_FLAG_NORMAL),
 					     pango_context_get_language (context));
 
 	char_width = pango_font_metrics_get_approximate_digit_width (metrics);
@@ -1572,13 +1572,13 @@ ephy_location_entry_set_secure (EphyLocationEntry *entry,
 	/* We have to set the color of the GtkEntry in the EphyIconEntry */
 	if (priv->secure && priv->apply_colors)
 	{
-		gtk_widget_override_color (gentry, GTK_STATE_FLAG_ACTIVE, &priv->secure_fg_color);
-		gtk_widget_override_background_color (gentry, GTK_STATE_FLAG_ACTIVE, &priv->secure_bg_color);
+		gtk_widget_override_color (gentry, GTK_STATE_FLAG_NORMAL, &priv->secure_fg_color);
+		gtk_widget_override_background_color (gentry, GTK_STATE_FLAG_NORMAL, &priv->secure_bg_color);
 	}
 	else
 	{
-		gtk_widget_override_color (gentry, GTK_STATE_FLAG_ACTIVE, NULL);
-		gtk_widget_override_background_color (gentry, GTK_STATE_FLAG_ACTIVE, NULL);
+		gtk_widget_override_color (gentry, GTK_STATE_FLAG_NORMAL, NULL);
+		gtk_widget_override_background_color (gentry, GTK_STATE_FLAG_NORMAL, NULL);
 	}
 	gtk_widget_queue_draw (widget);
 }
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index e06bae0..81dc7ca 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -562,7 +562,7 @@ tab_label_style_set_cb (GtkWidget *hbox,
 	context = gtk_widget_get_pango_context (hbox);
 	style = gtk_widget_get_style_context (hbox);
 	metrics = pango_context_get_metrics (context,
-					     gtk_style_context_get_font (style, GTK_STATE_FLAG_ACTIVE),
+					     gtk_style_context_get_font (style, GTK_STATE_FLAG_NORMAL),
 					     pango_context_get_language (context));
 	char_width = pango_font_metrics_get_approximate_digit_width (metrics);
 	pango_font_metrics_unref (metrics);



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