History log of /haiku/src/apps/autoraise/AutoRaiseApp.cpp
Revision Date Author Comments
# 107712bf 16-Oct-2020 Kyle Ambroff-Kao <kyle@ambroffkao.com>

AutoRaise: Properly load tray icon bitmap

AutoRaise needs to load bitmaps stored as resources in the AppRaise
image. The strategy it used before was to store the path to itself in
its settings file.

It stored the entry_ref to the image in the settings, which may not be
stable across reboots with packagefs. In addition, the path could
change at some point for any other reason.

This patch changes AutoRaise to just use the same method as other tray
applets, which is to search the process for the image containing the
AutoRaise code, and then to get the path from the image_info.

Most of the initialization work is performed by TrayView::_init(),
which is called by the constructor. Some of the operations performed
by this method can fail, leaving TrayView partially initialized. Any
error is handled by returning early after telling Deskbar to remove
this item so that it will not continue running in a partially
initialized state. Deskbar will invoke the destructor so even a
partially initialized TrayView will be cleaned up.

Fixes #16473

Change-Id: Id1ac1ef78d410a7d191cfe88f1ba1db30e258adc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3341
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# e769acbe 15-Oct-2020 Murai Takashi <tmurai01@gmail.com>

autoraise: Fix -Wformat-security

And use BString.String() for printf().

Change-Id: Id11394bb9278764ed25fde801d82a177ad0d88b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3318
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# cbc96724 29-Jul-2019 Murai Takashi <tmurai01@gmail.com>

Localize AutoRaise

Change-Id: I3d71aa0691c4d8a59b6e8d4dbb2d7d4e7eab47c9
Reviewed-on: https://review.haiku-os.org/c/1659
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 46308e28 10-Mar-2019 François Revol <revol@free.fr>

AutoRaise: Just add itself to Deskbar on run

It's simpler, nobody runs things in Terminal, right?


# b073a8c8 24-Jan-2019 Rob Gill <rrobgill@protonmail.com>

apps/autoraise Restore functionality

* Restore functionality / compilation
(C++11)Spacing issues with string macros fixed.
Fix type declarartion for removeFromDeskbar so compiles
on x86_64.

* Code format cleanup

* Remove DANO related code

Change-Id: I738d14914e320b7606210d8263065187b2c06b1a
Reviewed-on: https://review.haiku-os.org/c/898
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


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


# 7974d3dc 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


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


# fe8567ec 10-May-2008 François Revol <revol@free.fr>

The code for my (very useful if you ask me) AutoRaise deskbar addon that brings the focussed window to front after a timeout.
MIT of course.


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


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


# 7974d3dcf39ce78e5885b481eee12e561ad6e096 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


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


# fe8567ec1c1bf4161bce89a837c8e31af0cfb51d 10-May-2008 François Revol <revol@free.fr>

The code for my (very useful if you ask me) AutoRaise deskbar addon that brings the focussed window to front after a timeout.
MIT of course.


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