comparison pidgin/gtkprefs.c @ 28967:afbf1c6210d7

Fix some stuff in the prefs dialog on Win32
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 17 Nov 2009 16:32:20 +0000
parents 55db64cc2fdc
children 7141673bd785
comparison
equal deleted inserted replaced
28966:0fd6d016c474 28967:afbf1c6210d7
1425 gtk_widget_show_all(ret); 1425 gtk_widget_show_all(ret);
1426 g_object_unref(sg); 1426 g_object_unref(sg);
1427 return ret; 1427 return ret;
1428 } 1428 }
1429 1429
1430 #ifdef _WIN32
1431 static void
1432 pidgin_custom_font_set(GtkFontButton *font_button, gpointer nul)
1433 {
1434 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/custom_font",
1435 gtk_font_button_get_font_name(font_button))
1436 ;
1437 }
1438 #endif
1439
1430 static GtkWidget * 1440 static GtkWidget *
1431 conv_page(void) 1441 conv_page(void)
1432 { 1442 {
1433 GtkWidget *ret; 1443 GtkWidget *ret;
1434 GtkWidget *vbox; 1444 GtkWidget *vbox;
1474 _("Minimum input area height in lines:"), 1484 _("Minimum input area height in lines:"),
1475 PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines", 1485 PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines",
1476 1, 8, NULL); 1486 1, 8, NULL);
1477 1487
1478 #if GTK_CHECK_VERSION(2,4,0) && defined _WIN32 1488 #if GTK_CHECK_VERSION(2,4,0) && defined _WIN32
1489 {
1490 GtkWidget *fontpref, *font_button, *hbox;
1491 const char *font_name;
1479 vbox = pidgin_make_frame(ret, _("Font")); 1492 vbox = pidgin_make_frame(ret, _("Font"));
1480 1493
1481 fontpref = pidgin_prefs_checkbox(_("Use font from _theme"), 1494 fontpref = pidgin_prefs_checkbox(_("Use font from _theme"),
1482 PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox); 1495 PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox);
1483 1496
1492 hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Conversation _font:"), NULL, font_button, FALSE, NULL); 1505 hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Conversation _font:"), NULL, font_button, FALSE, NULL);
1493 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) 1506 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font"))
1494 gtk_widget_set_sensitive(hbox, FALSE); 1507 gtk_widget_set_sensitive(hbox, FALSE);
1495 g_signal_connect(G_OBJECT(fontpref), "clicked", G_CALLBACK(pidgin_toggle_sensitive), hbox); 1508 g_signal_connect(G_OBJECT(fontpref), "clicked", G_CALLBACK(pidgin_toggle_sensitive), hbox);
1496 g_signal_connect(G_OBJECT(font_button), "font-set", G_CALLBACK(pidgin_custom_font_set), NULL); 1509 g_signal_connect(G_OBJECT(font_button), "font-set", G_CALLBACK(pidgin_custom_font_set), NULL);
1510
1511 }
1497 #endif 1512 #endif
1498 1513
1499 vbox = pidgin_make_frame(ret, _("Default Formatting")); 1514 vbox = pidgin_make_frame(ret, _("Default Formatting"));
1500 gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, GTK_PACK_START); 1515 gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, GTK_PACK_START);
1501 1516
1619 1634
1620 purple_notify_error(NULL, NULL, _("Cannot start proxy configuration program."), err->message); 1635 purple_notify_error(NULL, NULL, _("Cannot start proxy configuration program."), err->message);
1621 g_error_free(err); 1636 g_error_free(err);
1622 } 1637 }
1623 1638
1639 #ifndef _WIN32
1624 static void 1640 static void
1625 browser_button_clicked_cb(GtkWidget *button, gpointer null) 1641 browser_button_clicked_cb(GtkWidget *button, gpointer null)
1626 { 1642 {
1627 GError *err = NULL; 1643 GError *err = NULL;
1628 1644
1630 return; 1646 return;
1631 1647
1632 purple_notify_error(NULL, NULL, _("Cannot start browser configuration program."), err->message); 1648 purple_notify_error(NULL, NULL, _("Cannot start browser configuration program."), err->message);
1633 g_error_free(err); 1649 g_error_free(err);
1634 } 1650 }
1651 #endif
1635 1652
1636 static void 1653 static void
1637 auto_ip_button_clicked_cb(GtkWidget *button, gpointer null) 1654 auto_ip_button_clicked_cb(GtkWidget *button, gpointer null)
1638 { 1655 {
1639 const char *ip; 1656 const char *ip;
2400 2417
2401 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 2418 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
2402 2419
2403 vbox2 = pidgin_make_frame(ret, _("Sound Options")); 2420 vbox2 = pidgin_make_frame(ret, _("Sound Options"));
2404 2421
2422 vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
2423 gtk_box_pack_start(GTK_BOX(vbox2), vbox, FALSE, FALSE, 0);
2424
2405 #ifndef _WIN32 2425 #ifndef _WIN32
2406 dd = pidgin_prefs_dropdown(vbox2, _("_Method:"), PURPLE_PREF_STRING, 2426 dd = pidgin_prefs_dropdown(vbox2, _("_Method:"), PURPLE_PREF_STRING,
2407 PIDGIN_PREFS_ROOT "/sound/method", 2427 PIDGIN_PREFS_ROOT "/sound/method",
2408 _("Console beep"), "beep", 2428 _("Console beep"), "beep",
2409 #ifdef USE_GSTREAMER 2429 #ifdef USE_GSTREAMER
2414 _("Command"), "custom", 2434 _("Command"), "custom",
2415 _("No sounds"), "none", 2435 _("No sounds"), "none",
2416 NULL); 2436 NULL);
2417 gtk_size_group_add_widget(sg, dd); 2437 gtk_size_group_add_widget(sg, dd);
2418 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5); 2438 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5);
2419
2420 vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
2421 gtk_box_pack_start(GTK_BOX(vbox2), vbox, FALSE, FALSE, 0);
2422 2439
2423 entry = gtk_entry_new(); 2440 entry = gtk_entry_new();
2424 gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE); 2441 gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE);
2425 cmd = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/sound/command"); 2442 cmd = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/sound/command");
2426 if(cmd) 2443 if(cmd)