Hello community,
here is the log from the commit of package lxsession for openSUSE:Factory
checked in at Sun Mar 21 11:54:37 CET 2010.
--------
--- lxsession/lxsession.changes 2010-03-11 09:02:35.000000000 +0100
+++ /mounts/work_src_done/STABLE/lxsession/lxsession.changes 2010-03-18 22:43:02.000000000 +0100
@@ -1,0 +2,8 @@
+Thu Mar 18 21:42:38 UTC 2010 - andrea@opensuse.org
+
+- new upstream version 0.4.3
+- removed fortify-declaration patch (fixed upstream)
+- ported lxsession-0.4.2-fix-buttons-position.patch to fit new code
+- bug fix release
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
lxsession-0.4.2-fix-buttons-position.patch
lxsession-0.4.2-implicit-fortify-decl.patch
lxsession-0.4.2.tar.bz2
New:
----
lxsession-0.4.3-fix-buttons-position.patch
lxsession-0.4.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lxsession.spec ++++++
--- /var/tmp/diff_new_pack.We8gKE/_old 2010-03-21 11:54:28.000000000 +0100
+++ /var/tmp/diff_new_pack.We8gKE/_new 2010-03-21 11:54:28.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package lxsession (Version 0.4.2)
+# spec file for package lxsession (Version 0.4.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,15 +19,14 @@
Name: lxsession
-Version: 0.4.2
-Release: 2
+Version: 0.4.3
+Release: 1
Summary: LXDE Session Manager, required for running the desktop environment
Group: System/GUI/Other
License: GPL
Url: http://www.lxde.org/
Source0: %{name}-%{version}.tar.bz2
-Patch0: %name-0.4.2-implicit-fortify-decl.patch
-Patch1: %name-0.4.2-fix-buttons-position.patch
+Patch0: %name-0.4.3-fix-buttons-position.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-glib-devel fdupes gtk2-devel intltool pkg-config
BuildRequires: docbook-utils docbook-xsl-stylesheets hal-devel libxslt
@@ -45,7 +44,6 @@
%prep
%setup -q -n %name-%version
%patch0 -p1
-%patch1 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
++++++ lxsession-0.4.2-fix-buttons-position.patch -> lxsession-0.4.3-fix-buttons-position.patch ++++++
--- lxsession/lxsession-0.4.2-fix-buttons-position.patch 2010-03-10 07:48:04.000000000 +0100
+++ /mounts/work_src_done/STABLE/lxsession/lxsession-0.4.3-fix-buttons-position.patch 2010-03-18 22:42:55.000000000 +0100
@@ -1,60 +1,65 @@
-diff -uNr old-lxsession-0.4.2//lxsession-logout/lxsession-logout.c lxsession-0.4.2/lxsession-logout/lxsession-logout.c
---- old-lxsession-0.4.2//lxsession-logout/lxsession-logout.c 2010-03-10 07:41:10.972412403 +0100
-+++ lxsession-0.4.2/lxsession-logout/lxsession-logout.c 2010-03-10 07:45:45.528412788 +0100
-@@ -405,6 +405,8 @@
- GtkWidget * logout_button = gtk_button_new_with_mnemonic(_("_Logout"));
- GtkWidget * image = gtk_image_new_from_icon_name("system-log-out", GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image(GTK_BUTTON(logout_button), image);
-+ /* align it to left 0.0 as X and 0.0 as Y */
-+ gtk_button_set_alignment(GTK_BUTTON(logout_button), 0.0 ,0.0);
- g_signal_connect(G_OBJECT(logout_button), "clicked", G_CALLBACK(logout_clicked), &handler_context);
- gtk_box_pack_start(GTK_BOX(controls), logout_button, FALSE, FALSE, 4);
-
-@@ -414,6 +416,8 @@
+diff -uNr old-lxsession-0.4.3/lxsession-logout/lxsession-logout.c lxsession-0.4.3//lxsession-logout/lxsession-logout.c
+--- old-lxsession-0.4.3/lxsession-logout/lxsession-logout.c 2010-03-18 17:21:34.000000000 +0100
++++ lxsession-0.4.3//lxsession-logout/lxsession-logout.c 2010-03-18 22:41:18.875553519 +0100
+@@ -395,6 +395,8 @@
GtkWidget * shutdown_button = gtk_button_new_with_mnemonic(_("Sh_utdown"));
GtkWidget * image = gtk_image_new_from_icon_name("system-shutdown", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(shutdown_button), image);
+ /* align it to left 0.0 as X and 0.0 as Y */
-+ gtk_button_set_alignment(GTK_BUTTON(shutdown_button), 0.0 ,0.0);
++ gtk_button_set_alignment(GTK_BUTTON(shutdown_button), 0.0 ,0.0);
g_signal_connect(G_OBJECT(shutdown_button), "clicked", G_CALLBACK(shutdown_clicked), &handler_context);
gtk_box_pack_start(GTK_BOX(controls), shutdown_button, FALSE, FALSE, 4);
}
-@@ -424,6 +428,8 @@
+@@ -404,8 +406,10 @@
+ {
GtkWidget * reboot_button = gtk_button_new_with_mnemonic(_("_Reboot"));
GtkWidget * image = gtk_image_new_from_icon_name("gnome-session-reboot", GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image(GTK_BUTTON(reboot_button), image);
+- gtk_button_set_image(GTK_BUTTON(reboot_button), image);
+- g_signal_connect(G_OBJECT(reboot_button), "clicked", G_CALLBACK(reboot_clicked), &handler_context);
++ gtk_button_set_image(GTK_BUTTON(reboot_button), image);
+ /* align it to left 0.0 as X and 0.0 as Y */
-+ gtk_button_set_alignment(GTK_BUTTON(reboot_button), 0.0 ,0.0);
- g_signal_connect(G_OBJECT(reboot_button), "clicked", G_CALLBACK(reboot_clicked), &handler_context);
++ gtk_button_set_alignment(GTK_BUTTON(reboot_button), 0.0 ,0.0);
++ g_signal_connect(G_OBJECT(reboot_button), "clicked", G_CALLBACK(reboot_clicked), &handler_context);
gtk_box_pack_start(GTK_BOX(controls), reboot_button, FALSE, FALSE, 4);
}
-@@ -434,6 +440,8 @@
+
+@@ -415,7 +419,9 @@
GtkWidget * suspend_button = gtk_button_new_with_mnemonic(_("_Suspend"));
GtkWidget * image = gtk_image_new_from_icon_name("gnome-session-suspend", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(suspend_button), image);
+- g_signal_connect(G_OBJECT(suspend_button), "clicked", G_CALLBACK(suspend_clicked), &handler_context);
+ /* align it to left 0.0 as X and 0.0 as Y */
-+ gtk_button_set_alignment(GTK_BUTTON(suspend_button), 0.0 ,0.0);
- g_signal_connect(G_OBJECT(suspend_button), "clicked", G_CALLBACK(suspend_clicked), &handler_context);
++ gtk_button_set_alignment(GTK_BUTTON(suspend_button), 0.0 ,0.0);
++ g_signal_connect(G_OBJECT(suspend_button), "clicked", G_CALLBACK(suspend_clicked), &handler_context);
gtk_box_pack_start(GTK_BOX(controls), suspend_button, FALSE, FALSE, 4);
}
-@@ -444,6 +452,8 @@
+
+@@ -425,6 +431,8 @@
GtkWidget * hibernate_button = gtk_button_new_with_mnemonic(_("_Hibernate"));
GtkWidget * image = gtk_image_new_from_icon_name("gnome-session-hibernate", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(hibernate_button), image);
-+ /* align it to left 0.0 as X and 0.0 as Y */
-+ gtk_button_set_alignment(GTK_BUTTON(hibernate_button), 0.0 ,0.0);
++ /* align it to left 0.0 as X and 0.0 as Y */
++ gtk_button_set_alignment(GTK_BUTTON(hibernate_button), 0.0 ,0.0);
g_signal_connect(G_OBJECT(hibernate_button), "clicked", G_CALLBACK(hibernate_clicked), &handler_context);
gtk_box_pack_start(GTK_BOX(controls), hibernate_button, FALSE, FALSE, 4);
}
-@@ -454,12 +464,16 @@
+@@ -435,6 +443,8 @@
GtkWidget * switch_user_button = gtk_button_new_with_mnemonic(_("S_witch User"));
GtkWidget * image = gtk_image_new_from_icon_name("gnome-session-switch", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(switch_user_button), image);
+ /* align it to left 0.0 as X and 0.0 as Y */
-+ gtk_button_set_alignment(GTK_BUTTON(switch_user_button), 0.0 ,0.0);
++ gtk_button_set_alignment(GTK_BUTTON(switch_user_button), 0.0 ,0.0);
g_signal_connect(G_OBJECT(switch_user_button), "clicked", G_CALLBACK(switch_user_clicked), &handler_context);
gtk_box_pack_start(GTK_BOX(controls), switch_user_button, FALSE, FALSE, 4);
}
+@@ -443,11 +453,15 @@
+ GtkWidget * logout_button = gtk_button_new_with_mnemonic(_("_Logout"));
+ GtkWidget * image = gtk_image_new_from_icon_name("system-log-out", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(logout_button), image);
++ /* align it to left 0.0 as X and 0.0 as Y */
++ gtk_button_set_alignment(GTK_BUTTON(logout_button), 0.0 ,0.0);
+ g_signal_connect(G_OBJECT(logout_button), "clicked", G_CALLBACK(logout_clicked), &handler_context);
+ gtk_box_pack_start(GTK_BOX(controls), logout_button, FALSE, FALSE, 4);
/* Create the Cancel button. */
GtkWidget * cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
++++++ lxsession-0.4.2.tar.bz2 -> lxsession-0.4.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/configure new/lxsession-0.4.3/configure
--- old/lxsession-0.4.2/configure 2010-03-07 16:11:24.000000000 +0100
+++ new/lxsession-0.4.3/configure 2010-03-18 17:34:32.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for lxsession 0.4.2.
+# Generated by GNU Autoconf 2.65 for lxsession 0.4.3.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -549,8 +549,8 @@
# Identity of this package.
PACKAGE_NAME='lxsession'
PACKAGE_TARNAME='lxsession'
-PACKAGE_VERSION='0.4.2'
-PACKAGE_STRING='lxsession 0.4.2'
+PACKAGE_VERSION='0.4.3'
+PACKAGE_STRING='lxsession 0.4.3'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1300,7 +1300,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures lxsession 0.4.2 to adapt to many kinds of systems.
+\`configure' configures lxsession 0.4.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1366,7 +1366,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of lxsession 0.4.2:";;
+ short | recursive ) echo "Configuration of lxsession 0.4.3:";;
esac
cat <<\_ACEOF
@@ -1472,7 +1472,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-lxsession configure 0.4.2
+lxsession configure 0.4.3
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1837,7 +1837,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by lxsession $as_me 0.4.2, which was
+It was created by lxsession $as_me 0.4.3, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2645,7 +2645,7 @@
# Define the identity of the package.
PACKAGE='lxsession'
- VERSION='0.4.2'
+ VERSION='0.4.3'
cat >>confdefs.h <<_ACEOF
@@ -7276,7 +7276,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by lxsession $as_me 0.4.2, which was
+This file was extended by lxsession $as_me 0.4.3, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7342,7 +7342,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-lxsession config.status 0.4.2
+lxsession config.status 0.4.3
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/configure.ac new/lxsession-0.4.3/configure.ac
--- old/lxsession-0.4.2/configure.ac 2010-03-07 16:11:07.000000000 +0100
+++ new/lxsession-0.4.3/configure.ac 2010-03-18 17:32:17.000000000 +0100
@@ -1,5 +1,5 @@
AC_PREREQ([2.57])
-AC_INIT(lxsession,[0.4.2], [],lxsession)
+AC_INIT(lxsession,[0.4.3], [],lxsession)
AM_INIT_AUTOMAKE()
AC_PROG_INTLTOOL(, [no-xml])
AM_MAINTAINER_MODE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession/Makefile.am new/lxsession-0.4.3/lxsession/Makefile.am
--- old/lxsession-0.4.2/lxsession/Makefile.am 2010-02-16 19:21:39.000000000 +0100
+++ new/lxsession-0.4.3/lxsession/Makefile.am 2010-03-09 21:41:37.000000000 +0100
@@ -12,8 +12,8 @@
lxsession_SOURCES = \
lxsession.c \
lxsession.h \
- autostart.c \
- autostart.h \
+ xdg-autostart.c \
+ xdg-autostart.h \
xevent.c \
xevent.h \
settings-daemon.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession/Makefile.in new/lxsession-0.4.3/lxsession/Makefile.in
--- old/lxsession-0.4.2/lxsession/Makefile.in 2010-03-07 16:11:24.000000000 +0100
+++ new/lxsession-0.4.3/lxsession/Makefile.in 2010-03-18 17:34:32.000000000 +0100
@@ -48,7 +48,7 @@
PROGRAMS = $(bin_PROGRAMS)
am__objects_1 =
am_lxsession_OBJECTS = lxsession-lxsession.$(OBJEXT) \
- lxsession-autostart.$(OBJEXT) lxsession-xevent.$(OBJEXT) \
+ lxsession-xdg-autostart.$(OBJEXT) lxsession-xevent.$(OBJEXT) \
lxsession-settings-daemon.$(OBJEXT) \
lxsession-xsettings-common.$(OBJEXT) \
lxsession-xsettings-manager.$(OBJEXT) \
@@ -200,8 +200,8 @@
lxsession_SOURCES = \
lxsession.c \
lxsession.h \
- autostart.c \
- autostart.h \
+ xdg-autostart.c \
+ xdg-autostart.h \
xevent.c \
xevent.h \
settings-daemon.c \
@@ -295,9 +295,9 @@
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxsession-autostart.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxsession-lxsession.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxsession-settings-daemon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxsession-xdg-autostart.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxsession-xevent.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxsession-xsettings-common.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lxsession-xsettings-manager.Po@am__quote@
@@ -331,19 +331,19 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -c -o lxsession-lxsession.obj `if test -f 'lxsession.c'; then $(CYGPATH_W) 'lxsession.c'; else $(CYGPATH_W) '$(srcdir)/lxsession.c'; fi`
-lxsession-autostart.o: autostart.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -MT lxsession-autostart.o -MD -MP -MF $(DEPDIR)/lxsession-autostart.Tpo -c -o lxsession-autostart.o `test -f 'autostart.c' || echo '$(srcdir)/'`autostart.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lxsession-autostart.Tpo $(DEPDIR)/lxsession-autostart.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='autostart.c' object='lxsession-autostart.o' libtool=no @AMDEPBACKSLASH@
+lxsession-xdg-autostart.o: xdg-autostart.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -MT lxsession-xdg-autostart.o -MD -MP -MF $(DEPDIR)/lxsession-xdg-autostart.Tpo -c -o lxsession-xdg-autostart.o `test -f 'xdg-autostart.c' || echo '$(srcdir)/'`xdg-autostart.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lxsession-xdg-autostart.Tpo $(DEPDIR)/lxsession-xdg-autostart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xdg-autostart.c' object='lxsession-xdg-autostart.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -c -o lxsession-autostart.o `test -f 'autostart.c' || echo '$(srcdir)/'`autostart.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -c -o lxsession-xdg-autostart.o `test -f 'xdg-autostart.c' || echo '$(srcdir)/'`xdg-autostart.c
-lxsession-autostart.obj: autostart.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -MT lxsession-autostart.obj -MD -MP -MF $(DEPDIR)/lxsession-autostart.Tpo -c -o lxsession-autostart.obj `if test -f 'autostart.c'; then $(CYGPATH_W) 'autostart.c'; else $(CYGPATH_W) '$(srcdir)/autostart.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lxsession-autostart.Tpo $(DEPDIR)/lxsession-autostart.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='autostart.c' object='lxsession-autostart.obj' libtool=no @AMDEPBACKSLASH@
+lxsession-xdg-autostart.obj: xdg-autostart.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -MT lxsession-xdg-autostart.obj -MD -MP -MF $(DEPDIR)/lxsession-xdg-autostart.Tpo -c -o lxsession-xdg-autostart.obj `if test -f 'xdg-autostart.c'; then $(CYGPATH_W) 'xdg-autostart.c'; else $(CYGPATH_W) '$(srcdir)/xdg-autostart.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lxsession-xdg-autostart.Tpo $(DEPDIR)/lxsession-xdg-autostart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xdg-autostart.c' object='lxsession-xdg-autostart.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -c -o lxsession-autostart.obj `if test -f 'autostart.c'; then $(CYGPATH_W) 'autostart.c'; else $(CYGPATH_W) '$(srcdir)/autostart.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -c -o lxsession-xdg-autostart.obj `if test -f 'xdg-autostart.c'; then $(CYGPATH_W) 'xdg-autostart.c'; else $(CYGPATH_W) '$(srcdir)/xdg-autostart.c'; fi`
lxsession-xevent.o: xevent.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxsession_CFLAGS) $(CFLAGS) -MT lxsession-xevent.o -MD -MP -MF $(DEPDIR)/lxsession-xevent.Tpo -c -o lxsession-xevent.o `test -f 'xevent.c' || echo '$(srcdir)/'`xevent.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession/autostart.c new/lxsession-0.4.3/lxsession/autostart.c
--- old/lxsession-0.4.2/lxsession/autostart.c 2010-02-16 19:21:39.000000000 +0100
+++ new/lxsession-0.4.3/lxsession/autostart.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,304 +0,0 @@
-/*
- * autostart.c - Handle autostart spec of freedesktop.org
- *
- * Copyright 2008 PCMan
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#include
-#include
-#include
-
-static const char DesktopEntry[] = "Desktop Entry";
-extern const char* de_name; /* defined in lxsession.c */
-
-#if 0
-/*
-* Parse Exec command line of app desktop file, and translate
-* it into a real command which can be passed to g_spawn_command_line_async().
-* file_list is a null-terminated file list containing full
-* paths of the files passed to app.
-* returned char* should be freed when no longer needed.
-*/
-static char* translate_app_exec_to_command_line( VFSAppDesktop* app,
- GList* file_list )
-{
- const char* pexec = vfs_app_desktop_get_exec( app );
- char* file;
- GList* l;
- gchar *tmp;
- GString* cmd = g_string_new("");
- gboolean add_files = FALSE;
-
- for( ; *pexec; ++pexec )
- {
- if( *pexec == '%' )
- {
- ++pexec;
- switch( *pexec )
- {
- case 'U':
- for( l = file_list; l; l = l->next )
- {
- tmp = g_filename_to_uri( (char*)l->data, NULL, NULL );
- file = g_shell_quote( tmp );
- g_free( tmp );
- g_string_append( cmd, file );
- g_string_append_c( cmd, ' ' );
- g_free( file );
- }
- add_files = TRUE;
- break;
- case 'u':
- if( file_list && file_list->data )
- {
- file = (char*)file_list->data;
- tmp = g_filename_to_uri( file, NULL, NULL );
- file = g_shell_quote( tmp );
- g_free( tmp );
- g_string_append( cmd, file );
- g_free( file );
- add_files = TRUE;
- }
- break;
- case 'F':
- case 'N':
- for( l = file_list; l; l = l->next )
- {
- file = (char*)l->data;
- tmp = g_shell_quote( file );
- g_string_append( cmd, tmp );
- g_string_append_c( cmd, ' ' );
- g_free( tmp );
- }
- add_files = TRUE;
- break;
- case 'f':
- case 'n':
- if( file_list && file_list->data )
- {
- file = (char*)file_list->data;
- tmp = g_shell_quote( file );
- g_string_append( cmd, tmp );
- g_free( tmp );
- add_files = TRUE;
- }
- break;
- case 'D':
- for( l = file_list; l; l = l->next )
- {
- tmp = g_path_get_dirname( (char*)l->data );
- file = g_shell_quote( tmp );
- g_free( tmp );
- g_string_append( cmd, file );
- g_string_append_c( cmd, ' ' );
- g_free( file );
- }
- add_files = TRUE;
- break;
- case 'd':
- if( file_list && file_list->data )
- {
- tmp = g_path_get_dirname( (char*)file_list->data );
- file = g_shell_quote( tmp );
- g_free( tmp );
- g_string_append( cmd, file );
- g_free( tmp );
- add_files = TRUE;
- }
- break;
- case 'c':
- g_string_append( cmd, vfs_app_desktop_get_disp_name( app ) );
- break;
- case 'i':
- /* Add icon name */
- if( vfs_app_desktop_get_icon_name( app ) )
- {
- g_string_append( cmd, "--icon " );
- g_string_append( cmd, vfs_app_desktop_get_icon_name( app ) );
- }
- break;
- case 'k':
- /* Location of the desktop file */
- break;
- case 'v':
- /* Device name */
- break;
- case '%':
- g_string_append_c ( cmd, '%' );
- break;
- case '\0':
- goto _finish;
- break;
- }
- }
- else /* not % escaped part */
- {
- g_string_append_c ( cmd, *pexec );
- }
- }
-_finish:
- if( ! add_files )
- {
- g_string_append_c ( cmd, ' ' );
- for( l = file_list; l; l = l->next )
- {
- file = (char*)l->data;
- tmp = g_shell_quote( file );
- g_string_append( cmd, tmp );
- g_string_append_c( cmd, ' ' );
- g_free( tmp );
- }
- }
-
- return g_string_free( cmd, FALSE );
-}
-#endif
-
-static void launch_autostart_file( const char* desktop_id, const char* desktop_file, GKeyFile* kf )
-{
- if( g_key_file_load_from_file( kf, desktop_file, 0, NULL ) )
- {
- char* exec;
- char** only_show_in, **not_show_in;
- gsize n;
-
- if( g_key_file_get_boolean( kf, DesktopEntry, "Hidden", NULL ) )
- return;
-
- /* check if this desktop entry is desktop-specific */
- only_show_in = g_key_file_get_string_list( kf, DesktopEntry, "OnlyShowIn", &n, NULL );
- if( only_show_in )
- {
- /* The format of this list is like: OnlyShowIn=GNOME;XFCE */
- int i = 0;
- for( i = 0; i < n; ++i )
- {
- /* Only start this program if we are in the "OnlyShowIn" list */
- if( 0 == strcmp( de_name, only_show_in[ i ] ) )
- break;
- }
- if( i >= n ) /* our session name is not found in the list */
- {
- g_strfreev( only_show_in );
- return; /* read next desktop file */
- }
- g_strfreev( only_show_in );
- }
- else /* OnlyShowIn and NotShowIn cannot be set at the same time. */
- {
- /* check if this desktop entry is not allowed in our session */
- not_show_in = g_key_file_get_string_list( kf, DesktopEntry, "NotShowIn", &n, NULL );
- if( not_show_in )
- {
- /* The format of this list is like: NotShowIn=KDE;IceWM */
- int i = 0;
- for( i = 0; i < n; ++i )
- {
- /* Only start this program if we are in the "OnlyShowIn" list */
- if( 0 == strcmp( de_name, not_show_in[ i ] ) )
- break;
- }
- if( i < n ) /* our session name is found in the "NotShowIn" list */
- {
- g_strfreev( not_show_in );
- return; /* read next desktop file */
- }
- g_strfreev( not_show_in );
- }
- }
-
- exec = g_key_file_get_string( kf, DesktopEntry, "TryExec", NULL );
- if( G_UNLIKELY(exec) ) /* If we are asked to tryexec first */
- {
- if( ! g_path_is_absolute( exec ) )
- {
- char* full = g_find_program_in_path( exec );
- g_free( exec );
- exec = full;
- }
- /* If we cannot match the TryExec key with an installed executable program */
- if( ! g_file_test( exec, G_FILE_TEST_IS_EXECUTABLE ) )
- {
- g_free( exec );
- return; /* bypass this desktop file, and read next */
- }
- g_free( exec );
- }
-
- /* get the real command line */
- exec = g_key_file_get_string( kf, DesktopEntry, "Exec", NULL );
- if( G_LIKELY(exec) )
- {
- /* according to the spec, the Exec command line should be translated
- * with some rules, but that's normally for file managers who needs to
- * pass selected file as arguments. The probability we need this is
- * very low, so just omit it.
- */
-
- /* FIXME: Exec key should be handled correctly */
-
- /* launch the program */
- if( g_spawn_command_line_async( exec, NULL ) )
- {
- }
- }
- }
-}
-
-static void get_autostart_files_in_dir( GHashTable* hash, const char* de_name, const char* base_dir )
-{
- char* dir_path = g_build_filename( base_dir, "autostart", NULL );
- GDir* dir = g_dir_open( dir_path, 0, NULL );
-
- if( dir )
- {
- char *path;
- const char *name;
-
- while( (name = g_dir_read_name( dir )) && g_str_has_suffix( name, ".desktop" ) )
- {
- path = g_build_filename( dir_path, name, NULL );
- g_hash_table_replace( hash, g_strdup(name), path );
- }
- g_dir_close( dir );
- }
- g_free( dir_path );
-}
-
-void handle_autostart( const char* de_name )
-{
- const char* const *dirs = g_get_system_config_dirs();
- const char* const *dir;
- GHashTable* hash = g_hash_table_new_full( g_str_hash, g_str_equal, g_free, g_free );
-
- /* get system-wide autostart files */
- for( dir = dirs; *dir; ++dir )
- get_autostart_files_in_dir( hash, de_name, *dir );
-
- /* get user-specific autostart files */
- get_autostart_files_in_dir( hash, de_name, g_get_user_config_dir() );
-
- if( g_hash_table_size( hash ) > 0 )
- {
- GKeyFile* kf = g_key_file_new();
- g_hash_table_foreach( hash, (GHFunc)launch_autostart_file, kf );
- g_key_file_free( kf );
- }
-
- g_hash_table_destroy( hash );
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession/autostart.h new/lxsession-0.4.3/lxsession/autostart.h
--- old/lxsession-0.4.2/lxsession/autostart.h 2010-02-16 19:21:39.000000000 +0100
+++ new/lxsession-0.4.3/lxsession/autostart.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*
- * autostart.h - Handle autostart spec of freedesktop.org
- *
- * Copyright 2008 PCMan
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#ifndef _AUTOSTART_H_
-#define _AUTOSTART_H_
-
-void handle_autostart( const char* session_name );
-
-#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession/lxsession.c new/lxsession-0.4.3/lxsession/lxsession.c
--- old/lxsession-0.4.2/lxsession/lxsession.c 2010-02-22 08:07:54.000000000 +0100
+++ new/lxsession-0.4.3/lxsession/lxsession.c 2010-03-09 21:41:37.000000000 +0100
@@ -33,10 +33,12 @@
#include
#include
+#include /* for shell expansion */
+
#include "lxsession.h"
#include "xevent.h"
#include "settings-daemon.h"
-#include "autostart.h"
+#include "xdg-autostart.h"
static gboolean no_settings = FALSE; /* disable settings daemon */
@@ -57,8 +59,7 @@
const char *session_name = NULL;
const char* de_name = NULL;
-static GPid run_app( const char* cmd );
-static void run_guarded_app( const char* cmd );
+static GPid run_app( const char* cmd, gboolean guarded );
static void start_session();
static void sig_term_handler ( int sig )
@@ -93,7 +94,7 @@
const gchar* const *dir;
GKeyFile* kf = g_key_file_new();
char* filename;
- gboolean ret;
+ gboolean ret;
/* load user-specific session config */
filename = g_build_filename( g_get_user_config_dir(), prog_name, session_name, config_filename, NULL );
@@ -121,42 +122,34 @@
return kf;
}
-/* Returns pid if succesful, returns -1 if errors happen. */
-GPid run_app( const char* cmd )
-{
- char** argv;
- int argc;
- GPid pid = -1;
- if( g_shell_parse_argv( cmd, &argc, &argv, NULL ) )
- {
- g_spawn_async( NULL, argv, NULL,
- G_SPAWN_DO_NOT_REAP_CHILD|
- G_SPAWN_SEARCH_PATH,
- NULL, NULL, &pid, NULL );
- }
- g_strfreev( argv );
- return pid;
-}
-
static void on_child_exit( GPid pid, gint status, gchar* cmd )
{
int sig = WTERMSIG( status );
/* if the term signal is not SIGTERM or SIGKILL, this might be a crash! */
if( sig && sig != SIGTERM && sig != SIGKILL )
- {
- run_guarded_app( cmd );
- }
+ run_app( cmd, TRUE );
}
-void run_guarded_app( const char* cmd )
+/* Returns pid if succesful, returns -1 if errors happen. */
+GPid run_app( const char* cmd, gboolean guarded )
{
- GPid pid = run_app( cmd );
- if( pid > 0 )
+ GPid pid = -1;
+ wordexp_t we;
+ GSpawnFlags flags = guarded ? G_SPAWN_DO_NOT_REAP_CHILD|G_SPAWN_SEARCH_PATH : G_SPAWN_SEARCH_PATH;
+
+ if( wordexp(cmd, &we, 0) == 0)
+ {
+ g_spawn_async( NULL, we.we_wordv, NULL, flags, NULL, NULL, &pid, NULL );
+ wordfree(&we);
+ }
+
+ if(guarded && pid > 0)
{
g_child_watch_add_full( G_PRIORITY_DEFAULT_IDLE, pid,
(GChildWatchFunc)on_child_exit,
g_strdup( cmd ), (GDestroyNotify)g_free );
}
+ return pid;
}
static void load_default_apps( const char* filename )
@@ -173,18 +166,16 @@
len = strlen ( buf );
if( buf[ len - 1 ] == '\n' ) /* remove the '\n' at the end of line */
{
- buf[ len ] = '\0';
--len;
+ buf[ len ] = '\0';
}
switch(buf[0])
{
case '@': /* if the app should be restarted on crash */
- run_guarded_app( buf + 1 );
- break;
- case '#': /* skip comments */
+ run_app( buf + 1, TRUE );
break;
default: /* just run the program */
- g_spawn_command_line_async( buf, NULL );
+ run_app( buf, FALSE );
}
}
fclose( file );
@@ -192,7 +183,7 @@
}
/*
- * system wide default config is /etc/xdg/lxsession/SESSION_NAME/config
+ * system wide default config is /etc/xdg/lxsession/SESSION_NAME/desktop.conf
* system wide default apps are listed in /etc/xdg/lxsession/SESSION_NAME/autostart
*/
void start_session()
@@ -205,7 +196,7 @@
/* run window manager first */
if( G_LIKELY( window_manager ) )
- run_guarded_app( window_manager );
+ run_app( window_manager, TRUE );
/* load system-wide default apps */
for( dir = dirs; *dir; ++dir )
@@ -220,7 +211,7 @@
g_free( filename );
/* Support autostart spec of freedesktop.org */
- handle_autostart( session_name );
+ xdg_autostart( session_name );
}
static void parse_options(int argc, char** argv)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession/xdg-autostart.c new/lxsession-0.4.3/lxsession/xdg-autostart.c
--- old/lxsession-0.4.2/lxsession/xdg-autostart.c 1970-01-01 01:00:00.000000000 +0100
+++ new/lxsession-0.4.3/lxsession/xdg-autostart.c 2010-03-09 21:41:37.000000000 +0100
@@ -0,0 +1,310 @@
+/*
+ * autostart.c - Handle autostart spec of freedesktop.org
+ *
+ * Copyright 2008 PCMan
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include
+#endif
+
+#include "xdg-autostart.h"
+
+#include
+#include
+#include
+
+static const char DesktopEntry[] = "Desktop Entry";
+extern const char* de_name; /* defined in lxsession.c */
+
+#if 0
+/*
+* Parse Exec command line of app desktop file, and translate
+* it into a real command which can be passed to g_spawn_command_line_async().
+* file_list is a null-terminated file list containing full
+* paths of the files passed to app.
+* returned char* should be freed when no longer needed.
+*/
+static char* translate_app_exec_to_command_line( VFSAppDesktop* app,
+ GList* file_list )
+{
+ const char* pexec = vfs_app_desktop_get_exec( app );
+ char* file;
+ GList* l;
+ gchar *tmp;
+ GString* cmd = g_string_new("");
+ gboolean add_files = FALSE;
+
+ for( ; *pexec; ++pexec )
+ {
+ if( *pexec == '%' )
+ {
+ ++pexec;
+ switch( *pexec )
+ {
+ case 'U':
+ for( l = file_list; l; l = l->next )
+ {
+ tmp = g_filename_to_uri( (char*)l->data, NULL, NULL );
+ file = g_shell_quote( tmp );
+ g_free( tmp );
+ g_string_append( cmd, file );
+ g_string_append_c( cmd, ' ' );
+ g_free( file );
+ }
+ add_files = TRUE;
+ break;
+ case 'u':
+ if( file_list && file_list->data )
+ {
+ file = (char*)file_list->data;
+ tmp = g_filename_to_uri( file, NULL, NULL );
+ file = g_shell_quote( tmp );
+ g_free( tmp );
+ g_string_append( cmd, file );
+ g_free( file );
+ add_files = TRUE;
+ }
+ break;
+ case 'F':
+ case 'N':
+ for( l = file_list; l; l = l->next )
+ {
+ file = (char*)l->data;
+ tmp = g_shell_quote( file );
+ g_string_append( cmd, tmp );
+ g_string_append_c( cmd, ' ' );
+ g_free( tmp );
+ }
+ add_files = TRUE;
+ break;
+ case 'f':
+ case 'n':
+ if( file_list && file_list->data )
+ {
+ file = (char*)file_list->data;
+ tmp = g_shell_quote( file );
+ g_string_append( cmd, tmp );
+ g_free( tmp );
+ add_files = TRUE;
+ }
+ break;
+ case 'D':
+ for( l = file_list; l; l = l->next )
+ {
+ tmp = g_path_get_dirname( (char*)l->data );
+ file = g_shell_quote( tmp );
+ g_free( tmp );
+ g_string_append( cmd, file );
+ g_string_append_c( cmd, ' ' );
+ g_free( file );
+ }
+ add_files = TRUE;
+ break;
+ case 'd':
+ if( file_list && file_list->data )
+ {
+ tmp = g_path_get_dirname( (char*)file_list->data );
+ file = g_shell_quote( tmp );
+ g_free( tmp );
+ g_string_append( cmd, file );
+ g_free( tmp );
+ add_files = TRUE;
+ }
+ break;
+ case 'c':
+ g_string_append( cmd, vfs_app_desktop_get_disp_name( app ) );
+ break;
+ case 'i':
+ /* Add icon name */
+ if( vfs_app_desktop_get_icon_name( app ) )
+ {
+ g_string_append( cmd, "--icon " );
+ g_string_append( cmd, vfs_app_desktop_get_icon_name( app ) );
+ }
+ break;
+ case 'k':
+ /* Location of the desktop file */
+ break;
+ case 'v':
+ /* Device name */
+ break;
+ case '%':
+ g_string_append_c ( cmd, '%' );
+ break;
+ case '\0':
+ goto _finish;
+ break;
+ }
+ }
+ else /* not % escaped part */
+ {
+ g_string_append_c ( cmd, *pexec );
+ }
+ }
+_finish:
+ if( ! add_files )
+ {
+ g_string_append_c ( cmd, ' ' );
+ for( l = file_list; l; l = l->next )
+ {
+ file = (char*)l->data;
+ tmp = g_shell_quote( file );
+ g_string_append( cmd, tmp );
+ g_string_append_c( cmd, ' ' );
+ g_free( tmp );
+ }
+ }
+
+ return g_string_free( cmd, FALSE );
+}
+#endif
+
+static void launch_autostart_file( const char* desktop_id, const char* desktop_file, GKeyFile* kf )
+{
+ if( g_key_file_load_from_file( kf, desktop_file, 0, NULL ) )
+ {
+ char* exec;
+ char** only_show_in, **not_show_in;
+ gsize n;
+
+ if( g_key_file_get_boolean( kf, DesktopEntry, "Hidden", NULL ) )
+ return;
+
+ /* check if this desktop entry is desktop-specific */
+ only_show_in = g_key_file_get_string_list( kf, DesktopEntry, "OnlyShowIn", &n, NULL );
+ if( only_show_in )
+ {
+ /* The format of this list is like: OnlyShowIn=GNOME;XFCE */
+ int i = 0;
+ for( i = 0; i < n; ++i )
+ {
+ /* Only start this program if we are in the "OnlyShowIn" list */
+ if( 0 == strcmp( de_name, only_show_in[ i ] ) )
+ break;
+ }
+ if( i >= n ) /* our session name is not found in the list */
+ {
+ g_strfreev( only_show_in );
+ return; /* read next desktop file */
+ }
+ g_strfreev( only_show_in );
+ }
+ else /* OnlyShowIn and NotShowIn cannot be set at the same time. */
+ {
+ /* check if this desktop entry is not allowed in our session */
+ not_show_in = g_key_file_get_string_list( kf, DesktopEntry, "NotShowIn", &n, NULL );
+ if( not_show_in )
+ {
+ /* The format of this list is like: NotShowIn=KDE;IceWM */
+ int i = 0;
+ for( i = 0; i < n; ++i )
+ {
+ /* Only start this program if we are in the "OnlyShowIn" list */
+ if( 0 == strcmp( de_name, not_show_in[ i ] ) )
+ break;
+ }
+ if( i < n ) /* our session name is found in the "NotShowIn" list */
+ {
+ g_strfreev( not_show_in );
+ return; /* read next desktop file */
+ }
+ g_strfreev( not_show_in );
+ }
+ }
+
+ exec = g_key_file_get_string( kf, DesktopEntry, "TryExec", NULL );
+ if( G_UNLIKELY(exec) ) /* If we are asked to tryexec first */
+ {
+ if( ! g_path_is_absolute( exec ) )
+ {
+ char* full = g_find_program_in_path( exec );
+ g_free( exec );
+ exec = full;
+ }
+ /* If we cannot match the TryExec key with an installed executable program */
+ if( ! g_file_test( exec, G_FILE_TEST_IS_EXECUTABLE ) )
+ {
+ g_free( exec );
+ return; /* bypass this desktop file, and read next */
+ }
+ g_free( exec );
+ }
+
+ /* get the real command line */
+ exec = g_key_file_get_string( kf, DesktopEntry, "Exec", NULL );
+ if( G_LIKELY(exec) )
+ {
+ /* according to the spec, the Exec command line should be translated
+ * with some rules, but that's normally for file managers who needs to
+ * pass selected file as arguments. The probability we need this is
+ * very low, so just omit it.
+ */
+
+ /* FIXME: Exec key should be handled correctly */
+
+ /* launch the program */
+ if( g_spawn_command_line_async( exec, NULL ) )
+ {
+ }
+ }
+ }
+}
+
+static void get_autostart_files_in_dir( GHashTable* hash, const char* de_name, const char* base_dir )
+{
+ char* dir_path = g_build_filename( base_dir, "autostart", NULL );
+ GDir* dir = g_dir_open( dir_path, 0, NULL );
+
+ if( dir )
+ {
+ char *path;
+ const char *name;
+
+ while( (name = g_dir_read_name( dir )) && g_str_has_suffix( name, ".desktop" ) )
+ {
+ path = g_build_filename( dir_path, name, NULL );
+ g_hash_table_replace( hash, g_strdup(name), path );
+ }
+ g_dir_close( dir );
+ }
+ g_free( dir_path );
+}
+
+void xdg_autostart( const char* de_name )
+{
+ const char* const *dirs = g_get_system_config_dirs();
+ const char* const *dir;
+ GHashTable* hash = g_hash_table_new_full( g_str_hash, g_str_equal, g_free, g_free );
+
+ /* get system-wide autostart files */
+ for( dir = dirs; *dir; ++dir )
+ get_autostart_files_in_dir( hash, de_name, *dir );
+
+ /* get user-specific autostart files */
+ get_autostart_files_in_dir( hash, de_name, g_get_user_config_dir() );
+
+ if( g_hash_table_size( hash ) > 0 )
+ {
+ GKeyFile* kf = g_key_file_new();
+ g_hash_table_foreach( hash, (GHFunc)launch_autostart_file, kf );
+ g_key_file_free( kf );
+ }
+
+ g_hash_table_destroy( hash );
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession/xdg-autostart.h new/lxsession-0.4.3/lxsession/xdg-autostart.h
--- old/lxsession-0.4.2/lxsession/xdg-autostart.h 1970-01-01 01:00:00.000000000 +0100
+++ new/lxsession-0.4.3/lxsession/xdg-autostart.h 2010-03-09 21:41:37.000000000 +0100
@@ -0,0 +1,27 @@
+/*
+ * autostart.h - Handle autostart spec of freedesktop.org
+ *
+ * Copyright 2008 PCMan
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#ifndef _XDG_AUTOSTART_H_
+#define _XDG_AUTOSTART_H_
+
+void xdg_autostart( const char* session_name );
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession-logout/dbus-interface.c new/lxsession-0.4.3/lxsession-logout/dbus-interface.c
--- old/lxsession-0.4.2/lxsession-logout/dbus-interface.c 2010-02-22 13:08:17.000000000 +0100
+++ new/lxsession-0.4.3/lxsession-logout/dbus-interface.c 2010-03-18 17:28:49.000000000 +0100
@@ -18,6 +18,7 @@
#include
#include
+#include
#ifdef HAVE_DBUS
#include
#endif
@@ -73,6 +74,22 @@
return reply;
}
+/* Send a message with no reply expected. */
+static gboolean dbus_send_message_without_reply(DBusMessage * message)
+{
+ /* Get a connection handle. */
+ DBusConnection * connection = dbus_connect();
+ if (connection == NULL)
+ return FALSE;
+
+ /* Send the message in the blind. */
+ dbus_bool_t status = dbus_connection_send(connection, message, NULL);
+ dbus_message_unref(message);
+ if ( ! status)
+ g_warning(G_STRLOC ": DBUS: dbus_connection_send failed\n");
+ return status;
+}
+
/* Read a result for a method that returns void. */
static gboolean dbus_read_result_void(DBusMessage * reply)
{
@@ -225,6 +242,7 @@
{
#ifdef HAVE_DBUS
return dbus_read_result_void(dbus_send_message(dbus_DeviceKit_formulate_command(command)));
+// return dbus_send_message_without_reply(dbus_DeviceKit_formulate_command(command)); It seems they don't send a reply; to be checked out
#else
return FALSE;
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/lxsession-logout/lxsession-logout.c new/lxsession-0.4.3/lxsession-logout/lxsession-logout.c
--- old/lxsession-0.4.2/lxsession-logout/lxsession-logout.c 2010-02-21 19:19:21.000000000 +0100
+++ new/lxsession-0.4.3/lxsession-logout/lxsession-logout.c 2010-03-18 17:21:34.000000000 +0100
@@ -17,6 +17,8 @@
*/
#include
+#include
+#include
#include
#include
#include
@@ -184,7 +186,7 @@
return pixbuf;
}
-/* Handler for "expose_event" on drawing areas. */
+/* Handler for "expose_event" on background. */
gboolean expose_event(GtkWidget * widget, GdkEventExpose * event, GdkPixbuf * pixbuf)
{
if (pixbuf != NULL)
@@ -201,7 +203,7 @@
GDK_RGB_DITHER_NORMAL, /* Dither type */
0, 0); /* Dither offsets */
}
- return TRUE;
+ return FALSE;
}
/* Main program. */
@@ -237,7 +239,7 @@
{
g_print( _("Error: %s\n"), _("LXSession is not running."));
return 1;
- }
+ }
/* Initialize capabilities of the ConsoleKit mechanism. */
if (dbus_ConsoleKit_CanStop())
@@ -266,22 +268,22 @@
#endif
/* Initialize capabilities of the HAL mechanism. */
- if (dbus_HAL_CanShutdown())
+ if (!handler_context.shutdown_available && dbus_HAL_CanShutdown())
{
handler_context.shutdown_available = TRUE;
handler_context.shutdown_HAL = TRUE;
}
- if (dbus_HAL_CanReboot())
+ if (!handler_context.reboot_available && dbus_HAL_CanReboot())
{
handler_context.reboot_available = TRUE;
handler_context.reboot_HAL = TRUE;
}
- if (dbus_HAL_CanSuspend())
+ if (!handler_context.suspend_available && dbus_HAL_CanSuspend())
{
handler_context.suspend_available = TRUE;
handler_context.suspend_HAL = TRUE;
}
- if (dbus_HAL_CanHibernate())
+ if (!handler_context.hibernate_available && dbus_HAL_CanHibernate())
{
handler_context.hibernate_available = TRUE;
handler_context.hibernate_HAL = TRUE;
@@ -309,36 +311,23 @@
GtkWidget * window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
gtk_window_fullscreen(GTK_WINDOW(window));
+ GdkScreen* screen = gtk_widget_get_screen(window);
+ gtk_window_set_default_size(GTK_WINDOW(window), gdk_screen_get_width(screen), gdk_screen_get_height(screen));
+ gtk_widget_set_app_paintable(window, TRUE);
+ g_signal_connect(G_OBJECT(window), "expose_event", G_CALLBACK(expose_event), pixbuf);
+
+ /* Toplevel container */
+ GtkWidget* alignment = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
+ gtk_container_add(GTK_CONTAINER(window), alignment);
+
+ GtkWidget* center_area = gtk_event_box_new();
+ gtk_container_add(GTK_CONTAINER(alignment), center_area);
+
+ GtkWidget* center_vbox = gtk_vbox_new(FALSE, 6);
+ gtk_container_set_border_width(GTK_CONTAINER(center_vbox), 12);
+ gtk_container_add(GTK_CONTAINER(center_area), center_vbox);
- /* Create a vertical box as the child of the toplevel window. */
- GtkWidget * outermost = gtk_vbox_new(FALSE, 0);
- gtk_container_add(GTK_CONTAINER(window), outermost);
-
- /* Create a drawing area as the child of the toplevel window.
- * This drawing area is as wide as the screen and as tall as the area above the user controls. */
- GtkWidget * top_drawing_area = gtk_drawing_area_new();
- gtk_box_pack_start(GTK_BOX(outermost), top_drawing_area, TRUE, TRUE, 0);
- g_signal_connect(G_OBJECT(top_drawing_area), "expose_event", G_CALLBACK(expose_event), pixbuf);
-
- /* Create a horizontal box as the child of the outermost box. */
- GtkWidget * horizontal = gtk_hbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(outermost), horizontal, FALSE, FALSE, 0);
-
- /* Create a drawing area as the child of the toplevel window.
- * This drawing area is as wide as the screen and as tall as the area below the user controls. */
- GtkWidget * bottom_drawing_area = gtk_drawing_area_new();
- gtk_box_pack_start(GTK_BOX(outermost), bottom_drawing_area, TRUE, TRUE, 0);
- g_signal_connect(G_OBJECT(bottom_drawing_area), "expose_event", G_CALLBACK(expose_event), pixbuf);
-
- /* Create a drawing area as the child of the horizontal box.
- * This drawing area is as wide as the area left of the user controls and as tall as the user controls. */
- GtkWidget * left_drawing_area = gtk_drawing_area_new();
- gtk_box_pack_start(GTK_BOX(horizontal), left_drawing_area, TRUE, TRUE, 0);
- g_signal_connect(G_OBJECT(left_drawing_area), "expose_event", G_CALLBACK(expose_event), pixbuf);
-
- /* Create a vertical box as the child of the horizontal box. This will contain the user controls. */
- GtkWidget * controls = gtk_vbox_new(FALSE, 0);
- gtk_container_set_border_width(GTK_CONTAINER(controls), 6);
+ GtkWidget* controls = gtk_vbox_new(FALSE, 6);
/* If specified, apply a user-specified banner image. */
if (banner_path != NULL)
@@ -353,7 +342,7 @@
{
/* Create a horizontal box to contain the image and the controls. */
GtkWidget * box = gtk_hbox_new(FALSE, 2);
- gtk_box_pack_start(GTK_BOX(horizontal), box, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(center_vbox), box, FALSE, FALSE, 0);
/* Pack the image and a separator. */
gtk_misc_set_alignment(GTK_MISC(banner_image), 0.5, 0.0);
@@ -375,18 +364,18 @@
case GTK_POS_TOP:
gtk_box_pack_start(GTK_BOX(controls), banner_image, FALSE, FALSE, 2);
gtk_box_pack_start(GTK_BOX(controls), gtk_hseparator_new(), FALSE, FALSE, 2);
- gtk_box_pack_start(GTK_BOX(horizontal), controls, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(center_vbox), controls, FALSE, FALSE, 0);
break;
case GTK_POS_BOTTOM:
gtk_box_pack_end(GTK_BOX(controls), banner_image, FALSE, FALSE, 2);
gtk_box_pack_end(GTK_BOX(controls), gtk_hseparator_new(), FALSE, FALSE, 2);
- gtk_box_pack_start(GTK_BOX(horizontal), controls, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(center_vbox), controls, FALSE, FALSE, 0);
break;
}
}
else
- gtk_box_pack_start(GTK_BOX(horizontal), controls, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(center_vbox), controls, FALSE, FALSE, 0);
/* Create the label. */
GtkWidget * label = gtk_label_new("");
@@ -400,13 +389,6 @@
gtk_label_set_markup(GTK_LABEL(label), prompt);
gtk_box_pack_start(GTK_BOX(controls), label, FALSE, FALSE, 4);
- /* Create the Logout button. */
- GtkWidget * logout_button = gtk_button_new_with_mnemonic(_("_Logout"));
- GtkWidget * image = gtk_image_new_from_icon_name("system-log-out", GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image(GTK_BUTTON(logout_button), image);
- g_signal_connect(G_OBJECT(logout_button), "clicked", G_CALLBACK(logout_clicked), &handler_context);
- gtk_box_pack_start(GTK_BOX(controls), logout_button, FALSE, FALSE, 4);
-
/* Create the Shutdown button. */
if (handler_context.shutdown_available)
{
@@ -457,17 +439,18 @@
gtk_box_pack_start(GTK_BOX(controls), switch_user_button, FALSE, FALSE, 4);
}
+ /* Create the Logout button. */
+ GtkWidget * logout_button = gtk_button_new_with_mnemonic(_("_Logout"));
+ GtkWidget * image = gtk_image_new_from_icon_name("system-log-out", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(logout_button), image);
+ g_signal_connect(G_OBJECT(logout_button), "clicked", G_CALLBACK(logout_clicked), &handler_context);
+ gtk_box_pack_start(GTK_BOX(controls), logout_button, FALSE, FALSE, 4);
+
/* Create the Cancel button. */
GtkWidget * cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
g_signal_connect(G_OBJECT(cancel_button), "clicked", G_CALLBACK(cancel_clicked), NULL);
gtk_box_pack_start(GTK_BOX(controls), cancel_button, FALSE, FALSE, 4);
- /* Create a drawing area as the child of the horizontal box.
- * This drawing area is as wide as the area right of the user controls and as tall as the user controls. */
- GtkWidget * right_drawing_area = gtk_drawing_area_new();
- gtk_box_pack_start(GTK_BOX(horizontal), right_drawing_area, TRUE, TRUE, 0);
- g_signal_connect(G_OBJECT(right_drawing_area), "expose_event", G_CALLBACK(expose_event), pixbuf);
-
/* Show everything. */
gtk_widget_show_all(window);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lxsession-0.4.2/po/it.po new/lxsession-0.4.3/po/it.po
--- old/lxsession-0.4.2/po/it.po 2010-02-16 19:21:39.000000000 +0100
+++ new/lxsession-0.4.3/po/it.po 2010-03-09 21:41:37.000000000 +0100
@@ -8,13 +8,14 @@
"Project-Id-Version: lxsession-lite 0.3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-04-15 19:49+0200\n"
-"PO-Revision-Date: 2009-01-06 11:55+0100\n"
-"Last-Translator: Fabio Barone \n"
+"PO-Revision-Date: 2010-03-09 00:29+0100\n"
+"Last-Translator: Andrea Florio \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Italian\n"
"X-Poedit-Country: ITALY\n"
+"Language-Team: \n"
#: ../lxsession-logout/main.c:63
msgid "Custom message to show on the dialog"
@@ -36,7 +37,8 @@
msgid "Position of the banner"
msgstr "Posizione dell'immagine"
-#: ../lxsession-logout/main.c:354 ../lxsession-logout/main.c:365
+#: ../lxsession-logout/main.c:354
+#: ../lxsession-logout/main.c:365
#, c-format
msgid "Error: %s\n"
msgstr "Errore: %s\n"
@@ -53,7 +55,7 @@
#: ../lxsession-logout/main.c:428
#, c-format
msgid "<b><big>Logout %s session?</big></b>"
-msgstr "<b><big>%s chiudere la sessione? </big></b>"
+msgstr "<b><big>Chiudere la sessione %s? </big></b>"
#: ../lxsession-logout/main.c:438
msgid "Sh_utdown"
@@ -81,3 +83,4 @@
#~ msgid "Save current session"
#~ msgstr "Salvare la sessione attuale"
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org