Check if tmp is NULL before continuing Use terminal/exec for terminal
2002-01-04 Bradford Hovinen <hovinen@ximian.com> * default-application-properties.c (edit_read): Check if tmp is NULL before continuing Use terminal/exec for terminal executable name key
This commit is contained in:
parent
a70178aebd
commit
d3f81c7330
2 changed files with 24 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-01-04 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* default-application-properties.c (edit_read): Check if tmp is
|
||||
NULL before continuing
|
||||
Use terminal/exec for terminal executable name key
|
||||
|
||||
2001-12-20 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* Makefile.am: Clean up
|
||||
|
|
|
@ -160,13 +160,15 @@ edit_read(void)
|
|||
hcurrent_info.allows_urls = horiginal_info.allows_urls;
|
||||
hcurrent_info.index = horiginal_info.index;
|
||||
|
||||
tmp = gconf_client_get_string (client, GNOME_DESKTOP_PREFIX "/terminal", NULL);
|
||||
tmp = gconf_client_get_string (client, GNOME_DESKTOP_PREFIX "/terminal/exec", NULL);
|
||||
|
||||
if (tmp != NULL) {
|
||||
term_argv = g_strsplit (tmp, " ", 3);
|
||||
toriginal_info.executable_name = term_argv[0];
|
||||
toriginal_info.exec_app = term_argv[1];
|
||||
|
||||
toriginal_info.index = term_find_index (&toriginal_info);
|
||||
g_free (term_argv);
|
||||
g_strfreev (term_argv);
|
||||
if (toriginal_info.index != -1)
|
||||
toriginal_info.name = possible_terminals[toriginal_info.index].name;
|
||||
|
||||
|
@ -174,6 +176,7 @@ edit_read(void)
|
|||
tcurrent_info.executable_name = g_strdup (toriginal_info.executable_name);
|
||||
tcurrent_info.executable_name = g_strdup (toriginal_info.exec_app);
|
||||
tcurrent_info.index = toriginal_info.index;
|
||||
}
|
||||
|
||||
/* Set sensitivity. */
|
||||
|
||||
|
@ -440,13 +443,13 @@ write_all (BrowserDescription *bd, EditorDescription *ed, HelpViewDescription *h
|
|||
if (td->exec_app && td->executable_name)
|
||||
{
|
||||
tmp = g_strconcat (td->executable_name, " ", td->exec_app, NULL);
|
||||
gconf_client_set_string (client, GNOME_DESKTOP_PREFIX "/terminal", tmp, NULL);
|
||||
gconf_client_set_string (client, GNOME_DESKTOP_PREFIX "/terminal/exec", tmp, NULL);
|
||||
g_free (tmp);
|
||||
}
|
||||
else if (td->executable_name)
|
||||
gconf_client_set_string (client, GNOME_DESKTOP_PREFIX "/terminal", td->executable_name, NULL);
|
||||
gconf_client_set_string (client, GNOME_DESKTOP_PREFIX "/terminal/exec", td->executable_name, NULL);
|
||||
else
|
||||
gconf_client_unset (client, GNOME_DESKTOP_PREFIX "/terminal", NULL);
|
||||
gconf_client_unset (client, GNOME_DESKTOP_PREFIX "/terminal/exec", NULL);
|
||||
|
||||
g_object_unref (G_OBJECT (client));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue