97 lines
3.9 KiB
Diff
97 lines
3.9 KiB
Diff
diff -aur ruby-gtk2-0.16.0.orig/glib/src/rbglib_maincontext.c ruby-gtk2-0.16.0/glib/src/rbglib_maincontext.c
|
|
--- ruby-gtk2-0.16.0.orig/glib/src/rbglib_maincontext.c 2006-12-29 14:17:29.000000000 +0100
|
|
+++ ruby-gtk2-0.16.0/glib/src/rbglib_maincontext.c 2008-02-03 19:59:41.674002790 +0100
|
|
@@ -331,17 +331,20 @@
|
|
|
|
#if GLIB_CHECK_VERSION(2,14,0)
|
|
static VALUE
|
|
-timeout_add_seconds(VALUE self, VALUE interval)
|
|
+timeout_add_seconds(int argc, VALUE *argv, VALUE self)
|
|
{
|
|
- VALUE func, rb_id;
|
|
+ VALUE interval, rb_priority, func, rb_id;
|
|
+ gint priority;
|
|
callback_info_t *info;
|
|
guint id;
|
|
|
|
- func = G_BLOCK_PROC();
|
|
+ rb_scan_args(argc, argv, "11&", &interval, &rb_priority, &func);
|
|
|
|
+ priority = NIL_P(rb_priority) ? G_PRIORITY_DEFAULT : INT2NUM(rb_priority);
|
|
info = ALLOC(callback_info_t);
|
|
info->callback = func;
|
|
- id = g_timeout_add_seconds(NUM2UINT(interval),
|
|
+ id = g_timeout_add_seconds_full(priority,
|
|
+ NUM2UINT(interval),
|
|
(GSourceFunc)invoke_source_func,
|
|
(gpointer)info, g_free);
|
|
info->id = id;
|
|
@@ -488,7 +491,7 @@
|
|
#endif
|
|
rb_define_module_function(timeout, "add", timeout_add, -1);
|
|
#if GLIB_CHECK_VERSION(2,14,0)
|
|
- rb_define_module_function(timeout, "add_seconds", timeout_add_seconds, 1);
|
|
+ rb_define_module_function(timeout, "add_seconds", timeout_add_seconds, -1);
|
|
#endif
|
|
rb_define_module_function(idle, "source_new", idle_source_new, 0);
|
|
rb_define_module_function(idle, "add", idle_add, -1);
|
|
diff -aur ruby-gtk2-0.16.0.orig/glib/src/rbglib_unicode.c ruby-gtk2-0.16.0/glib/src/rbglib_unicode.c
|
|
--- ruby-gtk2-0.16.0.orig/glib/src/rbglib_unicode.c 2006-12-29 14:17:29.000000000 +0100
|
|
+++ ruby-gtk2-0.16.0/glib/src/rbglib_unicode.c 2008-02-03 19:47:21.883858632 +0100
|
|
@@ -140,7 +140,7 @@
|
|
rbglib_m_unichar_get_script(VALUE self, VALUE unichar)
|
|
{
|
|
return GENUM2RVAL(g_unichar_get_script(NUM2UINT(unichar)),
|
|
- G_TYPE_UNICODE_SCRIPT_TYPE);
|
|
+ G_TYPE_UNICODE_SCRIPT);
|
|
}
|
|
#endif
|
|
|
|
diff -aur ruby-gtk2-0.16.0.orig/glib/src/rbgobj_boxed.c ruby-gtk2-0.16.0/glib/src/rbgobj_boxed.c
|
|
--- ruby-gtk2-0.16.0.orig/glib/src/rbgobj_boxed.c 2006-12-29 14:17:29.000000000 +0100
|
|
+++ ruby-gtk2-0.16.0/glib/src/rbgobj_boxed.c 2008-02-03 19:49:08.444585783 +0100
|
|
@@ -145,7 +145,8 @@
|
|
|
|
gpointer
|
|
rbgobj_boxed_get(obj, gtype)
|
|
- VALUE obj, gtype;
|
|
+ VALUE obj;
|
|
+ GType gtype;
|
|
{
|
|
boxed_holder* holder;
|
|
Data_Get_Struct(obj, boxed_holder, holder);
|
|
diff -aur ruby-gtk2-0.16.0.orig/gtk/src/rbgtk.h ruby-gtk2-0.16.0/gtk/src/rbgtk.h
|
|
--- ruby-gtk2-0.16.0.orig/gtk/src/rbgtk.h 2006-12-29 14:17:29.000000000 +0100
|
|
+++ ruby-gtk2-0.16.0/gtk/src/rbgtk.h 2008-02-03 19:44:56.153964719 +0100
|
|
@@ -115,7 +115,7 @@
|
|
*/
|
|
typedef void (*rbgtkiter_set_value_func)(void *model, GtkTreeIter *iter,
|
|
gint column, GValue *value);
|
|
-extern void rbgtk_register_treeiter_set_value_func(VALUE klass, rbgtkiter_set_value_func);
|
|
+extern void rbgtk_register_treeiter_set_value_func(GType gtype, rbgtkiter_set_value_func);
|
|
|
|
/*
|
|
* Gtk::SelectionData
|
|
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
|
|
--- ruby-gtk2-0.16.0.orig/glib/src/lib/glib-mkenums.rb 2006-12-29 14:17:29.000000000 +0100
|
|
+++ ruby-gtk2-0.16.0/glib/src/lib/glib-mkenums.rb 2008-03-15 17:25:05.034366090 +0100
|
|
@@ -33,16 +33,14 @@
|
|
if const_lines.include? "<<"
|
|
@type = "flags"
|
|
@Type = "Flags"
|
|
- regexp = /^\s*([^\s]*)\s.*\n/
|
|
else
|
|
@type = "enum"
|
|
@Type = "Enum"
|
|
- regexp = /^\s*([^\s,]*).*\n/
|
|
end
|
|
consts = []
|
|
- const_lines.scan(regexp){|name|
|
|
+ const_lines.scan(/^\s*([^\s,]*).*\n/) do |name|
|
|
consts << name[0] unless name[0] =~ /(^[\/\*]|^$)/
|
|
- }
|
|
+ end
|
|
@prefix = extract_prefix(consts)
|
|
consts.each do |name|
|
|
# consts = [name, nick]
|