~mh21/ubuntu/utopic/indicator-multiload/version-0.4

« back to all changes in this revision

Viewing changes to src/multiloadindicator.c

  • Committer: mh21 at mh21
  • Date: 2014-06-14 19:04:06 UTC
  • mfrom: (1.1.3)
  • Revision ID: mh21@mh21.de-20140614190406-tt27etcltj3oau1o
* New upstream release.
* Fixes and new features:
  - indicator-multiload segfaults immediately (LP: #942859)
  - Advanced preferences text boxes should have unit labels (LP: #1160980)
  - Change "Open System Monitor" Link (LP: #1171224)
  - Menu monitor items do not display (LP: #1251113)
  - Network graph doesn't have min scale settings (LP: #1302454)
  - Add GUI option to turn off autoranging on graphs (LP: #796398)
  - Provide monochrome option (LP: #894583)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* multiloadindicator.c generated by valac 0.14.2, the Vala compiler
2
 
 * generated from multiloadindicator.vala, do not modify */
3
 
 
4
 
 
5
 
#include <glib.h>
6
 
#include <glib-object.h>
7
 
#include <libappindicator/app-indicator.h>
8
 
#include <gtk/gtk.h>
9
 
#include <stdlib.h>
10
 
#include <string.h>
11
 
#include <glib/gstdio.h>
12
 
#include <cairo.h>
13
 
#include <float.h>
14
 
#include <math.h>
15
 
#include <gdk/gdk.h>
16
 
 
17
 
 
18
 
#define TYPE_MULTI_LOAD_INDICATOR (multi_load_indicator_get_type ())
19
 
#define MULTI_LOAD_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTI_LOAD_INDICATOR, MultiLoadIndicator))
20
 
#define MULTI_LOAD_INDICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTI_LOAD_INDICATOR, MultiLoadIndicatorClass))
21
 
#define IS_MULTI_LOAD_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTI_LOAD_INDICATOR))
22
 
#define IS_MULTI_LOAD_INDICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTI_LOAD_INDICATOR))
23
 
#define MULTI_LOAD_INDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTI_LOAD_INDICATOR, MultiLoadIndicatorClass))
24
 
 
25
 
typedef struct _MultiLoadIndicator MultiLoadIndicator;
26
 
typedef struct _MultiLoadIndicatorClass MultiLoadIndicatorClass;
27
 
typedef struct _MultiLoadIndicatorPrivate MultiLoadIndicatorPrivate;
28
 
 
29
 
#define TYPE_PROVIDERS (providers_get_type ())
30
 
#define PROVIDERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROVIDERS, Providers))
31
 
#define PROVIDERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROVIDERS, ProvidersClass))
32
 
#define IS_PROVIDERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROVIDERS))
33
 
#define IS_PROVIDERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROVIDERS))
34
 
#define PROVIDERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROVIDERS, ProvidersClass))
35
 
 
36
 
typedef struct _Providers Providers;
37
 
typedef struct _ProvidersClass ProvidersClass;
38
 
 
39
 
#define TYPE_MENU_MODEL (menu_model_get_type ())
40
 
#define MENU_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MENU_MODEL, MenuModel))
41
 
#define MENU_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MENU_MODEL, MenuModelClass))
42
 
#define IS_MENU_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MENU_MODEL))
43
 
#define IS_MENU_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MENU_MODEL))
44
 
#define MENU_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MENU_MODEL, MenuModelClass))
45
 
 
46
 
typedef struct _MenuModel MenuModel;
47
 
typedef struct _MenuModelClass MenuModelClass;
48
 
 
49
 
#define TYPE_GRAPH_MODELS (graph_models_get_type ())
50
 
#define GRAPH_MODELS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GRAPH_MODELS, GraphModels))
51
 
#define GRAPH_MODELS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GRAPH_MODELS, GraphModelsClass))
52
 
#define IS_GRAPH_MODELS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GRAPH_MODELS))
53
 
#define IS_GRAPH_MODELS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GRAPH_MODELS))
54
 
#define GRAPH_MODELS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GRAPH_MODELS, GraphModelsClass))
55
 
 
56
 
typedef struct _GraphModels GraphModels;
57
 
typedef struct _GraphModelsClass GraphModelsClass;
58
 
#define _g_free0(var) (var = (g_free (var), NULL))
59
 
#define _g_source_unref0(var) ((var == NULL) ? NULL : (var = (g_source_unref (var), NULL)))
60
 
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
61
 
 
62
 
#define TYPE_EXPRESSION_CACHE (expression_cache_get_type ())
63
 
#define EXPRESSION_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPRESSION_CACHE, ExpressionCache))
64
 
#define EXPRESSION_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPRESSION_CACHE, ExpressionCacheClass))
65
 
#define IS_EXPRESSION_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPRESSION_CACHE))
66
 
#define IS_EXPRESSION_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPRESSION_CACHE))
67
 
#define EXPRESSION_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPRESSION_CACHE, ExpressionCacheClass))
68
 
 
69
 
typedef struct _ExpressionCache ExpressionCache;
70
 
typedef struct _ExpressionCacheClass ExpressionCacheClass;
71
 
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
72
 
typedef struct _Block1Data Block1Data;
73
 
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
74
 
 
75
 
#define TYPE_GRAPH_MODEL (graph_model_get_type ())
76
 
#define GRAPH_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GRAPH_MODEL, GraphModel))
77
 
#define GRAPH_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GRAPH_MODEL, GraphModelClass))
78
 
#define IS_GRAPH_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GRAPH_MODEL))
79
 
#define IS_GRAPH_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GRAPH_MODEL))
80
 
#define GRAPH_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GRAPH_MODEL, GraphModelClass))
81
 
 
82
 
typedef struct _GraphModel GraphModel;
83
 
typedef struct _GraphModelClass GraphModelClass;
84
 
 
85
 
#define TYPE_TRACE_MODEL (trace_model_get_type ())
86
 
#define TRACE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACE_MODEL, TraceModel))
87
 
#define TRACE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACE_MODEL, TraceModelClass))
88
 
#define IS_TRACE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACE_MODEL))
89
 
#define IS_TRACE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACE_MODEL))
90
 
#define TRACE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACE_MODEL, TraceModelClass))
91
 
 
92
 
typedef struct _TraceModel TraceModel;
93
 
typedef struct _TraceModelClass TraceModelClass;
94
 
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))
95
 
 
96
 
struct _MultiLoadIndicator {
97
 
        GObject parent_instance;
98
 
        MultiLoadIndicatorPrivate * priv;
99
 
};
100
 
 
101
 
struct _MultiLoadIndicatorClass {
102
 
        GObjectClass parent_class;
103
 
};
104
 
 
105
 
struct _MultiLoadIndicatorPrivate {
106
 
        guint currenticonindex;
107
 
        guint lasticonwidth;
108
 
        GSource* timeout;
109
 
        AppIndicator* indicator;
110
 
        GtkMenuItem** menuitems;
111
 
        gint menuitems_length1;
112
 
        gint _menuitems_size_;
113
 
        gboolean menuset;
114
 
        gchar* _icondirectory;
115
 
        Providers* _providers;
116
 
        MenuModel* _menumodel;
117
 
        MenuModel* _labelmodel;
118
 
        MenuModel* _descriptionmodel;
119
 
        gint _indicator_index;
120
 
        guint _height;
121
 
        guint _width;
122
 
        guint _speed;
123
 
        GtkMenu* _menu;
124
 
        GraphModels* _graphmodels;
125
 
};
126
 
 
127
 
struct _Block1Data {
128
 
        int _ref_count_;
129
 
        MultiLoadIndicator * self;
130
 
        gboolean found;
131
 
};
132
 
 
133
 
 
134
 
static gpointer multi_load_indicator_parent_class = NULL;
135
 
 
136
 
GType multi_load_indicator_get_type (void) G_GNUC_CONST;
137
 
GType providers_get_type (void) G_GNUC_CONST;
138
 
GType menu_model_get_type (void) G_GNUC_CONST;
139
 
GType graph_models_get_type (void) G_GNUC_CONST;
140
 
#define MULTI_LOAD_INDICATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MULTI_LOAD_INDICATOR, MultiLoadIndicatorPrivate))
141
 
enum  {
142
 
        MULTI_LOAD_INDICATOR_DUMMY_PROPERTY,
143
 
        MULTI_LOAD_INDICATOR_ICONDIRECTORY,
144
 
        MULTI_LOAD_INDICATOR_PROVIDERS,
145
 
        MULTI_LOAD_INDICATOR_MENUMODEL,
146
 
        MULTI_LOAD_INDICATOR_LABELMODEL,
147
 
        MULTI_LOAD_INDICATOR_DESCRIPTIONMODEL,
148
 
        MULTI_LOAD_INDICATOR_INDICATOR_INDEX,
149
 
        MULTI_LOAD_INDICATOR_HEIGHT,
150
 
        MULTI_LOAD_INDICATOR_WIDTH,
151
 
        MULTI_LOAD_INDICATOR_SPEED,
152
 
        MULTI_LOAD_INDICATOR_MENU,
153
 
        MULTI_LOAD_INDICATOR_GRAPHMODELS
154
 
};
155
 
static gchar* multi_load_indicator_iconpath (MultiLoadIndicator* self, guint index);
156
 
const gchar* multi_load_indicator_get_icondirectory (MultiLoadIndicator* self);
157
 
MultiLoadIndicator* multi_load_indicator_new (const gchar* icondirectory, Providers* providers);
158
 
MultiLoadIndicator* multi_load_indicator_construct (GType object_type, const gchar* icondirectory, Providers* providers);
159
 
MenuModel* menu_model_new (Providers* providers);
160
 
MenuModel* menu_model_construct (GType object_type, Providers* providers);
161
 
void multi_load_indicator_destroy (MultiLoadIndicator* self);
162
 
void multi_load_indicator_updateall (MultiLoadIndicator* self);
163
 
static void multi_load_indicator_updateproviders (MultiLoadIndicator* self);
164
 
static void multi_load_indicator_updatemodels (MultiLoadIndicator* self);
165
 
static void multi_load_indicator_updateviews (MultiLoadIndicator* self);
166
 
Providers* multi_load_indicator_get_providers (MultiLoadIndicator* self);
167
 
void providers_update (Providers* self);
168
 
MenuModel* multi_load_indicator_get_menumodel (MultiLoadIndicator* self);
169
 
void menu_model_update (MenuModel* self);
170
 
MenuModel* multi_load_indicator_get_labelmodel (MultiLoadIndicator* self);
171
 
MenuModel* multi_load_indicator_get_descriptionmodel (MultiLoadIndicator* self);
172
 
GraphModels* multi_load_indicator_get_graphmodels (MultiLoadIndicator* self);
173
 
void graph_models_update (GraphModels* self, guint trace_length);
174
 
guint multi_load_indicator_get_width (MultiLoadIndicator* self);
175
 
static void multi_load_indicator_updatemenuview (MultiLoadIndicator* self);
176
 
static void multi_load_indicator_updatelabelview (MultiLoadIndicator* self);
177
 
static void multi_load_indicator_updategraphsview (MultiLoadIndicator* self);
178
 
GtkMenu* multi_load_indicator_get_menu (MultiLoadIndicator* self);
179
 
gchar** menu_model_get_expressions (MenuModel* self, int* result_length1);
180
 
static void _vala_array_add12 (GtkMenuItem*** array, int* length, int* size, GtkMenuItem* value);
181
 
GType expression_cache_get_type (void) G_GNUC_CONST;
182
 
ExpressionCache* menu_model_expression (MenuModel* self, guint index);
183
 
gchar* expression_cache_label (ExpressionCache* self);
184
 
static GtkMenuItem** _vala_array_dup16 (GtkMenuItem** self, int length);
185
 
gint multi_load_indicator_get_indicator_index (MultiLoadIndicator* self);
186
 
gchar* expression_cache_guide (ExpressionCache* self);
187
 
static Block1Data* block1_data_ref (Block1Data* _data1_);
188
 
static void block1_data_unref (Block1Data* _data1_);
189
 
static void multi_load_indicator_iconwrite (MultiLoadIndicator* self);
190
 
static void ____lambda3_ (Block1Data* _data1_, GtkWidget* w);
191
 
guint multi_load_indicator_get_height (MultiLoadIndicator* self);
192
 
static void _____lambda3__gtk_callback (GtkWidget* widget, gpointer self);
193
 
static gchar* multi_load_indicator_iconname (MultiLoadIndicator* self, guint index);
194
 
static void multi_load_indicator_iconwritedummy (MultiLoadIndicator* self);
195
 
GType graph_model_get_type (void) G_GNUC_CONST;
196
 
GraphModel** graph_models_get_graphmodels (GraphModels* self, int* result_length1);
197
 
gboolean graph_model_get_enabled (GraphModel* self);
198
 
void graph_model_set_source_color (GraphModel* self, cairo_t* ctx);
199
 
GType trace_model_get_type (void) G_GNUC_CONST;
200
 
TraceModel** graph_model_get_tracemodels (GraphModel* self, int* result_length1);
201
 
static TraceModel** _vala_array_dup17 (TraceModel** self, int length);
202
 
gdouble graph_model_get_scale (GraphModel* self);
203
 
gboolean trace_model_get_enabled (TraceModel* self);
204
 
gdouble* trace_model_get_values (TraceModel* self, int* result_length1);
205
 
void trace_model_get_color (TraceModel* self, GdkColor* result);
206
 
static void multi_load_indicator_set_icondirectory (MultiLoadIndicator* self, const gchar* value);
207
 
static void multi_load_indicator_set_providers (MultiLoadIndicator* self, Providers* value);
208
 
static void multi_load_indicator_set_menumodel (MultiLoadIndicator* self, MenuModel* value);
209
 
static void multi_load_indicator_set_labelmodel (MultiLoadIndicator* self, MenuModel* value);
210
 
static void multi_load_indicator_set_descriptionmodel (MultiLoadIndicator* self, MenuModel* value);
211
 
void multi_load_indicator_set_indicator_index (MultiLoadIndicator* self, gint value);
212
 
void multi_load_indicator_set_height (MultiLoadIndicator* self, guint value);
213
 
void multi_load_indicator_set_width (MultiLoadIndicator* self, guint value);
214
 
guint multi_load_indicator_get_speed (MultiLoadIndicator* self);
215
 
void multi_load_indicator_set_speed (MultiLoadIndicator* self, guint value);
216
 
void multi_load_indicator_set_menu (MultiLoadIndicator* self, GtkMenu* value);
217
 
void multi_load_indicator_set_graphmodels (MultiLoadIndicator* self, GraphModels* value);
218
 
static GObject * multi_load_indicator_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
219
 
static void _multi_load_indicator___lambda4_ (MultiLoadIndicator* self, gint delta, guint direction);
220
 
static void __multi_load_indicator___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self);
221
 
static void _multi_load_indicator___lambda5_ (MultiLoadIndicator* self);
222
 
static void __multi_load_indicator___lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
223
 
static void _multi_load_indicator___lambda6_ (MultiLoadIndicator* self);
224
 
static gboolean __lambda7_ (MultiLoadIndicator* self);
225
 
static gboolean ___lambda7__gsource_func (gpointer self);
226
 
static void __multi_load_indicator___lambda6__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
227
 
static void multi_load_indicator_finalize (GObject* obj);
228
 
static void _vala_multi_load_indicator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
229
 
static void _vala_multi_load_indicator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
230
 
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
231
 
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
232
 
 
233
 
 
234
 
MultiLoadIndicator* multi_load_indicator_construct (GType object_type, const gchar* icondirectory, Providers* providers) {
235
 
        MultiLoadIndicator * self = NULL;
236
 
        const gchar* _tmp0_;
237
 
        Providers* _tmp1_;
238
 
        Providers* _tmp2_;
239
 
        MenuModel* _tmp3_;
240
 
        MenuModel* _tmp4_;
241
 
        Providers* _tmp5_;
242
 
        MenuModel* _tmp6_;
243
 
        MenuModel* _tmp7_;
244
 
        Providers* _tmp8_;
245
 
        MenuModel* _tmp9_;
246
 
        MenuModel* _tmp10_;
247
 
        g_return_val_if_fail (icondirectory != NULL, NULL);
248
 
        g_return_val_if_fail (IS_PROVIDERS (providers), NULL);
249
 
        _tmp0_ = icondirectory;
250
 
        _tmp1_ = providers;
251
 
        _tmp2_ = providers;
252
 
        _tmp3_ = menu_model_new (_tmp2_);
253
 
        _tmp4_ = _tmp3_;
254
 
        _tmp5_ = providers;
255
 
        _tmp6_ = menu_model_new (_tmp5_);
256
 
        _tmp7_ = _tmp6_;
257
 
        _tmp8_ = providers;
258
 
        _tmp9_ = menu_model_new (_tmp8_);
259
 
        _tmp10_ = _tmp9_;
260
 
        self = (MultiLoadIndicator*) g_object_new (object_type, "icondirectory", _tmp0_, "providers", _tmp1_, "menumodel", _tmp4_, "labelmodel", _tmp7_, "descriptionmodel", _tmp10_, NULL);
261
 
        _g_object_unref0 (_tmp10_);
262
 
        _g_object_unref0 (_tmp7_);
263
 
        _g_object_unref0 (_tmp4_);
264
 
        return self;
265
 
}
266
 
 
267
 
 
268
 
MultiLoadIndicator* multi_load_indicator_new (const gchar* icondirectory, Providers* providers) {
269
 
        return multi_load_indicator_construct (TYPE_MULTI_LOAD_INDICATOR, icondirectory, providers);
270
 
}
271
 
 
272
 
 
273
 
void multi_load_indicator_destroy (MultiLoadIndicator* self) {
274
 
        GSource* _tmp0_;
275
 
        GSource* _tmp1_;
276
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
277
 
        _tmp0_ = self->priv->timeout;
278
 
        if (_tmp0_ == NULL) {
279
 
                return;
280
 
        }
281
 
        _tmp1_ = self->priv->timeout;
282
 
        g_source_destroy (_tmp1_);
283
 
        _g_source_unref0 (self->priv->timeout);
284
 
        self->priv->timeout = NULL;
285
 
}
286
 
 
287
 
 
288
 
void multi_load_indicator_updateall (MultiLoadIndicator* self) {
289
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
290
 
        multi_load_indicator_updateproviders (self);
291
 
        multi_load_indicator_updatemodels (self);
292
 
        multi_load_indicator_updateviews (self);
293
 
}
294
 
 
295
 
 
296
 
static void multi_load_indicator_updateproviders (MultiLoadIndicator* self) {
297
 
        Providers* _tmp0_;
298
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
299
 
        _tmp0_ = self->priv->_providers;
300
 
        providers_update (_tmp0_);
301
 
}
302
 
 
303
 
 
304
 
static void multi_load_indicator_updatemodels (MultiLoadIndicator* self) {
305
 
        MenuModel* _tmp0_;
306
 
        MenuModel* _tmp1_;
307
 
        MenuModel* _tmp2_;
308
 
        GraphModels* _tmp3_;
309
 
        guint _tmp4_;
310
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
311
 
        _tmp0_ = self->priv->_menumodel;
312
 
        menu_model_update (_tmp0_);
313
 
        _tmp1_ = self->priv->_labelmodel;
314
 
        menu_model_update (_tmp1_);
315
 
        _tmp2_ = self->priv->_descriptionmodel;
316
 
        menu_model_update (_tmp2_);
317
 
        _tmp3_ = self->priv->_graphmodels;
318
 
        _tmp4_ = self->priv->_width;
319
 
        graph_models_update (_tmp3_, _tmp4_);
320
 
}
321
 
 
322
 
 
323
 
static void multi_load_indicator_updateviews (MultiLoadIndicator* self) {
324
 
        GtkMenu* _tmp0_;
325
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
326
 
        multi_load_indicator_updatemenuview (self);
327
 
        multi_load_indicator_updatelabelview (self);
328
 
        multi_load_indicator_updategraphsview (self);
329
 
        _tmp0_ = self->priv->_menu;
330
 
        if (_tmp0_ != NULL) {
331
 
                gboolean _tmp1_ = FALSE;
332
 
                AppIndicator* _tmp2_;
333
 
                const gchar* _tmp3_ = NULL;
334
 
                gint _tmp4_;
335
 
                gint _tmp5_;
336
 
                gboolean _tmp19_;
337
 
                AppIndicator* _tmp21_;
338
 
                _tmp2_ = self->priv->indicator;
339
 
                _tmp3_ = app_indicator_get_icon (_tmp2_);
340
 
                _tmp4_ = strlen (_tmp3_);
341
 
                _tmp5_ = _tmp4_;
342
 
                if (_tmp5_ == 0) {
343
 
                        gboolean _tmp6_ = FALSE;
344
 
                        AppIndicator* _tmp7_;
345
 
                        gchar* _tmp8_ = NULL;
346
 
                        gchar* _tmp9_;
347
 
                        gchar* _tmp10_;
348
 
                        gboolean _tmp11_;
349
 
                        gboolean _tmp18_;
350
 
                        _tmp7_ = self->priv->indicator;
351
 
                        g_object_get (_tmp7_, "label", &_tmp8_, NULL);
352
 
                        _tmp9_ = _tmp8_;
353
 
                        _tmp10_ = _tmp9_;
354
 
                        _tmp11_ = _tmp10_ == NULL;
355
 
                        _g_free0 (_tmp10_);
356
 
                        if (_tmp11_) {
357
 
                                _tmp6_ = TRUE;
358
 
                        } else {
359
 
                                AppIndicator* _tmp12_;
360
 
                                gchar* _tmp13_ = NULL;
361
 
                                gchar* _tmp14_;
362
 
                                gchar* _tmp15_;
363
 
                                gint _tmp16_;
364
 
                                gint _tmp17_;
365
 
                                _tmp12_ = self->priv->indicator;
366
 
                                g_object_get (_tmp12_, "label", &_tmp13_, NULL);
367
 
                                _tmp14_ = _tmp13_;
368
 
                                _tmp15_ = _tmp14_;
369
 
                                _tmp16_ = strlen (_tmp15_);
370
 
                                _tmp17_ = _tmp16_;
371
 
                                _tmp6_ = _tmp17_ == 0;
372
 
                                _g_free0 (_tmp15_);
373
 
                        }
374
 
                        _tmp18_ = _tmp6_;
375
 
                        _tmp1_ = _tmp18_;
376
 
                } else {
377
 
                        _tmp1_ = FALSE;
378
 
                }
379
 
                _tmp19_ = _tmp1_;
380
 
                if (_tmp19_) {
381
 
                        AppIndicator* _tmp20_;
382
 
                        _tmp20_ = self->priv->indicator;
383
 
                        app_indicator_set_label (_tmp20_, "indicator-multiload", "indicator-multiload");
384
 
                }
385
 
                _tmp21_ = self->priv->indicator;
386
 
                app_indicator_set_status (_tmp21_, APP_INDICATOR_STATUS_ACTIVE);
387
 
        } else {
388
 
                AppIndicator* _tmp22_;
389
 
                _tmp22_ = self->priv->indicator;
390
 
                app_indicator_set_status (_tmp22_, APP_INDICATOR_STATUS_PASSIVE);
391
 
        }
392
 
}
393
 
 
394
 
 
395
 
static gpointer _g_object_ref0 (gpointer self) {
396
 
        return self ? g_object_ref (self) : NULL;
397
 
}
398
 
 
399
 
 
400
 
static void _vala_array_add12 (GtkMenuItem*** array, int* length, int* size, GtkMenuItem* value) {
401
 
        if ((*length) == (*size)) {
402
 
                *size = (*size) ? (2 * (*size)) : 4;
403
 
                *array = g_renew (GtkMenuItem*, *array, (*size) + 1);
404
 
        }
405
 
        (*array)[(*length)++] = value;
406
 
        (*array)[*length] = NULL;
407
 
}
408
 
 
409
 
 
410
 
static GtkMenuItem** _vala_array_dup16 (GtkMenuItem** self, int length) {
411
 
        GtkMenuItem** result;
412
 
        int i;
413
 
        result = g_new0 (GtkMenuItem*, length + 1);
414
 
        for (i = 0; i < length; i++) {
415
 
                GtkMenuItem* _tmp0_;
416
 
                _tmp0_ = _g_object_ref0 (self[i]);
417
 
                result[i] = _tmp0_;
418
 
        }
419
 
        return result;
420
 
}
421
 
 
422
 
 
423
 
static void multi_load_indicator_updatemenuview (MultiLoadIndicator* self) {
424
 
        GtkMenu* _tmp0_;
425
 
        guint menu_position;
426
 
        MenuModel* _tmp1_;
427
 
        gchar** _tmp2_;
428
 
        gint _tmp2__length1;
429
 
        gchar** _tmp3_;
430
 
        gint _tmp3__length1;
431
 
        gint length;
432
 
        gint _tmp32_;
433
 
        GtkMenuItem** _tmp33_;
434
 
        gint _tmp33__length1;
435
 
        gboolean _tmp47_;
436
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
437
 
        _tmp0_ = self->priv->_menu;
438
 
        if (_tmp0_ == NULL) {
439
 
                return;
440
 
        }
441
 
        menu_position = (guint) 2;
442
 
        _tmp1_ = self->priv->_menumodel;
443
 
        _tmp2_ = menu_model_get_expressions (_tmp1_, &_tmp2__length1);
444
 
        _tmp3_ = _tmp2_;
445
 
        _tmp3__length1 = _tmp2__length1;
446
 
        length = _tmp3__length1;
447
 
        {
448
 
                guint j;
449
 
                j = (guint) 0;
450
 
                {
451
 
                        gboolean _tmp4_;
452
 
                        _tmp4_ = TRUE;
453
 
                        while (TRUE) {
454
 
                                gboolean _tmp5_;
455
 
                                guint _tmp7_;
456
 
                                gint _tmp8_;
457
 
                                GtkMenuItem* item = NULL;
458
 
                                guint _tmp9_;
459
 
                                GtkMenuItem** _tmp10_;
460
 
                                gint _tmp10__length1;
461
 
                                GtkMenuItem* _tmp24_;
462
 
                                MenuModel* _tmp25_;
463
 
                                guint _tmp26_;
464
 
                                ExpressionCache* _tmp27_ = NULL;
465
 
                                ExpressionCache* _tmp28_;
466
 
                                gchar* _tmp29_ = NULL;
467
 
                                gchar* _tmp30_;
468
 
                                guint _tmp31_;
469
 
                                _tmp5_ = _tmp4_;
470
 
                                if (!_tmp5_) {
471
 
                                        guint _tmp6_;
472
 
                                        _tmp6_ = j;
473
 
                                        j = _tmp6_ + 1;
474
 
                                }
475
 
                                _tmp4_ = FALSE;
476
 
                                _tmp7_ = j;
477
 
                                _tmp8_ = length;
478
 
                                if (!(_tmp7_ < ((guint) _tmp8_))) {
479
 
                                        break;
480
 
                                }
481
 
                                _tmp9_ = j;
482
 
                                _tmp10_ = self->priv->menuitems;
483
 
                                _tmp10__length1 = self->priv->menuitems_length1;
484
 
                                if (_tmp9_ < ((guint) _tmp10__length1)) {
485
 
                                        GtkMenuItem** _tmp11_;
486
 
                                        gint _tmp11__length1;
487
 
                                        guint _tmp12_;
488
 
                                        GtkMenuItem* _tmp13_;
489
 
                                        GtkMenuItem* _tmp14_;
490
 
                                        _tmp11_ = self->priv->menuitems;
491
 
                                        _tmp11__length1 = self->priv->menuitems_length1;
492
 
                                        _tmp12_ = j;
493
 
                                        _tmp13_ = _tmp11_[_tmp12_];
494
 
                                        _tmp14_ = _g_object_ref0 (_tmp13_);
495
 
                                        _g_object_unref0 (item);
496
 
                                        item = _tmp14_;
497
 
                                } else {
498
 
                                        GtkMenuItem* _tmp15_;
499
 
                                        GtkMenuItem* _tmp16_;
500
 
                                        GtkMenuItem* _tmp17_;
501
 
                                        GtkMenu* _tmp18_;
502
 
                                        GtkMenuItem* _tmp19_;
503
 
                                        guint _tmp20_;
504
 
                                        GtkMenuItem** _tmp21_;
505
 
                                        gint _tmp21__length1;
506
 
                                        GtkMenuItem* _tmp22_;
507
 
                                        GtkMenuItem* _tmp23_;
508
 
                                        _tmp15_ = (GtkMenuItem*) gtk_menu_item_new ();
509
 
                                        _tmp16_ = g_object_ref_sink (_tmp15_);
510
 
                                        _g_object_unref0 (item);
511
 
                                        item = _tmp16_;
512
 
                                        _tmp17_ = item;
513
 
                                        gtk_widget_set_visible (GTK_WIDGET (_tmp17_), TRUE);
514
 
                                        _tmp18_ = self->priv->_menu;
515
 
                                        _tmp19_ = item;
516
 
                                        _tmp20_ = menu_position;
517
 
                                        gtk_menu_shell_insert (GTK_MENU_SHELL (_tmp18_), GTK_WIDGET (_tmp19_), (gint) _tmp20_);
518
 
                                        _tmp21_ = self->priv->menuitems;
519
 
                                        _tmp21__length1 = self->priv->menuitems_length1;
520
 
                                        _tmp22_ = item;
521
 
                                        _tmp23_ = _g_object_ref0 (_tmp22_);
522
 
                                        _vala_array_add12 (&self->priv->menuitems, &self->priv->menuitems_length1, &self->priv->_menuitems_size_, _tmp23_);
523
 
                                }
524
 
                                _tmp24_ = item;
525
 
                                _tmp25_ = self->priv->_menumodel;
526
 
                                _tmp26_ = j;
527
 
                                _tmp27_ = menu_model_expression (_tmp25_, _tmp26_);
528
 
                                _tmp28_ = _tmp27_;
529
 
                                _tmp29_ = expression_cache_label (_tmp28_);
530
 
                                _tmp30_ = _tmp29_;
531
 
                                gtk_menu_item_set_label (_tmp24_, _tmp30_);
532
 
                                _g_free0 (_tmp30_);
533
 
                                _g_object_unref0 (_tmp28_);
534
 
                                _tmp31_ = menu_position;
535
 
                                menu_position = _tmp31_ + 1;
536
 
                                _g_object_unref0 (item);
537
 
                        }
538
 
                }
539
 
        }
540
 
        _tmp32_ = length;
541
 
        _tmp33_ = self->priv->menuitems;
542
 
        _tmp33__length1 = self->priv->menuitems_length1;
543
 
        if (_tmp32_ != _tmp33__length1) {
544
 
                GtkMenuItem** _tmp44_;
545
 
                gint _tmp44__length1;
546
 
                gint _tmp45_;
547
 
                GtkMenuItem** _tmp46_;
548
 
                gint _tmp46__length1;
549
 
                {
550
 
                        gint _tmp34_;
551
 
                        guint j;
552
 
                        GtkMenuItem** _tmp35_;
553
 
                        gint _tmp35__length1;
554
 
                        guint jsize;
555
 
                        _tmp34_ = length;
556
 
                        j = (guint) _tmp34_;
557
 
                        _tmp35_ = self->priv->menuitems;
558
 
                        _tmp35__length1 = self->priv->menuitems_length1;
559
 
                        jsize = (guint) _tmp35__length1;
560
 
                        {
561
 
                                gboolean _tmp36_;
562
 
                                _tmp36_ = TRUE;
563
 
                                while (TRUE) {
564
 
                                        gboolean _tmp37_;
565
 
                                        guint _tmp39_;
566
 
                                        guint _tmp40_;
567
 
                                        GtkMenuItem** _tmp41_;
568
 
                                        gint _tmp41__length1;
569
 
                                        guint _tmp42_;
570
 
                                        GtkMenuItem* _tmp43_;
571
 
                                        _tmp37_ = _tmp36_;
572
 
                                        if (!_tmp37_) {
573
 
                                                guint _tmp38_;
574
 
                                                _tmp38_ = j;
575
 
                                                j = _tmp38_ + 1;
576
 
                                        }
577
 
                                        _tmp36_ = FALSE;
578
 
                                        _tmp39_ = j;
579
 
                                        _tmp40_ = jsize;
580
 
                                        if (!(_tmp39_ < _tmp40_)) {
581
 
                                                break;
582
 
                                        }
583
 
                                        _tmp41_ = self->priv->menuitems;
584
 
                                        _tmp41__length1 = self->priv->menuitems_length1;
585
 
                                        _tmp42_ = j;
586
 
                                        _tmp43_ = _tmp41_[_tmp42_];
587
 
                                        gtk_widget_destroy (GTK_WIDGET (_tmp43_));
588
 
                                }
589
 
                        }
590
 
                }
591
 
                _tmp44_ = self->priv->menuitems;
592
 
                _tmp44__length1 = self->priv->menuitems_length1;
593
 
                _tmp45_ = length;
594
 
                _tmp46_ = ((_tmp44_ + 0) != NULL) ? _vala_array_dup16 (_tmp44_ + 0, _tmp45_ - 0) : ((gpointer) (_tmp44_ + 0));
595
 
                _tmp46__length1 = _tmp45_ - 0;
596
 
                self->priv->menuitems = (_vala_array_free (self->priv->menuitems, self->priv->menuitems_length1, (GDestroyNotify) g_object_unref), NULL);
597
 
                self->priv->menuitems = _tmp46_;
598
 
                self->priv->menuitems_length1 = _tmp46__length1;
599
 
                self->priv->_menuitems_size_ = self->priv->menuitems_length1;
600
 
        }
601
 
        _tmp47_ = self->priv->menuset;
602
 
        if (!_tmp47_) {
603
 
                AppIndicator* _tmp48_;
604
 
                GtkMenu* _tmp49_;
605
 
                AppIndicator* _tmp50_;
606
 
                GtkMenu* _tmp51_;
607
 
                GList* _tmp52_ = NULL;
608
 
                GList* _tmp53_;
609
 
                gconstpointer _tmp54_;
610
 
                _tmp48_ = self->priv->indicator;
611
 
                _tmp49_ = self->priv->_menu;
612
 
                app_indicator_set_menu (_tmp48_, _tmp49_);
613
 
                _tmp50_ = self->priv->indicator;
614
 
                _tmp51_ = self->priv->_menu;
615
 
                _tmp52_ = gtk_container_get_children (GTK_CONTAINER (_tmp51_));
616
 
                _tmp53_ = _tmp52_;
617
 
                _tmp54_ = _tmp53_->data;
618
 
                app_indicator_set_secondary_activate_target (_tmp50_, (GtkWidget*) _tmp54_);
619
 
                _g_list_free0 (_tmp53_);
620
 
                self->priv->menuset = TRUE;
621
 
        }
622
 
}
623
 
 
624
 
 
625
 
static void multi_load_indicator_updatelabelview (MultiLoadIndicator* self) {
626
 
        MenuModel* _tmp0_;
627
 
        gchar** _tmp1_;
628
 
        gint _tmp1__length1;
629
 
        gchar** _tmp2_;
630
 
        gint _tmp2__length1;
631
 
        gint indicatorcount;
632
 
        gchar* _tmp3_ = NULL;
633
 
        gboolean _tmp4_ = FALSE;
634
 
        gint _tmp5_;
635
 
        gboolean _tmp8_;
636
 
        const gchar* _tmp15_;
637
 
        gchar* _tmp16_;
638
 
        gchar* indicatorlabel;
639
 
        gchar* _tmp17_ = NULL;
640
 
        gboolean _tmp18_ = FALSE;
641
 
        gint _tmp19_;
642
 
        gboolean _tmp22_;
643
 
        const gchar* _tmp29_;
644
 
        gchar* _tmp30_;
645
 
        gchar* indicatorguide;
646
 
        AppIndicator* _tmp31_;
647
 
        const gchar* _tmp32_;
648
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
649
 
        _tmp0_ = self->priv->_labelmodel;
650
 
        _tmp1_ = menu_model_get_expressions (_tmp0_, &_tmp1__length1);
651
 
        _tmp2_ = _tmp1_;
652
 
        _tmp2__length1 = _tmp1__length1;
653
 
        indicatorcount = _tmp2__length1;
654
 
        _tmp5_ = self->priv->_indicator_index;
655
 
        if (0 <= _tmp5_) {
656
 
                gint _tmp6_;
657
 
                gint _tmp7_;
658
 
                _tmp6_ = self->priv->_indicator_index;
659
 
                _tmp7_ = indicatorcount;
660
 
                _tmp4_ = _tmp6_ < _tmp7_;
661
 
        } else {
662
 
                _tmp4_ = FALSE;
663
 
        }
664
 
        _tmp8_ = _tmp4_;
665
 
        if (_tmp8_) {
666
 
                MenuModel* _tmp9_;
667
 
                gint _tmp10_;
668
 
                ExpressionCache* _tmp11_ = NULL;
669
 
                ExpressionCache* _tmp12_;
670
 
                gchar* _tmp13_ = NULL;
671
 
                _tmp9_ = self->priv->_labelmodel;
672
 
                _tmp10_ = self->priv->_indicator_index;
673
 
                _tmp11_ = menu_model_expression (_tmp9_, (guint) _tmp10_);
674
 
                _tmp12_ = _tmp11_;
675
 
                _tmp13_ = expression_cache_label (_tmp12_);
676
 
                _g_free0 (_tmp3_);
677
 
                _tmp3_ = _tmp13_;
678
 
                _g_object_unref0 (_tmp12_);
679
 
        } else {
680
 
                gchar* _tmp14_;
681
 
                _tmp14_ = g_strdup ("");
682
 
                _g_free0 (_tmp3_);
683
 
                _tmp3_ = _tmp14_;
684
 
        }
685
 
        _tmp15_ = _tmp3_;
686
 
        _tmp16_ = g_strdup (_tmp15_);
687
 
        indicatorlabel = _tmp16_;
688
 
        _tmp19_ = self->priv->_indicator_index;
689
 
        if (0 <= _tmp19_) {
690
 
                gint _tmp20_;
691
 
                gint _tmp21_;
692
 
                _tmp20_ = self->priv->_indicator_index;
693
 
                _tmp21_ = indicatorcount;
694
 
                _tmp18_ = _tmp20_ < _tmp21_;
695
 
        } else {
696
 
                _tmp18_ = FALSE;
697
 
        }
698
 
        _tmp22_ = _tmp18_;
699
 
        if (_tmp22_) {
700
 
                MenuModel* _tmp23_;
701
 
                gint _tmp24_;
702
 
                ExpressionCache* _tmp25_ = NULL;
703
 
                ExpressionCache* _tmp26_;
704
 
                gchar* _tmp27_ = NULL;
705
 
                _tmp23_ = self->priv->_labelmodel;
706
 
                _tmp24_ = self->priv->_indicator_index;
707
 
                _tmp25_ = menu_model_expression (_tmp23_, (guint) _tmp24_);
708
 
                _tmp26_ = _tmp25_;
709
 
                _tmp27_ = expression_cache_guide (_tmp26_);
710
 
                _g_free0 (_tmp17_);
711
 
                _tmp17_ = _tmp27_;
712
 
                _g_object_unref0 (_tmp26_);
713
 
        } else {
714
 
                gchar* _tmp28_;
715
 
                _tmp28_ = g_strdup ("");
716
 
                _g_free0 (_tmp17_);
717
 
                _tmp17_ = _tmp28_;
718
 
        }
719
 
        _tmp29_ = _tmp17_;
720
 
        _tmp30_ = g_strdup (_tmp29_);
721
 
        indicatorguide = _tmp30_;
722
 
        _tmp31_ = self->priv->indicator;
723
 
        _tmp32_ = indicatorlabel;
724
 
        app_indicator_set_label (_tmp31_, _tmp32_, indicatorguide);
725
 
        _g_free0 (indicatorguide);
726
 
        _g_free0 (_tmp17_);
727
 
        _g_free0 (indicatorlabel);
728
 
        _g_free0 (_tmp3_);
729
 
}
730
 
 
731
 
 
732
 
static Block1Data* block1_data_ref (Block1Data* _data1_) {
733
 
        g_atomic_int_inc (&_data1_->_ref_count_);
734
 
        return _data1_;
735
 
}
736
 
 
737
 
 
738
 
static void block1_data_unref (Block1Data* _data1_) {
739
 
        if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
740
 
                _g_object_unref0 (_data1_->self);
741
 
                g_slice_free (Block1Data, _data1_);
742
 
        }
743
 
}
744
 
 
745
 
 
746
 
static void ____lambda3_ (Block1Data* _data1_, GtkWidget* w) {
747
 
        MultiLoadIndicator * self;
748
 
        GtkWidget* _tmp0_;
749
 
        GtkWidget* _tmp1_;
750
 
        guint _tmp2_;
751
 
        gchar* _tmp3_ = NULL;
752
 
        gchar* _tmp4_;
753
 
        GtkWidget* _tmp5_;
754
 
        guint _tmp6_;
755
 
        guint _tmp7_;
756
 
        guint _tmp8_ = 0U;
757
 
        self = _data1_->self;
758
 
        g_return_if_fail (GTK_IS_WIDGET (w));
759
 
        _tmp0_ = w;
760
 
        if (!GTK_IS_IMAGE (_tmp0_)) {
761
 
                return;
762
 
        }
763
 
        _tmp1_ = w;
764
 
        _tmp2_ = self->priv->currenticonindex;
765
 
        _tmp3_ = multi_load_indicator_iconpath (self, _tmp2_);
766
 
        _tmp4_ = _tmp3_;
767
 
        gtk_image_set_from_file (GTK_IMAGE (_tmp1_), _tmp4_);
768
 
        _g_free0 (_tmp4_);
769
 
        _tmp5_ = w;
770
 
        _tmp6_ = self->priv->lasticonwidth;
771
 
        _tmp7_ = self->priv->_height;
772
 
        _tmp8_ = MAX (_tmp6_, _tmp7_);
773
 
        gtk_image_set_pixel_size (GTK_IMAGE (_tmp5_), (gint) _tmp8_);
774
 
        _data1_->found = TRUE;
775
 
}
776
 
 
777
 
 
778
 
static void _____lambda3__gtk_callback (GtkWidget* widget, gpointer self) {
779
 
        ____lambda3_ (self, widget);
780
 
}
781
 
 
782
 
 
783
 
static void multi_load_indicator_updategraphsview (MultiLoadIndicator* self) {
784
 
        Block1Data* _data1_;
785
 
        GList* _tmp0_ = NULL;
786
 
        gboolean _tmp8_;
787
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
788
 
        _data1_ = g_slice_new0 (Block1Data);
789
 
        _data1_->_ref_count_ = 1;
790
 
        _data1_->self = g_object_ref (self);
791
 
        multi_load_indicator_iconwrite (self);
792
 
        _data1_->found = FALSE;
793
 
        _tmp0_ = gtk_window_list_toplevels ();
794
 
        {
795
 
                GList* toplevel_collection = NULL;
796
 
                GList* toplevel_it = NULL;
797
 
                toplevel_collection = _tmp0_;
798
 
                for (toplevel_it = toplevel_collection; toplevel_it != NULL; toplevel_it = toplevel_it->next) {
799
 
                        GtkWindow* toplevel = NULL;
800
 
                        toplevel = (GtkWindow*) toplevel_it->data;
801
 
                        {
802
 
                                gboolean _tmp1_ = FALSE;
803
 
                                GtkWindow* _tmp2_;
804
 
                                GType _tmp3_ = 0UL;
805
 
                                const gchar* _tmp4_ = NULL;
806
 
                                gboolean _tmp6_;
807
 
                                GtkWindow* _tmp7_;
808
 
                                _tmp2_ = toplevel;
809
 
                                _tmp3_ = G_TYPE_FROM_INSTANCE (G_OBJECT (_tmp2_));
810
 
                                _tmp4_ = g_type_name (_tmp3_);
811
 
                                if (g_strcmp0 (_tmp4_, "GtkTrayIcon") != 0) {
812
 
                                        _tmp1_ = TRUE;
813
 
                                } else {
814
 
                                        GtkWindow* _tmp5_;
815
 
                                        _tmp5_ = toplevel;
816
 
                                        _tmp1_ = !GTK_IS_CONTAINER (_tmp5_);
817
 
                                }
818
 
                                _tmp6_ = _tmp1_;
819
 
                                if (_tmp6_) {
820
 
                                        continue;
821
 
                                }
822
 
                                _tmp7_ = toplevel;
823
 
                                gtk_container_foreach (GTK_CONTAINER (_tmp7_), _____lambda3__gtk_callback, _data1_);
824
 
                        }
825
 
                }
826
 
                _g_list_free0 (toplevel_collection);
827
 
        }
828
 
        _tmp8_ = _data1_->found;
829
 
        if (!_tmp8_) {
830
 
                AppIndicator* _tmp9_;
831
 
                guint _tmp10_;
832
 
                gchar* _tmp11_ = NULL;
833
 
                gchar* _tmp12_;
834
 
                MenuModel* _tmp13_;
835
 
                ExpressionCache* _tmp14_ = NULL;
836
 
                ExpressionCache* _tmp15_;
837
 
                gchar* _tmp16_ = NULL;
838
 
                gchar* _tmp17_;
839
 
                _tmp9_ = self->priv->indicator;
840
 
                _tmp10_ = self->priv->currenticonindex;
841
 
                _tmp11_ = multi_load_indicator_iconname (self, _tmp10_);
842
 
                _tmp12_ = _tmp11_;
843
 
                _tmp13_ = self->priv->_descriptionmodel;
844
 
                _tmp14_ = menu_model_expression (_tmp13_, (guint) 0);
845
 
                _tmp15_ = _tmp14_;
846
 
                _tmp16_ = expression_cache_label (_tmp15_);
847
 
                _tmp17_ = _tmp16_;
848
 
                app_indicator_set_icon_full (_tmp9_, _tmp12_, _tmp17_);
849
 
                _g_free0 (_tmp17_);
850
 
                _g_object_unref0 (_tmp15_);
851
 
                _g_free0 (_tmp12_);
852
 
        }
853
 
        block1_data_unref (_data1_);
854
 
        _data1_ = NULL;
855
 
}
856
 
 
857
 
 
858
 
static gchar* multi_load_indicator_iconname (MultiLoadIndicator* self, guint index) {
859
 
        gchar* result = NULL;
860
 
        guint _tmp0_;
861
 
        gchar* _tmp1_ = NULL;
862
 
        gchar* _tmp2_;
863
 
        gchar* _tmp3_ = NULL;
864
 
        gchar* _tmp4_;
865
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
866
 
        _tmp0_ = index;
867
 
        _tmp1_ = g_strdup_printf ("%u", _tmp0_);
868
 
        _tmp2_ = _tmp1_;
869
 
        _tmp3_ = g_strconcat ("indicator-multiload-graphs-", _tmp2_, NULL);
870
 
        _tmp4_ = _tmp3_;
871
 
        _g_free0 (_tmp2_);
872
 
        result = _tmp4_;
873
 
        return result;
874
 
}
875
 
 
876
 
 
877
 
static gchar* multi_load_indicator_iconpath (MultiLoadIndicator* self, guint index) {
878
 
        gchar* result = NULL;
879
 
        const gchar* _tmp0_;
880
 
        guint _tmp1_;
881
 
        gchar* _tmp2_ = NULL;
882
 
        gchar* _tmp3_;
883
 
        gchar* _tmp4_;
884
 
        gchar* _tmp5_;
885
 
        gchar* _tmp6_ = NULL;
886
 
        gchar* _tmp7_;
887
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
888
 
        _tmp0_ = self->priv->_icondirectory;
889
 
        _tmp1_ = index;
890
 
        _tmp2_ = multi_load_indicator_iconname (self, _tmp1_);
891
 
        _tmp3_ = _tmp2_;
892
 
        _tmp4_ = g_strconcat (_tmp3_, ".png", NULL);
893
 
        _tmp5_ = _tmp4_;
894
 
        _tmp6_ = g_build_filename (_tmp0_, _tmp5_, NULL);
895
 
        _tmp7_ = _tmp6_;
896
 
        _g_free0 (_tmp5_);
897
 
        _g_free0 (_tmp3_);
898
 
        result = _tmp7_;
899
 
        return result;
900
 
}
901
 
 
902
 
 
903
 
static void multi_load_indicator_iconwritedummy (MultiLoadIndicator* self) {
904
 
        cairo_surface_t* _tmp0_;
905
 
        cairo_surface_t* surface;
906
 
        gchar* _tmp1_ = NULL;
907
 
        gchar* _tmp2_;
908
 
        gchar* _tmp3_ = NULL;
909
 
        gchar* _tmp4_;
910
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
911
 
        _tmp0_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 1, 1);
912
 
        surface = _tmp0_;
913
 
        _tmp1_ = multi_load_indicator_iconpath (self, (guint) 0);
914
 
        _tmp2_ = _tmp1_;
915
 
        cairo_surface_write_to_png (surface, _tmp2_);
916
 
        _g_free0 (_tmp2_);
917
 
        _tmp3_ = multi_load_indicator_iconpath (self, (guint) 1);
918
 
        _tmp4_ = _tmp3_;
919
 
        cairo_surface_write_to_png (surface, _tmp4_);
920
 
        _g_free0 (_tmp4_);
921
 
        _cairo_surface_destroy0 (surface);
922
 
}
923
 
 
924
 
 
925
 
static TraceModel** _vala_array_dup17 (TraceModel** self, int length) {
926
 
        TraceModel** result;
927
 
        int i;
928
 
        result = g_new0 (TraceModel*, length + 1);
929
 
        for (i = 0; i < length; i++) {
930
 
                TraceModel* _tmp0_;
931
 
                _tmp0_ = _g_object_ref0 (self[i]);
932
 
                result[i] = _tmp0_;
933
 
        }
934
 
        return result;
935
 
}
936
 
 
937
 
 
938
 
static void multi_load_indicator_iconwrite (MultiLoadIndicator* self) {
939
 
        GraphModels* _tmp0_;
940
 
        guint count;
941
 
        GraphModels* _tmp1_;
942
 
        GraphModel** _tmp2_;
943
 
        gint _tmp2__length1;
944
 
        GraphModel** _tmp3_;
945
 
        gint _tmp3__length1;
946
 
        guint _tmp9_;
947
 
        guint _tmp10_;
948
 
        guint _tmp11_;
949
 
        guint _tmp12_;
950
 
        guint _tmp13_;
951
 
        cairo_surface_t* _tmp14_;
952
 
        cairo_surface_t* surface;
953
 
        cairo_surface_t* _tmp15_;
954
 
        cairo_t* _tmp16_;
955
 
        cairo_t* ctx;
956
 
        cairo_t* _tmp17_;
957
 
        cairo_t* _tmp18_;
958
 
        guint offset;
959
 
        GraphModels* _tmp19_;
960
 
        GraphModel** _tmp20_;
961
 
        gint _tmp20__length1;
962
 
        GraphModel** _tmp21_;
963
 
        gint _tmp21__length1;
964
 
        guint _tmp122_;
965
 
        cairo_surface_t* _tmp123_;
966
 
        guint _tmp124_;
967
 
        gchar* _tmp125_ = NULL;
968
 
        gchar* _tmp126_;
969
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
970
 
        self->priv->lasticonwidth = (guint) 0;
971
 
        _tmp0_ = self->priv->_graphmodels;
972
 
        if (_tmp0_ == NULL) {
973
 
                return;
974
 
        }
975
 
        count = (guint) 0;
976
 
        _tmp1_ = self->priv->_graphmodels;
977
 
        _tmp2_ = graph_models_get_graphmodels (_tmp1_, &_tmp2__length1);
978
 
        _tmp3_ = _tmp2_;
979
 
        _tmp3__length1 = _tmp2__length1;
980
 
        {
981
 
                GraphModel** graphmodel_collection = NULL;
982
 
                gint graphmodel_collection_length1 = 0;
983
 
                gint _graphmodel_collection_size_ = 0;
984
 
                gint graphmodel_it = 0;
985
 
                graphmodel_collection = _tmp3_;
986
 
                graphmodel_collection_length1 = _tmp3__length1;
987
 
                for (graphmodel_it = 0; graphmodel_it < _tmp3__length1; graphmodel_it = graphmodel_it + 1) {
988
 
                        GraphModel* _tmp4_;
989
 
                        GraphModel* graphmodel = NULL;
990
 
                        _tmp4_ = _g_object_ref0 (graphmodel_collection[graphmodel_it]);
991
 
                        graphmodel = _tmp4_;
992
 
                        {
993
 
                                GraphModel* _tmp5_;
994
 
                                gboolean _tmp6_;
995
 
                                gboolean _tmp7_;
996
 
                                _tmp5_ = graphmodel;
997
 
                                _tmp6_ = graph_model_get_enabled (_tmp5_);
998
 
                                _tmp7_ = _tmp6_;
999
 
                                if (_tmp7_) {
1000
 
                                        guint _tmp8_;
1001
 
                                        _tmp8_ = count;
1002
 
                                        count = _tmp8_ + 1;
1003
 
                                }
1004
 
                                _g_object_unref0 (graphmodel);
1005
 
                        }
1006
 
                }
1007
 
        }
1008
 
        _tmp9_ = count;
1009
 
        if (_tmp9_ == ((guint) 0)) {
1010
 
                return;
1011
 
        }
1012
 
        _tmp10_ = count;
1013
 
        _tmp11_ = self->priv->_width;
1014
 
        self->priv->lasticonwidth = (guint) (((gint) (_tmp10_ * (_tmp11_ + 2))) - 2);
1015
 
        _tmp12_ = self->priv->lasticonwidth;
1016
 
        _tmp13_ = self->priv->_height;
1017
 
        _tmp14_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, (gint) _tmp12_, (gint) _tmp13_);
1018
 
        surface = _tmp14_;
1019
 
        _tmp15_ = surface;
1020
 
        _tmp16_ = cairo_create (_tmp15_);
1021
 
        ctx = _tmp16_;
1022
 
        _tmp17_ = ctx;
1023
 
        cairo_set_antialias (_tmp17_, CAIRO_ANTIALIAS_NONE);
1024
 
        _tmp18_ = ctx;
1025
 
        cairo_set_line_width (_tmp18_, (gdouble) 1);
1026
 
        offset = (guint) 0;
1027
 
        _tmp19_ = self->priv->_graphmodels;
1028
 
        _tmp20_ = graph_models_get_graphmodels (_tmp19_, &_tmp20__length1);
1029
 
        _tmp21_ = _tmp20_;
1030
 
        _tmp21__length1 = _tmp20__length1;
1031
 
        {
1032
 
                GraphModel** graphmodel_collection = NULL;
1033
 
                gint graphmodel_collection_length1 = 0;
1034
 
                gint _graphmodel_collection_size_ = 0;
1035
 
                gint graphmodel_it = 0;
1036
 
                graphmodel_collection = _tmp21_;
1037
 
                graphmodel_collection_length1 = _tmp21__length1;
1038
 
                for (graphmodel_it = 0; graphmodel_it < _tmp21__length1; graphmodel_it = graphmodel_it + 1) {
1039
 
                        GraphModel* _tmp22_;
1040
 
                        GraphModel* graphmodel = NULL;
1041
 
                        _tmp22_ = _g_object_ref0 (graphmodel_collection[graphmodel_it]);
1042
 
                        graphmodel = _tmp22_;
1043
 
                        {
1044
 
                                GraphModel* _tmp23_;
1045
 
                                gboolean _tmp24_;
1046
 
                                gboolean _tmp25_;
1047
 
                                GraphModel* _tmp26_;
1048
 
                                cairo_t* _tmp27_;
1049
 
                                cairo_t* _tmp28_;
1050
 
                                guint _tmp29_;
1051
 
                                guint _tmp30_;
1052
 
                                guint _tmp31_;
1053
 
                                cairo_t* _tmp32_;
1054
 
                                GraphModel* _tmp33_;
1055
 
                                TraceModel** _tmp34_;
1056
 
                                gint _tmp34__length1;
1057
 
                                TraceModel** _tmp35_;
1058
 
                                gint _tmp35__length1;
1059
 
                                TraceModel** _tmp36_;
1060
 
                                gint _tmp36__length1;
1061
 
                                TraceModel** tracemodels;
1062
 
                                gint tracemodels_length1;
1063
 
                                gint _tracemodels_size_;
1064
 
                                TraceModel** _tmp37_;
1065
 
                                gint _tmp37__length1;
1066
 
                                guint _tmp38_;
1067
 
                                gdouble* _tmp39_ = NULL;
1068
 
                                gdouble* values;
1069
 
                                gint values_length1;
1070
 
                                gint values_length2;
1071
 
                                GraphModel* _tmp40_;
1072
 
                                gdouble _tmp41_;
1073
 
                                gdouble _tmp42_;
1074
 
                                gdouble scale;
1075
 
                                guint _tmp120_;
1076
 
                                guint _tmp121_;
1077
 
                                _tmp23_ = graphmodel;
1078
 
                                _tmp24_ = graph_model_get_enabled (_tmp23_);
1079
 
                                _tmp25_ = _tmp24_;
1080
 
                                if (!_tmp25_) {
1081
 
                                        _g_object_unref0 (graphmodel);
1082
 
                                        continue;
1083
 
                                }
1084
 
                                _tmp26_ = graphmodel;
1085
 
                                _tmp27_ = ctx;
1086
 
                                graph_model_set_source_color (_tmp26_, _tmp27_);
1087
 
                                _tmp28_ = ctx;
1088
 
                                _tmp29_ = offset;
1089
 
                                _tmp30_ = self->priv->_width;
1090
 
                                _tmp31_ = self->priv->_height;
1091
 
                                cairo_rectangle (_tmp28_, (gdouble) _tmp29_, (gdouble) 0, (gdouble) _tmp30_, (gdouble) _tmp31_);
1092
 
                                _tmp32_ = ctx;
1093
 
                                cairo_fill (_tmp32_);
1094
 
                                _tmp33_ = graphmodel;
1095
 
                                _tmp34_ = graph_model_get_tracemodels (_tmp33_, &_tmp34__length1);
1096
 
                                _tmp35_ = _tmp34_;
1097
 
                                _tmp35__length1 = _tmp34__length1;
1098
 
                                _tmp36_ = (_tmp35_ != NULL) ? _vala_array_dup17 (_tmp35_, _tmp35__length1) : ((gpointer) _tmp35_);
1099
 
                                _tmp36__length1 = _tmp35__length1;
1100
 
                                tracemodels = _tmp36_;
1101
 
                                tracemodels_length1 = _tmp36__length1;
1102
 
                                _tracemodels_size_ = tracemodels_length1;
1103
 
                                _tmp37_ = tracemodels;
1104
 
                                _tmp37__length1 = tracemodels_length1;
1105
 
                                _tmp38_ = self->priv->_width;
1106
 
                                _tmp39_ = g_new0 (gdouble, _tmp37__length1 * _tmp38_);
1107
 
                                values = _tmp39_;
1108
 
                                values_length1 = _tmp37__length1;
1109
 
                                values_length2 = _tmp38_;
1110
 
                                _tmp40_ = graphmodel;
1111
 
                                _tmp41_ = graph_model_get_scale (_tmp40_);
1112
 
                                _tmp42_ = _tmp41_;
1113
 
                                scale = _tmp42_;
1114
 
                                {
1115
 
                                        guint j;
1116
 
                                        gdouble* _tmp43_;
1117
 
                                        gint _tmp43__length1;
1118
 
                                        gint _tmp43__length2;
1119
 
                                        gint _tmp44_;
1120
 
                                        guint jsize;
1121
 
                                        j = (guint) 0;
1122
 
                                        _tmp43_ = values;
1123
 
                                        _tmp43__length1 = values_length1;
1124
 
                                        _tmp43__length2 = values_length2;
1125
 
                                        _tmp44_ = _tmp43__length1;
1126
 
                                        jsize = (guint) _tmp44_;
1127
 
                                        {
1128
 
                                                gboolean _tmp45_;
1129
 
                                                _tmp45_ = TRUE;
1130
 
                                                while (TRUE) {
1131
 
                                                        gboolean _tmp46_;
1132
 
                                                        guint _tmp48_;
1133
 
                                                        guint _tmp49_;
1134
 
                                                        TraceModel** _tmp50_;
1135
 
                                                        gint _tmp50__length1;
1136
 
                                                        guint _tmp51_;
1137
 
                                                        TraceModel* _tmp52_;
1138
 
                                                        gboolean _tmp53_;
1139
 
                                                        gboolean _tmp54_;
1140
 
                                                        gboolean enabled;
1141
 
                                                        TraceModel** _tmp55_;
1142
 
                                                        gint _tmp55__length1;
1143
 
                                                        guint _tmp56_;
1144
 
                                                        TraceModel* _tmp57_;
1145
 
                                                        gdouble* _tmp58_;
1146
 
                                                        gint _tmp58__length1;
1147
 
                                                        gdouble* _tmp59_;
1148
 
                                                        gint _tmp59__length1;
1149
 
                                                        gdouble* tracedata;
1150
 
                                                        gint tracedata_length1;
1151
 
                                                        gint _tracedata_size_;
1152
 
                                                        _tmp46_ = _tmp45_;
1153
 
                                                        if (!_tmp46_) {
1154
 
                                                                guint _tmp47_;
1155
 
                                                                _tmp47_ = j;
1156
 
                                                                j = _tmp47_ + 1;
1157
 
                                                        }
1158
 
                                                        _tmp45_ = FALSE;
1159
 
                                                        _tmp48_ = j;
1160
 
                                                        _tmp49_ = jsize;
1161
 
                                                        if (!(_tmp48_ < _tmp49_)) {
1162
 
                                                                break;
1163
 
                                                        }
1164
 
                                                        _tmp50_ = tracemodels;
1165
 
                                                        _tmp50__length1 = tracemodels_length1;
1166
 
                                                        _tmp51_ = j;
1167
 
                                                        _tmp52_ = _tmp50_[_tmp51_];
1168
 
                                                        _tmp53_ = trace_model_get_enabled (_tmp52_);
1169
 
                                                        _tmp54_ = _tmp53_;
1170
 
                                                        enabled = _tmp54_;
1171
 
                                                        _tmp55_ = tracemodels;
1172
 
                                                        _tmp55__length1 = tracemodels_length1;
1173
 
                                                        _tmp56_ = j;
1174
 
                                                        _tmp57_ = _tmp55_[_tmp56_];
1175
 
                                                        _tmp58_ = trace_model_get_values (_tmp57_, &_tmp58__length1);
1176
 
                                                        _tmp59_ = _tmp58_;
1177
 
                                                        _tmp59__length1 = _tmp58__length1;
1178
 
                                                        tracedata = _tmp59_;
1179
 
                                                        tracedata_length1 = _tmp59__length1;
1180
 
                                                        _tracedata_size_ = tracedata_length1;
1181
 
                                                        {
1182
 
                                                                guint i;
1183
 
                                                                gdouble* _tmp60_;
1184
 
                                                                gint _tmp60__length1;
1185
 
                                                                gint _tmp60__length2;
1186
 
                                                                gint _tmp61_;
1187
 
                                                                guint isize;
1188
 
                                                                i = (guint) 0;
1189
 
                                                                _tmp60_ = values;
1190
 
                                                                _tmp60__length1 = values_length1;
1191
 
                                                                _tmp60__length2 = values_length2;
1192
 
                                                                _tmp61_ = _tmp60__length2;
1193
 
                                                                isize = (guint) _tmp61_;
1194
 
                                                                {
1195
 
                                                                        gboolean _tmp62_;
1196
 
                                                                        _tmp62_ = TRUE;
1197
 
                                                                        while (TRUE) {
1198
 
                                                                                gboolean _tmp63_;
1199
 
                                                                                guint _tmp65_;
1200
 
                                                                                guint _tmp66_;
1201
 
                                                                                gdouble _tmp67_ = 0.0;
1202
 
                                                                                guint _tmp68_;
1203
 
                                                                                gdouble _tmp73_ = 0.0;
1204
 
                                                                                gboolean _tmp74_;
1205
 
                                                                                gdouble* _tmp78_;
1206
 
                                                                                gint _tmp78__length1;
1207
 
                                                                                gint _tmp78__length2;
1208
 
                                                                                guint _tmp79_;
1209
 
                                                                                guint _tmp80_;
1210
 
                                                                                gdouble _tmp81_;
1211
 
                                                                                gdouble _tmp82_;
1212
 
                                                                                gdouble _tmp83_;
1213
 
                                                                                gdouble _tmp84_;
1214
 
                                                                                _tmp63_ = _tmp62_;
1215
 
                                                                                if (!_tmp63_) {
1216
 
                                                                                        guint _tmp64_;
1217
 
                                                                                        _tmp64_ = i;
1218
 
                                                                                        i = _tmp64_ + 1;
1219
 
                                                                                }
1220
 
                                                                                _tmp62_ = FALSE;
1221
 
                                                                                _tmp65_ = i;
1222
 
                                                                                _tmp66_ = isize;
1223
 
                                                                                if (!(_tmp65_ < _tmp66_)) {
1224
 
                                                                                        break;
1225
 
                                                                                }
1226
 
                                                                                _tmp68_ = j;
1227
 
                                                                                if (_tmp68_ > ((guint) 0)) {
1228
 
                                                                                        gdouble* _tmp69_;
1229
 
                                                                                        gint _tmp69__length1;
1230
 
                                                                                        gint _tmp69__length2;
1231
 
                                                                                        guint _tmp70_;
1232
 
                                                                                        guint _tmp71_;
1233
 
                                                                                        gdouble _tmp72_;
1234
 
                                                                                        _tmp69_ = values;
1235
 
                                                                                        _tmp69__length1 = values_length1;
1236
 
                                                                                        _tmp69__length2 = values_length2;
1237
 
                                                                                        _tmp70_ = j;
1238
 
                                                                                        _tmp71_ = i;
1239
 
                                                                                        _tmp72_ = _tmp69_[((_tmp70_ - 1) * _tmp69__length2) + _tmp71_];
1240
 
                                                                                        _tmp67_ = _tmp72_;
1241
 
                                                                                } else {
1242
 
                                                                                        _tmp67_ = (gdouble) 0;
1243
 
                                                                                }
1244
 
                                                                                _tmp74_ = enabled;
1245
 
                                                                                if (_tmp74_) {
1246
 
                                                                                        gdouble* _tmp75_;
1247
 
                                                                                        gint _tmp75__length1;
1248
 
                                                                                        guint _tmp76_;
1249
 
                                                                                        gdouble _tmp77_;
1250
 
                                                                                        _tmp75_ = tracedata;
1251
 
                                                                                        _tmp75__length1 = tracedata_length1;
1252
 
                                                                                        _tmp76_ = i;
1253
 
                                                                                        _tmp77_ = _tmp75_[_tmp76_];
1254
 
                                                                                        _tmp73_ = _tmp77_;
1255
 
                                                                                } else {
1256
 
                                                                                        _tmp73_ = (gdouble) 0;
1257
 
                                                                                }
1258
 
                                                                                _tmp78_ = values;
1259
 
                                                                                _tmp78__length1 = values_length1;
1260
 
                                                                                _tmp78__length2 = values_length2;
1261
 
                                                                                _tmp79_ = j;
1262
 
                                                                                _tmp80_ = i;
1263
 
                                                                                _tmp81_ = _tmp67_;
1264
 
                                                                                _tmp82_ = _tmp73_;
1265
 
                                                                                _tmp83_ = scale;
1266
 
                                                                                _tmp78_[(_tmp79_ * _tmp78__length2) + _tmp80_] = _tmp81_ + (_tmp82_ / _tmp83_);
1267
 
                                                                                _tmp84_ = _tmp78_[(_tmp79_ * _tmp78__length2) + _tmp80_];
1268
 
                                                                        }
1269
 
                                                                }
1270
 
                                                        }
1271
 
                                                }
1272
 
                                        }
1273
 
                                }
1274
 
                                {
1275
 
                                        gdouble* _tmp85_;
1276
 
                                        gint _tmp85__length1;
1277
 
                                        gint _tmp85__length2;
1278
 
                                        gint _tmp86_;
1279
 
                                        gint j;
1280
 
                                        _tmp85_ = values;
1281
 
                                        _tmp85__length1 = values_length1;
1282
 
                                        _tmp85__length2 = values_length2;
1283
 
                                        _tmp86_ = _tmp85__length1;
1284
 
                                        j = _tmp86_ - 1;
1285
 
                                        {
1286
 
                                                gboolean _tmp87_;
1287
 
                                                _tmp87_ = TRUE;
1288
 
                                                while (TRUE) {
1289
 
                                                        gboolean _tmp88_;
1290
 
                                                        gint _tmp90_;
1291
 
                                                        cairo_t* _tmp91_;
1292
 
                                                        GraphModel* _tmp92_;
1293
 
                                                        TraceModel** _tmp93_;
1294
 
                                                        gint _tmp93__length1;
1295
 
                                                        TraceModel** _tmp94_;
1296
 
                                                        gint _tmp94__length1;
1297
 
                                                        gint _tmp95_;
1298
 
                                                        TraceModel* _tmp96_;
1299
 
                                                        GdkColor _tmp97_;
1300
 
                                                        GdkColor _tmp98_;
1301
 
                                                        cairo_t* _tmp119_;
1302
 
                                                        _tmp88_ = _tmp87_;
1303
 
                                                        if (!_tmp88_) {
1304
 
                                                                gint _tmp89_;
1305
 
                                                                _tmp89_ = j;
1306
 
                                                                j = _tmp89_ - 1;
1307
 
                                                        }
1308
 
                                                        _tmp87_ = FALSE;
1309
 
                                                        _tmp90_ = j;
1310
 
                                                        if (!(_tmp90_ >= 0)) {
1311
 
                                                                break;
1312
 
                                                        }
1313
 
                                                        _tmp91_ = ctx;
1314
 
                                                        _tmp92_ = graphmodel;
1315
 
                                                        _tmp93_ = graph_model_get_tracemodels (_tmp92_, &_tmp93__length1);
1316
 
                                                        _tmp94_ = _tmp93_;
1317
 
                                                        _tmp94__length1 = _tmp93__length1;
1318
 
                                                        _tmp95_ = j;
1319
 
                                                        _tmp96_ = _tmp94_[_tmp95_];
1320
 
                                                        trace_model_get_color (_tmp96_, &_tmp97_);
1321
 
                                                        _tmp98_ = _tmp97_;
1322
 
                                                        gdk_cairo_set_source_color (_tmp91_, &_tmp98_);
1323
 
                                                        {
1324
 
                                                                guint i;
1325
 
                                                                gdouble* _tmp99_;
1326
 
                                                                gint _tmp99__length1;
1327
 
                                                                gint _tmp99__length2;
1328
 
                                                                gint _tmp100_;
1329
 
                                                                guint isize;
1330
 
                                                                i = (guint) 0;
1331
 
                                                                _tmp99_ = values;
1332
 
                                                                _tmp99__length1 = values_length1;
1333
 
                                                                _tmp99__length2 = values_length2;
1334
 
                                                                _tmp100_ = _tmp99__length2;
1335
 
                                                                isize = (guint) _tmp100_;
1336
 
                                                                {
1337
 
                                                                        gboolean _tmp101_;
1338
 
                                                                        _tmp101_ = TRUE;
1339
 
                                                                        while (TRUE) {
1340
 
                                                                                gboolean _tmp102_;
1341
 
                                                                                guint _tmp104_;
1342
 
                                                                                guint _tmp105_;
1343
 
                                                                                cairo_t* _tmp106_;
1344
 
                                                                                guint _tmp107_;
1345
 
                                                                                guint _tmp108_;
1346
 
                                                                                guint _tmp109_;
1347
 
                                                                                cairo_t* _tmp110_;
1348
 
                                                                                guint _tmp111_;
1349
 
                                                                                guint _tmp112_;
1350
 
                                                                                guint _tmp113_;
1351
 
                                                                                guint _tmp114_;
1352
 
                                                                                gdouble* _tmp115_;
1353
 
                                                                                gint _tmp115__length1;
1354
 
                                                                                gint _tmp115__length2;
1355
 
                                                                                gint _tmp116_;
1356
 
                                                                                guint _tmp117_;
1357
 
                                                                                gdouble _tmp118_;
1358
 
                                                                                _tmp102_ = _tmp101_;
1359
 
                                                                                if (!_tmp102_) {
1360
 
                                                                                        guint _tmp103_;
1361
 
                                                                                        _tmp103_ = i;
1362
 
                                                                                        i = _tmp103_ + 1;
1363
 
                                                                                }
1364
 
                                                                                _tmp101_ = FALSE;
1365
 
                                                                                _tmp104_ = i;
1366
 
                                                                                _tmp105_ = isize;
1367
 
                                                                                if (!(_tmp104_ < _tmp105_)) {
1368
 
                                                                                        break;
1369
 
                                                                                }
1370
 
                                                                                _tmp106_ = ctx;
1371
 
                                                                                _tmp107_ = offset;
1372
 
                                                                                _tmp108_ = i;
1373
 
                                                                                _tmp109_ = self->priv->_height;
1374
 
                                                                                cairo_move_to (_tmp106_, (0.5 + _tmp107_) + _tmp108_, _tmp109_ + 0.5);
1375
 
                                                                                _tmp110_ = ctx;
1376
 
                                                                                _tmp111_ = offset;
1377
 
                                                                                _tmp112_ = i;
1378
 
                                                                                _tmp113_ = self->priv->_height;
1379
 
                                                                                _tmp114_ = self->priv->_height;
1380
 
                                                                                _tmp115_ = values;
1381
 
                                                                                _tmp115__length1 = values_length1;
1382
 
                                                                                _tmp115__length2 = values_length2;
1383
 
                                                                                _tmp116_ = j;
1384
 
                                                                                _tmp117_ = i;
1385
 
                                                                                _tmp118_ = _tmp115_[(_tmp116_ * _tmp115__length2) + _tmp117_];
1386
 
                                                                                cairo_line_to (_tmp110_, (0.5 + _tmp111_) + _tmp112_, (_tmp113_ + 0.5) - (_tmp114_ * _tmp118_));
1387
 
                                                                        }
1388
 
                                                                }
1389
 
                                                        }
1390
 
                                                        _tmp119_ = ctx;
1391
 
                                                        cairo_stroke (_tmp119_);
1392
 
                                                }
1393
 
                                        }
1394
 
                                }
1395
 
                                _tmp120_ = offset;
1396
 
                                _tmp121_ = self->priv->_width;
1397
 
                                offset = _tmp120_ + (_tmp121_ + 2);
1398
 
                                values = (g_free (values), NULL);
1399
 
                                tracemodels = (_vala_array_free (tracemodels, tracemodels_length1, (GDestroyNotify) g_object_unref), NULL);
1400
 
                                _g_object_unref0 (graphmodel);
1401
 
                        }
1402
 
                }
1403
 
        }
1404
 
        _tmp122_ = self->priv->currenticonindex;
1405
 
        self->priv->currenticonindex = 1 - _tmp122_;
1406
 
        _tmp123_ = surface;
1407
 
        _tmp124_ = self->priv->currenticonindex;
1408
 
        _tmp125_ = multi_load_indicator_iconpath (self, _tmp124_);
1409
 
        _tmp126_ = _tmp125_;
1410
 
        cairo_surface_write_to_png (_tmp123_, _tmp126_);
1411
 
        _g_free0 (_tmp126_);
1412
 
        _cairo_destroy0 (ctx);
1413
 
        _cairo_surface_destroy0 (surface);
1414
 
}
1415
 
 
1416
 
 
1417
 
const gchar* multi_load_indicator_get_icondirectory (MultiLoadIndicator* self) {
1418
 
        const gchar* result;
1419
 
        const gchar* _tmp0_;
1420
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
1421
 
        _tmp0_ = self->priv->_icondirectory;
1422
 
        result = _tmp0_;
1423
 
        return result;
1424
 
}
1425
 
 
1426
 
 
1427
 
static void multi_load_indicator_set_icondirectory (MultiLoadIndicator* self, const gchar* value) {
1428
 
        const gchar* _tmp0_;
1429
 
        gchar* _tmp1_;
1430
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1431
 
        _tmp0_ = value;
1432
 
        _tmp1_ = g_strdup (_tmp0_);
1433
 
        _g_free0 (self->priv->_icondirectory);
1434
 
        self->priv->_icondirectory = _tmp1_;
1435
 
        g_object_notify ((GObject *) self, "icondirectory");
1436
 
}
1437
 
 
1438
 
 
1439
 
Providers* multi_load_indicator_get_providers (MultiLoadIndicator* self) {
1440
 
        Providers* result;
1441
 
        Providers* _tmp0_;
1442
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
1443
 
        _tmp0_ = self->priv->_providers;
1444
 
        result = _tmp0_;
1445
 
        return result;
1446
 
}
1447
 
 
1448
 
 
1449
 
static void multi_load_indicator_set_providers (MultiLoadIndicator* self, Providers* value) {
1450
 
        Providers* _tmp0_;
1451
 
        Providers* _tmp1_;
1452
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1453
 
        _tmp0_ = value;
1454
 
        _tmp1_ = _g_object_ref0 (_tmp0_);
1455
 
        _g_object_unref0 (self->priv->_providers);
1456
 
        self->priv->_providers = _tmp1_;
1457
 
        g_object_notify ((GObject *) self, "providers");
1458
 
}
1459
 
 
1460
 
 
1461
 
MenuModel* multi_load_indicator_get_menumodel (MultiLoadIndicator* self) {
1462
 
        MenuModel* result;
1463
 
        MenuModel* _tmp0_;
1464
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
1465
 
        _tmp0_ = self->priv->_menumodel;
1466
 
        result = _tmp0_;
1467
 
        return result;
1468
 
}
1469
 
 
1470
 
 
1471
 
static void multi_load_indicator_set_menumodel (MultiLoadIndicator* self, MenuModel* value) {
1472
 
        MenuModel* _tmp0_;
1473
 
        MenuModel* _tmp1_;
1474
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1475
 
        _tmp0_ = value;
1476
 
        _tmp1_ = _g_object_ref0 (_tmp0_);
1477
 
        _g_object_unref0 (self->priv->_menumodel);
1478
 
        self->priv->_menumodel = _tmp1_;
1479
 
        g_object_notify ((GObject *) self, "menumodel");
1480
 
}
1481
 
 
1482
 
 
1483
 
MenuModel* multi_load_indicator_get_labelmodel (MultiLoadIndicator* self) {
1484
 
        MenuModel* result;
1485
 
        MenuModel* _tmp0_;
1486
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
1487
 
        _tmp0_ = self->priv->_labelmodel;
1488
 
        result = _tmp0_;
1489
 
        return result;
1490
 
}
1491
 
 
1492
 
 
1493
 
static void multi_load_indicator_set_labelmodel (MultiLoadIndicator* self, MenuModel* value) {
1494
 
        MenuModel* _tmp0_;
1495
 
        MenuModel* _tmp1_;
1496
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1497
 
        _tmp0_ = value;
1498
 
        _tmp1_ = _g_object_ref0 (_tmp0_);
1499
 
        _g_object_unref0 (self->priv->_labelmodel);
1500
 
        self->priv->_labelmodel = _tmp1_;
1501
 
        g_object_notify ((GObject *) self, "labelmodel");
1502
 
}
1503
 
 
1504
 
 
1505
 
MenuModel* multi_load_indicator_get_descriptionmodel (MultiLoadIndicator* self) {
1506
 
        MenuModel* result;
1507
 
        MenuModel* _tmp0_;
1508
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
1509
 
        _tmp0_ = self->priv->_descriptionmodel;
1510
 
        result = _tmp0_;
1511
 
        return result;
1512
 
}
1513
 
 
1514
 
 
1515
 
static void multi_load_indicator_set_descriptionmodel (MultiLoadIndicator* self, MenuModel* value) {
1516
 
        MenuModel* _tmp0_;
1517
 
        MenuModel* _tmp1_;
1518
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1519
 
        _tmp0_ = value;
1520
 
        _tmp1_ = _g_object_ref0 (_tmp0_);
1521
 
        _g_object_unref0 (self->priv->_descriptionmodel);
1522
 
        self->priv->_descriptionmodel = _tmp1_;
1523
 
        g_object_notify ((GObject *) self, "descriptionmodel");
1524
 
}
1525
 
 
1526
 
 
1527
 
gint multi_load_indicator_get_indicator_index (MultiLoadIndicator* self) {
1528
 
        gint result;
1529
 
        gint _tmp0_;
1530
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), 0);
1531
 
        _tmp0_ = self->priv->_indicator_index;
1532
 
        result = _tmp0_;
1533
 
        return result;
1534
 
}
1535
 
 
1536
 
 
1537
 
void multi_load_indicator_set_indicator_index (MultiLoadIndicator* self, gint value) {
1538
 
        gint _tmp0_;
1539
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1540
 
        _tmp0_ = value;
1541
 
        self->priv->_indicator_index = _tmp0_;
1542
 
        g_object_notify ((GObject *) self, "indicator-index");
1543
 
}
1544
 
 
1545
 
 
1546
 
guint multi_load_indicator_get_height (MultiLoadIndicator* self) {
1547
 
        guint result;
1548
 
        guint _tmp0_;
1549
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), 0U);
1550
 
        _tmp0_ = self->priv->_height;
1551
 
        result = _tmp0_;
1552
 
        return result;
1553
 
}
1554
 
 
1555
 
 
1556
 
void multi_load_indicator_set_height (MultiLoadIndicator* self, guint value) {
1557
 
        guint _tmp0_;
1558
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1559
 
        _tmp0_ = value;
1560
 
        self->priv->_height = _tmp0_;
1561
 
        g_object_notify ((GObject *) self, "height");
1562
 
}
1563
 
 
1564
 
 
1565
 
guint multi_load_indicator_get_width (MultiLoadIndicator* self) {
1566
 
        guint result;
1567
 
        guint _tmp0_;
1568
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), 0U);
1569
 
        _tmp0_ = self->priv->_width;
1570
 
        result = _tmp0_;
1571
 
        return result;
1572
 
}
1573
 
 
1574
 
 
1575
 
void multi_load_indicator_set_width (MultiLoadIndicator* self, guint value) {
1576
 
        guint _tmp0_;
1577
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1578
 
        _tmp0_ = value;
1579
 
        self->priv->_width = _tmp0_;
1580
 
        g_object_notify ((GObject *) self, "width");
1581
 
}
1582
 
 
1583
 
 
1584
 
guint multi_load_indicator_get_speed (MultiLoadIndicator* self) {
1585
 
        guint result;
1586
 
        guint _tmp0_;
1587
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), 0U);
1588
 
        _tmp0_ = self->priv->_speed;
1589
 
        result = _tmp0_;
1590
 
        return result;
1591
 
}
1592
 
 
1593
 
 
1594
 
void multi_load_indicator_set_speed (MultiLoadIndicator* self, guint value) {
1595
 
        guint _tmp0_;
1596
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1597
 
        _tmp0_ = value;
1598
 
        self->priv->_speed = _tmp0_;
1599
 
        g_object_notify ((GObject *) self, "speed");
1600
 
}
1601
 
 
1602
 
 
1603
 
GtkMenu* multi_load_indicator_get_menu (MultiLoadIndicator* self) {
1604
 
        GtkMenu* result;
1605
 
        GtkMenu* _tmp0_;
1606
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
1607
 
        _tmp0_ = self->priv->_menu;
1608
 
        result = _tmp0_;
1609
 
        return result;
1610
 
}
1611
 
 
1612
 
 
1613
 
void multi_load_indicator_set_menu (MultiLoadIndicator* self, GtkMenu* value) {
1614
 
        GtkMenu* _tmp0_;
1615
 
        GtkMenu* _tmp1_;
1616
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1617
 
        _tmp0_ = value;
1618
 
        _tmp1_ = _g_object_ref0 (_tmp0_);
1619
 
        _g_object_unref0 (self->priv->_menu);
1620
 
        self->priv->_menu = _tmp1_;
1621
 
        g_object_notify ((GObject *) self, "menu");
1622
 
}
1623
 
 
1624
 
 
1625
 
GraphModels* multi_load_indicator_get_graphmodels (MultiLoadIndicator* self) {
1626
 
        GraphModels* result;
1627
 
        GraphModels* _tmp0_;
1628
 
        g_return_val_if_fail (IS_MULTI_LOAD_INDICATOR (self), NULL);
1629
 
        _tmp0_ = self->priv->_graphmodels;
1630
 
        result = _tmp0_;
1631
 
        return result;
1632
 
}
1633
 
 
1634
 
 
1635
 
void multi_load_indicator_set_graphmodels (MultiLoadIndicator* self, GraphModels* value) {
1636
 
        GraphModels* _tmp0_;
1637
 
        GraphModels* _tmp1_;
1638
 
        g_return_if_fail (IS_MULTI_LOAD_INDICATOR (self));
1639
 
        _tmp0_ = value;
1640
 
        _tmp1_ = _g_object_ref0 (_tmp0_);
1641
 
        _g_object_unref0 (self->priv->_graphmodels);
1642
 
        self->priv->_graphmodels = _tmp1_;
1643
 
        g_object_notify ((GObject *) self, "graphmodels");
1644
 
}
1645
 
 
1646
 
 
1647
 
static void _multi_load_indicator___lambda4_ (MultiLoadIndicator* self, gint delta, guint direction) {
1648
 
        gint _tmp0_;
1649
 
        gint index;
1650
 
        guint _tmp1_;
1651
 
        gint _tmp7_;
1652
 
        MenuModel* _tmp8_;
1653
 
        gchar** _tmp9_;
1654
 
        gint _tmp9__length1;
1655
 
        gchar** _tmp10_;
1656
 
        gint _tmp10__length1;
1657
 
        gint _tmp14_;
1658
 
        gint _tmp15_;
1659
 
        _tmp0_ = self->priv->_indicator_index;
1660
 
        index = _tmp0_;
1661
 
        _tmp1_ = direction;
1662
 
        if (_tmp1_ == ((guint) GDK_SCROLL_DOWN)) {
1663
 
                gint _tmp2_;
1664
 
                gint _tmp3_;
1665
 
                _tmp2_ = index;
1666
 
                _tmp3_ = delta;
1667
 
                index = _tmp2_ + _tmp3_;
1668
 
        } else {
1669
 
                guint _tmp4_;
1670
 
                _tmp4_ = direction;
1671
 
                if (_tmp4_ == ((guint) GDK_SCROLL_UP)) {
1672
 
                        gint _tmp5_;
1673
 
                        gint _tmp6_;
1674
 
                        _tmp5_ = index;
1675
 
                        _tmp6_ = delta;
1676
 
                        index = _tmp5_ - _tmp6_;
1677
 
                }
1678
 
        }
1679
 
        _tmp7_ = index;
1680
 
        _tmp8_ = self->priv->_labelmodel;
1681
 
        _tmp9_ = menu_model_get_expressions (_tmp8_, &_tmp9__length1);
1682
 
        _tmp10_ = _tmp9_;
1683
 
        _tmp10__length1 = _tmp9__length1;
1684
 
        if (_tmp7_ >= _tmp10__length1) {
1685
 
                MenuModel* _tmp11_;
1686
 
                gchar** _tmp12_;
1687
 
                gint _tmp12__length1;
1688
 
                gchar** _tmp13_;
1689
 
                gint _tmp13__length1;
1690
 
                _tmp11_ = self->priv->_labelmodel;
1691
 
                _tmp12_ = menu_model_get_expressions (_tmp11_, &_tmp12__length1);
1692
 
                _tmp13_ = _tmp12_;
1693
 
                _tmp13__length1 = _tmp12__length1;
1694
 
                index = _tmp13__length1 - 1;
1695
 
        }
1696
 
        _tmp14_ = index;
1697
 
        if (_tmp14_ < 0) {
1698
 
                index = 0;
1699
 
        }
1700
 
        _tmp15_ = index;
1701
 
        multi_load_indicator_set_indicator_index (self, _tmp15_);
1702
 
}
1703
 
 
1704
 
 
1705
 
static void __multi_load_indicator___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self) {
1706
 
        _multi_load_indicator___lambda4_ (self, delta, direction);
1707
 
}
1708
 
 
1709
 
 
1710
 
static void _multi_load_indicator___lambda5_ (MultiLoadIndicator* self) {
1711
 
        AppIndicator* _tmp0_;
1712
 
        AppIndicatorStatus _tmp1_ = 0;
1713
 
        _tmp0_ = self->priv->indicator;
1714
 
        _tmp1_ = app_indicator_get_status (_tmp0_);
1715
 
        if (_tmp1_ == APP_INDICATOR_STATUS_ACTIVE) {
1716
 
                multi_load_indicator_updateviews (self);
1717
 
        }
1718
 
}
1719
 
 
1720
 
 
1721
 
static void __multi_load_indicator___lambda5__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
1722
 
        _multi_load_indicator___lambda5_ (self);
1723
 
}
1724
 
 
1725
 
 
1726
 
static gboolean __lambda7_ (MultiLoadIndicator* self) {
1727
 
        gboolean result = FALSE;
1728
 
        multi_load_indicator_updateall (self);
1729
 
        result = TRUE;
1730
 
        return result;
1731
 
}
1732
 
 
1733
 
 
1734
 
static gboolean ___lambda7__gsource_func (gpointer self) {
1735
 
        gboolean result;
1736
 
        result = __lambda7_ (self);
1737
 
        return result;
1738
 
}
1739
 
 
1740
 
 
1741
 
static void _multi_load_indicator___lambda6_ (MultiLoadIndicator* self) {
1742
 
        GSource* _tmp0_;
1743
 
        guint _tmp2_;
1744
 
        guint _tmp3_;
1745
 
        GSource* _tmp8_;
1746
 
        GSource* _tmp9_;
1747
 
        _tmp0_ = self->priv->timeout;
1748
 
        if (_tmp0_ != NULL) {
1749
 
                GSource* _tmp1_;
1750
 
                _tmp1_ = self->priv->timeout;
1751
 
                g_source_destroy (_tmp1_);
1752
 
        }
1753
 
        _tmp2_ = self->priv->_speed;
1754
 
        if (_tmp2_ == ((guint) 0)) {
1755
 
                _g_source_unref0 (self->priv->timeout);
1756
 
                self->priv->timeout = NULL;
1757
 
                return;
1758
 
        }
1759
 
        _tmp3_ = self->priv->_speed;
1760
 
        if ((_tmp3_ % 1000) == ((guint) 0)) {
1761
 
                guint _tmp4_;
1762
 
                GSource* _tmp5_;
1763
 
                _tmp4_ = self->priv->_speed;
1764
 
                _tmp5_ = g_timeout_source_new_seconds (_tmp4_ / 1000);
1765
 
                _g_source_unref0 (self->priv->timeout);
1766
 
                self->priv->timeout = _tmp5_;
1767
 
        } else {
1768
 
                guint _tmp6_;
1769
 
                GSource* _tmp7_;
1770
 
                _tmp6_ = self->priv->_speed;
1771
 
                _tmp7_ = g_timeout_source_new (_tmp6_);
1772
 
                _g_source_unref0 (self->priv->timeout);
1773
 
                self->priv->timeout = _tmp7_;
1774
 
        }
1775
 
        _tmp8_ = self->priv->timeout;
1776
 
        g_source_attach (_tmp8_, NULL);
1777
 
        _tmp9_ = self->priv->timeout;
1778
 
        g_source_set_callback (_tmp9_, ___lambda7__gsource_func, g_object_ref (self), g_object_unref);
1779
 
}
1780
 
 
1781
 
 
1782
 
static void __multi_load_indicator___lambda6__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
1783
 
        _multi_load_indicator___lambda6_ (self);
1784
 
}
1785
 
 
1786
 
 
1787
 
static GObject * multi_load_indicator_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
1788
 
        GObject * obj;
1789
 
        GObjectClass * parent_class;
1790
 
        MultiLoadIndicator * self;
1791
 
        const gchar* _tmp0_;
1792
 
        const gchar* _tmp1_;
1793
 
        AppIndicator* _tmp2_;
1794
 
        AppIndicator* _tmp3_;
1795
 
        parent_class = G_OBJECT_CLASS (multi_load_indicator_parent_class);
1796
 
        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
1797
 
        self = MULTI_LOAD_INDICATOR (obj);
1798
 
        _tmp0_ = self->priv->_icondirectory;
1799
 
        g_mkdir (_tmp0_, 0777);
1800
 
        multi_load_indicator_iconwritedummy (self);
1801
 
        _tmp1_ = self->priv->_icondirectory;
1802
 
        _tmp2_ = app_indicator_new_with_path ("multiload", "", APP_INDICATOR_CATEGORY_SYSTEM_SERVICES, _tmp1_);
1803
 
        _g_object_unref0 (self->priv->indicator);
1804
 
        self->priv->indicator = _tmp2_;
1805
 
        _tmp3_ = self->priv->indicator;
1806
 
        g_signal_connect_object (_tmp3_, "scroll-event", (GCallback) __multi_load_indicator___lambda4__app_indicator_scroll_event, self, 0);
1807
 
        g_signal_connect_object (G_OBJECT (self), "notify::indicator-index", (GCallback) __multi_load_indicator___lambda5__g_object_notify, self, 0);
1808
 
        g_signal_connect_object (G_OBJECT (self), "notify::speed", (GCallback) __multi_load_indicator___lambda6__g_object_notify, self, 0);
1809
 
        return obj;
1810
 
}
1811
 
 
1812
 
 
1813
 
static void multi_load_indicator_class_init (MultiLoadIndicatorClass * klass) {
1814
 
        multi_load_indicator_parent_class = g_type_class_peek_parent (klass);
1815
 
        g_type_class_add_private (klass, sizeof (MultiLoadIndicatorPrivate));
1816
 
        G_OBJECT_CLASS (klass)->get_property = _vala_multi_load_indicator_get_property;
1817
 
        G_OBJECT_CLASS (klass)->set_property = _vala_multi_load_indicator_set_property;
1818
 
        G_OBJECT_CLASS (klass)->constructor = multi_load_indicator_constructor;
1819
 
        G_OBJECT_CLASS (klass)->finalize = multi_load_indicator_finalize;
1820
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_ICONDIRECTORY, g_param_spec_string ("icondirectory", "icondirectory", "icondirectory", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
1821
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_PROVIDERS, g_param_spec_object ("providers", "providers", "providers", TYPE_PROVIDERS, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
1822
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_MENUMODEL, g_param_spec_object ("menumodel", "menumodel", "menumodel", TYPE_MENU_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
1823
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_LABELMODEL, g_param_spec_object ("labelmodel", "labelmodel", "labelmodel", TYPE_MENU_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
1824
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_DESCRIPTIONMODEL, g_param_spec_object ("descriptionmodel", "descriptionmodel", "descriptionmodel", TYPE_MENU_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
1825
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_INDICATOR_INDEX, g_param_spec_int ("indicator-index", "indicator-index", "indicator-index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1826
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_HEIGHT, g_param_spec_uint ("height", "height", "height", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1827
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_WIDTH, g_param_spec_uint ("width", "width", "width", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1828
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_SPEED, g_param_spec_uint ("speed", "speed", "speed", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1829
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_MENU, g_param_spec_object ("menu", "menu", "menu", GTK_TYPE_MENU, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1830
 
        g_object_class_install_property (G_OBJECT_CLASS (klass), MULTI_LOAD_INDICATOR_GRAPHMODELS, g_param_spec_object ("graphmodels", "graphmodels", "graphmodels", TYPE_GRAPH_MODELS, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1831
 
}
1832
 
 
1833
 
 
1834
 
static void multi_load_indicator_instance_init (MultiLoadIndicator * self) {
1835
 
        self->priv = MULTI_LOAD_INDICATOR_GET_PRIVATE (self);
1836
 
}
1837
 
 
1838
 
 
1839
 
static void multi_load_indicator_finalize (GObject* obj) {
1840
 
        MultiLoadIndicator * self;
1841
 
        gchar* _tmp0_ = NULL;
1842
 
        gchar* _tmp1_;
1843
 
        gchar* _tmp2_ = NULL;
1844
 
        gchar* _tmp3_;
1845
 
        const gchar* _tmp4_;
1846
 
        self = MULTI_LOAD_INDICATOR (obj);
1847
 
        _tmp0_ = multi_load_indicator_iconpath (self, (guint) 0);
1848
 
        _tmp1_ = _tmp0_;
1849
 
        g_remove (_tmp1_);
1850
 
        _g_free0 (_tmp1_);
1851
 
        _tmp2_ = multi_load_indicator_iconpath (self, (guint) 1);
1852
 
        _tmp3_ = _tmp2_;
1853
 
        g_remove (_tmp3_);
1854
 
        _g_free0 (_tmp3_);
1855
 
        _tmp4_ = self->priv->_icondirectory;
1856
 
        g_rmdir (_tmp4_);
1857
 
        _g_source_unref0 (self->priv->timeout);
1858
 
        _g_object_unref0 (self->priv->indicator);
1859
 
        self->priv->menuitems = (_vala_array_free (self->priv->menuitems, self->priv->menuitems_length1, (GDestroyNotify) g_object_unref), NULL);
1860
 
        _g_free0 (self->priv->_icondirectory);
1861
 
        _g_object_unref0 (self->priv->_providers);
1862
 
        _g_object_unref0 (self->priv->_menumodel);
1863
 
        _g_object_unref0 (self->priv->_labelmodel);
1864
 
        _g_object_unref0 (self->priv->_descriptionmodel);
1865
 
        _g_object_unref0 (self->priv->_menu);
1866
 
        _g_object_unref0 (self->priv->_graphmodels);
1867
 
        G_OBJECT_CLASS (multi_load_indicator_parent_class)->finalize (obj);
1868
 
}
1869
 
 
1870
 
 
1871
 
/******************************************************************************
1872
 
 * Copyright (C) 2011  Michael Hofmann <mh21@piware.de>                       *
1873
 
 *                                                                            *
1874
 
 * This program is free software; you can redistribute it and/or modify       *
1875
 
 * it under the terms of the GNU General Public License as published by       *
1876
 
 * the Free Software Foundation; either version 3 of the License, or          *
1877
 
 * (at your option) any later version.                                        *
1878
 
 *                                                                            *
1879
 
 * This program is distributed in the hope that it will be useful,            *
1880
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
1881
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
1882
 
 * GNU General Public License for more details.                               *
1883
 
 *                                                                            *
1884
 
 * You should have received a copy of the GNU General Public License along    *
1885
 
 * with this program; if not, write to the Free Software Foundation, Inc.,    *
1886
 
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                *
1887
 
 ******************************************************************************/
1888
 
GType multi_load_indicator_get_type (void) {
1889
 
        static volatile gsize multi_load_indicator_type_id__volatile = 0;
1890
 
        if (g_once_init_enter (&multi_load_indicator_type_id__volatile)) {
1891
 
                static const GTypeInfo g_define_type_info = { sizeof (MultiLoadIndicatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) multi_load_indicator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MultiLoadIndicator), 0, (GInstanceInitFunc) multi_load_indicator_instance_init, NULL };
1892
 
                GType multi_load_indicator_type_id;
1893
 
                multi_load_indicator_type_id = g_type_register_static (G_TYPE_OBJECT, "MultiLoadIndicator", &g_define_type_info, 0);
1894
 
                g_once_init_leave (&multi_load_indicator_type_id__volatile, multi_load_indicator_type_id);
1895
 
        }
1896
 
        return multi_load_indicator_type_id__volatile;
1897
 
}
1898
 
 
1899
 
 
1900
 
static void _vala_multi_load_indicator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
1901
 
        MultiLoadIndicator * self;
1902
 
        self = MULTI_LOAD_INDICATOR (object);
1903
 
        switch (property_id) {
1904
 
                case MULTI_LOAD_INDICATOR_ICONDIRECTORY:
1905
 
                g_value_set_string (value, multi_load_indicator_get_icondirectory (self));
1906
 
                break;
1907
 
                case MULTI_LOAD_INDICATOR_PROVIDERS:
1908
 
                g_value_set_object (value, multi_load_indicator_get_providers (self));
1909
 
                break;
1910
 
                case MULTI_LOAD_INDICATOR_MENUMODEL:
1911
 
                g_value_set_object (value, multi_load_indicator_get_menumodel (self));
1912
 
                break;
1913
 
                case MULTI_LOAD_INDICATOR_LABELMODEL:
1914
 
                g_value_set_object (value, multi_load_indicator_get_labelmodel (self));
1915
 
                break;
1916
 
                case MULTI_LOAD_INDICATOR_DESCRIPTIONMODEL:
1917
 
                g_value_set_object (value, multi_load_indicator_get_descriptionmodel (self));
1918
 
                break;
1919
 
                case MULTI_LOAD_INDICATOR_INDICATOR_INDEX:
1920
 
                g_value_set_int (value, multi_load_indicator_get_indicator_index (self));
1921
 
                break;
1922
 
                case MULTI_LOAD_INDICATOR_HEIGHT:
1923
 
                g_value_set_uint (value, multi_load_indicator_get_height (self));
1924
 
                break;
1925
 
                case MULTI_LOAD_INDICATOR_WIDTH:
1926
 
                g_value_set_uint (value, multi_load_indicator_get_width (self));
1927
 
                break;
1928
 
                case MULTI_LOAD_INDICATOR_SPEED:
1929
 
                g_value_set_uint (value, multi_load_indicator_get_speed (self));
1930
 
                break;
1931
 
                case MULTI_LOAD_INDICATOR_MENU:
1932
 
                g_value_set_object (value, multi_load_indicator_get_menu (self));
1933
 
                break;
1934
 
                case MULTI_LOAD_INDICATOR_GRAPHMODELS:
1935
 
                g_value_set_object (value, multi_load_indicator_get_graphmodels (self));
1936
 
                break;
1937
 
                default:
1938
 
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
1939
 
                break;
1940
 
        }
1941
 
}
1942
 
 
1943
 
 
1944
 
static void _vala_multi_load_indicator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
1945
 
        MultiLoadIndicator * self;
1946
 
        self = MULTI_LOAD_INDICATOR (object);
1947
 
        switch (property_id) {
1948
 
                case MULTI_LOAD_INDICATOR_ICONDIRECTORY:
1949
 
                multi_load_indicator_set_icondirectory (self, g_value_get_string (value));
1950
 
                break;
1951
 
                case MULTI_LOAD_INDICATOR_PROVIDERS:
1952
 
                multi_load_indicator_set_providers (self, g_value_get_object (value));
1953
 
                break;
1954
 
                case MULTI_LOAD_INDICATOR_MENUMODEL:
1955
 
                multi_load_indicator_set_menumodel (self, g_value_get_object (value));
1956
 
                break;
1957
 
                case MULTI_LOAD_INDICATOR_LABELMODEL:
1958
 
                multi_load_indicator_set_labelmodel (self, g_value_get_object (value));
1959
 
                break;
1960
 
                case MULTI_LOAD_INDICATOR_DESCRIPTIONMODEL:
1961
 
                multi_load_indicator_set_descriptionmodel (self, g_value_get_object (value));
1962
 
                break;
1963
 
                case MULTI_LOAD_INDICATOR_INDICATOR_INDEX:
1964
 
                multi_load_indicator_set_indicator_index (self, g_value_get_int (value));
1965
 
                break;
1966
 
                case MULTI_LOAD_INDICATOR_HEIGHT:
1967
 
                multi_load_indicator_set_height (self, g_value_get_uint (value));
1968
 
                break;
1969
 
                case MULTI_LOAD_INDICATOR_WIDTH:
1970
 
                multi_load_indicator_set_width (self, g_value_get_uint (value));
1971
 
                break;
1972
 
                case MULTI_LOAD_INDICATOR_SPEED:
1973
 
                multi_load_indicator_set_speed (self, g_value_get_uint (value));
1974
 
                break;
1975
 
                case MULTI_LOAD_INDICATOR_MENU:
1976
 
                multi_load_indicator_set_menu (self, g_value_get_object (value));
1977
 
                break;
1978
 
                case MULTI_LOAD_INDICATOR_GRAPHMODELS:
1979
 
                multi_load_indicator_set_graphmodels (self, g_value_get_object (value));
1980
 
                break;
1981
 
                default:
1982
 
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
1983
 
                break;
1984
 
        }
1985
 
}
1986
 
 
1987
 
 
1988
 
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1989
 
        if ((array != NULL) && (destroy_func != NULL)) {
1990
 
                int i;
1991
 
                for (i = 0; i < array_length; i = i + 1) {
1992
 
                        if (((gpointer*) array)[i] != NULL) {
1993
 
                                destroy_func (((gpointer*) array)[i]);
1994
 
                        }
1995
 
                }
1996
 
        }
1997
 
}
1998
 
 
1999
 
 
2000
 
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
2001
 
        _vala_array_destroy (array, array_length, destroy_func);
2002
 
        g_free (array);
2003
 
}
2004
 
 
2005
 
 
2006