History log of /haiku/headers/os/translation/TranslationUtils.h
Revision Date Author Comments
# e7730456 06-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Actually sort the translator menu used in ShowImage.

There were two problems with the last commit:

* the list needed to be outside of the top-level loop.
* BList was just broken for sorting translation_format pointers.

I fixed this by moving the loop outside and converting the translation_formats
to translator_info, which has the translator_id, since that is needed to create
the menu item, and would otherwise be unavailable outside the loop.

I tried to get this working with BList, but the sorting was completely broken,
and converting to BObjectList made the code much, much better and worked great.
Screw BList and casting, hurray templated BObjectList.

Really fixes #6782.


# adfe152e 06-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Sort the translation formats in AddTranslationItems by name.

This is used by ShowImage and CodyCam to create a list of image formats which a
file can be saved as. Tracker sorts the image MIME types used in the Find
window by name, so this makes these Save As menus match that (minus the icons
which I think are superfluous.)

Fixes #6782.

If the use of BList is no longer recommended, I welcome better suggestions
for sorting which will work in both GCC2 and GCC4. But this works ;)


# cbcc98ed 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Obviously, the GraphicsDefs.h header is needed as well.


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


# d7571ebc 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote headers as needed.
* Cleaned up our own headers.
* Moved translator errors into Errors.h.
* Removed extra TranslationKit.h.


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


# f6e4cbb9 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


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


# 849de6ef 16-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Added another GetStyledText() function to force a specific encoding.


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


# 8acdd17f 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Added WriteStyledEditFile() variant that gets an encoding argument; it will automatically
encode the text in the BTextView accordingly.


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


# 65328c9b 12-Dec-2002 Matthew Wilber <mwilber@nowhere.fake>

eliminated an unnessecary function


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


# 8da2aed8 17-Oct-2002 Matthew Wilber <mwilber@nowhere.fake>

fixed a spelling issue


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


# 52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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


# e77304562da050fbc739b99474f8b5bfad0cf5b2 06-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Actually sort the translator menu used in ShowImage.

There were two problems with the last commit:

* the list needed to be outside of the top-level loop.
* BList was just broken for sorting translation_format pointers.

I fixed this by moving the loop outside and converting the translation_formats
to translator_info, which has the translator_id, since that is needed to create
the menu item, and would otherwise be unavailable outside the loop.

I tried to get this working with BList, but the sorting was completely broken,
and converting to BObjectList made the code much, much better and worked great.
Screw BList and casting, hurray templated BObjectList.

Really fixes #6782.


# adfe152ee269d1d6153827ca38a174f217d2634d 06-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Sort the translation formats in AddTranslationItems by name.

This is used by ShowImage and CodyCam to create a list of image formats which a
file can be saved as. Tracker sorts the image MIME types used in the Find
window by name, so this makes these Save As menus match that (minus the icons
which I think are superfluous.)

Fixes #6782.

If the use of BList is no longer recommended, I welcome better suggestions
for sorting which will work in both GCC2 and GCC4. But this works ;)


# cbcc98ed560971786a613d79d1cfceee00c46581 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Obviously, the GraphicsDefs.h header is needed as well.


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


# d7571ebcf7b31d7fa5d55a500910ee288a22bd00 27-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Rewrote headers as needed.
* Cleaned up our own headers.
* Moved translator errors into Errors.h.
* Removed extra TranslationKit.h.


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


# f6e4cbb95290a74b33d012600438b84742b0e572 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


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


# 849de6ef97abbd7348813f57e549c8bea9a3180d 16-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Added another GetStyledText() function to force a specific encoding.


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


# 8acdd17f08d9bb540cb943c7f82842372785e82f 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Added WriteStyledEditFile() variant that gets an encoding argument; it will automatically
encode the text in the BTextView accordingly.


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


# 65328c9bf0fbccdee71c0e3fcfab2968c90ecc21 12-Dec-2002 Matthew Wilber <mwilber@nowhere.fake>

eliminated an unnessecary function


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


# 8da2aed83101767678a288a9ac2e8f04beb5bf4b 17-Oct-2002 Matthew Wilber <mwilber@nowhere.fake>

fixed a spelling issue


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


# 52a380120846174213ccce9c4aab0dda17c72083 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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