Hello community, here is the log from the commit of package lxdm for openSUSE:Factory checked in at Fri Jul 29 10:03:05 CEST 2011. -------- --- lxdm/lxdm.changes 2011-07-21 16:45:37.000000000 +0200 +++ /mounts/work_src_done/STABLE/lxdm/lxdm.changes 2011-07-29 00:35:16.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Jul 28 22:34:27 UTC 2011 - andrea@opensuse.org + +- improved lxdm-0.4.0-use-sysconfig.patch to allow lxdm-config + to support suse specific sysconfig. + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lxdm.spec ++++++ --- /var/tmp/diff_new_pack.tOgqbp/_old 2011-07-29 10:02:12.000000000 +0200 +++ /var/tmp/diff_new_pack.tOgqbp/_new 2011-07-29 10:02:12.000000000 +0200 @@ -21,7 +21,7 @@ Name: lxdm Summary: LXDE Display Manager Version: 0.4.0 -Release: 1 +Release: 3 License: GPLv2 and LGPLv2 Group: System/GUI/LXDE Url: http://lxde.org/ ++++++ lxdm-0.4.0-use-sysconfig.patch ++++++ --- /var/tmp/diff_new_pack.tOgqbp/_old 2011-07-29 10:02:12.000000000 +0200 +++ /var/tmp/diff_new_pack.tOgqbp/_new 2011-07-29 10:02:12.000000000 +0200 @@ -1,6 +1,6 @@ -diff -urNp lxdm-0.4.0.git.1310644223.orig/data/lxdm.conf.in lxdm-0.4.0.git.1310644223/data/lxdm.conf.in ---- lxdm-0.4.0.git.1310644223.orig/data/lxdm.conf.in 2011-07-15 16:39:32.000000000 +0200 -+++ lxdm-0.4.0.git.1310644223/data/lxdm.conf.in 2011-07-15 16:43:04.000000000 +0200 +diff -uNr old-lxdm-0.4.0//data/lxdm.conf.in lxdm-0.4.0/data/lxdm.conf.in +--- old-lxdm-0.4.0//data/lxdm.conf.in 2011-07-28 00:01:57.537862491 +0200 ++++ lxdm-0.4.0/data/lxdm.conf.in 2011-07-28 00:02:14.276862487 +0200 @@ -1,14 +1,8 @@ [base] -## uncomment and set autologin username to enable autologin @@ -16,10 +16,53 @@ ## uncomment and set to set numlock on your keyboard # numlock=0 -diff -urNp lxdm-0.4.0.git.1310644223.orig/src/gdm/gdm-sysconfig.c lxdm-0.4.0.git.1310644223/src/gdm/gdm-sysconfig.c ---- lxdm-0.4.0.git.1310644223.orig/src/gdm/gdm-sysconfig.c 1970-01-01 01:00:00.000000000 +0100 -+++ lxdm-0.4.0.git.1310644223/src/gdm/gdm-sysconfig.c 2011-07-15 16:41:52.000000000 +0200 -@@ -0,0 +1,439 @@ +diff -uNr old-lxdm-0.4.0//src/config.c lxdm-0.4.0/src/config.c +--- old-lxdm-0.4.0//src/config.c 2011-07-28 00:01:57.536862491 +0200 ++++ lxdm-0.4.0/src/config.c 2011-07-29 00:33:16.802620577 +0200 +@@ -30,6 +30,8 @@ + #include <pwd.h> + #include <unistd.h> + ++#include "suse-sysconfig.h" ++ + #define CONFIG_UI_FILE LXDM_DATA_DIR"/config.ui" + //#define CONFIG_UI_FILE "../data/config.ui" + #define FACES_DIR "/usr/share/pixmaps/faces" +@@ -372,13 +374,18 @@ + gtk_label_set_text(GTK_LABEL(w),user_name); + } + +-void on_user_autologin_toggled(GtkToggleButton *togglebutton,gpointer user_data) ++int on_user_autologin_toggled(GtkToggleButton *togglebutton,gpointer user_data) + { ++ int result; + if(gtk_toggle_button_get_active(togglebutton)) +- g_key_file_set_string(config,"base","autologin",user_name); ++ result = gdm_sysconfig_save_value(SYSCONFIG_AUTOLOGIN_FILE, SYSCONFIG_AUTOLOGIN_KEY, user_name); + else +- g_key_file_remove_key(config,"base","autologin",NULL); ++/* I don't have a gdm_sysconfig_remove_value(), so just replace with a "save" with empty string ++ * g_key_file_remove_key(config,"base","autologin",NULL); ++ */ ++ result = gdm_sysconfig_save_value(SYSCONFIG_AUTOLOGIN_FILE, SYSCONFIG_AUTOLOGIN_KEY, ""); + dirty++; ++ return result; + } + + void prepare_user_autologin(GtkBuilder *builder) +@@ -388,7 +395,7 @@ + w=(GtkWidget*)gtk_builder_get_object(builder,"user-autologin"); + if(!root) gtk_widget_set_sensitive(w,FALSE); + g_signal_connect(w,"toggled",G_CALLBACK(on_user_autologin_toggled),NULL); +- name=g_key_file_get_string(config,"base","autologin",NULL); ++ name=gdm_sysconfig_load_value(SYSCONFIG_AUTOLOGIN_FILE, SYSCONFIG_AUTOLOGIN_KEY); + if(!name) return; + if(!strcmp(name,user_name)) + { +diff -uNr old-lxdm-0.4.0//src/gdm/gdm-sysconfig.c lxdm-0.4.0/src/gdm/gdm-sysconfig.c +--- old-lxdm-0.4.0//src/gdm/gdm-sysconfig.c 1970-01-01 01:00:00.000000000 +0100 ++++ lxdm-0.4.0/src/gdm/gdm-sysconfig.c 2011-07-29 00:09:51.029620578 +0200 +@@ -0,0 +1,484 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2008 Hans Petter Jansson <hpj@novell.com> @@ -60,6 +103,7 @@ + +#include <glib.h> +#include <glib/gi18n.h> ++#include <glib/gstdio.h> + +#include "gdm-sysconfig.h" + @@ -96,7 +140,7 @@ + g_debug ("%s", str); + } else { + g_ptr_array_add (lines, g_strdup ("")); -+ g_debug ("", str); ++ g_debug ("%s", ""); + } + } + @@ -279,7 +323,7 @@ + value = g_strdup (""); + } + } else { -+ temp = g_strndup (p0, p1 - p0); ++ temp = g_strndup (p0, p1 - p0); + value = g_strcompress (temp); + g_free (temp); + g_strchomp (value); @@ -325,7 +369,8 @@ + const gchar *p0, *p1, *p2; + gchar quotes; + gchar *escaped_value; -+ gint escaped_value_len; ++ gchar *quoted_escaped_value; ++ gint quoted_escaped_value_len; + gchar *new_line; + gint len; + @@ -334,20 +379,22 @@ + return NULL; + + escaped_value = g_strescape (value, ""); -+ escaped_value_len = strlen (escaped_value); ++ quoted_escaped_value = g_strdup_printf ("\"%s\"", escaped_value); ++ g_free (escaped_value); ++ quoted_escaped_value_len = strlen (quoted_escaped_value); + + p1 = skip_over_value (p0, "es); + p2 = p1 + strlen (p1); -+ len = (p0 - line) + escaped_value_len + (p2 - p1); ++ len = (p0 - line) + quoted_escaped_value_len + (p2 - p1); + + new_line = g_malloc (len + 1); -+ memcpy (new_line, line, p0 - line); -+ memcpy (new_line + (p0 - line), escaped_value, escaped_value_len); -+ memcpy (new_line + (p0 - line) + escaped_value_len, p1, p2 - p1); ++ memcpy (new_line, line, p0 - line); ++ memcpy (new_line + (p0 - line), quoted_escaped_value, quoted_escaped_value_len); ++ memcpy (new_line + (p0 - line) + quoted_escaped_value_len, p1, p2 - p1); + -+ *(new_line + len - 1) = '\0'; ++ *(new_line + len) = '\0'; + -+ g_free (escaped_value); ++ g_free (quoted_escaped_value); + + return new_line; +} @@ -419,6 +466,47 @@ + return set_value (sysconfig, key, value); +} + ++gboolean ++gdm_sysconfig_get_value_boolean (const gchar **sysconfig, const gchar *key, gboolean *value) ++{ ++ char *val; ++ gboolean val_bool; ++ ++ g_return_val_if_fail (sysconfig != NULL, FALSE); ++ g_return_val_if_fail (key != NULL, FALSE); ++ ++ val = get_value (sysconfig, key); ++ if (val == NULL) { ++ return FALSE; ++ } ++ ++ if (!strcasecmp (val, "yes")) { ++ val_bool = TRUE; ++ } else if (!strcasecmp (val, "no")) { ++ val_bool = FALSE; ++ } else { ++ g_free (val); ++ return FALSE; ++ } ++ ++ g_free (val); ++ ++ if (value != NULL) { ++ *value = val_bool; ++ } ++ ++ return TRUE; ++} ++ ++gboolean ++gdm_sysconfig_set_value_boolean (gchar **sysconfig, const gchar *key, gboolean value) ++{ ++ g_return_val_if_fail (sysconfig != NULL, FALSE); ++ g_return_val_if_fail (key != NULL, FALSE); ++ ++ return set_value (sysconfig, key, value ? "yes" : "no"); ++} ++ +gchar * +gdm_sysconfig_load_value (const gchar *file_name, const gchar *key) +{ @@ -459,10 +547,10 @@ + g_strfreev (lines); + return result; +} -diff -urNp lxdm-0.4.0.git.1310644223.orig/src/gdm/gdm-sysconfig.h lxdm-0.4.0.git.1310644223/src/gdm/gdm-sysconfig.h ---- lxdm-0.4.0.git.1310644223.orig/src/gdm/gdm-sysconfig.h 1970-01-01 01:00:00.000000000 +0100 -+++ lxdm-0.4.0.git.1310644223/src/gdm/gdm-sysconfig.h 2011-07-15 16:41:52.000000000 +0200 -@@ -0,0 +1,41 @@ +diff -uNr old-lxdm-0.4.0//src/gdm/gdm-sysconfig.h lxdm-0.4.0/src/gdm/gdm-sysconfig.h +--- old-lxdm-0.4.0//src/gdm/gdm-sysconfig.h 1970-01-01 01:00:00.000000000 +0100 ++++ lxdm-0.4.0/src/gdm/gdm-sysconfig.h 2011-07-29 00:09:51.029620578 +0200 +@@ -0,0 +1,43 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2008 Hans Petter Jansson <hpj@novell.com> @@ -488,7 +576,6 @@ +#define __GDM_SYSCONFIG_H + +#include <glib-object.h> -+#include <glib/gstdio.h> + +G_BEGIN_DECLS + @@ -498,31 +585,28 @@ +gchar *gdm_sysconfig_get_value (const gchar **sysconfig, const gchar *key); +gboolean gdm_sysconfig_set_value (gchar **sysconfig, const gchar *key, const gchar *value); + ++gboolean gdm_sysconfig_get_value_boolean (const gchar **sysconfig, const gchar *key, gboolean *value); ++gboolean gdm_sysconfig_set_value_boolean (gchar **sysconfig, const gchar *key, gboolean value); ++ +gchar *gdm_sysconfig_load_value (const gchar *file_name, const gchar *key); +gboolean gdm_sysconfig_save_value (const gchar *file_name, const gchar *key, const gchar *value); + +G_END_DECLS + +#endif /* __GDM_SYSCONFIG_H */ -diff -urNp lxdm-0.4.0.git.1310644223.orig/src/lxdm.c lxdm-0.4.0.git.1310644223/src/lxdm.c ---- lxdm-0.4.0.git.1310644223.orig/src/lxdm.c 2011-07-15 16:39:32.000000000 +0200 -+++ lxdm-0.4.0.git.1310644223/src/lxdm.c 2011-07-15 16:41:52.000000000 +0200 -@@ -72,6 +72,14 @@ +diff -uNr old-lxdm-0.4.0//src/lxdm.c lxdm-0.4.0/src/lxdm.c +--- old-lxdm-0.4.0//src/lxdm.c 2011-07-28 00:01:57.536862491 +0200 ++++ lxdm-0.4.0/src/lxdm.c 2011-07-28 00:05:33.632862492 +0200 +@@ -72,6 +72,8 @@ #define LOGFILE "/var/log/lxdm.log" -+#include "gdm/gdm-sysconfig.h" -+ -+#define SYSCONFIG_AUTOLOGIN_KEY "DISPLAYMANAGER_AUTOLOGIN" -+#define SYSCONFIG_AUTOLOGIN_FILE "/etc/sysconfig/displaymanager" -+ -+#define SYSCONFIG_SESSION_KEY "DEFAULT_WM" -+#define SYSCONFIG_SESSION_FILE "/etc/sysconfig/windowmanager" ++#include "suse-sysconfig.h" + typedef struct{ gboolean idle; gboolean greeter; -@@ -1209,7 +1217,7 @@ gboolean lxdm_get_session_info(char *ses +@@ -1209,7 +1211,7 @@ char *name=NULL,*exec=NULL; if(!session || !session[0]) { @@ -531,7 +615,7 @@ if(!name && getenv("PREFERRED")) name = g_strdup(getenv("PREFERRED")); if(!session && getenv("DESKTOP")) -@@ -1538,7 +1546,7 @@ int lxdm_do_auto_login(void) +@@ -1538,7 +1540,7 @@ int i,count,ret; int success=0; @@ -540,14 +624,57 @@ if(!p) return 0; users=g_strsplit(p," ",8); g_free(p); -diff -urNp lxdm-0.4.0.git.1310644223.orig/src/Makefile.am lxdm-0.4.0.git.1310644223/src/Makefile.am ---- lxdm-0.4.0.git.1310644223.orig/src/Makefile.am 2011-07-15 16:39:32.000000000 +0200 -+++ lxdm-0.4.0.git.1310644223/src/Makefile.am 2011-07-15 16:44:08.000000000 +0200 -@@ -21,6 +21,7 @@ lxdm_binary_LDADD = \ +diff -uNr old-lxdm-0.4.0//src/Makefile.am lxdm-0.4.0/src/Makefile.am +--- old-lxdm-0.4.0//src/Makefile.am 2011-07-28 00:01:57.536862491 +0200 ++++ lxdm-0.4.0/src/Makefile.am 2011-07-28 00:16:01.647862492 +0200 +@@ -21,6 +21,7 @@ lxdm_binary_SOURCES = \ lxdm.c lxdm.h ui.c lxcom.c lxcom.h xconn.c xconn.h \ -+ gdm/gdm-sysconfig.c gdm/gdm-sysconfig.h \ ++ gdm/gdm-sysconfig.c gdm/gdm-sysconfig.h suse-sysconfig.h\ $(NULL) libexec_PROGRAMS = lxdm-greeter-gdk lxdm-numlock lxdm-greeter-gtk +@@ -98,5 +99,6 @@ + + lxdm_config_SOURCES = \ + config.c \ ++ gdm/gdm-sysconfig.c gdm/gdm-sysconfig.h suse-sysconfig.h\ + $(NULL) + +diff -uNr old-lxdm-0.4.0//src/suse-sysconfig.h lxdm-0.4.0/src/suse-sysconfig.h +--- old-lxdm-0.4.0//src/suse-sysconfig.h 1970-01-01 01:00:00.000000000 +0100 ++++ lxdm-0.4.0/src/suse-sysconfig.h 2011-07-28 00:24:29.437862492 +0200 +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2011 Andrea Florio <andrea@opensuse.org> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ */ ++ ++#ifndef __SUSE_SYSCONFIG_H ++#define __SUSE_SYSCONFIG_H ++ ++#include "gdm/gdm-sysconfig.h" ++ ++#define SYSCONFIG_AUTOLOGIN_KEY "DISPLAYMANAGER_AUTOLOGIN" ++#define SYSCONFIG_AUTOLOGIN_FILE "/etc/sysconfig/displaymanager" ++ ++#define SYSCONFIG_SESSION_KEY "DEFAULT_WM" ++#define SYSCONFIG_SESSION_FILE "/etc/sysconfig/windowmanager" ++ ++#endif /* end of suse_sysconfig */ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org