Further simpler code to initialise the MacOS-specific implementation of Fl_Sys_Menu_Bar_Driver

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12586 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2017-12-07 16:10:21 +00:00
parent 2da4cf8b9f
commit eb763ae432
4 changed files with 3 additions and 4 deletions

View File

@ -47,7 +47,6 @@ public:
virtual void mode(int i, int fl) { bar->Fl_Menu_Bar::mode(i, fl); }
static Fl_Sys_Menu_Bar_Driver *driver_; // to be assigned with a unique object of this class or of a derived class
static Fl_Sys_Menu_Bar_Driver* new_driver();
};

View File

@ -23,7 +23,7 @@
#include "drivers/Cocoa/Fl_MacOS_Sys_Menu_Bar_Driver.H"
Fl_MacOS_Sys_Menu_Bar_Driver* Fl_MacOS_Sys_Menu_Bar_Driver::new_driver() {
Fl_Sys_Menu_Bar_Driver* Fl_MacOS_Sys_Menu_Bar_Driver::driver() {
static Fl_MacOS_Sys_Menu_Bar_Driver *once = new Fl_MacOS_Sys_Menu_Bar_Driver();
if (driver_ != once) {
if (driver_) {

View File

@ -3849,7 +3849,7 @@ static void createAppleMenu(void)
[mainmenu release];
[appleMenu release];
[menuItem release];
Fl_MacOS_Sys_Menu_Bar_Driver::new_driver();
Fl_MacOS_Sys_Menu_Bar_Driver::driver();
}

View File

@ -39,7 +39,7 @@ public:
virtual void remove(int index);
virtual void replace(int index, const char *name);
virtual void mode(int i, int fl);
static Fl_MacOS_Sys_Menu_Bar_Driver* new_driver();
static Fl_Sys_Menu_Bar_Driver* driver();
};