[gtk+/gtk-style-context: 350/533] Remove GTK_STATE_LAST.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 350/533] Remove GTK_STATE_LAST.
- Date: Wed, 1 Dec 2010 02:35:14 +0000 (UTC)
commit 03f6caee0a53392a662ae988287c959c2197f476
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Nov 12 21:44:48 2010 +0100
Remove GTK_STATE_LAST.
It didn't turn out to be that useful, nor widely used.
gtk/gtkcssprovider.c | 2 +-
gtk/gtkenums.h | 3 +--
gtk/gtkstylecontext.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 99776cf..69594a1 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -460,7 +460,7 @@ enum ParserScope {
*/
enum ParserSymbol {
/* Scope: pseudo-class */
- SYMBOL_NTH_CHILD = GTK_STATE_LAST,
+ SYMBOL_NTH_CHILD = GTK_STATE_FOCUSED + 1,
SYMBOL_FIRST_CHILD,
SYMBOL_LAST_CHILD,
SYMBOL_SORTED_CHILD,
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index cc66e39..7393a7a 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -369,8 +369,7 @@ typedef enum
GTK_STATE_SELECTED,
GTK_STATE_INSENSITIVE,
GTK_STATE_INCONSISTENT,
- GTK_STATE_FOCUSED,
- GTK_STATE_LAST
+ GTK_STATE_FOCUSED
} GtkStateType;
/* Style for toolbars */
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 7554322..e465a1b 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -2464,7 +2464,7 @@ gtk_style_context_notify_state_change (GtkStyleContext *context,
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (GDK_IS_WINDOW (window));
- g_return_if_fail (state < GTK_STATE_LAST);
+ g_return_if_fail (state > GTK_STATE_NORMAL && state <= GTK_STATE_FOCUSED);
priv = context->priv;
g_return_if_fail (priv->widget_path != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]