mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Attempt fix for Riccardos's latest issue.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30328 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fe380301ed
commit
046be50f74
3 changed files with 34 additions and 17 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,9 @@
|
|||
2010-05-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSTheme.m: ([-deactivate]) unload current theme images before
|
||||
restoring previous theme images to avoid conflict with image names.
|
||||
* Source/NSImage.m: Add some comments.
|
||||
|
||||
2010-05-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSWindow.m (-dealloc): Use DESTROY instead of RELEASE.
|
||||
|
@ -805,12 +811,12 @@
|
|||
-establishConnection): Undo the last change to this method, as
|
||||
it should not retain the assign value.
|
||||
|
||||
2005-03-12 Doug Simons <doug.simons@testplant.com>
|
||||
2010-03-12 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSTextView.m: (-readSelectionFromPasteboard:type:):
|
||||
Set insertion point _after_ pasted text, don't select it.
|
||||
|
||||
2005-03-12 Doug Simons <doug.simons@testplant.com>
|
||||
2010-03-12 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSTextView.m: (-mouseDown:): Only try to drag text
|
||||
if the user starts by dragging the mouse. A simple click within
|
||||
|
@ -818,7 +824,7 @@
|
|||
* Source/NSView.m: (-setNeedsDisplayInRect:): Avoid unnecessary
|
||||
work when invalid rectangle is empty.
|
||||
|
||||
2005-03-11 Doug Simons <doug.simons@testplant.com>
|
||||
2010-03-11 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSClipView.m: Call isFlipped rather than accessing
|
||||
flag directly (fixes a problem with view loaded from a nib).
|
||||
|
@ -830,21 +836,21 @@
|
|||
always be a subclass of NSControl and was causing a crash in
|
||||
AddressManager.app.
|
||||
|
||||
2005-03-09 Doug Simons <doug.simons@testplant.com>
|
||||
2010-03-09 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSMenu.m: Protect changedMessagesEnabled flag against getting
|
||||
stuck off if exceptions occur during update.
|
||||
* Source/NSApplication.m: Update menu after modal session, and when
|
||||
the key or main window has changed.
|
||||
|
||||
2005-03-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
2010-03-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSAlert.m: Cope gracefully with being called from an non-gui
|
||||
applications (ie where NSApp is not initialized).
|
||||
* Tools/gopen.m: Print same warning as OSX if item to open is not a
|
||||
URL and the named fiel does not exist.
|
||||
|
||||
2005-03-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
2010-03-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSWorkspace.m: update NSTask header
|
||||
* Source/NSPasteboard.m: ditto
|
||||
|
|
|
@ -772,8 +772,16 @@ typedef struct {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore old images in NSImage's lookup dictionary so that the app
|
||||
/* Unload all images created by this theme.
|
||||
*/
|
||||
enumerator = [_images objectEnumerator];
|
||||
while ((image = [enumerator nextObject]) != nil)
|
||||
{
|
||||
[image setName: nil];
|
||||
}
|
||||
[_images removeAllObjects];
|
||||
|
||||
/* Restore old images in NSImage's lookup dictionary so that the app
|
||||
* still has images to draw.
|
||||
* The remove all cached bundle images from both NSImage's name dictionary
|
||||
* and our cache dictionary, so that we can be sure we reload afresh
|
||||
|
@ -787,12 +795,6 @@ typedef struct {
|
|||
[NSImage _setImage: image name: name];
|
||||
}
|
||||
[_oldImages removeAllObjects];
|
||||
enumerator = [_images objectEnumerator];
|
||||
while ((image = [enumerator nextObject]) != nil)
|
||||
{
|
||||
[image setName: nil];
|
||||
}
|
||||
[_images removeAllObjects];
|
||||
|
||||
[self _revokeOwnerships];
|
||||
|
||||
|
|
|
@ -542,10 +542,12 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
return copy;
|
||||
}
|
||||
|
||||
/*
|
||||
/* This methd sets the name of an image, updating the global name dictionary
|
||||
* to point to the image (or removing an image from the dictionary if the
|
||||
* new name is nil).
|
||||
* The images are actually accessed via proxy objects, so that when a
|
||||
* new system image is set, the proxies for that image just start using
|
||||
* the new version.
|
||||
* new system image is set (using [NSImage+_setImage:name:]), the proxy
|
||||
* for that image just starts using the new version.
|
||||
*/
|
||||
- (BOOL) setName: (NSString *)aName
|
||||
{
|
||||
|
@ -1971,6 +1973,13 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
|
|||
|
||||
@implementation NSImage (GSTheme)
|
||||
|
||||
/* This method is used by the theming system to replace a named image
|
||||
* without disturbing the proxy ... so that all views and cells using
|
||||
* the named image are automatically updated to use the new image.
|
||||
* This is the counterpart to the -setName: method, which replaces the
|
||||
* proxy (to change a named image without updating the image used by
|
||||
* existing views and cells).
|
||||
*/
|
||||
+ (NSImage*) _setImage: (NSImage*)image name: (NSString*)name
|
||||
{
|
||||
GSThemeProxy *proxy = nil;
|
||||
|
|
Loading…
Reference in a new issue