blob: a7161f605a8cdb9de4fec5b2cc7103f78efc287a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#include "osx_dock.h"
#include <zen/osx_throw_exception.h>
#include <Cocoa/Cocoa.h>
void osx::dockIconSetText(const char* str) //throw OsxError
{
@try
{
NSString* label = [NSString stringWithCString:str encoding:NSUTF8StringEncoding];
//stringWithCString returns string which is already set to autorelease!
[[NSApp dockTile] setBadgeLabel:label]; //label may be nil
}
@catch (NSException* e)
{
throwOsxError(e); //throw OsxError
}
}
|