History log of /haiku/src/servers/notification/NotificationView.cpp
Revision Date Author Comments
# fce034d2 04-Feb-2024 Emir SARI <bitigchi@me.com>

notification_server: Use automatic percent formatting

This uses automatic percent formatting for the BStatusBar
progress text, instead of appending the sign manually.

Change-Id: I435220dd774822b60e376972a0f379a0e2b7359e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7375
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# cd6365c7 17-May-2018 Jérôme Duval <jerome.duval@gmail.com>

style fixes


# 16af9b4c 05-Nov-2017 Humdinger <humdingerb@gmail.com>

Style, no functional changes

Make termination consistant with that last commit hrev51521.
As wished and proof-read by waddlesplash. Hope all's well...


# a657e677 24-Sep-2017 Brian Hill <supernova@tycho.email>

Notification preflet and server changes

Remove unneeded classes from preflet jamfile
Fix some notification layout and bold text issues


# 6aa05872 23-Sep-2017 Brian Hill <supernova@tycho.email>

Notifications preflet and notification_server

Notifications preflet:
-Use sliders instead of text fields for width and timeout
-Remove icon size choice (mini icon looks horrible)
-Consolidate both "Enable" checkboxes into one
-Fix Revert button, remove Apply button, add Defaults button
-All changes to settings saved immediately
-Live example notification message shown when settings changes are made
-Add setting for individual apps to specify whether their notifications
should be muted
-Remove history list (to be implemented later)

BNotification class:
-BNotification records the signature and name of application that
created it
-New functions to get source application signature and name

Notification Server:
-Notification pop up view layout fixes and bold font size fix
-Remove notifications history from AppUsage class (will be saved in
cache instead)
-Remove vector of NotificationView objects which isn't needed
-Get source application info from notification object, not the received
message which is not reliable


# efc430ea 24-Jan-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Remove unused code.


# 1a8c00c1 09-Dec-2015 looncraz <looncraz@looncraz.net>

servers: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0020-0022 from looncraz, unmodified.


# 569a7bfc 05-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

Notification: align title with text.


# 84e1c7fa 18-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

Notification: Avoid truncation when not wanted.


# 63a4690e 18-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

Notification: truncate long lines

This happens only if the word-wrapping couldn't fit them (because there
is a very long word in the text)

Fixes #11494.


# 2a740449 30-Jul-2014 François Revol <revol@free.fr>

Use proper width for notification text

Fixes #10109.


# 69631a6a 17-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

More tweaks to the notification window looks

The color stripe for error and important notifications is now 3 pixel
wide only. We still need a better choice of colors here.


# 48d90a50 22-Apr-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Notifications: only color the left stripe

* Setting the important/failure color on the whole view looked ugly.
* Important notifications use B_CONTROL_HIGHLIGHT_COLOR, instead of
white.
* We may want to select better success and failure colors. Pure red and
green don't look very good. Suggestions welcome.


# f6afd3e9 07-Mar-2013 Ryan Leavengood <leavengood@gmail.com>

Improve alignment and layout of the notifications.

Implements diver's mockup from #8566.


# 82a67460 05-Nov-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Use Web+ tabs close button

Fixes #9566


# c2fbfb1d 27-Mar-2012 Alex Wilson <yourpalal2@gmail.com>

Don't hardcode the NotificationView width to 300px.


# 2fab0e48 27-Mar-2012 Alex Wilson <yourpalal2@gmail.com>

Remove dead code in NotificationView.cpp


# 259ffc02 20-Jan-2012 Alex Wilson <yourpalal2@gmail.com>

Style cleanup in notification_server: #includes


# 44c6e69b 03-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Even more work on notification window:
* Use the layout kit. That makes the code simpler.
* Group headers now look like deskbar team entries. I had the answer just under my eyes all the time.
* Folding and closing a group are back. However, folding does not work yet.
* We need to select a better default "failure" color, as red looks a bit aggressive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43170 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e0890a26 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix the layouting of notifications again.

I'm not sure about the ApGroupView being (and looking like) a BBox.
Thoughts about that ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43119 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ec6c3a0 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Merge patch by plfiorini :

Some changes to the API for notifications.
* Don't go through be_roster to send a notification, but use Notification->Send() instead.
* Rename App to Group to make the purpose clearer

And some changes to the notification code itself:
* Use the Notification class as the way to convey informations about a notification. Allows easier extension of this class
* Code cleanup
* Use of the layout kit for the notify window

Unfortunately, the latter part clashes quite a bit with the changes I already did to the notification window, so it's now quite broken. Working on that next, but I wanted to separate that work from the patch ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43114 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14ac1ee9 31-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Tweak the notification window again :
* Spacing of the bprogressbar is now 8pixels on each size
* Remove the useless window tab for now

Also fix DecoratorFrame() again as BORDERED_WINDOW didn't work with it either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43034 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5414f4dc 05-Sep-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

More tweaking ofthe element positions in notification view :
* Progress bar is 8 pixels away fom bottom, right, and icon stripe
* Icon is horizontally positionned like in BAlert
* Move text a bit more to the right

Thanks to diver for the great suggestion mockups.

Note : some of the settings in Notification preflet are now ignored ("title above icon" comes to mind). I think they don't make much sense
anyway, anyone cares if they get removed ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42716 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e07be06 04-Sep-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

More fixes to the notification windows :
* Rewrite the positionning code properly. There's a remaining bug when deskbar is on the left, but I think it comes from DecoratorFrame()
Tweak the position of UI elements :
* Shift the close cross a bit
* Make the icon stripe the same as in alerts, and align the icon the same way
* Adjust the text position, too
AppGroupView:
* remove the remaining "lines" in collapsed mode (looked like artifacts)
* Grey out the title in collapsed mode


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42714 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2fc3a86 03-Sep-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Remove useless method call.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42711 a95241bf-73f2-0310-859d-f6bbb57e9c96


# beeda306 03-Sep-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

More tweakings to the notification view :
* Use a BStatusBar for progress.
* Smaller icon stripe on the left
* Shift the message title aligned with the rest of the message
* Fix drawing bugs at the right of the window
Thanks to diver for the suggestion mockups!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42710 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9dcd41a8 06-Aug-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Some tweakings to the notificationsystem to make it look more like a regular alert.
Feel free to improve on it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7dd47a9b 21-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Fix off by one iconRect sizes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39914 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bdde2d30 20-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Removed bilinear filter, as it was blurring all icons (and bitmap icons are
already rendered with a filter).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39896 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 31a3c4e8 27-May-2010 Jérôme Duval <korli@users.berlios.de>

gcc 2.95 build fix


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36953 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f33637d9 27-May-2010 Stephan Aßmus <superstippi@gmx.de>

* Improved BNotification API.
- No more manual memory management.
- Make it clear who keeps or releases ownership of arguments passed.
- Copy icon, arguments and entry_refs.
- Do not expose implementation details (What do the BLists contain?!).
- BRoster takes const BNotification& and bigtime_t timeout.

* BRoster::Notify():
- Proper error handling.
- Fixed documentation.

* Adjusted notify:
- Renamed fOk to fHasGoodArguments.
- The "const char*" members were really "char*" members (self-managed).
- free() is NULL-safe.
- fRefs contains BEntries, so passing void* to delete does no good.
- Adjustments to the changed API.
- Coding style fixes.

* notification_server:
- Adjustment to the new type for timeout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36952 a95241bf-73f2-0310-859d-f6bbb57e9c96


# de9dcd41 27-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by plfiorini: Integration of InfoPopper as a system service. See ticket
#1245. There are some TODOs outlined in the ticket, but they will be much
easier to review as individual patches against trunk, versus as a new version
of the huge patch.

I've messed a lot with src/servers/notification/NotificationsView.cpp in order
to resolve a crash I was getting when testing this thing (rewrote line
wrapping). I've also replaced the icons with the one that zuMi did long ago.

Thanks, plfiorini, for working on this code as much as you did!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36949 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 569a7bfc3ce6b037a6cf681c552bfe84cb475ae9 05-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

Notification: align title with text.


# 84e1c7fa206838c406bbcd54e48bb95c96e25fc0 18-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

Notification: Avoid truncation when not wanted.


# 63a4690e72a92f208cd927c316e95b989af18ff9 18-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

Notification: truncate long lines

This happens only if the word-wrapping couldn't fit them (because there
is a very long word in the text)

Fixes #11494.


# 2a740449bb933a8d9939b80472f70da655bd8688 30-Jul-2014 François Revol <revol@free.fr>

Use proper width for notification text

Fixes #10109.


# 69631a6a0564848e8231853a3de9757c3b8662d4 17-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

More tweaks to the notification window looks

The color stripe for error and important notifications is now 3 pixel
wide only. We still need a better choice of colors here.


# 48d90a5092336ffef54e5229469b4aab73ca29ed 22-Apr-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Notifications: only color the left stripe

* Setting the important/failure color on the whole view looked ugly.
* Important notifications use B_CONTROL_HIGHLIGHT_COLOR, instead of
white.
* We may want to select better success and failure colors. Pure red and
green don't look very good. Suggestions welcome.


# f6afd3e9f7b5580118731286dbc21a333d298458 07-Mar-2013 Ryan Leavengood <leavengood@gmail.com>

Improve alignment and layout of the notifications.

Implements diver's mockup from #8566.


# 82a674605b14403f45c28163480890ef16164476 05-Nov-2012 Adrien Destugues - PulkoMandy <pulkomandy@pulkomandy.tk>

Use Web+ tabs close button

Fixes #9566


# c2fbfb1d5811e3e3057bf5077aae87a48bb36868 27-Mar-2012 Alex Wilson <yourpalal2@gmail.com>

Don't hardcode the NotificationView width to 300px.


# 2fab0e48044edb5221cf0b615fb5f0e85e9dc35c 27-Mar-2012 Alex Wilson <yourpalal2@gmail.com>

Remove dead code in NotificationView.cpp


# 259ffc02528c0a87b4c5c7a4673efbd4eb27b4b1 20-Jan-2012 Alex Wilson <yourpalal2@gmail.com>

Style cleanup in notification_server: #includes


# 44c6e69bd178b3fcfc48b180b394d4075a89d091 03-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Even more work on notification window:
* Use the layout kit. That makes the code simpler.
* Group headers now look like deskbar team entries. I had the answer just under my eyes all the time.
* Folding and closing a group are back. However, folding does not work yet.
* We need to select a better default "failure" color, as red looks a bit aggressive.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43170 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e0890a26f4d0ff7424358130b8e439bcbcd3229b 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Fix the layouting of notifications again.

I'm not sure about the ApGroupView being (and looking like) a BBox.
Thoughts about that ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43119 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ec6c3a042bbc8e2e94b2ccd19c1e9289232d1e4 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Merge patch by plfiorini :

Some changes to the API for notifications.
* Don't go through be_roster to send a notification, but use Notification->Send() instead.
* Rename App to Group to make the purpose clearer

And some changes to the notification code itself:
* Use the Notification class as the way to convey informations about a notification. Allows easier extension of this class
* Code cleanup
* Use of the layout kit for the notify window

Unfortunately, the latter part clashes quite a bit with the changes I already did to the notification window, so it's now quite broken. Working on that next, but I wanted to separate that work from the patch ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43114 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14ac1ee9620bcd06aa0a3730d0d66897eff5f6f1 31-Oct-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Tweak the notification window again :
* Spacing of the bprogressbar is now 8pixels on each size
* Remove the useless window tab for now

Also fix DecoratorFrame() again as BORDERED_WINDOW didn't work with it either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43034 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5414f4dceb079bb6d75b1ffb39fb3320caae4fc4 05-Sep-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

More tweaking ofthe element positions in notification view :
* Progress bar is 8 pixels away fom bottom, right, and icon stripe
* Icon is horizontally positionned like in BAlert
* Move text a bit more to the right

Thanks to diver for the great suggestion mockups.

Note : some of the settings in Notification preflet are now ignored ("title above icon" comes to mind). I think they don't make much sense
anyway, anyone cares if they get removed ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42716 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e07be0657199891e6bb66383b722763223e9f5c 04-Sep-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

More fixes to the notification windows :
* Rewrite the positionning code properly. There's a remaining bug when deskbar is on the left, but I think it comes from DecoratorFrame()
Tweak the position of UI elements :
* Shift the close cross a bit
* Make the icon stripe the same as in alerts, and align the icon the same way
* Adjust the text position, too
AppGroupView:
* remove the remaining "lines" in collapsed mode (looked like artifacts)
* Grey out the title in collapsed mode


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42714 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2fc3a86c22470b335dd04f6fd814e2775ae307b 03-Sep-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Remove useless method call.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42711 a95241bf-73f2-0310-859d-f6bbb57e9c96


# beeda30637c48d5cb8a5b0a562c59e9fbf8d2444 03-Sep-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

More tweakings to the notification view :
* Use a BStatusBar for progress.
* Smaller icon stripe on the left
* Shift the message title aligned with the rest of the message
* Fix drawing bugs at the right of the window
Thanks to diver for the suggestion mockups!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42710 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9dcd41a8afd79a7743783f689707d6a4a62e25f6 06-Aug-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Some tweakings to the notificationsystem to make it look more like a regular alert.
Feel free to improve on it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7dd47a9be56876931f06d9d4e4fd4eb6a90451fe 21-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Fix off by one iconRect sizes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39914 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bdde2d307a0363b8ab05f941a8192e200b19dfcb 20-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Removed bilinear filter, as it was blurring all icons (and bitmap icons are
already rendered with a filter).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39896 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 31a3c4e885b825ecc271701479fcf69e5f0ac442 27-May-2010 Jérôme Duval <korli@users.berlios.de>

gcc 2.95 build fix


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36953 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f33637d9a8d0a6c080d85d375c8143cd13277d83 27-May-2010 Stephan Aßmus <superstippi@gmx.de>

* Improved BNotification API.
- No more manual memory management.
- Make it clear who keeps or releases ownership of arguments passed.
- Copy icon, arguments and entry_refs.
- Do not expose implementation details (What do the BLists contain?!).
- BRoster takes const BNotification& and bigtime_t timeout.

* BRoster::Notify():
- Proper error handling.
- Fixed documentation.

* Adjusted notify:
- Renamed fOk to fHasGoodArguments.
- The "const char*" members were really "char*" members (self-managed).
- free() is NULL-safe.
- fRefs contains BEntries, so passing void* to delete does no good.
- Adjustments to the changed API.
- Coding style fixes.

* notification_server:
- Adjustment to the new type for timeout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36952 a95241bf-73f2-0310-859d-f6bbb57e9c96


# de9dcd41f8865290849ce03385126dca1cd43a49 27-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by plfiorini: Integration of InfoPopper as a system service. See ticket
#1245. There are some TODOs outlined in the ticket, but they will be much
easier to review as individual patches against trunk, versus as a new version
of the huge patch.

I've messed a lot with src/servers/notification/NotificationsView.cpp in order
to resolve a crash I was getting when testing this thing (rewrote line
wrapping). I've also replaced the icons with the one that zuMi did long ago.

Thanks, plfiorini, for working on this code as much as you did!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36949 a95241bf-73f2-0310-859d-f6bbb57e9c96