aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-08-24 14:38:05 +0100
committerConor Curran <conor.curran@canonical.com>2011-08-24 14:38:05 +0100
commitf0b10565f499867cac8dac78e5a1af4217d59e3b (patch)
tree5b19b44490436de27ff8c797ada77ea010a47847
parent90a91a268a34289aed38215dc9c801365a598e3c (diff)
parent39806a70caf6b4a7dc9f6772d915ddacebc928a3 (diff)
downloadayatana-indicator-session-f0b10565f499867cac8dac78e5a1af4217d59e3b.tar.gz
ayatana-indicator-session-f0b10565f499867cac8dac78e5a1af4217d59e3b.tar.bz2
ayatana-indicator-session-f0b10565f499867cac8dac78e5a1af4217d59e3b.zip
merged the desktop session files branch
-rw-r--r--.bzrignore8
-rw-r--r--data/Makefile.am24
-rw-r--r--data/indicator-session-lock-screen.desktop.in.in9
-rw-r--r--data/indicator-session-logout.desktop.in.in9
-rw-r--r--data/indicator-session-restart.desktop.in.in9
-rw-r--r--data/indicator-session-shutdown.desktop.in.in9
-rw-r--r--po/POTFILES.in4
-rw-r--r--src/user-menu-mgr.c3
8 files changed, 73 insertions, 2 deletions
diff --git a/.bzrignore b/.bzrignore
index 3a062ec..1883f5c 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -203,3 +203,11 @@ src/libsession_la-user-widget.lo
consolekit-seat-client.h
data/com.canonical.indicator.session.gschema.valid
data/com.canonical.indicator.session.gschema.xml
+indicator-session-shutdown.desktop
+indicator-session-shutdown.desktop.in
+indicator-session-logout.desktop.in
+indicator-session-logout.desktop
+indicator-session-restart.desktop.in
+indicator-session-restart.desktop
+data/indicator-session-lock-screen.desktop.in
+data/indicator-session-lock-screen.desktop
diff --git a/data/Makefile.am b/data/Makefile.am
index 27328fb..7e851a7 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -18,13 +18,33 @@ gsettings_SCHEMAS = com.canonical.indicator.session.gschema.xml
convertdir = $(datadir)/GConf/gsettings
dist_convert_DATA = indicator-session.convert
+@INTLTOOL_DESKTOP_RULE@
+
+%.desktop.in: %.desktop.in.in
+ sed \
+ -e "s|\@libexecdir\@|$(libexecdir)|" \
+ -e "s|\@bindir\@|$(bindir)|" \
+ $< > $@
+
+logout_helper_desktop_in_in_files = \
+ indicator-session-lock-screen.desktop.in.in \
+ indicator-session-logout.desktop.in.in \
+ indicator-session-restart.desktop.in.in \
+ indicator-session-shutdown.desktop.in.in
+
+logout_helperdir = $(datadir)/applications
+logout_helper_desktop_files = \
+ $(logout_helper_desktop_in_in_files:.desktop.in.in=.desktop)
+logout_helper_DATA = $(logout_helper_desktop_files)
EXTRA_DIST = \
$(service_in_files) \
- $(gsettings_SCHEMAS:.xml=.xml.in)
+ $(gsettings_SCHEMAS:.xml=.xml.in) \
+ $(logout_helper_desktop_in_in_files)
CLEANFILES = \
$(dbus_services_DATA) \
- $(gsettings_SCHEMAS)
+ $(gsettings_SCHEMAS) \
+ $(logout_helper_desktop_files)
diff --git a/data/indicator-session-lock-screen.desktop.in.in b/data/indicator-session-lock-screen.desktop.in.in
new file mode 100644
index 0000000..e44cd9f
--- /dev/null
+++ b/data/indicator-session-lock-screen.desktop.in.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+_Name=Lock Screen
+TryExec=@bindir@/xdg-screensaver
+Exec=@bindir@/xdg-screensaver lock
+Icon=system-lock-screen
+Terminal=false
+Type=Application
+OnlyShowIn=Unity;
+Version=1.0
diff --git a/data/indicator-session-logout.desktop.in.in b/data/indicator-session-logout.desktop.in.in
new file mode 100644
index 0000000..46ba087
--- /dev/null
+++ b/data/indicator-session-logout.desktop.in.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+_Name=Log Out
+TryExec=@libexecdir@/gtk-logout-helper
+Exec=@libexecdir@/gtk-logout-helper --logout
+Icon=system-log-out
+Terminal=false
+Type=Application
+OnlyShowIn=Unity;
+Version=1.0
diff --git a/data/indicator-session-restart.desktop.in.in b/data/indicator-session-restart.desktop.in.in
new file mode 100644
index 0000000..67aa390
--- /dev/null
+++ b/data/indicator-session-restart.desktop.in.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+_Name=Restart
+TryExec=@libexecdir@/gtk-logout-helper
+Exec=@libexecdir@/gtk-logout-helper --restart
+Icon=system-restart
+Terminal=false
+Type=Application
+OnlyShowIn=Unity;
+Version=1.0
diff --git a/data/indicator-session-shutdown.desktop.in.in b/data/indicator-session-shutdown.desktop.in.in
new file mode 100644
index 0000000..4bd51fe
--- /dev/null
+++ b/data/indicator-session-shutdown.desktop.in.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+_Name=Shut Down
+TryExec=@libexecdir@/gtk-logout-helper
+Exec=@libexecdir@/gtk-logout-helper --shutdown
+Icon=system-shutdown
+Terminal=false
+Type=Application
+OnlyShowIn=Unity;
+Version=1.0
diff --git a/po/POTFILES.in b/po/POTFILES.in
index df89ec9..44a2269 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,10 @@
[encoding: UTF-8]
data/com.canonical.indicator.session.gschema.xml.in
data/extra-sessions/classic-desktop.desktop.in.in
+data/indicator-session-lock-screen.desktop.in.in
+data/indicator-session-shutdown.desktop.in.in
+data/indicator-session-logout.desktop.in.in
+data/indicator-session-restart.desktop.in.in
src/settings-helper.c
src/lock-helper.c
src/gtk-logout-helper.c
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c
index 588d3d0..5ac1c63 100644
--- a/src/user-menu-mgr.c
+++ b/src/user-menu-mgr.c
@@ -44,6 +44,9 @@ static void activate_new_session (DbusmenuMenuitem * mi,
static void activate_user_session (DbusmenuMenuitem *mi,
guint timestamp,
gpointer user_data);
+static void activate_user_accounts (DbusmenuMenuitem *mi,
+ guint timestamp,
+ gpointer user_data);
static gint compare_users_by_username (const gchar *a,
const gchar *b);
static void activate_online_accounts (DbusmenuMenuitem *mi,