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/rbgtkiconview.c
CHANGED
@@ -138,19 +138,10 @@ iview_get_selected_items(VALUE self)
|
|
138
138
|
return ret;
|
139
139
|
}
|
140
140
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
return self;
|
146
|
-
}
|
147
|
-
|
148
|
-
static VALUE
|
149
|
-
iview_unselect_all(VALUE self)
|
150
|
-
{
|
151
|
-
gtk_icon_view_unselect_all(_SELF(self));
|
152
|
-
return self;
|
153
|
-
}
|
141
|
+
/* Defined as Signals
|
142
|
+
void gtk_icon_view_select_all (GtkIconView *icon_view);
|
143
|
+
void gtk_icon_view_unselect_all (GtkIconView *icon_view);
|
144
|
+
*/
|
154
145
|
|
155
146
|
static VALUE
|
156
147
|
iview_item_activated(VALUE self, VALUE path)
|
@@ -298,8 +289,6 @@ Init_gtk_iconview()
|
|
298
289
|
rb_define_method(iview, "unselect_path", iview_unselect_path, 1);
|
299
290
|
rb_define_method(iview, "path_is_selected?", iview_path_is_selected, 1);
|
300
291
|
rb_define_method(iview, "selected_items", iview_get_selected_items, 0);
|
301
|
-
rb_define_method(iview, "select_all", iview_select_all, 0);
|
302
|
-
rb_define_method(iview, "unselect_all", iview_unselect_all, 0);
|
303
292
|
rb_define_method(iview, "item_activated", iview_item_activated, 1);
|
304
293
|
#endif
|
305
294
|
#if GTK_CHECK_VERSION(2,8,0)
|
data/ext/gtk2/rbgtkimcontext.c
CHANGED
@@ -79,7 +79,7 @@ imcontext_set_surrounding(VALUE self, VALUE text, VALUE cursor_index)
|
|
79
79
|
{
|
80
80
|
StringValue(text);
|
81
81
|
gtk_im_context_set_surrounding(_SELF(self),
|
82
|
-
|
82
|
+
RSTRING_PTR(text), RSTRING_LEN(text),
|
83
83
|
NUM2INT(cursor_index));
|
84
84
|
return self;
|
85
85
|
}
|
data/ext/gtk2/rbgtkinvisible.c
CHANGED
@@ -32,20 +32,11 @@ invisible_initialize(int argc, VALUE *argv, VALUE self)
|
|
32
32
|
return Qnil;
|
33
33
|
}
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
return self;
|
41
|
-
}
|
42
|
-
|
43
|
-
static VALUE
|
44
|
-
invisible_get_screen(VALUE self)
|
45
|
-
{
|
46
|
-
return GOBJ2RVAL(gtk_invisible_get_screen(_SELF(self)));
|
47
|
-
}
|
48
|
-
#endif
|
35
|
+
/* Defined as Properties
|
36
|
+
void gtk_invisible_set_screen (GtkInvisible *invisible,
|
37
|
+
GdkScreen *screen);
|
38
|
+
GdkScreen * gtk_invisible_get_screen (GtkInvisible *invisible);
|
39
|
+
*/
|
49
40
|
|
50
41
|
void
|
51
42
|
Init_invisible()
|
@@ -53,11 +44,4 @@ Init_invisible()
|
|
53
44
|
VALUE gInvisible = G_DEF_CLASS(GTK_TYPE_INVISIBLE, "Invisible", mGtk);
|
54
45
|
|
55
46
|
rb_define_method(gInvisible, "initialize", invisible_initialize, -1);
|
56
|
-
|
57
|
-
#if GTK_CHECK_VERSION(2,2,0)
|
58
|
-
rb_define_method(gInvisible, "set_screen", invisible_set_screen, 1);
|
59
|
-
rb_define_method(gInvisible, "screen", invisible_get_screen, 0);
|
60
|
-
#endif
|
61
|
-
|
62
|
-
G_DEF_SETTERS(gInvisible);
|
63
47
|
}
|
data/ext/gtk2/rbgtkitemfactory.c
CHANGED
@@ -122,9 +122,9 @@ create_factory_entry(GtkItemFactoryEntry *entry, VALUE self, VALUE path, VALUE i
|
|
122
122
|
{
|
123
123
|
VALUE action;
|
124
124
|
|
125
|
-
entry->path = NIL_P(path) ? NULL : RVAL2CSTR(path);
|
126
|
-
entry->item_type = NIL_P(item_type) ? "<Branch>" : RVAL2CSTR(item_type);
|
127
|
-
entry->accelerator = NIL_P(accel) ? NULL : RVAL2CSTR(accel);
|
125
|
+
entry->path = (gchar *)(NIL_P(path) ? NULL : RVAL2CSTR(path));
|
126
|
+
entry->item_type = (gchar *)(NIL_P(item_type) ? "<Branch>" : RVAL2CSTR(item_type));
|
127
|
+
entry->accelerator = (gchar *)(NIL_P(accel) ? NULL : RVAL2CSTR(accel));
|
128
128
|
|
129
129
|
if (menuitem_type_check(entry->item_type) == 0) {
|
130
130
|
entry->callback = NULL;
|
data/ext/gtk2/rbgtklabel.c
CHANGED
@@ -147,6 +147,4 @@ Init_gtk_label()
|
|
147
147
|
rb_define_method(gLabel, "select_region", label_select_region, 2);
|
148
148
|
rb_define_method(gLabel, "layout", label_get_layout, 0);
|
149
149
|
rb_define_method(gLabel, "selection_bounds", label_get_selection_bounds, 0);
|
150
|
-
|
151
|
-
G_DEF_SETTERS(gLabel);
|
152
150
|
}
|
data/ext/gtk2/rbgtklinkbutton.c
CHANGED
data/ext/gtk2/rbgtkmain.c
CHANGED
@@ -87,7 +87,7 @@ gtk_m_init(int argc, VALUE *argv, VALUE self)
|
|
87
87
|
{
|
88
88
|
gint i, gargc;
|
89
89
|
VALUE argary;
|
90
|
-
|
90
|
+
char** gargv;
|
91
91
|
VALUE progname;
|
92
92
|
|
93
93
|
if (_initialized)
|
@@ -107,16 +107,13 @@ gtk_m_init(int argc, VALUE *argv, VALUE self)
|
|
107
107
|
|
108
108
|
gargv = ALLOCA_N(char *, gargc + 1);
|
109
109
|
progname = rb_gv_get("$0");
|
110
|
-
gargv[0] = RVAL2CSTR(progname);
|
110
|
+
gargv[0] = (char *)RVAL2CSTR(progname);
|
111
111
|
|
112
|
-
for (i = 0; i < gargc; i++)
|
113
|
-
if (TYPE(RARRAY_PTR(argary)[i]) == T_STRING)
|
114
|
-
gargv[i+1] = RVAL2CSTR(RARRAY_PTR(argary)[i]);
|
115
|
-
|
116
|
-
|
117
|
-
gargv[i+1] = "";
|
118
|
-
}
|
119
|
-
}
|
112
|
+
for (i = 0; i < gargc; i++)
|
113
|
+
if (TYPE(RARRAY_PTR(argary)[i]) == T_STRING)
|
114
|
+
gargv[i+1] = (char *)RVAL2CSTR(RARRAY_PTR(argary)[i]);
|
115
|
+
else
|
116
|
+
gargv[i+1] = (char *)"";
|
120
117
|
gargc++;
|
121
118
|
|
122
119
|
{
|
data/ext/gtk2/rbgtkmenu.c
CHANGED
@@ -98,32 +98,14 @@ menu_popup(VALUE self, VALUE pshell, VALUE pitem, VALUE button, VALUE activate_t
|
|
98
98
|
return self;
|
99
99
|
}
|
100
100
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
static VALUE
|
110
|
-
menu_get_accel_group(VALUE self)
|
111
|
-
{
|
112
|
-
return GOBJ2RVAL(gtk_menu_get_accel_group(_SELF(self)));
|
113
|
-
}
|
114
|
-
|
115
|
-
static VALUE
|
116
|
-
menu_set_accel_path(VALUE self, VALUE accel_path)
|
117
|
-
{
|
118
|
-
gtk_menu_set_accel_path(_SELF(self), RVAL2CSTR(accel_path));
|
119
|
-
return self;
|
120
|
-
}
|
121
|
-
|
122
|
-
static VALUE
|
123
|
-
menu_get_tearoff_state(VALUE self)
|
124
|
-
{
|
125
|
-
return CBOOL2RVAL(gtk_menu_get_tearoff_state(_SELF(self)));
|
126
|
-
}
|
101
|
+
/* Defined as Properties
|
102
|
+
gboolean gtk_menu_get_tearoff_state (GtkMenu *menu);
|
103
|
+
void gtk_menu_set_accel_group (GtkMenu *menu,
|
104
|
+
GtkAccelGroup *accel_group);
|
105
|
+
GtkAccelGroup * gtk_menu_get_accel_group (GtkMenu *menu);
|
106
|
+
void gtk_menu_set_accel_path (GtkMenu *menu,
|
107
|
+
const gchar *accel_path);
|
108
|
+
*/
|
127
109
|
|
128
110
|
static VALUE
|
129
111
|
menu_popdown(VALUE self)
|
@@ -139,28 +121,16 @@ menu_reposition(VALUE self)
|
|
139
121
|
return self;
|
140
122
|
}
|
141
123
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
{
|
153
|
-
gtk_menu_set_active(_SELF(self), NUM2INT(active));
|
154
|
-
return self;
|
155
|
-
}
|
156
|
-
|
157
|
-
static VALUE
|
158
|
-
menu_set_tearoff_state(VALUE self, VALUE torn_off)
|
159
|
-
{
|
160
|
-
gtk_menu_set_tearoff_state(_SELF(self), RVAL2CBOOL(torn_off));
|
161
|
-
return self;
|
162
|
-
}
|
163
|
-
|
124
|
+
/* Defined as Properties
|
125
|
+
GtkWidget * gtk_menu_get_active (GtkMenu *menu);
|
126
|
+
void gtk_menu_set_active (GtkMenu *menu,
|
127
|
+
guint index_);
|
128
|
+
void gtk_menu_set_tearoff_state (GtkMenu *menu,
|
129
|
+
gboolean torn_off);
|
130
|
+
void gtk_menu_set_monitor (GtkMenu *menu,
|
131
|
+
gint monitor_num);
|
132
|
+
gint gtk_menu_get_monitor (GtkMenu *menu);
|
133
|
+
*/
|
164
134
|
static VALUE menu_detacher;
|
165
135
|
static void
|
166
136
|
detach_func(GtkWidget *attach_widget, GtkMenu *menu)
|
@@ -187,11 +157,9 @@ menu_detach(VALUE self)
|
|
187
157
|
return self;
|
188
158
|
}
|
189
159
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
return GOBJ2RVAL(gtk_menu_get_attach_widget(_SELF(self)));
|
194
|
-
}
|
160
|
+
/* Defined as Properties
|
161
|
+
GtkWidget * gtk_menu_get_attach_widget (GtkMenu *menu);
|
162
|
+
*/
|
195
163
|
|
196
164
|
#if GTK_CHECK_VERSION(2,6,0)
|
197
165
|
static VALUE
|
@@ -202,14 +170,6 @@ menu_s_get_for_attach_widget(VALUE self, VALUE widget)
|
|
202
170
|
}
|
203
171
|
#endif
|
204
172
|
|
205
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
206
|
-
static VALUE
|
207
|
-
menu_set_monitor(VALUE self, VALUE monitor_num)
|
208
|
-
{
|
209
|
-
gtk_menu_set_monitor(_SELF(self), NUM2INT(monitor_num));
|
210
|
-
return self;
|
211
|
-
}
|
212
|
-
#endif
|
213
173
|
void
|
214
174
|
Init_gtk_menu()
|
215
175
|
{
|
@@ -218,6 +178,7 @@ Init_gtk_menu()
|
|
218
178
|
rb_define_method(gMenu, "initialize", menu_initialize, 0);
|
219
179
|
#if GTK_CHECK_VERSION(2,2,0)
|
220
180
|
rb_define_method(gMenu, "set_screen", menu_set_screen, 1);
|
181
|
+
G_DEF_SETTER(gMenu, "screen");
|
221
182
|
#endif
|
222
183
|
rb_define_method(gMenu, "reorder_child", menu_reorder_child, 2);
|
223
184
|
#if GTK_CHECK_VERSION(2,4,0)
|
@@ -226,22 +187,9 @@ Init_gtk_menu()
|
|
226
187
|
rb_define_method(gMenu, "popup", menu_popup, 4);
|
227
188
|
rb_define_method(gMenu, "popdown", menu_popdown, 0);
|
228
189
|
rb_define_method(gMenu, "reposition", menu_reposition, 0);
|
229
|
-
rb_define_method(gMenu, "set_accel_group", menu_set_accel_group, 1);
|
230
|
-
rb_define_method(gMenu, "accel_group", menu_get_accel_group, 0);
|
231
|
-
rb_define_method(gMenu, "set_accel_path", menu_set_accel_path, 1);
|
232
|
-
rb_define_method(gMenu, "tearoff_state?", menu_get_tearoff_state, 0);
|
233
|
-
rb_define_method(gMenu, "active", menu_get_active, 0);
|
234
|
-
rb_define_method(gMenu, "set_active", menu_set_active, 1);
|
235
|
-
rb_define_method(gMenu, "set_tearoff_state", menu_set_tearoff_state, 1);
|
236
190
|
rb_define_method(gMenu, "detach", menu_detach, 0);
|
237
|
-
rb_define_method(gMenu, "attach_widget", menu_get_attach_widget, 0);
|
238
191
|
#if GTK_CHECK_VERSION(2,6,0)
|
239
192
|
rb_define_singleton_method(gMenu, "get_for_attach_widget", menu_s_get_for_attach_widget, 1);
|
240
193
|
#endif
|
241
194
|
rb_define_method(gMenu, "attach_to_widget", menu_attach_to_widget, 1);
|
242
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
243
|
-
rb_define_method(gMenu, "set_monitor", menu_set_monitor, 1);
|
244
|
-
#endif
|
245
|
-
|
246
|
-
G_DEF_SETTERS(gMenu);
|
247
195
|
}
|
data/ext/gtk2/rbgtkmenuitem.c
CHANGED
@@ -41,12 +41,12 @@ mitem_initialize(int argc, VALUE *argv, VALUE self)
|
|
41
41
|
return Qnil;
|
42
42
|
}
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
44
|
+
/* Defined as Properties
|
45
|
+
void gtk_menu_item_set_right_justified (GtkMenuItem *menu_item,
|
46
|
+
gboolean right_justified);
|
47
|
+
gboolean gtk_menu_item_get_right_justified (GtkMenuItem *menu_item);
|
48
|
+
GtkWidget * gtk_menu_item_get_submenu (GtkMenuItem *menu_item);
|
49
|
+
*/
|
50
50
|
|
51
51
|
static VALUE
|
52
52
|
mitem_set_submenu(VALUE self, VALUE child)
|
@@ -64,12 +64,10 @@ mitem_set_submenu(VALUE self, VALUE child)
|
|
64
64
|
return self;
|
65
65
|
}
|
66
66
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
return self;
|
72
|
-
}
|
67
|
+
/* Defined as Properties
|
68
|
+
void gtk_menu_item_set_accel_path (GtkMenuItem *menu_item,
|
69
|
+
const gchar *accel_path);
|
70
|
+
*/
|
73
71
|
|
74
72
|
static VALUE
|
75
73
|
mitem_remove_submenu(VALUE self)
|
@@ -86,26 +84,11 @@ mitem_remove_submenu(VALUE self)
|
|
86
84
|
return self;
|
87
85
|
}
|
88
86
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
}
|
95
|
-
|
96
|
-
static VALUE
|
97
|
-
mitem_deselect(VALUE self)
|
98
|
-
{
|
99
|
-
gtk_menu_item_deselect(_SELF(self));
|
100
|
-
return self;
|
101
|
-
}
|
102
|
-
|
103
|
-
static VALUE
|
104
|
-
mitem_activate(VALUE self)
|
105
|
-
{
|
106
|
-
gtk_menu_item_activate(_SELF(self));
|
107
|
-
return self;
|
108
|
-
}
|
87
|
+
/* Defined as Signals
|
88
|
+
void gtk_menu_item_select (GtkMenuItem *menu_item);
|
89
|
+
void gtk_menu_item_deselect (GtkMenuItem *menu_item);
|
90
|
+
void gtk_menu_item_activate (GtkMenuItem *menu_item);
|
91
|
+
*/
|
109
92
|
|
110
93
|
static VALUE
|
111
94
|
mitem_toggle_size_request(VALUE self)
|
@@ -122,36 +105,14 @@ mitem_toggle_size_allocate(VALUE self, VALUE allocation)
|
|
122
105
|
return self;
|
123
106
|
}
|
124
107
|
|
125
|
-
static VALUE
|
126
|
-
mitem_get_right_justified(VALUE self)
|
127
|
-
{
|
128
|
-
return CBOOL2RVAL(gtk_menu_item_get_right_justified(_SELF(self)));
|
129
|
-
}
|
130
|
-
|
131
|
-
static VALUE
|
132
|
-
mitem_get_submenu(VALUE self)
|
133
|
-
{
|
134
|
-
GtkWidget* submenu = gtk_menu_item_get_submenu(_SELF(self));
|
135
|
-
return submenu ? GOBJ2RVAL(submenu) : Qnil;
|
136
|
-
}
|
137
|
-
|
138
108
|
void
|
139
109
|
Init_gtk_menu_item()
|
140
110
|
{
|
141
111
|
VALUE gMenuItem = G_DEF_CLASS(GTK_TYPE_MENU_ITEM, "MenuItem", mGtk);
|
142
112
|
|
143
113
|
rb_define_method(gMenuItem, "initialize", mitem_initialize, -1);
|
144
|
-
|
145
|
-
rb_define_method(gMenuItem, "set_submenu", mitem_set_submenu, 1);
|
146
|
-
rb_define_method(gMenuItem, "set_accel_path", mitem_set_accel_path, 1);
|
114
|
+
G_REPLACE_SET_PROPERTY(gMenuItem, "submenu", mitem_set_submenu, 1);
|
147
115
|
rb_define_method(gMenuItem, "remove_submenu", mitem_remove_submenu, 0);
|
148
|
-
rb_define_method(gMenuItem, "select", mitem_select, 0);
|
149
|
-
rb_define_method(gMenuItem, "deselect", mitem_deselect, 0);
|
150
|
-
rb_define_method(gMenuItem, "activate", mitem_activate, 0);
|
151
116
|
rb_define_method(gMenuItem, "toggle_size_request", mitem_toggle_size_request, 0);
|
152
117
|
rb_define_method(gMenuItem, "toggle_size_allocate", mitem_toggle_size_allocate, 1);
|
153
|
-
rb_define_method(gMenuItem, "right_justified?", mitem_get_right_justified, 0);
|
154
|
-
rb_define_method(gMenuItem, "submenu", mitem_get_submenu, 0);
|
155
|
-
|
156
|
-
G_DEF_SETTERS(gMenuItem);
|
157
118
|
}
|
data/ext/gtk2/rbgtkmenushell.c
CHANGED
@@ -80,14 +80,9 @@ mshell_activate_item(VALUE self, VALUE menu_item, VALUE force_deactivate)
|
|
80
80
|
return self;
|
81
81
|
}
|
82
82
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
{
|
87
|
-
gtk_menu_shell_cancel(_SELF(self));
|
88
|
-
return self;
|
89
|
-
}
|
90
|
-
#endif
|
83
|
+
/* Defined as Signals
|
84
|
+
void gtk_menu_shell_cancel (GtkMenuShell *menu_shell);
|
85
|
+
*/
|
91
86
|
|
92
87
|
/* Defined as properties
|
93
88
|
void gtk_menu_shell_set_take_focus (GtkMenuShell *menu_shell,
|
@@ -110,9 +105,6 @@ Init_gtk_menu_shell()
|
|
110
105
|
#endif
|
111
106
|
rb_define_method(gMenuShell, "deselect", mshell_deselect, 0);
|
112
107
|
rb_define_method(gMenuShell, "activate_item", mshell_activate_item, 2);
|
113
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
114
|
-
rb_define_method(gMenuShell, "cancel", mshell_cancel, 0);
|
115
|
-
#endif
|
116
108
|
/* GtkMenuDirectionType */
|
117
109
|
G_DEF_CLASS(GTK_TYPE_MENU_DIRECTION_TYPE, "DirectionType", gMenuShell);
|
118
110
|
G_DEF_CONSTANTS(gMenuShell, GTK_TYPE_MENU_DIRECTION_TYPE, "GTK_MENU_");
|
@@ -55,21 +55,16 @@ void gtk_message_dialog_set_image (GtkMessageDialog *dialog,
|
|
55
55
|
GtkWidget *image);
|
56
56
|
*/
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
{
|
69
|
-
gtk_message_dialog_format_secondary_markup(_SELF(self), RVAL2CSTR(markup), NULL);
|
70
|
-
return self;
|
71
|
-
}
|
72
|
-
#endif
|
58
|
+
/* Not needed in Ruby
|
59
|
+
void gtk_message_dialog_format_secondary_text
|
60
|
+
(GtkMessageDialog *message_dialog,
|
61
|
+
const gchar *message_format,
|
62
|
+
...);
|
63
|
+
void gtk_message_dialog_format_secondary_markup
|
64
|
+
(GtkMessageDialog *message_dialog,
|
65
|
+
const gchar *message_format,
|
66
|
+
...);
|
67
|
+
*/
|
73
68
|
|
74
69
|
void
|
75
70
|
Init_gtk_message_dialog()
|
@@ -79,12 +74,8 @@ Init_gtk_message_dialog()
|
|
79
74
|
rb_define_method(gMessageDialog, "initialize", mdiag_initialize, -1);
|
80
75
|
#if GTK_CHECK_VERSION(2,4,0)
|
81
76
|
rb_define_method(gMessageDialog, "set_markup", mdiag_set_markup, 1);
|
77
|
+
G_DEF_SETTER(gMessageDialog, "markup");
|
82
78
|
#endif
|
83
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
84
|
-
rb_define_method(gMessageDialog, "set_secondary_text", mdiag_format_secondary_text, 1);
|
85
|
-
rb_define_method(gMessageDialog, "set_secondary_markup", mdiag_format_secondary_markup, 1);
|
86
|
-
#endif
|
87
|
-
G_DEF_SETTERS(gMessageDialog);
|
88
79
|
|
89
80
|
/* GtkMessageType */
|
90
81
|
G_DEF_CLASS(GTK_TYPE_MESSAGE_TYPE, "Type", gMessageDialog);
|