Fix incorrect use of _SendMonitorUpdate
Icon size is only a boolean here (true for a large icon, false otherwise). Using B_LARGE_ICON directly is not appropriate. As found by Murai Takashi, but there was a second case in the same file which I also fixed. ticket : #12955
This commit is contained in:
parent
fe2557b6eb
commit
069c569704
@ -1114,9 +1114,10 @@ Database::DeleteIcon(const char *type, icon_size which)
|
|||||||
{
|
{
|
||||||
const char *attr = which == B_MINI_ICON ? kMiniIconAttr : kLargeIconAttr;
|
const char *attr = which == B_MINI_ICON ? kMiniIconAttr : kLargeIconAttr;
|
||||||
status_t status = fLocation->DeleteAttribute(type, attr);
|
status_t status = fLocation->DeleteAttribute(type, attr);
|
||||||
if (status == B_OK)
|
if (status == B_OK) {
|
||||||
_SendMonitorUpdate(B_ICON_CHANGED, type, which, B_META_MIME_DELETED);
|
_SendMonitorUpdate(B_ICON_CHANGED, type, (which == B_LARGE_ICON),
|
||||||
else if (status == B_ENTRY_NOT_FOUND)
|
B_META_MIME_DELETED);
|
||||||
|
} else if (status == B_ENTRY_NOT_FOUND)
|
||||||
status = B_OK;
|
status = B_OK;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -1135,10 +1136,11 @@ Database::DeleteIcon(const char *type, icon_size which)
|
|||||||
status_t
|
status_t
|
||||||
Database::DeleteIcon(const char *type)
|
Database::DeleteIcon(const char *type)
|
||||||
{
|
{
|
||||||
// TODO: extra notification for vector icon (uses B_LARGE_ICON now)
|
// TODO: extra notification for vector icon (for now we notify a "large"
|
||||||
|
// icon)
|
||||||
status_t status = fLocation->DeleteAttribute(type, kIconAttr);
|
status_t status = fLocation->DeleteAttribute(type, kIconAttr);
|
||||||
if (status == B_OK) {
|
if (status == B_OK) {
|
||||||
_SendMonitorUpdate(B_ICON_CHANGED, type, B_LARGE_ICON,
|
_SendMonitorUpdate(B_ICON_CHANGED, type, true,
|
||||||
B_META_MIME_DELETED);
|
B_META_MIME_DELETED);
|
||||||
} else if (status == B_ENTRY_NOT_FOUND)
|
} else if (status == B_ENTRY_NOT_FOUND)
|
||||||
status = B_OK;
|
status = B_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user