aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2011-01-08 22:26:55 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2011-01-11 09:01:02 +0800
commitb2bbeb102c9a2fe3817d01959681a82b6b11d177 (patch)
tree11fae6294f94eadf8d12b1030dc0e9acb650fcbb
parent0205afea985c753c6400eba9634f679863d085c0 (diff)
downloadgsoc2013-epiphany-b2bbeb102c9a2fe3817d01959681a82b6b11d177.tar
gsoc2013-epiphany-b2bbeb102c9a2fe3817d01959681a82b6b11d177.tar.gz
gsoc2013-epiphany-b2bbeb102c9a2fe3817d01959681a82b6b11d177.tar.bz2
gsoc2013-epiphany-b2bbeb102c9a2fe3817d01959681a82b6b11d177.tar.lz
gsoc2013-epiphany-b2bbeb102c9a2fe3817d01959681a82b6b11d177.tar.xz
gsoc2013-epiphany-b2bbeb102c9a2fe3817d01959681a82b6b11d177.tar.zst
gsoc2013-epiphany-b2bbeb102c9a2fe3817d01959681a82b6b11d177.zip
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
-rw-r--r--embed/ephy-web-view.c2
-rw-r--r--lib/widgets/ephy-location-entry.c10
-rw-r--r--src/ephy-notebook.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index af7e77132..e11eab665 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 f7ea32e97..8624363b1 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 e06bae075..81dc7ca12 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);