* Added TODO comment about missing vector icon support

* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19201 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-11-04 16:22:58 +00:00
parent 2a105bc1e6
commit e1e2b03bb7
+13 -7
View File
@@ -1,7 +1,12 @@
//---------------------------------------------------------------------- /*
// This software is part of the OpenBeOS distribution and is covered * Copyright 2002-2006, Haiku Inc.
// by the OpenBeOS license. * Distributed under the terms of the MIT License.
//--------------------------------------------------------------------- *
* Authors:
* Tyler Dauwalder
* Ingo Weinhold, [email protected]
*/
/*! /*!
\file Mime.cpp \file Mime.cpp
Mime type C functions implementation. Mime type C functions implementation.
@@ -31,7 +36,8 @@ enum {
// do_mime_update // do_mime_update
//! Helper function that contacts the registrar for mime update calls //! Helper function that contacts the registrar for mime update calls
status_t do_mime_update(int32 what, const char *path, int recursive, status_t
do_mime_update(int32 what, const char *path, int recursive,
int synchronous, int force) int synchronous, int force)
{ {
BEntry root; BEntry root;
@@ -149,8 +155,7 @@ create_app_meta_mime(const char *path, int recursive, int synchronous,
status_t status_t
get_device_icon(const char *dev, void *icon, int32 size) get_device_icon(const char *dev, void *icon, int32 size)
{ {
status_t err = dev && icon status_t err = dev && icon && (size == B_LARGE_ICON || size == B_MINI_ICON)
&& (size == B_LARGE_ICON || size == B_MINI_ICON)
? B_OK : B_BAD_VALUE; ? B_OK : B_BAD_VALUE;
int fd = -1; int fd = -1;
@@ -210,6 +215,7 @@ get_device_icon(const char *dev, BBitmap *icon, icon_size which)
&& (icon->Bounds() != rect || icon->ColorSpace() != B_CMAP8)) { && (icon->Bounds() != rect || icon->ColorSpace() != B_CMAP8)) {
error = B_BAD_VALUE; error = B_BAD_VALUE;
} }
// TODO: support bitmap with other color spaces!
// get the icon // get the icon
if (error == B_OK) if (error == B_OK)
error = get_device_icon(dev, icon->Bits(), which); error = get_device_icon(dev, icon->Bits(), which);