gtk2 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +52 -0
- data/ext/gtk2/extconf.rb +18 -9
- data/ext/gtk2/rbgdk.h +3 -0
- data/ext/gtk2/rbgdkdragcontext.c +4 -4
- data/ext/gtk2/rbgdkevent.c +18 -5
- data/ext/gtk2/rbgdkpixmap.c +43 -48
- data/ext/gtk2/rbgdkproperty.c +6 -5
- data/ext/gtk2/rbgdkscreen.c +18 -74
- data/ext/gtk2/rbgdkselection.c +2 -2
- data/ext/gtk2/rbgdkwindow.c +11 -18
- data/ext/gtk2/rbgdkwindowattr.c +1 -1
- data/ext/gtk2/rbgtkaccelgroup.c +1 -1
- data/ext/gtk2/rbgtkaction.c +8 -26
- data/ext/gtk2/rbgtkactiongroup.c +6 -6
- data/ext/gtk2/rbgtkadjustment.c +20 -74
- data/ext/gtk2/rbgtkbindingset.c +1 -1
- data/ext/gtk2/rbgtkbuilder.c +2 -1
- data/ext/gtk2/rbgtkbutton.c +1 -9
- data/ext/gtk2/rbgtkcalendar.c +1 -1
- data/ext/gtk2/rbgtkcellrendererspinner.c +0 -3
- data/ext/gtk2/rbgtkcellrenderertext.c +1 -2
- data/ext/gtk2/rbgtkcellview.c +6 -11
- data/ext/gtk2/rbgtkcolorselectiondialog.c +2 -28
- data/ext/gtk2/rbgtkcombo.c +2 -2
- data/ext/gtk2/rbgtkcombobox.c +9 -29
- data/ext/gtk2/rbgtkcontainer.c +1 -1
- data/ext/gtk2/rbgtkcurve.c +4 -2
- data/ext/gtk2/rbgtkdialog.c +2 -3
- data/ext/gtk2/rbgtkdrag.c +3 -3
- data/ext/gtk2/rbgtkentry.c +2 -2
- data/ext/gtk2/rbgtkentrycompletion.c +1 -4
- data/ext/gtk2/rbgtkfilechooser.c +32 -29
- data/ext/gtk2/rbgtkfilechooserdialog.c +8 -6
- data/ext/gtk2/rbgtkfilefilter.c +8 -4
- data/ext/gtk2/rbgtkframe.c +3 -4
- data/ext/gtk2/rbgtkhandlebox.c +0 -7
- data/ext/gtk2/rbgtkicontheme.c +4 -13
- data/ext/gtk2/rbgtkiconview.c +4 -15
- data/ext/gtk2/rbgtkimcontext.c +1 -1
- data/ext/gtk2/rbgtkinvisible.c +5 -21
- data/ext/gtk2/rbgtkitemfactory.c +3 -3
- data/ext/gtk2/rbgtklabel.c +0 -2
- data/ext/gtk2/rbgtklinkbutton.c +0 -2
- data/ext/gtk2/rbgtkmain.c +7 -10
- data/ext/gtk2/rbgtkmenu.c +22 -74
- data/ext/gtk2/rbgtkmenuitem.c +16 -55
- data/ext/gtk2/rbgtkmenushell.c +3 -11
- data/ext/gtk2/rbgtkmessagedialog.c +11 -20
- data/ext/gtk2/rbgtknotebook.c +0 -1
- data/ext/gtk2/rbgtkoptionmenu.c +1 -2
- data/ext/gtk2/rbgtkprintjob.c +1 -2
- data/ext/gtk2/rbgtkprintoperation.c +0 -2
- data/ext/gtk2/rbgtkradioaction.c +2 -7
- data/ext/gtk2/rbgtkradiobutton.c +1 -1
- data/ext/gtk2/rbgtkradiomenuitem.c +4 -6
- data/ext/gtk2/rbgtkradiotoolbutton.c +2 -4
- data/ext/gtk2/rbgtkrange.c +1 -2
- data/ext/gtk2/rbgtkrc.c +8 -9
- data/ext/gtk2/rbgtkrcstyle.c +2 -2
- data/ext/gtk2/rbgtkrecentaction.c +0 -1
- data/ext/gtk2/rbgtkrecentchooser.c +3 -3
- data/ext/gtk2/rbgtkrecentdata.c +2 -9
- data/ext/gtk2/rbgtkrecentfilter.c +2 -1
- data/ext/gtk2/rbgtkrecentfilterinfo.c +5 -16
- data/ext/gtk2/rbgtkrecentinfo.c +2 -2
- data/ext/gtk2/rbgtkrecentmanager.c +1 -2
- data/ext/gtk2/rbgtkruler.c +6 -16
- data/ext/gtk2/rbgtkscalebutton.c +16 -48
- data/ext/gtk2/rbgtkscrolledwindow.c +1 -1
- data/ext/gtk2/rbgtkselectiondata.c +10 -34
- data/ext/gtk2/rbgtksettings.c +1 -1
- data/ext/gtk2/rbgtkspinner.c +0 -3
- data/ext/gtk2/rbgtkstatusbar.c +5 -16
- data/ext/gtk2/rbgtkstatusicon.c +2 -9
- data/ext/gtk2/rbgtkstock.c +4 -4
- data/ext/gtk2/rbgtktable.c +8 -13
- data/ext/gtk2/rbgtktextattributes.c +0 -2
- data/ext/gtk2/rbgtktextbuffer.c +17 -16
- data/ext/gtk2/rbgtktextmark.c +7 -14
- data/ext/gtk2/rbgtktexttag.c +1 -2
- data/ext/gtk2/rbgtktextview.c +3 -4
- data/ext/gtk2/rbgtktoggleaction.c +5 -16
- data/ext/gtk2/rbgtktogglebutton.c +1 -2
- data/ext/gtk2/rbgtktoggletoolbutton.c +5 -16
- data/ext/gtk2/rbgtktoolbar.c +8 -31
- data/ext/gtk2/rbgtktoolitem.c +3 -1
- data/ext/gtk2/rbgtktreerowreference.c +4 -4
- data/ext/gtk2/rbgtktreesortable.c +0 -3
- data/ext/gtk2/rbgtktreestore.c +10 -7
- data/ext/gtk2/rbgtktreeview.c +5 -8
- data/ext/gtk2/rbgtktreeviewcolumn.c +13 -34
- data/ext/gtk2/rbgtkuimanager.c +2 -3
- data/ext/gtk2/rbgtkwidget.c +24 -44
- data/ext/gtk2/rbgtkwindow.c +32 -92
- data/lib/gtk2/base.rb +1 -1
- metadata +13 -13
data/ext/gtk2/rbgdkselection.c
CHANGED
@@ -94,7 +94,7 @@ gdkselection_send_notify(int argc, VALUE *argv, VALUE self)
|
|
94
94
|
|
95
95
|
if (argc == 5) {
|
96
96
|
rb_scan_args(argc, argv, "50", &requestor, &selection, &target, &property, &time);
|
97
|
-
gdk_selection_send_notify(
|
97
|
+
gdk_selection_send_notify(RVAL2GDKNATIVEWINDOW(requestor), RVAL2ATOM(selection),
|
98
98
|
RVAL2ATOM(target),
|
99
99
|
NIL_P(property) ? GDK_NONE : RVAL2ATOM(property),
|
100
100
|
NUM2INT(time));
|
@@ -103,7 +103,7 @@ gdkselection_send_notify(int argc, VALUE *argv, VALUE self)
|
|
103
103
|
VALUE display = Qnil;
|
104
104
|
rb_scan_args(argc, argv, "60", &display, &requestor, &selection, &target, &property, &time);
|
105
105
|
gdk_selection_send_notify_for_display(GDK_DISPLAY_OBJECT(RVAL2GOBJ(display)),
|
106
|
-
|
106
|
+
RVAL2GDKNATIVEWINDOW(requestor), RVAL2ATOM(selection),
|
107
107
|
RVAL2ATOM(target),
|
108
108
|
NIL_P(property) ? GDK_NONE : RVAL2ATOM(property),
|
109
109
|
NUM2INT(time));
|
data/ext/gtk2/rbgdkwindow.c
CHANGED
@@ -594,16 +594,12 @@ gdkwin_set_back_pixmap(VALUE self, VALUE pixmap, VALUE parent_relative)
|
|
594
594
|
return self;
|
595
595
|
}
|
596
596
|
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
return self;
|
605
|
-
}
|
606
|
-
#endif
|
597
|
+
/* Properties:
|
598
|
+
*
|
599
|
+
* void gdk_window_set_cursor (GdkWindow *window,
|
600
|
+
* GdkCursor *cursor);
|
601
|
+
* GdkCursor * gdk_window_get_cursor (GdkWindow *window);
|
602
|
+
*/
|
607
603
|
|
608
604
|
/* Obsolete
|
609
605
|
#define gdk_window_set_colormap
|
@@ -896,7 +892,6 @@ gdkwin_s_get_default_root_window(VALUE self)
|
|
896
892
|
GdkPointerHooks* gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);
|
897
893
|
*/
|
898
894
|
|
899
|
-
|
900
895
|
/* From X Window System Interaction */
|
901
896
|
static VALUE
|
902
897
|
gdkwin_foreign_new(int argc, VALUE *argv, VALUE self)
|
@@ -909,11 +904,12 @@ gdkwin_foreign_new(int argc, VALUE *argv, VALUE self)
|
|
909
904
|
switch(argc)
|
910
905
|
{
|
911
906
|
case 1:
|
912
|
-
win = gdk_window_foreign_new(
|
907
|
+
win = gdk_window_foreign_new(RVAL2GDKNATIVEWINDOW(arg[0]));
|
913
908
|
break;
|
914
909
|
case 2:
|
915
910
|
#if GTK_CHECK_VERSION(2,2,0)
|
916
|
-
win = gdk_window_foreign_new_for_display(RVAL2GOBJ(arg[0]),
|
911
|
+
win = gdk_window_foreign_new_for_display(RVAL2GOBJ(arg[0]),
|
912
|
+
RVAL2GDKNATIVEWINDOW(arg[1]));
|
917
913
|
#else
|
918
914
|
win = gdk_window_foreign_new(NUM2UINT(arg[1]));
|
919
915
|
rb_warn("Not supported in GTK+-2.0.x.");
|
@@ -938,11 +934,11 @@ gdkwin_lookup(int argc, VALUE *argv, VALUE self)
|
|
938
934
|
switch(argc)
|
939
935
|
{
|
940
936
|
case 1:
|
941
|
-
win = gdk_window_lookup(
|
937
|
+
win = gdk_window_lookup(RVAL2GDKNATIVEWINDOW(arg[0]));
|
942
938
|
break;
|
943
939
|
case 2:
|
944
940
|
#if GTK_CHECK_VERSION(2,2,0)
|
945
|
-
win = gdk_window_lookup_for_display(RVAL2GOBJ(arg[0]),
|
941
|
+
win = gdk_window_lookup_for_display(RVAL2GOBJ(arg[0]), RVAL2GDKNATIVEWINDOW(arg[1]));
|
946
942
|
#else
|
947
943
|
win = gdk_window_lookup(NUM2UINT(arg[1]));
|
948
944
|
rb_warn("Not supported in GTK+-2.0.x.");
|
@@ -1073,9 +1069,6 @@ Init_gtk_gdk_window()
|
|
1073
1069
|
rb_define_method(gdkWindow, "set_title", gdkwin_set_title, 1);
|
1074
1070
|
rb_define_method(gdkWindow, "set_background", gdkwin_set_background, 1);
|
1075
1071
|
rb_define_method(gdkWindow, "set_back_pixmap", gdkwin_set_back_pixmap, 2);
|
1076
|
-
#if !GTK_CHECK_VERSION(2, 18, 0)
|
1077
|
-
rb_define_method(gdkWindow, "set_cursor", gdkwin_set_cursor, 1);
|
1078
|
-
#endif
|
1079
1072
|
rb_define_method(gdkWindow, "user_data", gdkwin_get_user_data, 0);
|
1080
1073
|
rb_define_method(gdkWindow, "geometry", gdkwin_get_geometry, 0);
|
1081
1074
|
rb_define_method(gdkWindow, "set_geometry_hints", gdkwin_set_geometry_hints, 2);
|
data/ext/gtk2/rbgdkwindowattr.c
CHANGED
data/ext/gtk2/rbgtkaccelgroup.c
CHANGED
data/ext/gtk2/rbgtkaction.c
CHANGED
@@ -51,7 +51,12 @@ action_is_visible(VALUE self)
|
|
51
51
|
/* Defined as property.
|
52
52
|
const gchar* gtk_action_get_name (GtkAction *action);
|
53
53
|
gboolean gtk_action_get_sensitive (GtkAction *action);
|
54
|
+
void gtk_action_set_sensitive (GtkAction *action,
|
55
|
+
gboolean
|
56
|
+
sensitive);
|
54
57
|
gboolean gtk_action_get_visible (GtkAction *action);
|
58
|
+
void gtk_action_set_visible (GtkAction *action,
|
59
|
+
gboolean visible);
|
55
60
|
*/
|
56
61
|
|
57
62
|
static VALUE
|
@@ -143,6 +148,7 @@ action_set_accel_path(VALUE self, VALUE accel_path)
|
|
143
148
|
gtk_action_set_accel_path(_SELF(self), RVAL2CSTR(accel_path));
|
144
149
|
return self;
|
145
150
|
}
|
151
|
+
|
146
152
|
static VALUE
|
147
153
|
action_set_accel_group(VALUE self, VALUE accel_group)
|
148
154
|
{
|
@@ -151,28 +157,6 @@ action_set_accel_group(VALUE self, VALUE accel_group)
|
|
151
157
|
}
|
152
158
|
|
153
159
|
#if GTK_CHECK_VERSION(2,6,0)
|
154
|
-
/* This set "sensitive" value and call g_object_notify with "sensitive".
|
155
|
-
If you want not to call g_object_notify,()
|
156
|
-
Use GLib::Object#set_property("sensitive", val) instead.
|
157
|
-
*/
|
158
|
-
static VALUE
|
159
|
-
action_set_sensitive(VALUE self, VALUE sensitive)
|
160
|
-
{
|
161
|
-
gtk_action_set_sensitive(_SELF(self), RVAL2CBOOL(sensitive));
|
162
|
-
return self;
|
163
|
-
}
|
164
|
-
|
165
|
-
/* This set "visible" value and call g_object_notify with "visible".
|
166
|
-
If you want not to call g_object_notify(),
|
167
|
-
Use GLib::Object#set_property("visible", val) instead.
|
168
|
-
*/
|
169
|
-
static VALUE
|
170
|
-
action_set_visible(VALUE self, VALUE visible)
|
171
|
-
{
|
172
|
-
gtk_action_set_visible(_SELF(self), RVAL2CBOOL(visible));
|
173
|
-
return self;
|
174
|
-
}
|
175
|
-
|
176
160
|
static VALUE
|
177
161
|
action_get_accel_path(VALUE self)
|
178
162
|
{
|
@@ -238,18 +222,16 @@ Init_gtk_action()
|
|
238
222
|
rb_define_method(gAction, "block_activate_from", action_block_activate_from, 1);
|
239
223
|
rb_define_method(gAction, "unblock_activate_from", action_unblock_activate_from, 1);
|
240
224
|
rb_define_method(gAction, "set_accel_path", action_set_accel_path, 1);
|
225
|
+
G_DEF_SETTER(gAction, "accel_path");
|
241
226
|
rb_define_method(gAction, "set_accel_group", action_set_accel_group, 1);
|
227
|
+
G_DEF_SETTER(gAction, "accel_group");
|
242
228
|
|
243
229
|
#if GTK_CHECK_VERSION(2,6,0)
|
244
|
-
rb_define_method(gAction, "set_sensitive", action_set_sensitive, 1);
|
245
|
-
rb_define_method(gAction, "set_visible", action_set_visible, 1);
|
246
230
|
rb_define_method(gAction, "accel_path", action_get_accel_path, 0);
|
247
231
|
#endif
|
248
232
|
|
249
233
|
#if GTK_CHECK_VERSION(2,8,0)
|
250
234
|
rb_define_method(gAction, "accel_closure", action_get_accel_closure, 0);
|
251
235
|
#endif
|
252
|
-
|
253
|
-
G_DEF_SETTERS(gAction);
|
254
236
|
#endif
|
255
237
|
}
|
data/ext/gtk2/rbgtkactiongroup.c
CHANGED
@@ -83,7 +83,7 @@ activate_action(GtkAction *action, VALUE self)
|
|
83
83
|
static VALUE
|
84
84
|
actiongroup_add_actions(VALUE self, VALUE entries)
|
85
85
|
{
|
86
|
-
|
86
|
+
guint i;
|
87
87
|
VALUE action_procs;
|
88
88
|
guint n_entries = (guint)RARRAY_LEN(entries);
|
89
89
|
GtkActionEntry* gentries = g_new0(GtkActionEntry, n_entries);
|
@@ -149,7 +149,7 @@ activate_toggle_action(GtkAction *action, VALUE self)
|
|
149
149
|
static VALUE
|
150
150
|
actiongroup_add_toggle_actions(VALUE self, VALUE entries)
|
151
151
|
{
|
152
|
-
|
152
|
+
guint i;
|
153
153
|
VALUE toggle_action_procs;
|
154
154
|
guint n_entries = (guint)RARRAY_LEN(entries);
|
155
155
|
GtkToggleActionEntry* gentries = g_new0(GtkToggleActionEntry, n_entries);
|
@@ -216,7 +216,7 @@ static VALUE
|
|
216
216
|
actiongroup_add_radio_actions(int argc, VALUE *argv, VALUE self)
|
217
217
|
{
|
218
218
|
VALUE entries, value, proc;
|
219
|
-
|
219
|
+
guint i;
|
220
220
|
guint n_entries;
|
221
221
|
GtkRadioActionEntry* gentries;
|
222
222
|
|
@@ -273,11 +273,11 @@ actiongroup_add_radio_actions(int argc, VALUE *argv, VALUE self)
|
|
273
273
|
return self;
|
274
274
|
}
|
275
275
|
|
276
|
-
static gchar*
|
276
|
+
static gchar *
|
277
277
|
translate_func(const gchar *path, gpointer func)
|
278
278
|
{
|
279
279
|
VALUE ret = rb_funcall((VALUE)func, id_call, 1, CSTR2RVAL(path));
|
280
|
-
return RVAL2CSTR(ret);
|
280
|
+
return (gchar *)RVAL2CSTR(ret);
|
281
281
|
}
|
282
282
|
|
283
283
|
static VALUE
|
@@ -345,9 +345,9 @@ Init_gtk_actiongroup()
|
|
345
345
|
rb_define_method(gActionGroup, "add_radio_actions", actiongroup_add_radio_actions, -1);
|
346
346
|
rb_define_method(gActionGroup, "set_translate_func", actiongroup_set_translate_func, 0);
|
347
347
|
rb_define_method(gActionGroup, "set_translation_domain", actiongroup_set_translation_domain, 1);
|
348
|
+
G_DEF_SETTER(gActionGroup, "translation_domain");
|
348
349
|
#if GTK_CHECK_VERSION(2,6,0)
|
349
350
|
rb_define_method(gActionGroup, "translate_string", actiongroup_translate_string, 1);
|
350
351
|
#endif
|
351
|
-
G_DEF_SETTERS(gActionGroup);
|
352
352
|
#endif
|
353
353
|
}
|
data/ext/gtk2/rbgtkadjustment.c
CHANGED
@@ -52,68 +52,26 @@ adj_value_changed(VALUE self)
|
|
52
52
|
return self;
|
53
53
|
}
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
static VALUE
|
76
|
-
adj_get_upper(VALUE self)
|
77
|
-
{
|
78
|
-
return rb_float_new(_SELF(self)->upper);
|
79
|
-
}
|
80
|
-
|
81
|
-
static VALUE
|
82
|
-
adj_get_step_increment(VALUE self)
|
83
|
-
{
|
84
|
-
return rb_float_new(_SELF(self)->step_increment);
|
85
|
-
}
|
86
|
-
|
87
|
-
static VALUE
|
88
|
-
adj_set_step_increment(VALUE self, VALUE inc)
|
89
|
-
{
|
90
|
-
_SELF(self)->step_increment = NUM2DBL(inc);
|
91
|
-
return self;
|
92
|
-
}
|
93
|
-
|
94
|
-
static VALUE
|
95
|
-
adj_get_page_increment(VALUE self)
|
96
|
-
{
|
97
|
-
return rb_float_new(_SELF(self)->page_increment);
|
98
|
-
}
|
99
|
-
|
100
|
-
static VALUE
|
101
|
-
adj_set_page_increment(VALUE self, VALUE inc)
|
102
|
-
{
|
103
|
-
return _SELF(self)->page_increment = NUM2DBL(inc);
|
104
|
-
}
|
105
|
-
|
106
|
-
static VALUE
|
107
|
-
adj_get_page_size(VALUE self)
|
108
|
-
{
|
109
|
-
return rb_float_new(_SELF(self)->page_size);
|
110
|
-
}
|
111
|
-
|
112
|
-
static VALUE
|
113
|
-
adj_set_page_size(VALUE self, VALUE size)
|
114
|
-
{
|
115
|
-
return _SELF(self)->page_size = NUM2DBL(size);
|
116
|
-
}
|
55
|
+
/* Properties:
|
56
|
+
gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment);
|
57
|
+
void gtk_adjustment_set_value (GtkAdjustment *adjustment,
|
58
|
+
gdouble value);
|
59
|
+
gdouble gtk_adjustment_get_lower (GtkAdjustment *adjustment);
|
60
|
+
gdouble gtk_adjustment_get_page_increment (GtkAdjustment *adjustment);
|
61
|
+
gdouble gtk_adjustment_get_page_size (GtkAdjustment *adjustment);
|
62
|
+
gdouble gtk_adjustment_get_step_increment (GtkAdjustment *adjustment);
|
63
|
+
gdouble gtk_adjustment_get_upper (GtkAdjustment *adjustment);
|
64
|
+
void gtk_adjustment_set_lower (GtkAdjustment *adjustment,
|
65
|
+
gdouble lower);
|
66
|
+
void gtk_adjustment_set_page_increment (GtkAdjustment *adjustment,
|
67
|
+
gdouble page_increment);
|
68
|
+
void gtk_adjustment_set_page_size (GtkAdjustment *adjustment,
|
69
|
+
gdouble page_size);
|
70
|
+
void gtk_adjustment_set_step_increment (GtkAdjustment *adjustment,
|
71
|
+
gdouble step_increment);
|
72
|
+
void gtk_adjustment_set_upper (GtkAdjustment *adjustment,
|
73
|
+
gdouble upper);
|
74
|
+
*/
|
117
75
|
|
118
76
|
void
|
119
77
|
Init_gtk_adjustment()
|
@@ -121,19 +79,7 @@ Init_gtk_adjustment()
|
|
121
79
|
VALUE gAdjustment = G_DEF_CLASS(GTK_TYPE_ADJUSTMENT, "Adjustment", mGtk);
|
122
80
|
|
123
81
|
rb_define_method(gAdjustment, "initialize", adj_initialize, 6);
|
124
|
-
rb_define_method(gAdjustment, "set_value", adj_set_value, 1);
|
125
82
|
rb_define_method(gAdjustment, "clamp_page", adj_clamp_page, 2);
|
126
83
|
rb_define_method(gAdjustment, "changed", adj_changed, 0);
|
127
84
|
rb_define_method(gAdjustment, "value_changed", adj_value_changed, 0);
|
128
|
-
rb_define_method(gAdjustment, "value", adj_get_value, 0);
|
129
|
-
rb_define_method(gAdjustment, "lower", adj_get_lower, 0);
|
130
|
-
rb_define_method(gAdjustment, "upper", adj_get_upper, 0);
|
131
|
-
rb_define_method(gAdjustment, "step_increment", adj_get_step_increment, 0);
|
132
|
-
rb_define_method(gAdjustment, "set_step_increment", adj_set_step_increment, 1);
|
133
|
-
rb_define_method(gAdjustment, "page_increment", adj_get_page_increment, 0);
|
134
|
-
rb_define_method(gAdjustment, "set_page_increment", adj_set_page_increment, 1);
|
135
|
-
rb_define_method(gAdjustment, "page_size", adj_get_page_size, 0);
|
136
|
-
rb_define_method(gAdjustment, "set_page_size", adj_set_page_size, 1);
|
137
|
-
|
138
|
-
G_DEF_SETTERS(gAdjustment);
|
139
85
|
}
|
data/ext/gtk2/rbgtkbindingset.c
CHANGED
@@ -113,7 +113,7 @@ binding_entry_add_signal(int argc, VALUE *argv, VALUE self)
|
|
113
113
|
arg->d.long_data = 1;
|
114
114
|
} else if (rb_respond_to (param, rb_intern("to_str"))) {
|
115
115
|
arg->arg_type = G_TYPE_STRING;
|
116
|
-
arg->d.string_data = RVAL2CSTR(param);
|
116
|
+
arg->d.string_data = (gchar *)RVAL2CSTR(param);
|
117
117
|
} else {
|
118
118
|
rb_raise(rb_eTypeError,
|
119
119
|
"can not convert %s into String, Numeric, "
|
data/ext/gtk2/rbgtkbuilder.c
CHANGED
@@ -54,8 +54,9 @@ builder_add_from_string(VALUE self, VALUE string)
|
|
54
54
|
{
|
55
55
|
GError *error = NULL;
|
56
56
|
|
57
|
+
StringValue(string);
|
57
58
|
if (gtk_builder_add_from_string(_SELF(self),
|
58
|
-
|
59
|
+
RSTRING_PTR(string),
|
59
60
|
RSTRING_LEN(string),
|
60
61
|
&error) == 0)
|
61
62
|
RAISE_GERROR(error);
|
data/ext/gtk2/rbgtkbutton.c
CHANGED
@@ -57,13 +57,6 @@ button_released(VALUE self)
|
|
57
57
|
return self;
|
58
58
|
}
|
59
59
|
|
60
|
-
static VALUE
|
61
|
-
button_clicked(VALUE self)
|
62
|
-
{
|
63
|
-
gtk_button_clicked(_SELF(self));
|
64
|
-
return self;
|
65
|
-
}
|
66
|
-
|
67
60
|
static VALUE
|
68
61
|
button_enter(VALUE self)
|
69
62
|
{
|
@@ -129,13 +122,12 @@ Init_gtk_button()
|
|
129
122
|
rb_define_method(gButton, "initialize", button_initialize, -1);
|
130
123
|
rb_define_method(gButton, "pressed", button_pressed, 0);
|
131
124
|
rb_define_method(gButton, "released", button_released, 0);
|
132
|
-
rb_define_method(gButton, "clicked", button_clicked, 0);
|
133
125
|
rb_define_method(gButton, "enter", button_enter, 0);
|
134
126
|
rb_define_method(gButton, "leave", button_leave, 0);
|
135
127
|
|
136
128
|
#if GTK_CHECK_VERSION(2,4,0)
|
137
129
|
rb_define_method(gButton, "set_alignment", button_set_alignment, 2);
|
130
|
+
G_DEF_SETTER(gButton, "alignment");
|
138
131
|
rb_define_method(gButton, "alignment", button_get_alignment, 0);
|
139
132
|
#endif
|
140
|
-
G_DEF_SETTERS(gButton);
|
141
133
|
}
|
data/ext/gtk2/rbgtkcalendar.c
CHANGED
@@ -138,8 +138,8 @@ Init_gtk_calendar()
|
|
138
138
|
rb_define_method(gCalendar, "display_options", cal_get_display_options, -1);
|
139
139
|
#if GTK_CHECK_VERSION(2,4,0)
|
140
140
|
rb_define_method(gCalendar, "set_display_options", cal_set_display_options, 1);
|
141
|
+
G_DEF_SETTER(gCalendar, "display_options");
|
141
142
|
#endif
|
142
|
-
G_DEF_SETTERS(gCalendar);
|
143
143
|
|
144
144
|
G_DEF_CLASS(GTK_TYPE_CALENDAR_DISPLAY_OPTIONS, "DisplayOptions", gCalendar);
|
145
145
|
G_DEF_CONSTANTS(gCalendar, GTK_TYPE_CALENDAR_DISPLAY_OPTIONS, "GTK_CALENDAR_");
|
@@ -35,8 +35,7 @@ Init_gtk_cellrenderertext()
|
|
35
35
|
|
36
36
|
rb_define_method(renderer, "initialize", crtext_initialize, 0);
|
37
37
|
rb_define_method(renderer, "set_fixed_height_from_font", crtext_set_fixed_height_from_font, 1);
|
38
|
-
|
39
|
-
G_DEF_SETTERS(renderer);
|
38
|
+
G_DEF_SETTER(renderer, "fixed_height_from_font");
|
40
39
|
}
|
41
40
|
|
42
41
|
|
data/ext/gtk2/rbgtkcellview.c
CHANGED
@@ -51,14 +51,11 @@ cview_initialize(int argc, VALUE *argv, VALUE self)
|
|
51
51
|
return Qnil;
|
52
52
|
}
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
NIL_P(model) ? (GtkTreeModel*)NULL : GTK_TREE_MODEL(RVAL2GOBJ(model)));
|
60
|
-
return self;
|
61
|
-
}
|
54
|
+
/* Properties:
|
55
|
+
void gtk_cell_view_set_model (GtkCellView *cell_view,
|
56
|
+
GtkTreeModel *model);
|
57
|
+
GtkTreeModel * gtk_cell_view_get_model (GtkCellView *cell_view);
|
58
|
+
*/
|
62
59
|
|
63
60
|
static VALUE
|
64
61
|
cview_set_displayed_row(VALUE self, VALUE path)
|
@@ -111,13 +108,11 @@ Init_gtk_cellview()
|
|
111
108
|
id_text = rb_intern("text");
|
112
109
|
|
113
110
|
rb_define_method(cview, "initialize", cview_initialize, -1);
|
114
|
-
rb_define_method(cview, "set_model", cview_set_model, 1);
|
115
111
|
rb_define_method(cview, "set_displayed_row", cview_set_displayed_row, 1);
|
112
|
+
G_DEF_SETTER(cview, "displayed_row");
|
116
113
|
rb_define_method(cview, "displayed_row", cview_get_displayed_row, 0);
|
117
114
|
rb_define_method(cview, "get_size_of_row", cview_get_size_of_row, 1);
|
118
115
|
rb_define_method(cview, "cell_renderers", cview_get_cell_renderers, 0);
|
119
|
-
|
120
|
-
G_DEF_SETTERS(cview);
|
121
116
|
#endif
|
122
117
|
}
|
123
118
|
|