Merge lp:~ted/indicator-me/make-it-me into lp:indicator-me

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ted/indicator-me/make-it-me
Merge into: lp:indicator-me
Diff against target: 6269 lines (+231/-5358)
46 files modified
.bzrignore (+10/-4)
autogen.sh (+1/-1)
configure.ac (+10/-31)
data/Makefile.am (+3/-32)
data/icons/16x16/Makefile.am (+1/-1)
data/icons/16x16/actions/Makefile.am (+0/-10)
data/icons/22x22/Makefile.am (+1/-1)
data/icons/22x22/actions/Makefile.am (+0/-10)
data/icons/24x24/Makefile.am (+1/-1)
data/icons/24x24/actions/Makefile.am (+0/-10)
data/icons/32x32/Makefile.am (+1/-1)
data/icons/32x32/actions/Makefile.am (+0/-8)
data/icons/scalable/Makefile.am (+1/-1)
data/icons/scalable/actions/Makefile.am (+0/-10)
data/icons/scalable/actions/system-log-out.svg (+0/-284)
data/icons/scalable/actions/system-restart.svg (+0/-397)
data/icons/scalable/actions/system-shutdown-panel.svg (+0/-247)
data/icons/scalable/actions/system-shutdown.svg (+0/-247)
data/indicator-me.service.in (+2/-2)
data/indicator-session.schemas.in (+0/-17)
data/indicator-session.service.in (+0/-3)
data/indicator-users.service.in (+0/-3)
po/POTFILES.in (+1/-8)
src/Makefile.am (+36/-84)
src/dbus-shared-names.h (+5/-12)
src/gtk-dialog/Makefile.am (+0/-15)
src/gtk-dialog/ck-pk-helper.c (+0/-222)
src/gtk-dialog/ck-pk-helper.h (+0/-32)
src/gtk-dialog/gconf-helper.c (+0/-73)
src/gtk-dialog/gconf-helper.h (+0/-50)
src/gtk-dialog/gtk-logout-helper.c (+0/-173)
src/gtk-dialog/logout-dialog.c (+0/-371)
src/gtk-dialog/logout-dialog.h (+0/-99)
src/indicator-me.c (+101/-532)
src/lock-helper.c (+0/-326)
src/lock-helper.h (+0/-37)
src/me-service-dbus.c (+10/-10)
src/me-service.c (+19/-27)
src/me-service.xml (+1/-1)
src/session-service.c (+0/-339)
src/status-provider-mc5.c (+27/-12)
src/users-service-dbus.c (+0/-1147)
src/users-service-dbus.h (+0/-84)
src/users-service.c (+0/-326)
src/users-service.list (+0/-1)
src/users-service.xml (+0/-56)
To merge this branch: bzr merge lp:~ted/indicator-me/make-it-me
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+16815@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Removing everything other than status. Now this is all status only. Also, quite a bit of renaming to make things clearer in the future.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2009-10-08 14:45:29 +0000
+++ .bzrignore 2010-01-04 21:25:21 +0000
@@ -50,7 +50,13 @@
50src/users-service-client.h50src/users-service-client.h
51src/users-service-marshal.c51src/users-service-marshal.c
52src/users-service-marshal.h52src/users-service-marshal.h
53indicator-session-[0-9].[0-9].[0-9].tar.gz53indicator-me-[0-9].[0-9].[0-9].tar.gz
54indicator-session-[0-9].[0-9].tar.gz54indicator-me-[0-9].[0-9].tar.gz
55indicator-session-[0-9].[0-9].[0-9].tar.gz.asc55indicator-me-[0-9].[0-9].[0-9].tar.gz.asc
56indicator-session-[0-9].[0-9].tar.gz.asc56indicator-me-[0-9].[0-9].tar.gz.asc
57src/indicator-me-service
58src/libme.la
59src/libme_la-indicator-me.lo
60po/indicator-me.pot
61src/me-service-client.h
62src/me-service-server.h
5763
=== modified file 'autogen.sh'
--- autogen.sh 2009-08-18 14:17:32 +0000
+++ autogen.sh 2010-01-04 21:25:21 +0000
@@ -1,6 +1,6 @@
1#!/bin/sh1#!/bin/sh
22
3PKG_NAME="indicator-session"3PKG_NAME="indicator-me"
44
5which gnome-autogen.sh || {5which gnome-autogen.sh || {
6 echo "You need gnome-common from GNOME SVN"6 echo "You need gnome-common from GNOME SVN"
77
=== modified file 'configure.ac'
--- configure.ac 2009-11-04 22:14:49 +0000
+++ configure.ac 2010-01-04 21:25:21 +0000
@@ -1,10 +1,11 @@
11
2AC_INIT(src/indicator-session.c)2AC_INIT(indicator-me, 0.0.1, ted@canonical.com)
3AC_COPYRIGHT([Copyright 2009 Canonical])
34
4AC_PREREQ(2.53)5AC_PREREQ(2.53)
56
6AM_CONFIG_HEADER(config.h)7AM_CONFIG_HEADER(config.h)
7AM_INIT_AUTOMAKE(indicator-session, 0.1.7)8AM_INIT_AUTOMAKE(indicator-me, 0.0.1)
89
9AM_MAINTAINER_MODE10AM_MAINTAINER_MODE
1011
@@ -27,7 +28,7 @@
2728
28GTK_REQUIRED_VERSION=2.1229GTK_REQUIRED_VERSION=2.12
29INDICATOR_REQUIRED_VERSION=0.3.030INDICATOR_REQUIRED_VERSION=0.3.0
30DBUSMENUGTK_REQUIRED_VERSION=0.1.131DBUSMENUGTK_REQUIRED_VERSION=0.2.0
31POLKIT_REQUIRED_VERSION=0.9232POLKIT_REQUIRED_VERSION=0.92
3233
33PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION34PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
@@ -37,31 +38,15 @@
37AC_SUBST(APPLET_LIBS)38AC_SUBST(APPLET_LIBS)
3839
39DBUSMENUGLIB_REQUIRED_VERSION=0.1.140DBUSMENUGLIB_REQUIRED_VERSION=0.1.1
40LIBEMPATHY_REQUIRED_VERSION=2.27.041TELEPATHYGLIB_REQUIRED_VERSION=0.9.0
4142
42PKG_CHECK_MODULES(STATUSSERVICE, dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION43PKG_CHECK_MODULES(STATUSSERVICE, dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION
43 libempathy >= $LIBEMPATHY_REQUIRED_VERSION)44 indicator >= $INDICATOR_REQUIRED_VERSION
45 telepathy-glib >= $TELEPATHYGLIB_REQUIRED_VERSION)
4446
45AC_SUBST(STATUSERVICE_CFLAGS)47AC_SUBST(STATUSERVICE_CFLAGS)
46AC_SUBST(STATUSERVICE_LIBS)48AC_SUBST(STATUSERVICE_LIBS)
4749
48PKG_CHECK_MODULES(USERSSERVICE, dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION)
49
50AC_SUBST(USERSERVICE_CFLAGS)
51AC_SUBST(USERSERVICE_LIBS)
52
53PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION)
54
55AC_SUBST(SESSIONERVICE_CFLAGS)
56AC_SUBST(SESSIONERVICE_LIBS)
57
58PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION
59 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
60
61
62AC_SUBST(GTKLOGOUTHELPER_CFLAGS)
63AC_SUBST(GTKLOGOUTHELPER_LIBS)
64
65AC_PATH_PROG(GCONFTOOL, gconftool-2)50AC_PATH_PROG(GCONFTOOL, gconftool-2)
66dnl Specify the gconf configuration source,51dnl Specify the gconf configuration source,
67dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults52dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
@@ -84,7 +69,7 @@
84###########################69###########################
8570
86if test "x$with_localinstall" = "xyes"; then71if test "x$with_localinstall" = "xyes"; then
87 INDICATORDIR="${libdir}/indicators/2/"72 INDICATORDIR="${libdir}/indicators/3/"
88 INDICATORICONSDIR="${datadir}/indicator-applet/icons/"73 INDICATORICONSDIR="${datadir}/indicator-applet/icons/"
89else74else
90 INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`75 INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
@@ -124,7 +109,7 @@
124# Internationalization109# Internationalization
125###########################110###########################
126111
127GETTEXT_PACKAGE=indicator-session112GETTEXT_PACKAGE=indicator-me
128AC_SUBST(GETTEXT_PACKAGE)113AC_SUBST(GETTEXT_PACKAGE)
129AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default get text domain])114AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default get text domain])
130AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory])115AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory])
@@ -138,26 +123,20 @@
138AC_OUTPUT([123AC_OUTPUT([
139Makefile124Makefile
140src/Makefile125src/Makefile
141src/gtk-dialog/Makefile
142data/Makefile126data/Makefile
143data/icons/Makefile127data/icons/Makefile
144data/icons/16x16/Makefile128data/icons/16x16/Makefile
145data/icons/16x16/status/Makefile129data/icons/16x16/status/Makefile
146data/icons/16x16/actions/Makefile
147data/icons/22x22/Makefile130data/icons/22x22/Makefile
148data/icons/22x22/status/Makefile131data/icons/22x22/status/Makefile
149data/icons/22x22/actions/Makefile
150data/icons/24x24/Makefile132data/icons/24x24/Makefile
151data/icons/24x24/status/Makefile133data/icons/24x24/status/Makefile
152data/icons/24x24/actions/Makefile
153data/icons/32x32/Makefile134data/icons/32x32/Makefile
154data/icons/32x32/status/Makefile135data/icons/32x32/status/Makefile
155data/icons/32x32/actions/Makefile
156data/icons/48x48/Makefile136data/icons/48x48/Makefile
157data/icons/48x48/status/Makefile137data/icons/48x48/status/Makefile
158data/icons/scalable/Makefile138data/icons/scalable/Makefile
159data/icons/scalable/status/Makefile139data/icons/scalable/status/Makefile
160data/icons/scalable/actions/Makefile
161po/Makefile.in140po/Makefile.in
162])141])
163142
@@ -167,7 +146,7 @@
167146
168AC_MSG_NOTICE([147AC_MSG_NOTICE([
169148
170SUS Indicator Configuration:149Me Indicator Configuration:
171150
172 Prefix: $prefix151 Prefix: $prefix
173])152])
174153
=== modified file 'data/Makefile.am'
--- data/Makefile.am 2009-09-02 14:17:44 +0000
+++ data/Makefile.am 2010-01-04 21:25:21 +0000
@@ -1,45 +1,16 @@
1SUBDIRS = icons1SUBDIRS = icons
22
3dbus_servicesdir = $(DBUSSERVICEDIR)3dbus_servicesdir = $(DBUSSERVICEDIR)
4service_in_files = indicator-status.service.in \4service_in_files = indicator-me.service.in
5 indicator-users.service.in \
6 indicator-session.service.in
7dbus_services_DATA = $(service_in_files:.service.in=.service)5dbus_services_DATA = $(service_in_files:.service.in=.service)
86
9%.service: %.service.in7%.service: %.service.in
10 sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@8 sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
119
12##############################
13# GConf Schema
14##############################
15
16schemadir = \
17 $(GCONF_SCHEMA_FILE_DIR)
18
19schema_in_files = \
20 indicator-session.schemas.in
21
22schema_DATA = \
23 $(schema_in_files:.schemas.in=.schemas)
24
25@INTLTOOL_SCHEMAS_RULE@
26
27
28#$(dbus_services_DATA): $(service_in_files) Makefile
29# sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
3010
31EXTRA_DIST = \11EXTRA_DIST = \
32 $(service_in_files) \12 $(service_in_files)
33 $(schema_in_files)
3413
35CLEANFILES = \14CLEANFILES = \
36 $(dbus_services_DATA) \15 $(dbus_services_DATA)
37 $(schema_DATA)
3816
39if GCONF_SCHEMAS_INSTALL
40install-data-local:
41 GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
42 gconftool-2 --makefile-install-rule $(schema_DATA)
43else
44install-data-local:
45endif
4617
=== modified file 'data/icons/16x16/Makefile.am'
--- data/icons/16x16/Makefile.am 2009-08-07 19:10:15 +0000
+++ data/icons/16x16/Makefile.am 2010-01-04 21:25:21 +0000
@@ -1,1 +1,1 @@
1SUBDIRS = status actions1SUBDIRS = status
22
=== removed directory 'data/icons/16x16/actions'
=== removed file 'data/icons/16x16/actions/Makefile.am'
--- data/icons/16x16/actions/Makefile.am 2009-10-06 22:51:09 +0000
+++ data/icons/16x16/actions/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1
2iconsdir = $(INDICATORICONSDIR)/hicolor/16x16/actions
3
4icons_DATA = \
5 system-shutdown-panel.png \
6 system-shutdown.png \
7 system-restart.png \
8 system-log-out.png
9
10EXTRA_DIST = $(icons_DATA)
110
=== removed file 'data/icons/16x16/actions/system-log-out.png'
12Binary files data/icons/16x16/actions/system-log-out.png 2009-08-07 19:10:15 +0000 and data/icons/16x16/actions/system-log-out.png 1970-01-01 00:00:00 +0000 differ1Binary files data/icons/16x16/actions/system-log-out.png 2009-08-07 19:10:15 +0000 and data/icons/16x16/actions/system-log-out.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/16x16/actions/system-restart.png'
13Binary files data/icons/16x16/actions/system-restart.png 2009-08-07 19:10:15 +0000 and data/icons/16x16/actions/system-restart.png 1970-01-01 00:00:00 +0000 differ2Binary files data/icons/16x16/actions/system-restart.png 2009-08-07 19:10:15 +0000 and data/icons/16x16/actions/system-restart.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/16x16/actions/system-shutdown-panel.png'
14Binary files data/icons/16x16/actions/system-shutdown-panel.png 2009-10-06 22:51:09 +0000 and data/icons/16x16/actions/system-shutdown-panel.png 1970-01-01 00:00:00 +0000 differ3Binary files data/icons/16x16/actions/system-shutdown-panel.png 2009-10-06 22:51:09 +0000 and data/icons/16x16/actions/system-shutdown-panel.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/16x16/actions/system-shutdown.png'
15Binary files data/icons/16x16/actions/system-shutdown.png 2009-08-07 19:10:15 +0000 and data/icons/16x16/actions/system-shutdown.png 1970-01-01 00:00:00 +0000 differ4Binary files data/icons/16x16/actions/system-shutdown.png 2009-08-07 19:10:15 +0000 and data/icons/16x16/actions/system-shutdown.png 1970-01-01 00:00:00 +0000 differ
=== modified file 'data/icons/16x16/status/user-invisible.png' (properties changed: +x to -x)
=== modified file 'data/icons/22x22/Makefile.am'
--- data/icons/22x22/Makefile.am 2009-08-07 19:10:15 +0000
+++ data/icons/22x22/Makefile.am 2010-01-04 21:25:21 +0000
@@ -1,1 +1,1 @@
1SUBDIRS = status actions1SUBDIRS = status
22
=== removed directory 'data/icons/22x22/actions'
=== removed file 'data/icons/22x22/actions/Makefile.am'
--- data/icons/22x22/actions/Makefile.am 2009-10-06 22:51:09 +0000
+++ data/icons/22x22/actions/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1
2iconsdir = $(INDICATORICONSDIR)/hicolor/22x22/actions
3
4icons_DATA = \
5 system-shutdown-panel.png \
6 system-shutdown.png \
7 system-restart.png \
8 system-log-out.png
9
10EXTRA_DIST = $(icons_DATA)
110
=== removed file 'data/icons/22x22/actions/system-log-out.png'
12Binary files data/icons/22x22/actions/system-log-out.png 2009-08-07 19:10:15 +0000 and data/icons/22x22/actions/system-log-out.png 1970-01-01 00:00:00 +0000 differ1Binary files data/icons/22x22/actions/system-log-out.png 2009-08-07 19:10:15 +0000 and data/icons/22x22/actions/system-log-out.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/22x22/actions/system-restart.png'
13Binary files data/icons/22x22/actions/system-restart.png 2009-08-07 19:10:15 +0000 and data/icons/22x22/actions/system-restart.png 1970-01-01 00:00:00 +0000 differ2Binary files data/icons/22x22/actions/system-restart.png 2009-08-07 19:10:15 +0000 and data/icons/22x22/actions/system-restart.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/22x22/actions/system-shutdown-panel.png'
14Binary files data/icons/22x22/actions/system-shutdown-panel.png 2009-10-06 22:51:09 +0000 and data/icons/22x22/actions/system-shutdown-panel.png 1970-01-01 00:00:00 +0000 differ3Binary files data/icons/22x22/actions/system-shutdown-panel.png 2009-10-06 22:51:09 +0000 and data/icons/22x22/actions/system-shutdown-panel.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/22x22/actions/system-shutdown.png'
15Binary files data/icons/22x22/actions/system-shutdown.png 2009-08-07 19:10:15 +0000 and data/icons/22x22/actions/system-shutdown.png 1970-01-01 00:00:00 +0000 differ4Binary files data/icons/22x22/actions/system-shutdown.png 2009-08-07 19:10:15 +0000 and data/icons/22x22/actions/system-shutdown.png 1970-01-01 00:00:00 +0000 differ
=== modified file 'data/icons/22x22/status/user-invisible.png' (properties changed: +x to -x)
=== modified file 'data/icons/24x24/Makefile.am'
--- data/icons/24x24/Makefile.am 2009-08-07 19:10:15 +0000
+++ data/icons/24x24/Makefile.am 2010-01-04 21:25:21 +0000
@@ -1,1 +1,1 @@
1SUBDIRS = status actions1SUBDIRS = status
22
=== removed directory 'data/icons/24x24/actions'
=== removed file 'data/icons/24x24/actions/Makefile.am'
--- data/icons/24x24/actions/Makefile.am 2009-10-06 22:51:09 +0000
+++ data/icons/24x24/actions/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1
2iconsdir = $(INDICATORICONSDIR)/hicolor/24x24/actions
3
4icons_DATA = \
5 system-shutdown-panel.png \
6 system-shutdown.png \
7 system-restart.png \
8 system-log-out.png
9
10EXTRA_DIST = $(icons_DATA)
110
=== removed file 'data/icons/24x24/actions/system-log-out.png'
12Binary files data/icons/24x24/actions/system-log-out.png 2009-08-07 19:10:15 +0000 and data/icons/24x24/actions/system-log-out.png 1970-01-01 00:00:00 +0000 differ1Binary files data/icons/24x24/actions/system-log-out.png 2009-08-07 19:10:15 +0000 and data/icons/24x24/actions/system-log-out.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/24x24/actions/system-restart.png'
13Binary files data/icons/24x24/actions/system-restart.png 2009-08-07 19:10:15 +0000 and data/icons/24x24/actions/system-restart.png 1970-01-01 00:00:00 +0000 differ2Binary files data/icons/24x24/actions/system-restart.png 2009-08-07 19:10:15 +0000 and data/icons/24x24/actions/system-restart.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/24x24/actions/system-shutdown-panel.png'
14Binary files data/icons/24x24/actions/system-shutdown-panel.png 2009-10-06 22:51:09 +0000 and data/icons/24x24/actions/system-shutdown-panel.png 1970-01-01 00:00:00 +0000 differ3Binary files data/icons/24x24/actions/system-shutdown-panel.png 2009-10-06 22:51:09 +0000 and data/icons/24x24/actions/system-shutdown-panel.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/24x24/actions/system-shutdown.png'
15Binary files data/icons/24x24/actions/system-shutdown.png 2009-08-07 19:10:15 +0000 and data/icons/24x24/actions/system-shutdown.png 1970-01-01 00:00:00 +0000 differ4Binary files data/icons/24x24/actions/system-shutdown.png 2009-08-07 19:10:15 +0000 and data/icons/24x24/actions/system-shutdown.png 1970-01-01 00:00:00 +0000 differ
=== modified file 'data/icons/24x24/status/user-invisible.png' (properties changed: +x to -x)
=== modified file 'data/icons/32x32/Makefile.am'
--- data/icons/32x32/Makefile.am 2009-08-07 19:10:15 +0000
+++ data/icons/32x32/Makefile.am 2010-01-04 21:25:21 +0000
@@ -1,1 +1,1 @@
1SUBDIRS = status actions1SUBDIRS = status
22
=== removed directory 'data/icons/32x32/actions'
=== removed file 'data/icons/32x32/actions/Makefile.am'
--- data/icons/32x32/actions/Makefile.am 2009-08-13 04:47:41 +0000
+++ data/icons/32x32/actions/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1
2iconsdir = $(INDICATORICONSDIR)/hicolor/32x32/actions
3
4icons_DATA = \
5 system-restart.png \
6 system-log-out.png
7
8EXTRA_DIST = $(icons_DATA)
90
=== removed file 'data/icons/32x32/actions/system-log-out.png'
10Binary files data/icons/32x32/actions/system-log-out.png 2009-08-07 19:10:15 +0000 and data/icons/32x32/actions/system-log-out.png 1970-01-01 00:00:00 +0000 differ1Binary files data/icons/32x32/actions/system-log-out.png 2009-08-07 19:10:15 +0000 and data/icons/32x32/actions/system-log-out.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/32x32/actions/system-restart.png'
11Binary files data/icons/32x32/actions/system-restart.png 2009-08-07 19:10:15 +0000 and data/icons/32x32/actions/system-restart.png 1970-01-01 00:00:00 +0000 differ2Binary files data/icons/32x32/actions/system-restart.png 2009-08-07 19:10:15 +0000 and data/icons/32x32/actions/system-restart.png 1970-01-01 00:00:00 +0000 differ
=== modified file 'data/icons/32x32/status/user-invisible.png' (properties changed: +x to -x)
=== modified file 'data/icons/48x48/status/user-invisible.png' (properties changed: +x to -x)
=== modified file 'data/icons/scalable/Makefile.am'
--- data/icons/scalable/Makefile.am 2009-08-07 19:10:15 +0000
+++ data/icons/scalable/Makefile.am 2010-01-04 21:25:21 +0000
@@ -1,1 +1,1 @@
1SUBDIRS = status actions1SUBDIRS = status
22
=== removed directory 'data/icons/scalable/actions'
=== removed file 'data/icons/scalable/actions/Makefile.am'
--- data/icons/scalable/actions/Makefile.am 2009-10-06 22:51:09 +0000
+++ data/icons/scalable/actions/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1
2iconsdir = $(INDICATORICONSDIR)/hicolor/scalable/actions
3
4icons_DATA = \
5 system-shutdown-panel.svg \
6 system-restart.svg \
7 system-log-out.svg \
8 system-shutdown.svg
9
10EXTRA_DIST = $(icons_DATA)
110
=== removed file 'data/icons/scalable/actions/system-log-out.svg'
--- data/icons/scalable/actions/system-log-out.svg 2009-08-07 19:10:15 +0000
+++ data/icons/scalable/actions/system-log-out.svg 1970-01-01 00:00:00 +0000
@@ -1,284 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://web.resource.org/cc/"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="48"
13 height="48"
14 id="svg5157"
15 sodipodi:version="0.32"
16 inkscape:version="0.45"
17 version="1.0"
18 sodipodi:docname="system-log-out.svg"
19 sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/actions"
20 inkscape:output_extension="org.inkscape.output.svg.inkscape">
21 <defs
22 id="defs5159">
23 <linearGradient
24 inkscape:collect="always"
25 id="linearGradient7130">
26 <stop
27 style="stop-color:#4e9a06;stop-opacity:1"
28 offset="0"
29 id="stop7132" />
30 <stop
31 style="stop-color:#73d216;stop-opacity:1"
32 offset="1"
33 id="stop7134" />
34 </linearGradient>
35 <linearGradient
36 id="linearGradient7121">
37 <stop
38 style="stop-color:#ffffff;stop-opacity:1;"
39 offset="0"
40 id="stop7123" />
41 <stop
42 style="stop-color:#8ae234;stop-opacity:1"
43 offset="1"
44 id="stop7125" />
45 </linearGradient>
46 <linearGradient
47 id="linearGradient6998"
48 inkscape:collect="always">
49 <stop
50 id="stop7000"
51 offset="0"
52 style="stop-color:#000000;stop-opacity:1;" />
53 <stop
54 id="stop7002"
55 offset="1"
56 style="stop-color:#000000;stop-opacity:0;" />
57 </linearGradient>
58 <linearGradient
59 inkscape:collect="always"
60 xlink:href="#linearGradient7130"
61 id="linearGradient7145"
62 gradientUnits="userSpaceOnUse"
63 x1="11.5"
64 y1="68.75"
65 x2="-13.247213"
66 y2="21.843145" />
67 <linearGradient
68 inkscape:collect="always"
69 xlink:href="#linearGradient7121"
70 id="linearGradient7147"
71 gradientUnits="userSpaceOnUse"
72 x1="-33.040741"
73 y1="10.966461"
74 x2="-30.919424"
75 y2="17.448257" />
76 <radialGradient
77 inkscape:collect="always"
78 xlink:href="#linearGradient6998"
79 id="radialGradient7161"
80 gradientUnits="userSpaceOnUse"
81 gradientTransform="matrix(1,0,0,0.3222749,0,20.728756)"
82 cx="19.688505"
83 cy="30.585787"
84 fx="19.688505"
85 fy="30.585787"
86 r="4.6624851" />
87 <radialGradient
88 inkscape:collect="always"
89 xlink:href="#linearGradient6998"
90 id="radialGradient7163"
91 gradientUnits="userSpaceOnUse"
92 gradientTransform="matrix(1,0,0,0.3222749,0,20.728756)"
93 cx="19.688505"
94 cy="30.585787"
95 fx="19.688505"
96 fy="30.585787"
97 r="4.6624851" />
98 </defs>
99 <sodipodi:namedview
100 id="base"
101 pagecolor="#ffffff"
102 bordercolor="#666666"
103 borderopacity="1.0"
104 gridtolerance="10000"
105 guidetolerance="10"
106 objecttolerance="10"
107 inkscape:pageopacity="0.0"
108 inkscape:pageshadow="2"
109 inkscape:zoom="1"
110 inkscape:cx="197.95843"
111 inkscape:cy="28.49025"
112 inkscape:document-units="px"
113 inkscape:current-layer="layer2"
114 width="48px"
115 height="48px"
116 inkscape:window-width="872"
117 inkscape:window-height="624"
118 inkscape:window-x="684"
119 inkscape:window-y="208"
120 showborder="false"
121 inkscape:showpageshadow="false"
122 showgrid="false"
123 showguides="true"
124 inkscape:guide-bbox="true"
125 gridspacingx="0.5px"
126 gridspacingy="0.5px"
127 gridempspacing="2"
128 inkscape:grid-points="true" />
129 <metadata
130 id="metadata5162">
131 <rdf:RDF>
132 <cc:Work
133 rdf:about="">
134 <dc:format>image/svg+xml</dc:format>
135 <dc:type
136 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
137 <dc:title>System-log-out</dc:title>
138 <dc:date>2007-08-27</dc:date>
139 <dc:creator>
140 <cc:Agent>
141 <dc:title>Lapo Calamandrei</dc:title>
142 </cc:Agent>
143 </dc:creator>
144 <dc:source />
145 <cc:license
146 rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
147 <dc:contributor>
148 <cc:Agent>
149 <dc:title>Kalle Persson</dc:title>
150 </cc:Agent>
151 </dc:contributor>
152 <dc:subject>
153 <rdf:Bag>
154 <rdf:li>logout</rdf:li>
155 <rdf:li>exit</rdf:li>
156 <rdf:li>man</rdf:li>
157 <rdf:li>sign</rdf:li>
158 <rdf:li>running</rdf:li>
159 </rdf:Bag>
160 </dc:subject>
161 </cc:Work>
162 <cc:License
163 rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
164 <cc:permits
165 rdf:resource="http://web.resource.org/cc/Reproduction" />
166 <cc:permits
167 rdf:resource="http://web.resource.org/cc/Distribution" />
168 <cc:requires
169 rdf:resource="http://web.resource.org/cc/Notice" />
170 <cc:permits
171 rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
172 <cc:requires
173 rdf:resource="http://web.resource.org/cc/ShareAlike" />
174 <cc:requires
175 rdf:resource="http://web.resource.org/cc/SourceCode" />
176 </cc:License>
177 </rdf:RDF>
178 </metadata>
179 <g
180 inkscape:label="shadow"
181 inkscape:groupmode="layer"
182 id="layer1"
183 style="display:inline">
184 <g
185 id="g6227"
186 transform="matrix(0.6759778,0,0,0.8422279,-72.059226,25.879981)"
187 style="opacity:0.33000004" />
188 <g
189 id="g7008"
190 style="opacity:0.5"
191 transform="matrix(1.2209709,0,0,1.465165,4.32932,-3.7089664)">
192 <path
193 transform="matrix(1.356682,0,0,1.1785115,-7.0105312,-5.8165354)"
194 d="M 24.35099 30.585787 A 4.6624851 1.5026019 0 1 1 15.02602,30.585787 A 4.6624851 1.5026019 0 1 1 24.35099 30.585787 z"
195 sodipodi:ry="1.5026019"
196 sodipodi:rx="4.6624851"
197 sodipodi:cy="30.585787"
198 sodipodi:cx="19.688505"
199 id="path6984"
200 style="opacity:0.5;fill:url(#radialGradient7161);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.69999992;stroke-opacity:1"
201 sodipodi:type="arc" />
202 <path
203 transform="matrix(3.7061179,0,0,1.3310245,-58.247641,-11.710432)"
204 d="M 24.35099 30.585787 A 4.6624851 1.5026019 0 1 1 15.02602,30.585787 A 4.6624851 1.5026019 0 1 1 24.35099 30.585787 z"
205 sodipodi:ry="1.5026019"
206 sodipodi:rx="4.6624851"
207 sodipodi:cy="30.585787"
208 sodipodi:cx="19.688505"
209 id="path6986"
210 style="opacity:0.25;fill:url(#radialGradient7163);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.69999992;stroke-opacity:1"
211 sodipodi:type="arc" />
212 </g>
213 </g>
214 <g
215 inkscape:groupmode="layer"
216 id="layer2"
217 inkscape:label="omino">
218 <g
219 id="g7138"
220 transform="translate(40,0)">
221 <g
222 id="g7094">
223 <path
224 id="path5955"
225 d="M -7.5,5.5 C -9.708,5.5 -11.5,7.292 -11.5,9.5 C -11.5,11.708 -9.7080001,13.5 -7.5,13.5 C -5.292,13.5 -3.5000001,11.708 -3.5,9.5 C -3.5,7.292 -5.2920001,5.5 -7.5,5.5 z M -20.6875,11.5 C -21.228728,11.552698 -21.725172,11.823486 -22.0625,12.25 L -26.0625,17.25 C -26.752856,18.112945 -26.612945,19.372144 -25.75,20.0625 C -24.887055,20.752856 -23.627856,20.612945 -22.9375,19.75 L -19.53125,15.5 L -15.75,15.5 L -22.1875,23.3125 C -22.420945,23.645583 -22.50685,24.06221 -22.5,24.5 L -22.5,31.5 L -30.5,31.5 L -30.5,35.5 L -20.5,35.5 C -19.395476,35.49989 -18.50011,34.604524 -18.5,33.5 L -18.5,27.3125 L -13.5,32.3125 L -13.5,40.5 L -9.5,40.5 L -9.5,31.5 L -9.5,30.65625 L -10.09375,30.09375 L -14.84375,25.34375 L -11.5,21.28125 L -11.5,22.5 C -11.49989,23.604524 -10.604524,24.49989 -9.5,24.5 L -2.5,24.5 C -1.778728,24.510201 -1.113613,24.122995 -0.75,23.5 C -0.386387,22.877006 -0.386387,22.122995 -0.75,21.5 C -1.113613,20.877004 -1.778728,20.489799 -2.5,20.5 L -7.5,20.5 L -7.5,16 C -10.390638,16 -12.843604,14.110886 -13.6875,11.5 L -20.5,11.5 C -20.562466,11.497069 -20.625034,11.497069 -20.6875,11.5 z "
226 style="opacity:1;fill:url(#linearGradient7145);fill-opacity:1;fill-rule:evenodd;stroke:#4e9a06;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" />
227 </g>
228 <path
229 d="M -20.625,12.5 C -20.883516,12.532601 -21.119099,12.669978 -21.28125,12.875 L -25.28125,17.875 C -25.632167,18.313646 -25.563646,18.930333 -25.125,19.28125 C -24.686354,19.632167 -24.069667,19.563646 -23.71875,19.125 L -20.3125,14.875 C -20.122073,14.638438 -19.834933,14.500611 -19.53125,14.5 L -15.75,14.5 C -15.36741,14.504084 -15.020291,14.724946 -14.854508,15.069775 C -14.688724,15.414605 -14.733008,15.823641 -14.96875,16.125 L -21.375,23.875 C -21.378721,23.880309 -21.37135,23.900494 -21.375,23.90625 L -21.40625,23.9375 C -21.46879,24.048638 -21.50412,24.205427 -21.5,24.46875 C -21.499838,24.479166 -21.499838,24.489584 -21.5,24.5 L -21.5,31.5 C -21.503016,32.051031 -21.948969,32.496984 -22.5,32.5 L -29.5,32.5 L -29.5,34.5 L -20.5,34.5 C -19.938773,34.499944 -19.500056,34.061227 -19.5,33.5 L -19.5,27.3125 C -19.504078,26.903415 -19.259899,26.532643 -18.882467,26.374807 C -18.505035,26.216972 -18.069603,26.303544 -17.78125,26.59375 L -12.78125,31.59375 C -12.595622,31.786381 -12.494406,32.045043 -12.5,32.3125 L -12.5,39.5 L -10.5,39.5 L -10.5,31.5 L -10.5,31.09375 L -10.78125,30.8125 C -10.791666,30.812662 -10.802084,30.812662 -10.8125,30.8125 L -15.5625,26.0625 C -15.923992,25.696513 -15.95096,25.116711 -15.625,24.71875 L -12.28125,20.65625 C -12.013038,20.330928 -11.570348,20.207488 -11.172497,20.347084 C -10.774646,20.486681 -10.506139,20.859664 -10.5,21.28125 L -10.5,22.5 C -10.499944,23.061227 -10.061227,23.499944 -9.5,23.5 L -2.5,23.5 C -2.1471898,23.50499 -1.8109749,23.318639 -1.625,23 C -1.439414,22.682027 -1.4394134,22.317974 -1.625,22 C -1.8109749,21.68136 -2.1471889,21.49501 -2.5,21.5 L -7.5,21.5 C -8.0510308,21.496984 -8.4969843,21.051031 -8.5,20.5 L -8.5,16.84375 C -11.109944,16.483168 -13.278833,14.83457 -14.3125,12.5 L -20.5,12.5 C -20.520828,12.500648 -20.541672,12.500648 -20.5625,12.5 C -20.578034,12.499271 -20.578204,12.5 -20.59375,12.5 C -20.609296,12.5 -20.609466,12.499271 -20.625,12.5 z "
230 id="path7104"
231 style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#8ae234;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
232 inkscape:original="M -20.6875 11.5 C -21.228728 11.552698 -21.725172 11.823486 -22.0625 12.25 L -26.0625 17.25 C -26.752856 18.112945 -26.612945 19.372144 -25.75 20.0625 C -24.887055 20.752856 -23.627856 20.612945 -22.9375 19.75 L -19.53125 15.5 L -15.75 15.5 L -22.1875 23.3125 C -22.420945 23.645583 -22.50685 24.06221 -22.5 24.5 L -22.5 31.5 L -30.5 31.5 L -30.5 35.5 L -20.5 35.5 C -19.395476 35.49989 -18.50011 34.604524 -18.5 33.5 L -18.5 27.3125 L -13.5 32.3125 L -13.5 40.5 L -9.5 40.5 L -9.5 31.5 L -9.5 30.65625 L -10.09375 30.09375 L -14.84375 25.34375 L -11.5 21.28125 L -11.5 22.5 C -11.49989 23.604524 -10.604524 24.49989 -9.5 24.5 L -2.5 24.5 C -1.778728 24.510201 -1.113613 24.122995 -0.75 23.5 C -0.386387 22.877006 -0.386387 22.122995 -0.75 21.5 C -1.113613 20.877004 -1.778728 20.489799 -2.5 20.5 L -7.5 20.5 L -7.5 16 C -10.390638 16 -12.843604 14.110886 -13.6875 11.5 L -20.5 11.5 C -20.562466 11.497069 -20.625034 11.497069 -20.6875 11.5 z "
233 inkscape:radius="-1.0054175"
234 sodipodi:type="inkscape:offset" />
235 <path
236 sodipodi:nodetypes="cccccccsscccscccccccccccccsccccc"
237 id="path7106"
238 d="M -1.625,22 C -1.810975,21.68136 -2.147189,21.49501 -2.5,21.5 L -7.5,21.5 C -8.051031,21.496984 -8.496984,21.051031 -8.5,20.5 L -8.5,16.84375 C -11.109944,16.483168 -13.278833,14.83457 -14.3125,12.5 L -20.5,12.5 C -20.520828,12.500648 -20.541672,12.500648 -20.5625,12.5 C -20.578034,12.499271 -20.578204,12.5 -20.59375,12.5 C -20.609296,12.5 -20.609466,12.499271 -20.625,12.5 C -20.883516,12.532601 -21.119099,12.669978 -21.28125,12.875 L -25.28125,17.875 C -25.632167,18.313646 -25.563646,18.930333 -25.125,19.28125 M -10.5,31.5 L -10.5,31.09375 L -10.78125,30.8125 C -10.791666,30.812662 -10.802084,30.812662 -10.8125,30.8125 L -15.5625,26.0625 C -15.923992,25.696513 -15.95096,25.116711 -15.625,24.71875 M -12.5,32.3125 L -12.5,39.5 M -14.854508,15.069775 C -14.688724,15.414605 -14.733008,15.823641 -14.96875,16.125 L -21.375,23.875 C -21.378721,23.880309 -21.37135,23.900494 -21.375,23.90625 L -21.40625,23.9375 C -21.46879,24.048638 -21.50412,24.205427 -21.5,24.46875 C -21.499838,24.479166 -21.499838,24.489584 -21.5,24.5 L -21.5,31.5 C -21.503016,32.051031 -21.948969,32.496984 -22.5,32.5 L -29.5,32.5 L -29.5,34.5"
239 style="opacity:0.3;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;display:inline" />
240 <path
241 inkscape:export-ydpi="90"
242 inkscape:export-xdpi="90"
243 inkscape:export-filename="/home/kalle/Desktop/system-log-out.png"
244 sodipodi:type="arc"
245 style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient7147);stroke-width:0.6666649;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
246 id="path7119"
247 sodipodi:cx="-31.5"
248 sodipodi:cy="16"
249 sodipodi:rx="2"
250 sodipodi:ry="2"
251 d="M -29.5 16 A 2 2 0 1 1 -33.5,16 A 2 2 0 1 1 -29.5 16 z"
252 transform="matrix(1.500004,0,0,1.500004,39.750134,-14.500064)" />
253 </g>
254 <g
255 id="g7055"
256 transform="translate(130,0)">
257 <path
258 sodipodi:nodetypes="ccc"
259 id="path7045"
260 d="M -28.5,33.5 L -20.5,33.5 L -20.5,24.5"
261 style="opacity:0.4089219;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" />
262 <path
263 sodipodi:nodetypes="ccc"
264 id="path7047"
265 d="M -24.5,18.5 L -20.5,13.5 L -11.5,13.5"
266 style="opacity:0.5;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
267 <path
268 sodipodi:nodetypes="ccc"
269 id="path7049"
270 d="M -2.5,22.5 L -9.5,22.5 L -9.5,13.5"
271 style="opacity:0.5;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
272 <path
273 sodipodi:nodetypes="ccc"
274 id="path7051"
275 d="M -11.5,38.5 L -11.5,31.5 L -18.5,24.5"
276 style="opacity:0.5;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
277 <path
278 sodipodi:nodetypes="cc"
279 id="path7053"
280 d="M -10,14 L -19.5,25.5"
281 style="opacity:0.5;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:7;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
282 </g>
283 </g>
284</svg>
2850
=== removed file 'data/icons/scalable/actions/system-restart.svg'
--- data/icons/scalable/actions/system-restart.svg 2009-08-07 19:10:15 +0000
+++ data/icons/scalable/actions/system-restart.svg 1970-01-01 00:00:00 +0000
@@ -1,397 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://web.resource.org/cc/"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 inkscape:export-ydpi="90.000000"
13 inkscape:export-xdpi="90.000000"
14 inkscape:export-filename="c:\Tango\git\view-refresh.png"
15 width="48"
16 height="48"
17 id="svg11300"
18 sodipodi:version="0.32"
19 inkscape:version="0.45"
20 sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/actions"
21 sodipodi:docname="view-refresh.svg"
22 version="1.0"
23 inkscape:r_cx="true"
24 inkscape:r_cy="true"
25 inkscape:output_extension="org.inkscape.output.svg.inkscape">
26 <defs
27 id="defs3">
28 <linearGradient
29 inkscape:collect="always"
30 id="linearGradient5335">
31 <stop
32 style="stop-color:#ffffff;stop-opacity:1;"
33 offset="0"
34 id="stop5337" />
35 <stop
36 style="stop-color:#ffffff;stop-opacity:0;"
37 offset="1"
38 id="stop5339" />
39 </linearGradient>
40 <linearGradient
41 id="linearGradient5313">
42 <stop
43 id="stop5315"
44 offset="0"
45 style="stop-color:#99b8df;stop-opacity:1" />
46 <stop
47 style="stop-color:#3969a8;stop-opacity:1;"
48 offset="0.23705086"
49 id="stop5333" />
50 <stop
51 style="stop-color:#4f7eba;stop-opacity:1;"
52 offset="0.54706067"
53 id="stop5317" />
54 <stop
55 id="stop5321"
56 offset="0.74557692"
57 style="stop-color:#96b6d7;stop-opacity:1" />
58 <stop
59 style="stop-color:#a0bddc;stop-opacity:1"
60 offset="0.87321436"
61 id="stop5331" />
62 <stop
63 id="stop5319"
64 offset="1"
65 style="stop-color:#729fcf;stop-opacity:1;" />
66 </linearGradient>
67 <linearGradient
68 id="linearGradient8152">
69 <stop
70 style="stop-color:#3465a4;stop-opacity:1;"
71 offset="0"
72 id="stop8154" />
73 <stop
74 id="stop3174"
75 offset="0.5"
76 style="stop-color:#4f7eba;stop-opacity:1;" />
77 <stop
78 style="stop-color:#729fcf;stop-opacity:1;"
79 offset="1"
80 id="stop8156" />
81 </linearGradient>
82 <linearGradient
83 id="linearGradient3207">
84 <stop
85 style="stop-color:#eeeeec;stop-opacity:0.47058824;"
86 offset="0"
87 id="stop3209" />
88 <stop
89 style="stop-color:#eeeeec;stop-opacity:0;"
90 offset="1"
91 id="stop3211" />
92 </linearGradient>
93 <linearGradient
94 inkscape:collect="always"
95 id="linearGradient2847">
96 <stop
97 style="stop-color:#3465a4;stop-opacity:1;"
98 offset="0"
99 id="stop2849" />
100 <stop
101 style="stop-color:#3465a4;stop-opacity:0;"
102 offset="1"
103 id="stop2851" />
104 </linearGradient>
105 <linearGradient
106 id="linearGradient2831">
107 <stop
108 style="stop-color:#3465a4;stop-opacity:1;"
109 offset="0"
110 id="stop2833" />
111 <stop
112 id="stop2855"
113 offset="0.33333334"
114 style="stop-color:#5b86be;stop-opacity:1;" />
115 <stop
116 style="stop-color:#83a8d8;stop-opacity:0;"
117 offset="1"
118 id="stop2835" />
119 </linearGradient>
120 <linearGradient
121 inkscape:collect="always"
122 id="linearGradient8662">
123 <stop
124 style="stop-color:#000000;stop-opacity:1;"
125 offset="0"
126 id="stop8664" />
127 <stop
128 style="stop-color:#000000;stop-opacity:0;"
129 offset="1"
130 id="stop8666" />
131 </linearGradient>
132 <linearGradient
133 inkscape:collect="always"
134 xlink:href="#linearGradient2831"
135 id="linearGradient1486"
136 gradientUnits="userSpaceOnUse"
137 gradientTransform="matrix(1.0818662,0,0,1.1166851,-0.8207482,-1.8622434)"
138 x1="13.478554"
139 y1="10.612206"
140 x2="15.419417"
141 y2="19.115122" />
142 <linearGradient
143 inkscape:collect="always"
144 xlink:href="#linearGradient2847"
145 id="linearGradient1488"
146 gradientUnits="userSpaceOnUse"
147 gradientTransform="matrix(-1.0818662,0,0,-1.1166851,50.09459,49.644854)"
148 x1="37.128052"
149 y1="29.729605"
150 x2="37.40255"
151 y2="26.800913" />
152 <radialGradient
153 inkscape:collect="always"
154 xlink:href="#linearGradient8662"
155 id="radialGradient1503"
156 gradientUnits="userSpaceOnUse"
157 gradientTransform="matrix(1,0,0,0.536723,0,16.87306)"
158 cx="24.837126"
159 cy="36.421127"
160 fx="24.837126"
161 fy="36.421127"
162 r="15.644737" />
163 <linearGradient
164 inkscape:collect="always"
165 xlink:href="#linearGradient8152"
166 id="linearGradient8158"
167 x1="49.412277"
168 y1="37.904068"
169 x2="11.881318"
170 y2="19.776045"
171 gradientUnits="userSpaceOnUse" />
172 <linearGradient
173 inkscape:collect="always"
174 xlink:href="#linearGradient2831"
175 id="linearGradient8170"
176 gradientUnits="userSpaceOnUse"
177 gradientTransform="matrix(-1.0818662,0,0,-1.1166851,48.639854,47.862243)"
178 x1="13.478554"
179 y1="10.612206"
180 x2="15.419417"
181 y2="19.115122" />
182 <linearGradient
183 inkscape:collect="always"
184 xlink:href="#linearGradient2847"
185 id="linearGradient8172"
186 gradientUnits="userSpaceOnUse"
187 gradientTransform="matrix(1.0818662,0,0,1.1166851,-2.2754847,-3.644854)"
188 x1="37.128052"
189 y1="29.729605"
190 x2="37.40255"
191 y2="26.800913" />
192 <linearGradient
193 inkscape:collect="always"
194 xlink:href="#linearGradient8152"
195 id="linearGradient8174"
196 gradientUnits="userSpaceOnUse"
197 x1="49.412277"
198 y1="37.904068"
199 x2="11.881318"
200 y2="19.776045" />
201 <linearGradient
202 inkscape:collect="always"
203 xlink:href="#linearGradient3207"
204 id="linearGradient8178"
205 gradientUnits="userSpaceOnUse"
206 x1="5.8925977"
207 y1="20.540676"
208 x2="45.198921"
209 y2="27.721035" />
210 <linearGradient
211 inkscape:collect="always"
212 xlink:href="#linearGradient5313"
213 id="linearGradient8180"
214 gradientUnits="userSpaceOnUse"
215 x1="61.572533"
216 y1="28.049652"
217 x2="10.969182"
218 y2="20.333939" />
219 <linearGradient
220 inkscape:collect="always"
221 xlink:href="#linearGradient5335"
222 id="linearGradient5341"
223 x1="8.6878577"
224 y1="25.265626"
225 x2="52.122673"
226 y2="25.265626"
227 gradientUnits="userSpaceOnUse" />
228 </defs>
229 <sodipodi:namedview
230 stroke="#3465a4"
231 fill="#729fcf"
232 id="base"
233 pagecolor="#ffffff"
234 bordercolor="#e8e8e8"
235 borderopacity="0.86666667"
236 inkscape:pageopacity="0.0"
237 inkscape:pageshadow="2"
238 inkscape:zoom="1"
239 inkscape:cx="48.628749"
240 inkscape:cy="21.704614"
241 inkscape:current-layer="layer1"
242 showgrid="true"
243 inkscape:grid-bbox="true"
244 inkscape:document-units="px"
245 inkscape:showpageshadow="false"
246 inkscape:window-width="892"
247 inkscape:window-height="938"
248 inkscape:window-x="374"
249 inkscape:window-y="37"
250 width="48px"
251 height="48px"
252 borderlayer="true" />
253 <metadata
254 id="metadata4">
255 <rdf:RDF>
256 <cc:Work
257 rdf:about="">
258 <dc:format>image/svg+xml</dc:format>
259 <dc:type
260 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
261 <dc:creator>
262 <cc:Agent>
263 <dc:title>Jakub Steiner</dc:title>
264 </cc:Agent>
265 </dc:creator>
266 <dc:source>http://jimmac.musichall.cz</dc:source>
267 <cc:license
268 rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
269 <dc:title>View Refresh</dc:title>
270 <dc:subject>
271 <rdf:Bag>
272 <rdf:li>reload</rdf:li>
273 <rdf:li>refresh</rdf:li>
274 <rdf:li>view</rdf:li>
275 </rdf:Bag>
276 </dc:subject>
277 <dc:contributor>
278 <cc:Agent>
279 <dc:title>Ricardo 'Rick' González</dc:title>
280 </cc:Agent>
281 </dc:contributor>
282 </cc:Work>
283 <cc:License
284 rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
285 <cc:permits
286 rdf:resource="http://web.resource.org/cc/Reproduction" />
287 <cc:permits
288 rdf:resource="http://web.resource.org/cc/Distribution" />
289 <cc:requires
290 rdf:resource="http://web.resource.org/cc/Notice" />
291 <cc:permits
292 rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
293 <cc:requires
294 rdf:resource="http://web.resource.org/cc/ShareAlike" />
295 <cc:requires
296 rdf:resource="http://web.resource.org/cc/SourceCode" />
297 </cc:License>
298 </rdf:RDF>
299 </metadata>
300 <g
301 id="layer1"
302 inkscape:label="Layer 1"
303 inkscape:groupmode="layer"
304 inkscape:r_cx="true"
305 inkscape:r_cy="true">
306 <path
307 transform="matrix(-1.5146484,0,0,-0.7917058,60.923237,69.528413)"
308 d="M 40.481863 36.421127 A 15.644737 8.3968935 0 1 1 9.1923885,36.421127 A 15.644737 8.3968935 0 1 1 40.481863 36.421127 z"
309 sodipodi:ry="8.3968935"
310 sodipodi:rx="15.644737"
311 sodipodi:cy="36.421127"
312 sodipodi:cx="24.837126"
313 id="path8660"
314 style="opacity:0.36111109;color:#000000;fill:url(#radialGradient1503);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
315 sodipodi:type="arc"
316 inkscape:r_cx="true"
317 inkscape:r_cy="true" />
318 <path
319 style="color:#000000;fill:url(#linearGradient1486);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient1488);stroke-width:1.04300582000000008;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible;opacity:0.51807229"
320 d="M 20.478497,9.7711467 C 20.478497,9.7711467 12.632988,7.9438002 14.368023,21.024298 L 5.1028658,21.024298 C 5.1028658,21.024298 6.0085332,7.5377773 20.478497,9.7711467 z "
321 id="path2865"
322 inkscape:r_cx="true"
323 inkscape:r_cy="true"
324 sodipodi:nodetypes="cccc" />
325 <g
326 id="g1878"
327 transform="matrix(-0.6129282,-0.5154381,-0.5178496,0.610074,58.686164,13.911361)"
328 inkscape:r_cx="true"
329 inkscape:r_cy="true"
330 style="fill:url(#linearGradient8158);fill-opacity:1;stroke:#204a87;stroke-width:1.24932528;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
331 <path
332 sodipodi:nodetypes="ccccccc"
333 id="path1880"
334 d="M 45.862102,50.273522 C 62.924432,34.96305 47.150241,15.929711 22.760624,12.513943 L 22.113577,3.1522143 L 7.613534,20.510135 L 22.703188,33.23244 C 22.703188,33.23244 22.454828,23.347105 22.454828,23.347105 C 41.289895,24.339584 54.775794,35.675041 45.862102,50.273522 z "
335 style="opacity:1;color:#000000;fill:url(#linearGradient8180);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:1.24977946000000006;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
336 inkscape:r_cx="true"
337 inkscape:r_cy="true" />
338 </g>
339 <g
340 style="fill:none;fill-opacity:1;stroke:url(#linearGradient5341);stroke-width:1.24928653000000001;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;opacity:0.54819277"
341 inkscape:r_cy="true"
342 inkscape:r_cx="true"
343 transform="matrix(-0.612811,-0.5154406,-0.5177506,0.6100769,58.675633,13.911365)"
344 id="g3185">
345 <path
346 sodipodi:type="inkscape:offset"
347 inkscape:radius="-1.197237"
348 inkscape:original="M 22.125 3.15625 L 7.625 20.5 L 22.71875 33.21875 C 22.718749 33.21875 22.46875 23.34375 22.46875 23.34375 C 41.298509 24.342727 54.468144 35.661007 45.5625 50.25 C 62.614067 34.952315 46.852277 15.923275 22.46875 12.5 L 22.125 3.15625 z "
349 style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient5341);stroke-width:1.24928653000000001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
350 id="path3189"
351 d="M 21.0625,6.3125 L 9.3125,20.34375 L 21.46875,30.59375 C 21.39688,27.754893 21.28125,23.375 21.28125,23.375 C 21.27502,23.044409 21.405774,22.725958 21.642519,22.495132 C 21.879264,22.264306 22.200923,22.141654 22.53125,22.15625 C 32.170255,22.667629 40.441027,25.773015 45.28125,30.875 C 48.676469,34.453835 50.102049,39.131532 49.125,44.21875 C 50.368339,42.205641 51.107893,40.194594 51.375,38.21875 C 51.870422,34.55401 50.856988,30.946652 48.5625,27.59375 C 43.973525,20.887947 34.236978,15.361613 22.3125,13.6875 C 21.732114,13.606381 21.295727,13.117098 21.28125,12.53125 L 21.0625,6.3125 z "
352 transform="translate(1.0080026e-6,8.5223784e-7)" />
353 </g>
354 <g
355 id="g2424"
356 transform="matrix(0.190868,0.16126,0.16126,-0.190868,-0.719083,15.30613)"
357 inkscape:r_cx="true"
358 inkscape:r_cy="true"
359 style="opacity:0.5;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" />
360 <path
361 sodipodi:nodetypes="cccc"
362 inkscape:r_cy="true"
363 inkscape:r_cx="true"
364 id="path8160"
365 d="M 27.340608,36.228853 C 27.340608,36.228853 35.186117,38.0562 33.451082,24.975702 L 42.71624,24.975702 C 42.71624,24.975702 41.810572,38.462223 27.340608,36.228853 z "
366 style="color:#000000;fill:url(#linearGradient8170);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient8172);stroke-width:1.04300582000000008;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible;opacity:0.51807229" />
367 <g
368 style="fill:url(#linearGradient8174);fill-opacity:1;stroke:#204a87;stroke-width:1.24932528;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
369 inkscape:r_cy="true"
370 inkscape:r_cx="true"
371 transform="matrix(0.6101332,0.5154999,0.5154881,-0.6101471,-10.618024,32.088556)"
372 id="g8162">
373 <path
374 inkscape:r_cy="true"
375 inkscape:r_cx="true"
376 style="opacity:1;color:#000000;fill:url(#linearGradient8180);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:1.25256376;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible;enable-background:accumulate"
377 d="M 45.862102,50.273522 C 62.924432,34.96305 47.150241,15.929711 22.760624,12.513943 L 22.113577,3.1522141 L 7.6135337,20.510135 L 22.703188,33.23244 C 22.703188,33.23244 22.454828,23.347105 22.454828,23.347105 C 41.289895,24.339584 54.775794,35.675041 45.862102,50.273522 z "
378 id="path8164"
379 sodipodi:nodetypes="ccccccc" />
380 </g>
381 <g
382 id="g8166"
383 transform="matrix(0.6128107,0.5154406,0.5177504,-0.6100769,-10.856505,32.088635)"
384 inkscape:r_cx="true"
385 inkscape:r_cy="true"
386 style="fill:none;fill-opacity:1;stroke:#204a87;stroke-width:1.24928653;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
387 <path
388 transform="matrix(0.9972307,-2.4605589e-3,-2.4605593e-3,0.9980642,0.2457029,0.2077351)"
389 d="M 21.0625,6.3125 L 9.3125,20.34375 L 21.46875,30.59375 C 21.39688,27.754893 21.28125,23.375 21.28125,23.375 C 21.27502,23.044409 21.405774,22.725958 21.642519,22.495132 C 21.879264,22.264306 22.200923,22.141654 22.53125,22.15625 C 32.170255,22.667629 40.441027,25.773015 45.28125,30.875 C 48.676469,34.453835 50.102049,39.131532 49.125,44.21875 C 50.368339,42.205641 51.107893,40.194594 51.375,38.21875 C 51.870422,34.55401 50.856988,30.946652 48.5625,27.59375 C 43.973525,20.887947 34.236978,15.361613 22.3125,13.6875 C 21.732114,13.606381 21.295727,13.117098 21.28125,12.53125 L 21.0625,6.3125 z "
390 id="path8168"
391 style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient8178);stroke-width:1.24973191;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.70588235;visibility:visible;display:block;overflow:visible"
392 inkscape:original="M 22.125 3.15625 L 7.625 20.5 L 22.71875 33.21875 C 22.718749 33.21875 22.46875 23.34375 22.46875 23.34375 C 41.298509 24.342727 54.468144 35.661007 45.5625 50.25 C 62.614067 34.952315 46.852277 15.923275 22.46875 12.5 L 22.125 3.15625 z "
393 inkscape:radius="-1.197237"
394 sodipodi:type="inkscape:offset" />
395 </g>
396 </g>
397</svg>
3980
=== removed file 'data/icons/scalable/actions/system-shutdown-panel.svg'
--- data/icons/scalable/actions/system-shutdown-panel.svg 2009-10-06 22:51:09 +0000
+++ data/icons/scalable/actions/system-shutdown-panel.svg 1970-01-01 00:00:00 +0000
@@ -1,247 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://web.resource.org/cc/"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 sodipodi:docname="gnome-shutdown.svg"
13 sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/apps"
14 inkscape:version="0.45"
15 sodipodi:version="0.32"
16 id="svg11142"
17 height="48"
18 width="48"
19 version="1.0"
20 inkscape:output_extension="org.inkscape.output.svg.inkscape">
21 <defs
22 id="defs3">
23 <linearGradient
24 id="linearGradient4749">
25 <stop
26 id="stop4751"
27 offset="0"
28 style="stop-color:#ffffff;stop-opacity:1;" />
29 <stop
30 style="stop-color:#ffffff;stop-opacity:0.0000000;"
31 offset="0.50000000"
32 id="stop4757" />
33 <stop
34 id="stop4753"
35 offset="1.0000000"
36 style="stop-color:#ffffff;stop-opacity:1.0000000;" />
37 </linearGradient>
38 <linearGradient
39 id="linearGradient11264"
40 inkscape:collect="always">
41 <stop
42 id="stop11266"
43 offset="0"
44 style="stop-color:#000000;stop-opacity:1;" />
45 <stop
46 id="stop11268"
47 offset="1"
48 style="stop-color:#000000;stop-opacity:0;" />
49 </linearGradient>
50 <linearGradient
51 id="linearGradient11178">
52 <stop
53 style="stop-color:#d1d1cc;stop-opacity:1.0000000;"
54 offset="0.0000000"
55 id="stop11180" />
56 <stop
57 id="stop4735"
58 offset="0.50000000"
59 style="stop-color:#d1d1d1;stop-opacity:1.0000000;" />
60 <stop
61 style="stop-color:#b9b9b9;stop-opacity:1.0000000;"
62 offset="1.0000000"
63 id="stop11188" />
64 </linearGradient>
65 <linearGradient
66 id="linearGradient11164">
67 <stop
68 id="stop11166"
69 offset="0"
70 style="stop-color:#eeeeec;stop-opacity:1;" />
71 <stop
72 style="stop-color:#c6c6bf;stop-opacity:1.0000000;"
73 offset="0.26988637"
74 id="stop11172" />
75 <stop
76 id="stop11176"
77 offset="0.37900311"
78 style="stop-color:#f9f9f8;stop-opacity:1.0000000;" />
79 <stop
80 id="stop11174"
81 offset="0.75000000"
82 style="stop-color:#c8c8c2;stop-opacity:1.0000000;" />
83 <stop
84 id="stop11168"
85 offset="1.0000000"
86 style="stop-color:#eeeeec;stop-opacity:1.0000000;" />
87 </linearGradient>
88 <linearGradient
89 gradientUnits="userSpaceOnUse"
90 y2="23.071428"
91 x2="42.471249"
92 y1="23.071428"
93 x1="7.1433797"
94 id="linearGradient11170"
95 xlink:href="#linearGradient11164"
96 inkscape:collect="always" />
97 <radialGradient
98 gradientTransform="matrix(1.364252,-9.115392e-17,9.115392e-17,1.364252,-9.47947,-5.618016)"
99 gradientUnits="userSpaceOnUse"
100 r="18.672388"
101 fy="17.224812"
102 fx="24.673435"
103 cy="17.224812"
104 cx="24.673435"
105 id="radialGradient11234"
106 xlink:href="#linearGradient11178"
107 inkscape:collect="always" />
108 <radialGradient
109 gradientUnits="userSpaceOnUse"
110 r="18.214285"
111 fy="23.071428"
112 fx="25.785715"
113 cy="23.071428"
114 cx="25.785715"
115 id="radialGradient11270"
116 xlink:href="#linearGradient11264"
117 inkscape:collect="always" />
118 <linearGradient
119 gradientUnits="userSpaceOnUse"
120 y2="8.5882788"
121 x2="25.785715"
122 y1="21.978363"
123 x1="25.785715"
124 id="linearGradient4755"
125 xlink:href="#linearGradient4749"
126 inkscape:collect="always" />
127 </defs>
128 <sodipodi:namedview
129 inkscape:window-y="423"
130 inkscape:window-x="840"
131 inkscape:window-height="606"
132 inkscape:window-width="750"
133 stroke="#555753"
134 fill="#edd400"
135 inkscape:showpageshadow="false"
136 inkscape:document-units="px"
137 inkscape:grid-bbox="true"
138 showgrid="false"
139 inkscape:current-layer="layer1"
140 inkscape:cy="-10.815272"
141 inkscape:cx="85.353158"
142 inkscape:zoom="1"
143 inkscape:pageshadow="2"
144 inkscape:pageopacity="0.0"
145 borderopacity="0.32941176"
146 bordercolor="#666666"
147 pagecolor="#ffffff"
148 id="base"
149 showguides="true"
150 inkscape:guide-bbox="true" />
151 <metadata
152 id="metadata4">
153 <rdf:RDF>
154 <cc:Work
155 rdf:about="">
156 <dc:format>image/svg+xml</dc:format>
157 <dc:type
158 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
159 <dc:title>Shutdown</dc:title>
160 <dc:creator>
161 <cc:Agent>
162 <dc:title>Jakub Steiner</dc:title>
163 </cc:Agent>
164 </dc:creator>
165 <cc:license
166 rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
167 <dc:source>http://jimmac.musichall.cz</dc:source>
168 <dc:subject>
169 <rdf:Bag>
170 <rdf:li>lock</rdf:li>
171 <rdf:li>key</rdf:li>
172 <rdf:li>secure</rdf:li>
173 </rdf:Bag>
174 </dc:subject>
175 </cc:Work>
176 <cc:License
177 rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
178 <cc:permits
179 rdf:resource="http://web.resource.org/cc/Reproduction" />
180 <cc:permits
181 rdf:resource="http://web.resource.org/cc/Distribution" />
182 <cc:requires
183 rdf:resource="http://web.resource.org/cc/Notice" />
184 <cc:permits
185 rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
186 <cc:requires
187 rdf:resource="http://web.resource.org/cc/ShareAlike" />
188 <cc:requires
189 rdf:resource="http://web.resource.org/cc/SourceCode" />
190 </cc:License>
191 </rdf:RDF>
192 </metadata>
193 <g
194 inkscape:groupmode="layer"
195 inkscape:label="Layer 1"
196 id="layer1">
197 <path
198 sodipodi:type="arc"
199 style="opacity:1;color:#000000;fill:url(#radialGradient11270);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.8505457;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
200 id="path11262"
201 sodipodi:cx="25.785715"
202 sodipodi:cy="23.071428"
203 sodipodi:rx="18.214285"
204 sodipodi:ry="18.214285"
205 d="M 44 23.071428 A 18.214285 18.214285 0 1 1 7.5714302,23.071428 A 18.214285 18.214285 0 1 1 44 23.071428 z"
206 transform="matrix(1.269833,0,0,1.269833,-9.24356,-4.225444)" />
207 <path
208 transform="matrix(1.175715,0,0,1.175715,-6.816669,-3.911156)"
209 d="M 44 23.071428 A 18.214285 18.214285 0 1 1 7.5714302,23.071428 A 18.214285 18.214285 0 1 1 44 23.071428 z"
210 sodipodi:ry="18.214285"
211 sodipodi:rx="18.214285"
212 sodipodi:cy="23.071428"
213 sodipodi:cx="25.785715"
214 id="path11152"
215 style="opacity:1;color:#000000;fill:url(#linearGradient11170);fill-opacity:1;fill-rule:evenodd;stroke:#74796e;stroke-width:0.8505457;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
216 sodipodi:type="arc" />
217 <path
218 sodipodi:type="arc"
219 style="opacity:1;color:#000000;fill:url(#radialGradient11234);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.93590021;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
220 id="path11154"
221 sodipodi:cx="25.785715"
222 sodipodi:cy="23.071428"
223 sodipodi:rx="18.214285"
224 sodipodi:ry="18.214285"
225 d="M 44 23.071428 A 18.214285 18.214285 0 1 1 7.5714302,23.071428 A 18.214285 18.214285 0 1 1 44 23.071428 z"
226 transform="matrix(1.06849,0,0,1.06849,-4.051771,-2.437299)" />
227 <path
228 sodipodi:nodetypes="czs"
229 id="path4743"
230 d="M 19.1468,14.674063 C 12.154448,18.486901 15.316371,29.412893 23.310313,29.412893 C 31.220984,29.412893 34.766419,19.054547 27.473824,14.674063"
231 style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
232 <path
233 id="path4745"
234 d="M 23.364832,19.364034 L 23.364832,11.95091"
235 style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:2.99999905;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
236 <path
237 transform="matrix(1.04555,0,0,1.04555,-3.460245,-1.908039)"
238 d="M 44 23.071428 A 18.214285 18.214285 0 1 1 7.5714302,23.071428 A 18.214285 18.214285 0 1 1 44 23.071428 z"
239 sodipodi:ry="18.214285"
240 sodipodi:rx="18.214285"
241 sodipodi:cy="23.071428"
242 sodipodi:cx="25.785715"
243 id="path4747"
244 style="opacity:0.88235294;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4755);stroke-width:0.95643449;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
245 sodipodi:type="arc" />
246 </g>
247</svg>
2480
=== removed file 'data/icons/scalable/actions/system-shutdown.svg'
--- data/icons/scalable/actions/system-shutdown.svg 2009-08-07 19:10:15 +0000
+++ data/icons/scalable/actions/system-shutdown.svg 1970-01-01 00:00:00 +0000
@@ -1,247 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://web.resource.org/cc/"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 sodipodi:docname="gnome-shutdown.svg"
13 sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/apps"
14 inkscape:version="0.45"
15 sodipodi:version="0.32"
16 id="svg11142"
17 height="48"
18 width="48"
19 version="1.0"
20 inkscape:output_extension="org.inkscape.output.svg.inkscape">
21 <defs
22 id="defs3">
23 <linearGradient
24 id="linearGradient4749">
25 <stop
26 id="stop4751"
27 offset="0"
28 style="stop-color:#ffffff;stop-opacity:1;" />
29 <stop
30 style="stop-color:#ffffff;stop-opacity:0.0000000;"
31 offset="0.50000000"
32 id="stop4757" />
33 <stop
34 id="stop4753"
35 offset="1.0000000"
36 style="stop-color:#ffffff;stop-opacity:1.0000000;" />
37 </linearGradient>
38 <linearGradient
39 id="linearGradient11264"
40 inkscape:collect="always">
41 <stop
42 id="stop11266"
43 offset="0"
44 style="stop-color:#000000;stop-opacity:1;" />
45 <stop
46 id="stop11268"
47 offset="1"
48 style="stop-color:#000000;stop-opacity:0;" />
49 </linearGradient>
50 <linearGradient
51 id="linearGradient11178">
52 <stop
53 style="stop-color:#d1d1cc;stop-opacity:1.0000000;"
54 offset="0.0000000"
55 id="stop11180" />
56 <stop
57 id="stop4735"
58 offset="0.50000000"
59 style="stop-color:#d1d1d1;stop-opacity:1.0000000;" />
60 <stop
61 style="stop-color:#b9b9b9;stop-opacity:1.0000000;"
62 offset="1.0000000"
63 id="stop11188" />
64 </linearGradient>
65 <linearGradient
66 id="linearGradient11164">
67 <stop
68 id="stop11166"
69 offset="0"
70 style="stop-color:#eeeeec;stop-opacity:1;" />
71 <stop
72 style="stop-color:#c6c6bf;stop-opacity:1.0000000;"
73 offset="0.26988637"
74 id="stop11172" />
75 <stop
76 id="stop11176"
77 offset="0.37900311"
78 style="stop-color:#f9f9f8;stop-opacity:1.0000000;" />
79 <stop
80 id="stop11174"
81 offset="0.75000000"
82 style="stop-color:#c8c8c2;stop-opacity:1.0000000;" />
83 <stop
84 id="stop11168"
85 offset="1.0000000"
86 style="stop-color:#eeeeec;stop-opacity:1.0000000;" />
87 </linearGradient>
88 <linearGradient
89 gradientUnits="userSpaceOnUse"
90 y2="23.071428"
91 x2="42.471249"
92 y1="23.071428"
93 x1="7.1433797"
94 id="linearGradient11170"
95 xlink:href="#linearGradient11164"
96 inkscape:collect="always" />
97 <radialGradient
98 gradientTransform="matrix(1.364252,-9.115392e-17,9.115392e-17,1.364252,-9.47947,-5.618016)"
99 gradientUnits="userSpaceOnUse"
100 r="18.672388"
101 fy="17.224812"
102 fx="24.673435"
103 cy="17.224812"
104 cx="24.673435"
105 id="radialGradient11234"
106 xlink:href="#linearGradient11178"
107 inkscape:collect="always" />
108 <radialGradient
109 gradientUnits="userSpaceOnUse"
110 r="18.214285"
111 fy="23.071428"
112 fx="25.785715"
113 cy="23.071428"
114 cx="25.785715"
115 id="radialGradient11270"
116 xlink:href="#linearGradient11264"
117 inkscape:collect="always" />
118 <linearGradient
119 gradientUnits="userSpaceOnUse"
120 y2="8.5882788"
121 x2="25.785715"
122 y1="21.978363"
123 x1="25.785715"
124 id="linearGradient4755"
125 xlink:href="#linearGradient4749"
126 inkscape:collect="always" />
127 </defs>
128 <sodipodi:namedview
129 inkscape:window-y="423"
130 inkscape:window-x="840"
131 inkscape:window-height="606"
132 inkscape:window-width="750"
133 stroke="#555753"
134 fill="#edd400"
135 inkscape:showpageshadow="false"
136 inkscape:document-units="px"
137 inkscape:grid-bbox="true"
138 showgrid="false"
139 inkscape:current-layer="layer1"
140 inkscape:cy="-10.815272"
141 inkscape:cx="85.353158"
142 inkscape:zoom="1"
143 inkscape:pageshadow="2"
144 inkscape:pageopacity="0.0"
145 borderopacity="0.32941176"
146 bordercolor="#666666"
147 pagecolor="#ffffff"
148 id="base"
149 showguides="true"
150 inkscape:guide-bbox="true" />
151 <metadata
152 id="metadata4">
153 <rdf:RDF>
154 <cc:Work
155 rdf:about="">
156 <dc:format>image/svg+xml</dc:format>
157 <dc:type
158 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
159 <dc:title>Shutdown</dc:title>
160 <dc:creator>
161 <cc:Agent>
162 <dc:title>Jakub Steiner</dc:title>
163 </cc:Agent>
164 </dc:creator>
165 <cc:license
166 rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
167 <dc:source>http://jimmac.musichall.cz</dc:source>
168 <dc:subject>
169 <rdf:Bag>
170 <rdf:li>lock</rdf:li>
171 <rdf:li>key</rdf:li>
172 <rdf:li>secure</rdf:li>
173 </rdf:Bag>
174 </dc:subject>
175 </cc:Work>
176 <cc:License
177 rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
178 <cc:permits
179 rdf:resource="http://web.resource.org/cc/Reproduction" />
180 <cc:permits
181 rdf:resource="http://web.resource.org/cc/Distribution" />
182 <cc:requires
183 rdf:resource="http://web.resource.org/cc/Notice" />
184 <cc:permits
185 rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
186 <cc:requires
187 rdf:resource="http://web.resource.org/cc/ShareAlike" />
188 <cc:requires
189 rdf:resource="http://web.resource.org/cc/SourceCode" />
190 </cc:License>
191 </rdf:RDF>
192 </metadata>
193 <g
194 inkscape:groupmode="layer"
195 inkscape:label="Layer 1"
196 id="layer1">
197 <path
198 sodipodi:type="arc"
199 style="opacity:1;color:#000000;fill:url(#radialGradient11270);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.8505457;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
200 id="path11262"
201 sodipodi:cx="25.785715"
202 sodipodi:cy="23.071428"
203 sodipodi:rx="18.214285"
204 sodipodi:ry="18.214285"
205 d="M 44 23.071428 A 18.214285 18.214285 0 1 1 7.5714302,23.071428 A 18.214285 18.214285 0 1 1 44 23.071428 z"
206 transform="matrix(1.269833,0,0,1.269833,-9.24356,-4.225444)" />
207 <path
208 transform="matrix(1.175715,0,0,1.175715,-6.816669,-3.911156)"
209 d="M 44 23.071428 A 18.214285 18.214285 0 1 1 7.5714302,23.071428 A 18.214285 18.214285 0 1 1 44 23.071428 z"
210 sodipodi:ry="18.214285"
211 sodipodi:rx="18.214285"
212 sodipodi:cy="23.071428"
213 sodipodi:cx="25.785715"
214 id="path11152"
215 style="opacity:1;color:#000000;fill:url(#linearGradient11170);fill-opacity:1;fill-rule:evenodd;stroke:#74796e;stroke-width:0.8505457;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
216 sodipodi:type="arc" />
217 <path
218 sodipodi:type="arc"
219 style="opacity:1;color:#000000;fill:url(#radialGradient11234);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.93590021;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
220 id="path11154"
221 sodipodi:cx="25.785715"
222 sodipodi:cy="23.071428"
223 sodipodi:rx="18.214285"
224 sodipodi:ry="18.214285"
225 d="M 44 23.071428 A 18.214285 18.214285 0 1 1 7.5714302,23.071428 A 18.214285 18.214285 0 1 1 44 23.071428 z"
226 transform="matrix(1.06849,0,0,1.06849,-4.051771,-2.437299)" />
227 <path
228 sodipodi:nodetypes="czs"
229 id="path4743"
230 d="M 19.1468,14.674063 C 12.154448,18.486901 15.316371,29.412893 23.310313,29.412893 C 31.220984,29.412893 34.766419,19.054547 27.473824,14.674063"
231 style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
232 <path
233 id="path4745"
234 d="M 23.364832,19.364034 L 23.364832,11.95091"
235 style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:2.99999905;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
236 <path
237 transform="matrix(1.04555,0,0,1.04555,-3.460245,-1.908039)"
238 d="M 44 23.071428 A 18.214285 18.214285 0 1 1 7.5714302,23.071428 A 18.214285 18.214285 0 1 1 44 23.071428 z"
239 sodipodi:ry="18.214285"
240 sodipodi:rx="18.214285"
241 sodipodi:cy="23.071428"
242 sodipodi:cx="25.785715"
243 id="path4747"
244 style="opacity:0.88235294;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4755);stroke-width:0.95643449;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
245 sodipodi:type="arc" />
246 </g>
247</svg>
2480
=== renamed file 'data/indicator-status.service.in' => 'data/indicator-me.service.in'
--- data/indicator-status.service.in 2009-07-24 21:57:58 +0000
+++ data/indicator-me.service.in 2010-01-04 21:25:21 +0000
@@ -1,3 +1,3 @@
1[D-BUS Service]1[D-BUS Service]
2Name=org.ayatana.indicator.status2Name=org.ayatana.indicator.me
3Exec=@libexecdir@/indicator-status-service3Exec=@libexecdir@/indicator-me-service
44
=== removed file 'data/indicator-session.schemas.in'
--- data/indicator-session.schemas.in 2009-09-02 15:10:20 +0000
+++ data/indicator-session.schemas.in 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
1<?xml version="1.0"?>
2<gconfschemafile>
3 <schemalist>
4 <schema>
5 <key>/schemas/apps/indicator-session/suppress_logout_restart_shutdown</key>
6 <applyto>/apps/indicator-session/suppress_logout_restart_shutdown</applyto>
7 <owner>indicator-session</owner>
8 <type>bool</type>
9 <default>FALSE</default>
10 <locale name="C">
11 <short>Suppress the dialog to confirm logout, restart and shutdown action</short>
12 <long>Whether or not to show confirmation dialogs for logout,
13 restart and shutdown actions.</long>
14 </locale>
15 </schema>
16 </schemalist>
17</gconfschemafile>
180
=== removed file 'data/indicator-session.service.in'
--- data/indicator-session.service.in 2009-07-24 21:57:58 +0000
+++ data/indicator-session.service.in 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1[D-BUS Service]
2Name=org.ayatana.indicator.session
3Exec=@libexecdir@/indicator-session-service
40
=== removed file 'data/indicator-users.service.in'
--- data/indicator-users.service.in 2009-07-24 21:57:58 +0000
+++ data/indicator-users.service.in 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1[D-BUS Service]
2Name=org.ayatana.indicator.users
3Exec=@libexecdir@/indicator-users-service
40
=== modified file 'po/POTFILES.in'
--- po/POTFILES.in 2009-09-08 15:09:45 +0000
+++ po/POTFILES.in 2010-01-04 21:25:21 +0000
@@ -1,14 +1,7 @@
1[encoding: UTF-8]1[encoding: UTF-8]
2data/indicator-session.schemas.in2src/indicator-me.c
3src/gtk-dialog/ck-pk-helper.c
4src/gtk-dialog/gconf-helper.c
5src/gtk-dialog/gtk-logout-helper.c
6src/gtk-dialog/logout-dialog.c
7src/indicator-session.c
8src/session-service.c
9src/status-provider.c3src/status-provider.c
10src/status-provider-pidgin.c4src/status-provider-pidgin.c
11src/status-provider-telepathy.c5src/status-provider-telepathy.c
12src/status-service.c6src/status-service.c
13src/status-service-dbus.c7src/status-service-dbus.c
14src/users-service.c
158
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2009-10-06 23:49:57 +0000
+++ src/Makefile.am 2010-01-04 21:25:21 +0000
@@ -1,35 +1,29 @@
1SUBDIRS = gtk-dialog
21
3libexec_PROGRAMS = indicator-status-service indicator-users-service indicator-session-service2libexec_PROGRAMS = indicator-me-service
43
5###################4###################
6# Indicator Stuff5# Indicator Stuff
7###################6###################
87
9sessionlibdir = $(INDICATORDIR)8melibdir = $(INDICATORDIR)
10sessionlib_LTLIBRARIES = libsession.la9melib_LTLIBRARIES = libme.la
11libsession_la_SOURCES = \10libme_la_SOURCES = \
12 indicator-session.c \11 indicator-me.c \
13 dbus-shared-names.h \12 dbus-shared-names.h \
14 status-service-client.h \13 me-service-client.h
15 users-service-client.h14libme_la_CFLAGS = $(APPLET_CFLAGS) -Wall -Werror
16libsession_la_CFLAGS = $(APPLET_CFLAGS) -Wall -Werror15libme_la_LIBADD = $(APPLET_LIBS)
17libsession_la_LIBADD = $(APPLET_LIBS)16libme_la_LDFLAGS = -module -avoid-version
18libsession_la_LDFLAGS = -module -avoid-version
1917
20################18################
21# Status Stuff19# Status Stuff
22################20################
2321
24indicator_status_service_SOURCES = \22indicator_me_service_SOURCES = \
25 status-service.c \23 me-service.c \
26 status-service-dbus.h \24 me-service-dbus.h \
27 status-service-dbus.c \25 me-service-dbus.c \
28 status-service-server.h \26 me-service-server.h \
29 users-service-dbus.h \
30 users-service-dbus.c \
31 users-service-marshal.c \
32 users-service-marshal.h \
33 status-provider.h \27 status-provider.h \
34 status-provider.c \28 status-provider.c \
35 status-provider-mc5.h \29 status-provider-mc5.h \
@@ -44,39 +38,22 @@
44 status-provider-telepathy.c \38 status-provider-telepathy.c \
45 status-provider-telepathy-marshal.h \39 status-provider-telepathy-marshal.h \
46 status-provider-telepathy-marshal.c40 status-provider-telepathy-marshal.c
47indicator_status_service_CFLAGS = $(STATUSSERVICE_CFLAGS) -Wall -Werror41indicator_me_service_CFLAGS = $(STATUSSERVICE_CFLAGS) -Wall -Werror
48indicator_status_service_LDADD = $(STATUSSERVICE_LIBS)42indicator_me_service_LDADD = $(STATUSSERVICE_LIBS)
4943
50users-service-client.h: $(srcdir)/users-service.xml44me-service-client.h: $(srcdir)/me-service.xml
51 dbus-binding-tool \45 dbus-binding-tool \
52 --prefix=_users_service_client \46 --prefix=_me_service_client \
53 --mode=glib-client \47 --mode=glib-client \
54 --output=users-service-client.h \48 --output=me-service-client.h \
55 $(srcdir)/users-service.xml49 $(srcdir)/me-service.xml
5650
57status-service-client.h: $(srcdir)/status-service.xml51me-service-server.h: $(srcdir)/me-service.xml
58 dbus-binding-tool \52 dbus-binding-tool \
59 --prefix=_status_service_client \53 --prefix=_me_service_server \
60 --mode=glib-client \
61 --output=status-service-client.h \
62 $(srcdir)/status-service.xml
63
64status-service-server.h: $(srcdir)/status-service.xml
65 dbus-binding-tool \
66 --prefix=_status_service_server \
67 --mode=glib-server \54 --mode=glib-server \
68 --output=status-service-server.h \55 --output=me-service-server.h \
69 $(srcdir)/status-service.xml56 $(srcdir)/me-service.xml
70
71users-service-marshal.h: $(srcdir)/users-service.list
72 glib-genmarshal --header \
73 --prefix=_users_service_marshal $(srcdir)/users-service.list \
74 > users-service-marshal.h
75
76users-service-marshal.c: $(srcdir)/users-service.list
77 glib-genmarshal --body \
78 --prefix=_users_service_marshal $(srcdir)/users-service.list \
79 > users-service-marshal.c
8057
81status-provider-pidgin-marshal.h: $(srcdir)/status-provider-pidgin.list58status-provider-pidgin-marshal.h: $(srcdir)/status-provider-pidgin.list
82 glib-genmarshal --header \59 glib-genmarshal --header \
@@ -109,52 +86,27 @@
109 > status-provider-mc5-marshal.c86 > status-provider-mc5-marshal.c
11087
111###############88###############
112# Users Stuff
113###############
114
115indicator_users_service_SOURCES = \
116 lock-helper.c \
117 lock-helper.h \
118 users-service.c \
119 users-service-dbus.c \
120 users-service-marshal.c
121indicator_users_service_CFLAGS = $(USERSSERVICE_CFLAGS) -Wall -Werror
122indicator_users_service_LDADD = $(USERSSERVICE_LIBS)
123
124#################
125# Session Stuff
126#################
127
128indicator_session_service_SOURCES = \
129 lock-helper.c \
130 lock-helper.h \
131 session-service.c \
132 gtk-dialog/gconf-helper.c
133indicator_session_service_CFLAGS = $(SESSIONSERVICE_CFLAGS) $(GCONF_CFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" -Wall -Werror
134indicator_session_service_LDADD = $(SESSIONSERVICE_LIBS) $(GCONF_LIBS)
135
136###############
137# Other Stuff89# Other Stuff
138###############90###############
13991
140BUILT_SOURCES = \92BUILT_SOURCES = \
141 users-service-client.h \93 me-service-client.h \
142 status-service-client.h \94 me-service-server.h \
143 status-service-server.h \
144 status-provider-mc5-marshal.h \95 status-provider-mc5-marshal.h \
145 status-provider-mc5-marshal.c \96 status-provider-mc5-marshal.c \
146 users-service-marshal.h \
147 users-service-marshal.c \
148 status-provider-pidgin-marshal.h \97 status-provider-pidgin-marshal.h \
149 status-provider-pidgin-marshal.c \98 status-provider-pidgin-marshal.c \
150 status-provider-telepathy-marshal.h \99 status-provider-telepathy-marshal.h \
151 status-provider-telepathy-marshal.c100 status-provider-telepathy-marshal.c
152101
153EXTRA_DIST = \102EXTRA_DIST = \
154 status-service.xml \103 me-service.xml \
155 status-provider-mc5.list \104 status-provider-mc5.list \
156 status-provider-pidgin.list \105 status-provider-pidgin.list \
157 status-provider-telepathy.list106 status-provider-telepathy.list \
107 users-service.xml \
108 users-service.list
158109
159CLEANFILES = \110CLEANFILES = \
160 $(BUILT_SOURCES)111 $(BUILT_SOURCES)
112
161113
=== modified file 'src/dbus-shared-names.h'
--- src/dbus-shared-names.h 2009-09-10 21:26:01 +0000
+++ src/dbus-shared-names.h 2010-01-04 21:25:21 +0000
@@ -24,17 +24,10 @@
24#ifndef __DBUS_SHARED_NAMES_H__24#ifndef __DBUS_SHARED_NAMES_H__
25#define __DBUS_SHARED_NAMES_H__ 125#define __DBUS_SHARED_NAMES_H__ 1
2626
27#define INDICATOR_STATUS_DBUS_NAME "org.ayatana.indicator.status"27#define INDICATOR_ME_DBUS_NAME "org.ayatana.indicator.me"
28#define INDICATOR_STATUS_DBUS_OBJECT "/org/ayatana/indicator/status/menu"28#define INDICATOR_ME_DBUS_VERSION 1
29#define INDICATOR_STATUS_SERVICE_DBUS_OBJECT "/org/ayatana/indicator/status/service"29#define INDICATOR_ME_DBUS_OBJECT "/org/ayatana/indicator/me/menu"
30#define INDICATOR_STATUS_SERVICE_DBUS_INTERFACE "org.ayatana.indicator.status.service"30#define INDICATOR_ME_SERVICE_DBUS_OBJECT "/org/ayatana/indicator/me/service"
3131#define INDICATOR_ME_SERVICE_DBUS_INTERFACE "org.ayatana.indicator.me.service"
32#define INDICATOR_USERS_DBUS_NAME "org.ayatana.indicator.users"
33#define INDICATOR_USERS_DBUS_OBJECT "/org/ayatana/indicator/users/menu"
34#define INDICATOR_USERS_SERVICE_DBUS_OBJECT "/org/gnome/DisplayManager/UserManager"
35#define INDICATOR_USERS_SERVICE_DBUS_INTERFACE "org.gnome.DisplayManager.UserManager"
36
37#define INDICATOR_SESSION_DBUS_NAME "org.ayatana.indicator.session"
38#define INDICATOR_SESSION_DBUS_OBJECT "/org/ayatana/indicator/session/menu"
3932
40#endif /* __DBUS_SHARED_NAMES_H__ */33#endif /* __DBUS_SHARED_NAMES_H__ */
4134
=== removed directory 'src/gtk-dialog'
=== removed file 'src/gtk-dialog/Makefile.am'
--- src/gtk-dialog/Makefile.am 2009-09-10 22:02:32 +0000
+++ src/gtk-dialog/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
1
2libexec_PROGRAMS = gtk-logout-helper
3
4gtk_logout_helper_SOURCES = \
5 gtk-logout-helper.c \
6 ck-pk-helper.c \
7 ck-pk-helper.h \
8 gconf-helper.c \
9 gconf-helper.h \
10 logout-dialog.c \
11 logout-dialog.h
12
13gtk_logout_helper_CFLAGS = $(SESSIONSERVICE_CFLAGS) $(GTKLOGOUTHELPER_CFLAGS) $(GCONF_CFLAGS) -Wall -Werror -DINDICATOR_ICONS_DIR="\"$(INDICATORICONSDIR)\""
14gtk_logout_helper_LDADD = $(SESSIONSERVICE_LIBS) $(GTKLOGOUTHELPER_LIBS) $(GCONF_LIBS)
15
160
=== removed file 'src/gtk-dialog/ck-pk-helper.c'
--- src/gtk-dialog/ck-pk-helper.c 2009-09-22 12:45:17 +0000
+++ src/gtk-dialog/ck-pk-helper.c 1970-01-01 00:00:00 +0000
@@ -1,222 +0,0 @@
1/*
2A small wrapper utility to load indicators and put them as menu items
3into the gnome-panel using it's applet interface.
4
5Copyright 2009 Canonical Ltd.
6
7Authors:
8 Ted Gould <ted@canonical.com>
9
10This program is free software: you can redistribute it and/or modify it
11under the terms of the GNU General Public License version 3, as published
12by the Free Software Foundation.
13
14This program is distributed in the hope that it will be useful, but
15WITHOUT ANY WARRANTY; without even the implied warranties of
16MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
17PURPOSE. See the GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License along
20with this program. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23
24#include <unistd.h>
25#include <glib.h>
26#include <dbus/dbus-glib.h>
27#include <polkit/polkit.h>
28
29#include "logout-dialog.h"
30#include "ck-pk-helper.h"
31
32static gboolean
33ck_multiple_users (void)
34{
35 DBusGConnection * sbus = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
36 g_return_val_if_fail(sbus != NULL, TRUE); /* worst case */
37 DBusGProxy * proxy = dbus_g_proxy_new_for_name(sbus, "org.freedesktop.ConsoleKit",
38 "/org/freedesktop/ConsoleKit/Manager",
39 "org.freedesktop.ConsoleKit.Manager");
40
41 if (proxy == NULL) {
42 return TRUE;
43 }
44
45 gboolean result;
46 GPtrArray * seats = NULL;
47
48 result = dbus_g_proxy_call(proxy, "GetSeats", NULL, G_TYPE_INVALID,
49 dbus_g_type_get_collection("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &seats, G_TYPE_INVALID);
50
51 if (!result) {
52 g_warning("Unable to get the seats for ConsoleKit");
53 g_object_unref(proxy);
54 return TRUE;
55 }
56
57 gchar * this_session_id = NULL;
58
59 result = dbus_g_proxy_call(proxy, "GetCurrentSession", NULL, G_TYPE_INVALID,
60 DBUS_TYPE_G_OBJECT_PATH, &this_session_id, G_TYPE_INVALID);
61
62 g_object_unref(proxy);
63
64 if (!result) {
65 g_warning("Unable to get current session from ConsoleKit");
66 return TRUE;
67 }
68
69 proxy = dbus_g_proxy_new_for_name(sbus, "org.freedesktop.ConsoleKit",
70 this_session_id, "org.freedesktop.ConsoleKit.Session");
71
72 if (proxy == NULL) {
73 return TRUE;
74 }
75
76 guint this_session_uid;
77
78 result = dbus_g_proxy_call(proxy, "GetUnixUser", NULL, G_TYPE_INVALID,
79 G_TYPE_UINT, &this_session_uid, G_TYPE_INVALID);
80
81 if (!result) {
82 g_warning("Unable to get UID from ConsoleKit");
83 return TRUE;
84 }
85
86 guint seat;
87 gboolean multiple_users = FALSE;
88 for (seat = 0; seat < seats->len; seat++) {
89 gchar * seat_id = g_ptr_array_index(seats, seat);
90 DBusGProxy * seat_proxy = dbus_g_proxy_new_for_name(sbus, "org.freedesktop.ConsoleKit",
91 seat_id, "org.freedesktop.ConsoleKit.Seat");
92 g_free(seat_id);
93
94 if (seat_proxy == NULL) {
95 continue;
96 }
97
98 GPtrArray * sessions = NULL;
99
100 gboolean result = dbus_g_proxy_call(seat_proxy,
101 "GetSessions", NULL, G_TYPE_INVALID,
102 dbus_g_type_get_collection("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &sessions, G_TYPE_INVALID);
103
104 g_object_unref(seat_proxy);
105 if (!result) {
106 continue;
107 }
108
109 guint session;
110 for (session = 0; session < sessions->len; session++) {
111 gchar * session_id = g_ptr_array_index(sessions, session);
112 if (g_strcmp0(this_session_id, session_id) == 0) {
113 continue;
114 }
115 DBusGProxy * session_proxy = dbus_g_proxy_new_for_name(sbus, "org.freedesktop.ConsoleKit",
116 session_id, "org.freedesktop.ConsoleKit.Session");
117 g_free(session_id);
118
119 if (session_proxy == NULL) {
120 continue;
121 }
122
123 guint session_uid;
124 result = dbus_g_proxy_call(session_proxy, "GetUnixUser", NULL, G_TYPE_INVALID,
125 G_TYPE_UINT, &session_uid, G_TYPE_INVALID);
126 g_object_unref(session_proxy);
127
128 if (!result) {
129 continue;
130 }
131
132 if (session_uid != this_session_uid) {
133 multiple_users = TRUE;
134 break;
135 }
136 }
137
138 g_ptr_array_free(sessions, TRUE);
139
140 if (multiple_users) {
141 break;
142 }
143 }
144
145 g_ptr_array_free(seats, TRUE);
146 g_object_unref(proxy);
147 g_free(this_session_id);
148
149 return multiple_users;
150}
151
152gboolean
153pk_require_auth (LogoutDialogAction action) {
154 if (action == LOGOUT_DIALOG_LOGOUT) {
155 return FALSE;
156 }
157
158 gchar * pk_action;
159 if (ck_multiple_users()) {
160 if (action == LOGOUT_DIALOG_RESTART) {
161 pk_action = "org.freedesktop.consolekit.system.restart-multiple-users";
162 } else {
163 pk_action = "org.freedesktop.consolekit.system.stop-multiple-users";
164 }
165 } else {
166 if (action == LOGOUT_DIALOG_RESTART) {
167 pk_action = "org.freedesktop.consolekit.system.restart";
168 } else {
169 pk_action = "org.freedesktop.consolekit.system.stop";
170 }
171 }
172
173 PolkitAuthorizationResult *polres = NULL;
174 gboolean ret = FALSE;
175 if (pk_can_do_action(pk_action, &polres)) {
176 if (polkit_authorization_result_get_is_challenge (polres)) {
177 ret = TRUE;
178 }
179 g_debug ("pk_require_auth(%s): authorized, is_challenge: %i", pk_action, ret);
180 } else {
181 g_debug ("pk_require_auth(%s): not authorized", pk_action);
182 }
183 if (polres) {
184 g_object_unref (polres);
185 }
186 return ret;
187}
188
189gboolean
190pk_can_do_action (const gchar *action_id, PolkitAuthorizationResult ** pol_result)
191{
192 PolkitAuthority *authority;
193 PolkitSubject *subject;
194 PolkitAuthorizationResult *result;
195 gboolean ret;
196
197 authority = polkit_authority_get();
198 if (!authority) {
199 g_warning ("Could not get PolicyKit authority instance");
200 return FALSE;
201 }
202 subject = polkit_unix_process_new (getpid());
203
204 result = polkit_authority_check_authorization_sync (authority, subject, action_id, NULL, 0, NULL, NULL);
205 g_object_unref (authority);
206
207 ret = FALSE;
208 if (result) {
209 ret = polkit_authorization_result_get_is_authorized (result) ||
210 polkit_authorization_result_get_is_challenge (result);
211 g_debug ("pk_can_do_action(%s): %i", action_id, ret);
212 } else {
213 g_warning ("pk_can_do_action(%s): check_authorization returned NULL", action_id);
214 }
215 if (pol_result) {
216 *pol_result = result;
217 } else {
218 g_object_unref (result);
219 }
220 return ret;
221
222}
2230
=== removed file 'src/gtk-dialog/ck-pk-helper.h'
--- src/gtk-dialog/ck-pk-helper.h 2009-09-22 12:45:17 +0000
+++ src/gtk-dialog/ck-pk-helper.h 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
1/*
2A small wrapper utility to load indicators and put them as menu items
3into the gnome-panel using it's applet interface.
4
5Copyright 2009 Canonical Ltd.
6
7Authors:
8 Ted Gould <ted@canonical.com>
9
10This program is free software: you can redistribute it and/or modify it
11under the terms of the GNU General Public License version 3, as published
12by the Free Software Foundation.
13
14This program is distributed in the hope that it will be useful, but
15WITHOUT ANY WARRANTY; without even the implied warranties of
16MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
17PURPOSE. See the GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License along
20with this program. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23
24#ifndef __CK_PK_HELPER_H__
25#define __CK_PK_HELPER_H__ 1
26
27#include <polkit/polkit.h>
28
29gboolean pk_require_auth (LogoutDialogAction action);
30gboolean pk_can_do_action (const gchar *action_id, PolkitAuthorizationResult ** pol_result);
31
32#endif /* __CK_PK_HELPER__ */
330
=== removed file 'src/gtk-dialog/gconf-helper.c'
--- src/gtk-dialog/gconf-helper.c 2009-09-10 22:05:42 +0000
+++ src/gtk-dialog/gconf-helper.c 1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
1/*
2A small wrapper utility for connecting to gconf.
3
4Copyright 2009 Canonical Ltd.
5
6Authors:
7 Christoph Korn <c_korn@gmx.de>
8
9This program is free software: you can redistribute it and/or modify it
10under the terms of the GNU General Public License version 3, as published
11by the Free Software Foundation.
12
13This program is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranties of
15MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16PURPOSE. See the GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License along
19with this program. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22
23#include <gconf/gconf-client.h>
24
25#include <glib/gi18n.h>
26
27#include <dbus/dbus-glib.h>
28#include <dbus/dbus-glib-bindings.h>
29
30#include <libdbusmenu-glib/server.h>
31#include <libdbusmenu-glib/menuitem.h>
32
33#include "gconf-helper.h"
34
35static GConfClient * gconf_client = NULL;
36
37gboolean
38supress_confirmations (void) {
39 if(!gconf_client) {
40 gconf_client = gconf_client_get_default ();
41 }
42 return gconf_client_get_bool (gconf_client, SUPPRESS_KEY, NULL) ;
43}
44
45static void update_menu_entries_callback (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer data) {
46 RestartShutdownLogoutMenuItems * restart_shutdown_logout_mi = (RestartShutdownLogoutMenuItems*) data;
47 GConfValue * value = gconf_entry_get_value (entry);
48 const gchar * key = gconf_entry_get_key (entry);
49
50 if(g_strcmp0 (key, SUPPRESS_KEY) == 0) {
51 if (gconf_value_get_bool (value)) {
52 dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->logout_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out"));
53 dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart"));
54 dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown"));
55 } else {
56 dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->logout_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out..."));
57 dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart..."));
58 dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shutdown..."));
59 }
60 }
61}
62
63void
64update_menu_entries(RestartShutdownLogoutMenuItems * restart_shutdown_logout_mi) {
65 if(!gconf_client) {
66 gconf_client = gconf_client_get_default ();
67 }
68 gconf_client_add_dir (gconf_client, GLOBAL_DIR,
69 GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
70 gconf_client_notify_add (gconf_client, SUPPRESS_KEY,
71 update_menu_entries_callback, restart_shutdown_logout_mi, NULL, NULL);
72}
73
740
=== removed file 'src/gtk-dialog/gconf-helper.h'
--- src/gtk-dialog/gconf-helper.h 2009-09-08 19:26:38 +0000
+++ src/gtk-dialog/gconf-helper.h 1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
1/*
2A small wrapper utility for connecting to gconf.
3
4Copyright 2009 Canonical Ltd.
5
6Authors:
7 Christoph Korn <c_korn@gmx.de>
8
9This program is free software: you can redistribute it and/or modify it
10under the terms of the GNU General Public License version 3, as published
11by the Free Software Foundation.
12
13This program is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranties of
15MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16PURPOSE. See the GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License along
19with this program. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22
23#ifndef __GCONF_HELPER_H__
24#define __GCONF_HELPER_H__ 1
25
26#include <gconf/gconf-client.h>
27
28#include <glib/gi18n.h>
29
30#include <dbus/dbus-glib.h>
31#include <dbus/dbus-glib-bindings.h>
32
33#include <libdbusmenu-glib/server.h>
34#include <libdbusmenu-glib/menuitem.h>
35
36#define SUPPRESS_KEY "/apps/indicator-session/suppress_logout_restart_shutdown"
37#define GLOBAL_DIR "/apps/indicator-session"
38
39typedef struct _RestartShutdownLogoutMenuItems
40{
41 DbusmenuMenuitem * logout_mi;
42 DbusmenuMenuitem * restart_mi;
43 DbusmenuMenuitem * shutdown_mi;
44}
45RestartShutdownLogoutMenuItems;
46
47void update_menu_entries(RestartShutdownLogoutMenuItems*);
48gboolean supress_confirmations (void);
49
50#endif /* __GCONF_HELPER__ */
510
=== removed file 'src/gtk-dialog/gtk-logout-helper.c'
--- src/gtk-dialog/gtk-logout-helper.c 2009-09-24 17:24:09 +0000
+++ src/gtk-dialog/gtk-logout-helper.c 1970-01-01 00:00:00 +0000
@@ -1,173 +0,0 @@
1/*
2A small wrapper utility to load indicators and put them as menu items
3into the gnome-panel using it's applet interface.
4
5Copyright 2009 Canonical Ltd.
6
7Authors:
8 Ted Gould <ted@canonical.com>
9 Christoph Korn <c_korn@gmx.de>
10
11This program is free software: you can redistribute it and/or modify it
12under the terms of the GNU General Public License version 3, as published
13by the Free Software Foundation.
14
15This program is distributed in the hope that it will be useful, but
16WITHOUT ANY WARRANTY; without even the implied warranties of
17MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18PURPOSE. See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License along
21with this program. If not, see <http://www.gnu.org/licenses/>.
22*/
23
24#include <config.h>
25#include <glib.h>
26#include <gtk/gtk.h>
27#include <dbus/dbus-glib.h>
28#include "logout-dialog.h"
29#include "ck-pk-helper.h"
30#include "gconf-helper.h"
31
32static void
33session_action (LogoutDialogAction action)
34{
35 DBusGConnection * sbus;
36 DBusGProxy * sm_proxy;
37 GError * error = NULL;
38 gboolean res = FALSE;
39
40 sbus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
41 if (sbus == NULL) {
42 g_warning("Unable to get DBus session bus.");
43 return;
44 }
45 sm_proxy = dbus_g_proxy_new_for_name_owner (sbus,
46 "org.gnome.SessionManager",
47 "/org/gnome/SessionManager",
48 "org.gnome.SessionManager",
49 &error);
50 if (sm_proxy == NULL) {
51 g_warning("Unable to get DBus proxy to SessionManager interface: %s", error->message);
52 g_error_free(error);
53 return;
54 }
55
56 g_clear_error (&error);
57
58 if (action == LOGOUT_DIALOG_LOGOUT) {
59 res = dbus_g_proxy_call_with_timeout (sm_proxy, "Logout", INT_MAX, &error,
60 G_TYPE_UINT, 1, G_TYPE_INVALID, G_TYPE_INVALID);
61 } else if (action == LOGOUT_DIALOG_SHUTDOWN) {
62 res = dbus_g_proxy_call_with_timeout (sm_proxy, "RequestShutdown", INT_MAX, &error,
63 G_TYPE_INVALID, G_TYPE_INVALID);
64 } else if (action == LOGOUT_DIALOG_RESTART) {
65 res = dbus_g_proxy_call_with_timeout (sm_proxy, "RequestReboot", INT_MAX, &error,
66 G_TYPE_INVALID, G_TYPE_INVALID);
67 } else {
68 g_warning ("Unknown session action");
69 }
70
71 if (!res) {
72 if (error != NULL) {
73 g_warning ("SessionManager action failed: %s", error->message);
74 } else {
75 g_warning ("SessionManager action failed: unknown error");
76 }
77 }
78
79 g_object_unref(sm_proxy);
80
81 if (error != NULL) {
82 g_error_free(error);
83 }
84
85 return;
86}
87
88static LogoutDialogAction type = LOGOUT_DIALOG_LOGOUT;
89
90static gboolean
91option_logout (const gchar * arg, const gchar * value, gpointer data, GError * error)
92{
93 type = LOGOUT_DIALOG_LOGOUT;
94 return TRUE;
95}
96
97static gboolean
98option_shutdown (const gchar * arg, const gchar * value, gpointer data, GError * error)
99{
100 type = LOGOUT_DIALOG_SHUTDOWN;
101 return TRUE;
102}
103
104static gboolean
105option_restart (const gchar * arg, const gchar * value, gpointer data, GError * error)
106{
107 type = LOGOUT_DIALOG_RESTART;
108 return TRUE;
109}
110
111static GOptionEntry options[] = {
112 {"logout", 'l', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, option_logout, "Log out of the current session", NULL},
113 {"shutdown", 's', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, option_shutdown, "Shutdown the entire system", NULL},
114 {"restart", 'r', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, option_restart, "Restart the system", NULL},
115
116 {NULL}
117};
118
119int
120main (int argc, char * argv[])
121{
122 gtk_init(&argc, &argv);
123
124 /* Setting up i18n and gettext. Apparently, we need
125 all of these. */
126 setlocale (LC_ALL, "");
127 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
128 textdomain (GETTEXT_PACKAGE);
129
130 GError * error = NULL;
131 GOptionContext * context = g_option_context_new(" - logout of the current session");
132 g_option_context_add_main_entries(context, options, "gtk-logout-helper");
133 g_option_context_add_group(context, gtk_get_option_group(TRUE));
134 g_option_context_set_help_enabled(context, TRUE);
135
136 if (!g_option_context_parse(context, &argc, &argv, &error)) {
137 g_debug("Option parsing failed: %s", error->message);
138 g_error_free(error);
139 return 1;
140 }
141
142 /* Init some theme/icon stuff */
143 gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(),
144 INDICATOR_ICONS_DIR);
145
146 GtkWidget * dialog = NULL;
147 /* TODO: We're disabling PolicyKit checking here because there
148 is a bug in ConsoleKit where the dialog doesn't come up until
149 the session is entirely closed. Stupid, but it's better than
150 not getting a dialog at all. */
151 /* if (!pk_require_auth(type) && !supress_confirmations()) { */
152 if (!supress_confirmations()) {
153 dialog = logout_dialog_new(type);
154 }
155
156 if (dialog != NULL) {
157 GtkResponseType response = gtk_dialog_run(GTK_DIALOG(dialog));
158 gtk_widget_hide(dialog);
159
160 if (response == GTK_RESPONSE_HELP) {
161 type = LOGOUT_DIALOG_RESTART;
162 response = GTK_RESPONSE_OK;
163 }
164
165 if (response != GTK_RESPONSE_OK) {
166 return 0;
167 }
168 }
169
170 session_action(type);
171
172 return 0;
173}
1740
=== removed file 'src/gtk-dialog/logout-dialog.c'
--- src/gtk-dialog/logout-dialog.c 2009-10-05 21:11:25 +0000
+++ src/gtk-dialog/logout-dialog.c 1970-01-01 00:00:00 +0000
@@ -1,371 +0,0 @@
1/*
2 * libgksuui -- Gtk+ widget and convenience functions for requesting passwords
3 * Copyright (C) 2004 Gustavo Noronha Silva
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA
19 */
20
21#include <string.h>
22#include <math.h>
23
24#include <gtk/gtk.h>
25#include <gdk/gdkx.h>
26#include <glib/gi18n.h>
27#include <X11/XKBlib.h>
28
29#include "logout-dialog.h"
30#include "ck-pk-helper.h"
31
32enum {
33 PROP_ZERO,
34 PROP_ACTION
35};
36
37
38static void
39logout_dialog_class_init (LogoutDialogClass *klass);
40
41static void
42logout_dialog_init (LogoutDialog *logout_dialog);
43
44static void
45set_property (GObject * object, guint param_id, const GValue * value, GParamSpec *pspec);
46
47static void
48get_property (GObject * object, guint param_id, GValue * value, GParamSpec *pspec);
49
50static gboolean
51timer_cb (gpointer data);
52
53static void
54show_cb (GtkWidget * widget, gpointer data);
55
56static void
57check_restart (LogoutDialog * dialog);
58
59static gchar*
60get_plural_string (LogoutDialog * dialog);
61
62static const gchar * title_strings[LOGOUT_DIALOG_ACTION_CNT] = {
63 /* LOGOUT_DIALOG_LOGOUT, */ NC_("title", "Log Out"),
64 /* LOGOUT_DIALOG_RESTART, */ NC_("title", "Restart"),
65 /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("title", "Shut Down")
66};
67
68static const gchar * button_strings[LOGOUT_DIALOG_ACTION_CNT] = {
69 /* LOGOUT_DIALOG_LOGOUT, */ NC_("button", "Log Out"),
70 /* LOGOUT_DIALOG_RESTART, */ NC_("button", "Restart"),
71 /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button", "Shut Down")
72};
73
74static const gchar * restart_auth = N_("Restart...");
75
76static const gchar * body_logout_update = N_("You recently installed updates which will only take effect after a restart. Restart to apply software updates.");
77
78static const gchar * icon_strings[LOGOUT_DIALOG_ACTION_CNT] = {
79 /* LOGOUT_DIALOG_LOGOUT, */ "system-log-out",
80 /* LOGOUT_DIALOG_RESTART, */ "system-restart",
81 /* LOGOUT_DIALOG_SHUTDOWN, */ "system-shutdown"
82};
83
84GType
85logout_dialog_get_type (void)
86{
87 static GType type = 0;
88
89 if (type == 0)
90 {
91 static const GTypeInfo info =
92 {
93 sizeof (LogoutDialogClass), /* size of class */
94 NULL, /* base_init */
95 NULL, /* base_finalize */
96 (GClassInitFunc) logout_dialog_class_init,
97 NULL, /* class_finalize */
98 NULL, /* class_data */
99 sizeof (LogoutDialog), /* size of object */
100 0, /* n_preallocs */
101 (GInstanceInitFunc) logout_dialog_init /* instance_init */
102 };
103 type = g_type_register_static (gtk_dialog_get_type (),
104 "LogoutDialogType",
105 &info, 0);
106 }
107
108 return type;
109}
110
111static gchar*
112get_plural_string (LogoutDialog * dialog)
113{
114 static gchar *plural_string = "";
115
116 switch (dialog->action)
117 {
118 case LOGOUT_DIALOG_LOGOUT:
119 plural_string = ngettext("You will be logged out in %d second.",
120 "You will be logged out in %d seconds.",
121 dialog->timeout);
122 break;
123 case LOGOUT_DIALOG_RESTART:
124 plural_string = ngettext("The computer will restart in %d second.",
125 "The computer will restart in %d seconds.",
126 dialog->timeout);
127 break;
128 case LOGOUT_DIALOG_SHUTDOWN:
129 plural_string = ngettext("The computer will be shut down in %d second.",
130 "The computer will be shut down in %d seconds.",
131 dialog->timeout);
132 break;
133 default:
134 break;
135 }
136
137 return plural_string;
138}
139
140static void
141logout_dialog_class_init (LogoutDialogClass *klass)
142{
143 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
144
145 gobject_class->set_property = set_property;
146 gobject_class->get_property = get_property;
147
148 g_object_class_install_property(gobject_class, PROP_ACTION,
149 g_param_spec_int("action", NULL, NULL,
150 LOGOUT_DIALOG_LOGOUT, LOGOUT_DIALOG_SHUTDOWN,
151 LOGOUT_DIALOG_LOGOUT, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
152
153 return;
154}
155
156static void
157set_property (GObject * object, guint param_id, const GValue * value, GParamSpec *pspec)
158{
159 g_return_if_fail(param_id == PROP_ACTION);
160
161 LogoutDialog * dialog = LOGOUT_DIALOG(object);
162 dialog->action = (LogoutDialogAction)g_value_get_int(value);
163
164 gtk_image_set_from_icon_name(GTK_IMAGE(dialog->image), icon_strings[dialog->action], GTK_ICON_SIZE_DIALOG);
165 gtk_window_set_title (GTK_WINDOW(dialog), _(title_strings[dialog->action]));
166 gtk_window_set_icon_name (GTK_WINDOW(dialog), icon_strings[dialog->action]);
167 gtk_widget_hide(dialog->message);
168 gtk_button_set_label(GTK_BUTTON(dialog->ok_button), _(button_strings[dialog->action]));
169
170 gchar * timeouttxt = g_strdup_printf(get_plural_string(dialog), dialog->timeout);
171 gtk_label_set_text(GTK_LABEL(dialog->timeout_text), timeouttxt);
172 g_free(timeouttxt);
173
174 check_restart(dialog);
175
176 return;
177}
178
179static void
180get_property (GObject * object, guint param_id, GValue * value, GParamSpec *pspec)
181{
182 g_return_if_fail(param_id == PROP_ACTION);
183 g_value_set_int(value, LOGOUT_DIALOG(object)->action);
184}
185
186static gboolean
187timer_cb (gpointer data)
188{
189 LogoutDialog * dialog = LOGOUT_DIALOG(data);
190
191 if (dialog->timeout == 0) {
192 gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
193 dialog->timerfunc = 0;
194 return FALSE;
195 } else {
196 dialog->timeout--;
197
198 gchar * timeouttxt = g_strdup_printf(get_plural_string(dialog), dialog->timeout);
199 gtk_label_set_text(GTK_LABEL(dialog->timeout_text), timeouttxt);
200 g_free(timeouttxt);
201 }
202
203 return TRUE;
204}
205
206static void
207show_cb (GtkWidget * widget, gpointer data)
208{
209 LogoutDialog * dialog = LOGOUT_DIALOG(widget);
210
211 if (dialog->timerfunc != 0) {
212 g_source_remove(dialog->timerfunc);
213 dialog->timerfunc = 0;
214 }
215
216 dialog->timerfunc = g_timeout_add_seconds(1, timer_cb, dialog);
217 return;
218}
219
220static void
221check_restart (LogoutDialog * dialog)
222{
223 if (dialog->action != LOGOUT_DIALOG_LOGOUT) {
224 return;
225 }
226
227 if (g_file_test("/var/run/reboot-required", G_FILE_TEST_EXISTS)) {
228 if (pk_can_do_action("org.freedesktop.consolekit.system.restart", NULL) ||
229 pk_can_do_action("org.freedesktop.consolekit.system.restart-multiple-users", NULL)) {
230
231 gtk_label_set_text(GTK_LABEL(dialog->message), _(body_logout_update));
232 gtk_widget_show(dialog->message);
233 if (pk_require_auth(LOGOUT_DIALOG_RESTART)) {
234 gtk_button_set_label(GTK_BUTTON(dialog->restart_button), _(restart_auth));
235 } else {
236 gtk_button_set_label(GTK_BUTTON(dialog->restart_button), _(button_strings[LOGOUT_DIALOG_RESTART]));
237 }
238 gtk_widget_show(dialog->restart_button);
239 }
240 }
241
242 return;
243}
244
245static gboolean
246focus_out_cb (GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
247{
248 gtk_window_present (GTK_WINDOW(widget));
249 return TRUE;
250}
251
252static void
253logout_dialog_init (LogoutDialog *logout_dialog)
254{
255 GtkDialog *dialog;
256 gint border_width = 6;
257
258 logout_dialog->timeout = 60;
259 logout_dialog->timerfunc = 0;
260
261 /* dialog window */
262 dialog = GTK_DIALOG(logout_dialog);
263
264 /* make sure that our window will always have the focus */
265 g_signal_connect (G_OBJECT(dialog), "focus-out-event",
266 G_CALLBACK(focus_out_cb), NULL);
267
268 logout_dialog->main_vbox = dialog->vbox;
269
270 gtk_window_set_title (GTK_WINDOW(logout_dialog), "");
271 gtk_dialog_set_has_separator (GTK_DIALOG(logout_dialog), FALSE);
272 gtk_container_set_border_width (GTK_CONTAINER(logout_dialog), border_width);
273 gtk_box_set_spacing (GTK_BOX(logout_dialog->main_vbox), 12);
274 gtk_window_set_resizable (GTK_WINDOW(logout_dialog), FALSE);
275
276 gtk_window_stick(GTK_WINDOW(logout_dialog));
277 gtk_window_set_keep_above(GTK_WINDOW(logout_dialog), TRUE);
278 gtk_widget_realize(GTK_WIDGET(logout_dialog));
279 /* remove superfluous window buttons */
280 gdk_window_set_functions (GTK_WIDGET(logout_dialog)->window, 0);
281 gdk_window_set_decorations (GTK_WIDGET(logout_dialog)->window, GDK_DECOR_BORDER | GDK_DECOR_TITLE);
282
283 /* center window */
284 gtk_window_set_position (GTK_WINDOW(logout_dialog), GTK_WIN_POS_CENTER);
285
286 /* the action buttons */
287 /* the cancel button */
288 logout_dialog->restart_button = gtk_dialog_add_button (dialog,
289 GTK_STOCK_HELP,
290 GTK_RESPONSE_HELP);
291 gtk_button_set_label(GTK_BUTTON(logout_dialog->restart_button), _(button_strings[LOGOUT_DIALOG_RESTART]));
292 gtk_widget_hide(logout_dialog->restart_button);
293
294 /* the cancel button */
295 logout_dialog->cancel_button = gtk_dialog_add_button (dialog,
296 GTK_STOCK_CANCEL,
297 GTK_RESPONSE_CANCEL);
298 /* the ok button */
299 logout_dialog->ok_button = gtk_dialog_add_button (dialog,
300 GTK_STOCK_OK,
301 GTK_RESPONSE_OK);
302 gtk_widget_grab_default (logout_dialog->ok_button);
303
304 /* Window Title and Icon */
305 gtk_window_set_title (GTK_WINDOW(logout_dialog), _(title_strings[logout_dialog->action]));
306 gtk_window_set_icon_name (GTK_WINDOW(logout_dialog), icon_strings[logout_dialog->action]);
307
308 /* hbox */
309 logout_dialog->hbox = gtk_hbox_new (FALSE, 12);
310 gtk_container_set_border_width (GTK_CONTAINER(logout_dialog->hbox), 6);
311 gtk_box_pack_start (GTK_BOX(logout_dialog->main_vbox),
312 logout_dialog->hbox, FALSE, FALSE, 0);
313 gtk_widget_show (logout_dialog->hbox);
314
315 /* image */
316 logout_dialog->image =
317 gtk_image_new_from_icon_name (icon_strings[logout_dialog->action],
318 GTK_ICON_SIZE_DIALOG);
319 gtk_misc_set_alignment (GTK_MISC(logout_dialog->image), 0.5, 0);
320 gtk_box_pack_start (GTK_BOX(logout_dialog->hbox), logout_dialog->image,
321 FALSE, FALSE, 0);
322 gtk_widget_show (logout_dialog->image);
323
324 /* vbox for text */
325 logout_dialog->vbox_text = gtk_vbox_new(FALSE, 12);
326 gtk_box_pack_start(GTK_BOX(logout_dialog->hbox), logout_dialog->vbox_text, TRUE, TRUE, 0);
327 gtk_widget_show(logout_dialog->vbox_text);
328
329 /* Message */
330 logout_dialog->message = gtk_label_new("");
331 gtk_label_set_line_wrap(GTK_LABEL(logout_dialog->message), TRUE);
332 gtk_label_set_single_line_mode(GTK_LABEL(logout_dialog->message), FALSE);
333 gtk_label_set_selectable(GTK_LABEL(logout_dialog->message), TRUE);
334 gtk_misc_set_alignment (GTK_MISC(logout_dialog->message), 0.0, 0.0);
335 gtk_box_pack_start(GTK_BOX(logout_dialog->vbox_text), logout_dialog->message, TRUE, TRUE, 0);
336 gtk_widget_show(logout_dialog->message);
337
338 /* timeout */
339 logout_dialog->timeout_text = gtk_label_new("");
340 gtk_label_set_line_wrap(GTK_LABEL(logout_dialog->timeout_text), TRUE);
341 gtk_label_set_single_line_mode(GTK_LABEL(logout_dialog->timeout_text), FALSE);
342 gtk_label_set_selectable(GTK_LABEL(logout_dialog->timeout_text), FALSE);
343 gtk_misc_set_alignment (GTK_MISC(logout_dialog->timeout_text), 0.0, 0.5);
344 gtk_box_pack_start(GTK_BOX(logout_dialog->vbox_text), logout_dialog->timeout_text, TRUE, TRUE, 0);
345 gtk_widget_show(logout_dialog->timeout_text);
346
347 g_signal_connect(G_OBJECT(logout_dialog), "show", G_CALLBACK(show_cb), logout_dialog);
348
349 return;
350}
351
352/**
353 * logout_dialog_new:
354 *
355 * Creates a new #LogoutDialog.
356 *
357 * Returns: the new #LogoutDialog
358 */
359GtkWidget*
360logout_dialog_new (LogoutDialogAction action)
361{
362 LogoutDialog * dialog = g_object_new (LOGOUT_TYPE_DIALOG, "action", action, NULL);
363 return GTK_WIDGET(dialog);
364}
365
366LogoutDialogAction
367logout_dialog_get_action (LogoutDialog * dialog)
368{
369 return dialog->action;
370}
371
3720
=== removed file 'src/gtk-dialog/logout-dialog.h'
--- src/gtk-dialog/logout-dialog.h 2009-08-11 13:25:43 +0000
+++ src/gtk-dialog/logout-dialog.h 1970-01-01 00:00:00 +0000
@@ -1,99 +0,0 @@
1/*
2 * libgksuui -- Gtk+ widget and convenience functions for requesting passwords
3 * Copyright (C) 2004 Gustavo Noronha Silva
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA
19 */
20
21#ifndef __LOGOUT_DIALOG_H__
22#define __LOGOUT_DIALOG_H__
23
24#include <gtk/gtk.h>
25
26G_BEGIN_DECLS
27
28#define LOGOUT_TYPE_DIALOG (logout_dialog_get_type ())
29#define LOGOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LOGOUT_TYPE_DIALOG, LogoutDialog))
30#define LOGOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), LOGOUT_TYPE_DIALOG, LogoutDialogClass))
31#define LOGOUT_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LOGOUT_TYPE_DIALOG))
32#define LOGOUT_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LOGOUT_TYPE_CONTEXT))
33#define LOGOUT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LOGOUT_TYPE_DIALOG, LogoutDialogClass))
34
35typedef struct _LogoutDialogClass LogoutDialogClass;
36typedef struct _LogoutDialog LogoutDialog;
37typedef enum _LogoutDialogAction LogoutDialogAction;
38
39enum _LogoutDialogAction {
40 LOGOUT_DIALOG_LOGOUT,
41 LOGOUT_DIALOG_RESTART,
42 LOGOUT_DIALOG_SHUTDOWN,
43 LOGOUT_DIALOG_ACTION_CNT
44};
45
46struct _LogoutDialogClass
47{
48 GtkDialogClass parent_class;
49};
50
51/**
52 * LogoutDialog:
53 * @dialog: parent widget
54 * @main_vbox: GtkDialog's vbox
55 * @hbox: box to separate the image of the right-side widgets
56 * @image: the authorization image, left-side widget
57 * @entry_vbox: right-side widgets container
58 * @label: message describing what is required from the user,
59 * right-side widget
60 * @entry: place to type the password in, right-side widget
61 * @ok_button: OK button of the dialog
62 * @cancel_button: Cancel button of the dialog
63 *
64 * Convenience widget based on #GtkDialog to request a password.
65 */
66struct _LogoutDialog
67{
68 GtkDialog dialog;
69
70 GtkWidget *main_vbox;
71 GtkWidget *hbox;
72 GtkWidget *image;
73 GtkWidget *ok_button;
74 GtkWidget *cancel_button;
75 GtkWidget *restart_button;
76 GtkWidget *vbox_text;
77 GtkWidget *message;
78 GtkWidget *timeout_text;
79
80 LogoutDialogAction action;
81
82 /* private */
83 gchar * timeout_result;
84 guint timeout;
85 guint timerfunc;
86};
87
88GType
89logout_dialog_get_type (void);
90
91GtkWidget*
92logout_dialog_new (LogoutDialogAction action);
93
94LogoutDialogAction
95logout_dialog_get_action (LogoutDialog * widget);
96
97G_END_DECLS
98
99#endif
1000
=== renamed file 'src/indicator-session.c' => 'src/indicator-me.c'
--- src/indicator-session.c 2009-11-04 22:34:26 +0000
+++ src/indicator-me.c 2010-01-04 21:25:21 +0000
@@ -1,6 +1,6 @@
1/*1/*
2A small wrapper utility to load indicators and put them as menu items2A menu that should be close to the user, it's the user's status,
3into the gnome-panel using it's applet interface.3their friends. All about them. It's a user-focused-menu.
44
5Copyright 2009 Canonical Ltd.5Copyright 2009 Canonical Ltd.
66
@@ -23,91 +23,70 @@
23#include <glib.h>23#include <glib.h>
24#include <glib-object.h>24#include <glib-object.h>
25#include <gtk/gtk.h>25#include <gtk/gtk.h>
26#include <libdbusmenu-gtk/client.h>26#include <libdbusmenu-gtk/menu.h>
2727
28#include <dbus/dbus-glib.h>28#include <dbus/dbus-glib.h>
29#include <dbus/dbus-glib-bindings.h>29#include <dbus/dbus-glib-bindings.h>
3030
31#include <libindicator/indicator.h>31#include <libindicator/indicator.h>
32#include <libindicator/indicator-object.h>32#include <libindicator/indicator-object.h>
33#include <libindicator/indicator-service-manager.h>
3334
34#include "dbus-shared-names.h"35#include "dbus-shared-names.h"
35#include "status-service-client.h"36#include "me-service-client.h"
3637
37#define INDICATOR_SESSION_TYPE (indicator_session_get_type ())38#define INDICATOR_ME_TYPE (indicator_me_get_type ())
38#define INDICATOR_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_SESSION_TYPE, IndicatorSession))39#define INDICATOR_ME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_ME_TYPE, IndicatorMe))
39#define INDICATOR_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_SESSION_TYPE, IndicatorSessionClass))40#define INDICATOR_ME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_ME_TYPE, IndicatorMeClass))
40#define IS_INDICATOR_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_SESSION_TYPE))41#define IS_INDICATOR_ME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_ME_TYPE))
41#define IS_INDICATOR_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_SESSION_TYPE))42#define IS_INDICATOR_ME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_ME_TYPE))
42#define INDICATOR_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_SESSION_TYPE, IndicatorSessionClass))43#define INDICATOR_ME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_ME_TYPE, IndicatorMeClass))
4344
44typedef struct _IndicatorSession IndicatorSession;45#define DEFAULT_ICON "user-offline"
45typedef struct _IndicatorSessionClass IndicatorSessionClass;46
4647typedef struct _IndicatorMe IndicatorMe;
47struct _IndicatorSessionClass {48typedef struct _IndicatorMeClass IndicatorMeClass;
49
50struct _IndicatorMeClass {
48 IndicatorObjectClass parent_class;51 IndicatorObjectClass parent_class;
49};52};
5053
51struct _IndicatorSession {54struct _IndicatorMe {
52 IndicatorObject parent;55 IndicatorObject parent;
56 IndicatorServiceManager * service;
53};57};
5458
55GType indicator_session_get_type (void);59GType indicator_me_get_type (void);
5660
57/* Indicator stuff */61/* Indicator stuff */
58INDICATOR_SET_VERSION62INDICATOR_SET_VERSION
59INDICATOR_SET_TYPE(INDICATOR_SESSION_TYPE)63INDICATOR_SET_TYPE(INDICATOR_ME_TYPE)
6064
61/* Globals */65/* Globals */
62static DbusmenuGtkClient * status_client = NULL;
63static DbusmenuGtkClient * users_client = NULL;
64static DbusmenuGtkClient * session_client = NULL;
65
66static GtkMenu * main_menu = NULL;
67static GtkImage * status_image = NULL;66static GtkImage * status_image = NULL;
68
69static GtkWidget * status_separator = NULL;
70static GtkWidget * users_separator = NULL;
71#define SEPARATOR_SHOWN(sep) (sep != NULL && GTK_WIDGET_VISIBLE(sep))
72static GtkWidget * loading_item = NULL;
73
74static DBusGConnection * connection = NULL;
75static DBusGProxy * proxy = NULL;
76static DBusGProxy * status_proxy = NULL;67static DBusGProxy * status_proxy = NULL;
7768
78typedef enum {
79 STATUS_SECTION,
80 USERS_SECTION,
81 SESSION_SECTION,
82 END_OF_SECTIONS
83} section_t;
84
85/* Prototypes */69/* Prototypes */
86static void child_added (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, guint position, gpointer section);
87static guint status_menu_pos_offset (void);
88static guint users_menu_pos_offset (void);
89static guint session_menu_pos_offset (void);
90static void child_realized (DbusmenuMenuitem * child, gpointer userdata);
91static gboolean start_service (gpointer userdata);
92static void start_service_phase2 (DBusGProxy * proxy, guint status, GError * error, gpointer data);
93static GtkLabel * get_label (IndicatorObject * io);70static GtkLabel * get_label (IndicatorObject * io);
94static GtkImage * get_icon (IndicatorObject * io);71static GtkImage * get_icon (IndicatorObject * io);
95static GtkMenu * get_menu (IndicatorObject * io);72static GtkMenu * get_menu (IndicatorObject * io);
9673
97static void indicator_session_class_init (IndicatorSessionClass *klass);74static void indicator_me_class_init (IndicatorMeClass *klass);
98static void indicator_session_init (IndicatorSession *self);75static void indicator_me_init (IndicatorMe *self);
99static void indicator_session_dispose (GObject *object);76static void indicator_me_dispose (GObject *object);
100static void indicator_session_finalize (GObject *object);77static void indicator_me_finalize (GObject *object);
78static void connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer userdata);
79static void status_icon_cb (DBusGProxy * proxy, char * icons, GError *error, gpointer userdata);
10180
102G_DEFINE_TYPE (IndicatorSession, indicator_session, INDICATOR_OBJECT_TYPE);81G_DEFINE_TYPE (IndicatorMe, indicator_me, INDICATOR_OBJECT_TYPE);
10382
104static void83static void
105indicator_session_class_init (IndicatorSessionClass *klass)84indicator_me_class_init (IndicatorMeClass *klass)
106{85{
107 GObjectClass *object_class = G_OBJECT_CLASS (klass);86 GObjectClass *object_class = G_OBJECT_CLASS (klass);
10887
109 object_class->dispose = indicator_session_dispose;88 object_class->dispose = indicator_me_dispose;
110 object_class->finalize = indicator_session_finalize;89 object_class->finalize = indicator_me_finalize;
11190
112 IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);91 IndicatorObjectClass * io_class = INDICATOR_OBJECT_CLASS(klass);
113 io_class->get_label = get_label;92 io_class->get_label = get_label;
@@ -118,25 +97,32 @@
118}97}
11998
120static void99static void
121indicator_session_init (IndicatorSession *self)100indicator_me_init (IndicatorMe *self)
122{101{
123102
124 return;103 /* Init variables */
125}104 self->service = NULL;
126105
127static void106 /* Do stuff with them */
128indicator_session_dispose (GObject *object)107 self->service = indicator_service_manager_new_version(INDICATOR_ME_DBUS_NAME, INDICATOR_ME_DBUS_VERSION);
129{108 g_signal_connect(G_OBJECT(self->service), INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, G_CALLBACK(connection_changed), self);
130109
131 G_OBJECT_CLASS (indicator_session_parent_class)->dispose (object);110 return;
132 return;111}
133}112
134113static void
135static void114indicator_me_dispose (GObject *object)
136indicator_session_finalize (GObject *object)115{
137{116
138117 G_OBJECT_CLASS (indicator_me_parent_class)->dispose (object);
139 G_OBJECT_CLASS (indicator_session_parent_class)->finalize (object);118 return;
119}
120
121static void
122indicator_me_finalize (GObject *object)
123{
124
125 G_OBJECT_CLASS (indicator_me_parent_class)->finalize (object);
140 return;126 return;
141}127}
142128
@@ -151,198 +137,26 @@
151static GtkImage *137static GtkImage *
152get_icon (IndicatorObject * io)138get_icon (IndicatorObject * io)
153{139{
154 g_debug("Changing status icon: '%s'", "system-shutdown-panel");140 if (status_image == NULL) {
155 status_image = GTK_IMAGE(gtk_image_new_from_icon_name("system-shutdown-panel", GTK_ICON_SIZE_MENU));141 /* Will create the status icon if it doesn't exist already */
156 gtk_widget_show(GTK_WIDGET(status_image));142 status_icon_cb(NULL, DEFAULT_ICON, NULL, NULL);
143 }
157 return status_image;144 return status_image;
158}145}
159146
160typedef struct _realized_data_t realized_data_t;
161struct _realized_data_t {
162 section_t section;
163};
164
165static void
166resort_menu (void)
167{
168 guint location = 0;
169 guint clientnum;
170
171 for (clientnum = 0; clientnum < 3; clientnum++) {
172 DbusmenuGtkClient * client = NULL;
173 if (clientnum == 0) client = status_client;
174 if (clientnum == 1) client = users_client;
175 if (clientnum == 2) client = session_client;
176
177 if (client == NULL) continue;
178
179 DbusmenuMenuitem * root = dbusmenu_client_get_root(DBUSMENU_CLIENT(client));
180
181 GList * children = dbusmenu_menuitem_get_children(root);
182 if (children == NULL) {
183 continue;
184 }
185
186 GList * child;
187 for (child = children; child != NULL; child = g_list_next(child)) {
188 GtkMenuItem * widget = dbusmenu_gtkclient_menuitem_get(client, DBUSMENU_MENUITEM(child->data));
189 if (widget != NULL) {
190 gtk_menu_reorder_child(main_menu, GTK_WIDGET(widget), location);
191 location++;
192 }
193 }
194
195 if (clientnum == 0) {
196 gtk_menu_reorder_child(main_menu, status_separator, location);
197 location++;
198 }
199 if (clientnum == 1) {
200 gtk_menu_reorder_child(main_menu, users_separator, location);
201 location++;
202 }
203 }
204
205 return;
206}
207
208static void
209child_added (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, guint position, gpointer section)
210{
211 realized_data_t * data = g_new0(realized_data_t, 1);
212 if (data == NULL) {
213 g_warning("Unable to allocate data for realization of item");
214 return;
215 }
216
217 data->section = GPOINTER_TO_UINT(section);
218
219 g_signal_connect(G_OBJECT(child), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(child_realized), data);
220 return;
221}
222
223static void
224child_realized (DbusmenuMenuitem * child, gpointer userdata)
225{
226 g_return_if_fail(userdata != NULL);
227 g_return_if_fail(DBUSMENU_IS_MENUITEM(child));
228
229 realized_data_t * data = (realized_data_t *)userdata;
230 section_t section = data->section;
231 g_free(data);
232
233 DbusmenuGtkClient * client = NULL;
234 gchar * errorstr = NULL;
235 guint (*posfunc) (void) = NULL;
236
237 switch (section) {
238 case STATUS_SECTION:
239 client = status_client;
240 errorstr = "Status";
241 posfunc = status_menu_pos_offset;
242 break;
243 case USERS_SECTION:
244 client = users_client;
245 errorstr = "Users";
246 posfunc = users_menu_pos_offset;
247 break;
248 case SESSION_SECTION:
249 client = session_client;
250 errorstr = "Session";
251 posfunc = session_menu_pos_offset;
252 break;
253 default:
254 g_warning("Child Added called with an unknown position function!");
255 return;
256 }
257
258 if (client == NULL) {
259 g_warning("Child realized for a menu we don't have? Section: %s", errorstr);
260 return;
261 }
262
263 GtkMenuItem * widget = dbusmenu_gtkclient_menuitem_get(client, child);
264
265 if (widget == NULL) {
266 g_warning("Had a menu item added to the %s menu, but yet it didn't have a GtkWidget with it. Can't add that to a menu now can we? You need to figure this @#$# out!", errorstr);
267 return;
268 }
269
270 gtk_menu_append(main_menu, GTK_WIDGET(widget));
271 gtk_widget_show(GTK_WIDGET(widget));
272
273 resort_menu();
274
275 gtk_widget_hide(loading_item);
276
277 return;
278}
279
280static void
281child_moved (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, guint newpos, guint oldpos, guint (*posfunc) (void))
282{
283
284
285}
286
287
288/* Status Menu */
289static guint
290status_menu_pos_offset (void)
291{
292 return 0;
293}
294
295static void
296status_menu_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint position, gpointer user_data)
297{
298 gtk_widget_show(GTK_WIDGET(status_separator));
299 return;
300}
301
302static void
303status_menu_removed (DbusmenuMenuitem * root, DbusmenuMenuitem * child, gpointer user_data)
304{
305 if (g_list_length(dbusmenu_menuitem_get_children(root)) == 0) {
306 gtk_widget_hide(GTK_WIDGET(status_separator));
307 }
308
309 return;
310}
311
312static void
313status_menu_root_changed(DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, GtkMenu * main)
314{
315 if (newroot == NULL) {
316 gtk_widget_hide(GTK_WIDGET(status_separator));
317 return;
318 }
319
320 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED, G_CALLBACK(child_added), GUINT_TO_POINTER(STATUS_SECTION));
321 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(status_menu_added), NULL);
322 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(status_menu_removed), NULL);
323 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(child_moved), GUINT_TO_POINTER(STATUS_SECTION));
324
325 GList * child = NULL;
326 guint count = 0;
327 for (child = dbusmenu_menuitem_get_children(newroot); child != NULL; child = g_list_next(child), count++) {
328 child_added(newroot, DBUSMENU_MENUITEM(child->data), count, GUINT_TO_POINTER(STATUS_SECTION));
329 }
330
331 if (count > 0) {
332 gtk_widget_show(GTK_WIDGET(status_separator));
333 }
334
335 return;
336}
337
338static void147static void
339status_icon_cb (DBusGProxy * proxy, char * icons, GError *error, gpointer userdata)148status_icon_cb (DBusGProxy * proxy, char * icons, GError *error, gpointer userdata)
340{149{
341 g_return_if_fail(status_image != NULL);
342 g_return_if_fail(icons != NULL);150 g_return_if_fail(icons != NULL);
343 g_return_if_fail(icons[0] != '\0');151 g_return_if_fail(icons[0] != '\0');
344152
345 g_debug("Changing status icon: '%s'", icons);153 g_debug("Changing status icon: '%s'", icons);
154
155 if (status_image == NULL) {
156 status_image = GTK_IMAGE(gtk_image_new_from_icon_name(DEFAULT_ICON, GTK_ICON_SIZE_MENU));
157 gtk_widget_show(GTK_WIDGET(status_image));
158 }
159
346 gtk_image_set_from_icon_name(status_image, icons, GTK_ICON_SIZE_MENU);160 gtk_image_set_from_icon_name(status_image, icons, GTK_ICON_SIZE_MENU);
347161
348 return;162 return;
@@ -354,289 +168,44 @@
354 return status_icon_cb(proxy, icon, NULL, NULL);168 return status_icon_cb(proxy, icon, NULL, NULL);
355}169}
356170
357171static void
358static gboolean172connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer userdata)
359connect_to_status (gpointer userdata)
360{173{
361 if (status_proxy == NULL) {174 if (connected) {
362 GError * error = NULL;175 if (status_proxy == NULL) {
363176 GError * error = NULL;
364 DBusGConnection * sbus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);177
365178 DBusGConnection * sbus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
366 status_proxy = dbus_g_proxy_new_for_name_owner(sbus,179
367 INDICATOR_STATUS_DBUS_NAME,180 status_proxy = dbus_g_proxy_new_for_name_owner(sbus,
368 INDICATOR_STATUS_SERVICE_DBUS_OBJECT,181 INDICATOR_ME_DBUS_NAME,
369 INDICATOR_STATUS_SERVICE_DBUS_INTERFACE,182 INDICATOR_ME_SERVICE_DBUS_OBJECT,
370 &error);183 INDICATOR_ME_SERVICE_DBUS_INTERFACE,
371184 &error);
372 if (error != NULL) {185
373 g_warning("Unable to get status proxy: %s", error->message);186 if (error != NULL) {
374 g_error_free(error);187 g_warning("Unable to get status proxy: %s", error->message);
375 return FALSE;188 g_error_free(error);
189 }
190
191 dbus_g_proxy_add_signal(status_proxy, "StatusIconsChanged", G_TYPE_STRING, G_TYPE_INVALID);
192 dbus_g_proxy_connect_signal(status_proxy, "StatusIconsChanged", G_CALLBACK(status_icon_changed), NULL, NULL);
376 }193 }
377194
378 dbus_g_proxy_add_signal(status_proxy, "StatusIconsChanged", G_TYPE_STRING, G_TYPE_INVALID);195 org_ayatana_indicator_me_service_status_icons_async(status_proxy, status_icon_cb, NULL);
379 dbus_g_proxy_connect_signal(status_proxy, "StatusIconsChanged", G_CALLBACK(status_icon_changed), NULL, NULL);196 } else {
380 }197 /* If we're disconnecting, go back to offline */
381198 status_icon_cb(NULL, DEFAULT_ICON, NULL, NULL);
382 org_ayatana_indicator_status_service_status_icons_async(status_proxy, status_icon_cb, NULL);199 }
383200
384 return FALSE;201 return;
385}202}
386203
387/* Follow up the service being started by connecting204/* Builds the dbusmenu for the service. */
388 up the DBus Menu Client and creating our separator.
389 Also creates an idle func to connect to the service for
390 getting the icon that we should be using on the panel. */
391static void
392status_followup (void)
393{
394 status_client = dbusmenu_gtkclient_new(INDICATOR_STATUS_DBUS_NAME, INDICATOR_STATUS_DBUS_OBJECT);
395 g_signal_connect(G_OBJECT(status_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(status_menu_root_changed), main_menu);
396
397 status_separator = gtk_separator_menu_item_new();
398 gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), status_separator);
399 gtk_widget_hide(status_separator); /* Should be default, I'm just being explicit. $(%*#$ hide already! */
400
401 g_idle_add(connect_to_status, NULL);
402
403 return;
404}
405
406/* Users menu */
407
408static guint
409users_menu_pos_offset (void)
410{
411 guint position = 0;
412 if (SEPARATOR_SHOWN(status_separator)) {
413 GList * location = g_list_find(GTK_MENU_SHELL(main_menu)->children, status_separator);
414 position = g_list_position(GTK_MENU_SHELL(main_menu)->children, location) + 1;
415 }
416
417 return position;
418}
419
420static void
421users_menu_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint position, gpointer user_data)
422{
423 gtk_widget_show(GTK_WIDGET(users_separator));
424 return;
425}
426
427static void
428users_menu_removed (DbusmenuMenuitem * root, DbusmenuMenuitem * child, gpointer user_data)
429{
430 if (g_list_length(dbusmenu_menuitem_get_children(root)) == 0) {
431 gtk_widget_hide(GTK_WIDGET(users_separator));
432 }
433
434 return;
435}
436
437static void
438users_menu_root_changed(DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, GtkMenu * main)
439{
440 if (newroot == NULL) {
441 gtk_widget_hide(GTK_WIDGET(users_separator));
442 return;
443 }
444
445 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED, G_CALLBACK(child_added), GUINT_TO_POINTER(USERS_SECTION));
446 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(users_menu_added), NULL);
447 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(users_menu_removed), NULL);
448 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(child_moved), GUINT_TO_POINTER(USERS_SECTION));
449
450 GList * child = NULL;
451 guint count = 0;
452 for (child = dbusmenu_menuitem_get_children(newroot); child != NULL; child = g_list_next(child), count++) {
453 child_added(newroot, DBUSMENU_MENUITEM(child->data), count, GUINT_TO_POINTER(USERS_SECTION));
454 }
455
456 if (count > 0) {
457 gtk_widget_show(GTK_WIDGET(users_separator));
458 }
459
460 return;
461}
462
463/* Follow up the service being started by connecting
464 up the DBus Menu Client and creating our separator. */
465static void
466users_followup (void)
467{
468 users_client = dbusmenu_gtkclient_new(INDICATOR_USERS_DBUS_NAME, INDICATOR_USERS_DBUS_OBJECT);
469 g_signal_connect(G_OBJECT(users_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(users_menu_root_changed), main_menu);
470
471 users_separator = gtk_separator_menu_item_new();
472 gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), users_separator);
473 gtk_widget_hide(users_separator); /* Should be default, I'm just being explicit. $(%*#$ hide already! */
474
475 return;
476}
477
478/* Session Menu Stuff */
479
480static guint
481session_menu_pos_offset (void)
482{
483 guint position = 0;
484 if (SEPARATOR_SHOWN(users_separator)) {
485 GList * location = g_list_find(GTK_MENU_SHELL(main_menu)->children, users_separator);
486 position = g_list_position(GTK_MENU_SHELL(main_menu)->children, location) + 1;
487 } else if (SEPARATOR_SHOWN(status_separator)) {
488 GList * location = g_list_find(GTK_MENU_SHELL(main_menu)->children, status_separator);
489 position = g_list_position(GTK_MENU_SHELL(main_menu)->children, location) + 1;
490 }
491
492 return position;
493}
494
495static void
496session_menu_removed (DbusmenuMenuitem * root, DbusmenuMenuitem * child, gpointer user_data)
497{
498 return;
499}
500
501static void
502session_menu_root_changed(DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, GtkMenu * main)
503{
504 if (newroot == NULL) {
505 /* We're assuming this'll crash the least so it doesn't
506 hide a separator. May be a bad choice. */
507 return;
508 }
509
510 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED, G_CALLBACK(child_added), GUINT_TO_POINTER(SESSION_SECTION));
511 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(session_menu_removed), NULL);
512 g_signal_connect(G_OBJECT(newroot), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(child_moved), GUINT_TO_POINTER(SESSION_SECTION));
513
514 GList * child = NULL;
515 guint count = 0;
516 for (child = dbusmenu_menuitem_get_children(newroot); child != NULL; child = g_list_next(child), count++) {
517 child_added(newroot, DBUSMENU_MENUITEM(child->data), count, GUINT_TO_POINTER(SESSION_SECTION));
518 }
519
520 return;
521}
522
523/* Follow up the service being started by connecting
524 up the DBus Menu Client. */
525static void
526session_followup (void)
527{
528 session_client = dbusmenu_gtkclient_new(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_OBJECT);
529 g_signal_connect(G_OBJECT(session_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(session_menu_root_changed), main_menu);
530
531 return;
532}
533
534/* Base menu stuff */
535
536/* This takes the response to the service starting up.
537 It checks to see if it's started and if so, continues
538 with the follow function for the particular area that
539 it's working in. */
540static void
541start_service_phase2 (DBusGProxy * proxy, guint status, GError * error, gpointer data)
542{
543 /* If we've got an error respond to it */
544 if (error != NULL) {
545 g_critical("Starting service has resulted in error.");
546 g_error_free(error);
547 /* Try it all again, we need to get this started! */
548 g_idle_add(start_service, data);
549 return;
550 }
551
552 /* If it's not running or we started it, try again */
553 if (status != DBUS_START_REPLY_SUCCESS && status != DBUS_START_REPLY_ALREADY_RUNNING) {
554 g_critical("Return value isn't indicative of success: %d", status);
555 /* Try it all again, we need to get this started! */
556 g_idle_add(start_service, data);
557 return;
558 }
559
560 /* Check which part of the menu we're in and do the
561 appropriate follow up from the service being started. */
562 switch (GPOINTER_TO_INT(data)) {
563 case STATUS_SECTION:
564 status_followup();
565 break;
566 case USERS_SECTION:
567 users_followup();
568 break;
569 case SESSION_SECTION:
570 session_followup();
571 break;
572 default:
573 g_critical("Oh, how can we get a value that we don't know!");
574 break;
575 }
576
577 return;
578}
579
580/* Our idle service starter. It looks at the section that
581 we're doing and then asks async for that service to be
582 started by dbus. Probably not really useful to be in
583 the idle loop as it's so quick, but why not. */
584static gboolean
585start_service (gpointer userdata)
586{
587 g_debug("Starting a service");
588
589 if (proxy == NULL) {
590 /* If we don't have DBus, let's stay in the idle loop */
591 return TRUE;
592 }
593
594 const gchar * service = NULL;
595 switch (GPOINTER_TO_INT(userdata)) {
596 case STATUS_SECTION:
597 service = INDICATOR_STATUS_DBUS_NAME;
598 break;
599 case USERS_SECTION:
600 service = INDICATOR_USERS_DBUS_NAME;
601 break;
602 case SESSION_SECTION:
603 service = INDICATOR_SESSION_DBUS_NAME;
604 break;
605 default:
606 g_critical("Oh, how can we get a value that we don't know!");
607 return FALSE;
608 }
609
610 org_freedesktop_DBus_start_service_by_name_async (proxy, service, 0 /* Flags */, start_service_phase2, userdata);
611
612 return FALSE;
613}
614
615/* Indicator based function to get the menu for the whole
616 applet. This starts up asking for the parts of the menu
617 from the various services. */
618static GtkMenu *205static GtkMenu *
619get_menu (IndicatorObject * io)206get_menu (IndicatorObject * io)
620{207{
621 connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);208 return GTK_MENU(dbusmenu_gtkmenu_new(INDICATOR_ME_DBUS_NAME, INDICATOR_ME_DBUS_OBJECT));
622 proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
623 if (proxy == NULL) {
624 g_warning("Unable to get proxy for DBus itself. Seriously.");
625 }
626
627 /* Startup in the idle loop */
628 g_idle_add(start_service, GINT_TO_POINTER(STATUS_SECTION));
629 g_idle_add(start_service, GINT_TO_POINTER(USERS_SECTION));
630 g_idle_add(start_service, GINT_TO_POINTER(SESSION_SECTION));
631
632 /* Build a temp menu incase someone can ask for it
633 before the services start. Fast user! */
634 main_menu = GTK_MENU(gtk_menu_new());
635 loading_item = gtk_menu_item_new_with_label("Loading...");
636 gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), loading_item);
637 gtk_widget_show(GTK_WIDGET(loading_item));
638
639 return main_menu;
640}209}
641210
642211
643212
=== removed file 'src/lock-helper.c'
--- src/lock-helper.c 2009-10-07 17:10:38 +0000
+++ src/lock-helper.c 1970-01-01 00:00:00 +0000
@@ -1,326 +0,0 @@
1/*
2A small helper for locking the screen.
3
4Copyright 2009 Canonical Ltd.
5
6Authors:
7 Ted Gould <ted@canonical.com>
8
9This program is free software: you can redistribute it and/or modify it
10under the terms of the GNU General Public License version 3, as published
11by the Free Software Foundation.
12
13This program is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranties of
15MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16PURPOSE. See the GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License along
19with this program. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#include <dbus/dbus-glib.h>
23#include "lock-helper.h"
24
25static DBusGProxy * gss_proxy = NULL;
26static GMainLoop * gss_mainloop = NULL;
27static guint cookie = 0;
28static DBusGProxyCall * cookie_call = NULL;
29
30static DBusGProxy * gdm_settings_proxy = NULL;
31static gboolean gdm_auto_login = FALSE;
32static const gchar * gdm_auto_login_string = "daemon/AutomaticLoginEnable";
33
34static gboolean is_guest = FALSE;
35
36static gdm_autologin_cb_t gdm_autologin_cb = NULL;
37
38/* Checks to see if there is an error and reports
39 it. Not much else we can do. */
40static void
41unthrottle_return (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data)
42{
43 GError * error = NULL;
44 dbus_g_proxy_end_call(proxy, call, &error,
45 G_TYPE_INVALID);
46
47 if (error != NULL) {
48 g_warning("Unable to unthrottle: %s", error->message);
49 }
50 return;
51}
52
53/* Sends an unthrottle if we're throttled. */
54void
55screensaver_unthrottle (void)
56{
57 g_return_if_fail(cookie != 0);
58
59 dbus_g_proxy_begin_call(gss_proxy, "UnThrottle",
60 unthrottle_return, NULL,
61 NULL,
62 G_TYPE_UINT, cookie,
63 G_TYPE_INVALID);
64
65 cookie = 0;
66 return;
67}
68
69/* Gets there return cookie from the throttle command
70 and sets things valid */
71static void
72throttle_return (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data)
73{
74 GError * error = NULL;
75 cookie_call = NULL;
76
77 dbus_g_proxy_end_call(proxy, call, &error,
78 G_TYPE_UINT, &cookie,
79 G_TYPE_INVALID);
80
81 if (error != NULL) {
82 g_warning("Unable to throttle the screensaver: %s", error->message);
83 return;
84 }
85
86
87 if (cookie == 0) {
88 g_warning("We didn't get a throttle cookie!");
89 }
90
91 return;
92}
93
94/* Throttling the screensaver by using the screen saver
95 command. */
96void
97screensaver_throttle (gchar * reason)
98{
99 g_return_if_fail(cookie_call == NULL);
100 g_return_if_fail(will_lock_screen());
101
102 if (cookie != 0) {
103 screensaver_unthrottle();
104 }
105
106 cookie_call = dbus_g_proxy_begin_call(gss_proxy, "Throttle",
107 throttle_return, NULL,
108 NULL,
109 G_TYPE_STRING, "Session Menu",
110 G_TYPE_STRING, reason,
111 G_TYPE_INVALID);
112
113 return;
114}
115
116/* Setting up a call back */
117void
118lock_screen_gdm_cb_set (gdm_autologin_cb_t cb)
119{
120 if (gdm_autologin_cb) {
121 g_warning("Already had a callback, setting up a new one...");
122 }
123
124 gdm_autologin_cb = cb;
125 return;
126}
127
128/* This is our logic on whether the screen should be locked
129 or not. It effects everything else. */
130gboolean
131will_lock_screen (void)
132{
133 if (gdm_auto_login) {
134 return FALSE;
135 }
136 if (is_guest) {
137 return FALSE;
138 }
139
140 return TRUE;
141}
142
143/* Respond to the signal of autologin changing to see if the
144 setting for timed login changes. */
145static void
146gdm_settings_change (DBusGProxy * proxy, const gchar * value, const gchar * old, const gchar * new, gpointer data)
147{
148 if (g_strcmp0(value, gdm_auto_login_string)) {
149 /* This is not a setting that we care about,
150 there is only one. */
151 return;
152 }
153 g_debug("GDM Settings change: %s", new);
154
155 if (g_strcmp0(new, "true") == 0) {
156 gdm_auto_login = TRUE;
157 } else {
158 gdm_auto_login = FALSE;
159 }
160
161 if (gdm_autologin_cb != NULL) {
162 gdm_autologin_cb();
163 }
164
165 return;
166}
167
168/* Get back the data from querying to see if there is auto
169 login enabled in GDM */
170static void
171gdm_get_autologin (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data)
172{
173 GError * error = NULL;
174 gchar * value = NULL;
175
176 if (!dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_STRING, &value, G_TYPE_INVALID)) {
177 g_warning("Unable to get autologin setting: %s", error != NULL ? error->message : "null");
178 g_error_free(error);
179 return;
180 }
181
182 g_return_if_fail(value != NULL);
183 gdm_settings_change(proxy, gdm_auto_login_string, NULL, value, NULL);
184
185 return;
186}
187
188/* Sets up the proxy and queries for the setting to know
189 whether we're doing an autologin. */
190static void
191build_gdm_proxy (void)
192{
193 g_return_if_fail(gdm_settings_proxy == NULL);
194
195 /* Grab the system bus */
196 DBusGConnection * bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
197 g_return_if_fail(bus != NULL);
198
199 /* Get the settings proxy */
200 gdm_settings_proxy = dbus_g_proxy_new_for_name_owner(bus,
201 "org.gnome.DisplayManager",
202 "/org/gnome/DisplayManager/Settings",
203 "org.gnome.DisplayManager.Settings", NULL);
204 g_return_if_fail(gdm_settings_proxy != NULL);
205
206 /* Signal for value changed */
207 dbus_g_proxy_add_signal(gdm_settings_proxy,
208 "ValueChanged",
209 G_TYPE_STRING,
210 G_TYPE_STRING,
211 G_TYPE_STRING,
212 G_TYPE_INVALID);
213 dbus_g_proxy_connect_signal(gdm_settings_proxy,
214 "ValueChanged",
215 G_CALLBACK(gdm_settings_change),
216 NULL,
217 NULL);
218
219 /* Start to get the initial value */
220 dbus_g_proxy_begin_call(gdm_settings_proxy,
221 "GetValue",
222 gdm_get_autologin,
223 NULL,
224 NULL,
225 G_TYPE_STRING,
226 gdm_auto_login_string,
227 G_TYPE_INVALID);
228
229 return;
230}
231
232/* When the screensave go active, if we've got a mainloop
233 running we should quit it. */
234static void
235gss_active_changed (DBusGProxy * proxy, gboolean active, gpointer data)
236{
237 if (active && gss_mainloop != NULL) {
238 g_main_loop_quit(gss_mainloop);
239 }
240
241 return;
242}
243
244/* Build the gss proxy and set up it's signals */
245void
246build_gss_proxy (void)
247{
248 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
249 g_return_if_fail(session_bus != NULL);
250
251 gss_proxy = dbus_g_proxy_new_for_name_owner(session_bus,
252 "org.gnome.ScreenSaver",
253 "/",
254 "org.gnome.ScreenSaver",
255 NULL);
256 g_return_if_fail(gss_proxy != NULL);
257
258 dbus_g_proxy_add_signal(gss_proxy, "ActiveChanged", G_TYPE_BOOLEAN, G_TYPE_INVALID);
259 dbus_g_proxy_connect_signal(gss_proxy, "ActiveChanged", G_CALLBACK(gss_active_changed), NULL, NULL);
260
261 return;
262}
263
264/* This is a timeout, we only want to wait for the screen to
265 lock for a little bit, but not forever. */
266static gboolean
267activate_timeout (gpointer data)
268{
269 guint * address = (guint *)data;
270 *address = 0;
271
272 if (gss_mainloop != NULL) {
273 g_main_loop_quit(gss_mainloop);
274 }
275
276 return FALSE;
277}
278
279/* A fun little function to actually lock the screen. If,
280 that's what you want, let's do it! */
281void
282lock_screen (DbusmenuMenuitem * mi, gpointer data)
283{
284 g_debug("Lock Screen");
285 if (!will_lock_screen()) {
286 g_debug("\tGDM set to autologin, blocking lock");
287 return;
288 }
289
290 g_return_if_fail(gss_proxy != NULL);
291
292 dbus_g_proxy_call_no_reply(gss_proxy,
293 "Lock",
294 G_TYPE_INVALID,
295 G_TYPE_INVALID);
296
297 if (gss_mainloop == NULL) {
298 gss_mainloop = g_main_loop_new(NULL, FALSE);
299 }
300
301 guint timer = g_timeout_add_seconds(1, activate_timeout, &timer);
302
303 g_main_loop_run(gss_mainloop);
304
305 if (timer != 0) {
306 g_source_remove(timer);
307 }
308
309 return;
310}
311
312/* Do what it takes to make the lock screen function work
313 and be happy. */
314gboolean
315lock_screen_setup (gpointer data)
316{
317 if (!g_strcmp0(g_get_user_name(), "guest")) {
318 is_guest = TRUE;
319 }
320
321 build_gdm_proxy();
322 build_gss_proxy();
323
324 return FALSE;
325}
326
3270
=== removed file 'src/lock-helper.h'
--- src/lock-helper.h 2009-10-07 15:57:52 +0000
+++ src/lock-helper.h 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
1/*
2A small helper for locking the screen.
3
4Copyright 2009 Canonical Ltd.
5
6Authors:
7 Ted Gould <ted@canonical.com>
8
9This program is free software: you can redistribute it and/or modify it
10under the terms of the GNU General Public License version 3, as published
11by the Free Software Foundation.
12
13This program is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranties of
15MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16PURPOSE. See the GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License along
19with this program. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#ifndef LOCK_HELPER_H__
23#define LOCK_HELPER_H__
24
25#include <libdbusmenu-glib/menuitem.h>
26
27typedef void (*gdm_autologin_cb_t) (void);
28
29void screensaver_throttle (gchar * reason);
30void screensaver_unthrottle (void);
31
32gboolean will_lock_screen (void);
33void lock_screen (DbusmenuMenuitem * mi, gpointer data);
34gboolean lock_screen_setup (gpointer data);
35void lock_screen_gdm_cb_set (gdm_autologin_cb_t cb);
36
37#endif /* LOCK_HELPER_H__ */
380
=== renamed file 'src/status-service-dbus.c' => 'src/me-service-dbus.c'
--- src/status-service-dbus.c 2009-08-08 20:54:51 +0000
+++ src/me-service-dbus.c 2010-01-04 21:25:21 +0000
@@ -27,17 +27,17 @@
27#include <dbus/dbus-glib.h>27#include <dbus/dbus-glib.h>
2828
29#include "dbus-shared-names.h"29#include "dbus-shared-names.h"
30#include "status-service-dbus.h"30#include "me-service-dbus.h"
3131
32static void status_service_dbus_class_init (StatusServiceDbusClass *klass);32static void status_service_dbus_class_init (StatusServiceDbusClass *klass);
33static void status_service_dbus_init (StatusServiceDbus *self);33static void status_service_dbus_init (StatusServiceDbus *self);
34static void status_service_dbus_dispose (GObject *object);34static void status_service_dbus_dispose (GObject *object);
35static void status_service_dbus_finalize (GObject *object);35static void status_service_dbus_finalize (GObject *object);
36static gboolean _status_service_server_watch (StatusServiceDbus * service, GError ** error);36static gboolean _me_service_server_watch (StatusServiceDbus * service, GError ** error);
37static gboolean _status_service_server_status_icons (StatusServiceDbus * service, gchar ** icon, GError ** error);37static gboolean _me_service_server_status_icons (StatusServiceDbus * service, gchar ** icon, GError ** error);
38static gboolean _status_service_server_pretty_user_name (StatusServiceDbus * service, gchar ** username, GError ** error);38static gboolean _me_service_server_pretty_user_name (StatusServiceDbus * service, gchar ** username, GError ** error);
3939
40#include "status-service-server.h"40#include "me-service-server.h"
4141
42/* Private */42/* Private */
43typedef struct _StatusServiceDbusPrivate StatusServiceDbusPrivate;43typedef struct _StatusServiceDbusPrivate StatusServiceDbusPrivate;
@@ -106,7 +106,7 @@
106 g_cclosure_marshal_VOID__STRING,106 g_cclosure_marshal_VOID__STRING,
107 G_TYPE_NONE, 1, G_TYPE_STRING);107 G_TYPE_NONE, 1, G_TYPE_STRING);
108108
109 dbus_g_object_type_install_info(STATUS_SERVICE_DBUS_TYPE, &dbus_glib__status_service_server_object_info);109 dbus_g_object_type_install_info(STATUS_SERVICE_DBUS_TYPE, &dbus_glib__me_service_server_object_info);
110 110
111 return;111 return;
112}112}
@@ -117,7 +117,7 @@
117117
118 DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);118 DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
119 dbus_g_connection_register_g_object(connection,119 dbus_g_connection_register_g_object(connection,
120 INDICATOR_STATUS_SERVICE_DBUS_OBJECT,120 INDICATOR_ME_SERVICE_DBUS_OBJECT,
121 G_OBJECT(self));121 G_OBJECT(self));
122122
123 StatusServiceDbusPrivate * priv = STATUS_SERVICE_DBUS_GET_PRIVATE(self);123 StatusServiceDbusPrivate * priv = STATUS_SERVICE_DBUS_GET_PRIVATE(self);
@@ -144,14 +144,14 @@
144}144}
145145
146static gboolean146static gboolean
147_status_service_server_watch (StatusServiceDbus * service, GError ** error)147_me_service_server_watch (StatusServiceDbus * service, GError ** error)
148{148{
149149
150 return TRUE;150 return TRUE;
151}151}
152152
153static gboolean153static gboolean
154_status_service_server_status_icons (StatusServiceDbus * service, gchar ** icon, GError ** error)154_me_service_server_status_icons (StatusServiceDbus * service, gchar ** icon, GError ** error)
155{155{
156 if (!IS_STATUS_SERVICE_DBUS(service)) {156 if (!IS_STATUS_SERVICE_DBUS(service)) {
157 g_warning("NO BAD EVIL!");157 g_warning("NO BAD EVIL!");
@@ -169,7 +169,7 @@
169}169}
170170
171static gboolean171static gboolean
172_status_service_server_pretty_user_name (StatusServiceDbus * service, gchar ** username, GError ** error)172_me_service_server_pretty_user_name (StatusServiceDbus * service, gchar ** username, GError ** error)
173{173{
174 if (!IS_STATUS_SERVICE_DBUS(service)) {174 if (!IS_STATUS_SERVICE_DBUS(service)) {
175 g_warning("NO BAD EVIL!");175 g_warning("NO BAD EVIL!");
176176
=== renamed file 'src/status-service-dbus.h' => 'src/me-service-dbus.h'
=== renamed file 'src/status-service.c' => 'src/me-service.c'
--- src/status-service.c 2009-10-06 22:51:09 +0000
+++ src/me-service.c 2010-01-04 21:25:21 +0000
@@ -35,9 +35,11 @@
35#include <libdbusmenu-glib/server.h>35#include <libdbusmenu-glib/server.h>
36#include <libdbusmenu-glib/menuitem.h>36#include <libdbusmenu-glib/menuitem.h>
3737
38#include <libindicator/indicator-service.h>
39
38#include "dbus-shared-names.h"40#include "dbus-shared-names.h"
3941
40#include "status-service-dbus.h"42#include "me-service-dbus.h"
4143
42#include "status-provider.h"44#include "status-provider.h"
43#include "status-provider-mc5.h"45#include "status-provider-mc5.h"
@@ -73,7 +75,6 @@
7375
7476
75static DbusmenuMenuitem * root_menuitem = NULL;77static DbusmenuMenuitem * root_menuitem = NULL;
76static DbusmenuMenuitem * status_menuitem = NULL;
77static DbusmenuMenuitem * status_menuitems[STATUS_PROVIDER_STATUS_LAST] = {0};78static DbusmenuMenuitem * status_menuitems[STATUS_PROVIDER_STATUS_LAST] = {0};
78static GMainLoop * mainloop = NULL;79static GMainLoop * mainloop = NULL;
79static StatusServiceDbus * dbus_interface = NULL;80static StatusServiceDbus * dbus_interface = NULL;
@@ -107,7 +108,7 @@
107 StatusProviderStatus i;108 StatusProviderStatus i;
108 for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) {109 for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) {
109 if (status_menuitems[i] == NULL) continue;110 if (status_menuitems[i] == NULL) continue;
110 dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");111 dbusmenu_menuitem_property_set_bool(status_menuitems[i], DBUSMENU_MENUITEM_PROP_SENSITIVE, FALSE);
111 }112 }
112 }113 }
113114
@@ -117,7 +118,7 @@
117 StatusProviderStatus i;118 StatusProviderStatus i;
118 for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) {119 for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) {
119 if (status_menuitems[i] == NULL) continue;120 if (status_menuitems[i] == NULL) continue;
120 dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_SENSITIVE, "true");121 dbusmenu_menuitem_property_set_bool(status_menuitems[i], DBUSMENU_MENUITEM_PROP_SENSITIVE, TRUE);
121 }122 }
122 }123 }
123 }124 }
@@ -171,7 +172,7 @@
171 if (name[0] != '\0') {172 if (name[0] != '\0') {
172 DbusmenuMenuitem * useritem = dbusmenu_menuitem_new();173 DbusmenuMenuitem * useritem = dbusmenu_menuitem_new();
173 dbusmenu_menuitem_property_set(useritem, DBUSMENU_MENUITEM_PROP_LABEL, name);174 dbusmenu_menuitem_property_set(useritem, DBUSMENU_MENUITEM_PROP_LABEL, name);
174 dbusmenu_menuitem_property_set(useritem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");175 dbusmenu_menuitem_property_set_bool(useritem, DBUSMENU_MENUITEM_PROP_SENSITIVE, FALSE);
175 dbusmenu_menuitem_child_append(root, useritem);176 dbusmenu_menuitem_child_append(root, useritem);
176 }177 }
177178
@@ -191,10 +192,6 @@
191192
192 build_user_item(root);193 build_user_item(root);
193194
194 status_menuitem = dbusmenu_menuitem_new();
195 dbusmenu_menuitem_property_set(status_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Set Status"));
196 dbusmenu_menuitem_child_append(root, status_menuitem);
197
198 StatusProviderStatus i;195 StatusProviderStatus i;
199 for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) {196 for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_LAST; i++) {
200 if (i == STATUS_PROVIDER_STATUS_DISCONNECTED) {197 if (i == STATUS_PROVIDER_STATUS_DISCONNECTED) {
@@ -205,15 +202,14 @@
205202
206 status_menuitems[i] = dbusmenu_menuitem_new();203 status_menuitems[i] = dbusmenu_menuitem_new();
207204
208 dbusmenu_menuitem_property_set(status_menuitems[i], "type", DBUSMENU_CLIENT_TYPES_IMAGE);
209 dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[i]));205 dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_LABEL, _(status_strings[i]));
210 dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_ICON, status_icons[i]);206 dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_ICON, status_icons[i]);
211 if (global_status == STATUS_PROVIDER_STATUS_DISCONNECTED) {207 if (global_status == STATUS_PROVIDER_STATUS_DISCONNECTED) {
212 dbusmenu_menuitem_property_set(status_menuitems[i], DBUSMENU_MENUITEM_PROP_SENSITIVE, "false");208 dbusmenu_menuitem_property_set_bool(status_menuitems[i], DBUSMENU_MENUITEM_PROP_SENSITIVE, FALSE);
213 }209 }
214 g_signal_connect(G_OBJECT(status_menuitems[i]), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(status_menu_click), GINT_TO_POINTER(i));210 g_signal_connect(G_OBJECT(status_menuitems[i]), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(status_menu_click), GINT_TO_POINTER(i));
215211
216 dbusmenu_menuitem_child_append(status_menuitem, status_menuitems[i]);212 dbusmenu_menuitem_child_append(root, status_menuitems[i]);
217213
218 g_debug("Built %s", status_strings[i]);214 g_debug("Built %s", status_strings[i]);
219 }215 }
@@ -221,6 +217,14 @@
221 return FALSE;217 return FALSE;
222}218}
223219
220void
221service_shutdown (IndicatorService * service, gpointer user_data)
222{
223 g_debug("Service shutting down");
224 g_main_loop_quit(mainloop);
225 return;
226}
227
224int228int
225main (int argc, char ** argv)229main (int argc, char ** argv)
226{230{
@@ -232,25 +236,13 @@
232 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);236 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
233 textdomain (GETTEXT_PACKAGE);237 textdomain (GETTEXT_PACKAGE);
234238
235 DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);239 IndicatorService * service = indicator_service_new_version(INDICATOR_ME_DBUS_NAME, INDICATOR_ME_DBUS_VERSION);
236 DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);240 g_signal_connect(G_OBJECT(service), INDICATOR_SERVICE_SIGNAL_SHUTDOWN, G_CALLBACK(service_shutdown), NULL);
237 GError * error = NULL;
238 guint nameret = 0;
239
240 if (!org_freedesktop_DBus_request_name(bus_proxy, INDICATOR_STATUS_DBUS_NAME, 0, &nameret, &error)) {
241 g_error("Unable to call to request name");
242 return 1;
243 }
244
245 if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
246 g_error("Unable to get name");
247 return 1;
248 }
249241
250 g_idle_add(build_providers, NULL);242 g_idle_add(build_providers, NULL);
251243
252 root_menuitem = dbusmenu_menuitem_new();244 root_menuitem = dbusmenu_menuitem_new();
253 DbusmenuServer * server = dbusmenu_server_new(INDICATOR_STATUS_DBUS_OBJECT);245 DbusmenuServer * server = dbusmenu_server_new(INDICATOR_ME_DBUS_OBJECT);
254 dbusmenu_server_set_root(server, root_menuitem);246 dbusmenu_server_set_root(server, root_menuitem);
255247
256 g_idle_add(build_menu, root_menuitem);248 g_idle_add(build_menu, root_menuitem);
257249
=== renamed file 'src/status-service.xml' => 'src/me-service.xml'
--- src/status-service.xml 2009-08-08 16:47:24 +0000
+++ src/me-service.xml 2010-01-04 21:25:21 +0000
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?>1<?xml version="1.0" encoding="UTF-8"?>
2<node name="/">2<node name="/">
3 <interface name="org.ayatana.indicator.status.service">3 <interface name="org.ayatana.indicator.me.service">
44
5<!-- Methods -->5<!-- Methods -->
6 <method name="Watch">6 <method name="Watch">
77
=== removed file 'src/session-service.c'
--- src/session-service.c 2009-10-07 16:56:05 +0000
+++ src/session-service.c 1970-01-01 00:00:00 +0000
@@ -1,339 +0,0 @@
1/*
2A small wrapper utility to load indicators and put them as menu items
3into the gnome-panel using it's applet interface.
4
5Copyright 2009 Canonical Ltd.
6
7Authors:
8 Ted Gould <ted@canonical.com>
9 Christoph Korn <c_korn@gmx.de>
10
11This program is free software: you can redistribute it and/or modify it
12under the terms of the GNU General Public License version 3, as published
13by the Free Software Foundation.
14
15This program is distributed in the hope that it will be useful, but
16WITHOUT ANY WARRANTY; without even the implied warranties of
17MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18PURPOSE. See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License along
21with this program. If not, see <http://www.gnu.org/licenses/>.
22*/
23
24#include <config.h>
25
26#include <glib/gi18n.h>
27
28#include <dbus/dbus-glib.h>
29#include <dbus/dbus-glib-bindings.h>
30
31#include <libdbusmenu-glib/server.h>
32#include <libdbusmenu-glib/menuitem.h>
33
34#include "dbus-shared-names.h"
35
36#include "gtk-dialog/gconf-helper.h"
37
38#include "lock-helper.h"
39
40#define DKP_ADDRESS "org.freedesktop.DeviceKit.Power"
41#define DKP_OBJECT "/org/freedesktop/DeviceKit/Power"
42#define DKP_INTERFACE "org.freedesktop.DeviceKit.Power"
43
44static DbusmenuMenuitem * root_menuitem = NULL;
45static GMainLoop * mainloop = NULL;
46static DBusGProxy * dkp_main_proxy = NULL;
47static DBusGProxy * dkp_prop_proxy = NULL;
48
49static DBusGProxyCall * suspend_call = NULL;
50static DBusGProxyCall * hibernate_call = NULL;
51
52static DbusmenuMenuitem * hibernate_mi = NULL;
53static DbusmenuMenuitem * suspend_mi = NULL;
54static DbusmenuMenuitem * logout_mi = NULL;
55static DbusmenuMenuitem * restart_mi = NULL;
56static DbusmenuMenuitem * shutdown_mi = NULL;
57
58/* A return from the command to sleep the system. Make sure
59 that we unthrottle the screensaver. */
60static void
61sleep_response (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data)
62{
63 screensaver_unthrottle();
64 return;
65}
66
67/* Let's put this machine to sleep, with some info on how
68 it should sleep. */
69static void
70sleep (DbusmenuMenuitem * mi, gpointer userdata)
71{
72 gchar * type = (gchar *)userdata;
73
74 if (dkp_main_proxy == NULL) {
75 g_warning("Can not %s as no DeviceKit Power Proxy", type);
76 }
77
78 screensaver_throttle(type);
79 lock_screen(NULL, NULL);
80
81 dbus_g_proxy_begin_call(dkp_main_proxy,
82 type,
83 sleep_response,
84 NULL,
85 NULL,
86 G_TYPE_INVALID);
87
88 return;
89}
90
91/* A response to getting the suspend property */
92static void
93suspend_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata)
94{
95 suspend_call = NULL;
96
97 GValue candoit = {0};
98 GError * error = NULL;
99 dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_VALUE, &candoit, G_TYPE_INVALID);
100 if (error != NULL) {
101 g_warning("Unable to check suspend: %s", error->message);
102 g_error_free(error);
103 return;
104 }
105 g_debug("Got Suspend: %s", g_value_get_boolean(&candoit) ? "true" : "false");
106
107 if (suspend_mi != NULL) {
108 dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false");
109 }
110
111 return;
112}
113
114/* Response to getting the hibernate property */
115static void
116hibernate_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata)
117{
118 hibernate_call = NULL;
119
120 GValue candoit = {0};
121 GError * error = NULL;
122 dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_VALUE, &candoit, G_TYPE_INVALID);
123 if (error != NULL) {
124 g_warning("Unable to check hibernate: %s", error->message);
125 g_error_free(error);
126 return;
127 }
128 g_debug("Got Hibernate: %s", g_value_get_boolean(&candoit) ? "true" : "false");
129
130 if (suspend_mi != NULL) {
131 dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean(&candoit) ? "true" : "false");
132 }
133
134 return;
135}
136
137/* A signal that we need to recheck to ensure we can still
138 hibernate and/or suspend */
139static void
140dpk_changed_cb (DBusGProxy * proxy, gpointer user_data)
141{
142 /* Start Async call to see if we can hibernate */
143 if (suspend_call == NULL) {
144 suspend_call = dbus_g_proxy_begin_call(dkp_prop_proxy,
145 "Get",
146 suspend_prop_cb,
147 NULL,
148 NULL,
149 G_TYPE_STRING,
150 DKP_INTERFACE,
151 G_TYPE_STRING,
152 "can-suspend",
153 G_TYPE_INVALID,
154 G_TYPE_VALUE,
155 G_TYPE_INVALID);
156 }
157
158 /* Start Async call to see if we can suspend */
159 if (hibernate_call == NULL) {
160 hibernate_call = dbus_g_proxy_begin_call(dkp_prop_proxy,
161 "Get",
162 hibernate_prop_cb,
163 NULL,
164 NULL,
165 G_TYPE_STRING,
166 DKP_INTERFACE,
167 G_TYPE_STRING,
168 "can-hibernate",
169 G_TYPE_INVALID,
170 G_TYPE_VALUE,
171 G_TYPE_INVALID);
172 }
173
174 return;
175}
176
177/* This function goes through and sets up what we need for
178 DKp checking. We're even setting up the calls for the props
179 we need */
180static void
181setup_dkp (void) {
182 DBusGConnection * bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
183 g_return_if_fail(bus != NULL);
184
185 if (dkp_main_proxy == NULL) {
186 dkp_main_proxy = dbus_g_proxy_new_for_name(bus,
187 DKP_ADDRESS,
188 DKP_OBJECT,
189 DKP_INTERFACE);
190 }
191 g_return_if_fail(dkp_main_proxy != NULL);
192
193 if (dkp_prop_proxy == NULL) {
194 dkp_prop_proxy = dbus_g_proxy_new_for_name(bus,
195 DKP_ADDRESS,
196 DKP_OBJECT,
197 DBUS_INTERFACE_PROPERTIES);
198 }
199 g_return_if_fail(dkp_prop_proxy != NULL);
200
201 /* Connect to changed signal */
202 dbus_g_proxy_add_signal(dkp_main_proxy,
203 "Changed",
204 G_TYPE_INVALID);
205
206 dbus_g_proxy_connect_signal(dkp_main_proxy,
207 "Changed",
208 G_CALLBACK(dpk_changed_cb),
209 NULL,
210 NULL);
211
212 /* Force an original "changed" event */
213 dpk_changed_cb(dkp_main_proxy, NULL);
214
215 return;
216}
217
218/* This is the function to show a dialog on actions that
219 can destroy data. Currently it just calls the GTK version
220 but it seems that in the future it should figure out
221 what's going on and something better. */
222static void
223show_dialog (DbusmenuMenuitem * mi, gchar * type)
224{
225 gchar * helper = g_build_filename(LIBEXECDIR, "gtk-logout-helper", NULL);
226 gchar * dialog_line = g_strdup_printf("%s --%s", helper, type);
227 g_free(helper);
228
229 g_debug("Showing dialog '%s'", dialog_line);
230
231 GError * error = NULL;
232 if (!g_spawn_command_line_async(dialog_line, &error)) {
233 g_warning("Unable to show dialog: %s", error->message);
234 g_error_free(error);
235 }
236
237 g_free(dialog_line);
238
239 return;
240}
241
242/* This function creates all of the menuitems that the service
243 provides in the UI. It also connects them to the callbacks. */
244static void
245create_items (DbusmenuMenuitem * root) {
246 logout_mi = dbusmenu_menuitem_new();
247 if (supress_confirmations()) {
248 dbusmenu_menuitem_property_set(logout_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out"));
249 } else {
250 dbusmenu_menuitem_property_set(logout_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out..."));
251 }
252 dbusmenu_menuitem_child_append(root, logout_mi);
253 g_signal_connect(G_OBJECT(logout_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "logout");
254
255 suspend_mi = dbusmenu_menuitem_new();
256 dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
257 dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Suspend"));
258 dbusmenu_menuitem_child_append(root, suspend_mi);
259 g_signal_connect(G_OBJECT(suspend_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Suspend");
260
261 hibernate_mi = dbusmenu_menuitem_new();
262 dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
263 dbusmenu_menuitem_property_set(hibernate_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Hibernate"));
264 dbusmenu_menuitem_child_append(root, hibernate_mi);
265 g_signal_connect(G_OBJECT(hibernate_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(sleep), "Hibernate");
266
267 restart_mi = dbusmenu_menuitem_new();
268 if (supress_confirmations()) {
269 dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart"));
270 } else {
271 dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart..."));
272 }
273 dbusmenu_menuitem_child_append(root, restart_mi);
274 g_signal_connect(G_OBJECT(restart_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "restart");
275
276 shutdown_mi = dbusmenu_menuitem_new();
277 if (supress_confirmations()) {
278 dbusmenu_menuitem_property_set(shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shut Down"));
279 } else {
280 dbusmenu_menuitem_property_set(shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shut Down..."));
281 }
282 dbusmenu_menuitem_child_append(root, shutdown_mi);
283 g_signal_connect(G_OBJECT(shutdown_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "shutdown");
284
285 RestartShutdownLogoutMenuItems * restart_shutdown_logout_mi = g_new0 (RestartShutdownLogoutMenuItems, 1);
286 restart_shutdown_logout_mi->logout_mi = logout_mi;
287 restart_shutdown_logout_mi->restart_mi = restart_mi;
288 restart_shutdown_logout_mi->shutdown_mi = shutdown_mi;
289
290 update_menu_entries(restart_shutdown_logout_mi);
291
292 return;
293}
294
295/* Main, is well, main. It brings everything up and throws
296 us into the mainloop of no return. */
297int
298main (int argc, char ** argv)
299{
300 g_type_init();
301
302 /* Setting up i18n and gettext. Apparently, we need
303 all of these. */
304 setlocale (LC_ALL, "");
305 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
306 textdomain (GETTEXT_PACKAGE);
307
308 DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
309 DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
310 GError * error = NULL;
311 guint nameret = 0;
312
313 if (!org_freedesktop_DBus_request_name(bus_proxy, INDICATOR_SESSION_DBUS_NAME, 0, &nameret, &error)) {
314 g_error("Unable to call to request name");
315 return 1;
316 }
317
318 if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
319 g_error("Unable to get name");
320 return 1;
321 }
322
323 g_idle_add(lock_screen_setup, NULL);
324
325 root_menuitem = dbusmenu_menuitem_new();
326 g_debug("Root ID: %d", dbusmenu_menuitem_get_id(root_menuitem));
327
328 create_items(root_menuitem);
329 setup_dkp();
330
331 DbusmenuServer * server = dbusmenu_server_new(INDICATOR_SESSION_DBUS_OBJECT);
332 dbusmenu_server_set_root(server, root_menuitem);
333
334 mainloop = g_main_loop_new(NULL, FALSE);
335 g_main_loop_run(mainloop);
336
337 return 0;
338}
339
3400
=== modified file 'src/status-provider-mc5.c'
--- src/status-provider-mc5.c 2009-10-08 20:12:42 +0000
+++ src/status-provider-mc5.c 2010-01-04 21:25:21 +0000
@@ -24,7 +24,7 @@
24#include "config.h"24#include "config.h"
25#endif25#endif
2626
27#include "libempathy/empathy-account-manager.h"27#include <telepathy-glib/account-manager.h>
2828
29#include "status-provider.h"29#include "status-provider.h"
30#include "status-provider-mc5.h"30#include "status-provider-mc5.h"
@@ -65,7 +65,7 @@
6565
66typedef struct _StatusProviderMC5Private StatusProviderMC5Private;66typedef struct _StatusProviderMC5Private StatusProviderMC5Private;
67struct _StatusProviderMC5Private {67struct _StatusProviderMC5Private {
68 EmpathyAccountManager * manager;68 TpAccountManager * manager;
69 StatusProviderStatus status;69 StatusProviderStatus status;
70 DBusGProxy * dbus_proxy;70 DBusGProxy * dbus_proxy;
71};71};
@@ -83,7 +83,7 @@
83/* Internal Funcs */83/* Internal Funcs */
84static void set_status (StatusProvider * sp, StatusProviderStatus status);84static void set_status (StatusProvider * sp, StatusProviderStatus status);
85static StatusProviderStatus get_status (StatusProvider * sp);85static StatusProviderStatus get_status (StatusProvider * sp);
86static void presence_changed (EmpathyAccountManager * eam, guint type, const gchar * type_str, const gchar * message, StatusProviderMC5 * sp);86static void presence_changed (TpAccountManager * eam, guint type, const gchar * type_str, const gchar * message, StatusProviderMC5 * sp);
87static void dbus_namechange (DBusGProxy * proxy, const gchar * name, const gchar * prev, const gchar * new, StatusProviderMC5 * self);87static void dbus_namechange (DBusGProxy * proxy, const gchar * name, const gchar * prev, const gchar * new, StatusProviderMC5 * self);
88static void mc5_exists_cb (DBusGProxy * proxy, gboolean exists, GError * error, gpointer userdata);88static void mc5_exists_cb (DBusGProxy * proxy, gboolean exists, GError * error, gpointer userdata);
8989
@@ -109,25 +109,41 @@
109 return;109 return;
110}110}
111111
112/* Build our empathy account manager instance if we don't112/* Build our telepathy account manager instance if we don't
113 have one. */113 have one. */
114static void114static void
115build_eam (StatusProviderMC5 * self)115build_eam (StatusProviderMC5 * self)
116{116{
117 StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(self);117 StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(self);
118 static TpDBusDaemon *daemon = NULL;
119 GError *error = NULL;
118120
119 if (priv->manager != NULL) {121 if (priv->manager != NULL) {
120 return;122 return;
121 }123 }
122124 /* the daemon is used to communicate via DBus */
123 priv->manager = EMPATHY_ACCOUNT_MANAGER(g_object_new(EMPATHY_TYPE_ACCOUNT_MANAGER, NULL));125 daemon = tp_dbus_daemon_dup(&error);
124 g_signal_connect(G_OBJECT(priv->manager), "global-presence-changed", G_CALLBACK(presence_changed), self);126
127 if (daemon == NULL)
128 {
129 g_debug("Cannot create DBus daemon: %s\n", error->message);
130 g_error_free(error);
131 return;
132 }
133
134 priv->manager = TP_ACCOUNT_MANAGER (g_object_new (TP_TYPE_ACCOUNT_MANAGER,
135 "dbus-daemon", daemon,
136 "dbus-connection", ((TpProxy *) daemon)->dbus_connection,
137 "bus-name", "org.freedesktop.Telepathy.MissionControl5",
138 "object-path", "/org/freedesktop/Telepathy/AccountManager",
139 NULL));
140 g_signal_connect(G_OBJECT(priv->manager), "most-available-presence-changed", G_CALLBACK(presence_changed), self);
125141
126 return;142 return;
127}143}
128144
129/* Creating an instance of the status provider. We set the variables145/* Creating an instance of the status provider. We set the variables
130 and create an EmpathyAccountManager object. It does all the hard146 and create an TpAccountManager object. It does all the hard
131 work in this module of tracking MissionControl and enumerating the147 work in this module of tracking MissionControl and enumerating the
132 accounts and all that jazz. */148 accounts and all that jazz. */
133static void149static void
@@ -266,8 +282,7 @@
266 StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(sp);282 StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(sp);
267283
268 build_eam(STATUS_PROVIDER_MC5(sp));284 build_eam(STATUS_PROVIDER_MC5(sp));
269285 tp_account_manager_set_all_requested_presences(priv->manager, sp_to_tp_map[status], sp_to_mc_map[status], "");
270 empathy_account_manager_request_global_presence(priv->manager, sp_to_tp_map[status], sp_to_mc_map[status], "");
271286
272 return;287 return;
273}288}
@@ -287,11 +302,11 @@
287 return priv->status;302 return priv->status;
288}303}
289304
290/* A signal handler for when the EmpatyAccountManager believes305/* A signal handler for when the TpAccountManager believes
291 that the global status has changed. It roughly calculates this306 that the global status has changed. It roughly calculates this
292 by finding the most available of all accounts that are active. */307 by finding the most available of all accounts that are active. */
293static void308static void
294presence_changed (EmpathyAccountManager * eam, guint type, const gchar * type_str, const gchar * message, StatusProviderMC5 * sp)309presence_changed (TpAccountManager * eam, guint type, const gchar * type_str, const gchar * message, StatusProviderMC5 * sp)
295{310{
296 StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(sp);311 StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(sp);
297312
298313
=== removed file 'src/users-service-dbus.c'
--- src/users-service-dbus.c 2009-09-24 22:02:11 +0000
+++ src/users-service-dbus.c 1970-01-01 00:00:00 +0000
@@ -1,1147 +0,0 @@
1/*
2 * Copyright 2009 Canonical Ltd.
3 *
4 * Authors:
5 * Cody Russell <crussell@canonical.com>
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 3, as published
9 * by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranties of
13 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifdef HAVE_CONFIG_H
21#include "config.h"
22#endif
23
24#include <string.h>
25#include <errno.h>
26#include <pwd.h>
27
28#include <dbus/dbus-glib.h>
29#include <dbus/dbus-glib.h>
30#include <dbus/dbus-glib-lowlevel.h>
31
32#include "dbus-shared-names.h"
33#include "users-service-dbus.h"
34#include "users-service-client.h"
35#include "users-service-marshal.h"
36
37static void users_service_dbus_class_init (UsersServiceDbusClass *klass);
38static void users_service_dbus_init (UsersServiceDbus *self);
39static void users_service_dbus_dispose (GObject *object);
40static void users_service_dbus_finalize (GObject *object);
41static void create_gdm_proxy (UsersServiceDbus *self);
42static void create_seat_proxy (UsersServiceDbus *self);
43static void create_ck_proxy (UsersServiceDbus *self);
44static void create_cksession_proxy (UsersServiceDbus *self);
45static gchar *get_seat (UsersServiceDbus *service);
46static void users_loaded (DBusGProxy *proxy,
47 gpointer user_data);
48static void user_added (DBusGProxy *proxy,
49 gint64 uid,
50 gpointer user_data);
51static void user_removed (DBusGProxy *proxy,
52 gint64 uid,
53 gpointer user_data);
54static void user_updated (DBusGProxy *proxy,
55 guint uid,
56 gpointer user_data);
57static void seat_proxy_session_added (DBusGProxy *seat_proxy,
58 const gchar *session_id,
59 UsersServiceDbus *service);
60static void seat_proxy_session_removed (DBusGProxy *seat_proxy,
61 const gchar *session_id,
62 UsersServiceDbus *service);
63static gboolean do_add_session (UsersServiceDbus *service,
64 UserData *user,
65 const gchar *ssid);
66static gchar * get_seat_internal (UsersServiceDbus *self);
67
68/* Private */
69typedef struct _UsersServiceDbusPrivate UsersServiceDbusPrivate;
70
71struct _UsersServiceDbusPrivate
72{
73 GHashTable *users;
74 gint count;
75 gchar *seat;
76 gchar *ssid;
77
78 DBusGConnection *system_bus;
79
80 DBusGProxy *gdm_proxy;
81 DBusGProxy *ck_proxy;
82 DBusGProxy *seat_proxy;
83 DBusGProxy *session_proxy;
84
85 GHashTable *exclusions;
86 GHashTable *sessions;
87};
88
89#define USERS_SERVICE_DBUS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), USERS_SERVICE_DBUS_TYPE, UsersServiceDbusPrivate))
90
91/* Signals */
92enum {
93 USERS_LOADED,
94 USER_ADDED,
95 USER_REMOVED,
96 USER_UPDATED,
97 LAST_SIGNAL
98};
99
100static guint signals[LAST_SIGNAL] = { 0 };
101
102/* GObject Boilerplate */
103G_DEFINE_TYPE (UsersServiceDbus, users_service_dbus, G_TYPE_OBJECT);
104
105static void
106users_service_dbus_class_init (UsersServiceDbusClass *klass)
107{
108 GObjectClass *object_class = G_OBJECT_CLASS (klass);
109
110 g_type_class_add_private (object_class, sizeof (UsersServiceDbusPrivate));
111
112 object_class->dispose = users_service_dbus_dispose;
113 object_class->finalize = users_service_dbus_finalize;
114
115 signals[USERS_LOADED] = g_signal_new ("users-loaded",
116 G_TYPE_FROM_CLASS (klass),
117 G_SIGNAL_RUN_LAST,
118 G_STRUCT_OFFSET (UsersServiceDbusClass, users_loaded),
119 NULL, NULL,
120 g_cclosure_marshal_VOID__VOID,
121 G_TYPE_NONE, 0);
122
123 signals[USER_ADDED] = g_signal_new ("user-added",
124 G_TYPE_FROM_CLASS (klass),
125 G_SIGNAL_RUN_LAST,
126 G_STRUCT_OFFSET (UsersServiceDbusClass, user_added),
127 NULL, NULL,
128 _users_service_marshal_VOID__INT64,
129 G_TYPE_NONE, 1, G_TYPE_INT64);
130
131 signals[USER_REMOVED] = g_signal_new ("user-removed",
132 G_TYPE_FROM_CLASS (klass),
133 G_SIGNAL_RUN_LAST,
134 G_STRUCT_OFFSET (UsersServiceDbusClass, user_removed),
135 NULL, NULL,
136 _users_service_marshal_VOID__INT64,
137 G_TYPE_NONE, 1, G_TYPE_INT64);
138
139 signals[USER_UPDATED] = g_signal_new ("user-updated",
140 G_TYPE_FROM_CLASS (klass),
141 G_SIGNAL_RUN_LAST,
142 G_STRUCT_OFFSET (UsersServiceDbusClass, user_updated),
143 NULL, NULL,
144 _users_service_marshal_VOID__INT64,
145 G_TYPE_NONE, 1, G_TYPE_INT64);
146}
147
148static void
149users_service_dbus_init (UsersServiceDbus *self)
150{
151 GError *error = NULL;
152 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
153
154 priv->users = NULL;
155 priv->count = 0;
156
157 /* Get the system bus */
158 priv->system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
159 if (error != NULL)
160 {
161 g_error ("Unable to get system bus: %s", error->message);
162 g_error_free(error);
163
164 return;
165 }
166
167 priv->sessions = g_hash_table_new_full (g_str_hash,
168 g_str_equal,
169 g_free,
170 g_free);
171
172 priv->users = g_hash_table_new_full (g_str_hash,
173 g_str_equal,
174 g_free,
175 NULL);
176
177 dbus_g_object_register_marshaller (_users_service_marshal_VOID__INT64,
178 G_TYPE_NONE,
179 G_TYPE_INT64,
180 G_TYPE_INVALID);
181
182 create_gdm_proxy (self);
183 create_ck_proxy (self);
184 create_seat_proxy (self);
185
186 users_loaded (priv->gdm_proxy, self);
187}
188
189static void
190users_service_dbus_dispose (GObject *object)
191{
192 G_OBJECT_CLASS (users_service_dbus_parent_class)->dispose (object);
193}
194
195static void
196users_service_dbus_finalize (GObject *object)
197{
198 G_OBJECT_CLASS (users_service_dbus_parent_class)->finalize (object);
199}
200
201static void
202create_gdm_proxy (UsersServiceDbus *self)
203{
204 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
205 GError *error = NULL;
206
207 priv->gdm_proxy = dbus_g_proxy_new_for_name_owner (priv->system_bus,
208 "org.gnome.DisplayManager",
209 "/org/gnome/DisplayManager/UserManager",
210 "org.gnome.DisplayManager.UserManager",
211 &error);
212
213 if (!priv->gdm_proxy)
214 {
215 if (error != NULL)
216 {
217 g_error ("Unable to get DisplayManager proxy on system bus: %s", error->message);
218 g_error_free (error);
219 }
220
221 return;
222 }
223
224 dbus_g_proxy_add_signal (priv->gdm_proxy,
225 "UsersLoaded",
226 G_TYPE_INVALID);
227
228 dbus_g_proxy_add_signal (priv->gdm_proxy,
229 "UserAdded",
230 G_TYPE_INT64,
231 G_TYPE_INVALID);
232
233 dbus_g_proxy_add_signal (priv->gdm_proxy,
234 "UserRemoved",
235 G_TYPE_INT64,
236 G_TYPE_INVALID);
237
238 dbus_g_proxy_add_signal (priv->gdm_proxy,
239 "UserUpdated",
240 G_TYPE_INT64,
241 G_TYPE_INVALID);
242
243 dbus_g_proxy_connect_signal (priv->gdm_proxy,
244 "UsersLoaded",
245 G_CALLBACK (users_loaded),
246 self,
247 NULL);
248
249 dbus_g_proxy_connect_signal (priv->gdm_proxy,
250 "UserAdded",
251 G_CALLBACK (user_added),
252 self,
253 NULL);
254
255 dbus_g_proxy_connect_signal (priv->gdm_proxy,
256 "UserRemoved",
257 G_CALLBACK (user_removed),
258 self,
259 NULL);
260
261 dbus_g_proxy_connect_signal (priv->gdm_proxy,
262 "UserUpdated",
263 G_CALLBACK (user_updated),
264 self,
265 NULL);
266}
267
268static void
269create_ck_proxy (UsersServiceDbus *self)
270{
271 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
272
273 priv->ck_proxy = dbus_g_proxy_new_for_name (priv->system_bus,
274 "org.freedesktop.ConsoleKit",
275 "/org/freedesktop/ConsoleKit/Manager",
276 "org.freedesktop.ConsoleKit.Manager");
277
278 if (!priv->ck_proxy)
279 {
280 g_warning ("Failed to get ConsoleKit proxy.");
281 return;
282 }
283}
284
285static void
286create_seat_proxy (UsersServiceDbus *self)
287{
288 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
289 GError *error = NULL;
290
291 priv->seat = get_seat (self);
292 if (priv->seat == NULL)
293 {
294 return;
295 }
296
297 priv->seat_proxy = dbus_g_proxy_new_for_name_owner (priv->system_bus,
298 "org.freedesktop.ConsoleKit",
299 priv->seat,
300 "org.freedesktop.ConsoleKit.Seat",
301 &error);
302
303 if (!priv->seat_proxy)
304 {
305 if (error != NULL)
306 {
307 g_warning ("Failed to connect to the ConsoleKit seat: %s", error->message);
308 g_error_free (error);
309 }
310
311 return;
312 }
313
314 dbus_g_proxy_add_signal (priv->seat_proxy,
315 "SessionAdded",
316 DBUS_TYPE_G_OBJECT_PATH,
317 G_TYPE_INVALID);
318 dbus_g_proxy_add_signal (priv->seat_proxy,
319 "SessionRemoved",
320 DBUS_TYPE_G_OBJECT_PATH,
321 G_TYPE_INVALID);
322
323 dbus_g_proxy_connect_signal (priv->seat_proxy,
324 "SessionAdded",
325 G_CALLBACK (seat_proxy_session_added),
326 self,
327 NULL);
328 dbus_g_proxy_connect_signal (priv->seat_proxy,
329 "SessionRemoved",
330 G_CALLBACK (seat_proxy_session_removed),
331 self,
332 NULL);
333}
334
335static void
336create_cksession_proxy (UsersServiceDbus *service)
337{
338 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service);
339
340 priv->session_proxy = dbus_g_proxy_new_for_name (priv->system_bus,
341 "org.freedesktop.ConsoleKit",
342 priv->ssid,
343 "org.freedesktop.ConsoleKit.Session");
344
345 if (!priv->session_proxy)
346 {
347 g_warning ("Failed to get ConsoleKit session proxy");
348 return;
349 }
350}
351
352static gchar *
353get_seat (UsersServiceDbus *service)
354{
355 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service);
356 GError *error = NULL;
357 gchar *ssid = NULL;
358 gchar *seat;
359
360 if (!dbus_g_proxy_call (priv->ck_proxy,
361 "GetCurrentSession",
362 &error,
363 G_TYPE_INVALID,
364 DBUS_TYPE_G_OBJECT_PATH,
365 &ssid,
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches