r19264 - gnucash/trunk/src/gnome-utils - Set user visible application name as part of the gui initialization.
Geert Janssens
gjanssens at code.gnucash.org
Wed Jun 16 09:19:39 EDT 2010
Author: gjanssens
Date: 2010-06-16 09:19:39 -0400 (Wed, 16 Jun 2010)
New Revision: 19264
Trac: http://svn.gnucash.org/trac/changeset/19264
Modified:
gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
gnucash/trunk/src/gnome-utils/gnc-keyring.c
Log:
Set user visible application name as part of the gui initialization.
This defines which name is used in the about dialog and is used by gnome-keyring
to determine where to store passwords.
Modified: gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c 2010-06-16 12:45:34 UTC (rev 19263)
+++ gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c 2010-06-16 13:19:39 UTC (rev 19264)
@@ -311,9 +311,9 @@
arrayByAddingObjectsFromArray: components];
NSString *docs_dir = [NSString pathWithComponents: prefix_comps];
NSArray *languages = [[NSUserDefaults standardUserDefaults]
- objectForKey: @"AppleLanguages"];
+ objectForKey: @"AppleLanguages"];
BOOL dir;
- subdir = [[[subdir lowercaseString] componentsSeparatedByString: @" "]
+ subdir = [[[subdir lowercaseString] componentsSeparatedByString: @" "]
componentsJoinedByString: @"-"];
if (![[NSFileManager defaultManager] fileExistsAtPath: docs_dir]) {
const gchar *message =
@@ -355,7 +355,7 @@
}
}
if (!url)
- url = [NSURL
+ url = [NSURL
fileURLWithPath: [[[[docs_dir
stringByAppendingPathComponent: @"C"]
stringByAppendingPathComponent: subdir]
@@ -364,8 +364,8 @@
}
/* It's a lot easier in a bundle! OSX finds the best translation for us. */
- else
- url = [NSURL fileURLWithPath: [[NSBundle mainBundle]
+ else
+ url = [NSURL fileURLWithPath: [[NSBundle mainBundle]
pathForResource: tag
ofType: @"html"
inDirectory: subdir ]];
@@ -593,6 +593,8 @@
return main_window;
}
+ g_set_application_name("GnuCash");
+
if (gnc_gconf_get_bool(GCONF_GENERAL, "show_splash_screen", NULL))
gnc_gui_init_splash();
Modified: gnucash/trunk/src/gnome-utils/gnc-keyring.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-keyring.c 2010-06-16 12:45:34 UTC (rev 19263)
+++ gnucash/trunk/src/gnome-utils/gnc-keyring.c 2010-06-16 13:19:39 UTC (rev 19264)
@@ -72,7 +72,6 @@
// FIXME I'm not sure this works if a password was already in the keychain
// I may have to do a lookup first and if it exists, run some update
// update function instead
- g_set_application_name(PACKAGE);
status = SecKeychainAddInternetPassword ( NULL, /* keychain */
strlen(server), server, /* servername */
strlen(access_method), access_method, /* securitydomain */
@@ -123,7 +122,6 @@
*password = NULL;
#ifdef HAVE_GNOME_KEYRING
- g_set_application_name(PACKAGE);
gkr_result = gnome_keyring_find_network_password_sync
( *user, NULL, server, service,
access_method, NULL, port, &found_list );
@@ -159,7 +157,7 @@
kSecAuthenticationTypeDefault,
&password_length, &password_data,
NULL);
-
+
if ( status == noErr )
{
*password = g_strndup(password_data, password_length);
More information about the gnucash-changes
mailing list