Commit graph

59 commits

Author SHA1 Message Date
Wolfgang Lux
9afab3aaf8 Change arguments names to reduce confusion about their intended use 2020-04-01 13:15:48 +02:00
Wolfgang Lux
b42691c160 Remove redundant calls to close method. 2020-04-01 12:57:37 +02:00
Wolfgang Lux
88e318e5e8 Restore call to delegate method which was lost a while ago. 2020-04-01 12:55:53 +02:00
fredkiefer
712e7a4e15 Close sheet before removing from parent.
* Source/NSAlert.m (NSBeginAlertSheet): Move closing the sheet from
here...
* Source/NSApplication.m (-beginSheet:...:contextInfo:): ...to here.
2018-02-04 21:18:43 +01:00
Ivan Vučica
d3861e224c Better support for setting errors inside -dataOfType:error: and -readFromData:ofType:error:.
Previously, under GNUstep, NSLocalizedFailureReasonKey was ignored when
presented with +[NSAlert alertWithError]. Additionally, error set in
-readFromData:ofType:error: was overwritten by two different methods in the
file reading chain.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38483 72102866-910b-0410-8b05-ffd578937521
2015-05-10 19:10:56 +00:00
David Chisnall
4850a9feac Fix all current compiler warnings on FreeBSD/x86-64.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36038 72102866-910b-0410-8b05-ffd578937521
2013-01-30 09:48:54 +00:00
Fred Kiefer
a612305757 First set of NSInteger/NSUInteger cleanup in gui.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36029 72102866-910b-0410-8b05-ffd578937521
2013-01-27 20:28:35 +00:00
Germán Arias
8936dbf826 Verify if there is error information to be displayed in an Alert panel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34242 72102866-910b-0410-8b05-ffd578937521
2011-12-02 23:15:07 +00:00
Eric Wasylishen
ed60c25d45 * Source/NSAlert.m: Use NSImageScaleProportionallyUpOrDown on
app icon button cell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34165 72102866-910b-0410-8b05-ffd578937521
2011-11-12 01:16:17 +00:00
Fred Kiefer
2d01942e4b Replace #include -> #import
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32451 72102866-910b-0410-8b05-ffd578937521
2011-03-04 11:33:22 +00:00
Wolfgang Lux
1131d859de Fix NSAlert implementation so that buttons are assigned tags starting
with NSAlertFirstButtonReturn, except if the panel was created with
the backward compatibility method +alertWithMessageText:defaultButton:...
Also assign appropriate key equivalents to buttons in panels created
with the old OpenStep alert panel functions.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30515 72102866-910b-0410-8b05-ffd578937521
2010-05-31 22:20:38 +00:00
Wolfgang Lux
6029fc9d6c Propagate the change of NSWindow's designated initializer to all
affected subclasses.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30394 72102866-910b-0410-8b05-ffd578937521
2010-05-15 20:43:27 +00:00
Wolfgang Lux
e400ed9975 Fix incorrect return code of NSRunAlertPanel when called in a non-gui
application.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30222 72102866-910b-0410-8b05-ffd578937521
2010-04-23 15:12:06 +00:00
Fred Kiefer
7ebb2818cc Final set of #include -> #import replacement in additional headers.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30097 72102866-910b-0410-8b05-ffd578937521
2010-04-07 08:59:43 +00:00
Richard Frith-MacDonald
8dd7827584 Fixes for bug #29085
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29864 72102866-910b-0410-8b05-ffd578937521
2010-03-07 08:28:11 +00:00
Fred Kiefer
c16eed5d1d Started cleanup of #includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29833 72102866-910b-0410-8b05-ffd578937521
2010-03-04 10:12:13 +00:00
Wolfgang Lux
a059f4a0c9 If the message text of an alert panel is too wide to fit into the
panel wrap its text to the scroll view's width. Limit the width and
height of alert panels to 60% of the screen's width and height
respectively.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29157 72102866-910b-0410-8b05-ffd578937521
2009-12-21 23:44:44 +00:00
Wolfgang Lux
6fbd4717a5 Fix a regression in the alert sheet functions which has introduced a
variant of #26101 where only one callback was used.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28959 72102866-910b-0410-8b05-ffd578937521
2009-11-05 21:56:42 +00:00
Gregory John Casamento
3a16583dcb * Headers/AppKit/NSWindow.h: Comment out _attachedSheet ivar.
* Source/NSAlert.m: Change code to use hightlightWithLevel: method
	in resetWindow method.
	* Source/NSApplication.m: Stub out setAttachedSheet method.
	* Source/NSWindow.m: Remove new ivar for next release and stub out
	attachedSheet method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28415 72102866-910b-0410-8b05-ffd578937521
2009-07-27 16:31:32 +00:00
Gregory John Casamento
c6f4518c9f * Source/NSAlert.m: Offset color by less in -resetWindow. Remove
redundant logic for calling the "didEnd" method in the NSBeginSheet...
	functions.
	* Source/NSApplication.m: Add code to reset parent window in 
	beginSheet:... method.  Also added check to make sure the
	modalDelegate is not nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28411 72102866-910b-0410-8b05-ffd578937521
2009-07-26 02:56:56 +00:00
Gregory John Casamento
0c982ef3eb * Source/NSAlert.m: Remove category for setAttachedSheet method.
* Source/NSApplication.m: Added private category to add 
	setAttachedSheet: to NSWindow.  Modified beginSheet:... method
	to call the new method with the sheet that is associated with it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28410 72102866-910b-0410-8b05-ffd578937521
2009-07-26 00:56:29 +00:00
Gregory John Casamento
5c556f96a7 * Source/NSAlert.m: GSAlertSheet - removed unecessary parentWindow
and  container ivars in interface declaration.  Removed uneeded
	accessors for parentWindow and contentRect.  Added check in
	frameFromParentWindowFrame to check to see if parent is initialized
	prior to using it.   Removed NSBox in the init.. method since it 
	could cause issues with drawing.   Added code to lighten the 
	color of the background of the sheet relative to the parent window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28409 72102866-910b-0410-8b05-ffd578937521
2009-07-26 00:35:13 +00:00
Gregory John Casamento
6d3b1bd4ce * Source/NSAlert.m: Implementation of GSAlertSheet.
* Source/NSApplication.m: Change order in which setWindowParent:
	and runModalForWindow: are called in beginSheet:... method.
	* Source/NSDrawer.m: Remove notifications when drawer is closed
	in dealloc.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28392 72102866-910b-0410-8b05-ffd578937521
2009-07-13 18:12:52 +00:00
Gregory John Casamento
7f6ee7d9fd Initial changes for sheet implementation. More to come.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28283 72102866-910b-0410-8b05-ffd578937521
2009-05-14 22:17:48 +00:00
Gregory John Casamento
e66027b906 Revert previous change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28225 72102866-910b-0410-8b05-ffd578937521
2009-04-16 20:05:32 +00:00
Gregory John Casamento
28b6cc14d0 Correct issue with sheets/panels appearing beneath other modal panels.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28224 72102866-910b-0410-8b05-ffd578937521
2009-04-16 19:02:30 +00:00
Gregory John Casamento
1df5bfe839 * Source/NSAlert.m: in the method _initWithoutGModel add a call
to setLevel: to set the level to NSModalPanelWindowLevel.   This was
	not previously being done and was causing alert panels to get lost 
	behind other application windows.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28195 72102866-910b-0410-8b05-ffd578937521
2009-04-10 14:25:20 +00:00
Fred Kiefer
d93155a768 Correct the calling of the delegate methods in the alert sheet
functions. Should fix #26101.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28185 72102866-910b-0410-8b05-ffd578937521
2009-04-07 20:54:41 +00:00
Fred Kiefer
1b9732d96d Add more missing localization includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28015 72102866-910b-0410-8b05-ffd578937521
2009-03-01 19:04:58 +00:00
Wolfgang Lux
39f911eae7 Trigger the action of NSButton and NSPopUpButton in their keyDown
method only for the Space key.
Fix key view loop of NSAlert panels and NSSavePanel so that all
buttons become reachable with the Tab key.
Make Escape key equivalent of the Cancel button of NSSavePanel.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27011 72102866-910b-0410-8b05-ffd578937521
2008-11-05 23:01:37 +00:00
Wolfgang Lux
c1fd62315e Pass correct arguments to the didEndSelector passed to NSAlert's
-beginSheetModalForWindow:delegate:didEndSelector:contextInfo: method.
Fix swapping of title and informative message text in NSAlerts. Also
supply a default title "Alert" if none is set.
Determine key equivalent of NSAlert buttons from their localized titles.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27010 72102866-910b-0410-8b05-ffd578937521
2008-11-05 22:47:50 +00:00
Adam Fedor
7afdd32ac1 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26619 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:01:49 +00:00
Fred Kiefer
193e31e678 Change all files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25536 72102866-910b-0410-8b05-ffd578937521
2007-10-29 21:16:17 +00:00
Fred Kiefer
86264a8284 Diverse gui patches by Wolfgang Lux <wolfgang.lux@gmail.com>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25451 72102866-910b-0410-8b05-ffd578937521
2007-09-04 23:29:05 +00:00
Fred Kiefer
22f8170973 Add some 10.4 methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25348 72102866-910b-0410-8b05-ffd578937521
2007-07-23 16:29:29 +00:00
Richard Frith-MacDonald
e05c982cd9 Revert file accidentally committed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25285 72102866-910b-0410-8b05-ffd578937521
2007-06-22 13:28:14 +00:00
Richard Frith-MacDonald
2dedd774e2 Attempt to improve frame and bounds setting.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25284 72102866-910b-0410-8b05-ffd578937521
2007-06-22 09:59:17 +00:00
Richard Frith-MacDonald
ba86814bba Fixed accidentally deleted line
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24963 72102866-910b-0410-8b05-ffd578937521
2007-04-03 06:30:50 +00:00
Richard Frith-MacDonald
3789a069f6 Fixes for bug #18494
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24962 72102866-910b-0410-8b05-ffd578937521
2007-04-02 12:53:54 +00:00
Sergii Stoian
c77c8ab90b * Source/NSAlert.m: (-_initWithoutGModel): Set selected text
background color to [NSColor controlLightHighlightColor].



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24927 72102866-910b-0410-8b05-ffd578937521
2007-03-23 11:33:37 +00:00
Matt Rice
7c77ac64a1 * Source/NSAlert.m (-_initWithoutGModel): Add missing nil
at end of call to -dictionaryWithObjectsAndKeys:



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24685 72102866-910b-0410-8b05-ffd578937521
2007-02-22 23:59:45 +00:00
Sergii Stoian
4cef45fd98 * Source/NSAlert.m: (-_initWithoutGModel): Set selected text
background color to white. Now we can see selection of message text.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24681 72102866-910b-0410-8b05-ffd578937521
2007-02-21 23:54:12 +00:00
Sergii Stoian
bf41e31a34 Source/NSAlert.m: Forgot to commit change of button style.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24678 72102866-910b-0410-8b05-ffd578937521
2007-02-21 16:19:59 +00:00
Sergii Stoian
c6be514817 Source/NSAlert.m: little fix for previous commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24676 72102866-910b-0410-8b05-ffd578937521
2007-02-21 13:29:18 +00:00
Sergii Stoian
80a618c968 Source/NSAlert.m: (_initWithoutGModel): Removed setting of buttons style.
(_makeButtonWithRect:): Change style of button from NSMomentaryPushButton to
NSMomentaryPushInButton.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24675 72102866-910b-0410-8b05-ffd578937521
2007-02-21 13:28:23 +00:00
Sergii Stoian
e1575a4206 Source/NSAlert.m: Revert my last change regarding icon dimming.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24674 72102866-910b-0410-8b05-ffd578937521
2007-02-21 13:20:06 +00:00
Sergii Stoian
572f5075b3 * Source/NSAlert.m: (-_initWithoutGModel):
Make buttons refuse first responder to avoid drawing
dashed frame.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24671 72102866-910b-0410-8b05-ffd578937521
2007-02-21 00:46:01 +00:00
Sergii Stoian
83b4049ddf * Source/NSAlert.m: (-_initWithoutGModel): Disable dimming of
panel image. Change highlinting mask of alternate and other
  buttons.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24670 72102866-910b-0410-8b05-ffd578937521
2007-02-21 00:38:44 +00:00
Fred Kiefer
5f887135f2 Improve drawing with themes and cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24669 72102866-910b-0410-8b05-ffd578937521
2007-02-20 22:04:45 +00:00
Eric Sersale
0704d03784 * Source/NSAlert.m: (-_initWithoutGModel): added [setImageDimsWhenDisabled: NO} to not show the application icon dimmed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24656 72102866-910b-0410-8b05-ffd578937521
2007-02-19 19:13:33 +00:00