mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-05-31 09:21:02 +00:00
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
This commit is contained in:
parent
da1b4a8d70
commit
20a0034478
10 changed files with 89 additions and 12 deletions
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
@interface AdaptorsPanel : NSObject
|
@interface AdaptorsPanel : NSObject
|
||||||
{
|
{
|
||||||
NSWindow *_window;
|
NSPanel *_window;
|
||||||
NSBrowser *brws_adaptors;
|
NSBrowser *brws_adaptors;
|
||||||
NSButton *btn_ok;
|
NSButton *btn_ok;
|
||||||
NSButton *btn_cancel;
|
NSButton *btn_cancel;
|
||||||
|
|
|
@ -52,11 +52,11 @@ static NSArray *_adaptorNames;
|
||||||
NSRect fr1, fr2;
|
NSRect fr1, fr2;
|
||||||
_adaptorNames = RETAIN([EOAdaptor availableAdaptorNames]);
|
_adaptorNames = RETAIN([EOAdaptor availableAdaptorNames]);
|
||||||
/* redo all these numbers so buttons and labels are on the right? */
|
/* redo all these numbers so buttons and labels are on the right? */
|
||||||
_window = [[NSWindow alloc]
|
_window = [[NSPanel alloc]
|
||||||
initWithContentRect: NSMakeRect(200,200,200,300)
|
initWithContentRect: NSMakeRect(200,200,200,300)
|
||||||
styleMask: NSBorderlessWindowMask | NSTitledWindowMask
|
styleMask: NSBorderlessWindowMask | NSTitledWindowMask
|
||||||
backing: NSBackingStoreBuffered
|
backing: NSBackingStoreBuffered
|
||||||
defer: YES];
|
defer: YES];
|
||||||
[_window setTitle: @"Select adaptor"];
|
[_window setTitle: @"Select adaptor"];
|
||||||
[_window setReleasedWhenClosed:NO];
|
[_window setReleasedWhenClosed:NO];
|
||||||
|
|
||||||
|
|
29
Apps/EOModelEditor/EOWindow.h
Normal file
29
Apps/EOModelEditor/EOWindow.h
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
EOWindow.h
|
||||||
|
|
||||||
|
Author: German A. Arias <german@xelalug.org>
|
||||||
|
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 <AppKit/AppKit.h>
|
||||||
|
|
||||||
|
@interface EOWindow : NSWindow
|
||||||
|
{
|
||||||
|
}
|
||||||
|
@end
|
33
Apps/EOModelEditor/EOWindow.m
Normal file
33
Apps/EOModelEditor/EOWindow.m
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
EOWindow.m
|
||||||
|
|
||||||
|
Author: German A. Arias <german@xelalug.org>
|
||||||
|
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
|
|
@ -90,6 +90,7 @@ $(APP_NAME)_OBJC_FILES = \
|
||||||
Preferences.m \
|
Preferences.m \
|
||||||
ConsistencyChecker.m \
|
ConsistencyChecker.m \
|
||||||
CodeGenerator.m \
|
CodeGenerator.m \
|
||||||
DataBrowser.m
|
DataBrowser.m \
|
||||||
|
EOWindow.m
|
||||||
|
|
||||||
include $(GNUSTEP_MAKEFILES)/application.make
|
include $(GNUSTEP_MAKEFILES)/application.make
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<gsmarkup>
|
<gsmarkup>
|
||||||
<objects>
|
<objects>
|
||||||
|
|
||||||
<window title="Data Browser" id="window" delegate="#NSOwner" releasedWhenClosed="yes"
|
<window instanceOf="EOWindow" title="Data Browser" id="window" delegate="#NSOwner" releasedWhenClosed="yes"
|
||||||
resizable="yes">
|
resizable="yes">
|
||||||
<vbox>
|
<vbox>
|
||||||
<box topPadding="2" bottomPadding="2" leftPadding="4" rightPadding="4">
|
<box topPadding="2" bottomPadding="2" leftPadding="4" rightPadding="4">
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<gsmarkup>
|
<gsmarkup>
|
||||||
<objects>
|
<objects>
|
||||||
|
|
||||||
<window title="SQL Generation" id="sqlgenWindow" delegate="#NSOwner" resizable="yes">
|
<window instanceOf="EOWindow" title="SQL Generation" id="sqlgenWindow" delegate="#NSOwner" resizable="yes">
|
||||||
<vbox leftPadding="10" padding="10">
|
<vbox leftPadding="10" padding="10">
|
||||||
<box title="SQL Generation Options" topPadding="10"
|
<box title="SQL Generation Options" topPadding="10"
|
||||||
leftPadding="15" rightPadding="15" width="425">
|
leftPadding="15" rightPadding="15" width="425">
|
||||||
|
|
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2012-03-19 German A. Arias <german@xelalug.org>
|
||||||
|
|
||||||
|
* 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 <german@xelalug.org>
|
2012-03-18 German A. Arias <german@xelalug.org>
|
||||||
|
|
||||||
* Apps/EOModelEditor/EOModelEditorApp.h:
|
* Apps/EOModelEditor/EOModelEditorApp.h:
|
||||||
|
|
|
@ -32,13 +32,13 @@
|
||||||
@class NSButton;
|
@class NSButton;
|
||||||
@class NSImageView;
|
@class NSImageView;
|
||||||
@class NSComboBox;
|
@class NSComboBox;
|
||||||
@class NSWindow;
|
@class NSPanel;
|
||||||
@class NSSecureTextField;
|
@class NSSecureTextField;
|
||||||
|
|
||||||
@interface PostgreSQLLoginPanel : EOLoginPanel
|
@interface PostgreSQLLoginPanel : EOLoginPanel
|
||||||
{
|
{
|
||||||
/* gui stuff */
|
/* gui stuff */
|
||||||
NSWindow *_win;
|
NSPanel *_win;
|
||||||
NSComboBox *databasesCombo;
|
NSComboBox *databasesCombo;
|
||||||
NSImageView *logo;
|
NSImageView *logo;
|
||||||
|
|
||||||
|
|
|
@ -333,7 +333,7 @@ vfmaxf (int n, float aFloat, ...)
|
||||||
tempRect.origin.x = (screenSize.width/2) - (tempRect.size.width/2);
|
tempRect.origin.x = (screenSize.width/2) - (tempRect.size.width/2);
|
||||||
tempRect.origin.y = (screenSize.height/2) - (tempRect.size.height/2);
|
tempRect.origin.y = (screenSize.height/2) - (tempRect.size.height/2);
|
||||||
|
|
||||||
_win = [[NSWindow alloc] initWithContentRect: tempRect
|
_win = [[NSPanel alloc] initWithContentRect: tempRect
|
||||||
styleMask: NSTitledWindowMask
|
styleMask: NSTitledWindowMask
|
||||||
backing: NSBackingStoreBuffered
|
backing: NSBackingStoreBuffered
|
||||||
defer: YES];
|
defer: YES];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue