gaim/gaim

e046e29228ca
Parents aef09482a171
Children 65002fb4639c
This should fix warren's problem #1 from comment #1 at
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159267
--- a/plugins/notify.c Sun Jun 05 20:00:09 2005 -0400
+++ b/plugins/notify.c Sun Jun 05 20:48:45 2005 -0400
@@ -152,8 +152,8 @@
"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 @@
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 @@
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 @@
if (count_messages(gaimwin))
notify_win(gaimwin);
}
+#endif
}
-#endif
static void
deleting_conv(GaimConversation *conv)
@@ -743,9 +754,9 @@
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