Merge lp:~3v1n0/ubuntu/oneiric/nautilus/progress-indicator-support into lp:ubuntu/oneiric/nautilus
- Oneiric (11.10)
- progress-indicator-support
- Merge into oneiric
Status: | Work in progress |
---|---|
Proposed branch: | lp:~3v1n0/ubuntu/oneiric/nautilus/progress-indicator-support |
Merge into: | lp:ubuntu/oneiric/nautilus |
Diff against target: |
3381 lines (+1493/-1007) 28 files modified
.pc/11_copy_skipping_pager.patch/src/nautilus-progress-ui-handler.c (+101/-5) .pc/applied-patches (+1/-0) Makefile.in (+2/-0) aclocal.m4 (+805/-803) config.h.in (+3/-0) configure (+186/-20) configure.in (+25/-0) cut-n-paste-code/Makefile.in (+2/-0) cut-n-paste-code/libegg/Makefile.in (+2/-0) data/Makefile.in (+2/-0) data/icons/Makefile.in (+2/-0) data/nautilus.desktop.in (+1/-1) debian/changelog (+8/-0) debian/patches/07_use_application_indicator.patch (+215/-164) debian/patches/11_copy_skipping_pager.patch (+4/-4) debian/patches/series (+1/-1) docs/Makefile.in (+2/-0) docs/reference/Makefile.in (+2/-0) docs/reference/libnautilus-extension/Makefile.in (+2/-0) eel/Makefile.in (+2/-0) icons/Makefile.in (+2/-0) libnautilus-extension/Makefile.in (+2/-0) libnautilus-private/Makefile.in (+2/-0) nautilus-sendto-extension/Makefile.in (+2/-0) src/Makefile.am (+2/-0) src/Makefile.in (+12/-4) src/nautilus-progress-ui-handler.c (+101/-5) test/Makefile.in (+2/-0) |
To merge this branch: | bzr merge lp:~3v1n0/ubuntu/oneiric/nautilus/progress-indicator-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthew Paul Thomas (community) | design | Disapprove | |
Ubuntu branches | Pending | ||
Review via email: mp+70645@code.launchpad.net |
Commit message
Description of the change
Added back the indicator support for the nautilus progress window, now it also shows on middle-click (indicator secondary activate) and it shows in a disabled menuitem the progress informations.
Actually the indicator is shown only when the progress window has been closed, I'd suggest to show it everytime that the transfer window loses its focus, since sometimes it goes behind a focused window and it's easily lost.
A future improvement could also to show always just an indicator with a progress-bar instead of a floating window.
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Yes, you're right... It's the same thing I was thinking. However before doing that I preferred to update the app-indicator patch... Also, using an unity progressbar, wouldn't inform about the different progresses, but this could be easily solved by showing also the number of the transfers over the icon plus a quicklist item to bring the progress window on top in the case you want to see more accurate informations.
I'll give a look to it as soon as I can.
Omer Akram (om26er) wrote : | # |
try to propose it to lp:~ubuntu-desktop/nautilus/ubuntu I think the large diff might get fixed by doing that. Might be better to talk to MPT before re-enabling the indicator IIRC there was a debate before to remove the indicator
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
The large diff is just caused by the fact that I also applied the patch (as all the other ones are), so the stack needs to be updated accordingly I guess.
About the design, I'm waiting an answer from mpt or others, but I'm leaving in few days so I don't know if I'll be able to finish this.
Matthew Paul Thomas (mpt) wrote : | # |
Nautilus's progress window is closable even when the task has not completed. This is misleading, because it's not clear whether closing it stops or cancels the task (it does neither). It is also unnecessary, because the window is temporary and can be hidden by minimizing. The problem could easily have been fixed by making the window uncloseable, but back then applications couldn't rely on window managers following instructions.
So instead of doing that, someone added a notification area item to reopen the progress window. This did not solve the original problem, except for people who both noticed and understood the presence of the notification area item.
Then when the notification area was retired, someone reimplemented the notification area item as an application indicator. This still did not solve the problem, except for people who both noticed and understood the presence of the menu. (I am partly to blame here, because I never found time to fill in the "nautilus" item in <https:/
And now this branch re-adds the application indicator, while <https:/
There really is no point in having two different ways to hide a temporary window, and two different ways to show it, where there is no difference in memory consumption, taskbar real estate, or anything else, and (worst of all) what you need to do to show the window depends on how you hid it. So please, let's just fix the root problem -- make the window uncloseable. Thanks. :-)
Sebastien Bacher (seb128) wrote : | # |
Thanks for your work, do you think you could rather go in the way mpt suggested there?
Sebastien Bacher (seb128) wrote : | # |
hey Marco, do you still want to work on that?
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Sorry Sebastien, I didn't continue to work on this since I'm just back from 15 days of holidays (where I haven't my PC with me), however this work has actually been merged in nautilus including the unity support (see https:/
I guess, however, that I should revert this indicator support from the merged patch.
Unmerged revisions
- 237. By Marco Trevisan (Treviño)
-
Use Application Indicator patch updated
Updated the patch to work with current code, plus added the support
for showing the progress dialog on middle-click (secondary activate)
and a nautilus progress menu item information.
Preview Diff
1 | === modified file '.pc/11_copy_skipping_pager.patch/src/nautilus-progress-ui-handler.c' |
2 | --- .pc/11_copy_skipping_pager.patch/src/nautilus-progress-ui-handler.c 2011-07-18 11:32:29 +0000 |
3 | +++ .pc/11_copy_skipping_pager.patch/src/nautilus-progress-ui-handler.c 2011-08-06 03:01:32 +0000 |
4 | @@ -21,6 +21,7 @@ |
5 | * |
6 | * Authors: Alexander Larsson <alexl@redhat.com> |
7 | * Cosimo Cecchi <cosimoc@redhat.com> |
8 | + * Marco Trevisan <3v1n0@ubuntu.com> |
9 | * |
10 | */ |
11 | |
12 | @@ -36,6 +37,10 @@ |
13 | |
14 | #include <libnotify/notify.h> |
15 | |
16 | +#ifdef HAVE_APP_INDICATOR |
17 | +#include <libappindicator/app-indicator.h> |
18 | +#endif |
19 | + |
20 | struct _NautilusProgressUIHandlerPriv { |
21 | NautilusProgressInfoManager *manager; |
22 | |
23 | @@ -45,7 +50,11 @@ |
24 | |
25 | gboolean notification_supports_persistence; |
26 | NotifyNotification *progress_notification; |
27 | +#ifdef HAVE_APP_INDICATOR |
28 | + AppIndicator *indicator; |
29 | +#else |
30 | GtkStatusIcon *status_icon; |
31 | +#endif |
32 | }; |
33 | |
34 | G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT); |
35 | @@ -69,6 +78,7 @@ |
36 | |
37 | #define ACTION_DETAILS "details" |
38 | |
39 | +#ifndef HAVE_APP_INDICATOR |
40 | static void |
41 | status_icon_activate_cb (GtkStatusIcon *icon, |
42 | NautilusProgressUIHandler *self) |
43 | @@ -76,6 +86,7 @@ |
44 | gtk_status_icon_set_visible (icon, FALSE); |
45 | gtk_window_present (GTK_WINDOW (self->priv->progress_window)); |
46 | } |
47 | +#endif |
48 | |
49 | static void |
50 | notification_show_details_cb (NotifyNotification *notification, |
51 | @@ -117,6 +128,56 @@ |
52 | NULL); |
53 | } |
54 | |
55 | +#ifdef HAVE_APP_INDICATOR |
56 | + |
57 | +static void |
58 | +indicator_menu_activate_cb (AppIndicator *indicator, NautilusProgressUIHandler *self) |
59 | +{ |
60 | + g_return_if_fail(self); |
61 | + gtk_window_present (GTK_WINDOW (self->priv->progress_window)); |
62 | + app_indicator_set_status (indicator, APP_INDICATOR_STATUS_PASSIVE); |
63 | +} |
64 | + |
65 | +static void |
66 | +progress_ui_handler_ensure_indicator (NautilusProgressUIHandler *self) |
67 | +{ |
68 | + AppIndicator *indicator; |
69 | + GtkWidget *menu; |
70 | + GtkWidget *menuitem; |
71 | + GtkWidget *status; |
72 | + GtkWidget *status_sep; |
73 | + g_return_if_fail (self); |
74 | + |
75 | + if (self->priv->indicator != NULL) { |
76 | + return; |
77 | + } |
78 | + |
79 | + indicator = app_indicator_new ("nautilus", "system-file-manager", |
80 | + APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
81 | + menu = gtk_menu_new(); |
82 | + |
83 | + status = gtk_menu_item_new (); |
84 | + gtk_widget_set_sensitive (status, FALSE); |
85 | + gtk_menu_shell_append (GTK_MENU_SHELL (menu), status); |
86 | + g_object_set_data (G_OBJECT (indicator), "status", status); |
87 | + |
88 | + gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ()); |
89 | + |
90 | + menuitem = gtk_menu_item_new_with_label (_("Show copy dialog")); |
91 | + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); |
92 | + g_signal_connect (menuitem, "activate", |
93 | + (GCallback)indicator_menu_activate_cb, self); |
94 | + |
95 | + app_indicator_set_status (indicator, APP_INDICATOR_STATUS_PASSIVE); |
96 | + app_indicator_set_menu (indicator, GTK_MENU (menu)); |
97 | + app_indicator_set_secondary_activate_target(indicator, menuitem); |
98 | + gtk_widget_show_all (menu); |
99 | + |
100 | + self->priv->indicator = indicator; |
101 | +} |
102 | + |
103 | +#else |
104 | + |
105 | static void |
106 | progress_ui_handler_ensure_status_icon (NautilusProgressUIHandler *self) |
107 | { |
108 | @@ -139,6 +200,8 @@ |
109 | self->priv->status_icon = status_icon; |
110 | } |
111 | |
112 | +#endif |
113 | + |
114 | static void |
115 | progress_ui_handler_update_notification (NautilusProgressUIHandler *self) |
116 | { |
117 | @@ -165,17 +228,35 @@ |
118 | progress_ui_handler_update_status_icon (NautilusProgressUIHandler *self) |
119 | { |
120 | gchar *tooltip; |
121 | - |
122 | - progress_ui_handler_ensure_status_icon (self); |
123 | + gboolean win_visible; |
124 | |
125 | tooltip = g_strdup_printf (ngettext ("%'d file operation active", |
126 | "%'d file operations active", |
127 | self->priv->active_infos), |
128 | self->priv->active_infos); |
129 | + |
130 | + win_visible = gtk_widget_get_visible (self->priv->progress_window); |
131 | + |
132 | +#ifdef HAVE_APP_INDICATOR |
133 | + progress_ui_handler_ensure_indicator (self); |
134 | + GtkMenuItem *status = g_object_get_data (G_OBJECT(self->priv->indicator), |
135 | + "status"); |
136 | + gtk_menu_item_set_label (GTK_MENU_ITEM (status), tooltip); |
137 | + |
138 | + if (!win_visible) |
139 | + app_indicator_set_status (self->priv->indicator, |
140 | + APP_INDICATOR_STATUS_ACTIVE); |
141 | + else |
142 | + app_indicator_set_status (self->priv->indicator, |
143 | + APP_INDICATOR_STATUS_PASSIVE); |
144 | +#else |
145 | + progress_ui_handler_ensure_status_icon (self); |
146 | + |
147 | gtk_status_icon_set_tooltip_text (self->priv->status_icon, tooltip); |
148 | + |
149 | + gtk_status_icon_set_visible (self->priv->status_icon, !win_visible); |
150 | +#endif |
151 | g_free (tooltip); |
152 | - |
153 | - gtk_status_icon_set_visible (self->priv->status_icon, TRUE); |
154 | } |
155 | |
156 | static gboolean |
157 | @@ -195,6 +276,13 @@ |
158 | } |
159 | |
160 | static void |
161 | +progress_window_show_event (GtkWidget *widget, NautilusProgressUIHandler *self) |
162 | +{ |
163 | + if (!self->priv->notification_supports_persistence) |
164 | + progress_ui_handler_update_status_icon (self); |
165 | +} |
166 | + |
167 | +static void |
168 | progress_ui_handler_ensure_window (NautilusProgressUIHandler *self) |
169 | { |
170 | GtkWidget *vbox, *progress_window; |
171 | @@ -228,6 +316,9 @@ |
172 | g_signal_connect (progress_window, |
173 | "delete-event", |
174 | (GCallback) progress_window_delete_event, self); |
175 | + g_signal_connect (progress_window, |
176 | + "show", |
177 | + (GCallback) progress_window_show_event, self); |
178 | } |
179 | |
180 | static void |
181 | @@ -277,10 +368,15 @@ |
182 | static void |
183 | progress_ui_handler_hide_notification_or_status (NautilusProgressUIHandler *self) |
184 | { |
185 | +#ifdef HAVE_APP_INDICATOR |
186 | + if (self->priv->indicator != NULL) { |
187 | + app_indicator_set_status (self->priv->indicator, APP_INDICATOR_STATUS_PASSIVE); |
188 | + } |
189 | +#else |
190 | if (self->priv->status_icon != NULL) { |
191 | gtk_status_icon_set_visible (self->priv->status_icon, FALSE); |
192 | } |
193 | - |
194 | +#endif |
195 | if (self->priv->progress_notification != NULL) { |
196 | notify_notification_close (self->priv->progress_notification, NULL); |
197 | g_clear_object (&self->priv->progress_notification); |
198 | |
199 | === modified file '.pc/applied-patches' |
200 | --- .pc/applied-patches 2011-07-25 16:53:10 +0000 |
201 | +++ .pc/applied-patches 2011-08-06 03:01:32 +0000 |
202 | @@ -3,6 +3,7 @@ |
203 | 03_translations_list_update.patch |
204 | 04_suppress_umount_in_ltsp.patch |
205 | 06_never_exec_nonexec_launchers.patch |
206 | +07_use_application_indicator.patch |
207 | 08_clean_session_capplet.patch |
208 | 09_no-initial-fade.patch |
209 | 10_show_in_unity.patch |
210 | |
211 | === modified file 'Makefile.in' |
212 | --- Makefile.in 2011-06-28 11:22:30 +0000 |
213 | +++ Makefile.in 2011-08-06 03:01:32 +0000 |
214 | @@ -117,6 +117,8 @@ |
215 | ALL_LINGUAS = @ALL_LINGUAS@ |
216 | AMTAR = @AMTAR@ |
217 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
218 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
219 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
220 | AR = @AR@ |
221 | AS = @AS@ |
222 | AUTOCONF = @AUTOCONF@ |
223 | |
224 | === modified file 'aclocal.m4' |
225 | --- aclocal.m4 2011-06-28 11:22:30 +0000 |
226 | +++ aclocal.m4 2011-08-06 03:01:32 +0000 |
227 | @@ -19,6 +19,811 @@ |
228 | If you have problems, you may need to regenerate the build system entirely. |
229 | To do so, use the procedure documented by the package, typically `autoreconf'.])]) |
230 | |
231 | +# Copyright (C) 1995-2002 Free Software Foundation, Inc. |
232 | +# Copyright (C) 2001-2003,2004 Red Hat, Inc. |
233 | +# |
234 | +# This file is free software, distributed under the terms of the GNU |
235 | +# General Public License. As a special exception to the GNU General |
236 | +# Public License, this file may be distributed as part of a program |
237 | +# that contains a configuration script generated by Autoconf, under |
238 | +# the same distribution terms as the rest of that program. |
239 | +# |
240 | +# This file can be copied and used freely without restrictions. It can |
241 | +# be used in projects which are not available under the GNU Public License |
242 | +# but which still want to provide support for the GNU gettext functionality. |
243 | +# |
244 | +# Macro to add for using GNU gettext. |
245 | +# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
246 | +# |
247 | +# Modified to never use included libintl. |
248 | +# Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
249 | +# |
250 | +# Major rework to remove unused code |
251 | +# Owen Taylor <otaylor@redhat.com>, 12/11/2002 |
252 | +# |
253 | +# Added better handling of ALL_LINGUAS from GNU gettext version |
254 | +# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002 |
255 | +# |
256 | +# Modified to require ngettext |
257 | +# Matthias Clasen <mclasen@redhat.com> 08/06/2004 |
258 | +# |
259 | +# We need this here as well, since someone might use autoconf-2.5x |
260 | +# to configure GLib then an older version to configure a package |
261 | +# using AM_GLIB_GNU_GETTEXT |
262 | +AC_PREREQ(2.53) |
263 | + |
264 | +dnl |
265 | +dnl We go to great lengths to make sure that aclocal won't |
266 | +dnl try to pull in the installed version of these macros |
267 | +dnl when running aclocal in the glib directory. |
268 | +dnl |
269 | +m4_copy([AC_DEFUN],[glib_DEFUN]) |
270 | +m4_copy([AC_REQUIRE],[glib_REQUIRE]) |
271 | +dnl |
272 | +dnl At the end, if we're not within glib, we'll define the public |
273 | +dnl definitions in terms of our private definitions. |
274 | +dnl |
275 | + |
276 | +# GLIB_LC_MESSAGES |
277 | +#-------------------- |
278 | +glib_DEFUN([GLIB_LC_MESSAGES], |
279 | + [AC_CHECK_HEADERS([locale.h]) |
280 | + if test $ac_cv_header_locale_h = yes; then |
281 | + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
282 | + [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
283 | + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
284 | + if test $am_cv_val_LC_MESSAGES = yes; then |
285 | + AC_DEFINE(HAVE_LC_MESSAGES, 1, |
286 | + [Define if your <locale.h> file defines LC_MESSAGES.]) |
287 | + fi |
288 | + fi]) |
289 | + |
290 | +# GLIB_PATH_PROG_WITH_TEST |
291 | +#---------------------------- |
292 | +dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
293 | +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
294 | +glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], |
295 | +[# Extract the first word of "$2", so it can be a program name with args. |
296 | +set dummy $2; ac_word=[$]2 |
297 | +AC_MSG_CHECKING([for $ac_word]) |
298 | +AC_CACHE_VAL(ac_cv_path_$1, |
299 | +[case "[$]$1" in |
300 | + /*) |
301 | + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
302 | + ;; |
303 | + *) |
304 | + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
305 | + for ac_dir in ifelse([$5], , $PATH, [$5]); do |
306 | + test -z "$ac_dir" && ac_dir=. |
307 | + if test -f $ac_dir/$ac_word; then |
308 | + if [$3]; then |
309 | + ac_cv_path_$1="$ac_dir/$ac_word" |
310 | + break |
311 | + fi |
312 | + fi |
313 | + done |
314 | + IFS="$ac_save_ifs" |
315 | +dnl If no 4th arg is given, leave the cache variable unset, |
316 | +dnl so AC_PATH_PROGS will keep looking. |
317 | +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
318 | +])dnl |
319 | + ;; |
320 | +esac])dnl |
321 | +$1="$ac_cv_path_$1" |
322 | +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
323 | + AC_MSG_RESULT([$]$1) |
324 | +else |
325 | + AC_MSG_RESULT(no) |
326 | +fi |
327 | +AC_SUBST($1)dnl |
328 | +]) |
329 | + |
330 | +# GLIB_WITH_NLS |
331 | +#----------------- |
332 | +glib_DEFUN([GLIB_WITH_NLS], |
333 | + dnl NLS is obligatory |
334 | + [USE_NLS=yes |
335 | + AC_SUBST(USE_NLS) |
336 | + |
337 | + gt_cv_have_gettext=no |
338 | + |
339 | + CATOBJEXT=NONE |
340 | + XGETTEXT=: |
341 | + INTLLIBS= |
342 | + |
343 | + AC_CHECK_HEADER(libintl.h, |
344 | + [gt_cv_func_dgettext_libintl="no" |
345 | + libintl_extra_libs="" |
346 | + |
347 | + # |
348 | + # First check in libc |
349 | + # |
350 | + AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, |
351 | + [AC_TRY_LINK([ |
352 | +#include <libintl.h> |
353 | +], |
354 | + [return !ngettext ("","", 1)], |
355 | + gt_cv_func_ngettext_libc=yes, |
356 | + gt_cv_func_ngettext_libc=no) |
357 | + ]) |
358 | + |
359 | + if test "$gt_cv_func_ngettext_libc" = "yes" ; then |
360 | + AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
361 | + [AC_TRY_LINK([ |
362 | +#include <libintl.h> |
363 | +], |
364 | + [return !dgettext ("","")], |
365 | + gt_cv_func_dgettext_libc=yes, |
366 | + gt_cv_func_dgettext_libc=no) |
367 | + ]) |
368 | + fi |
369 | + |
370 | + if test "$gt_cv_func_ngettext_libc" = "yes" ; then |
371 | + AC_CHECK_FUNCS(bind_textdomain_codeset) |
372 | + fi |
373 | + |
374 | + # |
375 | + # If we don't have everything we want, check in libintl |
376 | + # |
377 | + if test "$gt_cv_func_dgettext_libc" != "yes" \ |
378 | + || test "$gt_cv_func_ngettext_libc" != "yes" \ |
379 | + || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then |
380 | + |
381 | + AC_CHECK_LIB(intl, bindtextdomain, |
382 | + [AC_CHECK_LIB(intl, ngettext, |
383 | + [AC_CHECK_LIB(intl, dgettext, |
384 | + gt_cv_func_dgettext_libintl=yes)])]) |
385 | + |
386 | + if test "$gt_cv_func_dgettext_libintl" != "yes" ; then |
387 | + AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
388 | + AC_MSG_RESULT([]) |
389 | + AC_CHECK_LIB(intl, ngettext, |
390 | + [AC_CHECK_LIB(intl, dcgettext, |
391 | + [gt_cv_func_dgettext_libintl=yes |
392 | + libintl_extra_libs=-liconv], |
393 | + :,-liconv)], |
394 | + :,-liconv) |
395 | + fi |
396 | + |
397 | + # |
398 | + # If we found libintl, then check in it for bind_textdomain_codeset(); |
399 | + # we'll prefer libc if neither have bind_textdomain_codeset(), |
400 | + # and both have dgettext and ngettext |
401 | + # |
402 | + if test "$gt_cv_func_dgettext_libintl" = "yes" ; then |
403 | + glib_save_LIBS="$LIBS" |
404 | + LIBS="$LIBS -lintl $libintl_extra_libs" |
405 | + unset ac_cv_func_bind_textdomain_codeset |
406 | + AC_CHECK_FUNCS(bind_textdomain_codeset) |
407 | + LIBS="$glib_save_LIBS" |
408 | + |
409 | + if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then |
410 | + gt_cv_func_dgettext_libc=no |
411 | + else |
412 | + if test "$gt_cv_func_dgettext_libc" = "yes" \ |
413 | + && test "$gt_cv_func_ngettext_libc" = "yes"; then |
414 | + gt_cv_func_dgettext_libintl=no |
415 | + fi |
416 | + fi |
417 | + fi |
418 | + fi |
419 | + |
420 | + if test "$gt_cv_func_dgettext_libc" = "yes" \ |
421 | + || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
422 | + gt_cv_have_gettext=yes |
423 | + fi |
424 | + |
425 | + if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
426 | + INTLLIBS="-lintl $libintl_extra_libs" |
427 | + fi |
428 | + |
429 | + if test "$gt_cv_have_gettext" = "yes"; then |
430 | + AC_DEFINE(HAVE_GETTEXT,1, |
431 | + [Define if the GNU gettext() function is already present or preinstalled.]) |
432 | + GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
433 | + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
434 | + if test "$MSGFMT" != "no"; then |
435 | + glib_save_LIBS="$LIBS" |
436 | + LIBS="$LIBS $INTLLIBS" |
437 | + AC_CHECK_FUNCS(dcgettext) |
438 | + MSGFMT_OPTS= |
439 | + AC_MSG_CHECKING([if msgfmt accepts -c]) |
440 | + GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ |
441 | +msgid "" |
442 | +msgstr "" |
443 | +"Content-Type: text/plain; charset=UTF-8\n" |
444 | +"Project-Id-Version: test 1.0\n" |
445 | +"PO-Revision-Date: 2007-02-15 12:01+0100\n" |
446 | +"Last-Translator: test <foo@bar.xx>\n" |
447 | +"Language-Team: C <LL@li.org>\n" |
448 | +"MIME-Version: 1.0\n" |
449 | +"Content-Transfer-Encoding: 8bit\n" |
450 | +], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) |
451 | + AC_SUBST(MSGFMT_OPTS) |
452 | + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
453 | + GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
454 | + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
455 | + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
456 | + return _nl_msg_cat_cntr], |
457 | + [CATOBJEXT=.gmo |
458 | + DATADIRNAME=share], |
459 | + [case $host in |
460 | + *-*-solaris*) |
461 | + dnl On Solaris, if bind_textdomain_codeset is in libc, |
462 | + dnl GNU format message catalog is always supported, |
463 | + dnl since both are added to the libc all together. |
464 | + dnl Hence, we'd like to go with DATADIRNAME=share and |
465 | + dnl and CATOBJEXT=.gmo in this case. |
466 | + AC_CHECK_FUNC(bind_textdomain_codeset, |
467 | + [CATOBJEXT=.gmo |
468 | + DATADIRNAME=share], |
469 | + [CATOBJEXT=.mo |
470 | + DATADIRNAME=lib]) |
471 | + ;; |
472 | + *) |
473 | + CATOBJEXT=.mo |
474 | + DATADIRNAME=lib |
475 | + ;; |
476 | + esac]) |
477 | + LIBS="$glib_save_LIBS" |
478 | + INSTOBJEXT=.mo |
479 | + else |
480 | + gt_cv_have_gettext=no |
481 | + fi |
482 | + fi |
483 | + ]) |
484 | + |
485 | + if test "$gt_cv_have_gettext" = "yes" ; then |
486 | + AC_DEFINE(ENABLE_NLS, 1, |
487 | + [always defined to indicate that i18n is enabled]) |
488 | + fi |
489 | + |
490 | + dnl Test whether we really found GNU xgettext. |
491 | + if test "$XGETTEXT" != ":"; then |
492 | + dnl If it is not GNU xgettext we define it as : so that the |
493 | + dnl Makefiles still can work. |
494 | + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
495 | + : ; |
496 | + else |
497 | + AC_MSG_RESULT( |
498 | + [found xgettext program is not GNU xgettext; ignore it]) |
499 | + XGETTEXT=":" |
500 | + fi |
501 | + fi |
502 | + |
503 | + # We need to process the po/ directory. |
504 | + POSUB=po |
505 | + |
506 | + AC_OUTPUT_COMMANDS( |
507 | + [case "$CONFIG_FILES" in *po/Makefile.in*) |
508 | + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
509 | + esac]) |
510 | + |
511 | + dnl These rules are solely for the distribution goal. While doing this |
512 | + dnl we only have to keep exactly one list of the available catalogs |
513 | + dnl in configure.ac. |
514 | + for lang in $ALL_LINGUAS; do |
515 | + GMOFILES="$GMOFILES $lang.gmo" |
516 | + POFILES="$POFILES $lang.po" |
517 | + done |
518 | + |
519 | + dnl Make all variables we use known to autoconf. |
520 | + AC_SUBST(CATALOGS) |
521 | + AC_SUBST(CATOBJEXT) |
522 | + AC_SUBST(DATADIRNAME) |
523 | + AC_SUBST(GMOFILES) |
524 | + AC_SUBST(INSTOBJEXT) |
525 | + AC_SUBST(INTLLIBS) |
526 | + AC_SUBST(PO_IN_DATADIR_TRUE) |
527 | + AC_SUBST(PO_IN_DATADIR_FALSE) |
528 | + AC_SUBST(POFILES) |
529 | + AC_SUBST(POSUB) |
530 | + ]) |
531 | + |
532 | +# AM_GLIB_GNU_GETTEXT |
533 | +# ------------------- |
534 | +# Do checks necessary for use of gettext. If a suitable implementation |
535 | +# of gettext is found in either in libintl or in the C library, |
536 | +# it will set INTLLIBS to the libraries needed for use of gettext |
537 | +# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable |
538 | +# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() |
539 | +# on various variables needed by the Makefile.in.in installed by |
540 | +# glib-gettextize. |
541 | +dnl |
542 | +glib_DEFUN([GLIB_GNU_GETTEXT], |
543 | + [AC_REQUIRE([AC_PROG_CC])dnl |
544 | + AC_REQUIRE([AC_HEADER_STDC])dnl |
545 | + |
546 | + GLIB_LC_MESSAGES |
547 | + GLIB_WITH_NLS |
548 | + |
549 | + if test "$gt_cv_have_gettext" = "yes"; then |
550 | + if test "x$ALL_LINGUAS" = "x"; then |
551 | + LINGUAS= |
552 | + else |
553 | + AC_MSG_CHECKING(for catalogs to be installed) |
554 | + NEW_LINGUAS= |
555 | + for presentlang in $ALL_LINGUAS; do |
556 | + useit=no |
557 | + if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then |
558 | + desiredlanguages="$LINGUAS" |
559 | + else |
560 | + desiredlanguages="$ALL_LINGUAS" |
561 | + fi |
562 | + for desiredlang in $desiredlanguages; do |
563 | + # Use the presentlang catalog if desiredlang is |
564 | + # a. equal to presentlang, or |
565 | + # b. a variant of presentlang (because in this case, |
566 | + # presentlang can be used as a fallback for messages |
567 | + # which are not translated in the desiredlang catalog). |
568 | + case "$desiredlang" in |
569 | + "$presentlang"*) useit=yes;; |
570 | + esac |
571 | + done |
572 | + if test $useit = yes; then |
573 | + NEW_LINGUAS="$NEW_LINGUAS $presentlang" |
574 | + fi |
575 | + done |
576 | + LINGUAS=$NEW_LINGUAS |
577 | + AC_MSG_RESULT($LINGUAS) |
578 | + fi |
579 | + |
580 | + dnl Construct list of names of catalog files to be constructed. |
581 | + if test -n "$LINGUAS"; then |
582 | + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
583 | + fi |
584 | + fi |
585 | + |
586 | + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
587 | + dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
588 | + dnl Try to locate is. |
589 | + MKINSTALLDIRS= |
590 | + if test -n "$ac_aux_dir"; then |
591 | + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
592 | + fi |
593 | + if test -z "$MKINSTALLDIRS"; then |
594 | + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
595 | + fi |
596 | + AC_SUBST(MKINSTALLDIRS) |
597 | + |
598 | + dnl Generate list of files to be processed by xgettext which will |
599 | + dnl be included in po/Makefile. |
600 | + test -d po || mkdir po |
601 | + if test "x$srcdir" != "x."; then |
602 | + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
603 | + posrcprefix="$srcdir/" |
604 | + else |
605 | + posrcprefix="../$srcdir/" |
606 | + fi |
607 | + else |
608 | + posrcprefix="../" |
609 | + fi |
610 | + rm -f po/POTFILES |
611 | + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
612 | + < $srcdir/po/POTFILES.in > po/POTFILES |
613 | + ]) |
614 | + |
615 | +# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) |
616 | +# ------------------------------- |
617 | +# Define VARIABLE to the location where catalog files will |
618 | +# be installed by po/Makefile. |
619 | +glib_DEFUN([GLIB_DEFINE_LOCALEDIR], |
620 | +[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl |
621 | +glib_save_prefix="$prefix" |
622 | +glib_save_exec_prefix="$exec_prefix" |
623 | +glib_save_datarootdir="$datarootdir" |
624 | +test "x$prefix" = xNONE && prefix=$ac_default_prefix |
625 | +test "x$exec_prefix" = xNONE && exec_prefix=$prefix |
626 | +datarootdir=`eval echo "${datarootdir}"` |
627 | +if test "x$CATOBJEXT" = "x.mo" ; then |
628 | + localedir=`eval echo "${libdir}/locale"` |
629 | +else |
630 | + localedir=`eval echo "${datadir}/locale"` |
631 | +fi |
632 | +prefix="$glib_save_prefix" |
633 | +exec_prefix="$glib_save_exec_prefix" |
634 | +datarootdir="$glib_save_datarootdir" |
635 | +AC_DEFINE_UNQUOTED($1, "$localedir", |
636 | + [Define the location where the catalogs will be installed]) |
637 | +]) |
638 | + |
639 | +dnl |
640 | +dnl Now the definitions that aclocal will find |
641 | +dnl |
642 | +ifdef(glib_configure_ac,[],[ |
643 | +AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) |
644 | +AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) |
645 | +])dnl |
646 | + |
647 | +# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) |
648 | +# |
649 | +# Create a temporary file with TEST-FILE as its contents and pass the |
650 | +# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with |
651 | +# 0 and perform ACTION-IF-FAIL for any other exit status. |
652 | +AC_DEFUN([GLIB_RUN_PROG], |
653 | +[cat >conftest.foo <<_ACEOF |
654 | +$2 |
655 | +_ACEOF |
656 | +if AC_RUN_LOG([$1 conftest.foo]); then |
657 | + m4_ifval([$3], [$3], [:]) |
658 | +m4_ifvaln([$4], [else $4])dnl |
659 | +echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD |
660 | +sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD |
661 | +fi]) |
662 | + |
663 | + |
664 | +dnl GLIB_GSETTINGS |
665 | +dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether |
666 | +dnl the schema should be compiled |
667 | +dnl |
668 | + |
669 | +AC_DEFUN([GLIB_GSETTINGS], |
670 | +[ |
671 | + m4_pattern_allow([AM_V_GEN]) |
672 | + AC_ARG_ENABLE(schemas-compile, |
673 | + AS_HELP_STRING([--disable-schemas-compile], |
674 | + [Disable regeneration of gschemas.compiled on install]), |
675 | + [case ${enableval} in |
676 | + yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;; |
677 | + no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;; |
678 | + *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;; |
679 | + esac]) |
680 | + AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE]) |
681 | + PKG_PROG_PKG_CONFIG([0.16]) |
682 | + AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas]) |
683 | + if test x$cross_compiling != xyes; then |
684 | + GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0` |
685 | + else |
686 | + AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas) |
687 | + fi |
688 | + AC_SUBST(GLIB_COMPILE_SCHEMAS) |
689 | + if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then |
690 | + ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2]) |
691 | + else |
692 | + ifelse([$1],,[:],[$1]) |
693 | + fi |
694 | + |
695 | + GSETTINGS_RULES=' |
696 | +.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas |
697 | + |
698 | +mostlyclean-am: clean-gsettings-schemas |
699 | + |
700 | +gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE)) |
701 | + |
702 | +%.gschema.valid: %.gschema.xml $(gsettings__enum_file) |
703 | + $(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 [$]@ |
704 | + |
705 | +all-am: $(gsettings_SCHEMAS:.xml=.valid) |
706 | +uninstall-am: uninstall-gsettings-schemas |
707 | +install-data-am: install-gsettings-schemas |
708 | + |
709 | +.SECONDARY: $(gsettings_SCHEMAS) |
710 | + |
711 | +install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file) |
712 | + @$(NORMAL_INSTALL) |
713 | + if test -n "$^"; then \ |
714 | + test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \ |
715 | + $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \ |
716 | + test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \ |
717 | + fi |
718 | + |
719 | +uninstall-gsettings-schemas: |
720 | + @$(NORMAL_UNINSTALL) |
721 | + @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \ |
722 | + files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ |
723 | + test -n "$$files" || exit 0; \ |
724 | + echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \ |
725 | + cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files |
726 | + test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) |
727 | + |
728 | +clean-gsettings-schemas: |
729 | + rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file) |
730 | + |
731 | +ifdef gsettings_ENUM_NAMESPACE |
732 | +$(gsettings__enum_file): $(gsettings_ENUM_FILES) |
733 | + $(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 [$]@ |
734 | +endif |
735 | +' |
736 | + _GSETTINGS_SUBST(GSETTINGS_RULES) |
737 | +]) |
738 | + |
739 | +dnl _GSETTINGS_SUBST(VARIABLE) |
740 | +dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST |
741 | +AC_DEFUN([_GSETTINGS_SUBST], |
742 | +[ |
743 | +AC_SUBST([$1]) |
744 | +m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) |
745 | +] |
746 | +) |
747 | + |
748 | +dnl -*- mode: autoconf -*- |
749 | +dnl Copyright 2009 Johan Dahlin |
750 | +dnl |
751 | +dnl This file is free software; the author(s) gives unlimited |
752 | +dnl permission to copy and/or distribute it, with or without |
753 | +dnl modifications, as long as this notice is preserved. |
754 | +dnl |
755 | + |
756 | +# serial 1 |
757 | + |
758 | +m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], |
759 | +[ |
760 | + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first |
761 | + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first |
762 | + AC_BEFORE([LT_INIT],[$0])dnl setup libtool first |
763 | + |
764 | + dnl enable/disable introspection |
765 | + m4_if([$2], [require], |
766 | + [dnl |
767 | + enable_introspection=yes |
768 | + ],[dnl |
769 | + AC_ARG_ENABLE(introspection, |
770 | + AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], |
771 | + [Enable introspection for this build]),, |
772 | + [enable_introspection=auto]) |
773 | + ])dnl |
774 | + |
775 | + AC_MSG_CHECKING([for gobject-introspection]) |
776 | + |
777 | + dnl presence/version checking |
778 | + AS_CASE([$enable_introspection], |
779 | + [no], [dnl |
780 | + found_introspection="no (disabled, use --enable-introspection to enable)" |
781 | + ],dnl |
782 | + [yes],[dnl |
783 | + PKG_CHECK_EXISTS([gobject-introspection-1.0],, |
784 | + AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) |
785 | + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], |
786 | + found_introspection=yes, |
787 | + AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) |
788 | + ],dnl |
789 | + [auto],[dnl |
790 | + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) |
791 | + ],dnl |
792 | + [dnl |
793 | + AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) |
794 | + ])dnl |
795 | + |
796 | + AC_MSG_RESULT([$found_introspection]) |
797 | + |
798 | + INTROSPECTION_SCANNER= |
799 | + INTROSPECTION_COMPILER= |
800 | + INTROSPECTION_GENERATE= |
801 | + INTROSPECTION_GIRDIR= |
802 | + INTROSPECTION_TYPELIBDIR= |
803 | + if test "x$found_introspection" = "xyes"; then |
804 | + INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` |
805 | + INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` |
806 | + INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` |
807 | + INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` |
808 | + INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" |
809 | + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` |
810 | + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` |
811 | + INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection |
812 | + fi |
813 | + AC_SUBST(INTROSPECTION_SCANNER) |
814 | + AC_SUBST(INTROSPECTION_COMPILER) |
815 | + AC_SUBST(INTROSPECTION_GENERATE) |
816 | + AC_SUBST(INTROSPECTION_GIRDIR) |
817 | + AC_SUBST(INTROSPECTION_TYPELIBDIR) |
818 | + AC_SUBST(INTROSPECTION_CFLAGS) |
819 | + AC_SUBST(INTROSPECTION_LIBS) |
820 | + AC_SUBST(INTROSPECTION_MAKEFILE) |
821 | + |
822 | + AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") |
823 | +]) |
824 | + |
825 | + |
826 | +dnl Usage: |
827 | +dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) |
828 | + |
829 | +AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], |
830 | +[ |
831 | + _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) |
832 | +]) |
833 | + |
834 | +dnl Usage: |
835 | +dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) |
836 | + |
837 | + |
838 | +AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], |
839 | +[ |
840 | + _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) |
841 | +]) |
842 | + |
843 | +# nls.m4 serial 5 (gettext-0.18) |
844 | +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, |
845 | +dnl Inc. |
846 | +dnl This file is free software; the Free Software Foundation |
847 | +dnl gives unlimited permission to copy and/or distribute it, |
848 | +dnl with or without modifications, as long as this notice is preserved. |
849 | +dnl |
850 | +dnl This file can can be used in projects which are not available under |
851 | +dnl the GNU General Public License or the GNU Library General Public |
852 | +dnl License but which still want to provide support for the GNU gettext |
853 | +dnl functionality. |
854 | +dnl Please note that the actual code of the GNU gettext library is covered |
855 | +dnl by the GNU Library General Public License, and the rest of the GNU |
856 | +dnl gettext package package is covered by the GNU General Public License. |
857 | +dnl They are *not* in the public domain. |
858 | + |
859 | +dnl Authors: |
860 | +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
861 | +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
862 | + |
863 | +AC_PREREQ([2.50]) |
864 | + |
865 | +AC_DEFUN([AM_NLS], |
866 | +[ |
867 | + AC_MSG_CHECKING([whether NLS is requested]) |
868 | + dnl Default is enabled NLS |
869 | + AC_ARG_ENABLE([nls], |
870 | + [ --disable-nls do not use Native Language Support], |
871 | + USE_NLS=$enableval, USE_NLS=yes) |
872 | + AC_MSG_RESULT([$USE_NLS]) |
873 | + AC_SUBST([USE_NLS]) |
874 | +]) |
875 | + |
876 | +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
877 | +# serial 1 (pkg-config-0.24) |
878 | +# |
879 | +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
880 | +# |
881 | +# This program is free software; you can redistribute it and/or modify |
882 | +# it under the terms of the GNU General Public License as published by |
883 | +# the Free Software Foundation; either version 2 of the License, or |
884 | +# (at your option) any later version. |
885 | +# |
886 | +# This program is distributed in the hope that it will be useful, but |
887 | +# WITHOUT ANY WARRANTY; without even the implied warranty of |
888 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
889 | +# General Public License for more details. |
890 | +# |
891 | +# You should have received a copy of the GNU General Public License |
892 | +# along with this program; if not, write to the Free Software |
893 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
894 | +# |
895 | +# As a special exception to the GNU General Public License, if you |
896 | +# distribute this file as part of a program that contains a |
897 | +# configuration script generated by Autoconf, you may include it under |
898 | +# the same distribution terms that you use for the rest of that program. |
899 | + |
900 | +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
901 | +# ---------------------------------- |
902 | +AC_DEFUN([PKG_PROG_PKG_CONFIG], |
903 | +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
904 | +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) |
905 | +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) |
906 | +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
907 | +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
908 | +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) |
909 | + |
910 | +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
911 | + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
912 | +fi |
913 | +if test -n "$PKG_CONFIG"; then |
914 | + _pkg_min_version=m4_default([$1], [0.9.0]) |
915 | + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
916 | + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
917 | + AC_MSG_RESULT([yes]) |
918 | + else |
919 | + AC_MSG_RESULT([no]) |
920 | + PKG_CONFIG="" |
921 | + fi |
922 | +fi[]dnl |
923 | +])# PKG_PROG_PKG_CONFIG |
924 | + |
925 | +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
926 | +# |
927 | +# Check to see whether a particular set of modules exists. Similar |
928 | +# to PKG_CHECK_MODULES(), but does not set variables or print errors. |
929 | +# |
930 | +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
931 | +# only at the first occurence in configure.ac, so if the first place |
932 | +# it's called might be skipped (such as if it is within an "if", you |
933 | +# have to call PKG_CHECK_EXISTS manually |
934 | +# -------------------------------------------------------------- |
935 | +AC_DEFUN([PKG_CHECK_EXISTS], |
936 | +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
937 | +if test -n "$PKG_CONFIG" && \ |
938 | + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
939 | + m4_default([$2], [:]) |
940 | +m4_ifvaln([$3], [else |
941 | + $3])dnl |
942 | +fi]) |
943 | + |
944 | +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
945 | +# --------------------------------------------- |
946 | +m4_define([_PKG_CONFIG], |
947 | +[if test -n "$$1"; then |
948 | + pkg_cv_[]$1="$$1" |
949 | + elif test -n "$PKG_CONFIG"; then |
950 | + PKG_CHECK_EXISTS([$3], |
951 | + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` |
952 | + test "x$?" != "x0" && pkg_failed=yes ], |
953 | + [pkg_failed=yes]) |
954 | + else |
955 | + pkg_failed=untried |
956 | +fi[]dnl |
957 | +])# _PKG_CONFIG |
958 | + |
959 | +# _PKG_SHORT_ERRORS_SUPPORTED |
960 | +# ----------------------------- |
961 | +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
962 | +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
963 | +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
964 | + _pkg_short_errors_supported=yes |
965 | +else |
966 | + _pkg_short_errors_supported=no |
967 | +fi[]dnl |
968 | +])# _PKG_SHORT_ERRORS_SUPPORTED |
969 | + |
970 | + |
971 | +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
972 | +# [ACTION-IF-NOT-FOUND]) |
973 | +# |
974 | +# |
975 | +# Note that if there is a possibility the first call to |
976 | +# PKG_CHECK_MODULES might not happen, you should be sure to include an |
977 | +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
978 | +# |
979 | +# |
980 | +# -------------------------------------------------------------- |
981 | +AC_DEFUN([PKG_CHECK_MODULES], |
982 | +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
983 | +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
984 | +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
985 | + |
986 | +pkg_failed=no |
987 | +AC_MSG_CHECKING([for $1]) |
988 | + |
989 | +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
990 | +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
991 | + |
992 | +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
993 | +and $1[]_LIBS to avoid the need to call pkg-config. |
994 | +See the pkg-config man page for more details.]) |
995 | + |
996 | +if test $pkg_failed = yes; then |
997 | + AC_MSG_RESULT([no]) |
998 | + _PKG_SHORT_ERRORS_SUPPORTED |
999 | + if test $_pkg_short_errors_supported = yes; then |
1000 | + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
1001 | + else |
1002 | + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
1003 | + fi |
1004 | + # Put the nasty error message in config.log where it belongs |
1005 | + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
1006 | + |
1007 | + m4_default([$4], [AC_MSG_ERROR( |
1008 | +[Package requirements ($2) were not met: |
1009 | + |
1010 | +$$1_PKG_ERRORS |
1011 | + |
1012 | +Consider adjusting the PKG_CONFIG_PATH environment variable if you |
1013 | +installed software in a non-standard prefix. |
1014 | + |
1015 | +_PKG_TEXT])[]dnl |
1016 | + ]) |
1017 | +elif test $pkg_failed = untried; then |
1018 | + AC_MSG_RESULT([no]) |
1019 | + m4_default([$4], [AC_MSG_FAILURE( |
1020 | +[The pkg-config script could not be found or is too old. Make sure it |
1021 | +is in your PATH or set the PKG_CONFIG environment variable to the full |
1022 | +path to pkg-config. |
1023 | + |
1024 | +_PKG_TEXT |
1025 | + |
1026 | +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl |
1027 | + ]) |
1028 | +else |
1029 | + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
1030 | + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
1031 | + AC_MSG_RESULT([yes]) |
1032 | + $3 |
1033 | +fi[]dnl |
1034 | +])# PKG_CHECK_MODULES |
1035 | + |
1036 | # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
1037 | # |
1038 | # This file is free software; the Free Software Foundation |
1039 | @@ -1033,809 +1838,6 @@ |
1040 | AC_SUBST([am__untar]) |
1041 | ]) # _AM_PROG_TAR |
1042 | |
1043 | -# nls.m4 serial 5 (gettext-0.18) |
1044 | -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, |
1045 | -dnl Inc. |
1046 | -dnl This file is free software; the Free Software Foundation |
1047 | -dnl gives unlimited permission to copy and/or distribute it, |
1048 | -dnl with or without modifications, as long as this notice is preserved. |
1049 | -dnl |
1050 | -dnl This file can can be used in projects which are not available under |
1051 | -dnl the GNU General Public License or the GNU Library General Public |
1052 | -dnl License but which still want to provide support for the GNU gettext |
1053 | -dnl functionality. |
1054 | -dnl Please note that the actual code of the GNU gettext library is covered |
1055 | -dnl by the GNU Library General Public License, and the rest of the GNU |
1056 | -dnl gettext package package is covered by the GNU General Public License. |
1057 | -dnl They are *not* in the public domain. |
1058 | - |
1059 | -dnl Authors: |
1060 | -dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
1061 | -dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
1062 | - |
1063 | -AC_PREREQ([2.50]) |
1064 | - |
1065 | -AC_DEFUN([AM_NLS], |
1066 | -[ |
1067 | - AC_MSG_CHECKING([whether NLS is requested]) |
1068 | - dnl Default is enabled NLS |
1069 | - AC_ARG_ENABLE([nls], |
1070 | - [ --disable-nls do not use Native Language Support], |
1071 | - USE_NLS=$enableval, USE_NLS=yes) |
1072 | - AC_MSG_RESULT([$USE_NLS]) |
1073 | - AC_SUBST([USE_NLS]) |
1074 | -]) |
1075 | - |
1076 | -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
1077 | -# serial 1 (pkg-config-0.24) |
1078 | -# |
1079 | -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
1080 | -# |
1081 | -# This program is free software; you can redistribute it and/or modify |
1082 | -# it under the terms of the GNU General Public License as published by |
1083 | -# the Free Software Foundation; either version 2 of the License, or |
1084 | -# (at your option) any later version. |
1085 | -# |
1086 | -# This program is distributed in the hope that it will be useful, but |
1087 | -# WITHOUT ANY WARRANTY; without even the implied warranty of |
1088 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1089 | -# General Public License for more details. |
1090 | -# |
1091 | -# You should have received a copy of the GNU General Public License |
1092 | -# along with this program; if not, write to the Free Software |
1093 | -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1094 | -# |
1095 | -# As a special exception to the GNU General Public License, if you |
1096 | -# distribute this file as part of a program that contains a |
1097 | -# configuration script generated by Autoconf, you may include it under |
1098 | -# the same distribution terms that you use for the rest of that program. |
1099 | - |
1100 | -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
1101 | -# ---------------------------------- |
1102 | -AC_DEFUN([PKG_PROG_PKG_CONFIG], |
1103 | -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
1104 | -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) |
1105 | -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
1106 | -AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
1107 | -AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) |
1108 | - |
1109 | -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
1110 | - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
1111 | -fi |
1112 | -if test -n "$PKG_CONFIG"; then |
1113 | - _pkg_min_version=m4_default([$1], [0.9.0]) |
1114 | - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
1115 | - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
1116 | - AC_MSG_RESULT([yes]) |
1117 | - else |
1118 | - AC_MSG_RESULT([no]) |
1119 | - PKG_CONFIG="" |
1120 | - fi |
1121 | -fi[]dnl |
1122 | -])# PKG_PROG_PKG_CONFIG |
1123 | - |
1124 | -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
1125 | -# |
1126 | -# Check to see whether a particular set of modules exists. Similar |
1127 | -# to PKG_CHECK_MODULES(), but does not set variables or print errors. |
1128 | -# |
1129 | -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
1130 | -# only at the first occurence in configure.ac, so if the first place |
1131 | -# it's called might be skipped (such as if it is within an "if", you |
1132 | -# have to call PKG_CHECK_EXISTS manually |
1133 | -# -------------------------------------------------------------- |
1134 | -AC_DEFUN([PKG_CHECK_EXISTS], |
1135 | -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
1136 | -if test -n "$PKG_CONFIG" && \ |
1137 | - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
1138 | - m4_default([$2], [:]) |
1139 | -m4_ifvaln([$3], [else |
1140 | - $3])dnl |
1141 | -fi]) |
1142 | - |
1143 | -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
1144 | -# --------------------------------------------- |
1145 | -m4_define([_PKG_CONFIG], |
1146 | -[if test -n "$$1"; then |
1147 | - pkg_cv_[]$1="$$1" |
1148 | - elif test -n "$PKG_CONFIG"; then |
1149 | - PKG_CHECK_EXISTS([$3], |
1150 | - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], |
1151 | - [pkg_failed=yes]) |
1152 | - else |
1153 | - pkg_failed=untried |
1154 | -fi[]dnl |
1155 | -])# _PKG_CONFIG |
1156 | - |
1157 | -# _PKG_SHORT_ERRORS_SUPPORTED |
1158 | -# ----------------------------- |
1159 | -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
1160 | -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
1161 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
1162 | - _pkg_short_errors_supported=yes |
1163 | -else |
1164 | - _pkg_short_errors_supported=no |
1165 | -fi[]dnl |
1166 | -])# _PKG_SHORT_ERRORS_SUPPORTED |
1167 | - |
1168 | - |
1169 | -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
1170 | -# [ACTION-IF-NOT-FOUND]) |
1171 | -# |
1172 | -# |
1173 | -# Note that if there is a possibility the first call to |
1174 | -# PKG_CHECK_MODULES might not happen, you should be sure to include an |
1175 | -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
1176 | -# |
1177 | -# |
1178 | -# -------------------------------------------------------------- |
1179 | -AC_DEFUN([PKG_CHECK_MODULES], |
1180 | -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
1181 | -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
1182 | -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
1183 | - |
1184 | -pkg_failed=no |
1185 | -AC_MSG_CHECKING([for $1]) |
1186 | - |
1187 | -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
1188 | -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
1189 | - |
1190 | -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
1191 | -and $1[]_LIBS to avoid the need to call pkg-config. |
1192 | -See the pkg-config man page for more details.]) |
1193 | - |
1194 | -if test $pkg_failed = yes; then |
1195 | - AC_MSG_RESULT([no]) |
1196 | - _PKG_SHORT_ERRORS_SUPPORTED |
1197 | - if test $_pkg_short_errors_supported = yes; then |
1198 | - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` |
1199 | - else |
1200 | - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` |
1201 | - fi |
1202 | - # Put the nasty error message in config.log where it belongs |
1203 | - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
1204 | - |
1205 | - m4_default([$4], [AC_MSG_ERROR( |
1206 | -[Package requirements ($2) were not met: |
1207 | - |
1208 | -$$1_PKG_ERRORS |
1209 | - |
1210 | -Consider adjusting the PKG_CONFIG_PATH environment variable if you |
1211 | -installed software in a non-standard prefix. |
1212 | - |
1213 | -_PKG_TEXT]) |
1214 | - ]) |
1215 | -elif test $pkg_failed = untried; then |
1216 | - AC_MSG_RESULT([no]) |
1217 | - m4_default([$4], [AC_MSG_FAILURE( |
1218 | -[The pkg-config script could not be found or is too old. Make sure it |
1219 | -is in your PATH or set the PKG_CONFIG environment variable to the full |
1220 | -path to pkg-config. |
1221 | - |
1222 | -_PKG_TEXT |
1223 | - |
1224 | -To get pkg-config, see <http://pkg-config.freedesktop.org/>.]) |
1225 | - ]) |
1226 | -else |
1227 | - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
1228 | - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
1229 | - AC_MSG_RESULT([yes]) |
1230 | - $3 |
1231 | -fi[]dnl |
1232 | -])# PKG_CHECK_MODULES |
1233 | - |
1234 | -# Copyright (C) 1995-2002 Free Software Foundation, Inc. |
1235 | -# Copyright (C) 2001-2003,2004 Red Hat, Inc. |
1236 | -# |
1237 | -# This file is free software, distributed under the terms of the GNU |
1238 | -# General Public License. As a special exception to the GNU General |
1239 | -# Public License, this file may be distributed as part of a program |
1240 | -# that contains a configuration script generated by Autoconf, under |
1241 | -# the same distribution terms as the rest of that program. |
1242 | -# |
1243 | -# This file can be copied and used freely without restrictions. It can |
1244 | -# be used in projects which are not available under the GNU Public License |
1245 | -# but which still want to provide support for the GNU gettext functionality. |
1246 | -# |
1247 | -# Macro to add for using GNU gettext. |
1248 | -# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
1249 | -# |
1250 | -# Modified to never use included libintl. |
1251 | -# Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
1252 | -# |
1253 | -# Major rework to remove unused code |
1254 | -# Owen Taylor <otaylor@redhat.com>, 12/11/2002 |
1255 | -# |
1256 | -# Added better handling of ALL_LINGUAS from GNU gettext version |
1257 | -# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002 |
1258 | -# |
1259 | -# Modified to require ngettext |
1260 | -# Matthias Clasen <mclasen@redhat.com> 08/06/2004 |
1261 | -# |
1262 | -# We need this here as well, since someone might use autoconf-2.5x |
1263 | -# to configure GLib then an older version to configure a package |
1264 | -# using AM_GLIB_GNU_GETTEXT |
1265 | -AC_PREREQ(2.53) |
1266 | - |
1267 | -dnl |
1268 | -dnl We go to great lengths to make sure that aclocal won't |
1269 | -dnl try to pull in the installed version of these macros |
1270 | -dnl when running aclocal in the glib directory. |
1271 | -dnl |
1272 | -m4_copy([AC_DEFUN],[glib_DEFUN]) |
1273 | -m4_copy([AC_REQUIRE],[glib_REQUIRE]) |
1274 | -dnl |
1275 | -dnl At the end, if we're not within glib, we'll define the public |
1276 | -dnl definitions in terms of our private definitions. |
1277 | -dnl |
1278 | - |
1279 | -# GLIB_LC_MESSAGES |
1280 | -#-------------------- |
1281 | -glib_DEFUN([GLIB_LC_MESSAGES], |
1282 | - [AC_CHECK_HEADERS([locale.h]) |
1283 | - if test $ac_cv_header_locale_h = yes; then |
1284 | - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
1285 | - [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
1286 | - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
1287 | - if test $am_cv_val_LC_MESSAGES = yes; then |
1288 | - AC_DEFINE(HAVE_LC_MESSAGES, 1, |
1289 | - [Define if your <locale.h> file defines LC_MESSAGES.]) |
1290 | - fi |
1291 | - fi]) |
1292 | - |
1293 | -# GLIB_PATH_PROG_WITH_TEST |
1294 | -#---------------------------- |
1295 | -dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
1296 | -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
1297 | -glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], |
1298 | -[# Extract the first word of "$2", so it can be a program name with args. |
1299 | -set dummy $2; ac_word=[$]2 |
1300 | -AC_MSG_CHECKING([for $ac_word]) |
1301 | -AC_CACHE_VAL(ac_cv_path_$1, |
1302 | -[case "[$]$1" in |
1303 | - /*) |
1304 | - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
1305 | - ;; |
1306 | - *) |
1307 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
1308 | - for ac_dir in ifelse([$5], , $PATH, [$5]); do |
1309 | - test -z "$ac_dir" && ac_dir=. |
1310 | - if test -f $ac_dir/$ac_word; then |
1311 | - if [$3]; then |
1312 | - ac_cv_path_$1="$ac_dir/$ac_word" |
1313 | - break |
1314 | - fi |
1315 | - fi |
1316 | - done |
1317 | - IFS="$ac_save_ifs" |
1318 | -dnl If no 4th arg is given, leave the cache variable unset, |
1319 | -dnl so AC_PATH_PROGS will keep looking. |
1320 | -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
1321 | -])dnl |
1322 | - ;; |
1323 | -esac])dnl |
1324 | -$1="$ac_cv_path_$1" |
1325 | -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
1326 | - AC_MSG_RESULT([$]$1) |
1327 | -else |
1328 | - AC_MSG_RESULT(no) |
1329 | -fi |
1330 | -AC_SUBST($1)dnl |
1331 | -]) |
1332 | - |
1333 | -# GLIB_WITH_NLS |
1334 | -#----------------- |
1335 | -glib_DEFUN([GLIB_WITH_NLS], |
1336 | - dnl NLS is obligatory |
1337 | - [USE_NLS=yes |
1338 | - AC_SUBST(USE_NLS) |
1339 | - |
1340 | - gt_cv_have_gettext=no |
1341 | - |
1342 | - CATOBJEXT=NONE |
1343 | - XGETTEXT=: |
1344 | - INTLLIBS= |
1345 | - |
1346 | - AC_CHECK_HEADER(libintl.h, |
1347 | - [gt_cv_func_dgettext_libintl="no" |
1348 | - libintl_extra_libs="" |
1349 | - |
1350 | - # |
1351 | - # First check in libc |
1352 | - # |
1353 | - AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, |
1354 | - [AC_TRY_LINK([ |
1355 | -#include <libintl.h> |
1356 | -], |
1357 | - [return !ngettext ("","", 1)], |
1358 | - gt_cv_func_ngettext_libc=yes, |
1359 | - gt_cv_func_ngettext_libc=no) |
1360 | - ]) |
1361 | - |
1362 | - if test "$gt_cv_func_ngettext_libc" = "yes" ; then |
1363 | - AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
1364 | - [AC_TRY_LINK([ |
1365 | -#include <libintl.h> |
1366 | -], |
1367 | - [return !dgettext ("","")], |
1368 | - gt_cv_func_dgettext_libc=yes, |
1369 | - gt_cv_func_dgettext_libc=no) |
1370 | - ]) |
1371 | - fi |
1372 | - |
1373 | - if test "$gt_cv_func_ngettext_libc" = "yes" ; then |
1374 | - AC_CHECK_FUNCS(bind_textdomain_codeset) |
1375 | - fi |
1376 | - |
1377 | - # |
1378 | - # If we don't have everything we want, check in libintl |
1379 | - # |
1380 | - if test "$gt_cv_func_dgettext_libc" != "yes" \ |
1381 | - || test "$gt_cv_func_ngettext_libc" != "yes" \ |
1382 | - || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then |
1383 | - |
1384 | - AC_CHECK_LIB(intl, bindtextdomain, |
1385 | - [AC_CHECK_LIB(intl, ngettext, |
1386 | - [AC_CHECK_LIB(intl, dgettext, |
1387 | - gt_cv_func_dgettext_libintl=yes)])]) |
1388 | - |
1389 | - if test "$gt_cv_func_dgettext_libintl" != "yes" ; then |
1390 | - AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
1391 | - AC_MSG_RESULT([]) |
1392 | - AC_CHECK_LIB(intl, ngettext, |
1393 | - [AC_CHECK_LIB(intl, dcgettext, |
1394 | - [gt_cv_func_dgettext_libintl=yes |
1395 | - libintl_extra_libs=-liconv], |
1396 | - :,-liconv)], |
1397 | - :,-liconv) |
1398 | - fi |
1399 | - |
1400 | - # |
1401 | - # If we found libintl, then check in it for bind_textdomain_codeset(); |
1402 | - # we'll prefer libc if neither have bind_textdomain_codeset(), |
1403 | - # and both have dgettext and ngettext |
1404 | - # |
1405 | - if test "$gt_cv_func_dgettext_libintl" = "yes" ; then |
1406 | - glib_save_LIBS="$LIBS" |
1407 | - LIBS="$LIBS -lintl $libintl_extra_libs" |
1408 | - unset ac_cv_func_bind_textdomain_codeset |
1409 | - AC_CHECK_FUNCS(bind_textdomain_codeset) |
1410 | - LIBS="$glib_save_LIBS" |
1411 | - |
1412 | - if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then |
1413 | - gt_cv_func_dgettext_libc=no |
1414 | - else |
1415 | - if test "$gt_cv_func_dgettext_libc" = "yes" \ |
1416 | - && test "$gt_cv_func_ngettext_libc" = "yes"; then |
1417 | - gt_cv_func_dgettext_libintl=no |
1418 | - fi |
1419 | - fi |
1420 | - fi |
1421 | - fi |
1422 | - |
1423 | - if test "$gt_cv_func_dgettext_libc" = "yes" \ |
1424 | - || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
1425 | - gt_cv_have_gettext=yes |
1426 | - fi |
1427 | - |
1428 | - if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
1429 | - INTLLIBS="-lintl $libintl_extra_libs" |
1430 | - fi |
1431 | - |
1432 | - if test "$gt_cv_have_gettext" = "yes"; then |
1433 | - AC_DEFINE(HAVE_GETTEXT,1, |
1434 | - [Define if the GNU gettext() function is already present or preinstalled.]) |
1435 | - GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
1436 | - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
1437 | - if test "$MSGFMT" != "no"; then |
1438 | - glib_save_LIBS="$LIBS" |
1439 | - LIBS="$LIBS $INTLLIBS" |
1440 | - AC_CHECK_FUNCS(dcgettext) |
1441 | - MSGFMT_OPTS= |
1442 | - AC_MSG_CHECKING([if msgfmt accepts -c]) |
1443 | - GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ |
1444 | -msgid "" |
1445 | -msgstr "" |
1446 | -"Content-Type: text/plain; charset=UTF-8\n" |
1447 | -"Project-Id-Version: test 1.0\n" |
1448 | -"PO-Revision-Date: 2007-02-15 12:01+0100\n" |
1449 | -"Last-Translator: test <foo@bar.xx>\n" |
1450 | -"Language-Team: C <LL@li.org>\n" |
1451 | -"MIME-Version: 1.0\n" |
1452 | -"Content-Transfer-Encoding: 8bit\n" |
1453 | -], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) |
1454 | - AC_SUBST(MSGFMT_OPTS) |
1455 | - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
1456 | - GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
1457 | - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
1458 | - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
1459 | - return _nl_msg_cat_cntr], |
1460 | - [CATOBJEXT=.gmo |
1461 | - DATADIRNAME=share], |
1462 | - [case $host in |
1463 | - *-*-solaris*) |
1464 | - dnl On Solaris, if bind_textdomain_codeset is in libc, |
1465 | - dnl GNU format message catalog is always supported, |
1466 | - dnl since both are added to the libc all together. |
1467 | - dnl Hence, we'd like to go with DATADIRNAME=share and |
1468 | - dnl and CATOBJEXT=.gmo in this case. |
1469 | - AC_CHECK_FUNC(bind_textdomain_codeset, |
1470 | - [CATOBJEXT=.gmo |
1471 | - DATADIRNAME=share], |
1472 | - [CATOBJEXT=.mo |
1473 | - DATADIRNAME=lib]) |
1474 | - ;; |
1475 | - *) |
1476 | - CATOBJEXT=.mo |
1477 | - DATADIRNAME=lib |
1478 | - ;; |
1479 | - esac]) |
1480 | - LIBS="$glib_save_LIBS" |
1481 | - INSTOBJEXT=.mo |
1482 | - else |
1483 | - gt_cv_have_gettext=no |
1484 | - fi |
1485 | - fi |
1486 | - ]) |
1487 | - |
1488 | - if test "$gt_cv_have_gettext" = "yes" ; then |
1489 | - AC_DEFINE(ENABLE_NLS, 1, |
1490 | - [always defined to indicate that i18n is enabled]) |
1491 | - fi |
1492 | - |
1493 | - dnl Test whether we really found GNU xgettext. |
1494 | - if test "$XGETTEXT" != ":"; then |
1495 | - dnl If it is not GNU xgettext we define it as : so that the |
1496 | - dnl Makefiles still can work. |
1497 | - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
1498 | - : ; |
1499 | - else |
1500 | - AC_MSG_RESULT( |
1501 | - [found xgettext program is not GNU xgettext; ignore it]) |
1502 | - XGETTEXT=":" |
1503 | - fi |
1504 | - fi |
1505 | - |
1506 | - # We need to process the po/ directory. |
1507 | - POSUB=po |
1508 | - |
1509 | - AC_OUTPUT_COMMANDS( |
1510 | - [case "$CONFIG_FILES" in *po/Makefile.in*) |
1511 | - sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
1512 | - esac]) |
1513 | - |
1514 | - dnl These rules are solely for the distribution goal. While doing this |
1515 | - dnl we only have to keep exactly one list of the available catalogs |
1516 | - dnl in configure.ac. |
1517 | - for lang in $ALL_LINGUAS; do |
1518 | - GMOFILES="$GMOFILES $lang.gmo" |
1519 | - POFILES="$POFILES $lang.po" |
1520 | - done |
1521 | - |
1522 | - dnl Make all variables we use known to autoconf. |
1523 | - AC_SUBST(CATALOGS) |
1524 | - AC_SUBST(CATOBJEXT) |
1525 | - AC_SUBST(DATADIRNAME) |
1526 | - AC_SUBST(GMOFILES) |
1527 | - AC_SUBST(INSTOBJEXT) |
1528 | - AC_SUBST(INTLLIBS) |
1529 | - AC_SUBST(PO_IN_DATADIR_TRUE) |
1530 | - AC_SUBST(PO_IN_DATADIR_FALSE) |
1531 | - AC_SUBST(POFILES) |
1532 | - AC_SUBST(POSUB) |
1533 | - ]) |
1534 | - |
1535 | -# AM_GLIB_GNU_GETTEXT |
1536 | -# ------------------- |
1537 | -# Do checks necessary for use of gettext. If a suitable implementation |
1538 | -# of gettext is found in either in libintl or in the C library, |
1539 | -# it will set INTLLIBS to the libraries needed for use of gettext |
1540 | -# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable |
1541 | -# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() |
1542 | -# on various variables needed by the Makefile.in.in installed by |
1543 | -# glib-gettextize. |
1544 | -dnl |
1545 | -glib_DEFUN([GLIB_GNU_GETTEXT], |
1546 | - [AC_REQUIRE([AC_PROG_CC])dnl |
1547 | - AC_REQUIRE([AC_HEADER_STDC])dnl |
1548 | - |
1549 | - GLIB_LC_MESSAGES |
1550 | - GLIB_WITH_NLS |
1551 | - |
1552 | - if test "$gt_cv_have_gettext" = "yes"; then |
1553 | - if test "x$ALL_LINGUAS" = "x"; then |
1554 | - LINGUAS= |
1555 | - else |
1556 | - AC_MSG_CHECKING(for catalogs to be installed) |
1557 | - NEW_LINGUAS= |
1558 | - for presentlang in $ALL_LINGUAS; do |
1559 | - useit=no |
1560 | - if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then |
1561 | - desiredlanguages="$LINGUAS" |
1562 | - else |
1563 | - desiredlanguages="$ALL_LINGUAS" |
1564 | - fi |
1565 | - for desiredlang in $desiredlanguages; do |
1566 | - # Use the presentlang catalog if desiredlang is |
1567 | - # a. equal to presentlang, or |
1568 | - # b. a variant of presentlang (because in this case, |
1569 | - # presentlang can be used as a fallback for messages |
1570 | - # which are not translated in the desiredlang catalog). |
1571 | - case "$desiredlang" in |
1572 | - "$presentlang"*) useit=yes;; |
1573 | - esac |
1574 | - done |
1575 | - if test $useit = yes; then |
1576 | - NEW_LINGUAS="$NEW_LINGUAS $presentlang" |
1577 | - fi |
1578 | - done |
1579 | - LINGUAS=$NEW_LINGUAS |
1580 | - AC_MSG_RESULT($LINGUAS) |
1581 | - fi |
1582 | - |
1583 | - dnl Construct list of names of catalog files to be constructed. |
1584 | - if test -n "$LINGUAS"; then |
1585 | - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
1586 | - fi |
1587 | - fi |
1588 | - |
1589 | - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
1590 | - dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
1591 | - dnl Try to locate is. |
1592 | - MKINSTALLDIRS= |
1593 | - if test -n "$ac_aux_dir"; then |
1594 | - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
1595 | - fi |
1596 | - if test -z "$MKINSTALLDIRS"; then |
1597 | - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
1598 | - fi |
1599 | - AC_SUBST(MKINSTALLDIRS) |
1600 | - |
1601 | - dnl Generate list of files to be processed by xgettext which will |
1602 | - dnl be included in po/Makefile. |
1603 | - test -d po || mkdir po |
1604 | - if test "x$srcdir" != "x."; then |
1605 | - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
1606 | - posrcprefix="$srcdir/" |
1607 | - else |
1608 | - posrcprefix="../$srcdir/" |
1609 | - fi |
1610 | - else |
1611 | - posrcprefix="../" |
1612 | - fi |
1613 | - rm -f po/POTFILES |
1614 | - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
1615 | - < $srcdir/po/POTFILES.in > po/POTFILES |
1616 | - ]) |
1617 | - |
1618 | -# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) |
1619 | -# ------------------------------- |
1620 | -# Define VARIABLE to the location where catalog files will |
1621 | -# be installed by po/Makefile. |
1622 | -glib_DEFUN([GLIB_DEFINE_LOCALEDIR], |
1623 | -[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl |
1624 | -glib_save_prefix="$prefix" |
1625 | -glib_save_exec_prefix="$exec_prefix" |
1626 | -glib_save_datarootdir="$datarootdir" |
1627 | -test "x$prefix" = xNONE && prefix=$ac_default_prefix |
1628 | -test "x$exec_prefix" = xNONE && exec_prefix=$prefix |
1629 | -datarootdir=`eval echo "${datarootdir}"` |
1630 | -if test "x$CATOBJEXT" = "x.mo" ; then |
1631 | - localedir=`eval echo "${libdir}/locale"` |
1632 | -else |
1633 | - localedir=`eval echo "${datadir}/locale"` |
1634 | -fi |
1635 | -prefix="$glib_save_prefix" |
1636 | -exec_prefix="$glib_save_exec_prefix" |
1637 | -datarootdir="$glib_save_datarootdir" |
1638 | -AC_DEFINE_UNQUOTED($1, "$localedir", |
1639 | - [Define the location where the catalogs will be installed]) |
1640 | -]) |
1641 | - |
1642 | -dnl |
1643 | -dnl Now the definitions that aclocal will find |
1644 | -dnl |
1645 | -ifdef(glib_configure_ac,[],[ |
1646 | -AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) |
1647 | -AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) |
1648 | -])dnl |
1649 | - |
1650 | -# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) |
1651 | -# |
1652 | -# Create a temporary file with TEST-FILE as its contents and pass the |
1653 | -# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with |
1654 | -# 0 and perform ACTION-IF-FAIL for any other exit status. |
1655 | -AC_DEFUN([GLIB_RUN_PROG], |
1656 | -[cat >conftest.foo <<_ACEOF |
1657 | -$2 |
1658 | -_ACEOF |
1659 | -if AC_RUN_LOG([$1 conftest.foo]); then |
1660 | - m4_ifval([$3], [$3], [:]) |
1661 | -m4_ifvaln([$4], [else $4])dnl |
1662 | -echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD |
1663 | -sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD |
1664 | -fi]) |
1665 | - |
1666 | - |
1667 | -dnl GLIB_GSETTINGS |
1668 | -dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether |
1669 | -dnl the schema should be compiled |
1670 | -dnl |
1671 | - |
1672 | -AC_DEFUN([GLIB_GSETTINGS], |
1673 | -[ |
1674 | - m4_pattern_allow([AM_V_GEN]) |
1675 | - AC_ARG_ENABLE(schemas-compile, |
1676 | - AS_HELP_STRING([--disable-schemas-compile], |
1677 | - [Disable regeneration of gschemas.compiled on install]), |
1678 | - [case ${enableval} in |
1679 | - yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;; |
1680 | - no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;; |
1681 | - *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;; |
1682 | - esac]) |
1683 | - AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE]) |
1684 | - PKG_PROG_PKG_CONFIG([0.16]) |
1685 | - AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas]) |
1686 | - if test x$cross_compiling != xyes; then |
1687 | - GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0` |
1688 | - else |
1689 | - AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas) |
1690 | - fi |
1691 | - AC_SUBST(GLIB_COMPILE_SCHEMAS) |
1692 | - if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then |
1693 | - ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2]) |
1694 | - else |
1695 | - ifelse([$1],,[:],[$1]) |
1696 | - fi |
1697 | - |
1698 | - GSETTINGS_RULES=' |
1699 | -.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas |
1700 | - |
1701 | -mostlyclean-am: clean-gsettings-schemas |
1702 | - |
1703 | -gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE)) |
1704 | - |
1705 | -%.gschema.valid: %.gschema.xml $(gsettings__enum_file) |
1706 | - $(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 [$]@ |
1707 | - |
1708 | -all-am: $(gsettings_SCHEMAS:.xml=.valid) |
1709 | -uninstall-am: uninstall-gsettings-schemas |
1710 | -install-data-am: install-gsettings-schemas |
1711 | - |
1712 | -.SECONDARY: $(gsettings_SCHEMAS) |
1713 | - |
1714 | -install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file) |
1715 | - @$(NORMAL_INSTALL) |
1716 | - if test -n "$^"; then \ |
1717 | - test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \ |
1718 | - $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \ |
1719 | - test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \ |
1720 | - fi |
1721 | - |
1722 | -uninstall-gsettings-schemas: |
1723 | - @$(NORMAL_UNINSTALL) |
1724 | - @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \ |
1725 | - files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \ |
1726 | - test -n "$$files" || exit 0; \ |
1727 | - echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \ |
1728 | - cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files |
1729 | - test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) |
1730 | - |
1731 | -clean-gsettings-schemas: |
1732 | - rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file) |
1733 | - |
1734 | -ifdef gsettings_ENUM_NAMESPACE |
1735 | -$(gsettings__enum_file): $(gsettings_ENUM_FILES) |
1736 | - $(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 [$]@ |
1737 | -endif |
1738 | -' |
1739 | - _GSETTINGS_SUBST(GSETTINGS_RULES) |
1740 | -]) |
1741 | - |
1742 | -dnl _GSETTINGS_SUBST(VARIABLE) |
1743 | -dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST |
1744 | -AC_DEFUN([_GSETTINGS_SUBST], |
1745 | -[ |
1746 | -AC_SUBST([$1]) |
1747 | -m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) |
1748 | -] |
1749 | -) |
1750 | - |
1751 | -dnl -*- mode: autoconf -*- |
1752 | -dnl Copyright 2009 Johan Dahlin |
1753 | -dnl |
1754 | -dnl This file is free software; the author(s) gives unlimited |
1755 | -dnl permission to copy and/or distribute it, with or without |
1756 | -dnl modifications, as long as this notice is preserved. |
1757 | -dnl |
1758 | - |
1759 | -# serial 1 |
1760 | - |
1761 | -m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], |
1762 | -[ |
1763 | - AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first |
1764 | - AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first |
1765 | - AC_BEFORE([LT_INIT],[$0])dnl setup libtool first |
1766 | - |
1767 | - dnl enable/disable introspection |
1768 | - m4_if([$2], [require], |
1769 | - [dnl |
1770 | - enable_introspection=yes |
1771 | - ],[dnl |
1772 | - AC_ARG_ENABLE(introspection, |
1773 | - AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], |
1774 | - [Enable introspection for this build]),, |
1775 | - [enable_introspection=auto]) |
1776 | - ])dnl |
1777 | - |
1778 | - AC_MSG_CHECKING([for gobject-introspection]) |
1779 | - |
1780 | - dnl presence/version checking |
1781 | - AS_CASE([$enable_introspection], |
1782 | - [no], [dnl |
1783 | - found_introspection="no (disabled, use --enable-introspection to enable)" |
1784 | - ],dnl |
1785 | - [yes],[dnl |
1786 | - PKG_CHECK_EXISTS([gobject-introspection-1.0],, |
1787 | - AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) |
1788 | - PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], |
1789 | - found_introspection=yes, |
1790 | - AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) |
1791 | - ],dnl |
1792 | - [auto],[dnl |
1793 | - PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) |
1794 | - ],dnl |
1795 | - [dnl |
1796 | - AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) |
1797 | - ])dnl |
1798 | - |
1799 | - AC_MSG_RESULT([$found_introspection]) |
1800 | - |
1801 | - INTROSPECTION_SCANNER= |
1802 | - INTROSPECTION_COMPILER= |
1803 | - INTROSPECTION_GENERATE= |
1804 | - INTROSPECTION_GIRDIR= |
1805 | - INTROSPECTION_TYPELIBDIR= |
1806 | - if test "x$found_introspection" = "xyes"; then |
1807 | - INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` |
1808 | - INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` |
1809 | - INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` |
1810 | - INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` |
1811 | - INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" |
1812 | - INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` |
1813 | - INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` |
1814 | - INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection |
1815 | - fi |
1816 | - AC_SUBST(INTROSPECTION_SCANNER) |
1817 | - AC_SUBST(INTROSPECTION_COMPILER) |
1818 | - AC_SUBST(INTROSPECTION_GENERATE) |
1819 | - AC_SUBST(INTROSPECTION_GIRDIR) |
1820 | - AC_SUBST(INTROSPECTION_TYPELIBDIR) |
1821 | - AC_SUBST(INTROSPECTION_CFLAGS) |
1822 | - AC_SUBST(INTROSPECTION_LIBS) |
1823 | - AC_SUBST(INTROSPECTION_MAKEFILE) |
1824 | - |
1825 | - AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") |
1826 | -]) |
1827 | - |
1828 | - |
1829 | -dnl Usage: |
1830 | -dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) |
1831 | - |
1832 | -AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], |
1833 | -[ |
1834 | - _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) |
1835 | -]) |
1836 | - |
1837 | -dnl Usage: |
1838 | -dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) |
1839 | - |
1840 | - |
1841 | -AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], |
1842 | -[ |
1843 | - _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) |
1844 | -]) |
1845 | - |
1846 | m4_include([m4/gtk-doc.m4]) |
1847 | m4_include([m4/intltool.m4]) |
1848 | m4_include([m4/libtool.m4]) |
1849 | |
1850 | === modified file 'config.h.in' |
1851 | --- config.h.in 2011-05-16 18:53:51 +0000 |
1852 | +++ config.h.in 2011-08-06 03:01:32 +0000 |
1853 | @@ -24,6 +24,9 @@ |
1854 | /* Define the location where the catalogs will be installed */ |
1855 | #undef GNOMELOCALEDIR |
1856 | |
1857 | +/* Have AppIndicator */ |
1858 | +#undef HAVE_APP_INDICATOR |
1859 | + |
1860 | /* Define to 1 if you have the `bind_textdomain_codeset' function. */ |
1861 | #undef HAVE_BIND_TEXTDOMAIN_CODESET |
1862 | |
1863 | |
1864 | === modified file 'configure' |
1865 | --- configure 2011-07-25 16:53:10 +0000 |
1866 | +++ configure 2011-08-06 03:01:32 +0000 |
1867 | @@ -638,6 +638,10 @@ |
1868 | BASE_LIBS |
1869 | BASE_CFLAGS |
1870 | WARNING_CFLAGS |
1871 | +APP_INDICATOR_LIBS |
1872 | +APP_INDICATOR_CFLAGS |
1873 | +HAVE_APP_INDICATOR_FALSE |
1874 | +HAVE_APP_INDICATOR_TRUE |
1875 | ENABLE_EMPTY_VIEW_FALSE |
1876 | ENABLE_EMPTY_VIEW_TRUE |
1877 | ENABLE_EMPTY_VIEW |
1878 | @@ -862,6 +866,7 @@ |
1879 | enable_xmp |
1880 | enable_empty_view |
1881 | enable_packagekit |
1882 | +enable_appindicator |
1883 | enable_more_warnings |
1884 | enable_introspection |
1885 | enable_update_mimedb |
1886 | @@ -884,6 +889,8 @@ |
1887 | EXIF_LIBS |
1888 | EXEMPI_CFLAGS |
1889 | EXEMPI_LIBS |
1890 | +APP_INDICATOR_CFLAGS |
1891 | +APP_INDICATOR_LIBS |
1892 | BASE_CFLAGS |
1893 | BASE_LIBS |
1894 | COMMON_CFLAGS |
1895 | @@ -1534,6 +1541,7 @@ |
1896 | --disable-xmp build without xmp support |
1897 | --enable-empty-view Enable empty view |
1898 | --disable-packagekit build without PackageKit support |
1899 | + --disable-appindicator build without appindicator support |
1900 | --enable-more-warnings Maximum compiler warnings |
1901 | --enable-introspection=[no/auto/yes] |
1902 | Enable introspection for this build |
1903 | @@ -1573,6 +1581,10 @@ |
1904 | EXEMPI_CFLAGS |
1905 | C compiler flags for EXEMPI, overriding pkg-config |
1906 | EXEMPI_LIBS linker flags for EXEMPI, overriding pkg-config |
1907 | + APP_INDICATOR_CFLAGS |
1908 | + C compiler flags for APP_INDICATOR, overriding pkg-config |
1909 | + APP_INDICATOR_LIBS |
1910 | + linker flags for APP_INDICATOR, overriding pkg-config |
1911 | BASE_CFLAGS C compiler flags for BASE, overriding pkg-config |
1912 | BASE_LIBS linker flags for BASE, overriding pkg-config |
1913 | COMMON_CFLAGS |
1914 | @@ -13787,6 +13799,7 @@ |
1915 | |
1916 | |
1917 | |
1918 | + |
1919 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
1920 | if test -n "$ac_tool_prefix"; then |
1921 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. |
1922 | @@ -14736,6 +14749,7 @@ |
1923 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
1924 | test $ac_status = 0; }; then |
1925 | pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` |
1926 | + test "x$?" != "x0" && pkg_failed=yes |
1927 | else |
1928 | pkg_failed=yes |
1929 | fi |
1930 | @@ -14752,6 +14766,7 @@ |
1931 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
1932 | test $ac_status = 0; }; then |
1933 | pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` |
1934 | + test "x$?" != "x0" && pkg_failed=yes |
1935 | else |
1936 | pkg_failed=yes |
1937 | fi |
1938 | @@ -14771,9 +14786,9 @@ |
1939 | _pkg_short_errors_supported=no |
1940 | fi |
1941 | if test $_pkg_short_errors_supported = yes; then |
1942 | - GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` |
1943 | + GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` |
1944 | else |
1945 | - GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` |
1946 | + GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` |
1947 | fi |
1948 | # Put the nasty error message in config.log where it belongs |
1949 | echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 |
1950 | @@ -14788,7 +14803,6 @@ |
1951 | Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS |
1952 | and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config. |
1953 | See the pkg-config man page for more details." "$LINENO" 5 |
1954 | - |
1955 | elif test $pkg_failed = untried; then |
1956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
1957 | $as_echo "no" >&6; } |
1958 | @@ -14804,7 +14818,6 @@ |
1959 | |
1960 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. |
1961 | See \`config.log' for more details" "$LINENO" 5; } |
1962 | - |
1963 | else |
1964 | GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS |
1965 | GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS |
1966 | @@ -15092,6 +15105,7 @@ |
1967 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
1968 | test $ac_status = 0; }; then |
1969 | pkg_cv_EXIF_CFLAGS=`$PKG_CONFIG --cflags "libexif >= 0.6.20" 2>/dev/null` |
1970 | + test "x$?" != "x0" && pkg_failed=yes |
1971 | else |
1972 | pkg_failed=yes |
1973 | fi |
1974 | @@ -15108,6 +15122,7 @@ |
1975 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
1976 | test $ac_status = 0; }; then |
1977 | pkg_cv_EXIF_LIBS=`$PKG_CONFIG --libs "libexif >= 0.6.20" 2>/dev/null` |
1978 | + test "x$?" != "x0" && pkg_failed=yes |
1979 | else |
1980 | pkg_failed=yes |
1981 | fi |
1982 | @@ -15127,9 +15142,9 @@ |
1983 | _pkg_short_errors_supported=no |
1984 | fi |
1985 | if test $_pkg_short_errors_supported = yes; then |
1986 | - EXIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libexif >= 0.6.20" 2>&1` |
1987 | + EXIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libexif >= 0.6.20" 2>&1` |
1988 | else |
1989 | - EXIF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libexif >= 0.6.20" 2>&1` |
1990 | + EXIF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libexif >= 0.6.20" 2>&1` |
1991 | fi |
1992 | # Put the nasty error message in config.log where it belongs |
1993 | echo "$EXIF_PKG_ERRORS" >&5 |
1994 | @@ -15208,6 +15223,7 @@ |
1995 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
1996 | test $ac_status = 0; }; then |
1997 | pkg_cv_EXEMPI_CFLAGS=`$PKG_CONFIG --cflags "exempi-2.0 >= 2.1.0" 2>/dev/null` |
1998 | + test "x$?" != "x0" && pkg_failed=yes |
1999 | else |
2000 | pkg_failed=yes |
2001 | fi |
2002 | @@ -15224,6 +15240,7 @@ |
2003 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
2004 | test $ac_status = 0; }; then |
2005 | pkg_cv_EXEMPI_LIBS=`$PKG_CONFIG --libs "exempi-2.0 >= 2.1.0" 2>/dev/null` |
2006 | + test "x$?" != "x0" && pkg_failed=yes |
2007 | else |
2008 | pkg_failed=yes |
2009 | fi |
2010 | @@ -15243,9 +15260,9 @@ |
2011 | _pkg_short_errors_supported=no |
2012 | fi |
2013 | if test $_pkg_short_errors_supported = yes; then |
2014 | - EXEMPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "exempi-2.0 >= 2.1.0" 2>&1` |
2015 | + EXEMPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "exempi-2.0 >= 2.1.0" 2>&1` |
2016 | else |
2017 | - EXEMPI_PKG_ERRORS=`$PKG_CONFIG --print-errors "exempi-2.0 >= 2.1.0" 2>&1` |
2018 | + EXEMPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "exempi-2.0 >= 2.1.0" 2>&1` |
2019 | fi |
2020 | # Put the nasty error message in config.log where it belongs |
2021 | echo "$EXEMPI_PKG_ERRORS" >&5 |
2022 | @@ -15447,6 +15464,129 @@ |
2023 | |
2024 | |
2025 | |
2026 | + if false; then |
2027 | + HAVE_APP_INDICATOR_TRUE= |
2028 | + HAVE_APP_INDICATOR_FALSE='#' |
2029 | +else |
2030 | + HAVE_APP_INDICATOR_TRUE='#' |
2031 | + HAVE_APP_INDICATOR_FALSE= |
2032 | +fi |
2033 | + |
2034 | + |
2035 | +# Check whether --enable-appindicator was given. |
2036 | +if test "${enable_appindicator+set}" = set; then : |
2037 | + enableval=$enable_appindicator; |
2038 | +fi |
2039 | + |
2040 | + |
2041 | +msg_appindicator=no |
2042 | +if test "x$enable_appindicator" != "xno"; then |
2043 | + |
2044 | +pkg_failed=no |
2045 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APP_INDICATOR" >&5 |
2046 | +$as_echo_n "checking for APP_INDICATOR... " >&6; } |
2047 | + |
2048 | +if test -n "$APP_INDICATOR_CFLAGS"; then |
2049 | + pkg_cv_APP_INDICATOR_CFLAGS="$APP_INDICATOR_CFLAGS" |
2050 | + elif test -n "$PKG_CONFIG"; then |
2051 | + if test -n "$PKG_CONFIG" && \ |
2052 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"appindicator3-0.1 >= 0.3.90\""; } >&5 |
2053 | + ($PKG_CONFIG --exists --print-errors "appindicator3-0.1 >= 0.3.90") 2>&5 |
2054 | + ac_status=$? |
2055 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
2056 | + test $ac_status = 0; }; then |
2057 | + pkg_cv_APP_INDICATOR_CFLAGS=`$PKG_CONFIG --cflags "appindicator3-0.1 >= 0.3.90" 2>/dev/null` |
2058 | + test "x$?" != "x0" && pkg_failed=yes |
2059 | +else |
2060 | + pkg_failed=yes |
2061 | +fi |
2062 | + else |
2063 | + pkg_failed=untried |
2064 | +fi |
2065 | +if test -n "$APP_INDICATOR_LIBS"; then |
2066 | + pkg_cv_APP_INDICATOR_LIBS="$APP_INDICATOR_LIBS" |
2067 | + elif test -n "$PKG_CONFIG"; then |
2068 | + if test -n "$PKG_CONFIG" && \ |
2069 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"appindicator3-0.1 >= 0.3.90\""; } >&5 |
2070 | + ($PKG_CONFIG --exists --print-errors "appindicator3-0.1 >= 0.3.90") 2>&5 |
2071 | + ac_status=$? |
2072 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
2073 | + test $ac_status = 0; }; then |
2074 | + pkg_cv_APP_INDICATOR_LIBS=`$PKG_CONFIG --libs "appindicator3-0.1 >= 0.3.90" 2>/dev/null` |
2075 | + test "x$?" != "x0" && pkg_failed=yes |
2076 | +else |
2077 | + pkg_failed=yes |
2078 | +fi |
2079 | + else |
2080 | + pkg_failed=untried |
2081 | +fi |
2082 | + |
2083 | + |
2084 | + |
2085 | +if test $pkg_failed = yes; then |
2086 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2087 | +$as_echo "no" >&6; } |
2088 | + |
2089 | +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
2090 | + _pkg_short_errors_supported=yes |
2091 | +else |
2092 | + _pkg_short_errors_supported=no |
2093 | +fi |
2094 | + if test $_pkg_short_errors_supported = yes; then |
2095 | + APP_INDICATOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "appindicator3-0.1 >= 0.3.90" 2>&1` |
2096 | + else |
2097 | + APP_INDICATOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "appindicator3-0.1 >= 0.3.90" 2>&1` |
2098 | + fi |
2099 | + # Put the nasty error message in config.log where it belongs |
2100 | + echo "$APP_INDICATOR_PKG_ERRORS" >&5 |
2101 | + |
2102 | + if 0; then |
2103 | + HAVE_APP_INDICATOR_TRUE= |
2104 | + HAVE_APP_INDICATOR_FALSE='#' |
2105 | +else |
2106 | + HAVE_APP_INDICATOR_TRUE='#' |
2107 | + HAVE_APP_INDICATOR_FALSE= |
2108 | +fi |
2109 | + |
2110 | + |
2111 | +elif test $pkg_failed = untried; then |
2112 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2113 | +$as_echo "no" >&6; } |
2114 | + if 0; then |
2115 | + HAVE_APP_INDICATOR_TRUE= |
2116 | + HAVE_APP_INDICATOR_FALSE='#' |
2117 | +else |
2118 | + HAVE_APP_INDICATOR_TRUE='#' |
2119 | + HAVE_APP_INDICATOR_FALSE= |
2120 | +fi |
2121 | + |
2122 | + |
2123 | +else |
2124 | + APP_INDICATOR_CFLAGS=$pkg_cv_APP_INDICATOR_CFLAGS |
2125 | + APP_INDICATOR_LIBS=$pkg_cv_APP_INDICATOR_LIBS |
2126 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
2127 | +$as_echo "yes" >&6; } |
2128 | + |
2129 | + if 1; then |
2130 | + HAVE_APP_INDICATOR_TRUE= |
2131 | + HAVE_APP_INDICATOR_FALSE='#' |
2132 | +else |
2133 | + HAVE_APP_INDICATOR_TRUE='#' |
2134 | + HAVE_APP_INDICATOR_FALSE= |
2135 | +fi |
2136 | + |
2137 | + |
2138 | +$as_echo "#define HAVE_APP_INDICATOR 1" >>confdefs.h |
2139 | + |
2140 | + |
2141 | + msg_appindicator=yes |
2142 | +fi |
2143 | + |
2144 | + |
2145 | +fi |
2146 | + |
2147 | + |
2148 | + |
2149 | WARNING_CFLAGS="" |
2150 | |
2151 | # Check whether --enable-more-warnings was given. |
2152 | @@ -15573,6 +15713,7 @@ |
2153 | gtk+-3.0 >= 3.1.6 |
2154 | glib-2.0 >= 2.29.13 |
2155 | " 2>/dev/null` |
2156 | + test "x$?" != "x0" && pkg_failed=yes |
2157 | else |
2158 | pkg_failed=yes |
2159 | fi |
2160 | @@ -15598,6 +15739,7 @@ |
2161 | gtk+-3.0 >= 3.1.6 |
2162 | glib-2.0 >= 2.29.13 |
2163 | " 2>/dev/null` |
2164 | + test "x$?" != "x0" && pkg_failed=yes |
2165 | else |
2166 | pkg_failed=yes |
2167 | fi |
2168 | @@ -15617,12 +15759,12 @@ |
2169 | _pkg_short_errors_supported=no |
2170 | fi |
2171 | if test $_pkg_short_errors_supported = yes; then |
2172 | - BASE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " |
2173 | + BASE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " |
2174 | gtk+-3.0 >= 3.1.6 |
2175 | glib-2.0 >= 2.29.13 |
2176 | " 2>&1` |
2177 | else |
2178 | - BASE_PKG_ERRORS=`$PKG_CONFIG --print-errors " |
2179 | + BASE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " |
2180 | gtk+-3.0 >= 3.1.6 |
2181 | glib-2.0 >= 2.29.13 |
2182 | " 2>&1` |
2183 | @@ -15643,7 +15785,6 @@ |
2184 | Alternatively, you may set the environment variables BASE_CFLAGS |
2185 | and BASE_LIBS to avoid the need to call pkg-config. |
2186 | See the pkg-config man page for more details." "$LINENO" 5 |
2187 | - |
2188 | elif test $pkg_failed = untried; then |
2189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2190 | $as_echo "no" >&6; } |
2191 | @@ -15659,7 +15800,6 @@ |
2192 | |
2193 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. |
2194 | See \`config.log' for more details" "$LINENO" 5; } |
2195 | - |
2196 | else |
2197 | BASE_CFLAGS=$pkg_cv_BASE_CFLAGS |
2198 | BASE_LIBS=$pkg_cv_BASE_LIBS |
2199 | @@ -15701,6 +15841,7 @@ |
2200 | libxml-2.0 >= 2.7.8 |
2201 | x11 |
2202 | " 2>/dev/null` |
2203 | + test "x$?" != "x0" && pkg_failed=yes |
2204 | else |
2205 | pkg_failed=yes |
2206 | fi |
2207 | @@ -15732,6 +15873,7 @@ |
2208 | libxml-2.0 >= 2.7.8 |
2209 | x11 |
2210 | " 2>/dev/null` |
2211 | + test "x$?" != "x0" && pkg_failed=yes |
2212 | else |
2213 | pkg_failed=yes |
2214 | fi |
2215 | @@ -15751,14 +15893,14 @@ |
2216 | _pkg_short_errors_supported=no |
2217 | fi |
2218 | if test $_pkg_short_errors_supported = yes; then |
2219 | - COMMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " |
2220 | + COMMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " |
2221 | gail-3.0 |
2222 | gnome-desktop-3.0 >= 3.0.0 |
2223 | libxml-2.0 >= 2.7.8 |
2224 | x11 |
2225 | " 2>&1` |
2226 | else |
2227 | - COMMON_PKG_ERRORS=`$PKG_CONFIG --print-errors " |
2228 | + COMMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " |
2229 | gail-3.0 |
2230 | gnome-desktop-3.0 >= 3.0.0 |
2231 | libxml-2.0 >= 2.7.8 |
2232 | @@ -15783,7 +15925,6 @@ |
2233 | Alternatively, you may set the environment variables COMMON_CFLAGS |
2234 | and COMMON_LIBS to avoid the need to call pkg-config. |
2235 | See the pkg-config man page for more details." "$LINENO" 5 |
2236 | - |
2237 | elif test $pkg_failed = untried; then |
2238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2239 | $as_echo "no" >&6; } |
2240 | @@ -15799,7 +15940,6 @@ |
2241 | |
2242 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. |
2243 | See \`config.log' for more details" "$LINENO" 5; } |
2244 | - |
2245 | else |
2246 | COMMON_CFLAGS=$pkg_cv_COMMON_CFLAGS |
2247 | COMMON_LIBS=$pkg_cv_COMMON_LIBS |
2248 | @@ -15826,6 +15966,7 @@ |
2249 | gio-unix-2.0 >= 2.29.13 |
2250 | gsettings-desktop-schemas |
2251 | libnotify >= 0.7.0 |
2252 | + launchpad-integration-3.0 |
2253 | \""; } >&5 |
2254 | ($PKG_CONFIG --exists --print-errors " |
2255 | gthread-2.0 >= 2.29.13 |
2256 | @@ -15833,6 +15974,7 @@ |
2257 | gio-unix-2.0 >= 2.29.13 |
2258 | gsettings-desktop-schemas |
2259 | libnotify >= 0.7.0 |
2260 | + launchpad-integration-3.0 |
2261 | ") 2>&5 |
2262 | ac_status=$? |
2263 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
2264 | @@ -15843,7 +15985,9 @@ |
2265 | gio-unix-2.0 >= 2.29.13 |
2266 | gsettings-desktop-schemas |
2267 | libnotify >= 0.7.0 |
2268 | + launchpad-integration-3.0 |
2269 | " 2>/dev/null` |
2270 | + test "x$?" != "x0" && pkg_failed=yes |
2271 | else |
2272 | pkg_failed=yes |
2273 | fi |
2274 | @@ -15860,6 +16004,7 @@ |
2275 | gio-unix-2.0 >= 2.29.13 |
2276 | gsettings-desktop-schemas |
2277 | libnotify >= 0.7.0 |
2278 | + launchpad-integration-3.0 |
2279 | \""; } >&5 |
2280 | ($PKG_CONFIG --exists --print-errors " |
2281 | gthread-2.0 >= 2.29.13 |
2282 | @@ -15867,6 +16012,7 @@ |
2283 | gio-unix-2.0 >= 2.29.13 |
2284 | gsettings-desktop-schemas |
2285 | libnotify >= 0.7.0 |
2286 | + launchpad-integration-3.0 |
2287 | ") 2>&5 |
2288 | ac_status=$? |
2289 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
2290 | @@ -15877,7 +16023,9 @@ |
2291 | gio-unix-2.0 >= 2.29.13 |
2292 | gsettings-desktop-schemas |
2293 | libnotify >= 0.7.0 |
2294 | + launchpad-integration-3.0 |
2295 | " 2>/dev/null` |
2296 | + test "x$?" != "x0" && pkg_failed=yes |
2297 | else |
2298 | pkg_failed=yes |
2299 | fi |
2300 | @@ -15897,20 +16045,22 @@ |
2301 | _pkg_short_errors_supported=no |
2302 | fi |
2303 | if test $_pkg_short_errors_supported = yes; then |
2304 | - NAUTILUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " |
2305 | + NAUTILUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " |
2306 | gthread-2.0 >= 2.29.13 |
2307 | gio-2.0 >= 2.29.13 |
2308 | gio-unix-2.0 >= 2.29.13 |
2309 | gsettings-desktop-schemas |
2310 | libnotify >= 0.7.0 |
2311 | + launchpad-integration-3.0 |
2312 | " 2>&1` |
2313 | else |
2314 | - NAUTILUS_PKG_ERRORS=`$PKG_CONFIG --print-errors " |
2315 | + NAUTILUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " |
2316 | gthread-2.0 >= 2.29.13 |
2317 | gio-2.0 >= 2.29.13 |
2318 | gio-unix-2.0 >= 2.29.13 |
2319 | gsettings-desktop-schemas |
2320 | libnotify >= 0.7.0 |
2321 | + launchpad-integration-3.0 |
2322 | " 2>&1` |
2323 | fi |
2324 | # Put the nasty error message in config.log where it belongs |
2325 | @@ -15922,6 +16072,7 @@ |
2326 | gio-unix-2.0 >= 2.29.13 |
2327 | gsettings-desktop-schemas |
2328 | libnotify >= 0.7.0 |
2329 | + launchpad-integration-3.0 |
2330 | ) were not met: |
2331 | |
2332 | $NAUTILUS_PKG_ERRORS |
2333 | @@ -15932,7 +16083,6 @@ |
2334 | Alternatively, you may set the environment variables NAUTILUS_CFLAGS |
2335 | and NAUTILUS_LIBS to avoid the need to call pkg-config. |
2336 | See the pkg-config man page for more details." "$LINENO" 5 |
2337 | - |
2338 | elif test $pkg_failed = untried; then |
2339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2340 | $as_echo "no" >&6; } |
2341 | @@ -15948,7 +16098,6 @@ |
2342 | |
2343 | To get pkg-config, see <http://pkg-config.freedesktop.org/>. |
2344 | See \`config.log' for more details" "$LINENO" 5; } |
2345 | - |
2346 | else |
2347 | NAUTILUS_CFLAGS=$pkg_cv_NAUTILUS_CFLAGS |
2348 | NAUTILUS_LIBS=$pkg_cv_NAUTILUS_LIBS |
2349 | @@ -16337,6 +16486,22 @@ |
2350 | as_fn_error $? "conditional \"ENABLE_EMPTY_VIEW\" was never defined. |
2351 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
2352 | fi |
2353 | +if test -z "${HAVE_APP_INDICATOR_TRUE}" && test -z "${HAVE_APP_INDICATOR_FALSE}"; then |
2354 | + as_fn_error $? "conditional \"HAVE_APP_INDICATOR\" was never defined. |
2355 | +Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
2356 | +fi |
2357 | +if test -z "${HAVE_APP_INDICATOR_TRUE}" && test -z "${HAVE_APP_INDICATOR_FALSE}"; then |
2358 | + as_fn_error $? "conditional \"HAVE_APP_INDICATOR\" was never defined. |
2359 | +Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
2360 | +fi |
2361 | +if test -z "${HAVE_APP_INDICATOR_TRUE}" && test -z "${HAVE_APP_INDICATOR_FALSE}"; then |
2362 | + as_fn_error $? "conditional \"HAVE_APP_INDICATOR\" was never defined. |
2363 | +Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
2364 | +fi |
2365 | +if test -z "${HAVE_APP_INDICATOR_TRUE}" && test -z "${HAVE_APP_INDICATOR_FALSE}"; then |
2366 | + as_fn_error $? "conditional \"HAVE_APP_INDICATOR\" was never defined. |
2367 | +Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
2368 | +fi |
2369 | if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then |
2370 | as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined. |
2371 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
2372 | @@ -18650,6 +18815,7 @@ |
2373 | libexif support: $msg_libexif |
2374 | libexempi support: $msg_xmp |
2375 | PackageKit support: $msg_packagekit |
2376 | + AppIndicator support: $msg_appindicator |
2377 | nautilus-sendto ext: $enable_nst_extension |
2378 | |
2379 | profiling support: ${profiling_support} |
2380 | |
2381 | === modified file 'configure.in' |
2382 | --- configure.in 2011-07-25 16:53:10 +0000 |
2383 | +++ configure.in 2011-08-06 03:01:32 +0000 |
2384 | @@ -10,6 +10,7 @@ |
2385 | m4_define(exif_minver, 0.6.20) |
2386 | m4_define(exempi_minver, 2.1.0) |
2387 | m4_define(notify_minver, 0.7.0) |
2388 | +m4_define(appindicator_minver, 0.3.90) |
2389 | |
2390 | |
2391 | dnl 1. If the library code has changed at all since last release, then increment revision. |
2392 | @@ -203,6 +204,29 @@ |
2393 | |
2394 | dnl ========================================================================== |
2395 | |
2396 | + |
2397 | +AM_CONDITIONAL(HAVE_APP_INDICATOR, false) |
2398 | + |
2399 | +AC_ARG_ENABLE(appindicator, |
2400 | + AC_HELP_STRING([--disable-appindicator], |
2401 | + [build without appindicator support])) |
2402 | + |
2403 | +msg_appindicator=no |
2404 | +if test "x$enable_appindicator" != "xno"; then |
2405 | + PKG_CHECK_MODULES(APP_INDICATOR, |
2406 | + appindicator3-0.1 >= appindicator_minver, [ |
2407 | + AM_CONDITIONAL(HAVE_APP_INDICATOR, 1) |
2408 | + AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator]) |
2409 | + ] |
2410 | + msg_appindicator=yes, |
2411 | + [AM_CONDITIONAL(HAVE_APP_INDICATOR, 0) |
2412 | + ]) |
2413 | + AC_SUBST(APP_INDICATOR_CFLAGS) |
2414 | + AC_SUBST(APP_INDICATOR_LIBS) |
2415 | +fi |
2416 | + |
2417 | +dnl ========================================================================== |
2418 | + |
2419 | dnl Turn on the additional warnings last, so -Werror doesn't affect other tests. |
2420 | |
2421 | WARNING_CFLAGS="" |
2422 | @@ -360,6 +384,7 @@ |
2423 | libexif support: $msg_libexif |
2424 | libexempi support: $msg_xmp |
2425 | PackageKit support: $msg_packagekit |
2426 | + AppIndicator support: $msg_appindicator |
2427 | nautilus-sendto ext: $enable_nst_extension |
2428 | |
2429 | profiling support: ${profiling_support} |
2430 | |
2431 | === modified file 'cut-n-paste-code/Makefile.in' |
2432 | --- cut-n-paste-code/Makefile.in 2011-06-28 11:22:30 +0000 |
2433 | +++ cut-n-paste-code/Makefile.in 2011-08-06 03:01:32 +0000 |
2434 | @@ -100,6 +100,8 @@ |
2435 | ALL_LINGUAS = @ALL_LINGUAS@ |
2436 | AMTAR = @AMTAR@ |
2437 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
2438 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
2439 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
2440 | AR = @AR@ |
2441 | AS = @AS@ |
2442 | AUTOCONF = @AUTOCONF@ |
2443 | |
2444 | === modified file 'cut-n-paste-code/libegg/Makefile.in' |
2445 | --- cut-n-paste-code/libegg/Makefile.in 2011-06-28 11:22:30 +0000 |
2446 | +++ cut-n-paste-code/libegg/Makefile.in 2011-08-06 03:01:32 +0000 |
2447 | @@ -96,6 +96,8 @@ |
2448 | ALL_LINGUAS = @ALL_LINGUAS@ |
2449 | AMTAR = @AMTAR@ |
2450 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
2451 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
2452 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
2453 | AR = @AR@ |
2454 | AS = @AS@ |
2455 | AUTOCONF = @AUTOCONF@ |
2456 | |
2457 | === modified file 'data/Makefile.in' |
2458 | --- data/Makefile.in 2011-06-28 11:22:30 +0000 |
2459 | +++ data/Makefile.in 2011-08-06 03:01:32 +0000 |
2460 | @@ -130,6 +130,8 @@ |
2461 | ALL_LINGUAS = @ALL_LINGUAS@ |
2462 | AMTAR = @AMTAR@ |
2463 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
2464 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
2465 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
2466 | AR = @AR@ |
2467 | AS = @AS@ |
2468 | AUTOCONF = @AUTOCONF@ |
2469 | |
2470 | === modified file 'data/icons/Makefile.in' |
2471 | --- data/icons/Makefile.in 2011-06-28 11:22:30 +0000 |
2472 | +++ data/icons/Makefile.in 2011-08-06 03:01:32 +0000 |
2473 | @@ -62,6 +62,8 @@ |
2474 | ALL_LINGUAS = @ALL_LINGUAS@ |
2475 | AMTAR = @AMTAR@ |
2476 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
2477 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
2478 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
2479 | AR = @AR@ |
2480 | AS = @AS@ |
2481 | AUTOCONF = @AUTOCONF@ |
2482 | |
2483 | === modified file 'data/nautilus.desktop.in' |
2484 | --- data/nautilus.desktop.in 2011-07-25 16:53:10 +0000 |
2485 | +++ data/nautilus.desktop.in 2011-08-06 03:01:32 +0000 |
2486 | @@ -6,7 +6,7 @@ |
2487 | Terminal=false |
2488 | Type=Application |
2489 | StartupNotify=true |
2490 | -OnlyShowIn=GNOME; |
2491 | +OnlyShowIn=GNOME;Unity; |
2492 | Categories=GNOME;GTK;Utility;Core; |
2493 | MimeType=inode/directory;application/x-gnome-saved-search; |
2494 | X-GNOME-Bugzilla-Bugzilla=GNOME |
2495 | |
2496 | === modified file 'debian/changelog' |
2497 | --- debian/changelog 2011-08-02 15:32:01 +0000 |
2498 | +++ debian/changelog 2011-08-06 03:01:32 +0000 |
2499 | @@ -1,3 +1,11 @@ |
2500 | +nautilus (1:3.1.4-0ubuntu3) oneiric; urgency=low |
2501 | + |
2502 | + * debian/patches/07_use_application_indicator.patch: |
2503 | + Updated to work with current implementation, added middle-click and |
2504 | + transfer information support |
2505 | + |
2506 | + -- Marco Trevisan (Treviño) <mail@3v1n0.net> Sat, 06 Aug 2011 04:51:04 +0200 |
2507 | + |
2508 | nautilus (1:3.1.4-0ubuntu2) oneiric; urgency=low |
2509 | |
2510 | * debian/rules: don't install nautilus.css, it breaks themes |
2511 | |
2512 | === modified file 'debian/patches/07_use_application_indicator.patch' |
2513 | --- debian/patches/07_use_application_indicator.patch 2011-05-16 18:53:51 +0000 |
2514 | +++ debian/patches/07_use_application_indicator.patch 2011-08-06 03:01:32 +0000 |
2515 | @@ -1,23 +1,23 @@ |
2516 | Description: Use the application-indicator |
2517 | Bug: https://bugs.edge.launchpad.net/ubuntu/+source/nautilus/+bug/497880 |
2518 | |
2519 | -Index: nautilus-2.31.6/configure.in |
2520 | +Index: nautilus/configure.in |
2521 | =================================================================== |
2522 | ---- nautilus-2.31.6.orig/configure.in 2010-08-12 16:39:33.000000000 +0200 |
2523 | -+++ nautilus-2.31.6/configure.in 2010-08-12 16:39:37.000000000 +0200 |
2524 | -@@ -11,7 +11,7 @@ |
2525 | - m4_define(exempi_minver, 1.99.2) |
2526 | - m4_define(exempi_minver_newapi, 1.99.5) |
2527 | - m4_define(gail_minver, 0.16) |
2528 | -- |
2529 | -+m4_define(appindicator_minver, 0.0.2) |
2530 | +--- nautilus.orig/configure.in 2011-08-06 04:44:21.062809449 +0200 |
2531 | ++++ nautilus/configure.in 2011-08-06 04:45:23.332026621 +0200 |
2532 | +@@ -10,6 +10,7 @@ |
2533 | + m4_define(exif_minver, 0.6.20) |
2534 | + m4_define(exempi_minver, 2.1.0) |
2535 | + m4_define(notify_minver, 0.7.0) |
2536 | ++m4_define(appindicator_minver, 0.3.90) |
2537 | + |
2538 | |
2539 | dnl 1. If the library code has changed at all since last release, then increment revision. |
2540 | - dnl 2. If any interfaces have been added, then increment current and set revision to 0. |
2541 | -@@ -234,6 +234,28 @@ |
2542 | +@@ -203,6 +204,29 @@ |
2543 | |
2544 | dnl ========================================================================== |
2545 | |
2546 | ++ |
2547 | +AM_CONDITIONAL(HAVE_APP_INDICATOR, false) |
2548 | + |
2549 | +AC_ARG_ENABLE(appindicator, |
2550 | @@ -27,7 +27,7 @@ |
2551 | +msg_appindicator=no |
2552 | +if test "x$enable_appindicator" != "xno"; then |
2553 | + PKG_CHECK_MODULES(APP_INDICATOR, |
2554 | -+ appindicator-0.1 >= appindicator_minver, [ |
2555 | ++ appindicator3-0.1 >= appindicator_minver, [ |
2556 | + AM_CONDITIONAL(HAVE_APP_INDICATOR, 1) |
2557 | + AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator]) |
2558 | + ] |
2559 | @@ -36,185 +36,236 @@ |
2560 | + ]) |
2561 | + AC_SUBST(APP_INDICATOR_CFLAGS) |
2562 | + AC_SUBST(APP_INDICATOR_LIBS) |
2563 | -+fi |
2564 | ++fi |
2565 | + |
2566 | +dnl ========================================================================== |
2567 | + |
2568 | dnl Turn on the additional warnings last, so -Werror doesn't affect other tests. |
2569 | |
2570 | WARNING_CFLAGS="" |
2571 | -@@ -416,7 +438,8 @@ |
2572 | - compiler: ${CC} |
2573 | - xmp support: $msg_xmp |
2574 | +@@ -360,6 +384,7 @@ |
2575 | + libexif support: $msg_libexif |
2576 | + libexempi support: $msg_xmp |
2577 | PackageKit support: $msg_packagekit |
2578 | -- |
2579 | + AppIndicator support: $msg_appindicator |
2580 | -+ |
2581 | + nautilus-sendto ext: $enable_nst_extension |
2582 | + |
2583 | profiling support: ${profiling_support} |
2584 | - nautilus-extension documentation: ${enable_gtk_doc} |
2585 | - nautilus-extension introspection: ${found_introspection} |
2586 | -Index: nautilus-2.31.6/libnautilus-private/Makefile.am |
2587 | -=================================================================== |
2588 | ---- nautilus-2.31.6.orig/libnautilus-private/Makefile.am 2010-08-12 12:20:55.000000000 +0200 |
2589 | -+++ nautilus-2.31.6/libnautilus-private/Makefile.am 2010-08-12 16:39:37.000000000 +0200 |
2590 | -@@ -11,6 +11,7 @@ |
2591 | - $(DISABLE_DEPRECATED_CFLAGS) \ |
2592 | - $(TRACKER_CFLAGS) \ |
2593 | - $(BEAGLE_CFLAGS) \ |
2594 | -+ $(APP_INDICATOR_CFLAGS) \ |
2595 | - -DDATADIR=\""$(datadir)"\" \ |
2596 | - -DSYSCONFDIR=\""$(sysconfdir)"\" \ |
2597 | - -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ |
2598 | -@@ -33,6 +34,7 @@ |
2599 | - $(top_builddir)/eel/libeel-2.la \ |
2600 | - $(top_builddir)/libnautilus-extension/libnautilus-extension.la \ |
2601 | - $(CORE_LIBS) \ |
2602 | -+ $(APP_INDICATOR_LIBS) \ |
2603 | - $(NULL) |
2604 | - |
2605 | - marshal_sources = \ |
2606 | -Index: nautilus-2.31.6/libnautilus-private/Makefile.in |
2607 | -=================================================================== |
2608 | ---- nautilus-2.31.6.orig/libnautilus-private/Makefile.in 2010-08-12 12:21:31.000000000 +0200 |
2609 | -+++ nautilus-2.31.6/libnautilus-private/Makefile.in 2010-08-12 16:39:37.000000000 +0200 |
2610 | -@@ -169,6 +169,8 @@ |
2611 | - ALL_LINGUAS = @ALL_LINGUAS@ |
2612 | - AMTAR = @AMTAR@ |
2613 | - AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
2614 | -+APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
2615 | -+APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
2616 | - AR = @AR@ |
2617 | - AS = @AS@ |
2618 | - AUTOCONF = @AUTOCONF@ |
2619 | -@@ -364,6 +366,7 @@ |
2620 | - $(DISABLE_DEPRECATED_CFLAGS) \ |
2621 | - $(TRACKER_CFLAGS) \ |
2622 | - $(BEAGLE_CFLAGS) \ |
2623 | -+ $(APP_INDICATOR_CFLAGS) \ |
2624 | - -DDATADIR=\""$(datadir)"\" \ |
2625 | - -DSYSCONFDIR=\""$(sysconfdir)"\" \ |
2626 | - -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ |
2627 | -@@ -386,6 +389,7 @@ |
2628 | - $(top_builddir)/eel/libeel-2.la \ |
2629 | - $(top_builddir)/libnautilus-extension/libnautilus-extension.la \ |
2630 | - $(CORE_LIBS) \ |
2631 | -+ $(APP_INDICATOR_LIBS) \ |
2632 | - $(NULL) |
2633 | - |
2634 | - marshal_sources = \ |
2635 | -Index: nautilus-2.31.6/libnautilus-private/nautilus-progress-info.c |
2636 | -=================================================================== |
2637 | ---- nautilus-2.31.6.orig/libnautilus-private/nautilus-progress-info.c 2010-08-12 12:20:55.000000000 +0200 |
2638 | -+++ nautilus-2.31.6/libnautilus-private/nautilus-progress-info.c 2010-08-12 16:39:37.000000000 +0200 |
2639 | -@@ -30,6 +30,11 @@ |
2640 | - #include <eel/eel-glib-extensions.h> |
2641 | - #include "nautilus-progress-info.h" |
2642 | - |
2643 | -+ |
2644 | +Index: nautilus/src/Makefile.am |
2645 | +=================================================================== |
2646 | +--- nautilus.orig/src/Makefile.am 2011-08-06 04:45:14.342139636 +0200 |
2647 | ++++ nautilus/src/Makefile.am 2011-08-06 04:45:23.332026621 +0200 |
2648 | +@@ -30,6 +30,7 @@ |
2649 | + -DSYSCONFDIR=\""$(sysconfdir)"\" \ |
2650 | + -DVERSION="\"$(VERSION)\"" \ |
2651 | + $(DISABLE_DEPRECATED_CFLAGS) \ |
2652 | ++ $(APP_INDICATOR_CFLAGS) \ |
2653 | + $(NULL) |
2654 | + |
2655 | + LDADD =\ |
2656 | +@@ -41,6 +42,7 @@ |
2657 | + $(EXIF_LIBS) \ |
2658 | + $(EXEMPI_LIBS) \ |
2659 | + $(POPT_LIBS) \ |
2660 | ++ $(APP_INDICATOR_LIBS) \ |
2661 | + $(NULL) |
2662 | + |
2663 | + nautilus_SOURCES = \ |
2664 | +Index: nautilus/src/nautilus-progress-ui-handler.c |
2665 | +=================================================================== |
2666 | +--- nautilus.orig/src/nautilus-progress-ui-handler.c 2011-08-06 04:44:27.562727733 +0200 |
2667 | ++++ nautilus/src/nautilus-progress-ui-handler.c 2011-08-06 04:45:23.332026621 +0200 |
2668 | +@@ -21,6 +21,7 @@ |
2669 | + * |
2670 | + * Authors: Alexander Larsson <alexl@redhat.com> |
2671 | + * Cosimo Cecchi <cosimoc@redhat.com> |
2672 | ++ * Marco Trevisan <3v1n0@ubuntu.com> |
2673 | + * |
2674 | + */ |
2675 | + |
2676 | +@@ -36,6 +37,10 @@ |
2677 | + |
2678 | + #include <libnotify/notify.h> |
2679 | + |
2680 | +#ifdef HAVE_APP_INDICATOR |
2681 | +#include <libappindicator/app-indicator.h> |
2682 | +#endif |
2683 | + |
2684 | - enum { |
2685 | - CHANGED, |
2686 | - PROGRESS_CHANGED, |
2687 | -@@ -77,7 +82,11 @@ |
2688 | - |
2689 | - static GList *active_progress_infos = NULL; |
2690 | - |
2691 | + struct _NautilusProgressUIHandlerPriv { |
2692 | + NautilusProgressInfoManager *manager; |
2693 | + |
2694 | +@@ -45,7 +50,11 @@ |
2695 | + |
2696 | + gboolean notification_supports_persistence; |
2697 | + NotifyNotification *progress_notification; |
2698 | +#ifdef HAVE_APP_INDICATOR |
2699 | -+static AppIndicator *indicator = NULL; |
2700 | ++ AppIndicator *indicator; |
2701 | +#else |
2702 | - static GtkStatusIcon *status_icon = NULL; |
2703 | + GtkStatusIcon *status_icon; |
2704 | +#endif |
2705 | - static int n_progress_ops = 0; |
2706 | - |
2707 | - |
2708 | -@@ -193,6 +202,14 @@ |
2709 | - return TRUE; |
2710 | - } |
2711 | - |
2712 | -+#ifdef HAVE_APP_INDICATOR |
2713 | -+static void |
2714 | -+indicator_icon_activate_cb (AppIndicator *icon, |
2715 | -+ GtkWidget *progress_window) |
2716 | -+{ |
2717 | -+ gtk_window_present (GTK_WINDOW (progress_window)); |
2718 | -+} |
2719 | -+#else |
2720 | + }; |
2721 | + |
2722 | + G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT); |
2723 | +@@ -69,6 +78,7 @@ |
2724 | + |
2725 | + #define ACTION_DETAILS "details" |
2726 | + |
2727 | ++#ifndef HAVE_APP_INDICATOR |
2728 | static void |
2729 | status_icon_activate_cb (GtkStatusIcon *icon, |
2730 | - GtkWidget *progress_window) |
2731 | -@@ -203,12 +220,16 @@ |
2732 | - gtk_window_present (GTK_WINDOW (progress_window)); |
2733 | - } |
2734 | + NautilusProgressUIHandler *self) |
2735 | +@@ -76,6 +86,7 @@ |
2736 | + gtk_status_icon_set_visible (icon, FALSE); |
2737 | + gtk_window_present (GTK_WINDOW (self->priv->progress_window)); |
2738 | } |
2739 | +#endif |
2740 | |
2741 | - static GtkWidget * |
2742 | - get_progress_window (void) |
2743 | - { |
2744 | - static GtkWidget *progress_window = NULL; |
2745 | - GtkWidget *vbox; |
2746 | -+#ifdef HAVE_APP_INDICATOR |
2747 | -+ GtkWidget *indicator_menu, *indicator_menuitem; |
2748 | -+#endif |
2749 | - |
2750 | - if (progress_window != NULL) { |
2751 | - return progress_window; |
2752 | -@@ -240,13 +261,27 @@ |
2753 | - "delete_event", |
2754 | - (GCallback)delete_event, NULL); |
2755 | + static void |
2756 | + notification_show_details_cb (NotifyNotification *notification, |
2757 | +@@ -117,6 +128,56 @@ |
2758 | + NULL); |
2759 | + } |
2760 | |
2761 | +#ifdef HAVE_APP_INDICATOR |
2762 | -+ indicator = app_indicator_new ("nautilus", "system-file-manager", |
2763 | -+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
2764 | -+ |
2765 | -+ indicator_menu = gtk_menu_new(); |
2766 | -+ indicator_menuitem = gtk_menu_item_new_with_label (_("Show copy dialog")); |
2767 | -+ gtk_menu_shell_append (indicator_menu, indicator_menuitem); |
2768 | -+ g_signal_connect (indicator_menuitem, "activate", |
2769 | -+ (GCallback)indicator_icon_activate_cb, |
2770 | -+ progress_window); |
2771 | ++ |
2772 | ++static void |
2773 | ++indicator_menu_activate_cb (AppIndicator *indicator, NautilusProgressUIHandler *self) |
2774 | ++{ |
2775 | ++ g_return_if_fail(self); |
2776 | ++ gtk_window_present (GTK_WINDOW (self->priv->progress_window)); |
2777 | ++ app_indicator_set_status (indicator, APP_INDICATOR_STATUS_PASSIVE); |
2778 | ++} |
2779 | ++ |
2780 | ++static void |
2781 | ++progress_ui_handler_ensure_indicator (NautilusProgressUIHandler *self) |
2782 | ++{ |
2783 | ++ AppIndicator *indicator; |
2784 | ++ GtkWidget *menu; |
2785 | ++ GtkWidget *menuitem; |
2786 | ++ GtkWidget *status; |
2787 | ++ GtkWidget *status_sep; |
2788 | ++ g_return_if_fail (self); |
2789 | ++ |
2790 | ++ if (self->priv->indicator != NULL) { |
2791 | ++ return; |
2792 | ++ } |
2793 | ++ |
2794 | ++ indicator = app_indicator_new ("nautilus", "system-file-manager", |
2795 | ++ APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
2796 | ++ menu = gtk_menu_new(); |
2797 | ++ |
2798 | ++ status = gtk_menu_item_new (); |
2799 | ++ gtk_widget_set_sensitive (status, FALSE); |
2800 | ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), status); |
2801 | ++ g_object_set_data (G_OBJECT (indicator), "status", status); |
2802 | ++ |
2803 | ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ()); |
2804 | ++ |
2805 | ++ menuitem = gtk_menu_item_new_with_label (_("Show copy dialog")); |
2806 | ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); |
2807 | ++ g_signal_connect (menuitem, "activate", |
2808 | ++ (GCallback)indicator_menu_activate_cb, self); |
2809 | ++ |
2810 | + app_indicator_set_status (indicator, APP_INDICATOR_STATUS_PASSIVE); |
2811 | -+ app_indicator_set_menu (indicator, GTK_MENU (indicator_menu)); |
2812 | -+ gtk_widget_show_all (indicator_menu); |
2813 | -+#else |
2814 | - status_icon = gtk_status_icon_new_from_icon_name ("system-file-manager"); |
2815 | - g_signal_connect (status_icon, "activate", |
2816 | - (GCallback)status_icon_activate_cb, |
2817 | - progress_window); |
2818 | - |
2819 | - gtk_status_icon_set_visible (status_icon, FALSE); |
2820 | -- |
2821 | -+#endif |
2822 | - return progress_window; |
2823 | - } |
2824 | - |
2825 | -@@ -296,6 +331,18 @@ |
2826 | - } |
2827 | - } |
2828 | - |
2829 | ++ app_indicator_set_menu (indicator, GTK_MENU (menu)); |
2830 | ++ app_indicator_set_secondary_activate_target(indicator, menuitem); |
2831 | ++ gtk_widget_show_all (menu); |
2832 | ++ |
2833 | ++ self->priv->indicator = indicator; |
2834 | ++} |
2835 | ++ |
2836 | ++#else |
2837 | ++ |
2838 | + static void |
2839 | + progress_ui_handler_ensure_status_icon (NautilusProgressUIHandler *self) |
2840 | + { |
2841 | +@@ -139,6 +200,8 @@ |
2842 | + self->priv->status_icon = status_icon; |
2843 | + } |
2844 | + |
2845 | ++#endif |
2846 | ++ |
2847 | + static void |
2848 | + progress_ui_handler_update_notification (NautilusProgressUIHandler *self) |
2849 | + { |
2850 | +@@ -165,17 +228,35 @@ |
2851 | + progress_ui_handler_update_status_icon (NautilusProgressUIHandler *self) |
2852 | + { |
2853 | + gchar *tooltip; |
2854 | +- |
2855 | +- progress_ui_handler_ensure_status_icon (self); |
2856 | ++ gboolean win_visible; |
2857 | + |
2858 | + tooltip = g_strdup_printf (ngettext ("%'d file operation active", |
2859 | + "%'d file operations active", |
2860 | + self->priv->active_infos), |
2861 | + self->priv->active_infos); |
2862 | ++ |
2863 | ++ win_visible = gtk_widget_get_visible (self->priv->progress_window); |
2864 | ++ |
2865 | +#ifdef HAVE_APP_INDICATOR |
2866 | ++ progress_ui_handler_ensure_indicator (self); |
2867 | ++ GtkMenuItem *status = g_object_get_data (G_OBJECT(self->priv->indicator), |
2868 | ++ "status"); |
2869 | ++ gtk_menu_item_set_label (GTK_MENU_ITEM (status), tooltip); |
2870 | ++ |
2871 | ++ if (!win_visible) |
2872 | ++ app_indicator_set_status (self->priv->indicator, |
2873 | ++ APP_INDICATOR_STATUS_ACTIVE); |
2874 | ++ else |
2875 | ++ app_indicator_set_status (self->priv->indicator, |
2876 | ++ APP_INDICATOR_STATUS_PASSIVE); |
2877 | ++#else |
2878 | ++ progress_ui_handler_ensure_status_icon (self); |
2879 | ++ |
2880 | + gtk_status_icon_set_tooltip_text (self->priv->status_icon, tooltip); |
2881 | +- g_free (tooltip); |
2882 | + |
2883 | +- gtk_status_icon_set_visible (self->priv->status_icon, TRUE); |
2884 | ++ gtk_status_icon_set_visible (self->priv->status_icon, !win_visible); |
2885 | ++#endif |
2886 | ++ g_free (tooltip); |
2887 | + } |
2888 | + |
2889 | + static gboolean |
2890 | +@@ -195,6 +276,13 @@ |
2891 | + } |
2892 | + |
2893 | + static void |
2894 | ++progress_window_show_event (GtkWidget *widget, NautilusProgressUIHandler *self) |
2895 | ++{ |
2896 | ++ if (!self->priv->notification_supports_persistence) |
2897 | ++ progress_ui_handler_update_status_icon (self); |
2898 | ++} |
2899 | ++ |
2900 | +static void |
2901 | -+update_status_icon_and_window (void) |
2902 | -+{ |
2903 | -+ if (n_progress_ops == 0) { |
2904 | -+ app_indicator_set_status (indicator, APP_INDICATOR_STATUS_PASSIVE); |
2905 | -+ gtk_widget_hide (get_progress_window ()); |
2906 | -+ } else { |
2907 | -+ app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE); |
2908 | + progress_ui_handler_ensure_window (NautilusProgressUIHandler *self) |
2909 | + { |
2910 | + GtkWidget *vbox, *progress_window; |
2911 | +@@ -228,6 +316,9 @@ |
2912 | + g_signal_connect (progress_window, |
2913 | + "delete-event", |
2914 | + (GCallback) progress_window_delete_event, self); |
2915 | ++ g_signal_connect (progress_window, |
2916 | ++ "show", |
2917 | ++ (GCallback) progress_window_show_event, self); |
2918 | + } |
2919 | + |
2920 | + static void |
2921 | +@@ -277,10 +368,15 @@ |
2922 | + static void |
2923 | + progress_ui_handler_hide_notification_or_status (NautilusProgressUIHandler *self) |
2924 | + { |
2925 | ++#ifdef HAVE_APP_INDICATOR |
2926 | ++ if (self->priv->indicator != NULL) { |
2927 | ++ app_indicator_set_status (self->priv->indicator, APP_INDICATOR_STATUS_PASSIVE); |
2928 | + } |
2929 | -+} |
2930 | +#else |
2931 | - static void |
2932 | - update_status_icon_and_window (void) |
2933 | - { |
2934 | -@@ -315,6 +362,7 @@ |
2935 | - gtk_status_icon_set_visible (status_icon, TRUE); |
2936 | + if (self->priv->status_icon != NULL) { |
2937 | + gtk_status_icon_set_visible (self->priv->status_icon, FALSE); |
2938 | } |
2939 | - } |
2940 | +- |
2941 | +#endif |
2942 | - |
2943 | - static void |
2944 | - op_finished (ProgressWidgetData *data) |
2945 | + if (self->priv->progress_notification != NULL) { |
2946 | + notify_notification_close (self->priv->progress_notification, NULL); |
2947 | + g_clear_object (&self->priv->progress_notification); |
2948 | |
2949 | === modified file 'debian/patches/11_copy_skipping_pager.patch' |
2950 | --- debian/patches/11_copy_skipping_pager.patch 2011-07-18 11:32:29 +0000 |
2951 | +++ debian/patches/11_copy_skipping_pager.patch 2011-08-06 03:01:32 +0000 |
2952 | @@ -1,8 +1,8 @@ |
2953 | -Index: nautilus-3.1.3/src/nautilus-progress-ui-handler.c |
2954 | +Index: nautilus/src/nautilus-progress-ui-handler.c |
2955 | =================================================================== |
2956 | ---- nautilus-3.1.3.orig/src/nautilus-progress-ui-handler.c 2011-07-18 11:16:03.139187027 +0200 |
2957 | -+++ nautilus-3.1.3/src/nautilus-progress-ui-handler.c 2011-07-18 11:16:58.303460573 +0200 |
2958 | -@@ -217,6 +217,8 @@ |
2959 | +--- nautilus.orig/src/nautilus-progress-ui-handler.c 2011-08-06 04:45:23.332026621 +0200 |
2960 | ++++ nautilus/src/nautilus-progress-ui-handler.c 2011-08-06 04:46:02.201537962 +0200 |
2961 | +@@ -305,6 +305,8 @@ |
2962 | GTK_WIN_POS_CENTER); |
2963 | gtk_window_set_icon_name (GTK_WINDOW (progress_window), |
2964 | "system-file-manager"); |
2965 | |
2966 | === modified file 'debian/patches/series' |
2967 | --- debian/patches/series 2011-07-25 16:53:10 +0000 |
2968 | +++ debian/patches/series 2011-08-06 03:01:32 +0000 |
2969 | @@ -4,7 +4,7 @@ |
2970 | 04_suppress_umount_in_ltsp.patch |
2971 | #05_desktop_menu_export.patch |
2972 | 06_never_exec_nonexec_launchers.patch |
2973 | -#07_use_application_indicator.patch |
2974 | +07_use_application_indicator.patch |
2975 | 08_clean_session_capplet.patch |
2976 | 09_no-initial-fade.patch |
2977 | 10_show_in_unity.patch |
2978 | |
2979 | === modified file 'docs/Makefile.in' |
2980 | --- docs/Makefile.in 2011-06-28 11:22:30 +0000 |
2981 | +++ docs/Makefile.in 2011-08-06 03:01:32 +0000 |
2982 | @@ -125,6 +125,8 @@ |
2983 | ALL_LINGUAS = @ALL_LINGUAS@ |
2984 | AMTAR = @AMTAR@ |
2985 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
2986 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
2987 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
2988 | AR = @AR@ |
2989 | AS = @AS@ |
2990 | AUTOCONF = @AUTOCONF@ |
2991 | |
2992 | === modified file 'docs/reference/Makefile.in' |
2993 | --- docs/reference/Makefile.in 2011-06-28 11:22:30 +0000 |
2994 | +++ docs/reference/Makefile.in 2011-08-06 03:01:32 +0000 |
2995 | @@ -100,6 +100,8 @@ |
2996 | ALL_LINGUAS = @ALL_LINGUAS@ |
2997 | AMTAR = @AMTAR@ |
2998 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
2999 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3000 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3001 | AR = @AR@ |
3002 | AS = @AS@ |
3003 | AUTOCONF = @AUTOCONF@ |
3004 | |
3005 | === modified file 'docs/reference/libnautilus-extension/Makefile.in' |
3006 | --- docs/reference/libnautilus-extension/Makefile.in 2011-06-28 11:22:30 +0000 |
3007 | +++ docs/reference/libnautilus-extension/Makefile.in 2011-08-06 03:01:32 +0000 |
3008 | @@ -67,6 +67,8 @@ |
3009 | ALL_LINGUAS = @ALL_LINGUAS@ |
3010 | AMTAR = @AMTAR@ |
3011 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
3012 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3013 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3014 | AR = @AR@ |
3015 | AS = @AS@ |
3016 | AUTOCONF = @AUTOCONF@ |
3017 | |
3018 | === modified file 'eel/Makefile.in' |
3019 | --- eel/Makefile.in 2011-07-04 18:16:54 +0000 |
3020 | +++ eel/Makefile.in 2011-08-06 03:01:32 +0000 |
3021 | @@ -114,6 +114,8 @@ |
3022 | ALL_LINGUAS = @ALL_LINGUAS@ |
3023 | AMTAR = @AMTAR@ |
3024 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
3025 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3026 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3027 | AR = @AR@ |
3028 | AS = @AS@ |
3029 | AUTOCONF = @AUTOCONF@ |
3030 | |
3031 | === modified file 'icons/Makefile.in' |
3032 | --- icons/Makefile.in 2011-06-28 11:22:30 +0000 |
3033 | +++ icons/Makefile.in 2011-08-06 03:01:32 +0000 |
3034 | @@ -84,6 +84,8 @@ |
3035 | ALL_LINGUAS = @ALL_LINGUAS@ |
3036 | AMTAR = @AMTAR@ |
3037 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
3038 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3039 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3040 | AR = @AR@ |
3041 | AS = @AS@ |
3042 | AUTOCONF = @AUTOCONF@ |
3043 | |
3044 | === modified file 'libnautilus-extension/Makefile.in' |
3045 | --- libnautilus-extension/Makefile.in 2011-06-28 11:22:30 +0000 |
3046 | +++ libnautilus-extension/Makefile.in 2011-08-06 03:01:32 +0000 |
3047 | @@ -137,6 +137,8 @@ |
3048 | ALL_LINGUAS = @ALL_LINGUAS@ |
3049 | AMTAR = @AMTAR@ |
3050 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
3051 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3052 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3053 | AR = @AR@ |
3054 | AS = @AS@ |
3055 | AUTOCONF = @AUTOCONF@ |
3056 | |
3057 | === modified file 'libnautilus-private/Makefile.in' |
3058 | --- libnautilus-private/Makefile.in 2011-07-04 18:16:54 +0000 |
3059 | +++ libnautilus-private/Makefile.in 2011-08-06 03:01:32 +0000 |
3060 | @@ -169,6 +169,8 @@ |
3061 | ALL_LINGUAS = @ALL_LINGUAS@ |
3062 | AMTAR = @AMTAR@ |
3063 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
3064 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3065 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3066 | AR = @AR@ |
3067 | AS = @AS@ |
3068 | AUTOCONF = @AUTOCONF@ |
3069 | |
3070 | === modified file 'nautilus-sendto-extension/Makefile.in' |
3071 | --- nautilus-sendto-extension/Makefile.in 2011-06-28 11:22:30 +0000 |
3072 | +++ nautilus-sendto-extension/Makefile.in 2011-08-06 03:01:32 +0000 |
3073 | @@ -120,6 +120,8 @@ |
3074 | ALL_LINGUAS = @ALL_LINGUAS@ |
3075 | AMTAR = @AMTAR@ |
3076 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
3077 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3078 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3079 | AR = @AR@ |
3080 | AS = @AS@ |
3081 | AUTOCONF = @AUTOCONF@ |
3082 | |
3083 | === modified file 'src/Makefile.am' |
3084 | --- src/Makefile.am 2011-07-04 18:16:54 +0000 |
3085 | +++ src/Makefile.am 2011-08-06 03:01:32 +0000 |
3086 | @@ -30,6 +30,7 @@ |
3087 | -DSYSCONFDIR=\""$(sysconfdir)"\" \ |
3088 | -DVERSION="\"$(VERSION)\"" \ |
3089 | $(DISABLE_DEPRECATED_CFLAGS) \ |
3090 | + $(APP_INDICATOR_CFLAGS) \ |
3091 | $(NULL) |
3092 | |
3093 | LDADD =\ |
3094 | @@ -41,6 +42,7 @@ |
3095 | $(EXIF_LIBS) \ |
3096 | $(EXEMPI_LIBS) \ |
3097 | $(POPT_LIBS) \ |
3098 | + $(APP_INDICATOR_LIBS) \ |
3099 | $(NULL) |
3100 | |
3101 | nautilus_SOURCES = \ |
3102 | |
3103 | === modified file 'src/Makefile.in' |
3104 | --- src/Makefile.in 2011-07-04 18:16:54 +0000 |
3105 | +++ src/Makefile.in 2011-08-06 03:01:32 +0000 |
3106 | @@ -160,7 +160,8 @@ |
3107 | $(top_builddir)/libnautilus-private/libnautilus-private.la \ |
3108 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3109 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3110 | - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) |
3111 | + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3112 | + $(am__DEPENDENCIES_1) |
3113 | AM_V_lt = $(am__v_lt_$(V)) |
3114 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) |
3115 | am__v_lt_0 = --silent |
3116 | @@ -173,7 +174,8 @@ |
3117 | $(top_builddir)/libnautilus-private/libnautilus-private.la \ |
3118 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3119 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3120 | - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) |
3121 | + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3122 | + $(am__DEPENDENCIES_1) |
3123 | am_nautilus_connect_server_OBJECTS = nautilus-bookmark-list.$(OBJEXT) \ |
3124 | nautilus-connect-server-dialog.$(OBJEXT) \ |
3125 | nautilus-connect-server-dialog-main.$(OBJEXT) \ |
3126 | @@ -185,7 +187,8 @@ |
3127 | $(top_builddir)/libnautilus-private/libnautilus-private.la \ |
3128 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3129 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3130 | - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) |
3131 | + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3132 | + $(am__DEPENDENCIES_1) |
3133 | am_nautilus_convert_metadata_OBJECTS = \ |
3134 | nautilus-convert-metadata.$(OBJEXT) $(am__objects_1) |
3135 | nautilus_convert_metadata_OBJECTS = \ |
3136 | @@ -195,7 +198,8 @@ |
3137 | $(top_builddir)/libnautilus-private/libnautilus-private.la \ |
3138 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3139 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3140 | - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) |
3141 | + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ |
3142 | + $(am__DEPENDENCIES_1) |
3143 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) |
3144 | depcomp = $(SHELL) $(top_srcdir)/depcomp |
3145 | am__depfiles_maybe = depfiles |
3146 | @@ -260,6 +264,8 @@ |
3147 | ALL_LINGUAS = @ALL_LINGUAS@ |
3148 | AMTAR = @AMTAR@ |
3149 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
3150 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3151 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3152 | AR = @AR@ |
3153 | AS = @AS@ |
3154 | AUTOCONF = @AUTOCONF@ |
3155 | @@ -455,6 +461,7 @@ |
3156 | -DSYSCONFDIR=\""$(sysconfdir)"\" \ |
3157 | -DVERSION="\"$(VERSION)\"" \ |
3158 | $(DISABLE_DEPRECATED_CFLAGS) \ |
3159 | + $(APP_INDICATOR_CFLAGS) \ |
3160 | $(NULL) |
3161 | |
3162 | LDADD = \ |
3163 | @@ -466,6 +473,7 @@ |
3164 | $(EXIF_LIBS) \ |
3165 | $(EXEMPI_LIBS) \ |
3166 | $(POPT_LIBS) \ |
3167 | + $(APP_INDICATOR_LIBS) \ |
3168 | $(NULL) |
3169 | |
3170 | nautilus_SOURCES = nautilus-actions.h nautilus-application.c \ |
3171 | |
3172 | === modified file 'src/nautilus-progress-ui-handler.c' |
3173 | --- src/nautilus-progress-ui-handler.c 2011-07-18 11:32:29 +0000 |
3174 | +++ src/nautilus-progress-ui-handler.c 2011-08-06 03:01:32 +0000 |
3175 | @@ -21,6 +21,7 @@ |
3176 | * |
3177 | * Authors: Alexander Larsson <alexl@redhat.com> |
3178 | * Cosimo Cecchi <cosimoc@redhat.com> |
3179 | + * Marco Trevisan <3v1n0@ubuntu.com> |
3180 | * |
3181 | */ |
3182 | |
3183 | @@ -36,6 +37,10 @@ |
3184 | |
3185 | #include <libnotify/notify.h> |
3186 | |
3187 | +#ifdef HAVE_APP_INDICATOR |
3188 | +#include <libappindicator/app-indicator.h> |
3189 | +#endif |
3190 | + |
3191 | struct _NautilusProgressUIHandlerPriv { |
3192 | NautilusProgressInfoManager *manager; |
3193 | |
3194 | @@ -45,7 +50,11 @@ |
3195 | |
3196 | gboolean notification_supports_persistence; |
3197 | NotifyNotification *progress_notification; |
3198 | +#ifdef HAVE_APP_INDICATOR |
3199 | + AppIndicator *indicator; |
3200 | +#else |
3201 | GtkStatusIcon *status_icon; |
3202 | +#endif |
3203 | }; |
3204 | |
3205 | G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT); |
3206 | @@ -69,6 +78,7 @@ |
3207 | |
3208 | #define ACTION_DETAILS "details" |
3209 | |
3210 | +#ifndef HAVE_APP_INDICATOR |
3211 | static void |
3212 | status_icon_activate_cb (GtkStatusIcon *icon, |
3213 | NautilusProgressUIHandler *self) |
3214 | @@ -76,6 +86,7 @@ |
3215 | gtk_status_icon_set_visible (icon, FALSE); |
3216 | gtk_window_present (GTK_WINDOW (self->priv->progress_window)); |
3217 | } |
3218 | +#endif |
3219 | |
3220 | static void |
3221 | notification_show_details_cb (NotifyNotification *notification, |
3222 | @@ -117,6 +128,56 @@ |
3223 | NULL); |
3224 | } |
3225 | |
3226 | +#ifdef HAVE_APP_INDICATOR |
3227 | + |
3228 | +static void |
3229 | +indicator_menu_activate_cb (AppIndicator *indicator, NautilusProgressUIHandler *self) |
3230 | +{ |
3231 | + g_return_if_fail(self); |
3232 | + gtk_window_present (GTK_WINDOW (self->priv->progress_window)); |
3233 | + app_indicator_set_status (indicator, APP_INDICATOR_STATUS_PASSIVE); |
3234 | +} |
3235 | + |
3236 | +static void |
3237 | +progress_ui_handler_ensure_indicator (NautilusProgressUIHandler *self) |
3238 | +{ |
3239 | + AppIndicator *indicator; |
3240 | + GtkWidget *menu; |
3241 | + GtkWidget *menuitem; |
3242 | + GtkWidget *status; |
3243 | + GtkWidget *status_sep; |
3244 | + g_return_if_fail (self); |
3245 | + |
3246 | + if (self->priv->indicator != NULL) { |
3247 | + return; |
3248 | + } |
3249 | + |
3250 | + indicator = app_indicator_new ("nautilus", "system-file-manager", |
3251 | + APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
3252 | + menu = gtk_menu_new(); |
3253 | + |
3254 | + status = gtk_menu_item_new (); |
3255 | + gtk_widget_set_sensitive (status, FALSE); |
3256 | + gtk_menu_shell_append (GTK_MENU_SHELL (menu), status); |
3257 | + g_object_set_data (G_OBJECT (indicator), "status", status); |
3258 | + |
3259 | + gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ()); |
3260 | + |
3261 | + menuitem = gtk_menu_item_new_with_label (_("Show copy dialog")); |
3262 | + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); |
3263 | + g_signal_connect (menuitem, "activate", |
3264 | + (GCallback)indicator_menu_activate_cb, self); |
3265 | + |
3266 | + app_indicator_set_status (indicator, APP_INDICATOR_STATUS_PASSIVE); |
3267 | + app_indicator_set_menu (indicator, GTK_MENU (menu)); |
3268 | + app_indicator_set_secondary_activate_target(indicator, menuitem); |
3269 | + gtk_widget_show_all (menu); |
3270 | + |
3271 | + self->priv->indicator = indicator; |
3272 | +} |
3273 | + |
3274 | +#else |
3275 | + |
3276 | static void |
3277 | progress_ui_handler_ensure_status_icon (NautilusProgressUIHandler *self) |
3278 | { |
3279 | @@ -139,6 +200,8 @@ |
3280 | self->priv->status_icon = status_icon; |
3281 | } |
3282 | |
3283 | +#endif |
3284 | + |
3285 | static void |
3286 | progress_ui_handler_update_notification (NautilusProgressUIHandler *self) |
3287 | { |
3288 | @@ -165,17 +228,35 @@ |
3289 | progress_ui_handler_update_status_icon (NautilusProgressUIHandler *self) |
3290 | { |
3291 | gchar *tooltip; |
3292 | - |
3293 | - progress_ui_handler_ensure_status_icon (self); |
3294 | + gboolean win_visible; |
3295 | |
3296 | tooltip = g_strdup_printf (ngettext ("%'d file operation active", |
3297 | "%'d file operations active", |
3298 | self->priv->active_infos), |
3299 | self->priv->active_infos); |
3300 | + |
3301 | + win_visible = gtk_widget_get_visible (self->priv->progress_window); |
3302 | + |
3303 | +#ifdef HAVE_APP_INDICATOR |
3304 | + progress_ui_handler_ensure_indicator (self); |
3305 | + GtkMenuItem *status = g_object_get_data (G_OBJECT(self->priv->indicator), |
3306 | + "status"); |
3307 | + gtk_menu_item_set_label (GTK_MENU_ITEM (status), tooltip); |
3308 | + |
3309 | + if (!win_visible) |
3310 | + app_indicator_set_status (self->priv->indicator, |
3311 | + APP_INDICATOR_STATUS_ACTIVE); |
3312 | + else |
3313 | + app_indicator_set_status (self->priv->indicator, |
3314 | + APP_INDICATOR_STATUS_PASSIVE); |
3315 | +#else |
3316 | + progress_ui_handler_ensure_status_icon (self); |
3317 | + |
3318 | gtk_status_icon_set_tooltip_text (self->priv->status_icon, tooltip); |
3319 | + |
3320 | + gtk_status_icon_set_visible (self->priv->status_icon, !win_visible); |
3321 | +#endif |
3322 | g_free (tooltip); |
3323 | - |
3324 | - gtk_status_icon_set_visible (self->priv->status_icon, TRUE); |
3325 | } |
3326 | |
3327 | static gboolean |
3328 | @@ -195,6 +276,13 @@ |
3329 | } |
3330 | |
3331 | static void |
3332 | +progress_window_show_event (GtkWidget *widget, NautilusProgressUIHandler *self) |
3333 | +{ |
3334 | + if (!self->priv->notification_supports_persistence) |
3335 | + progress_ui_handler_update_status_icon (self); |
3336 | +} |
3337 | + |
3338 | +static void |
3339 | progress_ui_handler_ensure_window (NautilusProgressUIHandler *self) |
3340 | { |
3341 | GtkWidget *vbox, *progress_window; |
3342 | @@ -230,6 +318,9 @@ |
3343 | g_signal_connect (progress_window, |
3344 | "delete-event", |
3345 | (GCallback) progress_window_delete_event, self); |
3346 | + g_signal_connect (progress_window, |
3347 | + "show", |
3348 | + (GCallback) progress_window_show_event, self); |
3349 | } |
3350 | |
3351 | static void |
3352 | @@ -279,10 +370,15 @@ |
3353 | static void |
3354 | progress_ui_handler_hide_notification_or_status (NautilusProgressUIHandler *self) |
3355 | { |
3356 | +#ifdef HAVE_APP_INDICATOR |
3357 | + if (self->priv->indicator != NULL) { |
3358 | + app_indicator_set_status (self->priv->indicator, APP_INDICATOR_STATUS_PASSIVE); |
3359 | + } |
3360 | +#else |
3361 | if (self->priv->status_icon != NULL) { |
3362 | gtk_status_icon_set_visible (self->priv->status_icon, FALSE); |
3363 | } |
3364 | - |
3365 | +#endif |
3366 | if (self->priv->progress_notification != NULL) { |
3367 | notify_notification_close (self->priv->progress_notification, NULL); |
3368 | g_clear_object (&self->priv->progress_notification); |
3369 | |
3370 | === modified file 'test/Makefile.in' |
3371 | --- test/Makefile.in 2011-06-28 11:22:30 +0000 |
3372 | +++ test/Makefile.in 2011-08-06 03:01:32 +0000 |
3373 | @@ -129,6 +129,8 @@ |
3374 | ALL_LINGUAS = @ALL_LINGUAS@ |
3375 | AMTAR = @AMTAR@ |
3376 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ |
3377 | +APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@ |
3378 | +APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@ |
3379 | AR = @AR@ |
3380 | AS = @AS@ |
3381 | AUTOCONF = @AUTOCONF@ |
I'd rather show the progress on the unity launcher icon, looks more representative of what a "progress" is, and it's in line with other progress meters shown on the launcher (firefox downloads, transmission etc etc...).