summaryrefslogtreecommitdiff
path: root/tests/testgtkrc
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-07-22 22:29:10 +0000
committerTim Janik <timj@src.gnome.org>1998-07-22 22:29:10 +0000
commit8c56db61e364b474a162ff6e01597505d11f5213 (patch)
tree998b0d80a01818933c7486ea4525a8a1be207467 /tests/testgtkrc
parent3ea4f70fa64fffcfca5c6cebc4952a7c6d6e77ae (diff)
downloadgtk+-8c56db61e364b474a162ff6e01597505d11f5213.tar.gz
introduce testbindings on C-1 for buttons, to check out binding
Thu Jul 23 00:11:39 1998 Tim Janik <timj@gtk.org> * gtk/testgtkrc: introduce testbindings on C-1 for buttons, to check out binding priorities. someone should really write gtkrc-mode for emacs. * gtk/gtkwidget.c (gtk_widget_class_init): remove ugly bindings test. * gtk/testgtk.c (main): and move it here ;). this test says something on release of C-9. (this works only if the mouse pointer is on a spinbutton and there is no focus widget). * gtk/gtkrc.h: * gtk/gtkrc.c: export gtk_rc_parse_color, gtk_rc_parse_state and a new function gtk_rc_parse_priority to parse path priority types. export rc tokens. feature binding parsing. Wed Jul 22 23:41:17 1998 Tim Janik <timj@gtk.org> * gtk/gtkbindings.h: * gtk/gtkbindings.c: new function gtk_binding_parse_binding() to feature binding parsing in rc files. * gtk/gtkbindings.c (gtk_binding_set_new): bug fix. * gtk/gtkbindings.c (gtk_binding_pattern_compare): bug fix, we used to order the bindings with lowest priority first.
Diffstat (limited to 'tests/testgtkrc')
-rw-r--r--tests/testgtkrc25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/testgtkrc b/tests/testgtkrc
index eb8e558c6a..779a090e2c 100644
--- a/tests/testgtkrc
+++ b/tests/testgtkrc
@@ -100,3 +100,28 @@ widget_class "*GtkButton*" style "button"
widget_class "*Ruler" style "ruler"
widget_class "*GtkText" style "text"
widget "*GtkCurve" style "curve"
+
+binding "test1"
+{
+ bind "<ctrl>1" {
+ "debug-msg" ("hallo and")
+ "debug-msg" ("huhu")
+ }
+}
+
+binding "test2"
+{
+ bind "<ctrl>1" {
+ "debug-msg" ("jup!")
+ }
+}
+
+# possible priorities are (in ascending order):
+# lowest
+# gtk (used by gtk for internal class bindings)
+# application (for hard coded bindings on application basis)
+# rc (used implicitel by rc files)
+# highest
+class "GtkButton" binding "test1" # implicit : rc
+class "GtkButton" binding : highest "test2" # override "rc" priority
+