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.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19264 57a11ea4-9604-0410-9ed3-97b8803252fd
pull/1/head
Geert Janssens 16 years ago
parent 81aece6221
commit 491fa28430

@ -311,9 +311,9 @@ gnc_gnome_help (const char *dir, const char *detail)
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 @@ gnc_gnome_help (const char *dir, const char *detail)
}
}
if (!url)
url = [NSURL
url = [NSURL
fileURLWithPath: [[[[docs_dir
stringByAppendingPathComponent: @"C"]
stringByAppendingPathComponent: subdir]
@ -364,8 +364,8 @@ gnc_gnome_help (const char *dir, const char *detail)
}
/* 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 @@ gnc_gui_init(void)
return main_window;
}
g_set_application_name("GnuCash");
if (gnc_gconf_get_bool(GCONF_GENERAL, "show_splash_screen", NULL))
gnc_gui_init_splash();

@ -72,7 +72,6 @@ void gnc_keyring_set_password (const gchar *access_method,
// 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 @@ gboolean gnc_keyring_get_password ( GtkWidget *parent,
*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 @@ gboolean gnc_keyring_get_password ( GtkWidget *parent,
kSecAuthenticationTypeDefault,
&password_length, &password_data,
NULL);
if ( status == noErr )
{
*password = g_strndup(password_data, password_length);

Loading…
Cancel
Save