diff options
author | Christian Persch <chpe@src.gnome.org> | 2009-03-24 21:48:05 (GMT) |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2009-03-24 21:48:05 (GMT) |
commit | 521a2e3303a160d2993582e9ced61bdbb63a5020 (patch) | |
tree | dcf0e8ffec52169b32bb177f5c40a2596b8d5a1e /cut-n-paste | |
parent | 7db6cfd8befc84b0a8716d816546d715d1dff1e3 (diff) |
Update smclient from libegg master.
* cut-n-paste/smclient/eggdesktopfile.c:
(egg_desktop_file_launchv), (egg_set_desktop_file):
* cut-n-paste/smclient/eggsmclient.c:
(egg_sm_client_get_option_group): Update smclient from libegg master.
svn path=/trunk/; revision=3557
Diffstat (limited to 'cut-n-paste')
-rw-r--r-- | cut-n-paste/smclient/eggdesktopfile.c | 24 | ||||
-rw-r--r-- | cut-n-paste/smclient/eggsmclient.c | 10 |
2 files changed, 22 insertions, 12 deletions
diff --git a/cut-n-paste/smclient/eggdesktopfile.c b/cut-n-paste/smclient/eggdesktopfile.c index 1a20e96..357e548 100644 --- a/cut-n-paste/smclient/eggdesktopfile.c +++ b/cut-n-paste/smclient/eggdesktopfile.c @@ -1072,7 +1072,7 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file, GError **error) { EggDesktopFileLaunchOption option; - GSList *translated_documents, *docs; + GSList *translated_documents = NULL, *docs = NULL; char *command, **argv; int argc, i, screen_num; gboolean success, current_success; @@ -1440,16 +1440,18 @@ egg_set_desktop_file (const char *desktop_file_path) g_error_free (error); } - /* Set localized application name and default window icon */ - if (egg_desktop_file->name) - g_set_application_name (egg_desktop_file->name); - if (egg_desktop_file->icon) - { - if (g_path_is_absolute (egg_desktop_file->icon)) - gtk_window_set_default_icon_from_file (egg_desktop_file->icon, NULL); - else - gtk_window_set_default_icon_name (egg_desktop_file->icon); - } + if (egg_desktop_file) { + /* Set localized application name and default window icon */ + if (egg_desktop_file->name) + g_set_application_name (egg_desktop_file->name); + if (egg_desktop_file->icon) + { + if (g_path_is_absolute (egg_desktop_file->icon)) + gtk_window_set_default_icon_from_file (egg_desktop_file->icon, NULL); + else + gtk_window_set_default_icon_name (egg_desktop_file->icon); + } + } G_UNLOCK (egg_desktop_file); } diff --git a/cut-n-paste/smclient/eggsmclient.c b/cut-n-paste/smclient/eggsmclient.c index 8e2254f..efa901d 100644 --- a/cut-n-paste/smclient/eggsmclient.c +++ b/cut-n-paste/smclient/eggsmclient.c @@ -178,6 +178,7 @@ egg_sm_client_class_init (EggSMClientClass *klass) static gboolean sm_client_disable = FALSE; static char *sm_client_state_file = NULL; static char *sm_client_id = NULL; +static char *sm_config_prefix = NULL; static gboolean sm_client_post_parse_func (GOptionContext *context, @@ -228,10 +229,17 @@ egg_sm_client_get_option_group (void) { "sm-client-id", 0, 0, G_OPTION_ARG_STRING, &sm_client_id, N_("Specify session management ID"), N_("ID") }, - /* Compatibility options */ + /* GnomeClient compatibility option */ { "sm-disable", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &sm_client_disable, NULL, NULL }, + /* GnomeClient compatibility option. This is a dummy option that only + * exists so that sessions saved by apps with GnomeClient can be restored + * later when they've switched to EggSMClient. See bug #575308. + */ + { "sm-config-prefix", 0, G_OPTION_FLAG_HIDDEN, + G_OPTION_ARG_STRING, &sm_config_prefix, + NULL, NULL }, { NULL } }; GOptionGroup *group; |