Mac OS: implemented the effect of the 2nd arg of Fl_Window::label(label, iconlabel)

that sets the window name when it is iconized (or minimized).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2011-05-15 09:42:36 +00:00
parent 9ff0c90926
commit 9e1a7079c3

View File

@ -2209,13 +2209,21 @@ const char *fl_filename_name( const char *name )
/*
* set the window title bar
* \todo make the titlebar icon work!
* set the window title bar name
*/
void Fl_Window::label(const char *name,const char */*iname*/) {
void Fl_Window::label(const char *name, const char *mininame) {
Fl_Widget::label(name);
iconlabel_ = mininame;
if (shown() || i) {
q_set_window_title((NSWindow*)i->xid, name);
NSWindow* nsw = (NSWindow*)i->xid;
q_set_window_title(nsw, name);
if (mininame && strlen(mininame)) {
CFStringRef minititle = CFStringCreateWithCString(NULL, mininame, kCFStringEncodingUTF8);
if (minititle) {
[nsw setMiniwindowTitle:(NSString*)minititle];
CFRelease(minititle);
}
}
}
}