Mercurial > pidgin
comparison src/gtkprefs.c @ 9118:2063f8de8f93
[gaim-migrate @ 9895]
prefs tweakification
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 28 May 2004 20:36:32 +0000 |
parents | e46a845a573c |
children | 6ea36eac6f22 |
comparison
equal
deleted
inserted
replaced
9117:10a1cd720ac6 | 9118:2063f8de8f93 |
---|---|
1699 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); | 1699 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
1700 | 1700 |
1701 hbox = gtk_hbox_new(FALSE, 5); | 1701 hbox = gtk_hbox_new(FALSE, 5); |
1702 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | 1702 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
1703 | 1703 |
1704 hbox = gtk_hbox_new(FALSE, 5); | |
1705 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
1706 label = gtk_label_new_with_mnemonic(_("Sound c_ommand:\n(%s for filename)")); | 1704 label = gtk_label_new_with_mnemonic(_("Sound c_ommand:\n(%s for filename)")); |
1707 gtk_size_group_add_widget(sg, label); | 1705 gtk_size_group_add_widget(sg, label); |
1708 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 1706 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
1709 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | 1707 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
1710 | 1708 |
1730 gaim_set_accessible_label (entry, label); | 1728 gaim_set_accessible_label (entry, label); |
1731 #endif /* _WIN32 */ | 1729 #endif /* _WIN32 */ |
1732 | 1730 |
1733 vbox = gaim_gtk_make_frame(ret, _("Sound Events")); | 1731 vbox = gaim_gtk_make_frame(ret, _("Sound Events")); |
1734 | 1732 |
1733 /* The following is an ugly hack to make the frame expand so the | |
1734 * sound events list is big enough to be usable */ | |
1735 gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, | |
1736 GTK_PACK_START); | |
1737 gtk_box_set_child_packing(GTK_BOX(vbox->parent->parent), vbox->parent, TRUE, | |
1738 TRUE, 0, GTK_PACK_START); | |
1739 gtk_box_set_child_packing(GTK_BOX(vbox->parent->parent->parent), | |
1740 vbox->parent->parent, TRUE, TRUE, 0, GTK_PACK_START); | |
1741 | |
1735 sw = gtk_scrolled_window_new(NULL,NULL); | 1742 sw = gtk_scrolled_window_new(NULL,NULL); |
1736 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | 1743 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); |
1737 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | 1744 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
1738 | 1745 |
1739 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); | 1746 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); |
1740 event_store = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); | 1747 event_store = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); |
1741 | 1748 |
1742 for (j=0; j < GAIM_NUM_SOUNDS; j++) { | 1749 for (j=0; j < GAIM_NUM_SOUNDS; j++) { |
1743 char *pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s", | 1750 char *pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s", |
1744 gaim_gtk_sound_get_event_option(j)); | 1751 gaim_gtk_sound_get_event_option(j)); |
1745 const char *label = gaim_gtk_sound_get_event_label(j); | 1752 const char *label = gaim_gtk_sound_get_event_label(j); |
1746 | 1753 |
1747 if (label == NULL) { | 1754 if (label == NULL) { |
1748 g_free(pref); | 1755 g_free(pref); |
1749 continue; | 1756 continue; |
1750 } | 1757 } |
1751 | 1758 |
1752 gtk_list_store_append (event_store, &iter); | 1759 gtk_list_store_append (event_store, &iter); |
1753 gtk_list_store_set(event_store, &iter, | 1760 gtk_list_store_set(event_store, &iter, |
1754 0, gaim_prefs_get_bool(pref), | 1761 0, gaim_prefs_get_bool(pref), |
1755 1, _(label), | 1762 1, _(label), |
1756 2, pref, | 1763 2, pref, |
1775 col = gtk_tree_view_column_new_with_attributes (_("Play"), | 1782 col = gtk_tree_view_column_new_with_attributes (_("Play"), |
1776 rend, | 1783 rend, |
1777 "active", 0, | 1784 "active", 0, |
1778 NULL); | 1785 NULL); |
1779 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | 1786 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); |
1780 | 1787 |
1781 rend = gtk_cell_renderer_text_new(); | 1788 rend = gtk_cell_renderer_text_new(); |
1782 col = gtk_tree_view_column_new_with_attributes (_("Event"), | 1789 col = gtk_tree_view_column_new_with_attributes (_("Event"), |
1783 rend, | 1790 rend, |
1784 "text", 1, | 1791 "text", 1, |
1785 NULL); | 1792 NULL); |
1795 file = gaim_prefs_get_string(pref); | 1802 file = gaim_prefs_get_string(pref); |
1796 g_free(pref); | 1803 g_free(pref); |
1797 gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)"); | 1804 gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)"); |
1798 gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE); | 1805 gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE); |
1799 gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5); | 1806 gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5); |
1800 | 1807 |
1801 button = gtk_button_new_with_label(_("Test")); | 1808 button = gtk_button_new_with_label(_("Test")); |
1802 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(test_sound), NULL); | 1809 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(test_sound), NULL); |
1803 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | 1810 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
1804 | 1811 |
1805 button = gtk_button_new_with_label(_("Reset")); | 1812 button = gtk_button_new_with_label(_("Reset")); |
1806 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(reset_sound), NULL); | 1813 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(reset_sound), NULL); |
1807 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | 1814 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
1808 | 1815 |
1809 button = gtk_button_new_with_label(_("Choose...")); | 1816 button = gtk_button_new_with_label(_("Choose...")); |
1810 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(sel_sound), NULL); | 1817 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(sel_sound), NULL); |
1811 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | 1818 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
1812 gtk_widget_show_all(ret); | 1819 gtk_widget_show_all(ret); |
1813 | 1820 |
1814 return ret; | 1821 return ret; |
1815 } | 1822 } |
1816 | 1823 |
1817 GtkWidget *away_page() { | 1824 GtkWidget *away_page() { |
1818 GtkWidget *ret; | 1825 GtkWidget *ret; |
2761 "/gaim/gtk/conversations/placement"); | 2768 "/gaim/gtk/conversations/placement"); |
2762 | 2769 |
2763 gaim_prefs_rename("/gaim/gtk/conversations/use_custom_font", | 2770 gaim_prefs_rename("/gaim/gtk/conversations/use_custom_font", |
2764 "/gaim/gtk/conversations/send_formatting"); | 2771 "/gaim/gtk/conversations/send_formatting"); |
2765 | 2772 |
2773 gaim_prefs_rename("/gaim/gtk/conversations/im/button_type", | |
2774 "/gaim/gtk/conversations/button_type"); | |
2775 gaim_prefs_rename("/gaim/gtk/conversations/im/raise_on_events", | |
2776 "/gaim/gtk/conversations/raise_on_events"); | |
2777 | |
2766 /* Remove some no-longer-used prefs */ | 2778 /* Remove some no-longer-used prefs */ |
2767 gaim_prefs_remove("/gaim/gtk/blist/show_group_count"); | 2779 gaim_prefs_remove("/gaim/gtk/blist/show_group_count"); |
2768 gaim_prefs_remove("/gaim/gtk/conversations/icons_on_tabs"); | 2780 gaim_prefs_remove("/gaim/gtk/conversations/icons_on_tabs"); |
2769 #if 0 /* PREFSLASH04 */ | 2781 #if 0 /* PREFSLASH04 */ |
2770 gaim_prefs_remove("/gaim/gtk/conversations/ignore_colors"); | 2782 gaim_prefs_remove("/gaim/gtk/conversations/ignore_colors"); |