Index: src/gtkconv.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkconv.c,v retrieving revision 1.382 diff -u -p -u -r1.382 gtkconv.c --- src/gtkconv.c 24 May 2004 04:29:40 -0000 1.382 +++ src/gtkconv.c 24 May 2004 15:34:56 -0000 @@ -962,6 +962,26 @@ menu_sounds_cb(gpointer data, guint acti } static void +menu_timestamps_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) + return; + + gtkconv = GAIM_GTK_CONVERSATION(conv); + + gtkconv->show_timestamps = + gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); + gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), + gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))); +} + +static void chat_do_im(GaimConversation *conv, const char *who) { GaimPluginProtocolInfo *prpl_info = NULL; @@ -1501,12 +1521,6 @@ entry_key_press_cb(GtkWidget *entry, Gdk return TRUE; break; - case GDK_F2: - gaim_prefs_set_bool("/gaim/gtk/conversations/show_timestamps", - !gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps")); - return TRUE; - break; - } } @@ -2560,6 +2574,9 @@ switch_conv_cb(GtkNotebook *notebook, Gt 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_timestamps), + gtkconv->show_timestamps); + /* * We pause icons when they are not visible. If this icon should * be animated then start it back up again.lll @@ -3190,6 +3207,7 @@ static GtkItemFactoryEntry menu_items[] { 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 T_imestamps"), "F2", menu_timestamps_cb, 0, "" }, }; static const int menu_item_count = @@ -3291,6 +3309,9 @@ setup_menubar(GaimConvWindow *win) gtkwin->menu.show_formatting_toolbar = gtk_item_factory_get_widget(gtkwin->menu.item_factory, N_("/Options/Show Formatting Toolbar")); + gtkwin->menu.show_timestamps = + gtk_item_factory_get_widget(gtkwin->menu.item_factory, + N_("/Options/Show Timestamps")); generate_send_as_items(win, NULL); @@ -4245,6 +4266,12 @@ gaim_gtk_add_conversation(GaimConvWindow if (gtkconv->show_formatting_toolbar) gtk_widget_show(gtkconv->toolbar); + gtkconv->show_timestamps = gaim_prefs_get_bool( + "/gaim/gtk/conversations/show_timestamps"); + + gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), + gtkconv->show_timestamps); + g_signal_connect_swapped(G_OBJECT(pane), "focus", G_CALLBACK(gtk_widget_grab_focus), gtkconv->entry); Index: src/gtkconv.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkconv.h,v retrieving revision 1.39 diff -u -p -u -r1.39 gtkconv.h --- src/gtkconv.h 23 May 2004 03:54:20 -0000 1.39 +++ src/gtkconv.h 24 May 2004 15:34:56 -0000 @@ -69,6 +69,7 @@ struct _GaimGtkWindow GtkWidget *logging; GtkWidget *sounds; GtkWidget *show_formatting_toolbar; + GtkWidget *show_timestamps; GtkWidget *send_as; @@ -130,6 +131,7 @@ struct _GaimGtkConversation { gboolean make_sound; gboolean show_formatting_toolbar; + gboolean show_timestamps; GtkTooltips *tooltips;