History log of /haiku/src/apps/autoraise/settings.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>


# 2708c3e1 15-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Making it build. Mostly untested. I just wanted to be able to jam from within src/apps. Not part of the image.

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


# 2708c3e1c8113b881d7584037408c0cd73b3918f 15-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Making it build. Mostly untested. I just wanted to be able to jam from within src/apps. Not part of the image.

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