| 322 static void |
322 static void |
| 323 pidgin_about_dialog_load_gtk_settings(PidginAboutDialog *about) { |
323 pidgin_about_dialog_load_gtk_settings(PidginAboutDialog *about) { |
| 324 GtkTreeIter section, iter; |
324 GtkTreeIter section, iter; |
| 325 gchar *markup = NULL; |
325 gchar *markup = NULL; |
| 326 gchar *cursor_theme_name = NULL, *theme_name = NULL; |
326 gchar *cursor_theme_name = NULL, *theme_name = NULL; |
| 327 gchar *icon_theme_name = NULL, *fallback_icon_theme = NULL; |
327 gchar *icon_theme_name = NULL; |
| 328 gchar *im_module = NULL; |
328 gchar *im_module = NULL; |
| 329 gchar *key_theme_name = NULL, *sound_theme_name = NULL; |
329 gchar *sound_theme_name = NULL; |
| 330 gboolean enable_animations = FALSE; |
330 gboolean enable_animations = FALSE; |
| 331 gboolean shell_shows_app_menu = FALSE, shell_shows_menubar = FALSE; |
331 gboolean shell_shows_app_menu = FALSE, shell_shows_menubar = FALSE; |
| 332 |
332 |
| 333 /* create the section */ |
333 /* create the section */ |
| 334 markup = g_strdup_printf("<b>%s</b>", _("GTK Settings")); |
334 markup = g_strdup_printf("<b>%s</b>", _("GTK Settings")); |
| 341 /* get the settings we're interested in */ |
341 /* get the settings we're interested in */ |
| 342 g_object_get( |
342 g_object_get( |
| 343 gtk_settings_get_default(), |
343 gtk_settings_get_default(), |
| 344 "gtk-cursor-theme-name", &cursor_theme_name, |
344 "gtk-cursor-theme-name", &cursor_theme_name, |
| 345 "gtk-enable-animations", &enable_animations, |
345 "gtk-enable-animations", &enable_animations, |
| 346 "gtk-fallback-icon-theme", &fallback_icon_theme, |
|
| 347 "gtk-icon-theme-name", &icon_theme_name, |
346 "gtk-icon-theme-name", &icon_theme_name, |
| 348 "gtk-im-module", &im_module, |
347 "gtk-im-module", &im_module, |
| 349 "gtk-key-theme-name", &key_theme_name, |
|
| 350 "gtk-shell-shows-app-menu", &shell_shows_app_menu, |
348 "gtk-shell-shows-app-menu", &shell_shows_app_menu, |
| 351 "gtk-shell-shows-menubar", &shell_shows_menubar, |
349 "gtk-shell-shows-menubar", &shell_shows_menubar, |
| 352 "gtk-sound-theme-name", &sound_theme_name, |
350 "gtk-sound-theme-name", &sound_theme_name, |
| 353 "gtk-theme-name", &theme_name, |
351 "gtk-theme-name", &theme_name, |
| 354 NULL); |
352 NULL); |
| 365 1, enable_animations ? _("yes") : _("no"), |
363 1, enable_animations ? _("yes") : _("no"), |
| 366 -1); |
364 -1); |
| 367 |
365 |
| 368 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
366 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
| 369 gtk_tree_store_set(about->build_info_store, &iter, |
367 gtk_tree_store_set(about->build_info_store, &iter, |
| 370 0, "gtk-fallback-icon-theme", |
|
| 371 1, (fallback_icon_theme != NULL) ? fallback_icon_theme : _("(not set)"), |
|
| 372 -1); |
|
| 373 |
|
| 374 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
|
| 375 gtk_tree_store_set(about->build_info_store, &iter, |
|
| 376 0, "gtk-icon-theme-name", |
368 0, "gtk-icon-theme-name", |
| 377 1, (icon_theme_name != NULL) ? icon_theme_name : _("(not set)"), |
369 1, (icon_theme_name != NULL) ? icon_theme_name : _("(not set)"), |
| 378 -1); |
370 -1); |
| 379 |
371 |
| 380 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
372 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
| 383 1, (im_module != NULL) ? im_module : _("(not set)"), |
375 1, (im_module != NULL) ? im_module : _("(not set)"), |
| 384 -1); |
376 -1); |
| 385 |
377 |
| 386 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
378 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
| 387 gtk_tree_store_set(about->build_info_store, &iter, |
379 gtk_tree_store_set(about->build_info_store, &iter, |
| 388 0, "gtk-key-theme-name", |
|
| 389 1, (key_theme_name != NULL) ? key_theme_name : _("(not set)"), |
|
| 390 -1); |
|
| 391 |
|
| 392 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
|
| 393 gtk_tree_store_set(about->build_info_store, &iter, |
|
| 394 0, "gtk-shell-shows-app-menu", |
380 0, "gtk-shell-shows-app-menu", |
| 395 1, shell_shows_app_menu ? _("yes") : _("no"), |
381 1, shell_shows_app_menu ? _("yes") : _("no"), |
| 396 -1); |
382 -1); |
| 397 |
383 |
| 398 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
384 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
| 412 0, "gtk-theme-name", |
398 0, "gtk-theme-name", |
| 413 1, (theme_name != NULL) ? theme_name : _("(not set)"), |
399 1, (theme_name != NULL) ? theme_name : _("(not set)"), |
| 414 -1); |
400 -1); |
| 415 |
401 |
| 416 g_free(cursor_theme_name); |
402 g_free(cursor_theme_name); |
| 417 g_free(fallback_icon_theme); |
|
| 418 g_free(icon_theme_name); |
403 g_free(icon_theme_name); |
| 419 g_free(im_module); |
404 g_free(im_module); |
| 420 g_free(key_theme_name); |
|
| 421 g_free(sound_theme_name); |
405 g_free(sound_theme_name); |
| 422 g_free(theme_name); |
406 g_free(theme_name); |
| 423 } |
407 } |
| 424 |
408 |
| 425 static void |
409 static void |
| 442 while(paths != NULL) { |
426 while(paths != NULL) { |
| 443 GtkTreeIter iter; |
427 GtkTreeIter iter; |
| 444 |
428 |
| 445 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
429 gtk_tree_store_append(about->build_info_store, &iter, §ion); |
| 446 gtk_tree_store_set(about->build_info_store, &iter, |
430 gtk_tree_store_set(about->build_info_store, &iter, |
| 447 0, (gchar*)(paths->data), |
431 1, (gchar*)(paths->data), |
| 448 -1); |
432 -1); |
| 449 |
433 |
| 450 paths = paths->next; |
434 paths = paths->next; |
| 451 } |
435 } |
| 452 } |
436 } |
| 510 pidgin_about_dialog_response_cb(GtkDialog *dialog, gint response_id, |
494 pidgin_about_dialog_response_cb(GtkDialog *dialog, gint response_id, |
| 511 G_GNUC_UNUSED gpointer data) |
495 G_GNUC_UNUSED gpointer data) |
| 512 { |
496 { |
| 513 switch(response_id) { |
497 switch(response_id) { |
| 514 case GTK_RESPONSE_CLOSE: |
498 case GTK_RESPONSE_CLOSE: |
| |
499 case GTK_RESPONSE_DELETE_EVENT: |
| 515 gtk_window_destroy(GTK_WINDOW(dialog)); |
500 gtk_window_destroy(GTK_WINDOW(dialog)); |
| 516 break; |
501 break; |
| 517 } |
502 } |
| 518 } |
503 } |
| 519 |
504 |