Merge lp:~darkxst/ubuntu/quantal/gnome-shell/lp1128804 into lp:ubuntu/quantal-proposed/gnome-shell

Proposed by Tim Lunn
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~darkxst/ubuntu/quantal/gnome-shell/lp1128804
Merge into: lp:ubuntu/quantal-proposed/gnome-shell
Diff against target: 44531 lines (+14325/-15852)
112 files modified
.pc/.quilt_patches (+0/-1)
.pc/.quilt_series (+0/-1)
.pc/.version (+0/-1)
.pc/11-no-gettext.patch/configure.ac (+0/-276)
.pc/14_make-GLX-optional.patch/configure.ac (+0/-273)
.pc/14_make-GLX-optional.patch/src/gnome-shell-plugin.c (+0/-366)
.pc/14_make-GLX-optional.patch/src/shell-screen-grabber.c (+0/-219)
.pc/applied-patches (+0/-5)
.pc/git-set-ally-wm-theme.patch/js/ui/status/accessibility.js (+0/-163)
.pc/ubuntu-lightdm-user-switching.patch/js/ui/userMenu.js (+0/-868)
.pc/ubuntu_lock_on_suspend.patch/js/ui/userMenu.js (+0/-885)
Makefile.in (+1/-2)
NEWS (+28/-0)
aclocal.m4 (+596/-596)
configure (+10/-10)
configure.ac (+6/-12)
debian/changelog (+8/-0)
debian/patches/series (+1/-0)
docs/reference/shell/Makefile.in (+2/-2)
docs/reference/shell/html/ShellAppSystem.html (+132/-132)
docs/reference/shell/html/ShellEmbeddedWindow.html (+13/-13)
docs/reference/shell/html/ShellGenericContainer.html (+49/-49)
docs/reference/shell/html/ShellGtkEmbed.html (+10/-10)
docs/reference/shell/html/ShellMountOperation.html (+44/-44)
docs/reference/shell/html/ShellNetworkAgent.html (+60/-60)
docs/reference/shell/html/ShellSlicer.html (+9/-9)
docs/reference/shell/html/ShellStack.html (+8/-8)
docs/reference/shell/html/ShellTrayIcon.html (+24/-24)
docs/reference/shell/html/ShellTrayManager.html (+21/-21)
docs/reference/shell/html/annotation-glossary.html (+6/-9)
docs/reference/shell/html/api-index-full.html (+6/-2)
docs/reference/shell/html/ch01.html (+3/-3)
docs/reference/shell/html/ch02.html (+3/-3)
docs/reference/shell/html/ch03.html (+3/-3)
docs/reference/shell/html/ch04.html (+3/-3)
docs/reference/shell/html/ch05.html (+3/-3)
docs/reference/shell/html/ch06.html (+3/-3)
docs/reference/shell/html/deprecated-api-index.html (+2/-2)
docs/reference/shell/html/index.html (+3/-3)
docs/reference/shell/html/index.sgml (+109/-109)
docs/reference/shell/html/object-tree.html (+18/-18)
docs/reference/shell/html/shell-ShellApp.html (+330/-330)
docs/reference/shell/html/shell-ShellAppUsage.html (+48/-48)
docs/reference/shell/html/shell-ShellGlobal.html (+650/-617)
docs/reference/shell/html/shell-ShellTpClient.html (+231/-231)
docs/reference/shell/html/shell-ShellWM.html (+129/-129)
docs/reference/shell/html/shell-ShellWindowTracker.html (+145/-145)
docs/reference/shell/html/shell-shell-mobile-providers.html (+97/-97)
docs/reference/shell/html/shell-shell-polkit-authentication-agent.html (+37/-37)
docs/reference/shell/html/shell-shell-recorder.html (+138/-138)
docs/reference/shell/html/shell-shell-util.html (+193/-193)
docs/reference/shell/html/shell-shell-xfixes-cursor.html (+64/-64)
docs/reference/shell/html/shell.devhelp2 (+106/-105)
docs/reference/shell/shell-docs.sgml (+1/-1)
docs/reference/shell/shell-sections.txt (+180/-147)
docs/reference/st/Makefile.in (+2/-2)
docs/reference/st/html/StBin.html (+132/-132)
docs/reference/st/html/StBoxLayout.html (+96/-96)
docs/reference/st/html/StButton.html (+284/-284)
docs/reference/st/html/StDrawingArea.html (+39/-39)
docs/reference/st/html/StEntry.html (+137/-137)
docs/reference/st/html/StIcon.html (+95/-95)
docs/reference/st/html/StLabel.html (+69/-69)
docs/reference/st/html/StScrollView.html (+53/-53)
docs/reference/st/html/StTable.html (+75/-75)
docs/reference/st/html/StTextureCache.html (+417/-417)
docs/reference/st/html/StThemeNodeTransition.html (+31/-31)
docs/reference/st/html/StWidget.html (+942/-942)
docs/reference/st/html/StWidgetAccessible.html (+7/-7)
docs/reference/st/html/annotation-glossary.html (+2/-5)
docs/reference/st/html/api-index-full.html (+2/-2)
docs/reference/st/html/base.html (+2/-2)
docs/reference/st/html/containers.html (+2/-2)
docs/reference/st/html/deprecated-api-index.html (+2/-2)
docs/reference/st/html/index.html (+3/-3)
docs/reference/st/html/index.sgml (+141/-142)
docs/reference/st/html/object-tree.html (+13/-13)
docs/reference/st/html/pt01.html (+3/-3)
docs/reference/st/html/st-StScrollable.html (+14/-14)
docs/reference/st/html/st-st-theme-context.html (+83/-83)
docs/reference/st/html/st-st-theme-node.html (+1252/-1252)
docs/reference/st/html/st-st-theme.html (+47/-47)
docs/reference/st/html/st.devhelp2 (+138/-138)
docs/reference/st/html/styling.html (+2/-2)
docs/reference/st/html/widgets.html (+2/-2)
docs/reference/st/st-docs.sgml (+1/-1)
gtk-doc.make (+2/-2)
js/misc/config.js (+4/-4)
js/ui/messageTray.js (+35/-25)
js/ui/screenShield.js (+48/-15)
js/ui/status/accessibility.js (+14/-27)
js/ui/unlockDialog.js (+5/-2)
js/ui/userMenu.js (+2/-20)
po/as.po (+179/-148)
po/bn_IN.po (+1382/-570)
po/et.po (+25/-15)
po/fr.po (+135/-122)
po/hi.po (+179/-199)
po/hu.po (+145/-127)
po/id.po (+145/-139)
po/ja.po (+5/-486)
po/kn.po (+220/-186)
po/ml.po (+219/-179)
po/mr.po (+134/-124)
po/nl.po (+1030/-867)
po/pt_BR.po (+163/-161)
po/ta.po (+304/-252)
po/te.po (+225/-178)
po/ug.po (+2087/-1400)
src/gnome-shell-plugin.c (+1/-9)
src/shell-recorder-src.c (+16/-0)
src/shell-screen-grabber.c (+0/-10)
To merge this branch: bzr merge lp:~darkxst/ubuntu/quantal/gnome-shell/lp1128804
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+150206@code.launchpad.net
To post a comment you must log in.
64. By Tim Lunn

* debian/patches/git_remove_messagetray_barrier.patch:
   - upstream bug fix (LP: #1132308)

Revision history for this message
Sebastien Bacher (seb128) wrote :

setting as merged, the new version that includes the fix got uploaded and is waiting in the sru queue:
http://launchpadlibrarian.net/132410694/gnome-shell_3.6.3.1-0ubuntu0.1_source.changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed directory '.pc'
=== removed file '.pc/.quilt_patches'
--- .pc/.quilt_patches 2012-05-25 11:44:15 +0000
+++ .pc/.quilt_patches 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1debian/patches
20
=== removed file '.pc/.quilt_series'
--- .pc/.quilt_series 2012-05-25 11:44:15 +0000
+++ .pc/.quilt_series 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1series
20
=== removed file '.pc/.version'
--- .pc/.version 2010-04-27 22:32:21 +0000
+++ .pc/.version 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
12
20
=== removed directory '.pc/11-no-gettext.patch'
=== removed file '.pc/11-no-gettext.patch/configure.ac'
--- .pc/11-no-gettext.patch/configure.ac 2012-11-26 15:57:51 +0000
+++ .pc/11-no-gettext.patch/configure.ac 1970-01-01 00:00:00 +0000
@@ -1,276 +0,0 @@
1AC_PREREQ(2.63)
2AC_INIT([gnome-shell],[3.6.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
3
4AC_CONFIG_HEADERS([config.h])
5AC_CONFIG_SRCDIR([src/shell-global.c])
6AC_CONFIG_MACRO_DIR([m4])
7AC_CONFIG_AUX_DIR([config])
8
9AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"])
10AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"])
11
12AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign])
13AM_MAINTAINER_MODE([enable])
14
15m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
16
17# Checks for programs.
18AC_PROG_CC
19# Needed for per-target cflags, like in gnomeshell-taskpanel
20AM_PROG_CC_C_O
21
22# Initialize libtool
23LT_PREREQ([2.2.6])
24LT_INIT([disable-static])
25
26# i18n
27IT_PROG_INTLTOOL([0.40])
28
29AM_GNU_GETTEXT([external])
30AM_GNU_GETTEXT_VERSION([0.17])
31
32GETTEXT_PACKAGE=gnome-shell
33AC_SUBST(GETTEXT_PACKAGE)
34AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
35 [The prefix for our gettext translation domains.])
36
37PKG_PROG_PKG_CONFIG([0.22])
38
39AC_PATH_PROG([XSLTPROC], [xsltproc])
40
41GLIB_GSETTINGS
42
43# Get a value to substitute into gnome-shell.in
44AM_PATH_PYTHON([2.5])
45AC_SUBST(PYTHON)
46
47# We need at least this, since gst_plugin_register_static() was added
48# in 0.10.16, but nothing older than 0.10.21 has been tested.
49GSTREAMER_MIN_VERSION=0.11.92
50
51recorder_modules=
52build_recorder=false
53AC_MSG_CHECKING([for GStreamer (needed for recording functionality)])
54if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
55 AC_MSG_RESULT(yes)
56 build_recorder=true
57 recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11"
58 PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl)
59else
60 AC_MSG_RESULT(no)
61fi
62
63AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
64
65CLUTTER_MIN_VERSION=1.11.11
66GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
67GJS_MIN_VERSION=1.33.2
68MUTTER_MIN_VERSION=3.6.2
69GTK_MIN_VERSION=3.3.9
70GIO_MIN_VERSION=2.31.6
71LIBECAL_MIN_VERSION=3.5.3
72LIBEDATASERVER_MIN_VERSION=3.5.3
73LIBEDATASERVERUI_MIN_VERSION=3.5.3
74TELEPATHY_GLIB_MIN_VERSION=0.17.5
75TELEPATHY_LOGGER_MIN_VERSION=0.2.4
76POLKIT_MIN_VERSION=0.100
77STARTUP_NOTIFICATION_MIN_VERSION=0.11
78GCR_MIN_VERSION=3.3.90
79GNOME_DESKTOP_REQUIRED_VERSION=3.5.1
80GNOME_MENUS_REQUIRED_VERSION=3.5.3
81
82# Collect more than 20 libraries for a prize!
83PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
84 libxml-2.0
85 gtk+-3.0 >= $GTK_MIN_VERSION
86 atk-bridge-2.0
87 libmutter >= $MUTTER_MIN_VERSION
88 gjs-internals-1.0 >= $GJS_MIN_VERSION
89 libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION
90 $recorder_modules
91 gdk-x11-3.0 libsoup-2.4
92 gl
93 clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
94 clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
95 libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
96 gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
97 libcanberra
98 telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
99 telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
100 polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
101 libnm-glib libnm-util gnome-keyring-1
102 gcr-3 >= $GCR_MIN_VERSION
103 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
104
105PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
106
107PKG_CHECK_MODULES(SHELL_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0)
108
109PKG_CHECK_MODULES(BROWSER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION json-glib-1.0 >= 0.13.2)
110
111GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`
112AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])
113
114GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])
115
116saved_CFLAGS=$CFLAGS
117saved_LIBS=$LIBS
118CFLAGS=$GNOME_SHELL_CFLAGS
119LIBS=$GNOME_SHELL_LIBS
120AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier)
121CFLAGS=$saved_CFLAGS
122LIBS=$saved_LIBS
123
124PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION)
125PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 x11)
126PKG_CHECK_MODULES(TRAY, gtk+-3.0)
127PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
128PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.5.4)
129
130AC_MSG_CHECKING([for bluetooth support])
131PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
132 [BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0`
133 BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0`
134 AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"])
135 AC_SUBST([BLUETOOTH_DIR],["$BLUETOOTH_DIR"])
136 AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library])
137 AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet])
138 AC_SUBST([HAVE_BLUETOOTH],[1])
139 AC_MSG_RESULT([yes])],
140 [AC_DEFINE([HAVE_BLUETOOTH],[0])
141 AC_SUBST([HAVE_BLUETOOTH],[0])
142 AC_MSG_RESULT([no])])
143
144PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0)
145AC_SUBST(CALENDAR_SERVER_CFLAGS)
146AC_SUBST(CALENDAR_SERVER_LIBS)
147
148AC_ARG_WITH(systemd,
149 AS_HELP_STRING([--with-systemd],
150 [Add systemd support]),
151 [with_systemd=$withval], [with_systemd=auto])
152
153PKG_CHECK_MODULES(SYSTEMD,
154 [libsystemd-login libsystemd-daemon],
155 [have_systemd=yes], [have_systemd=no])
156
157if test "x$with_systemd" = "xauto" ; then
158 if test x$have_systemd = xno ; then
159 use_systemd=no
160 else
161 use_systemd=yes
162 fi
163else
164 use_systemd=$with_systemd
165fi
166
167if test "x$use_systemd" = "xyes"; then
168 if test "x$have_systemd" = "xno"; then
169 AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
170 fi
171
172 AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
173fi
174
175MUTTER_GIR_DIR=`$PKG_CONFIG --variable=girdir libmutter`
176MUTTER_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir libmutter`
177AC_SUBST(MUTTER_GIR_DIR)
178AC_SUBST(MUTTER_TYPELIB_DIR)
179
180GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0`
181AC_SUBST(GJS_CONSOLE)
182
183AC_CHECK_FUNCS(fdwalk)
184AC_CHECK_FUNCS(mallinfo)
185AC_CHECK_HEADERS([sys/resource.h])
186
187# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
188AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
189AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
190 [[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])],
191 [langinfo_ok=yes], [langinfo_ok=no])
192AC_MSG_RESULT($langinfo_ok)
193if test "$langinfo_ok" = "yes"; then
194 AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
195 [Define if _NL_TIME_FIRST_WEEKDAY is available])
196fi
197
198# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
199AM_PATH_GLIB_2_0()
200G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
201AC_SUBST(G_IR_SCANNER)
202G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
203AC_SUBST(G_IR_COMPILER)
204G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
205AC_SUBST(G_IR_GENERATE)
206GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
207AC_SUBST(GIRDIR)
208TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
209AC_SUBST(TYPELIBDIR)
210
211GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
212
213AC_ARG_ENABLE(man,
214 [AS_HELP_STRING([--enable-man],
215 [generate man pages [default=yes]])],,
216 enable_man=yes)
217if test "$enable_man" != no; then
218 AC_PATH_PROG([XSLTPROC], [xsltproc])
219 if test -z "$XSLTPROC"; then
220 AC_MSG_ERROR([xsltproc is required for --enable-man])
221 fi
222fi
223AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
224
225# Stay command-line compatible with the gnome-common configure option. Here
226# minimum/yes/maximum are the same, however.
227AC_ARG_ENABLE(compile_warnings,
228 AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],[Turn on compiler warnings]),,
229 enable_compile_warnings=error)
230
231changequote(,)dnl
232if test "$enable_compile_warnings" != no ; then
233 if test "x$GCC" = "xyes"; then
234 case " $CFLAGS " in
235 *[\ \ ]-Wall[\ \ ]*) ;;
236 *) CFLAGS="$CFLAGS -Wall" ;;
237 esac
238 case " $CFLAGS " in
239 *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
240 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
241 esac
242 if test "$enable_compile_warnings" = error ; then
243 case " $CFLAGS " in
244 *[\ \ ]-Werror[\ \ ]*) ;;
245 *) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;;
246 esac
247 fi
248 fi
249fi
250changequote([,])dnl
251
252AC_ARG_ENABLE(jhbuild-wrapper-script,
253 AS_HELP_STRING([--enable-jhbuild-wrapper-script],[Make "gnome-shell" script work for jhbuild]),,enable_jhbuild_wrapper_script=no)
254AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes)
255
256BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
257AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
258
259AC_CONFIG_FILES([
260 Makefile
261 data/Makefile
262 docs/Makefile
263 docs/reference/Makefile
264 docs/reference/shell/Makefile
265 docs/reference/shell/shell-docs.sgml
266 docs/reference/st/Makefile
267 docs/reference/st/st-docs.sgml
268 js/Makefile
269 src/calendar-server/evolution-calendar.desktop.in
270 src/Makefile
271 browser-plugin/Makefile
272 tests/Makefile
273 po/Makefile.in
274 man/Makefile
275])
276AC_OUTPUT
2770
=== removed directory '.pc/14_make-GLX-optional.patch'
=== removed file '.pc/14_make-GLX-optional.patch/configure.ac'
--- .pc/14_make-GLX-optional.patch/configure.ac 2012-11-26 15:57:51 +0000
+++ .pc/14_make-GLX-optional.patch/configure.ac 1970-01-01 00:00:00 +0000
@@ -1,273 +0,0 @@
1AC_PREREQ(2.63)
2AC_INIT([gnome-shell],[3.6.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
3
4AC_CONFIG_HEADERS([config.h])
5AC_CONFIG_SRCDIR([src/shell-global.c])
6AC_CONFIG_MACRO_DIR([m4])
7AC_CONFIG_AUX_DIR([config])
8
9AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"])
10AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"])
11
12AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign])
13AM_MAINTAINER_MODE([enable])
14
15m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
16
17# Checks for programs.
18AC_PROG_CC
19# Needed for per-target cflags, like in gnomeshell-taskpanel
20AM_PROG_CC_C_O
21
22# Initialize libtool
23LT_PREREQ([2.2.6])
24LT_INIT([disable-static])
25
26# i18n
27IT_PROG_INTLTOOL([0.40])
28
29GETTEXT_PACKAGE=gnome-shell
30AC_SUBST(GETTEXT_PACKAGE)
31AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
32 [The prefix for our gettext translation domains.])
33
34PKG_PROG_PKG_CONFIG([0.22])
35
36AC_PATH_PROG([XSLTPROC], [xsltproc])
37
38GLIB_GSETTINGS
39
40# Get a value to substitute into gnome-shell.in
41AM_PATH_PYTHON([2.5])
42AC_SUBST(PYTHON)
43
44# We need at least this, since gst_plugin_register_static() was added
45# in 0.10.16, but nothing older than 0.10.21 has been tested.
46GSTREAMER_MIN_VERSION=0.11.92
47
48recorder_modules=
49build_recorder=false
50AC_MSG_CHECKING([for GStreamer (needed for recording functionality)])
51if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
52 AC_MSG_RESULT(yes)
53 build_recorder=true
54 recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11"
55 PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl)
56else
57 AC_MSG_RESULT(no)
58fi
59
60AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
61
62CLUTTER_MIN_VERSION=1.11.11
63GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
64GJS_MIN_VERSION=1.33.2
65MUTTER_MIN_VERSION=3.6.2
66GTK_MIN_VERSION=3.3.9
67GIO_MIN_VERSION=2.31.6
68LIBECAL_MIN_VERSION=3.5.3
69LIBEDATASERVER_MIN_VERSION=3.5.3
70LIBEDATASERVERUI_MIN_VERSION=3.5.3
71TELEPATHY_GLIB_MIN_VERSION=0.17.5
72TELEPATHY_LOGGER_MIN_VERSION=0.2.4
73POLKIT_MIN_VERSION=0.100
74STARTUP_NOTIFICATION_MIN_VERSION=0.11
75GCR_MIN_VERSION=3.3.90
76GNOME_DESKTOP_REQUIRED_VERSION=3.5.1
77GNOME_MENUS_REQUIRED_VERSION=3.5.3
78
79# Collect more than 20 libraries for a prize!
80PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
81 libxml-2.0
82 gtk+-3.0 >= $GTK_MIN_VERSION
83 atk-bridge-2.0
84 libmutter >= $MUTTER_MIN_VERSION
85 gjs-internals-1.0 >= $GJS_MIN_VERSION
86 libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION
87 $recorder_modules
88 gdk-x11-3.0 libsoup-2.4
89 gl
90 clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
91 clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
92 libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
93 gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
94 libcanberra
95 telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
96 telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
97 polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
98 libnm-glib libnm-util gnome-keyring-1
99 gcr-3 >= $GCR_MIN_VERSION
100 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
101
102PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
103
104PKG_CHECK_MODULES(SHELL_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0)
105
106PKG_CHECK_MODULES(BROWSER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION json-glib-1.0 >= 0.13.2)
107
108GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`
109AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])
110
111GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])
112
113saved_CFLAGS=$CFLAGS
114saved_LIBS=$LIBS
115CFLAGS=$GNOME_SHELL_CFLAGS
116LIBS=$GNOME_SHELL_LIBS
117AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier)
118CFLAGS=$saved_CFLAGS
119LIBS=$saved_LIBS
120
121PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION)
122PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 x11)
123PKG_CHECK_MODULES(TRAY, gtk+-3.0)
124PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
125PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.5.4)
126
127AC_MSG_CHECKING([for bluetooth support])
128PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
129 [BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0`
130 BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0`
131 AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"])
132 AC_SUBST([BLUETOOTH_DIR],["$BLUETOOTH_DIR"])
133 AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library])
134 AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet])
135 AC_SUBST([HAVE_BLUETOOTH],[1])
136 AC_MSG_RESULT([yes])],
137 [AC_DEFINE([HAVE_BLUETOOTH],[0])
138 AC_SUBST([HAVE_BLUETOOTH],[0])
139 AC_MSG_RESULT([no])])
140
141PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0)
142AC_SUBST(CALENDAR_SERVER_CFLAGS)
143AC_SUBST(CALENDAR_SERVER_LIBS)
144
145AC_ARG_WITH(systemd,
146 AS_HELP_STRING([--with-systemd],
147 [Add systemd support]),
148 [with_systemd=$withval], [with_systemd=auto])
149
150PKG_CHECK_MODULES(SYSTEMD,
151 [libsystemd-login libsystemd-daemon],
152 [have_systemd=yes], [have_systemd=no])
153
154if test "x$with_systemd" = "xauto" ; then
155 if test x$have_systemd = xno ; then
156 use_systemd=no
157 else
158 use_systemd=yes
159 fi
160else
161 use_systemd=$with_systemd
162fi
163
164if test "x$use_systemd" = "xyes"; then
165 if test "x$have_systemd" = "xno"; then
166 AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
167 fi
168
169 AC_DEFINE(WITH_SYSTEMD, 1, [systemd support])
170fi
171
172MUTTER_GIR_DIR=`$PKG_CONFIG --variable=girdir libmutter`
173MUTTER_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir libmutter`
174AC_SUBST(MUTTER_GIR_DIR)
175AC_SUBST(MUTTER_TYPELIB_DIR)
176
177GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0`
178AC_SUBST(GJS_CONSOLE)
179
180AC_CHECK_FUNCS(fdwalk)
181AC_CHECK_FUNCS(mallinfo)
182AC_CHECK_HEADERS([sys/resource.h])
183
184# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
185AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
186AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
187 [[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])],
188 [langinfo_ok=yes], [langinfo_ok=no])
189AC_MSG_RESULT($langinfo_ok)
190if test "$langinfo_ok" = "yes"; then
191 AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
192 [Define if _NL_TIME_FIRST_WEEKDAY is available])
193fi
194
195# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
196AM_PATH_GLIB_2_0()
197G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
198AC_SUBST(G_IR_SCANNER)
199G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
200AC_SUBST(G_IR_COMPILER)
201G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
202AC_SUBST(G_IR_GENERATE)
203GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
204AC_SUBST(GIRDIR)
205TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
206AC_SUBST(TYPELIBDIR)
207
208GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
209
210AC_ARG_ENABLE(man,
211 [AS_HELP_STRING([--enable-man],
212 [generate man pages [default=yes]])],,
213 enable_man=yes)
214if test "$enable_man" != no; then
215 AC_PATH_PROG([XSLTPROC], [xsltproc])
216 if test -z "$XSLTPROC"; then
217 AC_MSG_ERROR([xsltproc is required for --enable-man])
218 fi
219fi
220AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
221
222# Stay command-line compatible with the gnome-common configure option. Here
223# minimum/yes/maximum are the same, however.
224AC_ARG_ENABLE(compile_warnings,
225 AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],[Turn on compiler warnings]),,
226 enable_compile_warnings=error)
227
228changequote(,)dnl
229if test "$enable_compile_warnings" != no ; then
230 if test "x$GCC" = "xyes"; then
231 case " $CFLAGS " in
232 *[\ \ ]-Wall[\ \ ]*) ;;
233 *) CFLAGS="$CFLAGS -Wall" ;;
234 esac
235 case " $CFLAGS " in
236 *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
237 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
238 esac
239 if test "$enable_compile_warnings" = error ; then
240 case " $CFLAGS " in
241 *[\ \ ]-Werror[\ \ ]*) ;;
242 *) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;;
243 esac
244 fi
245 fi
246fi
247changequote([,])dnl
248
249AC_ARG_ENABLE(jhbuild-wrapper-script,
250 AS_HELP_STRING([--enable-jhbuild-wrapper-script],[Make "gnome-shell" script work for jhbuild]),,enable_jhbuild_wrapper_script=no)
251AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes)
252
253BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
254AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
255
256AC_CONFIG_FILES([
257 Makefile
258 data/Makefile
259 docs/Makefile
260 docs/reference/Makefile
261 docs/reference/shell/Makefile
262 docs/reference/shell/shell-docs.sgml
263 docs/reference/st/Makefile
264 docs/reference/st/st-docs.sgml
265 js/Makefile
266 src/calendar-server/evolution-calendar.desktop.in
267 src/Makefile
268 browser-plugin/Makefile
269 tests/Makefile
270 po/Makefile.in
271 man/Makefile
272])
273AC_OUTPUT
2740
=== removed directory '.pc/14_make-GLX-optional.patch/src'
=== removed file '.pc/14_make-GLX-optional.patch/src/gnome-shell-plugin.c'
--- .pc/14_make-GLX-optional.patch/src/gnome-shell-plugin.c 2012-06-26 00:08:54 +0000
+++ .pc/14_make-GLX-optional.patch/src/gnome-shell-plugin.c 1970-01-01 00:00:00 +0000
@@ -1,366 +0,0 @@
1/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
3/*
4 * Copyright (c) 2008 Red Hat, Inc.
5 * Copyright (c) 2008 Intel Corp.
6 *
7 * Based on plugin skeleton by:
8 * Author: Tomas Frydrych <tf@linux.intel.com>
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 * 02111-1307, USA.
24 */
25
26#include "config.h"
27
28#include <stdlib.h>
29#include <string.h>
30
31#include <clutter/clutter.h>
32#include <clutter/x11/clutter-x11.h>
33#include <GL/glx.h>
34#include <GL/glxext.h>
35#include <gjs/gjs.h>
36#include <meta/display.h>
37#include <meta/meta-plugin.h>
38
39#include "shell-global-private.h"
40#include "shell-perf-log.h"
41#include "shell-wm-private.h"
42
43static void gnome_shell_plugin_start (MetaPlugin *plugin);
44static void gnome_shell_plugin_minimize (MetaPlugin *plugin,
45 MetaWindowActor *actor);
46static void gnome_shell_plugin_maximize (MetaPlugin *plugin,
47 MetaWindowActor *actor,
48 gint x,
49 gint y,
50 gint width,
51 gint height);
52static void gnome_shell_plugin_unmaximize (MetaPlugin *plugin,
53 MetaWindowActor *actor,
54 gint x,
55 gint y,
56 gint width,
57 gint height);
58static void gnome_shell_plugin_map (MetaPlugin *plugin,
59 MetaWindowActor *actor);
60static void gnome_shell_plugin_destroy (MetaPlugin *plugin,
61 MetaWindowActor *actor);
62
63static void gnome_shell_plugin_switch_workspace (MetaPlugin *plugin,
64 gint from,
65 gint to,
66 MetaMotionDirection direction);
67
68static void gnome_shell_plugin_kill_window_effects (MetaPlugin *plugin,
69 MetaWindowActor *actor);
70static void gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin);
71
72
73static gboolean gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
74 XEvent *event);
75static const MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin);
76
77
78#define GNOME_TYPE_SHELL_PLUGIN (gnome_shell_plugin_get_type ())
79#define GNOME_SHELL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPlugin))
80#define GNOME_SHELL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPluginClass))
81#define GNOME_IS_SHELL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_SHELL_PLUGIN_TYPE))
82#define GNOME_IS_SHELL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SHELL_PLUGIN))
83#define GNOME_SHELL_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPluginClass))
84
85typedef struct _GnomeShellPlugin GnomeShellPlugin;
86typedef struct _GnomeShellPluginClass GnomeShellPluginClass;
87
88struct _GnomeShellPlugin
89{
90 MetaPlugin parent;
91
92 Atom panel_action;
93 Atom panel_action_run_dialog;
94 Atom panel_action_main_menu;
95
96 int glx_error_base;
97 int glx_event_base;
98 guint have_swap_event : 1;
99
100 ShellGlobal *global;
101};
102
103struct _GnomeShellPluginClass
104{
105 MetaPluginClass parent_class;
106};
107
108GType gnome_shell_plugin_get_type (void);
109
110G_DEFINE_TYPE (GnomeShellPlugin, gnome_shell_plugin, META_TYPE_PLUGIN)
111
112static void
113gnome_shell_plugin_class_init (GnomeShellPluginClass *klass)
114{
115 MetaPluginClass *plugin_class = META_PLUGIN_CLASS (klass);
116
117 plugin_class->start = gnome_shell_plugin_start;
118 plugin_class->map = gnome_shell_plugin_map;
119 plugin_class->minimize = gnome_shell_plugin_minimize;
120 plugin_class->maximize = gnome_shell_plugin_maximize;
121 plugin_class->unmaximize = gnome_shell_plugin_unmaximize;
122 plugin_class->destroy = gnome_shell_plugin_destroy;
123
124 plugin_class->switch_workspace = gnome_shell_plugin_switch_workspace;
125
126 plugin_class->kill_window_effects = gnome_shell_plugin_kill_window_effects;
127 plugin_class->kill_switch_workspace = gnome_shell_plugin_kill_switch_workspace;
128
129 plugin_class->xevent_filter = gnome_shell_plugin_xevent_filter;
130 plugin_class->plugin_info = gnome_shell_plugin_plugin_info;
131}
132
133static void
134gnome_shell_plugin_init (GnomeShellPlugin *shell_plugin)
135{
136}
137
138static void
139gnome_shell_plugin_start (MetaPlugin *plugin)
140{
141 GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
142 MetaScreen *screen;
143 MetaDisplay *display;
144 Display *xdisplay;
145 GError *error = NULL;
146 int status;
147 const char *glx_extensions;
148 GjsContext *gjs_context;
149
150 screen = meta_plugin_get_screen (plugin);
151 display = meta_screen_get_display (screen);
152
153 xdisplay = meta_display_get_xdisplay (display);
154
155 glXQueryExtension (xdisplay,
156 &shell_plugin->glx_error_base,
157 &shell_plugin->glx_event_base);
158
159 glx_extensions = glXQueryExtensionsString (xdisplay,
160 meta_screen_get_screen_number (screen));
161 shell_plugin->have_swap_event = strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL;
162
163 shell_perf_log_define_event (shell_perf_log_get_default (),
164 "glx.swapComplete",
165 "GL buffer swap complete event received (with timestamp of completion)",
166 "x");
167
168 shell_plugin->global = shell_global_get ();
169 _shell_global_set_plugin (shell_plugin->global, META_PLUGIN (shell_plugin));
170
171 gjs_context = _shell_global_get_gjs_context (shell_plugin->global);
172
173 if (!gjs_context_eval (gjs_context,
174 "imports.ui.environment.init();"
175 "imports.ui.main.start();",
176 -1,
177 "<main>",
178 &status,
179 &error))
180 {
181 g_message ("Execution of main.js threw exception: %s", error->message);
182 g_error_free (error);
183 /* We just exit() here, since in a development environment you'll get the
184 * error in your shell output, and it's way better than a busted WM,
185 * which typically manifests as a white screen.
186 *
187 * In production, we shouldn't crash =) But if we do, we should get
188 * restarted by the session infrastructure, which is likely going
189 * to be better than some undefined state.
190 *
191 * If there was a generic "hook into bug-buddy for non-C crashes"
192 * infrastructure, here would be the place to put it.
193 */
194 exit (1);
195 }
196}
197
198static ShellWM *
199get_shell_wm (void)
200{
201 ShellWM *wm;
202
203 g_object_get (shell_global_get (),
204 "window-manager", &wm,
205 NULL);
206 /* drop extra ref added by g_object_get */
207 g_object_unref (wm);
208
209 return wm;
210}
211
212static void
213gnome_shell_plugin_minimize (MetaPlugin *plugin,
214 MetaWindowActor *actor)
215{
216 _shell_wm_minimize (get_shell_wm (),
217 actor);
218
219}
220
221static void
222gnome_shell_plugin_maximize (MetaPlugin *plugin,
223 MetaWindowActor *actor,
224 gint x,
225 gint y,
226 gint width,
227 gint height)
228{
229 _shell_wm_maximize (get_shell_wm (),
230 actor, x, y, width, height);
231}
232
233static void
234gnome_shell_plugin_unmaximize (MetaPlugin *plugin,
235 MetaWindowActor *actor,
236 gint x,
237 gint y,
238 gint width,
239 gint height)
240{
241 _shell_wm_unmaximize (get_shell_wm (),
242 actor, x, y, width, height);
243}
244
245static void
246gnome_shell_plugin_map (MetaPlugin *plugin,
247 MetaWindowActor *actor)
248{
249 _shell_wm_map (get_shell_wm (),
250 actor);
251}
252
253static void
254gnome_shell_plugin_destroy (MetaPlugin *plugin,
255 MetaWindowActor *actor)
256{
257 _shell_wm_destroy (get_shell_wm (),
258 actor);
259}
260
261static void
262gnome_shell_plugin_switch_workspace (MetaPlugin *plugin,
263 gint from,
264 gint to,
265 MetaMotionDirection direction)
266{
267 _shell_wm_switch_workspace (get_shell_wm(), from, to, direction);
268}
269
270static void
271gnome_shell_plugin_kill_window_effects (MetaPlugin *plugin,
272 MetaWindowActor *actor)
273{
274 _shell_wm_kill_window_effects (get_shell_wm(), actor);
275}
276
277static void
278gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin)
279{
280 _shell_wm_kill_switch_workspace (get_shell_wm());
281}
282
283static gboolean
284gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
285 XEvent *xev)
286{
287 MetaScreen *screen = meta_plugin_get_screen (plugin);
288 ClutterStage *stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
289
290 GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
291#ifdef GLX_INTEL_swap_event
292 if (shell_plugin->have_swap_event &&
293 xev->type == (shell_plugin->glx_event_base + GLX_BufferSwapComplete))
294 {
295 GLXBufferSwapComplete *swap_complete_event;
296 swap_complete_event = (GLXBufferSwapComplete *)xev;
297
298 /* Buggy early versions of the INTEL_swap_event implementation in Mesa
299 * can send this with a ust of 0. Simplify life for consumers
300 * by ignoring such events */
301 if (swap_complete_event->ust != 0)
302 shell_perf_log_event_x (shell_perf_log_get_default (),
303 "glx.swapComplete",
304 swap_complete_event->ust);
305 }
306#endif
307
308 if ((xev->xany.type == EnterNotify || xev->xany.type == LeaveNotify)
309 && xev->xcrossing.window == clutter_x11_get_stage_window (stage))
310 {
311 /* If the pointer enters a child of the stage window (eg, a
312 * trayicon), we want to consider it to still be in the stage,
313 * so don't let Clutter see the event.
314 */
315 if (xev->xcrossing.detail == NotifyInferior)
316 return TRUE;
317
318 /* If the pointer is grabbed by a window it is not currently in,
319 * filter that out as well. In particular, if a trayicon grabs
320 * the pointer after a click on its label, we don't want to hide
321 * the message tray. Filtering out this event will leave Clutter
322 * out of sync, but that happens fairly often with grabs, and we
323 * can work around it. (Eg, shell_global_sync_pointer().)
324 */
325 if (xev->xcrossing.mode == NotifyGrab &&
326 (xev->xcrossing.detail == NotifyNonlinear ||
327 xev->xcrossing.detail == NotifyNonlinearVirtual))
328 return TRUE;
329 }
330
331 /*
332 * Pass the event to shell-global
333 */
334 if (_shell_global_check_xdnd_event (shell_plugin->global, xev))
335 return TRUE;
336
337 return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
338}
339
340static const
341MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin)
342{
343 static const MetaPluginInfo info = {
344 .name = "GNOME Shell",
345 .version = "0.1",
346 .author = "Various",
347 .license = "GPLv2+",
348 .description = "Provides GNOME Shell core functionality"
349 };
350
351 return &info;
352}
353
354#if HAVE_BLUETOOTH
355/* HACK:
356 Add a non-static function that calls into libgnome-bluetooth-applet.so,
357 to avoid the linker being too smart and removing the dependency.
358 This function is never actually called.
359*/
360extern GType bluetooth_applet_get_type(void);
361void _shell_link_to_bluetooth(void);
362
363void _shell_link_to_bluetooth(void) {
364 bluetooth_applet_get_type();
365}
366#endif
3670
=== removed file '.pc/14_make-GLX-optional.patch/src/shell-screen-grabber.c'
--- .pc/14_make-GLX-optional.patch/src/shell-screen-grabber.c 2012-11-26 15:57:51 +0000
+++ .pc/14_make-GLX-optional.patch/src/shell-screen-grabber.c 1970-01-01 00:00:00 +0000
@@ -1,219 +0,0 @@
1/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
3#include <string.h>
4
5#include <clutter/clutter.h>
6#include <cogl/cogl.h>
7#include <GL/gl.h>
8#include <GL/glx.h>
9#include <GL/glext.h>
10
11#include "shell-screen-grabber.h"
12
13PFNGLBINDBUFFERARBPROC pf_glBindBufferARB;
14PFNGLBUFFERDATAARBPROC pf_glBufferDataARB;
15PFNGLDELETEBUFFERSARBPROC pf_glDeleteBuffersARB;
16PFNGLGENBUFFERSARBPROC pf_glGenBuffersARB;
17PFNGLMAPBUFFERARBPROC pf_glMapBufferARB;
18PFNGLUNMAPBUFFERARBPROC pf_glUnmapBufferARB;
19
20struct _ShellScreenGrabberClass
21{
22 GObjectClass parent_class;
23};
24
25struct _ShellScreenGrabber
26{
27 GObject parent_instance;
28
29 int have_pixel_buffers;
30 int have_pack_invert;
31 int width, height;
32 GLuint pixel_buffer;
33};
34
35G_DEFINE_TYPE(ShellScreenGrabber, shell_screen_grabber, G_TYPE_OBJECT);
36
37static void
38shell_screen_grabber_finalize (GObject *gobject)
39{
40 ShellScreenGrabber *grabber = SHELL_SCREEN_GRABBER (gobject);
41
42 if (grabber->pixel_buffer != 0)
43 pf_glDeleteBuffersARB (1, &grabber->pixel_buffer);
44}
45
46static void
47shell_screen_grabber_class_init (ShellScreenGrabberClass *grabber_class)
48{
49 GObjectClass *gobject_class = G_OBJECT_CLASS (grabber_class);
50
51 gobject_class->finalize = shell_screen_grabber_finalize;
52}
53
54static void
55shell_screen_grabber_init (ShellScreenGrabber *grabber)
56{
57 grabber->have_pixel_buffers = -1;
58 grabber->width = -1;
59 grabber->height= -1;
60 grabber->pixel_buffer = 0;
61}
62
63ShellScreenGrabber *
64shell_screen_grabber_new (void)
65{
66 return g_object_new (SHELL_TYPE_SCREEN_GRABBER, NULL);
67}
68
69/**
70 * shell_screen_grabber_grab:
71 * x: X coordinate of the rectangle to grab
72 * y: Y coordinate of the rectangle to grab
73 * width: width of the rectangle to grab
74 * height: heigth of the rectangle to grab
75 *
76 * Grabs pixel data from a portion of the screen.
77 *
78 * Return value: buffer holding the grabbed data. The data is stored as 32-bit
79 * words with native-endian xRGB pixels (i.e., the same as CAIRO_FORMAT_RGB24)
80 * with no padding on the rows. So, the size of the buffer is width * height * 4
81 * bytes. Free with g_free().
82 **/
83guchar *
84shell_screen_grabber_grab (ShellScreenGrabber *grabber,
85 int x,
86 int y,
87 int width,
88 int height)
89{
90 guchar *data;
91 gsize row_bytes;
92 gsize data_size;
93
94 row_bytes = width * 4;
95 data_size = row_bytes * height;
96 data = g_malloc (data_size);
97
98 if (grabber->have_pixel_buffers == -1)
99 {
100 const GLubyte* extensions = glGetString (GL_EXTENSIONS);
101 grabber->have_pixel_buffers = strstr ((const char *)extensions, "GL_EXT_pixel_buffer_object") != NULL;
102 grabber->have_pack_invert = strstr ((const char *)extensions, "GL_MESA_pack_invert") != NULL;
103 }
104
105 if (grabber->have_pixel_buffers)
106 {
107 GLubyte *mapped_data;
108 GLint old_swap_bytes, old_lsb_first, old_row_length, old_skip_pixels, old_skip_rows, old_alignment;
109 GLint old_pack_invert = GL_FALSE;
110 GLint vp_size[4];
111 guchar *src_row, *dest_row;
112 int i;
113
114 cogl_flush ();
115
116 if (pf_glBindBufferARB == NULL)
117 {
118 pf_glBindBufferARB = (PFNGLBINDBUFFERARBPROC) cogl_get_proc_address ("glBindBufferARB");
119 pf_glBufferDataARB = (PFNGLBUFFERDATAARBPROC) cogl_get_proc_address ("glBufferDataARB");
120 pf_glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC) cogl_get_proc_address ("glDeleteBuffersARB");
121 pf_glGenBuffersARB = (PFNGLGENBUFFERSARBPROC) cogl_get_proc_address ("glGenBuffersARB");
122 pf_glMapBufferARB = (PFNGLMAPBUFFERARBPROC) cogl_get_proc_address ("glMapBufferARB");
123 pf_glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC) cogl_get_proc_address ("glUnmapBufferARB");
124 }
125
126 glGetIntegerv (GL_PACK_SWAP_BYTES, &old_swap_bytes);
127 glGetIntegerv (GL_PACK_LSB_FIRST, &old_lsb_first);
128 glGetIntegerv (GL_PACK_ROW_LENGTH, &old_row_length);
129 glGetIntegerv (GL_PACK_SKIP_PIXELS, &old_skip_pixels);
130 glGetIntegerv (GL_PACK_SKIP_ROWS, &old_skip_rows);
131 glGetIntegerv (GL_PACK_ALIGNMENT, &old_alignment);
132
133 glPixelStorei (GL_PACK_SWAP_BYTES, GL_FALSE);
134 glPixelStorei (GL_PACK_LSB_FIRST, GL_FALSE);
135 glPixelStorei (GL_PACK_ROW_LENGTH, 0);
136 glPixelStorei (GL_PACK_SKIP_PIXELS, 0);
137 glPixelStorei (GL_PACK_SKIP_ROWS, 0);
138 glPixelStorei (GL_PACK_ALIGNMENT, 1);
139
140 if (grabber->have_pack_invert)
141 {
142 glGetIntegerv (GL_PACK_INVERT_MESA, &old_pack_invert);
143 glPixelStorei (GL_PACK_INVERT_MESA, GL_FALSE);
144 }
145
146 if (grabber->pixel_buffer != 0 &&
147 (grabber->width != width ||
148 grabber->height != height))
149 {
150 pf_glDeleteBuffersARB (1, &grabber->pixel_buffer);
151 grabber->pixel_buffer = 0;
152 }
153
154 if (grabber->pixel_buffer == 0)
155 {
156 pf_glGenBuffersARB (1, &grabber->pixel_buffer);
157
158 pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer);
159 pf_glBufferDataARB (GL_PIXEL_PACK_BUFFER_ARB, data_size, 0, GL_STREAM_READ_ARB);
160
161 grabber->width = width;
162 grabber->height = height;
163 }
164 else
165 {
166 pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer);
167 }
168
169 /* In OpenGL, (x,y) specifies the bottom-left corner rather than the
170 * top-left */
171 glGetIntegerv (GL_VIEWPORT, vp_size);
172 y = vp_size[3] - (y + height);
173
174 /* the "big-endian" version actually works for both, but the litle-endian
175 * version has been better tested with a range of drivers, so we'll
176 * keep on using it on little-endian.
177 */
178#if G_BYTE_ORDER == G_LITTLE_ENDIAN
179 glReadPixels (x, y, width, height, GL_BGRA, GL_UNSIGNED_BYTE, 0);
180#else
181 glReadPixels (x, y, width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 0);
182#endif
183
184 mapped_data = pf_glMapBufferARB (GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB);
185
186 src_row = mapped_data + (height - 1) * row_bytes;
187 dest_row = data;
188
189 for (i = 0; i < height; i++)
190 {
191 memcpy (dest_row, src_row, row_bytes);
192 src_row -= row_bytes;
193 dest_row += row_bytes;
194 }
195
196 pf_glUnmapBufferARB (GL_PIXEL_PACK_BUFFER_ARB);
197 pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, 0);
198
199 glPixelStorei (GL_PACK_SWAP_BYTES, old_swap_bytes);
200 glPixelStorei (GL_PACK_LSB_FIRST, old_lsb_first);
201 glPixelStorei (GL_PACK_ROW_LENGTH, old_row_length);
202 glPixelStorei (GL_PACK_SKIP_PIXELS, old_skip_pixels);
203 glPixelStorei (GL_PACK_SKIP_ROWS, old_skip_rows);
204 glPixelStorei (GL_PACK_ALIGNMENT, old_alignment);
205
206 if (grabber->have_pack_invert)
207 glPixelStorei (GL_PACK_INVERT_MESA, old_pack_invert);
208 }
209 else
210 {
211 cogl_read_pixels (x, y,
212 width, height,
213 COGL_READ_PIXELS_COLOR_BUFFER,
214 CLUTTER_CAIRO_FORMAT_ARGB32,
215 data);
216 }
217
218 return data;
219}
2200
=== removed file '.pc/applied-patches'
--- .pc/applied-patches 2012-11-26 15:57:51 +0000
+++ .pc/applied-patches 1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
111-no-gettext.patch
214_make-GLX-optional.patch
3ubuntu-lightdm-user-switching.patch
4ubuntu_lock_on_suspend.patch
5git-set-ally-wm-theme.patch
60
=== removed directory '.pc/git-set-ally-wm-theme.patch'
=== removed directory '.pc/git-set-ally-wm-theme.patch/js'
=== removed directory '.pc/git-set-ally-wm-theme.patch/js/ui'
=== removed directory '.pc/git-set-ally-wm-theme.patch/js/ui/status'
=== removed file '.pc/git-set-ally-wm-theme.patch/js/ui/status/accessibility.js'
--- .pc/git-set-ally-wm-theme.patch/js/ui/status/accessibility.js 2012-11-26 15:57:51 +0000
+++ .pc/git-set-ally-wm-theme.patch/js/ui/status/accessibility.js 1970-01-01 00:00:00 +0000
@@ -1,163 +0,0 @@
1// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
2
3const Gio = imports.gi.Gio;
4const Lang = imports.lang;
5
6const PanelMenu = imports.ui.panelMenu;
7const PopupMenu = imports.ui.popupMenu;
8
9const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
10const KEY_STICKY_KEYS_ENABLED = 'stickykeys-enable';
11const KEY_BOUNCE_KEYS_ENABLED = 'bouncekeys-enable';
12const KEY_SLOW_KEYS_ENABLED = 'slowkeys-enable';
13const KEY_MOUSE_KEYS_ENABLED = 'mousekeys-enable';
14
15const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
16
17const DPI_LOW_REASONABLE_VALUE = 50;
18const DPI_HIGH_REASONABLE_VALUE = 500;
19
20const DPI_FACTOR_LARGE = 1.25;
21const DPI_FACTOR_LARGER = 1.5;
22const DPI_FACTOR_LARGEST = 2.0;
23
24const WM_SCHEMA = 'org.gnome.desktop.wm.preferences';
25const KEY_VISUAL_BELL = 'visual-bell';
26
27const DESKTOP_INTERFACE_SCHEMA = 'org.gnome.desktop.interface';
28const KEY_GTK_THEME = 'gtk-theme';
29const KEY_ICON_THEME = 'icon-theme';
30const KEY_TEXT_SCALING_FACTOR = 'text-scaling-factor';
31
32const HIGH_CONTRAST_THEME = 'HighContrast';
33
34const ATIndicator = new Lang.Class({
35 Name: 'ATIndicator',
36 Extends: PanelMenu.SystemStatusButton,
37
38 _init: function() {
39 this.parent('preferences-desktop-accessibility-symbolic', _("Accessibility"));
40
41 let highContrast = this._buildHCItem();
42 this.menu.addMenuItem(highContrast);
43
44 let magnifier = this._buildItem(_("Zoom"), APPLICATIONS_SCHEMA,
45 'screen-magnifier-enabled');
46 this.menu.addMenuItem(magnifier);
47
48 let textZoom = this._buildFontItem();
49 this.menu.addMenuItem(textZoom);
50
51 let screenReader = this._buildItem(_("Screen Reader"), APPLICATIONS_SCHEMA,
52 'screen-reader-enabled');
53 this.menu.addMenuItem(screenReader);
54
55 let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
56 'screen-keyboard-enabled');
57 this.menu.addMenuItem(screenKeyboard);
58
59 let visualBell = this._buildItem(_("Visual Alerts"), WM_SCHEMA, KEY_VISUAL_BELL);
60 this.menu.addMenuItem(visualBell);
61
62 let stickyKeys = this._buildItem(_("Sticky Keys"), A11Y_SCHEMA, KEY_STICKY_KEYS_ENABLED);
63 this.menu.addMenuItem(stickyKeys);
64
65 let slowKeys = this._buildItem(_("Slow Keys"), A11Y_SCHEMA, KEY_SLOW_KEYS_ENABLED);
66 this.menu.addMenuItem(slowKeys);
67
68 let bounceKeys = this._buildItem(_("Bounce Keys"), A11Y_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
69 this.menu.addMenuItem(bounceKeys);
70
71 let mouseKeys = this._buildItem(_("Mouse Keys"), A11Y_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
72 this.menu.addMenuItem(mouseKeys);
73
74 this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
75 this.menu.addSettingsAction(_("Universal Access Settings"), 'gnome-universal-access-panel.desktop');
76 },
77
78 _buildItemExtended: function(string, initial_value, writable, on_set) {
79 let widget = new PopupMenu.PopupSwitchMenuItem(string, initial_value);
80 if (!writable)
81 widget.actor.reactive = false;
82 else
83 widget.connect('toggled', function(item) {
84 on_set(item.state);
85 });
86 return widget;
87 },
88
89 _buildItem: function(string, schema, key) {
90 let settings = new Gio.Settings({ schema: schema });
91 let widget = this._buildItemExtended(string,
92 settings.get_boolean(key),
93 settings.is_writable(key),
94 function(enabled) {
95 return settings.set_boolean(key, enabled);
96 });
97 settings.connect('changed::'+key, function() {
98 widget.setToggleState(settings.get_boolean(key));
99 });
100 return widget;
101 },
102
103 _buildHCItem: function() {
104 let settings = new Gio.Settings({ schema: DESKTOP_INTERFACE_SCHEMA });
105 let gtkTheme = settings.get_string(KEY_GTK_THEME);
106 let iconTheme = settings.get_string(KEY_ICON_THEME);
107 let hasHC = (gtkTheme == HIGH_CONTRAST_THEME);
108 let highContrast = this._buildItemExtended(
109 _("High Contrast"),
110 hasHC,
111 settings.is_writable(KEY_GTK_THEME) && settings.is_writable(KEY_ICON_THEME),
112 function (enabled) {
113 if (enabled) {
114 settings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME);
115 settings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME);
116 } else if(!hasHC) {
117 settings.set_string(KEY_GTK_THEME, gtkTheme);
118 settings.set_string(KEY_ICON_THEME, iconTheme);
119 } else {
120 settings.reset(KEY_GTK_THEME);
121 settings.reset(KEY_ICON_THEME);
122 }
123 });
124 settings.connect('changed::' + KEY_GTK_THEME, function() {
125 let value = settings.get_string(KEY_GTK_THEME);
126 if (value == HIGH_CONTRAST_THEME) {
127 highContrast.setToggleState(true);
128 } else {
129 highContrast.setToggleState(false);
130 gtkTheme = value;
131 }
132 });
133 settings.connect('changed::' + KEY_ICON_THEME, function() {
134 let value = settings.get_string(KEY_ICON_THEME);
135 if (value != HIGH_CONTRAST_THEME)
136 iconTheme = value;
137 });
138 return highContrast;
139 },
140
141 _buildFontItem: function() {
142 let settings = new Gio.Settings({ schema: DESKTOP_INTERFACE_SCHEMA });
143
144 let factor = settings.get_double(KEY_TEXT_SCALING_FACTOR);
145 let initial_setting = (factor > 1.0);
146 let widget = this._buildItemExtended(_("Large Text"),
147 initial_setting,
148 settings.is_writable(KEY_TEXT_SCALING_FACTOR),
149 function (enabled) {
150 if (enabled)
151 settings.set_double(KEY_TEXT_SCALING_FACTOR,
152 DPI_FACTOR_LARGE);
153 else
154 settings.reset(KEY_TEXT_SCALING_FACTOR);
155 });
156 settings.connect('changed::' + KEY_TEXT_SCALING_FACTOR, function() {
157 let factor = settings.get_double(KEY_TEXT_SCALING_FACTOR);
158 let active = (factor > 1.0);
159 widget.setToggleState(active);
160 });
161 return widget;
162 }
163});
1640
=== removed directory '.pc/ubuntu-lightdm-user-switching.patch'
=== removed directory '.pc/ubuntu-lightdm-user-switching.patch/js'
=== removed directory '.pc/ubuntu-lightdm-user-switching.patch/js/ui'
=== removed file '.pc/ubuntu-lightdm-user-switching.patch/js/ui/userMenu.js'
--- .pc/ubuntu-lightdm-user-switching.patch/js/ui/userMenu.js 2012-11-26 15:57:51 +0000
+++ .pc/ubuntu-lightdm-user-switching.patch/js/ui/userMenu.js 1970-01-01 00:00:00 +0000
@@ -1,868 +0,0 @@
1// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
2
3const AccountsService = imports.gi.AccountsService;
4const Gdm = imports.gi.Gdm;
5const Gio = imports.gi.Gio;
6const GLib = imports.gi.GLib;
7const Lang = imports.lang;
8const Pango = imports.gi.Pango;
9const Shell = imports.gi.Shell;
10const St = imports.gi.St;
11const Tp = imports.gi.TelepathyGLib;
12const UPowerGlib = imports.gi.UPowerGlib;
13const Atk = imports.gi.Atk;
14
15const BoxPointer = imports.ui.boxpointer;
16const GnomeSession = imports.misc.gnomeSession;
17const Main = imports.ui.main;
18const PanelMenu = imports.ui.panelMenu;
19const PopupMenu = imports.ui.popupMenu;
20const Params = imports.misc.params;
21const Util = imports.misc.util;
22
23const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
24const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
25const DISABLE_USER_SWITCH_KEY = 'disable-user-switching';
26const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen';
27const DISABLE_LOG_OUT_KEY = 'disable-log-out';
28const LOCK_ENABLED_KEY = 'lock-enabled';
29const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
30
31const DIALOG_ICON_SIZE = 64;
32
33const IMStatus = {
34 AVAILABLE: 0,
35 BUSY: 1,
36 HIDDEN: 2,
37 AWAY: 3,
38 IDLE: 4,
39 OFFLINE: 5,
40 LAST: 6
41};
42
43// Adapted from gdm/gui/user-switch-applet/applet.c
44//
45// Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>.
46// Copyright (C) 2008,2009 Red Hat, Inc.
47
48const UserAvatarWidget = new Lang.Class({
49 Name: 'UserAvatarWidget',
50
51 _init: function(user, params) {
52 this._user = user;
53 params = Params.parse(params, { reactive: false,
54 iconSize: DIALOG_ICON_SIZE,
55 styleClass: 'status-chooser-user-icon' });
56 this._iconSize = params.iconSize;
57
58 this.actor = new St.Bin({ style_class: params.styleClass,
59 track_hover: params.reactive,
60 reactive: params.reactive });
61 },
62
63 setSensitive: function(sensitive) {
64 this.actor.can_focus = sensitive;
65 this.actor.reactive = sensitive;
66 },
67
68 update: function() {
69 let iconFile = this._user.get_icon_file();
70 if (!GLib.file_test(iconFile, GLib.FileTest.EXISTS))
71 iconFile = null;
72
73 if (iconFile) {
74 let file = Gio.File.new_for_path(iconFile);
75 this.actor.child = null;
76 this.actor.style = 'background-image: url("%s");'.format(iconFile);
77
78 // AccountsService uses a fixed location for avatar images, so
79 // we need to clear out all cached data to pick up image changes,
80 // see https://bugzilla.gnome.org/show_bug.cgi?id=679268
81 this.actor.clear_background_image();
82 } else {
83 this.actor.style = null;
84 this.actor.child = new St.Icon({ icon_name: 'avatar-default-symbolic',
85 icon_size: this._iconSize });
86 }
87 }
88});
89
90const IMStatusItem = new Lang.Class({
91 Name: 'IMStatusItem',
92 Extends: PopupMenu.PopupBaseMenuItem,
93
94 _init: function(label, iconName) {
95 this.parent();
96
97 this.actor.add_style_class_name('status-chooser-status-item');
98
99 this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
100 this.addActor(this._icon);
101
102 if (iconName)
103 this._icon.icon_name = iconName;
104
105 this.label = new St.Label({ text: label });
106 this.actor.label_actor = this.label;
107 this.addActor(this.label);
108 }
109});
110
111const IMUserNameItem = new Lang.Class({
112 Name: 'IMUserNameItem',
113 Extends: PopupMenu.PopupBaseMenuItem,
114
115 _init: function() {
116 this.parent({ reactive: false,
117 can_focus: false,
118 style_class: 'status-chooser-user-name' });
119
120 this._wrapper = new Shell.GenericContainer();
121 this._wrapper.connect('get-preferred-width',
122 Lang.bind(this, this._wrapperGetPreferredWidth));
123 this._wrapper.connect('get-preferred-height',
124 Lang.bind(this, this._wrapperGetPreferredHeight));
125 this._wrapper.connect('allocate',
126 Lang.bind(this, this._wrapperAllocate));
127 this.addActor(this._wrapper, { expand: true, span: -1 });
128
129 this.label = new St.Label();
130 this.label.clutter_text.set_line_wrap(true);
131 this.label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
132 this._wrapper.add_actor(this.label);
133 },
134
135 _wrapperGetPreferredWidth: function(actor, forHeight, alloc) {
136 alloc.min_size = 1;
137 alloc.natural_size = 1;
138 },
139
140 _wrapperGetPreferredHeight: function(actor, forWidth, alloc) {
141 [alloc.min_size, alloc.natural_size] = this.label.get_preferred_height(forWidth);
142 },
143
144 _wrapperAllocate: function(actor, box, flags) {
145 this.label.allocate(box, flags);
146 }
147});
148
149const IMStatusChooserItem = new Lang.Class({
150 Name: 'IMStatusChooserItem',
151 Extends: PopupMenu.PopupBaseMenuItem,
152
153 _init: function() {
154 this.parent({ reactive: false,
155 can_focus: false,
156 style_class: 'status-chooser' });
157
158 this._userManager = AccountsService.UserManager.get_default();
159 this._user = this._userManager.get_user(GLib.get_user_name());
160
161 this._avatar = new UserAvatarWidget(this._user, { reactive: true });
162 this._iconBin = new St.Button({ child: this._avatar.actor });
163 this.addActor(this._iconBin);
164
165 this._iconBin.connect('clicked', Lang.bind(this,
166 function() {
167 this.activate();
168 }));
169
170 this._section = new PopupMenu.PopupMenuSection();
171 this.addActor(this._section.actor);
172
173 this._name = new IMUserNameItem();
174 this._section.addMenuItem(this._name);
175
176 this._combo = new PopupMenu.PopupComboBoxMenuItem({ style_class: 'status-chooser-combo' });
177 this._section.addMenuItem(this._combo);
178
179 let item;
180
181 item = new IMStatusItem(_("Available"), 'user-available-symbolic');
182 this._combo.addMenuItem(item, IMStatus.AVAILABLE);
183
184 item = new IMStatusItem(_("Busy"), 'user-busy-symbolic');
185 this._combo.addMenuItem(item, IMStatus.BUSY);
186
187 item = new IMStatusItem(_("Invisible"), 'user-invisible-symbolic');
188 this._combo.addMenuItem(item, IMStatus.HIDDEN);
189
190 item = new IMStatusItem(_("Away"), 'user-away-symbolic');
191 this._combo.addMenuItem(item, IMStatus.AWAY);
192
193 item = new IMStatusItem(_("Idle"), 'user-idle-symbolic');
194 this._combo.addMenuItem(item, IMStatus.IDLE);
195
196 item = new IMStatusItem(_("Unavailable"), 'user-offline-symbolic');
197 this._combo.addMenuItem(item, IMStatus.OFFLINE);
198
199 this._combo.connect('active-item-changed',
200 Lang.bind(this, this._changeIMStatus));
201
202 this._presence = new GnomeSession.Presence();
203 this._presence.connectSignal('StatusChanged', Lang.bind(this, function(proxy, senderName, [status]) {
204 this._sessionStatusChanged(status);
205 }));
206
207 this._sessionPresenceRestored = false;
208 this._imPresenceRestored = false;
209 this._currentPresence = undefined;
210
211 this._accountMgr = Tp.AccountManager.dup();
212 this._accountMgr.connect('most-available-presence-changed',
213 Lang.bind(this, this._IMStatusChanged));
214 this._accountMgr.connect('account-enabled',
215 Lang.bind(this, this._IMAccountsChanged));
216 this._accountMgr.connect('account-disabled',
217 Lang.bind(this, this._IMAccountsChanged));
218 this._accountMgr.connect('account-removed',
219 Lang.bind(this, this._IMAccountsChanged));
220 this._accountMgr.connect('account-validity-changed',
221 Lang.bind(this, this._IMAccountsChanged));
222 this._accountMgr.prepare_async(null, Lang.bind(this,
223 function(mgr) {
224 this._IMAccountsChanged(mgr);
225
226 if (this._networkMonitor.network_available)
227 this._restorePresence();
228 else
229 this._setComboboxPresence(Tp.ConnectionPresenceType.OFFLINE);
230 }));
231
232 this._networkMonitor = Gio.NetworkMonitor.get_default();
233 this._networkMonitor.connect('network-changed',
234 Lang.bind(this, function(monitor, available) {
235 this._IMAccountsChanged(this._accountMgr);
236
237 if (available && !this._imPresenceRestored)
238 this._restorePresence();
239 }));
240
241 this._userLoadedId = this._user.connect('notify::is-loaded',
242 Lang.bind(this,
243 this._updateUser));
244 this._userChangedId = this._user.connect('changed',
245 Lang.bind(this,
246 this._updateUser));
247 this.actor.connect('notify::mapped', Lang.bind(this, function() {
248 if (this.actor.mapped)
249 this._updateUser();
250 }));
251
252 this.connect('sensitive-changed', function(sensitive) {
253 this._avatar.setSensitive(sensitive);
254 });
255 },
256
257 _restorePresence: function() {
258 let [presence, status, msg] = this._accountMgr.get_most_available_presence();
259
260 let savedPresence = global.settings.get_int('saved-im-presence');
261
262 if (savedPresence == presence) {
263 this._IMStatusChanged(this._accountMgr, presence, status, msg);
264 } else {
265 this._setComboboxPresence(savedPresence);
266 status = this._statusForPresence(savedPresence);
267 msg = msg ? msg : '';
268 this._accountMgr.set_all_requested_presences(savedPresence, status, msg);
269 }
270 },
271
272 destroy: function() {
273 // clean up signal handlers
274 if (this._userLoadedId != 0) {
275 this._user.disconnect(this._userLoadedId);
276 this._userLoadedId = 0;
277 }
278
279 if (this._userChangedId != 0) {
280 this._user.disconnect(this._userChangedId);
281 this._userChangedId = 0;
282 }
283
284 this.parent();
285 },
286
287 // Override getColumnWidths()/setColumnWidths() to make the item
288 // independent from the overall column layout of the menu
289 getColumnWidths: function() {
290 return [];
291 },
292
293 setColumnWidths: function(widths) {
294 },
295
296 _updateUser: function() {
297 if (this._user.is_loaded)
298 this._name.label.set_text(this._user.get_real_name());
299 else
300 this._name.label.set_text("");
301
302 this._avatar.update();
303 },
304
305 _statusForPresence: function(presence) {
306 switch(presence) {
307 case Tp.ConnectionPresenceType.AVAILABLE:
308 return 'available';
309 case Tp.ConnectionPresenceType.BUSY:
310 return 'busy';
311 case Tp.ConnectionPresenceType.OFFLINE:
312 return 'offline';
313 case Tp.ConnectionPresenceType.HIDDEN:
314 return 'hidden';
315 case Tp.ConnectionPresenceType.AWAY:
316 return 'away';
317 case Tp.ConnectionPresenceType.EXTENDED_AWAY:
318 return 'xa';
319 default:
320 return 'unknown';
321 }
322 },
323
324 _IMAccountsChanged: function(mgr) {
325 let accounts = mgr.get_valid_accounts().filter(function(account) {
326 return account.enabled;
327 });
328 let sensitive = accounts.length > 0 && this._networkMonitor.network_available;
329 this._combo.setSensitive(sensitive);
330 },
331
332 _IMStatusChanged: function(accountMgr, presence, status, message) {
333 if (!this._imPresenceRestored)
334 this._imPresenceRestored = true;
335
336 if (presence == this._currentPresence)
337 return;
338
339 this._currentPresence = presence;
340 this._setComboboxPresence(presence);
341
342 if (!this._sessionPresenceRestored) {
343 this._sessionStatusChanged(this._presence.status);
344 return;
345 }
346
347 if (presence == Tp.ConnectionPresenceType.AVAILABLE)
348 this._presence.status = GnomeSession.PresenceStatus.AVAILABLE;
349
350 // We ignore the actual value of _expectedPresence and never safe
351 // the first presence change after an "automatic" change, assuming
352 // that it is the response to our request; this is to account for
353 // mission control falling back to "similar" presences if an account
354 // type does not implement the requested presence.
355 if (!this._expectedPresence)
356 global.settings.set_int('saved-im-presence', presence);
357 else
358 this._expectedPresence = undefined;
359 },
360
361 _setComboboxPresence: function(presence) {
362 let activatedItem;
363
364 if (presence == Tp.ConnectionPresenceType.AVAILABLE)
365 activatedItem = IMStatus.AVAILABLE;
366 else if (presence == Tp.ConnectionPresenceType.BUSY)
367 activatedItem = IMStatus.BUSY;
368 else if (presence == Tp.ConnectionPresenceType.HIDDEN)
369 activatedItem = IMStatus.HIDDEN;
370 else if (presence == Tp.ConnectionPresenceType.AWAY)
371 activatedItem = IMStatus.AWAY;
372 else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY)
373 activatedItem = IMStatus.IDLE;
374 else
375 activatedItem = IMStatus.OFFLINE;
376
377 this._combo.setActiveItem(activatedItem);
378 for (let i = 0; i < IMStatus.LAST; i++) {
379 if (i == IMStatus.AVAILABLE || i == IMStatus.OFFLINE)
380 continue; // always visible
381
382 this._combo.setItemVisible(i, i == activatedItem);
383 }
384 },
385
386 _changeIMStatus: function(menuItem, id) {
387 let [presence, s, msg] = this._accountMgr.get_most_available_presence();
388 let newPresence, status;
389
390 if (id == IMStatus.AVAILABLE) {
391 newPresence = Tp.ConnectionPresenceType.AVAILABLE;
392 } else if (id == IMStatus.OFFLINE) {
393 newPresence = Tp.ConnectionPresenceType.OFFLINE;
394 } else
395 return;
396
397 status = this._statusForPresence(newPresence);
398 msg = msg ? msg : '';
399 this._accountMgr.set_all_requested_presences(newPresence, status, msg);
400 },
401
402 getIMPresenceForSessionStatus: function(sessionStatus) {
403 // Restore the last user-set presence when coming back from
404 // BUSY/IDLE (otherwise the last user-set presence matches
405 // the current one)
406 if (sessionStatus == GnomeSession.PresenceStatus.AVAILABLE)
407 return global.settings.get_int('saved-im-presence');
408
409 if (sessionStatus == GnomeSession.PresenceStatus.BUSY) {
410 // Only change presence if the current one is "more present" than
411 // busy, or if coming back from idle
412 if (this._currentPresence == Tp.ConnectionPresenceType.AVAILABLE ||
413 this._currentPresence == Tp.ConnectionPresenceType.EXTENDED_AWAY)
414 return Tp.ConnectionPresenceType.BUSY;
415 }
416
417 if (sessionStatus == GnomeSession.PresenceStatus.IDLE) {
418 // Only change presence if the current one is "more present" than
419 // idle
420 if (this._currentPresence != Tp.ConnectionPresenceType.OFFLINE &&
421 this._currentPresence != Tp.ConnectionPresenceType.HIDDEN)
422 return Tp.ConnectionPresenceType.EXTENDED_AWAY;
423 }
424
425 return this._currentPresence;
426 },
427
428 _sessionStatusChanged: function(sessionStatus) {
429 if (!this._imPresenceRestored)
430 return;
431
432 let savedStatus = global.settings.get_int('saved-session-presence');
433 if (!this._sessionPresenceRestored) {
434
435 // We should never save/restore a status other than AVAILABLE
436 // or BUSY
437 if (savedStatus != GnomeSession.PresenceStatus.AVAILABLE &&
438 savedStatus != GnomeSession.PresenceStatus.BUSY)
439 savedStatus = GnomeSession.PresenceStatus.AVAILABLE;
440
441 if (sessionStatus != savedStatus) {
442 this._presence.status = savedStatus;
443 return;
444 }
445 this._sessionPresenceRestored = true;
446 }
447
448 if ((sessionStatus == GnomeSession.PresenceStatus.AVAILABLE ||
449 sessionStatus == GnomeSession.PresenceStatus.BUSY) &&
450 savedStatus != sessionStatus)
451 global.settings.set_int('saved-session-presence', sessionStatus);
452
453 let [presence, s, msg] = this._accountMgr.get_most_available_presence();
454 let newPresence, status;
455
456 let newPresence = this.getIMPresenceForSessionStatus(sessionStatus);
457
458 if (!newPresence || newPresence == presence)
459 return;
460
461 status = this._statusForPresence(newPresence);
462 msg = msg ? msg : '';
463
464 this._expectedPresence = newPresence;
465 this._accountMgr.set_all_requested_presences(newPresence, status, msg);
466 }
467});
468
469
470const UserMenuButton = new Lang.Class({
471 Name: 'UserMenuButton',
472 Extends: PanelMenu.Button,
473
474 _init: function() {
475 this.parent(0.0);
476
477 this.actor.accessible_role = Atk.Role.MENU;
478
479 let box = new St.BoxLayout({ name: 'panelUserMenu' });
480 this.actor.add_actor(box);
481
482 this._screenSaverSettings = new Gio.Settings({ schema: SCREENSAVER_SCHEMA });
483 this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA });
484
485 this._userManager = AccountsService.UserManager.get_default();
486
487 this._user = this._userManager.get_user(GLib.get_user_name());
488 this._presence = new GnomeSession.Presence();
489 this._session = new GnomeSession.SessionManager();
490 this._haveShutdown = true;
491
492 this._accountMgr = Tp.AccountManager.dup();
493
494 this._upClient = new UPowerGlib.Client();
495 this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
496
497 this._iconBox = new St.Bin();
498 box.add(this._iconBox, { y_align: St.Align.MIDDLE, y_fill: false });
499
500 let textureCache = St.TextureCache.get_default();
501 this._offlineIcon = new St.Icon({ icon_name: 'user-offline-symbolic',
502 style_class: 'popup-menu-icon' });
503 this._availableIcon = new St.Icon({ icon_name: 'user-available-symbolic',
504 style_class: 'popup-menu-icon' });
505 this._busyIcon = new St.Icon({ icon_name: 'user-busy-symbolic',
506 style_class: 'popup-menu-icon' });
507 this._invisibleIcon = new St.Icon({ icon_name: 'user-invisible-symbolic',
508 style_class: 'popup-menu-icon' });
509 this._awayIcon = new St.Icon({ icon_name: 'user-away-symbolic',
510 style_class: 'popup-menu-icon' });
511 this._idleIcon = new St.Icon({ icon_name: 'user-idle-symbolic',
512 style_class: 'popup-menu-icon' });
513 this._pendingIcon = new St.Icon({ icon_name: 'user-status-pending-symbolic',
514 style_class: 'popup-menu-icon' });
515 this._lockedIcon = new St.Icon({ icon_name: 'changes-prevent-symbolic',
516 style_class: 'popup-menu-icon' });
517
518 this._accountMgr.connect('most-available-presence-changed',
519 Lang.bind(this, this._updatePresenceIcon));
520 this._accountMgr.connect('account-enabled',
521 Lang.bind(this, this._onAccountEnabled));
522 this._accountMgr.connect('account-removed',
523 Lang.bind(this, this._onAccountRemoved));
524 this._accountMgr.prepare_async(null, Lang.bind(this,
525 function(mgr) {
526 let [presence, s, msg] = mgr.get_most_available_presence();
527 this._updatePresenceIcon(mgr, presence, s, msg);
528 this._setupAccounts();
529 }));
530
531 this._name = new St.Label();
532 this.actor.label_actor = this._name;
533 box.add(this._name, { y_align: St.Align.MIDDLE, y_fill: false });
534 this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName));
535 this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName));
536 this._updateUserName();
537
538 this._createSubMenu();
539
540 this._updateSwitch(this._presence.status);
541 this._presence.connectSignal('StatusChanged', Lang.bind(this, function (proxy, senderName, [status]) {
542 this._updateSwitch(status);
543 }));
544
545 this._userManager.connect('notify::is-loaded',
546 Lang.bind(this, this._updateMultiUser));
547 this._userManager.connect('notify::has-multiple-users',
548 Lang.bind(this, this._updateMultiUser));
549 this._userManager.connect('user-added',
550 Lang.bind(this, this._updateMultiUser));
551 this._userManager.connect('user-removed',
552 Lang.bind(this, this._updateMultiUser));
553 this._lockdownSettings.connect('changed::' + DISABLE_USER_SWITCH_KEY,
554 Lang.bind(this, this._updateSwitchUser));
555 this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
556 Lang.bind(this, this._updateLogout));
557
558 this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
559 Lang.bind(this, this._updateLockScreen));
560 this._updateSwitchUser();
561 this._updateLogout();
562 this._updateLockScreen();
563
564 this._updatesFile = Gio.File.new_for_path('/var/lib/PackageKit/prepared-update');
565 this._updatesMonitor = this._updatesFile.monitor(Gio.FileMonitorFlags.NONE, null);
566 this._updatesMonitor.connect('changed', Lang.bind(this, this._updateInstallUpdates));
567
568 // Whether shutdown is available or not depends on both lockdown
569 // settings (disable-log-out) and Polkit policy - the latter doesn't
570 // notify, so we update the menu item each time the menu opens or
571 // the lockdown setting changes, which should be close enough.
572 this.menu.connect('open-state-changed', Lang.bind(this,
573 function(menu, open) {
574 if (open)
575 this._updateHaveShutdown();
576 }));
577 this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
578 Lang.bind(this, this._updateHaveShutdown));
579
580 this._upClient.connect('notify::can-suspend', Lang.bind(this, this._updateSuspendOrPowerOff));
581
582 Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
583 this._sessionUpdated();
584 },
585
586 _sessionUpdated: function() {
587 this.actor.visible = !Main.sessionMode.isGreeter;
588
589 let allowSettings = Main.sessionMode.allowSettings;
590 this._statusChooser.setSensitive(allowSettings);
591 this._systemSettings.visible = allowSettings;
592
593 this.setSensitive(!Main.sessionMode.isLocked);
594 this._updatePresenceIcon();
595 },
596
597 _onDestroy: function() {
598 this._user.disconnect(this._userLoadedId);
599 this._user.disconnect(this._userChangedId);
600 },
601
602 _updateUserName: function() {
603 if (this._user.is_loaded)
604 this._name.set_text(this._user.get_real_name());
605 else
606 this._name.set_text("");
607 },
608
609 _updateMultiUser: function() {
610 this._updateSwitchUser();
611 this._updateLogout();
612 },
613
614 _updateSwitchUser: function() {
615 let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY);
616 let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users;
617
618 this._loginScreenItem.actor.visible = allowSwitch && multiUser;
619 },
620
621 _updateLogout: function() {
622 let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
623 let alwaysShow = global.settings.get_boolean(ALWAYS_SHOW_LOG_OUT_KEY);
624 let systemAccount = this._user.system_account;
625 let localAccount = this._user.local_account;
626 let multiUser = this._userManager.has_multiple_users;
627 let multiSession = Gdm.get_session_ids().length > 1;
628
629 this._logoutItem.actor.visible = allowLogout && (alwaysShow || multiUser || multiSession || systemAccount || !localAccount);
630 },
631
632 _updateLockScreen: function() {
633 let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
634 this._lockScreenItem.actor.visible = allowLockScreen;
635 },
636
637 _updateInstallUpdates: function() {
638 let haveUpdates = this._updatesFile.query_exists(null);
639 this._installUpdatesItem.actor.visible = haveUpdates && this._haveShutdown;
640 },
641
642 _updateHaveShutdown: function() {
643 this._session.CanShutdownRemote(Lang.bind(this,
644 function(result, error) {
645 if (!error) {
646 this._haveShutdown = result[0];
647 this._updateInstallUpdates();
648 this._updateSuspendOrPowerOff();
649 }
650 }));
651 },
652
653 _updateSuspendOrPowerOff: function() {
654 this._haveSuspend = this._upClient.get_can_suspend();
655
656 if (!this._suspendOrPowerOffItem)
657 return;
658
659 this._suspendOrPowerOffItem.actor.visible = this._haveShutdown || this._haveSuspend;
660
661 // If we can't power off show Suspend instead
662 // and disable the alt key
663 if (!this._haveShutdown) {
664 this._suspendOrPowerOffItem.updateText(_("Suspend"), null);
665 } else if (!this._haveSuspend) {
666 this._suspendOrPowerOffItem.updateText(_("Power Off"), null);
667 } else {
668 this._suspendOrPowerOffItem.updateText(_("Power Off"), _("Suspend"));
669 }
670 },
671
672 _updateSwitch: function(status) {
673 let active = status == GnomeSession.PresenceStatus.AVAILABLE;
674 this._notificationsSwitch.setToggleState(active);
675 },
676
677 _updatePresenceIcon: function(accountMgr, presence, status, message) {
678 if (Main.sessionMode.isLocked)
679 this._iconBox.child = this._lockedIcon;
680 else if (presence == Tp.ConnectionPresenceType.AVAILABLE)
681 this._iconBox.child = this._availableIcon;
682 else if (presence == Tp.ConnectionPresenceType.BUSY)
683 this._iconBox.child = this._busyIcon;
684 else if (presence == Tp.ConnectionPresenceType.HIDDEN)
685 this._iconBox.child = this._invisibleIcon;
686 else if (presence == Tp.ConnectionPresenceType.AWAY)
687 this._iconBox.child = this._awayIcon;
688 else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY)
689 this._iconBox.child = this._idleIcon;
690 else
691 this._iconBox.child = this._offlineIcon;
692 },
693
694 _setupAccounts: function() {
695 let accounts = this._accountMgr.get_valid_accounts();
696 for (let i = 0; i < accounts.length; i++) {
697 accounts[i]._changingId = accounts[i].connect('notify::connection-status',
698 Lang.bind(this, this._updateChangingPresence));
699 }
700 this._updateChangingPresence();
701 },
702
703 _onAccountEnabled: function(accountMgr, account) {
704 if (!account._changingId)
705 account._changingId = account.connect('notify::connection-status',
706 Lang.bind(this, this._updateChangingPresence));
707 this._updateChangingPresence();
708 },
709
710 _onAccountRemoved: function(accountMgr, account) {
711 if (account._changingId) {
712 account.disconnect(account._changingId);
713 account._changingId = 0;
714 }
715 this._updateChangingPresence();
716 },
717
718 _updateChangingPresence: function() {
719 let accounts = this._accountMgr.get_valid_accounts();
720 let changing = false;
721 for (let i = 0; i < accounts.length; i++) {
722 if (accounts[i].connection_status == Tp.ConnectionStatus.CONNECTING) {
723 changing = true;
724 break;
725 }
726 }
727
728 if (changing) {
729 this._iconBox.child = this._pendingIcon;
730 } else {
731 let [presence, s, msg] = this._accountMgr.get_most_available_presence();
732 this._updatePresenceIcon(this._accountMgr, presence, s, msg);
733 }
734 },
735
736 _createSubMenu: function() {
737 let item;
738
739 item = new IMStatusChooserItem();
740 item.connect('activate', Lang.bind(this, this._onMyAccountActivate));
741 this.menu.addMenuItem(item);
742 this._statusChooser = item;
743
744 item = new PopupMenu.PopupSwitchMenuItem(_("Notifications"));
745 item.connect('toggled', Lang.bind(this, this._updatePresenceStatus));
746 this.menu.addMenuItem(item);
747 this._notificationsSwitch = item;
748
749 item = new PopupMenu.PopupSeparatorMenuItem();
750 this.menu.addMenuItem(item);
751
752 item = new PopupMenu.PopupMenuItem(_("System Settings"));
753 item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
754 this.menu.addMenuItem(item);
755 this._systemSettings = item;
756
757 item = new PopupMenu.PopupSeparatorMenuItem();
758 this.menu.addMenuItem(item);
759
760 item = new PopupMenu.PopupMenuItem(_("Switch User"));
761 item.connect('activate', Lang.bind(this, this._onLoginScreenActivate));
762 this.menu.addMenuItem(item);
763 this._loginScreenItem = item;
764
765 item = new PopupMenu.PopupMenuItem(_("Log Out"));
766 item.connect('activate', Lang.bind(this, this._onQuitSessionActivate));
767 this.menu.addMenuItem(item);
768 this._logoutItem = item;
769
770 item = new PopupMenu.PopupMenuItem(_("Lock"));
771 item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
772 this.menu.addMenuItem(item);
773 this._lockScreenItem = item;
774
775 item = new PopupMenu.PopupSeparatorMenuItem();
776 this.menu.addMenuItem(item);
777
778 item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"),
779 _("Suspend"));
780 this.menu.addMenuItem(item);
781 item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate));
782 this._suspendOrPowerOffItem = item;
783 this._updateSuspendOrPowerOff();
784
785 item = new PopupMenu.PopupMenuItem(_("Install Updates & Restart"));
786 item.connect('activate', Lang.bind(this, this._onInstallUpdatesActivate));
787 this.menu.addMenuItem(item);
788 this._installUpdatesItem = item;
789 },
790
791 _updatePresenceStatus: function(item, event) {
792 let status;
793
794 if (item.state) {
795 status = GnomeSession.PresenceStatus.AVAILABLE;
796 } else {
797 status = GnomeSession.PresenceStatus.BUSY;
798
799 let [presence, s, msg] = this._accountMgr.get_most_available_presence();
800 let newPresence = this._statusChooser.getIMPresenceForSessionStatus(status);
801 if (newPresence != presence &&
802 newPresence == Tp.ConnectionPresenceType.BUSY)
803 Main.notify(_("Your chat status will be set to busy"),
804 _("Notifications are now disabled, including chat messages. Your online status has been adjusted to let others know that you might not see their messages."));
805 }
806
807 this._presence.status = status;
808 },
809
810 _onMyAccountActivate: function() {
811 Main.overview.hide();
812 let app = Shell.AppSystem.get_default().lookup_setting('gnome-user-accounts-panel.desktop');
813 app.activate();
814 },
815
816 _onPreferencesActivate: function() {
817 Main.overview.hide();
818 let app = Shell.AppSystem.get_default().lookup_app('gnome-control-center.desktop');
819 app.activate();
820 },
821
822 _onLockScreenActivate: function() {
823 this.menu.close(BoxPointer.PopupAnimation.NONE);
824 Main.overview.hide();
825 Main.screenShield.lock(true);
826 },
827
828 _onLoginScreenActivate: function() {
829 this.menu.close(BoxPointer.PopupAnimation.NONE);
830 Main.overview.hide();
831 Main.screenShield.lock(false);
832 Gdm.goto_login_session_sync(null);
833 },
834
835 _onQuitSessionActivate: function() {
836 Main.overview.hide();
837 this._session.LogoutRemote(0);
838 },
839
840 _onInstallUpdatesActivate: function() {
841 Main.overview.hide();
842 Util.spawn(['pkexec', '/usr/libexec/pk-trigger-offline-update']);
843
844 this._session.RebootRemote();
845 },
846
847 _onSuspendOrPowerOffActivate: function() {
848 Main.overview.hide();
849
850 if (this._haveShutdown &&
851 this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
852 this._session.ShutdownRemote();
853 } else {
854 if (this._screenSaverSettings.get_boolean(LOCK_ENABLED_KEY)) {
855 let tmpId = Main.screenShield.connect('lock-screen-shown', Lang.bind(this, function() {
856 Main.screenShield.disconnect(tmpId);
857
858 this._upClient.suspend_sync(null);
859 }));
860
861 this.menu.close(BoxPointer.PopupAnimation.NONE);
862 Main.screenShield.lock(true);
863 } else {
864 this._upClient.suspend_sync(null);
865 }
866 }
867 }
868});
8690
=== removed directory '.pc/ubuntu_lock_on_suspend.patch'
=== removed directory '.pc/ubuntu_lock_on_suspend.patch/js'
=== removed directory '.pc/ubuntu_lock_on_suspend.patch/js/ui'
=== removed file '.pc/ubuntu_lock_on_suspend.patch/js/ui/userMenu.js'
--- .pc/ubuntu_lock_on_suspend.patch/js/ui/userMenu.js 2012-11-26 15:57:51 +0000
+++ .pc/ubuntu_lock_on_suspend.patch/js/ui/userMenu.js 1970-01-01 00:00:00 +0000
@@ -1,885 +0,0 @@
1// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
2
3const AccountsService = imports.gi.AccountsService;
4const Gdm = imports.gi.Gdm;
5const Gio = imports.gi.Gio;
6const GLib = imports.gi.GLib;
7const Lang = imports.lang;
8const Pango = imports.gi.Pango;
9const Shell = imports.gi.Shell;
10const St = imports.gi.St;
11const Tp = imports.gi.TelepathyGLib;
12const UPowerGlib = imports.gi.UPowerGlib;
13const Atk = imports.gi.Atk;
14
15const BoxPointer = imports.ui.boxpointer;
16const GnomeSession = imports.misc.gnomeSession;
17const Main = imports.ui.main;
18const PanelMenu = imports.ui.panelMenu;
19const PopupMenu = imports.ui.popupMenu;
20const Params = imports.misc.params;
21const UnlockDialog = imports.ui.unlockDialog;
22const Util = imports.misc.util;
23
24const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
25const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
26const DISABLE_USER_SWITCH_KEY = 'disable-user-switching';
27const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen';
28const DISABLE_LOG_OUT_KEY = 'disable-log-out';
29const LOCK_ENABLED_KEY = 'lock-enabled';
30const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
31
32const DIALOG_ICON_SIZE = 64;
33
34const IMStatus = {
35 AVAILABLE: 0,
36 BUSY: 1,
37 HIDDEN: 2,
38 AWAY: 3,
39 IDLE: 4,
40 OFFLINE: 5,
41 LAST: 6
42};
43
44// Adapted from gdm/gui/user-switch-applet/applet.c
45//
46// Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>.
47// Copyright (C) 2008,2009 Red Hat, Inc.
48
49const UserAvatarWidget = new Lang.Class({
50 Name: 'UserAvatarWidget',
51
52 _init: function(user, params) {
53 this._user = user;
54 params = Params.parse(params, { reactive: false,
55 iconSize: DIALOG_ICON_SIZE,
56 styleClass: 'status-chooser-user-icon' });
57 this._iconSize = params.iconSize;
58
59 this.actor = new St.Bin({ style_class: params.styleClass,
60 track_hover: params.reactive,
61 reactive: params.reactive });
62 },
63
64 setSensitive: function(sensitive) {
65 this.actor.can_focus = sensitive;
66 this.actor.reactive = sensitive;
67 },
68
69 update: function() {
70 let iconFile = this._user.get_icon_file();
71 if (!GLib.file_test(iconFile, GLib.FileTest.EXISTS))
72 iconFile = null;
73
74 if (iconFile) {
75 let file = Gio.File.new_for_path(iconFile);
76 this.actor.child = null;
77 this.actor.style = 'background-image: url("%s");'.format(iconFile);
78
79 // AccountsService uses a fixed location for avatar images, so
80 // we need to clear out all cached data to pick up image changes,
81 // see https://bugzilla.gnome.org/show_bug.cgi?id=679268
82 this.actor.clear_background_image();
83 } else {
84 this.actor.style = null;
85 this.actor.child = new St.Icon({ icon_name: 'avatar-default-symbolic',
86 icon_size: this._iconSize });
87 }
88 }
89});
90
91const IMStatusItem = new Lang.Class({
92 Name: 'IMStatusItem',
93 Extends: PopupMenu.PopupBaseMenuItem,
94
95 _init: function(label, iconName) {
96 this.parent();
97
98 this.actor.add_style_class_name('status-chooser-status-item');
99
100 this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
101 this.addActor(this._icon);
102
103 if (iconName)
104 this._icon.icon_name = iconName;
105
106 this.label = new St.Label({ text: label });
107 this.actor.label_actor = this.label;
108 this.addActor(this.label);
109 }
110});
111
112const IMUserNameItem = new Lang.Class({
113 Name: 'IMUserNameItem',
114 Extends: PopupMenu.PopupBaseMenuItem,
115
116 _init: function() {
117 this.parent({ reactive: false,
118 can_focus: false,
119 style_class: 'status-chooser-user-name' });
120
121 this._wrapper = new Shell.GenericContainer();
122 this._wrapper.connect('get-preferred-width',
123 Lang.bind(this, this._wrapperGetPreferredWidth));
124 this._wrapper.connect('get-preferred-height',
125 Lang.bind(this, this._wrapperGetPreferredHeight));
126 this._wrapper.connect('allocate',
127 Lang.bind(this, this._wrapperAllocate));
128 this.addActor(this._wrapper, { expand: true, span: -1 });
129
130 this.label = new St.Label();
131 this.label.clutter_text.set_line_wrap(true);
132 this.label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
133 this._wrapper.add_actor(this.label);
134 },
135
136 _wrapperGetPreferredWidth: function(actor, forHeight, alloc) {
137 alloc.min_size = 1;
138 alloc.natural_size = 1;
139 },
140
141 _wrapperGetPreferredHeight: function(actor, forWidth, alloc) {
142 [alloc.min_size, alloc.natural_size] = this.label.get_preferred_height(forWidth);
143 },
144
145 _wrapperAllocate: function(actor, box, flags) {
146 this.label.allocate(box, flags);
147 }
148});
149
150const IMStatusChooserItem = new Lang.Class({
151 Name: 'IMStatusChooserItem',
152 Extends: PopupMenu.PopupBaseMenuItem,
153
154 _init: function() {
155 this.parent({ reactive: false,
156 can_focus: false,
157 style_class: 'status-chooser' });
158
159 this._userManager = AccountsService.UserManager.get_default();
160 this._user = this._userManager.get_user(GLib.get_user_name());
161
162 this._avatar = new UserAvatarWidget(this._user, { reactive: true });
163 this._iconBin = new St.Button({ child: this._avatar.actor });
164 this.addActor(this._iconBin);
165
166 this._iconBin.connect('clicked', Lang.bind(this,
167 function() {
168 this.activate();
169 }));
170
171 this._section = new PopupMenu.PopupMenuSection();
172 this.addActor(this._section.actor);
173
174 this._name = new IMUserNameItem();
175 this._section.addMenuItem(this._name);
176
177 this._combo = new PopupMenu.PopupComboBoxMenuItem({ style_class: 'status-chooser-combo' });
178 this._section.addMenuItem(this._combo);
179
180 let item;
181
182 item = new IMStatusItem(_("Available"), 'user-available-symbolic');
183 this._combo.addMenuItem(item, IMStatus.AVAILABLE);
184
185 item = new IMStatusItem(_("Busy"), 'user-busy-symbolic');
186 this._combo.addMenuItem(item, IMStatus.BUSY);
187
188 item = new IMStatusItem(_("Invisible"), 'user-invisible-symbolic');
189 this._combo.addMenuItem(item, IMStatus.HIDDEN);
190
191 item = new IMStatusItem(_("Away"), 'user-away-symbolic');
192 this._combo.addMenuItem(item, IMStatus.AWAY);
193
194 item = new IMStatusItem(_("Idle"), 'user-idle-symbolic');
195 this._combo.addMenuItem(item, IMStatus.IDLE);
196
197 item = new IMStatusItem(_("Unavailable"), 'user-offline-symbolic');
198 this._combo.addMenuItem(item, IMStatus.OFFLINE);
199
200 this._combo.connect('active-item-changed',
201 Lang.bind(this, this._changeIMStatus));
202
203 this._presence = new GnomeSession.Presence();
204 this._presence.connectSignal('StatusChanged', Lang.bind(this, function(proxy, senderName, [status]) {
205 this._sessionStatusChanged(status);
206 }));
207
208 this._sessionPresenceRestored = false;
209 this._imPresenceRestored = false;
210 this._currentPresence = undefined;
211
212 this._accountMgr = Tp.AccountManager.dup();
213 this._accountMgr.connect('most-available-presence-changed',
214 Lang.bind(this, this._IMStatusChanged));
215 this._accountMgr.connect('account-enabled',
216 Lang.bind(this, this._IMAccountsChanged));
217 this._accountMgr.connect('account-disabled',
218 Lang.bind(this, this._IMAccountsChanged));
219 this._accountMgr.connect('account-removed',
220 Lang.bind(this, this._IMAccountsChanged));
221 this._accountMgr.connect('account-validity-changed',
222 Lang.bind(this, this._IMAccountsChanged));
223 this._accountMgr.prepare_async(null, Lang.bind(this,
224 function(mgr) {
225 this._IMAccountsChanged(mgr);
226
227 if (this._networkMonitor.network_available)
228 this._restorePresence();
229 else
230 this._setComboboxPresence(Tp.ConnectionPresenceType.OFFLINE);
231 }));
232
233 this._networkMonitor = Gio.NetworkMonitor.get_default();
234 this._networkMonitor.connect('network-changed',
235 Lang.bind(this, function(monitor, available) {
236 this._IMAccountsChanged(this._accountMgr);
237
238 if (available && !this._imPresenceRestored)
239 this._restorePresence();
240 }));
241
242 this._userLoadedId = this._user.connect('notify::is-loaded',
243 Lang.bind(this,
244 this._updateUser));
245 this._userChangedId = this._user.connect('changed',
246 Lang.bind(this,
247 this._updateUser));
248 this.actor.connect('notify::mapped', Lang.bind(this, function() {
249 if (this.actor.mapped)
250 this._updateUser();
251 }));
252
253 this.connect('sensitive-changed', function(sensitive) {
254 this._avatar.setSensitive(sensitive);
255 });
256 },
257
258 _restorePresence: function() {
259 let [presence, status, msg] = this._accountMgr.get_most_available_presence();
260
261 let savedPresence = global.settings.get_int('saved-im-presence');
262
263 if (savedPresence == presence) {
264 this._IMStatusChanged(this._accountMgr, presence, status, msg);
265 } else {
266 this._setComboboxPresence(savedPresence);
267 status = this._statusForPresence(savedPresence);
268 msg = msg ? msg : '';
269 this._accountMgr.set_all_requested_presences(savedPresence, status, msg);
270 }
271 },
272
273 destroy: function() {
274 // clean up signal handlers
275 if (this._userLoadedId != 0) {
276 this._user.disconnect(this._userLoadedId);
277 this._userLoadedId = 0;
278 }
279
280 if (this._userChangedId != 0) {
281 this._user.disconnect(this._userChangedId);
282 this._userChangedId = 0;
283 }
284
285 this.parent();
286 },
287
288 // Override getColumnWidths()/setColumnWidths() to make the item
289 // independent from the overall column layout of the menu
290 getColumnWidths: function() {
291 return [];
292 },
293
294 setColumnWidths: function(widths) {
295 },
296
297 _updateUser: function() {
298 if (this._user.is_loaded)
299 this._name.label.set_text(this._user.get_real_name());
300 else
301 this._name.label.set_text("");
302
303 this._avatar.update();
304 },
305
306 _statusForPresence: function(presence) {
307 switch(presence) {
308 case Tp.ConnectionPresenceType.AVAILABLE:
309 return 'available';
310 case Tp.ConnectionPresenceType.BUSY:
311 return 'busy';
312 case Tp.ConnectionPresenceType.OFFLINE:
313 return 'offline';
314 case Tp.ConnectionPresenceType.HIDDEN:
315 return 'hidden';
316 case Tp.ConnectionPresenceType.AWAY:
317 return 'away';
318 case Tp.ConnectionPresenceType.EXTENDED_AWAY:
319 return 'xa';
320 default:
321 return 'unknown';
322 }
323 },
324
325 _IMAccountsChanged: function(mgr) {
326 let accounts = mgr.get_valid_accounts().filter(function(account) {
327 return account.enabled;
328 });
329 let sensitive = accounts.length > 0 && this._networkMonitor.network_available;
330 this._combo.setSensitive(sensitive);
331 },
332
333 _IMStatusChanged: function(accountMgr, presence, status, message) {
334 if (!this._imPresenceRestored)
335 this._imPresenceRestored = true;
336
337 if (presence == this._currentPresence)
338 return;
339
340 this._currentPresence = presence;
341 this._setComboboxPresence(presence);
342
343 if (!this._sessionPresenceRestored) {
344 this._sessionStatusChanged(this._presence.status);
345 return;
346 }
347
348 if (presence == Tp.ConnectionPresenceType.AVAILABLE)
349 this._presence.status = GnomeSession.PresenceStatus.AVAILABLE;
350
351 // We ignore the actual value of _expectedPresence and never safe
352 // the first presence change after an "automatic" change, assuming
353 // that it is the response to our request; this is to account for
354 // mission control falling back to "similar" presences if an account
355 // type does not implement the requested presence.
356 if (!this._expectedPresence)
357 global.settings.set_int('saved-im-presence', presence);
358 else
359 this._expectedPresence = undefined;
360 },
361
362 _setComboboxPresence: function(presence) {
363 let activatedItem;
364
365 if (presence == Tp.ConnectionPresenceType.AVAILABLE)
366 activatedItem = IMStatus.AVAILABLE;
367 else if (presence == Tp.ConnectionPresenceType.BUSY)
368 activatedItem = IMStatus.BUSY;
369 else if (presence == Tp.ConnectionPresenceType.HIDDEN)
370 activatedItem = IMStatus.HIDDEN;
371 else if (presence == Tp.ConnectionPresenceType.AWAY)
372 activatedItem = IMStatus.AWAY;
373 else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY)
374 activatedItem = IMStatus.IDLE;
375 else
376 activatedItem = IMStatus.OFFLINE;
377
378 this._combo.setActiveItem(activatedItem);
379 for (let i = 0; i < IMStatus.LAST; i++) {
380 if (i == IMStatus.AVAILABLE || i == IMStatus.OFFLINE)
381 continue; // always visible
382
383 this._combo.setItemVisible(i, i == activatedItem);
384 }
385 },
386
387 _changeIMStatus: function(menuItem, id) {
388 let [presence, s, msg] = this._accountMgr.get_most_available_presence();
389 let newPresence, status;
390
391 if (id == IMStatus.AVAILABLE) {
392 newPresence = Tp.ConnectionPresenceType.AVAILABLE;
393 } else if (id == IMStatus.OFFLINE) {
394 newPresence = Tp.ConnectionPresenceType.OFFLINE;
395 } else
396 return;
397
398 status = this._statusForPresence(newPresence);
399 msg = msg ? msg : '';
400 this._accountMgr.set_all_requested_presences(newPresence, status, msg);
401 },
402
403 getIMPresenceForSessionStatus: function(sessionStatus) {
404 // Restore the last user-set presence when coming back from
405 // BUSY/IDLE (otherwise the last user-set presence matches
406 // the current one)
407 if (sessionStatus == GnomeSession.PresenceStatus.AVAILABLE)
408 return global.settings.get_int('saved-im-presence');
409
410 if (sessionStatus == GnomeSession.PresenceStatus.BUSY) {
411 // Only change presence if the current one is "more present" than
412 // busy, or if coming back from idle
413 if (this._currentPresence == Tp.ConnectionPresenceType.AVAILABLE ||
414 this._currentPresence == Tp.ConnectionPresenceType.EXTENDED_AWAY)
415 return Tp.ConnectionPresenceType.BUSY;
416 }
417
418 if (sessionStatus == GnomeSession.PresenceStatus.IDLE) {
419 // Only change presence if the current one is "more present" than
420 // idle
421 if (this._currentPresence != Tp.ConnectionPresenceType.OFFLINE &&
422 this._currentPresence != Tp.ConnectionPresenceType.HIDDEN)
423 return Tp.ConnectionPresenceType.EXTENDED_AWAY;
424 }
425
426 return this._currentPresence;
427 },
428
429 _sessionStatusChanged: function(sessionStatus) {
430 if (!this._imPresenceRestored)
431 return;
432
433 let savedStatus = global.settings.get_int('saved-session-presence');
434 if (!this._sessionPresenceRestored) {
435
436 // We should never save/restore a status other than AVAILABLE
437 // or BUSY
438 if (savedStatus != GnomeSession.PresenceStatus.AVAILABLE &&
439 savedStatus != GnomeSession.PresenceStatus.BUSY)
440 savedStatus = GnomeSession.PresenceStatus.AVAILABLE;
441
442 if (sessionStatus != savedStatus) {
443 this._presence.status = savedStatus;
444 return;
445 }
446 this._sessionPresenceRestored = true;
447 }
448
449 if ((sessionStatus == GnomeSession.PresenceStatus.AVAILABLE ||
450 sessionStatus == GnomeSession.PresenceStatus.BUSY) &&
451 savedStatus != sessionStatus)
452 global.settings.set_int('saved-session-presence', sessionStatus);
453
454 let [presence, s, msg] = this._accountMgr.get_most_available_presence();
455 let newPresence, status;
456
457 let newPresence = this.getIMPresenceForSessionStatus(sessionStatus);
458
459 if (!newPresence || newPresence == presence)
460 return;
461
462 status = this._statusForPresence(newPresence);
463 msg = msg ? msg : '';
464
465 this._expectedPresence = newPresence;
466 this._accountMgr.set_all_requested_presences(newPresence, status, msg);
467 }
468});
469
470
471const UserMenuButton = new Lang.Class({
472 Name: 'UserMenuButton',
473 Extends: PanelMenu.Button,
474
475 _init: function() {
476 this.parent(0.0);
477
478 this.actor.accessible_role = Atk.Role.MENU;
479
480 let box = new St.BoxLayout({ name: 'panelUserMenu' });
481 this.actor.add_actor(box);
482
483 this._screenSaverSettings = new Gio.Settings({ schema: SCREENSAVER_SCHEMA });
484 this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA });
485
486 this._userManager = AccountsService.UserManager.get_default();
487
488 this._user = this._userManager.get_user(GLib.get_user_name());
489 this._presence = new GnomeSession.Presence();
490 this._session = new GnomeSession.SessionManager();
491 this._haveShutdown = true;
492
493 this._accountMgr = Tp.AccountManager.dup();
494
495 this._upClient = new UPowerGlib.Client();
496 this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
497
498 this._iconBox = new St.Bin();
499 box.add(this._iconBox, { y_align: St.Align.MIDDLE, y_fill: false });
500
501 let textureCache = St.TextureCache.get_default();
502 this._offlineIcon = new St.Icon({ icon_name: 'user-offline-symbolic',
503 style_class: 'popup-menu-icon' });
504 this._availableIcon = new St.Icon({ icon_name: 'user-available-symbolic',
505 style_class: 'popup-menu-icon' });
506 this._busyIcon = new St.Icon({ icon_name: 'user-busy-symbolic',
507 style_class: 'popup-menu-icon' });
508 this._invisibleIcon = new St.Icon({ icon_name: 'user-invisible-symbolic',
509 style_class: 'popup-menu-icon' });
510 this._awayIcon = new St.Icon({ icon_name: 'user-away-symbolic',
511 style_class: 'popup-menu-icon' });
512 this._idleIcon = new St.Icon({ icon_name: 'user-idle-symbolic',
513 style_class: 'popup-menu-icon' });
514 this._pendingIcon = new St.Icon({ icon_name: 'user-status-pending-symbolic',
515 style_class: 'popup-menu-icon' });
516 this._lockedIcon = new St.Icon({ icon_name: 'changes-prevent-symbolic',
517 style_class: 'popup-menu-icon' });
518
519 this._accountMgr.connect('most-available-presence-changed',
520 Lang.bind(this, this._updatePresenceIcon));
521 this._accountMgr.connect('account-enabled',
522 Lang.bind(this, this._onAccountEnabled));
523 this._accountMgr.connect('account-removed',
524 Lang.bind(this, this._onAccountRemoved));
525 this._accountMgr.prepare_async(null, Lang.bind(this,
526 function(mgr) {
527 let [presence, s, msg] = mgr.get_most_available_presence();
528 this._updatePresenceIcon(mgr, presence, s, msg);
529 this._setupAccounts();
530 }));
531
532 this._name = new St.Label();
533 this.actor.label_actor = this._name;
534 box.add(this._name, { y_align: St.Align.MIDDLE, y_fill: false });
535 this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName));
536 this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName));
537 this._updateUserName();
538
539 this._createSubMenu();
540
541 this._updateSwitch(this._presence.status);
542 this._presence.connectSignal('StatusChanged', Lang.bind(this, function (proxy, senderName, [status]) {
543 this._updateSwitch(status);
544 }));
545
546 this._userManager.connect('notify::is-loaded',
547 Lang.bind(this, this._updateMultiUser));
548 this._userManager.connect('notify::has-multiple-users',
549 Lang.bind(this, this._updateMultiUser));
550 this._userManager.connect('user-added',
551 Lang.bind(this, this._updateMultiUser));
552 this._userManager.connect('user-removed',
553 Lang.bind(this, this._updateMultiUser));
554 this._lockdownSettings.connect('changed::' + DISABLE_USER_SWITCH_KEY,
555 Lang.bind(this, this._updateSwitchUser));
556 this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
557 Lang.bind(this, this._updateLogout));
558
559 this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
560 Lang.bind(this, this._updateLockScreen));
561 this._updateSwitchUser();
562 this._updateLogout();
563 this._updateLockScreen();
564
565 this._updatesFile = Gio.File.new_for_path('/var/lib/PackageKit/prepared-update');
566 this._updatesMonitor = this._updatesFile.monitor(Gio.FileMonitorFlags.NONE, null);
567 this._updatesMonitor.connect('changed', Lang.bind(this, this._updateInstallUpdates));
568
569 // Whether shutdown is available or not depends on both lockdown
570 // settings (disable-log-out) and Polkit policy - the latter doesn't
571 // notify, so we update the menu item each time the menu opens or
572 // the lockdown setting changes, which should be close enough.
573 this.menu.connect('open-state-changed', Lang.bind(this,
574 function(menu, open) {
575 if (open)
576 this._updateHaveShutdown();
577 }));
578 this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
579 Lang.bind(this, this._updateHaveShutdown));
580
581 this._upClient.connect('notify::can-suspend', Lang.bind(this, this._updateSuspendOrPowerOff));
582
583 Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
584 this._sessionUpdated();
585 },
586
587 _sessionUpdated: function() {
588 this.actor.visible = !Main.sessionMode.isGreeter;
589
590 let allowSettings = Main.sessionMode.allowSettings;
591 this._statusChooser.setSensitive(allowSettings);
592 this._systemSettings.visible = allowSettings;
593
594 this.setSensitive(!Main.sessionMode.isLocked);
595 this._updatePresenceIcon();
596 },
597
598 _onDestroy: function() {
599 this._user.disconnect(this._userLoadedId);
600 this._user.disconnect(this._userChangedId);
601 },
602
603 _updateUserName: function() {
604 if (this._user.is_loaded)
605 this._name.set_text(this._user.get_real_name());
606 else
607 this._name.set_text("");
608 },
609
610 _updateMultiUser: function() {
611 this._updateSwitchUser();
612 this._updateLogout();
613 },
614
615 _updateSwitchUser: function() {
616 let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY);
617 let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users;
618
619 this._loginScreenItem.actor.visible = allowSwitch && multiUser;
620 },
621
622 _updateLogout: function() {
623 let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
624 let alwaysShow = global.settings.get_boolean(ALWAYS_SHOW_LOG_OUT_KEY);
625 let systemAccount = this._user.system_account;
626 let localAccount = this._user.local_account;
627 let multiUser = this._userManager.has_multiple_users;
628 let multiSession = Gdm.get_session_ids().length > 1;
629
630 this._logoutItem.actor.visible = allowLogout && (alwaysShow || multiUser || multiSession || systemAccount || !localAccount);
631 },
632
633 _updateLockScreen: function() {
634 let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
635 this._lockScreenItem.actor.visible = allowLockScreen;
636 },
637
638 _updateInstallUpdates: function() {
639 let haveUpdates = this._updatesFile.query_exists(null);
640 this._installUpdatesItem.actor.visible = haveUpdates && this._haveShutdown;
641 },
642
643 _updateHaveShutdown: function() {
644 this._session.CanShutdownRemote(Lang.bind(this,
645 function(result, error) {
646 if (!error) {
647 this._haveShutdown = result[0];
648 this._updateInstallUpdates();
649 this._updateSuspendOrPowerOff();
650 }
651 }));
652 },
653
654 _updateSuspendOrPowerOff: function() {
655 this._haveSuspend = this._upClient.get_can_suspend();
656
657 if (!this._suspendOrPowerOffItem)
658 return;
659
660 this._suspendOrPowerOffItem.actor.visible = this._haveShutdown || this._haveSuspend;
661
662 // If we can't power off show Suspend instead
663 // and disable the alt key
664 if (!this._haveShutdown) {
665 this._suspendOrPowerOffItem.updateText(_("Suspend"), null);
666 } else if (!this._haveSuspend) {
667 this._suspendOrPowerOffItem.updateText(_("Power Off"), null);
668 } else {
669 this._suspendOrPowerOffItem.updateText(_("Power Off"), _("Suspend"));
670 }
671 },
672
673 _updateSwitch: function(status) {
674 let active = status == GnomeSession.PresenceStatus.AVAILABLE;
675 this._notificationsSwitch.setToggleState(active);
676 },
677
678 _updatePresenceIcon: function(accountMgr, presence, status, message) {
679 if (Main.sessionMode.isLocked)
680 this._iconBox.child = this._lockedIcon;
681 else if (presence == Tp.ConnectionPresenceType.AVAILABLE)
682 this._iconBox.child = this._availableIcon;
683 else if (presence == Tp.ConnectionPresenceType.BUSY)
684 this._iconBox.child = this._busyIcon;
685 else if (presence == Tp.ConnectionPresenceType.HIDDEN)
686 this._iconBox.child = this._invisibleIcon;
687 else if (presence == Tp.ConnectionPresenceType.AWAY)
688 this._iconBox.child = this._awayIcon;
689 else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY)
690 this._iconBox.child = this._idleIcon;
691 else
692 this._iconBox.child = this._offlineIcon;
693 },
694
695 _setupAccounts: function() {
696 let accounts = this._accountMgr.get_valid_accounts();
697 for (let i = 0; i < accounts.length; i++) {
698 accounts[i]._changingId = accounts[i].connect('notify::connection-status',
699 Lang.bind(this, this._updateChangingPresence));
700 }
701 this._updateChangingPresence();
702 },
703
704 _onAccountEnabled: function(accountMgr, account) {
705 if (!account._changingId)
706 account._changingId = account.connect('notify::connection-status',
707 Lang.bind(this, this._updateChangingPresence));
708 this._updateChangingPresence();
709 },
710
711 _onAccountRemoved: function(accountMgr, account) {
712 if (account._changingId) {
713 account.disconnect(account._changingId);
714 account._changingId = 0;
715 }
716 this._updateChangingPresence();
717 },
718
719 _updateChangingPresence: function() {
720 let accounts = this._accountMgr.get_valid_accounts();
721 let changing = false;
722 for (let i = 0; i < accounts.length; i++) {
723 if (accounts[i].connection_status == Tp.ConnectionStatus.CONNECTING) {
724 changing = true;
725 break;
726 }
727 }
728
729 if (changing) {
730 this._iconBox.child = this._pendingIcon;
731 } else {
732 let [presence, s, msg] = this._accountMgr.get_most_available_presence();
733 this._updatePresenceIcon(this._accountMgr, presence, s, msg);
734 }
735 },
736
737 _createSubMenu: function() {
738 let item;
739
740 item = new IMStatusChooserItem();
741 item.connect('activate', Lang.bind(this, this._onMyAccountActivate));
742 this.menu.addMenuItem(item);
743 this._statusChooser = item;
744
745 item = new PopupMenu.PopupSwitchMenuItem(_("Notifications"));
746 item.connect('toggled', Lang.bind(this, this._updatePresenceStatus));
747 this.menu.addMenuItem(item);
748 this._notificationsSwitch = item;
749
750 item = new PopupMenu.PopupSeparatorMenuItem();
751 this.menu.addMenuItem(item);
752
753 item = new PopupMenu.PopupMenuItem(_("System Settings"));
754 item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
755 this.menu.addMenuItem(item);
756 this._systemSettings = item;
757
758 item = new PopupMenu.PopupSeparatorMenuItem();
759 this.menu.addMenuItem(item);
760
761 item = new PopupMenu.PopupMenuItem(_("Switch User"));
762 item.connect('activate', Lang.bind(this, this._onLoginScreenActivate));
763 this.menu.addMenuItem(item);
764 this._loginScreenItem = item;
765
766 item = new PopupMenu.PopupMenuItem(_("Log Out"));
767 item.connect('activate', Lang.bind(this, this._onQuitSessionActivate));
768 this.menu.addMenuItem(item);
769 this._logoutItem = item;
770
771 item = new PopupMenu.PopupMenuItem(_("Lock"));
772 item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
773 this.menu.addMenuItem(item);
774 this._lockScreenItem = item;
775
776 item = new PopupMenu.PopupSeparatorMenuItem();
777 this.menu.addMenuItem(item);
778
779 item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"),
780 _("Suspend"));
781 this.menu.addMenuItem(item);
782 item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate));
783 this._suspendOrPowerOffItem = item;
784 this._updateSuspendOrPowerOff();
785
786 item = new PopupMenu.PopupMenuItem(_("Install Updates & Restart"));
787 item.connect('activate', Lang.bind(this, this._onInstallUpdatesActivate));
788 this.menu.addMenuItem(item);
789 this._installUpdatesItem = item;
790 },
791
792 _updatePresenceStatus: function(item, event) {
793 let status;
794
795 if (item.state) {
796 status = GnomeSession.PresenceStatus.AVAILABLE;
797 } else {
798 status = GnomeSession.PresenceStatus.BUSY;
799
800 let [presence, s, msg] = this._accountMgr.get_most_available_presence();
801 let newPresence = this._statusChooser.getIMPresenceForSessionStatus(status);
802 if (newPresence != presence &&
803 newPresence == Tp.ConnectionPresenceType.BUSY)
804 Main.notify(_("Your chat status will be set to busy"),
805 _("Notifications are now disabled, including chat messages. Your online status has been adjusted to let others know that you might not see their messages."));
806 }
807
808 this._presence.status = status;
809 },
810
811 _onMyAccountActivate: function() {
812 Main.overview.hide();
813 let app = Shell.AppSystem.get_default().lookup_setting('gnome-user-accounts-panel.desktop');
814 app.activate();
815 },
816
817 _onPreferencesActivate: function() {
818 Main.overview.hide();
819 let app = Shell.AppSystem.get_default().lookup_app('gnome-control-center.desktop');
820 app.activate();
821 },
822
823 _onLockScreenActivate: function() {
824 this.menu.close(BoxPointer.PopupAnimation.NONE);
825 Main.overview.hide();
826 Main.screenShield.lock(true);
827 },
828
829 _onLoginScreenActivate: function() {
830 this.menu.close(BoxPointer.PopupAnimation.NONE);
831 Main.overview.hide();
832 Main.screenShield.lock(false);
833 if (UnlockDialog.isSupported())
834 Gdm.goto_login_session_sync(null);
835 else
836 this._lightdmLoginSession();
837 },
838
839 _onQuitSessionActivate: function() {
840 Main.overview.hide();
841 this._session.LogoutRemote(0);
842 },
843
844 _onInstallUpdatesActivate: function() {
845 Main.overview.hide();
846 Util.spawn(['pkexec', '/usr/libexec/pk-trigger-offline-update']);
847
848 this._session.RebootRemote();
849 },
850
851 _onSuspendOrPowerOffActivate: function() {
852 Main.overview.hide();
853
854 if (this._haveShutdown &&
855 this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
856 this._session.ShutdownRemote();
857 } else {
858 if (this._screenSaverSettings.get_boolean(LOCK_ENABLED_KEY)) {
859 let tmpId = Main.screenShield.connect('lock-screen-shown', Lang.bind(this, function() {
860 Main.screenShield.disconnect(tmpId);
861
862 this._upClient.suspend_sync(null);
863 }));
864
865 this.menu.close(BoxPointer.PopupAnimation.NONE);
866 Main.screenShield.lock(true);
867 } else {
868 this._upClient.suspend_sync(null);
869 }
870 }
871 },
872 _lightdmLoginSession: function() {
873 try {
874 let seat = GLib.getenv("XDG_SEAT_PATH");
875 let result = Gio.DBus.system.call_sync('org.freedesktop.DisplayManager',
876 seat,
877 'org.freedesktop.DisplayManager.Seat',
878 'SwitchToGreeter', null, null,
879 Gio.DBusCallFlags.NONE,
880 -1, null);
881 } catch(e) {
882 Main.screenShield.lock();
883 }
884 }
885});
8860
=== modified file 'Makefile.in'
--- Makefile.in 2012-11-26 15:57:51 +0000
+++ Makefile.in 2013-02-24 03:10:25 +0000
@@ -61,8 +61,7 @@
61 $(top_srcdir)/src/calendar-server/evolution-calendar.desktop.in.in \61 $(top_srcdir)/src/calendar-server/evolution-calendar.desktop.in.in \
62 ABOUT-NLS AUTHORS COPYING NEWS config/compile \62 ABOUT-NLS AUTHORS COPYING NEWS config/compile \
63 config/config.guess config/config.rpath config/config.sub \63 config/config.guess config/config.rpath config/config.sub \
64 config/depcomp config/install-sh config/ltmain.sh \64 config/install-sh config/ltmain.sh config/missing
65 config/missing
66ACLOCAL_M4 = $(top_srcdir)/aclocal.m465ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
67am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \66am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
68 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \67 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \
6968
=== modified file 'NEWS'
--- NEWS 2012-11-26 15:57:51 +0000
+++ NEWS 2013-02-24 03:10:25 +0000
@@ -1,3 +1,31 @@
13.6.3.1
2=======
3* Fix regression in reentrancy fix for 3.6.3 [Giovanni; #689295]
4
5Contributors:
6 Giovanni Campagna
7
8Translations:
9 Rafael Ferreira [pt_BR]
10
113.6.3
12=====
13* recorder: Set frame duration to fix broken video headers [Adel; #688487]
14* Block cancellation of unlock dialog during drags [Giovanni; #686800]
15* Honor lock-delay GSettings key [Giovanni, Matthias; #690766, #691170]
16* Fix reentrancy problem causing the tray to disappear [Giovanni; #683986]
17
18Contributors:
19 Giovanni Campagna, Matthias Clasen, Adel Gadllah,
20
21Translations:
22 Mattias Põldaru [et], Sandeep Sheshrao Shedmake [mr], Wouter Bolsterlee [nl],
23 Rajesh Ranjan [hi], Nilamdyuti Goswami [as], Ani Peter [ml],
24 Andika Triwidada [id], Krishnababu Krothapalli [te], Shankar Prasad [kn],
25 Dr.T.Vasudevan [ta], Runa Bhattacharjee [bn_IN], Rafael Ferreira [pt_BR],
26 Balázs Úr [hu], Gheyret Kenji [ug], Yasumichi Akahoshi [ja], Yoji TOYODA [ja],
27 Alexandre Franke [fr]
28
13.6.2293.6.2
2=====30=====
3* Implement org.gnome.ScreenSaver.GetActiveTime [Giovanni; #686064]31* Implement org.gnome.ScreenSaver.GetActiveTime [Giovanni; #686064]
432
=== modified file 'aclocal.m4'
--- aclocal.m4 2012-09-07 11:40:48 +0000
+++ aclocal.m4 2013-02-24 03:10:25 +0000
@@ -19,6 +19,602 @@
19If you have problems, you may need to regenerate the build system entirely.19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically 'autoreconf'.])])20To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22# Configure paths for GLIB
23# Owen Taylor 1997-2001
24
25dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
27dnl gthread, or gio is specified in MODULES, pass to pkg-config
28dnl
29AC_DEFUN([AM_PATH_GLIB_2_0],
30[dnl
31dnl Get the cflags and libraries from pkg-config
32dnl
33AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
34 , enable_glibtest=yes)
35
36 pkg_config_args=glib-2.0
37 for module in . $4
38 do
39 case "$module" in
40 gmodule)
41 pkg_config_args="$pkg_config_args gmodule-2.0"
42 ;;
43 gmodule-no-export)
44 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
45 ;;
46 gobject)
47 pkg_config_args="$pkg_config_args gobject-2.0"
48 ;;
49 gthread)
50 pkg_config_args="$pkg_config_args gthread-2.0"
51 ;;
52 gio*)
53 pkg_config_args="$pkg_config_args $module-2.0"
54 ;;
55 esac
56 done
57
58 PKG_PROG_PKG_CONFIG([0.16])
59
60 no_glib=""
61
62 if test "x$PKG_CONFIG" = x ; then
63 no_glib=yes
64 PKG_CONFIG=no
65 fi
66
67 min_glib_version=ifelse([$1], ,2.0.0,$1)
68 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
69
70 if test x$PKG_CONFIG != xno ; then
71 ## don't try to run the test against uninstalled libtool libs
72 if $PKG_CONFIG --uninstalled $pkg_config_args; then
73 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
74 enable_glibtest=no
75 fi
76
77 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
78 :
79 else
80 no_glib=yes
81 fi
82 fi
83
84 if test x"$no_glib" = x ; then
85 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
86 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
87 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
88 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
89
90 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
91 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
92 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
93 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
94 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
95 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
96 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
97 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
98 if test "x$enable_glibtest" = "xyes" ; then
99 ac_save_CFLAGS="$CFLAGS"
100 ac_save_LIBS="$LIBS"
101 CFLAGS="$CFLAGS $GLIB_CFLAGS"
102 LIBS="$GLIB_LIBS $LIBS"
103dnl
104dnl Now check if the installed GLIB is sufficiently new. (Also sanity
105dnl checks the results of pkg-config to some extent)
106dnl
107 rm -f conf.glibtest
108 AC_TRY_RUN([
109#include <glib.h>
110#include <stdio.h>
111#include <stdlib.h>
112
113int
114main ()
115{
116 unsigned int major, minor, micro;
117 char *tmp_version;
118
119 fclose (fopen ("conf.glibtest", "w"));
120
121 /* HP/UX 9 (%@#!) writes to sscanf strings */
122 tmp_version = g_strdup("$min_glib_version");
123 if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, &micro) != 3) {
124 printf("%s, bad version string\n", "$min_glib_version");
125 exit(1);
126 }
127
128 if ((glib_major_version != $glib_config_major_version) ||
129 (glib_minor_version != $glib_config_minor_version) ||
130 (glib_micro_version != $glib_config_micro_version))
131 {
132 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
133 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
134 glib_major_version, glib_minor_version, glib_micro_version);
135 printf ("*** was found! If pkg-config was correct, then it is best\n");
136 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
137 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
138 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
139 printf("*** required on your system.\n");
140 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
141 printf("*** to point to the correct configuration files\n");
142 }
143 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
144 (glib_minor_version != GLIB_MINOR_VERSION) ||
145 (glib_micro_version != GLIB_MICRO_VERSION))
146 {
147 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
148 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
149 printf("*** library (version %d.%d.%d)\n",
150 glib_major_version, glib_minor_version, glib_micro_version);
151 }
152 else
153 {
154 if ((glib_major_version > major) ||
155 ((glib_major_version == major) && (glib_minor_version > minor)) ||
156 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
157 {
158 return 0;
159 }
160 else
161 {
162 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
163 glib_major_version, glib_minor_version, glib_micro_version);
164 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
165 major, minor, micro);
166 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
167 printf("***\n");
168 printf("*** If you have already installed a sufficiently new version, this error\n");
169 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
170 printf("*** being found. The easiest way to fix this is to remove the old version\n");
171 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
172 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
173 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
174 printf("*** so that the correct libraries are found at run-time))\n");
175 }
176 }
177 return 1;
178}
179],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
180 CFLAGS="$ac_save_CFLAGS"
181 LIBS="$ac_save_LIBS"
182 fi
183 fi
184 if test "x$no_glib" = x ; then
185 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
186 ifelse([$2], , :, [$2])
187 else
188 AC_MSG_RESULT(no)
189 if test "$PKG_CONFIG" = "no" ; then
190 echo "*** A new enough version of pkg-config was not found."
191 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
192 else
193 if test -f conf.glibtest ; then
194 :
195 else
196 echo "*** Could not run GLIB test program, checking why..."
197 ac_save_CFLAGS="$CFLAGS"
198 ac_save_LIBS="$LIBS"
199 CFLAGS="$CFLAGS $GLIB_CFLAGS"
200 LIBS="$LIBS $GLIB_LIBS"
201 AC_TRY_LINK([
202#include <glib.h>
203#include <stdio.h>
204], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
205 [ echo "*** The test program compiled, but did not run. This usually means"
206 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
207 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
208 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
209 echo "*** to the installed location Also, make sure you have run ldconfig if that"
210 echo "*** is required on your system"
211 echo "***"
212 echo "*** If you have an old version installed, it is best to remove it, although"
213 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
214 [ echo "*** The test program failed to compile or link. See the file config.log for the"
215 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
216 CFLAGS="$ac_save_CFLAGS"
217 LIBS="$ac_save_LIBS"
218 fi
219 fi
220 GLIB_CFLAGS=""
221 GLIB_LIBS=""
222 GLIB_GENMARSHAL=""
223 GOBJECT_QUERY=""
224 GLIB_MKENUMS=""
225 GLIB_COMPILE_RESOURCES=""
226 ifelse([$3], , :, [$3])
227 fi
228 AC_SUBST(GLIB_CFLAGS)
229 AC_SUBST(GLIB_LIBS)
230 AC_SUBST(GLIB_GENMARSHAL)
231 AC_SUBST(GOBJECT_QUERY)
232 AC_SUBST(GLIB_MKENUMS)
233 AC_SUBST(GLIB_COMPILE_RESOURCES)
234 rm -f conf.glibtest
235])
236
237dnl GLIB_GSETTINGS
238dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
239dnl the schema should be compiled
240dnl
241
242AC_DEFUN([GLIB_GSETTINGS],
243[
244 m4_pattern_allow([AM_V_GEN])
245 AC_ARG_ENABLE(schemas-compile,
246 AS_HELP_STRING([--disable-schemas-compile],
247 [Disable regeneration of gschemas.compiled on install]),
248 [case ${enableval} in
249 yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
250 no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
251 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
252 esac])
253 AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
254 PKG_PROG_PKG_CONFIG([0.16])
255 AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
256 if test x$cross_compiling != xyes; then
257 GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
258 else
259 AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
260 fi
261 AC_SUBST(GLIB_COMPILE_SCHEMAS)
262 if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
263 ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
264 else
265 ifelse([$1],,[:],[$1])
266 fi
267
268 GSETTINGS_RULES='
269.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
270
271mostlyclean-am: clean-gsettings-schemas
272
273gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
274
275%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
276 $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
277
278all-am: $(gsettings_SCHEMAS:.xml=.valid)
279uninstall-am: uninstall-gsettings-schemas
280install-data-am: install-gsettings-schemas
281
282.SECONDARY: $(gsettings_SCHEMAS)
283
284install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
285 @$(NORMAL_INSTALL)
286 if test -n "$^"; then \
287 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
288 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
289 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
290 fi
291
292uninstall-gsettings-schemas:
293 @$(NORMAL_UNINSTALL)
294 @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
295 files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
296 test -n "$$files" || exit 0; \
297 echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
298 cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
299 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
300
301clean-gsettings-schemas:
302 rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
303
304ifdef gsettings_ENUM_NAMESPACE
305$(gsettings__enum_file): $(gsettings_ENUM_FILES)
306 $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
307endif
308'
309 _GSETTINGS_SUBST(GSETTINGS_RULES)
310])
311
312dnl _GSETTINGS_SUBST(VARIABLE)
313dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
314AC_DEFUN([_GSETTINGS_SUBST],
315[
316AC_SUBST([$1])
317m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
318]
319)
320
321dnl -*- mode: autoconf -*-
322dnl Copyright 2009 Johan Dahlin
323dnl
324dnl This file is free software; the author(s) gives unlimited
325dnl permission to copy and/or distribute it, with or without
326dnl modifications, as long as this notice is preserved.
327dnl
328
329# serial 1
330
331m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
332[
333 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
334 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
335 AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
336
337 dnl enable/disable introspection
338 m4_if([$2], [require],
339 [dnl
340 enable_introspection=yes
341 ],[dnl
342 AC_ARG_ENABLE(introspection,
343 AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
344 [Enable introspection for this build]),,
345 [enable_introspection=auto])
346 ])dnl
347
348 AC_MSG_CHECKING([for gobject-introspection])
349
350 dnl presence/version checking
351 AS_CASE([$enable_introspection],
352 [no], [dnl
353 found_introspection="no (disabled, use --enable-introspection to enable)"
354 ],dnl
355 [yes],[dnl
356 PKG_CHECK_EXISTS([gobject-introspection-1.0],,
357 AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
358 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
359 found_introspection=yes,
360 AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
361 ],dnl
362 [auto],[dnl
363 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
364 dnl Canonicalize enable_introspection
365 enable_introspection=$found_introspection
366 ],dnl
367 [dnl
368 AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
369 ])dnl
370
371 AC_MSG_RESULT([$found_introspection])
372
373 INTROSPECTION_SCANNER=
374 INTROSPECTION_COMPILER=
375 INTROSPECTION_GENERATE=
376 INTROSPECTION_GIRDIR=
377 INTROSPECTION_TYPELIBDIR=
378 if test "x$found_introspection" = "xyes"; then
379 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
380 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
381 INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
382 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
383 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
384 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
385 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
386 INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
387 fi
388 AC_SUBST(INTROSPECTION_SCANNER)
389 AC_SUBST(INTROSPECTION_COMPILER)
390 AC_SUBST(INTROSPECTION_GENERATE)
391 AC_SUBST(INTROSPECTION_GIRDIR)
392 AC_SUBST(INTROSPECTION_TYPELIBDIR)
393 AC_SUBST(INTROSPECTION_CFLAGS)
394 AC_SUBST(INTROSPECTION_LIBS)
395 AC_SUBST(INTROSPECTION_MAKEFILE)
396
397 AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
398])
399
400
401dnl Usage:
402dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
403
404AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
405[
406 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
407])
408
409dnl Usage:
410dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
411
412
413AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
414[
415 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
416])
417
418# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
419# serial 1 (pkg-config-0.24)
420#
421# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
422#
423# This program is free software; you can redistribute it and/or modify
424# it under the terms of the GNU General Public License as published by
425# the Free Software Foundation; either version 2 of the License, or
426# (at your option) any later version.
427#
428# This program is distributed in the hope that it will be useful, but
429# WITHOUT ANY WARRANTY; without even the implied warranty of
430# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
431# General Public License for more details.
432#
433# You should have received a copy of the GNU General Public License
434# along with this program; if not, write to the Free Software
435# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
436#
437# As a special exception to the GNU General Public License, if you
438# distribute this file as part of a program that contains a
439# configuration script generated by Autoconf, you may include it under
440# the same distribution terms that you use for the rest of that program.
441
442# PKG_PROG_PKG_CONFIG([MIN-VERSION])
443# ----------------------------------
444AC_DEFUN([PKG_PROG_PKG_CONFIG],
445[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
446m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
447m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
448AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
449AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
450AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
451
452if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
453 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
454fi
455if test -n "$PKG_CONFIG"; then
456 _pkg_min_version=m4_default([$1], [0.9.0])
457 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
458 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
459 AC_MSG_RESULT([yes])
460 else
461 AC_MSG_RESULT([no])
462 PKG_CONFIG=""
463 fi
464fi[]dnl
465])# PKG_PROG_PKG_CONFIG
466
467# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
468#
469# Check to see whether a particular set of modules exists. Similar
470# to PKG_CHECK_MODULES(), but does not set variables or print errors.
471#
472# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
473# only at the first occurence in configure.ac, so if the first place
474# it's called might be skipped (such as if it is within an "if", you
475# have to call PKG_CHECK_EXISTS manually
476# --------------------------------------------------------------
477AC_DEFUN([PKG_CHECK_EXISTS],
478[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
479if test -n "$PKG_CONFIG" && \
480 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
481 m4_default([$2], [:])
482m4_ifvaln([$3], [else
483 $3])dnl
484fi])
485
486# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
487# ---------------------------------------------
488m4_define([_PKG_CONFIG],
489[if test -n "$$1"; then
490 pkg_cv_[]$1="$$1"
491 elif test -n "$PKG_CONFIG"; then
492 PKG_CHECK_EXISTS([$3],
493 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
494 test "x$?" != "x0" && pkg_failed=yes ],
495 [pkg_failed=yes])
496 else
497 pkg_failed=untried
498fi[]dnl
499])# _PKG_CONFIG
500
501# _PKG_SHORT_ERRORS_SUPPORTED
502# -----------------------------
503AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
504[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
505if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
506 _pkg_short_errors_supported=yes
507else
508 _pkg_short_errors_supported=no
509fi[]dnl
510])# _PKG_SHORT_ERRORS_SUPPORTED
511
512
513# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
514# [ACTION-IF-NOT-FOUND])
515#
516#
517# Note that if there is a possibility the first call to
518# PKG_CHECK_MODULES might not happen, you should be sure to include an
519# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
520#
521#
522# --------------------------------------------------------------
523AC_DEFUN([PKG_CHECK_MODULES],
524[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
525AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
526AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
527
528pkg_failed=no
529AC_MSG_CHECKING([for $1])
530
531_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
532_PKG_CONFIG([$1][_LIBS], [libs], [$2])
533
534m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
535and $1[]_LIBS to avoid the need to call pkg-config.
536See the pkg-config man page for more details.])
537
538if test $pkg_failed = yes; then
539 AC_MSG_RESULT([no])
540 _PKG_SHORT_ERRORS_SUPPORTED
541 if test $_pkg_short_errors_supported = yes; then
542 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
543 else
544 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
545 fi
546 # Put the nasty error message in config.log where it belongs
547 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
548
549 m4_default([$4], [AC_MSG_ERROR(
550[Package requirements ($2) were not met:
551
552$$1_PKG_ERRORS
553
554Consider adjusting the PKG_CONFIG_PATH environment variable if you
555installed software in a non-standard prefix.
556
557_PKG_TEXT])[]dnl
558 ])
559elif test $pkg_failed = untried; then
560 AC_MSG_RESULT([no])
561 m4_default([$4], [AC_MSG_FAILURE(
562[The pkg-config script could not be found or is too old. Make sure it
563is in your PATH or set the PKG_CONFIG environment variable to the full
564path to pkg-config.
565
566_PKG_TEXT
567
568To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
569 ])
570else
571 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
572 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
573 AC_MSG_RESULT([yes])
574 $3
575fi[]dnl
576])# PKG_CHECK_MODULES
577
578
579# PKG_INSTALLDIR(DIRECTORY)
580# -------------------------
581# Substitutes the variable pkgconfigdir as the location where a module
582# should install pkg-config .pc files. By default the directory is
583# $libdir/pkgconfig, but the default can be changed by passing
584# DIRECTORY. The user can override through the --with-pkgconfigdir
585# parameter.
586AC_DEFUN([PKG_INSTALLDIR],
587[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
588m4_pushdef([pkg_description],
589 [pkg-config installation directory @<:@]pkg_default[@:>@])
590AC_ARG_WITH([pkgconfigdir],
591 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
592 [with_pkgconfigdir=]pkg_default)
593AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
594m4_popdef([pkg_default])
595m4_popdef([pkg_description])
596]) dnl PKG_INSTALLDIR
597
598
599# PKG_NOARCH_INSTALLDIR(DIRECTORY)
600# -------------------------
601# Substitutes the variable noarch_pkgconfigdir as the location where a
602# module should install arch-independent pkg-config .pc files. By
603# default the directory is $datadir/pkgconfig, but the default can be
604# changed by passing DIRECTORY. The user can override through the
605# --with-noarch-pkgconfigdir parameter.
606AC_DEFUN([PKG_NOARCH_INSTALLDIR],
607[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
608m4_pushdef([pkg_description],
609 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
610AC_ARG_WITH([noarch-pkgconfigdir],
611 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
612 [with_noarch_pkgconfigdir=]pkg_default)
613AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
614m4_popdef([pkg_default])
615m4_popdef([pkg_description])
616]) dnl PKG_NOARCH_INSTALLDIR
617
22# Copyright (C) 2002-2012 Free Software Foundation, Inc.618# Copyright (C) 2002-2012 Free Software Foundation, Inc.
23#619#
24# This file is free software; the Free Software Foundation620# This file is free software; the Free Software Foundation
@@ -1362,602 +1958,6 @@
1362AC_SUBST([am__untar])1958AC_SUBST([am__untar])
1363]) # _AM_PROG_TAR1959]) # _AM_PROG_TAR
13641960
1365# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1366# serial 1 (pkg-config-0.24)
1367#
1368# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1369#
1370# This program is free software; you can redistribute it and/or modify
1371# it under the terms of the GNU General Public License as published by
1372# the Free Software Foundation; either version 2 of the License, or
1373# (at your option) any later version.
1374#
1375# This program is distributed in the hope that it will be useful, but
1376# WITHOUT ANY WARRANTY; without even the implied warranty of
1377# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1378# General Public License for more details.
1379#
1380# You should have received a copy of the GNU General Public License
1381# along with this program; if not, write to the Free Software
1382# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1383#
1384# As a special exception to the GNU General Public License, if you
1385# distribute this file as part of a program that contains a
1386# configuration script generated by Autoconf, you may include it under
1387# the same distribution terms that you use for the rest of that program.
1388
1389# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1390# ----------------------------------
1391AC_DEFUN([PKG_PROG_PKG_CONFIG],
1392[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1393m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1394m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1395AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1396AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1397AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1398
1399if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1400 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1401fi
1402if test -n "$PKG_CONFIG"; then
1403 _pkg_min_version=m4_default([$1], [0.9.0])
1404 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1405 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1406 AC_MSG_RESULT([yes])
1407 else
1408 AC_MSG_RESULT([no])
1409 PKG_CONFIG=""
1410 fi
1411fi[]dnl
1412])# PKG_PROG_PKG_CONFIG
1413
1414# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1415#
1416# Check to see whether a particular set of modules exists. Similar
1417# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1418#
1419# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1420# only at the first occurence in configure.ac, so if the first place
1421# it's called might be skipped (such as if it is within an "if", you
1422# have to call PKG_CHECK_EXISTS manually
1423# --------------------------------------------------------------
1424AC_DEFUN([PKG_CHECK_EXISTS],
1425[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1426if test -n "$PKG_CONFIG" && \
1427 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1428 m4_default([$2], [:])
1429m4_ifvaln([$3], [else
1430 $3])dnl
1431fi])
1432
1433# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1434# ---------------------------------------------
1435m4_define([_PKG_CONFIG],
1436[if test -n "$$1"; then
1437 pkg_cv_[]$1="$$1"
1438 elif test -n "$PKG_CONFIG"; then
1439 PKG_CHECK_EXISTS([$3],
1440 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1441 test "x$?" != "x0" && pkg_failed=yes ],
1442 [pkg_failed=yes])
1443 else
1444 pkg_failed=untried
1445fi[]dnl
1446])# _PKG_CONFIG
1447
1448# _PKG_SHORT_ERRORS_SUPPORTED
1449# -----------------------------
1450AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1451[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1452if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1453 _pkg_short_errors_supported=yes
1454else
1455 _pkg_short_errors_supported=no
1456fi[]dnl
1457])# _PKG_SHORT_ERRORS_SUPPORTED
1458
1459
1460# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1461# [ACTION-IF-NOT-FOUND])
1462#
1463#
1464# Note that if there is a possibility the first call to
1465# PKG_CHECK_MODULES might not happen, you should be sure to include an
1466# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1467#
1468#
1469# --------------------------------------------------------------
1470AC_DEFUN([PKG_CHECK_MODULES],
1471[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1472AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1473AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1474
1475pkg_failed=no
1476AC_MSG_CHECKING([for $1])
1477
1478_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1479_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1480
1481m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1482and $1[]_LIBS to avoid the need to call pkg-config.
1483See the pkg-config man page for more details.])
1484
1485if test $pkg_failed = yes; then
1486 AC_MSG_RESULT([no])
1487 _PKG_SHORT_ERRORS_SUPPORTED
1488 if test $_pkg_short_errors_supported = yes; then
1489 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1490 else
1491 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1492 fi
1493 # Put the nasty error message in config.log where it belongs
1494 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1495
1496 m4_default([$4], [AC_MSG_ERROR(
1497[Package requirements ($2) were not met:
1498
1499$$1_PKG_ERRORS
1500
1501Consider adjusting the PKG_CONFIG_PATH environment variable if you
1502installed software in a non-standard prefix.
1503
1504_PKG_TEXT])[]dnl
1505 ])
1506elif test $pkg_failed = untried; then
1507 AC_MSG_RESULT([no])
1508 m4_default([$4], [AC_MSG_FAILURE(
1509[The pkg-config script could not be found or is too old. Make sure it
1510is in your PATH or set the PKG_CONFIG environment variable to the full
1511path to pkg-config.
1512
1513_PKG_TEXT
1514
1515To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1516 ])
1517else
1518 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1519 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1520 AC_MSG_RESULT([yes])
1521 $3
1522fi[]dnl
1523])# PKG_CHECK_MODULES
1524
1525
1526# PKG_INSTALLDIR(DIRECTORY)
1527# -------------------------
1528# Substitutes the variable pkgconfigdir as the location where a module
1529# should install pkg-config .pc files. By default the directory is
1530# $libdir/pkgconfig, but the default can be changed by passing
1531# DIRECTORY. The user can override through the --with-pkgconfigdir
1532# parameter.
1533AC_DEFUN([PKG_INSTALLDIR],
1534[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1535m4_pushdef([pkg_description],
1536 [pkg-config installation directory @<:@]pkg_default[@:>@])
1537AC_ARG_WITH([pkgconfigdir],
1538 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1539 [with_pkgconfigdir=]pkg_default)
1540AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1541m4_popdef([pkg_default])
1542m4_popdef([pkg_description])
1543]) dnl PKG_INSTALLDIR
1544
1545
1546# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1547# -------------------------
1548# Substitutes the variable noarch_pkgconfigdir as the location where a
1549# module should install arch-independent pkg-config .pc files. By
1550# default the directory is $datadir/pkgconfig, but the default can be
1551# changed by passing DIRECTORY. The user can override through the
1552# --with-noarch-pkgconfigdir parameter.
1553AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1554[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1555m4_pushdef([pkg_description],
1556 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1557AC_ARG_WITH([noarch-pkgconfigdir],
1558 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1559 [with_noarch_pkgconfigdir=]pkg_default)
1560AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1561m4_popdef([pkg_default])
1562m4_popdef([pkg_description])
1563]) dnl PKG_NOARCH_INSTALLDIR
1564
1565# Configure paths for GLIB
1566# Owen Taylor 1997-2001
1567
1568dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1569dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
1570dnl gthread, or gio is specified in MODULES, pass to pkg-config
1571dnl
1572AC_DEFUN([AM_PATH_GLIB_2_0],
1573[dnl
1574dnl Get the cflags and libraries from pkg-config
1575dnl
1576AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
1577 , enable_glibtest=yes)
1578
1579 pkg_config_args=glib-2.0
1580 for module in . $4
1581 do
1582 case "$module" in
1583 gmodule)
1584 pkg_config_args="$pkg_config_args gmodule-2.0"
1585 ;;
1586 gmodule-no-export)
1587 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
1588 ;;
1589 gobject)
1590 pkg_config_args="$pkg_config_args gobject-2.0"
1591 ;;
1592 gthread)
1593 pkg_config_args="$pkg_config_args gthread-2.0"
1594 ;;
1595 gio*)
1596 pkg_config_args="$pkg_config_args $module-2.0"
1597 ;;
1598 esac
1599 done
1600
1601 PKG_PROG_PKG_CONFIG([0.16])
1602
1603 no_glib=""
1604
1605 if test "x$PKG_CONFIG" = x ; then
1606 no_glib=yes
1607 PKG_CONFIG=no
1608 fi
1609
1610 min_glib_version=ifelse([$1], ,2.0.0,$1)
1611 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
1612
1613 if test x$PKG_CONFIG != xno ; then
1614 ## don't try to run the test against uninstalled libtool libs
1615 if $PKG_CONFIG --uninstalled $pkg_config_args; then
1616 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
1617 enable_glibtest=no
1618 fi
1619
1620 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
1621 :
1622 else
1623 no_glib=yes
1624 fi
1625 fi
1626
1627 if test x"$no_glib" = x ; then
1628 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
1629 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
1630 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
1631 GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
1632
1633 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
1634 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
1635 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
1636 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1637 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
1638 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1639 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
1640 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1641 if test "x$enable_glibtest" = "xyes" ; then
1642 ac_save_CFLAGS="$CFLAGS"
1643 ac_save_LIBS="$LIBS"
1644 CFLAGS="$CFLAGS $GLIB_CFLAGS"
1645 LIBS="$GLIB_LIBS $LIBS"
1646dnl
1647dnl Now check if the installed GLIB is sufficiently new. (Also sanity
1648dnl checks the results of pkg-config to some extent)
1649dnl
1650 rm -f conf.glibtest
1651 AC_TRY_RUN([
1652#include <glib.h>
1653#include <stdio.h>
1654#include <stdlib.h>
1655
1656int
1657main ()
1658{
1659 unsigned int major, minor, micro;
1660 char *tmp_version;
1661
1662 fclose (fopen ("conf.glibtest", "w"));
1663
1664 /* HP/UX 9 (%@#!) writes to sscanf strings */
1665 tmp_version = g_strdup("$min_glib_version");
1666 if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, &micro) != 3) {
1667 printf("%s, bad version string\n", "$min_glib_version");
1668 exit(1);
1669 }
1670
1671 if ((glib_major_version != $glib_config_major_version) ||
1672 (glib_minor_version != $glib_config_minor_version) ||
1673 (glib_micro_version != $glib_config_micro_version))
1674 {
1675 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
1676 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
1677 glib_major_version, glib_minor_version, glib_micro_version);
1678 printf ("*** was found! If pkg-config was correct, then it is best\n");
1679 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
1680 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1681 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1682 printf("*** required on your system.\n");
1683 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
1684 printf("*** to point to the correct configuration files\n");
1685 }
1686 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
1687 (glib_minor_version != GLIB_MINOR_VERSION) ||
1688 (glib_micro_version != GLIB_MICRO_VERSION))
1689 {
1690 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
1691 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
1692 printf("*** library (version %d.%d.%d)\n",
1693 glib_major_version, glib_minor_version, glib_micro_version);
1694 }
1695 else
1696 {
1697 if ((glib_major_version > major) ||
1698 ((glib_major_version == major) && (glib_minor_version > minor)) ||
1699 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
1700 {
1701 return 0;
1702 }
1703 else
1704 {
1705 printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
1706 glib_major_version, glib_minor_version, glib_micro_version);
1707 printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
1708 major, minor, micro);
1709 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
1710 printf("***\n");
1711 printf("*** If you have already installed a sufficiently new version, this error\n");
1712 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
1713 printf("*** being found. The easiest way to fix this is to remove the old version\n");
1714 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
1715 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
1716 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1717 printf("*** so that the correct libraries are found at run-time))\n");
1718 }
1719 }
1720 return 1;
1721}
1722],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1723 CFLAGS="$ac_save_CFLAGS"
1724 LIBS="$ac_save_LIBS"
1725 fi
1726 fi
1727 if test "x$no_glib" = x ; then
1728 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
1729 ifelse([$2], , :, [$2])
1730 else
1731 AC_MSG_RESULT(no)
1732 if test "$PKG_CONFIG" = "no" ; then
1733 echo "*** A new enough version of pkg-config was not found."
1734 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
1735 else
1736 if test -f conf.glibtest ; then
1737 :
1738 else
1739 echo "*** Could not run GLIB test program, checking why..."
1740 ac_save_CFLAGS="$CFLAGS"
1741 ac_save_LIBS="$LIBS"
1742 CFLAGS="$CFLAGS $GLIB_CFLAGS"
1743 LIBS="$LIBS $GLIB_LIBS"
1744 AC_TRY_LINK([
1745#include <glib.h>
1746#include <stdio.h>
1747], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
1748 [ echo "*** The test program compiled, but did not run. This usually means"
1749 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
1750 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
1751 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1752 echo "*** to the installed location Also, make sure you have run ldconfig if that"
1753 echo "*** is required on your system"
1754 echo "***"
1755 echo "*** If you have an old version installed, it is best to remove it, although"
1756 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1757 [ echo "*** The test program failed to compile or link. See the file config.log for the"
1758 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
1759 CFLAGS="$ac_save_CFLAGS"
1760 LIBS="$ac_save_LIBS"
1761 fi
1762 fi
1763 GLIB_CFLAGS=""
1764 GLIB_LIBS=""
1765 GLIB_GENMARSHAL=""
1766 GOBJECT_QUERY=""
1767 GLIB_MKENUMS=""
1768 GLIB_COMPILE_RESOURCES=""
1769 ifelse([$3], , :, [$3])
1770 fi
1771 AC_SUBST(GLIB_CFLAGS)
1772 AC_SUBST(GLIB_LIBS)
1773 AC_SUBST(GLIB_GENMARSHAL)
1774 AC_SUBST(GOBJECT_QUERY)
1775 AC_SUBST(GLIB_MKENUMS)
1776 AC_SUBST(GLIB_COMPILE_RESOURCES)
1777 rm -f conf.glibtest
1778])
1779
1780dnl GLIB_GSETTINGS
1781dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1782dnl the schema should be compiled
1783dnl
1784
1785AC_DEFUN([GLIB_GSETTINGS],
1786[
1787 m4_pattern_allow([AM_V_GEN])
1788 AC_ARG_ENABLE(schemas-compile,
1789 AS_HELP_STRING([--disable-schemas-compile],
1790 [Disable regeneration of gschemas.compiled on install]),
1791 [case ${enableval} in
1792 yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1793 no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1794 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1795 esac])
1796 AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1797 PKG_PROG_PKG_CONFIG([0.16])
1798 AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1799 if test x$cross_compiling != xyes; then
1800 GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1801 else
1802 AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1803 fi
1804 AC_SUBST(GLIB_COMPILE_SCHEMAS)
1805 if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1806 ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1807 else
1808 ifelse([$1],,[:],[$1])
1809 fi
1810
1811 GSETTINGS_RULES='
1812.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1813
1814mostlyclean-am: clean-gsettings-schemas
1815
1816gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1817
1818%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1819 $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
1820
1821all-am: $(gsettings_SCHEMAS:.xml=.valid)
1822uninstall-am: uninstall-gsettings-schemas
1823install-data-am: install-gsettings-schemas
1824
1825.SECONDARY: $(gsettings_SCHEMAS)
1826
1827install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1828 @$(NORMAL_INSTALL)
1829 if test -n "$^"; then \
1830 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1831 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1832 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1833 fi
1834
1835uninstall-gsettings-schemas:
1836 @$(NORMAL_UNINSTALL)
1837 @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1838 files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1839 test -n "$$files" || exit 0; \
1840 echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1841 cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1842 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1843
1844clean-gsettings-schemas:
1845 rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1846
1847ifdef gsettings_ENUM_NAMESPACE
1848$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1849 $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
1850endif
1851'
1852 _GSETTINGS_SUBST(GSETTINGS_RULES)
1853])
1854
1855dnl _GSETTINGS_SUBST(VARIABLE)
1856dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1857AC_DEFUN([_GSETTINGS_SUBST],
1858[
1859AC_SUBST([$1])
1860m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1861]
1862)
1863
1864dnl -*- mode: autoconf -*-
1865dnl Copyright 2009 Johan Dahlin
1866dnl
1867dnl This file is free software; the author(s) gives unlimited
1868dnl permission to copy and/or distribute it, with or without
1869dnl modifications, as long as this notice is preserved.
1870dnl
1871
1872# serial 1
1873
1874m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
1875[
1876 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
1877 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
1878 AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
1879
1880 dnl enable/disable introspection
1881 m4_if([$2], [require],
1882 [dnl
1883 enable_introspection=yes
1884 ],[dnl
1885 AC_ARG_ENABLE(introspection,
1886 AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
1887 [Enable introspection for this build]),,
1888 [enable_introspection=auto])
1889 ])dnl
1890
1891 AC_MSG_CHECKING([for gobject-introspection])
1892
1893 dnl presence/version checking
1894 AS_CASE([$enable_introspection],
1895 [no], [dnl
1896 found_introspection="no (disabled, use --enable-introspection to enable)"
1897 ],dnl
1898 [yes],[dnl
1899 PKG_CHECK_EXISTS([gobject-introspection-1.0],,
1900 AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
1901 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
1902 found_introspection=yes,
1903 AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
1904 ],dnl
1905 [auto],[dnl
1906 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
1907 dnl Canonicalize enable_introspection
1908 enable_introspection=$found_introspection
1909 ],dnl
1910 [dnl
1911 AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
1912 ])dnl
1913
1914 AC_MSG_RESULT([$found_introspection])
1915
1916 INTROSPECTION_SCANNER=
1917 INTROSPECTION_COMPILER=
1918 INTROSPECTION_GENERATE=
1919 INTROSPECTION_GIRDIR=
1920 INTROSPECTION_TYPELIBDIR=
1921 if test "x$found_introspection" = "xyes"; then
1922 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
1923 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
1924 INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
1925 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
1926 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
1927 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
1928 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
1929 INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
1930 fi
1931 AC_SUBST(INTROSPECTION_SCANNER)
1932 AC_SUBST(INTROSPECTION_COMPILER)
1933 AC_SUBST(INTROSPECTION_GENERATE)
1934 AC_SUBST(INTROSPECTION_GIRDIR)
1935 AC_SUBST(INTROSPECTION_TYPELIBDIR)
1936 AC_SUBST(INTROSPECTION_CFLAGS)
1937 AC_SUBST(INTROSPECTION_LIBS)
1938 AC_SUBST(INTROSPECTION_MAKEFILE)
1939
1940 AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
1941])
1942
1943
1944dnl Usage:
1945dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
1946
1947AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
1948[
1949 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
1950])
1951
1952dnl Usage:
1953dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
1954
1955
1956AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
1957[
1958 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
1959])
1960
1961m4_include([m4/gettext.m4])1961m4_include([m4/gettext.m4])
1962m4_include([m4/gtk-doc.m4])1962m4_include([m4/gtk-doc.m4])
1963m4_include([m4/iconv.m4])1963m4_include([m4/iconv.m4])
19641964
=== modified file 'config/compile' (properties changed: -x to +x)
=== modified file 'config/config.guess' (properties changed: -x to +x)
=== modified file 'config/config.rpath' (properties changed: -x to +x)
=== modified file 'config/config.sub' (properties changed: -x to +x)
=== modified file 'config/depcomp' (properties changed: -x to +x)
=== modified file 'config/install-sh' (properties changed: -x to +x)
=== modified file 'config/missing' (properties changed: -x to +x)
=== modified file 'configure'
--- configure 2012-11-26 15:57:51 +0000
+++ configure 2013-02-24 03:10:25 +0000
@@ -1,6 +1,6 @@
1#! /bin/sh1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for gnome-shell 3.6.2.3# Generated by GNU Autoconf 2.69 for gnome-shell 3.6.3.1.
4#4#
5# Report bugs to <https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell>.5# Report bugs to <https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell>.
6#6#
@@ -591,8 +591,8 @@
591# Identity of this package.591# Identity of this package.
592PACKAGE_NAME='gnome-shell'592PACKAGE_NAME='gnome-shell'
593PACKAGE_TARNAME='gnome-shell'593PACKAGE_TARNAME='gnome-shell'
594PACKAGE_VERSION='3.6.2'594PACKAGE_VERSION='3.6.3.1'
595PACKAGE_STRING='gnome-shell 3.6.2'595PACKAGE_STRING='gnome-shell 3.6.3.1'
596PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell'596PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell'
597PACKAGE_URL=''597PACKAGE_URL=''
598598
@@ -1503,7 +1503,7 @@
1503 # Omit some internal or obsolete options to make the list less imposing.1503 # Omit some internal or obsolete options to make the list less imposing.
1504 # This message is too long to be a string in the A/UX 3.1 sh.1504 # This message is too long to be a string in the A/UX 3.1 sh.
1505 cat <<_ACEOF1505 cat <<_ACEOF
1506\`configure' configures gnome-shell 3.6.2 to adapt to many kinds of systems.1506\`configure' configures gnome-shell 3.6.3.1 to adapt to many kinds of systems.
15071507
1508Usage: $0 [OPTION]... [VAR=VALUE]...1508Usage: $0 [OPTION]... [VAR=VALUE]...
15091509
@@ -1573,7 +1573,7 @@
15731573
1574if test -n "$ac_init_help"; then1574if test -n "$ac_init_help"; then
1575 case $ac_init_help in1575 case $ac_init_help in
1576 short | recursive ) echo "Configuration of gnome-shell 3.6.2:";;1576 short | recursive ) echo "Configuration of gnome-shell 3.6.3.1:";;
1577 esac1577 esac
1578 cat <<\_ACEOF1578 cat <<\_ACEOF
15791579
@@ -1758,7 +1758,7 @@
1758test -n "$ac_init_help" && exit $ac_status1758test -n "$ac_init_help" && exit $ac_status
1759if $ac_init_version; then1759if $ac_init_version; then
1760 cat <<\_ACEOF1760 cat <<\_ACEOF
1761gnome-shell configure 3.6.21761gnome-shell configure 3.6.3.1
1762generated by GNU Autoconf 2.691762generated by GNU Autoconf 2.69
17631763
1764Copyright (C) 2012 Free Software Foundation, Inc.1764Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2127,7 +2127,7 @@
2127This file contains any messages produced by compilers while2127This file contains any messages produced by compilers while
2128running configure, to aid debugging if configure makes a mistake.2128running configure, to aid debugging if configure makes a mistake.
21292129
2130It was created by gnome-shell $as_me 3.6.2, which was2130It was created by gnome-shell $as_me 3.6.3.1, which was
2131generated by GNU Autoconf 2.69. Invocation command line was2131generated by GNU Autoconf 2.69. Invocation command line was
21322132
2133 $ $0 $@2133 $ $0 $@
@@ -2963,7 +2963,7 @@
29632963
2964# Define the identity of the package.2964# Define the identity of the package.
2965 PACKAGE='gnome-shell'2965 PACKAGE='gnome-shell'
2966 VERSION='3.6.2'2966 VERSION='3.6.3.1'
29672967
29682968
2969cat >>confdefs.h <<_ACEOF2969cat >>confdefs.h <<_ACEOF
@@ -17897,7 +17897,7 @@
17897# report actual input values of CONFIG_FILES etc. instead of their17897# report actual input values of CONFIG_FILES etc. instead of their
17898# values after options handling.17898# values after options handling.
17899ac_log="17899ac_log="
17900This file was extended by gnome-shell $as_me 3.6.2, which was17900This file was extended by gnome-shell $as_me 3.6.3.1, which was
17901generated by GNU Autoconf 2.69. Invocation command line was17901generated by GNU Autoconf 2.69. Invocation command line was
1790217902
17903 CONFIG_FILES = $CONFIG_FILES17903 CONFIG_FILES = $CONFIG_FILES
@@ -17963,7 +17963,7 @@
17963cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=117963cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17964ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"17964ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17965ac_cs_version="\\17965ac_cs_version="\\
17966gnome-shell config.status 3.6.217966gnome-shell config.status 3.6.3.1
17967configured by $0, generated by GNU Autoconf 2.69,17967configured by $0, generated by GNU Autoconf 2.69,
17968 with options \\"\$ac_cs_config\\"17968 with options \\"\$ac_cs_config\\"
1796917969
1797017970
=== modified file 'configure.ac'
--- configure.ac 2012-11-26 15:57:51 +0000
+++ configure.ac 2013-02-24 03:10:25 +0000
@@ -1,5 +1,5 @@
1AC_PREREQ(2.63)1AC_PREREQ(2.63)
2AC_INIT([gnome-shell],[3.6.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])2AC_INIT([gnome-shell],[3.6.3.1],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
33
4AC_CONFIG_HEADERS([config.h])4AC_CONFIG_HEADERS([config.h])
5AC_CONFIG_SRCDIR([src/shell-global.c])5AC_CONFIG_SRCDIR([src/shell-global.c])
@@ -26,6 +26,9 @@
26# i18n26# i18n
27IT_PROG_INTLTOOL([0.40])27IT_PROG_INTLTOOL([0.40])
2828
29AM_GNU_GETTEXT([external])
30AM_GNU_GETTEXT_VERSION([0.17])
31
29GETTEXT_PACKAGE=gnome-shell32GETTEXT_PACKAGE=gnome-shell
30AC_SUBST(GETTEXT_PACKAGE)33AC_SUBST(GETTEXT_PACKAGE)
31AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",34AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
@@ -52,7 +55,7 @@
52 AC_MSG_RESULT(yes)55 AC_MSG_RESULT(yes)
53 build_recorder=true56 build_recorder=true
54 recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11"57 recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11"
55 PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes)58 PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl)
56else59else
57 AC_MSG_RESULT(no)60 AC_MSG_RESULT(no)
58fi61fi
@@ -86,6 +89,7 @@
86 libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION89 libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION
87 $recorder_modules90 $recorder_modules
88 gdk-x11-3.0 libsoup-2.491 gdk-x11-3.0 libsoup-2.4
92 gl
89 clutter-x11-1.0 >= $CLUTTER_MIN_VERSION93 clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
90 clutter-glx-1.0 >= $CLUTTER_MIN_VERSION94 clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
91 libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION95 libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
@@ -107,16 +111,6 @@
107GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`111GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`
108AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])112AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])
109113
110PKG_CHECK_MODULES(GLX, [gl], [have_glx=yes], [have_glx=no])
111if test "x$have_glx" = "xyes"; then
112 GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $GLX_CFLAGS"
113 GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $GLX_LIBS"
114 TEST_SHELL_RECORDER_CFLAGS="$TEST_SHELL_RECORDER_CFLAGS $GLX_CFLAGS"
115 TEST_SHELL_RECORDER_LIBS="$TEST_SHELL_RECORDER_LIBS $GLX_LIBS"
116 AC_DEFINE(HAVE_GLX, [1], [Define if we have GLX])
117 AC_SUBST([HAVE_GLX], [1])
118fi
119
120GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])114GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])
121115
122saved_CFLAGS=$CFLAGS116saved_CFLAGS=$CFLAGS
123117
=== modified file 'debian/changelog'
--- debian/changelog 2012-11-26 23:39:00 +0000
+++ debian/changelog 2013-02-24 03:10:25 +0000
@@ -1,3 +1,11 @@
1gnome-shell (3.6.3.1-0ubuntu1) quantal-proposed; urgency=low
2
3 * New upstream release. (LP: #1128804)
4 - Fixes disappearing messagetray (LP: #1067265)
5 * debian/patches/git_remove_messagetray_barrier.patch:
6 - upstream bug fix (LP: #1132308)
7 -- Tim Lunn <tim@feathertop.org> Sun, 24 Feb 2013 07:50:34 +1100
8
1gnome-shell (3.6.2-0ubuntu0.2) quantal-proposed; urgency=low9gnome-shell (3.6.2-0ubuntu0.2) quantal-proposed; urgency=low
210
3 * debian/control.in:11 * debian/control.in:
412
=== modified file 'debian/patches/series'
--- debian/patches/series 2012-11-26 15:57:51 +0000
+++ debian/patches/series 2013-02-24 03:10:25 +0000
@@ -4,3 +4,4 @@
4ubuntu-lightdm-user-switching.patch4ubuntu-lightdm-user-switching.patch
5ubuntu_lock_on_suspend.patch5ubuntu_lock_on_suspend.patch
6git-set-ally-wm-theme.patch6git-set-ally-wm-theme.patch
7git_remove_messagetray_barrier.patch
78
=== modified file 'docs/reference/shell/Makefile.in'
--- docs/reference/shell/Makefile.in 2012-11-12 23:11:33 +0000
+++ docs/reference/shell/Makefile.in 2013-02-24 03:10:25 +0000
@@ -791,7 +791,7 @@
791 rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \791 rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
792 fi792 fi
793793
794maintainer-clean-local:794maintainer-clean-local: clean
795 @rm -rf xml html795 @rm -rf xml html
796796
797install-data-local:797install-data-local:
@@ -827,7 +827,7 @@
827#827#
828# Require gtk-doc when making dist828# Require gtk-doc when making dist
829#829#
830@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: docs830@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc:
831@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc:831@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc:
832@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist"832@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist"
833@ENABLE_GTK_DOC_FALSE@ @false833@ENABLE_GTK_DOC_FALSE@ @false
834834
=== modified file 'docs/reference/shell/html/ShellAppSystem.html'
--- docs/reference/shell/html/ShellAppSystem.html 2012-09-07 11:40:48 +0000
+++ docs/reference/shell/html/ShellAppSystem.html 2013-02-24 03:10:25 +0000
@@ -8,7 +8,7 @@
8<link rel="up" href="ch03.html" title="Search">8<link rel="up" href="ch03.html" title="Search">
9<link rel="prev" href="ch03.html" title="Search">9<link rel="prev" href="ch03.html" title="Search">
10<link rel="next" href="ch04.html" title="Tray Icons">10<link rel="next" href="ch04.html" title="Tray Icons">
11<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">11<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12<link rel="stylesheet" href="style.css" type="text/css">12<link rel="stylesheet" href="style.css" type="text/css">
13</head>13</head>
14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -44,7 +44,11 @@
44<pre class="synopsis">struct <a class="link" href="ShellAppSystem.html#ShellAppSystem-struct" title="struct ShellAppSystem">ShellAppSystem</a>;44<pre class="synopsis">struct <a class="link" href="ShellAppSystem.html#ShellAppSystem-struct" title="struct ShellAppSystem">ShellAppSystem</a>;
45struct <a class="link" href="ShellAppSystem.html#ShellAppSystemClass" title="struct ShellAppSystemClass">ShellAppSystemClass</a>;45struct <a class="link" href="ShellAppSystem.html#ShellAppSystemClass" title="struct ShellAppSystemClass">ShellAppSystemClass</a>;
46<a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="returnvalue">ShellAppSystem</span></a> * <a class="link" href="ShellAppSystem.html#shell-app-system-get-default" title="shell_app_system_get_default ()">shell_app_system_get_default</a> (<em class="parameter"><code><span class="type">void</span></code></em>);46<a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="returnvalue">ShellAppSystem</span></a> * <a class="link" href="ShellAppSystem.html#shell-app-system-get-default" title="shell_app_system_get_default ()">shell_app_system_get_default</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
47<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="ShellAppSystem.html#shell-app-system-get-running" title="shell_app_system_get_running ()">shell_app_system_get_running</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *self</code></em>);
48<span class="returnvalue">GMenuTree</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-get-settings-tree" title="shell_app_system_get_settings_tree ()">shell_app_system_get_settings_tree</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>);
47<span class="returnvalue">GMenuTree</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-get-tree" title="shell_app_system_get_tree ()">shell_app_system_get_tree</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>);49<span class="returnvalue">GMenuTree</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-get-tree" title="shell_app_system_get_tree ()">shell_app_system_get_tree</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>);
50<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="ShellAppSystem.html#shell-app-system-initial-search" title="shell_app_system_initial_search ()">shell_app_system_initial_search</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
51 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *terms</code></em>);
48<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-app" title="shell_app_system_lookup_app ()">shell_app_system_lookup_app</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,52<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-app" title="shell_app_system_lookup_app ()">shell_app_system_lookup_app</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
49 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);53 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);
50<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-app-by-tree-entry" title="shell_app_system_lookup_app_by_tree_entry ()">shell_app_system_lookup_app_by_tree_entry</a>54<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-app-by-tree-entry" title="shell_app_system_lookup_app_by_tree_entry ()">shell_app_system_lookup_app_by_tree_entry</a>
@@ -56,33 +60,29 @@
56<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-heuristic-basename" title="shell_app_system_lookup_heuristic_basename ()">shell_app_system_lookup_heuristic_basename</a>60<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-heuristic-basename" title="shell_app_system_lookup_heuristic_basename ()">shell_app_system_lookup_heuristic_basename</a>
57 (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,61 (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
58 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);62 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);
63<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-setting" title="shell_app_system_lookup_setting ()">shell_app_system_lookup_setting</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
64 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);
59<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-wmclass" title="shell_app_system_lookup_wmclass ()">shell_app_system_lookup_wmclass</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,65<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-wmclass" title="shell_app_system_lookup_wmclass ()">shell_app_system_lookup_wmclass</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
60 <em class="parameter"><code>const <span class="type">char</span> *wmclass</code></em>);66 <em class="parameter"><code>const <span class="type">char</span> *wmclass</code></em>);
61<span class="returnvalue">GSList</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-get-running" title="shell_app_system_get_running ()">shell_app_system_get_running</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *self</code></em>);67<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="ShellAppSystem.html#shell-app-system-search-settings" title="shell_app_system_search_settings ()">shell_app_system_search_settings</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
62<span class="returnvalue">GSList</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-initial-search" title="shell_app_system_initial_search ()">shell_app_system_initial_search</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,68 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *terms</code></em>);
63 <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>);69<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="ShellAppSystem.html#shell-app-system-subsearch" title="shell_app_system_subsearch ()">shell_app_system_subsearch</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
64<span class="returnvalue">GSList</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-subsearch" title="shell_app_system_subsearch ()">shell_app_system_subsearch</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,70 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *previous_results</code></em>,
65 <em class="parameter"><code><span class="type">GSList</span> *previous_results</code></em>,71 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *terms</code></em>);
66 <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>);
67<span class="returnvalue">GMenuTree</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-get-settings-tree" title="shell_app_system_get_settings_tree ()">shell_app_system_get_settings_tree</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>);
68<span class="returnvalue">GSList</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-search-settings" title="shell_app_system_search_settings ()">shell_app_system_search_settings</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
69 <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>);
70<span class="returnvalue">ShellApp</span> * <a class="link" href="ShellAppSystem.html#shell-app-system-lookup-setting" title="shell_app_system_lookup_setting ()">shell_app_system_lookup_setting</a> (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
71 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);
72</pre>72</pre>
73</div>73</div>
74<div class="refsect1">74<div class="refsect1">
75<a name="ShellAppSystem.object-hierarchy"></a><h2>Object Hierarchy</h2>75<a name="ShellAppSystem.object-hierarchy"></a><h2>Object Hierarchy</h2>
76<pre class="synopsis">76<pre class="synopsis">
77 GObject77 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
78 +----ShellAppSystem78 +----ShellAppSystem
79</pre>79</pre>
80</div>80</div>
81<div class="refsect1">81<div class="refsect1">
82<a name="ShellAppSystem.signals"></a><h2>Signals</h2>82<a name="ShellAppSystem.signals"></a><h2>Signals</h2>
83<pre class="synopsis">83<pre class="synopsis">
84 "<a class="link" href="ShellAppSystem.html#ShellAppSystem-app-state-changed" title='The "app-state-changed" signal'>app-state-changed</a>" : <code class="literal">Run Last</code>84 "<a class="link" href="ShellAppSystem.html#ShellAppSystem-app-state-changed" title='The "app-state-changed" signal'>app-state-changed</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
85 "<a class="link" href="ShellAppSystem.html#ShellAppSystem-installed-changed" title='The "installed-changed" signal'>installed-changed</a>" : <code class="literal">Run Last</code>85 "<a class="link" href="ShellAppSystem.html#ShellAppSystem-installed-changed" title='The "installed-changed" signal'>installed-changed</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
86</pre>86</pre>
87</div>87</div>
88<div class="refsect1">88<div class="refsect1">
@@ -123,6 +123,50 @@
123</div>123</div>
124<hr>124<hr>
125<div class="refsect2">125<div class="refsect2">
126<a name="shell-app-system-get-running"></a><h3>shell_app_system_get_running ()</h3>
127<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * shell_app_system_get_running (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *self</code></em>);</pre>
128<p>
129Returns the set of applications which currently have at least one
130open window in the given context. The returned list will be sorted
131by <a class="link" href="shell-ShellApp.html#shell-app-compare" title="shell_app_compare ()"><code class="function">shell_app_compare()</code></a>.
132</p>
133<div class="variablelist"><table border="0" class="variablelist">
134<colgroup>
135<col align="left" valign="top">
136<col>
137</colgroup>
138<tbody>
139<tr>
140<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
141<td>A <a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a>
142</td>
143</tr>
144<tr>
145<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
146<td>Active applications. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> ShellApp][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
147</td>
148</tr>
149</tbody>
150</table></div>
151</div>
152<hr>
153<div class="refsect2">
154<a name="shell-app-system-get-settings-tree"></a><h3>shell_app_system_get_settings_tree ()</h3>
155<pre class="programlisting"><span class="returnvalue">GMenuTree</span> * shell_app_system_get_settings_tree (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>);</pre>
156<div class="variablelist"><table border="0" class="variablelist">
157<colgroup>
158<col align="left" valign="top">
159<col>
160</colgroup>
161<tbody><tr>
162<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
163<td>The <span class="type">GMenuTree</span> for apps. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
164</td>
165</tr></tbody>
166</table></div>
167</div>
168<hr>
169<div class="refsect2">
126<a name="shell-app-system-get-tree"></a><h3>shell_app_system_get_tree ()</h3>170<a name="shell-app-system-get-tree"></a><h3>shell_app_system_get_tree ()</h3>
127<pre class="programlisting"><span class="returnvalue">GMenuTree</span> * shell_app_system_get_tree (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>);</pre>171<pre class="programlisting"><span class="returnvalue">GMenuTree</span> * shell_app_system_get_tree (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>);</pre>
128<div class="variablelist"><table border="0" class="variablelist">172<div class="variablelist"><table border="0" class="variablelist">
@@ -139,6 +183,38 @@
139</div>183</div>
140<hr>184<hr>
141<div class="refsect2">185<div class="refsect2">
186<a name="shell-app-system-initial-search"></a><h3>shell_app_system_initial_search ()</h3>
187<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * shell_app_system_initial_search (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
188 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *terms</code></em>);</pre>
189<p>
190Search through applications for the given search terms.
191</p>
192<div class="variablelist"><table border="0" class="variablelist">
193<colgroup>
194<col align="left" valign="top">
195<col>
196</colgroup>
197<tbody>
198<tr>
199<td><p><span class="term"><em class="parameter"><code>system</code></em> :</span></p></td>
200<td>A <a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a>
201</td>
202</tr>
203<tr>
204<td><p><span class="term"><em class="parameter"><code>terms</code></em> :</span></p></td>
205<td>List of terms, logical AND. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span>
206</td>
207</tr>
208<tr>
209<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
210<td>List of applications. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> ShellApp]</span>
211</td>
212</tr>
213</tbody>
214</table></div>
215</div>
216<hr>
217<div class="refsect2">
142<a name="shell-app-system-lookup-app"></a><h3>shell_app_system_lookup_app ()</h3>218<a name="shell-app-system-lookup-app"></a><h3>shell_app_system_lookup_app ()</h3>
143<pre class="programlisting"><span class="returnvalue">ShellApp</span> * shell_app_system_lookup_app (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,219<pre class="programlisting"><span class="returnvalue">ShellApp</span> * shell_app_system_lookup_app (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
144 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);</pre>220 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);</pre>
@@ -152,7 +228,7 @@
152</colgroup>228</colgroup>
153<tbody><tr>229<tbody><tr>
154<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>230<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
155<td>The <span class="type">ShellApp</span> for id, or <a href="/home/florian/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>231<td>The <span class="type">ShellApp</span> for id, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
156</td>232</td>
157</tr></tbody>233</tr></tbody>
158</table></div>234</table></div>
@@ -184,7 +260,7 @@
184</tr>260</tr>
185<tr>261<tr>
186<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>262<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
187<td>The <span class="type">ShellApp</span> for <em class="parameter"><code>entry</code></em>, or <a href="/home/florian/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>263<td>The <span class="type">ShellApp</span> for <em class="parameter"><code>entry</code></em>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
188</td>264</td>
189</tr>265</tr>
190</tbody>266</tbody>
@@ -199,7 +275,7 @@
199<p>275<p>
200Find or create a <span class="type">ShellApp</span> corresponding to a given absolute file276Find or create a <span class="type">ShellApp</span> corresponding to a given absolute file
201name which must be in the standard paths (XDG_DATA_DIRS). For277name which must be in the standard paths (XDG_DATA_DIRS). For
202files outside the datadirs, this function returns <a href="/home/florian/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.278files outside the datadirs, this function returns <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
203</p>279</p>
204<div class="variablelist"><table border="0" class="variablelist">280<div class="variablelist"><table border="0" class="variablelist">
205<colgroup>281<colgroup>
@@ -214,12 +290,12 @@
214</tr>290</tr>
215<tr>291<tr>
216<td><p><span class="term"><em class="parameter"><code>desktop_path</code></em> :</span></p></td>292<td><p><span class="term"><em class="parameter"><code>desktop_path</code></em> :</span></p></td>
217<td>UTF-8 encoded absolute file name. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span>293<td>UTF-8 encoded absolute file name. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> utf8]</span>
218</td>294</td>
219</tr>295</tr>
220<tr>296<tr>
221<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>297<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
222<td>The <span class="type">ShellApp</span> for id, or <a href="/home/florian/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>298<td>The <span class="type">ShellApp</span> for id, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
223</td>299</td>
224</tr>300</tr>
225</tbody>301</tbody>
@@ -234,7 +310,7 @@
234<p>310<p>
235Find a valid application corresponding to a given311Find a valid application corresponding to a given
236heuristically determined application identifier312heuristically determined application identifier
237string, or <a href="/home/florian/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none.313string, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none.
238</p>314</p>
239<div class="variablelist"><table border="0" class="variablelist">315<div class="variablelist"><table border="0" class="variablelist">
240<colgroup>316<colgroup>
@@ -261,6 +337,29 @@
261</div>337</div>
262<hr>338<hr>
263<div class="refsect2">339<div class="refsect2">
340<a name="shell-app-system-lookup-setting"></a><h3>shell_app_system_lookup_setting ()</h3>
341<pre class="programlisting"><span class="returnvalue">ShellApp</span> * shell_app_system_lookup_setting (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
342 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);</pre>
343<div class="variablelist"><table border="0" class="variablelist">
344<colgroup>
345<col align="left" valign="top">
346<col>
347</colgroup>
348<tbody>
349<tr>
350<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
351<td>desktop file id</td>
352</tr>
353<tr>
354<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
355<td>Application in gnomecc.menu, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
356</td>
357</tr>
358</tbody>
359</table></div>
360</div>
361<hr>
362<div class="refsect2">
264<a name="shell-app-system-lookup-wmclass"></a><h3>shell_app_system_lookup_wmclass ()</h3>363<a name="shell-app-system-lookup-wmclass"></a><h3>shell_app_system_lookup_wmclass ()</h3>
265<pre class="programlisting"><span class="returnvalue">ShellApp</span> * shell_app_system_lookup_wmclass (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,364<pre class="programlisting"><span class="returnvalue">ShellApp</span> * shell_app_system_lookup_wmclass (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
266 <em class="parameter"><code>const <span class="type">char</span> *wmclass</code></em>);</pre>365 <em class="parameter"><code>const <span class="type">char</span> *wmclass</code></em>);</pre>
@@ -292,39 +391,11 @@
292</div>391</div>
293<hr>392<hr>
294<div class="refsect2">393<div class="refsect2">
295<a name="shell-app-system-get-running"></a><h3>shell_app_system_get_running ()</h3>394<a name="shell-app-system-search-settings"></a><h3>shell_app_system_search_settings ()</h3>
296<pre class="programlisting"><span class="returnvalue">GSList</span> * shell_app_system_get_running (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *self</code></em>);</pre>395<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * shell_app_system_search_settings (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
297<p>396 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *terms</code></em>);</pre>
298Returns the set of applications which currently have at least one397<p>
299open window in the given context. The returned list will be sorted398Search through settings for the given search terms.
300by <a class="link" href="shell-ShellApp.html#shell-app-compare" title="shell_app_compare ()"><code class="function">shell_app_compare()</code></a>.
301</p>
302<div class="variablelist"><table border="0" class="variablelist">
303<colgroup>
304<col align="left" valign="top">
305<col>
306</colgroup>
307<tbody>
308<tr>
309<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
310<td>A <a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a>
311</td>
312</tr>
313<tr>
314<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
315<td>Active applications. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> ShellApp][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
316</td>
317</tr>
318</tbody>
319</table></div>
320</div>
321<hr>
322<div class="refsect2">
323<a name="shell-app-system-initial-search"></a><h3>shell_app_system_initial_search ()</h3>
324<pre class="programlisting"><span class="returnvalue">GSList</span> * shell_app_system_initial_search (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
325 <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>);</pre>
326<p>
327Search through applications for the given search terms.
328</p>399</p>
329<div class="variablelist"><table border="0" class="variablelist">400<div class="variablelist"><table border="0" class="variablelist">
330<colgroup>401<colgroup>
@@ -344,7 +415,7 @@
344</tr>415</tr>
345<tr>416<tr>
346<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>417<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
347<td>List of applications. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> ShellApp]</span>418<td>List of setting applications. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> ShellApp]</span>
348</td>419</td>
349</tr>420</tr>
350</tbody>421</tbody>
@@ -353,9 +424,9 @@
353<hr>424<hr>
354<div class="refsect2">425<div class="refsect2">
355<a name="shell-app-system-subsearch"></a><h3>shell_app_system_subsearch ()</h3>426<a name="shell-app-system-subsearch"></a><h3>shell_app_system_subsearch ()</h3>
356<pre class="programlisting"><span class="returnvalue">GSList</span> * shell_app_system_subsearch (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,427<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * shell_app_system_subsearch (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
357 <em class="parameter"><code><span class="type">GSList</span> *previous_results</code></em>,428 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *previous_results</code></em>,
358 <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>);</pre>429 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *terms</code></em>);</pre>
359<p>430<p>
360Search through a previous result set; for more information, see431Search through a previous result set; for more information, see
361js/ui/search.js. Note the value of <em class="parameter"><code>prefs</code></em> must be432js/ui/search.js. Note the value of <em class="parameter"><code>prefs</code></em> must be
@@ -391,77 +462,6 @@
391</tbody>462</tbody>
392</table></div>463</table></div>
393</div>464</div>
394<hr>
395<div class="refsect2">
396<a name="shell-app-system-get-settings-tree"></a><h3>shell_app_system_get_settings_tree ()</h3>
397<pre class="programlisting"><span class="returnvalue">GMenuTree</span> * shell_app_system_get_settings_tree (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>);</pre>
398<div class="variablelist"><table border="0" class="variablelist">
399<colgroup>
400<col align="left" valign="top">
401<col>
402</colgroup>
403<tbody><tr>
404<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
405<td>The <span class="type">GMenuTree</span> for apps. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
406</td>
407</tr></tbody>
408</table></div>
409</div>
410<hr>
411<div class="refsect2">
412<a name="shell-app-system-search-settings"></a><h3>shell_app_system_search_settings ()</h3>
413<pre class="programlisting"><span class="returnvalue">GSList</span> * shell_app_system_search_settings (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
414 <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>);</pre>
415<p>
416Search through settings for the given search terms.
417</p>
418<div class="variablelist"><table border="0" class="variablelist">
419<colgroup>
420<col align="left" valign="top">
421<col>
422</colgroup>
423<tbody>
424<tr>
425<td><p><span class="term"><em class="parameter"><code>system</code></em> :</span></p></td>
426<td>A <a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a>
427</td>
428</tr>
429<tr>
430<td><p><span class="term"><em class="parameter"><code>terms</code></em> :</span></p></td>
431<td>List of terms, logical AND. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span>
432</td>
433</tr>
434<tr>
435<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
436<td>List of setting applications. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> ShellApp]</span>
437</td>
438</tr>
439</tbody>
440</table></div>
441</div>
442<hr>
443<div class="refsect2">
444<a name="shell-app-system-lookup-setting"></a><h3>shell_app_system_lookup_setting ()</h3>
445<pre class="programlisting"><span class="returnvalue">ShellApp</span> * shell_app_system_lookup_setting (<em class="parameter"><code><a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *system</code></em>,
446 <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);</pre>
447<div class="variablelist"><table border="0" class="variablelist">
448<colgroup>
449<col align="left" valign="top">
450<col>
451</colgroup>
452<tbody>
453<tr>
454<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
455<td>desktop file id</td>
456</tr>
457<tr>
458<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
459<td>Application in gnomecc.menu, or <a href="/home/florian/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
460</td>
461</tr>
462</tbody>
463</table></div>
464</div>
465</div>465</div>
466<div class="refsect1">466<div class="refsect1">
467<a name="ShellAppSystem.signal-details"></a><h2>Signal Details</h2>467<a name="ShellAppSystem.signal-details"></a><h2>Signal Details</h2>
@@ -469,18 +469,18 @@
469<a name="ShellAppSystem-app-state-changed"></a><h3>The <code class="literal">"app-state-changed"</code> signal</h3>469<a name="ShellAppSystem-app-state-changed"></a><h3>The <code class="literal">"app-state-changed"</code> signal</h3>
470<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *shellappsystem,470<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *shellappsystem,
471 <span class="type">ShellApp</span> *arg1,471 <span class="type">ShellApp</span> *arg1,
472 <span class="type">gpointer</span> user_data) : <code class="literal">Run Last</code></pre>472 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
473</div>473</div>
474<hr>474<hr>
475<div class="refsect2">475<div class="refsect2">
476<a name="ShellAppSystem-installed-changed"></a><h3>The <code class="literal">"installed-changed"</code> signal</h3>476<a name="ShellAppSystem-installed-changed"></a><h3>The <code class="literal">"installed-changed"</code> signal</h3>
477<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *shellappsystem,477<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> *shellappsystem,
478 <span class="type">gpointer</span> user_data) : <code class="literal">Run Last</code></pre>478 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
479</div>479</div>
480</div>480</div>
481</div>481</div>
482<div class="footer">482<div class="footer">
483<hr>483<hr>
484 Generated by GTK-Doc V1.18.1</div>484 Generated by GTK-Doc V1.18</div>
485</body>485</body>
486</html>486</html>
487\ No newline at end of file487\ No newline at end of file
488488
=== modified file 'docs/reference/shell/html/ShellEmbeddedWindow.html'
--- docs/reference/shell/html/ShellEmbeddedWindow.html 2012-06-26 00:08:54 +0000
+++ docs/reference/shell/html/ShellEmbeddedWindow.html 2013-02-24 03:10:25 +0000
@@ -8,7 +8,7 @@
8<link rel="up" href="ch04.html" title="Tray Icons">8<link rel="up" href="ch04.html" title="Tray Icons">
9<link rel="prev" href="ch04.html" title="Tray Icons">9<link rel="prev" href="ch04.html" title="Tray Icons">
10<link rel="next" href="ShellGtkEmbed.html" title="ShellGtkEmbed">10<link rel="next" href="ShellGtkEmbed.html" title="ShellGtkEmbed">
11<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">11<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12<link rel="stylesheet" href="style.css" type="text/css">12<link rel="stylesheet" href="style.css" type="text/css">
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: