Mercurial > pidgin.yaz
comparison src/dialogs.c @ 7538:357eb1c39b72
[gaim-migrate @ 8151]
Robot101 made a nice patch (which I modified just slightly) to put our
gtkspell attachment function that we use all throughout gaim into a utility
function, which handles error checking and only does anything if gtkspell
support is compiled in. It lets us remove a lot of #ifdef USE_GTKSPELL from
places, and doesn't change any functionality.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 17 Nov 2003 06:48:01 +0000 |
parents | 643cbc9a6035 |
children | cf6a7939af78 |
comparison
equal
deleted
inserted
replaced
7537:083427fd8ba8 | 7538:357eb1c39b72 |
---|---|
36 #include "gtkutils.h" | 36 #include "gtkutils.h" |
37 #include "stock.h" | 37 #include "stock.h" |
38 | 38 |
39 #include "ui.h" | 39 #include "ui.h" |
40 | 40 |
41 #ifdef USE_GTKSPELL | |
42 # include <gtkspell/gtkspell.h> | |
43 #endif | |
44 | |
45 /* XXX */ | 41 /* XXX */ |
46 #include "gaim.h" | 42 #include "gaim.h" |
47 | |
48 #ifdef _WIN32 | |
49 # include "wspell.h" | |
50 #endif | |
51 | 43 |
52 static GtkWidget *imdialog = NULL; /*I only want ONE of these :) */ | 44 static GtkWidget *imdialog = NULL; /*I only want ONE of these :) */ |
53 static GList *dialogwindows = NULL; | 45 static GList *dialogwindows = NULL; |
54 static GtkWidget *importdialog; | 46 static GtkWidget *importdialog; |
55 static GaimConnection *importgc; | 47 static GaimConnection *importgc; |
869 gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); | 861 gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); |
870 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); | 862 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
871 | 863 |
872 b->text = gtk_text_view_new(); | 864 b->text = gtk_text_view_new(); |
873 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(b->text), GTK_WRAP_WORD_CHAR); | 865 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(b->text), GTK_WRAP_WORD_CHAR); |
874 #ifdef USE_GTKSPELL | 866 |
875 if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) | 867 if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) |
876 gtkspell_new_attach(GTK_TEXT_VIEW(b->text), NULL, NULL); | 868 gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(b->text)); |
877 #endif | 869 |
878 gtk_widget_set_size_request(b->text, 300, 200); | 870 gtk_widget_set_size_request(b->text, 300, 200); |
879 | 871 |
880 if ((user_info = gaim_account_get_user_info(account)) != NULL) { | 872 if ((user_info = gaim_account_get_user_info(account)) != NULL) { |
881 buf = g_malloc(strlen(user_info) + 1); | 873 buf = g_malloc(strlen(user_info) + 1); |
882 gaim_strncpy_nohtml(buf, user_info, strlen(user_info) + 1); | 874 gaim_strncpy_nohtml(buf, user_info, strlen(user_info) + 1); |
1515 gtk_box_pack_start(GTK_BOX(fbox), frame, TRUE, TRUE, 0); | 1507 gtk_box_pack_start(GTK_BOX(fbox), frame, TRUE, TRUE, 0); |
1516 | 1508 |
1517 ca->text = gtk_text_view_new(); | 1509 ca->text = gtk_text_view_new(); |
1518 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(ca->text), GTK_WRAP_WORD_CHAR); | 1510 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(ca->text), GTK_WRAP_WORD_CHAR); |
1519 | 1511 |
1520 #ifdef USE_GTKSPELL | 1512 if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) |
1521 if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) | 1513 gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(ca->text)); |
1522 gtkspell_new_attach(GTK_TEXT_VIEW(ca->text), NULL, NULL); | |
1523 #endif | |
1524 | 1514 |
1525 gtk_container_add(GTK_CONTAINER(frame), ca->text); | 1515 gtk_container_add(GTK_CONTAINER(frame), ca->text); |
1526 | 1516 |
1527 if (dummy) { | 1517 if (dummy) { |
1528 struct away_message *amt; | 1518 struct away_message *amt; |