Merge lp:~darkxst/ubuntu/quantal/gnome-shell/lp1128804 into lp:ubuntu/quantal-proposed/gnome-shell
- Quantal (12.10)
- lp1128804
- Merge into quantal-proposed
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Development Team | Pending | ||
Review via email: mp+150206@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed directory '.pc' | |||
2 | === removed file '.pc/.quilt_patches' | |||
3 | --- .pc/.quilt_patches 2012-05-25 11:44:15 +0000 | |||
4 | +++ .pc/.quilt_patches 1970-01-01 00:00:00 +0000 | |||
5 | @@ -1,1 +0,0 @@ | |||
6 | 1 | debian/patches | ||
7 | 2 | 0 | ||
8 | === removed file '.pc/.quilt_series' | |||
9 | --- .pc/.quilt_series 2012-05-25 11:44:15 +0000 | |||
10 | +++ .pc/.quilt_series 1970-01-01 00:00:00 +0000 | |||
11 | @@ -1,1 +0,0 @@ | |||
12 | 1 | series | ||
13 | 2 | 0 | ||
14 | === removed file '.pc/.version' | |||
15 | --- .pc/.version 2010-04-27 22:32:21 +0000 | |||
16 | +++ .pc/.version 1970-01-01 00:00:00 +0000 | |||
17 | @@ -1,1 +0,0 @@ | |||
18 | 1 | 2 | ||
19 | 2 | 0 | ||
20 | === removed directory '.pc/11-no-gettext.patch' | |||
21 | === removed file '.pc/11-no-gettext.patch/configure.ac' | |||
22 | --- .pc/11-no-gettext.patch/configure.ac 2012-11-26 15:57:51 +0000 | |||
23 | +++ .pc/11-no-gettext.patch/configure.ac 1970-01-01 00:00:00 +0000 | |||
24 | @@ -1,276 +0,0 @@ | |||
25 | 1 | AC_PREREQ(2.63) | ||
26 | 2 | AC_INIT([gnome-shell],[3.6.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell]) | ||
27 | 3 | |||
28 | 4 | AC_CONFIG_HEADERS([config.h]) | ||
29 | 5 | AC_CONFIG_SRCDIR([src/shell-global.c]) | ||
30 | 6 | AC_CONFIG_MACRO_DIR([m4]) | ||
31 | 7 | AC_CONFIG_AUX_DIR([config]) | ||
32 | 8 | |||
33 | 9 | AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"]) | ||
34 | 10 | AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"]) | ||
35 | 11 | |||
36 | 12 | AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign]) | ||
37 | 13 | AM_MAINTAINER_MODE([enable]) | ||
38 | 14 | |||
39 | 15 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | ||
40 | 16 | |||
41 | 17 | # Checks for programs. | ||
42 | 18 | AC_PROG_CC | ||
43 | 19 | # Needed for per-target cflags, like in gnomeshell-taskpanel | ||
44 | 20 | AM_PROG_CC_C_O | ||
45 | 21 | |||
46 | 22 | # Initialize libtool | ||
47 | 23 | LT_PREREQ([2.2.6]) | ||
48 | 24 | LT_INIT([disable-static]) | ||
49 | 25 | |||
50 | 26 | # i18n | ||
51 | 27 | IT_PROG_INTLTOOL([0.40]) | ||
52 | 28 | |||
53 | 29 | AM_GNU_GETTEXT([external]) | ||
54 | 30 | AM_GNU_GETTEXT_VERSION([0.17]) | ||
55 | 31 | |||
56 | 32 | GETTEXT_PACKAGE=gnome-shell | ||
57 | 33 | AC_SUBST(GETTEXT_PACKAGE) | ||
58 | 34 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", | ||
59 | 35 | [The prefix for our gettext translation domains.]) | ||
60 | 36 | |||
61 | 37 | PKG_PROG_PKG_CONFIG([0.22]) | ||
62 | 38 | |||
63 | 39 | AC_PATH_PROG([XSLTPROC], [xsltproc]) | ||
64 | 40 | |||
65 | 41 | GLIB_GSETTINGS | ||
66 | 42 | |||
67 | 43 | # Get a value to substitute into gnome-shell.in | ||
68 | 44 | AM_PATH_PYTHON([2.5]) | ||
69 | 45 | AC_SUBST(PYTHON) | ||
70 | 46 | |||
71 | 47 | # We need at least this, since gst_plugin_register_static() was added | ||
72 | 48 | # in 0.10.16, but nothing older than 0.10.21 has been tested. | ||
73 | 49 | GSTREAMER_MIN_VERSION=0.11.92 | ||
74 | 50 | |||
75 | 51 | recorder_modules= | ||
76 | 52 | build_recorder=false | ||
77 | 53 | AC_MSG_CHECKING([for GStreamer (needed for recording functionality)]) | ||
78 | 54 | if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then | ||
79 | 55 | AC_MSG_RESULT(yes) | ||
80 | 56 | build_recorder=true | ||
81 | 57 | recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11" | ||
82 | 58 | PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl) | ||
83 | 59 | else | ||
84 | 60 | AC_MSG_RESULT(no) | ||
85 | 61 | fi | ||
86 | 62 | |||
87 | 63 | AM_CONDITIONAL(BUILD_RECORDER, $build_recorder) | ||
88 | 64 | |||
89 | 65 | CLUTTER_MIN_VERSION=1.11.11 | ||
90 | 66 | GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1 | ||
91 | 67 | GJS_MIN_VERSION=1.33.2 | ||
92 | 68 | MUTTER_MIN_VERSION=3.6.2 | ||
93 | 69 | GTK_MIN_VERSION=3.3.9 | ||
94 | 70 | GIO_MIN_VERSION=2.31.6 | ||
95 | 71 | LIBECAL_MIN_VERSION=3.5.3 | ||
96 | 72 | LIBEDATASERVER_MIN_VERSION=3.5.3 | ||
97 | 73 | LIBEDATASERVERUI_MIN_VERSION=3.5.3 | ||
98 | 74 | TELEPATHY_GLIB_MIN_VERSION=0.17.5 | ||
99 | 75 | TELEPATHY_LOGGER_MIN_VERSION=0.2.4 | ||
100 | 76 | POLKIT_MIN_VERSION=0.100 | ||
101 | 77 | STARTUP_NOTIFICATION_MIN_VERSION=0.11 | ||
102 | 78 | GCR_MIN_VERSION=3.3.90 | ||
103 | 79 | GNOME_DESKTOP_REQUIRED_VERSION=3.5.1 | ||
104 | 80 | GNOME_MENUS_REQUIRED_VERSION=3.5.3 | ||
105 | 81 | |||
106 | 82 | # Collect more than 20 libraries for a prize! | ||
107 | 83 | PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION | ||
108 | 84 | libxml-2.0 | ||
109 | 85 | gtk+-3.0 >= $GTK_MIN_VERSION | ||
110 | 86 | atk-bridge-2.0 | ||
111 | 87 | libmutter >= $MUTTER_MIN_VERSION | ||
112 | 88 | gjs-internals-1.0 >= $GJS_MIN_VERSION | ||
113 | 89 | libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION | ||
114 | 90 | $recorder_modules | ||
115 | 91 | gdk-x11-3.0 libsoup-2.4 | ||
116 | 92 | gl | ||
117 | 93 | clutter-x11-1.0 >= $CLUTTER_MIN_VERSION | ||
118 | 94 | clutter-glx-1.0 >= $CLUTTER_MIN_VERSION | ||
119 | 95 | libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION | ||
120 | 96 | gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION | ||
121 | 97 | libcanberra | ||
122 | 98 | telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION | ||
123 | 99 | telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION | ||
124 | 100 | polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes | ||
125 | 101 | libnm-glib libnm-util gnome-keyring-1 | ||
126 | 102 | gcr-3 >= $GCR_MIN_VERSION | ||
127 | 103 | gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION) | ||
128 | 104 | |||
129 | 105 | PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0) | ||
130 | 106 | |||
131 | 107 | PKG_CHECK_MODULES(SHELL_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0) | ||
132 | 108 | |||
133 | 109 | PKG_CHECK_MODULES(BROWSER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION json-glib-1.0 >= 0.13.2) | ||
134 | 110 | |||
135 | 111 | GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings` | ||
136 | 112 | AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR]) | ||
137 | 113 | |||
138 | 114 | GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION]) | ||
139 | 115 | |||
140 | 116 | saved_CFLAGS=$CFLAGS | ||
141 | 117 | saved_LIBS=$LIBS | ||
142 | 118 | CFLAGS=$GNOME_SHELL_CFLAGS | ||
143 | 119 | LIBS=$GNOME_SHELL_LIBS | ||
144 | 120 | AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier) | ||
145 | 121 | CFLAGS=$saved_CFLAGS | ||
146 | 122 | LIBS=$saved_LIBS | ||
147 | 123 | |||
148 | 124 | PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION) | ||
149 | 125 | PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 x11) | ||
150 | 126 | PKG_CHECK_MODULES(TRAY, gtk+-3.0) | ||
151 | 127 | PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0) | ||
152 | 128 | PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.5.4) | ||
153 | 129 | |||
154 | 130 | AC_MSG_CHECKING([for bluetooth support]) | ||
155 | 131 | PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0], | ||
156 | 132 | [BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0` | ||
157 | 133 | BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0` | ||
158 | 134 | AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"]) | ||
159 | 135 | AC_SUBST([BLUETOOTH_DIR],["$BLUETOOTH_DIR"]) | ||
160 | 136 | AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library]) | ||
161 | 137 | AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet]) | ||
162 | 138 | AC_SUBST([HAVE_BLUETOOTH],[1]) | ||
163 | 139 | AC_MSG_RESULT([yes])], | ||
164 | 140 | [AC_DEFINE([HAVE_BLUETOOTH],[0]) | ||
165 | 141 | AC_SUBST([HAVE_BLUETOOTH],[0]) | ||
166 | 142 | AC_MSG_RESULT([no])]) | ||
167 | 143 | |||
168 | 144 | PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0) | ||
169 | 145 | AC_SUBST(CALENDAR_SERVER_CFLAGS) | ||
170 | 146 | AC_SUBST(CALENDAR_SERVER_LIBS) | ||
171 | 147 | |||
172 | 148 | AC_ARG_WITH(systemd, | ||
173 | 149 | AS_HELP_STRING([--with-systemd], | ||
174 | 150 | [Add systemd support]), | ||
175 | 151 | [with_systemd=$withval], [with_systemd=auto]) | ||
176 | 152 | |||
177 | 153 | PKG_CHECK_MODULES(SYSTEMD, | ||
178 | 154 | [libsystemd-login libsystemd-daemon], | ||
179 | 155 | [have_systemd=yes], [have_systemd=no]) | ||
180 | 156 | |||
181 | 157 | if test "x$with_systemd" = "xauto" ; then | ||
182 | 158 | if test x$have_systemd = xno ; then | ||
183 | 159 | use_systemd=no | ||
184 | 160 | else | ||
185 | 161 | use_systemd=yes | ||
186 | 162 | fi | ||
187 | 163 | else | ||
188 | 164 | use_systemd=$with_systemd | ||
189 | 165 | fi | ||
190 | 166 | |||
191 | 167 | if test "x$use_systemd" = "xyes"; then | ||
192 | 168 | if test "x$have_systemd" = "xno"; then | ||
193 | 169 | AC_MSG_ERROR([Systemd support explicitly required, but systemd not found]) | ||
194 | 170 | fi | ||
195 | 171 | |||
196 | 172 | AC_DEFINE(WITH_SYSTEMD, 1, [systemd support]) | ||
197 | 173 | fi | ||
198 | 174 | |||
199 | 175 | MUTTER_GIR_DIR=`$PKG_CONFIG --variable=girdir libmutter` | ||
200 | 176 | MUTTER_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir libmutter` | ||
201 | 177 | AC_SUBST(MUTTER_GIR_DIR) | ||
202 | 178 | AC_SUBST(MUTTER_TYPELIB_DIR) | ||
203 | 179 | |||
204 | 180 | GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0` | ||
205 | 181 | AC_SUBST(GJS_CONSOLE) | ||
206 | 182 | |||
207 | 183 | AC_CHECK_FUNCS(fdwalk) | ||
208 | 184 | AC_CHECK_FUNCS(mallinfo) | ||
209 | 185 | AC_CHECK_HEADERS([sys/resource.h]) | ||
210 | 186 | |||
211 | 187 | # _NL_TIME_FIRST_WEEKDAY is an enum and not a define | ||
212 | 188 | AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY]) | ||
213 | 189 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], | ||
214 | 190 | [[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])], | ||
215 | 191 | [langinfo_ok=yes], [langinfo_ok=no]) | ||
216 | 192 | AC_MSG_RESULT($langinfo_ok) | ||
217 | 193 | if test "$langinfo_ok" = "yes"; then | ||
218 | 194 | AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1], | ||
219 | 195 | [Define if _NL_TIME_FIRST_WEEKDAY is available]) | ||
220 | 196 | fi | ||
221 | 197 | |||
222 | 198 | # Sets GLIB_GENMARSHAL and GLIB_MKENUMS | ||
223 | 199 | AM_PATH_GLIB_2_0() | ||
224 | 200 | G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` | ||
225 | 201 | AC_SUBST(G_IR_SCANNER) | ||
226 | 202 | G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` | ||
227 | 203 | AC_SUBST(G_IR_COMPILER) | ||
228 | 204 | G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` | ||
229 | 205 | AC_SUBST(G_IR_GENERATE) | ||
230 | 206 | GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` | ||
231 | 207 | AC_SUBST(GIRDIR) | ||
232 | 208 | TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" | ||
233 | 209 | AC_SUBST(TYPELIBDIR) | ||
234 | 210 | |||
235 | 211 | GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) | ||
236 | 212 | |||
237 | 213 | AC_ARG_ENABLE(man, | ||
238 | 214 | [AS_HELP_STRING([--enable-man], | ||
239 | 215 | [generate man pages [default=yes]])],, | ||
240 | 216 | enable_man=yes) | ||
241 | 217 | if test "$enable_man" != no; then | ||
242 | 218 | AC_PATH_PROG([XSLTPROC], [xsltproc]) | ||
243 | 219 | if test -z "$XSLTPROC"; then | ||
244 | 220 | AC_MSG_ERROR([xsltproc is required for --enable-man]) | ||
245 | 221 | fi | ||
246 | 222 | fi | ||
247 | 223 | AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no) | ||
248 | 224 | |||
249 | 225 | # Stay command-line compatible with the gnome-common configure option. Here | ||
250 | 226 | # minimum/yes/maximum are the same, however. | ||
251 | 227 | AC_ARG_ENABLE(compile_warnings, | ||
252 | 228 | AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],[Turn on compiler warnings]),, | ||
253 | 229 | enable_compile_warnings=error) | ||
254 | 230 | |||
255 | 231 | changequote(,)dnl | ||
256 | 232 | if test "$enable_compile_warnings" != no ; then | ||
257 | 233 | if test "x$GCC" = "xyes"; then | ||
258 | 234 | case " $CFLAGS " in | ||
259 | 235 | *[\ \ ]-Wall[\ \ ]*) ;; | ||
260 | 236 | *) CFLAGS="$CFLAGS -Wall" ;; | ||
261 | 237 | esac | ||
262 | 238 | case " $CFLAGS " in | ||
263 | 239 | *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;; | ||
264 | 240 | *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; | ||
265 | 241 | esac | ||
266 | 242 | if test "$enable_compile_warnings" = error ; then | ||
267 | 243 | case " $CFLAGS " in | ||
268 | 244 | *[\ \ ]-Werror[\ \ ]*) ;; | ||
269 | 245 | *) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;; | ||
270 | 246 | esac | ||
271 | 247 | fi | ||
272 | 248 | fi | ||
273 | 249 | fi | ||
274 | 250 | changequote([,])dnl | ||
275 | 251 | |||
276 | 252 | AC_ARG_ENABLE(jhbuild-wrapper-script, | ||
277 | 253 | AS_HELP_STRING([--enable-jhbuild-wrapper-script],[Make "gnome-shell" script work for jhbuild]),,enable_jhbuild_wrapper_script=no) | ||
278 | 254 | AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes) | ||
279 | 255 | |||
280 | 256 | BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}" | ||
281 | 257 | AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to]) | ||
282 | 258 | |||
283 | 259 | AC_CONFIG_FILES([ | ||
284 | 260 | Makefile | ||
285 | 261 | data/Makefile | ||
286 | 262 | docs/Makefile | ||
287 | 263 | docs/reference/Makefile | ||
288 | 264 | docs/reference/shell/Makefile | ||
289 | 265 | docs/reference/shell/shell-docs.sgml | ||
290 | 266 | docs/reference/st/Makefile | ||
291 | 267 | docs/reference/st/st-docs.sgml | ||
292 | 268 | js/Makefile | ||
293 | 269 | src/calendar-server/evolution-calendar.desktop.in | ||
294 | 270 | src/Makefile | ||
295 | 271 | browser-plugin/Makefile | ||
296 | 272 | tests/Makefile | ||
297 | 273 | po/Makefile.in | ||
298 | 274 | man/Makefile | ||
299 | 275 | ]) | ||
300 | 276 | AC_OUTPUT | ||
301 | 277 | 0 | ||
302 | === removed directory '.pc/14_make-GLX-optional.patch' | |||
303 | === removed file '.pc/14_make-GLX-optional.patch/configure.ac' | |||
304 | --- .pc/14_make-GLX-optional.patch/configure.ac 2012-11-26 15:57:51 +0000 | |||
305 | +++ .pc/14_make-GLX-optional.patch/configure.ac 1970-01-01 00:00:00 +0000 | |||
306 | @@ -1,273 +0,0 @@ | |||
307 | 1 | AC_PREREQ(2.63) | ||
308 | 2 | AC_INIT([gnome-shell],[3.6.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell]) | ||
309 | 3 | |||
310 | 4 | AC_CONFIG_HEADERS([config.h]) | ||
311 | 5 | AC_CONFIG_SRCDIR([src/shell-global.c]) | ||
312 | 6 | AC_CONFIG_MACRO_DIR([m4]) | ||
313 | 7 | AC_CONFIG_AUX_DIR([config]) | ||
314 | 8 | |||
315 | 9 | AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"]) | ||
316 | 10 | AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"]) | ||
317 | 11 | |||
318 | 12 | AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign]) | ||
319 | 13 | AM_MAINTAINER_MODE([enable]) | ||
320 | 14 | |||
321 | 15 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | ||
322 | 16 | |||
323 | 17 | # Checks for programs. | ||
324 | 18 | AC_PROG_CC | ||
325 | 19 | # Needed for per-target cflags, like in gnomeshell-taskpanel | ||
326 | 20 | AM_PROG_CC_C_O | ||
327 | 21 | |||
328 | 22 | # Initialize libtool | ||
329 | 23 | LT_PREREQ([2.2.6]) | ||
330 | 24 | LT_INIT([disable-static]) | ||
331 | 25 | |||
332 | 26 | # i18n | ||
333 | 27 | IT_PROG_INTLTOOL([0.40]) | ||
334 | 28 | |||
335 | 29 | GETTEXT_PACKAGE=gnome-shell | ||
336 | 30 | AC_SUBST(GETTEXT_PACKAGE) | ||
337 | 31 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", | ||
338 | 32 | [The prefix for our gettext translation domains.]) | ||
339 | 33 | |||
340 | 34 | PKG_PROG_PKG_CONFIG([0.22]) | ||
341 | 35 | |||
342 | 36 | AC_PATH_PROG([XSLTPROC], [xsltproc]) | ||
343 | 37 | |||
344 | 38 | GLIB_GSETTINGS | ||
345 | 39 | |||
346 | 40 | # Get a value to substitute into gnome-shell.in | ||
347 | 41 | AM_PATH_PYTHON([2.5]) | ||
348 | 42 | AC_SUBST(PYTHON) | ||
349 | 43 | |||
350 | 44 | # We need at least this, since gst_plugin_register_static() was added | ||
351 | 45 | # in 0.10.16, but nothing older than 0.10.21 has been tested. | ||
352 | 46 | GSTREAMER_MIN_VERSION=0.11.92 | ||
353 | 47 | |||
354 | 48 | recorder_modules= | ||
355 | 49 | build_recorder=false | ||
356 | 50 | AC_MSG_CHECKING([for GStreamer (needed for recording functionality)]) | ||
357 | 51 | if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then | ||
358 | 52 | AC_MSG_RESULT(yes) | ||
359 | 53 | build_recorder=true | ||
360 | 54 | recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11" | ||
361 | 55 | PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl) | ||
362 | 56 | else | ||
363 | 57 | AC_MSG_RESULT(no) | ||
364 | 58 | fi | ||
365 | 59 | |||
366 | 60 | AM_CONDITIONAL(BUILD_RECORDER, $build_recorder) | ||
367 | 61 | |||
368 | 62 | CLUTTER_MIN_VERSION=1.11.11 | ||
369 | 63 | GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1 | ||
370 | 64 | GJS_MIN_VERSION=1.33.2 | ||
371 | 65 | MUTTER_MIN_VERSION=3.6.2 | ||
372 | 66 | GTK_MIN_VERSION=3.3.9 | ||
373 | 67 | GIO_MIN_VERSION=2.31.6 | ||
374 | 68 | LIBECAL_MIN_VERSION=3.5.3 | ||
375 | 69 | LIBEDATASERVER_MIN_VERSION=3.5.3 | ||
376 | 70 | LIBEDATASERVERUI_MIN_VERSION=3.5.3 | ||
377 | 71 | TELEPATHY_GLIB_MIN_VERSION=0.17.5 | ||
378 | 72 | TELEPATHY_LOGGER_MIN_VERSION=0.2.4 | ||
379 | 73 | POLKIT_MIN_VERSION=0.100 | ||
380 | 74 | STARTUP_NOTIFICATION_MIN_VERSION=0.11 | ||
381 | 75 | GCR_MIN_VERSION=3.3.90 | ||
382 | 76 | GNOME_DESKTOP_REQUIRED_VERSION=3.5.1 | ||
383 | 77 | GNOME_MENUS_REQUIRED_VERSION=3.5.3 | ||
384 | 78 | |||
385 | 79 | # Collect more than 20 libraries for a prize! | ||
386 | 80 | PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION | ||
387 | 81 | libxml-2.0 | ||
388 | 82 | gtk+-3.0 >= $GTK_MIN_VERSION | ||
389 | 83 | atk-bridge-2.0 | ||
390 | 84 | libmutter >= $MUTTER_MIN_VERSION | ||
391 | 85 | gjs-internals-1.0 >= $GJS_MIN_VERSION | ||
392 | 86 | libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION | ||
393 | 87 | $recorder_modules | ||
394 | 88 | gdk-x11-3.0 libsoup-2.4 | ||
395 | 89 | gl | ||
396 | 90 | clutter-x11-1.0 >= $CLUTTER_MIN_VERSION | ||
397 | 91 | clutter-glx-1.0 >= $CLUTTER_MIN_VERSION | ||
398 | 92 | libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION | ||
399 | 93 | gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION | ||
400 | 94 | libcanberra | ||
401 | 95 | telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION | ||
402 | 96 | telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION | ||
403 | 97 | polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes | ||
404 | 98 | libnm-glib libnm-util gnome-keyring-1 | ||
405 | 99 | gcr-3 >= $GCR_MIN_VERSION | ||
406 | 100 | gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION) | ||
407 | 101 | |||
408 | 102 | PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0) | ||
409 | 103 | |||
410 | 104 | PKG_CHECK_MODULES(SHELL_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0) | ||
411 | 105 | |||
412 | 106 | PKG_CHECK_MODULES(BROWSER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION json-glib-1.0 >= 0.13.2) | ||
413 | 107 | |||
414 | 108 | GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings` | ||
415 | 109 | AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR]) | ||
416 | 110 | |||
417 | 111 | GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION]) | ||
418 | 112 | |||
419 | 113 | saved_CFLAGS=$CFLAGS | ||
420 | 114 | saved_LIBS=$LIBS | ||
421 | 115 | CFLAGS=$GNOME_SHELL_CFLAGS | ||
422 | 116 | LIBS=$GNOME_SHELL_LIBS | ||
423 | 117 | AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier) | ||
424 | 118 | CFLAGS=$saved_CFLAGS | ||
425 | 119 | LIBS=$saved_LIBS | ||
426 | 120 | |||
427 | 121 | PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION) | ||
428 | 122 | PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 x11) | ||
429 | 123 | PKG_CHECK_MODULES(TRAY, gtk+-3.0) | ||
430 | 124 | PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0) | ||
431 | 125 | PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.5.4) | ||
432 | 126 | |||
433 | 127 | AC_MSG_CHECKING([for bluetooth support]) | ||
434 | 128 | PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0], | ||
435 | 129 | [BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0` | ||
436 | 130 | BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0` | ||
437 | 131 | AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"]) | ||
438 | 132 | AC_SUBST([BLUETOOTH_DIR],["$BLUETOOTH_DIR"]) | ||
439 | 133 | AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library]) | ||
440 | 134 | AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet]) | ||
441 | 135 | AC_SUBST([HAVE_BLUETOOTH],[1]) | ||
442 | 136 | AC_MSG_RESULT([yes])], | ||
443 | 137 | [AC_DEFINE([HAVE_BLUETOOTH],[0]) | ||
444 | 138 | AC_SUBST([HAVE_BLUETOOTH],[0]) | ||
445 | 139 | AC_MSG_RESULT([no])]) | ||
446 | 140 | |||
447 | 141 | PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0) | ||
448 | 142 | AC_SUBST(CALENDAR_SERVER_CFLAGS) | ||
449 | 143 | AC_SUBST(CALENDAR_SERVER_LIBS) | ||
450 | 144 | |||
451 | 145 | AC_ARG_WITH(systemd, | ||
452 | 146 | AS_HELP_STRING([--with-systemd], | ||
453 | 147 | [Add systemd support]), | ||
454 | 148 | [with_systemd=$withval], [with_systemd=auto]) | ||
455 | 149 | |||
456 | 150 | PKG_CHECK_MODULES(SYSTEMD, | ||
457 | 151 | [libsystemd-login libsystemd-daemon], | ||
458 | 152 | [have_systemd=yes], [have_systemd=no]) | ||
459 | 153 | |||
460 | 154 | if test "x$with_systemd" = "xauto" ; then | ||
461 | 155 | if test x$have_systemd = xno ; then | ||
462 | 156 | use_systemd=no | ||
463 | 157 | else | ||
464 | 158 | use_systemd=yes | ||
465 | 159 | fi | ||
466 | 160 | else | ||
467 | 161 | use_systemd=$with_systemd | ||
468 | 162 | fi | ||
469 | 163 | |||
470 | 164 | if test "x$use_systemd" = "xyes"; then | ||
471 | 165 | if test "x$have_systemd" = "xno"; then | ||
472 | 166 | AC_MSG_ERROR([Systemd support explicitly required, but systemd not found]) | ||
473 | 167 | fi | ||
474 | 168 | |||
475 | 169 | AC_DEFINE(WITH_SYSTEMD, 1, [systemd support]) | ||
476 | 170 | fi | ||
477 | 171 | |||
478 | 172 | MUTTER_GIR_DIR=`$PKG_CONFIG --variable=girdir libmutter` | ||
479 | 173 | MUTTER_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir libmutter` | ||
480 | 174 | AC_SUBST(MUTTER_GIR_DIR) | ||
481 | 175 | AC_SUBST(MUTTER_TYPELIB_DIR) | ||
482 | 176 | |||
483 | 177 | GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0` | ||
484 | 178 | AC_SUBST(GJS_CONSOLE) | ||
485 | 179 | |||
486 | 180 | AC_CHECK_FUNCS(fdwalk) | ||
487 | 181 | AC_CHECK_FUNCS(mallinfo) | ||
488 | 182 | AC_CHECK_HEADERS([sys/resource.h]) | ||
489 | 183 | |||
490 | 184 | # _NL_TIME_FIRST_WEEKDAY is an enum and not a define | ||
491 | 185 | AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY]) | ||
492 | 186 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], | ||
493 | 187 | [[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])], | ||
494 | 188 | [langinfo_ok=yes], [langinfo_ok=no]) | ||
495 | 189 | AC_MSG_RESULT($langinfo_ok) | ||
496 | 190 | if test "$langinfo_ok" = "yes"; then | ||
497 | 191 | AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1], | ||
498 | 192 | [Define if _NL_TIME_FIRST_WEEKDAY is available]) | ||
499 | 193 | fi | ||
500 | 194 | |||
501 | 195 | # Sets GLIB_GENMARSHAL and GLIB_MKENUMS | ||
502 | 196 | AM_PATH_GLIB_2_0() | ||
503 | 197 | G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` | ||
504 | 198 | AC_SUBST(G_IR_SCANNER) | ||
505 | 199 | G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` | ||
506 | 200 | AC_SUBST(G_IR_COMPILER) | ||
507 | 201 | G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` | ||
508 | 202 | AC_SUBST(G_IR_GENERATE) | ||
509 | 203 | GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` | ||
510 | 204 | AC_SUBST(GIRDIR) | ||
511 | 205 | TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" | ||
512 | 206 | AC_SUBST(TYPELIBDIR) | ||
513 | 207 | |||
514 | 208 | GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) | ||
515 | 209 | |||
516 | 210 | AC_ARG_ENABLE(man, | ||
517 | 211 | [AS_HELP_STRING([--enable-man], | ||
518 | 212 | [generate man pages [default=yes]])],, | ||
519 | 213 | enable_man=yes) | ||
520 | 214 | if test "$enable_man" != no; then | ||
521 | 215 | AC_PATH_PROG([XSLTPROC], [xsltproc]) | ||
522 | 216 | if test -z "$XSLTPROC"; then | ||
523 | 217 | AC_MSG_ERROR([xsltproc is required for --enable-man]) | ||
524 | 218 | fi | ||
525 | 219 | fi | ||
526 | 220 | AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no) | ||
527 | 221 | |||
528 | 222 | # Stay command-line compatible with the gnome-common configure option. Here | ||
529 | 223 | # minimum/yes/maximum are the same, however. | ||
530 | 224 | AC_ARG_ENABLE(compile_warnings, | ||
531 | 225 | AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],[Turn on compiler warnings]),, | ||
532 | 226 | enable_compile_warnings=error) | ||
533 | 227 | |||
534 | 228 | changequote(,)dnl | ||
535 | 229 | if test "$enable_compile_warnings" != no ; then | ||
536 | 230 | if test "x$GCC" = "xyes"; then | ||
537 | 231 | case " $CFLAGS " in | ||
538 | 232 | *[\ \ ]-Wall[\ \ ]*) ;; | ||
539 | 233 | *) CFLAGS="$CFLAGS -Wall" ;; | ||
540 | 234 | esac | ||
541 | 235 | case " $CFLAGS " in | ||
542 | 236 | *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;; | ||
543 | 237 | *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; | ||
544 | 238 | esac | ||
545 | 239 | if test "$enable_compile_warnings" = error ; then | ||
546 | 240 | case " $CFLAGS " in | ||
547 | 241 | *[\ \ ]-Werror[\ \ ]*) ;; | ||
548 | 242 | *) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;; | ||
549 | 243 | esac | ||
550 | 244 | fi | ||
551 | 245 | fi | ||
552 | 246 | fi | ||
553 | 247 | changequote([,])dnl | ||
554 | 248 | |||
555 | 249 | AC_ARG_ENABLE(jhbuild-wrapper-script, | ||
556 | 250 | AS_HELP_STRING([--enable-jhbuild-wrapper-script],[Make "gnome-shell" script work for jhbuild]),,enable_jhbuild_wrapper_script=no) | ||
557 | 251 | AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes) | ||
558 | 252 | |||
559 | 253 | BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}" | ||
560 | 254 | AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to]) | ||
561 | 255 | |||
562 | 256 | AC_CONFIG_FILES([ | ||
563 | 257 | Makefile | ||
564 | 258 | data/Makefile | ||
565 | 259 | docs/Makefile | ||
566 | 260 | docs/reference/Makefile | ||
567 | 261 | docs/reference/shell/Makefile | ||
568 | 262 | docs/reference/shell/shell-docs.sgml | ||
569 | 263 | docs/reference/st/Makefile | ||
570 | 264 | docs/reference/st/st-docs.sgml | ||
571 | 265 | js/Makefile | ||
572 | 266 | src/calendar-server/evolution-calendar.desktop.in | ||
573 | 267 | src/Makefile | ||
574 | 268 | browser-plugin/Makefile | ||
575 | 269 | tests/Makefile | ||
576 | 270 | po/Makefile.in | ||
577 | 271 | man/Makefile | ||
578 | 272 | ]) | ||
579 | 273 | AC_OUTPUT | ||
580 | 274 | 0 | ||
581 | === removed directory '.pc/14_make-GLX-optional.patch/src' | |||
582 | === removed file '.pc/14_make-GLX-optional.patch/src/gnome-shell-plugin.c' | |||
583 | --- .pc/14_make-GLX-optional.patch/src/gnome-shell-plugin.c 2012-06-26 00:08:54 +0000 | |||
584 | +++ .pc/14_make-GLX-optional.patch/src/gnome-shell-plugin.c 1970-01-01 00:00:00 +0000 | |||
585 | @@ -1,366 +0,0 @@ | |||
586 | 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ | ||
587 | 2 | |||
588 | 3 | /* | ||
589 | 4 | * Copyright (c) 2008 Red Hat, Inc. | ||
590 | 5 | * Copyright (c) 2008 Intel Corp. | ||
591 | 6 | * | ||
592 | 7 | * Based on plugin skeleton by: | ||
593 | 8 | * Author: Tomas Frydrych <tf@linux.intel.com> | ||
594 | 9 | * | ||
595 | 10 | * This program is free software; you can redistribute it and/or | ||
596 | 11 | * modify it under the terms of the GNU General Public License as | ||
597 | 12 | * published by the Free Software Foundation; either version 2 of the | ||
598 | 13 | * License, or (at your option) any later version. | ||
599 | 14 | * | ||
600 | 15 | * This program is distributed in the hope that it will be useful, but | ||
601 | 16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
602 | 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
603 | 18 | * General Public License for more details. | ||
604 | 19 | * | ||
605 | 20 | * You should have received a copy of the GNU General Public License | ||
606 | 21 | * along with this program; if not, write to the Free Software | ||
607 | 22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
608 | 23 | * 02111-1307, USA. | ||
609 | 24 | */ | ||
610 | 25 | |||
611 | 26 | #include "config.h" | ||
612 | 27 | |||
613 | 28 | #include <stdlib.h> | ||
614 | 29 | #include <string.h> | ||
615 | 30 | |||
616 | 31 | #include <clutter/clutter.h> | ||
617 | 32 | #include <clutter/x11/clutter-x11.h> | ||
618 | 33 | #include <GL/glx.h> | ||
619 | 34 | #include <GL/glxext.h> | ||
620 | 35 | #include <gjs/gjs.h> | ||
621 | 36 | #include <meta/display.h> | ||
622 | 37 | #include <meta/meta-plugin.h> | ||
623 | 38 | |||
624 | 39 | #include "shell-global-private.h" | ||
625 | 40 | #include "shell-perf-log.h" | ||
626 | 41 | #include "shell-wm-private.h" | ||
627 | 42 | |||
628 | 43 | static void gnome_shell_plugin_start (MetaPlugin *plugin); | ||
629 | 44 | static void gnome_shell_plugin_minimize (MetaPlugin *plugin, | ||
630 | 45 | MetaWindowActor *actor); | ||
631 | 46 | static void gnome_shell_plugin_maximize (MetaPlugin *plugin, | ||
632 | 47 | MetaWindowActor *actor, | ||
633 | 48 | gint x, | ||
634 | 49 | gint y, | ||
635 | 50 | gint width, | ||
636 | 51 | gint height); | ||
637 | 52 | static void gnome_shell_plugin_unmaximize (MetaPlugin *plugin, | ||
638 | 53 | MetaWindowActor *actor, | ||
639 | 54 | gint x, | ||
640 | 55 | gint y, | ||
641 | 56 | gint width, | ||
642 | 57 | gint height); | ||
643 | 58 | static void gnome_shell_plugin_map (MetaPlugin *plugin, | ||
644 | 59 | MetaWindowActor *actor); | ||
645 | 60 | static void gnome_shell_plugin_destroy (MetaPlugin *plugin, | ||
646 | 61 | MetaWindowActor *actor); | ||
647 | 62 | |||
648 | 63 | static void gnome_shell_plugin_switch_workspace (MetaPlugin *plugin, | ||
649 | 64 | gint from, | ||
650 | 65 | gint to, | ||
651 | 66 | MetaMotionDirection direction); | ||
652 | 67 | |||
653 | 68 | static void gnome_shell_plugin_kill_window_effects (MetaPlugin *plugin, | ||
654 | 69 | MetaWindowActor *actor); | ||
655 | 70 | static void gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin); | ||
656 | 71 | |||
657 | 72 | |||
658 | 73 | static gboolean gnome_shell_plugin_xevent_filter (MetaPlugin *plugin, | ||
659 | 74 | XEvent *event); | ||
660 | 75 | static const MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin); | ||
661 | 76 | |||
662 | 77 | |||
663 | 78 | #define GNOME_TYPE_SHELL_PLUGIN (gnome_shell_plugin_get_type ()) | ||
664 | 79 | #define GNOME_SHELL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPlugin)) | ||
665 | 80 | #define GNOME_SHELL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPluginClass)) | ||
666 | 81 | #define GNOME_IS_SHELL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_SHELL_PLUGIN_TYPE)) | ||
667 | 82 | #define GNOME_IS_SHELL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SHELL_PLUGIN)) | ||
668 | 83 | #define GNOME_SHELL_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPluginClass)) | ||
669 | 84 | |||
670 | 85 | typedef struct _GnomeShellPlugin GnomeShellPlugin; | ||
671 | 86 | typedef struct _GnomeShellPluginClass GnomeShellPluginClass; | ||
672 | 87 | |||
673 | 88 | struct _GnomeShellPlugin | ||
674 | 89 | { | ||
675 | 90 | MetaPlugin parent; | ||
676 | 91 | |||
677 | 92 | Atom panel_action; | ||
678 | 93 | Atom panel_action_run_dialog; | ||
679 | 94 | Atom panel_action_main_menu; | ||
680 | 95 | |||
681 | 96 | int glx_error_base; | ||
682 | 97 | int glx_event_base; | ||
683 | 98 | guint have_swap_event : 1; | ||
684 | 99 | |||
685 | 100 | ShellGlobal *global; | ||
686 | 101 | }; | ||
687 | 102 | |||
688 | 103 | struct _GnomeShellPluginClass | ||
689 | 104 | { | ||
690 | 105 | MetaPluginClass parent_class; | ||
691 | 106 | }; | ||
692 | 107 | |||
693 | 108 | GType gnome_shell_plugin_get_type (void); | ||
694 | 109 | |||
695 | 110 | G_DEFINE_TYPE (GnomeShellPlugin, gnome_shell_plugin, META_TYPE_PLUGIN) | ||
696 | 111 | |||
697 | 112 | static void | ||
698 | 113 | gnome_shell_plugin_class_init (GnomeShellPluginClass *klass) | ||
699 | 114 | { | ||
700 | 115 | MetaPluginClass *plugin_class = META_PLUGIN_CLASS (klass); | ||
701 | 116 | |||
702 | 117 | plugin_class->start = gnome_shell_plugin_start; | ||
703 | 118 | plugin_class->map = gnome_shell_plugin_map; | ||
704 | 119 | plugin_class->minimize = gnome_shell_plugin_minimize; | ||
705 | 120 | plugin_class->maximize = gnome_shell_plugin_maximize; | ||
706 | 121 | plugin_class->unmaximize = gnome_shell_plugin_unmaximize; | ||
707 | 122 | plugin_class->destroy = gnome_shell_plugin_destroy; | ||
708 | 123 | |||
709 | 124 | plugin_class->switch_workspace = gnome_shell_plugin_switch_workspace; | ||
710 | 125 | |||
711 | 126 | plugin_class->kill_window_effects = gnome_shell_plugin_kill_window_effects; | ||
712 | 127 | plugin_class->kill_switch_workspace = gnome_shell_plugin_kill_switch_workspace; | ||
713 | 128 | |||
714 | 129 | plugin_class->xevent_filter = gnome_shell_plugin_xevent_filter; | ||
715 | 130 | plugin_class->plugin_info = gnome_shell_plugin_plugin_info; | ||
716 | 131 | } | ||
717 | 132 | |||
718 | 133 | static void | ||
719 | 134 | gnome_shell_plugin_init (GnomeShellPlugin *shell_plugin) | ||
720 | 135 | { | ||
721 | 136 | } | ||
722 | 137 | |||
723 | 138 | static void | ||
724 | 139 | gnome_shell_plugin_start (MetaPlugin *plugin) | ||
725 | 140 | { | ||
726 | 141 | GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin); | ||
727 | 142 | MetaScreen *screen; | ||
728 | 143 | MetaDisplay *display; | ||
729 | 144 | Display *xdisplay; | ||
730 | 145 | GError *error = NULL; | ||
731 | 146 | int status; | ||
732 | 147 | const char *glx_extensions; | ||
733 | 148 | GjsContext *gjs_context; | ||
734 | 149 | |||
735 | 150 | screen = meta_plugin_get_screen (plugin); | ||
736 | 151 | display = meta_screen_get_display (screen); | ||
737 | 152 | |||
738 | 153 | xdisplay = meta_display_get_xdisplay (display); | ||
739 | 154 | |||
740 | 155 | glXQueryExtension (xdisplay, | ||
741 | 156 | &shell_plugin->glx_error_base, | ||
742 | 157 | &shell_plugin->glx_event_base); | ||
743 | 158 | |||
744 | 159 | glx_extensions = glXQueryExtensionsString (xdisplay, | ||
745 | 160 | meta_screen_get_screen_number (screen)); | ||
746 | 161 | shell_plugin->have_swap_event = strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL; | ||
747 | 162 | |||
748 | 163 | shell_perf_log_define_event (shell_perf_log_get_default (), | ||
749 | 164 | "glx.swapComplete", | ||
750 | 165 | "GL buffer swap complete event received (with timestamp of completion)", | ||
751 | 166 | "x"); | ||
752 | 167 | |||
753 | 168 | shell_plugin->global = shell_global_get (); | ||
754 | 169 | _shell_global_set_plugin (shell_plugin->global, META_PLUGIN (shell_plugin)); | ||
755 | 170 | |||
756 | 171 | gjs_context = _shell_global_get_gjs_context (shell_plugin->global); | ||
757 | 172 | |||
758 | 173 | if (!gjs_context_eval (gjs_context, | ||
759 | 174 | "imports.ui.environment.init();" | ||
760 | 175 | "imports.ui.main.start();", | ||
761 | 176 | -1, | ||
762 | 177 | "<main>", | ||
763 | 178 | &status, | ||
764 | 179 | &error)) | ||
765 | 180 | { | ||
766 | 181 | g_message ("Execution of main.js threw exception: %s", error->message); | ||
767 | 182 | g_error_free (error); | ||
768 | 183 | /* We just exit() here, since in a development environment you'll get the | ||
769 | 184 | * error in your shell output, and it's way better than a busted WM, | ||
770 | 185 | * which typically manifests as a white screen. | ||
771 | 186 | * | ||
772 | 187 | * In production, we shouldn't crash =) But if we do, we should get | ||
773 | 188 | * restarted by the session infrastructure, which is likely going | ||
774 | 189 | * to be better than some undefined state. | ||
775 | 190 | * | ||
776 | 191 | * If there was a generic "hook into bug-buddy for non-C crashes" | ||
777 | 192 | * infrastructure, here would be the place to put it. | ||
778 | 193 | */ | ||
779 | 194 | exit (1); | ||
780 | 195 | } | ||
781 | 196 | } | ||
782 | 197 | |||
783 | 198 | static ShellWM * | ||
784 | 199 | get_shell_wm (void) | ||
785 | 200 | { | ||
786 | 201 | ShellWM *wm; | ||
787 | 202 | |||
788 | 203 | g_object_get (shell_global_get (), | ||
789 | 204 | "window-manager", &wm, | ||
790 | 205 | NULL); | ||
791 | 206 | /* drop extra ref added by g_object_get */ | ||
792 | 207 | g_object_unref (wm); | ||
793 | 208 | |||
794 | 209 | return wm; | ||
795 | 210 | } | ||
796 | 211 | |||
797 | 212 | static void | ||
798 | 213 | gnome_shell_plugin_minimize (MetaPlugin *plugin, | ||
799 | 214 | MetaWindowActor *actor) | ||
800 | 215 | { | ||
801 | 216 | _shell_wm_minimize (get_shell_wm (), | ||
802 | 217 | actor); | ||
803 | 218 | |||
804 | 219 | } | ||
805 | 220 | |||
806 | 221 | static void | ||
807 | 222 | gnome_shell_plugin_maximize (MetaPlugin *plugin, | ||
808 | 223 | MetaWindowActor *actor, | ||
809 | 224 | gint x, | ||
810 | 225 | gint y, | ||
811 | 226 | gint width, | ||
812 | 227 | gint height) | ||
813 | 228 | { | ||
814 | 229 | _shell_wm_maximize (get_shell_wm (), | ||
815 | 230 | actor, x, y, width, height); | ||
816 | 231 | } | ||
817 | 232 | |||
818 | 233 | static void | ||
819 | 234 | gnome_shell_plugin_unmaximize (MetaPlugin *plugin, | ||
820 | 235 | MetaWindowActor *actor, | ||
821 | 236 | gint x, | ||
822 | 237 | gint y, | ||
823 | 238 | gint width, | ||
824 | 239 | gint height) | ||
825 | 240 | { | ||
826 | 241 | _shell_wm_unmaximize (get_shell_wm (), | ||
827 | 242 | actor, x, y, width, height); | ||
828 | 243 | } | ||
829 | 244 | |||
830 | 245 | static void | ||
831 | 246 | gnome_shell_plugin_map (MetaPlugin *plugin, | ||
832 | 247 | MetaWindowActor *actor) | ||
833 | 248 | { | ||
834 | 249 | _shell_wm_map (get_shell_wm (), | ||
835 | 250 | actor); | ||
836 | 251 | } | ||
837 | 252 | |||
838 | 253 | static void | ||
839 | 254 | gnome_shell_plugin_destroy (MetaPlugin *plugin, | ||
840 | 255 | MetaWindowActor *actor) | ||
841 | 256 | { | ||
842 | 257 | _shell_wm_destroy (get_shell_wm (), | ||
843 | 258 | actor); | ||
844 | 259 | } | ||
845 | 260 | |||
846 | 261 | static void | ||
847 | 262 | gnome_shell_plugin_switch_workspace (MetaPlugin *plugin, | ||
848 | 263 | gint from, | ||
849 | 264 | gint to, | ||
850 | 265 | MetaMotionDirection direction) | ||
851 | 266 | { | ||
852 | 267 | _shell_wm_switch_workspace (get_shell_wm(), from, to, direction); | ||
853 | 268 | } | ||
854 | 269 | |||
855 | 270 | static void | ||
856 | 271 | gnome_shell_plugin_kill_window_effects (MetaPlugin *plugin, | ||
857 | 272 | MetaWindowActor *actor) | ||
858 | 273 | { | ||
859 | 274 | _shell_wm_kill_window_effects (get_shell_wm(), actor); | ||
860 | 275 | } | ||
861 | 276 | |||
862 | 277 | static void | ||
863 | 278 | gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin) | ||
864 | 279 | { | ||
865 | 280 | _shell_wm_kill_switch_workspace (get_shell_wm()); | ||
866 | 281 | } | ||
867 | 282 | |||
868 | 283 | static gboolean | ||
869 | 284 | gnome_shell_plugin_xevent_filter (MetaPlugin *plugin, | ||
870 | 285 | XEvent *xev) | ||
871 | 286 | { | ||
872 | 287 | MetaScreen *screen = meta_plugin_get_screen (plugin); | ||
873 | 288 | ClutterStage *stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen)); | ||
874 | 289 | |||
875 | 290 | GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin); | ||
876 | 291 | #ifdef GLX_INTEL_swap_event | ||
877 | 292 | if (shell_plugin->have_swap_event && | ||
878 | 293 | xev->type == (shell_plugin->glx_event_base + GLX_BufferSwapComplete)) | ||
879 | 294 | { | ||
880 | 295 | GLXBufferSwapComplete *swap_complete_event; | ||
881 | 296 | swap_complete_event = (GLXBufferSwapComplete *)xev; | ||
882 | 297 | |||
883 | 298 | /* Buggy early versions of the INTEL_swap_event implementation in Mesa | ||
884 | 299 | * can send this with a ust of 0. Simplify life for consumers | ||
885 | 300 | * by ignoring such events */ | ||
886 | 301 | if (swap_complete_event->ust != 0) | ||
887 | 302 | shell_perf_log_event_x (shell_perf_log_get_default (), | ||
888 | 303 | "glx.swapComplete", | ||
889 | 304 | swap_complete_event->ust); | ||
890 | 305 | } | ||
891 | 306 | #endif | ||
892 | 307 | |||
893 | 308 | if ((xev->xany.type == EnterNotify || xev->xany.type == LeaveNotify) | ||
894 | 309 | && xev->xcrossing.window == clutter_x11_get_stage_window (stage)) | ||
895 | 310 | { | ||
896 | 311 | /* If the pointer enters a child of the stage window (eg, a | ||
897 | 312 | * trayicon), we want to consider it to still be in the stage, | ||
898 | 313 | * so don't let Clutter see the event. | ||
899 | 314 | */ | ||
900 | 315 | if (xev->xcrossing.detail == NotifyInferior) | ||
901 | 316 | return TRUE; | ||
902 | 317 | |||
903 | 318 | /* If the pointer is grabbed by a window it is not currently in, | ||
904 | 319 | * filter that out as well. In particular, if a trayicon grabs | ||
905 | 320 | * the pointer after a click on its label, we don't want to hide | ||
906 | 321 | * the message tray. Filtering out this event will leave Clutter | ||
907 | 322 | * out of sync, but that happens fairly often with grabs, and we | ||
908 | 323 | * can work around it. (Eg, shell_global_sync_pointer().) | ||
909 | 324 | */ | ||
910 | 325 | if (xev->xcrossing.mode == NotifyGrab && | ||
911 | 326 | (xev->xcrossing.detail == NotifyNonlinear || | ||
912 | 327 | xev->xcrossing.detail == NotifyNonlinearVirtual)) | ||
913 | 328 | return TRUE; | ||
914 | 329 | } | ||
915 | 330 | |||
916 | 331 | /* | ||
917 | 332 | * Pass the event to shell-global | ||
918 | 333 | */ | ||
919 | 334 | if (_shell_global_check_xdnd_event (shell_plugin->global, xev)) | ||
920 | 335 | return TRUE; | ||
921 | 336 | |||
922 | 337 | return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE; | ||
923 | 338 | } | ||
924 | 339 | |||
925 | 340 | static const | ||
926 | 341 | MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin) | ||
927 | 342 | { | ||
928 | 343 | static const MetaPluginInfo info = { | ||
929 | 344 | .name = "GNOME Shell", | ||
930 | 345 | .version = "0.1", | ||
931 | 346 | .author = "Various", | ||
932 | 347 | .license = "GPLv2+", | ||
933 | 348 | .description = "Provides GNOME Shell core functionality" | ||
934 | 349 | }; | ||
935 | 350 | |||
936 | 351 | return &info; | ||
937 | 352 | } | ||
938 | 353 | |||
939 | 354 | #if HAVE_BLUETOOTH | ||
940 | 355 | /* HACK: | ||
941 | 356 | Add a non-static function that calls into libgnome-bluetooth-applet.so, | ||
942 | 357 | to avoid the linker being too smart and removing the dependency. | ||
943 | 358 | This function is never actually called. | ||
944 | 359 | */ | ||
945 | 360 | extern GType bluetooth_applet_get_type(void); | ||
946 | 361 | void _shell_link_to_bluetooth(void); | ||
947 | 362 | |||
948 | 363 | void _shell_link_to_bluetooth(void) { | ||
949 | 364 | bluetooth_applet_get_type(); | ||
950 | 365 | } | ||
951 | 366 | #endif | ||
952 | 367 | 0 | ||
953 | === removed file '.pc/14_make-GLX-optional.patch/src/shell-screen-grabber.c' | |||
954 | --- .pc/14_make-GLX-optional.patch/src/shell-screen-grabber.c 2012-11-26 15:57:51 +0000 | |||
955 | +++ .pc/14_make-GLX-optional.patch/src/shell-screen-grabber.c 1970-01-01 00:00:00 +0000 | |||
956 | @@ -1,219 +0,0 @@ | |||
957 | 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ | ||
958 | 2 | |||
959 | 3 | #include <string.h> | ||
960 | 4 | |||
961 | 5 | #include <clutter/clutter.h> | ||
962 | 6 | #include <cogl/cogl.h> | ||
963 | 7 | #include <GL/gl.h> | ||
964 | 8 | #include <GL/glx.h> | ||
965 | 9 | #include <GL/glext.h> | ||
966 | 10 | |||
967 | 11 | #include "shell-screen-grabber.h" | ||
968 | 12 | |||
969 | 13 | PFNGLBINDBUFFERARBPROC pf_glBindBufferARB; | ||
970 | 14 | PFNGLBUFFERDATAARBPROC pf_glBufferDataARB; | ||
971 | 15 | PFNGLDELETEBUFFERSARBPROC pf_glDeleteBuffersARB; | ||
972 | 16 | PFNGLGENBUFFERSARBPROC pf_glGenBuffersARB; | ||
973 | 17 | PFNGLMAPBUFFERARBPROC pf_glMapBufferARB; | ||
974 | 18 | PFNGLUNMAPBUFFERARBPROC pf_glUnmapBufferARB; | ||
975 | 19 | |||
976 | 20 | struct _ShellScreenGrabberClass | ||
977 | 21 | { | ||
978 | 22 | GObjectClass parent_class; | ||
979 | 23 | }; | ||
980 | 24 | |||
981 | 25 | struct _ShellScreenGrabber | ||
982 | 26 | { | ||
983 | 27 | GObject parent_instance; | ||
984 | 28 | |||
985 | 29 | int have_pixel_buffers; | ||
986 | 30 | int have_pack_invert; | ||
987 | 31 | int width, height; | ||
988 | 32 | GLuint pixel_buffer; | ||
989 | 33 | }; | ||
990 | 34 | |||
991 | 35 | G_DEFINE_TYPE(ShellScreenGrabber, shell_screen_grabber, G_TYPE_OBJECT); | ||
992 | 36 | |||
993 | 37 | static void | ||
994 | 38 | shell_screen_grabber_finalize (GObject *gobject) | ||
995 | 39 | { | ||
996 | 40 | ShellScreenGrabber *grabber = SHELL_SCREEN_GRABBER (gobject); | ||
997 | 41 | |||
998 | 42 | if (grabber->pixel_buffer != 0) | ||
999 | 43 | pf_glDeleteBuffersARB (1, &grabber->pixel_buffer); | ||
1000 | 44 | } | ||
1001 | 45 | |||
1002 | 46 | static void | ||
1003 | 47 | shell_screen_grabber_class_init (ShellScreenGrabberClass *grabber_class) | ||
1004 | 48 | { | ||
1005 | 49 | GObjectClass *gobject_class = G_OBJECT_CLASS (grabber_class); | ||
1006 | 50 | |||
1007 | 51 | gobject_class->finalize = shell_screen_grabber_finalize; | ||
1008 | 52 | } | ||
1009 | 53 | |||
1010 | 54 | static void | ||
1011 | 55 | shell_screen_grabber_init (ShellScreenGrabber *grabber) | ||
1012 | 56 | { | ||
1013 | 57 | grabber->have_pixel_buffers = -1; | ||
1014 | 58 | grabber->width = -1; | ||
1015 | 59 | grabber->height= -1; | ||
1016 | 60 | grabber->pixel_buffer = 0; | ||
1017 | 61 | } | ||
1018 | 62 | |||
1019 | 63 | ShellScreenGrabber * | ||
1020 | 64 | shell_screen_grabber_new (void) | ||
1021 | 65 | { | ||
1022 | 66 | return g_object_new (SHELL_TYPE_SCREEN_GRABBER, NULL); | ||
1023 | 67 | } | ||
1024 | 68 | |||
1025 | 69 | /** | ||
1026 | 70 | * shell_screen_grabber_grab: | ||
1027 | 71 | * x: X coordinate of the rectangle to grab | ||
1028 | 72 | * y: Y coordinate of the rectangle to grab | ||
1029 | 73 | * width: width of the rectangle to grab | ||
1030 | 74 | * height: heigth of the rectangle to grab | ||
1031 | 75 | * | ||
1032 | 76 | * Grabs pixel data from a portion of the screen. | ||
1033 | 77 | * | ||
1034 | 78 | * Return value: buffer holding the grabbed data. The data is stored as 32-bit | ||
1035 | 79 | * words with native-endian xRGB pixels (i.e., the same as CAIRO_FORMAT_RGB24) | ||
1036 | 80 | * with no padding on the rows. So, the size of the buffer is width * height * 4 | ||
1037 | 81 | * bytes. Free with g_free(). | ||
1038 | 82 | **/ | ||
1039 | 83 | guchar * | ||
1040 | 84 | shell_screen_grabber_grab (ShellScreenGrabber *grabber, | ||
1041 | 85 | int x, | ||
1042 | 86 | int y, | ||
1043 | 87 | int width, | ||
1044 | 88 | int height) | ||
1045 | 89 | { | ||
1046 | 90 | guchar *data; | ||
1047 | 91 | gsize row_bytes; | ||
1048 | 92 | gsize data_size; | ||
1049 | 93 | |||
1050 | 94 | row_bytes = width * 4; | ||
1051 | 95 | data_size = row_bytes * height; | ||
1052 | 96 | data = g_malloc (data_size); | ||
1053 | 97 | |||
1054 | 98 | if (grabber->have_pixel_buffers == -1) | ||
1055 | 99 | { | ||
1056 | 100 | const GLubyte* extensions = glGetString (GL_EXTENSIONS); | ||
1057 | 101 | grabber->have_pixel_buffers = strstr ((const char *)extensions, "GL_EXT_pixel_buffer_object") != NULL; | ||
1058 | 102 | grabber->have_pack_invert = strstr ((const char *)extensions, "GL_MESA_pack_invert") != NULL; | ||
1059 | 103 | } | ||
1060 | 104 | |||
1061 | 105 | if (grabber->have_pixel_buffers) | ||
1062 | 106 | { | ||
1063 | 107 | GLubyte *mapped_data; | ||
1064 | 108 | GLint old_swap_bytes, old_lsb_first, old_row_length, old_skip_pixels, old_skip_rows, old_alignment; | ||
1065 | 109 | GLint old_pack_invert = GL_FALSE; | ||
1066 | 110 | GLint vp_size[4]; | ||
1067 | 111 | guchar *src_row, *dest_row; | ||
1068 | 112 | int i; | ||
1069 | 113 | |||
1070 | 114 | cogl_flush (); | ||
1071 | 115 | |||
1072 | 116 | if (pf_glBindBufferARB == NULL) | ||
1073 | 117 | { | ||
1074 | 118 | pf_glBindBufferARB = (PFNGLBINDBUFFERARBPROC) cogl_get_proc_address ("glBindBufferARB"); | ||
1075 | 119 | pf_glBufferDataARB = (PFNGLBUFFERDATAARBPROC) cogl_get_proc_address ("glBufferDataARB"); | ||
1076 | 120 | pf_glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC) cogl_get_proc_address ("glDeleteBuffersARB"); | ||
1077 | 121 | pf_glGenBuffersARB = (PFNGLGENBUFFERSARBPROC) cogl_get_proc_address ("glGenBuffersARB"); | ||
1078 | 122 | pf_glMapBufferARB = (PFNGLMAPBUFFERARBPROC) cogl_get_proc_address ("glMapBufferARB"); | ||
1079 | 123 | pf_glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC) cogl_get_proc_address ("glUnmapBufferARB"); | ||
1080 | 124 | } | ||
1081 | 125 | |||
1082 | 126 | glGetIntegerv (GL_PACK_SWAP_BYTES, &old_swap_bytes); | ||
1083 | 127 | glGetIntegerv (GL_PACK_LSB_FIRST, &old_lsb_first); | ||
1084 | 128 | glGetIntegerv (GL_PACK_ROW_LENGTH, &old_row_length); | ||
1085 | 129 | glGetIntegerv (GL_PACK_SKIP_PIXELS, &old_skip_pixels); | ||
1086 | 130 | glGetIntegerv (GL_PACK_SKIP_ROWS, &old_skip_rows); | ||
1087 | 131 | glGetIntegerv (GL_PACK_ALIGNMENT, &old_alignment); | ||
1088 | 132 | |||
1089 | 133 | glPixelStorei (GL_PACK_SWAP_BYTES, GL_FALSE); | ||
1090 | 134 | glPixelStorei (GL_PACK_LSB_FIRST, GL_FALSE); | ||
1091 | 135 | glPixelStorei (GL_PACK_ROW_LENGTH, 0); | ||
1092 | 136 | glPixelStorei (GL_PACK_SKIP_PIXELS, 0); | ||
1093 | 137 | glPixelStorei (GL_PACK_SKIP_ROWS, 0); | ||
1094 | 138 | glPixelStorei (GL_PACK_ALIGNMENT, 1); | ||
1095 | 139 | |||
1096 | 140 | if (grabber->have_pack_invert) | ||
1097 | 141 | { | ||
1098 | 142 | glGetIntegerv (GL_PACK_INVERT_MESA, &old_pack_invert); | ||
1099 | 143 | glPixelStorei (GL_PACK_INVERT_MESA, GL_FALSE); | ||
1100 | 144 | } | ||
1101 | 145 | |||
1102 | 146 | if (grabber->pixel_buffer != 0 && | ||
1103 | 147 | (grabber->width != width || | ||
1104 | 148 | grabber->height != height)) | ||
1105 | 149 | { | ||
1106 | 150 | pf_glDeleteBuffersARB (1, &grabber->pixel_buffer); | ||
1107 | 151 | grabber->pixel_buffer = 0; | ||
1108 | 152 | } | ||
1109 | 153 | |||
1110 | 154 | if (grabber->pixel_buffer == 0) | ||
1111 | 155 | { | ||
1112 | 156 | pf_glGenBuffersARB (1, &grabber->pixel_buffer); | ||
1113 | 157 | |||
1114 | 158 | pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer); | ||
1115 | 159 | pf_glBufferDataARB (GL_PIXEL_PACK_BUFFER_ARB, data_size, 0, GL_STREAM_READ_ARB); | ||
1116 | 160 | |||
1117 | 161 | grabber->width = width; | ||
1118 | 162 | grabber->height = height; | ||
1119 | 163 | } | ||
1120 | 164 | else | ||
1121 | 165 | { | ||
1122 | 166 | pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer); | ||
1123 | 167 | } | ||
1124 | 168 | |||
1125 | 169 | /* In OpenGL, (x,y) specifies the bottom-left corner rather than the | ||
1126 | 170 | * top-left */ | ||
1127 | 171 | glGetIntegerv (GL_VIEWPORT, vp_size); | ||
1128 | 172 | y = vp_size[3] - (y + height); | ||
1129 | 173 | |||
1130 | 174 | /* the "big-endian" version actually works for both, but the litle-endian | ||
1131 | 175 | * version has been better tested with a range of drivers, so we'll | ||
1132 | 176 | * keep on using it on little-endian. | ||
1133 | 177 | */ | ||
1134 | 178 | #if G_BYTE_ORDER == G_LITTLE_ENDIAN | ||
1135 | 179 | glReadPixels (x, y, width, height, GL_BGRA, GL_UNSIGNED_BYTE, 0); | ||
1136 | 180 | #else | ||
1137 | 181 | glReadPixels (x, y, width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 0); | ||
1138 | 182 | #endif | ||
1139 | 183 | |||
1140 | 184 | mapped_data = pf_glMapBufferARB (GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB); | ||
1141 | 185 | |||
1142 | 186 | src_row = mapped_data + (height - 1) * row_bytes; | ||
1143 | 187 | dest_row = data; | ||
1144 | 188 | |||
1145 | 189 | for (i = 0; i < height; i++) | ||
1146 | 190 | { | ||
1147 | 191 | memcpy (dest_row, src_row, row_bytes); | ||
1148 | 192 | src_row -= row_bytes; | ||
1149 | 193 | dest_row += row_bytes; | ||
1150 | 194 | } | ||
1151 | 195 | |||
1152 | 196 | pf_glUnmapBufferARB (GL_PIXEL_PACK_BUFFER_ARB); | ||
1153 | 197 | pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, 0); | ||
1154 | 198 | |||
1155 | 199 | glPixelStorei (GL_PACK_SWAP_BYTES, old_swap_bytes); | ||
1156 | 200 | glPixelStorei (GL_PACK_LSB_FIRST, old_lsb_first); | ||
1157 | 201 | glPixelStorei (GL_PACK_ROW_LENGTH, old_row_length); | ||
1158 | 202 | glPixelStorei (GL_PACK_SKIP_PIXELS, old_skip_pixels); | ||
1159 | 203 | glPixelStorei (GL_PACK_SKIP_ROWS, old_skip_rows); | ||
1160 | 204 | glPixelStorei (GL_PACK_ALIGNMENT, old_alignment); | ||
1161 | 205 | |||
1162 | 206 | if (grabber->have_pack_invert) | ||
1163 | 207 | glPixelStorei (GL_PACK_INVERT_MESA, old_pack_invert); | ||
1164 | 208 | } | ||
1165 | 209 | else | ||
1166 | 210 | { | ||
1167 | 211 | cogl_read_pixels (x, y, | ||
1168 | 212 | width, height, | ||
1169 | 213 | COGL_READ_PIXELS_COLOR_BUFFER, | ||
1170 | 214 | CLUTTER_CAIRO_FORMAT_ARGB32, | ||
1171 | 215 | data); | ||
1172 | 216 | } | ||
1173 | 217 | |||
1174 | 218 | return data; | ||
1175 | 219 | } | ||
1176 | 220 | 0 | ||
1177 | === removed file '.pc/applied-patches' | |||
1178 | --- .pc/applied-patches 2012-11-26 15:57:51 +0000 | |||
1179 | +++ .pc/applied-patches 1970-01-01 00:00:00 +0000 | |||
1180 | @@ -1,5 +0,0 @@ | |||
1181 | 1 | 11-no-gettext.patch | ||
1182 | 2 | 14_make-GLX-optional.patch | ||
1183 | 3 | ubuntu-lightdm-user-switching.patch | ||
1184 | 4 | ubuntu_lock_on_suspend.patch | ||
1185 | 5 | git-set-ally-wm-theme.patch | ||
1186 | 6 | 0 | ||
1187 | === removed directory '.pc/git-set-ally-wm-theme.patch' | |||
1188 | === removed directory '.pc/git-set-ally-wm-theme.patch/js' | |||
1189 | === removed directory '.pc/git-set-ally-wm-theme.patch/js/ui' | |||
1190 | === removed directory '.pc/git-set-ally-wm-theme.patch/js/ui/status' | |||
1191 | === removed file '.pc/git-set-ally-wm-theme.patch/js/ui/status/accessibility.js' | |||
1192 | --- .pc/git-set-ally-wm-theme.patch/js/ui/status/accessibility.js 2012-11-26 15:57:51 +0000 | |||
1193 | +++ .pc/git-set-ally-wm-theme.patch/js/ui/status/accessibility.js 1970-01-01 00:00:00 +0000 | |||
1194 | @@ -1,163 +0,0 @@ | |||
1195 | 1 | // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||
1196 | 2 | |||
1197 | 3 | const Gio = imports.gi.Gio; | ||
1198 | 4 | const Lang = imports.lang; | ||
1199 | 5 | |||
1200 | 6 | const PanelMenu = imports.ui.panelMenu; | ||
1201 | 7 | const PopupMenu = imports.ui.popupMenu; | ||
1202 | 8 | |||
1203 | 9 | const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard'; | ||
1204 | 10 | const KEY_STICKY_KEYS_ENABLED = 'stickykeys-enable'; | ||
1205 | 11 | const KEY_BOUNCE_KEYS_ENABLED = 'bouncekeys-enable'; | ||
1206 | 12 | const KEY_SLOW_KEYS_ENABLED = 'slowkeys-enable'; | ||
1207 | 13 | const KEY_MOUSE_KEYS_ENABLED = 'mousekeys-enable'; | ||
1208 | 14 | |||
1209 | 15 | const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications'; | ||
1210 | 16 | |||
1211 | 17 | const DPI_LOW_REASONABLE_VALUE = 50; | ||
1212 | 18 | const DPI_HIGH_REASONABLE_VALUE = 500; | ||
1213 | 19 | |||
1214 | 20 | const DPI_FACTOR_LARGE = 1.25; | ||
1215 | 21 | const DPI_FACTOR_LARGER = 1.5; | ||
1216 | 22 | const DPI_FACTOR_LARGEST = 2.0; | ||
1217 | 23 | |||
1218 | 24 | const WM_SCHEMA = 'org.gnome.desktop.wm.preferences'; | ||
1219 | 25 | const KEY_VISUAL_BELL = 'visual-bell'; | ||
1220 | 26 | |||
1221 | 27 | const DESKTOP_INTERFACE_SCHEMA = 'org.gnome.desktop.interface'; | ||
1222 | 28 | const KEY_GTK_THEME = 'gtk-theme'; | ||
1223 | 29 | const KEY_ICON_THEME = 'icon-theme'; | ||
1224 | 30 | const KEY_TEXT_SCALING_FACTOR = 'text-scaling-factor'; | ||
1225 | 31 | |||
1226 | 32 | const HIGH_CONTRAST_THEME = 'HighContrast'; | ||
1227 | 33 | |||
1228 | 34 | const ATIndicator = new Lang.Class({ | ||
1229 | 35 | Name: 'ATIndicator', | ||
1230 | 36 | Extends: PanelMenu.SystemStatusButton, | ||
1231 | 37 | |||
1232 | 38 | _init: function() { | ||
1233 | 39 | this.parent('preferences-desktop-accessibility-symbolic', _("Accessibility")); | ||
1234 | 40 | |||
1235 | 41 | let highContrast = this._buildHCItem(); | ||
1236 | 42 | this.menu.addMenuItem(highContrast); | ||
1237 | 43 | |||
1238 | 44 | let magnifier = this._buildItem(_("Zoom"), APPLICATIONS_SCHEMA, | ||
1239 | 45 | 'screen-magnifier-enabled'); | ||
1240 | 46 | this.menu.addMenuItem(magnifier); | ||
1241 | 47 | |||
1242 | 48 | let textZoom = this._buildFontItem(); | ||
1243 | 49 | this.menu.addMenuItem(textZoom); | ||
1244 | 50 | |||
1245 | 51 | let screenReader = this._buildItem(_("Screen Reader"), APPLICATIONS_SCHEMA, | ||
1246 | 52 | 'screen-reader-enabled'); | ||
1247 | 53 | this.menu.addMenuItem(screenReader); | ||
1248 | 54 | |||
1249 | 55 | let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA, | ||
1250 | 56 | 'screen-keyboard-enabled'); | ||
1251 | 57 | this.menu.addMenuItem(screenKeyboard); | ||
1252 | 58 | |||
1253 | 59 | let visualBell = this._buildItem(_("Visual Alerts"), WM_SCHEMA, KEY_VISUAL_BELL); | ||
1254 | 60 | this.menu.addMenuItem(visualBell); | ||
1255 | 61 | |||
1256 | 62 | let stickyKeys = this._buildItem(_("Sticky Keys"), A11Y_SCHEMA, KEY_STICKY_KEYS_ENABLED); | ||
1257 | 63 | this.menu.addMenuItem(stickyKeys); | ||
1258 | 64 | |||
1259 | 65 | let slowKeys = this._buildItem(_("Slow Keys"), A11Y_SCHEMA, KEY_SLOW_KEYS_ENABLED); | ||
1260 | 66 | this.menu.addMenuItem(slowKeys); | ||
1261 | 67 | |||
1262 | 68 | let bounceKeys = this._buildItem(_("Bounce Keys"), A11Y_SCHEMA, KEY_BOUNCE_KEYS_ENABLED); | ||
1263 | 69 | this.menu.addMenuItem(bounceKeys); | ||
1264 | 70 | |||
1265 | 71 | let mouseKeys = this._buildItem(_("Mouse Keys"), A11Y_SCHEMA, KEY_MOUSE_KEYS_ENABLED); | ||
1266 | 72 | this.menu.addMenuItem(mouseKeys); | ||
1267 | 73 | |||
1268 | 74 | this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); | ||
1269 | 75 | this.menu.addSettingsAction(_("Universal Access Settings"), 'gnome-universal-access-panel.desktop'); | ||
1270 | 76 | }, | ||
1271 | 77 | |||
1272 | 78 | _buildItemExtended: function(string, initial_value, writable, on_set) { | ||
1273 | 79 | let widget = new PopupMenu.PopupSwitchMenuItem(string, initial_value); | ||
1274 | 80 | if (!writable) | ||
1275 | 81 | widget.actor.reactive = false; | ||
1276 | 82 | else | ||
1277 | 83 | widget.connect('toggled', function(item) { | ||
1278 | 84 | on_set(item.state); | ||
1279 | 85 | }); | ||
1280 | 86 | return widget; | ||
1281 | 87 | }, | ||
1282 | 88 | |||
1283 | 89 | _buildItem: function(string, schema, key) { | ||
1284 | 90 | let settings = new Gio.Settings({ schema: schema }); | ||
1285 | 91 | let widget = this._buildItemExtended(string, | ||
1286 | 92 | settings.get_boolean(key), | ||
1287 | 93 | settings.is_writable(key), | ||
1288 | 94 | function(enabled) { | ||
1289 | 95 | return settings.set_boolean(key, enabled); | ||
1290 | 96 | }); | ||
1291 | 97 | settings.connect('changed::'+key, function() { | ||
1292 | 98 | widget.setToggleState(settings.get_boolean(key)); | ||
1293 | 99 | }); | ||
1294 | 100 | return widget; | ||
1295 | 101 | }, | ||
1296 | 102 | |||
1297 | 103 | _buildHCItem: function() { | ||
1298 | 104 | let settings = new Gio.Settings({ schema: DESKTOP_INTERFACE_SCHEMA }); | ||
1299 | 105 | let gtkTheme = settings.get_string(KEY_GTK_THEME); | ||
1300 | 106 | let iconTheme = settings.get_string(KEY_ICON_THEME); | ||
1301 | 107 | let hasHC = (gtkTheme == HIGH_CONTRAST_THEME); | ||
1302 | 108 | let highContrast = this._buildItemExtended( | ||
1303 | 109 | _("High Contrast"), | ||
1304 | 110 | hasHC, | ||
1305 | 111 | settings.is_writable(KEY_GTK_THEME) && settings.is_writable(KEY_ICON_THEME), | ||
1306 | 112 | function (enabled) { | ||
1307 | 113 | if (enabled) { | ||
1308 | 114 | settings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME); | ||
1309 | 115 | settings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME); | ||
1310 | 116 | } else if(!hasHC) { | ||
1311 | 117 | settings.set_string(KEY_GTK_THEME, gtkTheme); | ||
1312 | 118 | settings.set_string(KEY_ICON_THEME, iconTheme); | ||
1313 | 119 | } else { | ||
1314 | 120 | settings.reset(KEY_GTK_THEME); | ||
1315 | 121 | settings.reset(KEY_ICON_THEME); | ||
1316 | 122 | } | ||
1317 | 123 | }); | ||
1318 | 124 | settings.connect('changed::' + KEY_GTK_THEME, function() { | ||
1319 | 125 | let value = settings.get_string(KEY_GTK_THEME); | ||
1320 | 126 | if (value == HIGH_CONTRAST_THEME) { | ||
1321 | 127 | highContrast.setToggleState(true); | ||
1322 | 128 | } else { | ||
1323 | 129 | highContrast.setToggleState(false); | ||
1324 | 130 | gtkTheme = value; | ||
1325 | 131 | } | ||
1326 | 132 | }); | ||
1327 | 133 | settings.connect('changed::' + KEY_ICON_THEME, function() { | ||
1328 | 134 | let value = settings.get_string(KEY_ICON_THEME); | ||
1329 | 135 | if (value != HIGH_CONTRAST_THEME) | ||
1330 | 136 | iconTheme = value; | ||
1331 | 137 | }); | ||
1332 | 138 | return highContrast; | ||
1333 | 139 | }, | ||
1334 | 140 | |||
1335 | 141 | _buildFontItem: function() { | ||
1336 | 142 | let settings = new Gio.Settings({ schema: DESKTOP_INTERFACE_SCHEMA }); | ||
1337 | 143 | |||
1338 | 144 | let factor = settings.get_double(KEY_TEXT_SCALING_FACTOR); | ||
1339 | 145 | let initial_setting = (factor > 1.0); | ||
1340 | 146 | let widget = this._buildItemExtended(_("Large Text"), | ||
1341 | 147 | initial_setting, | ||
1342 | 148 | settings.is_writable(KEY_TEXT_SCALING_FACTOR), | ||
1343 | 149 | function (enabled) { | ||
1344 | 150 | if (enabled) | ||
1345 | 151 | settings.set_double(KEY_TEXT_SCALING_FACTOR, | ||
1346 | 152 | DPI_FACTOR_LARGE); | ||
1347 | 153 | else | ||
1348 | 154 | settings.reset(KEY_TEXT_SCALING_FACTOR); | ||
1349 | 155 | }); | ||
1350 | 156 | settings.connect('changed::' + KEY_TEXT_SCALING_FACTOR, function() { | ||
1351 | 157 | let factor = settings.get_double(KEY_TEXT_SCALING_FACTOR); | ||
1352 | 158 | let active = (factor > 1.0); | ||
1353 | 159 | widget.setToggleState(active); | ||
1354 | 160 | }); | ||
1355 | 161 | return widget; | ||
1356 | 162 | } | ||
1357 | 163 | }); | ||
1358 | 164 | 0 | ||
1359 | === removed directory '.pc/ubuntu-lightdm-user-switching.patch' | |||
1360 | === removed directory '.pc/ubuntu-lightdm-user-switching.patch/js' | |||
1361 | === removed directory '.pc/ubuntu-lightdm-user-switching.patch/js/ui' | |||
1362 | === removed file '.pc/ubuntu-lightdm-user-switching.patch/js/ui/userMenu.js' | |||
1363 | --- .pc/ubuntu-lightdm-user-switching.patch/js/ui/userMenu.js 2012-11-26 15:57:51 +0000 | |||
1364 | +++ .pc/ubuntu-lightdm-user-switching.patch/js/ui/userMenu.js 1970-01-01 00:00:00 +0000 | |||
1365 | @@ -1,868 +0,0 @@ | |||
1366 | 1 | // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||
1367 | 2 | |||
1368 | 3 | const AccountsService = imports.gi.AccountsService; | ||
1369 | 4 | const Gdm = imports.gi.Gdm; | ||
1370 | 5 | const Gio = imports.gi.Gio; | ||
1371 | 6 | const GLib = imports.gi.GLib; | ||
1372 | 7 | const Lang = imports.lang; | ||
1373 | 8 | const Pango = imports.gi.Pango; | ||
1374 | 9 | const Shell = imports.gi.Shell; | ||
1375 | 10 | const St = imports.gi.St; | ||
1376 | 11 | const Tp = imports.gi.TelepathyGLib; | ||
1377 | 12 | const UPowerGlib = imports.gi.UPowerGlib; | ||
1378 | 13 | const Atk = imports.gi.Atk; | ||
1379 | 14 | |||
1380 | 15 | const BoxPointer = imports.ui.boxpointer; | ||
1381 | 16 | const GnomeSession = imports.misc.gnomeSession; | ||
1382 | 17 | const Main = imports.ui.main; | ||
1383 | 18 | const PanelMenu = imports.ui.panelMenu; | ||
1384 | 19 | const PopupMenu = imports.ui.popupMenu; | ||
1385 | 20 | const Params = imports.misc.params; | ||
1386 | 21 | const Util = imports.misc.util; | ||
1387 | 22 | |||
1388 | 23 | const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown'; | ||
1389 | 24 | const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver'; | ||
1390 | 25 | const DISABLE_USER_SWITCH_KEY = 'disable-user-switching'; | ||
1391 | 26 | const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen'; | ||
1392 | 27 | const DISABLE_LOG_OUT_KEY = 'disable-log-out'; | ||
1393 | 28 | const LOCK_ENABLED_KEY = 'lock-enabled'; | ||
1394 | 29 | const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out'; | ||
1395 | 30 | |||
1396 | 31 | const DIALOG_ICON_SIZE = 64; | ||
1397 | 32 | |||
1398 | 33 | const IMStatus = { | ||
1399 | 34 | AVAILABLE: 0, | ||
1400 | 35 | BUSY: 1, | ||
1401 | 36 | HIDDEN: 2, | ||
1402 | 37 | AWAY: 3, | ||
1403 | 38 | IDLE: 4, | ||
1404 | 39 | OFFLINE: 5, | ||
1405 | 40 | LAST: 6 | ||
1406 | 41 | }; | ||
1407 | 42 | |||
1408 | 43 | // Adapted from gdm/gui/user-switch-applet/applet.c | ||
1409 | 44 | // | ||
1410 | 45 | // Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>. | ||
1411 | 46 | // Copyright (C) 2008,2009 Red Hat, Inc. | ||
1412 | 47 | |||
1413 | 48 | const UserAvatarWidget = new Lang.Class({ | ||
1414 | 49 | Name: 'UserAvatarWidget', | ||
1415 | 50 | |||
1416 | 51 | _init: function(user, params) { | ||
1417 | 52 | this._user = user; | ||
1418 | 53 | params = Params.parse(params, { reactive: false, | ||
1419 | 54 | iconSize: DIALOG_ICON_SIZE, | ||
1420 | 55 | styleClass: 'status-chooser-user-icon' }); | ||
1421 | 56 | this._iconSize = params.iconSize; | ||
1422 | 57 | |||
1423 | 58 | this.actor = new St.Bin({ style_class: params.styleClass, | ||
1424 | 59 | track_hover: params.reactive, | ||
1425 | 60 | reactive: params.reactive }); | ||
1426 | 61 | }, | ||
1427 | 62 | |||
1428 | 63 | setSensitive: function(sensitive) { | ||
1429 | 64 | this.actor.can_focus = sensitive; | ||
1430 | 65 | this.actor.reactive = sensitive; | ||
1431 | 66 | }, | ||
1432 | 67 | |||
1433 | 68 | update: function() { | ||
1434 | 69 | let iconFile = this._user.get_icon_file(); | ||
1435 | 70 | if (!GLib.file_test(iconFile, GLib.FileTest.EXISTS)) | ||
1436 | 71 | iconFile = null; | ||
1437 | 72 | |||
1438 | 73 | if (iconFile) { | ||
1439 | 74 | let file = Gio.File.new_for_path(iconFile); | ||
1440 | 75 | this.actor.child = null; | ||
1441 | 76 | this.actor.style = 'background-image: url("%s");'.format(iconFile); | ||
1442 | 77 | |||
1443 | 78 | // AccountsService uses a fixed location for avatar images, so | ||
1444 | 79 | // we need to clear out all cached data to pick up image changes, | ||
1445 | 80 | // see https://bugzilla.gnome.org/show_bug.cgi?id=679268 | ||
1446 | 81 | this.actor.clear_background_image(); | ||
1447 | 82 | } else { | ||
1448 | 83 | this.actor.style = null; | ||
1449 | 84 | this.actor.child = new St.Icon({ icon_name: 'avatar-default-symbolic', | ||
1450 | 85 | icon_size: this._iconSize }); | ||
1451 | 86 | } | ||
1452 | 87 | } | ||
1453 | 88 | }); | ||
1454 | 89 | |||
1455 | 90 | const IMStatusItem = new Lang.Class({ | ||
1456 | 91 | Name: 'IMStatusItem', | ||
1457 | 92 | Extends: PopupMenu.PopupBaseMenuItem, | ||
1458 | 93 | |||
1459 | 94 | _init: function(label, iconName) { | ||
1460 | 95 | this.parent(); | ||
1461 | 96 | |||
1462 | 97 | this.actor.add_style_class_name('status-chooser-status-item'); | ||
1463 | 98 | |||
1464 | 99 | this._icon = new St.Icon({ style_class: 'popup-menu-icon' }); | ||
1465 | 100 | this.addActor(this._icon); | ||
1466 | 101 | |||
1467 | 102 | if (iconName) | ||
1468 | 103 | this._icon.icon_name = iconName; | ||
1469 | 104 | |||
1470 | 105 | this.label = new St.Label({ text: label }); | ||
1471 | 106 | this.actor.label_actor = this.label; | ||
1472 | 107 | this.addActor(this.label); | ||
1473 | 108 | } | ||
1474 | 109 | }); | ||
1475 | 110 | |||
1476 | 111 | const IMUserNameItem = new Lang.Class({ | ||
1477 | 112 | Name: 'IMUserNameItem', | ||
1478 | 113 | Extends: PopupMenu.PopupBaseMenuItem, | ||
1479 | 114 | |||
1480 | 115 | _init: function() { | ||
1481 | 116 | this.parent({ reactive: false, | ||
1482 | 117 | can_focus: false, | ||
1483 | 118 | style_class: 'status-chooser-user-name' }); | ||
1484 | 119 | |||
1485 | 120 | this._wrapper = new Shell.GenericContainer(); | ||
1486 | 121 | this._wrapper.connect('get-preferred-width', | ||
1487 | 122 | Lang.bind(this, this._wrapperGetPreferredWidth)); | ||
1488 | 123 | this._wrapper.connect('get-preferred-height', | ||
1489 | 124 | Lang.bind(this, this._wrapperGetPreferredHeight)); | ||
1490 | 125 | this._wrapper.connect('allocate', | ||
1491 | 126 | Lang.bind(this, this._wrapperAllocate)); | ||
1492 | 127 | this.addActor(this._wrapper, { expand: true, span: -1 }); | ||
1493 | 128 | |||
1494 | 129 | this.label = new St.Label(); | ||
1495 | 130 | this.label.clutter_text.set_line_wrap(true); | ||
1496 | 131 | this.label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE); | ||
1497 | 132 | this._wrapper.add_actor(this.label); | ||
1498 | 133 | }, | ||
1499 | 134 | |||
1500 | 135 | _wrapperGetPreferredWidth: function(actor, forHeight, alloc) { | ||
1501 | 136 | alloc.min_size = 1; | ||
1502 | 137 | alloc.natural_size = 1; | ||
1503 | 138 | }, | ||
1504 | 139 | |||
1505 | 140 | _wrapperGetPreferredHeight: function(actor, forWidth, alloc) { | ||
1506 | 141 | [alloc.min_size, alloc.natural_size] = this.label.get_preferred_height(forWidth); | ||
1507 | 142 | }, | ||
1508 | 143 | |||
1509 | 144 | _wrapperAllocate: function(actor, box, flags) { | ||
1510 | 145 | this.label.allocate(box, flags); | ||
1511 | 146 | } | ||
1512 | 147 | }); | ||
1513 | 148 | |||
1514 | 149 | const IMStatusChooserItem = new Lang.Class({ | ||
1515 | 150 | Name: 'IMStatusChooserItem', | ||
1516 | 151 | Extends: PopupMenu.PopupBaseMenuItem, | ||
1517 | 152 | |||
1518 | 153 | _init: function() { | ||
1519 | 154 | this.parent({ reactive: false, | ||
1520 | 155 | can_focus: false, | ||
1521 | 156 | style_class: 'status-chooser' }); | ||
1522 | 157 | |||
1523 | 158 | this._userManager = AccountsService.UserManager.get_default(); | ||
1524 | 159 | this._user = this._userManager.get_user(GLib.get_user_name()); | ||
1525 | 160 | |||
1526 | 161 | this._avatar = new UserAvatarWidget(this._user, { reactive: true }); | ||
1527 | 162 | this._iconBin = new St.Button({ child: this._avatar.actor }); | ||
1528 | 163 | this.addActor(this._iconBin); | ||
1529 | 164 | |||
1530 | 165 | this._iconBin.connect('clicked', Lang.bind(this, | ||
1531 | 166 | function() { | ||
1532 | 167 | this.activate(); | ||
1533 | 168 | })); | ||
1534 | 169 | |||
1535 | 170 | this._section = new PopupMenu.PopupMenuSection(); | ||
1536 | 171 | this.addActor(this._section.actor); | ||
1537 | 172 | |||
1538 | 173 | this._name = new IMUserNameItem(); | ||
1539 | 174 | this._section.addMenuItem(this._name); | ||
1540 | 175 | |||
1541 | 176 | this._combo = new PopupMenu.PopupComboBoxMenuItem({ style_class: 'status-chooser-combo' }); | ||
1542 | 177 | this._section.addMenuItem(this._combo); | ||
1543 | 178 | |||
1544 | 179 | let item; | ||
1545 | 180 | |||
1546 | 181 | item = new IMStatusItem(_("Available"), 'user-available-symbolic'); | ||
1547 | 182 | this._combo.addMenuItem(item, IMStatus.AVAILABLE); | ||
1548 | 183 | |||
1549 | 184 | item = new IMStatusItem(_("Busy"), 'user-busy-symbolic'); | ||
1550 | 185 | this._combo.addMenuItem(item, IMStatus.BUSY); | ||
1551 | 186 | |||
1552 | 187 | item = new IMStatusItem(_("Invisible"), 'user-invisible-symbolic'); | ||
1553 | 188 | this._combo.addMenuItem(item, IMStatus.HIDDEN); | ||
1554 | 189 | |||
1555 | 190 | item = new IMStatusItem(_("Away"), 'user-away-symbolic'); | ||
1556 | 191 | this._combo.addMenuItem(item, IMStatus.AWAY); | ||
1557 | 192 | |||
1558 | 193 | item = new IMStatusItem(_("Idle"), 'user-idle-symbolic'); | ||
1559 | 194 | this._combo.addMenuItem(item, IMStatus.IDLE); | ||
1560 | 195 | |||
1561 | 196 | item = new IMStatusItem(_("Unavailable"), 'user-offline-symbolic'); | ||
1562 | 197 | this._combo.addMenuItem(item, IMStatus.OFFLINE); | ||
1563 | 198 | |||
1564 | 199 | this._combo.connect('active-item-changed', | ||
1565 | 200 | Lang.bind(this, this._changeIMStatus)); | ||
1566 | 201 | |||
1567 | 202 | this._presence = new GnomeSession.Presence(); | ||
1568 | 203 | this._presence.connectSignal('StatusChanged', Lang.bind(this, function(proxy, senderName, [status]) { | ||
1569 | 204 | this._sessionStatusChanged(status); | ||
1570 | 205 | })); | ||
1571 | 206 | |||
1572 | 207 | this._sessionPresenceRestored = false; | ||
1573 | 208 | this._imPresenceRestored = false; | ||
1574 | 209 | this._currentPresence = undefined; | ||
1575 | 210 | |||
1576 | 211 | this._accountMgr = Tp.AccountManager.dup(); | ||
1577 | 212 | this._accountMgr.connect('most-available-presence-changed', | ||
1578 | 213 | Lang.bind(this, this._IMStatusChanged)); | ||
1579 | 214 | this._accountMgr.connect('account-enabled', | ||
1580 | 215 | Lang.bind(this, this._IMAccountsChanged)); | ||
1581 | 216 | this._accountMgr.connect('account-disabled', | ||
1582 | 217 | Lang.bind(this, this._IMAccountsChanged)); | ||
1583 | 218 | this._accountMgr.connect('account-removed', | ||
1584 | 219 | Lang.bind(this, this._IMAccountsChanged)); | ||
1585 | 220 | this._accountMgr.connect('account-validity-changed', | ||
1586 | 221 | Lang.bind(this, this._IMAccountsChanged)); | ||
1587 | 222 | this._accountMgr.prepare_async(null, Lang.bind(this, | ||
1588 | 223 | function(mgr) { | ||
1589 | 224 | this._IMAccountsChanged(mgr); | ||
1590 | 225 | |||
1591 | 226 | if (this._networkMonitor.network_available) | ||
1592 | 227 | this._restorePresence(); | ||
1593 | 228 | else | ||
1594 | 229 | this._setComboboxPresence(Tp.ConnectionPresenceType.OFFLINE); | ||
1595 | 230 | })); | ||
1596 | 231 | |||
1597 | 232 | this._networkMonitor = Gio.NetworkMonitor.get_default(); | ||
1598 | 233 | this._networkMonitor.connect('network-changed', | ||
1599 | 234 | Lang.bind(this, function(monitor, available) { | ||
1600 | 235 | this._IMAccountsChanged(this._accountMgr); | ||
1601 | 236 | |||
1602 | 237 | if (available && !this._imPresenceRestored) | ||
1603 | 238 | this._restorePresence(); | ||
1604 | 239 | })); | ||
1605 | 240 | |||
1606 | 241 | this._userLoadedId = this._user.connect('notify::is-loaded', | ||
1607 | 242 | Lang.bind(this, | ||
1608 | 243 | this._updateUser)); | ||
1609 | 244 | this._userChangedId = this._user.connect('changed', | ||
1610 | 245 | Lang.bind(this, | ||
1611 | 246 | this._updateUser)); | ||
1612 | 247 | this.actor.connect('notify::mapped', Lang.bind(this, function() { | ||
1613 | 248 | if (this.actor.mapped) | ||
1614 | 249 | this._updateUser(); | ||
1615 | 250 | })); | ||
1616 | 251 | |||
1617 | 252 | this.connect('sensitive-changed', function(sensitive) { | ||
1618 | 253 | this._avatar.setSensitive(sensitive); | ||
1619 | 254 | }); | ||
1620 | 255 | }, | ||
1621 | 256 | |||
1622 | 257 | _restorePresence: function() { | ||
1623 | 258 | let [presence, status, msg] = this._accountMgr.get_most_available_presence(); | ||
1624 | 259 | |||
1625 | 260 | let savedPresence = global.settings.get_int('saved-im-presence'); | ||
1626 | 261 | |||
1627 | 262 | if (savedPresence == presence) { | ||
1628 | 263 | this._IMStatusChanged(this._accountMgr, presence, status, msg); | ||
1629 | 264 | } else { | ||
1630 | 265 | this._setComboboxPresence(savedPresence); | ||
1631 | 266 | status = this._statusForPresence(savedPresence); | ||
1632 | 267 | msg = msg ? msg : ''; | ||
1633 | 268 | this._accountMgr.set_all_requested_presences(savedPresence, status, msg); | ||
1634 | 269 | } | ||
1635 | 270 | }, | ||
1636 | 271 | |||
1637 | 272 | destroy: function() { | ||
1638 | 273 | // clean up signal handlers | ||
1639 | 274 | if (this._userLoadedId != 0) { | ||
1640 | 275 | this._user.disconnect(this._userLoadedId); | ||
1641 | 276 | this._userLoadedId = 0; | ||
1642 | 277 | } | ||
1643 | 278 | |||
1644 | 279 | if (this._userChangedId != 0) { | ||
1645 | 280 | this._user.disconnect(this._userChangedId); | ||
1646 | 281 | this._userChangedId = 0; | ||
1647 | 282 | } | ||
1648 | 283 | |||
1649 | 284 | this.parent(); | ||
1650 | 285 | }, | ||
1651 | 286 | |||
1652 | 287 | // Override getColumnWidths()/setColumnWidths() to make the item | ||
1653 | 288 | // independent from the overall column layout of the menu | ||
1654 | 289 | getColumnWidths: function() { | ||
1655 | 290 | return []; | ||
1656 | 291 | }, | ||
1657 | 292 | |||
1658 | 293 | setColumnWidths: function(widths) { | ||
1659 | 294 | }, | ||
1660 | 295 | |||
1661 | 296 | _updateUser: function() { | ||
1662 | 297 | if (this._user.is_loaded) | ||
1663 | 298 | this._name.label.set_text(this._user.get_real_name()); | ||
1664 | 299 | else | ||
1665 | 300 | this._name.label.set_text(""); | ||
1666 | 301 | |||
1667 | 302 | this._avatar.update(); | ||
1668 | 303 | }, | ||
1669 | 304 | |||
1670 | 305 | _statusForPresence: function(presence) { | ||
1671 | 306 | switch(presence) { | ||
1672 | 307 | case Tp.ConnectionPresenceType.AVAILABLE: | ||
1673 | 308 | return 'available'; | ||
1674 | 309 | case Tp.ConnectionPresenceType.BUSY: | ||
1675 | 310 | return 'busy'; | ||
1676 | 311 | case Tp.ConnectionPresenceType.OFFLINE: | ||
1677 | 312 | return 'offline'; | ||
1678 | 313 | case Tp.ConnectionPresenceType.HIDDEN: | ||
1679 | 314 | return 'hidden'; | ||
1680 | 315 | case Tp.ConnectionPresenceType.AWAY: | ||
1681 | 316 | return 'away'; | ||
1682 | 317 | case Tp.ConnectionPresenceType.EXTENDED_AWAY: | ||
1683 | 318 | return 'xa'; | ||
1684 | 319 | default: | ||
1685 | 320 | return 'unknown'; | ||
1686 | 321 | } | ||
1687 | 322 | }, | ||
1688 | 323 | |||
1689 | 324 | _IMAccountsChanged: function(mgr) { | ||
1690 | 325 | let accounts = mgr.get_valid_accounts().filter(function(account) { | ||
1691 | 326 | return account.enabled; | ||
1692 | 327 | }); | ||
1693 | 328 | let sensitive = accounts.length > 0 && this._networkMonitor.network_available; | ||
1694 | 329 | this._combo.setSensitive(sensitive); | ||
1695 | 330 | }, | ||
1696 | 331 | |||
1697 | 332 | _IMStatusChanged: function(accountMgr, presence, status, message) { | ||
1698 | 333 | if (!this._imPresenceRestored) | ||
1699 | 334 | this._imPresenceRestored = true; | ||
1700 | 335 | |||
1701 | 336 | if (presence == this._currentPresence) | ||
1702 | 337 | return; | ||
1703 | 338 | |||
1704 | 339 | this._currentPresence = presence; | ||
1705 | 340 | this._setComboboxPresence(presence); | ||
1706 | 341 | |||
1707 | 342 | if (!this._sessionPresenceRestored) { | ||
1708 | 343 | this._sessionStatusChanged(this._presence.status); | ||
1709 | 344 | return; | ||
1710 | 345 | } | ||
1711 | 346 | |||
1712 | 347 | if (presence == Tp.ConnectionPresenceType.AVAILABLE) | ||
1713 | 348 | this._presence.status = GnomeSession.PresenceStatus.AVAILABLE; | ||
1714 | 349 | |||
1715 | 350 | // We ignore the actual value of _expectedPresence and never safe | ||
1716 | 351 | // the first presence change after an "automatic" change, assuming | ||
1717 | 352 | // that it is the response to our request; this is to account for | ||
1718 | 353 | // mission control falling back to "similar" presences if an account | ||
1719 | 354 | // type does not implement the requested presence. | ||
1720 | 355 | if (!this._expectedPresence) | ||
1721 | 356 | global.settings.set_int('saved-im-presence', presence); | ||
1722 | 357 | else | ||
1723 | 358 | this._expectedPresence = undefined; | ||
1724 | 359 | }, | ||
1725 | 360 | |||
1726 | 361 | _setComboboxPresence: function(presence) { | ||
1727 | 362 | let activatedItem; | ||
1728 | 363 | |||
1729 | 364 | if (presence == Tp.ConnectionPresenceType.AVAILABLE) | ||
1730 | 365 | activatedItem = IMStatus.AVAILABLE; | ||
1731 | 366 | else if (presence == Tp.ConnectionPresenceType.BUSY) | ||
1732 | 367 | activatedItem = IMStatus.BUSY; | ||
1733 | 368 | else if (presence == Tp.ConnectionPresenceType.HIDDEN) | ||
1734 | 369 | activatedItem = IMStatus.HIDDEN; | ||
1735 | 370 | else if (presence == Tp.ConnectionPresenceType.AWAY) | ||
1736 | 371 | activatedItem = IMStatus.AWAY; | ||
1737 | 372 | else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY) | ||
1738 | 373 | activatedItem = IMStatus.IDLE; | ||
1739 | 374 | else | ||
1740 | 375 | activatedItem = IMStatus.OFFLINE; | ||
1741 | 376 | |||
1742 | 377 | this._combo.setActiveItem(activatedItem); | ||
1743 | 378 | for (let i = 0; i < IMStatus.LAST; i++) { | ||
1744 | 379 | if (i == IMStatus.AVAILABLE || i == IMStatus.OFFLINE) | ||
1745 | 380 | continue; // always visible | ||
1746 | 381 | |||
1747 | 382 | this._combo.setItemVisible(i, i == activatedItem); | ||
1748 | 383 | } | ||
1749 | 384 | }, | ||
1750 | 385 | |||
1751 | 386 | _changeIMStatus: function(menuItem, id) { | ||
1752 | 387 | let [presence, s, msg] = this._accountMgr.get_most_available_presence(); | ||
1753 | 388 | let newPresence, status; | ||
1754 | 389 | |||
1755 | 390 | if (id == IMStatus.AVAILABLE) { | ||
1756 | 391 | newPresence = Tp.ConnectionPresenceType.AVAILABLE; | ||
1757 | 392 | } else if (id == IMStatus.OFFLINE) { | ||
1758 | 393 | newPresence = Tp.ConnectionPresenceType.OFFLINE; | ||
1759 | 394 | } else | ||
1760 | 395 | return; | ||
1761 | 396 | |||
1762 | 397 | status = this._statusForPresence(newPresence); | ||
1763 | 398 | msg = msg ? msg : ''; | ||
1764 | 399 | this._accountMgr.set_all_requested_presences(newPresence, status, msg); | ||
1765 | 400 | }, | ||
1766 | 401 | |||
1767 | 402 | getIMPresenceForSessionStatus: function(sessionStatus) { | ||
1768 | 403 | // Restore the last user-set presence when coming back from | ||
1769 | 404 | // BUSY/IDLE (otherwise the last user-set presence matches | ||
1770 | 405 | // the current one) | ||
1771 | 406 | if (sessionStatus == GnomeSession.PresenceStatus.AVAILABLE) | ||
1772 | 407 | return global.settings.get_int('saved-im-presence'); | ||
1773 | 408 | |||
1774 | 409 | if (sessionStatus == GnomeSession.PresenceStatus.BUSY) { | ||
1775 | 410 | // Only change presence if the current one is "more present" than | ||
1776 | 411 | // busy, or if coming back from idle | ||
1777 | 412 | if (this._currentPresence == Tp.ConnectionPresenceType.AVAILABLE || | ||
1778 | 413 | this._currentPresence == Tp.ConnectionPresenceType.EXTENDED_AWAY) | ||
1779 | 414 | return Tp.ConnectionPresenceType.BUSY; | ||
1780 | 415 | } | ||
1781 | 416 | |||
1782 | 417 | if (sessionStatus == GnomeSession.PresenceStatus.IDLE) { | ||
1783 | 418 | // Only change presence if the current one is "more present" than | ||
1784 | 419 | // idle | ||
1785 | 420 | if (this._currentPresence != Tp.ConnectionPresenceType.OFFLINE && | ||
1786 | 421 | this._currentPresence != Tp.ConnectionPresenceType.HIDDEN) | ||
1787 | 422 | return Tp.ConnectionPresenceType.EXTENDED_AWAY; | ||
1788 | 423 | } | ||
1789 | 424 | |||
1790 | 425 | return this._currentPresence; | ||
1791 | 426 | }, | ||
1792 | 427 | |||
1793 | 428 | _sessionStatusChanged: function(sessionStatus) { | ||
1794 | 429 | if (!this._imPresenceRestored) | ||
1795 | 430 | return; | ||
1796 | 431 | |||
1797 | 432 | let savedStatus = global.settings.get_int('saved-session-presence'); | ||
1798 | 433 | if (!this._sessionPresenceRestored) { | ||
1799 | 434 | |||
1800 | 435 | // We should never save/restore a status other than AVAILABLE | ||
1801 | 436 | // or BUSY | ||
1802 | 437 | if (savedStatus != GnomeSession.PresenceStatus.AVAILABLE && | ||
1803 | 438 | savedStatus != GnomeSession.PresenceStatus.BUSY) | ||
1804 | 439 | savedStatus = GnomeSession.PresenceStatus.AVAILABLE; | ||
1805 | 440 | |||
1806 | 441 | if (sessionStatus != savedStatus) { | ||
1807 | 442 | this._presence.status = savedStatus; | ||
1808 | 443 | return; | ||
1809 | 444 | } | ||
1810 | 445 | this._sessionPresenceRestored = true; | ||
1811 | 446 | } | ||
1812 | 447 | |||
1813 | 448 | if ((sessionStatus == GnomeSession.PresenceStatus.AVAILABLE || | ||
1814 | 449 | sessionStatus == GnomeSession.PresenceStatus.BUSY) && | ||
1815 | 450 | savedStatus != sessionStatus) | ||
1816 | 451 | global.settings.set_int('saved-session-presence', sessionStatus); | ||
1817 | 452 | |||
1818 | 453 | let [presence, s, msg] = this._accountMgr.get_most_available_presence(); | ||
1819 | 454 | let newPresence, status; | ||
1820 | 455 | |||
1821 | 456 | let newPresence = this.getIMPresenceForSessionStatus(sessionStatus); | ||
1822 | 457 | |||
1823 | 458 | if (!newPresence || newPresence == presence) | ||
1824 | 459 | return; | ||
1825 | 460 | |||
1826 | 461 | status = this._statusForPresence(newPresence); | ||
1827 | 462 | msg = msg ? msg : ''; | ||
1828 | 463 | |||
1829 | 464 | this._expectedPresence = newPresence; | ||
1830 | 465 | this._accountMgr.set_all_requested_presences(newPresence, status, msg); | ||
1831 | 466 | } | ||
1832 | 467 | }); | ||
1833 | 468 | |||
1834 | 469 | |||
1835 | 470 | const UserMenuButton = new Lang.Class({ | ||
1836 | 471 | Name: 'UserMenuButton', | ||
1837 | 472 | Extends: PanelMenu.Button, | ||
1838 | 473 | |||
1839 | 474 | _init: function() { | ||
1840 | 475 | this.parent(0.0); | ||
1841 | 476 | |||
1842 | 477 | this.actor.accessible_role = Atk.Role.MENU; | ||
1843 | 478 | |||
1844 | 479 | let box = new St.BoxLayout({ name: 'panelUserMenu' }); | ||
1845 | 480 | this.actor.add_actor(box); | ||
1846 | 481 | |||
1847 | 482 | this._screenSaverSettings = new Gio.Settings({ schema: SCREENSAVER_SCHEMA }); | ||
1848 | 483 | this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA }); | ||
1849 | 484 | |||
1850 | 485 | this._userManager = AccountsService.UserManager.get_default(); | ||
1851 | 486 | |||
1852 | 487 | this._user = this._userManager.get_user(GLib.get_user_name()); | ||
1853 | 488 | this._presence = new GnomeSession.Presence(); | ||
1854 | 489 | this._session = new GnomeSession.SessionManager(); | ||
1855 | 490 | this._haveShutdown = true; | ||
1856 | 491 | |||
1857 | 492 | this._accountMgr = Tp.AccountManager.dup(); | ||
1858 | 493 | |||
1859 | 494 | this._upClient = new UPowerGlib.Client(); | ||
1860 | 495 | this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); | ||
1861 | 496 | |||
1862 | 497 | this._iconBox = new St.Bin(); | ||
1863 | 498 | box.add(this._iconBox, { y_align: St.Align.MIDDLE, y_fill: false }); | ||
1864 | 499 | |||
1865 | 500 | let textureCache = St.TextureCache.get_default(); | ||
1866 | 501 | this._offlineIcon = new St.Icon({ icon_name: 'user-offline-symbolic', | ||
1867 | 502 | style_class: 'popup-menu-icon' }); | ||
1868 | 503 | this._availableIcon = new St.Icon({ icon_name: 'user-available-symbolic', | ||
1869 | 504 | style_class: 'popup-menu-icon' }); | ||
1870 | 505 | this._busyIcon = new St.Icon({ icon_name: 'user-busy-symbolic', | ||
1871 | 506 | style_class: 'popup-menu-icon' }); | ||
1872 | 507 | this._invisibleIcon = new St.Icon({ icon_name: 'user-invisible-symbolic', | ||
1873 | 508 | style_class: 'popup-menu-icon' }); | ||
1874 | 509 | this._awayIcon = new St.Icon({ icon_name: 'user-away-symbolic', | ||
1875 | 510 | style_class: 'popup-menu-icon' }); | ||
1876 | 511 | this._idleIcon = new St.Icon({ icon_name: 'user-idle-symbolic', | ||
1877 | 512 | style_class: 'popup-menu-icon' }); | ||
1878 | 513 | this._pendingIcon = new St.Icon({ icon_name: 'user-status-pending-symbolic', | ||
1879 | 514 | style_class: 'popup-menu-icon' }); | ||
1880 | 515 | this._lockedIcon = new St.Icon({ icon_name: 'changes-prevent-symbolic', | ||
1881 | 516 | style_class: 'popup-menu-icon' }); | ||
1882 | 517 | |||
1883 | 518 | this._accountMgr.connect('most-available-presence-changed', | ||
1884 | 519 | Lang.bind(this, this._updatePresenceIcon)); | ||
1885 | 520 | this._accountMgr.connect('account-enabled', | ||
1886 | 521 | Lang.bind(this, this._onAccountEnabled)); | ||
1887 | 522 | this._accountMgr.connect('account-removed', | ||
1888 | 523 | Lang.bind(this, this._onAccountRemoved)); | ||
1889 | 524 | this._accountMgr.prepare_async(null, Lang.bind(this, | ||
1890 | 525 | function(mgr) { | ||
1891 | 526 | let [presence, s, msg] = mgr.get_most_available_presence(); | ||
1892 | 527 | this._updatePresenceIcon(mgr, presence, s, msg); | ||
1893 | 528 | this._setupAccounts(); | ||
1894 | 529 | })); | ||
1895 | 530 | |||
1896 | 531 | this._name = new St.Label(); | ||
1897 | 532 | this.actor.label_actor = this._name; | ||
1898 | 533 | box.add(this._name, { y_align: St.Align.MIDDLE, y_fill: false }); | ||
1899 | 534 | this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName)); | ||
1900 | 535 | this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName)); | ||
1901 | 536 | this._updateUserName(); | ||
1902 | 537 | |||
1903 | 538 | this._createSubMenu(); | ||
1904 | 539 | |||
1905 | 540 | this._updateSwitch(this._presence.status); | ||
1906 | 541 | this._presence.connectSignal('StatusChanged', Lang.bind(this, function (proxy, senderName, [status]) { | ||
1907 | 542 | this._updateSwitch(status); | ||
1908 | 543 | })); | ||
1909 | 544 | |||
1910 | 545 | this._userManager.connect('notify::is-loaded', | ||
1911 | 546 | Lang.bind(this, this._updateMultiUser)); | ||
1912 | 547 | this._userManager.connect('notify::has-multiple-users', | ||
1913 | 548 | Lang.bind(this, this._updateMultiUser)); | ||
1914 | 549 | this._userManager.connect('user-added', | ||
1915 | 550 | Lang.bind(this, this._updateMultiUser)); | ||
1916 | 551 | this._userManager.connect('user-removed', | ||
1917 | 552 | Lang.bind(this, this._updateMultiUser)); | ||
1918 | 553 | this._lockdownSettings.connect('changed::' + DISABLE_USER_SWITCH_KEY, | ||
1919 | 554 | Lang.bind(this, this._updateSwitchUser)); | ||
1920 | 555 | this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY, | ||
1921 | 556 | Lang.bind(this, this._updateLogout)); | ||
1922 | 557 | |||
1923 | 558 | this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY, | ||
1924 | 559 | Lang.bind(this, this._updateLockScreen)); | ||
1925 | 560 | this._updateSwitchUser(); | ||
1926 | 561 | this._updateLogout(); | ||
1927 | 562 | this._updateLockScreen(); | ||
1928 | 563 | |||
1929 | 564 | this._updatesFile = Gio.File.new_for_path('/var/lib/PackageKit/prepared-update'); | ||
1930 | 565 | this._updatesMonitor = this._updatesFile.monitor(Gio.FileMonitorFlags.NONE, null); | ||
1931 | 566 | this._updatesMonitor.connect('changed', Lang.bind(this, this._updateInstallUpdates)); | ||
1932 | 567 | |||
1933 | 568 | // Whether shutdown is available or not depends on both lockdown | ||
1934 | 569 | // settings (disable-log-out) and Polkit policy - the latter doesn't | ||
1935 | 570 | // notify, so we update the menu item each time the menu opens or | ||
1936 | 571 | // the lockdown setting changes, which should be close enough. | ||
1937 | 572 | this.menu.connect('open-state-changed', Lang.bind(this, | ||
1938 | 573 | function(menu, open) { | ||
1939 | 574 | if (open) | ||
1940 | 575 | this._updateHaveShutdown(); | ||
1941 | 576 | })); | ||
1942 | 577 | this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY, | ||
1943 | 578 | Lang.bind(this, this._updateHaveShutdown)); | ||
1944 | 579 | |||
1945 | 580 | this._upClient.connect('notify::can-suspend', Lang.bind(this, this._updateSuspendOrPowerOff)); | ||
1946 | 581 | |||
1947 | 582 | Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated)); | ||
1948 | 583 | this._sessionUpdated(); | ||
1949 | 584 | }, | ||
1950 | 585 | |||
1951 | 586 | _sessionUpdated: function() { | ||
1952 | 587 | this.actor.visible = !Main.sessionMode.isGreeter; | ||
1953 | 588 | |||
1954 | 589 | let allowSettings = Main.sessionMode.allowSettings; | ||
1955 | 590 | this._statusChooser.setSensitive(allowSettings); | ||
1956 | 591 | this._systemSettings.visible = allowSettings; | ||
1957 | 592 | |||
1958 | 593 | this.setSensitive(!Main.sessionMode.isLocked); | ||
1959 | 594 | this._updatePresenceIcon(); | ||
1960 | 595 | }, | ||
1961 | 596 | |||
1962 | 597 | _onDestroy: function() { | ||
1963 | 598 | this._user.disconnect(this._userLoadedId); | ||
1964 | 599 | this._user.disconnect(this._userChangedId); | ||
1965 | 600 | }, | ||
1966 | 601 | |||
1967 | 602 | _updateUserName: function() { | ||
1968 | 603 | if (this._user.is_loaded) | ||
1969 | 604 | this._name.set_text(this._user.get_real_name()); | ||
1970 | 605 | else | ||
1971 | 606 | this._name.set_text(""); | ||
1972 | 607 | }, | ||
1973 | 608 | |||
1974 | 609 | _updateMultiUser: function() { | ||
1975 | 610 | this._updateSwitchUser(); | ||
1976 | 611 | this._updateLogout(); | ||
1977 | 612 | }, | ||
1978 | 613 | |||
1979 | 614 | _updateSwitchUser: function() { | ||
1980 | 615 | let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY); | ||
1981 | 616 | let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users; | ||
1982 | 617 | |||
1983 | 618 | this._loginScreenItem.actor.visible = allowSwitch && multiUser; | ||
1984 | 619 | }, | ||
1985 | 620 | |||
1986 | 621 | _updateLogout: function() { | ||
1987 | 622 | let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY); | ||
1988 | 623 | let alwaysShow = global.settings.get_boolean(ALWAYS_SHOW_LOG_OUT_KEY); | ||
1989 | 624 | let systemAccount = this._user.system_account; | ||
1990 | 625 | let localAccount = this._user.local_account; | ||
1991 | 626 | let multiUser = this._userManager.has_multiple_users; | ||
1992 | 627 | let multiSession = Gdm.get_session_ids().length > 1; | ||
1993 | 628 | |||
1994 | 629 | this._logoutItem.actor.visible = allowLogout && (alwaysShow || multiUser || multiSession || systemAccount || !localAccount); | ||
1995 | 630 | }, | ||
1996 | 631 | |||
1997 | 632 | _updateLockScreen: function() { | ||
1998 | 633 | let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY); | ||
1999 | 634 | this._lockScreenItem.actor.visible = allowLockScreen; | ||
2000 | 635 | }, | ||
2001 | 636 | |||
2002 | 637 | _updateInstallUpdates: function() { | ||
2003 | 638 | let haveUpdates = this._updatesFile.query_exists(null); | ||
2004 | 639 | this._installUpdatesItem.actor.visible = haveUpdates && this._haveShutdown; | ||
2005 | 640 | }, | ||
2006 | 641 | |||
2007 | 642 | _updateHaveShutdown: function() { | ||
2008 | 643 | this._session.CanShutdownRemote(Lang.bind(this, | ||
2009 | 644 | function(result, error) { | ||
2010 | 645 | if (!error) { | ||
2011 | 646 | this._haveShutdown = result[0]; | ||
2012 | 647 | this._updateInstallUpdates(); | ||
2013 | 648 | this._updateSuspendOrPowerOff(); | ||
2014 | 649 | } | ||
2015 | 650 | })); | ||
2016 | 651 | }, | ||
2017 | 652 | |||
2018 | 653 | _updateSuspendOrPowerOff: function() { | ||
2019 | 654 | this._haveSuspend = this._upClient.get_can_suspend(); | ||
2020 | 655 | |||
2021 | 656 | if (!this._suspendOrPowerOffItem) | ||
2022 | 657 | return; | ||
2023 | 658 | |||
2024 | 659 | this._suspendOrPowerOffItem.actor.visible = this._haveShutdown || this._haveSuspend; | ||
2025 | 660 | |||
2026 | 661 | // If we can't power off show Suspend instead | ||
2027 | 662 | // and disable the alt key | ||
2028 | 663 | if (!this._haveShutdown) { | ||
2029 | 664 | this._suspendOrPowerOffItem.updateText(_("Suspend"), null); | ||
2030 | 665 | } else if (!this._haveSuspend) { | ||
2031 | 666 | this._suspendOrPowerOffItem.updateText(_("Power Off"), null); | ||
2032 | 667 | } else { | ||
2033 | 668 | this._suspendOrPowerOffItem.updateText(_("Power Off"), _("Suspend")); | ||
2034 | 669 | } | ||
2035 | 670 | }, | ||
2036 | 671 | |||
2037 | 672 | _updateSwitch: function(status) { | ||
2038 | 673 | let active = status == GnomeSession.PresenceStatus.AVAILABLE; | ||
2039 | 674 | this._notificationsSwitch.setToggleState(active); | ||
2040 | 675 | }, | ||
2041 | 676 | |||
2042 | 677 | _updatePresenceIcon: function(accountMgr, presence, status, message) { | ||
2043 | 678 | if (Main.sessionMode.isLocked) | ||
2044 | 679 | this._iconBox.child = this._lockedIcon; | ||
2045 | 680 | else if (presence == Tp.ConnectionPresenceType.AVAILABLE) | ||
2046 | 681 | this._iconBox.child = this._availableIcon; | ||
2047 | 682 | else if (presence == Tp.ConnectionPresenceType.BUSY) | ||
2048 | 683 | this._iconBox.child = this._busyIcon; | ||
2049 | 684 | else if (presence == Tp.ConnectionPresenceType.HIDDEN) | ||
2050 | 685 | this._iconBox.child = this._invisibleIcon; | ||
2051 | 686 | else if (presence == Tp.ConnectionPresenceType.AWAY) | ||
2052 | 687 | this._iconBox.child = this._awayIcon; | ||
2053 | 688 | else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY) | ||
2054 | 689 | this._iconBox.child = this._idleIcon; | ||
2055 | 690 | else | ||
2056 | 691 | this._iconBox.child = this._offlineIcon; | ||
2057 | 692 | }, | ||
2058 | 693 | |||
2059 | 694 | _setupAccounts: function() { | ||
2060 | 695 | let accounts = this._accountMgr.get_valid_accounts(); | ||
2061 | 696 | for (let i = 0; i < accounts.length; i++) { | ||
2062 | 697 | accounts[i]._changingId = accounts[i].connect('notify::connection-status', | ||
2063 | 698 | Lang.bind(this, this._updateChangingPresence)); | ||
2064 | 699 | } | ||
2065 | 700 | this._updateChangingPresence(); | ||
2066 | 701 | }, | ||
2067 | 702 | |||
2068 | 703 | _onAccountEnabled: function(accountMgr, account) { | ||
2069 | 704 | if (!account._changingId) | ||
2070 | 705 | account._changingId = account.connect('notify::connection-status', | ||
2071 | 706 | Lang.bind(this, this._updateChangingPresence)); | ||
2072 | 707 | this._updateChangingPresence(); | ||
2073 | 708 | }, | ||
2074 | 709 | |||
2075 | 710 | _onAccountRemoved: function(accountMgr, account) { | ||
2076 | 711 | if (account._changingId) { | ||
2077 | 712 | account.disconnect(account._changingId); | ||
2078 | 713 | account._changingId = 0; | ||
2079 | 714 | } | ||
2080 | 715 | this._updateChangingPresence(); | ||
2081 | 716 | }, | ||
2082 | 717 | |||
2083 | 718 | _updateChangingPresence: function() { | ||
2084 | 719 | let accounts = this._accountMgr.get_valid_accounts(); | ||
2085 | 720 | let changing = false; | ||
2086 | 721 | for (let i = 0; i < accounts.length; i++) { | ||
2087 | 722 | if (accounts[i].connection_status == Tp.ConnectionStatus.CONNECTING) { | ||
2088 | 723 | changing = true; | ||
2089 | 724 | break; | ||
2090 | 725 | } | ||
2091 | 726 | } | ||
2092 | 727 | |||
2093 | 728 | if (changing) { | ||
2094 | 729 | this._iconBox.child = this._pendingIcon; | ||
2095 | 730 | } else { | ||
2096 | 731 | let [presence, s, msg] = this._accountMgr.get_most_available_presence(); | ||
2097 | 732 | this._updatePresenceIcon(this._accountMgr, presence, s, msg); | ||
2098 | 733 | } | ||
2099 | 734 | }, | ||
2100 | 735 | |||
2101 | 736 | _createSubMenu: function() { | ||
2102 | 737 | let item; | ||
2103 | 738 | |||
2104 | 739 | item = new IMStatusChooserItem(); | ||
2105 | 740 | item.connect('activate', Lang.bind(this, this._onMyAccountActivate)); | ||
2106 | 741 | this.menu.addMenuItem(item); | ||
2107 | 742 | this._statusChooser = item; | ||
2108 | 743 | |||
2109 | 744 | item = new PopupMenu.PopupSwitchMenuItem(_("Notifications")); | ||
2110 | 745 | item.connect('toggled', Lang.bind(this, this._updatePresenceStatus)); | ||
2111 | 746 | this.menu.addMenuItem(item); | ||
2112 | 747 | this._notificationsSwitch = item; | ||
2113 | 748 | |||
2114 | 749 | item = new PopupMenu.PopupSeparatorMenuItem(); | ||
2115 | 750 | this.menu.addMenuItem(item); | ||
2116 | 751 | |||
2117 | 752 | item = new PopupMenu.PopupMenuItem(_("System Settings")); | ||
2118 | 753 | item.connect('activate', Lang.bind(this, this._onPreferencesActivate)); | ||
2119 | 754 | this.menu.addMenuItem(item); | ||
2120 | 755 | this._systemSettings = item; | ||
2121 | 756 | |||
2122 | 757 | item = new PopupMenu.PopupSeparatorMenuItem(); | ||
2123 | 758 | this.menu.addMenuItem(item); | ||
2124 | 759 | |||
2125 | 760 | item = new PopupMenu.PopupMenuItem(_("Switch User")); | ||
2126 | 761 | item.connect('activate', Lang.bind(this, this._onLoginScreenActivate)); | ||
2127 | 762 | this.menu.addMenuItem(item); | ||
2128 | 763 | this._loginScreenItem = item; | ||
2129 | 764 | |||
2130 | 765 | item = new PopupMenu.PopupMenuItem(_("Log Out")); | ||
2131 | 766 | item.connect('activate', Lang.bind(this, this._onQuitSessionActivate)); | ||
2132 | 767 | this.menu.addMenuItem(item); | ||
2133 | 768 | this._logoutItem = item; | ||
2134 | 769 | |||
2135 | 770 | item = new PopupMenu.PopupMenuItem(_("Lock")); | ||
2136 | 771 | item.connect('activate', Lang.bind(this, this._onLockScreenActivate)); | ||
2137 | 772 | this.menu.addMenuItem(item); | ||
2138 | 773 | this._lockScreenItem = item; | ||
2139 | 774 | |||
2140 | 775 | item = new PopupMenu.PopupSeparatorMenuItem(); | ||
2141 | 776 | this.menu.addMenuItem(item); | ||
2142 | 777 | |||
2143 | 778 | item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"), | ||
2144 | 779 | _("Suspend")); | ||
2145 | 780 | this.menu.addMenuItem(item); | ||
2146 | 781 | item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate)); | ||
2147 | 782 | this._suspendOrPowerOffItem = item; | ||
2148 | 783 | this._updateSuspendOrPowerOff(); | ||
2149 | 784 | |||
2150 | 785 | item = new PopupMenu.PopupMenuItem(_("Install Updates & Restart")); | ||
2151 | 786 | item.connect('activate', Lang.bind(this, this._onInstallUpdatesActivate)); | ||
2152 | 787 | this.menu.addMenuItem(item); | ||
2153 | 788 | this._installUpdatesItem = item; | ||
2154 | 789 | }, | ||
2155 | 790 | |||
2156 | 791 | _updatePresenceStatus: function(item, event) { | ||
2157 | 792 | let status; | ||
2158 | 793 | |||
2159 | 794 | if (item.state) { | ||
2160 | 795 | status = GnomeSession.PresenceStatus.AVAILABLE; | ||
2161 | 796 | } else { | ||
2162 | 797 | status = GnomeSession.PresenceStatus.BUSY; | ||
2163 | 798 | |||
2164 | 799 | let [presence, s, msg] = this._accountMgr.get_most_available_presence(); | ||
2165 | 800 | let newPresence = this._statusChooser.getIMPresenceForSessionStatus(status); | ||
2166 | 801 | if (newPresence != presence && | ||
2167 | 802 | newPresence == Tp.ConnectionPresenceType.BUSY) | ||
2168 | 803 | Main.notify(_("Your chat status will be set to busy"), | ||
2169 | 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.")); | ||
2170 | 805 | } | ||
2171 | 806 | |||
2172 | 807 | this._presence.status = status; | ||
2173 | 808 | }, | ||
2174 | 809 | |||
2175 | 810 | _onMyAccountActivate: function() { | ||
2176 | 811 | Main.overview.hide(); | ||
2177 | 812 | let app = Shell.AppSystem.get_default().lookup_setting('gnome-user-accounts-panel.desktop'); | ||
2178 | 813 | app.activate(); | ||
2179 | 814 | }, | ||
2180 | 815 | |||
2181 | 816 | _onPreferencesActivate: function() { | ||
2182 | 817 | Main.overview.hide(); | ||
2183 | 818 | let app = Shell.AppSystem.get_default().lookup_app('gnome-control-center.desktop'); | ||
2184 | 819 | app.activate(); | ||
2185 | 820 | }, | ||
2186 | 821 | |||
2187 | 822 | _onLockScreenActivate: function() { | ||
2188 | 823 | this.menu.close(BoxPointer.PopupAnimation.NONE); | ||
2189 | 824 | Main.overview.hide(); | ||
2190 | 825 | Main.screenShield.lock(true); | ||
2191 | 826 | }, | ||
2192 | 827 | |||
2193 | 828 | _onLoginScreenActivate: function() { | ||
2194 | 829 | this.menu.close(BoxPointer.PopupAnimation.NONE); | ||
2195 | 830 | Main.overview.hide(); | ||
2196 | 831 | Main.screenShield.lock(false); | ||
2197 | 832 | Gdm.goto_login_session_sync(null); | ||
2198 | 833 | }, | ||
2199 | 834 | |||
2200 | 835 | _onQuitSessionActivate: function() { | ||
2201 | 836 | Main.overview.hide(); | ||
2202 | 837 | this._session.LogoutRemote(0); | ||
2203 | 838 | }, | ||
2204 | 839 | |||
2205 | 840 | _onInstallUpdatesActivate: function() { | ||
2206 | 841 | Main.overview.hide(); | ||
2207 | 842 | Util.spawn(['pkexec', '/usr/libexec/pk-trigger-offline-update']); | ||
2208 | 843 | |||
2209 | 844 | this._session.RebootRemote(); | ||
2210 | 845 | }, | ||
2211 | 846 | |||
2212 | 847 | _onSuspendOrPowerOffActivate: function() { | ||
2213 | 848 | Main.overview.hide(); | ||
2214 | 849 | |||
2215 | 850 | if (this._haveShutdown && | ||
2216 | 851 | this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) { | ||
2217 | 852 | this._session.ShutdownRemote(); | ||
2218 | 853 | } else { | ||
2219 | 854 | if (this._screenSaverSettings.get_boolean(LOCK_ENABLED_KEY)) { | ||
2220 | 855 | let tmpId = Main.screenShield.connect('lock-screen-shown', Lang.bind(this, function() { | ||
2221 | 856 | Main.screenShield.disconnect(tmpId); | ||
2222 | 857 | |||
2223 | 858 | this._upClient.suspend_sync(null); | ||
2224 | 859 | })); | ||
2225 | 860 | |||
2226 | 861 | this.menu.close(BoxPointer.PopupAnimation.NONE); | ||
2227 | 862 | Main.screenShield.lock(true); | ||
2228 | 863 | } else { | ||
2229 | 864 | this._upClient.suspend_sync(null); | ||
2230 | 865 | } | ||
2231 | 866 | } | ||
2232 | 867 | } | ||
2233 | 868 | }); | ||
2234 | 869 | 0 | ||
2235 | === removed directory '.pc/ubuntu_lock_on_suspend.patch' | |||
2236 | === removed directory '.pc/ubuntu_lock_on_suspend.patch/js' | |||
2237 | === removed directory '.pc/ubuntu_lock_on_suspend.patch/js/ui' | |||
2238 | === removed file '.pc/ubuntu_lock_on_suspend.patch/js/ui/userMenu.js' | |||
2239 | --- .pc/ubuntu_lock_on_suspend.patch/js/ui/userMenu.js 2012-11-26 15:57:51 +0000 | |||
2240 | +++ .pc/ubuntu_lock_on_suspend.patch/js/ui/userMenu.js 1970-01-01 00:00:00 +0000 | |||
2241 | @@ -1,885 +0,0 @@ | |||
2242 | 1 | // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||
2243 | 2 | |||
2244 | 3 | const AccountsService = imports.gi.AccountsService; | ||
2245 | 4 | const Gdm = imports.gi.Gdm; | ||
2246 | 5 | const Gio = imports.gi.Gio; | ||
2247 | 6 | const GLib = imports.gi.GLib; | ||
2248 | 7 | const Lang = imports.lang; | ||
2249 | 8 | const Pango = imports.gi.Pango; | ||
2250 | 9 | const Shell = imports.gi.Shell; | ||
2251 | 10 | const St = imports.gi.St; | ||
2252 | 11 | const Tp = imports.gi.TelepathyGLib; | ||
2253 | 12 | const UPowerGlib = imports.gi.UPowerGlib; | ||
2254 | 13 | const Atk = imports.gi.Atk; | ||
2255 | 14 | |||
2256 | 15 | const BoxPointer = imports.ui.boxpointer; | ||
2257 | 16 | const GnomeSession = imports.misc.gnomeSession; | ||
2258 | 17 | const Main = imports.ui.main; | ||
2259 | 18 | const PanelMenu = imports.ui.panelMenu; | ||
2260 | 19 | const PopupMenu = imports.ui.popupMenu; | ||
2261 | 20 | const Params = imports.misc.params; | ||
2262 | 21 | const UnlockDialog = imports.ui.unlockDialog; | ||
2263 | 22 | const Util = imports.misc.util; | ||
2264 | 23 | |||
2265 | 24 | const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown'; | ||
2266 | 25 | const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver'; | ||
2267 | 26 | const DISABLE_USER_SWITCH_KEY = 'disable-user-switching'; | ||
2268 | 27 | const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen'; | ||
2269 | 28 | const DISABLE_LOG_OUT_KEY = 'disable-log-out'; | ||
2270 | 29 | const LOCK_ENABLED_KEY = 'lock-enabled'; | ||
2271 | 30 | const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out'; | ||
2272 | 31 | |||
2273 | 32 | const DIALOG_ICON_SIZE = 64; | ||
2274 | 33 | |||
2275 | 34 | const IMStatus = { | ||
2276 | 35 | AVAILABLE: 0, | ||
2277 | 36 | BUSY: 1, | ||
2278 | 37 | HIDDEN: 2, | ||
2279 | 38 | AWAY: 3, | ||
2280 | 39 | IDLE: 4, | ||
2281 | 40 | OFFLINE: 5, | ||
2282 | 41 | LAST: 6 | ||
2283 | 42 | }; | ||
2284 | 43 | |||
2285 | 44 | // Adapted from gdm/gui/user-switch-applet/applet.c | ||
2286 | 45 | // | ||
2287 | 46 | // Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>. | ||
2288 | 47 | // Copyright (C) 2008,2009 Red Hat, Inc. | ||
2289 | 48 | |||
2290 | 49 | const UserAvatarWidget = new Lang.Class({ | ||
2291 | 50 | Name: 'UserAvatarWidget', | ||
2292 | 51 | |||
2293 | 52 | _init: function(user, params) { | ||
2294 | 53 | this._user = user; | ||
2295 | 54 | params = Params.parse(params, { reactive: false, | ||
2296 | 55 | iconSize: DIALOG_ICON_SIZE, | ||
2297 | 56 | styleClass: 'status-chooser-user-icon' }); | ||
2298 | 57 | this._iconSize = params.iconSize; | ||
2299 | 58 | |||
2300 | 59 | this.actor = new St.Bin({ style_class: params.styleClass, | ||
2301 | 60 | track_hover: params.reactive, | ||
2302 | 61 | reactive: params.reactive }); | ||
2303 | 62 | }, | ||
2304 | 63 | |||
2305 | 64 | setSensitive: function(sensitive) { | ||
2306 | 65 | this.actor.can_focus = sensitive; | ||
2307 | 66 | this.actor.reactive = sensitive; | ||
2308 | 67 | }, | ||
2309 | 68 | |||
2310 | 69 | update: function() { | ||
2311 | 70 | let iconFile = this._user.get_icon_file(); | ||
2312 | 71 | if (!GLib.file_test(iconFile, GLib.FileTest.EXISTS)) | ||
2313 | 72 | iconFile = null; | ||
2314 | 73 | |||
2315 | 74 | if (iconFile) { | ||
2316 | 75 | let file = Gio.File.new_for_path(iconFile); | ||
2317 | 76 | this.actor.child = null; | ||
2318 | 77 | this.actor.style = 'background-image: url("%s");'.format(iconFile); | ||
2319 | 78 | |||
2320 | 79 | // AccountsService uses a fixed location for avatar images, so | ||
2321 | 80 | // we need to clear out all cached data to pick up image changes, | ||
2322 | 81 | // see https://bugzilla.gnome.org/show_bug.cgi?id=679268 | ||
2323 | 82 | this.actor.clear_background_image(); | ||
2324 | 83 | } else { | ||
2325 | 84 | this.actor.style = null; | ||
2326 | 85 | this.actor.child = new St.Icon({ icon_name: 'avatar-default-symbolic', | ||
2327 | 86 | icon_size: this._iconSize }); | ||
2328 | 87 | } | ||
2329 | 88 | } | ||
2330 | 89 | }); | ||
2331 | 90 | |||
2332 | 91 | const IMStatusItem = new Lang.Class({ | ||
2333 | 92 | Name: 'IMStatusItem', | ||
2334 | 93 | Extends: PopupMenu.PopupBaseMenuItem, | ||
2335 | 94 | |||
2336 | 95 | _init: function(label, iconName) { | ||
2337 | 96 | this.parent(); | ||
2338 | 97 | |||
2339 | 98 | this.actor.add_style_class_name('status-chooser-status-item'); | ||
2340 | 99 | |||
2341 | 100 | this._icon = new St.Icon({ style_class: 'popup-menu-icon' }); | ||
2342 | 101 | this.addActor(this._icon); | ||
2343 | 102 | |||
2344 | 103 | if (iconName) | ||
2345 | 104 | this._icon.icon_name = iconName; | ||
2346 | 105 | |||
2347 | 106 | this.label = new St.Label({ text: label }); | ||
2348 | 107 | this.actor.label_actor = this.label; | ||
2349 | 108 | this.addActor(this.label); | ||
2350 | 109 | } | ||
2351 | 110 | }); | ||
2352 | 111 | |||
2353 | 112 | const IMUserNameItem = new Lang.Class({ | ||
2354 | 113 | Name: 'IMUserNameItem', | ||
2355 | 114 | Extends: PopupMenu.PopupBaseMenuItem, | ||
2356 | 115 | |||
2357 | 116 | _init: function() { | ||
2358 | 117 | this.parent({ reactive: false, | ||
2359 | 118 | can_focus: false, | ||
2360 | 119 | style_class: 'status-chooser-user-name' }); | ||
2361 | 120 | |||
2362 | 121 | this._wrapper = new Shell.GenericContainer(); | ||
2363 | 122 | this._wrapper.connect('get-preferred-width', | ||
2364 | 123 | Lang.bind(this, this._wrapperGetPreferredWidth)); | ||
2365 | 124 | this._wrapper.connect('get-preferred-height', | ||
2366 | 125 | Lang.bind(this, this._wrapperGetPreferredHeight)); | ||
2367 | 126 | this._wrapper.connect('allocate', | ||
2368 | 127 | Lang.bind(this, this._wrapperAllocate)); | ||
2369 | 128 | this.addActor(this._wrapper, { expand: true, span: -1 }); | ||
2370 | 129 | |||
2371 | 130 | this.label = new St.Label(); | ||
2372 | 131 | this.label.clutter_text.set_line_wrap(true); | ||
2373 | 132 | this.label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE); | ||
2374 | 133 | this._wrapper.add_actor(this.label); | ||
2375 | 134 | }, | ||
2376 | 135 | |||
2377 | 136 | _wrapperGetPreferredWidth: function(actor, forHeight, alloc) { | ||
2378 | 137 | alloc.min_size = 1; | ||
2379 | 138 | alloc.natural_size = 1; | ||
2380 | 139 | }, | ||
2381 | 140 | |||
2382 | 141 | _wrapperGetPreferredHeight: function(actor, forWidth, alloc) { | ||
2383 | 142 | [alloc.min_size, alloc.natural_size] = this.label.get_preferred_height(forWidth); | ||
2384 | 143 | }, | ||
2385 | 144 | |||
2386 | 145 | _wrapperAllocate: function(actor, box, flags) { | ||
2387 | 146 | this.label.allocate(box, flags); | ||
2388 | 147 | } | ||
2389 | 148 | }); | ||
2390 | 149 | |||
2391 | 150 | const IMStatusChooserItem = new Lang.Class({ | ||
2392 | 151 | Name: 'IMStatusChooserItem', | ||
2393 | 152 | Extends: PopupMenu.PopupBaseMenuItem, | ||
2394 | 153 | |||
2395 | 154 | _init: function() { | ||
2396 | 155 | this.parent({ reactive: false, | ||
2397 | 156 | can_focus: false, | ||
2398 | 157 | style_class: 'status-chooser' }); | ||
2399 | 158 | |||
2400 | 159 | this._userManager = AccountsService.UserManager.get_default(); | ||
2401 | 160 | this._user = this._userManager.get_user(GLib.get_user_name()); | ||
2402 | 161 | |||
2403 | 162 | this._avatar = new UserAvatarWidget(this._user, { reactive: true }); | ||
2404 | 163 | this._iconBin = new St.Button({ child: this._avatar.actor }); | ||
2405 | 164 | this.addActor(this._iconBin); | ||
2406 | 165 | |||
2407 | 166 | this._iconBin.connect('clicked', Lang.bind(this, | ||
2408 | 167 | function() { | ||
2409 | 168 | this.activate(); | ||
2410 | 169 | })); | ||
2411 | 170 | |||
2412 | 171 | this._section = new PopupMenu.PopupMenuSection(); | ||
2413 | 172 | this.addActor(this._section.actor); | ||
2414 | 173 | |||
2415 | 174 | this._name = new IMUserNameItem(); | ||
2416 | 175 | this._section.addMenuItem(this._name); | ||
2417 | 176 | |||
2418 | 177 | this._combo = new PopupMenu.PopupComboBoxMenuItem({ style_class: 'status-chooser-combo' }); | ||
2419 | 178 | this._section.addMenuItem(this._combo); | ||
2420 | 179 | |||
2421 | 180 | let item; | ||
2422 | 181 | |||
2423 | 182 | item = new IMStatusItem(_("Available"), 'user-available-symbolic'); | ||
2424 | 183 | this._combo.addMenuItem(item, IMStatus.AVAILABLE); | ||
2425 | 184 | |||
2426 | 185 | item = new IMStatusItem(_("Busy"), 'user-busy-symbolic'); | ||
2427 | 186 | this._combo.addMenuItem(item, IMStatus.BUSY); | ||
2428 | 187 | |||
2429 | 188 | item = new IMStatusItem(_("Invisible"), 'user-invisible-symbolic'); | ||
2430 | 189 | this._combo.addMenuItem(item, IMStatus.HIDDEN); | ||
2431 | 190 | |||
2432 | 191 | item = new IMStatusItem(_("Away"), 'user-away-symbolic'); | ||
2433 | 192 | this._combo.addMenuItem(item, IMStatus.AWAY); | ||
2434 | 193 | |||
2435 | 194 | item = new IMStatusItem(_("Idle"), 'user-idle-symbolic'); | ||
2436 | 195 | this._combo.addMenuItem(item, IMStatus.IDLE); | ||
2437 | 196 | |||
2438 | 197 | item = new IMStatusItem(_("Unavailable"), 'user-offline-symbolic'); | ||
2439 | 198 | this._combo.addMenuItem(item, IMStatus.OFFLINE); | ||
2440 | 199 | |||
2441 | 200 | this._combo.connect('active-item-changed', | ||
2442 | 201 | Lang.bind(this, this._changeIMStatus)); | ||
2443 | 202 | |||
2444 | 203 | this._presence = new GnomeSession.Presence(); | ||
2445 | 204 | this._presence.connectSignal('StatusChanged', Lang.bind(this, function(proxy, senderName, [status]) { | ||
2446 | 205 | this._sessionStatusChanged(status); | ||
2447 | 206 | })); | ||
2448 | 207 | |||
2449 | 208 | this._sessionPresenceRestored = false; | ||
2450 | 209 | this._imPresenceRestored = false; | ||
2451 | 210 | this._currentPresence = undefined; | ||
2452 | 211 | |||
2453 | 212 | this._accountMgr = Tp.AccountManager.dup(); | ||
2454 | 213 | this._accountMgr.connect('most-available-presence-changed', | ||
2455 | 214 | Lang.bind(this, this._IMStatusChanged)); | ||
2456 | 215 | this._accountMgr.connect('account-enabled', | ||
2457 | 216 | Lang.bind(this, this._IMAccountsChanged)); | ||
2458 | 217 | this._accountMgr.connect('account-disabled', | ||
2459 | 218 | Lang.bind(this, this._IMAccountsChanged)); | ||
2460 | 219 | this._accountMgr.connect('account-removed', | ||
2461 | 220 | Lang.bind(this, this._IMAccountsChanged)); | ||
2462 | 221 | this._accountMgr.connect('account-validity-changed', | ||
2463 | 222 | Lang.bind(this, this._IMAccountsChanged)); | ||
2464 | 223 | this._accountMgr.prepare_async(null, Lang.bind(this, | ||
2465 | 224 | function(mgr) { | ||
2466 | 225 | this._IMAccountsChanged(mgr); | ||
2467 | 226 | |||
2468 | 227 | if (this._networkMonitor.network_available) | ||
2469 | 228 | this._restorePresence(); | ||
2470 | 229 | else | ||
2471 | 230 | this._setComboboxPresence(Tp.ConnectionPresenceType.OFFLINE); | ||
2472 | 231 | })); | ||
2473 | 232 | |||
2474 | 233 | this._networkMonitor = Gio.NetworkMonitor.get_default(); | ||
2475 | 234 | this._networkMonitor.connect('network-changed', | ||
2476 | 235 | Lang.bind(this, function(monitor, available) { | ||
2477 | 236 | this._IMAccountsChanged(this._accountMgr); | ||
2478 | 237 | |||
2479 | 238 | if (available && !this._imPresenceRestored) | ||
2480 | 239 | this._restorePresence(); | ||
2481 | 240 | })); | ||
2482 | 241 | |||
2483 | 242 | this._userLoadedId = this._user.connect('notify::is-loaded', | ||
2484 | 243 | Lang.bind(this, | ||
2485 | 244 | this._updateUser)); | ||
2486 | 245 | this._userChangedId = this._user.connect('changed', | ||
2487 | 246 | Lang.bind(this, | ||
2488 | 247 | this._updateUser)); | ||
2489 | 248 | this.actor.connect('notify::mapped', Lang.bind(this, function() { | ||
2490 | 249 | if (this.actor.mapped) | ||
2491 | 250 | this._updateUser(); | ||
2492 | 251 | })); | ||
2493 | 252 | |||
2494 | 253 | this.connect('sensitive-changed', function(sensitive) { | ||
2495 | 254 | this._avatar.setSensitive(sensitive); | ||
2496 | 255 | }); | ||
2497 | 256 | }, | ||
2498 | 257 | |||
2499 | 258 | _restorePresence: function() { | ||
2500 | 259 | let [presence, status, msg] = this._accountMgr.get_most_available_presence(); | ||
2501 | 260 | |||
2502 | 261 | let savedPresence = global.settings.get_int('saved-im-presence'); | ||
2503 | 262 | |||
2504 | 263 | if (savedPresence == presence) { | ||
2505 | 264 | this._IMStatusChanged(this._accountMgr, presence, status, msg); | ||
2506 | 265 | } else { | ||
2507 | 266 | this._setComboboxPresence(savedPresence); | ||
2508 | 267 | status = this._statusForPresence(savedPresence); | ||
2509 | 268 | msg = msg ? msg : ''; | ||
2510 | 269 | this._accountMgr.set_all_requested_presences(savedPresence, status, msg); | ||
2511 | 270 | } | ||
2512 | 271 | }, | ||
2513 | 272 | |||
2514 | 273 | destroy: function() { | ||
2515 | 274 | // clean up signal handlers | ||
2516 | 275 | if (this._userLoadedId != 0) { | ||
2517 | 276 | this._user.disconnect(this._userLoadedId); | ||
2518 | 277 | this._userLoadedId = 0; | ||
2519 | 278 | } | ||
2520 | 279 | |||
2521 | 280 | if (this._userChangedId != 0) { | ||
2522 | 281 | this._user.disconnect(this._userChangedId); | ||
2523 | 282 | this._userChangedId = 0; | ||
2524 | 283 | } | ||
2525 | 284 | |||
2526 | 285 | this.parent(); | ||
2527 | 286 | }, | ||
2528 | 287 | |||
2529 | 288 | // Override getColumnWidths()/setColumnWidths() to make the item | ||
2530 | 289 | // independent from the overall column layout of the menu | ||
2531 | 290 | getColumnWidths: function() { | ||
2532 | 291 | return []; | ||
2533 | 292 | }, | ||
2534 | 293 | |||
2535 | 294 | setColumnWidths: function(widths) { | ||
2536 | 295 | }, | ||
2537 | 296 | |||
2538 | 297 | _updateUser: function() { | ||
2539 | 298 | if (this._user.is_loaded) | ||
2540 | 299 | this._name.label.set_text(this._user.get_real_name()); | ||
2541 | 300 | else | ||
2542 | 301 | this._name.label.set_text(""); | ||
2543 | 302 | |||
2544 | 303 | this._avatar.update(); | ||
2545 | 304 | }, | ||
2546 | 305 | |||
2547 | 306 | _statusForPresence: function(presence) { | ||
2548 | 307 | switch(presence) { | ||
2549 | 308 | case Tp.ConnectionPresenceType.AVAILABLE: | ||
2550 | 309 | return 'available'; | ||
2551 | 310 | case Tp.ConnectionPresenceType.BUSY: | ||
2552 | 311 | return 'busy'; | ||
2553 | 312 | case Tp.ConnectionPresenceType.OFFLINE: | ||
2554 | 313 | return 'offline'; | ||
2555 | 314 | case Tp.ConnectionPresenceType.HIDDEN: | ||
2556 | 315 | return 'hidden'; | ||
2557 | 316 | case Tp.ConnectionPresenceType.AWAY: | ||
2558 | 317 | return 'away'; | ||
2559 | 318 | case Tp.ConnectionPresenceType.EXTENDED_AWAY: | ||
2560 | 319 | return 'xa'; | ||
2561 | 320 | default: | ||
2562 | 321 | return 'unknown'; | ||
2563 | 322 | } | ||
2564 | 323 | }, | ||
2565 | 324 | |||
2566 | 325 | _IMAccountsChanged: function(mgr) { | ||
2567 | 326 | let accounts = mgr.get_valid_accounts().filter(function(account) { | ||
2568 | 327 | return account.enabled; | ||
2569 | 328 | }); | ||
2570 | 329 | let sensitive = accounts.length > 0 && this._networkMonitor.network_available; | ||
2571 | 330 | this._combo.setSensitive(sensitive); | ||
2572 | 331 | }, | ||
2573 | 332 | |||
2574 | 333 | _IMStatusChanged: function(accountMgr, presence, status, message) { | ||
2575 | 334 | if (!this._imPresenceRestored) | ||
2576 | 335 | this._imPresenceRestored = true; | ||
2577 | 336 | |||
2578 | 337 | if (presence == this._currentPresence) | ||
2579 | 338 | return; | ||
2580 | 339 | |||
2581 | 340 | this._currentPresence = presence; | ||
2582 | 341 | this._setComboboxPresence(presence); | ||
2583 | 342 | |||
2584 | 343 | if (!this._sessionPresenceRestored) { | ||
2585 | 344 | this._sessionStatusChanged(this._presence.status); | ||
2586 | 345 | return; | ||
2587 | 346 | } | ||
2588 | 347 | |||
2589 | 348 | if (presence == Tp.ConnectionPresenceType.AVAILABLE) | ||
2590 | 349 | this._presence.status = GnomeSession.PresenceStatus.AVAILABLE; | ||
2591 | 350 | |||
2592 | 351 | // We ignore the actual value of _expectedPresence and never safe | ||
2593 | 352 | // the first presence change after an "automatic" change, assuming | ||
2594 | 353 | // that it is the response to our request; this is to account for | ||
2595 | 354 | // mission control falling back to "similar" presences if an account | ||
2596 | 355 | // type does not implement the requested presence. | ||
2597 | 356 | if (!this._expectedPresence) | ||
2598 | 357 | global.settings.set_int('saved-im-presence', presence); | ||
2599 | 358 | else | ||
2600 | 359 | this._expectedPresence = undefined; | ||
2601 | 360 | }, | ||
2602 | 361 | |||
2603 | 362 | _setComboboxPresence: function(presence) { | ||
2604 | 363 | let activatedItem; | ||
2605 | 364 | |||
2606 | 365 | if (presence == Tp.ConnectionPresenceType.AVAILABLE) | ||
2607 | 366 | activatedItem = IMStatus.AVAILABLE; | ||
2608 | 367 | else if (presence == Tp.ConnectionPresenceType.BUSY) | ||
2609 | 368 | activatedItem = IMStatus.BUSY; | ||
2610 | 369 | else if (presence == Tp.ConnectionPresenceType.HIDDEN) | ||
2611 | 370 | activatedItem = IMStatus.HIDDEN; | ||
2612 | 371 | else if (presence == Tp.ConnectionPresenceType.AWAY) | ||
2613 | 372 | activatedItem = IMStatus.AWAY; | ||
2614 | 373 | else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY) | ||
2615 | 374 | activatedItem = IMStatus.IDLE; | ||
2616 | 375 | else | ||
2617 | 376 | activatedItem = IMStatus.OFFLINE; | ||
2618 | 377 | |||
2619 | 378 | this._combo.setActiveItem(activatedItem); | ||
2620 | 379 | for (let i = 0; i < IMStatus.LAST; i++) { | ||
2621 | 380 | if (i == IMStatus.AVAILABLE || i == IMStatus.OFFLINE) | ||
2622 | 381 | continue; // always visible | ||
2623 | 382 | |||
2624 | 383 | this._combo.setItemVisible(i, i == activatedItem); | ||
2625 | 384 | } | ||
2626 | 385 | }, | ||
2627 | 386 | |||
2628 | 387 | _changeIMStatus: function(menuItem, id) { | ||
2629 | 388 | let [presence, s, msg] = this._accountMgr.get_most_available_presence(); | ||
2630 | 389 | let newPresence, status; | ||
2631 | 390 | |||
2632 | 391 | if (id == IMStatus.AVAILABLE) { | ||
2633 | 392 | newPresence = Tp.ConnectionPresenceType.AVAILABLE; | ||
2634 | 393 | } else if (id == IMStatus.OFFLINE) { | ||
2635 | 394 | newPresence = Tp.ConnectionPresenceType.OFFLINE; | ||
2636 | 395 | } else | ||
2637 | 396 | return; | ||
2638 | 397 | |||
2639 | 398 | status = this._statusForPresence(newPresence); | ||
2640 | 399 | msg = msg ? msg : ''; | ||
2641 | 400 | this._accountMgr.set_all_requested_presences(newPresence, status, msg); | ||
2642 | 401 | }, | ||
2643 | 402 | |||
2644 | 403 | getIMPresenceForSessionStatus: function(sessionStatus) { | ||
2645 | 404 | // Restore the last user-set presence when coming back from | ||
2646 | 405 | // BUSY/IDLE (otherwise the last user-set presence matches | ||
2647 | 406 | // the current one) | ||
2648 | 407 | if (sessionStatus == GnomeSession.PresenceStatus.AVAILABLE) | ||
2649 | 408 | return global.settings.get_int('saved-im-presence'); | ||
2650 | 409 | |||
2651 | 410 | if (sessionStatus == GnomeSession.PresenceStatus.BUSY) { | ||
2652 | 411 | // Only change presence if the current one is "more present" than | ||
2653 | 412 | // busy, or if coming back from idle | ||
2654 | 413 | if (this._currentPresence == Tp.ConnectionPresenceType.AVAILABLE || | ||
2655 | 414 | this._currentPresence == Tp.ConnectionPresenceType.EXTENDED_AWAY) | ||
2656 | 415 | return Tp.ConnectionPresenceType.BUSY; | ||
2657 | 416 | } | ||
2658 | 417 | |||
2659 | 418 | if (sessionStatus == GnomeSession.PresenceStatus.IDLE) { | ||
2660 | 419 | // Only change presence if the current one is "more present" than | ||
2661 | 420 | // idle | ||
2662 | 421 | if (this._currentPresence != Tp.ConnectionPresenceType.OFFLINE && | ||
2663 | 422 | this._currentPresence != Tp.ConnectionPresenceType.HIDDEN) | ||
2664 | 423 | return Tp.ConnectionPresenceType.EXTENDED_AWAY; | ||
2665 | 424 | } | ||
2666 | 425 | |||
2667 | 426 | return this._currentPresence; | ||
2668 | 427 | }, | ||
2669 | 428 | |||
2670 | 429 | _sessionStatusChanged: function(sessionStatus) { | ||
2671 | 430 | if (!this._imPresenceRestored) | ||
2672 | 431 | return; | ||
2673 | 432 | |||
2674 | 433 | let savedStatus = global.settings.get_int('saved-session-presence'); | ||
2675 | 434 | if (!this._sessionPresenceRestored) { | ||
2676 | 435 | |||
2677 | 436 | // We should never save/restore a status other than AVAILABLE | ||
2678 | 437 | // or BUSY | ||
2679 | 438 | if (savedStatus != GnomeSession.PresenceStatus.AVAILABLE && | ||
2680 | 439 | savedStatus != GnomeSession.PresenceStatus.BUSY) | ||
2681 | 440 | savedStatus = GnomeSession.PresenceStatus.AVAILABLE; | ||
2682 | 441 | |||
2683 | 442 | if (sessionStatus != savedStatus) { | ||
2684 | 443 | this._presence.status = savedStatus; | ||
2685 | 444 | return; | ||
2686 | 445 | } | ||
2687 | 446 | this._sessionPresenceRestored = true; | ||
2688 | 447 | } | ||
2689 | 448 | |||
2690 | 449 | if ((sessionStatus == GnomeSession.PresenceStatus.AVAILABLE || | ||
2691 | 450 | sessionStatus == GnomeSession.PresenceStatus.BUSY) && | ||
2692 | 451 | savedStatus != sessionStatus) | ||
2693 | 452 | global.settings.set_int('saved-session-presence', sessionStatus); | ||
2694 | 453 | |||
2695 | 454 | let [presence, s, msg] = this._accountMgr.get_most_available_presence(); | ||
2696 | 455 | let newPresence, status; | ||
2697 | 456 | |||
2698 | 457 | let newPresence = this.getIMPresenceForSessionStatus(sessionStatus); | ||
2699 | 458 | |||
2700 | 459 | if (!newPresence || newPresence == presence) | ||
2701 | 460 | return; | ||
2702 | 461 | |||
2703 | 462 | status = this._statusForPresence(newPresence); | ||
2704 | 463 | msg = msg ? msg : ''; | ||
2705 | 464 | |||
2706 | 465 | this._expectedPresence = newPresence; | ||
2707 | 466 | this._accountMgr.set_all_requested_presences(newPresence, status, msg); | ||
2708 | 467 | } | ||
2709 | 468 | }); | ||
2710 | 469 | |||
2711 | 470 | |||
2712 | 471 | const UserMenuButton = new Lang.Class({ | ||
2713 | 472 | Name: 'UserMenuButton', | ||
2714 | 473 | Extends: PanelMenu.Button, | ||
2715 | 474 | |||
2716 | 475 | _init: function() { | ||
2717 | 476 | this.parent(0.0); | ||
2718 | 477 | |||
2719 | 478 | this.actor.accessible_role = Atk.Role.MENU; | ||
2720 | 479 | |||
2721 | 480 | let box = new St.BoxLayout({ name: 'panelUserMenu' }); | ||
2722 | 481 | this.actor.add_actor(box); | ||
2723 | 482 | |||
2724 | 483 | this._screenSaverSettings = new Gio.Settings({ schema: SCREENSAVER_SCHEMA }); | ||
2725 | 484 | this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA }); | ||
2726 | 485 | |||
2727 | 486 | this._userManager = AccountsService.UserManager.get_default(); | ||
2728 | 487 | |||
2729 | 488 | this._user = this._userManager.get_user(GLib.get_user_name()); | ||
2730 | 489 | this._presence = new GnomeSession.Presence(); | ||
2731 | 490 | this._session = new GnomeSession.SessionManager(); | ||
2732 | 491 | this._haveShutdown = true; | ||
2733 | 492 | |||
2734 | 493 | this._accountMgr = Tp.AccountManager.dup(); | ||
2735 | 494 | |||
2736 | 495 | this._upClient = new UPowerGlib.Client(); | ||
2737 | 496 | this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); | ||
2738 | 497 | |||
2739 | 498 | this._iconBox = new St.Bin(); | ||
2740 | 499 | box.add(this._iconBox, { y_align: St.Align.MIDDLE, y_fill: false }); | ||
2741 | 500 | |||
2742 | 501 | let textureCache = St.TextureCache.get_default(); | ||
2743 | 502 | this._offlineIcon = new St.Icon({ icon_name: 'user-offline-symbolic', | ||
2744 | 503 | style_class: 'popup-menu-icon' }); | ||
2745 | 504 | this._availableIcon = new St.Icon({ icon_name: 'user-available-symbolic', | ||
2746 | 505 | style_class: 'popup-menu-icon' }); | ||
2747 | 506 | this._busyIcon = new St.Icon({ icon_name: 'user-busy-symbolic', | ||
2748 | 507 | style_class: 'popup-menu-icon' }); | ||
2749 | 508 | this._invisibleIcon = new St.Icon({ icon_name: 'user-invisible-symbolic', | ||
2750 | 509 | style_class: 'popup-menu-icon' }); | ||
2751 | 510 | this._awayIcon = new St.Icon({ icon_name: 'user-away-symbolic', | ||
2752 | 511 | style_class: 'popup-menu-icon' }); | ||
2753 | 512 | this._idleIcon = new St.Icon({ icon_name: 'user-idle-symbolic', | ||
2754 | 513 | style_class: 'popup-menu-icon' }); | ||
2755 | 514 | this._pendingIcon = new St.Icon({ icon_name: 'user-status-pending-symbolic', | ||
2756 | 515 | style_class: 'popup-menu-icon' }); | ||
2757 | 516 | this._lockedIcon = new St.Icon({ icon_name: 'changes-prevent-symbolic', | ||
2758 | 517 | style_class: 'popup-menu-icon' }); | ||
2759 | 518 | |||
2760 | 519 | this._accountMgr.connect('most-available-presence-changed', | ||
2761 | 520 | Lang.bind(this, this._updatePresenceIcon)); | ||
2762 | 521 | this._accountMgr.connect('account-enabled', | ||
2763 | 522 | Lang.bind(this, this._onAccountEnabled)); | ||
2764 | 523 | this._accountMgr.connect('account-removed', | ||
2765 | 524 | Lang.bind(this, this._onAccountRemoved)); | ||
2766 | 525 | this._accountMgr.prepare_async(null, Lang.bind(this, | ||
2767 | 526 | function(mgr) { | ||
2768 | 527 | let [presence, s, msg] = mgr.get_most_available_presence(); | ||
2769 | 528 | this._updatePresenceIcon(mgr, presence, s, msg); | ||
2770 | 529 | this._setupAccounts(); | ||
2771 | 530 | })); | ||
2772 | 531 | |||
2773 | 532 | this._name = new St.Label(); | ||
2774 | 533 | this.actor.label_actor = this._name; | ||
2775 | 534 | box.add(this._name, { y_align: St.Align.MIDDLE, y_fill: false }); | ||
2776 | 535 | this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName)); | ||
2777 | 536 | this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName)); | ||
2778 | 537 | this._updateUserName(); | ||
2779 | 538 | |||
2780 | 539 | this._createSubMenu(); | ||
2781 | 540 | |||
2782 | 541 | this._updateSwitch(this._presence.status); | ||
2783 | 542 | this._presence.connectSignal('StatusChanged', Lang.bind(this, function (proxy, senderName, [status]) { | ||
2784 | 543 | this._updateSwitch(status); | ||
2785 | 544 | })); | ||
2786 | 545 | |||
2787 | 546 | this._userManager.connect('notify::is-loaded', | ||
2788 | 547 | Lang.bind(this, this._updateMultiUser)); | ||
2789 | 548 | this._userManager.connect('notify::has-multiple-users', | ||
2790 | 549 | Lang.bind(this, this._updateMultiUser)); | ||
2791 | 550 | this._userManager.connect('user-added', | ||
2792 | 551 | Lang.bind(this, this._updateMultiUser)); | ||
2793 | 552 | this._userManager.connect('user-removed', | ||
2794 | 553 | Lang.bind(this, this._updateMultiUser)); | ||
2795 | 554 | this._lockdownSettings.connect('changed::' + DISABLE_USER_SWITCH_KEY, | ||
2796 | 555 | Lang.bind(this, this._updateSwitchUser)); | ||
2797 | 556 | this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY, | ||
2798 | 557 | Lang.bind(this, this._updateLogout)); | ||
2799 | 558 | |||
2800 | 559 | this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY, | ||
2801 | 560 | Lang.bind(this, this._updateLockScreen)); | ||
2802 | 561 | this._updateSwitchUser(); | ||
2803 | 562 | this._updateLogout(); | ||
2804 | 563 | this._updateLockScreen(); | ||
2805 | 564 | |||
2806 | 565 | this._updatesFile = Gio.File.new_for_path('/var/lib/PackageKit/prepared-update'); | ||
2807 | 566 | this._updatesMonitor = this._updatesFile.monitor(Gio.FileMonitorFlags.NONE, null); | ||
2808 | 567 | this._updatesMonitor.connect('changed', Lang.bind(this, this._updateInstallUpdates)); | ||
2809 | 568 | |||
2810 | 569 | // Whether shutdown is available or not depends on both lockdown | ||
2811 | 570 | // settings (disable-log-out) and Polkit policy - the latter doesn't | ||
2812 | 571 | // notify, so we update the menu item each time the menu opens or | ||
2813 | 572 | // the lockdown setting changes, which should be close enough. | ||
2814 | 573 | this.menu.connect('open-state-changed', Lang.bind(this, | ||
2815 | 574 | function(menu, open) { | ||
2816 | 575 | if (open) | ||
2817 | 576 | this._updateHaveShutdown(); | ||
2818 | 577 | })); | ||
2819 | 578 | this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY, | ||
2820 | 579 | Lang.bind(this, this._updateHaveShutdown)); | ||
2821 | 580 | |||
2822 | 581 | this._upClient.connect('notify::can-suspend', Lang.bind(this, this._updateSuspendOrPowerOff)); | ||
2823 | 582 | |||
2824 | 583 | Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated)); | ||
2825 | 584 | this._sessionUpdated(); | ||
2826 | 585 | }, | ||
2827 | 586 | |||
2828 | 587 | _sessionUpdated: function() { | ||
2829 | 588 | this.actor.visible = !Main.sessionMode.isGreeter; | ||
2830 | 589 | |||
2831 | 590 | let allowSettings = Main.sessionMode.allowSettings; | ||
2832 | 591 | this._statusChooser.setSensitive(allowSettings); | ||
2833 | 592 | this._systemSettings.visible = allowSettings; | ||
2834 | 593 | |||
2835 | 594 | this.setSensitive(!Main.sessionMode.isLocked); | ||
2836 | 595 | this._updatePresenceIcon(); | ||
2837 | 596 | }, | ||
2838 | 597 | |||
2839 | 598 | _onDestroy: function() { | ||
2840 | 599 | this._user.disconnect(this._userLoadedId); | ||
2841 | 600 | this._user.disconnect(this._userChangedId); | ||
2842 | 601 | }, | ||
2843 | 602 | |||
2844 | 603 | _updateUserName: function() { | ||
2845 | 604 | if (this._user.is_loaded) | ||
2846 | 605 | this._name.set_text(this._user.get_real_name()); | ||
2847 | 606 | else | ||
2848 | 607 | this._name.set_text(""); | ||
2849 | 608 | }, | ||
2850 | 609 | |||
2851 | 610 | _updateMultiUser: function() { | ||
2852 | 611 | this._updateSwitchUser(); | ||
2853 | 612 | this._updateLogout(); | ||
2854 | 613 | }, | ||
2855 | 614 | |||
2856 | 615 | _updateSwitchUser: function() { | ||
2857 | 616 | let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY); | ||
2858 | 617 | let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users; | ||
2859 | 618 | |||
2860 | 619 | this._loginScreenItem.actor.visible = allowSwitch && multiUser; | ||
2861 | 620 | }, | ||
2862 | 621 | |||
2863 | 622 | _updateLogout: function() { | ||
2864 | 623 | let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY); | ||
2865 | 624 | let alwaysShow = global.settings.get_boolean(ALWAYS_SHOW_LOG_OUT_KEY); | ||
2866 | 625 | let systemAccount = this._user.system_account; | ||
2867 | 626 | let localAccount = this._user.local_account; | ||
2868 | 627 | let multiUser = this._userManager.has_multiple_users; | ||
2869 | 628 | let multiSession = Gdm.get_session_ids().length > 1; | ||
2870 | 629 | |||
2871 | 630 | this._logoutItem.actor.visible = allowLogout && (alwaysShow || multiUser || multiSession || systemAccount || !localAccount); | ||
2872 | 631 | }, | ||
2873 | 632 | |||
2874 | 633 | _updateLockScreen: function() { | ||
2875 | 634 | let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY); | ||
2876 | 635 | this._lockScreenItem.actor.visible = allowLockScreen; | ||
2877 | 636 | }, | ||
2878 | 637 | |||
2879 | 638 | _updateInstallUpdates: function() { | ||
2880 | 639 | let haveUpdates = this._updatesFile.query_exists(null); | ||
2881 | 640 | this._installUpdatesItem.actor.visible = haveUpdates && this._haveShutdown; | ||
2882 | 641 | }, | ||
2883 | 642 | |||
2884 | 643 | _updateHaveShutdown: function() { | ||
2885 | 644 | this._session.CanShutdownRemote(Lang.bind(this, | ||
2886 | 645 | function(result, error) { | ||
2887 | 646 | if (!error) { | ||
2888 | 647 | this._haveShutdown = result[0]; | ||
2889 | 648 | this._updateInstallUpdates(); | ||
2890 | 649 | this._updateSuspendOrPowerOff(); | ||
2891 | 650 | } | ||
2892 | 651 | })); | ||
2893 | 652 | }, | ||
2894 | 653 | |||
2895 | 654 | _updateSuspendOrPowerOff: function() { | ||
2896 | 655 | this._haveSuspend = this._upClient.get_can_suspend(); | ||
2897 | 656 | |||
2898 | 657 | if (!this._suspendOrPowerOffItem) | ||
2899 | 658 | return; | ||
2900 | 659 | |||
2901 | 660 | this._suspendOrPowerOffItem.actor.visible = this._haveShutdown || this._haveSuspend; | ||
2902 | 661 | |||
2903 | 662 | // If we can't power off show Suspend instead | ||
2904 | 663 | // and disable the alt key | ||
2905 | 664 | if (!this._haveShutdown) { | ||
2906 | 665 | this._suspendOrPowerOffItem.updateText(_("Suspend"), null); | ||
2907 | 666 | } else if (!this._haveSuspend) { | ||
2908 | 667 | this._suspendOrPowerOffItem.updateText(_("Power Off"), null); | ||
2909 | 668 | } else { | ||
2910 | 669 | this._suspendOrPowerOffItem.updateText(_("Power Off"), _("Suspend")); | ||
2911 | 670 | } | ||
2912 | 671 | }, | ||
2913 | 672 | |||
2914 | 673 | _updateSwitch: function(status) { | ||
2915 | 674 | let active = status == GnomeSession.PresenceStatus.AVAILABLE; | ||
2916 | 675 | this._notificationsSwitch.setToggleState(active); | ||
2917 | 676 | }, | ||
2918 | 677 | |||
2919 | 678 | _updatePresenceIcon: function(accountMgr, presence, status, message) { | ||
2920 | 679 | if (Main.sessionMode.isLocked) | ||
2921 | 680 | this._iconBox.child = this._lockedIcon; | ||
2922 | 681 | else if (presence == Tp.ConnectionPresenceType.AVAILABLE) | ||
2923 | 682 | this._iconBox.child = this._availableIcon; | ||
2924 | 683 | else if (presence == Tp.ConnectionPresenceType.BUSY) | ||
2925 | 684 | this._iconBox.child = this._busyIcon; | ||
2926 | 685 | else if (presence == Tp.ConnectionPresenceType.HIDDEN) | ||
2927 | 686 | this._iconBox.child = this._invisibleIcon; | ||
2928 | 687 | else if (presence == Tp.ConnectionPresenceType.AWAY) | ||
2929 | 688 | this._iconBox.child = this._awayIcon; | ||
2930 | 689 | else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY) | ||
2931 | 690 | this._iconBox.child = this._idleIcon; | ||
2932 | 691 | else | ||
2933 | 692 | this._iconBox.child = this._offlineIcon; | ||
2934 | 693 | }, | ||
2935 | 694 | |||
2936 | 695 | _setupAccounts: function() { | ||
2937 | 696 | let accounts = this._accountMgr.get_valid_accounts(); | ||
2938 | 697 | for (let i = 0; i < accounts.length; i++) { | ||
2939 | 698 | accounts[i]._changingId = accounts[i].connect('notify::connection-status', | ||
2940 | 699 | Lang.bind(this, this._updateChangingPresence)); | ||
2941 | 700 | } | ||
2942 | 701 | this._updateChangingPresence(); | ||
2943 | 702 | }, | ||
2944 | 703 | |||
2945 | 704 | _onAccountEnabled: function(accountMgr, account) { | ||
2946 | 705 | if (!account._changingId) | ||
2947 | 706 | account._changingId = account.connect('notify::connection-status', | ||
2948 | 707 | Lang.bind(this, this._updateChangingPresence)); | ||
2949 | 708 | this._updateChangingPresence(); | ||
2950 | 709 | }, | ||
2951 | 710 | |||
2952 | 711 | _onAccountRemoved: function(accountMgr, account) { | ||
2953 | 712 | if (account._changingId) { | ||
2954 | 713 | account.disconnect(account._changingId); | ||
2955 | 714 | account._changingId = 0; | ||
2956 | 715 | } | ||
2957 | 716 | this._updateChangingPresence(); | ||
2958 | 717 | }, | ||
2959 | 718 | |||
2960 | 719 | _updateChangingPresence: function() { | ||
2961 | 720 | let accounts = this._accountMgr.get_valid_accounts(); | ||
2962 | 721 | let changing = false; | ||
2963 | 722 | for (let i = 0; i < accounts.length; i++) { | ||
2964 | 723 | if (accounts[i].connection_status == Tp.ConnectionStatus.CONNECTING) { | ||
2965 | 724 | changing = true; | ||
2966 | 725 | break; | ||
2967 | 726 | } | ||
2968 | 727 | } | ||
2969 | 728 | |||
2970 | 729 | if (changing) { | ||
2971 | 730 | this._iconBox.child = this._pendingIcon; | ||
2972 | 731 | } else { | ||
2973 | 732 | let [presence, s, msg] = this._accountMgr.get_most_available_presence(); | ||
2974 | 733 | this._updatePresenceIcon(this._accountMgr, presence, s, msg); | ||
2975 | 734 | } | ||
2976 | 735 | }, | ||
2977 | 736 | |||
2978 | 737 | _createSubMenu: function() { | ||
2979 | 738 | let item; | ||
2980 | 739 | |||
2981 | 740 | item = new IMStatusChooserItem(); | ||
2982 | 741 | item.connect('activate', Lang.bind(this, this._onMyAccountActivate)); | ||
2983 | 742 | this.menu.addMenuItem(item); | ||
2984 | 743 | this._statusChooser = item; | ||
2985 | 744 | |||
2986 | 745 | item = new PopupMenu.PopupSwitchMenuItem(_("Notifications")); | ||
2987 | 746 | item.connect('toggled', Lang.bind(this, this._updatePresenceStatus)); | ||
2988 | 747 | this.menu.addMenuItem(item); | ||
2989 | 748 | this._notificationsSwitch = item; | ||
2990 | 749 | |||
2991 | 750 | item = new PopupMenu.PopupSeparatorMenuItem(); | ||
2992 | 751 | this.menu.addMenuItem(item); | ||
2993 | 752 | |||
2994 | 753 | item = new PopupMenu.PopupMenuItem(_("System Settings")); | ||
2995 | 754 | item.connect('activate', Lang.bind(this, this._onPreferencesActivate)); | ||
2996 | 755 | this.menu.addMenuItem(item); | ||
2997 | 756 | this._systemSettings = item; | ||
2998 | 757 | |||
2999 | 758 | item = new PopupMenu.PopupSeparatorMenuItem(); | ||
3000 | 759 | this.menu.addMenuItem(item); | ||
3001 | 760 | |||
3002 | 761 | item = new PopupMenu.PopupMenuItem(_("Switch User")); | ||
3003 | 762 | item.connect('activate', Lang.bind(this, this._onLoginScreenActivate)); | ||
3004 | 763 | this.menu.addMenuItem(item); | ||
3005 | 764 | this._loginScreenItem = item; | ||
3006 | 765 | |||
3007 | 766 | item = new PopupMenu.PopupMenuItem(_("Log Out")); | ||
3008 | 767 | item.connect('activate', Lang.bind(this, this._onQuitSessionActivate)); | ||
3009 | 768 | this.menu.addMenuItem(item); | ||
3010 | 769 | this._logoutItem = item; | ||
3011 | 770 | |||
3012 | 771 | item = new PopupMenu.PopupMenuItem(_("Lock")); | ||
3013 | 772 | item.connect('activate', Lang.bind(this, this._onLockScreenActivate)); | ||
3014 | 773 | this.menu.addMenuItem(item); | ||
3015 | 774 | this._lockScreenItem = item; | ||
3016 | 775 | |||
3017 | 776 | item = new PopupMenu.PopupSeparatorMenuItem(); | ||
3018 | 777 | this.menu.addMenuItem(item); | ||
3019 | 778 | |||
3020 | 779 | item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"), | ||
3021 | 780 | _("Suspend")); | ||
3022 | 781 | this.menu.addMenuItem(item); | ||
3023 | 782 | item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate)); | ||
3024 | 783 | this._suspendOrPowerOffItem = item; | ||
3025 | 784 | this._updateSuspendOrPowerOff(); | ||
3026 | 785 | |||
3027 | 786 | item = new PopupMenu.PopupMenuItem(_("Install Updates & Restart")); | ||
3028 | 787 | item.connect('activate', Lang.bind(this, this._onInstallUpdatesActivate)); | ||
3029 | 788 | this.menu.addMenuItem(item); | ||
3030 | 789 | this._installUpdatesItem = item; | ||
3031 | 790 | }, | ||
3032 | 791 | |||
3033 | 792 | _updatePresenceStatus: function(item, event) { | ||
3034 | 793 | let status; | ||
3035 | 794 | |||
3036 | 795 | if (item.state) { | ||
3037 | 796 | status = GnomeSession.PresenceStatus.AVAILABLE; | ||
3038 | 797 | } else { | ||
3039 | 798 | status = GnomeSession.PresenceStatus.BUSY; | ||
3040 | 799 | |||
3041 | 800 | let [presence, s, msg] = this._accountMgr.get_most_available_presence(); | ||
3042 | 801 | let newPresence = this._statusChooser.getIMPresenceForSessionStatus(status); | ||
3043 | 802 | if (newPresence != presence && | ||
3044 | 803 | newPresence == Tp.ConnectionPresenceType.BUSY) | ||
3045 | 804 | Main.notify(_("Your chat status will be set to busy"), | ||
3046 | 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.")); | ||
3047 | 806 | } | ||
3048 | 807 | |||
3049 | 808 | this._presence.status = status; | ||
3050 | 809 | }, | ||
3051 | 810 | |||
3052 | 811 | _onMyAccountActivate: function() { | ||
3053 | 812 | Main.overview.hide(); | ||
3054 | 813 | let app = Shell.AppSystem.get_default().lookup_setting('gnome-user-accounts-panel.desktop'); | ||
3055 | 814 | app.activate(); | ||
3056 | 815 | }, | ||
3057 | 816 | |||
3058 | 817 | _onPreferencesActivate: function() { | ||
3059 | 818 | Main.overview.hide(); | ||
3060 | 819 | let app = Shell.AppSystem.get_default().lookup_app('gnome-control-center.desktop'); | ||
3061 | 820 | app.activate(); | ||
3062 | 821 | }, | ||
3063 | 822 | |||
3064 | 823 | _onLockScreenActivate: function() { | ||
3065 | 824 | this.menu.close(BoxPointer.PopupAnimation.NONE); | ||
3066 | 825 | Main.overview.hide(); | ||
3067 | 826 | Main.screenShield.lock(true); | ||
3068 | 827 | }, | ||
3069 | 828 | |||
3070 | 829 | _onLoginScreenActivate: function() { | ||
3071 | 830 | this.menu.close(BoxPointer.PopupAnimation.NONE); | ||
3072 | 831 | Main.overview.hide(); | ||
3073 | 832 | Main.screenShield.lock(false); | ||
3074 | 833 | if (UnlockDialog.isSupported()) | ||
3075 | 834 | Gdm.goto_login_session_sync(null); | ||
3076 | 835 | else | ||
3077 | 836 | this._lightdmLoginSession(); | ||
3078 | 837 | }, | ||
3079 | 838 | |||
3080 | 839 | _onQuitSessionActivate: function() { | ||
3081 | 840 | Main.overview.hide(); | ||
3082 | 841 | this._session.LogoutRemote(0); | ||
3083 | 842 | }, | ||
3084 | 843 | |||
3085 | 844 | _onInstallUpdatesActivate: function() { | ||
3086 | 845 | Main.overview.hide(); | ||
3087 | 846 | Util.spawn(['pkexec', '/usr/libexec/pk-trigger-offline-update']); | ||
3088 | 847 | |||
3089 | 848 | this._session.RebootRemote(); | ||
3090 | 849 | }, | ||
3091 | 850 | |||
3092 | 851 | _onSuspendOrPowerOffActivate: function() { | ||
3093 | 852 | Main.overview.hide(); | ||
3094 | 853 | |||
3095 | 854 | if (this._haveShutdown && | ||
3096 | 855 | this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) { | ||
3097 | 856 | this._session.ShutdownRemote(); | ||
3098 | 857 | } else { | ||
3099 | 858 | if (this._screenSaverSettings.get_boolean(LOCK_ENABLED_KEY)) { | ||
3100 | 859 | let tmpId = Main.screenShield.connect('lock-screen-shown', Lang.bind(this, function() { | ||
3101 | 860 | Main.screenShield.disconnect(tmpId); | ||
3102 | 861 | |||
3103 | 862 | this._upClient.suspend_sync(null); | ||
3104 | 863 | })); | ||
3105 | 864 | |||
3106 | 865 | this.menu.close(BoxPointer.PopupAnimation.NONE); | ||
3107 | 866 | Main.screenShield.lock(true); | ||
3108 | 867 | } else { | ||
3109 | 868 | this._upClient.suspend_sync(null); | ||
3110 | 869 | } | ||
3111 | 870 | } | ||
3112 | 871 | }, | ||
3113 | 872 | _lightdmLoginSession: function() { | ||
3114 | 873 | try { | ||
3115 | 874 | let seat = GLib.getenv("XDG_SEAT_PATH"); | ||
3116 | 875 | let result = Gio.DBus.system.call_sync('org.freedesktop.DisplayManager', | ||
3117 | 876 | seat, | ||
3118 | 877 | 'org.freedesktop.DisplayManager.Seat', | ||
3119 | 878 | 'SwitchToGreeter', null, null, | ||
3120 | 879 | Gio.DBusCallFlags.NONE, | ||
3121 | 880 | -1, null); | ||
3122 | 881 | } catch(e) { | ||
3123 | 882 | Main.screenShield.lock(); | ||
3124 | 883 | } | ||
3125 | 884 | } | ||
3126 | 885 | }); | ||
3127 | 886 | 0 | ||
3128 | === modified file 'Makefile.in' | |||
3129 | --- Makefile.in 2012-11-26 15:57:51 +0000 | |||
3130 | +++ Makefile.in 2013-02-24 03:10:25 +0000 | |||
3131 | @@ -61,8 +61,7 @@ | |||
3132 | 61 | $(top_srcdir)/src/calendar-server/evolution-calendar.desktop.in.in \ | 61 | $(top_srcdir)/src/calendar-server/evolution-calendar.desktop.in.in \ |
3133 | 62 | ABOUT-NLS AUTHORS COPYING NEWS config/compile \ | 62 | ABOUT-NLS AUTHORS COPYING NEWS config/compile \ |
3134 | 63 | config/config.guess config/config.rpath config/config.sub \ | 63 | config/config.guess config/config.rpath config/config.sub \ |
3137 | 64 | config/depcomp config/install-sh config/ltmain.sh \ | 64 | config/install-sh config/ltmain.sh config/missing |
3136 | 65 | config/missing | ||
3138 | 66 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | 65 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
3139 | 67 | am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ | 66 | am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ |
3140 | 68 | $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ | 67 | $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ |
3141 | 69 | 68 | ||
3142 | === modified file 'NEWS' | |||
3143 | --- NEWS 2012-11-26 15:57:51 +0000 | |||
3144 | +++ NEWS 2013-02-24 03:10:25 +0000 | |||
3145 | @@ -1,3 +1,31 @@ | |||
3146 | 1 | 3.6.3.1 | ||
3147 | 2 | ======= | ||
3148 | 3 | * Fix regression in reentrancy fix for 3.6.3 [Giovanni; #689295] | ||
3149 | 4 | |||
3150 | 5 | Contributors: | ||
3151 | 6 | Giovanni Campagna | ||
3152 | 7 | |||
3153 | 8 | Translations: | ||
3154 | 9 | Rafael Ferreira [pt_BR] | ||
3155 | 10 | |||
3156 | 11 | 3.6.3 | ||
3157 | 12 | ===== | ||
3158 | 13 | * recorder: Set frame duration to fix broken video headers [Adel; #688487] | ||
3159 | 14 | * Block cancellation of unlock dialog during drags [Giovanni; #686800] | ||
3160 | 15 | * Honor lock-delay GSettings key [Giovanni, Matthias; #690766, #691170] | ||
3161 | 16 | * Fix reentrancy problem causing the tray to disappear [Giovanni; #683986] | ||
3162 | 17 | |||
3163 | 18 | Contributors: | ||
3164 | 19 | Giovanni Campagna, Matthias Clasen, Adel Gadllah, | ||
3165 | 20 | |||
3166 | 21 | Translations: | ||
3167 | 22 | Mattias Põldaru [et], Sandeep Sheshrao Shedmake [mr], Wouter Bolsterlee [nl], | ||
3168 | 23 | Rajesh Ranjan [hi], Nilamdyuti Goswami [as], Ani Peter [ml], | ||
3169 | 24 | Andika Triwidada [id], Krishnababu Krothapalli [te], Shankar Prasad [kn], | ||
3170 | 25 | Dr.T.Vasudevan [ta], Runa Bhattacharjee [bn_IN], Rafael Ferreira [pt_BR], | ||
3171 | 26 | Balázs Úr [hu], Gheyret Kenji [ug], Yasumichi Akahoshi [ja], Yoji TOYODA [ja], | ||
3172 | 27 | Alexandre Franke [fr] | ||
3173 | 28 | |||
3174 | 1 | 3.6.2 | 29 | 3.6.2 |
3175 | 2 | ===== | 30 | ===== |
3176 | 3 | * Implement org.gnome.ScreenSaver.GetActiveTime [Giovanni; #686064] | 31 | * Implement org.gnome.ScreenSaver.GetActiveTime [Giovanni; #686064] |
3177 | 4 | 32 | ||
3178 | === modified file 'aclocal.m4' | |||
3179 | --- aclocal.m4 2012-09-07 11:40:48 +0000 | |||
3180 | +++ aclocal.m4 2013-02-24 03:10:25 +0000 | |||
3181 | @@ -19,6 +19,602 @@ | |||
3182 | 19 | If you have problems, you may need to regenerate the build system entirely. | 19 | If you have problems, you may need to regenerate the build system entirely. |
3183 | 20 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) | 20 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
3184 | 21 | 21 | ||
3185 | 22 | # Configure paths for GLIB | ||
3186 | 23 | # Owen Taylor 1997-2001 | ||
3187 | 24 | |||
3188 | 25 | dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) | ||
3189 | 26 | dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, | ||
3190 | 27 | dnl gthread, or gio is specified in MODULES, pass to pkg-config | ||
3191 | 28 | dnl | ||
3192 | 29 | AC_DEFUN([AM_PATH_GLIB_2_0], | ||
3193 | 30 | [dnl | ||
3194 | 31 | dnl Get the cflags and libraries from pkg-config | ||
3195 | 32 | dnl | ||
3196 | 33 | AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], | ||
3197 | 34 | , enable_glibtest=yes) | ||
3198 | 35 | |||
3199 | 36 | pkg_config_args=glib-2.0 | ||
3200 | 37 | for module in . $4 | ||
3201 | 38 | do | ||
3202 | 39 | case "$module" in | ||
3203 | 40 | gmodule) | ||
3204 | 41 | pkg_config_args="$pkg_config_args gmodule-2.0" | ||
3205 | 42 | ;; | ||
3206 | 43 | gmodule-no-export) | ||
3207 | 44 | pkg_config_args="$pkg_config_args gmodule-no-export-2.0" | ||
3208 | 45 | ;; | ||
3209 | 46 | gobject) | ||
3210 | 47 | pkg_config_args="$pkg_config_args gobject-2.0" | ||
3211 | 48 | ;; | ||
3212 | 49 | gthread) | ||
3213 | 50 | pkg_config_args="$pkg_config_args gthread-2.0" | ||
3214 | 51 | ;; | ||
3215 | 52 | gio*) | ||
3216 | 53 | pkg_config_args="$pkg_config_args $module-2.0" | ||
3217 | 54 | ;; | ||
3218 | 55 | esac | ||
3219 | 56 | done | ||
3220 | 57 | |||
3221 | 58 | PKG_PROG_PKG_CONFIG([0.16]) | ||
3222 | 59 | |||
3223 | 60 | no_glib="" | ||
3224 | 61 | |||
3225 | 62 | if test "x$PKG_CONFIG" = x ; then | ||
3226 | 63 | no_glib=yes | ||
3227 | 64 | PKG_CONFIG=no | ||
3228 | 65 | fi | ||
3229 | 66 | |||
3230 | 67 | min_glib_version=ifelse([$1], ,2.0.0,$1) | ||
3231 | 68 | AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) | ||
3232 | 69 | |||
3233 | 70 | if test x$PKG_CONFIG != xno ; then | ||
3234 | 71 | ## don't try to run the test against uninstalled libtool libs | ||
3235 | 72 | if $PKG_CONFIG --uninstalled $pkg_config_args; then | ||
3236 | 73 | echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" | ||
3237 | 74 | enable_glibtest=no | ||
3238 | 75 | fi | ||
3239 | 76 | |||
3240 | 77 | if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then | ||
3241 | 78 | : | ||
3242 | 79 | else | ||
3243 | 80 | no_glib=yes | ||
3244 | 81 | fi | ||
3245 | 82 | fi | ||
3246 | 83 | |||
3247 | 84 | if test x"$no_glib" = x ; then | ||
3248 | 85 | GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` | ||
3249 | 86 | GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` | ||
3250 | 87 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` | ||
3251 | 88 | GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0` | ||
3252 | 89 | |||
3253 | 90 | GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` | ||
3254 | 91 | GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` | ||
3255 | 92 | glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
3256 | 93 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
3257 | 94 | glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
3258 | 95 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
3259 | 96 | glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
3260 | 97 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
3261 | 98 | if test "x$enable_glibtest" = "xyes" ; then | ||
3262 | 99 | ac_save_CFLAGS="$CFLAGS" | ||
3263 | 100 | ac_save_LIBS="$LIBS" | ||
3264 | 101 | CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
3265 | 102 | LIBS="$GLIB_LIBS $LIBS" | ||
3266 | 103 | dnl | ||
3267 | 104 | dnl Now check if the installed GLIB is sufficiently new. (Also sanity | ||
3268 | 105 | dnl checks the results of pkg-config to some extent) | ||
3269 | 106 | dnl | ||
3270 | 107 | rm -f conf.glibtest | ||
3271 | 108 | AC_TRY_RUN([ | ||
3272 | 109 | #include <glib.h> | ||
3273 | 110 | #include <stdio.h> | ||
3274 | 111 | #include <stdlib.h> | ||
3275 | 112 | |||
3276 | 113 | int | ||
3277 | 114 | main () | ||
3278 | 115 | { | ||
3279 | 116 | unsigned int major, minor, micro; | ||
3280 | 117 | char *tmp_version; | ||
3281 | 118 | |||
3282 | 119 | fclose (fopen ("conf.glibtest", "w")); | ||
3283 | 120 | |||
3284 | 121 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | ||
3285 | 122 | tmp_version = g_strdup("$min_glib_version"); | ||
3286 | 123 | if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) { | ||
3287 | 124 | printf("%s, bad version string\n", "$min_glib_version"); | ||
3288 | 125 | exit(1); | ||
3289 | 126 | } | ||
3290 | 127 | |||
3291 | 128 | if ((glib_major_version != $glib_config_major_version) || | ||
3292 | 129 | (glib_minor_version != $glib_config_minor_version) || | ||
3293 | 130 | (glib_micro_version != $glib_config_micro_version)) | ||
3294 | 131 | { | ||
3295 | 132 | printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", | ||
3296 | 133 | $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, | ||
3297 | 134 | glib_major_version, glib_minor_version, glib_micro_version); | ||
3298 | 135 | printf ("*** was found! If pkg-config was correct, then it is best\n"); | ||
3299 | 136 | printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); | ||
3300 | 137 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | ||
3301 | 138 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | ||
3302 | 139 | printf("*** required on your system.\n"); | ||
3303 | 140 | printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); | ||
3304 | 141 | printf("*** to point to the correct configuration files\n"); | ||
3305 | 142 | } | ||
3306 | 143 | else if ((glib_major_version != GLIB_MAJOR_VERSION) || | ||
3307 | 144 | (glib_minor_version != GLIB_MINOR_VERSION) || | ||
3308 | 145 | (glib_micro_version != GLIB_MICRO_VERSION)) | ||
3309 | 146 | { | ||
3310 | 147 | printf("*** GLIB header files (version %d.%d.%d) do not match\n", | ||
3311 | 148 | GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); | ||
3312 | 149 | printf("*** library (version %d.%d.%d)\n", | ||
3313 | 150 | glib_major_version, glib_minor_version, glib_micro_version); | ||
3314 | 151 | } | ||
3315 | 152 | else | ||
3316 | 153 | { | ||
3317 | 154 | if ((glib_major_version > major) || | ||
3318 | 155 | ((glib_major_version == major) && (glib_minor_version > minor)) || | ||
3319 | 156 | ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) | ||
3320 | 157 | { | ||
3321 | 158 | return 0; | ||
3322 | 159 | } | ||
3323 | 160 | else | ||
3324 | 161 | { | ||
3325 | 162 | printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", | ||
3326 | 163 | glib_major_version, glib_minor_version, glib_micro_version); | ||
3327 | 164 | printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", | ||
3328 | 165 | major, minor, micro); | ||
3329 | 166 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); | ||
3330 | 167 | printf("***\n"); | ||
3331 | 168 | printf("*** If you have already installed a sufficiently new version, this error\n"); | ||
3332 | 169 | printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); | ||
3333 | 170 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); | ||
3334 | 171 | printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); | ||
3335 | 172 | printf("*** correct copy of pkg-config. (In this case, you will have to\n"); | ||
3336 | 173 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | ||
3337 | 174 | printf("*** so that the correct libraries are found at run-time))\n"); | ||
3338 | 175 | } | ||
3339 | 176 | } | ||
3340 | 177 | return 1; | ||
3341 | 178 | } | ||
3342 | 179 | ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
3343 | 180 | CFLAGS="$ac_save_CFLAGS" | ||
3344 | 181 | LIBS="$ac_save_LIBS" | ||
3345 | 182 | fi | ||
3346 | 183 | fi | ||
3347 | 184 | if test "x$no_glib" = x ; then | ||
3348 | 185 | AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) | ||
3349 | 186 | ifelse([$2], , :, [$2]) | ||
3350 | 187 | else | ||
3351 | 188 | AC_MSG_RESULT(no) | ||
3352 | 189 | if test "$PKG_CONFIG" = "no" ; then | ||
3353 | 190 | echo "*** A new enough version of pkg-config was not found." | ||
3354 | 191 | echo "*** See http://www.freedesktop.org/software/pkgconfig/" | ||
3355 | 192 | else | ||
3356 | 193 | if test -f conf.glibtest ; then | ||
3357 | 194 | : | ||
3358 | 195 | else | ||
3359 | 196 | echo "*** Could not run GLIB test program, checking why..." | ||
3360 | 197 | ac_save_CFLAGS="$CFLAGS" | ||
3361 | 198 | ac_save_LIBS="$LIBS" | ||
3362 | 199 | CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
3363 | 200 | LIBS="$LIBS $GLIB_LIBS" | ||
3364 | 201 | AC_TRY_LINK([ | ||
3365 | 202 | #include <glib.h> | ||
3366 | 203 | #include <stdio.h> | ||
3367 | 204 | ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], | ||
3368 | 205 | [ echo "*** The test program compiled, but did not run. This usually means" | ||
3369 | 206 | echo "*** that the run-time linker is not finding GLIB or finding the wrong" | ||
3370 | 207 | echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" | ||
3371 | 208 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | ||
3372 | 209 | echo "*** to the installed location Also, make sure you have run ldconfig if that" | ||
3373 | 210 | echo "*** is required on your system" | ||
3374 | 211 | echo "***" | ||
3375 | 212 | echo "*** If you have an old version installed, it is best to remove it, although" | ||
3376 | 213 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], | ||
3377 | 214 | [ echo "*** The test program failed to compile or link. See the file config.log for the" | ||
3378 | 215 | echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) | ||
3379 | 216 | CFLAGS="$ac_save_CFLAGS" | ||
3380 | 217 | LIBS="$ac_save_LIBS" | ||
3381 | 218 | fi | ||
3382 | 219 | fi | ||
3383 | 220 | GLIB_CFLAGS="" | ||
3384 | 221 | GLIB_LIBS="" | ||
3385 | 222 | GLIB_GENMARSHAL="" | ||
3386 | 223 | GOBJECT_QUERY="" | ||
3387 | 224 | GLIB_MKENUMS="" | ||
3388 | 225 | GLIB_COMPILE_RESOURCES="" | ||
3389 | 226 | ifelse([$3], , :, [$3]) | ||
3390 | 227 | fi | ||
3391 | 228 | AC_SUBST(GLIB_CFLAGS) | ||
3392 | 229 | AC_SUBST(GLIB_LIBS) | ||
3393 | 230 | AC_SUBST(GLIB_GENMARSHAL) | ||
3394 | 231 | AC_SUBST(GOBJECT_QUERY) | ||
3395 | 232 | AC_SUBST(GLIB_MKENUMS) | ||
3396 | 233 | AC_SUBST(GLIB_COMPILE_RESOURCES) | ||
3397 | 234 | rm -f conf.glibtest | ||
3398 | 235 | ]) | ||
3399 | 236 | |||
3400 | 237 | dnl GLIB_GSETTINGS | ||
3401 | 238 | dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether | ||
3402 | 239 | dnl the schema should be compiled | ||
3403 | 240 | dnl | ||
3404 | 241 | |||
3405 | 242 | AC_DEFUN([GLIB_GSETTINGS], | ||
3406 | 243 | [ | ||
3407 | 244 | m4_pattern_allow([AM_V_GEN]) | ||
3408 | 245 | AC_ARG_ENABLE(schemas-compile, | ||
3409 | 246 | AS_HELP_STRING([--disable-schemas-compile], | ||
3410 | 247 | [Disable regeneration of gschemas.compiled on install]), | ||
3411 | 248 | [case ${enableval} in | ||
3412 | 249 | yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;; | ||
3413 | 250 | no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;; | ||
3414 | 251 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;; | ||
3415 | 252 | esac]) | ||
3416 | 253 | AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE]) | ||
3417 | 254 | PKG_PROG_PKG_CONFIG([0.16]) | ||
3418 | 255 | AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas]) | ||
3419 | 256 | if test x$cross_compiling != xyes; then | ||
3420 | 257 | GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0` | ||
3421 | 258 | else | ||
3422 | 259 | AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas) | ||
3423 | 260 | fi | ||
3424 | 261 | AC_SUBST(GLIB_COMPILE_SCHEMAS) | ||
3425 | 262 | if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then | ||
3426 | 263 | ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2]) | ||
3427 | 264 | else | ||
3428 | 265 | ifelse([$1],,[:],[$1]) | ||
3429 | 266 | fi | ||
3430 | 267 | |||
3431 | 268 | GSETTINGS_RULES=' | ||
3432 | 269 | .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas | ||
3433 | 270 | |||
3434 | 271 | mostlyclean-am: clean-gsettings-schemas | ||
3435 | 272 | |||
3436 | 273 | gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE)) | ||
3437 | 274 | |||
3438 | 275 | %.gschema.valid: %.gschema.xml $(gsettings__enum_file) | ||
3439 | 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 [$]@ | ||
3440 | 277 | |||
3441 | 278 | all-am: $(gsettings_SCHEMAS:.xml=.valid) | ||
3442 | 279 | uninstall-am: uninstall-gsettings-schemas | ||
3443 | 280 | install-data-am: install-gsettings-schemas | ||
3444 | 281 | |||
3445 | 282 | .SECONDARY: $(gsettings_SCHEMAS) | ||
3446 | 283 | |||
3447 | 284 | install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file) | ||
3448 | 285 | @$(NORMAL_INSTALL) | ||
3449 | 286 | if test -n "$^"; then \ | ||
3450 | 287 | test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \ | ||
3451 | 288 | $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \ | ||
3452 | 289 | test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \ | ||
3453 | 290 | fi | ||
3454 | 291 | |||
3455 | 292 | uninstall-gsettings-schemas: | ||
3456 | 293 | @$(NORMAL_UNINSTALL) | ||
3457 | 294 | @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \ | ||
3458 | 295 | files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ | ||
3459 | 296 | test -n "$$files" || exit 0; \ | ||
3460 | 297 | echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \ | ||
3461 | 298 | cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files | ||
3462 | 299 | test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) | ||
3463 | 300 | |||
3464 | 301 | clean-gsettings-schemas: | ||
3465 | 302 | rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file) | ||
3466 | 303 | |||
3467 | 304 | ifdef gsettings_ENUM_NAMESPACE | ||
3468 | 305 | $(gsettings__enum_file): $(gsettings_ENUM_FILES) | ||
3469 | 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 [$]@ | ||
3470 | 307 | endif | ||
3471 | 308 | ' | ||
3472 | 309 | _GSETTINGS_SUBST(GSETTINGS_RULES) | ||
3473 | 310 | ]) | ||
3474 | 311 | |||
3475 | 312 | dnl _GSETTINGS_SUBST(VARIABLE) | ||
3476 | 313 | dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST | ||
3477 | 314 | AC_DEFUN([_GSETTINGS_SUBST], | ||
3478 | 315 | [ | ||
3479 | 316 | AC_SUBST([$1]) | ||
3480 | 317 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) | ||
3481 | 318 | ] | ||
3482 | 319 | ) | ||
3483 | 320 | |||
3484 | 321 | dnl -*- mode: autoconf -*- | ||
3485 | 322 | dnl Copyright 2009 Johan Dahlin | ||
3486 | 323 | dnl | ||
3487 | 324 | dnl This file is free software; the author(s) gives unlimited | ||
3488 | 325 | dnl permission to copy and/or distribute it, with or without | ||
3489 | 326 | dnl modifications, as long as this notice is preserved. | ||
3490 | 327 | dnl | ||
3491 | 328 | |||
3492 | 329 | # serial 1 | ||
3493 | 330 | |||
3494 | 331 | m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], | ||
3495 | 332 | [ | ||
3496 | 333 | AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first | ||
3497 | 334 | AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first | ||
3498 | 335 | AC_BEFORE([LT_INIT],[$0])dnl setup libtool first | ||
3499 | 336 | |||
3500 | 337 | dnl enable/disable introspection | ||
3501 | 338 | m4_if([$2], [require], | ||
3502 | 339 | [dnl | ||
3503 | 340 | enable_introspection=yes | ||
3504 | 341 | ],[dnl | ||
3505 | 342 | AC_ARG_ENABLE(introspection, | ||
3506 | 343 | AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], | ||
3507 | 344 | [Enable introspection for this build]),, | ||
3508 | 345 | [enable_introspection=auto]) | ||
3509 | 346 | ])dnl | ||
3510 | 347 | |||
3511 | 348 | AC_MSG_CHECKING([for gobject-introspection]) | ||
3512 | 349 | |||
3513 | 350 | dnl presence/version checking | ||
3514 | 351 | AS_CASE([$enable_introspection], | ||
3515 | 352 | [no], [dnl | ||
3516 | 353 | found_introspection="no (disabled, use --enable-introspection to enable)" | ||
3517 | 354 | ],dnl | ||
3518 | 355 | [yes],[dnl | ||
3519 | 356 | PKG_CHECK_EXISTS([gobject-introspection-1.0],, | ||
3520 | 357 | AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) | ||
3521 | 358 | PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], | ||
3522 | 359 | found_introspection=yes, | ||
3523 | 360 | AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) | ||
3524 | 361 | ],dnl | ||
3525 | 362 | [auto],[dnl | ||
3526 | 363 | PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) | ||
3527 | 364 | dnl Canonicalize enable_introspection | ||
3528 | 365 | enable_introspection=$found_introspection | ||
3529 | 366 | ],dnl | ||
3530 | 367 | [dnl | ||
3531 | 368 | AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) | ||
3532 | 369 | ])dnl | ||
3533 | 370 | |||
3534 | 371 | AC_MSG_RESULT([$found_introspection]) | ||
3535 | 372 | |||
3536 | 373 | INTROSPECTION_SCANNER= | ||
3537 | 374 | INTROSPECTION_COMPILER= | ||
3538 | 375 | INTROSPECTION_GENERATE= | ||
3539 | 376 | INTROSPECTION_GIRDIR= | ||
3540 | 377 | INTROSPECTION_TYPELIBDIR= | ||
3541 | 378 | if test "x$found_introspection" = "xyes"; then | ||
3542 | 379 | INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` | ||
3543 | 380 | INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` | ||
3544 | 381 | INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` | ||
3545 | 382 | INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` | ||
3546 | 383 | INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" | ||
3547 | 384 | INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` | ||
3548 | 385 | INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` | ||
3549 | 386 | INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection | ||
3550 | 387 | fi | ||
3551 | 388 | AC_SUBST(INTROSPECTION_SCANNER) | ||
3552 | 389 | AC_SUBST(INTROSPECTION_COMPILER) | ||
3553 | 390 | AC_SUBST(INTROSPECTION_GENERATE) | ||
3554 | 391 | AC_SUBST(INTROSPECTION_GIRDIR) | ||
3555 | 392 | AC_SUBST(INTROSPECTION_TYPELIBDIR) | ||
3556 | 393 | AC_SUBST(INTROSPECTION_CFLAGS) | ||
3557 | 394 | AC_SUBST(INTROSPECTION_LIBS) | ||
3558 | 395 | AC_SUBST(INTROSPECTION_MAKEFILE) | ||
3559 | 396 | |||
3560 | 397 | AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") | ||
3561 | 398 | ]) | ||
3562 | 399 | |||
3563 | 400 | |||
3564 | 401 | dnl Usage: | ||
3565 | 402 | dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) | ||
3566 | 403 | |||
3567 | 404 | AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], | ||
3568 | 405 | [ | ||
3569 | 406 | _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) | ||
3570 | 407 | ]) | ||
3571 | 408 | |||
3572 | 409 | dnl Usage: | ||
3573 | 410 | dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) | ||
3574 | 411 | |||
3575 | 412 | |||
3576 | 413 | AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], | ||
3577 | 414 | [ | ||
3578 | 415 | _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) | ||
3579 | 416 | ]) | ||
3580 | 417 | |||
3581 | 418 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | ||
3582 | 419 | # serial 1 (pkg-config-0.24) | ||
3583 | 420 | # | ||
3584 | 421 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | ||
3585 | 422 | # | ||
3586 | 423 | # This program is free software; you can redistribute it and/or modify | ||
3587 | 424 | # it under the terms of the GNU General Public License as published by | ||
3588 | 425 | # the Free Software Foundation; either version 2 of the License, or | ||
3589 | 426 | # (at your option) any later version. | ||
3590 | 427 | # | ||
3591 | 428 | # This program is distributed in the hope that it will be useful, but | ||
3592 | 429 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3593 | 430 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
3594 | 431 | # General Public License for more details. | ||
3595 | 432 | # | ||
3596 | 433 | # You should have received a copy of the GNU General Public License | ||
3597 | 434 | # along with this program; if not, write to the Free Software | ||
3598 | 435 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
3599 | 436 | # | ||
3600 | 437 | # As a special exception to the GNU General Public License, if you | ||
3601 | 438 | # distribute this file as part of a program that contains a | ||
3602 | 439 | # configuration script generated by Autoconf, you may include it under | ||
3603 | 440 | # the same distribution terms that you use for the rest of that program. | ||
3604 | 441 | |||
3605 | 442 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | ||
3606 | 443 | # ---------------------------------- | ||
3607 | 444 | AC_DEFUN([PKG_PROG_PKG_CONFIG], | ||
3608 | 445 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | ||
3609 | 446 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) | ||
3610 | 447 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) | ||
3611 | 448 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) | ||
3612 | 449 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | ||
3613 | 450 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | ||
3614 | 451 | |||
3615 | 452 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | ||
3616 | 453 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | ||
3617 | 454 | fi | ||
3618 | 455 | if test -n "$PKG_CONFIG"; then | ||
3619 | 456 | _pkg_min_version=m4_default([$1], [0.9.0]) | ||
3620 | 457 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | ||
3621 | 458 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | ||
3622 | 459 | AC_MSG_RESULT([yes]) | ||
3623 | 460 | else | ||
3624 | 461 | AC_MSG_RESULT([no]) | ||
3625 | 462 | PKG_CONFIG="" | ||
3626 | 463 | fi | ||
3627 | 464 | fi[]dnl | ||
3628 | 465 | ])# PKG_PROG_PKG_CONFIG | ||
3629 | 466 | |||
3630 | 467 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
3631 | 468 | # | ||
3632 | 469 | # Check to see whether a particular set of modules exists. Similar | ||
3633 | 470 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. | ||
3634 | 471 | # | ||
3635 | 472 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
3636 | 473 | # only at the first occurence in configure.ac, so if the first place | ||
3637 | 474 | # it's called might be skipped (such as if it is within an "if", you | ||
3638 | 475 | # have to call PKG_CHECK_EXISTS manually | ||
3639 | 476 | # -------------------------------------------------------------- | ||
3640 | 477 | AC_DEFUN([PKG_CHECK_EXISTS], | ||
3641 | 478 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
3642 | 479 | if test -n "$PKG_CONFIG" && \ | ||
3643 | 480 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | ||
3644 | 481 | m4_default([$2], [:]) | ||
3645 | 482 | m4_ifvaln([$3], [else | ||
3646 | 483 | $3])dnl | ||
3647 | 484 | fi]) | ||
3648 | 485 | |||
3649 | 486 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | ||
3650 | 487 | # --------------------------------------------- | ||
3651 | 488 | m4_define([_PKG_CONFIG], | ||
3652 | 489 | [if test -n "$$1"; then | ||
3653 | 490 | pkg_cv_[]$1="$$1" | ||
3654 | 491 | elif test -n "$PKG_CONFIG"; then | ||
3655 | 492 | PKG_CHECK_EXISTS([$3], | ||
3656 | 493 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` | ||
3657 | 494 | test "x$?" != "x0" && pkg_failed=yes ], | ||
3658 | 495 | [pkg_failed=yes]) | ||
3659 | 496 | else | ||
3660 | 497 | pkg_failed=untried | ||
3661 | 498 | fi[]dnl | ||
3662 | 499 | ])# _PKG_CONFIG | ||
3663 | 500 | |||
3664 | 501 | # _PKG_SHORT_ERRORS_SUPPORTED | ||
3665 | 502 | # ----------------------------- | ||
3666 | 503 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | ||
3667 | 504 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
3668 | 505 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | ||
3669 | 506 | _pkg_short_errors_supported=yes | ||
3670 | 507 | else | ||
3671 | 508 | _pkg_short_errors_supported=no | ||
3672 | 509 | fi[]dnl | ||
3673 | 510 | ])# _PKG_SHORT_ERRORS_SUPPORTED | ||
3674 | 511 | |||
3675 | 512 | |||
3676 | 513 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | ||
3677 | 514 | # [ACTION-IF-NOT-FOUND]) | ||
3678 | 515 | # | ||
3679 | 516 | # | ||
3680 | 517 | # Note that if there is a possibility the first call to | ||
3681 | 518 | # PKG_CHECK_MODULES might not happen, you should be sure to include an | ||
3682 | 519 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | ||
3683 | 520 | # | ||
3684 | 521 | # | ||
3685 | 522 | # -------------------------------------------------------------- | ||
3686 | 523 | AC_DEFUN([PKG_CHECK_MODULES], | ||
3687 | 524 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
3688 | 525 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | ||
3689 | 526 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | ||
3690 | 527 | |||
3691 | 528 | pkg_failed=no | ||
3692 | 529 | AC_MSG_CHECKING([for $1]) | ||
3693 | 530 | |||
3694 | 531 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | ||
3695 | 532 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | ||
3696 | 533 | |||
3697 | 534 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | ||
3698 | 535 | and $1[]_LIBS to avoid the need to call pkg-config. | ||
3699 | 536 | See the pkg-config man page for more details.]) | ||
3700 | 537 | |||
3701 | 538 | if test $pkg_failed = yes; then | ||
3702 | 539 | AC_MSG_RESULT([no]) | ||
3703 | 540 | _PKG_SHORT_ERRORS_SUPPORTED | ||
3704 | 541 | if test $_pkg_short_errors_supported = yes; then | ||
3705 | 542 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` | ||
3706 | 543 | else | ||
3707 | 544 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` | ||
3708 | 545 | fi | ||
3709 | 546 | # Put the nasty error message in config.log where it belongs | ||
3710 | 547 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | ||
3711 | 548 | |||
3712 | 549 | m4_default([$4], [AC_MSG_ERROR( | ||
3713 | 550 | [Package requirements ($2) were not met: | ||
3714 | 551 | |||
3715 | 552 | $$1_PKG_ERRORS | ||
3716 | 553 | |||
3717 | 554 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | ||
3718 | 555 | installed software in a non-standard prefix. | ||
3719 | 556 | |||
3720 | 557 | _PKG_TEXT])[]dnl | ||
3721 | 558 | ]) | ||
3722 | 559 | elif test $pkg_failed = untried; then | ||
3723 | 560 | AC_MSG_RESULT([no]) | ||
3724 | 561 | m4_default([$4], [AC_MSG_FAILURE( | ||
3725 | 562 | [The pkg-config script could not be found or is too old. Make sure it | ||
3726 | 563 | is in your PATH or set the PKG_CONFIG environment variable to the full | ||
3727 | 564 | path to pkg-config. | ||
3728 | 565 | |||
3729 | 566 | _PKG_TEXT | ||
3730 | 567 | |||
3731 | 568 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl | ||
3732 | 569 | ]) | ||
3733 | 570 | else | ||
3734 | 571 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | ||
3735 | 572 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | ||
3736 | 573 | AC_MSG_RESULT([yes]) | ||
3737 | 574 | $3 | ||
3738 | 575 | fi[]dnl | ||
3739 | 576 | ])# PKG_CHECK_MODULES | ||
3740 | 577 | |||
3741 | 578 | |||
3742 | 579 | # PKG_INSTALLDIR(DIRECTORY) | ||
3743 | 580 | # ------------------------- | ||
3744 | 581 | # Substitutes the variable pkgconfigdir as the location where a module | ||
3745 | 582 | # should install pkg-config .pc files. By default the directory is | ||
3746 | 583 | # $libdir/pkgconfig, but the default can be changed by passing | ||
3747 | 584 | # DIRECTORY. The user can override through the --with-pkgconfigdir | ||
3748 | 585 | # parameter. | ||
3749 | 586 | AC_DEFUN([PKG_INSTALLDIR], | ||
3750 | 587 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) | ||
3751 | 588 | m4_pushdef([pkg_description], | ||
3752 | 589 | [pkg-config installation directory @<:@]pkg_default[@:>@]) | ||
3753 | 590 | AC_ARG_WITH([pkgconfigdir], | ||
3754 | 591 | [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, | ||
3755 | 592 | [with_pkgconfigdir=]pkg_default) | ||
3756 | 593 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) | ||
3757 | 594 | m4_popdef([pkg_default]) | ||
3758 | 595 | m4_popdef([pkg_description]) | ||
3759 | 596 | ]) dnl PKG_INSTALLDIR | ||
3760 | 597 | |||
3761 | 598 | |||
3762 | 599 | # PKG_NOARCH_INSTALLDIR(DIRECTORY) | ||
3763 | 600 | # ------------------------- | ||
3764 | 601 | # Substitutes the variable noarch_pkgconfigdir as the location where a | ||
3765 | 602 | # module should install arch-independent pkg-config .pc files. By | ||
3766 | 603 | # default the directory is $datadir/pkgconfig, but the default can be | ||
3767 | 604 | # changed by passing DIRECTORY. The user can override through the | ||
3768 | 605 | # --with-noarch-pkgconfigdir parameter. | ||
3769 | 606 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], | ||
3770 | 607 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) | ||
3771 | 608 | m4_pushdef([pkg_description], | ||
3772 | 609 | [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) | ||
3773 | 610 | AC_ARG_WITH([noarch-pkgconfigdir], | ||
3774 | 611 | [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, | ||
3775 | 612 | [with_noarch_pkgconfigdir=]pkg_default) | ||
3776 | 613 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) | ||
3777 | 614 | m4_popdef([pkg_default]) | ||
3778 | 615 | m4_popdef([pkg_description]) | ||
3779 | 616 | ]) dnl PKG_NOARCH_INSTALLDIR | ||
3780 | 617 | |||
3781 | 22 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. | 618 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. |
3782 | 23 | # | 619 | # |
3783 | 24 | # This file is free software; the Free Software Foundation | 620 | # This file is free software; the Free Software Foundation |
3784 | @@ -1362,602 +1958,6 @@ | |||
3785 | 1362 | AC_SUBST([am__untar]) | 1958 | AC_SUBST([am__untar]) |
3786 | 1363 | ]) # _AM_PROG_TAR | 1959 | ]) # _AM_PROG_TAR |
3787 | 1364 | 1960 | ||
3788 | 1365 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | ||
3789 | 1366 | # serial 1 (pkg-config-0.24) | ||
3790 | 1367 | # | ||
3791 | 1368 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | ||
3792 | 1369 | # | ||
3793 | 1370 | # This program is free software; you can redistribute it and/or modify | ||
3794 | 1371 | # it under the terms of the GNU General Public License as published by | ||
3795 | 1372 | # the Free Software Foundation; either version 2 of the License, or | ||
3796 | 1373 | # (at your option) any later version. | ||
3797 | 1374 | # | ||
3798 | 1375 | # This program is distributed in the hope that it will be useful, but | ||
3799 | 1376 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3800 | 1377 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
3801 | 1378 | # General Public License for more details. | ||
3802 | 1379 | # | ||
3803 | 1380 | # You should have received a copy of the GNU General Public License | ||
3804 | 1381 | # along with this program; if not, write to the Free Software | ||
3805 | 1382 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
3806 | 1383 | # | ||
3807 | 1384 | # As a special exception to the GNU General Public License, if you | ||
3808 | 1385 | # distribute this file as part of a program that contains a | ||
3809 | 1386 | # configuration script generated by Autoconf, you may include it under | ||
3810 | 1387 | # the same distribution terms that you use for the rest of that program. | ||
3811 | 1388 | |||
3812 | 1389 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | ||
3813 | 1390 | # ---------------------------------- | ||
3814 | 1391 | AC_DEFUN([PKG_PROG_PKG_CONFIG], | ||
3815 | 1392 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | ||
3816 | 1393 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) | ||
3817 | 1394 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) | ||
3818 | 1395 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) | ||
3819 | 1396 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | ||
3820 | 1397 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | ||
3821 | 1398 | |||
3822 | 1399 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | ||
3823 | 1400 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | ||
3824 | 1401 | fi | ||
3825 | 1402 | if test -n "$PKG_CONFIG"; then | ||
3826 | 1403 | _pkg_min_version=m4_default([$1], [0.9.0]) | ||
3827 | 1404 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | ||
3828 | 1405 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | ||
3829 | 1406 | AC_MSG_RESULT([yes]) | ||
3830 | 1407 | else | ||
3831 | 1408 | AC_MSG_RESULT([no]) | ||
3832 | 1409 | PKG_CONFIG="" | ||
3833 | 1410 | fi | ||
3834 | 1411 | fi[]dnl | ||
3835 | 1412 | ])# PKG_PROG_PKG_CONFIG | ||
3836 | 1413 | |||
3837 | 1414 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
3838 | 1415 | # | ||
3839 | 1416 | # Check to see whether a particular set of modules exists. Similar | ||
3840 | 1417 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. | ||
3841 | 1418 | # | ||
3842 | 1419 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
3843 | 1420 | # only at the first occurence in configure.ac, so if the first place | ||
3844 | 1421 | # it's called might be skipped (such as if it is within an "if", you | ||
3845 | 1422 | # have to call PKG_CHECK_EXISTS manually | ||
3846 | 1423 | # -------------------------------------------------------------- | ||
3847 | 1424 | AC_DEFUN([PKG_CHECK_EXISTS], | ||
3848 | 1425 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
3849 | 1426 | if test -n "$PKG_CONFIG" && \ | ||
3850 | 1427 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | ||
3851 | 1428 | m4_default([$2], [:]) | ||
3852 | 1429 | m4_ifvaln([$3], [else | ||
3853 | 1430 | $3])dnl | ||
3854 | 1431 | fi]) | ||
3855 | 1432 | |||
3856 | 1433 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | ||
3857 | 1434 | # --------------------------------------------- | ||
3858 | 1435 | m4_define([_PKG_CONFIG], | ||
3859 | 1436 | [if test -n "$$1"; then | ||
3860 | 1437 | pkg_cv_[]$1="$$1" | ||
3861 | 1438 | elif test -n "$PKG_CONFIG"; then | ||
3862 | 1439 | PKG_CHECK_EXISTS([$3], | ||
3863 | 1440 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` | ||
3864 | 1441 | test "x$?" != "x0" && pkg_failed=yes ], | ||
3865 | 1442 | [pkg_failed=yes]) | ||
3866 | 1443 | else | ||
3867 | 1444 | pkg_failed=untried | ||
3868 | 1445 | fi[]dnl | ||
3869 | 1446 | ])# _PKG_CONFIG | ||
3870 | 1447 | |||
3871 | 1448 | # _PKG_SHORT_ERRORS_SUPPORTED | ||
3872 | 1449 | # ----------------------------- | ||
3873 | 1450 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | ||
3874 | 1451 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
3875 | 1452 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | ||
3876 | 1453 | _pkg_short_errors_supported=yes | ||
3877 | 1454 | else | ||
3878 | 1455 | _pkg_short_errors_supported=no | ||
3879 | 1456 | fi[]dnl | ||
3880 | 1457 | ])# _PKG_SHORT_ERRORS_SUPPORTED | ||
3881 | 1458 | |||
3882 | 1459 | |||
3883 | 1460 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | ||
3884 | 1461 | # [ACTION-IF-NOT-FOUND]) | ||
3885 | 1462 | # | ||
3886 | 1463 | # | ||
3887 | 1464 | # Note that if there is a possibility the first call to | ||
3888 | 1465 | # PKG_CHECK_MODULES might not happen, you should be sure to include an | ||
3889 | 1466 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | ||
3890 | 1467 | # | ||
3891 | 1468 | # | ||
3892 | 1469 | # -------------------------------------------------------------- | ||
3893 | 1470 | AC_DEFUN([PKG_CHECK_MODULES], | ||
3894 | 1471 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
3895 | 1472 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | ||
3896 | 1473 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | ||
3897 | 1474 | |||
3898 | 1475 | pkg_failed=no | ||
3899 | 1476 | AC_MSG_CHECKING([for $1]) | ||
3900 | 1477 | |||
3901 | 1478 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | ||
3902 | 1479 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | ||
3903 | 1480 | |||
3904 | 1481 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | ||
3905 | 1482 | and $1[]_LIBS to avoid the need to call pkg-config. | ||
3906 | 1483 | See the pkg-config man page for more details.]) | ||
3907 | 1484 | |||
3908 | 1485 | if test $pkg_failed = yes; then | ||
3909 | 1486 | AC_MSG_RESULT([no]) | ||
3910 | 1487 | _PKG_SHORT_ERRORS_SUPPORTED | ||
3911 | 1488 | if test $_pkg_short_errors_supported = yes; then | ||
3912 | 1489 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` | ||
3913 | 1490 | else | ||
3914 | 1491 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` | ||
3915 | 1492 | fi | ||
3916 | 1493 | # Put the nasty error message in config.log where it belongs | ||
3917 | 1494 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | ||
3918 | 1495 | |||
3919 | 1496 | m4_default([$4], [AC_MSG_ERROR( | ||
3920 | 1497 | [Package requirements ($2) were not met: | ||
3921 | 1498 | |||
3922 | 1499 | $$1_PKG_ERRORS | ||
3923 | 1500 | |||
3924 | 1501 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | ||
3925 | 1502 | installed software in a non-standard prefix. | ||
3926 | 1503 | |||
3927 | 1504 | _PKG_TEXT])[]dnl | ||
3928 | 1505 | ]) | ||
3929 | 1506 | elif test $pkg_failed = untried; then | ||
3930 | 1507 | AC_MSG_RESULT([no]) | ||
3931 | 1508 | m4_default([$4], [AC_MSG_FAILURE( | ||
3932 | 1509 | [The pkg-config script could not be found or is too old. Make sure it | ||
3933 | 1510 | is in your PATH or set the PKG_CONFIG environment variable to the full | ||
3934 | 1511 | path to pkg-config. | ||
3935 | 1512 | |||
3936 | 1513 | _PKG_TEXT | ||
3937 | 1514 | |||
3938 | 1515 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl | ||
3939 | 1516 | ]) | ||
3940 | 1517 | else | ||
3941 | 1518 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | ||
3942 | 1519 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | ||
3943 | 1520 | AC_MSG_RESULT([yes]) | ||
3944 | 1521 | $3 | ||
3945 | 1522 | fi[]dnl | ||
3946 | 1523 | ])# PKG_CHECK_MODULES | ||
3947 | 1524 | |||
3948 | 1525 | |||
3949 | 1526 | # PKG_INSTALLDIR(DIRECTORY) | ||
3950 | 1527 | # ------------------------- | ||
3951 | 1528 | # Substitutes the variable pkgconfigdir as the location where a module | ||
3952 | 1529 | # should install pkg-config .pc files. By default the directory is | ||
3953 | 1530 | # $libdir/pkgconfig, but the default can be changed by passing | ||
3954 | 1531 | # DIRECTORY. The user can override through the --with-pkgconfigdir | ||
3955 | 1532 | # parameter. | ||
3956 | 1533 | AC_DEFUN([PKG_INSTALLDIR], | ||
3957 | 1534 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) | ||
3958 | 1535 | m4_pushdef([pkg_description], | ||
3959 | 1536 | [pkg-config installation directory @<:@]pkg_default[@:>@]) | ||
3960 | 1537 | AC_ARG_WITH([pkgconfigdir], | ||
3961 | 1538 | [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, | ||
3962 | 1539 | [with_pkgconfigdir=]pkg_default) | ||
3963 | 1540 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) | ||
3964 | 1541 | m4_popdef([pkg_default]) | ||
3965 | 1542 | m4_popdef([pkg_description]) | ||
3966 | 1543 | ]) dnl PKG_INSTALLDIR | ||
3967 | 1544 | |||
3968 | 1545 | |||
3969 | 1546 | # PKG_NOARCH_INSTALLDIR(DIRECTORY) | ||
3970 | 1547 | # ------------------------- | ||
3971 | 1548 | # Substitutes the variable noarch_pkgconfigdir as the location where a | ||
3972 | 1549 | # module should install arch-independent pkg-config .pc files. By | ||
3973 | 1550 | # default the directory is $datadir/pkgconfig, but the default can be | ||
3974 | 1551 | # changed by passing DIRECTORY. The user can override through the | ||
3975 | 1552 | # --with-noarch-pkgconfigdir parameter. | ||
3976 | 1553 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], | ||
3977 | 1554 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) | ||
3978 | 1555 | m4_pushdef([pkg_description], | ||
3979 | 1556 | [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) | ||
3980 | 1557 | AC_ARG_WITH([noarch-pkgconfigdir], | ||
3981 | 1558 | [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, | ||
3982 | 1559 | [with_noarch_pkgconfigdir=]pkg_default) | ||
3983 | 1560 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) | ||
3984 | 1561 | m4_popdef([pkg_default]) | ||
3985 | 1562 | m4_popdef([pkg_description]) | ||
3986 | 1563 | ]) dnl PKG_NOARCH_INSTALLDIR | ||
3987 | 1564 | |||
3988 | 1565 | # Configure paths for GLIB | ||
3989 | 1566 | # Owen Taylor 1997-2001 | ||
3990 | 1567 | |||
3991 | 1568 | dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) | ||
3992 | 1569 | dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, | ||
3993 | 1570 | dnl gthread, or gio is specified in MODULES, pass to pkg-config | ||
3994 | 1571 | dnl | ||
3995 | 1572 | AC_DEFUN([AM_PATH_GLIB_2_0], | ||
3996 | 1573 | [dnl | ||
3997 | 1574 | dnl Get the cflags and libraries from pkg-config | ||
3998 | 1575 | dnl | ||
3999 | 1576 | AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], | ||
4000 | 1577 | , enable_glibtest=yes) | ||
4001 | 1578 | |||
4002 | 1579 | pkg_config_args=glib-2.0 | ||
4003 | 1580 | for module in . $4 | ||
4004 | 1581 | do | ||
4005 | 1582 | case "$module" in | ||
4006 | 1583 | gmodule) | ||
4007 | 1584 | pkg_config_args="$pkg_config_args gmodule-2.0" | ||
4008 | 1585 | ;; | ||
4009 | 1586 | gmodule-no-export) | ||
4010 | 1587 | pkg_config_args="$pkg_config_args gmodule-no-export-2.0" | ||
4011 | 1588 | ;; | ||
4012 | 1589 | gobject) | ||
4013 | 1590 | pkg_config_args="$pkg_config_args gobject-2.0" | ||
4014 | 1591 | ;; | ||
4015 | 1592 | gthread) | ||
4016 | 1593 | pkg_config_args="$pkg_config_args gthread-2.0" | ||
4017 | 1594 | ;; | ||
4018 | 1595 | gio*) | ||
4019 | 1596 | pkg_config_args="$pkg_config_args $module-2.0" | ||
4020 | 1597 | ;; | ||
4021 | 1598 | esac | ||
4022 | 1599 | done | ||
4023 | 1600 | |||
4024 | 1601 | PKG_PROG_PKG_CONFIG([0.16]) | ||
4025 | 1602 | |||
4026 | 1603 | no_glib="" | ||
4027 | 1604 | |||
4028 | 1605 | if test "x$PKG_CONFIG" = x ; then | ||
4029 | 1606 | no_glib=yes | ||
4030 | 1607 | PKG_CONFIG=no | ||
4031 | 1608 | fi | ||
4032 | 1609 | |||
4033 | 1610 | min_glib_version=ifelse([$1], ,2.0.0,$1) | ||
4034 | 1611 | AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) | ||
4035 | 1612 | |||
4036 | 1613 | if test x$PKG_CONFIG != xno ; then | ||
4037 | 1614 | ## don't try to run the test against uninstalled libtool libs | ||
4038 | 1615 | if $PKG_CONFIG --uninstalled $pkg_config_args; then | ||
4039 | 1616 | echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" | ||
4040 | 1617 | enable_glibtest=no | ||
4041 | 1618 | fi | ||
4042 | 1619 | |||
4043 | 1620 | if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then | ||
4044 | 1621 | : | ||
4045 | 1622 | else | ||
4046 | 1623 | no_glib=yes | ||
4047 | 1624 | fi | ||
4048 | 1625 | fi | ||
4049 | 1626 | |||
4050 | 1627 | if test x"$no_glib" = x ; then | ||
4051 | 1628 | GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` | ||
4052 | 1629 | GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` | ||
4053 | 1630 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` | ||
4054 | 1631 | GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0` | ||
4055 | 1632 | |||
4056 | 1633 | GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` | ||
4057 | 1634 | GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` | ||
4058 | 1635 | glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
4059 | 1636 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
4060 | 1637 | glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
4061 | 1638 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
4062 | 1639 | glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
4063 | 1640 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
4064 | 1641 | if test "x$enable_glibtest" = "xyes" ; then | ||
4065 | 1642 | ac_save_CFLAGS="$CFLAGS" | ||
4066 | 1643 | ac_save_LIBS="$LIBS" | ||
4067 | 1644 | CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
4068 | 1645 | LIBS="$GLIB_LIBS $LIBS" | ||
4069 | 1646 | dnl | ||
4070 | 1647 | dnl Now check if the installed GLIB is sufficiently new. (Also sanity | ||
4071 | 1648 | dnl checks the results of pkg-config to some extent) | ||
4072 | 1649 | dnl | ||
4073 | 1650 | rm -f conf.glibtest | ||
4074 | 1651 | AC_TRY_RUN([ | ||
4075 | 1652 | #include <glib.h> | ||
4076 | 1653 | #include <stdio.h> | ||
4077 | 1654 | #include <stdlib.h> | ||
4078 | 1655 | |||
4079 | 1656 | int | ||
4080 | 1657 | main () | ||
4081 | 1658 | { | ||
4082 | 1659 | unsigned int major, minor, micro; | ||
4083 | 1660 | char *tmp_version; | ||
4084 | 1661 | |||
4085 | 1662 | fclose (fopen ("conf.glibtest", "w")); | ||
4086 | 1663 | |||
4087 | 1664 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | ||
4088 | 1665 | tmp_version = g_strdup("$min_glib_version"); | ||
4089 | 1666 | if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) { | ||
4090 | 1667 | printf("%s, bad version string\n", "$min_glib_version"); | ||
4091 | 1668 | exit(1); | ||
4092 | 1669 | } | ||
4093 | 1670 | |||
4094 | 1671 | if ((glib_major_version != $glib_config_major_version) || | ||
4095 | 1672 | (glib_minor_version != $glib_config_minor_version) || | ||
4096 | 1673 | (glib_micro_version != $glib_config_micro_version)) | ||
4097 | 1674 | { | ||
4098 | 1675 | printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", | ||
4099 | 1676 | $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, | ||
4100 | 1677 | glib_major_version, glib_minor_version, glib_micro_version); | ||
4101 | 1678 | printf ("*** was found! If pkg-config was correct, then it is best\n"); | ||
4102 | 1679 | printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); | ||
4103 | 1680 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | ||
4104 | 1681 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | ||
4105 | 1682 | printf("*** required on your system.\n"); | ||
4106 | 1683 | printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); | ||
4107 | 1684 | printf("*** to point to the correct configuration files\n"); | ||
4108 | 1685 | } | ||
4109 | 1686 | else if ((glib_major_version != GLIB_MAJOR_VERSION) || | ||
4110 | 1687 | (glib_minor_version != GLIB_MINOR_VERSION) || | ||
4111 | 1688 | (glib_micro_version != GLIB_MICRO_VERSION)) | ||
4112 | 1689 | { | ||
4113 | 1690 | printf("*** GLIB header files (version %d.%d.%d) do not match\n", | ||
4114 | 1691 | GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); | ||
4115 | 1692 | printf("*** library (version %d.%d.%d)\n", | ||
4116 | 1693 | glib_major_version, glib_minor_version, glib_micro_version); | ||
4117 | 1694 | } | ||
4118 | 1695 | else | ||
4119 | 1696 | { | ||
4120 | 1697 | if ((glib_major_version > major) || | ||
4121 | 1698 | ((glib_major_version == major) && (glib_minor_version > minor)) || | ||
4122 | 1699 | ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) | ||
4123 | 1700 | { | ||
4124 | 1701 | return 0; | ||
4125 | 1702 | } | ||
4126 | 1703 | else | ||
4127 | 1704 | { | ||
4128 | 1705 | printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", | ||
4129 | 1706 | glib_major_version, glib_minor_version, glib_micro_version); | ||
4130 | 1707 | printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", | ||
4131 | 1708 | major, minor, micro); | ||
4132 | 1709 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); | ||
4133 | 1710 | printf("***\n"); | ||
4134 | 1711 | printf("*** If you have already installed a sufficiently new version, this error\n"); | ||
4135 | 1712 | printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); | ||
4136 | 1713 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); | ||
4137 | 1714 | printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); | ||
4138 | 1715 | printf("*** correct copy of pkg-config. (In this case, you will have to\n"); | ||
4139 | 1716 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | ||
4140 | 1717 | printf("*** so that the correct libraries are found at run-time))\n"); | ||
4141 | 1718 | } | ||
4142 | 1719 | } | ||
4143 | 1720 | return 1; | ||
4144 | 1721 | } | ||
4145 | 1722 | ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
4146 | 1723 | CFLAGS="$ac_save_CFLAGS" | ||
4147 | 1724 | LIBS="$ac_save_LIBS" | ||
4148 | 1725 | fi | ||
4149 | 1726 | fi | ||
4150 | 1727 | if test "x$no_glib" = x ; then | ||
4151 | 1728 | AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) | ||
4152 | 1729 | ifelse([$2], , :, [$2]) | ||
4153 | 1730 | else | ||
4154 | 1731 | AC_MSG_RESULT(no) | ||
4155 | 1732 | if test "$PKG_CONFIG" = "no" ; then | ||
4156 | 1733 | echo "*** A new enough version of pkg-config was not found." | ||
4157 | 1734 | echo "*** See http://www.freedesktop.org/software/pkgconfig/" | ||
4158 | 1735 | else | ||
4159 | 1736 | if test -f conf.glibtest ; then | ||
4160 | 1737 | : | ||
4161 | 1738 | else | ||
4162 | 1739 | echo "*** Could not run GLIB test program, checking why..." | ||
4163 | 1740 | ac_save_CFLAGS="$CFLAGS" | ||
4164 | 1741 | ac_save_LIBS="$LIBS" | ||
4165 | 1742 | CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
4166 | 1743 | LIBS="$LIBS $GLIB_LIBS" | ||
4167 | 1744 | AC_TRY_LINK([ | ||
4168 | 1745 | #include <glib.h> | ||
4169 | 1746 | #include <stdio.h> | ||
4170 | 1747 | ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], | ||
4171 | 1748 | [ echo "*** The test program compiled, but did not run. This usually means" | ||
4172 | 1749 | echo "*** that the run-time linker is not finding GLIB or finding the wrong" | ||
4173 | 1750 | echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" | ||
4174 | 1751 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | ||
4175 | 1752 | echo "*** to the installed location Also, make sure you have run ldconfig if that" | ||
4176 | 1753 | echo "*** is required on your system" | ||
4177 | 1754 | echo "***" | ||
4178 | 1755 | echo "*** If you have an old version installed, it is best to remove it, although" | ||
4179 | 1756 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], | ||
4180 | 1757 | [ echo "*** The test program failed to compile or link. See the file config.log for the" | ||
4181 | 1758 | echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) | ||
4182 | 1759 | CFLAGS="$ac_save_CFLAGS" | ||
4183 | 1760 | LIBS="$ac_save_LIBS" | ||
4184 | 1761 | fi | ||
4185 | 1762 | fi | ||
4186 | 1763 | GLIB_CFLAGS="" | ||
4187 | 1764 | GLIB_LIBS="" | ||
4188 | 1765 | GLIB_GENMARSHAL="" | ||
4189 | 1766 | GOBJECT_QUERY="" | ||
4190 | 1767 | GLIB_MKENUMS="" | ||
4191 | 1768 | GLIB_COMPILE_RESOURCES="" | ||
4192 | 1769 | ifelse([$3], , :, [$3]) | ||
4193 | 1770 | fi | ||
4194 | 1771 | AC_SUBST(GLIB_CFLAGS) | ||
4195 | 1772 | AC_SUBST(GLIB_LIBS) | ||
4196 | 1773 | AC_SUBST(GLIB_GENMARSHAL) | ||
4197 | 1774 | AC_SUBST(GOBJECT_QUERY) | ||
4198 | 1775 | AC_SUBST(GLIB_MKENUMS) | ||
4199 | 1776 | AC_SUBST(GLIB_COMPILE_RESOURCES) | ||
4200 | 1777 | rm -f conf.glibtest | ||
4201 | 1778 | ]) | ||
4202 | 1779 | |||
4203 | 1780 | dnl GLIB_GSETTINGS | ||
4204 | 1781 | dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether | ||
4205 | 1782 | dnl the schema should be compiled | ||
4206 | 1783 | dnl | ||
4207 | 1784 | |||
4208 | 1785 | AC_DEFUN([GLIB_GSETTINGS], | ||
4209 | 1786 | [ | ||
4210 | 1787 | m4_pattern_allow([AM_V_GEN]) | ||
4211 | 1788 | AC_ARG_ENABLE(schemas-compile, | ||
4212 | 1789 | AS_HELP_STRING([--disable-schemas-compile], | ||
4213 | 1790 | [Disable regeneration of gschemas.compiled on install]), | ||
4214 | 1791 | [case ${enableval} in | ||
4215 | 1792 | yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;; | ||
4216 | 1793 | no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;; | ||
4217 | 1794 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;; | ||
4218 | 1795 | esac]) | ||
4219 | 1796 | AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE]) | ||
4220 | 1797 | PKG_PROG_PKG_CONFIG([0.16]) | ||
4221 | 1798 | AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas]) | ||
4222 | 1799 | if test x$cross_compiling != xyes; then | ||
4223 | 1800 | GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0` | ||
4224 | 1801 | else | ||
4225 | 1802 | AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas) | ||
4226 | 1803 | fi | ||
4227 | 1804 | AC_SUBST(GLIB_COMPILE_SCHEMAS) | ||
4228 | 1805 | if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then | ||
4229 | 1806 | ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2]) | ||
4230 | 1807 | else | ||
4231 | 1808 | ifelse([$1],,[:],[$1]) | ||
4232 | 1809 | fi | ||
4233 | 1810 | |||
4234 | 1811 | GSETTINGS_RULES=' | ||
4235 | 1812 | .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas | ||
4236 | 1813 | |||
4237 | 1814 | mostlyclean-am: clean-gsettings-schemas | ||
4238 | 1815 | |||
4239 | 1816 | gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE)) | ||
4240 | 1817 | |||
4241 | 1818 | %.gschema.valid: %.gschema.xml $(gsettings__enum_file) | ||
4242 | 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 [$]@ | ||
4243 | 1820 | |||
4244 | 1821 | all-am: $(gsettings_SCHEMAS:.xml=.valid) | ||
4245 | 1822 | uninstall-am: uninstall-gsettings-schemas | ||
4246 | 1823 | install-data-am: install-gsettings-schemas | ||
4247 | 1824 | |||
4248 | 1825 | .SECONDARY: $(gsettings_SCHEMAS) | ||
4249 | 1826 | |||
4250 | 1827 | install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file) | ||
4251 | 1828 | @$(NORMAL_INSTALL) | ||
4252 | 1829 | if test -n "$^"; then \ | ||
4253 | 1830 | test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \ | ||
4254 | 1831 | $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \ | ||
4255 | 1832 | test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \ | ||
4256 | 1833 | fi | ||
4257 | 1834 | |||
4258 | 1835 | uninstall-gsettings-schemas: | ||
4259 | 1836 | @$(NORMAL_UNINSTALL) | ||
4260 | 1837 | @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \ | ||
4261 | 1838 | files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ | ||
4262 | 1839 | test -n "$$files" || exit 0; \ | ||
4263 | 1840 | echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \ | ||
4264 | 1841 | cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files | ||
4265 | 1842 | test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) | ||
4266 | 1843 | |||
4267 | 1844 | clean-gsettings-schemas: | ||
4268 | 1845 | rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file) | ||
4269 | 1846 | |||
4270 | 1847 | ifdef gsettings_ENUM_NAMESPACE | ||
4271 | 1848 | $(gsettings__enum_file): $(gsettings_ENUM_FILES) | ||
4272 | 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 [$]@ | ||
4273 | 1850 | endif | ||
4274 | 1851 | ' | ||
4275 | 1852 | _GSETTINGS_SUBST(GSETTINGS_RULES) | ||
4276 | 1853 | ]) | ||
4277 | 1854 | |||
4278 | 1855 | dnl _GSETTINGS_SUBST(VARIABLE) | ||
4279 | 1856 | dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST | ||
4280 | 1857 | AC_DEFUN([_GSETTINGS_SUBST], | ||
4281 | 1858 | [ | ||
4282 | 1859 | AC_SUBST([$1]) | ||
4283 | 1860 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) | ||
4284 | 1861 | ] | ||
4285 | 1862 | ) | ||
4286 | 1863 | |||
4287 | 1864 | dnl -*- mode: autoconf -*- | ||
4288 | 1865 | dnl Copyright 2009 Johan Dahlin | ||
4289 | 1866 | dnl | ||
4290 | 1867 | dnl This file is free software; the author(s) gives unlimited | ||
4291 | 1868 | dnl permission to copy and/or distribute it, with or without | ||
4292 | 1869 | dnl modifications, as long as this notice is preserved. | ||
4293 | 1870 | dnl | ||
4294 | 1871 | |||
4295 | 1872 | # serial 1 | ||
4296 | 1873 | |||
4297 | 1874 | m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], | ||
4298 | 1875 | [ | ||
4299 | 1876 | AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first | ||
4300 | 1877 | AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first | ||
4301 | 1878 | AC_BEFORE([LT_INIT],[$0])dnl setup libtool first | ||
4302 | 1879 | |||
4303 | 1880 | dnl enable/disable introspection | ||
4304 | 1881 | m4_if([$2], [require], | ||
4305 | 1882 | [dnl | ||
4306 | 1883 | enable_introspection=yes | ||
4307 | 1884 | ],[dnl | ||
4308 | 1885 | AC_ARG_ENABLE(introspection, | ||
4309 | 1886 | AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], | ||
4310 | 1887 | [Enable introspection for this build]),, | ||
4311 | 1888 | [enable_introspection=auto]) | ||
4312 | 1889 | ])dnl | ||
4313 | 1890 | |||
4314 | 1891 | AC_MSG_CHECKING([for gobject-introspection]) | ||
4315 | 1892 | |||
4316 | 1893 | dnl presence/version checking | ||
4317 | 1894 | AS_CASE([$enable_introspection], | ||
4318 | 1895 | [no], [dnl | ||
4319 | 1896 | found_introspection="no (disabled, use --enable-introspection to enable)" | ||
4320 | 1897 | ],dnl | ||
4321 | 1898 | [yes],[dnl | ||
4322 | 1899 | PKG_CHECK_EXISTS([gobject-introspection-1.0],, | ||
4323 | 1900 | AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) | ||
4324 | 1901 | PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], | ||
4325 | 1902 | found_introspection=yes, | ||
4326 | 1903 | AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) | ||
4327 | 1904 | ],dnl | ||
4328 | 1905 | [auto],[dnl | ||
4329 | 1906 | PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) | ||
4330 | 1907 | dnl Canonicalize enable_introspection | ||
4331 | 1908 | enable_introspection=$found_introspection | ||
4332 | 1909 | ],dnl | ||
4333 | 1910 | [dnl | ||
4334 | 1911 | AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) | ||
4335 | 1912 | ])dnl | ||
4336 | 1913 | |||
4337 | 1914 | AC_MSG_RESULT([$found_introspection]) | ||
4338 | 1915 | |||
4339 | 1916 | INTROSPECTION_SCANNER= | ||
4340 | 1917 | INTROSPECTION_COMPILER= | ||
4341 | 1918 | INTROSPECTION_GENERATE= | ||
4342 | 1919 | INTROSPECTION_GIRDIR= | ||
4343 | 1920 | INTROSPECTION_TYPELIBDIR= | ||
4344 | 1921 | if test "x$found_introspection" = "xyes"; then | ||
4345 | 1922 | INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` | ||
4346 | 1923 | INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` | ||
4347 | 1924 | INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` | ||
4348 | 1925 | INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` | ||
4349 | 1926 | INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" | ||
4350 | 1927 | INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` | ||
4351 | 1928 | INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` | ||
4352 | 1929 | INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection | ||
4353 | 1930 | fi | ||
4354 | 1931 | AC_SUBST(INTROSPECTION_SCANNER) | ||
4355 | 1932 | AC_SUBST(INTROSPECTION_COMPILER) | ||
4356 | 1933 | AC_SUBST(INTROSPECTION_GENERATE) | ||
4357 | 1934 | AC_SUBST(INTROSPECTION_GIRDIR) | ||
4358 | 1935 | AC_SUBST(INTROSPECTION_TYPELIBDIR) | ||
4359 | 1936 | AC_SUBST(INTROSPECTION_CFLAGS) | ||
4360 | 1937 | AC_SUBST(INTROSPECTION_LIBS) | ||
4361 | 1938 | AC_SUBST(INTROSPECTION_MAKEFILE) | ||
4362 | 1939 | |||
4363 | 1940 | AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") | ||
4364 | 1941 | ]) | ||
4365 | 1942 | |||
4366 | 1943 | |||
4367 | 1944 | dnl Usage: | ||
4368 | 1945 | dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) | ||
4369 | 1946 | |||
4370 | 1947 | AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], | ||
4371 | 1948 | [ | ||
4372 | 1949 | _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) | ||
4373 | 1950 | ]) | ||
4374 | 1951 | |||
4375 | 1952 | dnl Usage: | ||
4376 | 1953 | dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) | ||
4377 | 1954 | |||
4378 | 1955 | |||
4379 | 1956 | AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], | ||
4380 | 1957 | [ | ||
4381 | 1958 | _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) | ||
4382 | 1959 | ]) | ||
4383 | 1960 | |||
4384 | 1961 | m4_include([m4/gettext.m4]) | 1961 | m4_include([m4/gettext.m4]) |
4385 | 1962 | m4_include([m4/gtk-doc.m4]) | 1962 | m4_include([m4/gtk-doc.m4]) |
4386 | 1963 | m4_include([m4/iconv.m4]) | 1963 | m4_include([m4/iconv.m4]) |
4387 | 1964 | 1964 | ||
4388 | === modified file 'config/compile' (properties changed: -x to +x) | |||
4389 | === modified file 'config/config.guess' (properties changed: -x to +x) | |||
4390 | === modified file 'config/config.rpath' (properties changed: -x to +x) | |||
4391 | === modified file 'config/config.sub' (properties changed: -x to +x) | |||
4392 | === modified file 'config/depcomp' (properties changed: -x to +x) | |||
4393 | === modified file 'config/install-sh' (properties changed: -x to +x) | |||
4394 | === modified file 'config/missing' (properties changed: -x to +x) | |||
4395 | === modified file 'configure' | |||
4396 | --- configure 2012-11-26 15:57:51 +0000 | |||
4397 | +++ configure 2013-02-24 03:10:25 +0000 | |||
4398 | @@ -1,6 +1,6 @@ | |||
4399 | 1 | #! /bin/sh | 1 | #! /bin/sh |
4400 | 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
4402 | 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. |
4403 | 4 | # | 4 | # |
4404 | 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>. |
4405 | 6 | # | 6 | # |
4406 | @@ -591,8 +591,8 @@ | |||
4407 | 591 | # Identity of this package. | 591 | # Identity of this package. |
4408 | 592 | PACKAGE_NAME='gnome-shell' | 592 | PACKAGE_NAME='gnome-shell' |
4409 | 593 | PACKAGE_TARNAME='gnome-shell' | 593 | PACKAGE_TARNAME='gnome-shell' |
4412 | 594 | PACKAGE_VERSION='3.6.2' | 594 | PACKAGE_VERSION='3.6.3.1' |
4413 | 595 | PACKAGE_STRING='gnome-shell 3.6.2' | 595 | PACKAGE_STRING='gnome-shell 3.6.3.1' |
4414 | 596 | PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell' | 596 | PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell' |
4415 | 597 | PACKAGE_URL='' | 597 | PACKAGE_URL='' |
4416 | 598 | 598 | ||
4417 | @@ -1503,7 +1503,7 @@ | |||
4418 | 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. |
4419 | 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. |
4420 | 1505 | cat <<_ACEOF | 1505 | cat <<_ACEOF |
4422 | 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. |
4423 | 1507 | 1507 | ||
4424 | 1508 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1508 | Usage: $0 [OPTION]... [VAR=VALUE]... |
4425 | 1509 | 1509 | ||
4426 | @@ -1573,7 +1573,7 @@ | |||
4427 | 1573 | 1573 | ||
4428 | 1574 | if test -n "$ac_init_help"; then | 1574 | if test -n "$ac_init_help"; then |
4429 | 1575 | case $ac_init_help in | 1575 | case $ac_init_help in |
4431 | 1576 | short | recursive ) echo "Configuration of gnome-shell 3.6.2:";; | 1576 | short | recursive ) echo "Configuration of gnome-shell 3.6.3.1:";; |
4432 | 1577 | esac | 1577 | esac |
4433 | 1578 | cat <<\_ACEOF | 1578 | cat <<\_ACEOF |
4434 | 1579 | 1579 | ||
4435 | @@ -1758,7 +1758,7 @@ | |||
4436 | 1758 | test -n "$ac_init_help" && exit $ac_status | 1758 | test -n "$ac_init_help" && exit $ac_status |
4437 | 1759 | if $ac_init_version; then | 1759 | if $ac_init_version; then |
4438 | 1760 | cat <<\_ACEOF | 1760 | cat <<\_ACEOF |
4440 | 1761 | gnome-shell configure 3.6.2 | 1761 | gnome-shell configure 3.6.3.1 |
4441 | 1762 | generated by GNU Autoconf 2.69 | 1762 | generated by GNU Autoconf 2.69 |
4442 | 1763 | 1763 | ||
4443 | 1764 | Copyright (C) 2012 Free Software Foundation, Inc. | 1764 | Copyright (C) 2012 Free Software Foundation, Inc. |
4444 | @@ -2127,7 +2127,7 @@ | |||
4445 | 2127 | This file contains any messages produced by compilers while | 2127 | This file contains any messages produced by compilers while |
4446 | 2128 | running configure, to aid debugging if configure makes a mistake. | 2128 | running configure, to aid debugging if configure makes a mistake. |
4447 | 2129 | 2129 | ||
4449 | 2130 | It was created by gnome-shell $as_me 3.6.2, which was | 2130 | It was created by gnome-shell $as_me 3.6.3.1, which was |
4450 | 2131 | generated by GNU Autoconf 2.69. Invocation command line was | 2131 | generated by GNU Autoconf 2.69. Invocation command line was |
4451 | 2132 | 2132 | ||
4452 | 2133 | $ $0 $@ | 2133 | $ $0 $@ |
4453 | @@ -2963,7 +2963,7 @@ | |||
4454 | 2963 | 2963 | ||
4455 | 2964 | # Define the identity of the package. | 2964 | # Define the identity of the package. |
4456 | 2965 | PACKAGE='gnome-shell' | 2965 | PACKAGE='gnome-shell' |
4458 | 2966 | VERSION='3.6.2' | 2966 | VERSION='3.6.3.1' |
4459 | 2967 | 2967 | ||
4460 | 2968 | 2968 | ||
4461 | 2969 | cat >>confdefs.h <<_ACEOF | 2969 | cat >>confdefs.h <<_ACEOF |
4462 | @@ -17897,7 +17897,7 @@ | |||
4463 | 17897 | # report actual input values of CONFIG_FILES etc. instead of their | 17897 | # report actual input values of CONFIG_FILES etc. instead of their |
4464 | 17898 | # values after options handling. | 17898 | # values after options handling. |
4465 | 17899 | ac_log=" | 17899 | ac_log=" |
4467 | 17900 | This file was extended by gnome-shell $as_me 3.6.2, which was | 17900 | This file was extended by gnome-shell $as_me 3.6.3.1, which was |
4468 | 17901 | generated by GNU Autoconf 2.69. Invocation command line was | 17901 | generated by GNU Autoconf 2.69. Invocation command line was |
4469 | 17902 | 17902 | ||
4470 | 17903 | CONFIG_FILES = $CONFIG_FILES | 17903 | CONFIG_FILES = $CONFIG_FILES |
4471 | @@ -17963,7 +17963,7 @@ | |||
4472 | 17963 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | 17963 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
4473 | 17964 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | 17964 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
4474 | 17965 | ac_cs_version="\\ | 17965 | ac_cs_version="\\ |
4476 | 17966 | gnome-shell config.status 3.6.2 | 17966 | gnome-shell config.status 3.6.3.1 |
4477 | 17967 | configured by $0, generated by GNU Autoconf 2.69, | 17967 | configured by $0, generated by GNU Autoconf 2.69, |
4478 | 17968 | with options \\"\$ac_cs_config\\" | 17968 | with options \\"\$ac_cs_config\\" |
4479 | 17969 | 17969 | ||
4480 | 17970 | 17970 | ||
4481 | === modified file 'configure.ac' | |||
4482 | --- configure.ac 2012-11-26 15:57:51 +0000 | |||
4483 | +++ configure.ac 2013-02-24 03:10:25 +0000 | |||
4484 | @@ -1,5 +1,5 @@ | |||
4485 | 1 | AC_PREREQ(2.63) | 1 | AC_PREREQ(2.63) |
4487 | 2 | AC_INIT([gnome-shell],[3.6.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell]) | 2 | AC_INIT([gnome-shell],[3.6.3.1],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell]) |
4488 | 3 | 3 | ||
4489 | 4 | AC_CONFIG_HEADERS([config.h]) | 4 | AC_CONFIG_HEADERS([config.h]) |
4490 | 5 | AC_CONFIG_SRCDIR([src/shell-global.c]) | 5 | AC_CONFIG_SRCDIR([src/shell-global.c]) |
4491 | @@ -26,6 +26,9 @@ | |||
4492 | 26 | # i18n | 26 | # i18n |
4493 | 27 | IT_PROG_INTLTOOL([0.40]) | 27 | IT_PROG_INTLTOOL([0.40]) |
4494 | 28 | 28 | ||
4495 | 29 | AM_GNU_GETTEXT([external]) | ||
4496 | 30 | AM_GNU_GETTEXT_VERSION([0.17]) | ||
4497 | 31 | |||
4498 | 29 | GETTEXT_PACKAGE=gnome-shell | 32 | GETTEXT_PACKAGE=gnome-shell |
4499 | 30 | AC_SUBST(GETTEXT_PACKAGE) | 33 | AC_SUBST(GETTEXT_PACKAGE) |
4500 | 31 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", | 34 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", |
4501 | @@ -52,7 +55,7 @@ | |||
4502 | 52 | AC_MSG_RESULT(yes) | 55 | AC_MSG_RESULT(yes) |
4503 | 53 | build_recorder=true | 56 | build_recorder=true |
4504 | 54 | recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11" | 57 | recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11" |
4506 | 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) |
4507 | 56 | else | 59 | else |
4508 | 57 | AC_MSG_RESULT(no) | 60 | AC_MSG_RESULT(no) |
4509 | 58 | fi | 61 | fi |
4510 | @@ -86,6 +89,7 @@ | |||
4511 | 86 | libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION | 89 | libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION |
4512 | 87 | $recorder_modules | 90 | $recorder_modules |
4513 | 88 | gdk-x11-3.0 libsoup-2.4 | 91 | gdk-x11-3.0 libsoup-2.4 |
4514 | 92 | gl | ||
4515 | 89 | clutter-x11-1.0 >= $CLUTTER_MIN_VERSION | 93 | clutter-x11-1.0 >= $CLUTTER_MIN_VERSION |
4516 | 90 | clutter-glx-1.0 >= $CLUTTER_MIN_VERSION | 94 | clutter-glx-1.0 >= $CLUTTER_MIN_VERSION |
4517 | 91 | libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION | 95 | libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION |
4518 | @@ -107,16 +111,6 @@ | |||
4519 | 107 | GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings` | 111 | GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings` |
4520 | 108 | AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR]) | 112 | AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR]) |
4521 | 109 | 113 | ||
4522 | 110 | PKG_CHECK_MODULES(GLX, [gl], [have_glx=yes], [have_glx=no]) | ||
4523 | 111 | if test "x$have_glx" = "xyes"; then | ||
4524 | 112 | GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $GLX_CFLAGS" | ||
4525 | 113 | GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $GLX_LIBS" | ||
4526 | 114 | TEST_SHELL_RECORDER_CFLAGS="$TEST_SHELL_RECORDER_CFLAGS $GLX_CFLAGS" | ||
4527 | 115 | TEST_SHELL_RECORDER_LIBS="$TEST_SHELL_RECORDER_LIBS $GLX_LIBS" | ||
4528 | 116 | AC_DEFINE(HAVE_GLX, [1], [Define if we have GLX]) | ||
4529 | 117 | AC_SUBST([HAVE_GLX], [1]) | ||
4530 | 118 | fi | ||
4531 | 119 | |||
4532 | 120 | GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION]) | 114 | GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION]) |
4533 | 121 | 115 | ||
4534 | 122 | saved_CFLAGS=$CFLAGS | 116 | saved_CFLAGS=$CFLAGS |
4535 | 123 | 117 | ||
4536 | === modified file 'debian/changelog' | |||
4537 | --- debian/changelog 2012-11-26 23:39:00 +0000 | |||
4538 | +++ debian/changelog 2013-02-24 03:10:25 +0000 | |||
4539 | @@ -1,3 +1,11 @@ | |||
4540 | 1 | gnome-shell (3.6.3.1-0ubuntu1) quantal-proposed; urgency=low | ||
4541 | 2 | |||
4542 | 3 | * New upstream release. (LP: #1128804) | ||
4543 | 4 | - Fixes disappearing messagetray (LP: #1067265) | ||
4544 | 5 | * debian/patches/git_remove_messagetray_barrier.patch: | ||
4545 | 6 | - upstream bug fix (LP: #1132308) | ||
4546 | 7 | -- Tim Lunn <tim@feathertop.org> Sun, 24 Feb 2013 07:50:34 +1100 | ||
4547 | 8 | |||
4548 | 1 | gnome-shell (3.6.2-0ubuntu0.2) quantal-proposed; urgency=low | 9 | gnome-shell (3.6.2-0ubuntu0.2) quantal-proposed; urgency=low |
4549 | 2 | 10 | ||
4550 | 3 | * debian/control.in: | 11 | * debian/control.in: |
4551 | 4 | 12 | ||
4552 | === modified file 'debian/patches/series' | |||
4553 | --- debian/patches/series 2012-11-26 15:57:51 +0000 | |||
4554 | +++ debian/patches/series 2013-02-24 03:10:25 +0000 | |||
4555 | @@ -4,3 +4,4 @@ | |||
4556 | 4 | ubuntu-lightdm-user-switching.patch | 4 | ubuntu-lightdm-user-switching.patch |
4557 | 5 | ubuntu_lock_on_suspend.patch | 5 | ubuntu_lock_on_suspend.patch |
4558 | 6 | git-set-ally-wm-theme.patch | 6 | git-set-ally-wm-theme.patch |
4559 | 7 | git_remove_messagetray_barrier.patch | ||
4560 | 7 | 8 | ||
4561 | === modified file 'docs/reference/shell/Makefile.in' | |||
4562 | --- docs/reference/shell/Makefile.in 2012-11-12 23:11:33 +0000 | |||
4563 | +++ docs/reference/shell/Makefile.in 2013-02-24 03:10:25 +0000 | |||
4564 | @@ -791,7 +791,7 @@ | |||
4565 | 791 | rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ | 791 | rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ |
4566 | 792 | fi | 792 | fi |
4567 | 793 | 793 | ||
4569 | 794 | maintainer-clean-local: | 794 | maintainer-clean-local: clean |
4570 | 795 | @rm -rf xml html | 795 | @rm -rf xml html |
4571 | 796 | 796 | ||
4572 | 797 | install-data-local: | 797 | install-data-local: |
4573 | @@ -827,7 +827,7 @@ | |||
4574 | 827 | # | 827 | # |
4575 | 828 | # Require gtk-doc when making dist | 828 | # Require gtk-doc when making dist |
4576 | 829 | # | 829 | # |
4578 | 830 | @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: docs | 830 | @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: |
4579 | 831 | @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: | 831 | @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: |
4580 | 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" |
4581 | 833 | @ENABLE_GTK_DOC_FALSE@ @false | 833 | @ENABLE_GTK_DOC_FALSE@ @false |
4582 | 834 | 834 | ||
4583 | === modified file 'docs/reference/shell/html/ShellAppSystem.html' | |||
4584 | --- docs/reference/shell/html/ShellAppSystem.html 2012-09-07 11:40:48 +0000 | |||
4585 | +++ docs/reference/shell/html/ShellAppSystem.html 2013-02-24 03:10:25 +0000 | |||
4586 | @@ -8,7 +8,7 @@ | |||
4587 | 8 | <link rel="up" href="ch03.html" title="Search"> | 8 | <link rel="up" href="ch03.html" title="Search"> |
4588 | 9 | <link rel="prev" href="ch03.html" title="Search"> | 9 | <link rel="prev" href="ch03.html" title="Search"> |
4589 | 10 | <link rel="next" href="ch04.html" title="Tray Icons"> | 10 | <link rel="next" href="ch04.html" title="Tray Icons"> |
4591 | 11 | <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)"> | 11 | <meta name="generator" content="GTK-Doc V1.18 (XML mode)"> |
4592 | 12 | <link rel="stylesheet" href="style.css" type="text/css"> | 12 | <link rel="stylesheet" href="style.css" type="text/css"> |
4593 | 13 | </head> | 13 | </head> |
4594 | 14 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | 14 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
4595 | @@ -44,7 +44,11 @@ | |||
4596 | 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>; |
4597 | 45 | struct <a class="link" href="ShellAppSystem.html#ShellAppSystemClass" title="struct ShellAppSystemClass">ShellAppSystemClass</a>; | 45 | struct <a class="link" href="ShellAppSystem.html#ShellAppSystemClass" title="struct ShellAppSystemClass">ShellAppSystemClass</a>; |
4598 | 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>); |
4599 | 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>); | ||
4600 | 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>); | ||
4601 | 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>); |
4602 | 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>, | ||
4603 | 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>); | ||
4604 | 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>, |
4605 | 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>); |
4606 | 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> |
4607 | @@ -56,33 +60,29 @@ | |||
4608 | 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> |
4609 | 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>, |
4610 | 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>); |
4611 | 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>, | ||
4612 | 64 | <em class="parameter"><code>const <span class="type">char</span> *id</code></em>); | ||
4613 | 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>, |
4614 | 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>); |
4626 | 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>, |
4627 | 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>); |
4628 | 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>, |
4629 | 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>, |
4630 | 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>); |
4620 | 66 | <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>); | ||
4621 | 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>); | ||
4622 | 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>, | ||
4623 | 69 | <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>); | ||
4624 | 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>, | ||
4625 | 71 | <em class="parameter"><code>const <span class="type">char</span> *id</code></em>); | ||
4631 | 72 | </pre> | 72 | </pre> |
4632 | 73 | </div> | 73 | </div> |
4633 | 74 | <div class="refsect1"> | 74 | <div class="refsect1"> |
4634 | 75 | <a name="ShellAppSystem.object-hierarchy"></a><h2>Object Hierarchy</h2> | 75 | <a name="ShellAppSystem.object-hierarchy"></a><h2>Object Hierarchy</h2> |
4635 | 76 | <pre class="synopsis"> | 76 | <pre class="synopsis"> |
4637 | 77 | GObject | 77 | <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> |
4638 | 78 | +----ShellAppSystem | 78 | +----ShellAppSystem |
4639 | 79 | </pre> | 79 | </pre> |
4640 | 80 | </div> | 80 | </div> |
4641 | 81 | <div class="refsect1"> | 81 | <div class="refsect1"> |
4642 | 82 | <a name="ShellAppSystem.signals"></a><h2>Signals</h2> | 82 | <a name="ShellAppSystem.signals"></a><h2>Signals</h2> |
4643 | 83 | <pre class="synopsis"> | 83 | <pre class="synopsis"> |
4646 | 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> |
4647 | 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> |
4648 | 86 | </pre> | 86 | </pre> |
4649 | 87 | </div> | 87 | </div> |
4650 | 88 | <div class="refsect1"> | 88 | <div class="refsect1"> |
4651 | @@ -123,6 +123,50 @@ | |||
4652 | 123 | </div> | 123 | </div> |
4653 | 124 | <hr> | 124 | <hr> |
4654 | 125 | <div class="refsect2"> | 125 | <div class="refsect2"> |
4655 | 126 | <a name="shell-app-system-get-running"></a><h3>shell_app_system_get_running ()</h3> | ||
4656 | 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> | ||
4657 | 128 | <p> | ||
4658 | 129 | Returns the set of applications which currently have at least one | ||
4659 | 130 | open window in the given context. The returned list will be sorted | ||
4660 | 131 | by <a class="link" href="shell-ShellApp.html#shell-app-compare" title="shell_app_compare ()"><code class="function">shell_app_compare()</code></a>. | ||
4661 | 132 | </p> | ||
4662 | 133 | <div class="variablelist"><table border="0" class="variablelist"> | ||
4663 | 134 | <colgroup> | ||
4664 | 135 | <col align="left" valign="top"> | ||
4665 | 136 | <col> | ||
4666 | 137 | </colgroup> | ||
4667 | 138 | <tbody> | ||
4668 | 139 | <tr> | ||
4669 | 140 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | ||
4670 | 141 | <td>A <a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> | ||
4671 | 142 | </td> | ||
4672 | 143 | </tr> | ||
4673 | 144 | <tr> | ||
4674 | 145 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | ||
4675 | 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> | ||
4676 | 147 | </td> | ||
4677 | 148 | </tr> | ||
4678 | 149 | </tbody> | ||
4679 | 150 | </table></div> | ||
4680 | 151 | </div> | ||
4681 | 152 | <hr> | ||
4682 | 153 | <div class="refsect2"> | ||
4683 | 154 | <a name="shell-app-system-get-settings-tree"></a><h3>shell_app_system_get_settings_tree ()</h3> | ||
4684 | 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> | ||
4685 | 156 | <div class="variablelist"><table border="0" class="variablelist"> | ||
4686 | 157 | <colgroup> | ||
4687 | 158 | <col align="left" valign="top"> | ||
4688 | 159 | <col> | ||
4689 | 160 | </colgroup> | ||
4690 | 161 | <tbody><tr> | ||
4691 | 162 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | ||
4692 | 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> | ||
4693 | 164 | </td> | ||
4694 | 165 | </tr></tbody> | ||
4695 | 166 | </table></div> | ||
4696 | 167 | </div> | ||
4697 | 168 | <hr> | ||
4698 | 169 | <div class="refsect2"> | ||
4699 | 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> |
4700 | 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> |
4701 | 128 | <div class="variablelist"><table border="0" class="variablelist"> | 172 | <div class="variablelist"><table border="0" class="variablelist"> |
4702 | @@ -139,6 +183,38 @@ | |||
4703 | 139 | </div> | 183 | </div> |
4704 | 140 | <hr> | 184 | <hr> |
4705 | 141 | <div class="refsect2"> | 185 | <div class="refsect2"> |
4706 | 186 | <a name="shell-app-system-initial-search"></a><h3>shell_app_system_initial_search ()</h3> | ||
4707 | 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>, | ||
4708 | 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> | ||
4709 | 189 | <p> | ||
4710 | 190 | Search through applications for the given search terms. | ||
4711 | 191 | </p> | ||
4712 | 192 | <div class="variablelist"><table border="0" class="variablelist"> | ||
4713 | 193 | <colgroup> | ||
4714 | 194 | <col align="left" valign="top"> | ||
4715 | 195 | <col> | ||
4716 | 196 | </colgroup> | ||
4717 | 197 | <tbody> | ||
4718 | 198 | <tr> | ||
4719 | 199 | <td><p><span class="term"><em class="parameter"><code>system</code></em> :</span></p></td> | ||
4720 | 200 | <td>A <a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> | ||
4721 | 201 | </td> | ||
4722 | 202 | </tr> | ||
4723 | 203 | <tr> | ||
4724 | 204 | <td><p><span class="term"><em class="parameter"><code>terms</code></em> :</span></p></td> | ||
4725 | 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> | ||
4726 | 206 | </td> | ||
4727 | 207 | </tr> | ||
4728 | 208 | <tr> | ||
4729 | 209 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | ||
4730 | 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> | ||
4731 | 211 | </td> | ||
4732 | 212 | </tr> | ||
4733 | 213 | </tbody> | ||
4734 | 214 | </table></div> | ||
4735 | 215 | </div> | ||
4736 | 216 | <hr> | ||
4737 | 217 | <div class="refsect2"> | ||
4738 | 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> |
4739 | 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>, |
4740 | 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> |
4741 | @@ -152,7 +228,7 @@ | |||
4742 | 152 | </colgroup> | 228 | </colgroup> |
4743 | 153 | <tbody><tr> | 229 | <tbody><tr> |
4744 | 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> |
4746 | 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> |
4747 | 156 | </td> | 232 | </td> |
4748 | 157 | </tr></tbody> | 233 | </tr></tbody> |
4749 | 158 | </table></div> | 234 | </table></div> |
4750 | @@ -184,7 +260,7 @@ | |||
4751 | 184 | </tr> | 260 | </tr> |
4752 | 185 | <tr> | 261 | <tr> |
4753 | 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> |
4755 | 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> |
4756 | 188 | </td> | 264 | </td> |
4757 | 189 | </tr> | 265 | </tr> |
4758 | 190 | </tbody> | 266 | </tbody> |
4759 | @@ -199,7 +275,7 @@ | |||
4760 | 199 | <p> | 275 | <p> |
4761 | 200 | Find or create a <span class="type">ShellApp</span> corresponding to a given absolute file | 276 | Find or create a <span class="type">ShellApp</span> corresponding to a given absolute file |
4762 | 201 | name which must be in the standard paths (XDG_DATA_DIRS). For | 277 | name which must be in the standard paths (XDG_DATA_DIRS). For |
4764 | 202 | files 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>. | 278 | files 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>. |
4765 | 203 | </p> | 279 | </p> |
4766 | 204 | <div class="variablelist"><table border="0" class="variablelist"> | 280 | <div class="variablelist"><table border="0" class="variablelist"> |
4767 | 205 | <colgroup> | 281 | <colgroup> |
4768 | @@ -214,12 +290,12 @@ | |||
4769 | 214 | </tr> | 290 | </tr> |
4770 | 215 | <tr> | 291 | <tr> |
4771 | 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> |
4773 | 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> |
4774 | 218 | </td> | 294 | </td> |
4775 | 219 | </tr> | 295 | </tr> |
4776 | 220 | <tr> | 296 | <tr> |
4777 | 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> |
4779 | 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> |
4780 | 223 | </td> | 299 | </td> |
4781 | 224 | </tr> | 300 | </tr> |
4782 | 225 | </tbody> | 301 | </tbody> |
4783 | @@ -234,7 +310,7 @@ | |||
4784 | 234 | <p> | 310 | <p> |
4785 | 235 | Find a valid application corresponding to a given | 311 | Find a valid application corresponding to a given |
4786 | 236 | heuristically determined application identifier | 312 | heuristically determined application identifier |
4788 | 237 | string, 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. | 313 | string, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. |
4789 | 238 | </p> | 314 | </p> |
4790 | 239 | <div class="variablelist"><table border="0" class="variablelist"> | 315 | <div class="variablelist"><table border="0" class="variablelist"> |
4791 | 240 | <colgroup> | 316 | <colgroup> |
4792 | @@ -261,6 +337,29 @@ | |||
4793 | 261 | </div> | 337 | </div> |
4794 | 262 | <hr> | 338 | <hr> |
4795 | 263 | <div class="refsect2"> | 339 | <div class="refsect2"> |
4796 | 340 | <a name="shell-app-system-lookup-setting"></a><h3>shell_app_system_lookup_setting ()</h3> | ||
4797 | 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>, | ||
4798 | 342 | <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);</pre> | ||
4799 | 343 | <div class="variablelist"><table border="0" class="variablelist"> | ||
4800 | 344 | <colgroup> | ||
4801 | 345 | <col align="left" valign="top"> | ||
4802 | 346 | <col> | ||
4803 | 347 | </colgroup> | ||
4804 | 348 | <tbody> | ||
4805 | 349 | <tr> | ||
4806 | 350 | <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td> | ||
4807 | 351 | <td>desktop file id</td> | ||
4808 | 352 | </tr> | ||
4809 | 353 | <tr> | ||
4810 | 354 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | ||
4811 | 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> | ||
4812 | 356 | </td> | ||
4813 | 357 | </tr> | ||
4814 | 358 | </tbody> | ||
4815 | 359 | </table></div> | ||
4816 | 360 | </div> | ||
4817 | 361 | <hr> | ||
4818 | 362 | <div class="refsect2"> | ||
4819 | 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> |
4820 | 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>, |
4821 | 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> |
4822 | @@ -292,39 +391,11 @@ | |||
4823 | 292 | </div> | 391 | </div> |
4824 | 293 | <hr> | 392 | <hr> |
4825 | 294 | <div class="refsect2"> | 393 | <div class="refsect2"> |
4859 | 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> |
4860 | 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>, |
4861 | 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> |
4862 | 298 | Returns the set of applications which currently have at least one | 397 | <p> |
4863 | 299 | open window in the given context. The returned list will be sorted | 398 | Search through settings for the given search terms. |
4831 | 300 | by <a class="link" href="shell-ShellApp.html#shell-app-compare" title="shell_app_compare ()"><code class="function">shell_app_compare()</code></a>. | ||
4832 | 301 | </p> | ||
4833 | 302 | <div class="variablelist"><table border="0" class="variablelist"> | ||
4834 | 303 | <colgroup> | ||
4835 | 304 | <col align="left" valign="top"> | ||
4836 | 305 | <col> | ||
4837 | 306 | </colgroup> | ||
4838 | 307 | <tbody> | ||
4839 | 308 | <tr> | ||
4840 | 309 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | ||
4841 | 310 | <td>A <a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> | ||
4842 | 311 | </td> | ||
4843 | 312 | </tr> | ||
4844 | 313 | <tr> | ||
4845 | 314 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | ||
4846 | 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> | ||
4847 | 316 | </td> | ||
4848 | 317 | </tr> | ||
4849 | 318 | </tbody> | ||
4850 | 319 | </table></div> | ||
4851 | 320 | </div> | ||
4852 | 321 | <hr> | ||
4853 | 322 | <div class="refsect2"> | ||
4854 | 323 | <a name="shell-app-system-initial-search"></a><h3>shell_app_system_initial_search ()</h3> | ||
4855 | 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>, | ||
4856 | 325 | <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>);</pre> | ||
4857 | 326 | <p> | ||
4858 | 327 | Search through applications for the given search terms. | ||
4864 | 328 | </p> | 399 | </p> |
4865 | 329 | <div class="variablelist"><table border="0" class="variablelist"> | 400 | <div class="variablelist"><table border="0" class="variablelist"> |
4866 | 330 | <colgroup> | 401 | <colgroup> |
4867 | @@ -344,7 +415,7 @@ | |||
4868 | 344 | </tr> | 415 | </tr> |
4869 | 345 | <tr> | 416 | <tr> |
4870 | 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> |
4872 | 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> |
4873 | 348 | </td> | 419 | </td> |
4874 | 349 | </tr> | 420 | </tr> |
4875 | 350 | </tbody> | 421 | </tbody> |
4876 | @@ -353,9 +424,9 @@ | |||
4877 | 353 | <hr> | 424 | <hr> |
4878 | 354 | <div class="refsect2"> | 425 | <div class="refsect2"> |
4879 | 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> |
4883 | 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>, |
4884 | 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>, |
4885 | 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> |
4886 | 359 | <p> | 430 | <p> |
4887 | 360 | Search through a previous result set; for more information, see | 431 | Search through a previous result set; for more information, see |
4888 | 361 | js/ui/search.js. Note the value of <em class="parameter"><code>prefs</code></em> must be | 432 | js/ui/search.js. Note the value of <em class="parameter"><code>prefs</code></em> must be |
4889 | @@ -391,77 +462,6 @@ | |||
4890 | 391 | </tbody> | 462 | </tbody> |
4891 | 392 | </table></div> | 463 | </table></div> |
4892 | 393 | </div> | 464 | </div> |
4893 | 394 | <hr> | ||
4894 | 395 | <div class="refsect2"> | ||
4895 | 396 | <a name="shell-app-system-get-settings-tree"></a><h3>shell_app_system_get_settings_tree ()</h3> | ||
4896 | 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> | ||
4897 | 398 | <div class="variablelist"><table border="0" class="variablelist"> | ||
4898 | 399 | <colgroup> | ||
4899 | 400 | <col align="left" valign="top"> | ||
4900 | 401 | <col> | ||
4901 | 402 | </colgroup> | ||
4902 | 403 | <tbody><tr> | ||
4903 | 404 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | ||
4904 | 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> | ||
4905 | 406 | </td> | ||
4906 | 407 | </tr></tbody> | ||
4907 | 408 | </table></div> | ||
4908 | 409 | </div> | ||
4909 | 410 | <hr> | ||
4910 | 411 | <div class="refsect2"> | ||
4911 | 412 | <a name="shell-app-system-search-settings"></a><h3>shell_app_system_search_settings ()</h3> | ||
4912 | 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>, | ||
4913 | 414 | <em class="parameter"><code><span class="type">GSList</span> *terms</code></em>);</pre> | ||
4914 | 415 | <p> | ||
4915 | 416 | Search through settings for the given search terms. | ||
4916 | 417 | </p> | ||
4917 | 418 | <div class="variablelist"><table border="0" class="variablelist"> | ||
4918 | 419 | <colgroup> | ||
4919 | 420 | <col align="left" valign="top"> | ||
4920 | 421 | <col> | ||
4921 | 422 | </colgroup> | ||
4922 | 423 | <tbody> | ||
4923 | 424 | <tr> | ||
4924 | 425 | <td><p><span class="term"><em class="parameter"><code>system</code></em> :</span></p></td> | ||
4925 | 426 | <td>A <a class="link" href="ShellAppSystem.html" title="ShellAppSystem"><span class="type">ShellAppSystem</span></a> | ||
4926 | 427 | </td> | ||
4927 | 428 | </tr> | ||
4928 | 429 | <tr> | ||
4929 | 430 | <td><p><span class="term"><em class="parameter"><code>terms</code></em> :</span></p></td> | ||
4930 | 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> | ||
4931 | 432 | </td> | ||
4932 | 433 | </tr> | ||
4933 | 434 | <tr> | ||
4934 | 435 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | ||
4935 | 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> | ||
4936 | 437 | </td> | ||
4937 | 438 | </tr> | ||
4938 | 439 | </tbody> | ||
4939 | 440 | </table></div> | ||
4940 | 441 | </div> | ||
4941 | 442 | <hr> | ||
4942 | 443 | <div class="refsect2"> | ||
4943 | 444 | <a name="shell-app-system-lookup-setting"></a><h3>shell_app_system_lookup_setting ()</h3> | ||
4944 | 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>, | ||
4945 | 446 | <em class="parameter"><code>const <span class="type">char</span> *id</code></em>);</pre> | ||
4946 | 447 | <div class="variablelist"><table border="0" class="variablelist"> | ||
4947 | 448 | <colgroup> | ||
4948 | 449 | <col align="left" valign="top"> | ||
4949 | 450 | <col> | ||
4950 | 451 | </colgroup> | ||
4951 | 452 | <tbody> | ||
4952 | 453 | <tr> | ||
4953 | 454 | <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td> | ||
4954 | 455 | <td>desktop file id</td> | ||
4955 | 456 | </tr> | ||
4956 | 457 | <tr> | ||
4957 | 458 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | ||
4958 | 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> | ||
4959 | 460 | </td> | ||
4960 | 461 | </tr> | ||
4961 | 462 | </tbody> | ||
4962 | 463 | </table></div> | ||
4963 | 464 | </div> | ||
4964 | 465 | </div> | 465 | </div> |
4965 | 466 | <div class="refsect1"> | 466 | <div class="refsect1"> |
4966 | 467 | <a name="ShellAppSystem.signal-details"></a><h2>Signal Details</h2> | 467 | <a name="ShellAppSystem.signal-details"></a><h2>Signal Details</h2> |
4967 | @@ -469,18 +469,18 @@ | |||
4968 | 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> |
4969 | 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, |
4970 | 471 | <span class="type">ShellApp</span> *arg1, | 471 | <span class="type">ShellApp</span> *arg1, |
4972 | 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> |
4973 | 473 | </div> | 473 | </div> |
4974 | 474 | <hr> | 474 | <hr> |
4975 | 475 | <div class="refsect2"> | 475 | <div class="refsect2"> |
4976 | 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> |
4977 | 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, |
4979 | 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> |
4980 | 479 | </div> | 479 | </div> |
4981 | 480 | </div> | 480 | </div> |
4982 | 481 | </div> | 481 | </div> |
4983 | 482 | <div class="footer"> | 482 | <div class="footer"> |
4984 | 483 | <hr> | 483 | <hr> |
4986 | 484 | Generated by GTK-Doc V1.18.1</div> | 484 | Generated by GTK-Doc V1.18</div> |
4987 | 485 | </body> | 485 | </body> |
4988 | 486 | </html> | 486 | </html> |
4989 | 487 | \ No newline at end of file | 487 | \ No newline at end of file |
4990 | 488 | 488 | ||
4991 | === modified file 'docs/reference/shell/html/ShellEmbeddedWindow.html' | |||
4992 | --- docs/reference/shell/html/ShellEmbeddedWindow.html 2012-06-26 00:08:54 +0000 | |||
4993 | +++ docs/reference/shell/html/ShellEmbeddedWindow.html 2013-02-24 03:10:25 +0000 | |||
4994 | @@ -8,7 +8,7 @@ | |||
4995 | 8 | <link rel="up" href="ch04.html" title="Tray Icons"> | 8 | <link rel="up" href="ch04.html" title="Tray Icons"> |
4996 | 9 | <link rel="prev" href="ch04.html" title="Tray Icons"> | 9 | <link rel="prev" href="ch04.html" title="Tray Icons"> |
4997 | 10 | <link rel="next" href="ShellGtkEmbed.html" title="ShellGtkEmbed"> | 10 | <link rel="next" href="ShellGtkEmbed.html" title="ShellGtkEmbed"> |
4999 | 11 | <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)"> | 11 | <meta name="generator" content="GTK-Doc V1.18 (XML mode)"> |
5000 | 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.
setting as merged, the new version that includes the fix got uploaded and is waiting in the sru queue: launchpadlibrar ian.net/ 132410694/ gnome-shell_ 3.6.3.1- 0ubuntu0. 1_source. changes
http://