History log of /haiku/src/servers/notification/NotificationWindow.cpp
Revision Date Author Comments
# 726fb6c4 23-Dec-2017 Augustin Cavalier <waddlesplash@gmail.com>

notification_server: Fix x86_64 build (missing parentheses).


# 226f6c8b 11-Dec-2017 Hrishi Hiraskar <hrishihiraskar@gmail.com>

Notification_Server: Added ability to choose position of notifications

The feature gives user ability to choose the position of notifications
out of Follow Deskbar, Lower Right, Lower Left, Upper Right and Upper
Left. Fixes #9749 - Notification_Server: add the ability to choose the
position of notifications (easy).

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 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...


# 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


# 6e02aa9d 01-Jan-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

NotificationWindow: fix memory leak

Thanks to mt for analysis of the problem. Fixed in a different way from
the original patch.

Fixes #13135.


# 56a63697 16-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

notification_server: Don't remove the views from the layout.

Removing the view from the window and deleting it is fine. This is a
quick fix for #11976. The underlaying issue of how BLayout::RemoveView
should work still needs to be fixed.


# 053e02b4 07-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

Notifications: make "enable on startup" work.

Fixes #9425.


# 015a928b 21-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Notifications: use a single settings file.

There were 3 setting files, each an archived BMessage. Now there is only
one with all the data inside.
* Rework the SettingsPane class to save and load settings from a
message, rather than having each panel pick a file path on its own
* Move saving the app filters to the preference app, rather than the
server (so it's done at the same place as other settings)
* Rework loading prefs in the server so the settings message is read
from the file once and all settings are loaded from it.

This turns out to be more changes than I anticipated.
Fixes #9424.


# a74b2df9 11-Nov-2013 Janus <janus2@ymail.com>

Fix #9448. [notification_server] monitors screen resolution


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

Improve alignment and layout of the notifications.

Implements diver's mockup from #8566.


# 02d04a76 28-Dec-2012 Janus <janus2@ymail.com>

Fix #9330. Notifications Window is always inside the screen

Signed-off-by: Jerome Duval <jerome.duval@gmail.com>


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

Use Web+ tabs close button

Fixes #9566


# aed35104 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


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

Resolve TODO about possible use after free bug.


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

Have NotificationWindow enforce the window size setting.


# 710eb741 21-Jan-2012 Alex Wilson <yourpalal2@gmail.com>

Clean up use of SetPosition().

This fixes a bug where an empty white window would appear when changing
workspaces if there were no notifications.


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

Style cleanup in notification_server: #includes


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

Fix bug in NotificationWindow where the window would be double hidden.

Also simplify and rename _ResizeAll(), now that AppGroupViews remove
themselves.


# cbdd108a 14-Jan-2012 Alex Wilson <yourpalal2@gmail.com>

In NotificationWindow, delete AppGroupViews when closed.

This is preferable to having them kick around for as long as the server
is running. They don't yet close when all of the notifications for the
view time out, that's coming next.


# 2966cc34 03-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Calling Show() in the constructor unlocks the Looper, so calling SetPosition after that doesn't work.
Tweak the code around as it doesn't really have to be done there :
* Remove the Show() method override
* Make sure the window is layouted and moved to the right place before showing it (which is what this early SetPosition call attempted to do)


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


# 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


# 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


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

* Fix DecoratorFrame() for kLeftTitledWindowLook windows
* Use it in notification window for better positionning.
Thanks augiedoggie for reporting the problem !


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


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

Ensure the window is at the right position before showing it. Fixes #7011.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42587 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


# 70a1f349 19-Feb-2011 Siarzhuk Zharski <zharik@gmx.li>

The "usage" field of property_info should not be localized.


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


# 720020e0 17-Feb-2011 Siarzhuk Zharski <zharik@gmx.li>

Applied yet another localization patch made by Jorma Karvonen.
Fixes #7005. Thanks.
Exclusions:
- localization of "usage" field of BPropertyInfo rejected - looks like
it is not displayed to user;
- localization of Sound Event names discarded. The situation is at least
questionable and should be discussed.



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


# 2115850c 01-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Fixed a typo.


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


# 164fceb2 02-Jul-2010 Wim van der Meer <wpjvandermeer@gmail.com>

* Fix 'missing braces around initializer for 'property_info'' warning
* Style cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37361 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


# 56a63697ae2471084f4fa7ecc753f2a6582ccef2 16-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

notification_server: Don't remove the views from the layout.

Removing the view from the window and deleting it is fine. This is a
quick fix for #11976. The underlaying issue of how BLayout::RemoveView
should work still needs to be fixed.


# 053e02b45fae9d04d068a4b1a62ba5ed40a229c7 07-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

Notifications: make "enable on startup" work.

Fixes #9425.


# 015a928b8897265e5c98046e20b8d561a2f0034d 21-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Notifications: use a single settings file.

There were 3 setting files, each an archived BMessage. Now there is only
one with all the data inside.
* Rework the SettingsPane class to save and load settings from a
message, rather than having each panel pick a file path on its own
* Move saving the app filters to the preference app, rather than the
server (so it's done at the same place as other settings)
* Rework loading prefs in the server so the settings message is read
from the file once and all settings are loaded from it.

This turns out to be more changes than I anticipated.
Fixes #9424.


# a74b2df99299e86a8f2a7f0994d342482958e3d4 11-Nov-2013 Janus <janus2@ymail.com>

Fix #9448. [notification_server] monitors screen resolution


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

Improve alignment and layout of the notifications.

Implements diver's mockup from #8566.


# 02d04a7664c0fa9b4c1caf5a04613455bd9b7228 28-Dec-2012 Janus <janus2@ymail.com>

Fix #9330. Notifications Window is always inside the screen

Signed-off-by: Jerome Duval <jerome.duval@gmail.com>


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

Use Web+ tabs close button

Fixes #9566


# aed35104852941f0f6f3d1dcc5338b5f337d0a3c 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


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

Resolve TODO about possible use after free bug.


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

Have NotificationWindow enforce the window size setting.


# 710eb7410f2ca3200259d84a5e3f71dde0a21b6f 21-Jan-2012 Alex Wilson <yourpalal2@gmail.com>

Clean up use of SetPosition().

This fixes a bug where an empty white window would appear when changing
workspaces if there were no notifications.


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

Style cleanup in notification_server: #includes


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

Fix bug in NotificationWindow where the window would be double hidden.

Also simplify and rename _ResizeAll(), now that AppGroupViews remove
themselves.


# cbdd108a09ab47c523a6debd679eddbe35d1b15c 14-Jan-2012 Alex Wilson <yourpalal2@gmail.com>

In NotificationWindow, delete AppGroupViews when closed.

This is preferable to having them kick around for as long as the server
is running. They don't yet close when all of the notifications for the
view time out, that's coming next.


# 2966cc349766a55f2bb9f10bde5eeadef968b1e0 03-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Calling Show() in the constructor unlocks the Looper, so calling SetPosition after that doesn't work.
Tweak the code around as it doesn't really have to be done there :
* Remove the Show() method override
* Make sure the window is layouted and moved to the right place before showing it (which is what this early SetPosition call attempted to do)


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


# 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


# 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


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

* Fix DecoratorFrame() for kLeftTitledWindowLook windows
* Use it in notification window for better positionning.
Thanks augiedoggie for reporting the problem !


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


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

Ensure the window is at the right position before showing it. Fixes #7011.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42587 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


# 70a1f349341aa08364b9f204585fe67d23275426 19-Feb-2011 Siarzhuk Zharski <zharik@gmx.li>

The "usage" field of property_info should not be localized.


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


# 720020e0b97a8ec926a1da7bf82c8933040c57b4 17-Feb-2011 Siarzhuk Zharski <zharik@gmx.li>

Applied yet another localization patch made by Jorma Karvonen.
Fixes #7005. Thanks.
Exclusions:
- localization of "usage" field of BPropertyInfo rejected - looks like
it is not displayed to user;
- localization of Sound Event names discarded. The situation is at least
questionable and should be discussed.



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


# 2115850c7e88fefaefed8f1aa7f04a31f60cba7b 01-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Fixed a typo.


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


# 164fceb29a736351d5f3f49d3d716250e2ebcef0 02-Jul-2010 Wim van der Meer <wpjvandermeer@gmail.com>

* Fix 'missing braces around initializer for 'property_info'' warning
* Style cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37361 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