[gtk+/gtk-style-context] GtkEntry: Set widget state as state flags.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context] GtkEntry: Set widget state as state flags.
- Date: Mon, 1 Nov 2010 03:02:26 +0000 (UTC)
commit c7a1438151544f58d4d013f85a5bbe997041d206
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Oct 31 14:43:20 2010 +0100
GtkEntry: Set widget state as state flags.
gtk/gtkentry.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 4d10e36..1a2ce60 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -6432,7 +6432,7 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry,
GtkIconInfo *info;
GtkIconTheme *icon_theme;
GtkSettings *settings;
- GtkStateType state;
+ GtkStateFlags state;
GtkWidget *widget;
GdkScreen *screen;
gint width, height;
@@ -6448,8 +6448,8 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry,
case GTK_IMAGE_PIXBUF:
break;
case GTK_IMAGE_STOCK:
- state = gtk_widget_get_state (widget);
- gtk_widget_set_state (widget, GTK_STATE_NORMAL);
+ state = gtk_widget_get_state_flags (widget);
+ gtk_widget_set_state_flags (widget, 0, TRUE);
icon_info->pixbuf = gtk_widget_render_icon (widget,
icon_info->stock_id,
GTK_ICON_SIZE_MENU,
@@ -6459,7 +6459,7 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry,
GTK_STOCK_MISSING_IMAGE,
GTK_ICON_SIZE_MENU,
NULL);
- gtk_widget_set_state (widget, state);
+ gtk_widget_set_state_flags (widget, state, TRUE);
break;
case GTK_IMAGE_ICON_NAME:
@@ -6480,13 +6480,13 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry,
if (icon_info->pixbuf == NULL)
{
- state = gtk_widget_get_state (widget);
- gtk_widget_set_state (widget, GTK_STATE_NORMAL);
+ state = gtk_widget_get_state_flags (widget);
+ gtk_widget_set_state_flags (widget, 0, TRUE);
icon_info->pixbuf = gtk_widget_render_icon (widget,
GTK_STOCK_MISSING_IMAGE,
GTK_ICON_SIZE_MENU,
NULL);
- gtk_widget_set_state (widget, state);
+ gtk_widget_set_state_flags (widget, state, TRUE);
}
}
break;
@@ -6514,13 +6514,13 @@ gtk_entry_ensure_pixbuf (GtkEntry *entry,
if (icon_info->pixbuf == NULL)
{
- state = gtk_widget_get_state (widget);
- gtk_widget_set_state (widget, GTK_STATE_NORMAL);
+ state = gtk_widget_get_state_flags (widget);
+ gtk_widget_set_state_flags (widget, 0, TRUE);
icon_info->pixbuf = gtk_widget_render_icon (widget,
GTK_STOCK_MISSING_IMAGE,
GTK_ICON_SIZE_MENU,
NULL);
- gtk_widget_set_state (widget, state);
+ gtk_widget_set_state_flags (widget, state, TRUE);
}
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]