Skip to content

Commit

Permalink
Now compiles with GCC3 and 4.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Mar 15, 2010
1 parent 41ee53f commit 1c904d4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Fl_cocoa.mm
Expand Up @@ -90,7 +90,6 @@
}


#include <FL/Fl_Device.H>
#include <FL/Fl.H>
#include <FL/x.H>
#include <FL/Fl_Window.H>
Expand All @@ -99,8 +98,12 @@
// because Fl_Image.H, included by Fl_Sys_Menu_Bar.H, uses a private variable name id
// that's illegal under GCC 3 -x -objective-c++
#define id id_
// because Fl_Bitmap.H and Fl_Pixmap.H included by Fl_Printer.H don't compile with gcc3 and objective-c++
#define Fl_Bitmap_H
#define Fl_Pixmap_H
#endif
#include <FL/Fl_Sys_Menu_Bar.H>
#include <FL/Fl_Printer.H>
#ifdef id
#undef id
#endif
Expand Down Expand Up @@ -2985,11 +2988,10 @@ - (void)showPanel
nil];
[NSApp orderFrontStandardAboutPanelWithOptions:options];
}
#include <FL/Fl_Printer.H>
- (void)printPanel
{
Fl_Printer printer;
// Fl_PSfile_Device printer;
//Fl_PSfile_Device printer;
int w, h;
Fl_Window *win = Fl::first_window();
if(!win) return;
Expand Down Expand Up @@ -3040,7 +3042,7 @@ static void createAppleMenu(void)
[menuItem setTarget:about];
[appleMenu addItem:[NSMenuItem separatorItem]];
// temporary for testing Fl_Printer. Contains also printPanel of class FLaboutItemTarget.
menuItem = [appleMenu addItemWithTitle:@"Print front window" action:@selector(printPanel) keyEquivalent:@"p"];
menuItem = [appleMenu addItemWithTitle:@"Print front window" action:@selector(printPanel) keyEquivalent:@""];
[menuItem setTarget:about];
[appleMenu setAutoenablesItems:NO];
[menuItem setEnabled:YES];
Expand Down

0 comments on commit 1c904d4

Please sign in to comment.