Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
lxsession-edit
lxsession-edit-0.1.1-obsolete.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lxsession-edit-0.1.1-obsolete.patch of Package lxsession-edit
diff -uNr lxsession-edit-0.1.1/src//lxsession-edit.c lxsession-edit/src//lxsession-edit.c --- lxsession-edit-0.1.1/src//lxsession-edit.c 2008-12-28 16:39:04.000000000 +0100 +++ lxsession-edit/src//lxsession-edit.c 2009-07-15 17:16:33.000000000 +0200 @@ -28,6 +28,8 @@ #include <stdio.h> #include <string.h> +#define CONFIG_FILE_NAME "desktop.conf" + enum { COL_ENABLED, COL_ICON, @@ -46,7 +48,7 @@ ORIGINALLY_ENABLED = 1 << 15 }; -static char* session_name = "LXDE"; +static const char* session_name = NULL; static GtkListStore* autostart_list = NULL; static const char grp[] = "Desktop Entry"; @@ -391,6 +393,11 @@ gtk_init( &argc, &argv ); if( argc > 1 ) session_name = argv[1]; + else + session_name = g_getenv("DESKTOP_SESSION"); + + if( G_UNLIKELY(!session_name) ) + session_name = "LXDE"; builder = gtk_builder_new(); if( !gtk_builder_add_from_file( builder, PACKAGE_DATA_DIR "/lxsession-edit/lxsession-edit.ui", NULL ) ) @@ -414,7 +421,7 @@ { /* wm settings (only show this when we are under lxsession) */ kf = g_key_file_new(); - cfg = g_build_filename( g_get_user_config_dir(), "lxsession", session_name, "config", NULL ); + cfg = g_build_filename( g_get_user_config_dir(), "lxsession", session_name, CONFIG_FILE_NAME, NULL ); loaded = g_key_file_load_from_file(kf, cfg, 0, NULL); if( !loaded ) { @@ -423,7 +430,7 @@ g_free(cfg); for( dir = dirs; *dir; ++dir ) { - cfg = g_build_filename( *dir, "lxsession", session_name, "config", NULL ); + cfg = g_build_filename( *dir, "lxsession", session_name, CONFIG_FILE_NAME, NULL ); loaded = g_key_file_load_from_file(kf, cfg, 0, NULL); g_free( cfg ); if( loaded ) @@ -437,7 +444,7 @@ { g_free(wm_cmd); /* If it's our favorite, LXDE */ - if( strcmp(g_getenv("DESKTOP_SESSION"), "LXDE") == 0 ) + if( strcmp(session_name, "LXDE") == 0 ) wm_cmd = g_strdup("openbox-lxde"); else wm_cmd = g_strdup("openbox"); @@ -455,12 +462,12 @@ { save_autostart(); - if( wm ) /* if wm settin is available. */ + if( wm ) /* if wm settings is available. */ { char* dir; dir = g_build_filename( g_get_user_config_dir(), "lxsession", session_name, NULL ); g_mkdir_with_parents( dir, 0700 ); - cfg = g_build_filename( dir, "config", NULL ); + cfg = g_build_filename( dir, "desktop.conf", NULL ); g_free( dir ); wm_cmd = (char*)gtk_entry_get_text((GtkEntry*)wm); if( wm_cmd )
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor