| 280 {"mouse", GNT_STYLE_MOUSE}, |
281 {"mouse", GNT_STYLE_MOUSE}, |
| 281 {"wm", GNT_STYLE_WM}, |
282 {"wm", GNT_STYLE_WM}, |
| 282 {"remember_position", GNT_STYLE_REMPOS}, |
283 {"remember_position", GNT_STYLE_REMPOS}, |
| 283 {NULL, 0}}; |
284 {NULL, 0}}; |
| 284 |
285 |
| |
286 if (prgname && *prgname) |
| |
287 keys = g_key_file_get_keys(kfile, prgname, &nkeys, NULL); |
| |
288 |
| |
289 if (keys == NULL) { |
| |
290 prgname = "general"; |
| |
291 keys = g_key_file_get_keys(kfile, prgname, &nkeys, &error); |
| |
292 } |
| |
293 |
| 285 if (error) |
294 if (error) |
| 286 { |
295 { |
| 287 g_printerr("GntStyle: %s\n", error->message); |
296 g_printerr("GntStyle: %s\n", error->message); |
| 288 g_error_free(error); |
297 g_error_free(error); |
| 289 } |
298 } |
| 290 else |
299 else |
| 291 { |
300 { |
| 292 for (i = 0; styles[i].style; i++) |
301 for (i = 0; styles[i].style; i++) |
| 293 { |
302 { |
| 294 str_styles[styles[i].en] = |
303 str_styles[styles[i].en] = |
| 295 g_key_file_get_string(kfile, "general", styles[i].style, NULL); |
304 g_key_file_get_string(kfile, prgname, styles[i].style, NULL); |
| 296 } |
305 } |
| 297 } |
306 } |
| 298 g_strfreev(keys); |
307 g_strfreev(keys); |
| 299 } |
308 } |
| 300 #endif |
309 #endif |