From 20a0034478206684c6c47ee75c01b2717b15613a Mon Sep 17 00:00:00 2001 From: espectador Date: Mon, 19 Mar 2012 18:10:22 +0000 Subject: [PATCH] More improvements for use with menu in-window git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@34951 72102866-910b-0410-8b05-ffd578937521 --- Apps/EOModelEditor/AdaptorsPanel.h | 2 +- Apps/EOModelEditor/AdaptorsPanel.m | 10 +++--- Apps/EOModelEditor/EOWindow.h | 29 ++++++++++++++++ Apps/EOModelEditor/EOWindow.m | 33 +++++++++++++++++++ Apps/EOModelEditor/GNUmakefile | 3 +- .../Resources/DataBrowser.gsmarkup | 2 +- .../Resources/SQLGenerator.gsmarkup | 2 +- ChangeLog | 14 ++++++++ .../LoginPanel/PostgreSQLLoginPanel.h | 4 +-- .../LoginPanel/PostgreSQLLoginPanel.m | 2 +- 10 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 Apps/EOModelEditor/EOWindow.h create mode 100644 Apps/EOModelEditor/EOWindow.m diff --git a/Apps/EOModelEditor/AdaptorsPanel.h b/Apps/EOModelEditor/AdaptorsPanel.h index 8a48ea3..f462831 100644 --- a/Apps/EOModelEditor/AdaptorsPanel.h +++ b/Apps/EOModelEditor/AdaptorsPanel.h @@ -31,7 +31,7 @@ @interface AdaptorsPanel : NSObject { - NSWindow *_window; + NSPanel *_window; NSBrowser *brws_adaptors; NSButton *btn_ok; NSButton *btn_cancel; diff --git a/Apps/EOModelEditor/AdaptorsPanel.m b/Apps/EOModelEditor/AdaptorsPanel.m index e1b6e21..56c5728 100644 --- a/Apps/EOModelEditor/AdaptorsPanel.m +++ b/Apps/EOModelEditor/AdaptorsPanel.m @@ -52,11 +52,11 @@ static NSArray *_adaptorNames; NSRect fr1, fr2; _adaptorNames = RETAIN([EOAdaptor availableAdaptorNames]); /* redo all these numbers so buttons and labels are on the right? */ - _window = [[NSWindow alloc] - initWithContentRect: NSMakeRect(200,200,200,300) - styleMask: NSBorderlessWindowMask | NSTitledWindowMask - backing: NSBackingStoreBuffered - defer: YES]; + _window = [[NSPanel alloc] + initWithContentRect: NSMakeRect(200,200,200,300) + styleMask: NSBorderlessWindowMask | NSTitledWindowMask + backing: NSBackingStoreBuffered + defer: YES]; [_window setTitle: @"Select adaptor"]; [_window setReleasedWhenClosed:NO]; diff --git a/Apps/EOModelEditor/EOWindow.h b/Apps/EOModelEditor/EOWindow.h new file mode 100644 index 0000000..71cc27c --- /dev/null +++ b/Apps/EOModelEditor/EOWindow.h @@ -0,0 +1,29 @@ +/* + EOWindow.h + + Author: German A. Arias + Date: Mar 2012 + + This file is part of EOModelEditor. + + EOModelEditor is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. +*/ + +#import + +@interface EOWindow : NSWindow +{ +} +@end diff --git a/Apps/EOModelEditor/EOWindow.m b/Apps/EOModelEditor/EOWindow.m new file mode 100644 index 0000000..544403d --- /dev/null +++ b/Apps/EOModelEditor/EOWindow.m @@ -0,0 +1,33 @@ +/* + EOWindow.m + + Author: German A. Arias + Date: Mar 2012 + + This file is part of EOModelEditor. + + EOModelEditor is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This application is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. +*/ + +#import "EOWindow.h" + +@implementation EOWindow + +- (BOOL) canBecomeMainWindow +{ + return NO; +} + +@end diff --git a/Apps/EOModelEditor/GNUmakefile b/Apps/EOModelEditor/GNUmakefile index 0d88a7b..07d9eda 100644 --- a/Apps/EOModelEditor/GNUmakefile +++ b/Apps/EOModelEditor/GNUmakefile @@ -90,6 +90,7 @@ $(APP_NAME)_OBJC_FILES = \ Preferences.m \ ConsistencyChecker.m \ CodeGenerator.m \ - DataBrowser.m + DataBrowser.m \ + EOWindow.m include $(GNUSTEP_MAKEFILES)/application.make diff --git a/Apps/EOModelEditor/Resources/DataBrowser.gsmarkup b/Apps/EOModelEditor/Resources/DataBrowser.gsmarkup index b0adc63..924724d 100644 --- a/Apps/EOModelEditor/Resources/DataBrowser.gsmarkup +++ b/Apps/EOModelEditor/Resources/DataBrowser.gsmarkup @@ -3,7 +3,7 @@ - diff --git a/Apps/EOModelEditor/Resources/SQLGenerator.gsmarkup b/Apps/EOModelEditor/Resources/SQLGenerator.gsmarkup index b63ff80..faf96c1 100644 --- a/Apps/EOModelEditor/Resources/SQLGenerator.gsmarkup +++ b/Apps/EOModelEditor/Resources/SQLGenerator.gsmarkup @@ -3,7 +3,7 @@ - + diff --git a/ChangeLog b/ChangeLog index 9fb2e45..bde4bbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2012-03-19 German A. Arias + + * EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.h: + * EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.m: + * Apps/EOModelEditor/AdaptorsPanel.h: + * Apps/EOModelEditor/AdaptorsPanel.m: Use a panel instead a window. + So the menu isn't displayed when the user use NSWindows95InterfaceStyle. + * Apps/EOModelEditor/EOWindow.h: + * Apps/EOModelEditor/EOWindow.m: + * Apps/EOModelEditor/GNUmakefile: New class for auxiliary windows. + * Apps/EOModelEditor/Resources/SQLGenerator.gsmarkup: + * Apps/EOModelEditor/Resources/DataBrowser.gsmarkup: Instances of + class EOWindow, this avoid display the menu. + 2012-03-18 German A. Arias * Apps/EOModelEditor/EOModelEditorApp.h: diff --git a/EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.h b/EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.h index bd113fa..a2d21f8 100644 --- a/EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.h +++ b/EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.h @@ -32,13 +32,13 @@ @class NSButton; @class NSImageView; @class NSComboBox; -@class NSWindow; +@class NSPanel; @class NSSecureTextField; @interface PostgreSQLLoginPanel : EOLoginPanel { /* gui stuff */ - NSWindow *_win; + NSPanel *_win; NSComboBox *databasesCombo; NSImageView *logo; diff --git a/EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.m b/EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.m index 025d755..85ec59b 100644 --- a/EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.m +++ b/EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.m @@ -333,7 +333,7 @@ vfmaxf (int n, float aFloat, ...) tempRect.origin.x = (screenSize.width/2) - (tempRect.size.width/2); tempRect.origin.y = (screenSize.height/2) - (tempRect.size.height/2); - _win = [[NSWindow alloc] initWithContentRect: tempRect + _win = [[NSPanel alloc] initWithContentRect: tempRect styleMask: NSTitledWindowMask backing: NSBackingStoreBuffered defer: YES];