# HG changeset patch # User Etan Reisner # Date 1139718136 0 # Node ID 0fa8153beebfe7d42559e00facbceedf5b685f33 # Parent 2f143ea421299e82e2c352cc79a807eba5a29e2f [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 diff -r 2f143ea42129 -r 0fa8153beebf ChangeLog --- 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) diff -r 2f143ea42129 -r 0fa8153beebf plugins/notify.c --- 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", "(*)");