~ubuntu-branches/ubuntu/maverick/awn-extras-applets/maverick

« back to all changes in this revision

Viewing changes to applets/maintained/notification-area/na-prefs.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-08-29 14:29:52 UTC
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20100829142952-rhvuetyms9bv5uu7
Tags: upstream-0.4.0+bzr1372
ImportĀ upstreamĀ versionĀ 0.4.0+bzr1372

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* na-prefs.c generated by valac, the Vala compiler
 
1
/* na-prefs.c generated by valac 0.9.7, the Vala compiler
2
2
 * generated from na-prefs.vala, do not modify */
3
3
 
4
4
/*
78
78
static gpointer notification_area_prefs_parent_class = NULL;
79
79
 
80
80
#define APPLET_NAME "notification-area"
81
 
GType notification_area_prefs_get_type (void);
 
81
GType notification_area_prefs_get_type (void) G_GNUC_CONST;
82
82
#define NOTIFICATION_AREA_PREFS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NOTIFICATION_AREA_PREFS, NotificationAreaPrefsPrivate))
83
83
enum  {
84
84
        NOTIFICATION_AREA_PREFS_DUMMY_PROPERTY,
88
88
        NOTIFICATION_AREA_PREFS_BACKGROUND_COLOR,
89
89
        NOTIFICATION_AREA_PREFS_BORDER_COLOR
90
90
};
91
 
static void notification_area_prefs_init_components (NotificationAreaPrefs* self, GtkBuilder* builder);
92
91
NotificationAreaPrefs* notification_area_prefs_new (AwnApplet* applet);
93
92
NotificationAreaPrefs* notification_area_prefs_construct (GType object_type, AwnApplet* applet);
 
93
static void notification_area_prefs_init_components (NotificationAreaPrefs* self, GtkBuilder* builder);
 
94
static void _lambda0_ (GtkSpinButton* obj, NotificationAreaPrefs* self);
94
95
void notification_area_prefs_set_icons_per_cell (NotificationAreaPrefs* self, gint value);
95
 
static void _lambda0_ (GtkSpinButton* obj, NotificationAreaPrefs* self);
96
96
static void __lambda0__gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
 
97
static void _lambda1_ (GtkSpinButton* obj, NotificationAreaPrefs* self);
97
98
void notification_area_prefs_set_extra_offset (NotificationAreaPrefs* self, gint value);
98
 
static void _lambda1_ (GtkSpinButton* obj, NotificationAreaPrefs* self);
99
99
static void __lambda1__gtk_spin_button_value_changed (GtkSpinButton* _sender, gpointer self);
 
100
static void _lambda2_ (GtkRange* obj, NotificationAreaPrefs* self);
100
101
void notification_area_prefs_set_icon_size (NotificationAreaPrefs* self, gint value);
101
 
static void _lambda2_ (GtkRange* obj, NotificationAreaPrefs* self);
102
102
static void __lambda2__gtk_range_value_changed (GtkRange* _sender, gpointer self);
 
103
static void _lambda3_ (GtkToggleButton* obj, NotificationAreaPrefs* self);
103
104
void notification_area_prefs_set_background_color (NotificationAreaPrefs* self, DesktopAgnosticColor* value);
104
 
static void _lambda3_ (GtkToggleButton* obj, NotificationAreaPrefs* self);
105
105
static void __lambda3__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
106
106
static void _lambda4_ (GtkToggleButton* obj, NotificationAreaPrefs* self);
107
107
static void __lambda4__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
108
108
static void _lambda5_ (GtkColorButton* obj, NotificationAreaPrefs* self);
109
109
static void __lambda5__gtk_color_button_color_set (GtkColorButton* _sender, gpointer self);
 
110
static void _lambda6_ (GtkToggleButton* obj, NotificationAreaPrefs* self);
110
111
void notification_area_prefs_set_border_color (NotificationAreaPrefs* self, DesktopAgnosticColor* value);
111
 
static void _lambda6_ (GtkToggleButton* obj, NotificationAreaPrefs* self);
112
112
static void __lambda6__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
113
113
static void _lambda7_ (GtkToggleButton* obj, NotificationAreaPrefs* self);
114
114
static void __lambda7__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
133
133
 
134
134
 
135
135
NotificationAreaPrefs* notification_area_prefs_construct (GType object_type, AwnApplet* applet) {
136
 
        GError * _inner_error_;
137
136
        NotificationAreaPrefs * self;
138
137
        AwnApplet* _tmp0_;
139
138
        char* ui_path;
140
139
        GtkBuilder* builder;
141
140
        DesktopAgnosticConfigClient* _tmp1_;
142
141
        DesktopAgnosticConfigClient* _tmp2_;
 
142
        GError * _inner_error_ = NULL;
143
143
        g_return_val_if_fail (applet != NULL, NULL);
144
 
        _inner_error_ = NULL;
145
144
        self = (NotificationAreaPrefs*) g_object_new (object_type, NULL);
146
145
        self->priv->applet = (_tmp0_ = _g_object_ref0 (applet), _g_object_unref0 (self->priv->applet), _tmp0_);
147
146
        ui_path = g_build_filename (APPLETSDIR, APPLET_NAME, "na-prefs.ui", NULL);
148
147
        builder = gtk_builder_new ();
149
148
        gtk_builder_add_from_file (builder, ui_path, &_inner_error_);
150
149
        if (_inner_error_ != NULL) {
 
150
                _g_object_unref0 (builder);
151
151
                _g_free0 (ui_path);
152
 
                _g_object_unref0 (builder);
153
152
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
154
153
                g_clear_error (&_inner_error_);
155
154
                return NULL;
157
156
        notification_area_prefs_init_components (self, builder);
158
157
        _tmp1_ = awn_config_get_default_for_applet (applet, &_inner_error_);
159
158
        if (_inner_error_ != NULL) {
 
159
                _g_object_unref0 (builder);
160
160
                _g_free0 (ui_path);
161
 
                _g_object_unref0 (builder);
162
161
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
163
162
                g_clear_error (&_inner_error_);
164
163
                return NULL;
166
165
        self->priv->client = (_tmp2_ = _g_object_ref0 (_tmp1_), _g_object_unref0 (self->priv->client), _tmp2_);
167
166
        desktop_agnostic_config_client_bind (self->priv->client, DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, "icons_per_cell", (GObject*) self, "icons-per-cell", FALSE, DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, &_inner_error_);
168
167
        if (_inner_error_ != NULL) {
 
168
                _g_object_unref0 (builder);
169
169
                _g_free0 (ui_path);
170
 
                _g_object_unref0 (builder);
171
170
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
172
171
                g_clear_error (&_inner_error_);
173
172
                return NULL;
174
173
        }
175
174
        desktop_agnostic_config_client_bind (self->priv->client, DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, "icon_size", (GObject*) self, "icon-size", FALSE, DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, &_inner_error_);
176
175
        if (_inner_error_ != NULL) {
 
176
                _g_object_unref0 (builder);
177
177
                _g_free0 (ui_path);
178
 
                _g_object_unref0 (builder);
179
178
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
180
179
                g_clear_error (&_inner_error_);
181
180
                return NULL;
182
181
        }
183
182
        desktop_agnostic_config_client_bind (self->priv->client, DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, "extra_offset", (GObject*) self, "extra-offset", FALSE, DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, &_inner_error_);
184
183
        if (_inner_error_ != NULL) {
 
184
                _g_object_unref0 (builder);
185
185
                _g_free0 (ui_path);
186
 
                _g_object_unref0 (builder);
187
186
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
188
187
                g_clear_error (&_inner_error_);
189
188
                return NULL;
190
189
        }
191
190
        desktop_agnostic_config_client_bind (self->priv->client, DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, "background_color", (GObject*) self, "background-color", FALSE, DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, &_inner_error_);
192
191
        if (_inner_error_ != NULL) {
 
192
                _g_object_unref0 (builder);
193
193
                _g_free0 (ui_path);
194
 
                _g_object_unref0 (builder);
195
194
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
196
195
                g_clear_error (&_inner_error_);
197
196
                return NULL;
198
197
        }
199
198
        desktop_agnostic_config_client_bind (self->priv->client, DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, "border_color", (GObject*) self, "border-color", FALSE, DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, &_inner_error_);
200
199
        if (_inner_error_ != NULL) {
 
200
                _g_object_unref0 (builder);
201
201
                _g_free0 (ui_path);
202
 
                _g_object_unref0 (builder);
203
202
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
204
203
                g_clear_error (&_inner_error_);
205
204
                return NULL;
206
205
        }
 
206
        _g_object_unref0 (builder);
207
207
        _g_free0 (ui_path);
208
 
        _g_object_unref0 (builder);
209
208
        return self;
210
209
}
211
210
 
433
432
                if (self->priv->_background_color == NULL) {
434
433
                        _tmp0_ = TRUE;
435
434
                } else {
 
435
                        char* _tmp1_;
436
436
                        char* _tmp2_;
437
 
                        char* _tmp1_;
438
437
                        _tmp0_ = _vala_strcmp0 (_tmp1_ = desktop_agnostic_color_to_string (self->priv->_background_color), _tmp2_ = desktop_agnostic_color_to_string (value)) != 0;
439
438
                        _g_free0 (_tmp2_);
440
439
                        _g_free0 (_tmp1_);
467
466
                if (self->priv->_border_color == NULL) {
468
467
                        _tmp0_ = TRUE;
469
468
                } else {
 
469
                        char* _tmp1_;
470
470
                        char* _tmp2_;
471
 
                        char* _tmp1_;
472
471
                        _tmp0_ = _vala_strcmp0 (_tmp1_ = desktop_agnostic_color_to_string (self->priv->_border_color), _tmp2_ = desktop_agnostic_color_to_string (value)) != 0;
473
472
                        _g_free0 (_tmp2_);
474
473
                        _g_free0 (_tmp1_);