diff options
| author | Manolo Gouy <Manolo> | 2011-05-15 09:42:36 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-05-15 09:42:36 +0000 |
| commit | 9e1a7079c38496eb4e291769bcc269e1bebd19e9 (patch) | |
| tree | d90a04b502e0f3d7d015af16444bcfd020633433 | |
| parent | 9ff0c90926068ae956b3ba638fd3c3ba0ea79ede (diff) | |
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
| -rw-r--r-- | src/Fl_cocoa.mm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 8b46c27b2..3715657ce 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -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); + } + } } } |
