aboutsummaryrefslogtreecommitdiff
path: root/example/simple-client-vala.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-28 12:45:50 -0500
committerTed Gould <ted@gould.cx>2011-09-28 12:45:50 -0500
commit334e44dbb08303113ece1baf163ab7d9dd5561a4 (patch)
tree765b00b205818a44b7059322215814abe43d9c8c /example/simple-client-vala.c
parente57397eda0ea76153a6d9aa9e34ba7e214bd50ad (diff)
parenta0119770c6e87433e7b43ec78fe1b17aaf315d71 (diff)
downloadlibayatana-appindicator-334e44dbb08303113ece1baf163ab7d9dd5561a4.tar.gz
libayatana-appindicator-334e44dbb08303113ece1baf163ab7d9dd5561a4.tar.bz2
libayatana-appindicator-334e44dbb08303113ece1baf163ab7d9dd5561a4.zip
Import upstream version 0.4.1
Diffstat (limited to 'example/simple-client-vala.c')
-rw-r--r--example/simple-client-vala.c512
1 files changed, 319 insertions, 193 deletions
diff --git a/example/simple-client-vala.c b/example/simple-client-vala.c
index fa77cb5..08306c3 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.12.1, the Vala compiler
+/* simple-client-vala.c generated by valac 0.14.0, the Vala compiler
* generated from simple-client-vala.vala, do not modify */
/*
@@ -111,46 +111,50 @@ static void simple_client_toggle_sensitivity (SimpleClient* self, GtkWidget* wid
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 _lambda2_ (SimpleClient* self);
-static void __lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
-static void _lambda3_ (SimpleClient* self);
-static void __lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+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 __lambda2_ (SimpleClient* self);
+static void ___lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void __lambda3_ (SimpleClient* self);
+static void ___lambda3__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_ (gint delta, guint direction, SimpleClient* self);
-static void __lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint indicator, guint delta, 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 __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 _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__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
-static void _lambda10_ (Block2Data* _data2_);
-static void __lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
-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 __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__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void __lambda10_ (Block2Data* _data2_);
+static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+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 simple_client_finalize (SimpleClient* obj);
gint _vala_main (gchar** args, int args_length1) {
gint result = 0;
- SimpleClient* _tmp0_ = NULL;
+ gchar** _tmp0_;
+ gint _tmp0__length1;
+ SimpleClient* _tmp1_;
SimpleClient* sc;
- _tmp0_ = simple_client_new (args, args_length1);
- sc = _tmp0_;
+ _tmp0_ = args;
+ _tmp0__length1 = args_length1;
+ _tmp1_ = simple_client_new (_tmp0_, _tmp0__length1);
+ sc = _tmp1_;
simple_client_run (sc);
result = 0;
_simple_client_unref0 (sc);
@@ -166,15 +170,21 @@ int main (int argc, char ** argv) {
SimpleClient* simple_client_construct (GType object_type, gchar** args, int args_length1) {
SimpleClient* self = NULL;
- AppIndicator* _tmp0_ = NULL;
+ AppIndicator* _tmp0_;
+ AppIndicator* _tmp1_;
+ AppIndicator* _tmp2_;
+ AppIndicator* _tmp3_;
self = (SimpleClient*) g_type_create_instance (object_type);
gtk_init (&args_length1, &args);
_tmp0_ = app_indicator_new ("example-simple-client", "indicator-messages", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
_g_object_unref0 (self->priv->ci);
self->priv->ci = _tmp0_;
- app_indicator_set_status (self->priv->ci, APP_INDICATOR_STATUS_ACTIVE);
- app_indicator_set_attention_icon (self->priv->ci, "indicator-messages-new");
- app_indicator_set_label (self->priv->ci, "1%", "100%");
+ _tmp1_ = self->priv->ci;
+ app_indicator_set_status (_tmp1_, APP_INDICATOR_STATUS_ACTIVE);
+ _tmp2_ = self->priv->ci;
+ app_indicator_set_attention_icon (_tmp2_, "indicator-messages-new");
+ _tmp3_ = self->priv->ci;
+ app_indicator_set_label (_tmp3_, "1%", "100%");
self->priv->active = TRUE;
self->priv->can_haz_label = TRUE;
return self;
@@ -187,11 +197,15 @@ SimpleClient* simple_client_new (gchar** args, int args_length1) {
static void simple_client_toggle_sensitivity (SimpleClient* self, GtkWidget* widget) {
- gboolean _tmp0_;
+ GtkWidget* _tmp0_;
+ GtkWidget* _tmp1_;
+ gboolean _tmp2_ = FALSE;
g_return_if_fail (self != NULL);
g_return_if_fail (widget != NULL);
- _tmp0_ = gtk_widget_is_sensitive (widget);
- gtk_widget_set_sensitive (widget, !_tmp0_);
+ _tmp0_ = widget;
+ _tmp1_ = widget;
+ _tmp2_ = gtk_widget_is_sensitive (_tmp1_);
+ gtk_widget_set_sensitive (_tmp0_, !_tmp2_);
}
@@ -210,13 +224,13 @@ static void block1_data_unref (Block1Data* _data1_) {
}
-static void _lambda0_ (SimpleClient* self) {
+static void __lambda0_ (SimpleClient* self) {
g_print ("Sub1\n");
}
-static void __lambda0__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
- _lambda0_ (self);
+static void ___lambda0__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda0_ (self);
}
@@ -225,86 +239,126 @@ static gpointer _g_object_ref0 (gpointer self) {
}
-static void _lambda1_ (Block1Data* _data1_) {
+static void __lambda1_ (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 ___lambda1__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda1_ (self);
}
-static void _lambda2_ (SimpleClient* self) {
+static void __lambda2_ (SimpleClient* self) {
g_print ("Sub3\n");
}
-static void __lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
- _lambda2_ (self);
+static void ___lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda2_ (self);
}
-static void _lambda3_ (SimpleClient* self) {
- AppIndicatorStatus _tmp0_;
- _tmp0_ = app_indicator_get_status (self->priv->ci);
- if (_tmp0_ == APP_INDICATOR_STATUS_ATTENTION) {
- app_indicator_set_status (self->priv->ci, APP_INDICATOR_STATUS_ACTIVE);
+static void __lambda3_ (SimpleClient* self) {
+ AppIndicator* _tmp0_;
+ AppIndicatorStatus _tmp1_ = 0;
+ _tmp0_ = self->priv->ci;
+ _tmp1_ = app_indicator_get_status (_tmp0_);
+ if (_tmp1_ == APP_INDICATOR_STATUS_ATTENTION) {
+ AppIndicator* _tmp2_;
+ _tmp2_ = self->priv->ci;
+ app_indicator_set_status (_tmp2_, APP_INDICATOR_STATUS_ACTIVE);
} else {
- app_indicator_set_status (self->priv->ci, APP_INDICATOR_STATUS_ATTENTION);
+ AppIndicator* _tmp3_;
+ _tmp3_ = self->priv->ci;
+ app_indicator_set_status (_tmp3_, APP_INDICATOR_STATUS_ATTENTION);
}
}
-static void __lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
- _lambda3_ (self);
+static void ___lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda3_ (self);
}
static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) {
Block1Data* _data1_;
- GtkMenu* _tmp0_ = NULL;
+ GtkMenu* _tmp0_;
+ GtkMenu* _tmp1_;
GtkMenu* menu;
GtkMenuItem* mi = NULL;
- GtkMenuItem* _tmp1_ = NULL;
GtkMenuItem* _tmp2_;
- GtkMenuItem* _tmp3_ = NULL;
- GtkMenuItem* _tmp4_ = NULL;
- GtkMenuItem* _tmp5_ = NULL;
+ GtkMenuItem* _tmp3_;
+ GtkMenuItem* _tmp4_;
+ GtkMenuItem* _tmp5_;
+ GtkMenuItem* _tmp6_;
+ GtkMenuItem* _tmp7_;
+ GtkMenuItem* _tmp8_;
+ GtkMenuItem* _tmp9_;
+ GtkMenuItem* _tmp10_;
+ GtkMenuItem* _tmp11_;
+ GtkMenuItem* _tmp12_;
+ GtkMenuItem* _tmp13_;
+ GtkMenuItem* _tmp14_;
+ GtkMenuItem* _tmp15_;
+ GtkMenuItem* _tmp16_;
+ GtkMenuItem* _tmp17_;
+ GtkMenuItem* _tmp18_;
+ GtkMenuItem* _tmp19_;
+ AppIndicator* _tmp20_;
+ GtkMenuItem* _tmp21_;
+ GtkMenuItem* _tmp22_;
g_return_if_fail (self != NULL);
g_return_if_fail (item != NULL);
_data1_ = g_slice_new0 (Block1Data);
_data1_->_ref_count_ = 1;
_data1_->self = simple_client_ref (self);
_tmp0_ = (GtkMenu*) gtk_menu_new ();
- menu = g_object_ref_sink (_tmp0_);
- _tmp1_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 1");
+ _tmp1_ = g_object_ref_sink (_tmp0_);
+ menu = _tmp1_;
+ _tmp2_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 1");
+ _tmp3_ = g_object_ref_sink (_tmp2_);
_g_object_unref0 (mi);
- mi = g_object_ref_sink (_tmp1_);
- gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) mi);
- g_signal_connect (mi, "activate", (GCallback) __lambda0__gtk_menu_item_activate, self);
- _tmp2_ = _g_object_ref0 (mi);
- _data1_->prev_mi = _tmp2_;
- _tmp3_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 2");
+ mi = _tmp3_;
+ _tmp4_ = mi;
+ gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp4_);
+ _tmp5_ = mi;
+ g_signal_connect (_tmp5_, "activate", (GCallback) ___lambda0__gtk_menu_item_activate, self);
+ _tmp6_ = mi;
+ _tmp7_ = _g_object_ref0 (_tmp6_);
+ _data1_->prev_mi = _tmp7_;
+ _tmp8_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 2");
+ _tmp9_ = g_object_ref_sink (_tmp8_);
_g_object_unref0 (mi);
- mi = g_object_ref_sink (_tmp3_);
- gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) mi);
- g_signal_connect_data (mi, "activate", (GCallback) __lambda1__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
- _tmp4_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 3");
+ mi = _tmp9_;
+ _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);
+ _tmp12_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 3");
+ _tmp13_ = g_object_ref_sink (_tmp12_);
_g_object_unref0 (mi);
- mi = g_object_ref_sink (_tmp4_);
- gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) mi);
- g_signal_connect (mi, "activate", (GCallback) __lambda2__gtk_menu_item_activate, self);
- _tmp5_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle Attention");
+ mi = _tmp13_;
+ _tmp14_ = mi;
+ gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp14_);
+ _tmp15_ = mi;
+ g_signal_connect (_tmp15_, "activate", (GCallback) ___lambda2__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);
- mi = g_object_ref_sink (_tmp5_);
- gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) mi);
- g_signal_connect (mi, "activate", (GCallback) __lambda3__gtk_menu_item_activate, self);
- app_indicator_set_secondary_activate_target (self->priv->ci, (GtkWidget*) mi);
+ mi = _tmp17_;
+ _tmp18_ = mi;
+ gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp18_);
+ _tmp19_ = mi;
+ g_signal_connect (_tmp19_, "activate", (GCallback) ___lambda3__gtk_menu_item_activate, self);
+ _tmp20_ = self->priv->ci;
+ _tmp21_ = mi;
+ app_indicator_set_secondary_activate_target (_tmp20_, (GtkWidget*) _tmp21_);
gtk_widget_show_all ((GtkWidget*) menu);
- gtk_menu_item_set_submenu (item, (GtkWidget*) menu);
+ _tmp22_ = item;
+ gtk_menu_item_set_submenu (_tmp22_, (GtkWidget*) menu);
_g_object_unref0 (mi);
_g_object_unref0 (menu);
block1_data_unref (_data1_);
@@ -313,13 +367,21 @@ static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item)
static void simple_client_label_toggle (SimpleClient* self, GtkMenuItem* item) {
+ gboolean _tmp0_;
+ gboolean _tmp1_;
g_return_if_fail (self != NULL);
g_return_if_fail (item != NULL);
- self->priv->can_haz_label = !self->priv->can_haz_label;
- if (self->priv->can_haz_label) {
- gtk_menu_item_set_label (item, "Hide label");
+ _tmp0_ = self->priv->can_haz_label;
+ self->priv->can_haz_label = !_tmp0_;
+ _tmp1_ = self->priv->can_haz_label;
+ if (_tmp1_) {
+ GtkMenuItem* _tmp2_;
+ _tmp2_ = item;
+ gtk_menu_item_set_label (_tmp2_, "Hide label");
} else {
- gtk_menu_item_set_label (item, "Show label");
+ GtkMenuItem* _tmp3_;
+ _tmp3_ = item;
+ gtk_menu_item_set_label (_tmp3_, "Show label");
}
}
@@ -343,68 +405,82 @@ static void block2_data_unref (Block2Data* _data2_) {
}
-static void _lambda4_ (gint delta, guint direction, SimpleClient* self) {
- gchar* _tmp0_ = NULL;
- gchar* _tmp1_;
- gchar* _tmp2_ = NULL;
- gchar* _tmp3_;
+static void __lambda4_ (SimpleClient* self, gint delta, guint direction) {
+ gint _tmp0_;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_;
+ guint _tmp3_;
gchar* _tmp4_ = NULL;
gchar* _tmp5_;
- _tmp0_ = g_strdup_printf ("%i", delta);
- _tmp1_ = _tmp0_;
- _tmp2_ = g_strdup_printf ("%u", direction);
- _tmp3_ = _tmp2_;
- _tmp4_ = g_strconcat ("Got scroll event! delta: ", _tmp1_, ", direction: ", _tmp3_, "\n", NULL);
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_;
+ _tmp0_ = delta;
+ _tmp1_ = g_strdup_printf ("%i", _tmp0_);
+ _tmp2_ = _tmp1_;
+ _tmp3_ = direction;
+ _tmp4_ = g_strdup_printf ("%u", _tmp3_);
_tmp5_ = _tmp4_;
- g_print ("%s", _tmp5_);
+ _tmp6_ = g_strconcat ("Got scroll event! delta: ", _tmp2_, ", direction: ", _tmp5_, "\n", NULL);
+ _tmp7_ = _tmp6_;
+ g_print ("%s", _tmp7_);
+ _g_free0 (_tmp7_);
_g_free0 (_tmp5_);
- _g_free0 (_tmp3_);
- _g_free0 (_tmp1_);
+ _g_free0 (_tmp2_);
}
-static void __lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint indicator, guint delta, gpointer self) {
- _lambda4_ (indicator, delta, self);
+static void ___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self) {
+ __lambda4_ (self, delta, direction);
}
-static gboolean _lambda5_ (SimpleClient* self) {
+static gboolean __lambda5_ (SimpleClient* self) {
gboolean result = FALSE;
- self->priv->percentage = (self->priv->percentage + 1) % 100;
- if (self->priv->can_haz_label) {
- gchar* _tmp0_ = NULL;
- gchar* _tmp1_;
- gchar* _tmp2_ = NULL;
- gchar* _tmp3_;
- _tmp0_ = g_strdup_printf ("%i", self->priv->percentage + 1);
- _tmp1_ = _tmp0_;
- _tmp2_ = g_strconcat (_tmp1_, "%", NULL);
- _tmp3_ = _tmp2_;
- app_indicator_set_label (self->priv->ci, _tmp3_, "");
- _g_free0 (_tmp3_);
- _g_free0 (_tmp1_);
+ gint _tmp0_;
+ gboolean _tmp1_;
+ _tmp0_ = self->priv->percentage;
+ self->priv->percentage = (_tmp0_ + 1) % 100;
+ _tmp1_ = self->priv->can_haz_label;
+ if (_tmp1_) {
+ AppIndicator* _tmp2_;
+ gint _tmp3_;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_;
+ _tmp2_ = self->priv->ci;
+ _tmp3_ = self->priv->percentage;
+ _tmp4_ = g_strdup_printf ("%i", _tmp3_ + 1);
+ _tmp5_ = _tmp4_;
+ _tmp6_ = g_strconcat (_tmp5_, "%", NULL);
+ _tmp7_ = _tmp6_;
+ app_indicator_set_label (_tmp2_, _tmp7_, "");
+ _g_free0 (_tmp7_);
+ _g_free0 (_tmp5_);
} else {
- app_indicator_set_label (self->priv->ci, "", "");
+ AppIndicator* _tmp8_;
+ _tmp8_ = self->priv->ci;
+ app_indicator_set_label (_tmp8_, "", "");
}
result = TRUE;
return result;
}
-static gboolean __lambda5__gsource_func (gpointer self) {
+static gboolean ___lambda5__gsource_func (gpointer self) {
gboolean result;
- result = _lambda5_ (self);
+ result = __lambda5_ (self);
return result;
}
-static void _lambda6_ (SimpleClient* self) {
+static void __lambda6_ (SimpleClient* self) {
g_print ("1\n");
}
-static void __lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
- _lambda6_ (self);
+static void ___lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda6_ (self);
}
@@ -419,29 +495,29 @@ static void _g_slist_free__g_object_unref0_ (GSList* self) {
}
-static void _lambda7_ (SimpleClient* self) {
+static void __lambda7_ (SimpleClient* self) {
g_print ("2\n");
}
-static void __lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
- _lambda7_ (self);
+static void ___lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda7_ (self);
}
-static void _lambda8_ (Block2Data* _data2_) {
+static void __lambda8_ (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 ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda8_ (self);
}
-static void _lambda9_ (Block2Data* _data2_) {
+static void __lambda9_ (Block2Data* _data2_) {
SimpleClient * self;
GtkWidget* _tmp0_ = NULL;
GtkImage* _tmp1_;
@@ -455,131 +531,181 @@ static void _lambda9_ (Block2Data* _data2_) {
}
-static void __lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
- _lambda9_ (self);
+static void ___lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda9_ (self);
}
-static void _lambda10_ (Block2Data* _data2_) {
+static void __lambda10_ (Block2Data* _data2_) {
SimpleClient * self;
+ gboolean _tmp0_;
self = _data2_->self;
- if (self->priv->active) {
- app_indicator_set_status (self->priv->ci, APP_INDICATOR_STATUS_ATTENTION);
+ _tmp0_ = self->priv->active;
+ if (_tmp0_) {
+ AppIndicator* _tmp1_;
+ _tmp1_ = self->priv->ci;
+ app_indicator_set_status (_tmp1_, APP_INDICATOR_STATUS_ATTENTION);
gtk_menu_item_set_label (_data2_->att, "I'm okay now");
self->priv->active = FALSE;
} else {
- app_indicator_set_status (self->priv->ci, APP_INDICATOR_STATUS_ACTIVE);
+ AppIndicator* _tmp2_;
+ _tmp2_ = self->priv->ci;
+ app_indicator_set_status (_tmp2_, APP_INDICATOR_STATUS_ACTIVE);
gtk_menu_item_set_label (_data2_->att, "Get Attention");
self->priv->active = FALSE;
}
}
-static void __lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
- _lambda10_ (self);
+static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda10_ (self);
}
-static void _lambda11_ (Block2Data* _data2_) {
+static void __lambda11_ (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 ___lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda11_ (self);
}
-static void _lambda12_ (Block2Data* _data2_) {
+static void __lambda12_ (Block2Data* _data2_) {
SimpleClient * self;
- gboolean _tmp0_;
+ gboolean _tmp0_ = FALSE;
self = _data2_->self;
_tmp0_ = gtk_check_menu_item_get_active (_data2_->icon);
if (_tmp0_) {
- app_indicator_set_icon (self->priv->ci, "simple-client-test-icon.png");
+ AppIndicator* _tmp1_;
+ _tmp1_ = self->priv->ci;
+ app_indicator_set_icon (_tmp1_, "simple-client-test-icon.png");
} else {
- app_indicator_set_icon (self->priv->ci, "indicator-messages");
+ AppIndicator* _tmp2_;
+ _tmp2_ = self->priv->ci;
+ app_indicator_set_icon (_tmp2_, "indicator-messages");
}
}
-static void __lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
- _lambda12_ (self);
+static void ___lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+ __lambda12_ (self);
}
void simple_client_run (SimpleClient* self) {
Block2Data* _data2_;
- GtkMenu* _tmp0_ = NULL;
- GtkCheckMenuItem* _tmp1_ = NULL;
+ AppIndicator* _tmp0_;
+ GtkMenu* _tmp1_;
+ GtkMenu* _tmp2_;
+ GtkCheckMenuItem* _tmp3_;
+ GtkCheckMenuItem* _tmp4_;
GtkCheckMenuItem* chk;
- GSList* _tmp2_;
- GtkRadioMenuItem* _tmp3_ = NULL;
- GtkRadioMenuItem* _tmp4_;
+ GtkMenu* _tmp5_;
+ GSList* _tmp6_;
+ GtkRadioMenuItem* _tmp7_;
+ GtkRadioMenuItem* _tmp8_;
+ GtkRadioMenuItem* _tmp9_;
GtkRadioMenuItem* radio;
- GtkMenuItem* _tmp5_ = NULL;
- GtkMenuItem* _tmp6_ = NULL;
+ GtkMenu* _tmp10_;
+ GtkMenuItem* _tmp11_;
+ GtkMenuItem* _tmp12_;
+ GtkMenu* _tmp13_;
+ GtkMenuItem* _tmp14_;
+ GtkMenuItem* _tmp15_;
GtkMenuItem* toggle_item;
- GtkImageMenuItem* _tmp7_ = NULL;
- GtkMenuItem* _tmp8_ = NULL;
- GtkMenuItem* _tmp9_ = NULL;
- GtkCheckMenuItem* _tmp10_ = NULL;
+ GtkMenu* _tmp16_;
+ GtkImageMenuItem* _tmp17_;
+ GtkImageMenuItem* _tmp18_;
+ GtkMenu* _tmp19_;
+ GtkMenuItem* _tmp20_;
+ GtkMenuItem* _tmp21_;
+ GtkMenu* _tmp22_;
+ GtkMenuItem* _tmp23_;
+ GtkMenuItem* _tmp24_;
+ GtkMenu* _tmp25_;
+ GtkCheckMenuItem* _tmp26_;
+ GtkCheckMenuItem* _tmp27_;
+ GtkMenu* _tmp28_;
+ AppIndicator* _tmp29_;
+ GtkMenu* _tmp30_;
g_return_if_fail (self != NULL);
_data2_ = g_slice_new0 (Block2Data);
_data2_->_ref_count_ = 1;
_data2_->self = simple_client_ref (self);
- g_signal_connect (self->priv->ci, "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);
- _tmp0_ = (GtkMenu*) gtk_menu_new ();
+ _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);
+ _tmp1_ = (GtkMenu*) gtk_menu_new ();
+ _tmp2_ = g_object_ref_sink (_tmp1_);
_g_object_unref0 (self->priv->menu);
- self->priv->menu = g_object_ref_sink (_tmp0_);
- _tmp1_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("1");
- chk = g_object_ref_sink (_tmp1_);
- g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) __lambda6__gtk_menu_item_activate, self);
- gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) ((GtkMenuItem*) chk));
- gtk_widget_show ((GtkWidget*) chk);
- _tmp2_ = NULL;
- _tmp3_ = (GtkRadioMenuItem*) gtk_radio_menu_item_new_with_label (_tmp2_, "2");
+ self->priv->menu = _tmp2_;
+ _tmp3_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("1");
_tmp4_ = g_object_ref_sink (_tmp3_);
- __g_slist_free__g_object_unref0_0 (_tmp2_);
- radio = _tmp4_;
- g_signal_connect ((GtkMenuItem*) radio, "activate", (GCallback) __lambda7__gtk_menu_item_activate, self);
- gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) ((GtkMenuItem*) radio));
+ chk = _tmp4_;
+ g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) ___lambda6__gtk_menu_item_activate, self);
+ _tmp5_ = self->priv->menu;
+ gtk_menu_shell_append ((GtkMenuShell*) _tmp5_, (GtkWidget*) ((GtkMenuItem*) chk));
+ gtk_widget_show ((GtkWidget*) chk);
+ _tmp6_ = NULL;
+ _tmp7_ = (GtkRadioMenuItem*) gtk_radio_menu_item_new_with_label (_tmp6_, "2");
+ _tmp8_ = g_object_ref_sink (_tmp7_);
+ _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);
+ _tmp10_ = self->priv->menu;
+ gtk_menu_shell_append ((GtkMenuShell*) _tmp10_, (GtkWidget*) ((GtkMenuItem*) radio));
gtk_widget_show ((GtkWidget*) radio);
- _tmp5_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("3");
- _data2_->submenu = g_object_ref_sink (_tmp5_);
- gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) _data2_->submenu);
+ _tmp11_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("3");
+ _tmp12_ = g_object_ref_sink (_tmp11_);
+ _data2_->submenu = _tmp12_;
+ _tmp13_ = self->priv->menu;
+ gtk_menu_shell_append ((GtkMenuShell*) _tmp13_, (GtkWidget*) _data2_->submenu);
simple_client_append_submenu (self, _data2_->submenu);
gtk_widget_show ((GtkWidget*) _data2_->submenu);
- _tmp6_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle 3");
- toggle_item = g_object_ref_sink (_tmp6_);
- g_signal_connect_data (toggle_item, "activate", (GCallback) __lambda8__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
- gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) toggle_item);
+ _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);
+ _tmp16_ = self->priv->menu;
+ gtk_menu_shell_append ((GtkMenuShell*) _tmp16_, (GtkWidget*) toggle_item);
gtk_widget_show ((GtkWidget*) toggle_item);
- _tmp7_ = (GtkImageMenuItem*) gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL);
- _data2_->imgitem = g_object_ref_sink (_tmp7_);
- g_signal_connect_data ((GtkMenuItem*) _data2_->imgitem, "activate", (GCallback) __lambda9__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
- gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) ((GtkMenuItem*) _data2_->imgitem));
+ _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);
+ _tmp19_ = self->priv->menu;
+ gtk_menu_shell_append ((GtkMenuShell*) _tmp19_, (GtkWidget*) ((GtkMenuItem*) _data2_->imgitem));
gtk_widget_show ((GtkWidget*) _data2_->imgitem);
- _tmp8_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Get Attention");
- _data2_->att = g_object_ref_sink (_tmp8_);
- g_signal_connect_data (_data2_->att, "activate", (GCallback) __lambda10__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
- gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) _data2_->att);
+ _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);
+ _tmp22_ = self->priv->menu;
+ gtk_menu_shell_append ((GtkMenuShell*) _tmp22_, (GtkWidget*) _data2_->att);
gtk_widget_show ((GtkWidget*) _data2_->att);
- _tmp9_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Show Label");
- _data2_->show = g_object_ref_sink (_tmp9_);
+ _tmp23_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Show Label");
+ _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);
- gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) _data2_->show);
+ g_signal_connect_data (_data2_->show, "activate", (GCallback) ___lambda11__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);
- _tmp10_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("Set Local Icon");
- _data2_->icon = g_object_ref_sink (_tmp10_);
- g_signal_connect_data ((GtkMenuItem*) _data2_->icon, "activate", (GCallback) __lambda12__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
- gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) ((GtkMenuItem*) _data2_->icon));
+ _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);
+ _tmp28_ = self->priv->menu;
+ gtk_menu_shell_append ((GtkMenuShell*) _tmp28_, (GtkWidget*) ((GtkMenuItem*) _data2_->icon));
gtk_widget_show ((GtkWidget*) _data2_->icon);
- app_indicator_set_menu (self->priv->ci, self->priv->menu);
+ _tmp29_ = self->priv->ci;
+ _tmp30_ = self->priv->menu;
+ app_indicator_set_menu (_tmp29_, _tmp30_);
gtk_main ();
_g_object_unref0 (toggle_item);
_g_object_unref0 (radio);