Mercurial > pidgin.yaz
changeset 13236:0fa8153beebf
[gaim-migrate @ 15602]
SF patch 1413727 by sadrul
Adds a 'notify only when nick is said' to the notify in chats option. I
decided to tab the option in to make it look like it belonged to the option
above it more. Feel free to think it's horrible and remove the tab.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Sun, 12 Feb 2006 04:22:16 +0000 |
parents | 2f143ea42129 |
children | b0d020a66144 |
files | ChangeLog plugins/notify.c |
diffstat | 2 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Feb 11 21:50:10 2006 +0000 +++ b/ChangeLog Sun Feb 12 04:22:16 2006 +0000 @@ -85,6 +85,8 @@ * The functionality of the auto-reconnect plugin has been moved into the Gaim core, and the plugin itself has been removed. + * 'Highlight when nick said' option added to Message Notification + plugin. MSN Features: * Custom smiley receiving support (Irving Cordova & Francesco Fracassi)
--- a/plugins/notify.c Sat Feb 11 21:50:10 2006 +0000 +++ b/plugins/notify.c Sun Feb 12 04:22:16 2006 +0000 @@ -244,6 +244,11 @@ message_displayed_cb(GaimAccount *account, const char *who, char *message, GaimConversation *conv, GaimMessageFlags flags) { + if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT && + gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_chat_nick") && + !(flags & GAIM_MESSAGE_NICK))) + return FALSE; + if ((flags & GAIM_MESSAGE_RECV) && !(flags & GAIM_MESSAGE_DELAYED)) notify(conv, TRUE); @@ -624,7 +629,7 @@ { GtkWidget *ret = NULL, *frame = NULL; GtkWidget *vbox = NULL, *hbox = NULL; - GtkWidget *toggle = NULL, *entry = NULL; + GtkWidget *toggle = NULL, *entry = NULL, *ref; ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER (ret), 12); @@ -648,6 +653,17 @@ g_signal_connect(G_OBJECT(toggle), "toggled", G_CALLBACK(type_toggle_cb), "type_chat"); + ref = toggle; + toggle = gtk_check_button_new_with_mnemonic(_("\t_Only when someone says your nick")); + gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), + gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_chat_nick")); + g_signal_connect(G_OBJECT(toggle), "toggled", + G_CALLBACK(type_toggle_cb), "type_chat_nick"); + gtk_widget_set_sensitive(toggle, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ref))); + g_signal_connect(G_OBJECT(ref), "toggled", + G_CALLBACK(gaim_gtk_toggle_sensitive), toggle); + toggle = gtk_check_button_new_with_mnemonic(_("_Focused windows")); gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), @@ -863,6 +879,7 @@ gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_im", TRUE); gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_chat", FALSE); + gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_chat_nick", FALSE); gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_focused", FALSE); gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_string", FALSE); gaim_prefs_add_string("/plugins/gtk/X11/notify/title_string", "(*)");