From: Mark D. <the...@us...> - 2005-06-06 00:48:54
|
Update of /cvsroot/gaim/gaim/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24810 Modified Files: Tag: oldstatus notify.c Log Message: This should fix warren's problem #1 from comment #1 at https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159267 Index: notify.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/notify.c,v retrieving revision 1.54.2.2 retrieving revision 1.54.2.3 diff -u -d -p -r1.54.2.2 -r1.54.2.3 --- notify.c 11 Dec 2004 20:00:32 -0000 1.54.2.2 +++ notify.c 6 Jun 2005 00:48:45 -0000 1.54.2.3 @@ -152,8 +152,8 @@ notify(GaimConversation *conv, gboolean "has-toplevel-focus", &has_focus, NULL); if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_focused") || - (has_focus && gaim_conv_window_get_active_conversation(gaimwin) != conv) || - !has_focus) { + !has_focus || + gaim_conv_window_get_active_conversation(gaimwin) != conv) { if (increment) { count = GPOINTER_TO_INT(gaim_conversation_get_data(conv, "notify-message-count")); count++; @@ -169,6 +169,9 @@ notify(GaimConversation *conv, gboolean static void notify_win(GaimConvWindow *gaimwin) { + if (count_messages(gaimwin) <= 0) + return; + if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_count")) handle_count(gaimwin); if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_string")) @@ -361,12 +364,20 @@ conv_created(GaimConversation *conv) attach_signals(conv); } -#if 0 static void conv_switched(GaimConversation *old_conv, GaimConversation *new_conv) { +#if 0 GaimConvWindow *gaimwin = gaim_conversation_get_window(new_conv); +#endif + /* + * If the conversation was switched, then make sure we re-noitfy + * because Gaim will have overwritten our custom window title. + */ + notify(new_conv, FALSE); + +#if 0 printf("conv_switched - %p - %p\n", old_conv, new_conv); printf("count - %d\n", count_messages(gaimwin)); if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_switch")) @@ -377,8 +388,8 @@ conv_switched(GaimConversation *old_conv if (count_messages(gaimwin)) notify_win(gaimwin); } -} #endif +} static void deleting_conv(GaimConversation *conv) @@ -743,9 +754,9 @@ plugin_load(GaimPlugin *plugin) GAIM_CALLBACK(conv_created), NULL); gaim_signal_connect(conv_handle, "deleting-conversation", plugin, GAIM_CALLBACK(deleting_conv), NULL); -#if 0 gaim_signal_connect(conv_handle, "conversation-switched", plugin, GAIM_CALLBACK(conv_switched), NULL); +#if 0 gaim_signal_connect(gtk_conv_handle, "conversation-drag-ended", plugin, GAIM_CALLBACK(conversation_drag_ended), NULL); #endif |