Mercurial > pidgin
comparison src/gtkprefs.c @ 12061:29dc8fc0dd6c
[gaim-migrate @ 14356]
SF Patch #1351190 from Michael Hearn
"This allows Linux binaries of Gaim to operate even when
GTKspell is not available at runtime. Useful for the
autopackages."
I made a number of changes to this, so blame me first if it's busted.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 13 Nov 2005 00:19:12 +0000 |
parents | bfbb1798535e |
children | e859c1663a27 |
comparison
equal
deleted
inserted
replaced
12060:f7d2f637ff03 | 12061:29dc8fc0dd6c |
---|---|
796 GtkWidget *toolbar; | 796 GtkWidget *toolbar; |
797 GtkWidget *hbox; | 797 GtkWidget *hbox; |
798 GtkWidget *vbox2; | 798 GtkWidget *vbox2; |
799 GtkWidget *iconpref1; | 799 GtkWidget *iconpref1; |
800 GtkWidget *iconpref2; | 800 GtkWidget *iconpref2; |
801 GtkWidget *spellpref; | |
801 | 802 |
802 ret = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); | 803 ret = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); |
803 gtk_container_set_border_width(GTK_CONTAINER(ret), GAIM_HIG_BORDER); | 804 gtk_container_set_border_width(GTK_CONTAINER(ret), GAIM_HIG_BORDER); |
804 | 805 |
805 vbox = gaim_gtk_make_frame(ret, _("Conversations")); | 806 vbox = gaim_gtk_make_frame(ret, _("Conversations")); |
818 g_signal_connect(G_OBJECT(iconpref1), "clicked", | 819 g_signal_connect(G_OBJECT(iconpref1), "clicked", |
819 G_CALLBACK(gaim_gtk_toggle_sensitive), iconpref2); | 820 G_CALLBACK(gaim_gtk_toggle_sensitive), iconpref2); |
820 | 821 |
821 gaim_gtk_prefs_checkbox(_("_Notify buddies that you are typing to them"), | 822 gaim_gtk_prefs_checkbox(_("_Notify buddies that you are typing to them"), |
822 "/core/conversations/im/send_typing", vbox); | 823 "/core/conversations/im/send_typing", vbox); |
823 #ifdef USE_GTKSPELL | 824 |
824 gaim_gtk_prefs_checkbox(_("_Highlight misspelled words"), | 825 spellpref = gaim_gtk_prefs_checkbox(_("_Highlight misspelled words"), |
825 "/gaim/gtk/conversations/spellcheck", vbox); | 826 "/gaim/gtk/conversations/spellcheck", vbox); |
826 #endif | 827 |
828 if (!gaim_gtk_gtkspell_is_available()) | |
829 { | |
830 gboolean gtkspell_enabled = gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck"); | |
831 | |
832 gtk_widget_set_sensitive(spellpref, FALSE); | |
833 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(spellpref), FALSE); | |
834 | |
835 /* Preserve the preference. If the user had it enabled, we want it to | |
836 * stay enabled if they install gtkspell again. */ | |
837 gaim_prefs_set_bool("/gaim/gtk/conversations/spellcheck", gtkspell_enabled); | |
838 } | |
827 | 839 |
828 frame = gaim_gtk_create_imhtml(TRUE, &imhtml, &toolbar); | 840 frame = gaim_gtk_create_imhtml(TRUE, &imhtml, &toolbar); |
829 gtk_widget_set_name(imhtml, "gaim_gtkprefs_font_imhtml"); | 841 gtk_widget_set_name(imhtml, "gaim_gtkprefs_font_imhtml"); |
830 gtk_imhtml_set_whole_buffer_formatting_only(GTK_IMHTML(imhtml), TRUE); | 842 gtk_imhtml_set_whole_buffer_formatting_only(GTK_IMHTML(imhtml), TRUE); |
831 gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml), | 843 gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml), |