diff options
author | Tim Janik <timj@gtk.org> | 1998-06-30 12:34:36 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-06-30 12:34:36 +0000 |
commit | 10184125551c2cccbf1b31f64100c064a4e3c2ab (patch) | |
tree | bc0997055a1e1e4535d3e140fdb5544ef4879c47 | |
parent | b483ca4b9765c3fb39e1af170b35786679f216bc (diff) | |
download | gtk+-10184125551c2cccbf1b31f64100c064a4e3c2ab.tar.gz |
fixed lookup order for rc styles. the latest defined rc set pattern is
Tue Jun 30 14:30:37 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c: fixed lookup order for rc styles. the latest defined
rc set pattern is favoured, this is needed for overriding of style
patterns with subsequently parsed rc files.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 6 | ||||
-rw-r--r-- | gtk/gtk.defs | 1 | ||||
-rw-r--r-- | gtk/gtkrc.c | 8 | ||||
-rw-r--r-- | gtk/gtktypebuiltins_evals.c | 1 | ||||
-rw-r--r-- | gtk/testgtkrc | 24 | ||||
-rw-r--r-- | gtk/testgtkrc2 | 6 | ||||
-rw-r--r-- | tests/testgtkrc | 24 | ||||
-rw-r--r-- | tests/testgtkrc2 | 6 |
14 files changed, 78 insertions, 34 deletions
@@ -1,3 +1,9 @@ +Tue Jun 30 14:30:37 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkrc.c: fixed lookup order for rc styles. the latest defined + rc set pattern is favoured, this is needed for overriding of style + patterns with subsequently parsed rc files. + Tue Jun 30 12:45:19 1998 Tim Janik <timj@gtk.org> * gtk/gtkrc.c: code overhaul for simplicity and more descriptive diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index a546612c8c..41d9b711d2 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Tue Jun 30 14:30:37 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkrc.c: fixed lookup order for rc styles. the latest defined + rc set pattern is favoured, this is needed for overriding of style + patterns with subsequently parsed rc files. + Tue Jun 30 12:45:19 1998 Tim Janik <timj@gtk.org> * gtk/gtkrc.c: code overhaul for simplicity and more descriptive diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a546612c8c..41d9b711d2 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Tue Jun 30 14:30:37 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkrc.c: fixed lookup order for rc styles. the latest defined + rc set pattern is favoured, this is needed for overriding of style + patterns with subsequently parsed rc files. + Tue Jun 30 12:45:19 1998 Tim Janik <timj@gtk.org> * gtk/gtkrc.c: code overhaul for simplicity and more descriptive diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index a546612c8c..41d9b711d2 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Tue Jun 30 14:30:37 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkrc.c: fixed lookup order for rc styles. the latest defined + rc set pattern is favoured, this is needed for overriding of style + patterns with subsequently parsed rc files. + Tue Jun 30 12:45:19 1998 Tim Janik <timj@gtk.org> * gtk/gtkrc.c: code overhaul for simplicity and more descriptive diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a546612c8c..41d9b711d2 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Tue Jun 30 14:30:37 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkrc.c: fixed lookup order for rc styles. the latest defined + rc set pattern is favoured, this is needed for overriding of style + patterns with subsequently parsed rc files. + Tue Jun 30 12:45:19 1998 Tim Janik <timj@gtk.org> * gtk/gtkrc.c: code overhaul for simplicity and more descriptive diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a546612c8c..41d9b711d2 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Tue Jun 30 14:30:37 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkrc.c: fixed lookup order for rc styles. the latest defined + rc set pattern is favoured, this is needed for overriding of style + patterns with subsequently parsed rc files. + Tue Jun 30 12:45:19 1998 Tim Janik <timj@gtk.org> * gtk/gtkrc.c: code overhaul for simplicity and more descriptive diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a546612c8c..41d9b711d2 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Tue Jun 30 14:30:37 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkrc.c: fixed lookup order for rc styles. the latest defined + rc set pattern is favoured, this is needed for overriding of style + patterns with subsequently parsed rc files. + Tue Jun 30 12:45:19 1998 Tim Janik <timj@gtk.org> * gtk/gtkrc.c: code overhaul for simplicity and more descriptive diff --git a/gtk/gtk.defs b/gtk/gtk.defs index d3fd5d9590..05de4b5383 100644 --- a/gtk/gtk.defs +++ b/gtk/gtk.defs @@ -614,6 +614,7 @@ (button3-mask GDK_BUTTON3_MASK) (button4-mask GDK_BUTTON4_MASK) (button5-mask GDK_BUTTON5_MASK) + (release-mask GDK_RELEASE_MASK) (modifier-mask GDK_MODIFIER_MASK)) (define-enum GdkSubwindowMode diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 1d9d59eb36..1e4f6195ae 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -488,7 +488,7 @@ gtk_rc_add_widget_name_style (GtkStyle *style, gtk_pattern_spec_init (&rc_set->pspec, pattern); rc_set->rc_style = rc_style; - gtk_rc_sets_widget = g_slist_append (gtk_rc_sets_widget, rc_set); + gtk_rc_sets_widget = g_slist_prepend (gtk_rc_sets_widget, rc_set); } void @@ -515,7 +515,7 @@ gtk_rc_add_widget_class_style (GtkStyle *style, gtk_pattern_spec_init (&rc_set->pspec, pattern); rc_set->rc_style = rc_style; - gtk_rc_sets_widget_class = g_slist_append (gtk_rc_sets_widget_class, rc_set); + gtk_rc_sets_widget_class = g_slist_prepend (gtk_rc_sets_widget_class, rc_set); } static void @@ -1404,7 +1404,7 @@ gtk_rc_parse_widget_style (GScanner *scanner) return G_TOKEN_STRING; } - gtk_rc_sets_widget = g_slist_append (gtk_rc_sets_widget, rc_set); + gtk_rc_sets_widget = g_slist_prepend (gtk_rc_sets_widget, rc_set); return G_TOKEN_NONE; } @@ -1450,7 +1450,7 @@ gtk_rc_parse_widget_class_style (GScanner *scanner) return G_TOKEN_STRING; } - gtk_rc_sets_widget_class = g_slist_append (gtk_rc_sets_widget_class, rc_set); + gtk_rc_sets_widget_class = g_slist_prepend (gtk_rc_sets_widget_class, rc_set); return G_TOKEN_NONE; } diff --git a/gtk/gtktypebuiltins_evals.c b/gtk/gtktypebuiltins_evals.c index 3a231dff1c..f2ec1326ae 100644 --- a/gtk/gtktypebuiltins_evals.c +++ b/gtk/gtktypebuiltins_evals.c @@ -653,6 +653,7 @@ static GtkEnumValue _gdk_modifier_type_values[] = { { GDK_BUTTON3_MASK, "GDK_BUTTON3_MASK", "button3-mask" }, { GDK_BUTTON4_MASK, "GDK_BUTTON4_MASK", "button4-mask" }, { GDK_BUTTON5_MASK, "GDK_BUTTON5_MASK", "button5-mask" }, + { GDK_RELEASE_MASK, "GDK_RELEASE_MASK", "release-mask" }, { GDK_MODIFIER_MASK, "GDK_MODIFIER_MASK", "modifier-mask" }, { 0, NULL, NULL } }; diff --git a/gtk/testgtkrc b/gtk/testgtkrc index a44970bf7a..af20076f5e 100644 --- a/gtk/testgtkrc +++ b/gtk/testgtkrc @@ -10,8 +10,7 @@ # widget <widget_set> style <style_name> # widget_class <widget_class_set> style <style_name> -# testgtkrc2 introduces the green color in the button list - +# testgtkrc2 sets all the buttons in the main window to blue by default include "testgtkrc2" pixmap_path "." @@ -33,17 +32,11 @@ style "scale" bg_pixmap[NORMAL] = "<parent>" } -style "button" +style "button" = "default" { # fg[PRELIGHT] = { 1.0, 1.0, 1.0 } # bg[PRELIGHT] = { 0, 0, 0.75 } -} - -# we set all the buttons in the main window to be blue by default -style 'main_buttons' = 'button' -{ - font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" - bg[PRELIGHT] = { 0, 0, 0.75 } +# bg[PRELIGHT] = { 0.75, 0, 0x00 } } style "toggle_button" = "button" @@ -79,6 +72,15 @@ style "curve" fg[NORMAL] = { 58000, 0, 0 } # red } +# override testgtk2, introduce the green color in the button list +style 'button_list' = 'button' +{ + font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" + bg[PRELIGHT] = { 0, 0.75, 0x00 } +} +widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list" + +widget_class "*" style "default" widget_class "GtkWindow" style "window" widget_class "GtkDialog" style "window" widget_class "GtkFileSelection" style "window" @@ -88,6 +90,4 @@ widget_class "*GtkRadioButton*" style "toggle_button" widget_class "*GtkButton*" style "button" widget_class "*Ruler" style "ruler" widget_class "*GtkText" style "text" -widget_class "*" style "default" -widget "main window.*GtkButton*" style "main_buttons" widget "*GtkCurve" style "curve" diff --git a/gtk/testgtkrc2 b/gtk/testgtkrc2 index f2c45de985..71d2891f4a 100644 --- a/gtk/testgtkrc2 +++ b/gtk/testgtkrc2 @@ -12,10 +12,10 @@ # this file gets included from testgtkrc -style 'button_list' = 'button' +style 'main_buttons' = 'button' { font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" - bg[PRELIGHT] = { 0, 0.75, 0x00 } + bg[PRELIGHT] = { 0, 0, 0.75 } } -widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list" +widget "main window.*GtkButton*" style "main_buttons" diff --git a/tests/testgtkrc b/tests/testgtkrc index a44970bf7a..af20076f5e 100644 --- a/tests/testgtkrc +++ b/tests/testgtkrc @@ -10,8 +10,7 @@ # widget <widget_set> style <style_name> # widget_class <widget_class_set> style <style_name> -# testgtkrc2 introduces the green color in the button list - +# testgtkrc2 sets all the buttons in the main window to blue by default include "testgtkrc2" pixmap_path "." @@ -33,17 +32,11 @@ style "scale" bg_pixmap[NORMAL] = "<parent>" } -style "button" +style "button" = "default" { # fg[PRELIGHT] = { 1.0, 1.0, 1.0 } # bg[PRELIGHT] = { 0, 0, 0.75 } -} - -# we set all the buttons in the main window to be blue by default -style 'main_buttons' = 'button' -{ - font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" - bg[PRELIGHT] = { 0, 0, 0.75 } +# bg[PRELIGHT] = { 0.75, 0, 0x00 } } style "toggle_button" = "button" @@ -79,6 +72,15 @@ style "curve" fg[NORMAL] = { 58000, 0, 0 } # red } +# override testgtk2, introduce the green color in the button list +style 'button_list' = 'button' +{ + font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" + bg[PRELIGHT] = { 0, 0.75, 0x00 } +} +widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list" + +widget_class "*" style "default" widget_class "GtkWindow" style "window" widget_class "GtkDialog" style "window" widget_class "GtkFileSelection" style "window" @@ -88,6 +90,4 @@ widget_class "*GtkRadioButton*" style "toggle_button" widget_class "*GtkButton*" style "button" widget_class "*Ruler" style "ruler" widget_class "*GtkText" style "text" -widget_class "*" style "default" -widget "main window.*GtkButton*" style "main_buttons" widget "*GtkCurve" style "curve" diff --git a/tests/testgtkrc2 b/tests/testgtkrc2 index f2c45de985..71d2891f4a 100644 --- a/tests/testgtkrc2 +++ b/tests/testgtkrc2 @@ -12,10 +12,10 @@ # this file gets included from testgtkrc -style 'button_list' = 'button' +style 'main_buttons' = 'button' { font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" - bg[PRELIGHT] = { 0, 0.75, 0x00 } + bg[PRELIGHT] = { 0, 0, 0.75 } } -widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list" +widget "main window.*GtkButton*" style "main_buttons" |