Mercurial > pidgin.yaz
changeset 9188:b6e3dcb23de0
[gaim-migrate @ 9983]
" This patch adds "Show Timestamps" to the Options menu
in the conversation window, and makes both the menu
option and the F2 shortcut per-conversation in-line
with the other options in the Options menu.
This adds translateable strings so should not be
applied during string freeze :)" --Stu Tomlinson
for the record, Mark objects to this:
"For the record, I don't think this pref should be
per-conversation. But I also don't think Enable Logging,
Enable Sounds and the toolbar thing should be
per-conversation, either." --Mark Doliner
I however think that while his arguement may have merit, rfe 967008 lends
credence to it, that the 4 options should be handled consistently, ie
either all should have both a global and a per-conversation or none of them
should. This makes thinks consistent, and so i think it should go in while
Mark's point should get further discussion.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 06 Jun 2004 01:42:21 +0000 |
parents | d1b88a570f4d |
children | 2645d2ccbe80 |
files | src/gtkconv.c src/gtkconv.h |
diffstat | 2 files changed, 35 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Sun Jun 06 01:24:56 2004 +0000 +++ b/src/gtkconv.c Sun Jun 06 01:42:21 2004 +0000 @@ -1045,6 +1045,26 @@ } 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; @@ -1584,12 +1604,6 @@ 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; - } } @@ -2645,6 +2659,9 @@ 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 @@ -3275,6 +3292,7 @@ { N_("/Options/Enable _Logging"), NULL, menu_logging_cb, 0, "<CheckItem>" }, { N_("/Options/Enable _Sounds"), NULL, menu_sounds_cb, 0, "<CheckItem>" }, { N_("/Options/Show Formatting _Toolbar"), NULL, menu_toolbar_cb, 0, "<CheckItem>" }, + { N_("/Options/Show T_imestamps"), "F2", menu_timestamps_cb, 0, "<CheckItem>" }, }; static const int menu_item_count = @@ -3376,6 +3394,9 @@ 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); @@ -4330,6 +4351,12 @@ 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);
--- a/src/gtkconv.h Sun Jun 06 01:24:56 2004 +0000 +++ b/src/gtkconv.h Sun Jun 06 01:42:21 2004 +0000 @@ -69,6 +69,7 @@ GtkWidget *logging; GtkWidget *sounds; GtkWidget *show_formatting_toolbar; + GtkWidget *show_timestamps; GtkWidget *send_as; @@ -130,6 +131,7 @@ { gboolean make_sound; gboolean show_formatting_toolbar; + gboolean show_timestamps; GtkTooltips *tooltips;