gdm r5709 - in trunk: . gui/simple-greeter
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r5709 - in trunk: . gui/simple-greeter
- Date: Thu, 7 Feb 2008 01:51:57 +0000 (GMT)
Author: halfline
Date: Thu Feb 7 01:51:56 2008
New Revision: 5709
URL: http://svn.gnome.org/viewvc/gdm?rev=5709&view=rev
Log:
2008-02-06 Ray Strode <rstrode redhat com>
Sessions api added 4 commits back dealed in terms of filenames,
while the daemon works in terms of desktop ids. Change everything
to be in terms of desktop ids
* gui/simple-greeter/gdm-sessions.c (struct _GdmSessionFile):
rename filename to id.
(load_session_file): set ->id to desktop id. store id in
hash table.
(gdm_get_all_sessions): add ids insteads of filenames to
returned list of sessions
(gdm_get_details_for_session): change argument name from
filename to id.
* gui/simple-greeter/gdm-sessions.h: change argument name
from filename to id.
* gui/simple-greeter/gdm-session-option-widget.c
(add_available_sessions): s/files/ids/
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-session-option-widget.c
trunk/gui/simple-greeter/gdm-sessions.c
trunk/gui/simple-greeter/gdm-sessions.h
Modified: trunk/gui/simple-greeter/gdm-session-option-widget.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-session-option-widget.c (original)
+++ trunk/gui/simple-greeter/gdm-session-option-widget.c Thu Feb 7 01:51:56 2008
@@ -104,30 +104,30 @@
static void
add_available_sessions (GdmSessionOptionWidget *widget)
{
- char **session_files;
+ char **session_ids;
int i;
gboolean default_is_set;
- session_files = gdm_get_all_sessions ();
+ session_ids = gdm_get_all_sessions ();
default_is_set = FALSE;
- for (i = 0; session_files[i] != NULL; i++) {
+ for (i = 0; session_ids[i] != NULL; i++) {
char *name;
char *comment;
- if (!gdm_get_details_for_session (session_files[i],
+ if (!gdm_get_details_for_session (session_ids[i],
&name, &comment)) {
continue;
}
gdm_option_widget_add_item (GDM_OPTION_WIDGET (widget),
- session_files[i], name, comment,
+ session_ids[i], name, comment,
FALSE);
if (!default_is_set) {
gdm_option_widget_set_active_item (GDM_OPTION_WIDGET (widget),
- session_files[i]);
+ session_ids[i]);
default_is_set = TRUE;
}
@@ -135,7 +135,7 @@
g_free (comment);
}
- g_strfreev (session_files);
+ g_strfreev (session_ids);
}
static void
Modified: trunk/gui/simple-greeter/gdm-sessions.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-sessions.c (original)
+++ trunk/gui/simple-greeter/gdm-sessions.c Thu Feb 7 01:51:56 2008
@@ -38,7 +38,7 @@
#include "gdm-languages.h"
typedef struct _GdmSessionFile {
- char *filename;
+ char *id;
char *path;
char *translated_name;
char *translated_comment;
@@ -138,14 +138,14 @@
session = g_new0 (GdmSessionFile, 1);
- session->filename = g_strdup (name);
+ session->id = g_strdup (name);
session->path = g_strdup (path);
session->translated_name = g_key_file_get_locale_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Name", NULL, NULL);
session->translated_comment = g_key_file_get_locale_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "Comment", NULL, NULL);
g_hash_table_insert (gdm_available_sessions_map,
- g_strdup (session->path),
+ g_strdup (name),
session);
out:
g_key_file_free (key_file);
@@ -223,7 +223,7 @@
session = (GdmSessionFile *) value;
- g_ptr_array_add (array, g_strdup (session->path));
+ g_ptr_array_add (array, g_strdup (session->id));
}
g_ptr_array_add (array, NULL);
@@ -231,7 +231,7 @@
}
gboolean
-gdm_get_details_for_session (const char *filename,
+gdm_get_details_for_session (const char *id,
char **name,
char **comment)
{
@@ -244,7 +244,7 @@
}
session = (GdmSessionFile *) g_hash_table_lookup (gdm_available_sessions_map,
- filename);
+ id);
if (session == NULL) {
return FALSE;
Modified: trunk/gui/simple-greeter/gdm-sessions.h
==============================================================================
--- trunk/gui/simple-greeter/gdm-sessions.h (original)
+++ trunk/gui/simple-greeter/gdm-sessions.h Thu Feb 7 01:51:56 2008
@@ -29,7 +29,7 @@
G_BEGIN_DECLS
char ** gdm_get_all_sessions (void);
-gboolean gdm_get_details_for_session (const char *filename,
+gboolean gdm_get_details_for_session (const char *id,
char **name,
char **comment);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]