Mercurial > pidgin.yaz
comparison pidgin/gtkprefs.c @ 29623:3c9534e77ea1
propagate from branch 'im.pidgin.pidgin' (head 53ad409302bf312b4f1e4153f893f1350638c8c9)
to branch 'im.pidgin.pidgin.next.minor' (head e36acc862ca620a7afc746236306cb0eba4ca37a)
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Mon, 02 Nov 2009 03:18:15 +0000 |
parents | 532307346255 e3206d6da6c7 |
children | be31e811cb26 |
comparison
equal
deleted
inserted
replaced
28858:532307346255 | 29623:3c9534e77ea1 |
---|---|
1532 PIDGIN_PREFS_ROOT "/conversations/tab_side", | 1532 PIDGIN_PREFS_ROOT "/conversations/tab_side", |
1533 _("Top"), GTK_POS_TOP, | 1533 _("Top"), GTK_POS_TOP, |
1534 _("Bottom"), GTK_POS_BOTTOM, | 1534 _("Bottom"), GTK_POS_BOTTOM, |
1535 _("Left"), GTK_POS_LEFT, | 1535 _("Left"), GTK_POS_LEFT, |
1536 _("Right"), GTK_POS_RIGHT, | 1536 _("Right"), GTK_POS_RIGHT, |
1537 #if GTK_CHECK_VERSION(2,6,0) | |
1538 _("Left Vertical"), GTK_POS_LEFT|8, | 1537 _("Left Vertical"), GTK_POS_LEFT|8, |
1539 _("Right Vertical"), GTK_POS_RIGHT|8, | 1538 _("Right Vertical"), GTK_POS_RIGHT|8, |
1540 #endif | |
1541 NULL); | 1539 NULL); |
1542 gtk_size_group_add_widget(sg, label); | 1540 gtk_size_group_add_widget(sg, label); |
1543 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); | 1541 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
1544 | 1542 |
1545 names = pidgin_conv_placement_get_options(); | 1543 names = pidgin_conv_placement_get_options(); |
1556 gtk_widget_show_all(ret); | 1554 gtk_widget_show_all(ret); |
1557 g_object_unref(sg); | 1555 g_object_unref(sg); |
1558 return ret; | 1556 return ret; |
1559 } | 1557 } |
1560 | 1558 |
1561 #if GTK_CHECK_VERSION(2,4,0) | |
1562 static void | 1559 static void |
1563 pidgin_custom_font_set(GtkFontButton *font_button, gpointer nul) | 1560 pidgin_custom_font_set(GtkFontButton *font_button, gpointer nul) |
1564 { | 1561 { |
1565 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/custom_font", | 1562 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/custom_font", |
1566 gtk_font_button_get_font_name(font_button)); | 1563 gtk_font_button_get_font_name(font_button)); |
1567 } | 1564 } |
1568 #endif | |
1569 | 1565 |
1570 static GtkWidget * | 1566 static GtkWidget * |
1571 conv_page(void) | 1567 conv_page(void) |
1572 { | 1568 { |
1573 GtkWidget *ret; | 1569 GtkWidget *ret; |
1577 GtkWidget *iconpref2; | 1573 GtkWidget *iconpref2; |
1578 GtkWidget *fontpref; | 1574 GtkWidget *fontpref; |
1579 GtkWidget *imhtml; | 1575 GtkWidget *imhtml; |
1580 GtkWidget *frame; | 1576 GtkWidget *frame; |
1581 | 1577 |
1582 #if GTK_CHECK_VERSION(2,4,0) | |
1583 GtkWidget *hbox; | 1578 GtkWidget *hbox; |
1584 GtkWidget *font_button; | 1579 GtkWidget *font_button; |
1585 const char *font_name; | 1580 const char *font_name; |
1586 #endif | |
1587 | 1581 |
1588 ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); | 1582 ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
1589 gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); | 1583 gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); |
1590 | 1584 |
1591 vbox = pidgin_make_frame(ret, _("Conversations")); | 1585 vbox = pidgin_make_frame(ret, _("Conversations")); |
1620 pidgin_prefs_labeled_spin_button(vbox, | 1614 pidgin_prefs_labeled_spin_button(vbox, |
1621 _("Minimum input area height in lines:"), | 1615 _("Minimum input area height in lines:"), |
1622 PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines", | 1616 PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines", |
1623 1, 8, NULL); | 1617 1, 8, NULL); |
1624 | 1618 |
1625 #if GTK_CHECK_VERSION(2,4,0) | |
1626 vbox = pidgin_make_frame(ret, _("Font")); | 1619 vbox = pidgin_make_frame(ret, _("Font")); |
1627 if (purple_running_gnome()) | 1620 if (purple_running_gnome()) |
1628 fontpref = pidgin_prefs_checkbox(_("Use document font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox); | 1621 fontpref = pidgin_prefs_checkbox(_("Use document font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox); |
1629 else | 1622 else |
1630 fontpref = pidgin_prefs_checkbox(_("Use font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox); | 1623 fontpref = pidgin_prefs_checkbox(_("Use font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox); |
1640 hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Conversation _font:"), NULL, font_button, FALSE, NULL); | 1633 hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Conversation _font:"), NULL, font_button, FALSE, NULL); |
1641 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) | 1634 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_font")) |
1642 gtk_widget_set_sensitive(hbox, FALSE); | 1635 gtk_widget_set_sensitive(hbox, FALSE); |
1643 g_signal_connect(G_OBJECT(fontpref), "clicked", G_CALLBACK(pidgin_toggle_sensitive), hbox); | 1636 g_signal_connect(G_OBJECT(fontpref), "clicked", G_CALLBACK(pidgin_toggle_sensitive), hbox); |
1644 g_signal_connect(G_OBJECT(font_button), "font-set", G_CALLBACK(pidgin_custom_font_set), NULL); | 1637 g_signal_connect(G_OBJECT(font_button), "font-set", G_CALLBACK(pidgin_custom_font_set), NULL); |
1645 #endif | |
1646 | 1638 |
1647 vbox = pidgin_make_frame(ret, _("Default Formatting")); | 1639 vbox = pidgin_make_frame(ret, _("Default Formatting")); |
1648 gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, GTK_PACK_START); | 1640 gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, GTK_PACK_START); |
1649 | 1641 |
1650 frame = pidgin_create_imhtml(TRUE, &imhtml, &toolbar, NULL); | 1642 frame = pidgin_create_imhtml(TRUE, &imhtml, &toolbar, NULL); |
2827 } | 2819 } |
2828 | 2820 |
2829 static int | 2821 static int |
2830 prefs_notebook_add_page(const char *text, GtkWidget *page, int ind) | 2822 prefs_notebook_add_page(const char *text, GtkWidget *page, int ind) |
2831 { | 2823 { |
2832 #if GTK_CHECK_VERSION(2,4,0) | |
2833 return gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); | 2824 return gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); |
2834 #else | |
2835 gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); | |
2836 return gtk_notebook_page_num(GTK_NOTEBOOK(prefsnotebook), page); | |
2837 #endif | |
2838 } | 2825 } |
2839 | 2826 |
2840 static void | 2827 static void |
2841 prefs_notebook_init(void) | 2828 prefs_notebook_init(void) |
2842 { | 2829 { |