History log of /haiku/src/preferences/filetypes/IconView.cpp
Revision Date Author Comments
# 1e0c1ca3 23-Mar-2024 Augustin Cavalier <waddlesplash@gmail.com>

FileTypes: Fix -Werror=parentheses after prior commits.


# 820d309b 23-Mar-2024 Axel Dörfler <axeld@pinc-software.de>

FileTypes: Fixed missing legacy icons with scaling

* Legacy icons would not be shown anymore, if scaling was applied.
* BApplicationInfo::GetIconForType() (and similar methods) do not support
scaling legacy icons, so when you request those with a non-standard
bitmap size, it will not work.
* Therefore, Icon::AllocateBitmap() now has a legacy mode that does no
scaling.
* And, since the Icon is not being drawn to screen directly,
Icon::GetIcon() does not support rescaling the source bitmap.

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


# f673ac0d 23-Mar-2024 Axel Dörfler <axeld@pinc-software.de>

FileTypes: Renamed some IconView members to avoid confusion

* fIcon -> fIconBitmap
* fIcanData -> fIcon
* Minor style fixes.

Change-Id: I16a99b41698824dacfe694d87826c137fa76dcbe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7546
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 6f4e8376 10-Mar-2023 Zach Dykstra <dykstra.zachary@gmail.com>

filetypes: fix incorrect usage

Commit 6d9b21e8 contained an error that resulted in FileTypes being
unable to set icons for files and directories. This should now be
resolved.

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


# 6d9b21e8 02-Mar-2023 Zach Dykstra <dykstra.zachary@gmail.com>

filetypes: support setting icons for directories

The FileTypes Tracker add-on allowed dragging-and-dropping an icon to
any open FileTypes information window, but directories were not
supported. Changing the icon for a directory (either directly, or via a
symlink) now works as expected.

Change-Id: I0c435ed789f79897972469f4e238f19789f8df1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6116
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# d3da4f98 28-Sep-2022 Augustin Cavalier <waddlesplash@gmail.com>

FileTypes: Refactor icon handling to use BControlLook::ComposeIconSize().

Fixes #17907.


# f0650dc9 09-Dec-2015 looncraz <looncraz@looncraz.net>

preferences: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0023-0037 from looncraz, unmodified.


# 3aeed660 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 1c56a03c 24-Jan-2014 John Scipione <jscipione@gmail.com>

Icons Screensaver: Get icons from MIME db again

The previous method only queried application icons, not document icons.

Unfortunately, the app icons in the MIME DB are broken/not present.
IconsSaver only displays document icons for the time being.

Because of better error checking the garbled icons are filtered out though
at least.

Next step is to fix the application icons in the MIME DB.

Some other changes:
* Don't draw if the BBitmap was not filled out correctly
* Add Vincent Duvert to authors list, he's already in copyright
* Convert fVectorIcons from a BList to a BObjectList
* Put vector_icon struct in it’s own header (needed for above)
* Remove type param from vector_icon struct
* Bump max icon count to 300, hopefully this should be enough, 128
is too few for app and document icons in default install.


# a70b623a 25-Aug-2012 Philippe Saint-Pierre <stpere@gmail.com>

FileTypes : IconView for non-applications fixes

IconView is now only setting the icon with BAppFileInfo when the file is an application,
otherwise relies on BNodeInfo. This avoids adding ressources within data files.

The IconView also wasn't populated correctly when used on data files (by opposition to
application binaries). It now loads the same icon that is shown in Tracker.


# 66ddd2d6 23-Aug-2012 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Move SetMouseEventMask() into MouseDown, where it should be.


# ff163a88 08-Aug-2012 Philippe Saint-Pierre <stpere@gmail.com>

FileTypes preflet: save HVIF icons as attributes only

Previously, changing a file's icon was creating both an attribute
and a ressource, now it only saves it as an attribute
i.e. don't change the file content.


# 52b530a5 08-Aug-2012 Philippe Saint-Pierre <stpere@gmail.com>

FileTypes preflet: IconView was not updated properly


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


# 37cebf68 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* fixed all warnings in FileTypes preflet and enabled -Werror

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


# 54123ac0 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* style adjustments - no functional change

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


# 60017080 12-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Style fix pointed out by Jérôme.


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


# 70d3fa99 11-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 867: Memory leak.


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


# 889a5477 12-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 630 : Allocation may fail.


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


# 8d7c9617 07-Aug-2010 Jérôme Duval <korli@users.berlios.de>

CID 1318: IconView::Invoke() should match BControl::Invoke() signature.


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


# 4eb0cbb0 07-May-2010 Matt Madia <mattmadia@gmail.com>

Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.


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


# b1c66135 06-May-2010 Matt Madia <mattmadia@gmail.com>

Updated to use B_TRANSLATE* macros. relates to #5408.

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


# 50a2f6d7 21-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

Puh... basically this is the patch by "yourpalal" from ticket #5690, which
converts the FileTypes preflet to use layout management. However, I had to
revert r36252, apply the patch and then manually add r36252 back on top.
I have fixed issues both in the layout management patch (broken layout
in the ApplicationTypesWindow) as well as the translation (untranslated labels
in alerts) and other problems with composed strings (one problem remains, but
already had a TODO). However, the hard work was taken care of by yourpalal!
Thanks a bunch!


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


# aaef889b 14-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Localize FileTypes.
It does not use the layout kit yet, so the tranlation doesn't look perfect. Anyone willing to update it ?


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


# 987acd11 07-Jan-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

The copyright year was mistakenly changed when sentance casing these files. this is now fixed.


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


# 0b2fbbfa 24-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by Humdinger to convert all the preference panels to sentance case.
Also update the localization catalogs as needed.
CPUFrequency localization is broken : the current code works, but the DoCatalogs jamrule is not powerful enough to properly extract the catkeys.


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


# 20ca748a 16-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Fixed a memory leak when creating the drag bitmap.
* Added an optional modification message that is triggered whenever the
view adopts a new icon.


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


# 26da5fe3 16-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Do not delete the private data of the BMessage! This fixes a crash when
dragging and dropping icons from one FileTypes window to another (in case
the dragged icon was a vector icon).
* Checked the other similar places, but all seems fine. Added a comment in
one place why no data is leaked, although it may seem to at first sight.


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


# 80f39d66 12-Sep-2008 Fredrik Modeen <fredrik@modeen.se>

fixes pointed out by Michael and Axel, thanks for pointing those out.

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


# f1ca556c 12-Sep-2008 Fredrik Modeen <fredrik@modeen.se>

Fixed CID 321, 868: check item for NULL and delete recource leak

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


# 741b3d90 17-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

Use B_RGBA32 instead of B_RGB32 when getting vector icons. Should fix bug #2525.

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


# 69e65f2f 29-Oct-2007 Jérôme Duval <korli@users.berlios.de>

replaced misc values with respective constants


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


# 35afdf5c 14-Apr-2007 Stephan Aßmus <superstippi@gmx.de>

* added vector icons for application and supported types
* added "icon heap" icon
* implemented loading vector icon for "icon heap"


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


# 2aba25f2 13-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed a bug that I eventually introduced that prevented Icon-O-Matic from being
started from FileTypes.


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


# dd778cd9 17-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Sending uninitialized buffers to Icon-O-Matic is sure fun, but it actually
caused Icon-O-Matic to refuse to work with us :)
* only call free() when the data has actually been allocated.


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


# 13417161 16-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* It's #ifdef HAIKU_TARGET_PLATFORM_HAIKU - not just #if :-)
* Fixed using B_EDIT_ICON_DATA for file types in ref mode, too, as well as having
the icon data ready for ref mode and MIME type mode.


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


# da071f77 17-Nov-2006 Stephan Aßmus <superstippi@gmx.de>

* use the external icon editor "protocol"
-> Icon-O-Matic is launched, but it says the data is not valid...
don't know why yet (will commit a newer Icon-O-Matic next)



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


# 7cb11339 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* TypeIconView now inherits from IconView and only adds the icon source label
to it - it also inherits all the features like drag&drop, of course.
* IconView now inherits from BControl instead of BView, might need some more
work to properly handle the invocation message stuff, though.
* The "Remove Icon" menu item was always enabled, no matter if there was an
icon or not; also it was not properly detected wether or not a MIME type
had an icon when building the menu.
* Dragging in MIME type mode now works as well.
* Added some getter methods to the IconView to retrieve the data it has.
* Some other cleanup, like adding missing consts.


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


# b724cb64 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

IconView can now also be set to a MIME type instead of a file or a buffer.
Untested actually, but FileTypesWindow's TypeIconView will be merged to this
one soon.


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


# 93ced9a1 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

The dragged icon is now slightly transparent.


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


# 035f2c2a 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

When dragging an icon into an icon view that gets its icon from its MIME type,
the vector icon is now retrieved as well.


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


# 5e0acbb2 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Now that the icons are keyboard navigable, we need a different drop target
identifier: note, this reveals a) an incompatibility between R5 and Haiku
with regards to drawing rects with a pen size != 1, b) a drawing bug in
that same case in non 32-bit modes - if you have time, Stippi... :-)
* If the icon view is bound to a file, it will no longer accept that specific
file as a drop target.


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


# 745e7694 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* The IconView is now keyboard navigable, and can be invoked (via the enter key),
or the current icon be deleted (using the delete key).
* Drag&drop between IconViews should now also work as expected for all icon
types (only the large icon was taken into consideration before).
* Improved error handling in the Icon::CopyTo() methods


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


# 5ac11417 14-Nov-2006 Jérôme Duval <korli@users.berlios.de>

fix gcc4 build


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


# 00cf1f46 14-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Moved icon_for_type() to IconView.cpp.


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


# 0b0ff90f 14-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Extended the IconView quite a bit to support what we need:
- supports drag&drop from icons (only tested for non-vector icons yet)
- allows to remove/edit/add icons (there is still need for support in Icon-O-Matic
for this to work completely)
- has a mode where it stores the changed icon data in an object rather than
directly to disk; this object can maintain all BeOS icon types
- reacts to live updates from file icons
- supports different view sizes (for later or uses in other apps)
* works again on BeOS (it crashed before because of a BeOS "feature").
* in the Application window, the "supported types" listview will now be enlarged
with the window instead of the long version description.
* To compensate for that, the latter now shows a scroll bar.
* Application delivered supported type icons are now shown as well, and can
be edited - they're not yet saved, though.


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


# bca3f1ef 03-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Added support for the vector icons to FileTypes and DiskProbe.


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


# b0bc48fb 19-May-2006 Axel Dörfler <axeld@pinc-software.de>

Some more GCC 4 and PPC fixes.
* Mesa doesn't compile yet, as some PPC specific stuff seems to be
missing, Philippe?
* Cortex and some other stuff has been marked x86-only, although
it's more of a "GCC 2.95.3"-only.
* I'm not sure if it's a bug in GCC 4, or if that's what the C
standard demands, but sizeof(some_type::some_field) is not
valid anymore :-/


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


# d1b62548 14-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Added the possibility to see and edit the sniffer rule of a type
(realized as an option enabled in the menu).
* Minor bug fixes and changes.


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


# b57ef1e6 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Some more work on the application type window: it now shows the correct
entries, and you can edit everything but icons and supported types.
Saving is also possible now (but it won't ask yet if you close the
window and has made some changes).


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


# 50751440 07-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Beginnings of the application type window - doesn't do anything yet, but at
least it looks more or less okay (long description border isn't right yet)
and is font sensitive.


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


# 9638d4c8 07-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed a font sensitivity issue not visible under BeOS.
* IconView now draws a rectangle in case there is no icon to let the
user know there is something he could click on.


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


# a051f666 06-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Changed the way file panels are created, there is now only a single message
the FileType application understands.
* The FileTypeWindow now has support for setting the type via "Same As...",
also by dropping a file over the window.
* The preferred application of a file can now also be specified via "Select...",
and "Same As...".
* Moved FileTypesWindow::_AdoptPreferredApplication() to PreferredAppMenu.cpp;
FileTypeWindow is now using it as well.
* Shuffled some functions around a bit.


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


# f793ebf4 06-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Added an icon view to the file type window.
* Renamed the IconView class in the FileTypesWindow to TypeIconView.


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


# 3aeed6607cd07762c0e709633c012b3a632dbad9 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 1c56a03c51fe268636ec1f48d067fa82f7082b1e 24-Jan-2014 John Scipione <jscipione@gmail.com>

Icons Screensaver: Get icons from MIME db again

The previous method only queried application icons, not document icons.

Unfortunately, the app icons in the MIME DB are broken/not present.
IconsSaver only displays document icons for the time being.

Because of better error checking the garbled icons are filtered out though
at least.

Next step is to fix the application icons in the MIME DB.

Some other changes:
* Don't draw if the BBitmap was not filled out correctly
* Add Vincent Duvert to authors list, he's already in copyright
* Convert fVectorIcons from a BList to a BObjectList
* Put vector_icon struct in it’s own header (needed for above)
* Remove type param from vector_icon struct
* Bump max icon count to 300, hopefully this should be enough, 128
is too few for app and document icons in default install.


# a70b623a51917a895b48e86c216f3e909d00c611 25-Aug-2012 Philippe Saint-Pierre <stpere@gmail.com>

FileTypes : IconView for non-applications fixes

IconView is now only setting the icon with BAppFileInfo when the file is an application,
otherwise relies on BNodeInfo. This avoids adding ressources within data files.

The IconView also wasn't populated correctly when used on data files (by opposition to
application binaries). It now loads the same icon that is shown in Tracker.


# 66ddd2d6e9e619833eaaddb58933505b9a148dae 23-Aug-2012 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Move SetMouseEventMask() into MouseDown, where it should be.


# ff163a8803ccc7c45b22b49c58d15628bd83d413 08-Aug-2012 Philippe Saint-Pierre <stpere@gmail.com>

FileTypes preflet: save HVIF icons as attributes only

Previously, changing a file's icon was creating both an attribute
and a ressource, now it only saves it as an attribute
i.e. don't change the file content.


# 52b530a507cf1732e7f8a894eb3a86f5bf4d25b8 08-Aug-2012 Philippe Saint-Pierre <stpere@gmail.com>

FileTypes preflet: IconView was not updated properly


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


# 37cebf6883e52061e1c31f263eacdd2d04078e4e 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* fixed all warnings in FileTypes preflet and enabled -Werror

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


# 54123ac0e823379dba82c26ac21a7cf8c2791c4a 17-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* style adjustments - no functional change

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


# 600170807a3f21c4da98f6b77ac1e680675576a3 12-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Style fix pointed out by Jérôme.


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


# 70d3fa99c20cdfe7f1d6cf01550f0724828bb230 11-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 867: Memory leak.


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


# 889a54778028c3025c82f451682df64dbe627a64 12-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 630 : Allocation may fail.


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


# 8d7c9617f10ae6d0757f4b69ed6a17abef30e1e7 07-Aug-2010 Jérôme Duval <korli@users.berlios.de>

CID 1318: IconView::Invoke() should match BControl::Invoke() signature.


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


# 4eb0cbb044cf538f18c0d252934a5bcaa33bfd34 07-May-2010 Matt Madia <mattmadia@gmail.com>

Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.


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


# b1c66135aaec3a620da112814360a539c094740c 06-May-2010 Matt Madia <mattmadia@gmail.com>

Updated to use B_TRANSLATE* macros. relates to #5408.

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


# 50a2f6d7b20e0c0b24b47f85622e445bf84e81a8 21-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

Puh... basically this is the patch by "yourpalal" from ticket #5690, which
converts the FileTypes preflet to use layout management. However, I had to
revert r36252, apply the patch and then manually add r36252 back on top.
I have fixed issues both in the layout management patch (broken layout
in the ApplicationTypesWindow) as well as the translation (untranslated labels
in alerts) and other problems with composed strings (one problem remains, but
already had a TODO). However, the hard work was taken care of by yourpalal!
Thanks a bunch!


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


# aaef889bfb923a15df9ed3f6d7a31a941a1fe9ca 14-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Localize FileTypes.
It does not use the layout kit yet, so the tranlation doesn't look perfect. Anyone willing to update it ?


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


# 987acd111bd88fd406544c98f652f7969b8a4064 07-Jan-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

The copyright year was mistakenly changed when sentance casing these files. this is now fixed.


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


# 0b2fbbfaa9d35d304991f3543276c8e46f155460 24-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by Humdinger to convert all the preference panels to sentance case.
Also update the localization catalogs as needed.
CPUFrequency localization is broken : the current code works, but the DoCatalogs jamrule is not powerful enough to properly extract the catkeys.


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


# 20ca748ade7ec9372490aaca418e25939d435340 16-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Fixed a memory leak when creating the drag bitmap.
* Added an optional modification message that is triggered whenever the
view adopts a new icon.


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


# 26da5fe367890a9a7329ffc678149d075979b40c 16-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Do not delete the private data of the BMessage! This fixes a crash when
dragging and dropping icons from one FileTypes window to another (in case
the dragged icon was a vector icon).
* Checked the other similar places, but all seems fine. Added a comment in
one place why no data is leaked, although it may seem to at first sight.


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


# 80f39d66d4753a63c9adb6c6ad817a0408960305 12-Sep-2008 Fredrik Modeen <fredrik@modeen.se>

fixes pointed out by Michael and Axel, thanks for pointing those out.

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


# f1ca556caf9f79bb9138a61896677c5b7d9ee6ca 12-Sep-2008 Fredrik Modeen <fredrik@modeen.se>

Fixed CID 321, 868: check item for NULL and delete recource leak

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


# 741b3d900407a351d228e11d6e7a2b1dfed1f2f3 17-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

Use B_RGBA32 instead of B_RGB32 when getting vector icons. Should fix bug #2525.

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


# 69e65f2f57747be872249e98c7a40ac0992e38a0 29-Oct-2007 Jérôme Duval <korli@users.berlios.de>

replaced misc values with respective constants


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


# 35afdf5cc9cdd2877206f0178d61d1d95d07aa5e 14-Apr-2007 Stephan Aßmus <superstippi@gmx.de>

* added vector icons for application and supported types
* added "icon heap" icon
* implemented loading vector icon for "icon heap"


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


# 2aba25f273f1a11b79e4543348b53b8155d65afe 13-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

Fixed a bug that I eventually introduced that prevented Icon-O-Matic from being
started from FileTypes.


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


# dd778cd92b04e8f19ea5b0240f8d7aa75884e7c1 17-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Sending uninitialized buffers to Icon-O-Matic is sure fun, but it actually
caused Icon-O-Matic to refuse to work with us :)
* only call free() when the data has actually been allocated.


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


# 13417161c87d214e162b2fd0088cbc32ddc03b5d 16-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* It's #ifdef HAIKU_TARGET_PLATFORM_HAIKU - not just #if :-)
* Fixed using B_EDIT_ICON_DATA for file types in ref mode, too, as well as having
the icon data ready for ref mode and MIME type mode.


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


# da071f77c943b6f05491bf5762402bc9f837ca94 17-Nov-2006 Stephan Aßmus <superstippi@gmx.de>

* use the external icon editor "protocol"
-> Icon-O-Matic is launched, but it says the data is not valid...
don't know why yet (will commit a newer Icon-O-Matic next)



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


# 7cb11339a0623be7d5e3009d75d57bbb353e841a 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* TypeIconView now inherits from IconView and only adds the icon source label
to it - it also inherits all the features like drag&drop, of course.
* IconView now inherits from BControl instead of BView, might need some more
work to properly handle the invocation message stuff, though.
* The "Remove Icon" menu item was always enabled, no matter if there was an
icon or not; also it was not properly detected wether or not a MIME type
had an icon when building the menu.
* Dragging in MIME type mode now works as well.
* Added some getter methods to the IconView to retrieve the data it has.
* Some other cleanup, like adding missing consts.


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


# b724cb640860c7ef2ec2dc6f592d3a88098a6dac 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

IconView can now also be set to a MIME type instead of a file or a buffer.
Untested actually, but FileTypesWindow's TypeIconView will be merged to this
one soon.


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


# 93ced9a11ccd21e9bf8d540180ea196b69b2c1d1 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

The dragged icon is now slightly transparent.


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


# 035f2c2a4d3d4a291620cab84f03d07f1a11a22b 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

When dragging an icon into an icon view that gets its icon from its MIME type,
the vector icon is now retrieved as well.


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


# 5e0acbb2fbbedafb4887ebe238e8fda1a6be4002 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Now that the icons are keyboard navigable, we need a different drop target
identifier: note, this reveals a) an incompatibility between R5 and Haiku
with regards to drawing rects with a pen size != 1, b) a drawing bug in
that same case in non 32-bit modes - if you have time, Stippi... :-)
* If the icon view is bound to a file, it will no longer accept that specific
file as a drop target.


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


# 745e7694e587ba8af494e9fbda9b087766ab6209 15-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* The IconView is now keyboard navigable, and can be invoked (via the enter key),
or the current icon be deleted (using the delete key).
* Drag&drop between IconViews should now also work as expected for all icon
types (only the large icon was taken into consideration before).
* Improved error handling in the Icon::CopyTo() methods


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


# 5ac11417e59a5be5ecd14590ce7df4cc56d86786 14-Nov-2006 Jérôme Duval <korli@users.berlios.de>

fix gcc4 build


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


# 00cf1f4671a33520acd8a6eb937e0e2a83550b5f 14-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Moved icon_for_type() to IconView.cpp.


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


# 0b0ff90fa0742fb59c66fc597f34ea16222733a5 14-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Extended the IconView quite a bit to support what we need:
- supports drag&drop from icons (only tested for non-vector icons yet)
- allows to remove/edit/add icons (there is still need for support in Icon-O-Matic
for this to work completely)
- has a mode where it stores the changed icon data in an object rather than
directly to disk; this object can maintain all BeOS icon types
- reacts to live updates from file icons
- supports different view sizes (for later or uses in other apps)
* works again on BeOS (it crashed before because of a BeOS "feature").
* in the Application window, the "supported types" listview will now be enlarged
with the window instead of the long version description.
* To compensate for that, the latter now shows a scroll bar.
* Application delivered supported type icons are now shown as well, and can
be edited - they're not yet saved, though.


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


# bca3f1efbfbbeba03fb4e11df34f1c1c8770e2b3 03-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Added support for the vector icons to FileTypes and DiskProbe.


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


# b0bc48fbd360f10cee1856e03393c63dcbdd180f 19-May-2006 Axel Dörfler <axeld@pinc-software.de>

Some more GCC 4 and PPC fixes.
* Mesa doesn't compile yet, as some PPC specific stuff seems to be
missing, Philippe?
* Cortex and some other stuff has been marked x86-only, although
it's more of a "GCC 2.95.3"-only.
* I'm not sure if it's a bug in GCC 4, or if that's what the C
standard demands, but sizeof(some_type::some_field) is not
valid anymore :-/


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


# d1b62548b120c3b2ed06118da60abd7a03b469b5 14-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Added the possibility to see and edit the sniffer rule of a type
(realized as an option enabled in the menu).
* Minor bug fixes and changes.


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


# b57ef1e6511995b7b70f2d09c638ef418b0627df 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Some more work on the application type window: it now shows the correct
entries, and you can edit everything but icons and supported types.
Saving is also possible now (but it won't ask yet if you close the
window and has made some changes).


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


# 507514408c37d12c3d24dafa1bcd0265b753fdeb 07-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Beginnings of the application type window - doesn't do anything yet, but at
least it looks more or less okay (long description border isn't right yet)
and is font sensitive.


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


# 9638d4c87730eb6ab5ecb68f6b5a93689175d05f 07-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed a font sensitivity issue not visible under BeOS.
* IconView now draws a rectangle in case there is no icon to let the
user know there is something he could click on.


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


# a051f66681931057536717d0f5b56773a2a4963e 06-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Changed the way file panels are created, there is now only a single message
the FileType application understands.
* The FileTypeWindow now has support for setting the type via "Same As...",
also by dropping a file over the window.
* The preferred application of a file can now also be specified via "Select...",
and "Same As...".
* Moved FileTypesWindow::_AdoptPreferredApplication() to PreferredAppMenu.cpp;
FileTypeWindow is now using it as well.
* Shuffled some functions around a bit.


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


# f793ebf4db716f31e32e86b83fe9160bbfb04e70 06-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Added an icon view to the file type window.
* Renamed the IconView class in the FileTypesWindow to TypeIconView.


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