1 diff -aur ruby-gtk2-0.16.0.orig/glib/src/rbglib_maincontext.c ruby-gtk2-0.16.0/glib/src/rbglib_maincontext.c
2 --- ruby-gtk2-0.16.0.orig/glib/src/rbglib_maincontext.c 2006-12-29 14:17:29.000000000 +0100
3 +++ ruby-gtk2-0.16.0/glib/src/rbglib_maincontext.c 2008-02-03 19:59:41.674002790 +0100
4 @@ -331,17 +331,20 @@
5
6 #if GLIB_CHECK_VERSION(2,14,0)
7 static VALUE
8 -timeout_add_seconds(VALUE self, VALUE interval)
9 +timeout_add_seconds(int argc, VALUE *argv, VALUE self)
10 {
11 - VALUE func, rb_id;
12 + VALUE interval, rb_priority, func, rb_id;
13 + gint priority;
14 callback_info_t *info;
15 guint id;
16
17 - func = G_BLOCK_PROC();
18 + rb_scan_args(argc, argv, "11&", &interval, &rb_priority, &func);
19
20 + priority = NIL_P(rb_priority) ? G_PRIORITY_DEFAULT : INT2NUM(rb_priority);
21 info = ALLOC(callback_info_t);
22 info->callback = func;
23 - id = g_timeout_add_seconds(NUM2UINT(interval),
24 + id = g_timeout_add_seconds_full(priority,
25 + NUM2UINT(interval),
26 (GSourceFunc)invoke_source_func,
27 (gpointer)info, g_free);
28 info->id = id;
29 @@ -488,7 +491,7 @@
30 #endif
31 rb_define_module_function(timeout, "add", timeout_add, -1);
32 #if GLIB_CHECK_VERSION(2,14,0)
33 - rb_define_module_function(timeout, "add_seconds", timeout_add_seconds, 1);
34 + rb_define_module_function(timeout, "add_seconds", timeout_add_seconds, -1);
35 #endif
36 rb_define_module_function(idle, "source_new", idle_source_new, 0);
37 rb_define_module_function(idle, "add", idle_add, -1);
38 diff -aur ruby-gtk2-0.16.0.orig/glib/src/rbglib_unicode.c ruby-gtk2-0.16.0/glib/src/rbglib_unicode.c
39 --- ruby-gtk2-0.16.0.orig/glib/src/rbglib_unicode.c 2006-12-29 14:17:29.000000000 +0100
40 +++ ruby-gtk2-0.16.0/glib/src/rbglib_unicode.c 2008-02-03 19:47:21.883858632 +0100
41 @@ -140,7 +140,7 @@
42 rbglib_m_unichar_get_script(VALUE self, VALUE unichar)
43 {
44 return GENUM2RVAL(g_unichar_get_script(NUM2UINT(unichar)),
45 - G_TYPE_UNICODE_SCRIPT_TYPE);
46 + G_TYPE_UNICODE_SCRIPT);
47 }
48 #endif
49
50 diff -aur ruby-gtk2-0.16.0.orig/glib/src/rbgobj_boxed.c ruby-gtk2-0.16.0/glib/src/rbgobj_boxed.c
51 --- ruby-gtk2-0.16.0.orig/glib/src/rbgobj_boxed.c 2006-12-29 14:17:29.000000000 +0100
52 +++ ruby-gtk2-0.16.0/glib/src/rbgobj_boxed.c 2008-02-03 19:49:08.444585783 +0100
53 @@ -145,7 +145,8 @@
54
55 gpointer
56 rbgobj_boxed_get(obj, gtype)
57 - VALUE obj, gtype;
58 + VALUE obj;
59 + GType gtype;
60 {
61 boxed_holder* holder;
62 Data_Get_Struct(obj, boxed_holder, holder);
63 diff -aur ruby-gtk2-0.16.0.orig/gtk/src/rbgtk.h ruby-gtk2-0.16.0/gtk/src/rbgtk.h
64 --- ruby-gtk2-0.16.0.orig/gtk/src/rbgtk.h 2006-12-29 14:17:29.000000000 +0100
65 +++ ruby-gtk2-0.16.0/gtk/src/rbgtk.h 2008-02-03 19:44:56.153964719 +0100
66 @@ -115,7 +115,7 @@
67 */
68 typedef void (*rbgtkiter_set_value_func)(void *model, GtkTreeIter *iter,
69 gint column, GValue *value);
70 -extern void rbgtk_register_treeiter_set_value_func(VALUE klass, rbgtkiter_set_value_func);
71 +extern void rbgtk_register_treeiter_set_value_func(GType gtype, rbgtkiter_set_value_func);
72
73 /*
74 * Gtk::SelectionData
75 diff -aur ruby-gtk2-0.16.0.orig/glib/src/lib/glib-mkenums.rb ruby-gtk2-0.16.0/glib/src/lib/glib-mkenums.rb
76 --- ruby-gtk2-0.16.0.orig/glib/src/lib/glib-mkenums.rb 2006-12-29 14:17:29.000000000 +0100
77 +++ ruby-gtk2-0.16.0/glib/src/lib/glib-mkenums.rb 2008-03-15 17:25:05.034366090 +0100
78 @@ -33,16 +33,14 @@
79 if const_lines.include? "<<"
80 @type = "flags"
81 @Type = "Flags"
82 - regexp = /^\s*([^\s]*)\s.*\n/
83 else
84 @type = "enum"
85 @Type = "Enum"
86 - regexp = /^\s*([^\s,]*).*\n/
87 end
88 consts = []
89 - const_lines.scan(regexp){|name|
90 + const_lines.scan(/^\s*([^\s,]*).*\n/) do |name|
91 consts << name[0] unless name[0] =~ /(^[\/\*]|^$)/
92 - }
93 + end
94 @prefix = extract_prefix(consts)
95 consts.each do |name|
96 # consts = [name, nick]
|