1 /* settings.c generated by valac 0.34.7, the Vala compiler
2 * generated from settings.vala, do not modify */
3
4 /*
5 * Copyright 2011 Julien Lavergne <gilir@ubuntu.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301, USA.
21 */
22 /* TODO Split correctly the settings for enable differents backends (.ini, gsettings ...) */
23
24 #include <glib.h>
25 #include <glib-object.h>
26 #include <stdlib.h>
27 #include <string.h>
28 #include <gio/gio.h>
29 #include <glib/gstdio.h>
30
31
32 #define LXSESSION_TYPE_LXSESSION_CONFIG (lxsession_lxsession_config_get_type ())
33 #define LXSESSION_LXSESSION_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfig))
34 #define LXSESSION_LXSESSION_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfigClass))
35 #define LXSESSION_IS_LXSESSION_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_LXSESSION_CONFIG))
36 #define LXSESSION_IS_LXSESSION_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_LXSESSION_CONFIG))
37 #define LXSESSION_LXSESSION_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfigClass))
38
39 typedef struct _LxsessionLxsessionConfig LxsessionLxsessionConfig;
40 typedef struct _LxsessionLxsessionConfigClass LxsessionLxsessionConfigClass;
41 typedef struct _LxsessionLxsessionConfigPrivate LxsessionLxsessionConfigPrivate;
42 #define _g_free0(var) (var = (g_free (var), NULL))
43 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
44 #define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
45
46 #define LXSESSION_TYPE_LX_SIGNALS (lxsession_lx_signals_get_type ())
47 #define LXSESSION_LX_SIGNALS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_LX_SIGNALS, LxsessionLxSignals))
48 #define LXSESSION_LX_SIGNALS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_LX_SIGNALS, LxsessionLxSignalsClass))
49 #define LXSESSION_IS_LX_SIGNALS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_LX_SIGNALS))
50 #define LXSESSION_IS_LX_SIGNALS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_LX_SIGNALS))
51 #define LXSESSION_LX_SIGNALS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_LX_SIGNALS, LxsessionLxSignalsClass))
52
53 typedef struct _LxsessionLxSignals LxsessionLxSignals;
54 typedef struct _LxsessionLxSignalsClass LxsessionLxSignalsClass;
55
56 #define LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE (lxsession_lxsession_config_key_file_get_type ())
57 #define LXSESSION_LXSESSION_CONFIG_KEY_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFile))
58 #define LXSESSION_LXSESSION_CONFIG_KEY_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFileClass))
59 #define LXSESSION_IS_LXSESSION_CONFIG_KEY_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE))
60 #define LXSESSION_IS_LXSESSION_CONFIG_KEY_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE))
61 #define LXSESSION_LXSESSION_CONFIG_KEY_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFileClass))
62
63 typedef struct _LxsessionLxsessionConfigKeyFile LxsessionLxsessionConfigKeyFile;
64 typedef struct _LxsessionLxsessionConfigKeyFileClass LxsessionLxsessionConfigKeyFileClass;
65 typedef struct _LxsessionLxsessionConfigKeyFilePrivate LxsessionLxsessionConfigKeyFilePrivate;
66 #define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))
67 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
68 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
69
70 #define LXSESSION_TYPE_XSETTINGS_OPTION (lxsession_xsettings_option_get_type ())
71 #define LXSESSION_XSETTINGS_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_XSETTINGS_OPTION, LxsessionXSettingsOption))
72 #define LXSESSION_XSETTINGS_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_XSETTINGS_OPTION, LxsessionXSettingsOptionClass))
73 #define LXSESSION_IS_XSETTINGS_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_XSETTINGS_OPTION))
74 #define LXSESSION_IS_XSETTINGS_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_XSETTINGS_OPTION))
75 #define LXSESSION_XSETTINGS_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_XSETTINGS_OPTION, LxsessionXSettingsOptionClass))
76
77 typedef struct _LxsessionXSettingsOption LxsessionXSettingsOption;
78 typedef struct _LxsessionXSettingsOptionClass LxsessionXSettingsOptionClass;
79
80 #define LXSESSION_TYPE_RAZOR_QT_CONFIG_KEY_FILE (lxsession_razor_qt_config_key_file_get_type ())
81 #define LXSESSION_RAZOR_QT_CONFIG_KEY_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LXSESSION_TYPE_RAZOR_QT_CONFIG_KEY_FILE, LxsessionRazorQtConfigKeyFile))
82 #define LXSESSION_RAZOR_QT_CONFIG_KEY_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LXSESSION_TYPE_RAZOR_QT_CONFIG_KEY_FILE, LxsessionRazorQtConfigKeyFileClass))
83 #define LXSESSION_IS_RAZOR_QT_CONFIG_KEY_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LXSESSION_TYPE_RAZOR_QT_CONFIG_KEY_FILE))
84 #define LXSESSION_IS_RAZOR_QT_CONFIG_KEY_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LXSESSION_TYPE_RAZOR_QT_CONFIG_KEY_FILE))
85 #define LXSESSION_RAZOR_QT_CONFIG_KEY_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LXSESSION_TYPE_RAZOR_QT_CONFIG_KEY_FILE, LxsessionRazorQtConfigKeyFileClass))
86
87 typedef struct _LxsessionRazorQtConfigKeyFile LxsessionRazorQtConfigKeyFile;
88 typedef struct _LxsessionRazorQtConfigKeyFileClass LxsessionRazorQtConfigKeyFileClass;
89 typedef struct _LxsessionRazorQtConfigKeyFilePrivate LxsessionRazorQtConfigKeyFilePrivate;
90
91 struct _LxsessionLxsessionConfig {
92 GObject parent_instance;
93 LxsessionLxsessionConfigPrivate * priv;
94 GHashTable* config_item_db;
95 GHashTable* session_support_item_db;
96 GHashTable* xsettings_support_item_db;
97 GHashTable* state_support_item_db;
98 GHashTable* dbus_support_item_db;
99 GHashTable* keymap_support_item_db;
100 GHashTable* environment_support_item_db;
101 };
102
103 struct _LxsessionLxsessionConfigClass {
104 GObjectClass parent_class;
105 void (*on_update_string_set) (LxsessionLxsessionConfig* self, const gchar* dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
106 void (*on_update_string_list_set) (LxsessionLxsessionConfig* self, gchar** dbus_arg, int dbus_arg_length1, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
107 void (*on_update_int_set) (LxsessionLxsessionConfig* self, gint dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
108 };
109
110 struct _LxsessionLxsessionConfigPrivate {
111 gchar* _session_name;
112 gchar* _desktop_env_name;
113 };
114
115 struct _LxsessionLxsessionConfigKeyFile {
116 LxsessionLxsessionConfig parent_instance;
117 LxsessionLxsessionConfigKeyFilePrivate * priv;
118 GKeyFile* kf;
119 GFile* desktop_file;
120 GFile* home_desktop_file;
121 GFileMonitor* monitor_desktop_file;
122 GFileMonitor* monitor_home_desktop_file;
123 GCancellable* monitor_cancel;
124 };
125
126 struct _LxsessionLxsessionConfigKeyFileClass {
127 LxsessionLxsessionConfigClass parent_class;
128 void (*read_secondary_keyfile) (LxsessionLxsessionConfigKeyFile* self);
129 void (*save_secondary_keyfile) (LxsessionLxsessionConfigKeyFile* self);
130 };
131
132 struct _LxsessionLxsessionConfigKeyFilePrivate {
133 gchar* _desktop_config_path;
134 gchar* _desktop_config_home_path;
135 };
136
137 struct _LxsessionRazorQtConfigKeyFile {
138 LxsessionLxsessionConfigKeyFile parent_instance;
139 LxsessionRazorQtConfigKeyFilePrivate * priv;
140 GKeyFile* kf_session;
141 gchar* session_razor_config_path;
142 gchar* session_razor_config_home_path;
143 GFile* session_razor_file;
144 GFile* home_session_razor_file;
145 GKeyFile* kf_conf;
146 gchar* conf_razor_config_path;
147 gchar* conf_razor_config_home_path;
148 GFile* confrazor_file;
149 GFile* home_conf_razor_file;
150 };
151
152 struct _LxsessionRazorQtConfigKeyFileClass {
153 LxsessionLxsessionConfigKeyFileClass parent_class;
154 };
155
156
157 static gpointer lxsession_lxsession_config_parent_class = NULL;
158 extern LxsessionLxSignals* lxsession_global_sig;
159 static gpointer lxsession_lxsession_config_key_file_parent_class = NULL;
160 extern LxsessionXSettingsOption* lxsession_global_xsettings_manager;
161 static gpointer lxsession_razor_qt_config_key_file_parent_class = NULL;
162
163 GType lxsession_lxsession_config_get_type (void) G_GNUC_CONST;
164 #define LXSESSION_LXSESSION_CONFIG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfigPrivate))
165 enum {
166 LXSESSION_LXSESSION_CONFIG_DUMMY_PROPERTY,
167 LXSESSION_LXSESSION_CONFIG_SESSION_NAME,
168 LXSESSION_LXSESSION_CONFIG_DESKTOP_ENV_NAME
169 };
170 LxsessionLxsessionConfig* lxsession_lxsession_config_new (void);
171 LxsessionLxsessionConfig* lxsession_lxsession_config_construct (GType object_type);
172 static GHashTable* lxsession_lxsession_config_init_item_db (LxsessionLxsessionConfig* self);
173 static void _g_free0_ (gpointer var);
174 void lxsession_lxsession_config_create_config_item (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* variable);
175 void lxsession_lxsession_config_update_support_keys (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2);
176 void lxsession_lxsession_config_delete_config_item (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type);
177 void lxsession_lxsession_config_get_item (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, gchar** variable, gchar** type);
178 gchar* lxsession_lxsession_config_get_item_string (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2);
179 void lxsession_lxsession_config_set_config_item_value (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* dbus_arg);
180 void lxsession_lxsession_config_on_update_generic (LxsessionLxsessionConfig* self, const gchar* dbus_arg, const gchar* categorie, const gchar* key1, const gchar* key2);
181 void lxsession_lxsession_config_set_config_item_value_on_starting (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* dbus_arg);
182 GHashTable* lxsession_lxsession_config_get_support_db (LxsessionLxsessionConfig* self, const gchar* categorie);
183 static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
184 gchar* lxsession_lxsession_config_get_support (LxsessionLxsessionConfig* self, const gchar* categorie);
185 gchar* lxsession_lxsession_config_get_support_key (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1);
186 void lxsession_lxsession_config_init_signal (LxsessionLxsessionConfig* self);
187 GType lxsession_lx_signals_get_type (void) G_GNUC_CONST;
188 static void _lxsession_lxsession_config_set_config_item_value_lxsession_lx_signals_generic_set_signal (LxsessionLxSignals* _sender, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* dbus_arg, gpointer self);
189 void lxsession_lxsession_config_guess_default (LxsessionLxsessionConfig* self);
190 void lxsession_lxsession_config_set_generic_default (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* default_value);
191 const gchar* lxsession_lxsession_config_get_session_name (LxsessionLxsessionConfig* self);
192 const gchar* lxsession_lxsession_config_get_desktop_env_name (LxsessionLxsessionConfig* self);
193 void lxsession_lxsession_config_on_update_string_set (LxsessionLxsessionConfig* self, const gchar* dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
194 static void lxsession_lxsession_config_real_on_update_string_set (LxsessionLxsessionConfig* self, const gchar* dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
195 void lxsession_lxsession_config_on_update_string_list_set (LxsessionLxsessionConfig* self, gchar** dbus_arg, int dbus_arg_length1, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
196 static void lxsession_lxsession_config_real_on_update_string_list_set (LxsessionLxsessionConfig* self, gchar** dbus_arg, int dbus_arg_length1, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
197 void lxsession_lxsession_config_on_update_int_set (LxsessionLxsessionConfig* self, gint dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
198 static void lxsession_lxsession_config_real_on_update_int_set (LxsessionLxsessionConfig* self, gint dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
199 void lxsession_lxsession_config_set_session_name (LxsessionLxsessionConfig* self, const gchar* value);
200 void lxsession_lxsession_config_set_desktop_env_name (LxsessionLxsessionConfig* self, const gchar* value);
201 static void lxsession_lxsession_config_finalize (GObject* obj);
202 static void _vala_lxsession_lxsession_config_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
203 static void _vala_lxsession_lxsession_config_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
204 GType lxsession_lxsession_config_key_file_get_type (void) G_GNUC_CONST;
205 #define LXSESSION_LXSESSION_CONFIG_KEY_FILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFilePrivate))
206 enum {
207 LXSESSION_LXSESSION_CONFIG_KEY_FILE_DUMMY_PROPERTY,
208 LXSESSION_LXSESSION_CONFIG_KEY_FILE_DESKTOP_CONFIG_PATH,
209 LXSESSION_LXSESSION_CONFIG_KEY_FILE_DESKTOP_CONFIG_HOME_PATH
210 };
211 LxsessionLxsessionConfigKeyFile* lxsession_lxsession_config_key_file_new (const gchar* session_arg, const gchar* desktop_env_name_arg);
212 LxsessionLxsessionConfigKeyFile* lxsession_lxsession_config_key_file_construct (GType object_type, const gchar* session_arg, const gchar* desktop_env_name_arg);
213 void lxsession_lxsession_config_key_file_on_reload_settings_daemon (LxsessionLxsessionConfigKeyFile* self);
214 static void _lxsession_lxsession_config_key_file_on_reload_settings_daemon_lxsession_lx_signals_reload_settings_daemon (LxsessionLxSignals* _sender, gpointer self);
215 void lxsession_lxsession_config_key_file_init_desktop_files (LxsessionLxsessionConfigKeyFile* self);
216 void lxsession_lxsession_config_key_file_read_keyfile (LxsessionLxsessionConfigKeyFile* self);
217 void lxsession_lxsession_config_key_file_setup_monitor_desktop_file (LxsessionLxsessionConfigKeyFile* self);
218 gchar* lxsession_get_config_path (const gchar* conf_file);
219 void lxsession_lxsession_config_key_file_set_desktop_config_path (LxsessionLxsessionConfigKeyFile* self, const gchar* value);
220 gchar* lxsession_get_config_home_path (const gchar* conf_file);
221 void lxsession_lxsession_config_key_file_set_desktop_config_home_path (LxsessionLxsessionConfigKeyFile* self, const gchar* value);
222 const gchar* lxsession_lxsession_config_key_file_get_desktop_config_path (LxsessionLxsessionConfigKeyFile* self);
223 void lxsession_lxsession_config_key_file_on_desktop_file_change (LxsessionLxsessionConfigKeyFile* self);
224 static void _lxsession_lxsession_config_key_file_on_desktop_file_change_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self);
225 const gchar* lxsession_lxsession_config_key_file_get_desktop_config_home_path (LxsessionLxsessionConfigKeyFile* self);
226 void lxsession_lxsession_config_key_file_setup_creation_desktop_file (LxsessionLxsessionConfigKeyFile* self);
227 void lxsession_lxsession_config_key_file_on_desktop_file_creation (LxsessionLxsessionConfigKeyFile* self);
228 static void _lxsession_lxsession_config_key_file_on_desktop_file_creation_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self);
229 void lxsession_lxsession_config_key_file_reload_xsettings (LxsessionLxsessionConfigKeyFile* self);
230 GType lxsession_xsettings_option_get_type (void) G_GNUC_CONST;
231 LxsessionXSettingsOption* lxsession_xsettings_option_new (void);
232 LxsessionXSettingsOption* lxsession_xsettings_option_construct (GType object_type);
233 void lxsession_xsettings_option_activate (LxsessionXSettingsOption* self);
234 void lxsession_xsettings_option_reload (LxsessionXSettingsOption* self);
235 gchar* lxsession_lxsession_config_key_file_read_keyfile_string_value (LxsessionLxsessionConfigKeyFile* self, GKeyFile* keyfile, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2, const gchar* default_value);
236 gint lxsession_lxsession_config_key_file_read_keyfile_int_value (LxsessionLxsessionConfigKeyFile* self, GKeyFile* keyfile, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2, gint default_value);
237 gchar** lxsession_lxsession_config_key_file_read_keyfile_string_list_value (LxsessionLxsessionConfigKeyFile* self, GKeyFile* keyfile, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2, gchar** default_value, int default_value_length1, int* result_length1);
238 static gchar** _vala_array_dup6 (gchar** self, int length);
239 static gchar** _vala_array_dup7 (gchar** self, int length);
240 static gchar** _vala_array_dup8 (gchar** self, int length);
241 void lxsession_lxsession_config_key_file_read_key_value (LxsessionLxsessionConfigKeyFile* self, GKeyFile* kf, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type);
242 GKeyFile* lxsession_load_keyfile (const gchar* config_path);
243 void lxsession_lxsession_config_key_file_read_secondary_keyfile (LxsessionLxsessionConfigKeyFile* self);
244 static void lxsession_lxsession_config_key_file_real_read_secondary_keyfile (LxsessionLxsessionConfigKeyFile* self);
245 void lxsession_lxsession_config_key_file_sync_setting_files (LxsessionLxsessionConfigKeyFile* self);
246 void lxsession_lxsession_config_key_file_save_keyfile (LxsessionLxsessionConfigKeyFile* self);
247 void lxsession_lxsession_config_key_file_save_secondary_keyfile (LxsessionLxsessionConfigKeyFile* self);
248 static void lxsession_lxsession_config_key_file_real_save_secondary_keyfile (LxsessionLxsessionConfigKeyFile* self);
249 static void lxsession_lxsession_config_key_file_real_on_update_string_set (LxsessionLxsessionConfig* base, const gchar* dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
250 static void lxsession_lxsession_config_key_file_real_on_update_string_list_set (LxsessionLxsessionConfig* base, gchar** dbus_arg, int dbus_arg_length1, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
251 static void lxsession_lxsession_config_key_file_real_on_update_int_set (LxsessionLxsessionConfig* base, gint dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2);
252 static void lxsession_lxsession_config_key_file_finalize (GObject* obj);
253 static void _vala_lxsession_lxsession_config_key_file_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
254 static void _vala_lxsession_lxsession_config_key_file_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
255 GType lxsession_razor_qt_config_key_file_get_type (void) G_GNUC_CONST;
256 enum {
257 LXSESSION_RAZOR_QT_CONFIG_KEY_FILE_DUMMY_PROPERTY
258 };
259 LxsessionRazorQtConfigKeyFile* lxsession_razor_qt_config_key_file_new (const gchar* session_arg, const gchar* desktop_env_name_arg);
260 LxsessionRazorQtConfigKeyFile* lxsession_razor_qt_config_key_file_construct (GType object_type, const gchar* session_arg, const gchar* desktop_env_name_arg);
261 void lxsession_razor_qt_config_key_file_init_desktop_razor_files (LxsessionRazorQtConfigKeyFile* self);
262 void lxsession_razor_qt_config_key_file_read_razor_key_value (LxsessionRazorQtConfigKeyFile* self, GKeyFile* kf, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* categorie_razor, const gchar* key1_razor, const gchar* key2_razor);
263 gchar* lxsession_razor_qt_config_key_file_read_razor_keyfile_bool_value (LxsessionRazorQtConfigKeyFile* self, GKeyFile* keyfile, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2, const gchar* default_value);
264 static void lxsession_razor_qt_config_key_file_real_read_secondary_keyfile (LxsessionLxsessionConfigKeyFile* base);
265 static void lxsession_razor_qt_config_key_file_real_save_secondary_keyfile (LxsessionLxsessionConfigKeyFile* base);
266 static void lxsession_razor_qt_config_key_file_finalize (GObject* obj);
267 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
268 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
269 static gint _vala_array_length (gpointer array);
270
271
lxsession_lxsession_config_construct(GType object_type)272 LxsessionLxsessionConfig* lxsession_lxsession_config_construct (GType object_type) {
273 LxsessionLxsessionConfig * self = NULL;
274 GHashTable* _tmp0_ = NULL;
275 GHashTable* _tmp1_ = NULL;
276 GHashTable* _tmp2_ = NULL;
277 GHashTable* _tmp3_ = NULL;
278 GHashTable* _tmp4_ = NULL;
279 GHashTable* _tmp5_ = NULL;
280 GHashTable* _tmp6_ = NULL;
281 self = (LxsessionLxsessionConfig*) g_object_new (object_type, NULL);
282 _tmp0_ = lxsession_lxsession_config_init_item_db (self);
283 _g_hash_table_unref0 (self->config_item_db);
284 self->config_item_db = _tmp0_;
285 _tmp1_ = lxsession_lxsession_config_init_item_db (self);
286 _g_hash_table_unref0 (self->session_support_item_db);
287 self->session_support_item_db = _tmp1_;
288 _tmp2_ = lxsession_lxsession_config_init_item_db (self);
289 _g_hash_table_unref0 (self->xsettings_support_item_db);
290 self->xsettings_support_item_db = _tmp2_;
291 _tmp3_ = lxsession_lxsession_config_init_item_db (self);
292 _g_hash_table_unref0 (self->state_support_item_db);
293 self->state_support_item_db = _tmp3_;
294 _tmp4_ = lxsession_lxsession_config_init_item_db (self);
295 _g_hash_table_unref0 (self->dbus_support_item_db);
296 self->dbus_support_item_db = _tmp4_;
297 _tmp5_ = lxsession_lxsession_config_init_item_db (self);
298 _g_hash_table_unref0 (self->keymap_support_item_db);
299 self->keymap_support_item_db = _tmp5_;
300 _tmp6_ = lxsession_lxsession_config_init_item_db (self);
301 _g_hash_table_unref0 (self->environment_support_item_db);
302 self->environment_support_item_db = _tmp6_;
303 return self;
304 }
305
306
lxsession_lxsession_config_new(void)307 LxsessionLxsessionConfig* lxsession_lxsession_config_new (void) {
308 return lxsession_lxsession_config_construct (LXSESSION_TYPE_LXSESSION_CONFIG);
309 }
310
311
_g_free0_(gpointer var)312 static void _g_free0_ (gpointer var) {
313 var = (g_free (var), NULL);
314 }
315
316
lxsession_lxsession_config_init_item_db(LxsessionLxsessionConfig * self)317 static GHashTable* lxsession_lxsession_config_init_item_db (LxsessionLxsessionConfig* self) {
318 GHashTable* result = NULL;
319 GHashTable* return_map = NULL;
320 GHashFunc _tmp0_ = NULL;
321 GEqualFunc _tmp1_ = NULL;
322 GHashTable* _tmp2_ = NULL;
323 g_return_val_if_fail (self != NULL, NULL);
324 _tmp0_ = g_str_hash;
325 _tmp1_ = g_str_equal;
326 _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
327 return_map = _tmp2_;
328 result = return_map;
329 return result;
330 }
331
332
lxsession_lxsession_config_create_config_item(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1,const gchar * key2,const gchar * type,const gchar * variable)333 void lxsession_lxsession_config_create_config_item (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* variable) {
334 gchar* item_key = NULL;
335 const gchar* _tmp0_ = NULL;
336 gchar* _tmp1_ = NULL;
337 gchar* _tmp2_ = NULL;
338 const gchar* _tmp3_ = NULL;
339 gchar* _tmp4_ = NULL;
340 gchar* _tmp5_ = NULL;
341 gchar* _tmp6_ = NULL;
342 gchar* _tmp7_ = NULL;
343 const gchar* _tmp8_ = NULL;
344 gchar* _tmp9_ = NULL;
345 gchar* _tmp10_ = NULL;
346 gchar* _tmp11_ = NULL;
347 gchar* _tmp12_ = NULL;
348 GHashTable* _tmp13_ = NULL;
349 gchar* _tmp14_ = NULL;
350 const gchar* _tmp15_ = NULL;
351 gchar* _tmp16_ = NULL;
352 const gchar* _tmp17_ = NULL;
353 const gchar* _tmp18_ = NULL;
354 const gchar* _tmp19_ = NULL;
355 g_return_if_fail (self != NULL);
356 g_return_if_fail (categorie != NULL);
357 g_return_if_fail (key1 != NULL);
358 g_return_if_fail (type != NULL);
359 _tmp0_ = categorie;
360 _tmp1_ = g_strconcat (_tmp0_, ";", NULL);
361 _tmp2_ = _tmp1_;
362 _tmp3_ = key1;
363 _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
364 _tmp5_ = _tmp4_;
365 _tmp6_ = g_strconcat (_tmp5_, ";", NULL);
366 _tmp7_ = _tmp6_;
367 _tmp8_ = key2;
368 _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
369 _tmp10_ = _tmp9_;
370 _tmp11_ = g_strconcat (_tmp10_, ";", NULL);
371 _tmp12_ = _tmp11_;
372 _g_free0 (_tmp10_);
373 _g_free0 (_tmp7_);
374 _g_free0 (_tmp5_);
375 _g_free0 (_tmp2_);
376 item_key = _tmp12_;
377 _tmp13_ = self->config_item_db;
378 _tmp14_ = g_strdup (item_key);
379 _tmp15_ = variable;
380 _tmp16_ = g_strdup (_tmp15_);
381 g_hash_table_insert (_tmp13_, _tmp14_, _tmp16_);
382 _tmp17_ = categorie;
383 _tmp18_ = key1;
384 _tmp19_ = key2;
385 lxsession_lxsession_config_update_support_keys (self, _tmp17_, _tmp18_, _tmp19_);
386 _g_free0 (item_key);
387 }
388
389
lxsession_lxsession_config_delete_config_item(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1,const gchar * key2,const gchar * type)390 void lxsession_lxsession_config_delete_config_item (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type) {
391 gchar* item_key = NULL;
392 const gchar* _tmp0_ = NULL;
393 gchar* _tmp1_ = NULL;
394 gchar* _tmp2_ = NULL;
395 const gchar* _tmp3_ = NULL;
396 gchar* _tmp4_ = NULL;
397 gchar* _tmp5_ = NULL;
398 gchar* _tmp6_ = NULL;
399 gchar* _tmp7_ = NULL;
400 const gchar* _tmp8_ = NULL;
401 gchar* _tmp9_ = NULL;
402 gchar* _tmp10_ = NULL;
403 gchar* _tmp11_ = NULL;
404 gchar* _tmp12_ = NULL;
405 GHashTable* _tmp13_ = NULL;
406 const gchar* _tmp14_ = NULL;
407 gboolean _tmp15_ = FALSE;
408 g_return_if_fail (self != NULL);
409 g_return_if_fail (categorie != NULL);
410 g_return_if_fail (key1 != NULL);
411 g_return_if_fail (type != NULL);
412 _tmp0_ = categorie;
413 _tmp1_ = g_strconcat (_tmp0_, ";", NULL);
414 _tmp2_ = _tmp1_;
415 _tmp3_ = key1;
416 _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
417 _tmp5_ = _tmp4_;
418 _tmp6_ = g_strconcat (_tmp5_, ";", NULL);
419 _tmp7_ = _tmp6_;
420 _tmp8_ = key2;
421 _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
422 _tmp10_ = _tmp9_;
423 _tmp11_ = g_strconcat (_tmp10_, ";", NULL);
424 _tmp12_ = _tmp11_;
425 _g_free0 (_tmp10_);
426 _g_free0 (_tmp7_);
427 _g_free0 (_tmp5_);
428 _g_free0 (_tmp2_);
429 item_key = _tmp12_;
430 _tmp13_ = self->config_item_db;
431 _tmp14_ = item_key;
432 _tmp15_ = g_hash_table_contains (_tmp13_, _tmp14_);
433 if (_tmp15_ == TRUE) {
434 GHashTable* _tmp16_ = NULL;
435 const gchar* _tmp17_ = NULL;
436 const gchar* _tmp18_ = NULL;
437 const gchar* _tmp19_ = NULL;
438 const gchar* _tmp20_ = NULL;
439 _tmp16_ = self->config_item_db;
440 _tmp17_ = item_key;
441 g_hash_table_remove (_tmp16_, _tmp17_);
442 _tmp18_ = categorie;
443 _tmp19_ = key1;
444 _tmp20_ = key2;
445 lxsession_lxsession_config_update_support_keys (self, _tmp18_, _tmp19_, _tmp20_);
446 }
447 _g_free0 (item_key);
448 }
449
450
lxsession_lxsession_config_get_item(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1,const gchar * key2,gchar ** variable,gchar ** type)451 void lxsession_lxsession_config_get_item (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, gchar** variable, gchar** type) {
452 gchar* _vala_variable = NULL;
453 gchar* _vala_type = NULL;
454 gchar* item_key = NULL;
455 const gchar* _tmp0_ = NULL;
456 gchar* _tmp1_ = NULL;
457 gchar* _tmp2_ = NULL;
458 const gchar* _tmp3_ = NULL;
459 gchar* _tmp4_ = NULL;
460 gchar* _tmp5_ = NULL;
461 gchar* _tmp6_ = NULL;
462 gchar* _tmp7_ = NULL;
463 const gchar* _tmp8_ = NULL;
464 gchar* _tmp9_ = NULL;
465 gchar* _tmp10_ = NULL;
466 gchar* _tmp11_ = NULL;
467 gchar* _tmp12_ = NULL;
468 GHashTable* _tmp13_ = NULL;
469 gconstpointer _tmp14_ = NULL;
470 gchar* _tmp15_ = NULL;
471 gchar* _tmp16_ = NULL;
472 g_return_if_fail (self != NULL);
473 g_return_if_fail (categorie != NULL);
474 g_return_if_fail (key1 != NULL);
475 _tmp0_ = categorie;
476 _tmp1_ = g_strconcat (_tmp0_, ";", NULL);
477 _tmp2_ = _tmp1_;
478 _tmp3_ = key1;
479 _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
480 _tmp5_ = _tmp4_;
481 _tmp6_ = g_strconcat (_tmp5_, ";", NULL);
482 _tmp7_ = _tmp6_;
483 _tmp8_ = key2;
484 _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
485 _tmp10_ = _tmp9_;
486 _tmp11_ = g_strconcat (_tmp10_, ";", NULL);
487 _tmp12_ = _tmp11_;
488 _g_free0 (_tmp10_);
489 _g_free0 (_tmp7_);
490 _g_free0 (_tmp5_);
491 _g_free0 (_tmp2_);
492 item_key = _tmp12_;
493 _tmp13_ = self->config_item_db;
494 _tmp14_ = g_hash_table_lookup (_tmp13_, item_key);
495 _tmp15_ = g_strdup ((const gchar*) _tmp14_);
496 _g_free0 (_vala_variable);
497 _vala_variable = _tmp15_;
498 _tmp16_ = g_strdup ("string");
499 _g_free0 (_vala_type);
500 _vala_type = _tmp16_;
501 _g_free0 (item_key);
502 if (variable) {
503 *variable = _vala_variable;
504 } else {
505 _g_free0 (_vala_variable);
506 }
507 if (type) {
508 *type = _vala_type;
509 } else {
510 _g_free0 (_vala_type);
511 }
512 }
513
514
lxsession_lxsession_config_get_item_string(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1,const gchar * key2)515 gchar* lxsession_lxsession_config_get_item_string (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2) {
516 gchar* result = NULL;
517 gchar* type_output = NULL;
518 gchar* variable_output = NULL;
519 const gchar* _tmp0_ = NULL;
520 const gchar* _tmp1_ = NULL;
521 const gchar* _tmp2_ = NULL;
522 gchar* _tmp3_ = NULL;
523 gchar* _tmp4_ = NULL;
524 g_return_val_if_fail (self != NULL, NULL);
525 g_return_val_if_fail (categorie != NULL, NULL);
526 g_return_val_if_fail (key1 != NULL, NULL);
527 _tmp0_ = categorie;
528 _tmp1_ = key1;
529 _tmp2_ = key2;
530 lxsession_lxsession_config_get_item (self, _tmp0_, _tmp1_, _tmp2_, &_tmp3_, &_tmp4_);
531 _g_free0 (variable_output);
532 variable_output = _tmp3_;
533 _g_free0 (type_output);
534 type_output = _tmp4_;
535 result = variable_output;
536 _g_free0 (type_output);
537 return result;
538 }
539
540
lxsession_lxsession_config_set_config_item_value(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1,const gchar * key2,const gchar * type,const gchar * dbus_arg)541 void lxsession_lxsession_config_set_config_item_value (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* dbus_arg) {
542 gchar* item_key = NULL;
543 const gchar* _tmp0_ = NULL;
544 gchar* _tmp1_ = NULL;
545 gchar* _tmp2_ = NULL;
546 const gchar* _tmp3_ = NULL;
547 gchar* _tmp4_ = NULL;
548 gchar* _tmp5_ = NULL;
549 gchar* _tmp6_ = NULL;
550 gchar* _tmp7_ = NULL;
551 const gchar* _tmp8_ = NULL;
552 gchar* _tmp9_ = NULL;
553 gchar* _tmp10_ = NULL;
554 gchar* _tmp11_ = NULL;
555 gchar* _tmp12_ = NULL;
556 GHashTable* _tmp13_ = NULL;
557 const gchar* _tmp14_ = NULL;
558 gboolean _tmp15_ = FALSE;
559 g_return_if_fail (self != NULL);
560 g_return_if_fail (categorie != NULL);
561 g_return_if_fail (key1 != NULL);
562 g_return_if_fail (type != NULL);
563 g_return_if_fail (dbus_arg != NULL);
564 _tmp0_ = categorie;
565 _tmp1_ = g_strconcat (_tmp0_, ";", NULL);
566 _tmp2_ = _tmp1_;
567 _tmp3_ = key1;
568 _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
569 _tmp5_ = _tmp4_;
570 _tmp6_ = g_strconcat (_tmp5_, ";", NULL);
571 _tmp7_ = _tmp6_;
572 _tmp8_ = key2;
573 _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
574 _tmp10_ = _tmp9_;
575 _tmp11_ = g_strconcat (_tmp10_, ";", NULL);
576 _tmp12_ = _tmp11_;
577 _g_free0 (_tmp10_);
578 _g_free0 (_tmp7_);
579 _g_free0 (_tmp5_);
580 _g_free0 (_tmp2_);
581 item_key = _tmp12_;
582 _tmp13_ = self->config_item_db;
583 _tmp14_ = item_key;
584 _tmp15_ = g_hash_table_contains (_tmp13_, _tmp14_);
585 if (_tmp15_ == TRUE) {
586 GHashTable* _tmp16_ = NULL;
587 const gchar* _tmp17_ = NULL;
588 gconstpointer _tmp18_ = NULL;
589 const gchar* _tmp19_ = NULL;
590 _tmp16_ = self->config_item_db;
591 _tmp17_ = item_key;
592 _tmp18_ = g_hash_table_lookup (_tmp16_, _tmp17_);
593 _tmp19_ = dbus_arg;
594 if (g_strcmp0 ((const gchar*) _tmp18_, _tmp19_) != 0) {
595 GHashTable* _tmp20_ = NULL;
596 const gchar* _tmp21_ = NULL;
597 gchar* _tmp22_ = NULL;
598 const gchar* _tmp23_ = NULL;
599 gchar* _tmp24_ = NULL;
600 const gchar* _tmp25_ = NULL;
601 const gchar* _tmp26_ = NULL;
602 const gchar* _tmp27_ = NULL;
603 const gchar* _tmp28_ = NULL;
604 _tmp20_ = self->config_item_db;
605 _tmp21_ = item_key;
606 _tmp22_ = g_strdup (_tmp21_);
607 _tmp23_ = dbus_arg;
608 _tmp24_ = g_strdup (_tmp23_);
609 g_hash_table_insert (_tmp20_, _tmp22_, _tmp24_);
610 _tmp25_ = dbus_arg;
611 _tmp26_ = categorie;
612 _tmp27_ = key1;
613 _tmp28_ = key2;
614 lxsession_lxsession_config_on_update_generic (self, _tmp25_, _tmp26_, _tmp27_, _tmp28_);
615 }
616 } else {
617 const gchar* _tmp29_ = NULL;
618 const gchar* _tmp30_ = NULL;
619 const gchar* _tmp31_ = NULL;
620 const gchar* _tmp32_ = NULL;
621 const gchar* _tmp33_ = NULL;
622 _tmp29_ = categorie;
623 _tmp30_ = key1;
624 _tmp31_ = key2;
625 _tmp32_ = type;
626 _tmp33_ = dbus_arg;
627 lxsession_lxsession_config_create_config_item (self, _tmp29_, _tmp30_, _tmp31_, _tmp32_, _tmp33_);
628 }
629 _g_free0 (item_key);
630 }
631
632
lxsession_lxsession_config_set_config_item_value_on_starting(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1,const gchar * key2,const gchar * type,const gchar * dbus_arg)633 void lxsession_lxsession_config_set_config_item_value_on_starting (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* dbus_arg) {
634 gchar* item_key = NULL;
635 const gchar* _tmp0_ = NULL;
636 gchar* _tmp1_ = NULL;
637 gchar* _tmp2_ = NULL;
638 const gchar* _tmp3_ = NULL;
639 gchar* _tmp4_ = NULL;
640 gchar* _tmp5_ = NULL;
641 gchar* _tmp6_ = NULL;
642 gchar* _tmp7_ = NULL;
643 const gchar* _tmp8_ = NULL;
644 gchar* _tmp9_ = NULL;
645 gchar* _tmp10_ = NULL;
646 gchar* _tmp11_ = NULL;
647 gchar* _tmp12_ = NULL;
648 GHashTable* _tmp13_ = NULL;
649 const gchar* _tmp14_ = NULL;
650 gboolean _tmp15_ = FALSE;
651 g_return_if_fail (self != NULL);
652 g_return_if_fail (categorie != NULL);
653 g_return_if_fail (key1 != NULL);
654 g_return_if_fail (type != NULL);
655 g_return_if_fail (dbus_arg != NULL);
656 _tmp0_ = categorie;
657 _tmp1_ = g_strconcat (_tmp0_, ";", NULL);
658 _tmp2_ = _tmp1_;
659 _tmp3_ = key1;
660 _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
661 _tmp5_ = _tmp4_;
662 _tmp6_ = g_strconcat (_tmp5_, ";", NULL);
663 _tmp7_ = _tmp6_;
664 _tmp8_ = key2;
665 _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
666 _tmp10_ = _tmp9_;
667 _tmp11_ = g_strconcat (_tmp10_, ";", NULL);
668 _tmp12_ = _tmp11_;
669 _g_free0 (_tmp10_);
670 _g_free0 (_tmp7_);
671 _g_free0 (_tmp5_);
672 _g_free0 (_tmp2_);
673 item_key = _tmp12_;
674 _tmp13_ = self->config_item_db;
675 _tmp14_ = item_key;
676 _tmp15_ = g_hash_table_contains (_tmp13_, _tmp14_);
677 if (_tmp15_ == TRUE) {
678 GHashTable* _tmp16_ = NULL;
679 const gchar* _tmp17_ = NULL;
680 gconstpointer _tmp18_ = NULL;
681 const gchar* _tmp19_ = NULL;
682 _tmp16_ = self->config_item_db;
683 _tmp17_ = item_key;
684 _tmp18_ = g_hash_table_lookup (_tmp16_, _tmp17_);
685 _tmp19_ = dbus_arg;
686 if (g_strcmp0 ((const gchar*) _tmp18_, _tmp19_) != 0) {
687 GHashTable* _tmp20_ = NULL;
688 const gchar* _tmp21_ = NULL;
689 gchar* _tmp22_ = NULL;
690 const gchar* _tmp23_ = NULL;
691 gchar* _tmp24_ = NULL;
692 _tmp20_ = self->config_item_db;
693 _tmp21_ = item_key;
694 _tmp22_ = g_strdup (_tmp21_);
695 _tmp23_ = dbus_arg;
696 _tmp24_ = g_strdup (_tmp23_);
697 g_hash_table_insert (_tmp20_, _tmp22_, _tmp24_);
698 }
699 } else {
700 const gchar* _tmp25_ = NULL;
701 const gchar* _tmp26_ = NULL;
702 const gchar* _tmp27_ = NULL;
703 const gchar* _tmp28_ = NULL;
704 const gchar* _tmp29_ = NULL;
705 _tmp25_ = categorie;
706 _tmp26_ = key1;
707 _tmp27_ = key2;
708 _tmp28_ = type;
709 _tmp29_ = dbus_arg;
710 lxsession_lxsession_config_create_config_item (self, _tmp25_, _tmp26_, _tmp27_, _tmp28_, _tmp29_);
711 }
712 _g_free0 (item_key);
713 }
714
715
_g_hash_table_ref0(gpointer self)716 static gpointer _g_hash_table_ref0 (gpointer self) {
717 return self ? g_hash_table_ref (self) : NULL;
718 }
719
720
lxsession_lxsession_config_get_support_db(LxsessionLxsessionConfig * self,const gchar * categorie)721 GHashTable* lxsession_lxsession_config_get_support_db (LxsessionLxsessionConfig* self, const gchar* categorie) {
722 GHashTable* result = NULL;
723 GHashTable* support_db = NULL;
724 GHashFunc _tmp0_ = NULL;
725 GEqualFunc _tmp1_ = NULL;
726 GHashTable* _tmp2_ = NULL;
727 GHashTable* _tmp3_ = NULL;
728 GHashTable* _tmp4_ = NULL;
729 const gchar* _tmp5_ = NULL;
730 const gchar* _tmp6_ = NULL;
731 GQuark _tmp8_ = 0U;
732 static GQuark _tmp7_label0 = 0;
733 static GQuark _tmp7_label1 = 0;
734 static GQuark _tmp7_label2 = 0;
735 static GQuark _tmp7_label3 = 0;
736 static GQuark _tmp7_label4 = 0;
737 static GQuark _tmp7_label5 = 0;
738 static GQuark _tmp7_label6 = 0;
739 static GQuark _tmp7_label7 = 0;
740 static GQuark _tmp7_label8 = 0;
741 g_return_val_if_fail (self != NULL, NULL);
742 g_return_val_if_fail (categorie != NULL, NULL);
743 _tmp0_ = g_str_hash;
744 _tmp1_ = g_str_equal;
745 _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
746 support_db = _tmp2_;
747 _tmp3_ = self->session_support_item_db;
748 _tmp4_ = _g_hash_table_ref0 (_tmp3_);
749 _g_hash_table_unref0 (support_db);
750 support_db = _tmp4_;
751 _tmp5_ = categorie;
752 _tmp6_ = _tmp5_;
753 _tmp8_ = (NULL == _tmp6_) ? 0 : g_quark_from_string (_tmp6_);
754 if (_tmp8_ == ((0 != _tmp7_label0) ? _tmp7_label0 : (_tmp7_label0 = g_quark_from_static_string ("Session")))) {
755 switch (0) {
756 default:
757 {
758 GHashTable* _tmp9_ = NULL;
759 GHashTable* _tmp10_ = NULL;
760 _tmp9_ = self->session_support_item_db;
761 _tmp10_ = _g_hash_table_ref0 (_tmp9_);
762 _g_hash_table_unref0 (support_db);
763 support_db = _tmp10_;
764 break;
765 }
766 }
767 } else if (_tmp8_ == ((0 != _tmp7_label1) ? _tmp7_label1 : (_tmp7_label1 = g_quark_from_static_string ("Xsettings")))) {
768 switch (0) {
769 default:
770 {
771 GHashTable* _tmp11_ = NULL;
772 GHashTable* _tmp12_ = NULL;
773 _tmp11_ = self->xsettings_support_item_db;
774 _tmp12_ = _g_hash_table_ref0 (_tmp11_);
775 _g_hash_table_unref0 (support_db);
776 support_db = _tmp12_;
777 break;
778 }
779 }
780 } else if (_tmp8_ == ((0 != _tmp7_label2) ? _tmp7_label2 : (_tmp7_label2 = g_quark_from_static_string ("GTK")))) {
781 switch (0) {
782 default:
783 {
784 GHashTable* _tmp13_ = NULL;
785 GHashTable* _tmp14_ = NULL;
786 _tmp13_ = self->xsettings_support_item_db;
787 _tmp14_ = _g_hash_table_ref0 (_tmp13_);
788 _g_hash_table_unref0 (support_db);
789 support_db = _tmp14_;
790 break;
791 }
792 }
793 } else if (_tmp8_ == ((0 != _tmp7_label3) ? _tmp7_label3 : (_tmp7_label3 = g_quark_from_static_string ("Mouse")))) {
794 switch (0) {
795 default:
796 {
797 GHashTable* _tmp15_ = NULL;
798 GHashTable* _tmp16_ = NULL;
799 _tmp15_ = self->xsettings_support_item_db;
800 _tmp16_ = _g_hash_table_ref0 (_tmp15_);
801 _g_hash_table_unref0 (support_db);
802 support_db = _tmp16_;
803 break;
804 }
805 }
806 } else if (_tmp8_ == ((0 != _tmp7_label4) ? _tmp7_label4 : (_tmp7_label4 = g_quark_from_static_string ("Keyboard")))) {
807 switch (0) {
808 default:
809 {
810 GHashTable* _tmp17_ = NULL;
811 GHashTable* _tmp18_ = NULL;
812 _tmp17_ = self->xsettings_support_item_db;
813 _tmp18_ = _g_hash_table_ref0 (_tmp17_);
814 _g_hash_table_unref0 (support_db);
815 support_db = _tmp18_;
816 break;
817 }
818 }
819 } else if (_tmp8_ == ((0 != _tmp7_label5) ? _tmp7_label5 : (_tmp7_label5 = g_quark_from_static_string ("State")))) {
820 switch (0) {
821 default:
822 {
823 GHashTable* _tmp19_ = NULL;
824 GHashTable* _tmp20_ = NULL;
825 _tmp19_ = self->state_support_item_db;
826 _tmp20_ = _g_hash_table_ref0 (_tmp19_);
827 _g_hash_table_unref0 (support_db);
828 support_db = _tmp20_;
829 break;
830 }
831 }
832 } else if (_tmp8_ == ((0 != _tmp7_label6) ? _tmp7_label6 : (_tmp7_label6 = g_quark_from_static_string ("Dbus")))) {
833 switch (0) {
834 default:
835 {
836 GHashTable* _tmp21_ = NULL;
837 GHashTable* _tmp22_ = NULL;
838 _tmp21_ = self->dbus_support_item_db;
839 _tmp22_ = _g_hash_table_ref0 (_tmp21_);
840 _g_hash_table_unref0 (support_db);
841 support_db = _tmp22_;
842 break;
843 }
844 }
845 } else if (_tmp8_ == ((0 != _tmp7_label7) ? _tmp7_label7 : (_tmp7_label7 = g_quark_from_static_string ("Keymap")))) {
846 switch (0) {
847 default:
848 {
849 GHashTable* _tmp23_ = NULL;
850 GHashTable* _tmp24_ = NULL;
851 _tmp23_ = self->keymap_support_item_db;
852 _tmp24_ = _g_hash_table_ref0 (_tmp23_);
853 _g_hash_table_unref0 (support_db);
854 support_db = _tmp24_;
855 break;
856 }
857 }
858 } else if (_tmp8_ == ((0 != _tmp7_label8) ? _tmp7_label8 : (_tmp7_label8 = g_quark_from_static_string ("Environment")))) {
859 switch (0) {
860 default:
861 {
862 GHashTable* _tmp25_ = NULL;
863 GHashTable* _tmp26_ = NULL;
864 _tmp25_ = self->environment_support_item_db;
865 _tmp26_ = _g_hash_table_ref0 (_tmp25_);
866 _g_hash_table_unref0 (support_db);
867 support_db = _tmp26_;
868 break;
869 }
870 }
871 }
872 result = support_db;
873 return result;
874 }
875
876
_vala_string_array_contains(gchar ** stack,int stack_length,gchar * needle)877 static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle) {
878 int i;
879 for (i = 0; i < stack_length; i++) {
880 if (g_strcmp0 (stack[i], needle) == 0) {
881 return TRUE;
882 }
883 }
884 return FALSE;
885 }
886
887
lxsession_lxsession_config_update_support_keys(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1,const gchar * key2)888 void lxsession_lxsession_config_update_support_keys (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2) {
889 GHashTable* support_db = NULL;
890 GHashFunc _tmp0_ = NULL;
891 GEqualFunc _tmp1_ = NULL;
892 GHashTable* _tmp2_ = NULL;
893 const gchar* _tmp3_ = NULL;
894 GHashTable* _tmp4_ = NULL;
895 GHashTable* _tmp5_ = NULL;
896 const gchar* _tmp6_ = NULL;
897 gboolean _tmp7_ = FALSE;
898 g_return_if_fail (self != NULL);
899 g_return_if_fail (categorie != NULL);
900 g_return_if_fail (key1 != NULL);
901 _tmp0_ = g_str_hash;
902 _tmp1_ = g_str_equal;
903 _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
904 support_db = _tmp2_;
905 _tmp3_ = categorie;
906 _tmp4_ = lxsession_lxsession_config_get_support_db (self, _tmp3_);
907 _g_hash_table_unref0 (support_db);
908 support_db = _tmp4_;
909 _tmp5_ = support_db;
910 _tmp6_ = key1;
911 _tmp7_ = g_hash_table_contains (_tmp5_, _tmp6_);
912 if (_tmp7_) {
913 gchar** list = NULL;
914 GHashTable* _tmp8_ = NULL;
915 const gchar* _tmp9_ = NULL;
916 gconstpointer _tmp10_ = NULL;
917 gchar** _tmp11_ = NULL;
918 gchar** _tmp12_ = NULL;
919 gint list_length1 = 0;
920 gint _list_size_ = 0;
921 const gchar* _tmp13_ = NULL;
922 _tmp8_ = support_db;
923 _tmp9_ = key1;
924 _tmp10_ = g_hash_table_lookup (_tmp8_, _tmp9_);
925 _tmp12_ = _tmp11_ = g_strsplit_set ((const gchar*) _tmp10_, ";", 0);
926 list = _tmp12_;
927 list_length1 = _vala_array_length (_tmp11_);
928 _list_size_ = list_length1;
929 _tmp13_ = key2;
930 if (_tmp13_ == NULL) {
931 } else {
932 const gchar* _tmp14_ = NULL;
933 gchar** _tmp15_ = NULL;
934 gint _tmp15__length1 = 0;
935 _tmp14_ = key2;
936 _tmp15_ = list;
937 _tmp15__length1 = list_length1;
938 if (_vala_string_array_contains (_tmp15_, _tmp15__length1, _tmp14_)) {
939 } else {
940 GHashTable* _tmp16_ = NULL;
941 const gchar* _tmp17_ = NULL;
942 gchar* _tmp18_ = NULL;
943 GHashTable* _tmp19_ = NULL;
944 const gchar* _tmp20_ = NULL;
945 gconstpointer _tmp21_ = NULL;
946 const gchar* _tmp22_ = NULL;
947 gchar* _tmp23_ = NULL;
948 gchar* _tmp24_ = NULL;
949 gchar* _tmp25_ = NULL;
950 _tmp16_ = support_db;
951 _tmp17_ = key1;
952 _tmp18_ = g_strdup (_tmp17_);
953 _tmp19_ = support_db;
954 _tmp20_ = key1;
955 _tmp21_ = g_hash_table_lookup (_tmp19_, _tmp20_);
956 _tmp22_ = key2;
957 _tmp23_ = g_strconcat ((const gchar*) _tmp21_, _tmp22_, NULL);
958 _tmp24_ = _tmp23_;
959 _tmp25_ = g_strconcat (_tmp24_, ";", NULL);
960 g_hash_table_insert (_tmp16_, _tmp18_, _tmp25_);
961 _g_free0 (_tmp24_);
962 }
963 }
964 list = (_vala_array_free (list, list_length1, (GDestroyNotify) g_free), NULL);
965 } else {
966 GHashTable* _tmp26_ = NULL;
967 const gchar* _tmp27_ = NULL;
968 gchar* _tmp28_ = NULL;
969 const gchar* _tmp29_ = NULL;
970 gchar* _tmp30_ = NULL;
971 _tmp26_ = support_db;
972 _tmp27_ = key1;
973 _tmp28_ = g_strdup (_tmp27_);
974 _tmp29_ = key2;
975 _tmp30_ = g_strconcat (_tmp29_, ";", NULL);
976 g_hash_table_insert (_tmp26_, _tmp28_, _tmp30_);
977 }
978 _g_hash_table_unref0 (support_db);
979 }
980
981
lxsession_lxsession_config_get_support(LxsessionLxsessionConfig * self,const gchar * categorie)982 gchar* lxsession_lxsession_config_get_support (LxsessionLxsessionConfig* self, const gchar* categorie) {
983 gchar* result = NULL;
984 gchar* items = NULL;
985 GHashTable* support_db = NULL;
986 GHashFunc _tmp0_ = NULL;
987 GEqualFunc _tmp1_ = NULL;
988 GHashTable* _tmp2_ = NULL;
989 const gchar* _tmp3_ = NULL;
990 GHashTable* _tmp4_ = NULL;
991 GHashTable* _tmp5_ = NULL;
992 GList* _tmp6_ = NULL;
993 g_return_val_if_fail (self != NULL, NULL);
994 g_return_val_if_fail (categorie != NULL, NULL);
995 items = NULL;
996 _tmp0_ = g_str_hash;
997 _tmp1_ = g_str_equal;
998 _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
999 support_db = _tmp2_;
1000 _tmp3_ = categorie;
1001 _tmp4_ = lxsession_lxsession_config_get_support_db (self, _tmp3_);
1002 _g_hash_table_unref0 (support_db);
1003 support_db = _tmp4_;
1004 _tmp5_ = support_db;
1005 _tmp6_ = g_hash_table_get_keys (_tmp5_);
1006 {
1007 GList* key_collection = NULL;
1008 GList* key_it = NULL;
1009 key_collection = _tmp6_;
1010 for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
1011 gchar* _tmp7_ = NULL;
1012 gchar* key = NULL;
1013 _tmp7_ = g_strdup ((const gchar*) key_it->data);
1014 key = _tmp7_;
1015 {
1016 const gchar* _tmp8_ = NULL;
1017 _tmp8_ = items;
1018 if (_tmp8_ == NULL) {
1019 const gchar* _tmp9_ = NULL;
1020 gchar* _tmp10_ = NULL;
1021 _tmp9_ = key;
1022 _tmp10_ = g_strconcat (_tmp9_, ";", NULL);
1023 _g_free0 (items);
1024 items = _tmp10_;
1025 } else {
1026 const gchar* _tmp11_ = NULL;
1027 const gchar* _tmp12_ = NULL;
1028 gchar* _tmp13_ = NULL;
1029 gchar* _tmp14_ = NULL;
1030 gchar* _tmp15_ = NULL;
1031 _tmp11_ = items;
1032 _tmp12_ = key;
1033 _tmp13_ = g_strconcat (_tmp11_, _tmp12_, NULL);
1034 _tmp14_ = _tmp13_;
1035 _tmp15_ = g_strconcat (_tmp14_, ";", NULL);
1036 _g_free0 (items);
1037 items = _tmp15_;
1038 _g_free0 (_tmp14_);
1039 }
1040 _g_free0 (key);
1041 }
1042 }
1043 _g_list_free0 (key_collection);
1044 }
1045 result = items;
1046 _g_hash_table_unref0 (support_db);
1047 return result;
1048 }
1049
1050
lxsession_lxsession_config_get_support_key(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1)1051 gchar* lxsession_lxsession_config_get_support_key (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1) {
1052 gchar* result = NULL;
1053 gchar* return_value = NULL;
1054 GHashTable* support_db = NULL;
1055 GHashFunc _tmp0_ = NULL;
1056 GEqualFunc _tmp1_ = NULL;
1057 GHashTable* _tmp2_ = NULL;
1058 const gchar* _tmp3_ = NULL;
1059 GHashTable* _tmp4_ = NULL;
1060 GHashTable* _tmp5_ = NULL;
1061 const gchar* _tmp6_ = NULL;
1062 gconstpointer _tmp7_ = NULL;
1063 GHashTable* _tmp8_ = NULL;
1064 const gchar* _tmp9_ = NULL;
1065 gconstpointer _tmp10_ = NULL;
1066 gchar* _tmp11_ = NULL;
1067 g_return_val_if_fail (self != NULL, NULL);
1068 g_return_val_if_fail (categorie != NULL, NULL);
1069 g_return_val_if_fail (key1 != NULL, NULL);
1070 return_value = NULL;
1071 _tmp0_ = g_str_hash;
1072 _tmp1_ = g_str_equal;
1073 _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
1074 support_db = _tmp2_;
1075 _tmp3_ = categorie;
1076 _tmp4_ = lxsession_lxsession_config_get_support_db (self, _tmp3_);
1077 _g_hash_table_unref0 (support_db);
1078 support_db = _tmp4_;
1079 _tmp5_ = support_db;
1080 _tmp6_ = key1;
1081 _tmp7_ = g_hash_table_lookup (_tmp5_, _tmp6_);
1082 g_message ("settings.vala:244: Return support key: %s", (const gchar*) _tmp7_);
1083 _tmp8_ = support_db;
1084 _tmp9_ = key1;
1085 _tmp10_ = g_hash_table_lookup (_tmp8_, _tmp9_);
1086 _tmp11_ = g_strdup ((const gchar*) _tmp10_);
1087 _g_free0 (return_value);
1088 return_value = _tmp11_;
1089 result = return_value;
1090 _g_hash_table_unref0 (support_db);
1091 return result;
1092 }
1093
1094
_lxsession_lxsession_config_set_config_item_value_lxsession_lx_signals_generic_set_signal(LxsessionLxSignals * _sender,const gchar * categorie,const gchar * key1,const gchar * key2,const gchar * type,const gchar * dbus_arg,gpointer self)1095 static void _lxsession_lxsession_config_set_config_item_value_lxsession_lx_signals_generic_set_signal (LxsessionLxSignals* _sender, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* dbus_arg, gpointer self) {
1096 lxsession_lxsession_config_set_config_item_value ((LxsessionLxsessionConfig*) self, categorie, key1, key2, type, dbus_arg);
1097 }
1098
1099
lxsession_lxsession_config_init_signal(LxsessionLxsessionConfig * self)1100 void lxsession_lxsession_config_init_signal (LxsessionLxsessionConfig* self) {
1101 LxsessionLxSignals* _tmp0_ = NULL;
1102 g_return_if_fail (self != NULL);
1103 _tmp0_ = lxsession_global_sig;
1104 g_signal_connect_object (_tmp0_, "generic-set-signal", (GCallback) _lxsession_lxsession_config_set_config_item_value_lxsession_lx_signals_generic_set_signal, self, 0);
1105 }
1106
1107
lxsession_lxsession_config_guess_default(LxsessionLxsessionConfig * self)1108 void lxsession_lxsession_config_guess_default (LxsessionLxsessionConfig* self) {
1109 gchar* _tmp0_ = NULL;
1110 gchar* _tmp1_ = NULL;
1111 gboolean _tmp2_ = FALSE;
1112 const gchar* _tmp3_ = NULL;
1113 const gchar* _tmp7_ = NULL;
1114 g_return_if_fail (self != NULL);
1115 _tmp0_ = lxsession_lxsession_config_get_item_string (self, "Session", "window_manager", NULL);
1116 _tmp1_ = _tmp0_;
1117 _tmp2_ = g_strcmp0 (_tmp1_, "openbox-lxde") == 0;
1118 _g_free0 (_tmp1_);
1119 if (_tmp2_) {
1120 lxsession_lxsession_config_set_generic_default (self, "Session", "windows_manager", "command", "string", "openbox");
1121 lxsession_lxsession_config_set_generic_default (self, "Session", "windows_manager", "session", "string", "LXDE");
1122 }
1123 lxsession_lxsession_config_set_generic_default (self, "Session", "disable_autostart", NULL, "string", "no");
1124 lxsession_lxsession_config_set_generic_default (self, "Session", "polkit", "command", "string", "lxpolkit");
1125 lxsession_lxsession_config_set_generic_default (self, "Session", "clipboard", "command", "string", "lxclipboard");
1126 lxsession_lxsession_config_set_generic_default (self, "Session", "xsettings_manager", "command", "string", "build-in");
1127 lxsession_lxsession_config_set_generic_default (self, "Session", "proxy_manager", "command", "string", "build-in");
1128 lxsession_lxsession_config_set_generic_default (self, "Session", "keyring", "command", "string", "ssh-agent");
1129 lxsession_lxsession_config_set_generic_default (self, "GTK", "iXft", "Antialias", "string", "1");
1130 lxsession_lxsession_config_set_generic_default (self, "GTK", "iXft", "Hinting", "string", "1");
1131 lxsession_lxsession_config_set_generic_default (self, "GTK", "sXft", "HintStyle", "string", "hintslight");
1132 lxsession_lxsession_config_set_generic_default (self, "GTK", "sXft", "RGBA", "string", "rgb");
1133 lxsession_lxsession_config_set_generic_default (self, "GTK", "sNet", "ThemeName", "string", "Adwaita");
1134 lxsession_lxsession_config_set_generic_default (self, "GTK", "sNet", "IconThemeName", "string", "nuoveXT2");
1135 lxsession_lxsession_config_set_generic_default (self, "GTK", "iNet", "EnableEventSounds", "string", "1");
1136 lxsession_lxsession_config_set_generic_default (self, "GTK", "iNet", "EnableInputFeedbackSounds", "string", "1");
1137 lxsession_lxsession_config_set_generic_default (self, "GTK", "sGtk", "ColorScheme", "string", "");
1138 lxsession_lxsession_config_set_generic_default (self, "GTK", "sGtk", "FontName", "string", "Sans 10");
1139 lxsession_lxsession_config_set_generic_default (self, "GTK", "iGtk", "ToolbarStyle", "string", "3");
1140 lxsession_lxsession_config_set_generic_default (self, "GTK", "iGtk", "ToolbarIconSize", "string", "3");
1141 lxsession_lxsession_config_set_generic_default (self, "GTK", "iGtk", "ButtonImages", "string", "1");
1142 lxsession_lxsession_config_set_generic_default (self, "GTK", "iGtk", "MenuImages", "string", "1");
1143 lxsession_lxsession_config_set_generic_default (self, "GTK", "iGtk", "CursorThemeSize", "string", "18");
1144 lxsession_lxsession_config_set_generic_default (self, "GTK", "sGtk", "CursorThemeName", "string", "DMZ-White");
1145 lxsession_lxsession_config_set_generic_default (self, "Mouse", "AccFactor", NULL, "string", "20");
1146 lxsession_lxsession_config_set_generic_default (self, "Mouse", "AccThreshold", NULL, "string", "10");
1147 lxsession_lxsession_config_set_generic_default (self, "Mouse", "LeftHanded", NULL, "string", "0");
1148 lxsession_lxsession_config_set_generic_default (self, "Keyboard", "Delay", NULL, "string", "500");
1149 lxsession_lxsession_config_set_generic_default (self, "Keyboard", "Interval", NULL, "string", "30");
1150 lxsession_lxsession_config_set_generic_default (self, "Keyboard", "Beep", NULL, "string", "1");
1151 lxsession_lxsession_config_set_generic_default (self, "State", "guess_default", NULL, "string", "true");
1152 lxsession_lxsession_config_set_generic_default (self, "Dbus", "lxde", NULL, "string", "true");
1153 lxsession_lxsession_config_set_generic_default (self, "Environment", "menu_prefix", NULL, "string", "lxde-");
1154 _tmp3_ = self->priv->_session_name;
1155 if (g_strcmp0 (_tmp3_, "Lubuntu") == 0) {
1156 gchar* _tmp4_ = NULL;
1157 gchar* _tmp5_ = NULL;
1158 gboolean _tmp6_ = FALSE;
1159 lxsession_lxsession_config_set_generic_default (self, "Session", "quit_manager", "command", "string", "lxsession-logout");
1160 lxsession_lxsession_config_set_generic_default (self, "Session", "quit_manager", "image", "string", "/usr/local/share/lubuntu/images/logout-banner.png");
1161 lxsession_lxsession_config_set_generic_default (self, "Session", "quit_manager", "layout", "string", "top");
1162 _tmp4_ = lxsession_lxsession_config_get_item_string (self, "Session", "window_manager", NULL);
1163 _tmp5_ = _tmp4_;
1164 _tmp6_ = g_strcmp0 (_tmp5_, "openbox-lubuntu") == 0;
1165 _g_free0 (_tmp5_);
1166 if (_tmp6_) {
1167 lxsession_lxsession_config_set_generic_default (self, "Session", "windows_manager", "command", "string", "openbox");
1168 lxsession_lxsession_config_set_generic_default (self, "Session", "windows_manager", "session", "string", "Lubuntu");
1169 }
1170 lxsession_lxsession_config_set_generic_default (self, "Session", "workspace_manager", "command", "string", "obconf");
1171 lxsession_lxsession_config_set_generic_default (self, "Session", "audio_manager", "command", "string", "alsamixer");
1172 lxsession_lxsession_config_set_generic_default (self, "Session", "screenshot_manager", "command", "string", "scrot");
1173 lxsession_lxsession_config_set_generic_default (self, "Session", "upgrade_manager", "command", "string", "upgrade-manager");
1174 lxsession_lxsession_config_set_generic_default (self, "Session", "webbrowser", "command", "string", "firefox");
1175 lxsession_lxsession_config_set_generic_default (self, "Session", "email", "command", "string", "sylpheed");
1176 lxsession_lxsession_config_set_generic_default (self, "Session", "pdf_reader", "command", "string", "evince");
1177 lxsession_lxsession_config_set_generic_default (self, "Session", "video_player", "command", "string", "gnome-mplayer");
1178 lxsession_lxsession_config_set_generic_default (self, "Session", "audio_player", "command", "string", "audacious");
1179 lxsession_lxsession_config_set_generic_default (self, "Session", "images_display", "command", "string", "gpicview");
1180 lxsession_lxsession_config_set_generic_default (self, "Session", "text_editor", "command", "string", "leafpad");
1181 lxsession_lxsession_config_set_generic_default (self, "Session", "archive", "command", "string", "file-roller");
1182 lxsession_lxsession_config_set_generic_default (self, "Session", "calculator", "command", "string", "galculator");
1183 lxsession_lxsession_config_set_generic_default (self, "Session", "spreadsheet", "command", "string", "gnumeric");
1184 lxsession_lxsession_config_set_generic_default (self, "Session", "bittorent", "command", "string", "transmission-gtk");
1185 lxsession_lxsession_config_set_generic_default (self, "Session", "document", "command", "string", "abiword");
1186 lxsession_lxsession_config_set_generic_default (self, "Session", "webcam", "command", "string", "gucview");
1187 lxsession_lxsession_config_set_generic_default (self, "Session", "burn", "command", "string", "xfburn");
1188 lxsession_lxsession_config_set_generic_default (self, "Session", "notes", "command", "string", "xpad");
1189 lxsession_lxsession_config_set_generic_default (self, "Session", "disk_utility", "command", "string", "gnome-disks");
1190 lxsession_lxsession_config_set_generic_default (self, "Session", "tasks", "command", "string", "lxtask");
1191 }
1192 _tmp7_ = self->priv->_desktop_env_name;
1193 if (g_strcmp0 (_tmp7_, "LXDE") == 0) {
1194 lxsession_lxsession_config_set_generic_default (self, "Session", "quit_manager", "command", "string", "lxsession-logout");
1195 lxsession_lxsession_config_set_generic_default (self, "Session", "quit_manager", "image", "string", "/usr/local/share/lxde/images/logout-banner.png");
1196 lxsession_lxsession_config_set_generic_default (self, "Session", "quit_manager", "layout", "string", "top");
1197 lxsession_lxsession_config_set_generic_default (self, "Session", "lock_manager", "command", "string", "lxlock");
1198 lxsession_lxsession_config_set_generic_default (self, "Session", "terminal_manager", "command", "string", "lxterminal");
1199 lxsession_lxsession_config_set_generic_default (self, "Session", "launcher_manager", "command", "string", "lxpanelctl");
1200 }
1201 }
1202
1203
lxsession_lxsession_config_set_generic_default(LxsessionLxsessionConfig * self,const gchar * categorie,const gchar * key1,const gchar * key2,const gchar * type,const gchar * default_value)1204 void lxsession_lxsession_config_set_generic_default (LxsessionLxsessionConfig* self, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* default_value) {
1205 const gchar* _tmp0_ = NULL;
1206 const gchar* _tmp1_ = NULL;
1207 GQuark _tmp3_ = 0U;
1208 static GQuark _tmp2_label0 = 0;
1209 g_return_if_fail (self != NULL);
1210 g_return_if_fail (categorie != NULL);
1211 g_return_if_fail (key1 != NULL);
1212 g_return_if_fail (type != NULL);
1213 g_return_if_fail (default_value != NULL);
1214 _tmp0_ = type;
1215 _tmp1_ = _tmp0_;
1216 _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
1217 if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("string")))) {
1218 switch (0) {
1219 default:
1220 {
1221 const gchar* _tmp4_ = NULL;
1222 const gchar* _tmp5_ = NULL;
1223 const gchar* _tmp6_ = NULL;
1224 gchar* _tmp7_ = NULL;
1225 gchar* _tmp8_ = NULL;
1226 gboolean _tmp9_ = FALSE;
1227 _tmp4_ = categorie;
1228 _tmp5_ = key1;
1229 _tmp6_ = key2;
1230 _tmp7_ = lxsession_lxsession_config_get_item_string (self, _tmp4_, _tmp5_, _tmp6_);
1231 _tmp8_ = _tmp7_;
1232 _tmp9_ = _tmp8_ == NULL;
1233 _g_free0 (_tmp8_);
1234 if (_tmp9_) {
1235 const gchar* _tmp10_ = NULL;
1236 const gchar* _tmp11_ = NULL;
1237 const gchar* _tmp12_ = NULL;
1238 const gchar* _tmp13_ = NULL;
1239 const gchar* _tmp14_ = NULL;
1240 const gchar* _tmp15_ = NULL;
1241 const gchar* _tmp16_ = NULL;
1242 const gchar* _tmp17_ = NULL;
1243 const gchar* _tmp18_ = NULL;
1244 _tmp10_ = categorie;
1245 _tmp11_ = key1;
1246 _tmp12_ = key2;
1247 _tmp13_ = default_value;
1248 g_message ("settings.vala:373: Settings default for %s, %s, %s : %s", _tmp10_, _tmp11_, _tmp12_, _tmp13_);
1249 _tmp14_ = categorie;
1250 _tmp15_ = key1;
1251 _tmp16_ = key2;
1252 _tmp17_ = type;
1253 _tmp18_ = default_value;
1254 lxsession_lxsession_config_set_config_item_value (self, _tmp14_, _tmp15_, _tmp16_, _tmp17_, _tmp18_);
1255 }
1256 break;
1257 }
1258 }
1259 }
1260 }
1261
1262
lxsession_lxsession_config_on_update_generic(LxsessionLxsessionConfig * self,const gchar * dbus_arg,const gchar * categorie,const gchar * key1,const gchar * key2)1263 void lxsession_lxsession_config_on_update_generic (LxsessionLxsessionConfig* self, const gchar* dbus_arg, const gchar* categorie, const gchar* key1, const gchar* key2) {
1264 gchar* item_key = NULL;
1265 const gchar* _tmp0_ = NULL;
1266 gchar* _tmp1_ = NULL;
1267 gchar* _tmp2_ = NULL;
1268 const gchar* _tmp3_ = NULL;
1269 gchar* _tmp4_ = NULL;
1270 gchar* _tmp5_ = NULL;
1271 gchar* _tmp6_ = NULL;
1272 gchar* _tmp7_ = NULL;
1273 const gchar* _tmp8_ = NULL;
1274 gchar* _tmp9_ = NULL;
1275 gchar* _tmp10_ = NULL;
1276 gchar* _tmp11_ = NULL;
1277 gchar* _tmp12_ = NULL;
1278 gchar* type = NULL;
1279 gchar* _tmp13_ = NULL;
1280 GHashTable* _tmp14_ = NULL;
1281 const gchar* _tmp15_ = NULL;
1282 gboolean _tmp16_ = FALSE;
1283 g_return_if_fail (self != NULL);
1284 g_return_if_fail (dbus_arg != NULL);
1285 g_return_if_fail (categorie != NULL);
1286 g_return_if_fail (key1 != NULL);
1287 _tmp0_ = categorie;
1288 _tmp1_ = g_strconcat (_tmp0_, ";", NULL);
1289 _tmp2_ = _tmp1_;
1290 _tmp3_ = key1;
1291 _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
1292 _tmp5_ = _tmp4_;
1293 _tmp6_ = g_strconcat (_tmp5_, ";", NULL);
1294 _tmp7_ = _tmp6_;
1295 _tmp8_ = key2;
1296 _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
1297 _tmp10_ = _tmp9_;
1298 _tmp11_ = g_strconcat (_tmp10_, ";", NULL);
1299 _tmp12_ = _tmp11_;
1300 _g_free0 (_tmp10_);
1301 _g_free0 (_tmp7_);
1302 _g_free0 (_tmp5_);
1303 _g_free0 (_tmp2_);
1304 item_key = _tmp12_;
1305 _tmp13_ = g_strdup ("string");
1306 type = _tmp13_;
1307 _tmp14_ = self->config_item_db;
1308 _tmp15_ = item_key;
1309 _tmp16_ = g_hash_table_contains (_tmp14_, _tmp15_);
1310 if (_tmp16_ == TRUE) {
1311 const gchar* _tmp17_ = NULL;
1312 const gchar* _tmp18_ = NULL;
1313 GQuark _tmp20_ = 0U;
1314 static GQuark _tmp19_label0 = 0;
1315 _tmp17_ = type;
1316 _tmp18_ = _tmp17_;
1317 _tmp20_ = (NULL == _tmp18_) ? 0 : g_quark_from_string (_tmp18_);
1318 if (_tmp20_ == ((0 != _tmp19_label0) ? _tmp19_label0 : (_tmp19_label0 = g_quark_from_static_string ("string")))) {
1319 switch (0) {
1320 default:
1321 {
1322 const gchar* _tmp21_ = NULL;
1323 const gchar* _tmp22_ = NULL;
1324 const gchar* _tmp23_ = NULL;
1325 const gchar* _tmp24_ = NULL;
1326 _tmp21_ = dbus_arg;
1327 _tmp22_ = categorie;
1328 _tmp23_ = key1;
1329 _tmp24_ = key2;
1330 lxsession_lxsession_config_on_update_string_set (self, _tmp21_, _tmp22_, _tmp23_, _tmp24_);
1331 break;
1332 }
1333 }
1334 }
1335 }
1336 _g_free0 (type);
1337 _g_free0 (item_key);
1338 }
1339
1340
lxsession_lxsession_config_real_on_update_string_set(LxsessionLxsessionConfig * self,const gchar * dbus_arg,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)1341 static void lxsession_lxsession_config_real_on_update_string_set (LxsessionLxsessionConfig* self, const gchar* dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
1342 g_return_if_fail (dbus_arg != NULL);
1343 g_return_if_fail (kf_categorie != NULL);
1344 g_return_if_fail (kf_key1 != NULL);
1345 }
1346
1347
lxsession_lxsession_config_on_update_string_set(LxsessionLxsessionConfig * self,const gchar * dbus_arg,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)1348 void lxsession_lxsession_config_on_update_string_set (LxsessionLxsessionConfig* self, const gchar* dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
1349 g_return_if_fail (self != NULL);
1350 LXSESSION_LXSESSION_CONFIG_GET_CLASS (self)->on_update_string_set (self, dbus_arg, kf_categorie, kf_key1, kf_key2);
1351 }
1352
1353
lxsession_lxsession_config_real_on_update_string_list_set(LxsessionLxsessionConfig * self,gchar ** dbus_arg,int dbus_arg_length1,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)1354 static void lxsession_lxsession_config_real_on_update_string_list_set (LxsessionLxsessionConfig* self, gchar** dbus_arg, int dbus_arg_length1, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
1355 g_return_if_fail (kf_categorie != NULL);
1356 g_return_if_fail (kf_key1 != NULL);
1357 }
1358
1359
lxsession_lxsession_config_on_update_string_list_set(LxsessionLxsessionConfig * self,gchar ** dbus_arg,int dbus_arg_length1,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)1360 void lxsession_lxsession_config_on_update_string_list_set (LxsessionLxsessionConfig* self, gchar** dbus_arg, int dbus_arg_length1, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
1361 g_return_if_fail (self != NULL);
1362 LXSESSION_LXSESSION_CONFIG_GET_CLASS (self)->on_update_string_list_set (self, dbus_arg, dbus_arg_length1, kf_categorie, kf_key1, kf_key2);
1363 }
1364
1365
lxsession_lxsession_config_real_on_update_int_set(LxsessionLxsessionConfig * self,gint dbus_arg,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)1366 static void lxsession_lxsession_config_real_on_update_int_set (LxsessionLxsessionConfig* self, gint dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
1367 g_return_if_fail (kf_categorie != NULL);
1368 g_return_if_fail (kf_key1 != NULL);
1369 }
1370
1371
lxsession_lxsession_config_on_update_int_set(LxsessionLxsessionConfig * self,gint dbus_arg,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)1372 void lxsession_lxsession_config_on_update_int_set (LxsessionLxsessionConfig* self, gint dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
1373 g_return_if_fail (self != NULL);
1374 LXSESSION_LXSESSION_CONFIG_GET_CLASS (self)->on_update_int_set (self, dbus_arg, kf_categorie, kf_key1, kf_key2);
1375 }
1376
1377
lxsession_lxsession_config_get_session_name(LxsessionLxsessionConfig * self)1378 const gchar* lxsession_lxsession_config_get_session_name (LxsessionLxsessionConfig* self) {
1379 const gchar* result;
1380 const gchar* _tmp0_ = NULL;
1381 g_return_val_if_fail (self != NULL, NULL);
1382 _tmp0_ = self->priv->_session_name;
1383 result = _tmp0_;
1384 return result;
1385 }
1386
1387
lxsession_lxsession_config_set_session_name(LxsessionLxsessionConfig * self,const gchar * value)1388 void lxsession_lxsession_config_set_session_name (LxsessionLxsessionConfig* self, const gchar* value) {
1389 const gchar* _tmp0_ = NULL;
1390 gchar* _tmp1_ = NULL;
1391 g_return_if_fail (self != NULL);
1392 _tmp0_ = value;
1393 _tmp1_ = g_strdup (_tmp0_);
1394 _g_free0 (self->priv->_session_name);
1395 self->priv->_session_name = _tmp1_;
1396 g_object_notify ((GObject *) self, "session-name");
1397 }
1398
1399
lxsession_lxsession_config_get_desktop_env_name(LxsessionLxsessionConfig * self)1400 const gchar* lxsession_lxsession_config_get_desktop_env_name (LxsessionLxsessionConfig* self) {
1401 const gchar* result;
1402 const gchar* _tmp0_ = NULL;
1403 g_return_val_if_fail (self != NULL, NULL);
1404 _tmp0_ = self->priv->_desktop_env_name;
1405 result = _tmp0_;
1406 return result;
1407 }
1408
1409
lxsession_lxsession_config_set_desktop_env_name(LxsessionLxsessionConfig * self,const gchar * value)1410 void lxsession_lxsession_config_set_desktop_env_name (LxsessionLxsessionConfig* self, const gchar* value) {
1411 const gchar* _tmp0_ = NULL;
1412 gchar* _tmp1_ = NULL;
1413 g_return_if_fail (self != NULL);
1414 _tmp0_ = value;
1415 _tmp1_ = g_strdup (_tmp0_);
1416 _g_free0 (self->priv->_desktop_env_name);
1417 self->priv->_desktop_env_name = _tmp1_;
1418 g_object_notify ((GObject *) self, "desktop-env-name");
1419 }
1420
1421
lxsession_lxsession_config_class_init(LxsessionLxsessionConfigClass * klass)1422 static void lxsession_lxsession_config_class_init (LxsessionLxsessionConfigClass * klass) {
1423 lxsession_lxsession_config_parent_class = g_type_class_peek_parent (klass);
1424 g_type_class_add_private (klass, sizeof (LxsessionLxsessionConfigPrivate));
1425 ((LxsessionLxsessionConfigClass *) klass)->on_update_string_set = (void (*)(LxsessionLxsessionConfig*, const gchar*, const gchar*, const gchar*, const gchar*)) lxsession_lxsession_config_real_on_update_string_set;
1426 ((LxsessionLxsessionConfigClass *) klass)->on_update_string_list_set = (void (*)(LxsessionLxsessionConfig*, gchar**, int, const gchar*, const gchar*, const gchar*)) lxsession_lxsession_config_real_on_update_string_list_set;
1427 ((LxsessionLxsessionConfigClass *) klass)->on_update_int_set = (void (*)(LxsessionLxsessionConfig*, gint, const gchar*, const gchar*, const gchar*)) lxsession_lxsession_config_real_on_update_int_set;
1428 G_OBJECT_CLASS (klass)->get_property = _vala_lxsession_lxsession_config_get_property;
1429 G_OBJECT_CLASS (klass)->set_property = _vala_lxsession_lxsession_config_set_property;
1430 G_OBJECT_CLASS (klass)->finalize = lxsession_lxsession_config_finalize;
1431 g_object_class_install_property (G_OBJECT_CLASS (klass), LXSESSION_LXSESSION_CONFIG_SESSION_NAME, g_param_spec_string ("session-name", "session-name", "session-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1432 g_object_class_install_property (G_OBJECT_CLASS (klass), LXSESSION_LXSESSION_CONFIG_DESKTOP_ENV_NAME, g_param_spec_string ("desktop-env-name", "desktop-env-name", "desktop-env-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
1433 }
1434
1435
lxsession_lxsession_config_instance_init(LxsessionLxsessionConfig * self)1436 static void lxsession_lxsession_config_instance_init (LxsessionLxsessionConfig * self) {
1437 gchar* _tmp0_ = NULL;
1438 gchar* _tmp1_ = NULL;
1439 self->priv = LXSESSION_LXSESSION_CONFIG_GET_PRIVATE (self);
1440 _tmp0_ = g_strdup ("LXDE");
1441 self->priv->_session_name = _tmp0_;
1442 _tmp1_ = g_strdup ("LXDE");
1443 self->priv->_desktop_env_name = _tmp1_;
1444 }
1445
1446
lxsession_lxsession_config_finalize(GObject * obj)1447 static void lxsession_lxsession_config_finalize (GObject* obj) {
1448 LxsessionLxsessionConfig * self;
1449 self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfig);
1450 _g_free0 (self->priv->_session_name);
1451 _g_free0 (self->priv->_desktop_env_name);
1452 _g_hash_table_unref0 (self->config_item_db);
1453 _g_hash_table_unref0 (self->session_support_item_db);
1454 _g_hash_table_unref0 (self->xsettings_support_item_db);
1455 _g_hash_table_unref0 (self->state_support_item_db);
1456 _g_hash_table_unref0 (self->dbus_support_item_db);
1457 _g_hash_table_unref0 (self->keymap_support_item_db);
1458 _g_hash_table_unref0 (self->environment_support_item_db);
1459 G_OBJECT_CLASS (lxsession_lxsession_config_parent_class)->finalize (obj);
1460 }
1461
1462
lxsession_lxsession_config_get_type(void)1463 GType lxsession_lxsession_config_get_type (void) {
1464 static volatile gsize lxsession_lxsession_config_type_id__volatile = 0;
1465 if (g_once_init_enter (&lxsession_lxsession_config_type_id__volatile)) {
1466 static const GTypeInfo g_define_type_info = { sizeof (LxsessionLxsessionConfigClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_lxsession_config_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionLxsessionConfig), 0, (GInstanceInitFunc) lxsession_lxsession_config_instance_init, NULL };
1467 GType lxsession_lxsession_config_type_id;
1468 lxsession_lxsession_config_type_id = g_type_register_static (G_TYPE_OBJECT, "LxsessionLxsessionConfig", &g_define_type_info, 0);
1469 g_once_init_leave (&lxsession_lxsession_config_type_id__volatile, lxsession_lxsession_config_type_id);
1470 }
1471 return lxsession_lxsession_config_type_id__volatile;
1472 }
1473
1474
_vala_lxsession_lxsession_config_get_property(GObject * object,guint property_id,GValue * value,GParamSpec * pspec)1475 static void _vala_lxsession_lxsession_config_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
1476 LxsessionLxsessionConfig * self;
1477 self = G_TYPE_CHECK_INSTANCE_CAST (object, LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfig);
1478 switch (property_id) {
1479 case LXSESSION_LXSESSION_CONFIG_SESSION_NAME:
1480 g_value_set_string (value, lxsession_lxsession_config_get_session_name (self));
1481 break;
1482 case LXSESSION_LXSESSION_CONFIG_DESKTOP_ENV_NAME:
1483 g_value_set_string (value, lxsession_lxsession_config_get_desktop_env_name (self));
1484 break;
1485 default:
1486 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
1487 break;
1488 }
1489 }
1490
1491
_vala_lxsession_lxsession_config_set_property(GObject * object,guint property_id,const GValue * value,GParamSpec * pspec)1492 static void _vala_lxsession_lxsession_config_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
1493 LxsessionLxsessionConfig * self;
1494 self = G_TYPE_CHECK_INSTANCE_CAST (object, LXSESSION_TYPE_LXSESSION_CONFIG, LxsessionLxsessionConfig);
1495 switch (property_id) {
1496 case LXSESSION_LXSESSION_CONFIG_SESSION_NAME:
1497 lxsession_lxsession_config_set_session_name (self, g_value_get_string (value));
1498 break;
1499 case LXSESSION_LXSESSION_CONFIG_DESKTOP_ENV_NAME:
1500 lxsession_lxsession_config_set_desktop_env_name (self, g_value_get_string (value));
1501 break;
1502 default:
1503 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
1504 break;
1505 }
1506 }
1507
1508
_lxsession_lxsession_config_key_file_on_reload_settings_daemon_lxsession_lx_signals_reload_settings_daemon(LxsessionLxSignals * _sender,gpointer self)1509 static void _lxsession_lxsession_config_key_file_on_reload_settings_daemon_lxsession_lx_signals_reload_settings_daemon (LxsessionLxSignals* _sender, gpointer self) {
1510 lxsession_lxsession_config_key_file_on_reload_settings_daemon ((LxsessionLxsessionConfigKeyFile*) self);
1511 }
1512
1513
lxsession_lxsession_config_key_file_construct(GType object_type,const gchar * session_arg,const gchar * desktop_env_name_arg)1514 LxsessionLxsessionConfigKeyFile* lxsession_lxsession_config_key_file_construct (GType object_type, const gchar* session_arg, const gchar* desktop_env_name_arg) {
1515 LxsessionLxsessionConfigKeyFile * self = NULL;
1516 LxsessionLxSignals* _tmp0_ = NULL;
1517 const gchar* _tmp1_ = NULL;
1518 const gchar* _tmp2_ = NULL;
1519 gchar* _tmp3_ = NULL;
1520 gchar* _tmp4_ = NULL;
1521 gboolean _tmp5_ = FALSE;
1522 g_return_val_if_fail (session_arg != NULL, NULL);
1523 g_return_val_if_fail (desktop_env_name_arg != NULL, NULL);
1524 self = (LxsessionLxsessionConfigKeyFile*) lxsession_lxsession_config_construct (object_type);
1525 _tmp0_ = lxsession_global_sig;
1526 g_signal_connect_object (_tmp0_, "reload-settings-daemon", (GCallback) _lxsession_lxsession_config_key_file_on_reload_settings_daemon_lxsession_lx_signals_reload_settings_daemon, self, 0);
1527 lxsession_lxsession_config_key_file_init_desktop_files (self);
1528 _tmp1_ = session_arg;
1529 lxsession_lxsession_config_set_session_name ((LxsessionLxsessionConfig*) self, _tmp1_);
1530 _tmp2_ = desktop_env_name_arg;
1531 lxsession_lxsession_config_set_desktop_env_name ((LxsessionLxsessionConfig*) self, _tmp2_);
1532 lxsession_lxsession_config_key_file_read_keyfile (self);
1533 lxsession_lxsession_config_init_signal ((LxsessionLxsessionConfig*) self);
1534 lxsession_lxsession_config_key_file_setup_monitor_desktop_file (self);
1535 _tmp3_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) self, "State", "guess_default", NULL);
1536 _tmp4_ = _tmp3_;
1537 _tmp5_ = g_strcmp0 (_tmp4_, "false") != 0;
1538 _g_free0 (_tmp4_);
1539 if (_tmp5_) {
1540 lxsession_lxsession_config_guess_default ((LxsessionLxsessionConfig*) self);
1541 }
1542 return self;
1543 }
1544
1545
lxsession_lxsession_config_key_file_new(const gchar * session_arg,const gchar * desktop_env_name_arg)1546 LxsessionLxsessionConfigKeyFile* lxsession_lxsession_config_key_file_new (const gchar* session_arg, const gchar* desktop_env_name_arg) {
1547 return lxsession_lxsession_config_key_file_construct (LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, session_arg, desktop_env_name_arg);
1548 }
1549
1550
lxsession_lxsession_config_key_file_init_desktop_files(LxsessionLxsessionConfigKeyFile * self)1551 void lxsession_lxsession_config_key_file_init_desktop_files (LxsessionLxsessionConfigKeyFile* self) {
1552 gchar* _tmp0_ = NULL;
1553 gchar* _tmp1_ = NULL;
1554 gchar* _tmp2_ = NULL;
1555 gchar* _tmp3_ = NULL;
1556 g_return_if_fail (self != NULL);
1557 _tmp0_ = lxsession_get_config_path ("desktop.conf");
1558 _tmp1_ = _tmp0_;
1559 lxsession_lxsession_config_key_file_set_desktop_config_path (self, _tmp1_);
1560 _g_free0 (_tmp1_);
1561 _tmp2_ = lxsession_get_config_home_path ("desktop.conf");
1562 _tmp3_ = _tmp2_;
1563 lxsession_lxsession_config_key_file_set_desktop_config_home_path (self, _tmp3_);
1564 _g_free0 (_tmp3_);
1565 }
1566
1567
_lxsession_lxsession_config_key_file_on_desktop_file_change_g_file_monitor_changed(GFileMonitor * _sender,GFile * file,GFile * other_file,GFileMonitorEvent event_type,gpointer self)1568 static void _lxsession_lxsession_config_key_file_on_desktop_file_change_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self) {
1569 lxsession_lxsession_config_key_file_on_desktop_file_change ((LxsessionLxsessionConfigKeyFile*) self);
1570 }
1571
1572
lxsession_lxsession_config_key_file_setup_monitor_desktop_file(LxsessionLxsessionConfigKeyFile * self)1573 void lxsession_lxsession_config_key_file_setup_monitor_desktop_file (LxsessionLxsessionConfigKeyFile* self) {
1574 GError * _inner_error_ = NULL;
1575 g_return_if_fail (self != NULL);
1576 {
1577 const gchar* _tmp0_ = NULL;
1578 GFile* _tmp1_ = NULL;
1579 GFileMonitor* _tmp2_ = NULL;
1580 GFile* _tmp3_ = NULL;
1581 GCancellable* _tmp4_ = NULL;
1582 GFileMonitor* _tmp5_ = NULL;
1583 GFileMonitor* _tmp6_ = NULL;
1584 GFileMonitor* _tmp7_ = NULL;
1585 const gchar* _tmp8_ = NULL;
1586 GFile* _tmp9_ = NULL;
1587 gchar* _tmp10_ = NULL;
1588 gchar* _tmp11_ = NULL;
1589 const gchar* _tmp12_ = NULL;
1590 gboolean _tmp13_ = FALSE;
1591 _tmp0_ = self->priv->_desktop_config_path;
1592 _tmp1_ = g_file_new_for_path (_tmp0_);
1593 _g_object_unref0 (self->desktop_file);
1594 self->desktop_file = _tmp1_;
1595 _tmp3_ = self->desktop_file;
1596 _tmp4_ = self->monitor_cancel;
1597 _tmp5_ = g_file_monitor_file (_tmp3_, G_FILE_MONITOR_NONE, _tmp4_, &_inner_error_);
1598 _tmp2_ = _tmp5_;
1599 if (G_UNLIKELY (_inner_error_ != NULL)) {
1600 goto __catch30_g_error;
1601 }
1602 _tmp6_ = _tmp2_;
1603 _tmp2_ = NULL;
1604 _g_object_unref0 (self->monitor_desktop_file);
1605 self->monitor_desktop_file = _tmp6_;
1606 _tmp7_ = self->monitor_desktop_file;
1607 g_signal_connect_object (_tmp7_, "changed", (GCallback) _lxsession_lxsession_config_key_file_on_desktop_file_change_g_file_monitor_changed, self, 0);
1608 _tmp8_ = self->priv->_desktop_config_path;
1609 g_message ("settings.vala:462: Monitoring: %s", _tmp8_);
1610 _tmp9_ = self->desktop_file;
1611 _tmp10_ = g_file_get_path (_tmp9_);
1612 _tmp11_ = _tmp10_;
1613 _tmp12_ = self->priv->_desktop_config_home_path;
1614 _tmp13_ = g_strcmp0 (_tmp11_, _tmp12_) == 0;
1615 _g_free0 (_tmp11_);
1616 if (_tmp13_) {
1617 g_message ("settings.vala:466: Desktop file is already in config home, do nothing");
1618 } else {
1619 g_message ("settings.vala:470: Desktop file is not in config home, monitoring crea" \
1620 "tion of it");
1621 lxsession_lxsession_config_key_file_setup_creation_desktop_file (self);
1622 }
1623 _g_object_unref0 (_tmp2_);
1624 }
1625 goto __finally30;
1626 __catch30_g_error:
1627 {
1628 GError* err = NULL;
1629 GError* _tmp14_ = NULL;
1630 const gchar* _tmp15_ = NULL;
1631 err = _inner_error_;
1632 _inner_error_ = NULL;
1633 _tmp14_ = err;
1634 _tmp15_ = _tmp14_->message;
1635 g_message ("settings.vala:475: %s", _tmp15_);
1636 _g_error_free0 (err);
1637 }
1638 __finally30:
1639 if (G_UNLIKELY (_inner_error_ != NULL)) {
1640 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);
1641 g_clear_error (&_inner_error_);
1642 return;
1643 }
1644 }
1645
1646
_lxsession_lxsession_config_key_file_on_desktop_file_creation_g_file_monitor_changed(GFileMonitor * _sender,GFile * file,GFile * other_file,GFileMonitorEvent event_type,gpointer self)1647 static void _lxsession_lxsession_config_key_file_on_desktop_file_creation_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self) {
1648 lxsession_lxsession_config_key_file_on_desktop_file_creation ((LxsessionLxsessionConfigKeyFile*) self);
1649 }
1650
1651
lxsession_lxsession_config_key_file_setup_creation_desktop_file(LxsessionLxsessionConfigKeyFile * self)1652 void lxsession_lxsession_config_key_file_setup_creation_desktop_file (LxsessionLxsessionConfigKeyFile* self) {
1653 GError * _inner_error_ = NULL;
1654 g_return_if_fail (self != NULL);
1655 {
1656 const gchar* _tmp0_ = NULL;
1657 GFile* _tmp1_ = NULL;
1658 GFileMonitor* _tmp2_ = NULL;
1659 GFile* _tmp3_ = NULL;
1660 GFileMonitor* _tmp4_ = NULL;
1661 GFileMonitor* _tmp5_ = NULL;
1662 GFileMonitor* _tmp6_ = NULL;
1663 GFile* _tmp7_ = NULL;
1664 gchar* _tmp8_ = NULL;
1665 gchar* _tmp9_ = NULL;
1666 _tmp0_ = self->priv->_desktop_config_home_path;
1667 _tmp1_ = g_file_new_for_path (_tmp0_);
1668 _g_object_unref0 (self->home_desktop_file);
1669 self->home_desktop_file = _tmp1_;
1670 _tmp3_ = self->home_desktop_file;
1671 _tmp4_ = g_file_monitor_file (_tmp3_, G_FILE_MONITOR_NONE, NULL, &_inner_error_);
1672 _tmp2_ = _tmp4_;
1673 if (G_UNLIKELY (_inner_error_ != NULL)) {
1674 goto __catch31_g_error;
1675 }
1676 _tmp5_ = _tmp2_;
1677 _tmp2_ = NULL;
1678 _g_object_unref0 (self->monitor_home_desktop_file);
1679 self->monitor_home_desktop_file = _tmp5_;
1680 _tmp6_ = self->monitor_home_desktop_file;
1681 g_signal_connect_object (_tmp6_, "changed", (GCallback) _lxsession_lxsession_config_key_file_on_desktop_file_creation_g_file_monitor_changed, self, 0);
1682 _tmp7_ = self->home_desktop_file;
1683 _tmp8_ = g_file_get_path (_tmp7_);
1684 _tmp9_ = _tmp8_;
1685 g_message ("settings.vala:485: Monitoring home path: %s", _tmp9_);
1686 _g_free0 (_tmp9_);
1687 _g_object_unref0 (_tmp2_);
1688 }
1689 goto __finally31;
1690 __catch31_g_error:
1691 {
1692 GError* err = NULL;
1693 GError* _tmp10_ = NULL;
1694 const gchar* _tmp11_ = NULL;
1695 err = _inner_error_;
1696 _inner_error_ = NULL;
1697 _tmp10_ = err;
1698 _tmp11_ = _tmp10_->message;
1699 g_message ("settings.vala:487: %s", _tmp11_);
1700 _g_error_free0 (err);
1701 }
1702 __finally31:
1703 if (G_UNLIKELY (_inner_error_ != NULL)) {
1704 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);
1705 g_clear_error (&_inner_error_);
1706 return;
1707 }
1708 }
1709
1710
_g_object_ref0(gpointer self)1711 static gpointer _g_object_ref0 (gpointer self) {
1712 return self ? g_object_ref (self) : NULL;
1713 }
1714
1715
lxsession_lxsession_config_key_file_reload_xsettings(LxsessionLxsessionConfigKeyFile * self)1716 void lxsession_lxsession_config_key_file_reload_xsettings (LxsessionLxsessionConfigKeyFile* self) {
1717 LxsessionXSettingsOption* _tmp0_ = NULL;
1718 g_return_if_fail (self != NULL);
1719 _tmp0_ = lxsession_global_xsettings_manager;
1720 if (_tmp0_ == NULL) {
1721 LxsessionXSettingsOption* xsettings = NULL;
1722 LxsessionXSettingsOption* _tmp1_ = NULL;
1723 LxsessionXSettingsOption* _tmp2_ = NULL;
1724 LxsessionXSettingsOption* _tmp3_ = NULL;
1725 LxsessionXSettingsOption* _tmp4_ = NULL;
1726 _tmp1_ = lxsession_xsettings_option_new ();
1727 xsettings = _tmp1_;
1728 _tmp2_ = xsettings;
1729 _tmp3_ = _g_object_ref0 (_tmp2_);
1730 _g_object_unref0 (lxsession_global_xsettings_manager);
1731 lxsession_global_xsettings_manager = _tmp3_;
1732 _tmp4_ = lxsession_global_xsettings_manager;
1733 lxsession_xsettings_option_activate (_tmp4_);
1734 g_message ("settings.vala:498: Create a xsettings option");
1735 _g_object_unref0 (xsettings);
1736 } else {
1737 LxsessionXSettingsOption* _tmp5_ = NULL;
1738 _tmp5_ = lxsession_global_xsettings_manager;
1739 lxsession_xsettings_option_reload (_tmp5_);
1740 g_message ("settings.vala:503: Reload the xsettings option");
1741 }
1742 }
1743
1744
lxsession_lxsession_config_key_file_on_desktop_file_change(LxsessionLxsessionConfigKeyFile * self)1745 void lxsession_lxsession_config_key_file_on_desktop_file_change (LxsessionLxsessionConfigKeyFile* self) {
1746 g_return_if_fail (self != NULL);
1747 g_message ("settings.vala:509: Desktop file change, reloading XSettings daemon");
1748 lxsession_lxsession_config_key_file_reload_xsettings (self);
1749 }
1750
1751
lxsession_lxsession_config_key_file_on_desktop_file_creation(LxsessionLxsessionConfigKeyFile * self)1752 void lxsession_lxsession_config_key_file_on_desktop_file_creation (LxsessionLxsessionConfigKeyFile* self) {
1753 const gchar* _tmp0_ = NULL;
1754 GCancellable* _tmp1_ = NULL;
1755 g_return_if_fail (self != NULL);
1756 g_message ("settings.vala:515: Desktop file created in home directory, switch conf" \
1757 "iguration to it");
1758 _tmp0_ = self->priv->_desktop_config_home_path;
1759 lxsession_lxsession_config_key_file_set_desktop_config_path (self, _tmp0_);
1760 _tmp1_ = self->monitor_cancel;
1761 g_cancellable_cancel (_tmp1_);
1762 lxsession_lxsession_config_key_file_reload_xsettings (self);
1763 lxsession_lxsession_config_key_file_setup_monitor_desktop_file (self);
1764 }
1765
1766
lxsession_lxsession_config_key_file_read_keyfile_string_value(LxsessionLxsessionConfigKeyFile * self,GKeyFile * keyfile,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2,const gchar * default_value)1767 gchar* lxsession_lxsession_config_key_file_read_keyfile_string_value (LxsessionLxsessionConfigKeyFile* self, GKeyFile* keyfile, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2, const gchar* default_value) {
1768 gchar* result = NULL;
1769 gchar* copy_value = NULL;
1770 gchar* return_value = NULL;
1771 const gchar* _tmp21_ = NULL;
1772 GError * _inner_error_ = NULL;
1773 g_return_val_if_fail (self != NULL, NULL);
1774 g_return_val_if_fail (keyfile != NULL, NULL);
1775 g_return_val_if_fail (kf_categorie != NULL, NULL);
1776 g_return_val_if_fail (kf_key1 != NULL, NULL);
1777 copy_value = NULL;
1778 return_value = NULL;
1779 {
1780 const gchar* _tmp0_ = NULL;
1781 _tmp0_ = kf_key2;
1782 if (_tmp0_ == NULL) {
1783 gchar* _tmp1_ = NULL;
1784 GKeyFile* _tmp2_ = NULL;
1785 const gchar* _tmp3_ = NULL;
1786 const gchar* _tmp4_ = NULL;
1787 gchar* _tmp5_ = NULL;
1788 gchar* _tmp6_ = NULL;
1789 _tmp2_ = keyfile;
1790 _tmp3_ = kf_categorie;
1791 _tmp4_ = kf_key1;
1792 _tmp5_ = g_key_file_get_value (_tmp2_, _tmp3_, _tmp4_, &_inner_error_);
1793 _tmp1_ = _tmp5_;
1794 if (G_UNLIKELY (_inner_error_ != NULL)) {
1795 if (_inner_error_->domain == G_KEY_FILE_ERROR) {
1796 goto __catch32_g_key_file_error;
1797 }
1798 _g_free0 (return_value);
1799 _g_free0 (copy_value);
1800 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1801 g_clear_error (&_inner_error_);
1802 return NULL;
1803 }
1804 _tmp6_ = _tmp1_;
1805 _tmp1_ = NULL;
1806 _g_free0 (copy_value);
1807 copy_value = _tmp6_;
1808 _g_free0 (_tmp1_);
1809 } else {
1810 gchar* _tmp7_ = NULL;
1811 GKeyFile* _tmp8_ = NULL;
1812 const gchar* _tmp9_ = NULL;
1813 const gchar* _tmp10_ = NULL;
1814 gchar* _tmp11_ = NULL;
1815 gchar* _tmp12_ = NULL;
1816 const gchar* _tmp13_ = NULL;
1817 gchar* _tmp14_ = NULL;
1818 gchar* _tmp15_ = NULL;
1819 gchar* _tmp16_ = NULL;
1820 gchar* _tmp17_ = NULL;
1821 gchar* _tmp18_ = NULL;
1822 _tmp8_ = keyfile;
1823 _tmp9_ = kf_categorie;
1824 _tmp10_ = kf_key1;
1825 _tmp11_ = g_strconcat (_tmp10_, "/", NULL);
1826 _tmp12_ = _tmp11_;
1827 _tmp13_ = kf_key2;
1828 _tmp14_ = g_strconcat (_tmp12_, _tmp13_, NULL);
1829 _tmp15_ = _tmp14_;
1830 _tmp16_ = g_key_file_get_value (_tmp8_, _tmp9_, _tmp15_, &_inner_error_);
1831 _tmp17_ = _tmp16_;
1832 _g_free0 (_tmp15_);
1833 _g_free0 (_tmp12_);
1834 _tmp7_ = _tmp17_;
1835 if (G_UNLIKELY (_inner_error_ != NULL)) {
1836 if (_inner_error_->domain == G_KEY_FILE_ERROR) {
1837 goto __catch32_g_key_file_error;
1838 }
1839 _g_free0 (return_value);
1840 _g_free0 (copy_value);
1841 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1842 g_clear_error (&_inner_error_);
1843 return NULL;
1844 }
1845 _tmp18_ = _tmp7_;
1846 _tmp7_ = NULL;
1847 _g_free0 (copy_value);
1848 copy_value = _tmp18_;
1849 _g_free0 (_tmp7_);
1850 }
1851 }
1852 goto __finally32;
1853 __catch32_g_key_file_error:
1854 {
1855 GError* err = NULL;
1856 GError* _tmp19_ = NULL;
1857 const gchar* _tmp20_ = NULL;
1858 err = _inner_error_;
1859 _inner_error_ = NULL;
1860 _tmp19_ = err;
1861 _tmp20_ = _tmp19_->message;
1862 g_message ("settings.vala:540: %s", _tmp20_);
1863 _g_error_free0 (err);
1864 }
1865 __finally32:
1866 if (G_UNLIKELY (_inner_error_ != NULL)) {
1867 _g_free0 (return_value);
1868 _g_free0 (copy_value);
1869 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);
1870 g_clear_error (&_inner_error_);
1871 return NULL;
1872 }
1873 _tmp21_ = copy_value;
1874 if (_tmp21_ == NULL) {
1875 const gchar* _tmp22_ = NULL;
1876 gchar* _tmp23_ = NULL;
1877 _tmp22_ = default_value;
1878 _tmp23_ = g_strdup (_tmp22_);
1879 _g_free0 (return_value);
1880 return_value = _tmp23_;
1881 } else {
1882 const gchar* _tmp24_ = NULL;
1883 const gchar* _tmp25_ = NULL;
1884 _tmp24_ = default_value;
1885 _tmp25_ = copy_value;
1886 if (g_strcmp0 (_tmp24_, _tmp25_) != 0) {
1887 const gchar* _tmp26_ = NULL;
1888 gchar* _tmp27_ = NULL;
1889 _tmp26_ = copy_value;
1890 _tmp27_ = g_strdup (_tmp26_);
1891 _g_free0 (return_value);
1892 return_value = _tmp27_;
1893 } else {
1894 const gchar* _tmp28_ = NULL;
1895 gchar* _tmp29_ = NULL;
1896 _tmp28_ = default_value;
1897 _tmp29_ = g_strdup (_tmp28_);
1898 _g_free0 (return_value);
1899 return_value = _tmp29_;
1900 }
1901 }
1902 result = return_value;
1903 _g_free0 (copy_value);
1904 return result;
1905 }
1906
1907
lxsession_lxsession_config_key_file_read_keyfile_int_value(LxsessionLxsessionConfigKeyFile * self,GKeyFile * keyfile,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2,gint default_value)1908 gint lxsession_lxsession_config_key_file_read_keyfile_int_value (LxsessionLxsessionConfigKeyFile* self, GKeyFile* keyfile, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2, gint default_value) {
1909 gint result = 0;
1910 gint return_value = 0;
1911 gint _tmp22_ = 0;
1912 GError * _inner_error_ = NULL;
1913 g_return_val_if_fail (self != NULL, 0);
1914 g_return_val_if_fail (keyfile != NULL, 0);
1915 g_return_val_if_fail (kf_categorie != NULL, 0);
1916 g_return_val_if_fail (kf_key1 != NULL, 0);
1917 return_value = 0;
1918 {
1919 const gchar* _tmp0_ = NULL;
1920 _tmp0_ = kf_key2;
1921 if (_tmp0_ == NULL) {
1922 gint _tmp1_ = 0;
1923 GKeyFile* _tmp2_ = NULL;
1924 const gchar* _tmp3_ = NULL;
1925 const gchar* _tmp4_ = NULL;
1926 gint _tmp5_ = 0;
1927 _tmp2_ = keyfile;
1928 _tmp3_ = kf_categorie;
1929 _tmp4_ = kf_key1;
1930 _tmp5_ = g_key_file_get_integer (_tmp2_, _tmp3_, _tmp4_, &_inner_error_);
1931 _tmp1_ = _tmp5_;
1932 if (G_UNLIKELY (_inner_error_ != NULL)) {
1933 gint _tmp6_ = 0;
1934 if (_inner_error_->domain == G_KEY_FILE_ERROR) {
1935 goto __catch33_g_key_file_error;
1936 }
1937 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1938 g_clear_error (&_inner_error_);
1939 return _tmp6_;
1940 }
1941 return_value = _tmp1_;
1942 } else {
1943 gint _tmp7_ = 0;
1944 GKeyFile* _tmp8_ = NULL;
1945 const gchar* _tmp9_ = NULL;
1946 const gchar* _tmp10_ = NULL;
1947 gchar* _tmp11_ = NULL;
1948 gchar* _tmp12_ = NULL;
1949 const gchar* _tmp13_ = NULL;
1950 gchar* _tmp14_ = NULL;
1951 gchar* _tmp15_ = NULL;
1952 gint _tmp16_ = 0;
1953 gint _tmp17_ = 0;
1954 _tmp8_ = keyfile;
1955 _tmp9_ = kf_categorie;
1956 _tmp10_ = kf_key1;
1957 _tmp11_ = g_strconcat (_tmp10_, "/", NULL);
1958 _tmp12_ = _tmp11_;
1959 _tmp13_ = kf_key2;
1960 _tmp14_ = g_strconcat (_tmp12_, _tmp13_, NULL);
1961 _tmp15_ = _tmp14_;
1962 _tmp16_ = g_key_file_get_integer (_tmp8_, _tmp9_, _tmp15_, &_inner_error_);
1963 _tmp17_ = _tmp16_;
1964 _g_free0 (_tmp15_);
1965 _g_free0 (_tmp12_);
1966 _tmp7_ = _tmp17_;
1967 if (G_UNLIKELY (_inner_error_ != NULL)) {
1968 gint _tmp18_ = 0;
1969 if (_inner_error_->domain == G_KEY_FILE_ERROR) {
1970 goto __catch33_g_key_file_error;
1971 }
1972 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1973 g_clear_error (&_inner_error_);
1974 return _tmp18_;
1975 }
1976 return_value = _tmp7_;
1977 }
1978 }
1979 goto __finally33;
1980 __catch33_g_key_file_error:
1981 {
1982 GError* err = NULL;
1983 GError* _tmp19_ = NULL;
1984 const gchar* _tmp20_ = NULL;
1985 err = _inner_error_;
1986 _inner_error_ = NULL;
1987 _tmp19_ = err;
1988 _tmp20_ = _tmp19_->message;
1989 g_message ("settings.vala:579: %s", _tmp20_);
1990 _g_error_free0 (err);
1991 }
1992 __finally33:
1993 if (G_UNLIKELY (_inner_error_ != NULL)) {
1994 gint _tmp21_ = 0;
1995 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);
1996 g_clear_error (&_inner_error_);
1997 return _tmp21_;
1998 }
1999 _tmp22_ = return_value;
2000 if (_tmp22_ == 0) {
2001 gint _tmp23_ = 0;
2002 _tmp23_ = default_value;
2003 return_value = _tmp23_;
2004 } else {
2005 gint _tmp24_ = 0;
2006 gint _tmp25_ = 0;
2007 _tmp24_ = return_value;
2008 _tmp25_ = default_value;
2009 if (_tmp24_ == _tmp25_) {
2010 gint _tmp26_ = 0;
2011 _tmp26_ = default_value;
2012 return_value = _tmp26_;
2013 }
2014 }
2015 result = return_value;
2016 return result;
2017 }
2018
2019
_vala_array_dup6(gchar ** self,int length)2020 static gchar** _vala_array_dup6 (gchar** self, int length) {
2021 gchar** result;
2022 int i;
2023 result = g_new0 (gchar*, length + 1);
2024 for (i = 0; i < length; i++) {
2025 gchar* _tmp0_ = NULL;
2026 _tmp0_ = g_strdup (self[i]);
2027 result[i] = _tmp0_;
2028 }
2029 return result;
2030 }
2031
2032
_vala_array_dup7(gchar ** self,int length)2033 static gchar** _vala_array_dup7 (gchar** self, int length) {
2034 gchar** result;
2035 int i;
2036 result = g_new0 (gchar*, length + 1);
2037 for (i = 0; i < length; i++) {
2038 gchar* _tmp0_ = NULL;
2039 _tmp0_ = g_strdup (self[i]);
2040 result[i] = _tmp0_;
2041 }
2042 return result;
2043 }
2044
2045
_vala_array_dup8(gchar ** self,int length)2046 static gchar** _vala_array_dup8 (gchar** self, int length) {
2047 gchar** result;
2048 int i;
2049 result = g_new0 (gchar*, length + 1);
2050 for (i = 0; i < length; i++) {
2051 gchar* _tmp0_ = NULL;
2052 _tmp0_ = g_strdup (self[i]);
2053 result[i] = _tmp0_;
2054 }
2055 return result;
2056 }
2057
2058
lxsession_lxsession_config_key_file_read_keyfile_string_list_value(LxsessionLxsessionConfigKeyFile * self,GKeyFile * keyfile,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2,gchar ** default_value,int default_value_length1,int * result_length1)2059 gchar** lxsession_lxsession_config_key_file_read_keyfile_string_list_value (LxsessionLxsessionConfigKeyFile* self, GKeyFile* keyfile, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2, gchar** default_value, int default_value_length1, int* result_length1) {
2060 gchar** result = NULL;
2061 gchar** copy_value = NULL;
2062 gint copy_value_length1 = 0;
2063 gint _copy_value_size_ = 0;
2064 gchar** return_value = NULL;
2065 gint return_value_length1 = 0;
2066 gint _return_value_size_ = 0;
2067 gchar** _tmp23_ = NULL;
2068 gint _tmp23__length1 = 0;
2069 gchar** _tmp32_ = NULL;
2070 gint _tmp32__length1 = 0;
2071 GError * _inner_error_ = NULL;
2072 g_return_val_if_fail (self != NULL, NULL);
2073 g_return_val_if_fail (keyfile != NULL, NULL);
2074 g_return_val_if_fail (kf_categorie != NULL, NULL);
2075 g_return_val_if_fail (kf_key1 != NULL, NULL);
2076 copy_value = NULL;
2077 copy_value_length1 = 0;
2078 _copy_value_size_ = copy_value_length1;
2079 return_value = NULL;
2080 return_value_length1 = 0;
2081 _return_value_size_ = return_value_length1;
2082 {
2083 const gchar* _tmp0_ = NULL;
2084 _tmp0_ = kf_key2;
2085 if (_tmp0_ == NULL) {
2086 gchar** _tmp1_ = NULL;
2087 GKeyFile* _tmp2_ = NULL;
2088 const gchar* _tmp3_ = NULL;
2089 const gchar* _tmp4_ = NULL;
2090 gsize _tmp5_;
2091 gchar** _tmp6_ = NULL;
2092 gint _tmp1__length1 = 0;
2093 gint __tmp1__size_ = 0;
2094 gchar** _tmp7_ = NULL;
2095 gint _tmp7__length1 = 0;
2096 _tmp2_ = keyfile;
2097 _tmp3_ = kf_categorie;
2098 _tmp4_ = kf_key1;
2099 _tmp6_ = g_key_file_get_string_list (_tmp2_, _tmp3_, _tmp4_, &_tmp5_, &_inner_error_);
2100 _tmp1_ = _tmp6_;
2101 _tmp1__length1 = _tmp5_;
2102 __tmp1__size_ = _tmp1__length1;
2103 if (G_UNLIKELY (_inner_error_ != NULL)) {
2104 if (_inner_error_->domain == G_KEY_FILE_ERROR) {
2105 goto __catch34_g_key_file_error;
2106 }
2107 return_value = (_vala_array_free (return_value, return_value_length1, (GDestroyNotify) g_free), NULL);
2108 copy_value = (_vala_array_free (copy_value, copy_value_length1, (GDestroyNotify) g_free), NULL);
2109 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
2110 g_clear_error (&_inner_error_);
2111 return NULL;
2112 }
2113 _tmp7_ = _tmp1_;
2114 _tmp7__length1 = _tmp1__length1;
2115 _tmp1_ = NULL;
2116 _tmp1__length1 = 0;
2117 copy_value = (_vala_array_free (copy_value, copy_value_length1, (GDestroyNotify) g_free), NULL);
2118 copy_value = _tmp7_;
2119 copy_value_length1 = _tmp7__length1;
2120 _copy_value_size_ = copy_value_length1;
2121 _tmp1_ = (_vala_array_free (_tmp1_, _tmp1__length1, (GDestroyNotify) g_free), NULL);
2122 } else {
2123 gchar** _tmp8_ = NULL;
2124 GKeyFile* _tmp9_ = NULL;
2125 const gchar* _tmp10_ = NULL;
2126 const gchar* _tmp11_ = NULL;
2127 gchar* _tmp12_ = NULL;
2128 gchar* _tmp13_ = NULL;
2129 const gchar* _tmp14_ = NULL;
2130 gchar* _tmp15_ = NULL;
2131 gchar* _tmp16_ = NULL;
2132 gsize _tmp17_;
2133 gchar** _tmp18_ = NULL;
2134 gchar** _tmp19_ = NULL;
2135 gint _tmp19__length1 = 0;
2136 gint _tmp8__length1 = 0;
2137 gint __tmp8__size_ = 0;
2138 gchar** _tmp20_ = NULL;
2139 gint _tmp20__length1 = 0;
2140 _tmp9_ = keyfile;
2141 _tmp10_ = kf_categorie;
2142 _tmp11_ = kf_key1;
2143 _tmp12_ = g_strconcat (_tmp11_, "/", NULL);
2144 _tmp13_ = _tmp12_;
2145 _tmp14_ = kf_key2;
2146 _tmp15_ = g_strconcat (_tmp13_, _tmp14_, NULL);
2147 _tmp16_ = _tmp15_;
2148 _tmp18_ = g_key_file_get_string_list (_tmp9_, _tmp10_, _tmp16_, &_tmp17_, &_inner_error_);
2149 _tmp19_ = _tmp18_;
2150 _tmp19__length1 = _tmp17_;
2151 _g_free0 (_tmp16_);
2152 _g_free0 (_tmp13_);
2153 _tmp8_ = _tmp19_;
2154 _tmp8__length1 = _tmp19__length1;
2155 __tmp8__size_ = _tmp8__length1;
2156 if (G_UNLIKELY (_inner_error_ != NULL)) {
2157 if (_inner_error_->domain == G_KEY_FILE_ERROR) {
2158 goto __catch34_g_key_file_error;
2159 }
2160 return_value = (_vala_array_free (return_value, return_value_length1, (GDestroyNotify) g_free), NULL);
2161 copy_value = (_vala_array_free (copy_value, copy_value_length1, (GDestroyNotify) g_free), NULL);
2162 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
2163 g_clear_error (&_inner_error_);
2164 return NULL;
2165 }
2166 _tmp20_ = _tmp8_;
2167 _tmp20__length1 = _tmp8__length1;
2168 _tmp8_ = NULL;
2169 _tmp8__length1 = 0;
2170 copy_value = (_vala_array_free (copy_value, copy_value_length1, (GDestroyNotify) g_free), NULL);
2171 copy_value = _tmp20_;
2172 copy_value_length1 = _tmp20__length1;
2173 _copy_value_size_ = copy_value_length1;
2174 _tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_free), NULL);
2175 }
2176 }
2177 goto __finally34;
2178 __catch34_g_key_file_error:
2179 {
2180 GError* err = NULL;
2181 GError* _tmp21_ = NULL;
2182 const gchar* _tmp22_ = NULL;
2183 err = _inner_error_;
2184 _inner_error_ = NULL;
2185 _tmp21_ = err;
2186 _tmp22_ = _tmp21_->message;
2187 g_message ("settings.vala:613: %s", _tmp22_);
2188 _g_error_free0 (err);
2189 }
2190 __finally34:
2191 if (G_UNLIKELY (_inner_error_ != NULL)) {
2192 return_value = (_vala_array_free (return_value, return_value_length1, (GDestroyNotify) g_free), NULL);
2193 copy_value = (_vala_array_free (copy_value, copy_value_length1, (GDestroyNotify) g_free), NULL);
2194 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);
2195 g_clear_error (&_inner_error_);
2196 return NULL;
2197 }
2198 _tmp23_ = copy_value;
2199 _tmp23__length1 = copy_value_length1;
2200 if (_tmp23_ == NULL) {
2201 gchar** _tmp24_ = NULL;
2202 gint _tmp24__length1 = 0;
2203 gchar** _tmp25_ = NULL;
2204 gint _tmp25__length1 = 0;
2205 _tmp24_ = default_value;
2206 _tmp24__length1 = default_value_length1;
2207 _tmp25_ = (_tmp24_ != NULL) ? _vala_array_dup6 (_tmp24_, _tmp24__length1) : ((gpointer) _tmp24_);
2208 _tmp25__length1 = _tmp24__length1;
2209 return_value = (_vala_array_free (return_value, return_value_length1, (GDestroyNotify) g_free), NULL);
2210 return_value = _tmp25_;
2211 return_value_length1 = _tmp25__length1;
2212 _return_value_size_ = return_value_length1;
2213 } else {
2214 gchar** _tmp26_ = NULL;
2215 gint _tmp26__length1 = 0;
2216 gchar** _tmp27_ = NULL;
2217 gint _tmp27__length1 = 0;
2218 _tmp26_ = default_value;
2219 _tmp26__length1 = default_value_length1;
2220 _tmp27_ = copy_value;
2221 _tmp27__length1 = copy_value_length1;
2222 if (_tmp26_ != _tmp27_) {
2223 gchar** _tmp28_ = NULL;
2224 gint _tmp28__length1 = 0;
2225 gchar** _tmp29_ = NULL;
2226 gint _tmp29__length1 = 0;
2227 _tmp28_ = copy_value;
2228 _tmp28__length1 = copy_value_length1;
2229 _tmp29_ = (_tmp28_ != NULL) ? _vala_array_dup7 (_tmp28_, _tmp28__length1) : ((gpointer) _tmp28_);
2230 _tmp29__length1 = _tmp28__length1;
2231 return_value = (_vala_array_free (return_value, return_value_length1, (GDestroyNotify) g_free), NULL);
2232 return_value = _tmp29_;
2233 return_value_length1 = _tmp29__length1;
2234 _return_value_size_ = return_value_length1;
2235 } else {
2236 gchar** _tmp30_ = NULL;
2237 gint _tmp30__length1 = 0;
2238 gchar** _tmp31_ = NULL;
2239 gint _tmp31__length1 = 0;
2240 _tmp30_ = default_value;
2241 _tmp30__length1 = default_value_length1;
2242 _tmp31_ = (_tmp30_ != NULL) ? _vala_array_dup8 (_tmp30_, _tmp30__length1) : ((gpointer) _tmp30_);
2243 _tmp31__length1 = _tmp30__length1;
2244 return_value = (_vala_array_free (return_value, return_value_length1, (GDestroyNotify) g_free), NULL);
2245 return_value = _tmp31_;
2246 return_value_length1 = _tmp31__length1;
2247 _return_value_size_ = return_value_length1;
2248 }
2249 }
2250 _tmp32_ = return_value;
2251 _tmp32__length1 = return_value_length1;
2252 if (result_length1) {
2253 *result_length1 = _tmp32__length1;
2254 }
2255 result = _tmp32_;
2256 copy_value = (_vala_array_free (copy_value, copy_value_length1, (GDestroyNotify) g_free), NULL);
2257 return result;
2258 }
2259
2260
lxsession_lxsession_config_key_file_read_key_value(LxsessionLxsessionConfigKeyFile * self,GKeyFile * kf,const gchar * categorie,const gchar * key1,const gchar * key2,const gchar * type)2261 void lxsession_lxsession_config_key_file_read_key_value (LxsessionLxsessionConfigKeyFile* self, GKeyFile* kf, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type) {
2262 gchar* default_variable = NULL;
2263 gchar* final_variable = NULL;
2264 gchar* type_output = NULL;
2265 gchar* item_key = NULL;
2266 const gchar* _tmp0_ = NULL;
2267 gchar* _tmp1_ = NULL;
2268 gchar* _tmp2_ = NULL;
2269 const gchar* _tmp3_ = NULL;
2270 gchar* _tmp4_ = NULL;
2271 gchar* _tmp5_ = NULL;
2272 gchar* _tmp6_ = NULL;
2273 gchar* _tmp7_ = NULL;
2274 const gchar* _tmp8_ = NULL;
2275 gchar* _tmp9_ = NULL;
2276 gchar* _tmp10_ = NULL;
2277 gchar* _tmp11_ = NULL;
2278 gchar* _tmp12_ = NULL;
2279 const gchar* _tmp13_ = NULL;
2280 const gchar* _tmp14_ = NULL;
2281 GQuark _tmp16_ = 0U;
2282 static GQuark _tmp15_label0 = 0;
2283 GHashTable* _tmp23_ = NULL;
2284 gboolean _tmp24_ = FALSE;
2285 g_return_if_fail (self != NULL);
2286 g_return_if_fail (kf != NULL);
2287 g_return_if_fail (categorie != NULL);
2288 g_return_if_fail (key1 != NULL);
2289 g_return_if_fail (type != NULL);
2290 default_variable = NULL;
2291 final_variable = NULL;
2292 type_output = NULL;
2293 _tmp0_ = categorie;
2294 _tmp1_ = g_strconcat (_tmp0_, ";", NULL);
2295 _tmp2_ = _tmp1_;
2296 _tmp3_ = key1;
2297 _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
2298 _tmp5_ = _tmp4_;
2299 _tmp6_ = g_strconcat (_tmp5_, ";", NULL);
2300 _tmp7_ = _tmp6_;
2301 _tmp8_ = key2;
2302 _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
2303 _tmp10_ = _tmp9_;
2304 _tmp11_ = g_strconcat (_tmp10_, ";", NULL);
2305 _tmp12_ = _tmp11_;
2306 _g_free0 (_tmp10_);
2307 _g_free0 (_tmp7_);
2308 _g_free0 (_tmp5_);
2309 _g_free0 (_tmp2_);
2310 item_key = _tmp12_;
2311 _tmp13_ = type;
2312 _tmp14_ = _tmp13_;
2313 _tmp16_ = (NULL == _tmp14_) ? 0 : g_quark_from_string (_tmp14_);
2314 if (_tmp16_ == ((0 != _tmp15_label0) ? _tmp15_label0 : (_tmp15_label0 = g_quark_from_static_string ("string")))) {
2315 switch (0) {
2316 default:
2317 {
2318 GKeyFile* _tmp17_ = NULL;
2319 const gchar* _tmp18_ = NULL;
2320 const gchar* _tmp19_ = NULL;
2321 const gchar* _tmp20_ = NULL;
2322 const gchar* _tmp21_ = NULL;
2323 gchar* _tmp22_ = NULL;
2324 _tmp17_ = kf;
2325 _tmp18_ = categorie;
2326 _tmp19_ = key1;
2327 _tmp20_ = key2;
2328 _tmp21_ = default_variable;
2329 _tmp22_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp17_, _tmp18_, _tmp19_, _tmp20_, _tmp21_);
2330 _g_free0 (final_variable);
2331 final_variable = _tmp22_;
2332 break;
2333 }
2334 }
2335 }
2336 _tmp23_ = ((LxsessionLxsessionConfig*) self)->config_item_db;
2337 _tmp24_ = g_hash_table_contains (_tmp23_, item_key);
2338 if (_tmp24_ == FALSE) {
2339 const gchar* _tmp25_ = NULL;
2340 const gchar* _tmp26_ = NULL;
2341 const gchar* _tmp27_ = NULL;
2342 const gchar* _tmp28_ = NULL;
2343 const gchar* _tmp29_ = NULL;
2344 _tmp25_ = categorie;
2345 _tmp26_ = key1;
2346 _tmp27_ = key2;
2347 _tmp28_ = type;
2348 _tmp29_ = final_variable;
2349 lxsession_lxsession_config_create_config_item ((LxsessionLxsessionConfig*) self, _tmp25_, _tmp26_, _tmp27_, _tmp28_, _tmp29_);
2350 } else {
2351 const gchar* _tmp30_ = NULL;
2352 const gchar* _tmp31_ = NULL;
2353 const gchar* _tmp32_ = NULL;
2354 gchar* _tmp33_ = NULL;
2355 gchar* _tmp34_ = NULL;
2356 const gchar* _tmp35_ = NULL;
2357 const gchar* _tmp36_ = NULL;
2358 const gchar* _tmp37_ = NULL;
2359 const gchar* _tmp38_ = NULL;
2360 const gchar* _tmp39_ = NULL;
2361 _tmp30_ = categorie;
2362 _tmp31_ = key1;
2363 _tmp32_ = key2;
2364 lxsession_lxsession_config_get_item ((LxsessionLxsessionConfig*) self, _tmp30_, _tmp31_, _tmp32_, &_tmp33_, &_tmp34_);
2365 _g_free0 (default_variable);
2366 default_variable = _tmp33_;
2367 _g_free0 (type_output);
2368 type_output = _tmp34_;
2369 _tmp35_ = categorie;
2370 _tmp36_ = key1;
2371 _tmp37_ = key2;
2372 _tmp38_ = type;
2373 _tmp39_ = final_variable;
2374 lxsession_lxsession_config_set_config_item_value_on_starting ((LxsessionLxsessionConfig*) self, _tmp35_, _tmp36_, _tmp37_, _tmp38_, _tmp39_);
2375 }
2376 _g_free0 (item_key);
2377 _g_free0 (type_output);
2378 _g_free0 (final_variable);
2379 _g_free0 (default_variable);
2380 }
2381
2382
lxsession_lxsession_config_key_file_read_keyfile(LxsessionLxsessionConfigKeyFile * self)2383 void lxsession_lxsession_config_key_file_read_keyfile (LxsessionLxsessionConfigKeyFile* self) {
2384 const gchar* _tmp0_ = NULL;
2385 GKeyFile* _tmp1_ = NULL;
2386 GKeyFile* _tmp2_ = NULL;
2387 gchar* _tmp3_ = NULL;
2388 gchar* _tmp4_ = NULL;
2389 gboolean _tmp5_ = FALSE;
2390 GKeyFile* _tmp6_ = NULL;
2391 gchar* _tmp7_ = NULL;
2392 gchar* _tmp8_ = NULL;
2393 gboolean _tmp9_ = FALSE;
2394 GKeyFile* _tmp14_ = NULL;
2395 gchar* _tmp15_ = NULL;
2396 gchar* _tmp16_ = NULL;
2397 gboolean _tmp17_ = FALSE;
2398 GKeyFile* _tmp20_ = NULL;
2399 gchar* _tmp21_ = NULL;
2400 gchar* _tmp22_ = NULL;
2401 gboolean _tmp23_ = FALSE;
2402 GKeyFile* _tmp26_ = NULL;
2403 gchar* _tmp27_ = NULL;
2404 gchar* _tmp28_ = NULL;
2405 gboolean _tmp29_ = FALSE;
2406 GKeyFile* _tmp33_ = NULL;
2407 gchar* _tmp34_ = NULL;
2408 gchar* _tmp35_ = NULL;
2409 gboolean _tmp36_ = FALSE;
2410 GKeyFile* _tmp39_ = NULL;
2411 gchar* _tmp40_ = NULL;
2412 gchar* _tmp41_ = NULL;
2413 gboolean _tmp42_ = FALSE;
2414 GKeyFile* _tmp45_ = NULL;
2415 gchar* _tmp46_ = NULL;
2416 gchar* _tmp47_ = NULL;
2417 gboolean _tmp48_ = FALSE;
2418 GKeyFile* _tmp51_ = NULL;
2419 gchar* _tmp52_ = NULL;
2420 gchar* _tmp53_ = NULL;
2421 gboolean _tmp54_ = FALSE;
2422 GKeyFile* _tmp57_ = NULL;
2423 gchar* _tmp58_ = NULL;
2424 gchar* _tmp59_ = NULL;
2425 gboolean _tmp60_ = FALSE;
2426 GKeyFile* _tmp63_ = NULL;
2427 gchar* _tmp64_ = NULL;
2428 gchar* _tmp65_ = NULL;
2429 gboolean _tmp66_ = FALSE;
2430 GKeyFile* _tmp69_ = NULL;
2431 gchar* _tmp70_ = NULL;
2432 gchar* _tmp71_ = NULL;
2433 gboolean _tmp72_ = FALSE;
2434 GKeyFile* _tmp75_ = NULL;
2435 gchar* _tmp76_ = NULL;
2436 gchar* _tmp77_ = NULL;
2437 gboolean _tmp78_ = FALSE;
2438 GKeyFile* _tmp81_ = NULL;
2439 gchar* _tmp82_ = NULL;
2440 gchar* _tmp83_ = NULL;
2441 gboolean _tmp84_ = FALSE;
2442 GKeyFile* _tmp87_ = NULL;
2443 GKeyFile* _tmp88_ = NULL;
2444 GKeyFile* _tmp89_ = NULL;
2445 GKeyFile* _tmp90_ = NULL;
2446 GKeyFile* _tmp91_ = NULL;
2447 GKeyFile* _tmp92_ = NULL;
2448 gchar* _tmp93_ = NULL;
2449 gchar* _tmp94_ = NULL;
2450 gboolean _tmp95_ = FALSE;
2451 GKeyFile* _tmp99_ = NULL;
2452 GKeyFile* _tmp100_ = NULL;
2453 GKeyFile* _tmp101_ = NULL;
2454 GKeyFile* _tmp102_ = NULL;
2455 GKeyFile* _tmp103_ = NULL;
2456 GKeyFile* _tmp104_ = NULL;
2457 GKeyFile* _tmp105_ = NULL;
2458 GKeyFile* _tmp106_ = NULL;
2459 GKeyFile* _tmp107_ = NULL;
2460 GKeyFile* _tmp108_ = NULL;
2461 GKeyFile* _tmp109_ = NULL;
2462 GKeyFile* _tmp110_ = NULL;
2463 GKeyFile* _tmp111_ = NULL;
2464 GKeyFile* _tmp112_ = NULL;
2465 GKeyFile* _tmp113_ = NULL;
2466 GKeyFile* _tmp114_ = NULL;
2467 GKeyFile* _tmp115_ = NULL;
2468 GKeyFile* _tmp116_ = NULL;
2469 GKeyFile* _tmp117_ = NULL;
2470 GKeyFile* _tmp118_ = NULL;
2471 GKeyFile* _tmp119_ = NULL;
2472 GKeyFile* _tmp120_ = NULL;
2473 GKeyFile* _tmp121_ = NULL;
2474 GKeyFile* _tmp122_ = NULL;
2475 GKeyFile* _tmp123_ = NULL;
2476 GKeyFile* _tmp124_ = NULL;
2477 GKeyFile* _tmp125_ = NULL;
2478 GKeyFile* _tmp126_ = NULL;
2479 GKeyFile* _tmp127_ = NULL;
2480 GKeyFile* _tmp128_ = NULL;
2481 GKeyFile* _tmp129_ = NULL;
2482 GKeyFile* _tmp130_ = NULL;
2483 GKeyFile* _tmp131_ = NULL;
2484 GKeyFile* _tmp132_ = NULL;
2485 GKeyFile* _tmp133_ = NULL;
2486 GKeyFile* _tmp134_ = NULL;
2487 GKeyFile* _tmp135_ = NULL;
2488 GKeyFile* _tmp136_ = NULL;
2489 GKeyFile* _tmp137_ = NULL;
2490 GKeyFile* _tmp138_ = NULL;
2491 gchar* _tmp139_ = NULL;
2492 gchar* _tmp140_ = NULL;
2493 gboolean _tmp141_ = FALSE;
2494 GKeyFile* _tmp147_ = NULL;
2495 GKeyFile* _tmp148_ = NULL;
2496 GKeyFile* _tmp149_ = NULL;
2497 GKeyFile* _tmp150_ = NULL;
2498 GKeyFile* _tmp151_ = NULL;
2499 GKeyFile* _tmp152_ = NULL;
2500 GKeyFile* _tmp153_ = NULL;
2501 GKeyFile* _tmp154_ = NULL;
2502 GKeyFile* _tmp155_ = NULL;
2503 GKeyFile* _tmp156_ = NULL;
2504 GKeyFile* _tmp157_ = NULL;
2505 GKeyFile* _tmp158_ = NULL;
2506 GKeyFile* _tmp159_ = NULL;
2507 GKeyFile* _tmp160_ = NULL;
2508 GKeyFile* _tmp161_ = NULL;
2509 GKeyFile* _tmp162_ = NULL;
2510 GKeyFile* _tmp163_ = NULL;
2511 GKeyFile* _tmp164_ = NULL;
2512 GKeyFile* _tmp165_ = NULL;
2513 GKeyFile* _tmp166_ = NULL;
2514 GKeyFile* _tmp167_ = NULL;
2515 GKeyFile* _tmp168_ = NULL;
2516 GKeyFile* _tmp169_ = NULL;
2517 GKeyFile* _tmp170_ = NULL;
2518 GKeyFile* _tmp171_ = NULL;
2519 GKeyFile* _tmp172_ = NULL;
2520 GKeyFile* _tmp173_ = NULL;
2521 GKeyFile* _tmp174_ = NULL;
2522 GKeyFile* _tmp175_ = NULL;
2523 GKeyFile* _tmp176_ = NULL;
2524 GKeyFile* _tmp177_ = NULL;
2525 GKeyFile* _tmp178_ = NULL;
2526 GKeyFile* _tmp179_ = NULL;
2527 g_return_if_fail (self != NULL);
2528 _tmp0_ = self->priv->_desktop_config_path;
2529 _tmp1_ = lxsession_load_keyfile (_tmp0_);
2530 _g_key_file_unref0 (self->kf);
2531 self->kf = _tmp1_;
2532 _tmp2_ = self->kf;
2533 _tmp3_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp2_, "GTK", "iGtk", "ColorScheme", NULL);
2534 _tmp4_ = _tmp3_;
2535 _tmp5_ = _tmp4_ != NULL;
2536 _g_free0 (_tmp4_);
2537 if (_tmp5_) {
2538 lxsession_lxsession_config_delete_config_item ((LxsessionLxsessionConfig*) self, "GTK", "iGtk", "ColorScheme", "string");
2539 }
2540 _tmp6_ = self->kf;
2541 _tmp7_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp6_, "Session", "windows_manager", "command", NULL);
2542 _tmp8_ = _tmp7_;
2543 _tmp9_ = _tmp8_ != NULL;
2544 _g_free0 (_tmp8_);
2545 if (_tmp9_) {
2546 GKeyFile* _tmp10_ = NULL;
2547 GKeyFile* _tmp11_ = NULL;
2548 GKeyFile* _tmp12_ = NULL;
2549 _tmp10_ = self->kf;
2550 lxsession_lxsession_config_key_file_read_key_value (self, _tmp10_, "Session", "windows_manager", "command", "string");
2551 _tmp11_ = self->kf;
2552 lxsession_lxsession_config_key_file_read_key_value (self, _tmp11_, "Session", "windows_manager", "session", "string");
2553 _tmp12_ = self->kf;
2554 lxsession_lxsession_config_key_file_read_key_value (self, _tmp12_, "Session", "windows_manager", "extras", "string");
2555 } else {
2556 GKeyFile* _tmp13_ = NULL;
2557 _tmp13_ = self->kf;
2558 lxsession_lxsession_config_key_file_read_key_value (self, _tmp13_, "Session", "window_manager", NULL, "string");
2559 }
2560 _tmp14_ = self->kf;
2561 _tmp15_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp14_, "Session", "panel", "command", NULL);
2562 _tmp16_ = _tmp15_;
2563 _tmp17_ = _tmp16_ != NULL;
2564 _g_free0 (_tmp16_);
2565 if (_tmp17_) {
2566 GKeyFile* _tmp18_ = NULL;
2567 GKeyFile* _tmp19_ = NULL;
2568 _tmp18_ = self->kf;
2569 lxsession_lxsession_config_key_file_read_key_value (self, _tmp18_, "Session", "panel", "command", "string");
2570 _tmp19_ = self->kf;
2571 lxsession_lxsession_config_key_file_read_key_value (self, _tmp19_, "Session", "panel", "session", "string");
2572 }
2573 _tmp20_ = self->kf;
2574 _tmp21_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp20_, "Session", "dock", "command", NULL);
2575 _tmp22_ = _tmp21_;
2576 _tmp23_ = _tmp22_ != NULL;
2577 _g_free0 (_tmp22_);
2578 if (_tmp23_) {
2579 GKeyFile* _tmp24_ = NULL;
2580 GKeyFile* _tmp25_ = NULL;
2581 _tmp24_ = self->kf;
2582 lxsession_lxsession_config_key_file_read_key_value (self, _tmp24_, "Session", "dock", "command", "string");
2583 _tmp25_ = self->kf;
2584 lxsession_lxsession_config_key_file_read_key_value (self, _tmp25_, "Session", "dock", "session", "string");
2585 }
2586 _tmp26_ = self->kf;
2587 _tmp27_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp26_, "Session", "file_manager", "command", NULL);
2588 _tmp28_ = _tmp27_;
2589 _tmp29_ = _tmp28_ != NULL;
2590 _g_free0 (_tmp28_);
2591 if (_tmp29_) {
2592 GKeyFile* _tmp30_ = NULL;
2593 GKeyFile* _tmp31_ = NULL;
2594 GKeyFile* _tmp32_ = NULL;
2595 _tmp30_ = self->kf;
2596 lxsession_lxsession_config_key_file_read_key_value (self, _tmp30_, "Session", "file_manager", "command", "string");
2597 _tmp31_ = self->kf;
2598 lxsession_lxsession_config_key_file_read_key_value (self, _tmp31_, "Session", "file_manager", "session", "string");
2599 _tmp32_ = self->kf;
2600 lxsession_lxsession_config_key_file_read_key_value (self, _tmp32_, "Session", "file_manager", "extras", "string");
2601 }
2602 _tmp33_ = self->kf;
2603 _tmp34_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp33_, "Session", "desktop_manager", "command", NULL);
2604 _tmp35_ = _tmp34_;
2605 _tmp36_ = _tmp35_ != NULL;
2606 _g_free0 (_tmp35_);
2607 if (_tmp36_) {
2608 GKeyFile* _tmp37_ = NULL;
2609 GKeyFile* _tmp38_ = NULL;
2610 _tmp37_ = self->kf;
2611 lxsession_lxsession_config_key_file_read_key_value (self, _tmp37_, "Session", "desktop_manager", "command", "string");
2612 _tmp38_ = self->kf;
2613 lxsession_lxsession_config_key_file_read_key_value (self, _tmp38_, "Session", "desktop_manager", "wallpaper", "string");
2614 }
2615 _tmp39_ = self->kf;
2616 _tmp40_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp39_, "Session", "launcher_manager", "command", NULL);
2617 _tmp41_ = _tmp40_;
2618 _tmp42_ = _tmp41_ != NULL;
2619 _g_free0 (_tmp41_);
2620 if (_tmp42_) {
2621 GKeyFile* _tmp43_ = NULL;
2622 GKeyFile* _tmp44_ = NULL;
2623 _tmp43_ = self->kf;
2624 lxsession_lxsession_config_key_file_read_key_value (self, _tmp43_, "Session", "launcher_manager", "command", "string");
2625 _tmp44_ = self->kf;
2626 lxsession_lxsession_config_key_file_read_key_value (self, _tmp44_, "Session", "launcher_manager", "autostart", "string");
2627 }
2628 _tmp45_ = self->kf;
2629 _tmp46_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp45_, "Session", "composite_manager", "command", NULL);
2630 _tmp47_ = _tmp46_;
2631 _tmp48_ = _tmp47_ != NULL;
2632 _g_free0 (_tmp47_);
2633 if (_tmp48_) {
2634 GKeyFile* _tmp49_ = NULL;
2635 GKeyFile* _tmp50_ = NULL;
2636 _tmp49_ = self->kf;
2637 lxsession_lxsession_config_key_file_read_key_value (self, _tmp49_, "Session", "composite_manager", "command", "string");
2638 _tmp50_ = self->kf;
2639 lxsession_lxsession_config_key_file_read_key_value (self, _tmp50_, "Session", "composite_manager", "autostart", "string");
2640 }
2641 _tmp51_ = self->kf;
2642 _tmp52_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp51_, "Session", "im1", "command", NULL);
2643 _tmp53_ = _tmp52_;
2644 _tmp54_ = _tmp53_ != NULL;
2645 _g_free0 (_tmp53_);
2646 if (_tmp54_) {
2647 GKeyFile* _tmp55_ = NULL;
2648 GKeyFile* _tmp56_ = NULL;
2649 _tmp55_ = self->kf;
2650 lxsession_lxsession_config_key_file_read_key_value (self, _tmp55_, "Session", "im1", "command", "string");
2651 _tmp56_ = self->kf;
2652 lxsession_lxsession_config_key_file_read_key_value (self, _tmp56_, "Session", "im1", "autostart", "string");
2653 }
2654 _tmp57_ = self->kf;
2655 _tmp58_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp57_, "Session", "im2", "command", NULL);
2656 _tmp59_ = _tmp58_;
2657 _tmp60_ = _tmp59_ != NULL;
2658 _g_free0 (_tmp59_);
2659 if (_tmp60_) {
2660 GKeyFile* _tmp61_ = NULL;
2661 GKeyFile* _tmp62_ = NULL;
2662 _tmp61_ = self->kf;
2663 lxsession_lxsession_config_key_file_read_key_value (self, _tmp61_, "Session", "im2", "command", "string");
2664 _tmp62_ = self->kf;
2665 lxsession_lxsession_config_key_file_read_key_value (self, _tmp62_, "Session", "im2", "autostart", "string");
2666 }
2667 _tmp63_ = self->kf;
2668 _tmp64_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp63_, "Session", "widget1", "command", NULL);
2669 _tmp65_ = _tmp64_;
2670 _tmp66_ = _tmp65_ != NULL;
2671 _g_free0 (_tmp65_);
2672 if (_tmp66_) {
2673 GKeyFile* _tmp67_ = NULL;
2674 GKeyFile* _tmp68_ = NULL;
2675 _tmp67_ = self->kf;
2676 lxsession_lxsession_config_key_file_read_key_value (self, _tmp67_, "Session", "widget1", "command", "string");
2677 _tmp68_ = self->kf;
2678 lxsession_lxsession_config_key_file_read_key_value (self, _tmp68_, "Session", "widget1", "autostart", "string");
2679 }
2680 _tmp69_ = self->kf;
2681 _tmp70_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp69_, "Session", "notification", "command", NULL);
2682 _tmp71_ = _tmp70_;
2683 _tmp72_ = _tmp71_ != NULL;
2684 _g_free0 (_tmp71_);
2685 if (_tmp72_) {
2686 GKeyFile* _tmp73_ = NULL;
2687 GKeyFile* _tmp74_ = NULL;
2688 _tmp73_ = self->kf;
2689 lxsession_lxsession_config_key_file_read_key_value (self, _tmp73_, "Session", "notification", "command", "string");
2690 _tmp74_ = self->kf;
2691 lxsession_lxsession_config_key_file_read_key_value (self, _tmp74_, "Session", "notification", "autostart", "string");
2692 }
2693 _tmp75_ = self->kf;
2694 _tmp76_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp75_, "Session", "keybindings", "command", NULL);
2695 _tmp77_ = _tmp76_;
2696 _tmp78_ = _tmp77_ != NULL;
2697 _g_free0 (_tmp77_);
2698 if (_tmp78_) {
2699 GKeyFile* _tmp79_ = NULL;
2700 GKeyFile* _tmp80_ = NULL;
2701 _tmp79_ = self->kf;
2702 lxsession_lxsession_config_key_file_read_key_value (self, _tmp79_, "Session", "keybindings", "command", "string");
2703 _tmp80_ = self->kf;
2704 lxsession_lxsession_config_key_file_read_key_value (self, _tmp80_, "Session", "keybindings", "autostart", "string");
2705 }
2706 _tmp81_ = self->kf;
2707 _tmp82_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp81_, "Session", "im_manager", "command", NULL);
2708 _tmp83_ = _tmp82_;
2709 _tmp84_ = _tmp83_ != NULL;
2710 _g_free0 (_tmp83_);
2711 if (_tmp84_) {
2712 GKeyFile* _tmp85_ = NULL;
2713 GKeyFile* _tmp86_ = NULL;
2714 _tmp85_ = self->kf;
2715 lxsession_lxsession_config_key_file_read_key_value (self, _tmp85_, "Session", "im_manager", "command", "string");
2716 _tmp86_ = self->kf;
2717 lxsession_lxsession_config_key_file_read_key_value (self, _tmp86_, "Session", "im_manager", "autostart", "string");
2718 }
2719 _tmp87_ = self->kf;
2720 lxsession_lxsession_config_key_file_read_key_value (self, _tmp87_, "Session", "screensaver", "command", "string");
2721 _tmp88_ = self->kf;
2722 lxsession_lxsession_config_key_file_read_key_value (self, _tmp88_, "Session", "power_manager", "command", "string");
2723 _tmp89_ = self->kf;
2724 lxsession_lxsession_config_key_file_read_key_value (self, _tmp89_, "Session", "polkit", "command", "string");
2725 _tmp90_ = self->kf;
2726 lxsession_lxsession_config_key_file_read_key_value (self, _tmp90_, "Session", "audio_manager", "command", "string");
2727 _tmp91_ = self->kf;
2728 lxsession_lxsession_config_key_file_read_key_value (self, _tmp91_, "Session", "quit_manager", "command", "string");
2729 _tmp92_ = self->kf;
2730 _tmp93_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp92_, "Session", "quit_manager", "command", NULL);
2731 _tmp94_ = _tmp93_;
2732 _tmp95_ = _tmp94_ != NULL;
2733 _g_free0 (_tmp94_);
2734 if (_tmp95_) {
2735 GKeyFile* _tmp96_ = NULL;
2736 GKeyFile* _tmp97_ = NULL;
2737 GKeyFile* _tmp98_ = NULL;
2738 _tmp96_ = self->kf;
2739 lxsession_lxsession_config_key_file_read_key_value (self, _tmp96_, "Session", "quit_manager", "command", "string");
2740 _tmp97_ = self->kf;
2741 lxsession_lxsession_config_key_file_read_key_value (self, _tmp97_, "Session", "quit_manager", "image", "string");
2742 _tmp98_ = self->kf;
2743 lxsession_lxsession_config_key_file_read_key_value (self, _tmp98_, "Session", "quit_manager", "layout", "string");
2744 }
2745 _tmp99_ = self->kf;
2746 lxsession_lxsession_config_key_file_read_key_value (self, _tmp99_, "Session", "workspace_manager", "command", "string");
2747 _tmp100_ = self->kf;
2748 lxsession_lxsession_config_key_file_read_key_value (self, _tmp100_, "Session", "terminal_manager", "command", "string");
2749 _tmp101_ = self->kf;
2750 lxsession_lxsession_config_key_file_read_key_value (self, _tmp101_, "Session", "screenshot_manager", "command", "string");
2751 _tmp102_ = self->kf;
2752 lxsession_lxsession_config_key_file_read_key_value (self, _tmp102_, "Session", "lock_manager", "command", "string");
2753 _tmp103_ = self->kf;
2754 lxsession_lxsession_config_key_file_read_key_value (self, _tmp103_, "Session", "message_manager", "command", "string");
2755 _tmp104_ = self->kf;
2756 lxsession_lxsession_config_key_file_read_key_value (self, _tmp104_, "Session", "upgrade_manager", "command", "string");
2757 _tmp105_ = self->kf;
2758 lxsession_lxsession_config_key_file_read_key_value (self, _tmp105_, "Session", "updates_manager", "command", "string");
2759 _tmp106_ = self->kf;
2760 lxsession_lxsession_config_key_file_read_key_value (self, _tmp106_, "Session", "updates_manager", "timeout", "string");
2761 _tmp107_ = self->kf;
2762 lxsession_lxsession_config_key_file_read_key_value (self, _tmp107_, "Session", "crash_manager", "command", "string");
2763 _tmp108_ = self->kf;
2764 lxsession_lxsession_config_key_file_read_key_value (self, _tmp108_, "Session", "crash_manager", "dev_mode", "string");
2765 _tmp109_ = self->kf;
2766 lxsession_lxsession_config_key_file_read_key_value (self, _tmp109_, "Session", "crash_manager", "timeout", "string");
2767 _tmp110_ = self->kf;
2768 lxsession_lxsession_config_key_file_read_key_value (self, _tmp110_, "Session", "clipboard", "command", "string");
2769 _tmp111_ = self->kf;
2770 lxsession_lxsession_config_key_file_read_key_value (self, _tmp111_, "Session", "disable_autostart", NULL, "string");
2771 _tmp112_ = self->kf;
2772 lxsession_lxsession_config_key_file_read_key_value (self, _tmp112_, "Session", "upstart_user_session", NULL, "string");
2773 _tmp113_ = self->kf;
2774 lxsession_lxsession_config_key_file_read_key_value (self, _tmp113_, "Session", "xsettings_manager", "command", "string");
2775 _tmp114_ = self->kf;
2776 lxsession_lxsession_config_key_file_read_key_value (self, _tmp114_, "Session", "proxy_manager", "command", "string");
2777 _tmp115_ = self->kf;
2778 lxsession_lxsession_config_key_file_read_key_value (self, _tmp115_, "Session", "proxy_manager", "http", "string");
2779 _tmp116_ = self->kf;
2780 lxsession_lxsession_config_key_file_read_key_value (self, _tmp116_, "Session", "a11y", "command", "string");
2781 _tmp117_ = self->kf;
2782 lxsession_lxsession_config_key_file_read_key_value (self, _tmp117_, "Session", "keyring", "command", "string");
2783 _tmp118_ = self->kf;
2784 lxsession_lxsession_config_key_file_read_key_value (self, _tmp118_, "Session", "xrandr", "command", "string");
2785 _tmp119_ = self->kf;
2786 lxsession_lxsession_config_key_file_read_key_value (self, _tmp119_, "Session", "network_gui", "command", "string");
2787 _tmp120_ = self->kf;
2788 lxsession_lxsession_config_key_file_read_key_value (self, _tmp120_, "Session", "webbrowser", "command", "string");
2789 _tmp121_ = self->kf;
2790 lxsession_lxsession_config_key_file_read_key_value (self, _tmp121_, "Session", "email", "command", "string");
2791 _tmp122_ = self->kf;
2792 lxsession_lxsession_config_key_file_read_key_value (self, _tmp122_, "Session", "pdf_reader", "command", "string");
2793 _tmp123_ = self->kf;
2794 lxsession_lxsession_config_key_file_read_key_value (self, _tmp123_, "Session", "video_player", "command", "string");
2795 _tmp124_ = self->kf;
2796 lxsession_lxsession_config_key_file_read_key_value (self, _tmp124_, "Session", "audio_player", "command", "string");
2797 _tmp125_ = self->kf;
2798 lxsession_lxsession_config_key_file_read_key_value (self, _tmp125_, "Session", "images_display", "command", "string");
2799 _tmp126_ = self->kf;
2800 lxsession_lxsession_config_key_file_read_key_value (self, _tmp126_, "Session", "text_editor", "command", "string");
2801 _tmp127_ = self->kf;
2802 lxsession_lxsession_config_key_file_read_key_value (self, _tmp127_, "Session", "archive", "command", "string");
2803 _tmp128_ = self->kf;
2804 lxsession_lxsession_config_key_file_read_key_value (self, _tmp128_, "Session", "charmap", "command", "string");
2805 _tmp129_ = self->kf;
2806 lxsession_lxsession_config_key_file_read_key_value (self, _tmp129_, "Session", "calculator", "command", "string");
2807 _tmp130_ = self->kf;
2808 lxsession_lxsession_config_key_file_read_key_value (self, _tmp130_, "Session", "spreadsheet", "command", "string");
2809 _tmp131_ = self->kf;
2810 lxsession_lxsession_config_key_file_read_key_value (self, _tmp131_, "Session", "bittorent", "command", "string");
2811 _tmp132_ = self->kf;
2812 lxsession_lxsession_config_key_file_read_key_value (self, _tmp132_, "Session", "document", "command", "string");
2813 _tmp133_ = self->kf;
2814 lxsession_lxsession_config_key_file_read_key_value (self, _tmp133_, "Session", "webcam", "command", "string");
2815 _tmp134_ = self->kf;
2816 lxsession_lxsession_config_key_file_read_key_value (self, _tmp134_, "Session", "burn", "command", "string");
2817 _tmp135_ = self->kf;
2818 lxsession_lxsession_config_key_file_read_key_value (self, _tmp135_, "Session", "notes", "command", "string");
2819 _tmp136_ = self->kf;
2820 lxsession_lxsession_config_key_file_read_key_value (self, _tmp136_, "Session", "disk_utility", "command", "string");
2821 _tmp137_ = self->kf;
2822 lxsession_lxsession_config_key_file_read_key_value (self, _tmp137_, "Session", "tasks", "command", "string");
2823 _tmp138_ = self->kf;
2824 _tmp139_ = lxsession_lxsession_config_key_file_read_keyfile_string_value (self, _tmp138_, "Keymap", "mode", NULL, NULL);
2825 _tmp140_ = _tmp139_;
2826 _tmp141_ = _tmp140_ != NULL;
2827 _g_free0 (_tmp140_);
2828 if (_tmp141_) {
2829 GKeyFile* _tmp142_ = NULL;
2830 GKeyFile* _tmp143_ = NULL;
2831 GKeyFile* _tmp144_ = NULL;
2832 GKeyFile* _tmp145_ = NULL;
2833 GKeyFile* _tmp146_ = NULL;
2834 _tmp142_ = self->kf;
2835 lxsession_lxsession_config_key_file_read_key_value (self, _tmp142_, "Keymap", "mode", NULL, "string");
2836 _tmp143_ = self->kf;
2837 lxsession_lxsession_config_key_file_read_key_value (self, _tmp143_, "Keymap", "model", NULL, "string");
2838 _tmp144_ = self->kf;
2839 lxsession_lxsession_config_key_file_read_key_value (self, _tmp144_, "Keymap", "layout", NULL, "string");
2840 _tmp145_ = self->kf;
2841 lxsession_lxsession_config_key_file_read_key_value (self, _tmp145_, "Keymap", "variant", NULL, "string");
2842 _tmp146_ = self->kf;
2843 lxsession_lxsession_config_key_file_read_key_value (self, _tmp146_, "Keymap", "options", NULL, "string");
2844 }
2845 _tmp147_ = self->kf;
2846 lxsession_lxsession_config_key_file_read_key_value (self, _tmp147_, "State", "laptop_mode", NULL, "string");
2847 _tmp148_ = self->kf;
2848 lxsession_lxsession_config_key_file_read_key_value (self, _tmp148_, "State", "guess_default", NULL, "string");
2849 _tmp149_ = self->kf;
2850 lxsession_lxsession_config_key_file_read_key_value (self, _tmp149_, "Dbus", "lxde", NULL, "string");
2851 _tmp150_ = self->kf;
2852 lxsession_lxsession_config_key_file_read_key_value (self, _tmp150_, "Dbus", "gnome", NULL, "string");
2853 _tmp151_ = self->kf;
2854 lxsession_lxsession_config_key_file_read_key_value (self, _tmp151_, "Environment", "type", NULL, "string");
2855 _tmp152_ = self->kf;
2856 lxsession_lxsession_config_key_file_read_key_value (self, _tmp152_, "Environment", "menu_prefix", NULL, "string");
2857 _tmp153_ = self->kf;
2858 lxsession_lxsession_config_key_file_read_key_value (self, _tmp153_, "Environment", "ubuntu_menuproxy", NULL, "string");
2859 _tmp154_ = self->kf;
2860 lxsession_lxsession_config_key_file_read_key_value (self, _tmp154_, "Environment", "toolkit_integration", NULL, "string");
2861 _tmp155_ = self->kf;
2862 lxsession_lxsession_config_key_file_read_key_value (self, _tmp155_, "Environment", "gtk", "overlay_scrollbar_disable", "string");
2863 _tmp156_ = self->kf;
2864 lxsession_lxsession_config_key_file_read_key_value (self, _tmp156_, "Environment", "qt", "force_theme", "string");
2865 _tmp157_ = self->kf;
2866 lxsession_lxsession_config_key_file_read_key_value (self, _tmp157_, "Environment", "qt", "platform", "string");
2867 _tmp158_ = self->kf;
2868 lxsession_lxsession_config_key_file_read_key_value (self, _tmp158_, "GTK", "sNet", "ThemeName", "string");
2869 _tmp159_ = self->kf;
2870 lxsession_lxsession_config_key_file_read_key_value (self, _tmp159_, "GTK", "sNet", "IconThemeName", "string");
2871 _tmp160_ = self->kf;
2872 lxsession_lxsession_config_key_file_read_key_value (self, _tmp160_, "GTK", "sGtk", "FontName", "string");
2873 _tmp161_ = self->kf;
2874 lxsession_lxsession_config_key_file_read_key_value (self, _tmp161_, "GTK", "iGtk", "ToolbarStyle", "string");
2875 _tmp162_ = self->kf;
2876 lxsession_lxsession_config_key_file_read_key_value (self, _tmp162_, "GTK", "iGtk", "ButtonImages", "string");
2877 _tmp163_ = self->kf;
2878 lxsession_lxsession_config_key_file_read_key_value (self, _tmp163_, "GTK", "iGtk", "MenuImages", "string");
2879 _tmp164_ = self->kf;
2880 lxsession_lxsession_config_key_file_read_key_value (self, _tmp164_, "GTK", "iGtk", "CursorThemeSize", "string");
2881 _tmp165_ = self->kf;
2882 lxsession_lxsession_config_key_file_read_key_value (self, _tmp165_, "GTK", "iXft", "Antialias", "string");
2883 _tmp166_ = self->kf;
2884 lxsession_lxsession_config_key_file_read_key_value (self, _tmp166_, "GTK", "iXft", "Hinting", "string");
2885 _tmp167_ = self->kf;
2886 lxsession_lxsession_config_key_file_read_key_value (self, _tmp167_, "GTK", "sXft", "HintStyle", "string");
2887 _tmp168_ = self->kf;
2888 lxsession_lxsession_config_key_file_read_key_value (self, _tmp168_, "GTK", "sXft", "RGBA", "string");
2889 _tmp169_ = self->kf;
2890 lxsession_lxsession_config_key_file_read_key_value (self, _tmp169_, "GTK", "sGtk", "ColorScheme", "string");
2891 _tmp170_ = self->kf;
2892 lxsession_lxsession_config_key_file_read_key_value (self, _tmp170_, "GTK", "sGtk", "CursorThemeName", "string");
2893 _tmp171_ = self->kf;
2894 lxsession_lxsession_config_key_file_read_key_value (self, _tmp171_, "GTK", "iGtk", "ToolbarIconSize", "string");
2895 _tmp172_ = self->kf;
2896 lxsession_lxsession_config_key_file_read_key_value (self, _tmp172_, "GTK", "iNet", "EnableEventSounds", "string");
2897 _tmp173_ = self->kf;
2898 lxsession_lxsession_config_key_file_read_key_value (self, _tmp173_, "GTK", "iNet", "EnableInputFeedbackSounds", "string");
2899 _tmp174_ = self->kf;
2900 lxsession_lxsession_config_key_file_read_key_value (self, _tmp174_, "Mouse", "AccFactor", NULL, "string");
2901 _tmp175_ = self->kf;
2902 lxsession_lxsession_config_key_file_read_key_value (self, _tmp175_, "Mouse", "AccThreshold", NULL, "string");
2903 _tmp176_ = self->kf;
2904 lxsession_lxsession_config_key_file_read_key_value (self, _tmp176_, "Mouse", "LeftHanded", NULL, "string");
2905 _tmp177_ = self->kf;
2906 lxsession_lxsession_config_key_file_read_key_value (self, _tmp177_, "Keyboard", "Delay", NULL, "string");
2907 _tmp178_ = self->kf;
2908 lxsession_lxsession_config_key_file_read_key_value (self, _tmp178_, "Keyboard", "Interval", NULL, "string");
2909 _tmp179_ = self->kf;
2910 lxsession_lxsession_config_key_file_read_key_value (self, _tmp179_, "Keyboard", "Beep", NULL, "string");
2911 lxsession_lxsession_config_key_file_read_secondary_keyfile (self);
2912 }
2913
2914
lxsession_lxsession_config_key_file_real_read_secondary_keyfile(LxsessionLxsessionConfigKeyFile * self)2915 static void lxsession_lxsession_config_key_file_real_read_secondary_keyfile (LxsessionLxsessionConfigKeyFile* self) {
2916 }
2917
2918
lxsession_lxsession_config_key_file_read_secondary_keyfile(LxsessionLxsessionConfigKeyFile * self)2919 void lxsession_lxsession_config_key_file_read_secondary_keyfile (LxsessionLxsessionConfigKeyFile* self) {
2920 g_return_if_fail (self != NULL);
2921 LXSESSION_LXSESSION_CONFIG_KEY_FILE_GET_CLASS (self)->read_secondary_keyfile (self);
2922 }
2923
2924
lxsession_lxsession_config_key_file_sync_setting_files(LxsessionLxsessionConfigKeyFile * self)2925 void lxsession_lxsession_config_key_file_sync_setting_files (LxsessionLxsessionConfigKeyFile* self) {
2926 gchar* desktop_file = NULL;
2927 const gchar* _tmp0_ = NULL;
2928 gchar* _tmp1_ = NULL;
2929 const gchar* _tmp2_ = NULL;
2930 gboolean _tmp3_ = FALSE;
2931 GError * _inner_error_ = NULL;
2932 g_return_if_fail (self != NULL);
2933 _tmp0_ = self->priv->_desktop_config_home_path;
2934 _tmp1_ = g_strdup (_tmp0_);
2935 desktop_file = _tmp1_;
2936 _tmp2_ = desktop_file;
2937 _tmp3_ = g_file_test (_tmp2_, G_FILE_TEST_EXISTS);
2938 if (_tmp3_) {
2939 gchar* autostart_file = NULL;
2940 gchar* _tmp4_ = NULL;
2941 const gchar* _tmp5_ = NULL;
2942 gboolean _tmp6_ = FALSE;
2943 _tmp4_ = lxsession_get_config_home_path ("autostart");
2944 autostart_file = _tmp4_;
2945 _tmp5_ = autostart_file;
2946 _tmp6_ = g_file_test (_tmp5_, G_FILE_TEST_EXISTS);
2947 if (_tmp6_) {
2948 } else {
2949 GFile* file = NULL;
2950 gchar* _tmp7_ = NULL;
2951 gchar* _tmp8_ = NULL;
2952 GFile* _tmp9_ = NULL;
2953 GFile* _tmp10_ = NULL;
2954 GFile* destination = NULL;
2955 gchar* _tmp11_ = NULL;
2956 gchar* _tmp12_ = NULL;
2957 GFile* _tmp13_ = NULL;
2958 GFile* _tmp14_ = NULL;
2959 _tmp7_ = lxsession_get_config_path ("autostart");
2960 _tmp8_ = _tmp7_;
2961 _tmp9_ = g_file_new_for_path (_tmp8_);
2962 _tmp10_ = _tmp9_;
2963 _g_free0 (_tmp8_);
2964 file = _tmp10_;
2965 _tmp11_ = lxsession_get_config_home_path ("autostart");
2966 _tmp12_ = _tmp11_;
2967 _tmp13_ = g_file_new_for_path (_tmp12_);
2968 _tmp14_ = _tmp13_;
2969 _g_free0 (_tmp12_);
2970 destination = _tmp14_;
2971 {
2972 GFile* _tmp15_ = NULL;
2973 GFile* _tmp16_ = NULL;
2974 _tmp15_ = file;
2975 _tmp16_ = destination;
2976 g_file_copy (_tmp15_, _tmp16_, G_FILE_COPY_NONE, NULL, NULL, NULL, &_inner_error_);
2977 if (G_UNLIKELY (_inner_error_ != NULL)) {
2978 goto __catch35_g_error;
2979 }
2980 }
2981 goto __finally35;
2982 __catch35_g_error:
2983 {
2984 GError* err = NULL;
2985 GError* _tmp17_ = NULL;
2986 const gchar* _tmp18_ = NULL;
2987 err = _inner_error_;
2988 _inner_error_ = NULL;
2989 _tmp17_ = err;
2990 _tmp18_ = _tmp17_->message;
2991 g_message ("settings.vala:901: %s", _tmp18_);
2992 _g_error_free0 (err);
2993 }
2994 __finally35:
2995 if (G_UNLIKELY (_inner_error_ != NULL)) {
2996 _g_object_unref0 (destination);
2997 _g_object_unref0 (file);
2998 _g_free0 (autostart_file);
2999 _g_free0 (desktop_file);
3000 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);
3001 g_clear_error (&_inner_error_);
3002 return;
3003 }
3004 _g_object_unref0 (destination);
3005 _g_object_unref0 (file);
3006 }
3007 _g_free0 (autostart_file);
3008 }
3009 _g_free0 (desktop_file);
3010 }
3011
3012
lxsession_lxsession_config_key_file_save_keyfile(LxsessionLxsessionConfigKeyFile * self)3013 void lxsession_lxsession_config_key_file_save_keyfile (LxsessionLxsessionConfigKeyFile* self) {
3014 gchar* str = NULL;
3015 GKeyFile* _tmp0_ = NULL;
3016 gchar* _tmp1_ = NULL;
3017 GError * _inner_error_ = NULL;
3018 g_return_if_fail (self != NULL);
3019 _tmp0_ = self->kf;
3020 _tmp1_ = g_key_file_to_data (_tmp0_, NULL, NULL);
3021 str = _tmp1_;
3022 {
3023 const gchar* _tmp2_ = NULL;
3024 gint _tmp3_ = 0;
3025 gint _tmp4_ = 0;
3026 _tmp2_ = self->priv->_desktop_config_path;
3027 _tmp3_ = strlen (str);
3028 _tmp4_ = _tmp3_;
3029 g_file_set_contents (_tmp2_, str, (gssize) _tmp4_, &_inner_error_);
3030 if (G_UNLIKELY (_inner_error_ != NULL)) {
3031 if (_inner_error_->domain == G_FILE_ERROR) {
3032 goto __catch36_g_file_error;
3033 }
3034 _g_free0 (str);
3035 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3036 g_clear_error (&_inner_error_);
3037 return;
3038 }
3039 }
3040 goto __finally36;
3041 __catch36_g_file_error:
3042 {
3043 GError* err = NULL;
3044 GError* _tmp5_ = NULL;
3045 const gchar* _tmp6_ = NULL;
3046 err = _inner_error_;
3047 _inner_error_ = NULL;
3048 _tmp5_ = err;
3049 _tmp6_ = _tmp5_->message;
3050 g_warning ("settings.vala:917: %s", _tmp6_);
3051 {
3052 gchar* user_config_dir = NULL;
3053 const gchar* _tmp7_ = NULL;
3054 gchar* _tmp8_ = NULL;
3055 GFile* file_parent = NULL;
3056 GFile* file = NULL;
3057 const gchar* _tmp9_ = NULL;
3058 GFile* _tmp10_ = NULL;
3059 GFile* _tmp11_ = NULL;
3060 GFile* _tmp12_ = NULL;
3061 GFile* _tmp13_ = NULL;
3062 gboolean _tmp14_ = FALSE;
3063 const gchar* _tmp18_ = NULL;
3064 gint _tmp19_ = 0;
3065 gint _tmp20_ = 0;
3066 const gchar* _tmp21_ = NULL;
3067 _tmp7_ = self->priv->_desktop_config_home_path;
3068 _tmp8_ = g_strdup (_tmp7_);
3069 user_config_dir = _tmp8_;
3070 _tmp9_ = user_config_dir;
3071 _tmp10_ = g_file_new_for_path (_tmp9_);
3072 file = _tmp10_;
3073 _tmp11_ = file;
3074 _tmp12_ = g_file_get_parent (_tmp11_);
3075 _g_object_unref0 (file_parent);
3076 file_parent = _tmp12_;
3077 _tmp13_ = file_parent;
3078 _tmp14_ = g_file_query_exists (_tmp13_, NULL);
3079 if (!_tmp14_) {
3080 {
3081 GFile* _tmp15_ = NULL;
3082 _tmp15_ = file_parent;
3083 g_file_make_directory_with_parents (_tmp15_, NULL, &_inner_error_);
3084 if (G_UNLIKELY (_inner_error_ != NULL)) {
3085 goto __catch38_g_error;
3086 }
3087 }
3088 goto __finally38;
3089 __catch38_g_error:
3090 {
3091 GError* err = NULL;
3092 GError* _tmp16_ = NULL;
3093 const gchar* _tmp17_ = NULL;
3094 err = _inner_error_;
3095 _inner_error_ = NULL;
3096 _tmp16_ = err;
3097 _tmp17_ = _tmp16_->message;
3098 g_warning ("settings.vala:934: %s", _tmp17_);
3099 _g_error_free0 (err);
3100 }
3101 __finally38:
3102 if (G_UNLIKELY (_inner_error_ != NULL)) {
3103 _g_object_unref0 (file);
3104 _g_object_unref0 (file_parent);
3105 _g_free0 (user_config_dir);
3106 if (_inner_error_->domain == G_FILE_ERROR) {
3107 goto __catch37_g_file_error;
3108 }
3109 _g_object_unref0 (file);
3110 _g_object_unref0 (file_parent);
3111 _g_free0 (user_config_dir);
3112 _g_error_free0 (err);
3113 _g_free0 (str);
3114 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3115 g_clear_error (&_inner_error_);
3116 return;
3117 }
3118 }
3119 _tmp18_ = user_config_dir;
3120 _tmp19_ = strlen (str);
3121 _tmp20_ = _tmp19_;
3122 g_file_set_contents (_tmp18_, str, (gssize) _tmp20_, &_inner_error_);
3123 if (G_UNLIKELY (_inner_error_ != NULL)) {
3124 _g_object_unref0 (file);
3125 _g_object_unref0 (file_parent);
3126 _g_free0 (user_config_dir);
3127 if (_inner_error_->domain == G_FILE_ERROR) {
3128 goto __catch37_g_file_error;
3129 }
3130 _g_object_unref0 (file);
3131 _g_object_unref0 (file_parent);
3132 _g_free0 (user_config_dir);
3133 _g_error_free0 (err);
3134 _g_free0 (str);
3135 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3136 g_clear_error (&_inner_error_);
3137 return;
3138 }
3139 _tmp21_ = user_config_dir;
3140 lxsession_lxsession_config_key_file_set_desktop_config_path (self, _tmp21_);
3141 lxsession_lxsession_config_key_file_setup_monitor_desktop_file (self);
3142 lxsession_lxsession_config_key_file_sync_setting_files (self);
3143 _g_object_unref0 (file);
3144 _g_object_unref0 (file_parent);
3145 _g_free0 (user_config_dir);
3146 }
3147 goto __finally37;
3148 __catch37_g_file_error:
3149 {
3150 GError* err = NULL;
3151 GError* _tmp22_ = NULL;
3152 const gchar* _tmp23_ = NULL;
3153 err = _inner_error_;
3154 _inner_error_ = NULL;
3155 _tmp22_ = err;
3156 _tmp23_ = _tmp22_->message;
3157 g_warning ("settings.vala:945: %s", _tmp23_);
3158 _g_error_free0 (err);
3159 }
3160 __finally37:
3161 if (G_UNLIKELY (_inner_error_ != NULL)) {
3162 _g_error_free0 (err);
3163 _g_error_free0 (err);
3164 _g_free0 (str);
3165 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3166 g_clear_error (&_inner_error_);
3167 return;
3168 }
3169 _g_error_free0 (err);
3170 }
3171 __finally36:
3172 if (G_UNLIKELY (_inner_error_ != NULL)) {
3173 _g_free0 (str);
3174 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);
3175 g_clear_error (&_inner_error_);
3176 return;
3177 }
3178 lxsession_lxsession_config_key_file_save_secondary_keyfile (self);
3179 _g_free0 (str);
3180 }
3181
3182
lxsession_lxsession_config_key_file_real_save_secondary_keyfile(LxsessionLxsessionConfigKeyFile * self)3183 static void lxsession_lxsession_config_key_file_real_save_secondary_keyfile (LxsessionLxsessionConfigKeyFile* self) {
3184 }
3185
3186
lxsession_lxsession_config_key_file_save_secondary_keyfile(LxsessionLxsessionConfigKeyFile * self)3187 void lxsession_lxsession_config_key_file_save_secondary_keyfile (LxsessionLxsessionConfigKeyFile* self) {
3188 g_return_if_fail (self != NULL);
3189 LXSESSION_LXSESSION_CONFIG_KEY_FILE_GET_CLASS (self)->save_secondary_keyfile (self);
3190 }
3191
3192
lxsession_lxsession_config_key_file_real_on_update_string_set(LxsessionLxsessionConfig * base,const gchar * dbus_arg,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)3193 static void lxsession_lxsession_config_key_file_real_on_update_string_set (LxsessionLxsessionConfig* base, const gchar* dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
3194 LxsessionLxsessionConfigKeyFile * self;
3195 const gchar* _tmp0_ = NULL;
3196 const gchar* _tmp1_ = NULL;
3197 GQuark _tmp3_ = 0U;
3198 static GQuark _tmp2_label0 = 0;
3199 static GQuark _tmp2_label1 = 0;
3200 static GQuark _tmp2_label2 = 0;
3201 self = (LxsessionLxsessionConfigKeyFile*) base;
3202 g_return_if_fail (dbus_arg != NULL);
3203 g_return_if_fail (kf_categorie != NULL);
3204 g_return_if_fail (kf_key1 != NULL);
3205 _tmp0_ = kf_key2;
3206 _tmp1_ = _tmp0_;
3207 _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
3208 if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string (NULL)))) {
3209 switch (0) {
3210 default:
3211 {
3212 GKeyFile* _tmp4_ = NULL;
3213 const gchar* _tmp5_ = NULL;
3214 const gchar* _tmp6_ = NULL;
3215 const gchar* _tmp7_ = NULL;
3216 _tmp4_ = self->kf;
3217 _tmp5_ = kf_categorie;
3218 _tmp6_ = kf_key1;
3219 _tmp7_ = dbus_arg;
3220 g_key_file_set_value (_tmp4_, _tmp5_, _tmp6_, _tmp7_);
3221 break;
3222 }
3223 }
3224 } else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("")))) {
3225 switch (0) {
3226 default:
3227 {
3228 GKeyFile* _tmp8_ = NULL;
3229 const gchar* _tmp9_ = NULL;
3230 const gchar* _tmp10_ = NULL;
3231 const gchar* _tmp11_ = NULL;
3232 _tmp8_ = self->kf;
3233 _tmp9_ = kf_categorie;
3234 _tmp10_ = kf_key1;
3235 _tmp11_ = dbus_arg;
3236 g_key_file_set_value (_tmp8_, _tmp9_, _tmp10_, _tmp11_);
3237 break;
3238 }
3239 }
3240 } else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string (" ")))) {
3241 switch (0) {
3242 default:
3243 {
3244 GKeyFile* _tmp12_ = NULL;
3245 const gchar* _tmp13_ = NULL;
3246 const gchar* _tmp14_ = NULL;
3247 const gchar* _tmp15_ = NULL;
3248 _tmp12_ = self->kf;
3249 _tmp13_ = kf_categorie;
3250 _tmp14_ = kf_key1;
3251 _tmp15_ = dbus_arg;
3252 g_key_file_set_value (_tmp12_, _tmp13_, _tmp14_, _tmp15_);
3253 break;
3254 }
3255 }
3256 } else {
3257 switch (0) {
3258 default:
3259 {
3260 GKeyFile* _tmp16_ = NULL;
3261 const gchar* _tmp17_ = NULL;
3262 const gchar* _tmp18_ = NULL;
3263 gchar* _tmp19_ = NULL;
3264 gchar* _tmp20_ = NULL;
3265 const gchar* _tmp21_ = NULL;
3266 gchar* _tmp22_ = NULL;
3267 gchar* _tmp23_ = NULL;
3268 const gchar* _tmp24_ = NULL;
3269 _tmp16_ = self->kf;
3270 _tmp17_ = kf_categorie;
3271 _tmp18_ = kf_key1;
3272 _tmp19_ = g_strconcat (_tmp18_, "/", NULL);
3273 _tmp20_ = _tmp19_;
3274 _tmp21_ = kf_key2;
3275 _tmp22_ = g_strconcat (_tmp20_, _tmp21_, NULL);
3276 _tmp23_ = _tmp22_;
3277 _tmp24_ = dbus_arg;
3278 g_key_file_set_value (_tmp16_, _tmp17_, _tmp23_, _tmp24_);
3279 _g_free0 (_tmp23_);
3280 _g_free0 (_tmp20_);
3281 break;
3282 }
3283 }
3284 }
3285 lxsession_lxsession_config_key_file_save_keyfile (self);
3286 }
3287
3288
lxsession_lxsession_config_key_file_real_on_update_string_list_set(LxsessionLxsessionConfig * base,gchar ** dbus_arg,int dbus_arg_length1,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)3289 static void lxsession_lxsession_config_key_file_real_on_update_string_list_set (LxsessionLxsessionConfig* base, gchar** dbus_arg, int dbus_arg_length1, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
3290 LxsessionLxsessionConfigKeyFile * self;
3291 const gchar* _tmp0_ = NULL;
3292 const gchar* _tmp1_ = NULL;
3293 GQuark _tmp3_ = 0U;
3294 static GQuark _tmp2_label0 = 0;
3295 static GQuark _tmp2_label1 = 0;
3296 static GQuark _tmp2_label2 = 0;
3297 self = (LxsessionLxsessionConfigKeyFile*) base;
3298 g_return_if_fail (kf_categorie != NULL);
3299 g_return_if_fail (kf_key1 != NULL);
3300 _tmp0_ = kf_key2;
3301 _tmp1_ = _tmp0_;
3302 _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
3303 if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string (NULL)))) {
3304 switch (0) {
3305 default:
3306 {
3307 GKeyFile* _tmp4_ = NULL;
3308 const gchar* _tmp5_ = NULL;
3309 const gchar* _tmp6_ = NULL;
3310 gchar** _tmp7_ = NULL;
3311 gint _tmp7__length1 = 0;
3312 _tmp4_ = self->kf;
3313 _tmp5_ = kf_categorie;
3314 _tmp6_ = kf_key1;
3315 _tmp7_ = dbus_arg;
3316 _tmp7__length1 = dbus_arg_length1;
3317 g_key_file_set_string_list (_tmp4_, _tmp5_, _tmp6_, (const gchar* const*) _tmp7_, _tmp7__length1);
3318 break;
3319 }
3320 }
3321 } else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("")))) {
3322 switch (0) {
3323 default:
3324 {
3325 GKeyFile* _tmp8_ = NULL;
3326 const gchar* _tmp9_ = NULL;
3327 const gchar* _tmp10_ = NULL;
3328 gchar** _tmp11_ = NULL;
3329 gint _tmp11__length1 = 0;
3330 _tmp8_ = self->kf;
3331 _tmp9_ = kf_categorie;
3332 _tmp10_ = kf_key1;
3333 _tmp11_ = dbus_arg;
3334 _tmp11__length1 = dbus_arg_length1;
3335 g_key_file_set_string_list (_tmp8_, _tmp9_, _tmp10_, (const gchar* const*) _tmp11_, _tmp11__length1);
3336 break;
3337 }
3338 }
3339 } else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string (" ")))) {
3340 switch (0) {
3341 default:
3342 {
3343 GKeyFile* _tmp12_ = NULL;
3344 const gchar* _tmp13_ = NULL;
3345 const gchar* _tmp14_ = NULL;
3346 gchar** _tmp15_ = NULL;
3347 gint _tmp15__length1 = 0;
3348 _tmp12_ = self->kf;
3349 _tmp13_ = kf_categorie;
3350 _tmp14_ = kf_key1;
3351 _tmp15_ = dbus_arg;
3352 _tmp15__length1 = dbus_arg_length1;
3353 g_key_file_set_string_list (_tmp12_, _tmp13_, _tmp14_, (const gchar* const*) _tmp15_, _tmp15__length1);
3354 break;
3355 }
3356 }
3357 } else {
3358 switch (0) {
3359 default:
3360 {
3361 GKeyFile* _tmp16_ = NULL;
3362 const gchar* _tmp17_ = NULL;
3363 const gchar* _tmp18_ = NULL;
3364 gchar* _tmp19_ = NULL;
3365 gchar* _tmp20_ = NULL;
3366 const gchar* _tmp21_ = NULL;
3367 gchar* _tmp22_ = NULL;
3368 gchar* _tmp23_ = NULL;
3369 gchar** _tmp24_ = NULL;
3370 gint _tmp24__length1 = 0;
3371 _tmp16_ = self->kf;
3372 _tmp17_ = kf_categorie;
3373 _tmp18_ = kf_key1;
3374 _tmp19_ = g_strconcat (_tmp18_, "/", NULL);
3375 _tmp20_ = _tmp19_;
3376 _tmp21_ = kf_key2;
3377 _tmp22_ = g_strconcat (_tmp20_, _tmp21_, NULL);
3378 _tmp23_ = _tmp22_;
3379 _tmp24_ = dbus_arg;
3380 _tmp24__length1 = dbus_arg_length1;
3381 g_key_file_set_string_list (_tmp16_, _tmp17_, _tmp23_, (const gchar* const*) _tmp24_, _tmp24__length1);
3382 _g_free0 (_tmp23_);
3383 _g_free0 (_tmp20_);
3384 break;
3385 }
3386 }
3387 }
3388 lxsession_lxsession_config_key_file_save_keyfile (self);
3389 }
3390
3391
lxsession_lxsession_config_key_file_real_on_update_int_set(LxsessionLxsessionConfig * base,gint dbus_arg,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2)3392 static void lxsession_lxsession_config_key_file_real_on_update_int_set (LxsessionLxsessionConfig* base, gint dbus_arg, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2) {
3393 LxsessionLxsessionConfigKeyFile * self;
3394 const gchar* _tmp0_ = NULL;
3395 const gchar* _tmp1_ = NULL;
3396 GQuark _tmp3_ = 0U;
3397 static GQuark _tmp2_label0 = 0;
3398 static GQuark _tmp2_label1 = 0;
3399 static GQuark _tmp2_label2 = 0;
3400 self = (LxsessionLxsessionConfigKeyFile*) base;
3401 g_return_if_fail (kf_categorie != NULL);
3402 g_return_if_fail (kf_key1 != NULL);
3403 _tmp0_ = kf_key2;
3404 _tmp1_ = _tmp0_;
3405 _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
3406 if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string (NULL)))) {
3407 switch (0) {
3408 default:
3409 {
3410 const gchar* _tmp4_ = NULL;
3411 const gchar* _tmp5_ = NULL;
3412 gint _tmp6_ = 0;
3413 GKeyFile* _tmp7_ = NULL;
3414 const gchar* _tmp8_ = NULL;
3415 const gchar* _tmp9_ = NULL;
3416 gint _tmp10_ = 0;
3417 _tmp4_ = kf_categorie;
3418 _tmp5_ = kf_key1;
3419 _tmp6_ = dbus_arg;
3420 g_message ("settings.vala:1009: Changing %s - %s to %i", _tmp4_, _tmp5_, _tmp6_);
3421 _tmp7_ = self->kf;
3422 _tmp8_ = kf_categorie;
3423 _tmp9_ = kf_key1;
3424 _tmp10_ = dbus_arg;
3425 g_key_file_set_integer (_tmp7_, _tmp8_, _tmp9_, _tmp10_);
3426 break;
3427 }
3428 }
3429 } else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("")))) {
3430 switch (0) {
3431 default:
3432 {
3433 const gchar* _tmp11_ = NULL;
3434 const gchar* _tmp12_ = NULL;
3435 gint _tmp13_ = 0;
3436 GKeyFile* _tmp14_ = NULL;
3437 const gchar* _tmp15_ = NULL;
3438 const gchar* _tmp16_ = NULL;
3439 gint _tmp17_ = 0;
3440 _tmp11_ = kf_categorie;
3441 _tmp12_ = kf_key1;
3442 _tmp13_ = dbus_arg;
3443 g_message ("settings.vala:1013: Changing %s - %s to %i", _tmp11_, _tmp12_, _tmp13_);
3444 _tmp14_ = self->kf;
3445 _tmp15_ = kf_categorie;
3446 _tmp16_ = kf_key1;
3447 _tmp17_ = dbus_arg;
3448 g_key_file_set_integer (_tmp14_, _tmp15_, _tmp16_, _tmp17_);
3449 break;
3450 }
3451 }
3452 } else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string (" ")))) {
3453 switch (0) {
3454 default:
3455 {
3456 const gchar* _tmp18_ = NULL;
3457 const gchar* _tmp19_ = NULL;
3458 gint _tmp20_ = 0;
3459 GKeyFile* _tmp21_ = NULL;
3460 const gchar* _tmp22_ = NULL;
3461 const gchar* _tmp23_ = NULL;
3462 gint _tmp24_ = 0;
3463 _tmp18_ = kf_categorie;
3464 _tmp19_ = kf_key1;
3465 _tmp20_ = dbus_arg;
3466 g_message ("settings.vala:1017: Changing %s - %s to %i", _tmp18_, _tmp19_, _tmp20_);
3467 _tmp21_ = self->kf;
3468 _tmp22_ = kf_categorie;
3469 _tmp23_ = kf_key1;
3470 _tmp24_ = dbus_arg;
3471 g_key_file_set_integer (_tmp21_, _tmp22_, _tmp23_, _tmp24_);
3472 break;
3473 }
3474 }
3475 } else {
3476 switch (0) {
3477 default:
3478 {
3479 const gchar* _tmp25_ = NULL;
3480 const gchar* _tmp26_ = NULL;
3481 const gchar* _tmp27_ = NULL;
3482 gint _tmp28_ = 0;
3483 GKeyFile* _tmp29_ = NULL;
3484 const gchar* _tmp30_ = NULL;
3485 const gchar* _tmp31_ = NULL;
3486 gchar* _tmp32_ = NULL;
3487 gchar* _tmp33_ = NULL;
3488 const gchar* _tmp34_ = NULL;
3489 gchar* _tmp35_ = NULL;
3490 gchar* _tmp36_ = NULL;
3491 gint _tmp37_ = 0;
3492 _tmp25_ = kf_categorie;
3493 _tmp26_ = kf_key1;
3494 _tmp27_ = kf_key2;
3495 _tmp28_ = dbus_arg;
3496 g_message ("settings.vala:1021: Changing %s - %s - %s to %i", _tmp25_, _tmp26_, _tmp27_, _tmp28_);
3497 _tmp29_ = self->kf;
3498 _tmp30_ = kf_categorie;
3499 _tmp31_ = kf_key1;
3500 _tmp32_ = g_strconcat (_tmp31_, "/", NULL);
3501 _tmp33_ = _tmp32_;
3502 _tmp34_ = kf_key2;
3503 _tmp35_ = g_strconcat (_tmp33_, _tmp34_, NULL);
3504 _tmp36_ = _tmp35_;
3505 _tmp37_ = dbus_arg;
3506 g_key_file_set_integer (_tmp29_, _tmp30_, _tmp36_, _tmp37_);
3507 _g_free0 (_tmp36_);
3508 _g_free0 (_tmp33_);
3509 break;
3510 }
3511 }
3512 }
3513 lxsession_lxsession_config_key_file_save_keyfile (self);
3514 }
3515
3516
lxsession_lxsession_config_key_file_on_reload_settings_daemon(LxsessionLxsessionConfigKeyFile * self)3517 void lxsession_lxsession_config_key_file_on_reload_settings_daemon (LxsessionLxsessionConfigKeyFile* self) {
3518 g_return_if_fail (self != NULL);
3519 g_message ("settings.vala:1030: Reloading XSettings daemon");
3520 lxsession_lxsession_config_key_file_reload_xsettings (self);
3521 }
3522
3523
lxsession_lxsession_config_key_file_get_desktop_config_path(LxsessionLxsessionConfigKeyFile * self)3524 const gchar* lxsession_lxsession_config_key_file_get_desktop_config_path (LxsessionLxsessionConfigKeyFile* self) {
3525 const gchar* result;
3526 const gchar* _tmp0_ = NULL;
3527 g_return_val_if_fail (self != NULL, NULL);
3528 _tmp0_ = self->priv->_desktop_config_path;
3529 result = _tmp0_;
3530 return result;
3531 }
3532
3533
lxsession_lxsession_config_key_file_set_desktop_config_path(LxsessionLxsessionConfigKeyFile * self,const gchar * value)3534 void lxsession_lxsession_config_key_file_set_desktop_config_path (LxsessionLxsessionConfigKeyFile* self, const gchar* value) {
3535 const gchar* _tmp0_ = NULL;
3536 gchar* _tmp1_ = NULL;
3537 g_return_if_fail (self != NULL);
3538 _tmp0_ = value;
3539 _tmp1_ = g_strdup (_tmp0_);
3540 _g_free0 (self->priv->_desktop_config_path);
3541 self->priv->_desktop_config_path = _tmp1_;
3542 g_object_notify ((GObject *) self, "desktop-config-path");
3543 }
3544
3545
lxsession_lxsession_config_key_file_get_desktop_config_home_path(LxsessionLxsessionConfigKeyFile * self)3546 const gchar* lxsession_lxsession_config_key_file_get_desktop_config_home_path (LxsessionLxsessionConfigKeyFile* self) {
3547 const gchar* result;
3548 const gchar* _tmp0_ = NULL;
3549 g_return_val_if_fail (self != NULL, NULL);
3550 _tmp0_ = self->priv->_desktop_config_home_path;
3551 result = _tmp0_;
3552 return result;
3553 }
3554
3555
lxsession_lxsession_config_key_file_set_desktop_config_home_path(LxsessionLxsessionConfigKeyFile * self,const gchar * value)3556 void lxsession_lxsession_config_key_file_set_desktop_config_home_path (LxsessionLxsessionConfigKeyFile* self, const gchar* value) {
3557 const gchar* _tmp0_ = NULL;
3558 gchar* _tmp1_ = NULL;
3559 g_return_if_fail (self != NULL);
3560 _tmp0_ = value;
3561 _tmp1_ = g_strdup (_tmp0_);
3562 _g_free0 (self->priv->_desktop_config_home_path);
3563 self->priv->_desktop_config_home_path = _tmp1_;
3564 g_object_notify ((GObject *) self, "desktop-config-home-path");
3565 }
3566
3567
lxsession_lxsession_config_key_file_class_init(LxsessionLxsessionConfigKeyFileClass * klass)3568 static void lxsession_lxsession_config_key_file_class_init (LxsessionLxsessionConfigKeyFileClass * klass) {
3569 lxsession_lxsession_config_key_file_parent_class = g_type_class_peek_parent (klass);
3570 g_type_class_add_private (klass, sizeof (LxsessionLxsessionConfigKeyFilePrivate));
3571 ((LxsessionLxsessionConfigKeyFileClass *) klass)->read_secondary_keyfile = (void (*)(LxsessionLxsessionConfigKeyFile*)) lxsession_lxsession_config_key_file_real_read_secondary_keyfile;
3572 ((LxsessionLxsessionConfigKeyFileClass *) klass)->save_secondary_keyfile = (void (*)(LxsessionLxsessionConfigKeyFile*)) lxsession_lxsession_config_key_file_real_save_secondary_keyfile;
3573 ((LxsessionLxsessionConfigClass *) klass)->on_update_string_set = (void (*)(LxsessionLxsessionConfig*, const gchar*, const gchar*, const gchar*, const gchar*)) lxsession_lxsession_config_key_file_real_on_update_string_set;
3574 ((LxsessionLxsessionConfigClass *) klass)->on_update_string_list_set = (void (*)(LxsessionLxsessionConfig*, gchar**, int, const gchar*, const gchar*, const gchar*)) lxsession_lxsession_config_key_file_real_on_update_string_list_set;
3575 ((LxsessionLxsessionConfigClass *) klass)->on_update_int_set = (void (*)(LxsessionLxsessionConfig*, gint, const gchar*, const gchar*, const gchar*)) lxsession_lxsession_config_key_file_real_on_update_int_set;
3576 G_OBJECT_CLASS (klass)->get_property = _vala_lxsession_lxsession_config_key_file_get_property;
3577 G_OBJECT_CLASS (klass)->set_property = _vala_lxsession_lxsession_config_key_file_set_property;
3578 G_OBJECT_CLASS (klass)->finalize = lxsession_lxsession_config_key_file_finalize;
3579 g_object_class_install_property (G_OBJECT_CLASS (klass), LXSESSION_LXSESSION_CONFIG_KEY_FILE_DESKTOP_CONFIG_PATH, g_param_spec_string ("desktop-config-path", "desktop-config-path", "desktop-config-path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
3580 g_object_class_install_property (G_OBJECT_CLASS (klass), LXSESSION_LXSESSION_CONFIG_KEY_FILE_DESKTOP_CONFIG_HOME_PATH, g_param_spec_string ("desktop-config-home-path", "desktop-config-home-path", "desktop-config-home-path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
3581 }
3582
3583
lxsession_lxsession_config_key_file_instance_init(LxsessionLxsessionConfigKeyFile * self)3584 static void lxsession_lxsession_config_key_file_instance_init (LxsessionLxsessionConfigKeyFile * self) {
3585 GKeyFile* _tmp0_ = NULL;
3586 self->priv = LXSESSION_LXSESSION_CONFIG_KEY_FILE_GET_PRIVATE (self);
3587 _tmp0_ = g_key_file_new ();
3588 self->kf = _tmp0_;
3589 self->priv->_desktop_config_path = NULL;
3590 self->priv->_desktop_config_home_path = NULL;
3591 }
3592
3593
lxsession_lxsession_config_key_file_finalize(GObject * obj)3594 static void lxsession_lxsession_config_key_file_finalize (GObject* obj) {
3595 LxsessionLxsessionConfigKeyFile * self;
3596 self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFile);
3597 _g_key_file_unref0 (self->kf);
3598 _g_free0 (self->priv->_desktop_config_path);
3599 _g_free0 (self->priv->_desktop_config_home_path);
3600 _g_object_unref0 (self->desktop_file);
3601 _g_object_unref0 (self->home_desktop_file);
3602 _g_object_unref0 (self->monitor_desktop_file);
3603 _g_object_unref0 (self->monitor_home_desktop_file);
3604 _g_object_unref0 (self->monitor_cancel);
3605 G_OBJECT_CLASS (lxsession_lxsession_config_key_file_parent_class)->finalize (obj);
3606 }
3607
3608
lxsession_lxsession_config_key_file_get_type(void)3609 GType lxsession_lxsession_config_key_file_get_type (void) {
3610 static volatile gsize lxsession_lxsession_config_key_file_type_id__volatile = 0;
3611 if (g_once_init_enter (&lxsession_lxsession_config_key_file_type_id__volatile)) {
3612 static const GTypeInfo g_define_type_info = { sizeof (LxsessionLxsessionConfigKeyFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_lxsession_config_key_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionLxsessionConfigKeyFile), 0, (GInstanceInitFunc) lxsession_lxsession_config_key_file_instance_init, NULL };
3613 GType lxsession_lxsession_config_key_file_type_id;
3614 lxsession_lxsession_config_key_file_type_id = g_type_register_static (LXSESSION_TYPE_LXSESSION_CONFIG, "LxsessionLxsessionConfigKeyFile", &g_define_type_info, 0);
3615 g_once_init_leave (&lxsession_lxsession_config_key_file_type_id__volatile, lxsession_lxsession_config_key_file_type_id);
3616 }
3617 return lxsession_lxsession_config_key_file_type_id__volatile;
3618 }
3619
3620
_vala_lxsession_lxsession_config_key_file_get_property(GObject * object,guint property_id,GValue * value,GParamSpec * pspec)3621 static void _vala_lxsession_lxsession_config_key_file_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
3622 LxsessionLxsessionConfigKeyFile * self;
3623 self = G_TYPE_CHECK_INSTANCE_CAST (object, LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFile);
3624 switch (property_id) {
3625 case LXSESSION_LXSESSION_CONFIG_KEY_FILE_DESKTOP_CONFIG_PATH:
3626 g_value_set_string (value, lxsession_lxsession_config_key_file_get_desktop_config_path (self));
3627 break;
3628 case LXSESSION_LXSESSION_CONFIG_KEY_FILE_DESKTOP_CONFIG_HOME_PATH:
3629 g_value_set_string (value, lxsession_lxsession_config_key_file_get_desktop_config_home_path (self));
3630 break;
3631 default:
3632 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
3633 break;
3634 }
3635 }
3636
3637
_vala_lxsession_lxsession_config_key_file_set_property(GObject * object,guint property_id,const GValue * value,GParamSpec * pspec)3638 static void _vala_lxsession_lxsession_config_key_file_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
3639 LxsessionLxsessionConfigKeyFile * self;
3640 self = G_TYPE_CHECK_INSTANCE_CAST (object, LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, LxsessionLxsessionConfigKeyFile);
3641 switch (property_id) {
3642 case LXSESSION_LXSESSION_CONFIG_KEY_FILE_DESKTOP_CONFIG_PATH:
3643 lxsession_lxsession_config_key_file_set_desktop_config_path (self, g_value_get_string (value));
3644 break;
3645 case LXSESSION_LXSESSION_CONFIG_KEY_FILE_DESKTOP_CONFIG_HOME_PATH:
3646 lxsession_lxsession_config_key_file_set_desktop_config_home_path (self, g_value_get_string (value));
3647 break;
3648 default:
3649 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
3650 break;
3651 }
3652 }
3653
3654
lxsession_razor_qt_config_key_file_construct(GType object_type,const gchar * session_arg,const gchar * desktop_env_name_arg)3655 LxsessionRazorQtConfigKeyFile* lxsession_razor_qt_config_key_file_construct (GType object_type, const gchar* session_arg, const gchar* desktop_env_name_arg) {
3656 LxsessionRazorQtConfigKeyFile * self = NULL;
3657 const gchar* _tmp0_ = NULL;
3658 const gchar* _tmp1_ = NULL;
3659 const gchar* _tmp2_ = NULL;
3660 const gchar* _tmp3_ = NULL;
3661 gchar* _tmp4_ = NULL;
3662 gchar* _tmp5_ = NULL;
3663 gboolean _tmp6_ = FALSE;
3664 g_return_val_if_fail (session_arg != NULL, NULL);
3665 g_return_val_if_fail (desktop_env_name_arg != NULL, NULL);
3666 _tmp0_ = session_arg;
3667 _tmp1_ = desktop_env_name_arg;
3668 self = (LxsessionRazorQtConfigKeyFile*) lxsession_lxsession_config_key_file_construct (object_type, _tmp0_, _tmp1_);
3669 lxsession_lxsession_config_key_file_init_desktop_files ((LxsessionLxsessionConfigKeyFile*) self);
3670 lxsession_razor_qt_config_key_file_init_desktop_razor_files (self);
3671 _tmp2_ = session_arg;
3672 lxsession_lxsession_config_set_session_name ((LxsessionLxsessionConfig*) self, _tmp2_);
3673 _tmp3_ = desktop_env_name_arg;
3674 lxsession_lxsession_config_set_desktop_env_name ((LxsessionLxsessionConfig*) self, _tmp3_);
3675 lxsession_lxsession_config_key_file_read_keyfile ((LxsessionLxsessionConfigKeyFile*) self);
3676 lxsession_lxsession_config_init_signal ((LxsessionLxsessionConfig*) self);
3677 lxsession_lxsession_config_key_file_setup_monitor_desktop_file ((LxsessionLxsessionConfigKeyFile*) self);
3678 _tmp4_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) self, "State", "guess_default", NULL);
3679 _tmp5_ = _tmp4_;
3680 _tmp6_ = g_strcmp0 (_tmp5_, "false") != 0;
3681 _g_free0 (_tmp5_);
3682 if (_tmp6_) {
3683 lxsession_lxsession_config_guess_default ((LxsessionLxsessionConfig*) self);
3684 }
3685 return self;
3686 }
3687
3688
lxsession_razor_qt_config_key_file_new(const gchar * session_arg,const gchar * desktop_env_name_arg)3689 LxsessionRazorQtConfigKeyFile* lxsession_razor_qt_config_key_file_new (const gchar* session_arg, const gchar* desktop_env_name_arg) {
3690 return lxsession_razor_qt_config_key_file_construct (LXSESSION_TYPE_RAZOR_QT_CONFIG_KEY_FILE, session_arg, desktop_env_name_arg);
3691 }
3692
3693
lxsession_razor_qt_config_key_file_init_desktop_razor_files(LxsessionRazorQtConfigKeyFile * self)3694 void lxsession_razor_qt_config_key_file_init_desktop_razor_files (LxsessionRazorQtConfigKeyFile* self) {
3695 const gchar* _tmp0_ = NULL;
3696 gchar* _tmp1_ = NULL;
3697 GFile* home_session_razor_file = NULL;
3698 const gchar* _tmp2_ = NULL;
3699 GFile* _tmp3_ = NULL;
3700 gchar* _tmp4_ = NULL;
3701 GFile* session_razor_file = NULL;
3702 const gchar* _tmp5_ = NULL;
3703 GFile* _tmp6_ = NULL;
3704 GFile* _tmp7_ = NULL;
3705 gboolean _tmp8_ = FALSE;
3706 const gchar* _tmp20_ = NULL;
3707 gchar* _tmp21_ = NULL;
3708 GFile* home_conf_razor_file = NULL;
3709 const gchar* _tmp22_ = NULL;
3710 GFile* _tmp23_ = NULL;
3711 gchar* _tmp24_ = NULL;
3712 GFile* conf_razor_file = NULL;
3713 const gchar* _tmp25_ = NULL;
3714 GFile* _tmp26_ = NULL;
3715 GFile* _tmp27_ = NULL;
3716 gboolean _tmp28_ = FALSE;
3717 GError * _inner_error_ = NULL;
3718 g_return_if_fail (self != NULL);
3719 _tmp0_ = g_get_user_config_dir ();
3720 _tmp1_ = g_build_filename (_tmp0_, "razor", "session.conf", NULL);
3721 _g_free0 (self->session_razor_config_home_path);
3722 self->session_razor_config_home_path = _tmp1_;
3723 _tmp2_ = self->session_razor_config_home_path;
3724 _tmp3_ = g_file_new_for_path (_tmp2_);
3725 home_session_razor_file = _tmp3_;
3726 _tmp4_ = g_build_filename ("etc", "xdg", "razor", "session.conf", NULL);
3727 _g_free0 (self->session_razor_config_path);
3728 self->session_razor_config_path = _tmp4_;
3729 _tmp5_ = self->session_razor_config_path;
3730 _tmp6_ = g_file_new_for_path (_tmp5_);
3731 session_razor_file = _tmp6_;
3732 _tmp7_ = home_session_razor_file;
3733 _tmp8_ = g_file_query_exists (_tmp7_, NULL);
3734 if (_tmp8_) {
3735 const gchar* _tmp9_ = NULL;
3736 gchar* _tmp10_ = NULL;
3737 _tmp9_ = self->session_razor_config_home_path;
3738 _tmp10_ = g_strdup (_tmp9_);
3739 _g_free0 (self->session_razor_config_path);
3740 self->session_razor_config_path = _tmp10_;
3741 } else {
3742 GFile* _tmp11_ = NULL;
3743 gboolean _tmp12_ = FALSE;
3744 _tmp11_ = session_razor_file;
3745 _tmp12_ = g_file_query_exists (_tmp11_, NULL);
3746 if (_tmp12_) {
3747 } else {
3748 const gchar* _tmp13_ = NULL;
3749 gchar* _tmp14_ = NULL;
3750 _tmp13_ = self->session_razor_config_home_path;
3751 _tmp14_ = g_strdup (_tmp13_);
3752 _g_free0 (self->session_razor_config_path);
3753 self->session_razor_config_path = _tmp14_;
3754 {
3755 GFile* _tmp15_ = NULL;
3756 GFileOutputStream* _tmp16_ = NULL;
3757 GFileOutputStream* _tmp17_ = NULL;
3758 _tmp15_ = home_session_razor_file;
3759 _tmp16_ = g_file_create (_tmp15_, G_FILE_CREATE_NONE, NULL, &_inner_error_);
3760 _tmp17_ = _tmp16_;
3761 _g_object_unref0 (_tmp17_);
3762 if (G_UNLIKELY (_inner_error_ != NULL)) {
3763 goto __catch39_g_error;
3764 }
3765 }
3766 goto __finally39;
3767 __catch39_g_error:
3768 {
3769 GError* err = NULL;
3770 GError* _tmp18_ = NULL;
3771 const gchar* _tmp19_ = NULL;
3772 err = _inner_error_;
3773 _inner_error_ = NULL;
3774 _tmp18_ = err;
3775 _tmp19_ = _tmp18_->message;
3776 g_message ("settings.vala:1101: %s", _tmp19_);
3777 _g_error_free0 (err);
3778 }
3779 __finally39:
3780 if (G_UNLIKELY (_inner_error_ != NULL)) {
3781 _g_object_unref0 (session_razor_file);
3782 _g_object_unref0 (home_session_razor_file);
3783 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);
3784 g_clear_error (&_inner_error_);
3785 return;
3786 }
3787 }
3788 }
3789 _tmp20_ = g_get_user_config_dir ();
3790 _tmp21_ = g_build_filename (_tmp20_, "razor", "razor.conf", NULL);
3791 _g_free0 (self->conf_razor_config_home_path);
3792 self->conf_razor_config_home_path = _tmp21_;
3793 _tmp22_ = self->conf_razor_config_home_path;
3794 _tmp23_ = g_file_new_for_path (_tmp22_);
3795 home_conf_razor_file = _tmp23_;
3796 _tmp24_ = g_build_filename ("etc", "xdg", "razor", "razor.conf", NULL);
3797 _g_free0 (self->conf_razor_config_path);
3798 self->conf_razor_config_path = _tmp24_;
3799 _tmp25_ = self->conf_razor_config_path;
3800 _tmp26_ = g_file_new_for_path (_tmp25_);
3801 conf_razor_file = _tmp26_;
3802 _tmp27_ = home_conf_razor_file;
3803 _tmp28_ = g_file_query_exists (_tmp27_, NULL);
3804 if (_tmp28_) {
3805 const gchar* _tmp29_ = NULL;
3806 gchar* _tmp30_ = NULL;
3807 _tmp29_ = self->conf_razor_config_home_path;
3808 _tmp30_ = g_strdup (_tmp29_);
3809 _g_free0 (self->conf_razor_config_path);
3810 self->conf_razor_config_path = _tmp30_;
3811 } else {
3812 GFile* _tmp31_ = NULL;
3813 gboolean _tmp32_ = FALSE;
3814 _tmp31_ = conf_razor_file;
3815 _tmp32_ = g_file_query_exists (_tmp31_, NULL);
3816 if (_tmp32_) {
3817 } else {
3818 const gchar* _tmp33_ = NULL;
3819 gchar* _tmp34_ = NULL;
3820 _tmp33_ = self->conf_razor_config_home_path;
3821 _tmp34_ = g_strdup (_tmp33_);
3822 _g_free0 (self->conf_razor_config_path);
3823 self->conf_razor_config_path = _tmp34_;
3824 {
3825 GFile* _tmp35_ = NULL;
3826 GFileOutputStream* _tmp36_ = NULL;
3827 GFileOutputStream* _tmp37_ = NULL;
3828 _tmp35_ = home_conf_razor_file;
3829 _tmp36_ = g_file_create (_tmp35_, G_FILE_CREATE_NONE, NULL, &_inner_error_);
3830 _tmp37_ = _tmp36_;
3831 _g_object_unref0 (_tmp37_);
3832 if (G_UNLIKELY (_inner_error_ != NULL)) {
3833 goto __catch40_g_error;
3834 }
3835 }
3836 goto __finally40;
3837 __catch40_g_error:
3838 {
3839 GError* err = NULL;
3840 GError* _tmp38_ = NULL;
3841 const gchar* _tmp39_ = NULL;
3842 err = _inner_error_;
3843 _inner_error_ = NULL;
3844 _tmp38_ = err;
3845 _tmp39_ = _tmp38_->message;
3846 g_message ("settings.vala:1128: %s", _tmp39_);
3847 _g_error_free0 (err);
3848 }
3849 __finally40:
3850 if (G_UNLIKELY (_inner_error_ != NULL)) {
3851 _g_object_unref0 (conf_razor_file);
3852 _g_object_unref0 (home_conf_razor_file);
3853 _g_object_unref0 (session_razor_file);
3854 _g_object_unref0 (home_session_razor_file);
3855 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);
3856 g_clear_error (&_inner_error_);
3857 return;
3858 }
3859 }
3860 }
3861 _g_object_unref0 (conf_razor_file);
3862 _g_object_unref0 (home_conf_razor_file);
3863 _g_object_unref0 (session_razor_file);
3864 _g_object_unref0 (home_session_razor_file);
3865 }
3866
3867
lxsession_razor_qt_config_key_file_read_razor_key_value(LxsessionRazorQtConfigKeyFile * self,GKeyFile * kf,const gchar * categorie,const gchar * key1,const gchar * key2,const gchar * type,const gchar * categorie_razor,const gchar * key1_razor,const gchar * key2_razor)3868 void lxsession_razor_qt_config_key_file_read_razor_key_value (LxsessionRazorQtConfigKeyFile* self, GKeyFile* kf, const gchar* categorie, const gchar* key1, const gchar* key2, const gchar* type, const gchar* categorie_razor, const gchar* key1_razor, const gchar* key2_razor) {
3869 gchar* default_variable = NULL;
3870 gchar* final_variable = NULL;
3871 gchar* type_output = NULL;
3872 gchar* item_key = NULL;
3873 const gchar* _tmp0_ = NULL;
3874 gchar* _tmp1_ = NULL;
3875 gchar* _tmp2_ = NULL;
3876 const gchar* _tmp3_ = NULL;
3877 gchar* _tmp4_ = NULL;
3878 gchar* _tmp5_ = NULL;
3879 gchar* _tmp6_ = NULL;
3880 gchar* _tmp7_ = NULL;
3881 const gchar* _tmp8_ = NULL;
3882 gchar* _tmp9_ = NULL;
3883 gchar* _tmp10_ = NULL;
3884 gchar* _tmp11_ = NULL;
3885 gchar* _tmp12_ = NULL;
3886 const gchar* _tmp13_ = NULL;
3887 const gchar* _tmp14_ = NULL;
3888 GQuark _tmp16_ = 0U;
3889 static GQuark _tmp15_label0 = 0;
3890 GHashTable* _tmp23_ = NULL;
3891 gboolean _tmp24_ = FALSE;
3892 g_return_if_fail (self != NULL);
3893 g_return_if_fail (kf != NULL);
3894 g_return_if_fail (categorie != NULL);
3895 g_return_if_fail (key1 != NULL);
3896 g_return_if_fail (type != NULL);
3897 g_return_if_fail (categorie_razor != NULL);
3898 g_return_if_fail (key1_razor != NULL);
3899 default_variable = NULL;
3900 final_variable = NULL;
3901 type_output = NULL;
3902 _tmp0_ = categorie;
3903 _tmp1_ = g_strconcat (_tmp0_, ";", NULL);
3904 _tmp2_ = _tmp1_;
3905 _tmp3_ = key1;
3906 _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
3907 _tmp5_ = _tmp4_;
3908 _tmp6_ = g_strconcat (_tmp5_, ";", NULL);
3909 _tmp7_ = _tmp6_;
3910 _tmp8_ = key2;
3911 _tmp9_ = g_strconcat (_tmp7_, _tmp8_, NULL);
3912 _tmp10_ = _tmp9_;
3913 _tmp11_ = g_strconcat (_tmp10_, ";", NULL);
3914 _tmp12_ = _tmp11_;
3915 _g_free0 (_tmp10_);
3916 _g_free0 (_tmp7_);
3917 _g_free0 (_tmp5_);
3918 _g_free0 (_tmp2_);
3919 item_key = _tmp12_;
3920 _tmp13_ = type;
3921 _tmp14_ = _tmp13_;
3922 _tmp16_ = (NULL == _tmp14_) ? 0 : g_quark_from_string (_tmp14_);
3923 if (_tmp16_ == ((0 != _tmp15_label0) ? _tmp15_label0 : (_tmp15_label0 = g_quark_from_static_string ("string")))) {
3924 switch (0) {
3925 default:
3926 {
3927 GKeyFile* _tmp17_ = NULL;
3928 const gchar* _tmp18_ = NULL;
3929 const gchar* _tmp19_ = NULL;
3930 const gchar* _tmp20_ = NULL;
3931 const gchar* _tmp21_ = NULL;
3932 gchar* _tmp22_ = NULL;
3933 _tmp17_ = kf;
3934 _tmp18_ = categorie_razor;
3935 _tmp19_ = key1_razor;
3936 _tmp20_ = key2_razor;
3937 _tmp21_ = default_variable;
3938 _tmp22_ = lxsession_razor_qt_config_key_file_read_razor_keyfile_bool_value (self, _tmp17_, _tmp18_, _tmp19_, _tmp20_, _tmp21_);
3939 _g_free0 (final_variable);
3940 final_variable = _tmp22_;
3941 break;
3942 }
3943 }
3944 }
3945 _tmp23_ = ((LxsessionLxsessionConfig*) self)->config_item_db;
3946 _tmp24_ = g_hash_table_contains (_tmp23_, item_key);
3947 if (_tmp24_) {
3948 const gchar* _tmp25_ = NULL;
3949 const gchar* _tmp26_ = NULL;
3950 const gchar* _tmp27_ = NULL;
3951 const gchar* _tmp28_ = NULL;
3952 g_message ("settings.vala:1151: Create new config key: %s", item_key);
3953 _tmp25_ = categorie;
3954 _tmp26_ = key1;
3955 _tmp27_ = key2;
3956 _tmp28_ = type;
3957 lxsession_lxsession_config_create_config_item ((LxsessionLxsessionConfig*) self, _tmp25_, _tmp26_, _tmp27_, _tmp28_, NULL);
3958 } else {
3959 const gchar* _tmp29_ = NULL;
3960 const gchar* _tmp30_ = NULL;
3961 const gchar* _tmp31_ = NULL;
3962 gchar* _tmp32_ = NULL;
3963 gchar* _tmp33_ = NULL;
3964 const gchar* _tmp34_ = NULL;
3965 const gchar* _tmp35_ = NULL;
3966 const gchar* _tmp36_ = NULL;
3967 const gchar* _tmp37_ = NULL;
3968 const gchar* _tmp38_ = NULL;
3969 _tmp29_ = categorie;
3970 _tmp30_ = key1;
3971 _tmp31_ = key2;
3972 lxsession_lxsession_config_get_item ((LxsessionLxsessionConfig*) self, _tmp29_, _tmp30_, _tmp31_, &_tmp32_, &_tmp33_);
3973 _g_free0 (default_variable);
3974 default_variable = _tmp32_;
3975 _g_free0 (type_output);
3976 type_output = _tmp33_;
3977 _tmp34_ = categorie;
3978 _tmp35_ = key1;
3979 _tmp36_ = key2;
3980 _tmp37_ = type;
3981 _tmp38_ = final_variable;
3982 lxsession_lxsession_config_set_config_item_value ((LxsessionLxsessionConfig*) self, _tmp34_, _tmp35_, _tmp36_, _tmp37_, _tmp38_);
3983 }
3984 _g_free0 (item_key);
3985 _g_free0 (type_output);
3986 _g_free0 (final_variable);
3987 _g_free0 (default_variable);
3988 }
3989
3990
lxsession_razor_qt_config_key_file_real_read_secondary_keyfile(LxsessionLxsessionConfigKeyFile * base)3991 static void lxsession_razor_qt_config_key_file_real_read_secondary_keyfile (LxsessionLxsessionConfigKeyFile* base) {
3992 LxsessionRazorQtConfigKeyFile * self;
3993 const gchar* _tmp0_ = NULL;
3994 GKeyFile* _tmp1_ = NULL;
3995 GKeyFile* _tmp2_ = NULL;
3996 GKeyFile* _tmp3_ = NULL;
3997 GKeyFile* _tmp4_ = NULL;
3998 GKeyFile* _tmp5_ = NULL;
3999 gchar* _tmp6_ = NULL;
4000 gchar* _tmp7_ = NULL;
4001 gboolean _tmp8_ = FALSE;
4002 GKeyFile* _tmp9_ = NULL;
4003 const gchar* _tmp10_ = NULL;
4004 GKeyFile* _tmp11_ = NULL;
4005 GKeyFile* _tmp12_ = NULL;
4006 GKeyFile* _tmp13_ = NULL;
4007 self = (LxsessionRazorQtConfigKeyFile*) base;
4008 lxsession_lxsession_config_set_generic_default ((LxsessionLxsessionConfig*) self, "Environment", "menu_prefix", NULL, "string", "razor-");
4009 _tmp0_ = self->session_razor_config_path;
4010 _tmp1_ = lxsession_load_keyfile (_tmp0_);
4011 _g_key_file_unref0 (self->kf_session);
4012 self->kf_session = _tmp1_;
4013 _tmp2_ = ((LxsessionLxsessionConfigKeyFile*) self)->kf;
4014 lxsession_razor_qt_config_key_file_read_razor_key_value (self, _tmp2_, "Session", "windows_manager", "command", "string", "General", "windowmanager", NULL);
4015 _tmp3_ = ((LxsessionLxsessionConfigKeyFile*) self)->kf;
4016 lxsession_razor_qt_config_key_file_read_razor_key_value (self, _tmp3_, "Session", "panel", "command", "string", "modules", "razor-panel", NULL);
4017 _tmp4_ = ((LxsessionLxsessionConfigKeyFile*) self)->kf;
4018 lxsession_razor_qt_config_key_file_read_razor_key_value (self, _tmp4_, "Session", "desktop", "command", "string", "modules", "razor-desktop", NULL);
4019 _tmp5_ = ((LxsessionLxsessionConfigKeyFile*) self)->kf;
4020 lxsession_razor_qt_config_key_file_read_razor_key_value (self, _tmp5_, "Session", "launcher_manager", "command", "string", "modules", "razor-runner", NULL);
4021 _tmp6_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) self, "Session", "launcher_manager", "command");
4022 _tmp7_ = _tmp6_;
4023 _tmp8_ = g_strcmp0 (_tmp7_, "razor-runner") == 0;
4024 _g_free0 (_tmp7_);
4025 if (_tmp8_) {
4026 lxsession_lxsession_config_set_config_item_value ((LxsessionLxsessionConfig*) self, "Session", "launcher_manager", "autostart", "string", "true");
4027 }
4028 _tmp9_ = ((LxsessionLxsessionConfigKeyFile*) self)->kf;
4029 lxsession_razor_qt_config_key_file_read_razor_key_value (self, _tmp9_, "Session", "polkit", "command", "string", "modules", "razor-policykit-agent", NULL);
4030 _tmp10_ = self->session_razor_config_path;
4031 _tmp11_ = lxsession_load_keyfile (_tmp10_);
4032 _g_key_file_unref0 (self->kf_conf);
4033 self->kf_conf = _tmp11_;
4034 _tmp12_ = self->kf_conf;
4035 lxsession_razor_qt_config_key_file_read_razor_key_value (self, _tmp12_, "GTK", "sNet", "ThemeName", "string", "Theme", "theme", NULL);
4036 _tmp13_ = self->kf_conf;
4037 lxsession_razor_qt_config_key_file_read_razor_key_value (self, _tmp13_, "GTK", "sNet", "IconThemeName", "string", "Theme", "icon_theme", NULL);
4038 }
4039
4040
lxsession_razor_qt_config_key_file_read_razor_keyfile_bool_value(LxsessionRazorQtConfigKeyFile * self,GKeyFile * keyfile,const gchar * kf_categorie,const gchar * kf_key1,const gchar * kf_key2,const gchar * default_value)4041 gchar* lxsession_razor_qt_config_key_file_read_razor_keyfile_bool_value (LxsessionRazorQtConfigKeyFile* self, GKeyFile* keyfile, const gchar* kf_categorie, const gchar* kf_key1, const gchar* kf_key2, const gchar* default_value) {
4042 gchar* result = NULL;
4043 gchar* copy_value = NULL;
4044 gchar* return_value = NULL;
4045 const gchar* _tmp21_ = NULL;
4046 GError * _inner_error_ = NULL;
4047 g_return_val_if_fail (self != NULL, NULL);
4048 g_return_val_if_fail (keyfile != NULL, NULL);
4049 g_return_val_if_fail (kf_categorie != NULL, NULL);
4050 g_return_val_if_fail (kf_key1 != NULL, NULL);
4051 copy_value = NULL;
4052 return_value = NULL;
4053 {
4054 const gchar* _tmp0_ = NULL;
4055 _tmp0_ = kf_key2;
4056 if (_tmp0_ == NULL) {
4057 gchar* _tmp1_ = NULL;
4058 GKeyFile* _tmp2_ = NULL;
4059 const gchar* _tmp3_ = NULL;
4060 const gchar* _tmp4_ = NULL;
4061 gchar* _tmp5_ = NULL;
4062 gchar* _tmp6_ = NULL;
4063 _tmp2_ = keyfile;
4064 _tmp3_ = kf_categorie;
4065 _tmp4_ = kf_key1;
4066 _tmp5_ = g_key_file_get_value (_tmp2_, _tmp3_, _tmp4_, &_inner_error_);
4067 _tmp1_ = _tmp5_;
4068 if (G_UNLIKELY (_inner_error_ != NULL)) {
4069 if (_inner_error_->domain == G_KEY_FILE_ERROR) {
4070 goto __catch41_g_key_file_error;
4071 }
4072 _g_free0 (return_value);
4073 _g_free0 (copy_value);
4074 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4075 g_clear_error (&_inner_error_);
4076 return NULL;
4077 }
4078 _tmp6_ = _tmp1_;
4079 _tmp1_ = NULL;
4080 _g_free0 (copy_value);
4081 copy_value = _tmp6_;
4082 _g_free0 (_tmp1_);
4083 } else {
4084 gchar* _tmp7_ = NULL;
4085 GKeyFile* _tmp8_ = NULL;
4086 const gchar* _tmp9_ = NULL;
4087 const gchar* _tmp10_ = NULL;
4088 gchar* _tmp11_ = NULL;
4089 gchar* _tmp12_ = NULL;
4090 const gchar* _tmp13_ = NULL;
4091 gchar* _tmp14_ = NULL;
4092 gchar* _tmp15_ = NULL;
4093 gchar* _tmp16_ = NULL;
4094 gchar* _tmp17_ = NULL;
4095 gchar* _tmp18_ = NULL;
4096 _tmp8_ = keyfile;
4097 _tmp9_ = kf_categorie;
4098 _tmp10_ = kf_key1;
4099 _tmp11_ = g_strconcat (_tmp10_, "/", NULL);
4100 _tmp12_ = _tmp11_;
4101 _tmp13_ = kf_key2;
4102 _tmp14_ = g_strconcat (_tmp12_, _tmp13_, NULL);
4103 _tmp15_ = _tmp14_;
4104 _tmp16_ = g_key_file_get_value (_tmp8_, _tmp9_, _tmp15_, &_inner_error_);
4105 _tmp17_ = _tmp16_;
4106 _g_free0 (_tmp15_);
4107 _g_free0 (_tmp12_);
4108 _tmp7_ = _tmp17_;
4109 if (G_UNLIKELY (_inner_error_ != NULL)) {
4110 if (_inner_error_->domain == G_KEY_FILE_ERROR) {
4111 goto __catch41_g_key_file_error;
4112 }
4113 _g_free0 (return_value);
4114 _g_free0 (copy_value);
4115 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4116 g_clear_error (&_inner_error_);
4117 return NULL;
4118 }
4119 _tmp18_ = _tmp7_;
4120 _tmp7_ = NULL;
4121 _g_free0 (copy_value);
4122 copy_value = _tmp18_;
4123 _g_free0 (_tmp7_);
4124 }
4125 }
4126 goto __finally41;
4127 __catch41_g_key_file_error:
4128 {
4129 GError* err = NULL;
4130 GError* _tmp19_ = NULL;
4131 const gchar* _tmp20_ = NULL;
4132 err = _inner_error_;
4133 _inner_error_ = NULL;
4134 _tmp19_ = err;
4135 _tmp20_ = _tmp19_->message;
4136 g_message ("settings.vala:1213: %s", _tmp20_);
4137 _g_error_free0 (err);
4138 }
4139 __finally41:
4140 if (G_UNLIKELY (_inner_error_ != NULL)) {
4141 _g_free0 (return_value);
4142 _g_free0 (copy_value);
4143 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);
4144 g_clear_error (&_inner_error_);
4145 return NULL;
4146 }
4147 _tmp21_ = copy_value;
4148 if (_tmp21_ == NULL) {
4149 const gchar* _tmp22_ = NULL;
4150 gchar* _tmp23_ = NULL;
4151 _tmp22_ = default_value;
4152 _tmp23_ = g_strdup (_tmp22_);
4153 _g_free0 (return_value);
4154 return_value = _tmp23_;
4155 } else {
4156 const gchar* _tmp24_ = NULL;
4157 _tmp24_ = copy_value;
4158 if (g_strcmp0 (_tmp24_, "true") == 0) {
4159 const gchar* _tmp25_ = NULL;
4160 gchar* _tmp26_ = NULL;
4161 _tmp25_ = kf_key1;
4162 _tmp26_ = g_strdup (_tmp25_);
4163 _g_free0 (return_value);
4164 return_value = _tmp26_;
4165 } else {
4166 const gchar* _tmp27_ = NULL;
4167 gchar* _tmp28_ = NULL;
4168 _tmp27_ = default_value;
4169 _tmp28_ = g_strdup (_tmp27_);
4170 _g_free0 (return_value);
4171 return_value = _tmp28_;
4172 }
4173 }
4174 result = return_value;
4175 _g_free0 (copy_value);
4176 return result;
4177 }
4178
4179
lxsession_razor_qt_config_key_file_real_save_secondary_keyfile(LxsessionLxsessionConfigKeyFile * base)4180 static void lxsession_razor_qt_config_key_file_real_save_secondary_keyfile (LxsessionLxsessionConfigKeyFile* base) {
4181 LxsessionRazorQtConfigKeyFile * self;
4182 const gchar* _tmp0_ = NULL;
4183 gchar* _tmp1_ = NULL;
4184 const gchar* _tmp2_ = NULL;
4185 gchar* _tmp3_ = NULL;
4186 GKeyFile* _tmp4_ = NULL;
4187 gchar* _tmp5_ = NULL;
4188 gchar* _tmp6_ = NULL;
4189 gchar* _tmp7_ = NULL;
4190 gchar* _tmp8_ = NULL;
4191 gboolean _tmp9_ = FALSE;
4192 gchar* _tmp12_ = NULL;
4193 gchar* _tmp13_ = NULL;
4194 gboolean _tmp14_ = FALSE;
4195 gchar* _tmp17_ = NULL;
4196 gchar* _tmp18_ = NULL;
4197 gboolean _tmp19_ = FALSE;
4198 gchar* _tmp22_ = NULL;
4199 gchar* _tmp23_ = NULL;
4200 gboolean _tmp24_ = FALSE;
4201 gchar* str_session = NULL;
4202 GKeyFile* _tmp27_ = NULL;
4203 gchar* _tmp28_ = NULL;
4204 gchar* str_conf = NULL;
4205 GKeyFile* _tmp34_ = NULL;
4206 gchar* _tmp35_ = NULL;
4207 GError * _inner_error_ = NULL;
4208 self = (LxsessionRazorQtConfigKeyFile*) base;
4209 _tmp0_ = self->session_razor_config_home_path;
4210 _tmp1_ = g_strdup (_tmp0_);
4211 _g_free0 (self->session_razor_config_path);
4212 self->session_razor_config_path = _tmp1_;
4213 _tmp2_ = self->conf_razor_config_home_path;
4214 _tmp3_ = g_strdup (_tmp2_);
4215 _g_free0 (self->conf_razor_config_path);
4216 self->conf_razor_config_path = _tmp3_;
4217 _tmp4_ = self->kf_session;
4218 _tmp5_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) self, "Session", "windows_manager", "command");
4219 _tmp6_ = _tmp5_;
4220 g_key_file_set_value (_tmp4_, "General", "windowmanager", _tmp6_);
4221 _g_free0 (_tmp6_);
4222 _tmp7_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) self, "Session", "panel", "command");
4223 _tmp8_ = _tmp7_;
4224 _tmp9_ = g_strcmp0 (_tmp8_, "razor-panel") == 0;
4225 _g_free0 (_tmp8_);
4226 if (_tmp9_) {
4227 GKeyFile* _tmp10_ = NULL;
4228 _tmp10_ = self->kf_session;
4229 g_key_file_set_value (_tmp10_, "modules", "razor-panel", "true");
4230 } else {
4231 GKeyFile* _tmp11_ = NULL;
4232 _tmp11_ = self->kf_session;
4233 g_key_file_set_value (_tmp11_, "modules", "razor-panel", "false");
4234 }
4235 _tmp12_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) self, "Session", "desktop", "command");
4236 _tmp13_ = _tmp12_;
4237 _tmp14_ = g_strcmp0 (_tmp13_, "razor-desktop") == 0;
4238 _g_free0 (_tmp13_);
4239 if (_tmp14_) {
4240 GKeyFile* _tmp15_ = NULL;
4241 _tmp15_ = self->kf_session;
4242 g_key_file_set_value (_tmp15_, "modules", "razor-desktop", "true");
4243 } else {
4244 GKeyFile* _tmp16_ = NULL;
4245 _tmp16_ = self->kf_session;
4246 g_key_file_set_value (_tmp16_, "modules", "razor-desktop", "false");
4247 }
4248 _tmp17_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) self, "Session", "launcher_manager", "command");
4249 _tmp18_ = _tmp17_;
4250 _tmp19_ = g_strcmp0 (_tmp18_, "razor-runner") == 0;
4251 _g_free0 (_tmp18_);
4252 if (_tmp19_) {
4253 GKeyFile* _tmp20_ = NULL;
4254 _tmp20_ = self->kf_session;
4255 g_key_file_set_value (_tmp20_, "modules", "razor-runner", "true");
4256 } else {
4257 GKeyFile* _tmp21_ = NULL;
4258 _tmp21_ = self->kf_session;
4259 g_key_file_set_value (_tmp21_, "modules", "razor-runner", "false");
4260 }
4261 _tmp22_ = lxsession_lxsession_config_get_item_string ((LxsessionLxsessionConfig*) self, "Session", "polkit", "command");
4262 _tmp23_ = _tmp22_;
4263 _tmp24_ = g_strcmp0 (_tmp23_, "razor-policykit-agent") == 0;
4264 _g_free0 (_tmp23_);
4265 if (_tmp24_) {
4266 GKeyFile* _tmp25_ = NULL;
4267 _tmp25_ = self->kf_session;
4268 g_key_file_set_value (_tmp25_, "modules", "razor-policykit-agent", "true");
4269 } else {
4270 GKeyFile* _tmp26_ = NULL;
4271 _tmp26_ = self->kf_session;
4272 g_key_file_set_value (_tmp26_, "modules", "razor-policykit-agent", "false");
4273 }
4274 g_message ("settings.vala:1284: Saving razor session file");
4275 _tmp27_ = self->kf_session;
4276 _tmp28_ = g_key_file_to_data (_tmp27_, NULL, NULL);
4277 str_session = _tmp28_;
4278 {
4279 const gchar* _tmp29_ = NULL;
4280 gint _tmp30_ = 0;
4281 gint _tmp31_ = 0;
4282 _tmp29_ = self->session_razor_config_path;
4283 _tmp30_ = strlen (str_session);
4284 _tmp31_ = _tmp30_;
4285 g_file_set_contents (_tmp29_, str_session, (gssize) _tmp31_, &_inner_error_);
4286 if (G_UNLIKELY (_inner_error_ != NULL)) {
4287 if (_inner_error_->domain == G_FILE_ERROR) {
4288 goto __catch42_g_file_error;
4289 }
4290 _g_free0 (str_session);
4291 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4292 g_clear_error (&_inner_error_);
4293 return;
4294 }
4295 }
4296 goto __finally42;
4297 __catch42_g_file_error:
4298 {
4299 GError* err = NULL;
4300 GError* _tmp32_ = NULL;
4301 const gchar* _tmp33_ = NULL;
4302 err = _inner_error_;
4303 _inner_error_ = NULL;
4304 _tmp32_ = err;
4305 _tmp33_ = _tmp32_->message;
4306 g_warning ("settings.vala:1292: %s", _tmp33_);
4307 _g_error_free0 (err);
4308 }
4309 __finally42:
4310 if (G_UNLIKELY (_inner_error_ != NULL)) {
4311 _g_free0 (str_session);
4312 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);
4313 g_clear_error (&_inner_error_);
4314 return;
4315 }
4316 g_message ("settings.vala:1295: Saving razor conf file");
4317 _tmp34_ = self->kf_conf;
4318 _tmp35_ = g_key_file_to_data (_tmp34_, NULL, NULL);
4319 str_conf = _tmp35_;
4320 {
4321 const gchar* _tmp36_ = NULL;
4322 gint _tmp37_ = 0;
4323 gint _tmp38_ = 0;
4324 _tmp36_ = self->conf_razor_config_path;
4325 _tmp37_ = strlen (str_conf);
4326 _tmp38_ = _tmp37_;
4327 g_file_set_contents (_tmp36_, str_conf, (gssize) _tmp38_, &_inner_error_);
4328 if (G_UNLIKELY (_inner_error_ != NULL)) {
4329 if (_inner_error_->domain == G_FILE_ERROR) {
4330 goto __catch43_g_file_error;
4331 }
4332 _g_free0 (str_conf);
4333 _g_free0 (str_session);
4334 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4335 g_clear_error (&_inner_error_);
4336 return;
4337 }
4338 }
4339 goto __finally43;
4340 __catch43_g_file_error:
4341 {
4342 GError* err = NULL;
4343 GError* _tmp39_ = NULL;
4344 const gchar* _tmp40_ = NULL;
4345 err = _inner_error_;
4346 _inner_error_ = NULL;
4347 _tmp39_ = err;
4348 _tmp40_ = _tmp39_->message;
4349 g_warning ("settings.vala:1303: %s", _tmp40_);
4350 _g_error_free0 (err);
4351 }
4352 __finally43:
4353 if (G_UNLIKELY (_inner_error_ != NULL)) {
4354 _g_free0 (str_conf);
4355 _g_free0 (str_session);
4356 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);
4357 g_clear_error (&_inner_error_);
4358 return;
4359 }
4360 _g_free0 (str_conf);
4361 _g_free0 (str_session);
4362 }
4363
4364
lxsession_razor_qt_config_key_file_class_init(LxsessionRazorQtConfigKeyFileClass * klass)4365 static void lxsession_razor_qt_config_key_file_class_init (LxsessionRazorQtConfigKeyFileClass * klass) {
4366 lxsession_razor_qt_config_key_file_parent_class = g_type_class_peek_parent (klass);
4367 ((LxsessionLxsessionConfigKeyFileClass *) klass)->read_secondary_keyfile = (void (*)(LxsessionLxsessionConfigKeyFile*)) lxsession_razor_qt_config_key_file_real_read_secondary_keyfile;
4368 ((LxsessionLxsessionConfigKeyFileClass *) klass)->save_secondary_keyfile = (void (*)(LxsessionLxsessionConfigKeyFile*)) lxsession_razor_qt_config_key_file_real_save_secondary_keyfile;
4369 G_OBJECT_CLASS (klass)->finalize = lxsession_razor_qt_config_key_file_finalize;
4370 }
4371
4372
lxsession_razor_qt_config_key_file_instance_init(LxsessionRazorQtConfigKeyFile * self)4373 static void lxsession_razor_qt_config_key_file_instance_init (LxsessionRazorQtConfigKeyFile * self) {
4374 GKeyFile* _tmp0_ = NULL;
4375 GKeyFile* _tmp1_ = NULL;
4376 _tmp0_ = g_key_file_new ();
4377 self->kf_session = _tmp0_;
4378 _tmp1_ = g_key_file_new ();
4379 self->kf_conf = _tmp1_;
4380 }
4381
4382
lxsession_razor_qt_config_key_file_finalize(GObject * obj)4383 static void lxsession_razor_qt_config_key_file_finalize (GObject* obj) {
4384 LxsessionRazorQtConfigKeyFile * self;
4385 self = G_TYPE_CHECK_INSTANCE_CAST (obj, LXSESSION_TYPE_RAZOR_QT_CONFIG_KEY_FILE, LxsessionRazorQtConfigKeyFile);
4386 _g_key_file_unref0 (self->kf_session);
4387 _g_free0 (self->session_razor_config_path);
4388 _g_free0 (self->session_razor_config_home_path);
4389 _g_object_unref0 (self->session_razor_file);
4390 _g_object_unref0 (self->home_session_razor_file);
4391 _g_key_file_unref0 (self->kf_conf);
4392 _g_free0 (self->conf_razor_config_path);
4393 _g_free0 (self->conf_razor_config_home_path);
4394 _g_object_unref0 (self->confrazor_file);
4395 _g_object_unref0 (self->home_conf_razor_file);
4396 G_OBJECT_CLASS (lxsession_razor_qt_config_key_file_parent_class)->finalize (obj);
4397 }
4398
4399
lxsession_razor_qt_config_key_file_get_type(void)4400 GType lxsession_razor_qt_config_key_file_get_type (void) {
4401 static volatile gsize lxsession_razor_qt_config_key_file_type_id__volatile = 0;
4402 if (g_once_init_enter (&lxsession_razor_qt_config_key_file_type_id__volatile)) {
4403 static const GTypeInfo g_define_type_info = { sizeof (LxsessionRazorQtConfigKeyFileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) lxsession_razor_qt_config_key_file_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LxsessionRazorQtConfigKeyFile), 0, (GInstanceInitFunc) lxsession_razor_qt_config_key_file_instance_init, NULL };
4404 GType lxsession_razor_qt_config_key_file_type_id;
4405 lxsession_razor_qt_config_key_file_type_id = g_type_register_static (LXSESSION_TYPE_LXSESSION_CONFIG_KEY_FILE, "LxsessionRazorQtConfigKeyFile", &g_define_type_info, 0);
4406 g_once_init_leave (&lxsession_razor_qt_config_key_file_type_id__volatile, lxsession_razor_qt_config_key_file_type_id);
4407 }
4408 return lxsession_razor_qt_config_key_file_type_id__volatile;
4409 }
4410
4411
_vala_array_destroy(gpointer array,gint array_length,GDestroyNotify destroy_func)4412 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
4413 if ((array != NULL) && (destroy_func != NULL)) {
4414 int i;
4415 for (i = 0; i < array_length; i = i + 1) {
4416 if (((gpointer*) array)[i] != NULL) {
4417 destroy_func (((gpointer*) array)[i]);
4418 }
4419 }
4420 }
4421 }
4422
4423
_vala_array_free(gpointer array,gint array_length,GDestroyNotify destroy_func)4424 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
4425 _vala_array_destroy (array, array_length, destroy_func);
4426 g_free (array);
4427 }
4428
4429
_vala_array_length(gpointer array)4430 static gint _vala_array_length (gpointer array) {
4431 int length;
4432 length = 0;
4433 if (array) {
4434 while (((gpointer*) array)[length]) {
4435 length++;
4436 }
4437 }
4438 return length;
4439 }
4440
4441
4442
4443