Index: src/gtkconv.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkconv.c,v retrieving revision 1.319 diff -u -u -r1.319 gtkconv.c --- src/gtkconv.c 13 Feb 2004 08:23:10 -0000 1.319 +++ src/gtkconv.c 13 Feb 2004 18:31:50 -0000 @@ -964,6 +964,26 @@ } static void +menu_smileys_cb(gpointer data, guint action, GtkWidget *widget) +{ + GaimConvWindow *win = (GaimConvWindow *)data; + GaimConversation *conv; + GaimGtkConversation *gtkconv; + + conv = gaim_conv_window_get_active_conversation(win); + + if (conv == NULL) + return; + + gtkconv = GAIM_GTK_CONVERSATION(conv); + + gtkconv->show_smileys = + gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); + + gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->imhtml), gtkconv->show_smileys); +} + +static void menu_sounds_cb(gpointer data, guint action, GtkWidget *widget) { GaimConvWindow *win = (GaimConvWindow *)data; @@ -2622,6 +2642,10 @@ GTK_CHECK_MENU_ITEM(gtkwin->menu.show_formatting_toolbar), gtkconv->show_formatting_toolbar); + gtk_check_menu_item_set_active( + GTK_CHECK_MENU_ITEM(gtkwin->menu.show_smileys), + gtkconv->show_smileys); + /* * We pause icons when they are not visible. If this icon should * be animated then start it back up again.lll @@ -3373,6 +3397,7 @@ { N_("/Options/Enable _Logging"), NULL, menu_logging_cb, 0, "" }, { N_("/Options/Enable _Sounds"), NULL, menu_sounds_cb, 0, "" }, { N_("/Options/Show Formatting _Toolbar"), NULL, menu_toolbar_cb, 0, "" }, + { N_("/Options/Show _Graphical Smileys"), NULL, menu_smileys_cb, 0, "" }, }; static const int menu_item_count = @@ -3474,6 +3499,9 @@ gtkwin->menu.show_formatting_toolbar = gtk_item_factory_get_widget(gtkwin->menu.item_factory, N_("/Options/Show Formatting Toolbar")); + gtkwin->menu.show_smileys = + gtk_item_factory_get_widget(gtkwin->menu.item_factory, + N_("/Options/Show Graphical Smileys")); generate_send_as_items(win, NULL); @@ -4530,6 +4558,8 @@ gtkconv->show_formatting_toolbar = gaim_prefs_get_bool( "/gaim/gtk/conversations/show_formatting_toolbar"); + gtkconv->show_smileys = gaim_prefs_get_bool( + "/gaim/gtk/conversations/show_smileys"); g_signal_connect_swapped(G_OBJECT(pane), "focus", G_CALLBACK(gtk_widget_grab_focus), @@ -5903,6 +5933,8 @@ GList *cl; GaimConversation *conv; GaimGtkConversation *gtkconv; + GaimConvWindow *win; + GaimGtkWindow *gtkwin; for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) { conv = (GaimConversation *)cl->data; @@ -5911,6 +5943,14 @@ continue; gtkconv = GAIM_GTK_CONVERSATION(conv); + win = gaim_conversation_get_window(conv); + gtkwin = GAIM_GTK_WINDOW(win); + + gtkconv->show_smileys = (gboolean)GPOINTER_TO_INT(value); + + gtk_check_menu_item_set_active( + GTK_CHECK_MENU_ITEM(gtkwin->menu.show_smileys), + gtkconv->show_smileys); gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->imhtml), (gboolean)GPOINTER_TO_INT(value)); } Index: src/gtkconv.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkconv.h,v retrieving revision 1.34 diff -u -u -r1.34 gtkconv.h --- src/gtkconv.h 31 Jan 2004 00:33:18 -0000 1.34 +++ src/gtkconv.h 13 Feb 2004 18:31:50 -0000 @@ -69,6 +69,7 @@ GtkWidget *logging; GtkWidget *sounds; GtkWidget *show_formatting_toolbar; + GtkWidget *show_smileys; GtkWidget *send_as; @@ -130,6 +131,7 @@ { gboolean make_sound; gboolean show_formatting_toolbar; + gboolean show_smileys; gboolean has_font; char fontface[128]; GdkColor fg_color;