diff options
Diffstat (limited to 'example')
-rw-r--r-- | example/simple-client-vala.c | 158 | ||||
-rw-r--r-- | example/simple-client-vala.vala | 36 |
2 files changed, 101 insertions, 93 deletions
diff --git a/example/simple-client-vala.c b/example/simple-client-vala.c index afe5a1e..4307157 100644 --- a/example/simple-client-vala.c +++ b/example/simple-client-vala.c @@ -1,4 +1,4 @@ -/* simple-client-vala.c generated by valac 0.14.2, the Vala compiler +/* simple-client-vala.c generated by valac 0.15.2, the Vala compiler * generated from simple-client-vala.vala, do not modify */ /* @@ -110,31 +110,27 @@ enum { static void simple_client_toggle_sensitivity (SimpleClient* self, GtkWidget* widget); static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item); static Block1Data* block1_data_ref (Block1Data* _data1_); -static void block1_data_unref (Block1Data* _data1_); -static void __lambda0_ (SimpleClient* self); -static void ___lambda0__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void __lambda1_ (Block1Data* _data1_); -static void ___lambda1__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void block1_data_unref (void * _userdata_); static void __lambda2_ (SimpleClient* self); static void ___lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void __lambda3_ (SimpleClient* self); +static void __lambda3_ (Block1Data* _data1_); static void ___lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void __lambda4_ (SimpleClient* self); +static void ___lambda4__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void __lambda5_ (SimpleClient* self); +static void ___lambda5__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void simple_client_label_toggle (SimpleClient* self, GtkMenuItem* item); static Block2Data* block2_data_ref (Block2Data* _data2_); -static void block2_data_unref (Block2Data* _data2_); -static void __lambda4_ (SimpleClient* self, gint delta, guint direction); -static void ___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self); -static gboolean __lambda5_ (SimpleClient* self); -static gboolean ___lambda5__gsource_func (gpointer self); -static void __lambda6_ (SimpleClient* self); -static void ___lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void block2_data_unref (void * _userdata_); +static void __lambda6_ (SimpleClient* self, gint delta, guint direction); +static void ___lambda6__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self); +static gboolean __lambda7_ (SimpleClient* self); +static gboolean ___lambda7__gsource_func (gpointer self); +static void __lambda8_ (SimpleClient* self); +static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void _g_object_unref0_ (gpointer var); static void _g_slist_free__g_object_unref0_ (GSList* self); -static void __lambda7_ (SimpleClient* self); -static void ___lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void __lambda8_ (Block2Data* _data2_); -static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void __lambda9_ (Block2Data* _data2_); +static void __lambda9_ (SimpleClient* self); static void ___lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void __lambda10_ (Block2Data* _data2_); static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); @@ -142,6 +138,10 @@ static void __lambda11_ (Block2Data* _data2_); static void ___lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void __lambda12_ (Block2Data* _data2_); static void ___lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void __lambda13_ (Block2Data* _data2_); +static void ___lambda13__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void __lambda14_ (Block2Data* _data2_); +static void ___lambda14__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); static void simple_client_finalize (SimpleClient* obj); @@ -218,22 +218,26 @@ static Block1Data* block1_data_ref (Block1Data* _data1_) { } -static void block1_data_unref (Block1Data* _data1_) { +static void block1_data_unref (void * _userdata_) { + Block1Data* _data1_; + _data1_ = (Block1Data*) _userdata_; if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { - _simple_client_unref0 (_data1_->self); + SimpleClient * self; + self = _data1_->self; _g_object_unref0 (_data1_->prev_mi); + _simple_client_unref0 (self); g_slice_free (Block1Data, _data1_); } } -static void __lambda0_ (SimpleClient* self) { +static void __lambda2_ (SimpleClient* self) { g_print ("Sub1\n"); } -static void ___lambda0__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda0_ (self); +static void ___lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda2_ (self); } @@ -242,29 +246,29 @@ static gpointer _g_object_ref0 (gpointer self) { } -static void __lambda1_ (Block1Data* _data1_) { +static void __lambda3_ (Block1Data* _data1_) { SimpleClient * self; self = _data1_->self; simple_client_toggle_sensitivity (self, (GtkWidget*) _data1_->prev_mi); } -static void ___lambda1__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda1_ (self); +static void ___lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda3_ (self); } -static void __lambda2_ (SimpleClient* self) { +static void __lambda4_ (SimpleClient* self) { g_print ("Sub3\n"); } -static void ___lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda2_ (self); +static void ___lambda4__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda4_ (self); } -static void __lambda3_ (SimpleClient* self) { +static void __lambda5_ (SimpleClient* self) { AppIndicator* _tmp0_; AppIndicatorStatus _tmp1_ = 0; _tmp0_ = self->priv->ci; @@ -281,8 +285,8 @@ static void __lambda3_ (SimpleClient* self) { } -static void ___lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda3_ (self); +static void ___lambda5__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda5_ (self); } @@ -328,7 +332,7 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) _tmp4_ = mi; gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp4_); _tmp5_ = mi; - g_signal_connect (_tmp5_, "activate", (GCallback) ___lambda0__gtk_menu_item_activate, self); + g_signal_connect (_tmp5_, "activate", (GCallback) ___lambda2__gtk_menu_item_activate, self); _tmp6_ = mi; _tmp7_ = _g_object_ref0 (_tmp6_); _data1_->prev_mi = _tmp7_; @@ -339,7 +343,7 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) _tmp10_ = mi; gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp10_); _tmp11_ = mi; - g_signal_connect_data (_tmp11_, "activate", (GCallback) ___lambda1__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); + g_signal_connect_data (_tmp11_, "activate", (GCallback) ___lambda3__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); _tmp12_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 3"); _tmp13_ = g_object_ref_sink (_tmp12_); _g_object_unref0 (mi); @@ -347,7 +351,7 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) _tmp14_ = mi; gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp14_); _tmp15_ = mi; - g_signal_connect (_tmp15_, "activate", (GCallback) ___lambda2__gtk_menu_item_activate, self); + g_signal_connect (_tmp15_, "activate", (GCallback) ___lambda4__gtk_menu_item_activate, self); _tmp16_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle Attention"); _tmp17_ = g_object_ref_sink (_tmp16_); _g_object_unref0 (mi); @@ -355,7 +359,7 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) _tmp18_ = mi; gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp18_); _tmp19_ = mi; - g_signal_connect (_tmp19_, "activate", (GCallback) ___lambda3__gtk_menu_item_activate, self); + g_signal_connect (_tmp19_, "activate", (GCallback) ___lambda5__gtk_menu_item_activate, self); _tmp20_ = self->priv->ci; _tmp21_ = mi; app_indicator_set_secondary_activate_target (_tmp20_, (GtkWidget*) _tmp21_); @@ -395,20 +399,24 @@ static Block2Data* block2_data_ref (Block2Data* _data2_) { } -static void block2_data_unref (Block2Data* _data2_) { +static void block2_data_unref (void * _userdata_) { + Block2Data* _data2_; + _data2_ = (Block2Data*) _userdata_; if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) { - _simple_client_unref0 (_data2_->self); + SimpleClient * self; + self = _data2_->self; _g_object_unref0 (_data2_->icon); _g_object_unref0 (_data2_->show); _g_object_unref0 (_data2_->att); _g_object_unref0 (_data2_->imgitem); _g_object_unref0 (_data2_->submenu); + _simple_client_unref0 (self); g_slice_free (Block2Data, _data2_); } } -static void __lambda4_ (SimpleClient* self, gint delta, guint direction) { +static void __lambda6_ (SimpleClient* self, gint delta, guint direction) { gint _tmp0_; gchar* _tmp1_ = NULL; gchar* _tmp2_; @@ -432,12 +440,12 @@ static void __lambda4_ (SimpleClient* self, gint delta, guint direction) { } -static void ___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self) { - __lambda4_ (self, delta, direction); +static void ___lambda6__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self) { + __lambda6_ (self, delta, direction); } -static gboolean __lambda5_ (SimpleClient* self) { +static gboolean __lambda7_ (SimpleClient* self) { gboolean result = FALSE; gint _tmp0_; gboolean _tmp1_; @@ -470,20 +478,20 @@ static gboolean __lambda5_ (SimpleClient* self) { } -static gboolean ___lambda5__gsource_func (gpointer self) { +static gboolean ___lambda7__gsource_func (gpointer self) { gboolean result; - result = __lambda5_ (self); + result = __lambda7_ (self); return result; } -static void __lambda6_ (SimpleClient* self) { +static void __lambda8_ (SimpleClient* self) { g_print ("1\n"); } -static void ___lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda6_ (self); +static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda8_ (self); } @@ -498,29 +506,29 @@ static void _g_slist_free__g_object_unref0_ (GSList* self) { } -static void __lambda7_ (SimpleClient* self) { +static void __lambda9_ (SimpleClient* self) { g_print ("2\n"); } -static void ___lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda7_ (self); +static void ___lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda9_ (self); } -static void __lambda8_ (Block2Data* _data2_) { +static void __lambda10_ (Block2Data* _data2_) { SimpleClient * self; self = _data2_->self; simple_client_toggle_sensitivity (self, (GtkWidget*) _data2_->submenu); } -static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda8_ (self); +static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda10_ (self); } -static void __lambda9_ (Block2Data* _data2_) { +static void __lambda11_ (Block2Data* _data2_) { SimpleClient * self; GtkWidget* _tmp0_ = NULL; GtkImage* _tmp1_; @@ -534,12 +542,12 @@ static void __lambda9_ (Block2Data* _data2_) { } -static void ___lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda9_ (self); +static void ___lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda11_ (self); } -static void __lambda10_ (Block2Data* _data2_) { +static void __lambda12_ (Block2Data* _data2_) { SimpleClient * self; gboolean _tmp0_; self = _data2_->self; @@ -560,24 +568,24 @@ static void __lambda10_ (Block2Data* _data2_) { } -static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda10_ (self); +static void ___lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda12_ (self); } -static void __lambda11_ (Block2Data* _data2_) { +static void __lambda13_ (Block2Data* _data2_) { SimpleClient * self; self = _data2_->self; simple_client_label_toggle (self, _data2_->show); } -static void ___lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda11_ (self); +static void ___lambda13__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda13_ (self); } -static void __lambda12_ (Block2Data* _data2_) { +static void __lambda14_ (Block2Data* _data2_) { SimpleClient * self; gboolean _tmp0_ = FALSE; self = _data2_->self; @@ -594,8 +602,8 @@ static void __lambda12_ (Block2Data* _data2_) { } -static void ___lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { - __lambda12_ (self); +static void ___lambda14__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda14_ (self); } @@ -640,8 +648,8 @@ void simple_client_run (SimpleClient* self) { _data2_->_ref_count_ = 1; _data2_->self = simple_client_ref (self); _tmp0_ = self->priv->ci; - g_signal_connect (_tmp0_, "scroll-event", (GCallback) ___lambda4__app_indicator_scroll_event, self); - g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda5__gsource_func, simple_client_ref (self), simple_client_unref); + g_signal_connect (_tmp0_, "scroll-event", (GCallback) ___lambda6__app_indicator_scroll_event, self); + g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda7__gsource_func, simple_client_ref (self), simple_client_unref); _tmp1_ = (GtkMenu*) gtk_menu_new (); _tmp2_ = g_object_ref_sink (_tmp1_); _g_object_unref0 (self->priv->menu); @@ -649,7 +657,7 @@ void simple_client_run (SimpleClient* self) { _tmp3_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("1"); _tmp4_ = g_object_ref_sink (_tmp3_); chk = _tmp4_; - g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) ___lambda6__gtk_menu_item_activate, self); + g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) ___lambda8__gtk_menu_item_activate, self); _tmp5_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp5_, (GtkWidget*) ((GtkMenuItem*) chk)); gtk_widget_show ((GtkWidget*) chk); @@ -659,7 +667,7 @@ void simple_client_run (SimpleClient* self) { _tmp9_ = _tmp8_; __g_slist_free__g_object_unref0_0 (_tmp6_); radio = _tmp9_; - g_signal_connect ((GtkMenuItem*) radio, "activate", (GCallback) ___lambda7__gtk_menu_item_activate, self); + g_signal_connect ((GtkMenuItem*) radio, "activate", (GCallback) ___lambda9__gtk_menu_item_activate, self); _tmp10_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp10_, (GtkWidget*) ((GtkMenuItem*) radio)); gtk_widget_show ((GtkWidget*) radio); @@ -673,21 +681,21 @@ void simple_client_run (SimpleClient* self) { _tmp14_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle 3"); _tmp15_ = g_object_ref_sink (_tmp14_); toggle_item = _tmp15_; - g_signal_connect_data (toggle_item, "activate", (GCallback) ___lambda8__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data (toggle_item, "activate", (GCallback) ___lambda10__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp16_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp16_, (GtkWidget*) toggle_item); gtk_widget_show ((GtkWidget*) toggle_item); _tmp17_ = (GtkImageMenuItem*) gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL); _tmp18_ = g_object_ref_sink (_tmp17_); _data2_->imgitem = _tmp18_; - g_signal_connect_data ((GtkMenuItem*) _data2_->imgitem, "activate", (GCallback) ___lambda9__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data ((GtkMenuItem*) _data2_->imgitem, "activate", (GCallback) ___lambda11__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp19_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp19_, (GtkWidget*) ((GtkMenuItem*) _data2_->imgitem)); gtk_widget_show ((GtkWidget*) _data2_->imgitem); _tmp20_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Get Attention"); _tmp21_ = g_object_ref_sink (_tmp20_); _data2_->att = _tmp21_; - g_signal_connect_data (_data2_->att, "activate", (GCallback) ___lambda10__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data (_data2_->att, "activate", (GCallback) ___lambda12__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp22_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp22_, (GtkWidget*) _data2_->att); gtk_widget_show ((GtkWidget*) _data2_->att); @@ -695,14 +703,14 @@ void simple_client_run (SimpleClient* self) { _tmp24_ = g_object_ref_sink (_tmp23_); _data2_->show = _tmp24_; simple_client_label_toggle (self, _data2_->show); - g_signal_connect_data (_data2_->show, "activate", (GCallback) ___lambda11__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data (_data2_->show, "activate", (GCallback) ___lambda13__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp25_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp25_, (GtkWidget*) _data2_->show); gtk_widget_show ((GtkWidget*) _data2_->show); _tmp26_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("Set Local Icon"); _tmp27_ = g_object_ref_sink (_tmp26_); _data2_->icon = _tmp27_; - g_signal_connect_data ((GtkMenuItem*) _data2_->icon, "activate", (GCallback) ___lambda12__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + g_signal_connect_data ((GtkMenuItem*) _data2_->icon, "activate", (GCallback) ___lambda14__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); _tmp28_ = self->priv->menu; gtk_menu_shell_append ((GtkMenuShell*) _tmp28_, (GtkWidget*) ((GtkMenuItem*) _data2_->icon)); gtk_widget_show ((GtkWidget*) _data2_->icon); diff --git a/example/simple-client-vala.vala b/example/simple-client-vala.vala index 1b8bad9..f8cd874 100644 --- a/example/simple-client-vala.vala +++ b/example/simple-client-vala.vala @@ -30,7 +30,7 @@ static int main(string[] args) { } class SimpleClient { - Menu menu; + Gtk.Menu menu; Indicator ci; int percentage; bool active; @@ -56,24 +56,24 @@ class SimpleClient { widget.set_sensitive(!widget.is_sensitive()); } - private void append_submenu(MenuItem item) { - var menu = new Menu(); - MenuItem mi; + private void append_submenu(Gtk.MenuItem item) { + var menu = new Gtk.Menu(); + Gtk.MenuItem mi; - mi = new MenuItem.with_label("Sub 1"); + mi = new Gtk.MenuItem.with_label("Sub 1"); menu.append(mi); mi.activate.connect(() => { print("Sub1\n"); }); - MenuItem prev_mi = mi; - mi = new MenuItem.with_label("Sub 2"); + Gtk.MenuItem prev_mi = mi; + mi = new Gtk.MenuItem.with_label("Sub 2"); menu.append(mi); mi.activate.connect(() => { toggle_sensitivity(prev_mi); }); - mi = new MenuItem.with_label("Sub 3"); + mi = new Gtk.MenuItem.with_label("Sub 3"); menu.append(mi); mi.activate.connect(() => { print("Sub3\n"); }); - mi = new MenuItem.with_label("Toggle Attention"); + mi = new Gtk.MenuItem.with_label("Toggle Attention"); menu.append(mi); mi.activate.connect(() => { if (ci.get_status() == IndicatorStatus.ATTENTION) @@ -88,7 +88,7 @@ class SimpleClient { item.set_submenu(menu); } - private void label_toggle(MenuItem item) { + private void label_toggle(Gtk.MenuItem item) { can_haz_label = !can_haz_label; if (can_haz_label) { @@ -114,28 +114,28 @@ class SimpleClient { return true; }); - menu = new Menu(); + menu = new Gtk.Menu(); var chk = new CheckMenuItem.with_label("1"); chk.activate.connect(() => { print("1\n"); }); menu.append(chk); chk.show(); - var radio = new RadioMenuItem.with_label(new SList<RadioMenuItem>(), "2"); + var radio = new Gtk.RadioMenuItem.with_label(new SList<RadioMenuItem>(), "2"); radio.activate.connect(() => { print("2\n"); }); menu.append(radio); radio.show(); - var submenu = new MenuItem.with_label("3"); + var submenu = new Gtk.MenuItem.with_label("3"); menu.append(submenu); append_submenu(submenu); submenu.show(); - var toggle_item = new MenuItem.with_label("Toggle 3"); + var toggle_item = new Gtk.MenuItem.with_label("Toggle 3"); toggle_item.activate.connect(() => { toggle_sensitivity(submenu); }); menu.append(toggle_item); toggle_item.show(); - var imgitem = new ImageMenuItem.from_stock(Stock.NEW, null); + var imgitem = new Gtk.ImageMenuItem.from_stock(Stock.NEW, null); imgitem.activate.connect(() => { Image img = (Image) imgitem.get_image(); img.set_from_stock(Stock.OPEN, IconSize.MENU); @@ -143,7 +143,7 @@ class SimpleClient { menu.append(imgitem); imgitem.show(); - var att = new MenuItem.with_label("Get Attention"); + var att = new Gtk.MenuItem.with_label("Get Attention"); att.activate.connect(() => { if (active) { ci.set_status(IndicatorStatus.ATTENTION); @@ -158,13 +158,13 @@ class SimpleClient { menu.append(att); att.show(); - var show = new MenuItem.with_label("Show Label"); + var show = new Gtk.MenuItem.with_label("Show Label"); label_toggle(show); show.activate.connect(() => { label_toggle(show); }); menu.append(show); show.show(); - var icon = new CheckMenuItem.with_label("Set Local Icon"); + var icon = new Gtk.CheckMenuItem.with_label("Set Local Icon"); icon.activate.connect(() => { if (icon.get_active()) { ci.set_icon("simple-client-test-icon.png"); |