mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
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:
+12
-4
@@ -2209,13 +2209,21 @@ const char *fl_filename_name( const char *name )
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set the window title bar
|
* set the window title bar name
|
||||||
* \todo make the titlebar icon work!
|
|
||||||
*/
|
*/
|
||||||
void Fl_Window::label(const char *name,const char */*iname*/) {
|
void Fl_Window::label(const char *name, const char *mininame) {
|
||||||
Fl_Widget::label(name);
|
Fl_Widget::label(name);
|
||||||
|
iconlabel_ = mininame;
|
||||||
if (shown() || i) {
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user