Commit graph

450 commits

Author SHA1 Message Date
Gregory John Casamento
817374c50c Rollback last quickfix 2020-08-30 03:26:21 -04:00
Gregory John Casamento
ca50dfa984 Quick fix for App exiting when it still has windows (on Win32) 2020-08-27 19:52:13 -04:00
Sergii Stoian
fe1cf36de0 * Source/NSApplication.m (_appIconInit): take into account main screen
origin when placing application icon.
2020-02-20 00:53:44 +02:00
fredkiefer
5756e5f396 * Source/NSSliderCell.m: Fix encoding/decoding as the types don't match.
* Source/NSApplication.m (-targetForAction:to:from:): Warn only in
debug mode about the target not responding to the action.
2019-07-28 20:12:26 +02:00
Sergii Stoian
7e2ce21a24 * Source/NSApplication.m: (needsPanelToBecomeKey): removed superfluous
override - superclass (NSView) already returns `NO`.
2019-04-08 12:57:43 +03:00
Sergii Stoian
e27ffe6330 * Source/NSApplication.m (becomesKeyOnlyIfNeeded),
(needsPanelToBecomeKey): override NSWindow and NSView methods
in appicon to reduce number of order front calls. The source
of the calls is NSWindow's sendEvent:.
2019-04-08 02:54:35 +03:00
Sergii Stoian
b5e65175a3 hidewindow methods was renamed to hideApplication. 2019-04-06 22:36:56 +03:00
Sergii Stoian
f5bcf3019b Change comments upon request of @fredkiefer. 2019-04-06 01:23:17 +03:00
Sergii Stoian
f018c2087b Added support for WindowMaker's WMFHideApplication action. 2019-04-05 14:07:33 +03:00
Sergii Stoian
f8c955acf4 Optimize -autolaunch YES checking code. 2019-04-03 02:10:37 +03:00
Sergii Stoian
df5a79d769 Removed temporary debug output. 2019-04-03 00:53:08 +03:00
Sergii Stoian
2071f6acdd Do not activate application on first run of -activateIgnoringOtherApps: if commandline argument -autolaunch YES was specified. 2019-04-02 19:45:14 +03:00
Wolfgang Lux
397a4116cc Avoid calling iconSize method on a null pointer. 2018-08-05 11:18:32 +02:00
fredkiefer
0e1c392ff0 * Source/NSApplication.m (-applicationIconImage): Lazy load the app icon. 2018-08-03 19:37:29 +02:00
Gregory John Casamento
d4bfdd5580 Fix issue with app icon. 2018-07-20 09:15:26 -04:00
Gregory John Casamento
c9ae46c7ce Fix app icon in dock 2018-07-20 04:08:26 -04: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
fredkiefer
9451330883 * Source/NSApplication.m (-targetForAction:to:from:): Warn about
the target not responding to the action.
* Source/NSSavePanel.m (_initWithoutGModel): Don't set the OK
button as the target of the browser. Use helper method instead.
2018-01-23 20:56:52 +01:00
fredkiefer
0c46bc4380 * Source/NSApplication.m (-targetForAction:to:from:): Return nil
if the target is non-nil but does not respond to the action.
2018-01-07 15:09:57 +01:00
Riccardo Mottola
3d777c81fe log the event itself (by Fred)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@40365 72102866-910b-0410-8b05-ffd578937521
2017-03-06 09:40:01 +00:00
Richard Frith-MacDonald
79e04b545a Try Fred's idea for theme image lookup improvement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39168 72102866-910b-0410-8b05-ffd578937521
2015-11-12 08:33:35 +00:00
Riccardo Mottola
b4840b3c89 Primitive presentationOptions implementation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39100 72102866-910b-0410-8b05-ffd578937521
2015-10-28 01:39:07 +00:00
Fred Kiefer
1d2c5d5ebd First set of changes based on pathces by Josh Freeman
<pikopixel@twilightedge.com>


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39004 72102866-910b-0410-8b05-ffd578937521
2015-09-19 16:45:36 +00:00
Fred Kiefer
a47ee28eae * Source/NSSavePanel.m: Fix problem with the title shown in
the save panel's title bar not matching the set title when
        the panel is reused for a different purpose.
        Patch by Doug Simons <doug.simons@testplant.com>
        * Source/NSApplication.m: Adjust modal window position to
        relative window requested.
        Patch by Marcian Lytwyn <gna@advcsi.com> with small change.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38440 72102866-910b-0410-8b05-ffd578937521
2015-03-27 21:33:24 +00:00
Fred Kiefer
12a29ad4d7 * Source/NSCollectionView.m (-_moveUpAndExpandSelection:):
* Correct
        the comparision. Bug reported by Gregory John Casamento
        <greg.casamento@gmail.com>
        * Headers/AppKit/NSPopover.h: Add missing import.
        * Source/GSXibLoader.m: Disable NSCustomView hack again.
        * Headers/AppKit/NSApplication.h: Replace GSAppDelegateProtocol
        with NSApplicationDelegate.
        * Source/NSApplication.m: Adjust documentation to this
        * replacement.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36553 72102866-910b-0410-8b05-ffd578937521
2013-04-21 16:57:58 +00:00
Fred Kiefer
0a4708d4d0 Resolve clang warnings about wrong format specifiers for NSLog.
Patch by Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36133 72102866-910b-0410-8b05-ffd578937521
2013-02-14 08:58:05 +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
d870275b7f * Headers/AppKit/NSCell.h
* Headers/AppKit/NSColor.h
        * Headers/AppKit/NSGraphics.h
        * Headers/AppKit/NSView.h
        * Source/Functions.m
        * Source/GSThemeDrawing.m
        * Source/GSTitleView.m
        * Source/NSApplication.m
        * Source/NSCell.m
        * Source/NSView.m: More NSInteger/NSUInteger/CGFloat cleanup



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36035 72102866-910b-0410-8b05-ffd578937521
2013-01-29 21:57:41 +00:00
Fred Kiefer
3205b3037d * Headers/AppKit/NSApplication.h
* Source/NSApplication.m: NSInteger/NSUInteger cleanup
        * Source/externs.m: Add NSAppKitVersionNumber.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36032 72102866-910b-0410-8b05-ffd578937521
2013-01-29 08:35:49 +00:00
Fred Kiefer
e0e4395cd7 * Source/NSApplication.m (-_openFiles): Protect agains empty arguments.
Patch by Luboš Doležel <lubos@dolezel.info>


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35785 72102866-910b-0410-8b05-ffd578937521
2012-11-05 22:10:07 +00:00
Wolfgang Lux
3e8bc54cd3 Abbreviate home directory in window titles.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35627 72102866-910b-0410-8b05-ffd578937521
2012-10-03 12:58:26 +00:00
Wolfgang Lux
daf0be3455 Make sure actions can be sent to the dialog window of a modal session
even if another panel (with worksWhenModal=YES) is key window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35585 72102866-910b-0410-8b05-ffd578937521
2012-09-21 11:26:02 +00:00
Riccardo Mottola
e431a592c8 implement openFiles: delegate
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35355 72102866-910b-0410-8b05-ffd578937521
2012-08-07 14:05:51 +00:00
Wolfgang Lux
2903be11c7 Catch and eventually handle exceptions in applications that are thrown
during background processing


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35333 72102866-910b-0410-8b05-ffd578937521
2012-07-31 08:32:15 +00:00
Eric Wasylishen
c7531f2386 * Source/NSImage.m (-setScalesWhenResized:): Disable this method
as it is currently broken on the cairo backend.
* Source/NSApplication.m (-setApplicationIconImage:): Don't
use call -setScalesWhenResized:, because if it worked as it is
supposed to, it would scale all icon reps down to 48x48,
making large icon sizes useless.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34164 72102866-910b-0410-8b05-ffd578937521
2011-11-12 00:40:18 +00:00
Fred Kiefer
046bc43c63 * Source/NSApplication.m (-setApplicationIconImage): Ignore this
call when the image is nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33801 72102866-910b-0410-8b05-ffd578937521
2011-08-31 19:15:47 +00:00
Wolfgang Lux
503ebee65b Create the app icon in NSApplication -_init as suggested by Fred.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33244 72102866-910b-0410-8b05-ffd578937521
2011-06-04 15:07:54 +00:00
Wolfgang Lux
139afd0eef Revert to creating the app icon in finishLaunching, since existing
applications that do not use NSApplicationMain otherwise won't get an
app icon.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33242 72102866-910b-0410-8b05-ffd578937521
2011-06-04 08:42:33 +00:00
Wolfgang Lux
12865cbdb9 Ensure that applications get a proper app icon under WindowMaker even
when their main nib contains visible at launch time windows.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33231 72102866-910b-0410-8b05-ffd578937521
2011-06-02 08:45:07 +00:00
Wolfgang Lux
78fb85fbcf Fix management of windows whose hide on deactivate attribute is set.
In particular, such windows remain ordered out when the application
orders them out while it is not active and then is activated again.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33213 72102866-910b-0410-8b05-ffd578937521
2011-05-31 09:59:48 +00:00
David Chisnall
b4e3915c33 Turn release messages sent to autorelease pools into drain messages. No
functionality change in non-GC mode, in GC mode it invokes a quick GC pass to
try to delete the short-lived objects.

Also deleted some [pool release] lines just before exit() or return-from-main
statements.  These cause objects to be swapped in and destructors to be run to
no benefit (the OS will reclaim this memory without requiring stuff to be
swapped in when the process exits).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33146 72102866-910b-0410-8b05-ffd578937521
2011-05-27 12:42:37 +00:00
Eric Wasylishen
346f604cb7 * Source/NSWindow.m: Remove unnecessary FIXMEs related to
user space scale factor
* Source/NSAppliation.m: Correct app icon sizing which was
mixing up window frame coordinates and user space coordinates
* Source/NSCachedImageRep.m: Add NSUnscaledWindowMask to the
window used internally


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32897 72102866-910b-0410-8b05-ffd578937521
2011-04-19 08:23:01 +00:00
Germán Arias
2466b5cf58 Miniaturize all windows if the AppIcon is suppressed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32740 72102866-910b-0410-8b05-ffd578937521
2011-03-29 18:26:11 +00:00
Fred Kiefer
b7d056ae43 Removed dead assignments found by static code analyser.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32551 72102866-910b-0410-8b05-ffd578937521
2011-03-13 15:26:20 +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
e8de70e645 Add user default to allow placing app icons and mini windows at normal
window level. This is particularly convenient with some window
managers (*cough*, kwin) where application and pop up menus would be
obscured by dock level windows.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32165 72102866-910b-0410-8b05-ffd578937521
2011-02-14 22:25:57 +00:00
Wolfgang Lux
3da944c1dd Fix application termination behavior by sending a message to the
document controller to let the user review any unsaved changes in its
managed documents before asking the application delegate whether its
okay to terminate the application. This matches Cocoa's documented and
implemented behavior.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31957 72102866-910b-0410-8b05-ffd578937521
2011-01-27 20:32:01 +00:00
Wolfgang Lux
92601d85d8 Look up key equivalents in the Services menu only after traversing
rest of the main menu to avoid accidentally shadowing key equivalents
in the application's own menus.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31902 72102866-910b-0410-8b05-ffd578937521
2011-01-17 09:02:30 +00:00
Gregory John Casamento
fd4d577fa7 * Source/NSApplication.m: Added overide for orderWindow:relativeTo:
in NSIconWindow.  Check for GSSuppressAppIcon and order the window
	ONLY if the app icon window is supposed to be displayed, otherwise
	do not do anything with it.   I observed issues with this
	functionality while testing the GNOME theme the app icon would 
	periodically show even when the default mentioned above was set to 
	YES.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31898 72102866-910b-0410-8b05-ffd578937521
2011-01-16 05:22:10 +00:00
Germán Arias
f999016f34 Applied changes in menuInWindow.patch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31895 72102866-910b-0410-8b05-ffd578937521
2011-01-16 00:32:54 +00:00