History log of /haiku/src/apps/screenshot/Utility.cpp
Revision Date Author Comments
# 644c29d0 07-Jan-2022 Augustin Cavalier <waddlesplash@gmail.com>

Adjust all in-tree applications after BBitmap::ImportBits API changes.

Change-Id: If3a06f35c01089cdbb696de479984f2b59fce7a0


# cc946437 30-Jan-2014 Axel Dörfler <axeld@pinc-software.de>

Screenshot: fixed alpha channel handling.

* Screenshot always used B_RGBA32 color space, but did not care about the
alpha channel at all. Now it only uses that space when "includeBorder"
is used.
* Utility::_MakeTabSpaceTransparent() now also makes sure that the rest
of the bitmap has the correct alpha channel set. This fixes bug #10491.
* Minor cleanup.


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


# c5fd97e4 07-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Remove needless call to String(), there's an operator for that.

The operator const char*() automatically converts to the needed type
so the explicit BString::String() call isn't needed here. Thanks to
Clemens for pointing that out.


# f28e19f5 06-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Use the right value as id for the BTranslatorRoster call.

The loop counter was used as the id directly instead of using it as the
index into the translator_id array.


# e6f323bb 06-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Strings owned by local stack objects can't be returned.

The BString is destroyed when the function returns and takes the
storage pointed to by BString::String() with it, so returning such a
pointer is bogus. Instead the return type is now a BString which takes
over ownership of the string.


# e015add1 07-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 1761 : Dereferencing a potentially NULL pointer.


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


# 8eff03f5 25-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* fixed all build warnings by collectcatkeys that I found
* automatic whitespace cleanup

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


# 0c9f5a02 25-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

* Modified PtrScr key behaviour:
- No modifiers: take a screenshot with zero delay and launch the GUI
- Shift-PrtScr: Silent screenshot using the saved GUI settings
- Ctrl-PrtScr: Take a screenshot using the saved GUI settings and copy the
screenshot to the system clipboard
* A few locale related changes (I am not sure how this works when a class is
shared between two applications, I hope I got everything right)



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


# 2ec6b3cf 05-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

Screenshot application enhancements:
- Remove the options panel, and the "-o, --options" switch, put all options
inside the main panel as discussed in ticket #3831.
- Add a "Copy to clipboard" button, as discussed in ticket #3831.
- Add a "-c, --clipboard" switch to quickly copy a screenshot to the clipboard
without launching the GUI.
- All settings apply directly to the current schreenshot as well as new
Screenshots, as discussed in ticket #4100.
- Separate executables for the CLI (Screenshot) and GUI (ScreenshotApp).
When "Screenshot" is launched it runs in the background, and launches the
GUI (if not run with the -s or -c switch) before quiting itself. When a new
screenshot is requested through the ScreenshotApp GUI interface,
ScreenshotApp launches Screenshot before quiting itself, after which
Screenshot re-launches ScreenshotApp. This fixes ticket #4100.
Note that because of this change the deskbar entry will show "ScreenshotApp"
and not "Screenshot" as might be expected. I am not sure if this is a
problem.
- Fixed the code that determines the active window because it was just finding
the top most window. This change fixes tickets #3112, #4878, and #4423.
- Hide the cursor by calling BApplication::HideCursor().
This fixes ticket #2988 (but *not* #2997).


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


# cc9464372450658c8cb898b2f8b3b91fbd3a0834 30-Jan-2014 Axel Dörfler <axeld@pinc-software.de>

Screenshot: fixed alpha channel handling.

* Screenshot always used B_RGBA32 color space, but did not care about the
alpha channel at all. Now it only uses that space when "includeBorder"
is used.
* Utility::_MakeTabSpaceTransparent() now also makes sure that the rest
of the bitmap has the correct alpha channel set. This fixes bug #10491.
* Minor cleanup.


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


# c5fd97e486e4837e8fa91bc2b59453cb6dd22e2d 07-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Remove needless call to String(), there's an operator for that.

The operator const char*() automatically converts to the needed type
so the explicit BString::String() call isn't needed here. Thanks to
Clemens for pointing that out.


# f28e19f5be174afa6dd95af9ef35171bd48e3f1f 06-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Use the right value as id for the BTranslatorRoster call.

The loop counter was used as the id directly instead of using it as the
index into the translator_id array.


# e6f323bb575c150b7f21ff3fbd7a8ecdb04906cc 06-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Strings owned by local stack objects can't be returned.

The BString is destroyed when the function returns and takes the
storage pointed to by BString::String() with it, so returning such a
pointer is bogus. Instead the return type is now a BString which takes
over ownership of the string.


# e015add1850997ecfd2e0ebfa288bbc37cc7d5a1 07-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 1761 : Dereferencing a potentially NULL pointer.


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


# 8eff03f5705966c294c96a4e249bb525069b8e78 25-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* fixed all build warnings by collectcatkeys that I found
* automatic whitespace cleanup

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


# 0c9f5a026f4ccc18b4e8e51b8d907818e3cafa3b 25-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

* Modified PtrScr key behaviour:
- No modifiers: take a screenshot with zero delay and launch the GUI
- Shift-PrtScr: Silent screenshot using the saved GUI settings
- Ctrl-PrtScr: Take a screenshot using the saved GUI settings and copy the
screenshot to the system clipboard
* A few locale related changes (I am not sure how this works when a class is
shared between two applications, I hope I got everything right)



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


# 2ec6b3cf5dd9cd47c57249233320603251df47b3 05-Jun-2010 Wim van der Meer <wpjvandermeer@gmail.com>

Screenshot application enhancements:
- Remove the options panel, and the "-o, --options" switch, put all options
inside the main panel as discussed in ticket #3831.
- Add a "Copy to clipboard" button, as discussed in ticket #3831.
- Add a "-c, --clipboard" switch to quickly copy a screenshot to the clipboard
without launching the GUI.
- All settings apply directly to the current schreenshot as well as new
Screenshots, as discussed in ticket #4100.
- Separate executables for the CLI (Screenshot) and GUI (ScreenshotApp).
When "Screenshot" is launched it runs in the background, and launches the
GUI (if not run with the -s or -c switch) before quiting itself. When a new
screenshot is requested through the ScreenshotApp GUI interface,
ScreenshotApp launches Screenshot before quiting itself, after which
Screenshot re-launches ScreenshotApp. This fixes ticket #4100.
Note that because of this change the deskbar entry will show "ScreenshotApp"
and not "Screenshot" as might be expected. I am not sure if this is a
problem.
- Fixed the code that determines the active window because it was just finding
the top most window. This change fixes tickets #3112, #4878, and #4423.
- Hide the cursor by calling BApplication::HideCursor().
This fixes ticket #2988 (but *not* #2997).


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