1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
|
/* SetBackgroundSlideshow.c generated by valac 0.36.6, the Vala compiler
* generated from SetBackgroundSlideshow.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
* Copyright 2017 Jens Georg <mail@jensge.org>
*
* This software is licensed under the GNU LGPL (version 2.1 or later).
* See the COPYING file in this distribution.
*/
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#define TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG (set_background_slideshow_dialog_get_type ())
#define SET_BACKGROUND_SLIDESHOW_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialog))
#define SET_BACKGROUND_SLIDESHOW_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialogClass))
#define IS_SET_BACKGROUND_SLIDESHOW_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG))
#define IS_SET_BACKGROUND_SLIDESHOW_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG))
#define SET_BACKGROUND_SLIDESHOW_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialogClass))
typedef struct _SetBackgroundSlideshowDialog SetBackgroundSlideshowDialog;
typedef struct _SetBackgroundSlideshowDialogClass SetBackgroundSlideshowDialogClass;
typedef struct _SetBackgroundSlideshowDialogPrivate SetBackgroundSlideshowDialogPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))
typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;
#define TYPE_APP_WINDOW (app_window_get_type ())
#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))
typedef struct _AppWindow AppWindow;
typedef struct _AppWindowClass AppWindowClass;
#define _g_free0(var) (var = (g_free (var), NULL))
struct _SetBackgroundSlideshowDialog {
GtkDialog parent_instance;
SetBackgroundSlideshowDialogPrivate * priv;
};
struct _SetBackgroundSlideshowDialogClass {
GtkDialogClass parent_class;
};
struct _SetBackgroundSlideshowDialogPrivate {
GtkCheckButton* desktop_background_checkbox;
GtkCheckButton* screensaver_checkbox;
GtkScale* delay_scale;
GtkLabel* delay_value_label;
gint delay_value;
};
static gpointer set_background_slideshow_dialog_parent_class = NULL;
GType set_background_slideshow_dialog_get_type (void) G_GNUC_CONST;
#define SET_BACKGROUND_SLIDESHOW_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialogPrivate))
enum {
SET_BACKGROUND_SLIDESHOW_DIALOG_DUMMY_PROPERTY
};
SetBackgroundSlideshowDialog* set_background_slideshow_dialog_new (void);
SetBackgroundSlideshowDialog* set_background_slideshow_dialog_construct (GType object_type);
gint resources_use_header_bar (void);
GType page_window_get_type (void) G_GNUC_CONST;
GType app_window_get_type (void) G_GNUC_CONST;
AppWindow* app_window_get_instance (void);
static void set_background_slideshow_dialog_real_constructed (GObject* base);
static void set_background_slideshow_dialog_on_delay_scale_value_changed (SetBackgroundSlideshowDialog* self);
static void set_background_slideshow_dialog_on_checkbox_clicked (SetBackgroundSlideshowDialog* self);
static void _set_background_slideshow_dialog_on_checkbox_clicked_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
static void _set_background_slideshow_dialog_on_delay_scale_value_changed_gtk_range_value_changed (GtkRange* _sender, gpointer self);
gboolean set_background_slideshow_dialog_execute (SetBackgroundSlideshowDialog* self, gint* delay_value, gboolean* desktop_background, gboolean* screensaver);
static void set_background_slideshow_dialog_finalize (GObject * obj);
SetBackgroundSlideshowDialog* set_background_slideshow_dialog_construct (GType object_type) {
SetBackgroundSlideshowDialog * self = NULL;
gint _tmp0_;
AppWindow* _tmp1_;
AppWindow* _tmp2_;
#line 22 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp0_ = resources_use_header_bar ();
#line 22 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self = (SetBackgroundSlideshowDialog*) g_object_new (object_type, "use-header-bar", _tmp0_, NULL);
#line 23 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp1_ = app_window_get_instance ();
#line 23 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp2_ = _tmp1_;
#line 23 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_window_get_type (), GtkWindow));
#line 23 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_object_unref0 (_tmp2_);
#line 21 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
return self;
#line 114 "SetBackgroundSlideshow.c"
}
SetBackgroundSlideshowDialog* set_background_slideshow_dialog_new (void) {
#line 21 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
return set_background_slideshow_dialog_construct (TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG);
#line 121 "SetBackgroundSlideshow.c"
}
static void set_background_slideshow_dialog_real_constructed (GObject* base) {
SetBackgroundSlideshowDialog * self;
#line 26 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialog);
#line 27 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
set_background_slideshow_dialog_on_delay_scale_value_changed (self);
#line 131 "SetBackgroundSlideshow.c"
}
static void set_background_slideshow_dialog_on_checkbox_clicked (SetBackgroundSlideshowDialog* self) {
gboolean _tmp0_ = FALSE;
GtkCheckButton* _tmp1_;
gboolean _tmp2_;
gboolean _tmp3_;
#line 31 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
g_return_if_fail (IS_SET_BACKGROUND_SLIDESHOW_DIALOG (self));
#line 33 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp1_ = self->priv->desktop_background_checkbox;
#line 33 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp2_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_toggle_button_get_type (), GtkToggleButton));
#line 33 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp3_ = _tmp2_;
#line 33 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
if (_tmp3_) {
#line 33 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp0_ = TRUE;
#line 152 "SetBackgroundSlideshow.c"
} else {
GtkCheckButton* _tmp4_;
gboolean _tmp5_;
gboolean _tmp6_;
#line 34 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp4_ = self->priv->screensaver_checkbox;
#line 34 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp5_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_toggle_button_get_type (), GtkToggleButton));
#line 34 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp6_ = _tmp5_;
#line 34 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp0_ = _tmp6_;
#line 165 "SetBackgroundSlideshow.c"
}
#line 32 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_dialog_set_response_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), (gint) GTK_RESPONSE_OK, _tmp0_);
#line 169 "SetBackgroundSlideshow.c"
}
static void _set_background_slideshow_dialog_on_checkbox_clicked_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
set_background_slideshow_dialog_on_checkbox_clicked ((SetBackgroundSlideshowDialog*) self);
#line 176 "SetBackgroundSlideshow.c"
}
static void set_background_slideshow_dialog_on_delay_scale_value_changed (SetBackgroundSlideshowDialog* self) {
gdouble value = 0.0;
GtkScale* _tmp0_;
GtkAdjustment* _tmp1_;
GtkAdjustment* _tmp2_;
gdouble _tmp3_;
gdouble _tmp4_;
gdouble _tmp5_;
gdouble _tmp6_;
gdouble _tmp7_;
gchar* text = NULL;
gint _tmp8_;
GtkLabel* _tmp25_;
const gchar* _tmp26_;
#line 38 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
g_return_if_fail (IS_SET_BACKGROUND_SLIDESHOW_DIALOG (self));
#line 39 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp0_ = self->priv->delay_scale;
#line 39 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp1_ = gtk_range_get_adjustment (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange));
#line 39 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp2_ = _tmp1_;
#line 39 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp3_ = gtk_adjustment_get_value (_tmp2_);
#line 39 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp4_ = _tmp3_;
#line 39 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
value = _tmp4_;
#line 44 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp5_ = value;
#line 44 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp6_ = pow (_tmp5_, (gdouble) 5);
#line 44 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp7_ = pow ((gdouble) 90, (gdouble) 5);
#line 44 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self->priv->delay_value = (gint) (((((_tmp6_ / _tmp7_) * 60) * 60) * 24) + 5);
#line 48 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp8_ = self->priv->delay_value;
#line 48 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
if (_tmp8_ < 60) {
#line 220 "SetBackgroundSlideshow.c"
gint _tmp9_;
gint _tmp10_;
gchar* _tmp11_;
#line 49 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp9_ = self->priv->delay_value;
#line 49 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp10_ = self->priv->delay_value;
#line 49 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp11_ = g_strdup_printf (ngettext ("%d second", "%d seconds", (gulong) _tmp9_), _tmp10_);
#line 49 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_free0 (text);
#line 49 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
text = _tmp11_;
#line 234 "SetBackgroundSlideshow.c"
} else {
gint _tmp12_;
#line 50 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp12_ = self->priv->delay_value;
#line 50 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
if (_tmp12_ < (60 * 60)) {
#line 241 "SetBackgroundSlideshow.c"
gint minutes = 0;
gint _tmp13_;
gint _tmp14_;
gint _tmp15_;
gchar* _tmp16_;
gint _tmp17_;
#line 51 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp13_ = self->priv->delay_value;
#line 51 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
minutes = _tmp13_ / 60;
#line 52 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp14_ = minutes;
#line 52 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp15_ = minutes;
#line 52 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp16_ = g_strdup_printf (ngettext ("%d minute", "%d minutes", (gulong) _tmp14_), _tmp15_);
#line 52 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_free0 (text);
#line 52 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
text = _tmp16_;
#line 53 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp17_ = minutes;
#line 53 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self->priv->delay_value = _tmp17_ * 60;
#line 266 "SetBackgroundSlideshow.c"
} else {
gint _tmp18_;
#line 54 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp18_ = self->priv->delay_value;
#line 54 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
if (_tmp18_ < ((60 * 60) * 24)) {
#line 273 "SetBackgroundSlideshow.c"
gint hours = 0;
gint _tmp19_;
gint _tmp20_;
gint _tmp21_;
gchar* _tmp22_;
gint _tmp23_;
#line 55 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp19_ = self->priv->delay_value;
#line 55 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
hours = _tmp19_ / (60 * 60);
#line 56 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp20_ = hours;
#line 56 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp21_ = hours;
#line 56 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp22_ = g_strdup_printf (ngettext ("%d hour", "%d hours", (gulong) _tmp20_), _tmp21_);
#line 56 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_free0 (text);
#line 56 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
text = _tmp22_;
#line 57 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp23_ = hours;
#line 57 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self->priv->delay_value = _tmp23_ * (60 * 60);
#line 298 "SetBackgroundSlideshow.c"
} else {
gchar* _tmp24_;
#line 59 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp24_ = g_strdup (_ ("1 day"));
#line 59 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_free0 (text);
#line 59 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
text = _tmp24_;
#line 60 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self->priv->delay_value = (60 * 60) * 24;
#line 309 "SetBackgroundSlideshow.c"
}
}
}
#line 63 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp25_ = self->priv->delay_value_label;
#line 63 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp26_ = text;
#line 63 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_label_set_label (_tmp25_, _tmp26_);
#line 38 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_free0 (text);
#line 321 "SetBackgroundSlideshow.c"
}
static void _set_background_slideshow_dialog_on_delay_scale_value_changed_gtk_range_value_changed (GtkRange* _sender, gpointer self) {
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
set_background_slideshow_dialog_on_delay_scale_value_changed ((SetBackgroundSlideshowDialog*) self);
#line 328 "SetBackgroundSlideshow.c"
}
gboolean set_background_slideshow_dialog_execute (SetBackgroundSlideshowDialog* self, gint* delay_value, gboolean* desktop_background, gboolean* screensaver) {
gint _vala_delay_value = 0;
gboolean _vala_desktop_background = FALSE;
gboolean _vala_screensaver = FALSE;
gboolean result = FALSE;
gboolean _result_ = FALSE;
gint _tmp0_;
gint _tmp1_;
GtkCheckButton* _tmp2_;
gboolean _tmp3_;
gboolean _tmp4_;
GtkCheckButton* _tmp5_;
gboolean _tmp6_;
gboolean _tmp7_;
#line 66 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
g_return_val_if_fail (IS_SET_BACKGROUND_SLIDESHOW_DIALOG (self), FALSE);
#line 67 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 68 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp0_ = gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
#line 68 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_result_ = _tmp0_ == ((gint) GTK_RESPONSE_OK);
#line 69 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 71 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp1_ = self->priv->delay_value;
#line 71 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_vala_delay_value = _tmp1_;
#line 72 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp2_ = self->priv->desktop_background_checkbox;
#line 72 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp3_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_toggle_button_get_type (), GtkToggleButton));
#line 72 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp4_ = _tmp3_;
#line 72 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_vala_desktop_background = _tmp4_;
#line 73 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp5_ = self->priv->screensaver_checkbox;
#line 73 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp6_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_toggle_button_get_type (), GtkToggleButton));
#line 73 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_tmp7_ = _tmp6_;
#line 73 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_vala_screensaver = _tmp7_;
#line 75 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 76 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
result = _result_;
#line 76 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
if (delay_value) {
#line 76 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
*delay_value = _vala_delay_value;
#line 384 "SetBackgroundSlideshow.c"
}
#line 76 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
if (desktop_background) {
#line 76 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
*desktop_background = _vala_desktop_background;
#line 390 "SetBackgroundSlideshow.c"
}
#line 76 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
if (screensaver) {
#line 76 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
*screensaver = _vala_screensaver;
#line 396 "SetBackgroundSlideshow.c"
}
#line 76 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
return result;
#line 400 "SetBackgroundSlideshow.c"
}
static void set_background_slideshow_dialog_class_init (SetBackgroundSlideshowDialogClass * klass) {
gint SetBackgroundSlideshowDialog_private_offset;
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
set_background_slideshow_dialog_parent_class = g_type_class_peek_parent (klass);
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
g_type_class_add_private (klass, sizeof (SetBackgroundSlideshowDialogPrivate));
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
((GObjectClass *) klass)->constructed = (void (*) (GObject *)) set_background_slideshow_dialog_real_constructed;
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
G_OBJECT_CLASS (klass)->finalize = set_background_slideshow_dialog_finalize;
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
SetBackgroundSlideshowDialog_private_offset = g_type_class_get_instance_private_offset (klass);
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Shotwell/ui/set_background_slideshow_dialog.ui");
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "desktop_background_checkbox", FALSE, SetBackgroundSlideshowDialog_private_offset + G_STRUCT_OFFSET (SetBackgroundSlideshowDialogPrivate, desktop_background_checkbox));
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "screensaver_checkbox", FALSE, SetBackgroundSlideshowDialog_private_offset + G_STRUCT_OFFSET (SetBackgroundSlideshowDialogPrivate, screensaver_checkbox));
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "delay_scale", FALSE, SetBackgroundSlideshowDialog_private_offset + G_STRUCT_OFFSET (SetBackgroundSlideshowDialogPrivate, delay_scale));
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "delay_value_label", FALSE, SetBackgroundSlideshowDialog_private_offset + G_STRUCT_OFFSET (SetBackgroundSlideshowDialogPrivate, delay_value_label));
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_checkbox_clicked", G_CALLBACK(_set_background_slideshow_dialog_on_checkbox_clicked_gtk_toggle_button_toggled));
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_delay_scale_value_changed", G_CALLBACK(_set_background_slideshow_dialog_on_delay_scale_value_changed_gtk_range_value_changed));
#line 430 "SetBackgroundSlideshow.c"
}
static void set_background_slideshow_dialog_instance_init (SetBackgroundSlideshowDialog * self) {
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self->priv = SET_BACKGROUND_SLIDESHOW_DIALOG_GET_PRIVATE (self);
#line 19 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self->priv->delay_value = 0;
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
gtk_widget_init_template (GTK_WIDGET (self));
#line 441 "SetBackgroundSlideshow.c"
}
static void set_background_slideshow_dialog_finalize (GObject * obj) {
SetBackgroundSlideshowDialog * self;
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SET_BACKGROUND_SLIDESHOW_DIALOG, SetBackgroundSlideshowDialog);
#line 11 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_object_unref0 (self->priv->desktop_background_checkbox);
#line 13 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_object_unref0 (self->priv->screensaver_checkbox);
#line 15 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_object_unref0 (self->priv->delay_scale);
#line 17 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
_g_object_unref0 (self->priv->delay_value_label);
#line 9 "/home/jens/Source/shotwell/src/dialogs/SetBackgroundSlideshow.vala"
G_OBJECT_CLASS (set_background_slideshow_dialog_parent_class)->finalize (obj);
#line 459 "SetBackgroundSlideshow.c"
}
GType set_background_slideshow_dialog_get_type (void) {
static volatile gsize set_background_slideshow_dialog_type_id__volatile = 0;
if (g_once_init_enter (&set_background_slideshow_dialog_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (SetBackgroundSlideshowDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_background_slideshow_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetBackgroundSlideshowDialog), 0, (GInstanceInitFunc) set_background_slideshow_dialog_instance_init, NULL };
GType set_background_slideshow_dialog_type_id;
set_background_slideshow_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "SetBackgroundSlideshowDialog", &g_define_type_info, 0);
g_once_init_leave (&set_background_slideshow_dialog_type_id__volatile, set_background_slideshow_dialog_type_id);
}
return set_background_slideshow_dialog_type_id__volatile;
}
|