|
From: <ane...@us...> - 2013-10-20 19:02:58
|
Revision: 947
http://sourceforge.net/p/vision/code/947
Author: anevilyak
Date: 2013-10-20 19:02:54 +0000 (Sun, 20 Oct 2013)
Log Message:
-----------
20131020: Fix incorrect handling of nick notifications.
- Only send the notifications after having run through the loop,
not on each pass, otherwise one would get incrementally larger
notifications when multiple nicks were reported online simultaneously,
rather than a single notification at the end.
Reported by Matt Madia.
Modified Paths:
--------------
branches/0.9.7/Makefile
branches/0.9.7/src/ParseENums.cpp
Modified: branches/0.9.7/Makefile
===================================================================
--- branches/0.9.7/Makefile 2013-10-05 02:03:57 UTC (rev 946)
+++ branches/0.9.7/Makefile 2013-10-20 19:02:54 UTC (rev 947)
@@ -16,7 +16,7 @@
# the file name, ...
BINARY := Vision
-VERSION := 0.9.7-H-20131004
+VERSION := 0.9.7-H-20131020
BUILDDATE := $(shell date +%b_%d_%Y)
BUILD_TYPE := Release
@@ -84,10 +84,7 @@
LDFLAGS := $(REG_LIBS) -nodefaultlibs
-ifeq ($(wildcard /boot/common/include/infopopper/InfoPopper.h), )
-else
- CFLAGS += -DUSE_INFOPOPPER=1
-endif
+CFLAGS += -DUSE_INFOPOPPER=1
DEP := gcc -MM -DBEOS_BUILD
Modified: branches/0.9.7/src/ParseENums.cpp
===================================================================
--- branches/0.9.7/src/ParseENums.cpp 2013-10-05 02:03:57 UTC (rev 946)
+++ branches/0.9.7/src/ParseENums.cpp 2013-10-20 19:02:54 UTC (rev 947)
@@ -471,43 +471,44 @@
offlined << item->Text();
}
}
+ }
- if (offlined.Length())
- {
- BNotification notification(B_INFORMATION_NOTIFICATION);
- notification.SetGroup(BString("Vision"));
- entry_ref ref = vision_app->AppRef();
- notification.SetOnClickFile(&ref);
- notification.SetTitle(fServerName.String());
- BString content;
- content << offlined;
- if (offlined.FindFirst(' ') > -1)
- content << " are offline";
- else
- content << " is offline";
+ if (offlined.Length())
+ {
+ BNotification notification(B_INFORMATION_NOTIFICATION);
+ notification.SetGroup(BString("Vision"));
+ entry_ref ref = vision_app->AppRef();
+ notification.SetOnClickFile(&ref);
+ notification.SetTitle(fServerName.String());
+ BString content;
+ content << offlined;
+ if (offlined.FindFirst(' ') > -1)
+ content << " are offline";
+ else
+ content << " is offline";
- notification.SetContent(content);
- notification.Send();
- }
- if (onlined.Length())
- {
- BNotification notification(B_INFORMATION_NOTIFICATION);
- notification.SetGroup(BString("Vision"));
- entry_ref ref = vision_app->AppRef();
- notification.SetOnClickFile(&ref);
- notification.SetTitle(fServerName.String());
- BString content;
- content << onlined;
- if (onlined.FindFirst(' ') > -1)
- content << " are online";
- else
- content << " is online";
+ notification.SetContent(content);
+ notification.Send();
+ }
- notification.SetContent(content);
- notification.Send();
- }
+ if (onlined.Length())
+ {
+ BNotification notification(B_INFORMATION_NOTIFICATION);
+ notification.SetGroup(BString("Vision"));
+ entry_ref ref = vision_app->AppRef();
+ notification.SetOnClickFile(&ref);
+ notification.SetTitle(fServerName.String());
+ BString content;
+ content << onlined;
+ if (onlined.FindFirst(' ') > -1)
+ content << " are online";
+ else
+ content << " is online";
+ notification.SetContent(content);
+ notification.Send();
}
+
fNotifyNicks.SortItems(SortNotifyItems);
msg.AddPointer ("list", &fNotifyNicks);
msg.AddPointer ("source", this);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|