mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:10:38 +00:00
Centralise GSGuiBundle() routine
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28830 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
541ba236db
commit
027f6c59ab
2 changed files with 15 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
|||
2009-10-17 Sheldon Gill <sheldon@westnet.net.au>
|
||||
|
||||
* Source/NSApplication.m: centralise GSGuiBundle() routine
|
||||
|
||||
2009-10-16 Sheldon Gill <sheldon@westnet.net.au>
|
||||
|
||||
* Source/NSEvent.m: add default for unknown events
|
||||
|
|
|
@ -152,13 +152,20 @@ _NSAppKitUncaughtExceptionHandler (NSException *exception)
|
|||
}
|
||||
}
|
||||
|
||||
/* This is the bundle from where we load localization of messages. */
|
||||
static NSBundle *guiBundle = nil;
|
||||
|
||||
/* Get the bundle. */
|
||||
NSBundle *
|
||||
GSGuiBundle(void)
|
||||
{
|
||||
/* This is the bundle from where we load localization of messages. */
|
||||
static NSBundle *guiBundle = nil;
|
||||
|
||||
if (!guiBundle)
|
||||
{
|
||||
/* Create the gui bundle we use to localize messages. */
|
||||
guiBundle = [NSBundle bundleForLibrary: @"gnustep-gui"
|
||||
version: OBJC_STRINGIFY(GNUSTEP_GUI_MAJOR_VERSION.GNUSTEP_GUI_MINOR_VERSION)];
|
||||
RETAIN(guiBundle);
|
||||
}
|
||||
return guiBundle;
|
||||
}
|
||||
|
||||
|
@ -716,12 +723,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
|||
GSStringDrawingDummyFunction();
|
||||
|
||||
[self setVersion: 1];
|
||||
|
||||
/* Create the gui bundle we use to localize messages. */
|
||||
guiBundle = [NSBundle bundleForLibrary: @"gnustep-gui"
|
||||
version: OBJC_STRINGIFY(GNUSTEP_GUI_MAJOR_VERSION.GNUSTEP_GUI_MINOR_VERSION)];
|
||||
RETAIN(guiBundle);
|
||||
|
||||
|
||||
/* Cache the NSAutoreleasePool class */
|
||||
arpClass = [NSAutoreleasePool class];
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue