commit 68c8cc25a375ad1bb4632765e1a1f950b86b3263
parent ef1489167d4e02c41918668bf85b0affb5264cfa
Author: Jean-Yves Lefort <jylefort@brutele.be>
Date: Wed, 30 Jun 2004 04:24:10 +1000
mail-notification-0.4.0
* Fixed a vulnerability in the POP3 code (a malicious POP3
server could overflow the stack with an invalid STAT reply)
* Now uses automatic notification if available (requires FAM)
* Now uses GnomeVFS for all I/O operations
* Now supports drag and drop
* The user interface has been improved
* mbox detection is now stricter
* Now handles non-Unicode filenames
* Tries harder to hide POP3 passwords from the interface
* A few minor bugs have been fixed
* A few memory leaks have been fixed
* Some code cleanups have been performed
* Switched to Autoconf 2.59 and Automake 1.8.4
* Now requires GTK+ version 2.4.0 or superior
Diffstat:
102 files changed, 11633 insertions(+), 6302 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,673 @@
+2004-06-29 18:36 jylefort
+
+ * configure.ac: Version 0.4.0
+
+2004-06-29 18:31 jylefort
+
+ * configure.ac: Updated list of headers and functions
+
+2004-06-29 17:46 jylefort
+
+ * ui/menu.glade: Fix
+
+2004-06-29 16:55 jylefort
+
+ * data/mail-notification.schemas: Updated
+
+2004-06-29 02:14 jylefort
+
+ * src/: mn-dialog.c, mn-dialog.h, mn-mailbox.c, mn-preferences.c,
+ mn-ui.c, mn-util.c: Fixes
+
+2004-06-29 01:57 jylefort
+
+ * help/xmldocs.make, src/mn-preferences.c, src/mn-ui.c,
+ src/mn-util.c, src/mn-util.h, ui/menu.glade,
+ ui/preferences.glade: Added help ui knobs
+
+2004-06-29 01:28 jylefort
+
+ * Makefile.am, configure.ac, help/.cvsignore, help/Makefile.am,
+ help/omf.make, help/xmldocs.make, help/C/.cvsignore,
+ help/C/Makefile.am, help/C/documentation-license.xml,
+ help/C/mail-notification-C.omf, help/C/mail-notification.xml,
+ help/C/software-license.xml, help/C/figures/mail-error.png,
+ help/C/figures/mail.png, help/C/figures/no-mail-error.png,
+ help/C/figures/no-mail.png: Added a DocBook manual
+
+2004-06-27 14:37 jylefort
+
+ * src/: mn-preferences.c, mn-util.c, mn-util.h: Do not use a custom
+ search function anymore for the mailbox list; cleanups
+
+2004-06-27 14:30 jylefort
+
+ * src/mn-mailbox-properties-dialog.c, src/mn-uri.c,
+ ui/mailbox-properties.glade: Do not treat UNIX mailbox specially
+ anymore
+
+2004-06-15 16:50 jylefort
+
+ * src/mn-preferences.c, ui/preferences.glade: Now autoscrolls the
+ mailboxes list during a drag motion
+
+2004-06-15 15:08 jylefort
+
+ * src/mn-mailboxes.c: Fix
+
+2004-06-15 15:01 jylefort
+
+ * configure.ac, src/Makefile.am, src/mail-notification.c,
+ src/mn-main.c: Cleanups
+
+2004-06-15 14:50 jylefort
+
+ * src/mn-mailboxes.c: Fix
+
+2004-06-15 14:44 jylefort
+
+ * src/: mn-conf.c, mn-mailbox.c, mn-preferences.c: Cleanups
+
+2004-06-15 14:39 jylefort
+
+ * src/: mn-mailboxes.c, mn-preferences.c: Fixes
+
+2004-06-15 03:15 jylefort
+
+ * src/: mn-mailbox.h, mn-pending-mailbox.c, mn-preferences.c,
+ mn-unsupported-mailbox.c: Cleanups
+
+2004-06-15 02:19 jylefort
+
+ * src/mn-mbox-mailbox.c: Fix
+
+2004-06-15 02:09 jylefort
+
+ * src/: Makefile.am, mn-conf.c, mn-mailbox.c, mn-mailbox.h,
+ mn-mailboxes.c, mn-maildir-mailbox.c, mn-mbox-mailbox.c,
+ mn-mh-mailbox.c, mn-pending-mailbox.c, mn-pending-mailbox.h,
+ mn-pop3-mailbox.c, mn-preferences.c, mn-sylpheed-mailbox.c,
+ mn-vfs.c, mn-vfs.h: Implemented asynchronous format detection
+
+2004-06-14 21:49 jylefort
+
+ * src/mn-util.c: Added text/x-moz-url dnd support
+
+2004-06-13 17:00 jylefort
+
+ * src/mn-preferences.c, ui/preferences.glade: Fixes
+
+2004-06-13 16:43 jylefort
+
+ * src/mn-preferences.c, src/mn-util.c, src/mn-util.h,
+ ui/preferences.glade: Can now cut/copy/paste files between
+ Nautilus and Mail Notification (uses
+ x-special/gnome-copied-files)
+
+2004-06-12 20:09 jylefort
+
+ * src/mn-preferences.c, ui/preferences.glade: Use the scrolled
+ window as drop target
+
+2004-06-09 23:40 jylefort
+
+ * src/: mn-mailbox.c, mn-mailbox.h, mn-mailboxes.c, mn-ui.c,
+ mn-unsupported-mailbox.c, mn-unsupported-mailbox.h: Fixes
+
+2004-06-09 15:11 jylefort
+
+ * src/mn-preferences.c: Fixes
+
+2004-06-09 15:09 jylefort
+
+ * src/mn-preferences.c: Fix
+
+2004-06-09 15:04 jylefort
+
+ * ui/preferences.glade: Fixes
+
+2004-06-09 15:01 jylefort
+
+ * src/: mn-mbox-mailbox.c, mn-mh-mailbox.c, mn-vfs.c: Fixes
+
+2004-06-09 14:55 jylefort
+
+ * src/mn-vfs.c: Cleanups
+
+2004-06-08 20:50 jylefort
+
+ * ui/dialog.glade: Label is now selectable
+
+2004-06-08 20:47 jylefort
+
+ * src/mn-mailbox.c: Warn if we can't monitor a file
+
+2004-06-08 20:12 jylefort
+
+ * src/mn-pop3-mailbox.c: Fixes
+
+2004-06-08 18:32 jylefort
+
+ * src/: mn-conf.c, mn-conf.h, mn-mailbox-properties-dialog.c: Fixes
+
+2004-06-08 17:35 jylefort
+
+ * src/mn-pop3-mailbox.c: Fixes
+
+2004-06-08 17:31 jylefort
+
+ * src/: mn-preferences.c, mn-uri.c, mn-uri.h: Fixes
+
+2004-06-08 17:07 jylefort
+
+ * src/: mn-maildir-mailbox.c, mn-mh-mailbox.c,
+ mn-sylpheed-mailbox.c, mn-vfs.c, mn-vfs.h: Fixes
+
+2004-06-08 16:17 jylefort
+
+ * src/mn-mailbox-properties-dialog.c: Fixes
+
+2004-06-08 00:15 jylefort
+
+ * art/local.png, art/remote.png, src/mn-preferences.c,
+ src/mn-stock.c: Now uses the icon theme for some stock icons
+
+2004-06-07 19:36 jylefort
+
+ * src/mn-uri.c: Fixes
+
+2004-06-07 19:33 jylefort
+
+ * src/mn-uri.c: Fixes
+
+2004-06-07 19:24 jylefort
+
+ * src/mn-mailbox-properties-dialog.c: Fixes
+
+2004-06-07 19:17 jylefort
+
+ * src/: mn-mailbox-properties-dialog.c,
+ mn-mailbox-properties-dialog.h, mn-preferences.c, mn-uri.c,
+ mn-uri.h: Fixes
+
+2004-06-07 18:50 jylefort
+
+ * src/mn-mailbox-properties-dialog.c,
+ src/mn-mailbox-properties-dialog.h, src/mn-preferences.c,
+ ui/mailbox-properties.glade: Fixes
+
+2004-06-07 15:09 jylefort
+
+ * src/mn-mailbox-properties-dialog.c, ui/mailbox-properties.glade:
+ Cleanups
+
+2004-06-06 20:25 jylefort
+
+ * src/: mn-conf.c, mn-conf.h, mn-mailbox-properties-dialog.c,
+ mn-preferences.c: Fixes
+
+2004-06-06 19:12 jylefort
+
+ * src/: mn-conf.c, mn-mail-icon.c, mn-preferences.c, mn-util.c,
+ mn-util.h: Can now drop URIs onto the mail icon or the mailboxes
+ list
+
+2004-06-06 17:49 jylefort
+
+ * src/: Makefile.am, mn-conf.c, mn-mailbox-properties-dialog.c,
+ mn-mailbox.c, mn-mailboxes.c, mn-pop3-mailbox.c, mn-uri.c,
+ mn-uri.h, mn-util.c, mn-util.h: Cleanups
+
+2004-06-06 17:38 jylefort
+
+ * src/: mn-mailbox-properties-dialog.c, mn-mailbox.c, mn-mailbox.h:
+ Cleanups
+
+2004-06-06 15:01 jylefort
+
+ * src/: mn-mailbox-properties-dialog.c,
+ mn-mailbox-properties-dialog.h, mn-preferences.c: Cleanups
+
+2004-06-06 14:30 jylefort
+
+ * src/: mn-mailbox-properties-dialog.c,
+ mn-mailbox-properties-dialog.h, mn-mailbox.c, mn-preferences.c,
+ mn-util.c, mn-util.h: Fixes
+
+2004-06-06 14:12 jylefort
+
+ * src/mn-mailbox-properties-dialog.c,
+ src/mn-mailbox-properties-dialog.h, src/mn-mailbox.c,
+ src/mn-util.c, src/mn-util.h, ui/mailbox-properties.glade: The
+ system UNIX mailbox is now handled specially
+
+2004-06-06 03:30 jylefort
+
+ * src/: mn-mailbox.c, mn-mailboxes.c, mn-ui.c: Fixes
+
+2004-06-06 03:21 jylefort
+
+ * src/mn-preferences.c: Fixes
+
+2004-06-06 02:36 jylefort
+
+ * src/Makefile.am, src/mn-conf.c, src/mn-conf.h,
+ src/mn-mailbox-properties-dialog.c,
+ src/mn-mailbox-properties-dialog.h, src/mn-mailboxes.c,
+ src/mn-preferences.c, ui/Makefile.am, ui/add-mailbox.glade,
+ ui/add-mailbox.gladep, ui/dialog.glade,
+ ui/mailbox-properties.glade, ui/mailbox-properties.gladep,
+ ui/preferences.glade: Can now edit mailbox properties
+
+2004-06-05 16:54 jylefort
+
+ * src/mn-vfs.c: Fix
+
+2004-06-05 16:37 jylefort
+
+ * src/mn-maildir-mailbox.c: Fixes
+
+2004-06-05 16:19 jylefort
+
+ * src/: mn-preferences.c, mn-ui.c: Cleanups
+
+2004-06-05 16:18 jylefort
+
+ * src/: mn-mailboxes.c, mn-mailboxes.h, mn-ui.c, mn-ui.h: Fixes
+
+2004-06-05 16:08 jylefort
+
+ * src/: mn-mailbox.c, mn-mailbox.h, mn-mailboxes.c,
+ mn-maildir-mailbox.c, mn-mbox-mailbox.c, mn-mh-mailbox.c,
+ mn-pop3-mailbox.c, mn-sylpheed-mailbox.c, mn-sylpheed-mailbox.h,
+ mail-notification.c, mn-conf.c, mn-mailboxes.h: Cleanups
+
+2004-06-05 15:41 jylefort
+
+ * src/: mn-mailbox.c, mn-mailbox.h, mn-sylpheed-mailbox.c: Cleanups
+
+2004-06-05 15:16 jylefort
+
+ * src/: mn-conf.c, mn-conf.h, mn-preferences.c: Fixes
+
+2004-06-05 15:02 jylefort
+
+ * src/: mn-preferences.c, mn-util.c, mn-util.h: Fixes
+
+2004-06-05 14:55 jylefort
+
+ * src/mn-conf.h, src/mn-preferences.c, ui/add-mailbox.glade: Now
+ uses a location entry
+
+2004-06-05 14:33 jylefort
+
+ * src/mn-mailbox.c: Fixes
+
+2004-06-05 03:02 jylefort
+
+ * src/: mn-conf.c, mn-mailboxes.c, mn-preferences.c, mn-util.c,
+ mn-util.h: Now compares canonicalized URIs
+
+2004-06-05 02:39 jylefort
+
+ * src/mn-conf.c: Fix
+
+2004-06-05 02:30 jylefort
+
+ * src/: mn-mailboxes.c, mn-mailboxes.h, mn-preferences.c: Now
+ refuses to add the same mailbox twice
+
+2004-06-05 02:04 jylefort
+
+ * src/mn-mailbox.c: Fixes
+
+2004-06-05 01:53 jylefort
+
+ * src/mn-preferences.c, ui/add-mailbox.glade: The GtkFileChooser
+ now uses the gnome-vfs backend
+
+2004-06-05 01:13 jylefort
+
+ * src/mn-pop3-mailbox.c: Fix
+
+2004-06-05 01:07 jylefort
+
+ * src/: mn-mh-mailbox.c, mn-mh-mailbox.h: Reimplemented
+
+2004-06-05 00:29 jylefort
+
+ * src/mn-mbox-mailbox.c: Cleanups
+
+2004-06-05 00:14 jylefort
+
+ * src/: Makefile.am, mn-mbox-mailbox.c, mn-mbox-mailbox.h,
+ mn-vfs.c, mn-vfs.h: Reimplemented mbox support
+
+2004-06-04 13:58 jylefort
+
+ * src/: mn-conf.c, mn-conf.h, mn-preferences.c: Now remember window
+ dimensions
+
+2004-06-04 13:40 jylefort
+
+ * src/mn-preferences.c: Set a default size for the preferences
+ dialog
+
+2004-06-04 13:37 jylefort
+
+ * src/mn-preferences.c, ui/preferences.glade: HIG fixes: added a
+ label displaying the number of mailboxes selected
+
+2004-06-04 13:27 jylefort
+
+ * ui/add-mailbox.glade: HIG fixes
+
+2004-06-04 13:24 jylefort
+
+ * ui/preferences.glade: HIG fixes
+
+2004-06-04 03:37 jylefort
+
+ * src/mn-pop3-mailbox.c: Cleanups
+
+2004-06-04 02:55 jylefort
+
+ * src/mn-sylpheed-mailbox.c: Fixes
+
+2004-06-04 02:32 jylefort
+
+ * src/mn-sylpheed-mailbox.c: Is now asynchronous
+
+2004-06-04 01:51 jylefort
+
+ * src/: mn-maildir-mailbox.c, mn-maildir-mailbox.h: Converted to
+ monitor
+
+2004-06-04 01:51 jylefort
+
+ * src/mn-sylpheed-mailbox.c: Cleanups
+
+2004-06-03 23:07 jylefort
+
+ * src/mn-sylpheed-mailbox.c: Fixes
+
+2004-06-03 23:00 jylefort
+
+ * src/mn-sylpheed-mailbox.c: Fixes
+
+2004-06-03 22:51 jylefort
+
+ * src/mn-pop3-mailbox.c: Fixes
+
+2004-06-03 22:07 jylefort
+
+ * src/mn-ui.c: Cleanups
+
+2004-06-03 21:30 jylefort
+
+ * src/: mn-mailbox.c, mn-pop3-mailbox.c, mn-unsupported-mailbox.c:
+ Cleanups
+
+2004-06-03 21:15 jylefort
+
+ * acinclude.m4, configure.ac, art/Makefile.am, art/mail-error.png,
+ art/no-mail-error.png, src/Makefile.am, src/mail-notification.c,
+ src/mn-check.c, src/mn-check.h, src/mn-conf.c,
+ src/mn-mail-icon.c, src/mn-mail-icon.h, src/mn-mailbox.c,
+ src/mn-mailbox.h, src/mn-mailboxes.c, src/mn-mailboxes.h,
+ src/mn-pop3-mailbox.c, src/mn-pop3-mailbox.h,
+ src/mn-preferences.c, src/mn-stock.c, src/mn-stock.h,
+ src/mn-sylpheed-mailbox.c, src/mn-sylpheed-mailbox.h,
+ src/mn-ui.c, src/mn-ui.h, src/mn-unsupported-mailbox.c,
+ ui/preferences.glade: Local mailboxes now use GnomeVFS monitors
+ instead of being explicitly checked; we don't use multi-threading
+ anymore (the POP3 code achieves asynchronousness by using the
+ appropriate GNet API)
+
+2004-06-02 14:53 jylefort
+
+ * src/: mail-notification.c, mn-check.c, mn-check.h: Fixes
+
+2004-06-01 18:07 jylefort
+
+ * src/: mn-pop3-mailbox.c, mn-pop3-mailbox.h: Cleanups
+
+2004-06-01 17:36 jylefort
+
+ * src/: mn-pop3-mailbox.c, mn-pop3-mailbox.h: Do not overwrite a
+ previously set GError; was reading only 511 bytes rather than
+ 512: fixed; cleanups
+
+2004-06-01 16:22 jylefort
+
+ * src/: mn-conf.c, mn-mailboxes.c, mn-util.c: Fixes
+
+2004-06-01 15:44 jylefort
+
+ * src/: mn-pop3-mailbox.c, mn-unsupported-mailbox.c, mn-util.c,
+ mn-util.h: POP3 passwords are now hidden from the mailbox list
+ even if POP3 support is not compiled in
+
+2004-06-01 14:56 jylefort
+
+ * src/: mail-notification.c, mn-check.c, mn-conf.c, mn-conf.h,
+ mn-mailbox.c, mn-mailbox.h, mn-mailboxes.c, mn-maildir-mailbox.c,
+ mn-mbox-mailbox.c, mn-mh-mailbox.c, mn-pop3-mailbox.c,
+ mn-pop3-mailbox.h, mn-preferences.c, mn-sylpheed-mailbox.c,
+ mn-unsupported-mailbox.c: Now handles non-Unicode filenames; now
+ uses standard URIs instead of locators; cleanups
+
+2004-05-31 16:41 jylefort
+
+ * src/: mn-conf.c, mn-conf.h, mn-preferences.c, mn-preferences.h:
+ Cleanups
+
+2004-05-30 19:31 jylefort
+
+ * src/mn-pop3-mailbox.c: Do not include port number in mailbox name
+
+2004-05-30 19:28 jylefort
+
+ * art/Makefile.am, art/local.png, art/remote.png,
+ art/unsupported.png, src/Makefile.am, src/mail-notification.c,
+ src/mn-mail-icon.c, src/mn-preferences.c, src/mn-stock.c,
+ src/mn-stock.h: Added format icons (local/remote/unsupported) in
+ the mailbox list; cleanups
+
+2004-05-30 17:52 jylefort
+
+ * src/mn-preferences.c: Fix
+
+2004-05-30 17:50 jylefort
+
+ * src/: mn-dialog.c, mn-preferences.c, mn-ui.c, mn-util.c,
+ mn-util.h: Cleanups
+
+2004-05-30 17:33 jylefort
+
+ * src/: mn-mail-icon.c, mn-ui.c: Fixes
+
+2004-05-30 14:46 jylefort
+
+ * src/mn-util.c: mn_glade_xml_new(): better error handling
+
+2004-05-30 14:29 jylefort
+
+ * src/: mn-dialog.c, mn-preferences.c, mn-ui.c, mn-util.c,
+ mn-util.h: Cleanups
+
+2004-05-30 14:08 jylefort
+
+ * src/mn-preferences.c: Fixed a memory leak
+
+2004-05-30 13:23 jylefort
+
+ * data/mail-notification.schemas, src/mn-preferences.c,
+ ui/preferences.glade: Wording precisions
+
+2004-05-30 12:58 jylefort
+
+ * src/: mail-notification.c, mn-mailbox.c, mn-mailbox.h: Cleanups;
+ reduced memory usage (unused mailbox format handlers are now
+ unreferenced)
+
+2004-05-30 12:30 jylefort
+
+ * src/mn-mailbox.c: Cleanup
+
+2004-05-30 12:21 jylefort
+
+ * src/mail-notification.c: Fixed a --list-handlers bug
+
+2004-05-29 20:23 jylefort
+
+ * src/mn-check.c: Fixed a thread-safety bug
+
+2004-05-29 19:54 jylefort
+
+ * src/: mail-notification.c, mn-check.c, mn-check.h, mn-ui.c:
+ Cleanups
+
+2004-05-29 19:00 jylefort
+
+ * src/: mail-notification.c, mn-check.c, mn-check.h, mn-ui.c:
+ Cleanups: removed check flags and interactive mode
+
+2004-05-29 18:46 jylefort
+
+ * configure.ac, src/Makefile.am, src/mail-notification.c,
+ src/mn-check.c, src/mn-conf.c, src/mn-dialog.c, src/mn-dialog.h,
+ src/mn-mailboxes.c, src/mn-pop3-mailbox.c, src/mn-settings.c,
+ src/mn-settings.h, src/mn-util.c, src/mn-util.h: --enable-debug
+ renamed to --enable-info; we now use GLib message logging
+
+2004-05-29 15:57 jylefort
+
+ * src/mn-preferences.c: Fixed two memory leaks
+
+2004-05-29 15:51 jylefort
+
+ * src/: mn-mailboxes.c, mn-preferences.c: Fixed a memory leak;
+ cleanups
+
+2004-05-28 14:58 jylefort
+
+ * src/mn-preferences.c, ui/add-mailbox.glade: Fixes
+
+2004-05-28 14:48 jylefort
+
+ * src/mn-preferences.c: Cleanups
+
+2004-05-28 14:43 jylefort
+
+ * src/mn-preferences.c, ui/add-mailbox.glade: Cleanups
+
+2004-05-28 14:35 jylefort
+
+ * src/mn-preferences.c, ui/add-mailbox.glade: HIG fixes
+
+2004-05-28 14:21 jylefort
+
+ * src/: eggtrayicon.c, mn-check.c, mn-dialog.c, mn-mail-icon.c,
+ mn-mailbox.c, mn-mailbox.h, mn-mailboxes.c, mn-maildir-mailbox.c,
+ mn-maildir-mailbox.h, mn-mbox-mailbox.c, mn-mbox-mailbox.h,
+ mn-mh-mailbox.c, mn-mh-mailbox.h, mn-pop3-mailbox.c,
+ mn-pop3-mailbox.h, mn-preferences.c, mn-sylpheed-mailbox.c,
+ mn-sylpheed-mailbox.h, mn-ui.h, mn-unsupported-mailbox.c,
+ mn-unsupported-mailbox.h, mn-util.c, mn-util.h: Now uses
+ glib/gi18n-lib.h instead of libgnome/gnome-i18n.h; cleanups
+
+2004-05-28 14:12 jylefort
+
+ * configure.ac, src/mn-preferences.c, src/mn-util.c, src/mn-util.h,
+ ui/Makefile.am, ui/add-mailbox.glade, ui/add-mailbox.gladep,
+ ui/add-pop3.glade, ui/add-pop3.gladep, ui/preferences.glade: The
+ add mailbox dialogs have been unified; GTK+ 2.4.0 is now required
+
+2004-05-27 20:06 jylefort
+
+ * src/: mn-check.c, mn-ui.c, mn-ui.h: GTK+ does not handle
+ correctly changing an item sensitivity while its parent menu is
+ popped up: do not set sensitivity of Update item anymore
+
+2004-05-27 20:02 jylefort
+
+ * src/mn-ui.c, ui/menu.glade: The "Check for Mail" menuitem has
+ been renamed to "Update"
+
+2004-05-27 19:56 jylefort
+
+ * src/mn-ui.c: Now uses the Unicode copyright sign
+
+2004-05-27 19:10 jylefort
+
+ * src/mn-check.h: Cleanup
+
+2004-05-27 18:08 jylefort
+
+ * src/: mn-preferences.c, mn-util.c, mn-util.h: Added
+ mn_file_chooser_dialog_allow_select_folder(), allowing to select
+ a folder when the chooser action is GTK_FILE_CHOOSER_ACTION_OPEN
+
+2004-05-27 16:24 jylefort
+
+ * src/mn-mbox-mailbox.c: A mbox mailbox is now defined as being a
+ regular file of size 0 or whose first line starts with "From "
+
+2004-05-27 16:23 jylefort
+
+ * src/: mn-check.c, mn-mailboxes.c: mn_error_dialog() does not
+ accept markup anymore
+
+2004-05-27 13:51 jylefort
+
+ * configure.ac, src/Makefile.am, src/mail-notification.c,
+ src/mn-check.c, src/mn-conf.c, src/mn-conf.h, src/mn-mailboxes.c,
+ src/mn-preferences.c, src/mn-ui.c: Cleanups: now uses libeel
+ instead of reinventing the wheel
+
+2004-05-27 01:44 jylefort
+
+ * src/mn-preferences.c, ui/preferences.glade: Added a mailbox popup
+ menu
+
+2004-05-27 01:22 jylefort
+
+ * src/: mn-check.c, mn-preferences.c, mn-ui.c: Fixed several
+ GConf-related memory leaks
+
+2004-05-27 01:18 jylefort
+
+ * src/: mail-notification.c, mn-check.c, mn-conf.c, mn-conf.h,
+ mn-mailboxes.c, mn-preferences.c, mn-ui.c: Cleanups
+
+2004-05-27 01:04 jylefort
+
+ * src/: mn-conf.c, mn-conf.h, mn-preferences.c: Cleanups
+
+2004-05-26 21:38 jylefort
+
+ * src/mn-dialog.c: Properly escapes text inside markup
+
+2004-05-26 21:25 jylefort
+
+ * src/mn-mailbox.c: Fix
+
+2004-05-26 20:53 jylefort
+
+ * configure.ac, src/mn-preferences.c: If GTK+ version 2.4.0 or
+ superior is available, uses GtkFileChooser
+
+2004-05-26 20:05 jylefort
+
+ * src/mn-conf.c: Improved error messages
+
+2004-05-26 20:02 jylefort
+
+ * Makefile.am, acinclude.m4, autogen.sh, autotools.conf, c,
+ configure.ac, m4/pkg.m4: Switched to Autoconf 2.59 and Automake
+ 1.8.3
+
2004-03-19 14:20 jylefort
* configure.ac: Version 0.3.4
diff --git a/INSTALL b/INSTALL
@@ -10,9 +10,9 @@ Index
0. About this document
- $Id: INSTALL,v 1.4 2003/10/02 16:07:38 jylefort Exp $
+ $Id: INSTALL,v 1.5 2004/06/29 15:02:04 jylefort Exp $
- Copyright (c) 2003 Jean-Yves Lefort.
+ Copyright (c) 2003, 2004 Jean-Yves Lefort.
This document is part of Mail Notification.
It may be distributed under the same terms as Mail Notification.
@@ -21,7 +21,7 @@ Index
Mail Notification requires the following libraries:
- * GTK+ (version 2.2.2 or superior)
+ * GTK+ (version 2.4.0 or superior)
http://www.gtk.org/
* GNOME (version 2.0 or superior)
diff --git a/Makefile.am b/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = art data m4 po src ui
+SUBDIRS = art data help m4 po src ui
-EXTRA_DIST = autogen.sh
+EXTRA_DIST = autogen.sh autotools.conf
diff --git a/Makefile.in b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.5 from Makefile.am.
+# Makefile.in generated by automake 1.8.4 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -21,7 +20,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -35,6 +33,44 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ TODO compile config.guess config.sub depcomp install-sh \
+ missing mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -65,16 +101,12 @@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_CFLAGS = @GLADE_CFLAGS@
-GLADE_LIBS = @GLADE_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNET_CFLAGS = @GNET_CFLAGS@
GNET_LIBS = @GNET_LIBS@
GNOME_CFLAGS = @GNOME_CFLAGS@
GNOME_LIBS = @GNOME_LIBS@
-GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
-GTHREAD_LIBS = @GTHREAD_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
G_ASSERTIONS = @G_ASSERTIONS@
@@ -143,6 +175,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
+mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -150,45 +183,44 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-SUBDIRS = art data m4 po src ui
-
-EXTRA_DIST = autogen.sh
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
- ps-recursive install-info-recursive uninstall-info-recursive \
- all-recursive install-data-recursive install-exec-recursive \
- installdirs-recursive install-recursive uninstall-recursive \
- check-recursive installcheck-recursive
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
- Makefile.in NEWS TODO acinclude.m4 aclocal.m4 compile \
- config.guess config.h.in config.sub configure configure.ac \
- depcomp install-sh missing mkinstalldirs
-DIST_SUBDIRS = $(SUBDIRS)
+SUBDIRS = art data help m4 po src ui
+EXTRA_DIST = autogen.sh autotools.conf
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
-
-$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@@ -200,10 +232,10 @@ config.h: stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
-
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
- touch $(srcdir)/config.h.in
+ rm -f stamp-h1
+ touch $@
distclean-hdr:
-rm -f config.h stamp-h1
@@ -268,14 +300,6 @@ ctags-recursive:
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@@ -284,15 +308,18 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
+tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- if (etags --etags-include --version) >/dev/null 2>&1; then \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
+ empty_fix=.; \
else \
include_option=--include; \
+ empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
@@ -306,10 +333,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -z "$$unique" && unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -332,24 +360,11 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = .
-distdir = $(PACKAGE)-$(VERSION)
-
-am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
-
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
- $(mkinstalldirs) $(distdir)/po
+ $(mkdir_p) $(distdir)/m4 $(distdir)/po
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
@@ -361,7 +376,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -378,13 +393,13 @@ distdir: $(DISTFILES)
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
+ test -d "$(distdir)/$$subdir" \
+ || mkdir "$(distdir)/$$subdir" \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" \
- distdir=../$(distdir)/$$subdir \
+ top_distdir="../$(top_distdir)" \
+ distdir="../$(distdir)/$$subdir" \
distdir) \
|| exit 1; \
fi; \
@@ -398,6 +413,23 @@ dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
+dist-bzip2: distdir
+ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
@@ -406,8 +438,18 @@ dist dist-all: distdir
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
- $(am__remove_distdir)
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
@@ -427,19 +469,20 @@ distcheck: dist
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
- (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
- && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
- @echo "$(distdir).tar.gz is ready for distribution" | \
- sed 'h;s/./=/g;p;x;p;x'
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -463,7 +506,6 @@ check: check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
-
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -475,7 +517,7 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -483,7 +525,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -494,12 +536,15 @@ clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
+html: html-recursive
+
info: info-recursive
info-am:
@@ -516,7 +561,8 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf autom4te.cache
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
@@ -535,22 +581,20 @@ uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
- clean-generic clean-recursive ctags ctags-recursive dist \
- dist-all dist-gzip distcheck distclean distclean-generic \
- distclean-hdr distclean-recursive distclean-tags distcleancheck \
- distdir distuninstallcheck dvi dvi-am dvi-recursive info \
- info-am info-recursive install install-am install-data \
- install-data-am install-data-recursive install-exec \
- install-exec-am install-exec-recursive install-info \
- install-info-am install-info-recursive install-man \
- install-recursive install-strip installcheck installcheck-am \
- installdirs installdirs-am installdirs-recursive \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
- ps-recursive tags tags-recursive uninstall uninstall-am \
- uninstall-info-am uninstall-info-recursive uninstall-recursive
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+ dist-tarZ dist-zip distcheck distclean distclean-generic \
+ distclean-hdr distclean-recursive distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/NEWS b/NEWS
@@ -1,3 +1,20 @@
+0.4.0 29 June 2004
+
+ * Fixed a vulnerability in the POP3 code (a malicious POP3
+ server could overflow the stack with an invalid STAT reply)
+ * Now uses automatic notification if available (requires FAM)
+ * Now uses GnomeVFS for all I/O operations
+ * Now supports drag and drop
+ * The user interface has been improved
+ * mbox detection is now stricter
+ * Now handles non-Unicode filenames
+ * Tries harder to hide POP3 passwords from the interface
+ * A few minor bugs have been fixed
+ * A few memory leaks have been fixed
+ * Some code cleanups have been performed
+ * Switched to Autoconf 2.59 and Automake 1.8.4
+ * Now requires GTK+ version 2.4.0 or superior
+
0.3.4 19 March 2004
* Some minor UI tweaks have been performed
diff --git a/README b/README
@@ -6,11 +6,12 @@ Index
0. About this document
1. About Mail Notification
- 2. Documentation map
+ 2. Release notes
+ 3. Documentation map
0. About this document
- $Id: README,v 1.12 2004/03/19 12:57:20 jylefort Exp $
+ $Id: README,v 1.13 2004/06/29 16:33:36 jylefort Exp $
Copyright (c) 2003, 2004 Jean-Yves Lefort.
@@ -19,43 +20,30 @@ Index
1. About Mail Notification
- Mail Notification is an icon for the GNOME Notification Area
- that informs users if they have new mail.
+ Mail Notification is a status icon (aka tray icon) that
+ informs you if you have new mail.
- In order to display the icon in the Notification Area, Mail
- Notification uses the EggTrayIcon backend, which adheres to
- the freedesktop's System Tray Specification
- (http://www.freedesktop.org/Standards/systemtray-spec). This
- might allow Mail Notification to function with other trays
- implementing that specification, such as the KDE System Tray
- or the XFce 4 system tray. However, Mail Notification has only
- been tested with the GNOME Notification Area.
+ It works with system trays implementing the freedesktop.org
+ System Tray Specification, such as the GNOME Panel
+ Notification Area, the Xfce Notification Area and the KDE
+ System Tray.
- Features:
+ Mail Notification features include:
- * multiple folder support
- * mbox, MH, Maildir and Sylpheed support
- * POP3 support (if the GNet library is available)
- * automatic folder format detection
- * responsive UI (multi-threaded application)
- * HIG-compliant user interface
- * themeable stock icons
+ - multiple mailbox support
+ - mbox, MH, Maildir, Sylpheed and POP3 support
+ - automatic detection of mailbox format
+ - automatic notification
+ - HIG compliance
- Usage:
+2. Release notes
- Right-click the mail icon to access the popup menu.
+ Some configuration keys have been obsoleted. For the sake of
+ cleanliness, you should remove them:
- The two GTK+ stock icons are named
- "mail-notification-no-mail" and
- "mail-notification-mail" (see
- http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html
- for details about how to customize them in your
- ~/.gtkrc-2.0).
+ $ gconftool-2 --recursive-unset /apps/mail-notification/local /apps/mail-notification/remote
- If the program does not work as expected, run it from
- a terminal and watch for possible error messages.
-
-2. Documentation map
+3. Documentation map
The following documents are included in the distribution:
diff --git a/TODO b/TODO
@@ -1,2 +1 @@
-- GNOME documentation
-- IMAP support
+- implement IMAP support
diff --git a/acinclude.m4 b/acinclude.m4
@@ -1,4 +1,4 @@
-# $Id: acinclude.m4,v 1.4 2003/10/06 10:01:41 jylefort Exp $
+# $Id: acinclude.m4,v 1.6 2004/06/03 19:15:30 jylefort Exp $
#
# Copyright (c) 2003 Jean-Yves Lefort.
#
@@ -7,7 +7,7 @@
dnl AC_ARG_G_ASSERTIONS
dnl
-AC_DEFUN(AC_ARG_G_ASSERTIONS,
+AC_DEFUN([AC_ARG_G_ASSERTIONS],
[AC_ARG_ENABLE(assertions,
AC_HELP_STRING([--disable-assertions],
[disable GLib assertions (not recommended)]),
@@ -27,7 +27,7 @@ AC_SUBST(G_ASSERTIONS)])
dnl AC_ARG_COMPILE_WARNINGS
dnl (only works with gcc)
dnl
-AC_DEFUN(AC_ARG_COMPILE_WARNINGS,
+AC_DEFUN([AC_ARG_COMPILE_WARNINGS],
[AC_ARG_ENABLE(compile-warnings,
AC_HELP_STRING([--enable-compile-warnings=no|yes|error],
[enable compiler warnings [[no]]]),
@@ -39,7 +39,7 @@ esac], [enable_compile_warnings=no])
if test $enable_compile_warnings = no; then
WARN_CFLAGS=
else
- WARN_CFLAGS="-Wall -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wnested-externs -Winline"
+ WARN_CFLAGS="-Wall -Wcast-align -Wredundant-decls -Wnested-externs -Winline"
test $enable_compile_warnings = error && WARN_CFLAGS="$WARN_CFLAGS -Werror"
fi
diff --git a/aclocal.m4 b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.7.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.8.4 -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11,319 +11,819 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# $Id: acinclude.m4,v 1.4 2003/10/06 10:01:41 jylefort Exp $
-#
-# Copyright (c) 2003 Jean-Yves Lefort.
-#
-# This file is part of Mail Notification.
-# It may be distributed under the same terms as Mail Notification.
-
-dnl AC_ARG_G_ASSERTIONS
-dnl
-AC_DEFUN(AC_ARG_G_ASSERTIONS,
-[AC_ARG_ENABLE(assertions,
-AC_HELP_STRING([--disable-assertions],
-[disable GLib assertions (not recommended)]),
-[case "$enableval" in
- yes|no) enable_assertions=$enableval ;;
- *) AC_MSG_ERROR([bad value $enableval for --enable-assertions]) ;;
-esac], [enable_assertions=yes])
-
-if test $enable_assertions = no; then
- G_ASSERTIONS="-DG_DISABLE_ASSERT"
-else
- G_ASSERTIONS=""
-fi
-
-AC_SUBST(G_ASSERTIONS)])
-
-dnl AC_ARG_COMPILE_WARNINGS
-dnl (only works with gcc)
+dnl AM_GCONF_SOURCE_2
+dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
+dnl (i.e. pass to gconftool-2
+dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
+dnl you should install foo.schemas files
dnl
-AC_DEFUN(AC_ARG_COMPILE_WARNINGS,
-[AC_ARG_ENABLE(compile-warnings,
-AC_HELP_STRING([--enable-compile-warnings=no|yes|error],
-[enable compiler warnings [[no]]]),
-[case "$enableval" in
- yes|no|error) enable_compile_warnings=$enableval ;;
- *) AC_MSG_ERROR([bad value $enableval for --enable-compile-warnings]) ;;
-esac], [enable_compile_warnings=no])
-
-if test $enable_compile_warnings = no; then
- WARN_CFLAGS=
-else
- WARN_CFLAGS="-Wall -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wnested-externs -Winline"
- test $enable_compile_warnings = error && WARN_CFLAGS="$WARN_CFLAGS -Werror"
-fi
-
-AC_SUBST(WARN_CFLAGS)])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# This macro actually does too much some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 10
-AC_PREREQ([2.54])
+AC_DEFUN([AM_GCONF_SOURCE_2],
+[
+ if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
+ GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+ else
+ GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
+ fi
-# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
-# the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+ AC_ARG_WITH(gconf-source,
+ [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
+ AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
+ AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
+ if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
+ GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas/'
else
- CYGPATH_W=echo
+ GCONF_SCHEMA_FILE_DIR=$GCONF_SCHEMA_FILE_DIR
fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+ AC_ARG_WITH(gconf-schema-file-dir,
+ [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+ AC_SUBST(GCONF_SCHEMA_FILE_DIR)
+ AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
+ AC_ARG_ENABLE(schemas-install,
+ [ --disable-schemas-install Disable the schemas installation],
+ [case "${enableval}" in
+ yes) schemas_install=true ;;
+ no) schemas_install=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;;
+ esac],[schemas_install=true])
+ AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
])
+# Configure paths for GTK+
+# Owen Taylor 1997-2001
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $1 | $1:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
+dnl pass to pkg-config
+dnl
+AC_DEFUN([AM_PATH_GTK_2_0],
+[dnl
+dnl Get the cflags and libraries from pkg-config
+dnl
+AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
+ , enable_gtktest=yes)
-# Copyright 2002 Free Software Foundation, Inc.
+ pkg_config_args=gtk+-2.0
+ for module in . $4
+ do
+ case "$module" in
+ gthread)
+ pkg_config_args="$pkg_config_args gthread-2.0"
+ ;;
+ esac
+ done
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+ no_gtk=""
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ if test x$PKG_CONFIG != xno ; then
+ if pkg-config --atleast-pkgconfig-version 0.7 ; then
+ :
+ else
+ echo "*** pkg-config too old; version 0.7 or better required."
+ no_gtk=yes
+ PKG_CONFIG=no
+ fi
+ else
+ no_gtk=yes
+ fi
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+ min_gtk_version=ifelse([$1], ,2.0.0,$1)
+ AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.7.5])])
+ if test x$PKG_CONFIG != xno ; then
+ ## don't try to run the test against uninstalled libtool libs
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
+ echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
+ enable_gtktest=no
+ fi
-# Helper functions for option handling. -*- Autoconf -*-
+ if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
+ :
+ else
+ no_gtk=yes
+ fi
+ fi
-# Copyright 2001, 2002 Free Software Foundation, Inc.
+ if test x"$no_gtk" = x ; then
+ GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
+ GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
+ gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_gtktest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$GTK_LIBS $LIBS"
+dnl
+dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
+dnl checks the results of pkg-config to some extent)
+dnl
+ rm -f conf.gtktest
+ AC_TRY_RUN([
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <stdlib.h>
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+ system ("touch conf.gtktest");
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_gtk_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_gtk_version");
+ exit(1);
+ }
-# serial 2
+ if ((gtk_major_version != $gtk_config_major_version) ||
+ (gtk_minor_version != $gtk_config_minor_version) ||
+ (gtk_micro_version != $gtk_config_micro_version))
+ {
+ printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
+ $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+ printf("*** to point to the correct configuration files\n");
+ }
+ else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
+ (gtk_minor_version != GTK_MINOR_VERSION) ||
+ (gtk_micro_version != GTK_MICRO_VERSION))
+ {
+ printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
+ GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ }
+ else
+ {
+ if ((gtk_major_version > major) ||
+ ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
+ ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_gtk" = x ; then
+ AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** A new enough version of pkg-config was not found."
+ echo "*** See http://pkgconfig.sourceforge.net"
+ else
+ if test -f conf.gtktest ; then
+ :
+ else
+ echo "*** Could not run GTK+ test program, checking why..."
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ AC_TRY_LINK([
+#include <gtk/gtk.h>
+#include <stdio.h>
+], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
+ echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GTK_CFLAGS=""
+ GTK_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
+ rm -f conf.gtktest
+])
+
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
+#
+# Modified to never use included libintl.
+# Owen Taylor <otaylor@redhat.com>, 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor <otaylor@redhat.com>, 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+
+#
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
+
+dnl
+dnl We go to great lengths to make sure that aclocal won't
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
+
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+ [AC_CHECK_HEADERS([locale.h])
+ if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+ fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+ dnl NLS is obligatory
+ [USE_NLS=yes
+ AC_SUBST(USE_NLS)
+
+ gt_cv_have_gettext=no
+
+ CATOBJEXT=NONE
+ XGETTEXT=:
+ INTLLIBS=
+
+ AC_CHECK_HEADER(libintl.h,
+ [gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
+
+ #
+ # First check in libc
+ #
+ AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+ [AC_TRY_LINK([
+#include <libintl.h>
+],
+ [return (int) dgettext ("","")],
+ gt_cv_func_dgettext_libc=yes,
+ gt_cv_func_dgettext_libc=no)
+ ])
+
+ if test "$gt_cv_func_dgettext_libc" = "yes" ; then
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ fi
+
+ #
+ # If we don't have everything we want, check in libintl
+ #
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CHECK_LIB(intl, dgettext,
+ gt_cv_func_dgettext_libintl=yes)])
+
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+ AC_MSG_CHECKING([if -liconv is needed to use gettext])
+ AC_MSG_RESULT([])
+ AC_CHECK_LIB(intl, dcgettext,
+ [gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv],
+ :,-liconv)
+ fi
+
+ #
+ # If we found libintl, then check in it for bind_textdomain_codeset();
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
+ # and both have dgettext
+ #
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS -lintl $libintl_extra_libs"
+ unset ac_cv_func_bind_textdomain_codeset
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ LIBS="$glib_save_LIBS"
+
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+ gt_cv_func_dgettext_libc=no
+ else
+ if test "$gt_cv_func_dgettext_libc" = "yes"; then
+ gt_cv_func_dgettext_libintl=no
+ fi
+ fi
+ fi
+ fi
+
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ gt_cv_have_gettext=yes
+ fi
+
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ INTLLIBS="-lintl $libintl_extra_libs"
+ fi
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT,1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS $INTLLIBS"
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [case $host in
+ *-*-solaris*)
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
+ dnl GNU format message catalog is always supported,
+ dnl since both are added to the libc all together.
+ dnl Hence, we'd like to go with DATADIRNAME=share and
+ dnl and CATOBJEXT=.gmo in this case.
+ AC_CHECK_FUNC(bind_textdomain_codeset,
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+ ;;
+ esac])
+ LIBS="$glib_save_LIBS"
+ INSTOBJEXT=.mo
+ else
+ gt_cv_have_gettext=no
+ fi
+ fi
+ ])
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+ if test "$gt_cv_have_gettext" = "yes" ; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [always defined to indicate that i18n is enabled])
+ fi
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is not GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+ # We need to process the po/ directory.
+ POSUB=po
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
-#
-# Check to make sure that the build environment is sane.
-#
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
-# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(PO_IN_DATADIR_TRUE)
+ AC_SUBST(PO_IN_DATADIR_FALSE)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+
+ GLIB_LC_MESSAGES
+ GLIB_WITH_NLS
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+ if test "$gt_cv_have_gettext" = "yes"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
-# serial 3
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftest.file`
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+if test "x$CATOBJEXT" = "x.mo" ; then
+ localedir=`eval echo "${libdir}/locale"`
+else
+ localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+ [Define the location where the catalogs will be installed])
+])
+
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_in,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
+# Configure paths for Gnet
+# A hacked up version of Owen Taylor's glib-2.0.m4 (Copyright 1997-2001)
+
+dnl AM_PATH_GNET_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GNET, and define GNET_CFLAGS and GNET_LIBS, if gmodule, gobject or
+dnl gthread is specified in MODULES, pass to pkg-config
+dnl
+AC_DEFUN([AM_PATH_GNET_2_0],
+[dnl
+dnl Get the cflags and libraries from pkg-config
+dnl
+AC_ARG_ENABLE(gnettest, [ --disable-gnettest do not try to compile and run a test GNET program],
+ , enable_gnettest=yes)
+
+ pkg_config_args=gnet-2.0
+
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+ no_gnet=""
+
+ if test x$PKG_CONFIG != xno ; then
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
+ :
+ else
+ echo *** pkg-config too old; version 0.7 or better required.
+ no_gnet=yes
+ PKG_CONFIG=no
+ fi
+ else
+ no_gnet=yes
+ fi
+
+ min_gnet_version=ifelse([$1], , 2.0.0, $1)
+ AC_MSG_CHECKING(for GNET - version >= $min_gnet_version)
+
+ if test x$PKG_CONFIG != xno ; then
+ ## don't try to run the test against uninstalled libtool libs
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
+ echo "Will use uninstalled version of GNet found in PKG_CONFIG_PATH"
+ enable_gnettest=no
+ fi
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
+ if $PKG_CONFIG --atleast-version $min_gnet_version $pkg_config_args; then
+ :
+ else
+ no_gnet=yes
+ fi
+ fi
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
+ if test x"$no_gnet" = x ; then
+ GNET_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
+ GNET_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
+ gnet_config_major_version=`$PKG_CONFIG --modversion gnet-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ gnet_config_minor_version=`$PKG_CONFIG --modversion gnet-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ gnet_config_micro_version=`$PKG_CONFIG --modversion gnet-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_gnettest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GNET_CFLAGS"
+ LIBS="$GNET_LIBS $LIBS"
+dnl
+dnl Now check if the installed GNET is sufficiently new. (Also sanity
+dnl checks the results of pkg-config to some extent)
+dnl
+ rm -f conf.gnettest
+ AC_TRY_RUN([
+#include <gnet.h>
+#include <stdio.h>
+#include <stdlib.h>
-# -*- Autoconf -*-
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.gnettest");
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_gnet_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_gnet_version");
+ exit(1);
+ }
+
+ if ((gnet_major_version != $gnet_config_major_version) ||
+ (gnet_minor_version != $gnet_config_minor_version) ||
+ (gnet_micro_version != $gnet_config_micro_version))
+ {
+ printf("\n*** 'pkg-config --modversion gnet-2.0' returned %d.%d.%d, but GNET (%d.%d.%d)\n",
+ $gnet_config_major_version, $gnet_config_minor_version, $gnet_config_micro_version,
+ gnet_major_version, gnet_minor_version, gnet_micro_version);
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GNet. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+ printf("*** to point to the correct configuration files\n");
+ }
+ else if ((gnet_major_version != GNET_MAJOR_VERSION) ||
+ (gnet_minor_version != GNET_MINOR_VERSION) ||
+ (gnet_micro_version != GNET_MICRO_VERSION))
+ {
+ printf("*** GNET header files (version %d.%d.%d) do not match\n",
+ GNET_MAJOR_VERSION, GNET_MINOR_VERSION, GNET_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ gnet_major_version, gnet_minor_version, gnet_micro_version);
+ }
+ else
+ {
+ if ((gnet_major_version > major) ||
+ ((gnet_major_version == major) && (gnet_minor_version > minor)) ||
+ ((gnet_major_version == major) && (gnet_minor_version == minor) && (gnet_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GNET (%d.%d.%d) was found.\n",
+ gnet_major_version, gnet_minor_version, gnet_micro_version);
+ printf("*** You need a version of GNET newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GNET is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GNET, but you can also set the PKG_CONFIG environment to point to the\n");
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+],, no_gnet=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_gnet" = x ; then
+ AC_MSG_RESULT(yes (version $gnet_config_major_version.$gnet_config_minor_version.$gnet_config_micro_version))
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** A new enough version of pkg-config was not found."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig/"
+ else
+ if test -f conf.gnettest ; then
+ :
+ else
+ echo "*** Could not run GNET test program, checking why..."
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GNET_CFLAGS"
+ LIBS="$LIBS $GNET_LIBS"
+ AC_TRY_LINK([
+#include <gnet.h>
+#include <stdio.h>
+], [ return ((gnet_major_version) || (gnet_minor_version) || (gnet_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GNET or finding the wrong"
+ echo "*** version of GNET. If it is not finding GNET, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GNET is incorrectly installed."])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GNET_CFLAGS=""
+ GNET_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GNET_CFLAGS)
+ AC_SUBST(GNET_LIBS)
+ rm -f conf.gnettest
+])
-# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+# -*- Autoconf -*-
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Generated from amversion.in; do not edit by hand.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -338,37 +838,23 @@ AC_MSG_RESULT(yes)])
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 3
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.8.4])])
# AM_AUX_DIR_EXPAND
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -406,98 +892,33 @@ fi
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-# Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])
-
-AC_DEFUN([AM_AUX_DIR_EXPAND], [
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-
-# Copyright 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# AM_PROG_INSTALL_STRIP
-
-# Copyright 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
+# AM_CONDITIONAL -*- Autoconf -*-
-# -*- Autoconf -*-
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -514,24 +935,34 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 1
+# serial 6
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
else
- am__leading_dot=_
+ $1_TRUE='#'
+ $1_FALSE=
fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
-# serial 5 -*- Autoconf -*-
+# serial 7 -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -592,18 +1023,34 @@ AC_CACHE_CHECK([dependency style of $depcc],
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -621,16 +1068,22 @@ AC_CACHE_CHECK([dependency style of $depcc],
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
@@ -652,223 +1105,31 @@ AM_CONDITIONAL([am__fastdep$1], [
# AM_SET_DEPDIR
# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking Speeds up one-time builds
- --enable-dependency-tracking Do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-#serial 2
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
- DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
- test -z "$DEPDIR" && continue
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n -e '/^U = / s///p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # We invoke sed twice because it is the simplest approach to
- # changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n -e '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 2
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# serial 5
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
-AC_PREREQ(2.52)
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
-fi])])
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
+# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -885,28 +1146,74 @@ fi])])
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 2
+#serial 2
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
-# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -923,873 +1230,555 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-AC_PREREQ([2.52])
-
-# serial 6
+# serial 7
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-# Copyright (C) 1995-2002 Free Software Foundation, Inc.
-# Copyright (C) 2001-2003 Red Hat, Inc.
-#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
-#
-# This file can be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-#
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
-#
-# Modified to never use included libintl.
-# Owen Taylor <otaylor@redhat.com>, 12/15/1998
-#
-# Major rework to remove unused code
-# Owen Taylor <otaylor@redhat.com>, 12/11/2002
-#
-# Added better handling of ALL_LINGUAS from GNU gettext version
-# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
-
-#
-# We need this here as well, since someone might use autoconf-2.5x
-# to configure GLib then an older version to configure a package
-# using AM_GLIB_GNU_GETTEXT
-AC_PREREQ(2.53)
-
-dnl
-dnl We go to great lengths to make sure that aclocal won't
-dnl try to pull in the installed version of these macros
-dnl when running aclocal in the glib directory.
-dnl
-m4_copy([AC_DEFUN],[glib_DEFUN])
-m4_copy([AC_REQUIRE],[glib_REQUIRE])
-dnl
-dnl At the end, if we're not within glib, we'll define the public
-dnl definitions in terms of our private definitions.
-dnl
-
-# GLIB_LC_MESSAGES
-#--------------------
-glib_DEFUN([GLIB_LC_MESSAGES],
- [AC_CHECK_HEADERS([locale.h])
- if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your <locale.h> file defines LC_MESSAGES.])
- fi
- fi])
-
-# GLIB_PATH_PROG_WITH_TEST
-#----------------------------
-dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# GLIB_WITH_NLS
-#-----------------
-glib_DEFUN([GLIB_WITH_NLS],
- dnl NLS is obligatory
- [USE_NLS=yes
- AC_SUBST(USE_NLS)
-
- gt_cv_have_gettext=no
+# Do all the work for Automake. -*- Autoconf -*-
- CATOBJEXT=NONE
- XGETTEXT=:
- INTLLIBS=
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
- AC_CHECK_HEADER(libintl.h,
- [gt_cv_func_dgettext_libintl="no"
- libintl_extra_libs=""
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
- #
- # First check in libc
- #
- AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
- [AC_TRY_LINK([
-#include <libintl.h>
-],
- [return (int) dgettext ("","")],
- gt_cv_func_dgettext_libc=yes,
- gt_cv_func_dgettext_libc=no)
- ])
-
- if test "$gt_cv_func_dgettext_libc" = "yes" ; then
- AC_CHECK_FUNCS(bind_textdomain_codeset)
- fi
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
- #
- # If we don't have everything we want, check in libintl
- #
- if test "$gt_cv_func_dgettext_libc" != "yes" \
- || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
-
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CHECK_LIB(intl, dgettext,
- gt_cv_func_dgettext_libintl=yes)])
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
- if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
- AC_MSG_CHECKING([if -liconv is needed to use gettext])
- AC_MSG_RESULT([])
- AC_CHECK_LIB(intl, dcgettext,
- [gt_cv_func_dgettext_libintl=yes
- libintl_extra_libs=-liconv],
- :,-liconv)
- fi
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
- #
- # If we found libintl, then check in it for bind_textdomain_codeset();
- # we'll prefer libc if neither have bind_textdomain_codeset(),
- # and both have dgettext
- #
- if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
- glib_save_LIBS="$LIBS"
- LIBS="$LIBS -lintl $libintl_extra_libs"
- unset ac_cv_func_bind_textdomain_codeset
- AC_CHECK_FUNCS(bind_textdomain_codeset)
- LIBS="$glib_save_LIBS"
+# serial 11
- if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
- gt_cv_func_dgettext_libc=no
- else
- if test "$gt_cv_func_dgettext_libc" = "yes"; then
- gt_cv_func_dgettext_libintl=no
- fi
- fi
- fi
- fi
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
- if test "$gt_cv_func_dgettext_libc" = "yes" \
- || test "$gt_cv_func_dgettext_libintl" = "yes"; then
- gt_cv_have_gettext=yes
- fi
-
- if test "$gt_cv_func_dgettext_libintl" = "yes"; then
- INTLLIBS="-lintl $libintl_extra_libs"
- fi
-
- if test "$gt_cv_have_gettext" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT,1,
- [Define if the GNU gettext() function is already present or preinstalled.])
- GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- glib_save_LIBS="$LIBS"
- LIBS="$LIBS $INTLLIBS"
- AC_CHECK_FUNCS(dcgettext)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [case $host in
- *-*-solaris*)
- dnl On Solaris, if bind_textdomain_codeset is in libc,
- dnl GNU format message catalog is always supported,
- dnl since both are added to the libc all together.
- dnl Hence, we'd like to go with DATADIRNAME=share and
- dnl and CATOBJEXT=.gmo in this case.
- AC_CHECK_FUNC(bind_textdomain_codeset,
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- ;;
- *)
- CATOBJEXT=.mo
- DATADIRNAME=lib
- ;;
- esac])
- LIBS="$glib_save_LIBS"
- INSTOBJEXT=.mo
- else
- gt_cv_have_gettext=no
- fi
- fi
- ])
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
- if test "$gt_cv_have_gettext" = "yes" ; then
- AC_DEFINE(ENABLE_NLS, 1,
- [always defined to indicate that i18n is enabled])
- fi
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is not GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext program is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
- # We need to process the po/ directory.
- POSUB=po
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
- AC_OUTPUT_COMMANDS(
- [case "$CONFIG_FILES" in *po/Makefile.in*)
- sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
- esac])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
- dnl Make all variables we use known to autoconf.
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLLIBS)
- AC_SUBST(PO_IN_DATADIR_TRUE)
- AC_SUBST(PO_IN_DATADIR_FALSE)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
-# AM_GLIB_GNU_GETTEXT
-# -------------------
-# Do checks necessary for use of gettext. If a suitable implementation
-# of gettext is found in either in libintl or in the C library,
-# it will set INTLLIBS to the libraries needed for use of gettext
-# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
-# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
-# on various variables needed by the Makefile.in.in installed by
-# glib-gettextize.
-dnl
-glib_DEFUN(GLIB_GNU_GETTEXT,
- [AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
-
- GLIB_LC_MESSAGES
- GLIB_WITH_NLS
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
- if test "$gt_cv_have_gettext" = "yes"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- NEW_LINGUAS="$NEW_LINGUAS $presentlang"
- fi
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
- dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
- dnl Try to locate is.
- MKINSTALLDIRS=
- if test -n "$ac_aux_dir"; then
- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
- fi
- if test -z "$MKINSTALLDIRS"; then
- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
- fi
- AC_SUBST(MKINSTALLDIRS)
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile.
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- ])
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
-# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
-# -------------------------------
-# Define VARIABLE to the location where catalog files will
-# be installed by po/Makefile.
-glib_DEFUN(GLIB_DEFINE_LOCALEDIR,
-[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
-glib_save_prefix="$prefix"
-glib_save_exec_prefix="$exec_prefix"
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix=$prefix
-if test "x$CATOBJEXT" = "x.mo" ; then
- localedir=`eval echo "${libdir}/locale"`
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
else
- localedir=`eval echo "${datadir}/locale"`
+ am__leading_dot=_
fi
-prefix="$glib_save_prefix"
-exec_prefix="$glib_save_exec_prefix"
-AC_DEFINE_UNQUOTED($1, "$localedir",
- [Define the location where the catalogs will be installed])
-])
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
-dnl
-dnl Now the definitions that aclocal will find
-dnl
-ifdef(glib_configure_in,[],[
-AC_DEFUN(AM_GLIB_GNU_GETTEXT,[GLIB_GNU_GETTEXT($@)])
-AC_DEFUN(AM_GLIB_DEFINE_LOCALEDIR,[GLIB_DEFINE_LOCALEDIR($@)])
-])dnl
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
-# $Id: pkg.m4,v 1.4 2003/12/24 14:19:46 jylefort Exp $
-#
-# This file is part of Mail Notification.
-#
-# Copyright (c) 2002-2003 Jean-Yves Lefort.
-#
-# As a special exception to the Mail Notification licensing terms,
-# Jean-Yves Lefort gives unlimited permission to copy, distribute and
-# modify this file.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
-dnl AM_PATH_PKG(VARIABLE_PREFIX, MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-dnl
-AC_DEFUN(AM_PATH_PKG,
-[found=no
-$1_CFLAGS=""
-$1_LIBS=""
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
-if test -z "$PKG_CONFIG"; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-fi
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
-if test "x$PKG_CONFIG" = "xno" ; then
- AC_MSG_WARN([the pkg-config script could not be found: make sure it is in your path, or set the PKG_CONFIG environment variable to the full path to pkg-config])
-else
- PKG_CONFIG_MIN_VERSION=0.9.0
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- AC_MSG_CHECKING([for $2])
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
- if $PKG_CONFIG --exists "$2"; then
- found=yes
+# Check to see how 'make' treats includes. -*- Autoconf -*-
- $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
- $1_LIBS=`$PKG_CONFIG --libs "$2"`
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
- else
- AC_MSG_WARN([your version of pkg-config is too old, you need version $PKG_CONFIG_MIN_VERSION or newer])
- fi
-fi
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
-if test $found = no; then
- ifelse([$4],, :, [$4])
-else
- ifelse([$3],, :, [$3])
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)])
+# -*- Autoconf -*-
-# Configure paths for GTK+
-# Owen Taylor 1997-2001
-dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
-dnl pass to pkg-config
-dnl
-AC_DEFUN(AM_PATH_GTK_2_0,
-[dnl
-dnl Get the cflags and libraries from pkg-config
-dnl
-AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
- , enable_gtktest=yes)
+# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
- pkg_config_args=gtk+-2.0
- for module in . $4
- do
- case "$module" in
- gthread)
- pkg_config_args="$pkg_config_args gthread-2.0"
- ;;
- esac
- done
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
- no_gtk=""
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
- if test x$PKG_CONFIG != xno ; then
- if pkg-config --atleast-pkgconfig-version 0.7 ; then
- :
- else
- echo *** pkg-config too old; version 0.7 or better required.
- no_gtk=yes
- PKG_CONFIG=no
- fi
- else
- no_gtk=yes
- fi
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
- min_gtk_version=ifelse([$1], ,2.0.0,$1)
- AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
- if test x$PKG_CONFIG != xno ; then
- ## don't try to run the test against uninstalled libtool libs
- if $PKG_CONFIG --uninstalled $pkg_config_args; then
- echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
- enable_gtktest=no
- fi
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
- if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
- :
- else
- no_gtk=yes
- fi
- fi
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
- if test x"$no_gtk" = x ; then
- GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
- GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
- gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_gtktest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- LIBS="$GTK_LIBS $LIBS"
-dnl
-dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
-dnl checks the results of pkg-config to some extent)
-dnl
- rm -f conf.gtktest
- AC_TRY_RUN([
-#include <gtk/gtk.h>
-#include <stdio.h>
-#include <stdlib.h>
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-int
-main ()
-{
- int major, minor, micro;
- char *tmp_version;
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
- system ("touch conf.gtktest");
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = g_strdup("$min_gtk_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
- printf("%s, bad version string\n", "$min_gtk_version");
- exit(1);
- }
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
- if ((gtk_major_version != $gtk_config_major_version) ||
- (gtk_minor_version != $gtk_config_minor_version) ||
- (gtk_micro_version != $gtk_config_micro_version))
- {
- printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
- $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- printf ("*** was found! If pkg-config was correct, then it is best\n");
- printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
- printf("*** to point to the correct configuration files\n");
- }
- else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
- (gtk_minor_version != GTK_MINOR_VERSION) ||
- (gtk_micro_version != GTK_MICRO_VERSION))
- {
- printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
- GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- }
- else
- {
- if ((gtk_major_version > major) ||
- ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
- ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
- printf("*** correct copy of pkg-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_gtk" = x ; then
- AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
- ifelse([$2], , :, [$2])
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # Keeping the `.' argument allows $(mkdir_p) to be used without
+ # argument. Indeed, we sometimes output rules like
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined.
+ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+ # expensive solution, as it forces Make to start a sub-shell.)
+ mkdir_p='mkdir -p -- .'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
else
- AC_MSG_RESULT(no)
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** A new enough version of pkg-config was not found."
- echo "*** See http://pkgconfig.sourceforge.net"
- else
- if test -f conf.gtktest ; then
- :
- else
- echo "*** Could not run GTK+ test program, checking why..."
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- LIBS="$LIBS $GTK_LIBS"
- AC_TRY_LINK([
-#include <gtk/gtk.h>
-#include <stdio.h>
-], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
- echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- GTK_CFLAGS=""
- GTK_LIBS=""
- ifelse([$3], , :, [$3])
+ mkdir_p='$(install_sh) -d'
fi
- AC_SUBST(GTK_CFLAGS)
- AC_SUBST(GTK_LIBS)
- rm -f conf.gtktest
-])
+fi
+AC_SUBST([mkdir_p])])
-dnl AM_GCONF_SOURCE_2
-dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
-dnl (i.e. pass to gconftool-2
-dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
-dnl you should install foo.schemas files
-dnl
+# Helper functions for option handling. -*- Autoconf -*-
-AC_DEFUN(AM_GCONF_SOURCE_2,
-[
- if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
- GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
- else
- GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
- fi
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
- AC_ARG_WITH(gconf-source,
- [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
- AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
- AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
- if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
- GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas/'
- else
- GCONF_SCHEMA_FILE_DIR=$GCONF_SCHEMA_FILE_DIR
- fi
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
- AC_ARG_WITH(gconf-schema-file-dir,
- [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
+# serial 2
- AC_SUBST(GCONF_SCHEMA_FILE_DIR)
- AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
- AC_ARG_ENABLE(schemas-install,
- [ --disable-schemas-install Disable the schemas installation],
- [case "${enableval}" in
- yes) schemas_install=true ;;
- no) schemas_install=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;;
- esac],[schemas_install=true])
- AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
-])
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-# Configure paths for Gnet
-# A hacked up version of Owen Taylor's glib-2.0.m4 (Copyright 1997-2001)
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
-dnl AM_PATH_GNET_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for GNET, and define GNET_CFLAGS and GNET_LIBS, if gmodule, gobject or
-dnl gthread is specified in MODULES, pass to pkg-config
-dnl
-AC_DEFUN(AM_PATH_GNET_2_0,
-[dnl
-dnl Get the cflags and libraries from pkg-config
-dnl
-AC_ARG_ENABLE(gnettest, [ --disable-gnettest do not try to compile and run a test GNET program],
- , enable_gnettest=yes)
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
- pkg_config_args=gnet-2.0
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
- no_gnet=""
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
- if test x$PKG_CONFIG != xno ; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
- :
- else
- echo *** pkg-config too old; version 0.7 or better required.
- no_gnet=yes
- PKG_CONFIG=no
- fi
- else
- no_gnet=yes
- fi
+# serial 3
- min_gnet_version=ifelse([$1], , 2.0.0, $1)
- AC_MSG_CHECKING(for GNET - version >= $min_gnet_version)
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
- if test x$PKG_CONFIG != xno ; then
- ## don't try to run the test against uninstalled libtool libs
- if $PKG_CONFIG --uninstalled $pkg_config_args; then
- echo "Will use uninstalled version of GNet found in PKG_CONFIG_PATH"
- enable_gnettest=no
- fi
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
- if $PKG_CONFIG --atleast-version $min_gnet_version $pkg_config_args; then
- :
- else
- no_gnet=yes
- fi
- fi
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
- if test x"$no_gnet" = x ; then
- GNET_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
- GNET_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
- gnet_config_major_version=`$PKG_CONFIG --modversion gnet-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- gnet_config_minor_version=`$PKG_CONFIG --modversion gnet-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- gnet_config_micro_version=`$PKG_CONFIG --modversion gnet-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_gnettest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GNET_CFLAGS"
- LIBS="$GNET_LIBS $LIBS"
-dnl
-dnl Now check if the installed GNET is sufficiently new. (Also sanity
-dnl checks the results of pkg-config to some extent)
-dnl
- rm -f conf.gnettest
- AC_TRY_RUN([
-#include <gnet.h>
-#include <stdio.h>
-#include <stdlib.h>
+# AM_PROG_INSTALL_STRIP
-int
-main ()
-{
- int major, minor, micro;
- char *tmp_version;
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
- system ("touch conf.gnettest");
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = g_strdup("$min_gnet_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
- printf("%s, bad version string\n", "$min_gnet_version");
- exit(1);
- }
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
- if ((gnet_major_version != $gnet_config_major_version) ||
- (gnet_minor_version != $gnet_config_minor_version) ||
- (gnet_micro_version != $gnet_config_micro_version))
- {
- printf("\n*** 'pkg-config --modversion gnet-2.0' returned %d.%d.%d, but GNET (%d.%d.%d)\n",
- $gnet_config_major_version, $gnet_config_minor_version, $gnet_config_micro_version,
- gnet_major_version, gnet_minor_version, gnet_micro_version);
- printf ("*** was found! If pkg-config was correct, then it is best\n");
- printf ("*** to remove the old version of GNet. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
- printf("*** to point to the correct configuration files\n");
- }
- else if ((gnet_major_version != GNET_MAJOR_VERSION) ||
- (gnet_minor_version != GNET_MINOR_VERSION) ||
- (gnet_micro_version != GNET_MICRO_VERSION))
- {
- printf("*** GNET header files (version %d.%d.%d) do not match\n",
- GNET_MAJOR_VERSION, GNET_MINOR_VERSION, GNET_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- gnet_major_version, gnet_minor_version, gnet_micro_version);
- }
- else
- {
- if ((gnet_major_version > major) ||
- ((gnet_major_version == major) && (gnet_minor_version > minor)) ||
- ((gnet_major_version == major) && (gnet_minor_version == minor) && (gnet_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of GNET (%d.%d.%d) was found.\n",
- gnet_major_version, gnet_minor_version, gnet_micro_version);
- printf("*** You need a version of GNET newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** GNET is always available from ftp://ftp.gtk.org.\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of GNET, but you can also set the PKG_CONFIG environment to point to the\n");
- printf("*** correct copy of pkg-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-],, no_gnet=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_gnet" = x ; then
- AC_MSG_RESULT(yes (version $gnet_config_major_version.$gnet_config_minor_version.$gnet_config_micro_version))
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** A new enough version of pkg-config was not found."
- echo "*** See http://www.freedesktop.org/software/pkgconfig/"
- else
- if test -f conf.gnettest ; then
- :
- else
- echo "*** Could not run GNET test program, checking why..."
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GNET_CFLAGS"
- LIBS="$LIBS $GNET_LIBS"
- AC_TRY_LINK([
-#include <gnet.h>
-#include <stdio.h>
-], [ return ((gnet_major_version) || (gnet_minor_version) || (gnet_micro_version)); ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding GNET or finding the wrong"
- echo "*** version of GNET. If it is not finding GNET, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means GNET is incorrectly installed."])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- GNET_CFLAGS=""
- GNET_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(GNET_CFLAGS)
- AC_SUBST(GNET_LIBS)
- rm -f conf.gnettest
-])
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+m4_include([m4/pkg.m4])
+m4_include([acinclude.m4])
diff --git a/art/Makefile.am b/art/Makefile.am
@@ -2,9 +2,12 @@ GNOME_IMAGES = mail-notification.png
APP_IMAGES = \
about-icon.png \
logo.png \
+ mail-error.png \
mail.png \
+ no-mail-error.png \
no-mail.png \
- preferences-icon.png
+ preferences-icon.png \
+ unsupported.png
gnome_pixmapsdir = $(datadir)/pixmaps
dist_gnome_pixmaps_DATA = $(GNOME_IMAGES)
diff --git a/art/Makefile.in b/art/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.5 from Makefile.am.
+# Makefile.in generated by automake 1.8.4 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -35,6 +34,24 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+subdir = art
+DIST_COMMON = $(dist_app_pixmaps_DATA) $(dist_gnome_pixmaps_DATA) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__installdirs = "$(DESTDIR)$(app_pixmapsdir)" "$(DESTDIR)$(gnome_pixmapsdir)"
+dist_app_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+dist_gnome_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_app_pixmaps_DATA) $(dist_gnome_pixmaps_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -65,16 +82,12 @@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_CFLAGS = @GLADE_CFLAGS@
-GLADE_LIBS = @GLADE_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNET_CFLAGS = @GNET_CFLAGS@
GNET_LIBS = @GNET_LIBS@
GNOME_CFLAGS = @GNOME_CFLAGS@
GNOME_LIBS = @GNOME_LIBS@
-GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
-GTHREAD_LIBS = @GTHREAD_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
G_ASSERTIONS = @G_ASSERTIONS@
@@ -143,6 +156,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
+mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -154,70 +168,83 @@ GNOME_IMAGES = mail-notification.png
APP_IMAGES = \
about-icon.png \
logo.png \
+ mail-error.png \
mail.png \
+ no-mail-error.png \
no-mail.png \
- preferences-icon.png
-
+ preferences-icon.png \
+ unsupported.png
gnome_pixmapsdir = $(datadir)/pixmaps
dist_gnome_pixmaps_DATA = $(GNOME_IMAGES)
-
app_pixmapsdir = $(pkgdatadir)/ui
dist_app_pixmaps_DATA = $(APP_IMAGES)
-subdir = art
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DATA = $(dist_app_pixmaps_DATA) $(dist_gnome_pixmaps_DATA)
-
-DIST_COMMON = $(dist_app_pixmaps_DATA) $(dist_gnome_pixmaps_DATA) \
- Makefile.am Makefile.in
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign art/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign art/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
uninstall-info-am:
-dist_app_pixmapsDATA_INSTALL = $(INSTALL_DATA)
install-dist_app_pixmapsDATA: $(dist_app_pixmaps_DATA)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(app_pixmapsdir)
+ test -z "$(app_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(app_pixmapsdir)"
@list='$(dist_app_pixmaps_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " $(dist_app_pixmapsDATA_INSTALL) $$d$$p $(DESTDIR)$(app_pixmapsdir)/$$f"; \
- $(dist_app_pixmapsDATA_INSTALL) $$d$$p $(DESTDIR)$(app_pixmapsdir)/$$f; \
+ echo " $(dist_app_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(app_pixmapsdir)/$$f'"; \
+ $(dist_app_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(app_pixmapsdir)/$$f"; \
done
uninstall-dist_app_pixmapsDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_app_pixmaps_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(app_pixmapsdir)/$$f"; \
- rm -f $(DESTDIR)$(app_pixmapsdir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(app_pixmapsdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(app_pixmapsdir)/$$f"; \
done
-dist_gnome_pixmapsDATA_INSTALL = $(INSTALL_DATA)
install-dist_gnome_pixmapsDATA: $(dist_gnome_pixmaps_DATA)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(gnome_pixmapsdir)
+ test -z "$(gnome_pixmapsdir)" || $(mkdir_p) "$(DESTDIR)$(gnome_pixmapsdir)"
@list='$(dist_gnome_pixmaps_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " $(dist_gnome_pixmapsDATA_INSTALL) $$d$$p $(DESTDIR)$(gnome_pixmapsdir)/$$f"; \
- $(dist_gnome_pixmapsDATA_INSTALL) $$d$$p $(DESTDIR)$(gnome_pixmapsdir)/$$f; \
+ echo " $(dist_gnome_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gnome_pixmapsdir)/$$f'"; \
+ $(dist_gnome_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gnome_pixmapsdir)/$$f"; \
done
uninstall-dist_gnome_pixmapsDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_gnome_pixmaps_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(gnome_pixmapsdir)/$$f"; \
- rm -f $(DESTDIR)$(gnome_pixmapsdir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(gnome_pixmapsdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(gnome_pixmapsdir)/$$f"; \
done
tags: TAGS
TAGS:
@@ -225,10 +252,6 @@ TAGS:
ctags: CTAGS
CTAGS:
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -242,7 +265,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -260,9 +283,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
-
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(app_pixmapsdir) $(DESTDIR)$(gnome_pixmapsdir)
+ for dir in "$(DESTDIR)$(app_pixmapsdir)" "$(DESTDIR)$(gnome_pixmapsdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -274,7 +298,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -282,7 +306,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -292,13 +316,15 @@ clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-
+ -rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
+html: html-am
+
info: info-am
info-am:
@@ -315,7 +341,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
@@ -334,8 +360,8 @@ uninstall-am: uninstall-dist_app_pixmapsDATA \
uninstall-dist_gnome_pixmapsDATA uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am info info-am install \
- install-am install-data install-data-am \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
install-dist_app_pixmapsDATA install-dist_gnome_pixmapsDATA \
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
diff --git a/art/mail-error.png b/art/mail-error.png
Binary files differ.
diff --git a/art/no-mail-error.png b/art/no-mail-error.png
Binary files differ.
diff --git a/art/unsupported.png b/art/unsupported.png
Binary files differ.
diff --git a/autogen.sh b/autogen.sh
@@ -1,23 +1,12 @@
#!/bin/sh
-#
-# This script is adapted to my own system. You might need to tweak it
-# a bit if you want to run it at your local site.
-#
-# Required software:
-#
-# GNU Autoconf 2.57
-# GNU Automake 1.7
-
-export ACLOCAL="aclocal17 -I m4"
-export AUTOHEADER="autoheader257"
-export AUTOCONF="autoconf257"
-export AUTOMAKE="automake17"
run() {
echo "Running $1..."
$1 || exit
}
+. autotools.conf
+
run "$ACLOCAL"
run "$AUTOHEADER"
run "$AUTOCONF"
diff --git a/autotools.conf b/autotools.conf
@@ -0,0 +1,6 @@
+export LIBTOOLIZE="libtoolize15 --automake"
+export ACLOCAL="aclocal18 -I m4"
+export AUTOHEADER="autoheader259"
+export AUTOM4TE="autom4te259"
+export AUTOCONF="autoconf259"
+export AUTOMAKE="automake18"
diff --git a/config.h.in b/config.h.in
@@ -6,6 +6,9 @@
/* gettext package name */
#undef GETTEXT_PACKAGE
+/* log domain */
+#undef G_LOG_DOMAIN
+
/* Define to 1 if you have the `atoi' function. */
#undef HAVE_ATOI
@@ -36,18 +39,12 @@
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
-/* Define to 1 if you have the `memcpy' function. */
-#undef HAVE_MEMCPY
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `sscanf' function. */
#undef HAVE_SSCANF
-/* Define to 1 if you have the `stat' function. */
-#undef HAVE_STAT
-
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
@@ -66,9 +63,6 @@
/* Define to 1 if you have the `strcmp' function. */
#undef HAVE_STRCMP
-/* Define to 1 if you have the `strcpy' function. */
-#undef HAVE_STRCPY
-
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -81,12 +75,6 @@
/* Define to 1 if you have the `strncmp' function. */
#undef HAVE_STRNCMP
-/* Define to 1 if you have the `strrchr' function. */
-#undef HAVE_STRRCHR
-
-/* Define to 1 if you have the `strstr' function. */
-#undef HAVE_STRSTR
-
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
diff --git a/configure b/configure
@@ -1,11 +1,10 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57 for mail-notification 0.3.4.
+# Generated by GNU Autoconf 2.59 for mail-notification 0.4.0.
#
# Report bugs to <jylefort@brutele.be>.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -22,9 +21,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -43,7 +43,7 @@ for as_var in \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -220,16 +220,17 @@ rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
+ test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -268,11 +269,11 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='mail-notification'
PACKAGE_TARNAME='mail-notification'
-PACKAGE_VERSION='0.3.4'
-PACKAGE_STRING='mail-notification 0.3.4'
+PACKAGE_VERSION='0.4.0'
+PACKAGE_STRING='mail-notification 0.4.0'
PACKAGE_BUGREPORT='jylefort@brutele.be'
-ac_unique_file="src/mail-notification.c"
+ac_unique_file="src/mn-main.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -310,7 +311,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS G_ASSERTIONS WARN_CFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GETTEXT_PACKAGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS PKG_CONFIG GTHREAD_CFLAGS GTHREAD_LIBS GTK_CFLAGS GTK_LIBS GNOME_CFLAGS GNOME_LIBS GLADE_CFLAGS GLADE_LIBS GCONF_SCHEMA_CONFIG_SOURCE GCONF_SCHEMA_FILE_DIR GCONF_SCHEMAS_INSTALL_TRUE GCONF_SCHEMAS_INSTALL_FALSE GCONFTOOL GNET_CFLAGS GNET_LIBS WITH_MBOX_TRUE WITH_MBOX_FALSE WITH_MH_TRUE WITH_MH_FALSE WITH_MAILDIR_TRUE WITH_MAILDIR_FALSE WITH_POP3_TRUE WITH_POP3_FALSE WITH_SYLPHEED_TRUE WITH_SYLPHEED_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS G_ASSERTIONS WARN_CFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GETTEXT_PACKAGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS PKG_CONFIG GTK_CFLAGS GTK_LIBS GNOME_CFLAGS GNOME_LIBS GCONF_SCHEMA_CONFIG_SOURCE GCONF_SCHEMA_FILE_DIR GCONF_SCHEMAS_INSTALL_TRUE GCONF_SCHEMAS_INSTALL_FALSE GCONFTOOL GNET_CFLAGS GNET_LIBS WITH_MBOX_TRUE WITH_MBOX_FALSE WITH_MH_TRUE WITH_MH_FALSE WITH_MAILDIR_TRUE WITH_MAILDIR_FALSE WITH_POP3_TRUE WITH_POP3_FALSE WITH_SYLPHEED_TRUE WITH_SYLPHEED_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -669,7 +670,7 @@ done
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+ localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
@@ -709,10 +710,10 @@ if test -z "$srcdir"; then
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -779,7 +780,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures mail-notification 0.3.4 to adapt to many kinds of systems.
+\`configure' configures mail-notification 0.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -804,9 +805,9 @@ _ACEOF
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -841,7 +842,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mail-notification 0.3.4:";;
+ short | recursive ) echo "Configuration of mail-notification 0.4.0:";;
esac
cat <<\_ACEOF
@@ -856,10 +857,10 @@ Optional Features:
--disable-assertions disable GLib assertions (not recommended)
--enable-compile-warnings=no|yes|error
enable compiler warnings [no]
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
- --disable-dependency-tracking Speeds up one-time builds
- --enable-dependency-tracking Do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
--disable-largefile omit support for large files
--disable-gtktest do not try to compile and run a test GTK+ program
--disable-schemas-install Disable the schemas installation
@@ -917,12 +918,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
@@ -933,7 +967,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
+ test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
@@ -946,11 +980,10 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-mail-notification configure 0.3.4
-generated by GNU Autoconf 2.57
+mail-notification configure 0.4.0
+generated by GNU Autoconf 2.59
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -961,8 +994,8 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mail-notification $as_me 0.3.4, which was
-generated by GNU Autoconf 2.57. Invocation command line was
+It was created by mail-notification $as_me 0.4.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1039,19 +1072,19 @@ do
2)
ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
+ ac_must_keep_next=false # Got value, back to normal.
else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
fi
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
# Get rid of the leading space.
@@ -1085,12 +1118,12 @@ _ASBOX
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
@@ -1119,7 +1152,7 @@ _ASBOX
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
@@ -1138,7 +1171,7 @@ _ASBOX
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core core.* *.core &&
+ rm -f core *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
@@ -1218,7 +1251,7 @@ fi
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val="\$ac_cv_env_${ac_var}_value"
@@ -1235,13 +1268,13 @@ echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
@@ -1404,7 +1437,7 @@ fi;
if test $enable_compile_warnings = no; then
WARN_CFLAGS=
else
- WARN_CFLAGS="-Wall -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wnested-externs -Winline"
+ WARN_CFLAGS="-Wall -Wcast-align -Wredundant-decls -Wnested-externs -Winline"
test $enable_compile_warnings = error && WARN_CFLAGS="$WARN_CFLAGS -Werror"
fi
@@ -1412,7 +1445,7 @@ fi
### initialization
-am__api_version="1.7"
+am__api_version="1.8"
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -1449,6 +1482,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
@@ -1465,6 +1499,7 @@ do
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
@@ -1472,20 +1507,20 @@ case $as_dir/ in
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
done
done
;;
@@ -1573,7 +1608,6 @@ _ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed
-
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1587,6 +1621,31 @@ else
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # Keeping the `.' argument allows $(mkdir_p) to be used without
+ # argument. Indeed, we sometimes output rules like
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined.
+ # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
+ # expensive solution, as it forces Make to start a sub-shell.)
+ mkdir_p='mkdir -p -- .'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -1629,7 +1688,7 @@ done
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1665,7 +1724,7 @@ else
fi
rmdir .tst 2>/dev/null
- # test to see if srcdir already configured
+# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
@@ -1685,7 +1744,7 @@ fi
# Define the identity of the package.
PACKAGE='mail-notification'
- VERSION='0.3.4'
+ VERSION='0.4.0'
cat >>confdefs.h <<_ACEOF
@@ -2250,7 +2309,6 @@ ac_compiler=`set X $ac_compile; echo $2`
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2270,8 +2328,8 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output" >&5
-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
@@ -2291,23 +2349,23 @@ do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
+ ;;
conftest.$ac_ext )
- # This is the source file.
- ;;
+ # This is the source file.
+ ;;
[ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
* )
- break;;
+ break;;
esac
done
else
@@ -2381,8 +2439,8 @@ for ac_file in conftest.exe conftest conftest.*; do
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
+ export ac_cv_exeext
+ break;;
* ) break;;
esac
done
@@ -2407,7 +2465,6 @@ if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2458,7 +2515,6 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2478,11 +2534,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2495,7 +2561,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
@@ -2511,7 +2577,6 @@ if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2528,11 +2593,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2545,7 +2620,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
@@ -2572,7 +2647,6 @@ else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2600,6 +2674,16 @@ static char *f (char * (*g) (char **, int), char **p, ...)
va_end (v);
return s;
}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2626,11 +2710,21 @@ do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2643,7 +2737,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext
+rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
@@ -2671,19 +2765,28 @@ cat >conftest.$ac_ext <<_ACEOF
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
- ''\
- '#include <stdlib.h>' \
+ '' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
@@ -2691,14 +2794,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdlib.h>
$ac_declaration
+#include <stdlib.h>
int
main ()
{
@@ -2709,11 +2811,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2726,9 +2838,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2745,11 +2856,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2761,7 +2882,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
@@ -2775,7 +2896,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2800,18 +2921,34 @@ else
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -2829,16 +2966,22 @@ else
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
@@ -2898,7 +3041,6 @@ do
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2909,7 +3051,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2921,6 +3063,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2941,7 +3084,6 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2959,6 +3101,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -3005,7 +3148,6 @@ do
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3016,7 +3158,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -3028,6 +3170,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -3048,7 +3191,6 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3066,6 +3208,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -3126,7 +3269,6 @@ if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3147,11 +3289,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3164,12 +3316,11 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3191,7 +3342,6 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3216,7 +3366,6 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3228,9 +3377,9 @@ cat >>conftest.$ac_ext <<_ACEOF
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
@@ -3241,7 +3390,7 @@ main ()
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
+ || toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
@@ -3266,7 +3415,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -3291,7 +3440,7 @@ fi
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+ inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -3300,7 +3449,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3312,11 +3460,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3329,7 +3487,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -3361,7 +3519,6 @@ else
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3372,11 +3529,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3389,7 +3556,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -3397,7 +3564,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3415,6 +3581,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -3434,33 +3601,32 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- no:yes )
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ---------------------------------- ##
+## Report this to jylefort@brutele.be ##
+## ---------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -3471,7 +3637,7 @@ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- eval "$as_ac_Header=$ac_header_preproc"
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -3493,7 +3659,6 @@ if test "${am_cv_val_LC_MESSAGES+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3510,11 +3675,21 @@ return LC_MESSAGES
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3527,7 +3702,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
am_cv_val_LC_MESSAGES=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
@@ -3561,7 +3737,6 @@ else
echo "$as_me:$LINENO: checking libintl.h usability" >&5
echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3572,11 +3747,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3589,7 +3774,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -3597,7 +3782,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking libintl.h presence" >&5
echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3615,6 +3799,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -3634,33 +3819,32 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- no:yes )
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ---------------------------------- ##
+## Report this to jylefort@brutele.be ##
+## ---------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -3690,7 +3874,6 @@ if test "${gt_cv_func_dgettext_libc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3709,11 +3892,21 @@ return (int) dgettext ("","")
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3726,7 +3919,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
gt_cv_func_dgettext_libc=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
@@ -3743,21 +3937,28 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -3788,11 +3989,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3805,7 +4016,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
@@ -3833,7 +4045,6 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3857,11 +4068,21 @@ bindtextdomain ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3874,7 +4095,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_bindtextdomain=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
@@ -3888,7 +4110,6 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3912,11 +4133,21 @@ dgettext ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3929,7 +4160,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_dgettext=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
@@ -3954,7 +4186,6 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl -liconv $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3978,11 +4209,21 @@ dcgettext ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3995,7 +4236,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_intl_dcgettext=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
@@ -4028,21 +4270,28 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4073,11 +4322,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4090,7 +4349,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
@@ -4177,21 +4437,28 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4222,11 +4489,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4239,7 +4516,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
@@ -4328,7 +4606,6 @@ echo "${ECHO_T}no" >&6
fi
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4346,11 +4623,21 @@ extern int _nl_msg_cat_cntr;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4370,21 +4657,28 @@ if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char bind_textdomain_codeset (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef bind_textdomain_codeset
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4415,11 +4709,21 @@ return f != bind_textdomain_codeset;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4432,7 +4736,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_bind_textdomain_codeset=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6
@@ -4451,7 +4756,8 @@ fi
;;
esac
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS="$glib_save_LIBS"
INSTOBJEXT=.mo
else
@@ -4909,7 +5215,6 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4929,11 +5234,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4946,7 +5261,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
@@ -4962,7 +5277,6 @@ if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4979,11 +5293,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4996,7 +5320,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
@@ -5023,7 +5347,6 @@ else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5051,6 +5374,16 @@ static char *f (char * (*g) (char **, int), char **p, ...)
va_end (v);
return s;
}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -5077,11 +5410,21 @@ do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5094,7 +5437,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext
+rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
@@ -5122,19 +5465,28 @@ cat >conftest.$ac_ext <<_ACEOF
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
- ''\
- '#include <stdlib.h>' \
+ '' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
@@ -5142,14 +5494,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdlib.h>
$ac_declaration
+#include <stdlib.h>
int
main ()
{
@@ -5160,11 +5511,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5177,9 +5538,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5196,11 +5556,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5212,7 +5582,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
@@ -5226,7 +5596,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5251,18 +5621,34 @@ else
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
- echo '#include "conftest.h"' > conftest.c
- echo 'int i;' > conftest.h
- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@@ -5280,16 +5666,22 @@ else
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
- source=conftest.c object=conftest.o \
- depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
- grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
- # (even with -Werror). So we grep stderr for any message
- # that says an option was ignored.
- if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
@@ -5338,8 +5730,7 @@ else
while :; do
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5364,11 +5755,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5380,15 +5781,25 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext
+rm -f conftest.err conftest.$ac_objext
CC="$CC -n32"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5400,8 +5811,8 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext
- break
+rm -f conftest.err conftest.$ac_objext
+ break
done
CC=$ac_save_CC
rm -f conftest.$ac_ext
@@ -5421,7 +5832,6 @@ else
while :; do
ac_cv_sys_file_offset_bits=no
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5446,11 +5856,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5462,9 +5882,8 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5490,11 +5909,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5506,7 +5935,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
break
done
fi
@@ -5528,7 +5957,6 @@ else
while :; do
ac_cv_sys_large_files=no
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5553,11 +5981,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5569,9 +6007,8 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5597,11 +6034,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5613,7 +6060,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
break
done
fi
@@ -5635,9 +6082,7 @@ fi
-
-
-for ac_header in errno.h stdarg.h stdio.h stdlib.h string.h sys/stat.h sys/types.h
+for ac_header in errno.h stdarg.h stdio.h stdlib.h string.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -5653,7 +6098,6 @@ else
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5664,11 +6108,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5681,7 +6135,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -5689,7 +6143,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5707,6 +6160,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -5726,33 +6180,32 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- no:yes )
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ---------------------------------- ##
+## Report this to jylefort@brutele.be ##
+## ---------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -5763,7 +6216,7 @@ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- eval "$as_ac_Header=$ac_header_preproc"
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -5789,12 +6242,7 @@ done
-
-
-
-
-
-for ac_func in atoi exit memcpy sscanf stat strchr strcmp strcpy strlen strncmp strrchr strstr
+for ac_func in atoi exit sscanf strchr strcmp strlen strncmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -5803,21 +6251,28 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -5848,11 +6303,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5865,7 +6330,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
@@ -5884,94 +6350,6 @@ done
### build dependencies
-found=no
-GTHREAD_CFLAGS=""
-GTHREAD_LIBS=""
-
-if test -z "$PKG_CONFIG"; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-
-if test -n "$PKG_CONFIG"; then
- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-
-if test "x$PKG_CONFIG" = "xno" ; then
- { echo "$as_me:$LINENO: WARNING: the pkg-config script could not be found: make sure it is in your path, or set the PKG_CONFIG environment variable to the full path to pkg-config" >&5
-echo "$as_me: WARNING: the pkg-config script could not be found: make sure it is in your path, or set the PKG_CONFIG environment variable to the full path to pkg-config" >&2;}
-else
- PKG_CONFIG_MIN_VERSION=0.9.0
-
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- echo "$as_me:$LINENO: checking for gthread-2.0" >&5
-echo $ECHO_N "checking for gthread-2.0... $ECHO_C" >&6
-
- if $PKG_CONFIG --exists "gthread-2.0"; then
- found=yes
-
- GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0"`
- GTHREAD_LIBS=`$PKG_CONFIG --libs "gthread-2.0"`
-
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- fi
- else
- { echo "$as_me:$LINENO: WARNING: your version of pkg-config is too old, you need version $PKG_CONFIG_MIN_VERSION or newer" >&5
-echo "$as_me: WARNING: your version of pkg-config is too old, you need version $PKG_CONFIG_MIN_VERSION or newer" >&2;}
- fi
-fi
-
-if test $found = no; then
- { { echo "$as_me:$LINENO: error: unable to find the GThread library" >&5
-echo "$as_me: error: unable to find the GThread library" >&2;}
- { (exit 1); exit 1; }; }
-else
- :
-fi
-
-
-
-
-
-
# Check whether --enable-gtktest or --disable-gtktest was given.
if test "${enable_gtktest+set}" = set; then
enableval="$enable_gtktest"
@@ -6037,7 +6415,7 @@ fi
if pkg-config --atleast-pkgconfig-version 0.7 ; then
:
else
- echo *** pkg-config too old; version 0.7 or better required.
+ echo "*** pkg-config too old; version 0.7 or better required."
no_gtk=yes
PKG_CONFIG=no
fi
@@ -6045,7 +6423,7 @@ fi
no_gtk=yes
fi
- min_gtk_version=2.2.2
+ min_gtk_version=2.4.0
echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5
echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6
@@ -6082,7 +6460,6 @@ echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6181,7 +6558,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
no_gtk=yes
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
@@ -6207,7 +6584,6 @@ echo "${ECHO_T}no" >&6
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6227,11 +6603,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6253,7 +6639,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
@@ -6323,14 +6710,14 @@ else
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- echo "$as_me:$LINENO: checking for libgnomeui-2.0" >&5
-echo $ECHO_N "checking for libgnomeui-2.0... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0" >&5
+echo $ECHO_N "checking for libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0... $ECHO_C" >&6
- if $PKG_CONFIG --exists "libgnomeui-2.0"; then
+ if $PKG_CONFIG --exists "libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0"; then
found=yes
- GNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0"`
- GNOME_LIBS=`$PKG_CONFIG --libs "libgnomeui-2.0"`
+ GNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0"`
+ GNOME_LIBS=`$PKG_CONFIG --libs "libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0"`
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
@@ -6357,94 +6744,6 @@ fi
-found=no
-GLADE_CFLAGS=""
-GLADE_LIBS=""
-
-if test -z "$PKG_CONFIG"; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-
-if test -n "$PKG_CONFIG"; then
- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-
-if test "x$PKG_CONFIG" = "xno" ; then
- { echo "$as_me:$LINENO: WARNING: the pkg-config script could not be found: make sure it is in your path, or set the PKG_CONFIG environment variable to the full path to pkg-config" >&5
-echo "$as_me: WARNING: the pkg-config script could not be found: make sure it is in your path, or set the PKG_CONFIG environment variable to the full path to pkg-config" >&2;}
-else
- PKG_CONFIG_MIN_VERSION=0.9.0
-
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- echo "$as_me:$LINENO: checking for libglade-2.0" >&5
-echo $ECHO_N "checking for libglade-2.0... $ECHO_C" >&6
-
- if $PKG_CONFIG --exists "libglade-2.0"; then
- found=yes
-
- GLADE_CFLAGS=`$PKG_CONFIG --cflags "libglade-2.0"`
- GLADE_LIBS=`$PKG_CONFIG --libs "libglade-2.0"`
-
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- fi
- else
- { echo "$as_me:$LINENO: WARNING: your version of pkg-config is too old, you need version $PKG_CONFIG_MIN_VERSION or newer" >&5
-echo "$as_me: WARNING: your version of pkg-config is too old, you need version $PKG_CONFIG_MIN_VERSION or newer" >&2;}
- fi
-fi
-
-if test $found = no; then
- { { echo "$as_me:$LINENO: error: unable to find the libglade library" >&5
-echo "$as_me: error: unable to find the libglade library" >&2;}
- { (exit 1); exit 1; }; }
-else
- :
-fi
-
-
-
-
-
-
if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
@@ -6653,7 +6952,6 @@ echo $ECHO_N "checking for GNET - version >= $min_gnet_version... $ECHO_C" >&6
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6752,7 +7050,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
no_gnet=yes
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
@@ -6782,7 +7080,6 @@ echo "${ECHO_T}no" >&6
CFLAGS="$CFLAGS $GNET_CFLAGS"
LIBS="$LIBS $GNET_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6802,11 +7099,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6828,7 +7135,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GNET is incorrectly installed."
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
@@ -6899,6 +7207,12 @@ fi
### config.h definitions
+
+cat >>confdefs.h <<\_ACEOF
+#define G_LOG_DOMAIN "mail-notification"
+_ACEOF
+
+
if test $enable_mbox = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -6937,7 +7251,7 @@ fi
### output
- ac_config_files="$ac_config_files Makefile art/Makefile data/Makefile m4/Makefile po/Makefile.in src/Makefile ui/Makefile"
+ ac_config_files="$ac_config_files Makefile art/Makefile data/Makefile help/Makefile help/C/Makefile m4/Makefile po/Makefile.in src/Makefile ui/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -6967,13 +7281,13 @@ _ACEOF
# `set' does not quote correctly, so add quotes (double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
} |
@@ -7003,13 +7317,13 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
+s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
-s/^[^=]*=[ ]*$//;
+s/^[^=]*=[ ]*$//;
}'
fi
@@ -7020,7 +7334,7 @@ ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
# 2. Add them.
ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
@@ -7134,9 +7448,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -7155,7 +7470,7 @@ for as_var in \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -7334,16 +7649,17 @@ rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
+ test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -7369,8 +7685,8 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by mail-notification $as_me 0.3.4, which was
-generated by GNU Autoconf 2.57. Invocation command line was
+This file was extended by mail-notification $as_me 0.4.0, which was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -7414,9 +7730,9 @@ Usage: $0 [OPTIONS] [FILE]...
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -7432,12 +7748,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-mail-notification config.status 0.3.4
-configured by $0, generated by GNU Autoconf 2.57,
+mail-notification config.status 0.4.0
+configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
@@ -7547,6 +7862,8 @@ do
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"art/Makefile" ) CONFIG_FILES="$CONFIG_FILES art/Makefile" ;;
"data/Makefile" ) CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
+ "help/Makefile" ) CONFIG_FILES="$CONFIG_FILES help/Makefile" ;;
+ "help/C/Makefile" ) CONFIG_FILES="$CONFIG_FILES help/C/Makefile" ;;
"m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
"po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
@@ -7657,6 +7974,7 @@ s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@am__leading_dot@,$am__leading_dot,;t t
@@ -7698,14 +8016,10 @@ s,@POFILES@,$POFILES,;t t
s,@POSUB@,$POSUB,;t t
s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
-s,@GTHREAD_CFLAGS@,$GTHREAD_CFLAGS,;t t
-s,@GTHREAD_LIBS@,$GTHREAD_LIBS,;t t
s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
s,@GTK_LIBS@,$GTK_LIBS,;t t
s,@GNOME_CFLAGS@,$GNOME_CFLAGS,;t t
s,@GNOME_LIBS@,$GNOME_LIBS,;t t
-s,@GLADE_CFLAGS@,$GLADE_CFLAGS,;t t
-s,@GLADE_LIBS@,$GLADE_LIBS,;t t
s,@GCONF_SCHEMA_CONFIG_SOURCE@,$GCONF_SCHEMA_CONFIG_SOURCE,;t t
s,@GCONF_SCHEMA_FILE_DIR@,$GCONF_SCHEMA_FILE_DIR,;t t
s,@GCONF_SCHEMAS_INSTALL_TRUE@,$GCONF_SCHEMAS_INSTALL_TRUE,;t t
@@ -7754,9 +8068,9 @@ _ACEOF
(echo ':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
fi
ac_sed_frag=`expr $ac_sed_frag + 1`
ac_beg=$ac_end
@@ -7774,21 +8088,21 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -7804,10 +8118,10 @@ echo X"$ac_file" |
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -7845,12 +8159,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
case $INSTALL in
@@ -7872,7 +8219,7 @@ echo "$as_me: creating $ac_file" >&6;}
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
+ sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
@@ -7881,24 +8228,24 @@ echo "$as_me: creating $ac_file" >&6;}
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- echo $f;;
+ echo "$f";;
*) # Relative
- if test -f "$f"; then
- # Build tree
- echo $f
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo $srcdir/$f
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- fi;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
_ACEOF
@@ -7940,12 +8287,12 @@ cat >>$CONFIG_STATUS <<\_ACEOF
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
@@ -7954,11 +8301,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
@@ -7972,28 +8319,29 @@ echo "$as_me: creating $ac_file" >&6;}
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- echo $f;;
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
*) # Relative
- if test -f "$f"; then
- # Build tree
- echo $f
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo $srcdir/$f
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- fi;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
_ACEOF
@@ -8016,9 +8364,9 @@ s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
_ACEOF
# If some macros were called several times there might be several times
@@ -8032,13 +8380,13 @@ rm -f confdef2sed.sed
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
_ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
@@ -8047,7 +8395,7 @@ do
# Write a limited-size here document to $tmp/defines.sed.
echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -8074,7 +8422,7 @@ do
# Write a limited-size here document to $tmp/undefs.sed.
echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -8108,10 +8456,10 @@ echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -8127,10 +8475,10 @@ echo X"$ac_file" |
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -8162,10 +8510,10 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X$ac_file |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -8184,16 +8532,41 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_dest" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
ac_builddir=.
if test "$ac_dir" != .; then
@@ -8219,12 +8592,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
{ echo "$as_me:$LINENO: executing $ac_dest commands" >&5
@@ -8242,10 +8648,10 @@ echo "$as_me: executing $ac_dest commands" >&6;}
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`(dirname "$mf") 2>/dev/null ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -8258,14 +8664,14 @@ echo X"$mf" |
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
- DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
# When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n -e '/^U = / s///p' < "$mf"`
+ U=`sed -n 's/^U = //p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
# We invoke sed twice because it is the simplest approach to
# changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n -e '
+ for file in `sed -n '
/^DEP_FILES = .*\\\\$/ {
s/^DEP_FILES = //
:loop
@@ -8281,10 +8687,10 @@ echo X"$mf" |
test -f "$dirpart/$file" && continue
fdir=`(dirname "$file") 2>/dev/null ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -8300,10 +8706,10 @@ echo X"$file" |
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
diff --git a/configure.ac b/configure.ac
@@ -1,7 +1,7 @@
-AC_INIT(mail-notification, 0.3.4, jylefort@brutele.be)
-AC_CONFIG_SRCDIR(src/mail-notification.c)
+AC_INIT(mail-notification, 0.4.0, jylefort@brutele.be)
+AC_CONFIG_SRCDIR(src/mn-main.c)
-AC_PREREQ(2.57)
+AC_PREREQ(2.59)
### command line arguments
@@ -63,25 +63,17 @@ AM_GLIB_GNU_GETTEXT
AC_PROG_CC
AC_SYS_LARGEFILE
-AC_CHECK_HEADERS(errno.h stdarg.h stdio.h stdlib.h string.h sys/stat.h sys/types.h,, [AC_MSG_ERROR([header not found])])
-AC_CHECK_FUNCS(atoi exit memcpy sscanf stat strchr strcmp strcpy strlen strncmp strrchr strstr,, [AC_MSG_ERROR([library function not found])])
+AC_CHECK_HEADERS(errno.h stdarg.h stdio.h stdlib.h string.h,, [AC_MSG_ERROR([header not found])])
+AC_CHECK_FUNCS(atoi exit sscanf strchr strcmp strlen strncmp,, [AC_MSG_ERROR([library function not found])])
### build dependencies
-AM_PATH_PKG(GTHREAD, gthread-2.0,, [AC_MSG_ERROR([unable to find the GThread library])])
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
+AM_PATH_GTK_2_0(2.4.0,, [AC_MSG_ERROR([unable to find the GTK+ library])])
-AM_PATH_GTK_2_0(2.2.2,, [AC_MSG_ERROR([unable to find the GTK+ library])])
-
-AM_PATH_PKG(GNOME, libgnomeui-2.0,, [AC_MSG_ERROR([unable to find the GNOME libraries])])
+AM_PATH_PKG(GNOME, [libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0],, [AC_MSG_ERROR([unable to find the GNOME libraries])])
AC_SUBST(GNOME_CFLAGS)
AC_SUBST(GNOME_LIBS)
-AM_PATH_PKG(GLADE, libglade-2.0,, [AC_MSG_ERROR([unable to find the libglade library])])
-AC_SUBST(GLADE_CFLAGS)
-AC_SUBST(GLADE_LIBS)
-
AM_GCONF_SOURCE_2
AC_PATH_PROG(GCONFTOOL, gconftool-2)
@@ -105,6 +97,8 @@ AM_CONDITIONAL(WITH_SYLPHEED, [test $enable_sylpheed != no])
### config.h definitions
+AC_DEFINE(G_LOG_DOMAIN, ["AC_PACKAGE_NAME"], [log domain])
+
if test $enable_mbox = yes; then
AC_DEFINE(WITH_MBOX, 1, [Define to 1 if mbox support is enabled])
fi
@@ -126,6 +120,8 @@ fi
AC_CONFIG_FILES(Makefile
art/Makefile
data/Makefile
+ help/Makefile
+ help/C/Makefile
m4/Makefile
po/Makefile.in
src/Makefile
diff --git a/data/Makefile.in b/data/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.5 from Makefile.am.
+# Makefile.in generated by automake 1.8.4 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -35,6 +34,24 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+subdir = data
+DIST_COMMON = $(dist_applications_DATA) $(dist_schemas_DATA) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__installdirs = "$(DESTDIR)$(applicationsdir)" "$(DESTDIR)$(schemasdir)"
+dist_applicationsDATA_INSTALL = $(INSTALL_DATA)
+dist_schemasDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_applications_DATA) $(dist_schemas_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -65,16 +82,12 @@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_CFLAGS = @GLADE_CFLAGS@
-GLADE_LIBS = @GLADE_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNET_CFLAGS = @GNET_CFLAGS@
GNET_LIBS = @GNET_LIBS@
GNOME_CFLAGS = @GNOME_CFLAGS@
GNOME_LIBS = @GNOME_LIBS@
-GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
-GTHREAD_LIBS = @GTHREAD_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
G_ASSERTIONS = @G_ASSERTIONS@
@@ -143,6 +156,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
+mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -152,63 +166,74 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
applicationsdir = $(datadir)/applications
schemasdir = $(sysconfdir)/gconf/schemas
-
dist_applications_DATA = mail-notification.desktop
dist_schemas_DATA = mail-notification.schemas
-subdir = data
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DATA = $(dist_applications_DATA) $(dist_schemas_DATA)
-
-DIST_COMMON = $(dist_applications_DATA) $(dist_schemas_DATA) \
- Makefile.am Makefile.in
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign data/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
uninstall-info-am:
-dist_applicationsDATA_INSTALL = $(INSTALL_DATA)
install-dist_applicationsDATA: $(dist_applications_DATA)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(applicationsdir)
+ test -z "$(applicationsdir)" || $(mkdir_p) "$(DESTDIR)$(applicationsdir)"
@list='$(dist_applications_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " $(dist_applicationsDATA_INSTALL) $$d$$p $(DESTDIR)$(applicationsdir)/$$f"; \
- $(dist_applicationsDATA_INSTALL) $$d$$p $(DESTDIR)$(applicationsdir)/$$f; \
+ echo " $(dist_applicationsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(applicationsdir)/$$f'"; \
+ $(dist_applicationsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(applicationsdir)/$$f"; \
done
uninstall-dist_applicationsDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_applications_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(applicationsdir)/$$f"; \
- rm -f $(DESTDIR)$(applicationsdir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(applicationsdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(applicationsdir)/$$f"; \
done
-dist_schemasDATA_INSTALL = $(INSTALL_DATA)
install-dist_schemasDATA: $(dist_schemas_DATA)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(schemasdir)
+ test -z "$(schemasdir)" || $(mkdir_p) "$(DESTDIR)$(schemasdir)"
@list='$(dist_schemas_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " $(dist_schemasDATA_INSTALL) $$d$$p $(DESTDIR)$(schemasdir)/$$f"; \
- $(dist_schemasDATA_INSTALL) $$d$$p $(DESTDIR)$(schemasdir)/$$f; \
+ echo " $(dist_schemasDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(schemasdir)/$$f'"; \
+ $(dist_schemasDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(schemasdir)/$$f"; \
done
uninstall-dist_schemasDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_schemas_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(schemasdir)/$$f"; \
- rm -f $(DESTDIR)$(schemasdir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(schemasdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(schemasdir)/$$f"; \
done
tags: TAGS
TAGS:
@@ -216,10 +241,6 @@ TAGS:
ctags: CTAGS
CTAGS:
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -233,7 +254,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -251,9 +272,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
-
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(applicationsdir) $(DESTDIR)$(schemasdir)
+ for dir in "$(DESTDIR)$(applicationsdir)" "$(DESTDIR)$(schemasdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -265,7 +287,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -273,7 +295,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -283,13 +305,15 @@ clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-
+ -rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
+html: html-am
+
info: info-am
info-am:
@@ -306,7 +330,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
@@ -321,19 +345,20 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-dist_applicationsDATA uninstall-dist_schemasDATA \
- uninstall-info-am
+uninstall-am: uninstall-dist_applicationsDATA \
+ uninstall-dist_schemasDATA uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am info info-am install \
- install-am install-data install-data-am install-data-local \
- install-dist_applicationsDATA install-dist_schemasDATA \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
- uninstall-am uninstall-dist_applicationsDATA \
- uninstall-dist_schemasDATA uninstall-info-am
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-data-local install-dist_applicationsDATA \
+ install-dist_schemasDATA install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-dist_applicationsDATA uninstall-dist_schemasDATA \
+ uninstall-info-am
@GCONF_SCHEMAS_INSTALL_TRUE@install-data-local: install-schemas
diff --git a/data/mail-notification.schemas b/data/mail-notification.schemas
@@ -1,69 +1,25 @@
<gconfschemafile>
<schemalist>
<schema>
- <key>/schemas/apps/mail-notification/local/enabled</key>
- <applyto>/apps/mail-notification/local/enabled</applyto>
- <owner>mail-notification</owner>
- <type>bool</type>
- <default>1</default>
- <locale name="C">
- <short>Check for local mail</short>
- <long>Whether to periodically check for new local mail or not.</long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/mail-notification/local/delay/minutes</key>
- <applyto>/apps/mail-notification/local/delay/minutes</applyto>
- <owner>mail-notification</owner>
- <type>int</type>
- <default>0</default>
- <locale name="C">
- <short>Minutes between local checks</short>
- <long>Delay between local mail checks (minutes part).</long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/mail-notification/local/delay/seconds</key>
- <applyto>/apps/mail-notification/local/delay/seconds</applyto>
- <owner>mail-notification</owner>
- <type>int</type>
- <default>15</default>
- <locale name="C">
- <short>Seconds between local checks</short>
- <long>Delay between local mail checks (seconds part).</long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/mail-notification/remote/enabled</key>
- <applyto>/apps/mail-notification/remote/enabled</applyto>
- <owner>mail-notification</owner>
- <type>bool</type>
- <default>1</default>
- <locale name="C">
- <short>Check for remote mail</short>
- <long>Whether to periodically check for new remote mail or not.</long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/mail-notification/remote/delay/minutes</key>
- <applyto>/apps/mail-notification/remote/delay/minutes</applyto>
+ <key>/schemas/apps/mail-notification/delay/minutes</key>
+ <applyto>/apps/mail-notification/delay/minutes</applyto>
<owner>mail-notification</owner>
<type>int</type>
<default>5</default>
<locale name="C">
- <short>Minutes between remote checks</short>
- <long>Delay between remote mail checks (minutes part).</long>
+ <short>Minutes between mail checks</short>
+ <long>Delay between mail checks (minutes part).</long>
</locale>
</schema>
<schema>
- <key>/schemas/apps/mail-notification/remote/delay/seconds</key>
- <applyto>/apps/mail-notification/remote/delay/seconds</applyto>
+ <key>/schemas/apps/mail-notification/delay/seconds</key>
+ <applyto>/apps/mail-notification/delay/seconds</applyto>
<owner>mail-notification</owner>
<type>int</type>
<default>0</default>
<locale name="C">
- <short>Seconds between remote checks</short>
- <long>Delay between remote mail checks (seconds part).</long>
+ <short>Seconds between mail checks</short>
+ <long>Delay between mail checks (seconds part).</long>
</locale>
</schema>
<schema>
@@ -116,8 +72,30 @@
<list_type>string</list_type>
<locale name="C">
<short>Mailboxes list</short>
- <long>List of mailboxes to monitor.</long>
+ <long>The list of mailboxes to monitor.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/ui/preferences-dialog/height</key>
+ <applyto>/apps/mail-notification/ui/preferences-dialog/height</applyto>
+ <owner>mail-notification</owner>
+ <type>int</type>
+ <default>420</default>
+ <locale name="C">
+ <short>Height of preferences dialog</short>
+ <long>The height of the preferences dialog in pixels.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/ui/preferences-dialog/width</key>
+ <applyto>/apps/mail-notification/ui/preferences-dialog/width</applyto>
+ <owner>mail-notification</owner>
+ <type>int</type>
+ <default>-1</default>
+ <locale name="C">
+ <short>Width of preferences dialog</short>
+ <long>The width of the preferences dialog in pixels.</long>
</locale>
</schema>
- </schemalist>
+ </schemalist>
</gconfschemafile>
diff --git a/help/C/Makefile.am b/help/C/Makefile.am
@@ -0,0 +1,9 @@
+figdir = figures
+docname = mail-notification
+lang = C
+omffile = mail-notification-C.omf
+entities = documentation-license.xml software-license.xml
+
+include $(top_srcdir)/help/xmldocs.make
+
+dist-hook: app-dist-hook
diff --git a/help/C/Makefile.in b/help/C/Makefile.in
@@ -0,0 +1,473 @@
+# Makefile.in generated by automake 1.8.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# No modifications of this Makefile should be necessary.
+#
+# To use this template:
+# 1) Define: figdir, docname, lang, omffile, and entities in
+# your Makefile.am file for each document directory,
+# although figdir, omffile, and entities may be empty
+# 2) Make sure the Makefile in (1) also includes
+# "include $(top_srcdir)/help/xmldocs.make" and
+# "dist-hook: app-dist-hook".
+# 3) Optionally define 'entities' to hold xml entities which
+# you would also like installed
+# 4) Figures must go under $(figdir)/ and be in PNG format
+# 5) You should only have one document per directory
+# 6) Note that the figure directory, $(figdir)/, should not have its
+# own Makefile since this Makefile installs those figures.
+#
+# example Makefile.am:
+# figdir = figures
+# docname = scrollkeeper-manual
+# lang = C
+# omffile=scrollkeeper-manual-C.omf
+# entities = fdl.xml
+# include $(top_srcdir)/help/xmldocs.make
+# dist-hook: app-dist-hook
+#
+# About this file:
+# This file was taken from scrollkeeper_example2, a package illustrating
+# how to install documentation and OMF files for use with ScrollKeeper
+# 0.3.x and 0.4.x. For more information, see:
+# http://scrollkeeper.sourceforge.net/
+# Version: 0.1.2 (last updated: March 20, 2002)
+#
+
+#
+# No modifications of this Makefile should be necessary.
+#
+# This file contains the build instructions for installing OMF files. It is
+# generally called from the makefiles for particular formats of documentation.
+#
+# Note that you must configure your package with --localstatedir=/var/lib
+# so that the scrollkeeper-update command below will update the database
+# in the standard scrollkeeper directory.
+#
+# If it is impossible to configure with --localstatedir=/var/lib, then
+# modify the definition of scrollkeeper_localstate_dir so that
+# it points to the correct location. Note that you must still use
+# $(localstatedir) in this or when people build RPMs it will update
+# the real database on their system instead of the one under RPM_BUILD_ROOT.
+#
+# Note: This make file is not incorporated into xmldocs.make because, in
+# general, there will be other documents install besides XML documents
+# and the makefiles for these formats should also include this file.
+#
+# About this file:
+# This file was taken from scrollkeeper_example2, a package illustrating
+# how to install documentation and OMF files for use with ScrollKeeper
+# 0.3.x and 0.4.x. For more information, see:
+# http://scrollkeeper.sourceforge.net/
+# Version: 0.1.2 (last updated: March 20, 2002)
+#
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/help/omf.make $(top_srcdir)/help/xmldocs.make
+subdir = help/C
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNET_CFLAGS = @GNET_CFLAGS@
+GNET_LIBS = @GNET_LIBS@
+GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_LIBS = @GNOME_LIBS@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+G_ASSERTIONS = @G_ASSERTIONS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
+WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
+WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
+WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
+WITH_MH_FALSE = @WITH_MH_FALSE@
+WITH_MH_TRUE = @WITH_MH_TRUE@
+WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
+WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+figdir = figures
+docname = mail-notification
+lang = C
+omffile = mail-notification-C.omf
+entities = documentation-license.xml software-license.xml
+
+# ************* Begin of section some packagers may need to modify **************
+# This variable (docdir) specifies where the documents should be installed.
+# This default value should work for most packages.
+docdir = $(datadir)/help/$(docname)/$(lang)
+
+# ************** You should not have to edit below this line *******************
+xml_files = $(entities) $(docname).xml
+omf_dir = $(top_srcdir)/omf-install
+EXTRA_DIST = $(xml_files) $(omffile)
+CLEANFILES = omf_timestamp
+omf_dest_dir = $(datadir)/omf/@PACKAGE@
+scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/help/xmldocs.make $(top_srcdir)/help/omf.make $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign help/C/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign help/C/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ $(mkdir_p) $(distdir)/../../help
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-local
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-data-local install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+ uninstall-local
+
+
+omf: omf_timestamp
+
+omf_timestamp: $(omffile)
+ -for file in $(omffile); do \
+ scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $(srcdir)/$$file.out; \
+ done
+ touch omf_timestamp
+
+install-data-hook-omf:
+ $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
+ for file in $(omffile); do \
+ $(INSTALL_DATA) $(srcdir)/$$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
+ done
+ -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir)
+
+uninstall-local-omf:
+ -for file in $(srcdir)/*.omf; do \
+ basefile=`basename $$file`; \
+ rm -f $(omf_dest_dir)/$$basefile; \
+ done
+ -rmdir $(omf_dest_dir)
+ -scrollkeeper-update -p $(scrollkeeper_localstate_dir)
+
+all: omf
+
+$(docname).xml: $(entities)
+ -ourdir=`pwd`; \
+ cd $(srcdir); \
+ cp $(entities) $$ourdir
+
+app-dist-hook:
+ if test "$(figdir)"; then \
+ $(mkinstalldirs) $(distdir)/$(figdir); \
+ for file in $(srcdir)/$(figdir)/*.png; do \
+ basefile=`echo $$file | sed -e 's,^.*/,,'`; \
+ $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \
+ done \
+ fi
+
+install-data-local: omf
+ $(mkinstalldirs) $(DESTDIR)$(docdir)
+ for file in $(xml_files); do \
+ cp $(srcdir)/$$file $(DESTDIR)$(docdir); \
+ done
+ if test "$(figdir)"; then \
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \
+ for file in $(srcdir)/$(figdir)/*.png; do \
+ basefile=`echo $$file | sed -e 's,^.*/,,'`; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \
+ done \
+ fi
+
+install-data-hook: install-data-hook-omf
+
+uninstall-local: uninstall-local-doc uninstall-local-omf
+
+uninstall-local-doc:
+ -if test "$(figdir)"; then \
+ for file in $(srcdir)/$(figdir)/*.png; do \
+ basefile=`echo $$file | sed -e 's,^.*/,,'`; \
+ rm -f $(docdir)/$(figdir)/$$basefile; \
+ done; \
+ rmdir $(DESTDIR)$(docdir)/$(figdir); \
+ fi
+ -for file in $(xml_files); do \
+ rm -f $(DESTDIR)$(docdir)/$$file; \
+ done
+ -rmdir $(DESTDIR)$(docdir)
+
+dist-hook: app-dist-hook
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/help/C/documentation-license.xml b/help/C/documentation-license.xml
@@ -0,0 +1,42 @@
+<legalnotice id="documentation-license">
+ <para>
+ Redistribution and use in source (SGML DocBook) and 'compiled'
+ forms (SGML, HTML, PDF, PostScript, RTF and so forth) with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ <orderedlist>
+ <listitem>
+ <para>Redistributions of source code (SGML DocBook) must
+ retain the above copyright notice, this list of conditions and
+ the following disclaimer as the first lines of this file
+ unmodified.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Redistributions in compiled form (transformed to other
+ DTDs, converted to PDF, PostScript, RTF and other formats)
+ must reproduce the above copyright notice, this list of
+ conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+
+ <para>
+ THIS DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY
+ OF SUCH DAMAGE.
+ </para>
+</legalnotice>
diff --git a/help/C/figures/mail-error.png b/help/C/figures/mail-error.png
Binary files differ.
diff --git a/help/C/figures/mail.png b/help/C/figures/mail.png
Binary files differ.
diff --git a/help/C/figures/no-mail-error.png b/help/C/figures/no-mail-error.png
Binary files differ.
diff --git a/help/C/figures/no-mail.png b/help/C/figures/no-mail.png
Binary files differ.
diff --git a/help/C/mail-notification-C.omf b/help/C/mail-notification-C.omf
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE omf PUBLIC "-//OMF//DTD Scrollkeeper OMF Variant V1.0//EN" "http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd">
+<omf>
+ <resource>
+ <creator>
+ jylefort@brutele.be (Jean-Yves Lefort)
+ </creator>
+ <maintainer>
+ jylefort@brutele.be (Jean-Yves Lefort)
+ </maintainer>
+ <title>
+ Mail Notification Manual
+ </title>
+ <date>
+ 2004-06-29
+ </date>
+ <version identifier="2.0" date="2004-06-29" description="First release"/>
+ <subject category="GNOME|Internet"/>
+ <description>
+ Mail Notification Manual
+ </description>
+ <type>
+ user's guide
+ </type>
+ <format mime="text/xml" dtd="-//OASIS//DTD DocBook XML V4.1.2//EN"/>
+ <identifier url="placeholder"/>
+ <language code="C"/>
+ <relation seriesid="01547b36-c95a-11d8-8970-90a5e458dba3"/>
+ <rights type="BSD" holder="Jean-Yves Lefort"/>
+ </resource>
+</omf>
diff --git a/help/C/mail-notification.xml b/help/C/mail-notification.xml
@@ -0,0 +1,444 @@
+<?xml version="1.0"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+ <!ENTITY app "<application>Mail Notification</application>">
+ <!ENTITY appversion "0.4.0">
+ <!ENTITY manrevision "2.0">
+ <!ENTITY date "Tuesday, June 29, 2004">
+
+ <!ENTITY project "The Mail Notification Project">
+
+ <!ENTITY documentation-license SYSTEM "documentation-license.xml">
+ <!ENTITY software-license SYSTEM "software-license.xml">
+
+ <!ENTITY aka "<acronym>aka</acronym>">
+]>
+
+<!-- $Id: mail-notification.xml,v 1.5 2004/06/29 13:50:42 jylefort Exp $ -->
+<!-- Mail Notification Manual -->
+
+<!-- Copyright (c) 2004 Jean-Yves Lefort -->
+<!-- All rights reserved. -->
+
+<!-- Redistribution and use in source (SGML DocBook) and 'compiled' -->
+<!-- forms (SGML, HTML, PDF, PostScript, RTF and so forth) with or -->
+<!-- without modification, are permitted provided that the following -->
+<!-- conditions are met: -->
+<!-- 1. Redistributions of source code (SGML DocBook) must -->
+<!-- retain the above copyright notice, this list of conditions and -->
+<!-- the following disclaimer as the first lines of this file -->
+<!-- unmodified. -->
+<!-- 2. Redistributions in compiled form (transformed to other -->
+<!-- DTDs, converted to PDF, PostScript, RTF and other formats) -->
+<!-- must reproduce the above copyright notice, this list of -->
+<!-- conditions and the following disclaimer in the documentation -->
+<!-- and/or other materials provided with the distribution. -->
+
+<!-- THIS DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND -->
+<!-- CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -->
+<!-- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
+<!-- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -->
+<!-- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
+<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -->
+<!-- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -->
+<!-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -->
+<!-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -->
+<!-- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -->
+<!-- TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -->
+<!-- THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY -->
+<!-- OF SUCH DAMAGE. -->
+
+<!-- This document does its best to adhere to the -->
+<!-- GNOME Documentation Style Guide V1.3 -->
+<!-- (http://developer.gnome.org/documents/style-guide) -->
+
+<article id="index" lang="en">
+<!-- please do not change the id; for translations, change lang to -->
+<!-- appropriate code -->
+ <articleinfo>
+ <title>&app; Manual V&manrevision;</title>
+
+ <copyright>
+ <year>2004</year>
+ <holder>Jean-Yves Lefort</holder>
+ </copyright>
+<!-- translators: uncomment this:
+
+ <copyright>
+ <year>2002</year>
+ <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
+ </copyright>
+
+ -->
+ <publisher>
+ <publishername>&project;</publishername>
+ </publisher>
+
+ &documentation-license;
+
+ <authorgroup>
+ <author>
+ <firstname>Jean-Yves</firstname>
+ <surname>Lefort</surname>
+ <affiliation>
+ <orgname>&project;</orgname>
+ <address><email>jylefort@brutele.be</email></address>
+ </affiliation>
+ </author>
+
+<!-- This is appropriate place for other contributors: translators,
+ maintainers, etc. Commented out by default.
+
+ <othercredit role="translator">
+ <firstname>Latin</firstname>
+ <surname>Translator 1</surname>
+ <affiliation>
+ <orgname>Latin Translation Team</orgname>
+ <address> <email>translator@gnome.org</email> </address>
+ </affiliation>
+ <contrib>Latin translation</contrib>
+ </othercredit>
+-->
+ </authorgroup>
+
+<!-- The revision numbering system for GNOME manuals is as follows: -->
+<!-- * the revision number consists of two components -->
+<!-- * the first component of the revision number reflects the release version of the GNOME desktop. -->
+<!-- * the second component of the revision number is a decimal unit that is incremented with each revision of the manual. -->
+<!-- For example, if the GNOME desktop release is V2.x, the first version of the manual that -->
+<!-- is written in that desktop timeframe is V2.0, the second version of the manual is V2.1, etc. -->
+<!-- When the desktop release version changes to V3.x, the revision number of the manual changes -->
+<!-- to V3.0, and so on. -->
+ <revhistory>
+ <revision>
+ <revnumber>Mail Notification Manual V&manrevision;</revnumber>
+ <date>&date;</date>
+ <revdescription>
+ <para role="author">
+ Jean-Yves Lefort
+ <email>jylefort@brutele.be</email>
+ </para>
+ <para role="publisher">&project;</para>
+ </revdescription>
+ </revision>
+ </revhistory>
+
+ <releaseinfo>
+ This manual describes version &appversion; of Mail Notification.
+ </releaseinfo>
+ <legalnotice>
+ <title>Feedback</title>
+ <para>To report a bug or make a suggestion regarding the &app;
+ application or this manual, follow the directions in
+ <xref linkend="problem-reports" />.
+ </para>
+ <!-- Translators may also add here feedback address for translations -->
+ </legalnotice>
+ </articleinfo>
+
+ <indexterm zone="index">
+ <primary>Mail Notification</primary>
+ </indexterm>
+
+ <sect1 id="introduction">
+ <title>Introduction</title>
+ <para>
+ &app; is a status icon (&aka; tray icon) that informs you if you
+ have new mail.
+ </para>
+ <para>
+ It works with system trays implementing the freedesktop.org
+ <ulink url="http://www.freedesktop.org/Standards/systemtray-spec">System Tray Specification</ulink>, such as the
+ GNOME Panel Notification Area, the Xfce Notification Area and the KDE System Tray.
+ </para>
+ <para>
+ &app; features include:
+ </para>
+ <itemizedlist>
+ <listitem><para>multiple mailbox support</para></listitem>
+ <listitem><para>mbox, MH, Maildir, Sylpheed and POP3 support</para></listitem>
+ <listitem><para>automatic detection of mailbox format</para></listitem>
+ <listitem><para><link linkend="automatic-notification">automatic notification</link></para></listitem>
+ <listitem><para><ulink url="http://developer.gnome.org/projects/gup/hig">HIG</ulink> compliance</para></listitem>
+ </itemizedlist>
+ </sect1>
+
+ <sect1 id="getting-started">
+ <title>Getting Started</title>
+
+ <sect2 id="to-start">
+ <title>To Start &app;</title>
+ <para>
+ You can start <application>&app;</application> in the
+ following ways:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><guimenu>Applications</guimenu> menu</term>
+ <listitem>
+ <para>Choose
+ <menuchoice>
+ <guisubmenu>Internet</guisubmenu>
+ <guimenuitem>&app;</guimenuitem>
+ </menuchoice>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Command line</term>
+ <listitem>
+ <para>
+ To start <application>&app;</application> from a command
+ line, type the following command, then press
+ <keycap>Return</keycap>:
+ </para>
+ <para>
+ <command>mail-notification</command>
+ <replaceable>options</replaceable>
+ </para>
+ <para>
+ where <replaceable>options</replaceable> is one or more options
+ from the following non-exhaustive list:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term>--enable-info</term>
+ <listitem><para>Enable informational output</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>--list-handlers</term>
+ <listitem><para>List compiled-in handlers and exit</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>--help</term>
+ <listitem><para>Show help and exit</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </sect2>
+
+ <sect2 id="when-start">
+ <title>When You Start &app;</title>
+ <para>
+ When you start <application>&app;</application>, the following
+ icon is displayed in the notification area (&aka; system
+ tray).
+ </para>
+
+ <figure id="no-mail-fig">
+ <title>&app; status icon</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/no-mail.png" format="PNG"/>
+ </imageobject>
+ <!-- EPS versions of the figures are not required at the moment. -->
+ <!--
+ <imageobject>
+ <imagedata fileref="figures/image.eps" format="EPS"/>
+ </imageobject>
+ -->
+ <textobject>
+ <phrase>Shows the &app; status icon.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot>
+ </figure>
+ </sect2>
+ </sect1>
+
+ <sect1 id="usage">
+ <title>Usage</title>
+ <para>
+ &app; will monitor the state of your mailboxes and update its
+ status icon according to <xref linkend="icons" />.
+ </para>
+ <para>
+ You can add mailboxes from the
+ <link linkend="preferences">Preferences</link>, or by dragging a
+ file or folder into the icon.
+ </para>
+ <table frame="topbot" id="icons">
+ <title>&app; Icons</title>
+ <tgroup>
+ <thead>
+ <row rowsep="1">
+ <entry><para>Icon</para></entry>
+ <entry><para>Meaning</para></entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/no-mail.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>Shows the &app; status icon when you have no new mail.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot></entry>
+ <entry><para>you have no new mail</para></entry>
+ </row>
+ <row>
+ <entry><screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/no-mail-error.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>Shows the &app; status icon when you have no new mail and there are one or more errors.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot></entry>
+ <entry><para>you have no new mail and there are one or more errors</para></entry>
+ </row>
+ <row>
+ <entry><screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/mail.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>Shows the &app; status icon when you have new mail.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot></entry>
+ <entry><para>you have new mail</para></entry>
+ </row>
+ <row>
+ <entry><screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="figures/mail-error.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase>Shows the &app; status icon when you have new mail and there are one or more errors.</phrase>
+ </textobject>
+ </mediaobject>
+ </screenshot></entry>
+ <entry><para>you have new mail and there are one or more errors</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect1>
+
+ <sect1 id="preferences">
+ <title>Preferences</title>
+ <para>To configure &app;, right-click the status icon and choose
+ <menuchoice>
+ <guimenuitem>Preferences</guimenuitem>
+ </menuchoice>. The
+ <guilabel>Preferences</guilabel> dialog contains the following
+ settings:
+ </para>
+
+ <variablelist>
+ <varlistentry id="delay-between-mail-checks">
+ <term><guilabel>Delay between mail checks</guilabel></term>
+ <listitem>
+ <para>
+ This is the amount of time to wait between mail checks.
+ <note>
+ <para>
+ This delay only applies to mailboxes which do not
+ support <link linkend="automatic-notification">automatic notification</link> of changes.
+ </para>
+ </note>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><guilabel>Mailboxes</guilabel></term>
+ <listitem>
+ <para>
+ This is the list of mailboxes to monitor for new mail.
+ <tip>
+ <para>
+ You can drag a file or folder into this list.
+ </para>
+ </tip>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><guilabel>When new mail arrives:</guilabel></term>
+ <listitem>
+ <para>
+ This is the command to execute when new mail arrives.
+ <note>
+ <para>
+ This command will not be executed if you already have
+ new mail.
+ </para>
+ </note>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><guilabel>When clicked:</guilabel></term>
+ <listitem>
+ <para>
+ This is the command to execute when the icon is clicked.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </sect1>
+
+ <sect1 id="automatic-notification">
+ <title>Automatic Notification</title>
+ <para>
+ Automatic notification is the ability to detect changes to a
+ mailbox without needing to poll it periodically. It allows the
+ status icon to be updated within seconds after a mailbox
+ receives new mail.
+ </para>
+ <para>
+ For automatic notification to be supported, GnomeVFS must be compiled
+ with <ulink url="http://oss.sgi.com/projects/fam">FAM</ulink> support,
+ and FAM must be configured properly.
+ </para>
+ <para>
+ Refer to the
+ <citerefentry><refentrytitle>fam</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ manual page for more details.
+ </para>
+ <note>
+ <para>
+ Automatic notification is only supported for local mailboxes.
+ Mailboxes which do not support it will be checked periodically
+ according to the <link linkend="delay-between-mail-checks">Delay between mail checks</link>
+ setting.
+ </para>
+ </note>
+ </sect1>
+
+ <sect1 id="about">
+ <title>About &app;</title>
+ <para> &app; was written by Jean-Yves Lefort
+ (<email>jylefort@brutele.be</email>). To find more information about
+ &app;, please visit the
+ <ulink url="http://www.nongnu.org/mailnotify" type="http">Mail Notification web page</ulink>.
+ </para>
+
+ <sect2 id="problem-reports">
+ <title>Reporting Bugs and Other Feedback</title>
+ <para>
+ Bug reports and feedback should be sent to Jean-Yves Lefort
+ (<email>jylefort@brutele.be></email>).
+ </para>
+ </sect2>
+
+ <sect2 id="licensing-terms">
+ <title>Licensing Terms</title>
+ &software-license;
+ </sect2>
+ </sect1>
+</article>
diff --git a/help/C/software-license.xml b/help/C/software-license.xml
@@ -0,0 +1,8 @@
+<para>
+ This program is distributed under the terms of the GNU General
+ Public license as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version. A
+ copy of this license can be found at this <ulink url="ghelp:gpl"
+ type="help">link</ulink>, or in the file COPYING included with the
+ source code of this program.
+</para>
diff --git a/help/Makefile.am b/help/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = C
diff --git a/help/Makefile.in b/help/Makefile.in
@@ -0,0 +1,456 @@
+# Makefile.in generated by automake 1.8.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = help
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNET_CFLAGS = @GNET_CFLAGS@
+GNET_LIBS = @GNET_LIBS@
+GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_LIBS = @GNOME_LIBS@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+G_ASSERTIONS = @G_ASSERTIONS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
+WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
+WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
+WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
+WITH_MH_FALSE = @WITH_MH_FALSE@
+WITH_MH_TRUE = @WITH_MH_TRUE@
+WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
+WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = C
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign help/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign help/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -z "$$unique" && unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || mkdir "$(distdir)/$$subdir" \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="../$(top_distdir)" \
+ distdir="../$(distdir)/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+ clean clean-generic clean-recursive ctags ctags-recursive \
+ distclean distclean-generic distclean-recursive distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/help/omf.make b/help/omf.make
@@ -0,0 +1,53 @@
+#
+# No modifications of this Makefile should be necessary.
+#
+# This file contains the build instructions for installing OMF files. It is
+# generally called from the makefiles for particular formats of documentation.
+#
+# Note that you must configure your package with --localstatedir=/var/lib
+# so that the scrollkeeper-update command below will update the database
+# in the standard scrollkeeper directory.
+#
+# If it is impossible to configure with --localstatedir=/var/lib, then
+# modify the definition of scrollkeeper_localstate_dir so that
+# it points to the correct location. Note that you must still use
+# $(localstatedir) in this or when people build RPMs it will update
+# the real database on their system instead of the one under RPM_BUILD_ROOT.
+#
+# Note: This make file is not incorporated into xmldocs.make because, in
+# general, there will be other documents install besides XML documents
+# and the makefiles for these formats should also include this file.
+#
+# About this file:
+# This file was taken from scrollkeeper_example2, a package illustrating
+# how to install documentation and OMF files for use with ScrollKeeper
+# 0.3.x and 0.4.x. For more information, see:
+# http://scrollkeeper.sourceforge.net/
+# Version: 0.1.2 (last updated: March 20, 2002)
+#
+
+omf_dest_dir=$(datadir)/omf/@PACKAGE@
+scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper
+
+omf: omf_timestamp
+
+omf_timestamp: $(omffile)
+ -for file in $(omffile); do \
+ scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $(srcdir)/$$file.out; \
+ done
+ touch omf_timestamp
+
+install-data-hook-omf:
+ $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
+ for file in $(omffile); do \
+ $(INSTALL_DATA) $(srcdir)/$$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
+ done
+ -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir)
+
+uninstall-local-omf:
+ -for file in $(srcdir)/*.omf; do \
+ basefile=`basename $$file`; \
+ rm -f $(omf_dest_dir)/$$basefile; \
+ done
+ -rmdir $(omf_dest_dir)
+ -scrollkeeper-update -p $(scrollkeeper_localstate_dir)
diff --git a/help/xmldocs.make b/help/xmldocs.make
@@ -0,0 +1,95 @@
+#
+# No modifications of this Makefile should be necessary.
+#
+# To use this template:
+# 1) Define: figdir, docname, lang, omffile, and entities in
+# your Makefile.am file for each document directory,
+# although figdir, omffile, and entities may be empty
+# 2) Make sure the Makefile in (1) also includes
+# "include $(top_srcdir)/help/xmldocs.make" and
+# "dist-hook: app-dist-hook".
+# 3) Optionally define 'entities' to hold xml entities which
+# you would also like installed
+# 4) Figures must go under $(figdir)/ and be in PNG format
+# 5) You should only have one document per directory
+# 6) Note that the figure directory, $(figdir)/, should not have its
+# own Makefile since this Makefile installs those figures.
+#
+# example Makefile.am:
+# figdir = figures
+# docname = scrollkeeper-manual
+# lang = C
+# omffile=scrollkeeper-manual-C.omf
+# entities = fdl.xml
+# include $(top_srcdir)/help/xmldocs.make
+# dist-hook: app-dist-hook
+#
+# About this file:
+# This file was taken from scrollkeeper_example2, a package illustrating
+# how to install documentation and OMF files for use with ScrollKeeper
+# 0.3.x and 0.4.x. For more information, see:
+# http://scrollkeeper.sourceforge.net/
+# Version: 0.1.2 (last updated: March 20, 2002)
+#
+
+
+# ************* Begin of section some packagers may need to modify **************
+# This variable (docdir) specifies where the documents should be installed.
+# This default value should work for most packages.
+docdir = $(datadir)/help/$(docname)/$(lang)
+
+# ************** You should not have to edit below this line *******************
+xml_files = $(entities) $(docname).xml
+omf_dir=$(top_srcdir)/omf-install
+
+EXTRA_DIST = $(xml_files) $(omffile)
+CLEANFILES = omf_timestamp
+
+include $(top_srcdir)/help/omf.make
+
+all: omf
+
+$(docname).xml: $(entities)
+ -ourdir=`pwd`; \
+ cd $(srcdir); \
+ cp $(entities) $$ourdir
+
+app-dist-hook:
+ if test "$(figdir)"; then \
+ $(mkinstalldirs) $(distdir)/$(figdir); \
+ for file in $(srcdir)/$(figdir)/*.png; do \
+ basefile=`echo $$file | sed -e 's,^.*/,,'`; \
+ $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \
+ done \
+ fi
+
+install-data-local: omf
+ $(mkinstalldirs) $(DESTDIR)$(docdir)
+ for file in $(xml_files); do \
+ cp $(srcdir)/$$file $(DESTDIR)$(docdir); \
+ done
+ if test "$(figdir)"; then \
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \
+ for file in $(srcdir)/$(figdir)/*.png; do \
+ basefile=`echo $$file | sed -e 's,^.*/,,'`; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \
+ done \
+ fi
+
+install-data-hook: install-data-hook-omf
+
+uninstall-local: uninstall-local-doc uninstall-local-omf
+
+uninstall-local-doc:
+ -if test "$(figdir)"; then \
+ for file in $(srcdir)/$(figdir)/*.png; do \
+ basefile=`echo $$file | sed -e 's,^.*/,,'`; \
+ rm -f $(docdir)/$(figdir)/$$basefile; \
+ done; \
+ rmdir $(DESTDIR)$(docdir)/$(figdir); \
+ fi
+ -for file in $(xml_files); do \
+ rm -f $(DESTDIR)$(docdir)/$$file; \
+ done
+ -rmdir $(DESTDIR)$(docdir)
+
diff --git a/m4/Makefile.in b/m4/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.5 from Makefile.am.
+# Makefile.in generated by automake 1.8.4 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -21,7 +20,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -35,6 +33,19 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+subdir = m4
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -65,16 +76,12 @@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_CFLAGS = @GLADE_CFLAGS@
-GLADE_LIBS = @GLADE_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNET_CFLAGS = @GNET_CFLAGS@
GNET_LIBS = @GNET_LIBS@
GNOME_CFLAGS = @GNOME_CFLAGS@
GNOME_LIBS = @GNOME_LIBS@
-GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
-GTHREAD_LIBS = @GTHREAD_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
G_ASSERTIONS = @G_ASSERTIONS@
@@ -143,6 +150,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
+mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -151,21 +159,38 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXTRA_DIST = pkg.m4
-subdir = m4
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign m4/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign m4/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
uninstall-info-am:
tags: TAGS
TAGS:
@@ -173,10 +198,6 @@ TAGS:
ctags: CTAGS
CTAGS:
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -190,7 +211,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -208,7 +229,6 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile
-
installdirs:
install: install-am
install-exec: install-exec-am
@@ -221,7 +241,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -229,7 +249,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -239,13 +259,15 @@ clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-
+ -rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
+html: html-am
+
info: info-am
info-am:
@@ -261,7 +283,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
@@ -279,8 +301,8 @@ ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am info info-am install \
- install-am install-data install-data-am install-exec \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
diff --git a/m4/pkg.m4 b/m4/pkg.m4
@@ -1,8 +1,8 @@
-# $Id: pkg.m4,v 1.4 2003/12/24 14:19:46 jylefort Exp $
+# $Id: pkg.m4,v 1.5 2004/05/26 18:02:11 jylefort Exp $
#
# This file is part of Mail Notification.
#
-# Copyright (c) 2002-2003 Jean-Yves Lefort.
+# Copyright (c) 2002, 2003, 2004 Jean-Yves Lefort.
#
# As a special exception to the Mail Notification licensing terms,
# Jean-Yves Lefort gives unlimited permission to copy, distribute and
@@ -10,7 +10,7 @@
dnl AM_PATH_PKG(VARIABLE_PREFIX, MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
-AC_DEFUN(AM_PATH_PKG,
+AC_DEFUN([AM_PATH_PKG],
[found=no
$1_CFLAGS=""
$1_LIBS=""
diff --git a/po/ChangeLog b/po/ChangeLog
@@ -1,3 +1,16 @@
+2004-06-29 18:36 jylefort
+
+ * fr.po: Version 0.4.0
+
+2004-06-29 17:46 jylefort
+
+ * POTFILES.in, fr.po: Updated
+
+2004-05-28 14:12 jylefort
+
+ * POTFILES.in: The add mailbox dialogs have been unified; GTK+
+ 2.4.0 is now required
+
2004-03-19 14:20 jylefort
* fr.po: Version 0.3.4
diff --git a/po/POTFILES.in b/po/POTFILES.in
@@ -1,22 +1,26 @@
src/eggtrayicon.c
-src/mail-notification.c
-src/mn-check.c
src/mn-conf.c
src/mn-dialog.c
src/mn-mail-icon.c
+src/mn-mailbox-properties-dialog.c
src/mn-mailbox.c
src/mn-mailboxes.c
src/mn-maildir-mailbox.c
+src/mn-main.c
src/mn-mbox-mailbox.c
src/mn-mh-mailbox.c
+src/mn-pending-mailbox.c
src/mn-pop3-mailbox.c
src/mn-preferences.c
-src/mn-settings.c
+src/mn-stock.c
src/mn-sylpheed-mailbox.c
src/mn-ui.c
src/mn-unsupported-mailbox.c
+src/mn-uri.c
src/mn-util.c
-ui/add-pop3-strings.c
+src/mn-vfs.c
+src/old/mn-preferences.c
ui/dialog-strings.c
+ui/mailbox-properties-strings.c
ui/menu-strings.c
ui/preferences-strings.c
diff --git a/po/fr.gmo b/po/fr.gmo
Binary files differ.
diff --git a/po/fr.po b/po/fr.po
@@ -4,15 +4,16 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: mail-notification 0.3.4\n"
+"Project-Id-Version: mail-notification 0.4.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-03-19 14:22+0100\n"
-"PO-Revision-Date: 2004-03-19 14:19+0100\n"
+"POT-Creation-Date: 2004-06-29 20:10+0200\n"
+"PO-Revision-Date: 2004-06-29 18:36+0200\n"
"Last-Translator: Jean-Yves Lefort <jylefort@brutele.be>\n"
"Language-Team: Jean-Yves Lefort <jylefort@brutele.be>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n>1;\n"
#: src/eggtrayicon.c:109
msgid "Orientation"
@@ -22,382 +23,420 @@ msgstr "Orientation"
msgid "The orientation of the tray."
msgstr "L'orientation du plateau."
-#: src/mail-notification.c:38
-msgid "Compiled in handlers:\n"
-msgstr "Prises en charge disponibles:\n"
+#: src/mn-mail-icon.c:130
+msgid "You have no new mail"
+msgstr "Vous n'avez pas de courrier"
-#: src/mail-notification.c:68
-msgid "Enable debugging output"
-msgstr "Activer les informations de débogage"
+#: src/mn-mailbox-properties-dialog.c:117
+msgid "Add a Mailbox"
+msgstr "Ajouter une Boîte aux Lettres"
-#: src/mail-notification.c:77
-msgid "List compiled-in handlers and exit"
-msgstr "Afficher les prises en charge disponibles et quitter"
+#: src/mn-mailbox-properties-dialog.c:250
+#, c-format
+msgid "%s Properties"
+msgstr "Propriétés de %s"
-#: src/mail-notification.c:93
-msgid "the GLib thread system is unavailable"
-msgstr "le système de thread GLib n'est pas disponible"
+#: src/mn-mailbox-properties-dialog.c:393
+msgid "Select a File or Folder"
+msgstr "Sélectionnez un Fichier ou Dossier"
-#: src/mail-notification.c:100 src/mn-ui.c:144
-msgid "Mail Notification"
-msgstr "Notification de Courrier"
+#: src/mn-mailbox.c:193
+msgid "URI"
+msgstr "URI"
-#: src/mn-check.c:75 src/mn-check.c:134
-msgid "Check error."
-msgstr "Erreur de vérification."
+#: src/mn-mailbox.c:194
+msgid "The mailbox URI"
+msgstr "L'URI de la boîte aux lettres"
-#: src/mn-check.c:76
-#, c-format
-msgid "Unable to create a thread: %s."
-msgstr "Impossible de créer un thread: %s."
+#: src/mn-mailbox.c:200
+msgid "Name"
+msgstr "Nom"
-#: src/mn-check.c:79
-#, c-format
-msgid "unable to create a thread: %s"
-msgstr "impossible de créer un thread: %s"
+#: src/mn-mailbox.c:201
+msgid "The mailbox human-readable name"
+msgstr "Le nom, lisible par un humain, de la boîte aux lettres"
-#: src/mn-check.c:126
-#, c-format
-msgid "checking if there is new mail in %s"
-msgstr "vérification du nouveau courrier dans %s en cours"
+#: src/mn-mailbox.c:207
+msgid "Automatic"
+msgstr "Automatique"
-#: src/mn-check.c:135
-#, c-format
-msgid "Unable to check mailbox <i>%s</i>: %s."
-msgstr "Impossible de vérifier la boîte aux lettres <i>%s</i>: %s."
+#: src/mn-mailbox.c:208
+msgid "Whether the mailbox has to be manually checked or not"
+msgstr "Si la boîte aux lettres doit être vérifiée manuellement ou pas"
-#: src/mn-check.c:142
-#, c-format
-msgid "unable to check mailbox %s: %s"
-msgstr "impossible de vérifier la boîte aux lettres %s: %s"
+#: src/mn-mailbox.c:214
+msgid "Has new"
+msgstr "A du nouveau"
-#: src/mn-check.c:155
-#, c-format
-msgid "%s has new mail"
-msgstr "%s a du nouveau courrier"
+#: src/mn-mailbox.c:215
+msgid "Whether the mailbox has new mail or not"
+msgstr "Si la boîte aux lettres a du nouveau courrier ou pas"
-#: src/mn-check.c:156
-#, c-format
-msgid "%s has no new mail"
-msgstr "%s n'a pas de nouveau courrier"
+#: src/mn-mailbox.c:221
+msgid "Error"
+msgstr "Erreur"
-#: src/mn-check.c:216 src/mn-ui.c:86
-msgid "Command error."
-msgstr "Erreur de commande."
+#: src/mn-mailbox.c:222
+msgid "The mailbox error if any"
+msgstr "L'erreur de la boîte aux lettres si il y en a une"
-#: src/mn-check.c:217
+#: src/mn-mailbox.c:248
#, c-format
-msgid "Unable to execute new mail command: %s."
-msgstr ""
-"Impossible d'exécuter la commande associée à l'arrivée d'un nouveau message: "
-"%s."
+msgid "unable to cancel monitoring of %s: %s"
+msgstr "impossible d'annuler la surveillance de %s: %s"
-#: src/mn-check.c:223
-#, c-format
-msgid "unable to execute new mail command: %s"
-msgstr ""
-"impossible d'exécuter la commande associée à l'arrivée d'un nouveau message: "
-"%s"
+#: src/mn-mailbox.c:437
+msgid "does not exist"
+msgstr "n'existe pas"
-#: src/mn-conf.c:84 src/mn-conf.c:104
-msgid "Initialization error."
-msgstr "Erreur d'initialisation."
+#: src/mn-mailbox.c:454
+msgid "unknown format"
+msgstr "format inconnu"
-#: src/mn-conf.c:85
+#: src/mn-mailbox.c:547
#, c-format
-msgid "Error while calling <i>gconf_client_notify_add()</i>: %s."
-msgstr "Erreur lors de l'appel de <i>gconf_client_notify_add()</i>: %s."
+msgid "unable to monitor %s: %s"
+msgstr "impossible de surveiller %s: %s"
-#: src/mn-conf.c:105
+#: src/mn-mailbox.c:561
#, c-format
-msgid "Error while calling <i>gconf_client_add_dir()</i>: %s."
-msgstr "Erreur lors de l'appel de <i>gconf_client_add_dir()</i>: %s."
-
-#: src/mn-conf.c:129 src/mn-conf.c:147 src/mn-conf.c:165 src/mn-conf.c:183
+msgid ""
+"As a fallback, they will be checked every %i second (this delay is "
+"configurable from the Preferences Dialog)."
+msgid_plural ""
+"As a fallback, they will be checked every %i seconds (this delay is "
+"configurable from the Preferences Dialog)."
+msgstr[0] ""
+"Comme solution de secours, elles seront vérifiées toutes les %i seconde (ce "
+"délai est configurable depuis les Préférences)."
+msgstr[1] ""
+"Comme solution de secours, elles seront vérifiées toutes les %i secondes (ce "
+"délai est configurable depuis les Préférences)."
+
+#: src/mn-mailbox.c:572
#, c-format
-msgid "unable to read in configuration key %s: %s"
-msgstr "impossible de lire dans la clé de configuration %s: %s"
-
-#: src/mn-conf.c:200 src/mn-conf.c:213 src/mn-conf.c:226 src/mn-conf.c:239
+msgid ""
+"As a fallback, they will be checked every %i minute (this delay is "
+"configurable from the Preferences Dialog)."
+msgid_plural ""
+"As a fallback, they will be checked every %i minutes (this delay is "
+"configurable from the Preferences Dialog)."
+msgstr[0] ""
+"Comme solution de secours, elles seront vérifiées toutes les %i minutes (ce "
+"délai est configurable depuis les Préférences)."
+msgstr[1] ""
+"Comme solution de secours, elles seront vérifiées toutes les %i minutes (ce "
+"délai est configurable depuis les Préférences)."
+
+#: src/mn-mailbox.c:583
#, c-format
-msgid "unable to write in configuration key %s: %s"
-msgstr "impossible d'écrire dans la clé de configuration %s: %s"
-
-#: src/mn-conf.c:252
+msgid ""
+"As a fallback, they will be checked approximately every %i minute (this "
+"delay is configurable from the Preferences Dialog)."
+msgid_plural ""
+"As a fallback, they will be checked approximately every %i minutes (this "
+"delay is configurable from the Preferences Dialog)."
+msgstr[0] ""
+"Comme solution de secours, elles seront vérifiées approximativement toutes "
+"les %i minute (ce délai est configurable depuis les Préférences)."
+msgstr[1] ""
+"Comme solution de secours, elles seront vérifiées approximativement toutes "
+"les %i minutes (ce délai est configurable depuis les Préférences)."
+
+#: src/mn-mailbox.c:597
+msgid "A monitoring error has occurred."
+msgstr "Une erreur de surveillance s'est produite."
+
+#: src/mn-mailbox.c:598
#, c-format
-msgid "unable to unset configuration key %s: %s"
-msgstr "impossible d'effacer la clé de configuration %s: %s"
+msgid ""
+"Mail Notification was unable to enable automatic notification for one or "
+"more mailboxes. %s"
+msgstr ""
+"Notification de Courrier n'a pas été en mesure d'activer la notification "
+"automatique pour une ou plusieures boîtes aux lettres. %s"
-#: src/mn-dialog.c:52
+#: src/mn-mailboxes.c:133
#, c-format
-msgid "%s: FATAL ERROR: %s\n"
-msgstr "%s: ERREUR FATALE: %s\n"
+msgid "%s has new mail"
+msgstr "%s a du nouveau courrier"
-#: src/mn-mail-icon.c:137 src/mn-mail-icon.c:266
-msgid "You have no new mail"
-msgstr "Vous n'avez pas de courrier"
+#: src/mn-mailboxes.c:133
+#, c-format
+msgid "%s has no new mail"
+msgstr "%s n'a pas de nouveau courrier"
-#: src/mn-mail-icon.c:266
-msgid "You have new mail"
-msgstr "Vous avez du courrier"
+#: src/mn-mailboxes.c:143
+#, c-format
+msgid "%s reported an error: %s"
+msgstr "%s a indiqué une erreur: %s"
-#: src/mn-mailbox.c:58
+#: src/mn-maildir-mailbox.c:226 src/mn-sylpheed-mailbox.c:209
#, c-format
-msgid "unable to initialize %s mailbox: %s"
-msgstr "impossible d'initialiser la boîte aux lettres %s: %s"
+msgid "error while reading folder: %s"
+msgstr "erreur lors de la lecture du dossier: %s"
-#: src/mn-mailbox.c:139
-msgid "The mailbox's locator"
-msgstr "Le chemin de la boîte aux lettres"
+#: src/mn-main.c:49
+msgid "Compiled in handlers:\n"
+msgstr "Prises en charge disponibles:\n"
-#: src/mn-mailbox.c:200
-msgid "mailbox not found"
-msgstr "boîte aux lettres non trouvée"
+#: src/mn-main.c:83
+msgid "Enable informational output"
+msgstr "Activer la sortie informationelle"
-#: src/mn-mailbox.c:220
-msgid "unknown mailbox format"
-msgstr "format de boîte aux lettres inconnu"
+#: src/mn-main.c:92
+msgid "List compiled-in handlers and exit"
+msgstr "Afficher les prises en charge disponibles et quitter"
-#: src/mn-mailboxes.c:54
-msgid "Mailbox error."
-msgstr "Erreur de boîte aux lettres."
+#: src/mn-main.c:112 src/mn-ui.c:249
+msgid "Mail Notification"
+msgstr "Notification de Courrier"
-#: src/mn-mailboxes.c:55
-#, c-format
-msgid "Mailbox <i>%s</i> is unsupported: %s."
-msgstr "La boîte aux lettres <i>%s</i> n'est pas supportée: %s."
+#: src/mn-main.c:124
+msgid "unable to initialize GnomeVFS"
+msgstr "impossible d'initialiser GnomeVFS"
-#: src/mn-mailboxes.c:66
+#: src/mn-mbox-mailbox.c:339
#, c-format
-msgid "registered remote %s mailbox %s"
-msgstr "boîte aux lettres distante (%s) %s enregistrée"
+msgid "unable to get mailbox information: %s"
+msgstr "impossible d'obtenir les informations de la boîte aux lettres: %s"
-#: src/mn-mailboxes.c:67
+#: src/mn-mbox-mailbox.c:364
#, c-format
-msgid "registered local %s mailbox %s"
-msgstr "boîte aux lettres locale (%s) %s enregistrée"
+msgid "unable to open mailbox: %s"
+msgstr "impossible d'ouvrir la boîte aux lettres: %s"
-#: src/mn-maildir-mailbox.c:110 src/mn-mbox-mailbox.c:155
-#: src/mn-mh-mailbox.c:102
+#: src/mn-mbox-mailbox.c:401
#, c-format
-msgid "unable to open %s: %s"
-msgstr "impossible d'ouvrir %s: %s"
+msgid "error while reading mailbox: %s"
+msgstr "erreur lors de la lecture de la boîte aux lettres: %s"
-#: src/mn-mbox-mailbox.c:130 src/mn-sylpheed-mailbox.c:130
+#: src/mn-mbox-mailbox.c:417
#, c-format
-msgid "unable to stat %s: %s"
-msgstr "impossible d'utiliser stat() sur %s: %s"
+msgid "unable to close mailbox: %s"
+msgstr "impossible de fermer la boîte aux lettres: %s"
-#: src/mn-mbox-mailbox.c:168
+#: src/mn-mh-mailbox.c:185
#, c-format
-msgid "unable to set the encoding for %s: %s"
-msgstr "impossible de configurer la page de code pour %s: %s"
+msgid "unable to open .mh_sequences: %s"
+msgstr "impossible d'ouvrir .mh_sequences: %s"
-#: src/mn-mbox-mailbox.c:205 src/mn-mh-mailbox.c:133
+#: src/mn-mh-mailbox.c:215
#, c-format
-msgid "error while reading %s: %s"
-msgstr "erreur lors de la lecture de %s: %s"
+msgid "error while reading .mh_sequences: %s"
+msgstr "erreur lors de la lecture de .mh_sequences: %s"
-#: src/mn-pop3-mailbox.c:219
+#: src/mn-mh-mailbox.c:231
#, c-format
-msgid "unable to parse locator \"%s\""
-msgstr "impossible d'analyser le chemin \"%s\""
+msgid "unable to close .mh_sequences: %s"
+msgstr "impossible de fermer .mh_sequences: %s"
-#: src/mn-pop3-mailbox.c:243
-#, c-format
-msgid "resolving IP address of %s"
-msgstr "résolution de l'adresse IP de %s en cours"
+#: src/mn-pending-mailbox.c:64
+msgid "detecting..."
+msgstr "en cours de détection..."
-#: src/mn-pop3-mailbox.c:249
-#, c-format
-msgid "unable to resolve %s"
-msgstr "impossible de résoudre %s"
+#: src/mn-pop3-mailbox.c:161
+msgid "unable to parse URI"
+msgstr "impossible d'interpréter l'URI"
-#: src/mn-pop3-mailbox.c:254
+#: src/mn-pop3-mailbox.c:187
#, c-format
msgid "connecting to POP3 server %s:%i"
msgstr "connection au server POP3 %s:%i en cours"
-#: src/mn-pop3-mailbox.c:263
-#, c-format
-msgid "unable to connect to %s"
-msgstr "impossible de se connecter à %s"
-
-#: src/mn-pop3-mailbox.c:268
+#: src/mn-pop3-mailbox.c:224
#, c-format
msgid "successfully connected to %s:%i"
msgstr "connecté à %s:%i"
-#: src/mn-pop3-mailbox.c:311
-#, c-format
-msgid "unable to read from %s"
-msgstr "impossible de lire depuis %s"
-
-#: src/mn-pop3-mailbox.c:371
-#, c-format
-msgid "acknowledgement error (server replied \"%s\")"
-msgstr "erreur de bienvenue (le serveur a répondu \"%s\")"
-
-#: src/mn-pop3-mailbox.c:382
-msgid "unable to send username"
-msgstr "impossible d'envoyer le nom d'utilisateur"
-
-#: src/mn-pop3-mailbox.c:390
-#, c-format
-msgid "username authentication error (server replied \"%s\")"
-msgstr ""
-"erreur d'authentification de nom d'utilisateur (le serveur a répondu \"%s\")"
-
-#: src/mn-pop3-mailbox.c:399
-msgid "unable to send password"
-msgstr "impossible d'envoyer le mot de passe"
+#: src/mn-pop3-mailbox.c:230
+msgid "unable to connect to server"
+msgstr "impossible de se connecter au serveur"
-#: src/mn-pop3-mailbox.c:407
-#, c-format
-msgid "password authentication error (server replied \"%s\")"
-msgstr ""
-"erreur d'authentification de mot de passe (le serveur a répondu \"%s\")"
-
-#: src/mn-pop3-mailbox.c:416
-msgid "unable to issue a STAT"
-msgstr "impossible d'envoyer un STAT"
-
-#: src/mn-pop3-mailbox.c:424
-#, c-format
-msgid "error in STAT reply (server replied \"%s\")"
-msgstr "erreur de réponse à STAT (le serveur a répondu \"%s\")"
-
-#: src/mn-pop3-mailbox.c:432
-#, c-format
-msgid "could not parse STAT reply \"%s\""
-msgstr "n'a pas pu analyser la réponse à STAT \"%s\""
-
-#: src/mn-pop3-mailbox.c:442
-msgid "unable to issue a QUIT"
-msgstr "impossible d'envoyer un QUIT"
+#: src/mn-pop3-mailbox.c:235
+msgid "connection to server unexpectedly closed"
+msgstr "la connection au serveur s'est close de manière inattendue"
-#: src/mn-pop3-mailbox.c:450
+#: src/mn-pop3-mailbox.c:274
#, c-format
-msgid "error in QUIT reply (server replied \"%s\")"
-msgstr "erreur de réponse à QUIT (le serveur a répondu \"%s\")"
+msgid "invalid STAT reply \"%s\""
+msgstr "réponse STAT \"%s\" invalide"
-#: src/mn-preferences.c:163
+#: src/mn-preferences.c:195 src/old/mn-preferences.c:157
msgid "Mailbox"
msgstr "Boîte aux lettres"
-#: src/mn-preferences.c:164
+#: src/mn-preferences.c:209 src/old/mn-preferences.c:171
msgid "Format"
msgstr "Format"
-#: src/mn-preferences.c:360
-msgid "Select One or More Mailboxes"
-msgstr "Sélectionnez Une ou Plusieurs Boîtes aux Lettres"
+#: src/mn-preferences.c:361 src/old/mn-preferences.c:258
+msgid "No mailbox selected."
+msgstr "Pas de boîte aux lettres sélectionnée."
-#: src/mn-preferences.c:457 src/mn-preferences.c:464 src/mn-preferences.c:471
+#: src/mn-preferences.c:366 src/old/mn-preferences.c:263
+#, c-format
+msgid "%i mailbox selected."
+msgid_plural "%i mailboxes selected."
+msgstr[0] "%i boîte aux lettres sélectionnée"
+msgstr[1] "%i boîtes aux lettres sélectionnées"
+
+#: src/mn-preferences.c:423 src/old/mn-preferences.c:318
msgid "Unable to add mailbox."
msgstr "Impossible d'ajouter la boîte aux lettres."
-#: src/mn-preferences.c:458
-msgid "The hostname field must be filled."
-msgstr "Le champ de nom d'hôte doit être rempli."
-
-#: src/mn-preferences.c:465
-msgid "The username field must be filled."
-msgstr "Le champ de nom d'utilisateur doit être rempli."
-
-#: src/mn-preferences.c:472
-msgid "The password field must be filled."
-msgstr "Le champ de mot de passe doit être rempli."
-
-#: src/mn-sylpheed-mailbox.c:108
-#, c-format
-msgid "unable to open directory %s: %s"
-msgstr "impossible d'ouvrir le répertoire %s: %s"
+#: src/mn-preferences.c:423 src/old/mn-preferences.c:318
+msgid "The mailbox is already in the list."
+msgstr "La boîte aux lettres est déjà dans la liste."
#: src/mn-ui.c:87
+msgid "A command error has occurred."
+msgstr "Une erreur de commande s'est produite."
+
+#: src/mn-ui.c:88
#, c-format
msgid "Unable to execute clicked command: %s."
msgstr "Impossible d'exécuter la commande associée au click sur l'icône: %s."
-#: src/mn-ui.c:146
-msgid "Copyright (c) 2003, 2004 Jean-Yves Lefort"
-msgstr "Copyright (c) 2003, 2004 Jean-Yves Lefort"
+#: src/mn-ui.c:179
+msgid "The following mailbox has new mail:\n"
+msgid_plural "The following mailboxes have new mail:\n"
+msgstr[0] "La boîte aux lettres suivante a du nouveau courrier:\n"
+msgstr[1] "Les boîtes aux lettres suivantes ont du nouveau courrier:\n"
+
+#: src/mn-ui.c:186
+msgid "You have no new mail."
+msgstr "Vous n'avez pas de nouveau courrier."
+
+#: src/mn-ui.c:190
+msgid "The following mailbox reported an error:\n"
+msgid_plural "The following mailboxes reported an error:\n"
+msgstr[0] "La boîte aux lettres suivante a indiqué une erreur:\n"
+msgstr[1] "Les boîtes aux lettres suivantes ont indiqué une erreur:\n"
+
+#: src/mn-ui.c:195
+msgid "The following mailbox is unsupported:\n"
+msgid_plural "The following mailboxes are unsupported:\n"
+msgstr[0] "La boîte aux lettres suivante n'est pas prise en charge:\n"
+msgstr[1] "Les boîtes aux lettres suivantes ne sont pas prises en charge:\n"
+
+#: src/mn-ui.c:252
+msgid "A Mail Notification Icon"
+msgstr "Une Icône de Notification de Courrier"
+
+#: src/mn-unsupported-mailbox.c:98
+msgid "unsupported"
+msgstr "non pris en charge"
-#: src/mn-ui.c:147
-msgid "A Mail Notification for the Panel Notification Area"
-msgstr "Une Notification de Courrier pour l'Aire de Notification du Panneau"
+#: src/mn-unsupported-mailbox.c:103
+msgid "Reason"
+msgstr "Raison"
-#: src/mn-unsupported-mailbox.c:62
-msgid "unsupported"
-msgstr "non supporté"
+#: src/mn-unsupported-mailbox.c:104
+msgid "The reason why the mailbox is unsupported"
+msgstr "La raison pour laquelle la boîte aux lettres n'est pas prise en charge"
-#: src/mn-util.c:158
+#: src/mn-util.c:110
#, c-format
msgid "error loading image: %s"
msgstr "erreur de chargement d'image: %s"
-#: ui/add-pop3-strings.c:7 ui/add-pop3-strings.c:12
-msgid "The hostname or IP address of the POP3 server"
-msgstr "Le nom d'hôte ou adresse IP du serveur POP3"
+#: src/mn-util.c:148
+#, c-format
+msgid "widget %s not found in interface %s"
+msgstr "élément %s non trouvé dans interface %s"
-#: ui/add-pop3-strings.c:8
-msgid "Add a POP3 Mailbox"
-msgstr "Ajouter une Boîte aux Lettres POP3"
+#: src/mn-util.c:255
+msgid "received an invalid URI list"
+msgstr "une liste d'URI invalide a été reçue"
-#: ui/add-pop3-strings.c:9
-msgid "<span weight=\"bold\">Server</span>"
-msgstr "<span weight=\"bold\">Serveur</span>"
+#: src/mn-util.c:291
+msgid "received an invalid Mozilla URL"
+msgstr "une URL Mozilla invalide a été reçue"
-#: ui/add-pop3-strings.c:10 ui/add-pop3-strings.c:17
-#: ui/preferences-strings.c:9 ui/preferences-strings.c:23
-#: ui/preferences-strings.c:27
+#: src/mn-util.c:383
+msgid "Unable to display help."
+msgstr "Impossible d'afficher l'aide."
+
+#: ui/mailbox-properties-strings.c:7
+msgid "_File or folder"
+msgstr "_Fichier ou dossier"
+
+#: ui/mailbox-properties-strings.c:8 ui/mailbox-properties-strings.c:14
+#: ui/preferences-strings.c:9 ui/preferences-strings.c:16
+#: ui/preferences-strings.c:18
msgid " "
msgstr " "
-#: ui/add-pop3-strings.c:11
-msgid "_Hostname:"
-msgstr "Nom d'_hôte:"
+#: ui/mailbox-properties-strings.c:9
+msgid "_Location:"
+msgstr "_Emplacement:"
+
+#: ui/mailbox-properties-strings.c:10
+msgid "The URI of the file or folder"
+msgstr "L'URI du fichier ou dossier"
-#: ui/add-pop3-strings.c:13 ui/add-pop3-strings.c:20 ui/add-pop3-strings.c:23
-#: ui/preferences-strings.c:31 ui/preferences-strings.c:35
+#: ui/mailbox-properties-strings.c:11 ui/mailbox-properties-strings.c:17
+#: ui/mailbox-properties-strings.c:22 ui/mailbox-properties-strings.c:25
+#: ui/preferences-strings.c:22 ui/preferences-strings.c:26
msgid "*"
msgstr "*"
-#: ui/add-pop3-strings.c:14
-msgid "_Port:"
-msgstr "_Port"
+#: ui/mailbox-properties-strings.c:12
+msgid "_Browse..."
+msgstr "_Parcourir..."
+
+#: ui/mailbox-properties-strings.c:13
+msgid "_POP3 mailbox"
+msgstr "Boîte aux lettres _POP3"
+
+#: ui/mailbox-properties-strings.c:15
+msgid "_Hostname:"
+msgstr "Nom d'_hôte:"
+
+#: ui/mailbox-properties-strings.c:16
+msgid "The hostname or IP address of the POP3 server"
+msgstr "Le nom d'hôte ou adresse IP du serveur POP3"
+
+#: ui/mailbox-properties-strings.c:18
+msgid "P_ort:"
+msgstr "P_ort:"
-#: ui/add-pop3-strings.c:15
+#: ui/mailbox-properties-strings.c:19
msgid "The port number of the POP3 server"
msgstr "Le numéro de port du serveur POP3"
-#: ui/add-pop3-strings.c:16
-msgid "<span weight=\"bold\">Authentication</span>"
-msgstr "<span weight=\"bold\">Authentification</span>"
-
-#: ui/add-pop3-strings.c:18
-msgid "_Username:"
-msgstr "Nom d'_utilisateur:"
+#: ui/mailbox-properties-strings.c:20
+msgid "Us_ername:"
+msgstr "Nom d'utilisat_eur:"
-#: ui/add-pop3-strings.c:19
-msgid "The login name used to authenticate yourself"
-msgstr "Votre compte utilisateur"
+#: ui/mailbox-properties-strings.c:21
+msgid "Your username on the POP3 server"
+msgstr "Votre nom d'utilisateur sur le serveur POP3"
-#: ui/add-pop3-strings.c:21
-msgid "Passw_ord:"
-msgstr "M_ot de passe:"
+#: ui/mailbox-properties-strings.c:23
+msgid "P_assword:"
+msgstr "Mot de p_asse:"
-#: ui/add-pop3-strings.c:22
-msgid "The password used to authenticate yourself"
-msgstr "Votre mot de passe"
+#: ui/mailbox-properties-strings.c:24
+msgid "Your password on the POP3 server"
+msgstr "Votre mot de passe sur le serveur POP3"
#: ui/menu-strings.c:7
-msgid "Check for new mail"
-msgstr "Vérifier le nouveau courrier"
+msgid "Update the icon"
+msgstr "Mettre l'icône à jour"
#: ui/menu-strings.c:8
-msgid "_Check for Mail"
-msgstr "_Vérifier le Courrier"
+msgid "_Update"
+msgstr "_Mettre à jour"
+
+#: ui/menu-strings.c:9
+msgid "Show help"
+msgstr "Afficher l'aide"
+
+#: ui/menu-strings.c:10
+msgid "_Help"
+msgstr "_Aide"
#: ui/preferences-strings.c:7
msgid "Mail Notification Preferences"
@@ -408,81 +447,57 @@ msgid "<span weight=\"bold\">General</span>"
msgstr "<span weight=\"bold\">Général</span>"
#: ui/preferences-strings.c:10
-msgid "Whether to periodically check for new local mail or not"
-msgstr "Vérifier périodiquement le nouveau courrier local"
+msgid "_Delay between mail checks:"
+msgstr "_Délai entre les vérifications de courrier:"
-#: ui/preferences-strings.c:11
-msgid "Check for local _mail every"
-msgstr "_Vérifier le courrier local toutes les"
+#: ui/preferences-strings.c:11 ui/preferences-strings.c:13
+msgid "The amount of time to wait between mail checks"
+msgstr "La quantité de temps à attendre entre les vérifications de courrier"
#: ui/preferences-strings.c:12
-msgid "Delay between local mail checks (minutes part)"
-msgstr "Délai entre les vérifications de courrier local (minutes)"
-
-#: ui/preferences-strings.c:13 ui/preferences-strings.c:19
msgid "minutes"
msgstr "minutes"
#: ui/preferences-strings.c:14
-msgid "Delay between local mail checks (seconds part)"
-msgstr "Délai entre les vérifications de courrier local (secondes)"
-
-#: ui/preferences-strings.c:15 ui/preferences-strings.c:21
msgid "seconds"
msgstr "secondes"
-#: ui/preferences-strings.c:16
-msgid "Whether to periodically check for new remote mail or not"
-msgstr "Vérifier périodiquement le nouveau courrier distant"
-
-#: ui/preferences-strings.c:17
-msgid "Check for rem_ote mail every"
-msgstr "Vérifier le courrier _distant toutes les"
-
-#: ui/preferences-strings.c:18
-msgid "Delay between remote mail checks (minutes part)"
-msgstr "Délai entre les vérifications de courrier distant (minutes)"
-
-#: ui/preferences-strings.c:20
-msgid "Delay between remote mail checks (seconds part)"
-msgstr "Délai entre les vérifications de courrier local (secondes)"
-
-#: ui/preferences-strings.c:22
+#: ui/preferences-strings.c:15
msgid "<span weight=\"bold\">Mailboxes</span>"
msgstr "<span weight=\"bold\">Boîtes aux lettres</span>"
-#: ui/preferences-strings.c:24
-msgid "_Add local mailbox"
-msgstr "_Ajouter une boîte aux lettres locale"
-
-#: ui/preferences-strings.c:25
-msgid "Add remo_te mailbox"
-msgstr "Ajouter une boîte aux lettres dis_tante"
-
-#: ui/preferences-strings.c:26
+#: ui/preferences-strings.c:17
msgid "<span weight=\"bold\">Commands</span>"
msgstr "<span weight=\"bold\">Commandes</span>"
-#: ui/preferences-strings.c:28
+#: ui/preferences-strings.c:19
msgid "Whether to run a command when new mail arrives or not"
msgstr "Exécuter une commande quand du nouveau courrier arrive"
-#: ui/preferences-strings.c:29
+#: ui/preferences-strings.c:20
msgid "When _new mail arrives:"
msgstr "Quand du _nouveau courrier arrive:"
-#: ui/preferences-strings.c:30
+#: ui/preferences-strings.c:21
msgid "The command to run when new mail arrives"
msgstr "La commande à exécuter quand du nouveau courrier arrive"
-#: ui/preferences-strings.c:32
+#: ui/preferences-strings.c:23
msgid "Whether to run a command when the icon is clicked or not"
msgstr "Exécuter une commande quand l'îcone est cliquée"
-#: ui/preferences-strings.c:33
+#: ui/preferences-strings.c:24
msgid "When click_ed:"
msgstr "Quand l'îcone est cliqué_e:"
-#: ui/preferences-strings.c:34
+#: ui/preferences-strings.c:25
msgid "The command to run when the icon is clicked"
msgstr "La commande à exécuter quand l'îcone est cliquée"
+
+#: ui/preferences-strings.c:27
+msgid "_Add"
+msgstr "_Ajouter"
+
+#: ui/preferences-strings.c:28
+msgid "_Remove"
+msgstr "_Enlever"
diff --git a/po/mail-notification.pot b/po/mail-notification.pot
@@ -8,13 +8,14 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-03-19 14:22+0100\n"
+"POT-Creation-Date: 2004-06-29 20:10+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: src/eggtrayicon.c:109
msgid "Orientation"
@@ -24,375 +25,405 @@ msgstr ""
msgid "The orientation of the tray."
msgstr ""
-#: src/mail-notification.c:38
-msgid "Compiled in handlers:\n"
+#: src/mn-mail-icon.c:130
+msgid "You have no new mail"
msgstr ""
-#: src/mail-notification.c:68
-msgid "Enable debugging output"
+#: src/mn-mailbox-properties-dialog.c:117
+msgid "Add a Mailbox"
msgstr ""
-#: src/mail-notification.c:77
-msgid "List compiled-in handlers and exit"
+#: src/mn-mailbox-properties-dialog.c:250
+#, c-format
+msgid "%s Properties"
msgstr ""
-#: src/mail-notification.c:93
-msgid "the GLib thread system is unavailable"
+#: src/mn-mailbox-properties-dialog.c:393
+msgid "Select a File or Folder"
msgstr ""
-#: src/mail-notification.c:100 src/mn-ui.c:144
-msgid "Mail Notification"
+#: src/mn-mailbox.c:193
+msgid "URI"
msgstr ""
-#: src/mn-check.c:75 src/mn-check.c:134
-msgid "Check error."
+#: src/mn-mailbox.c:194
+msgid "The mailbox URI"
msgstr ""
-#: src/mn-check.c:76
-#, c-format
-msgid "Unable to create a thread: %s."
+#: src/mn-mailbox.c:200
+msgid "Name"
msgstr ""
-#: src/mn-check.c:79
-#, c-format
-msgid "unable to create a thread: %s"
+#: src/mn-mailbox.c:201
+msgid "The mailbox human-readable name"
msgstr ""
-#: src/mn-check.c:126
-#, c-format
-msgid "checking if there is new mail in %s"
+#: src/mn-mailbox.c:207
+msgid "Automatic"
msgstr ""
-#: src/mn-check.c:135
-#, c-format
-msgid "Unable to check mailbox <i>%s</i>: %s."
+#: src/mn-mailbox.c:208
+msgid "Whether the mailbox has to be manually checked or not"
msgstr ""
-#: src/mn-check.c:142
-#, c-format
-msgid "unable to check mailbox %s: %s"
+#: src/mn-mailbox.c:214
+msgid "Has new"
msgstr ""
-#: src/mn-check.c:155
-#, c-format
-msgid "%s has new mail"
+#: src/mn-mailbox.c:215
+msgid "Whether the mailbox has new mail or not"
msgstr ""
-#: src/mn-check.c:156
-#, c-format
-msgid "%s has no new mail"
+#: src/mn-mailbox.c:221
+msgid "Error"
msgstr ""
-#: src/mn-check.c:216 src/mn-ui.c:86
-msgid "Command error."
+#: src/mn-mailbox.c:222
+msgid "The mailbox error if any"
msgstr ""
-#: src/mn-check.c:217
+#: src/mn-mailbox.c:248
#, c-format
-msgid "Unable to execute new mail command: %s."
+msgid "unable to cancel monitoring of %s: %s"
msgstr ""
-#: src/mn-check.c:223
-#, c-format
-msgid "unable to execute new mail command: %s"
+#: src/mn-mailbox.c:437
+msgid "does not exist"
msgstr ""
-#: src/mn-conf.c:84 src/mn-conf.c:104
-msgid "Initialization error."
+#: src/mn-mailbox.c:454
+msgid "unknown format"
msgstr ""
-#: src/mn-conf.c:85
+#: src/mn-mailbox.c:547
#, c-format
-msgid "Error while calling <i>gconf_client_notify_add()</i>: %s."
+msgid "unable to monitor %s: %s"
msgstr ""
-#: src/mn-conf.c:105
+#: src/mn-mailbox.c:561
#, c-format
-msgid "Error while calling <i>gconf_client_add_dir()</i>: %s."
-msgstr ""
+msgid ""
+"As a fallback, they will be checked every %i second (this delay is "
+"configurable from the Preferences Dialog)."
+msgid_plural ""
+"As a fallback, they will be checked every %i seconds (this delay is "
+"configurable from the Preferences Dialog)."
+msgstr[0] ""
+msgstr[1] ""
-#: src/mn-conf.c:129 src/mn-conf.c:147 src/mn-conf.c:165 src/mn-conf.c:183
+#: src/mn-mailbox.c:572
#, c-format
-msgid "unable to read in configuration key %s: %s"
-msgstr ""
+msgid ""
+"As a fallback, they will be checked every %i minute (this delay is "
+"configurable from the Preferences Dialog)."
+msgid_plural ""
+"As a fallback, they will be checked every %i minutes (this delay is "
+"configurable from the Preferences Dialog)."
+msgstr[0] ""
+msgstr[1] ""
-#: src/mn-conf.c:200 src/mn-conf.c:213 src/mn-conf.c:226 src/mn-conf.c:239
+#: src/mn-mailbox.c:583
#, c-format
-msgid "unable to write in configuration key %s: %s"
+msgid ""
+"As a fallback, they will be checked approximately every %i minute (this "
+"delay is configurable from the Preferences Dialog)."
+msgid_plural ""
+"As a fallback, they will be checked approximately every %i minutes (this "
+"delay is configurable from the Preferences Dialog)."
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/mn-mailbox.c:597
+msgid "A monitoring error has occurred."
msgstr ""
-#: src/mn-conf.c:252
+#: src/mn-mailbox.c:598
#, c-format
-msgid "unable to unset configuration key %s: %s"
+msgid ""
+"Mail Notification was unable to enable automatic notification for one or "
+"more mailboxes. %s"
msgstr ""
-#: src/mn-dialog.c:52
+#: src/mn-mailboxes.c:133
#, c-format
-msgid "%s: FATAL ERROR: %s\n"
+msgid "%s has new mail"
msgstr ""
-#: src/mn-mail-icon.c:137 src/mn-mail-icon.c:266
-msgid "You have no new mail"
+#: src/mn-mailboxes.c:133
+#, c-format
+msgid "%s has no new mail"
msgstr ""
-#: src/mn-mail-icon.c:266
-msgid "You have new mail"
+#: src/mn-mailboxes.c:143
+#, c-format
+msgid "%s reported an error: %s"
msgstr ""
-#: src/mn-mailbox.c:58
+#: src/mn-maildir-mailbox.c:226 src/mn-sylpheed-mailbox.c:209
#, c-format
-msgid "unable to initialize %s mailbox: %s"
+msgid "error while reading folder: %s"
msgstr ""
-#: src/mn-mailbox.c:139
-msgid "The mailbox's locator"
+#: src/mn-main.c:49
+msgid "Compiled in handlers:\n"
msgstr ""
-#: src/mn-mailbox.c:200
-msgid "mailbox not found"
+#: src/mn-main.c:83
+msgid "Enable informational output"
msgstr ""
-#: src/mn-mailbox.c:220
-msgid "unknown mailbox format"
+#: src/mn-main.c:92
+msgid "List compiled-in handlers and exit"
msgstr ""
-#: src/mn-mailboxes.c:54
-msgid "Mailbox error."
+#: src/mn-main.c:112 src/mn-ui.c:249
+msgid "Mail Notification"
msgstr ""
-#: src/mn-mailboxes.c:55
-#, c-format
-msgid "Mailbox <i>%s</i> is unsupported: %s."
+#: src/mn-main.c:124
+msgid "unable to initialize GnomeVFS"
msgstr ""
-#: src/mn-mailboxes.c:66
+#: src/mn-mbox-mailbox.c:339
#, c-format
-msgid "registered remote %s mailbox %s"
+msgid "unable to get mailbox information: %s"
msgstr ""
-#: src/mn-mailboxes.c:67
+#: src/mn-mbox-mailbox.c:364
#, c-format
-msgid "registered local %s mailbox %s"
+msgid "unable to open mailbox: %s"
msgstr ""
-#: src/mn-maildir-mailbox.c:110 src/mn-mbox-mailbox.c:155
-#: src/mn-mh-mailbox.c:102
+#: src/mn-mbox-mailbox.c:401
#, c-format
-msgid "unable to open %s: %s"
+msgid "error while reading mailbox: %s"
msgstr ""
-#: src/mn-mbox-mailbox.c:130 src/mn-sylpheed-mailbox.c:130
+#: src/mn-mbox-mailbox.c:417
#, c-format
-msgid "unable to stat %s: %s"
+msgid "unable to close mailbox: %s"
msgstr ""
-#: src/mn-mbox-mailbox.c:168
+#: src/mn-mh-mailbox.c:185
#, c-format
-msgid "unable to set the encoding for %s: %s"
+msgid "unable to open .mh_sequences: %s"
msgstr ""
-#: src/mn-mbox-mailbox.c:205 src/mn-mh-mailbox.c:133
+#: src/mn-mh-mailbox.c:215
#, c-format
-msgid "error while reading %s: %s"
+msgid "error while reading .mh_sequences: %s"
msgstr ""
-#: src/mn-pop3-mailbox.c:219
+#: src/mn-mh-mailbox.c:231
#, c-format
-msgid "unable to parse locator \"%s\""
+msgid "unable to close .mh_sequences: %s"
msgstr ""
-#: src/mn-pop3-mailbox.c:243
-#, c-format
-msgid "resolving IP address of %s"
+#: src/mn-pending-mailbox.c:64
+msgid "detecting..."
msgstr ""
-#: src/mn-pop3-mailbox.c:249
-#, c-format
-msgid "unable to resolve %s"
+#: src/mn-pop3-mailbox.c:161
+msgid "unable to parse URI"
msgstr ""
-#: src/mn-pop3-mailbox.c:254
+#: src/mn-pop3-mailbox.c:187
#, c-format
msgid "connecting to POP3 server %s:%i"
msgstr ""
-#: src/mn-pop3-mailbox.c:263
+#: src/mn-pop3-mailbox.c:224
#, c-format
-msgid "unable to connect to %s"
+msgid "successfully connected to %s:%i"
msgstr ""
-#: src/mn-pop3-mailbox.c:268
-#, c-format
-msgid "successfully connected to %s:%i"
+#: src/mn-pop3-mailbox.c:230
+msgid "unable to connect to server"
msgstr ""
-#: src/mn-pop3-mailbox.c:311
-#, c-format
-msgid "unable to read from %s"
+#: src/mn-pop3-mailbox.c:235
+msgid "connection to server unexpectedly closed"
msgstr ""
-#: src/mn-pop3-mailbox.c:371
+#: src/mn-pop3-mailbox.c:274
#, c-format
-msgid "acknowledgement error (server replied \"%s\")"
+msgid "invalid STAT reply \"%s\""
msgstr ""
-#: src/mn-pop3-mailbox.c:382
-msgid "unable to send username"
+#: src/mn-preferences.c:195 src/old/mn-preferences.c:157
+msgid "Mailbox"
msgstr ""
-#: src/mn-pop3-mailbox.c:390
-#, c-format
-msgid "username authentication error (server replied \"%s\")"
+#: src/mn-preferences.c:209 src/old/mn-preferences.c:171
+msgid "Format"
msgstr ""
-#: src/mn-pop3-mailbox.c:399
-msgid "unable to send password"
+#: src/mn-preferences.c:361 src/old/mn-preferences.c:258
+msgid "No mailbox selected."
msgstr ""
-#: src/mn-pop3-mailbox.c:407
+#: src/mn-preferences.c:366 src/old/mn-preferences.c:263
#, c-format
-msgid "password authentication error (server replied \"%s\")"
+msgid "%i mailbox selected."
+msgid_plural "%i mailboxes selected."
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/mn-preferences.c:423 src/old/mn-preferences.c:318
+msgid "Unable to add mailbox."
msgstr ""
-#: src/mn-pop3-mailbox.c:416
-msgid "unable to issue a STAT"
+#: src/mn-preferences.c:423 src/old/mn-preferences.c:318
+msgid "The mailbox is already in the list."
msgstr ""
-#: src/mn-pop3-mailbox.c:424
-#, c-format
-msgid "error in STAT reply (server replied \"%s\")"
+#: src/mn-ui.c:87
+msgid "A command error has occurred."
msgstr ""
-#: src/mn-pop3-mailbox.c:432
+#: src/mn-ui.c:88
#, c-format
-msgid "could not parse STAT reply \"%s\""
+msgid "Unable to execute clicked command: %s."
msgstr ""
-#: src/mn-pop3-mailbox.c:442
-msgid "unable to issue a QUIT"
-msgstr ""
+#: src/mn-ui.c:179
+msgid "The following mailbox has new mail:\n"
+msgid_plural "The following mailboxes have new mail:\n"
+msgstr[0] ""
+msgstr[1] ""
-#: src/mn-pop3-mailbox.c:450
-#, c-format
-msgid "error in QUIT reply (server replied \"%s\")"
+#: src/mn-ui.c:186
+msgid "You have no new mail."
msgstr ""
-#: src/mn-preferences.c:163
-msgid "Mailbox"
-msgstr ""
+#: src/mn-ui.c:190
+msgid "The following mailbox reported an error:\n"
+msgid_plural "The following mailboxes reported an error:\n"
+msgstr[0] ""
+msgstr[1] ""
-#: src/mn-preferences.c:164
-msgid "Format"
-msgstr ""
+#: src/mn-ui.c:195
+msgid "The following mailbox is unsupported:\n"
+msgid_plural "The following mailboxes are unsupported:\n"
+msgstr[0] ""
+msgstr[1] ""
-#: src/mn-preferences.c:360
-msgid "Select One or More Mailboxes"
+#: src/mn-ui.c:252
+msgid "A Mail Notification Icon"
msgstr ""
-#: src/mn-preferences.c:457 src/mn-preferences.c:464 src/mn-preferences.c:471
-msgid "Unable to add mailbox."
+#: src/mn-unsupported-mailbox.c:98
+msgid "unsupported"
msgstr ""
-#: src/mn-preferences.c:458
-msgid "The hostname field must be filled."
+#: src/mn-unsupported-mailbox.c:103
+msgid "Reason"
msgstr ""
-#: src/mn-preferences.c:465
-msgid "The username field must be filled."
+#: src/mn-unsupported-mailbox.c:104
+msgid "The reason why the mailbox is unsupported"
msgstr ""
-#: src/mn-preferences.c:472
-msgid "The password field must be filled."
+#: src/mn-util.c:110
+#, c-format
+msgid "error loading image: %s"
msgstr ""
-#: src/mn-sylpheed-mailbox.c:108
+#: src/mn-util.c:148
#, c-format
-msgid "unable to open directory %s: %s"
+msgid "widget %s not found in interface %s"
msgstr ""
-#: src/mn-ui.c:87
-#, c-format
-msgid "Unable to execute clicked command: %s."
+#: src/mn-util.c:255
+msgid "received an invalid URI list"
msgstr ""
-#: src/mn-ui.c:146
-msgid "Copyright (c) 2003, 2004 Jean-Yves Lefort"
+#: src/mn-util.c:291
+msgid "received an invalid Mozilla URL"
msgstr ""
-#: src/mn-ui.c:147
-msgid "A Mail Notification for the Panel Notification Area"
+#: src/mn-util.c:383
+msgid "Unable to display help."
msgstr ""
-#: src/mn-unsupported-mailbox.c:62
-msgid "unsupported"
+#: ui/mailbox-properties-strings.c:7
+msgid "_File or folder"
msgstr ""
-#: src/mn-util.c:158
-#, c-format
-msgid "error loading image: %s"
+#: ui/mailbox-properties-strings.c:8 ui/mailbox-properties-strings.c:14
+#: ui/preferences-strings.c:9 ui/preferences-strings.c:16
+#: ui/preferences-strings.c:18
+msgid " "
msgstr ""
-#: ui/add-pop3-strings.c:7 ui/add-pop3-strings.c:12
-msgid "The hostname or IP address of the POP3 server"
+#: ui/mailbox-properties-strings.c:9
+msgid "_Location:"
msgstr ""
-#: ui/add-pop3-strings.c:8
-msgid "Add a POP3 Mailbox"
+#: ui/mailbox-properties-strings.c:10
+msgid "The URI of the file or folder"
msgstr ""
-#: ui/add-pop3-strings.c:9
-msgid "<span weight=\"bold\">Server</span>"
+#: ui/mailbox-properties-strings.c:11 ui/mailbox-properties-strings.c:17
+#: ui/mailbox-properties-strings.c:22 ui/mailbox-properties-strings.c:25
+#: ui/preferences-strings.c:22 ui/preferences-strings.c:26
+msgid "*"
msgstr ""
-#: ui/add-pop3-strings.c:10 ui/add-pop3-strings.c:17
-#: ui/preferences-strings.c:9 ui/preferences-strings.c:23
-#: ui/preferences-strings.c:27
-msgid " "
+#: ui/mailbox-properties-strings.c:12
+msgid "_Browse..."
msgstr ""
-#: ui/add-pop3-strings.c:11
-msgid "_Hostname:"
+#: ui/mailbox-properties-strings.c:13
+msgid "_POP3 mailbox"
msgstr ""
-#: ui/add-pop3-strings.c:13 ui/add-pop3-strings.c:20 ui/add-pop3-strings.c:23
-#: ui/preferences-strings.c:31 ui/preferences-strings.c:35
-msgid "*"
+#: ui/mailbox-properties-strings.c:15
+msgid "_Hostname:"
msgstr ""
-#: ui/add-pop3-strings.c:14
-msgid "_Port:"
+#: ui/mailbox-properties-strings.c:16
+msgid "The hostname or IP address of the POP3 server"
msgstr ""
-#: ui/add-pop3-strings.c:15
-msgid "The port number of the POP3 server"
+#: ui/mailbox-properties-strings.c:18
+msgid "P_ort:"
msgstr ""
-#: ui/add-pop3-strings.c:16
-msgid "<span weight=\"bold\">Authentication</span>"
+#: ui/mailbox-properties-strings.c:19
+msgid "The port number of the POP3 server"
msgstr ""
-#: ui/add-pop3-strings.c:18
-msgid "_Username:"
+#: ui/mailbox-properties-strings.c:20
+msgid "Us_ername:"
msgstr ""
-#: ui/add-pop3-strings.c:19
-msgid "The login name used to authenticate yourself"
+#: ui/mailbox-properties-strings.c:21
+msgid "Your username on the POP3 server"
msgstr ""
-#: ui/add-pop3-strings.c:21
-msgid "Passw_ord:"
+#: ui/mailbox-properties-strings.c:23
+msgid "P_assword:"
msgstr ""
-#: ui/add-pop3-strings.c:22
-msgid "The password used to authenticate yourself"
+#: ui/mailbox-properties-strings.c:24
+msgid "Your password on the POP3 server"
msgstr ""
#: ui/menu-strings.c:7
-msgid "Check for new mail"
+msgid "Update the icon"
msgstr ""
#: ui/menu-strings.c:8
-msgid "_Check for Mail"
+msgid "_Update"
+msgstr ""
+
+#: ui/menu-strings.c:9
+msgid "Show help"
+msgstr ""
+
+#: ui/menu-strings.c:10
+msgid "_Help"
msgstr ""
#: ui/preferences-strings.c:7
@@ -404,81 +435,57 @@ msgid "<span weight=\"bold\">General</span>"
msgstr ""
#: ui/preferences-strings.c:10
-msgid "Whether to periodically check for new local mail or not"
+msgid "_Delay between mail checks:"
msgstr ""
-#: ui/preferences-strings.c:11
-msgid "Check for local _mail every"
+#: ui/preferences-strings.c:11 ui/preferences-strings.c:13
+msgid "The amount of time to wait between mail checks"
msgstr ""
#: ui/preferences-strings.c:12
-msgid "Delay between local mail checks (minutes part)"
-msgstr ""
-
-#: ui/preferences-strings.c:13 ui/preferences-strings.c:19
msgid "minutes"
msgstr ""
#: ui/preferences-strings.c:14
-msgid "Delay between local mail checks (seconds part)"
-msgstr ""
-
-#: ui/preferences-strings.c:15 ui/preferences-strings.c:21
msgid "seconds"
msgstr ""
-#: ui/preferences-strings.c:16
-msgid "Whether to periodically check for new remote mail or not"
-msgstr ""
-
-#: ui/preferences-strings.c:17
-msgid "Check for rem_ote mail every"
-msgstr ""
-
-#: ui/preferences-strings.c:18
-msgid "Delay between remote mail checks (minutes part)"
-msgstr ""
-
-#: ui/preferences-strings.c:20
-msgid "Delay between remote mail checks (seconds part)"
-msgstr ""
-
-#: ui/preferences-strings.c:22
+#: ui/preferences-strings.c:15
msgid "<span weight=\"bold\">Mailboxes</span>"
msgstr ""
-#: ui/preferences-strings.c:24
-msgid "_Add local mailbox"
-msgstr ""
-
-#: ui/preferences-strings.c:25
-msgid "Add remo_te mailbox"
-msgstr ""
-
-#: ui/preferences-strings.c:26
+#: ui/preferences-strings.c:17
msgid "<span weight=\"bold\">Commands</span>"
msgstr ""
-#: ui/preferences-strings.c:28
+#: ui/preferences-strings.c:19
msgid "Whether to run a command when new mail arrives or not"
msgstr ""
-#: ui/preferences-strings.c:29
+#: ui/preferences-strings.c:20
msgid "When _new mail arrives:"
msgstr ""
-#: ui/preferences-strings.c:30
+#: ui/preferences-strings.c:21
msgid "The command to run when new mail arrives"
msgstr ""
-#: ui/preferences-strings.c:32
+#: ui/preferences-strings.c:23
msgid "Whether to run a command when the icon is clicked or not"
msgstr ""
-#: ui/preferences-strings.c:33
+#: ui/preferences-strings.c:24
msgid "When click_ed:"
msgstr ""
-#: ui/preferences-strings.c:34
+#: ui/preferences-strings.c:25
msgid "The command to run when the icon is clicked"
msgstr ""
+
+#: ui/preferences-strings.c:27
+msgid "_Add"
+msgstr ""
+
+#: ui/preferences-strings.c:28
+msgid "_Remove"
+msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
@@ -19,15 +19,14 @@ endif
mail_notification_SOURCES = \
eggtrayicon.c \
eggtrayicon.h \
- mail-notification.c \
- mn-check.c \
- mn-check.h \
mn-conf.c \
mn-conf.h \
mn-dialog.c \
mn-dialog.h \
mn-mail-icon.c \
mn-mail-icon.h \
+ mn-mailbox-properties-dialog.c \
+ mn-mailbox-properties-dialog.h \
mn-mailbox.c \
mn-mailbox.h \
mn-mailboxes.c \
@@ -37,22 +36,29 @@ mail_notification_SOURCES = \
$(maildir_sources) \
$(pop3_sources) \
$(sylpheed_sources) \
+ mn-main.c \
+ mn-pending-mailbox.c \
+ mn-pending-mailbox.h \
mn-preferences.c \
mn-preferences.h \
- mn-settings.c \
- mn-settings.h \
+ mn-stock.c \
+ mn-stock.h \
mn-ui.c \
mn-ui.h \
mn-unsupported-mailbox.c \
mn-unsupported-mailbox.h \
+ mn-uri.c \
+ mn-uri.h \
mn-util.c \
- mn-util.h
+ mn-util.h \
+ mn-vfs.c \
+ mn-vfs.h
-mail_notification_LDFLAGS = $(INTLLIBS) $(GTHREAD_LIBS) $(GNOME_LIBS) $(GLADE_LIBS) $(GNET_LIBS)
+mail_notification_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(GNET_LIBS)
gnomelocaledir = $(datadir)/locale
-AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GTHREAD_CFLAGS) $(GNOME_CFLAGS) $(GLADE_CFLAGS) $(GNET_CFLAGS) \
+AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GNOME_CFLAGS) $(GNET_CFLAGS) \
-I$(top_srcdir) \
-DPREFIX="\"$(prefix)\"" \
-DSYSCONFDIR="\"$(sysconfdir)\"" \
diff --git a/src/Makefile.in b/src/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.5 from Makefile.am.
+# Makefile.in generated by automake 1.8.4 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,6 +14,8 @@
@SET_MAKE@
+SOURCES = $(mail_notification_SOURCES)
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -21,7 +23,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -35,6 +36,80 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+bin_PROGRAMS = mail-notification$(EXEEXT)
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am__mail_notification_SOURCES_DIST = eggtrayicon.c eggtrayicon.h \
+ mn-conf.c mn-conf.h mn-dialog.c mn-dialog.h mn-mail-icon.c \
+ mn-mail-icon.h mn-mailbox-properties-dialog.c \
+ mn-mailbox-properties-dialog.h mn-mailbox.c mn-mailbox.h \
+ mn-mailboxes.c mn-mailboxes.h mn-mbox-mailbox.c \
+ mn-mbox-mailbox.h mn-mh-mailbox.c mn-mh-mailbox.h \
+ mn-maildir-mailbox.c mn-maildir-mailbox.h mn-pop3-mailbox.c \
+ mn-pop3-mailbox.h mn-sylpheed-mailbox.c mn-sylpheed-mailbox.h \
+ mn-main.c mn-pending-mailbox.c mn-pending-mailbox.h \
+ mn-preferences.c mn-preferences.h mn-stock.c mn-stock.h \
+ mn-ui.c mn-ui.h mn-unsupported-mailbox.c \
+ mn-unsupported-mailbox.h mn-uri.c mn-uri.h mn-util.c mn-util.h \
+ mn-vfs.c mn-vfs.h
+@WITH_MBOX_TRUE@am__objects_1 = mn-mbox-mailbox.$(OBJEXT)
+@WITH_MH_TRUE@am__objects_2 = mn-mh-mailbox.$(OBJEXT)
+@WITH_MAILDIR_TRUE@am__objects_3 = mn-maildir-mailbox.$(OBJEXT)
+@WITH_POP3_TRUE@am__objects_4 = mn-pop3-mailbox.$(OBJEXT)
+@WITH_SYLPHEED_TRUE@am__objects_5 = mn-sylpheed-mailbox.$(OBJEXT)
+am_mail_notification_OBJECTS = eggtrayicon.$(OBJEXT) mn-conf.$(OBJEXT) \
+ mn-dialog.$(OBJEXT) mn-mail-icon.$(OBJEXT) \
+ mn-mailbox-properties-dialog.$(OBJEXT) mn-mailbox.$(OBJEXT) \
+ mn-mailboxes.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3) $(am__objects_4) $(am__objects_5) \
+ mn-main.$(OBJEXT) mn-pending-mailbox.$(OBJEXT) \
+ mn-preferences.$(OBJEXT) mn-stock.$(OBJEXT) mn-ui.$(OBJEXT) \
+ mn-unsupported-mailbox.$(OBJEXT) mn-uri.$(OBJEXT) \
+ mn-util.$(OBJEXT) mn-vfs.$(OBJEXT)
+mail_notification_OBJECTS = $(am_mail_notification_OBJECTS)
+mail_notification_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/eggtrayicon.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-conf.Po ./$(DEPDIR)/mn-dialog.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-mail-icon.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-mailbox-properties-dialog.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-mailbox.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-mailboxes.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-maildir-mailbox.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-main.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-mbox-mailbox.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-mh-mailbox.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-pending-mailbox.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-pop3-mailbox.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-preferences.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-stock.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-sylpheed-mailbox.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-ui.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-unsupported-mailbox.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-uri.Po ./$(DEPDIR)/mn-util.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mn-vfs.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(mail_notification_SOURCES)
+DIST_SOURCES = $(am__mail_notification_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -65,16 +140,12 @@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_CFLAGS = @GLADE_CFLAGS@
-GLADE_LIBS = @GLADE_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNET_CFLAGS = @GNET_CFLAGS@
GNET_LIBS = @GNET_LIBS@
GNOME_CFLAGS = @GNOME_CFLAGS@
GNOME_LIBS = @GNOME_LIBS@
-GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
-GTHREAD_LIBS = @GTHREAD_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
G_ASSERTIONS = @G_ASSERTIONS@
@@ -143,6 +214,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
+mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -150,26 +222,22 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-bin_PROGRAMS = mail-notification
-
@WITH_MBOX_TRUE@mbox_sources = mn-mbox-mailbox.c mn-mbox-mailbox.h
@WITH_MH_TRUE@mh_sources = mn-mh-mailbox.c mn-mh-mailbox.h
@WITH_MAILDIR_TRUE@maildir_sources = mn-maildir-mailbox.c mn-maildir-mailbox.h
@WITH_POP3_TRUE@pop3_sources = mn-pop3-mailbox.c mn-pop3-mailbox.h
@WITH_SYLPHEED_TRUE@sylpheed_sources = mn-sylpheed-mailbox.c mn-sylpheed-mailbox.h
-
mail_notification_SOURCES = \
eggtrayicon.c \
eggtrayicon.h \
- mail-notification.c \
- mn-check.c \
- mn-check.h \
mn-conf.c \
mn-conf.h \
mn-dialog.c \
mn-dialog.h \
mn-mail-icon.c \
mn-mail-icon.h \
+ mn-mailbox-properties-dialog.c \
+ mn-mailbox-properties-dialog.h \
mn-mailbox.c \
mn-mailbox.h \
mn-mailboxes.c \
@@ -179,23 +247,27 @@ mail_notification_SOURCES = \
$(maildir_sources) \
$(pop3_sources) \
$(sylpheed_sources) \
+ mn-main.c \
+ mn-pending-mailbox.c \
+ mn-pending-mailbox.h \
mn-preferences.c \
mn-preferences.h \
- mn-settings.c \
- mn-settings.h \
+ mn-stock.c \
+ mn-stock.h \
mn-ui.c \
mn-ui.h \
mn-unsupported-mailbox.c \
mn-unsupported-mailbox.h \
+ mn-uri.c \
+ mn-uri.h \
mn-util.c \
- mn-util.h
-
-
-mail_notification_LDFLAGS = $(INTLLIBS) $(GTHREAD_LIBS) $(GNOME_LIBS) $(GLADE_LIBS) $(GNET_LIBS)
+ mn-util.h \
+ mn-vfs.c \
+ mn-vfs.h
+mail_notification_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(GNET_LIBS)
gnomelocaledir = $(datadir)/locale
-
-AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GTHREAD_CFLAGS) $(GNOME_CFLAGS) $(GLADE_CFLAGS) $(GNET_CFLAGS) \
+AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GNOME_CFLAGS) $(GNET_CFLAGS) \
-I$(top_srcdir) \
-DPREFIX="\"$(prefix)\"" \
-DSYSCONFDIR="\"$(sysconfdir)\"" \
@@ -204,90 +276,49 @@ AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GTHREAD_CFLAGS) $(GNOME_CFLAGS) $
-DGNOMELOCALEDIR="\"$(gnomelocaledir)\"" \
-DUIDIR="\"$(pkgdatadir)/ui\""
-subdir = src
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-bin_PROGRAMS = mail-notification$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-am__mail_notification_SOURCES_DIST = eggtrayicon.c eggtrayicon.h \
- mail-notification.c mn-check.c mn-check.h mn-conf.c mn-conf.h \
- mn-dialog.c mn-dialog.h mn-mail-icon.c mn-mail-icon.h \
- mn-mailbox.c mn-mailbox.h mn-mailboxes.c mn-mailboxes.h \
- mn-mbox-mailbox.c mn-mbox-mailbox.h mn-mh-mailbox.c \
- mn-mh-mailbox.h mn-maildir-mailbox.c mn-maildir-mailbox.h \
- mn-pop3-mailbox.c mn-pop3-mailbox.h mn-sylpheed-mailbox.c \
- mn-sylpheed-mailbox.h mn-preferences.c mn-preferences.h \
- mn-settings.c mn-settings.h mn-ui.c mn-ui.h \
- mn-unsupported-mailbox.c mn-unsupported-mailbox.h mn-util.c \
- mn-util.h
-@WITH_MBOX_TRUE@am__objects_1 = mn-mbox-mailbox.$(OBJEXT)
-@WITH_MH_TRUE@am__objects_2 = mn-mh-mailbox.$(OBJEXT)
-@WITH_MAILDIR_TRUE@am__objects_3 = mn-maildir-mailbox.$(OBJEXT)
-@WITH_POP3_TRUE@am__objects_4 = mn-pop3-mailbox.$(OBJEXT)
-@WITH_SYLPHEED_TRUE@am__objects_5 = mn-sylpheed-mailbox.$(OBJEXT)
-am_mail_notification_OBJECTS = eggtrayicon.$(OBJEXT) \
- mail-notification.$(OBJEXT) mn-check.$(OBJEXT) \
- mn-conf.$(OBJEXT) mn-dialog.$(OBJEXT) mn-mail-icon.$(OBJEXT) \
- mn-mailbox.$(OBJEXT) mn-mailboxes.$(OBJEXT) $(am__objects_1) \
- $(am__objects_2) $(am__objects_3) $(am__objects_4) \
- $(am__objects_5) mn-preferences.$(OBJEXT) mn-settings.$(OBJEXT) \
- mn-ui.$(OBJEXT) mn-unsupported-mailbox.$(OBJEXT) \
- mn-util.$(OBJEXT)
-mail_notification_OBJECTS = $(am_mail_notification_OBJECTS)
-mail_notification_LDADD = $(LDADD)
-mail_notification_DEPENDENCIES =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/eggtrayicon.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mail-notification.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-check.Po ./$(DEPDIR)/mn-conf.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-dialog.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-mail-icon.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-mailbox.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-mailboxes.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-maildir-mailbox.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-mbox-mailbox.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-mh-mailbox.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-pop3-mailbox.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-preferences.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-settings.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-sylpheed-mailbox.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-ui.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-unsupported-mailbox.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/mn-util.Po
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(am__mail_notification_SOURCES_DIST)
-DIST_COMMON = Makefile.am Makefile.in
-SOURCES = $(mail_notification_SOURCES)
-
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
@@ -295,8 +326,8 @@ uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
- rm -f $(DESTDIR)$(bindir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@@ -306,64 +337,50 @@ mail-notification$(EXEEXT): $(mail_notification_OBJECTS) $(mail_notification_DEP
$(LINK) $(mail_notification_LDFLAGS) $(mail_notification_OBJECTS) $(mail_notification_LDADD) $(LIBS)
mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
+ -rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eggtrayicon.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail-notification.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-check.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-conf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-dialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mail-icon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailbox-properties-dialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailboxes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-maildir-mailbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mbox-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mh-mailbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-pending-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-pop3-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-preferences.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-settings.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-stock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-sylpheed-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-unsupported-mailbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-uri.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-util.Po@am__quote@
-
-distclean-depend:
- -rm -rf ./$(DEPDIR)
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-vfs.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCC_TRUE@ fi
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCC_TRUE@ fi
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
uninstall-info-am:
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@@ -372,6 +389,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
+tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -383,10 +401,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -z "$$unique" && unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -409,10 +428,6 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -426,7 +441,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -444,9 +459,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
-
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -458,7 +474,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -466,7 +482,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -476,14 +492,17 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
dvi: dvi-am
dvi-am:
+html: html-am
+
info: info-am
info-am:
@@ -499,7 +518,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
@@ -518,8 +538,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic ctags distclean distclean-compile \
- distclean-depend distclean-generic distclean-tags distdir dvi \
- dvi-am info info-am install install-am install-binPROGRAMS \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
diff --git a/src/eggtrayicon.c b/src/eggtrayicon.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* eggtrayicon.c
* Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- * Copyright (C) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,7 @@
#include "config.h"
#include <string.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n-lib.h>
#include "eggtrayicon.h"
diff --git a/src/mail-notification.c b/src/mail-notification.c
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-#include <gnome.h>
-#include "mn-conf.h"
-#include "mn-check.h"
-#include "mn-dialog.h"
-#include "mn-mailboxes.h"
-#include "mn-settings.h"
-#include "mn-ui.h"
-#include "mn-util.h"
-
-/*** functions ***************************************************************/
-
-static void mail_notification_list_handlers (void);
-
-/*** implementation **********************************************************/
-
-static void
-mail_notification_list_handlers (void)
-{
- g_print(_("Compiled in handlers:\n"));
-#ifdef WITH_MBOX
- g_print(" mbox\n");
-#endif
-#ifdef WITH_MH
- g_print(" MH\n");
-#endif
-#ifdef WITH_MAILDIR
- g_print(" Maildir\n");
-#endif
-#ifdef WITH_POP3
- g_print(" POP3\n");
-#endif
-#ifdef WITH_MH
- g_print(" Sylpheed\n");
-#endif
-}
-
-int
-main (int argc, char **argv)
-{
- gboolean arg_enable_debug = FALSE;
- gboolean arg_list_handlers = FALSE;
- const struct poptOption popt_options[] = {
- {
- "enable-debug",
- 0,
- POPT_ARG_NONE,
- &arg_enable_debug,
- 0,
- N_("Enable debugging output"),
- NULL
- },
- {
- "list-handlers",
- 0,
- POPT_ARG_NONE,
- &arg_list_handlers,
- 0,
- N_("List compiled-in handlers and exit"),
- NULL
- },
- POPT_TABLEEND
- };
-
-#ifdef ENABLE_NLS
- bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
- textdomain(GETTEXT_PACKAGE);
-#endif
-
- g_thread_init(NULL);
- if (g_thread_supported())
- gdk_threads_init();
- else
- mn_fatal(_("the GLib thread system is unavailable"));
-
- gnome_program_init(PACKAGE,
- VERSION,
- LIBGNOMEUI_MODULE,
- argc,
- argv,
- GNOME_PARAM_HUMAN_READABLE_NAME, _("Mail Notification"),
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- GNOME_PARAM_POPT_TABLE, popt_options,
- NULL);
-
- mn_settings.debug = arg_enable_debug;
- if (arg_list_handlers)
- {
- mail_notification_list_handlers();
- exit(0);
- }
-
- mn_conf_init();
- mn_ui_init();
-
- mn_mailboxes_register_all();
-
- if (mn_conf_get_bool("/apps/mail-notification/local/enabled"))
- mn_check(0);
- if (mn_conf_get_bool("/apps/mail-notification/remote/enabled"))
- mn_check(MN_CHECK_REMOTE);
-
- mn_check_install();
-
- GDK_THREADS_ENTER();
- gtk_main();
- GDK_THREADS_LEAVE();
-
- mn_conf_deinit();
-
- return 0;
-}
diff --git a/src/mn-check.c b/src/mn-check.c
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-#include <gdk/gdk.h>
-#include <libgnome/gnome-i18n.h>
-#include "mn-conf.h"
-#include "mn-dialog.h"
-#include "mn-ui.h"
-#include "mn-util.h"
-#include "mn-mailbox.h"
-#include "mn-mailboxes.h"
-#include "mn-check.h"
-#include "mn-settings.h"
-
-/*** variables ***************************************************************/
-
-static GStaticMutex local_mutex = G_STATIC_MUTEX_INIT;
-static GStaticMutex remote_mutex = G_STATIC_MUTEX_INIT;
-
-/*** functions ***************************************************************/
-
-static gpointer mn_check_thread_cb (gpointer data);
-static void mn_check_update_state (gboolean has_new,
- int flags);
-static void mn_check_install_callback (guint *id,
- const char *key_enabled,
- const char *key_minutes,
- const char *key_seconds,
- int flags);
-static gboolean mn_check_timeout_cb (gpointer data);
-
-/*** implementation **********************************************************/
-
-/*
- * Checks for new mail.
- *
- * FLAGS must be a bitwise or'ed combination of the MN_CHECK_* flags.
- *
- * If there is already a check (of the same type, local or remote) in
- * progress, do nothing.
- */
-void
-mn_check (int flags)
-{
- GStaticMutex *mutex = flags & MN_CHECK_REMOTE ? &remote_mutex : &local_mutex;
-
- if (g_static_mutex_trylock(mutex)) /* not already checking, proceed */
- {
- GError *err = NULL;
-
- g_static_mutex_unlock(mutex); /* will be locked in thread, not here */
-
- if (! g_thread_create(mn_check_thread_cb,
- GINT_TO_POINTER(flags),
- FALSE,
- &err))
- {
- if (flags & MN_CHECK_INTERACTIVE)
- mn_error_dialog(_("Check error."),
- _("Unable to create a thread: %s."),
- err->message);
- else
- g_warning(_("unable to create a thread: %s"), err->message);
-
- g_error_free(err);
- }
- }
-}
-
-static gpointer
-mn_check_thread_cb (gpointer data)
-{
- GSList *l;
- int flags = GPOINTER_TO_INT(data);
- GStaticMutex *mutex = flags & MN_CHECK_REMOTE ? &remote_mutex : &local_mutex;
- static gboolean has_new_local = FALSE;
- static gboolean has_new_remote = FALSE;
- gboolean *has_new = flags & MN_CHECK_REMOTE ? &has_new_remote : &has_new_local;
- static int threads = 0; /* number of check threads currently running */
- G_LOCK_DEFINE_STATIC(threads);
- GSList *mailboxes;
-
- G_LOCK(threads);
- if (threads++ == 0) /* threads just switched from 0 to 1, update */
- {
- GDK_THREADS_ENTER();
- mn_ui_set_can_check(FALSE);
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
- G_UNLOCK(threads);
-
- g_static_mutex_lock(mutex);
-
- *has_new = FALSE;
-
- mailboxes = mn_mailboxes_get();
- MN_LIST_FOREACH(l, mailboxes)
- {
- MNMailbox *mailbox = l->data;
- MNMailboxClass *class;
-
- class = g_type_class_peek(G_TYPE_FROM_INSTANCE(mailbox));
-
- if ((flags & MN_CHECK_REMOTE) == class->is_remote && class->has_new)
- {
- GError *err = NULL;
-
- if (mn_settings.debug)
- mn_notice(_("checking if there is new mail in %s"), mailbox->name);
-
- *has_new = class->has_new(mailbox, &err);
- if (err)
- {
- if (flags & MN_CHECK_INTERACTIVE)
- {
- GDK_THREADS_ENTER();
- mn_error_dialog(_("Check error."),
- _("Unable to check mailbox <i>%s</i>: %s."),
- mailbox->name,
- err->message);
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
- else
- g_warning(_("unable to check mailbox %s: %s"),
- mailbox->name,
- err->message);
-
- g_error_free(err);
-
- /* reset has_new and let proceed */
- *has_new = FALSE;
- }
- else
- {
- if (mn_settings.debug)
- mn_notice(*has_new
- ? _("%s has new mail")
- : _("%s has no new mail"),
- mailbox->name);
-
- if (*has_new)
- break;
- }
- }
- }
- mn_objects_free(mailboxes);
-
- mn_check_update_state(has_new_local || has_new_remote, flags);
-
- g_static_mutex_unlock(mutex);
-
- G_LOCK(threads);
- if (--threads == 0)
- {
- GDK_THREADS_ENTER();
- mn_ui_set_can_check(TRUE);
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
- G_UNLOCK(threads);
-
- return NULL;
-}
-
-static void
-mn_check_update_state (gboolean has_new, int flags)
-{
- static gboolean old_has_new = FALSE;
- G_LOCK_DEFINE_STATIC(old_has_new);
- gboolean state_changed;
-
- G_LOCK(old_has_new);
- state_changed = has_new != old_has_new;
- old_has_new = has_new;
- G_UNLOCK(old_has_new);
-
- if (state_changed)
- {
- GDK_THREADS_ENTER();
- mn_ui_set_has_new(has_new);
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- if (has_new && mn_conf_get_bool("/apps/mail-notification/commands/new-mail/enabled"))
- {
- const char *command;
-
- command = mn_conf_get_string("/apps/mail-notification/commands/new-mail/command");
- if (command)
- {
- GError *err = NULL;
-
- if (! g_spawn_command_line_async(command, &err))
- {
- if (flags & MN_CHECK_INTERACTIVE)
- {
- GDK_THREADS_ENTER();
- mn_error_dialog(_("Command error."),
- _("Unable to execute new mail command: %s."),
- err->message);
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
- else
- g_warning(_("unable to execute new mail command: %s"), err->message);
-
- g_error_free(err);
- }
- }
- }
- }
-}
-
-static void
-mn_check_install_callback (guint *id,
- const char *key_enabled,
- const char *key_minutes,
- const char *key_seconds,
- int flags)
-{
- if (*id != -1)
- {
- g_source_remove(*id);
- *id = -1;
- }
-
- if (mn_conf_get_bool(key_enabled))
- {
- int minutes;
- int seconds;
-
- minutes = mn_conf_get_int(key_minutes);
- seconds = mn_conf_get_int(key_seconds);
-
- *id = g_timeout_add(((minutes * 60) + seconds) * 1000,
- mn_check_timeout_cb,
- GINT_TO_POINTER(flags));
- }
-}
-
-static gboolean
-mn_check_timeout_cb (gpointer data)
-{
- int flags = GPOINTER_TO_INT(data);
-
- mn_check(flags);
-
- return TRUE;
-}
-
-void
-mn_check_install (void)
-{
- static guint local_id = -1;
- static guint remote_id = -1;
-
- mn_check_install_callback(&local_id,
- "/apps/mail-notification/local/enabled",
- "/apps/mail-notification/local/delay/minutes",
- "/apps/mail-notification/local/delay/seconds",
- 0);
-
- mn_check_install_callback(&remote_id,
- "/apps/mail-notification/remote/enabled",
- "/apps/mail-notification/remote/delay/minutes",
- "/apps/mail-notification/remote/delay/seconds",
- MN_CHECK_REMOTE);
-}
diff --git a/src/mn-check.h b/src/mn-check.h
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef _MN_CHECK_H
-#define _MN_CHECK_H
-
-#include <glib.h>
-
-#define MN_CHECK_REMOTE (1 << 0) /* check remote mailboxes */
-#define MN_CHECK_INTERACTIVE (1 << 1) /* called from the GUI */
-
-void mn_check (gboolean local);
-void mn_check_install (void);
-
-#endif /* _MN_CHECK_H */
diff --git a/src/mn-conf.c b/src/mn-conf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,22 +17,20 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
-#include <gconf/gconf-client.h>
-#include <string.h>
-#include "mn-check.h"
-#include "mn-dialog.h"
+#include <stdarg.h>
+#include <eel/eel.h>
#include "mn-mailboxes.h"
-#include "mn-preferences.h"
#include "mn-util.h"
+#include "mn-conf.h"
-/*** variables ***************************************************************/
+/*** cpp *********************************************************************/
-static GConfClient *mn_conf_client;
+#define WINDOW_WIDTH_KEY "mn-conf-window-width-key"
+#define WINDOW_HEIGHT_KEY "mn-conf-window-height-key"
/*** functions ***************************************************************/
-static void mn_conf_notify_all_cb (GConfClient *client,
+static void mn_conf_notify_delay_cb (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
gpointer user_data);
@@ -40,21 +38,47 @@ static void mn_conf_notify_mailboxes_cb (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
gpointer user_data);
-static void mn_conf_install_notify (const char *namespace_section,
- GConfClientNotifyFunc func);
-static int mn_conf_mailbox_cmp (gconstpointer a,
- gconstpointer b);
+
+static gboolean mn_conf_link_window_h (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data);
+static void mn_conf_link_window_notify_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
+
+static void mn_conf_link_toggle_button_h (GtkToggleButton*button,
+ gpointer user_data);
+static void mn_conf_link_toggle_button_notify_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
+
+static void mn_conf_link_spin_button_h (GtkSpinButton *button,
+ gpointer user_data);
+static void mn_conf_link_spin_button_notify_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
+
+static void mn_conf_link_entry_h (GtkEditable *editable, gpointer user_data);
+static void mn_conf_link_entry_notify_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
+
+static void mn_conf_link_weak_notify_cb (gpointer data,
+ GObject *former_object);
/*** implementation **********************************************************/
static void
-mn_conf_notify_all_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+mn_conf_notify_delay_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
- mn_preferences_update_values();
- mn_check_install();
+ mn_mailboxes_install_timeout();
}
static void
@@ -63,225 +87,218 @@ mn_conf_notify_mailboxes_cb (GConfClient *client,
GConfEntry *entry,
gpointer user_data)
{
- mn_mailboxes_register_all();
- mn_preferences_update_values();
-}
-
-static void
-mn_conf_install_notify (const char *namespace_section,
- GConfClientNotifyFunc func)
-{
- GError *err = NULL;
-
- gconf_client_notify_add(mn_conf_client,
- namespace_section,
- func,
- NULL,
- NULL,
- &err);
- if (err)
- {
- mn_error_dialog(_("Initialization error."),
- _("Error while calling <i>gconf_client_notify_add()</i>: %s."),
- err->message);
- g_error_free(err);
- }
+ mn_mailboxes_register();
}
void
mn_conf_init (void)
{
- GError *err = NULL;
+ GSList *gconf_mailboxes;
+ GSList *l;
- mn_conf_client = gconf_client_get_default();
+ /* convert old style locators */
- gconf_client_add_dir(mn_conf_client,
- "/apps/mail-notification",
- GCONF_CLIENT_PRELOAD_NONE,
- &err);
- if (err)
+ gconf_mailboxes = eel_gconf_get_string_list(MN_CONF_MAILBOXES);
+ MN_LIST_FOREACH(l, gconf_mailboxes)
{
- mn_error_dialog(_("Initialization error."),
- _("Error while calling <i>gconf_client_add_dir()</i>: %s."),
- err->message);
- g_error_free(err);
+ char *locator_or_uri = l->data;
+ char *uri;
+
+ if (locator_or_uri[0] == '/')
+ uri = g_strconcat("file://", locator_or_uri, NULL);
+ else if (! strncmp(locator_or_uri, "pop3:", 5))
+ uri = g_strconcat("pop://", locator_or_uri + 5, NULL);
+ else
+ uri = g_strdup(locator_or_uri);
+
+ g_free(locator_or_uri);
+ l->data = uri;
}
+ eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
+ mn_slist_free(gconf_mailboxes);
- mn_conf_install_notify("/apps/mail-notification", mn_conf_notify_all_cb);
- mn_conf_install_notify("/apps/mail-notification/mailboxes", mn_conf_notify_mailboxes_cb);
-}
-
-void
-mn_conf_deinit (void)
-{
- g_object_unref(G_OBJECT(mn_conf_client));
-}
+ /* monitor some keys */
-gboolean
-mn_conf_get_bool (const char *key)
-{
- GError *err = NULL;
- gboolean value;
+ eel_gconf_monitor_add(MN_CONF_NAMESPACE);
- value = gconf_client_get_bool(mn_conf_client, key, &err);
- if (err)
- {
- g_warning(_("unable to read in configuration key %s: %s"), key, err->message);
- g_error_free(err);
-
- value = FALSE; /* fallback */
- }
-
- return value;
+ eel_gconf_notification_add(MN_CONF_DELAY_NAMESPACE, mn_conf_notify_delay_cb, NULL);
+ eel_gconf_notification_add(MN_CONF_MAILBOXES, mn_conf_notify_mailboxes_cb, NULL);
}
-int
-mn_conf_get_int (const char *key)
+void
+mn_conf_link (GtkWidget *widget, ...)
{
- GError *err = NULL;
- int value;
+ va_list args;
- value = gconf_client_get_int(mn_conf_client, key, &err);
- if (err)
+ va_start(args, widget);
+ while (widget)
{
- g_warning(_("unable to read in configuration key %s: %s"), key, err->message);
- g_error_free(err);
-
- value = 0; /* fallback */
+ const char *key;
+ const char *signal_name;
+ GCallback signal_handler;
+ GConfClientNotifyFunc notification_cb;
+ unsigned int notification_id;
+
+ key = va_arg(args, const char *);
+ g_return_if_fail(key != NULL);
+
+ /* the order of these tests is important */
+ if (GTK_IS_WINDOW(widget))
+ {
+ char *width_key;
+ char *height_key;
+
+ width_key = g_strdup_printf("%s/width", key);
+ height_key = g_strdup_printf("%s/height", key);
+
+ g_object_set_data_full(G_OBJECT(widget), WINDOW_WIDTH_KEY, width_key, g_free);
+ g_object_set_data_full(G_OBJECT(widget), WINDOW_HEIGHT_KEY, height_key, g_free);
+
+ gtk_window_set_default_size(GTK_WINDOW(widget),
+ eel_gconf_get_integer(width_key),
+ eel_gconf_get_integer(height_key));
+
+ signal_name = "configure-event";
+ signal_handler = G_CALLBACK(mn_conf_link_window_h);
+ notification_cb = mn_conf_link_window_notify_cb;
+ }
+ else if (GTK_IS_TOGGLE_BUTTON(widget))
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), eel_gconf_get_boolean(key));
+
+ signal_name = "toggled";
+ signal_handler = G_CALLBACK(mn_conf_link_toggle_button_h);
+ notification_cb = mn_conf_link_toggle_button_notify_cb;
+ }
+ else if (GTK_IS_SPIN_BUTTON(widget))
+ {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), eel_gconf_get_integer(key));
+
+ signal_name = "value-changed";
+ signal_handler = G_CALLBACK(mn_conf_link_spin_button_h);
+ notification_cb = mn_conf_link_spin_button_notify_cb;
+ }
+ else if (GTK_IS_ENTRY(widget))
+ {
+ char *str;
+
+ str = eel_gconf_get_string(key);
+ gtk_entry_set_text(GTK_ENTRY(widget), str ? str : "");
+ g_free(str);
+
+ signal_name = "changed";
+ signal_handler = G_CALLBACK(mn_conf_link_entry_h);
+ notification_cb = mn_conf_link_entry_notify_cb;
+ }
+ else
+ g_return_if_reached();
+
+ g_signal_connect_data(widget, signal_name, signal_handler, g_strdup(key), (GClosureNotify) g_free, 0);
+ notification_id = eel_gconf_notification_add(key, notification_cb, widget);
+ g_object_weak_ref(G_OBJECT(widget), mn_conf_link_weak_notify_cb, GUINT_TO_POINTER(notification_id));
+
+ widget = va_arg(args, GtkWidget *);
}
-
- return value;
+ va_end(args);
}
-char *
-mn_conf_get_string (const char *key)
+static gboolean
+mn_conf_link_window_h (GtkWidget *widget,
+ GdkEventConfigure *event,
+ gpointer user_data)
{
- GError *err = NULL;
- char *value;
+ const char *width_key = g_object_get_data(G_OBJECT(widget), WINDOW_WIDTH_KEY);
+ const char *height_key = g_object_get_data(G_OBJECT(widget), WINDOW_HEIGHT_KEY);
- value = gconf_client_get_string(mn_conf_client, key, &err);
- if (err)
- {
- g_warning(_("unable to read in configuration key %s: %s"), key, err->message);
- g_error_free(err);
-
- value = NULL; /* fallback */
- }
+ eel_gconf_set_integer(width_key, event->width);
+ eel_gconf_set_integer(height_key, event->height);
- return value;
+ return FALSE;
}
-GSList *
-mn_conf_get_list (const char *key, GConfValueType list_type)
+static void
+mn_conf_link_window_notify_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
- GError *err = NULL;
- GSList *value;
-
- value = gconf_client_get_list(mn_conf_client, key, list_type, &err);
- if (err)
- {
- g_warning(_("unable to read in configuration key %s: %s"), key, err->message);
- g_error_free(err);
-
- value = NULL; /* fallback */
- }
+ GtkWindow *window = user_data;
+ const char *width_key = g_object_get_data(G_OBJECT(window), WINDOW_WIDTH_KEY);
+ const char *height_key = g_object_get_data(G_OBJECT(window), WINDOW_HEIGHT_KEY);
- return value;
+ gtk_window_resize(window,
+ eel_gconf_get_integer(width_key),
+ eel_gconf_get_integer(height_key));
}
-void
-mn_conf_set_bool (const char *key, gboolean value)
+static void
+mn_conf_link_toggle_button_h (GtkToggleButton *button, gpointer user_data)
{
- GError *err = NULL;
-
- gconf_client_set_bool(mn_conf_client, key, value, &err);
- if (err)
- {
- g_warning(_("unable to write in configuration key %s: %s"), key, err->message);
- g_error_free(err);
- }
+ const char *key = user_data;
+ eel_gconf_set_boolean(key, gtk_toggle_button_get_active(button));
}
-void
-mn_conf_set_int (const char *key, int value)
+static void
+mn_conf_link_toggle_button_notify_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
- GError *err = NULL;
+ GConfValue *value = gconf_entry_get_value(entry);
+ GtkToggleButton *button = user_data;
- gconf_client_set_int(mn_conf_client, key, value, &err);
- if (err)
- {
- g_warning(_("unable to write in configuration key %s: %s"), key, err->message);
- g_error_free(err);
- }
+ gtk_toggle_button_set_active(button, gconf_value_get_bool(value));
}
-void
-mn_conf_set_string (const char *key, const char *value)
+static void
+mn_conf_link_spin_button_h (GtkSpinButton *button, gpointer user_data)
{
- GError *err = NULL;
-
- gconf_client_set_string(mn_conf_client, key, value, &err);
- if (err)
- {
- g_warning(_("unable to write in configuration key %s: %s"), key, err->message);
- g_error_free(err);
- }
+ const char *key = user_data;
+ eel_gconf_set_integer(key, gtk_spin_button_get_value_as_int(button));
}
-void
-mn_conf_set_list (const char *key, GConfValueType list_type, GSList *value)
+static void
+mn_conf_link_spin_button_notify_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
- GError *err = NULL;
+ GConfValue *value = gconf_entry_get_value(entry);
+ GtkSpinButton *button = user_data;
- gconf_client_set_list(mn_conf_client, key, list_type, value, &err);
- if (err)
- {
- g_warning(_("unable to write in configuration key %s: %s"), key, err->message);
- g_error_free(err);
- }
+ gtk_spin_button_set_value(button, gconf_value_get_int(value));
}
-void
-mn_conf_unset (const char *key)
+static void
+mn_conf_link_entry_h (GtkEditable *editable, gpointer user_data)
{
- GError *err = NULL;
-
- gconf_client_unset(mn_conf_client, key, &err);
- if (err)
- {
- g_warning(_("unable to unset configuration key %s: %s"), key, err->message);
- g_error_free(err);
- }
+ const char *key = user_data;
+ const char *str;
+
+ str = gtk_entry_get_text(GTK_ENTRY(editable));
+ if (*str)
+ eel_gconf_set_string(key, str);
+ else
+ eel_gconf_unset(key);
}
-void
-mn_conf_remove_mailbox (const char *locator)
+static void
+mn_conf_link_entry_notify_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
- GSList *gconf_mailboxes;
- GSList *elem;
+ GConfValue *value = gconf_entry_get_value(entry);
+ GtkEntry *entry_widget = user_data;
+ const char *str;
- gconf_mailboxes = mn_conf_get_list("/apps/mail-notification/mailboxes", GCONF_VALUE_STRING);
- elem = g_slist_find_custom(gconf_mailboxes, locator, mn_conf_mailbox_cmp);
-
- if (elem)
- {
- gconf_mailboxes = g_slist_remove_link(gconf_mailboxes, elem);
-
- g_free(elem->data);
- g_slist_free(elem);
- }
-
- mn_conf_set_list("/apps/mail-notification/mailboxes",
- GCONF_VALUE_STRING,
- gconf_mailboxes);
- mn_slist_free(gconf_mailboxes);
+ str = gconf_value_get_string(value);
+ gtk_entry_set_text(entry_widget, str ? str : "");
}
-/*
- * Just in case strcmp() is implemented as a macro.
- */
-static int
-mn_conf_mailbox_cmp (gconstpointer a, gconstpointer b)
+static void
+mn_conf_link_weak_notify_cb (gpointer data, GObject *former_object)
{
- return strcmp(a, b);
+ unsigned int notification_id = GPOINTER_TO_UINT(data);
+ eel_gconf_notification_remove(notification_id);
}
diff --git a/src/mn-conf.h b/src/mn-conf.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,27 +19,32 @@
#ifndef _MN_CONF_H
#define _MN_CONF_H
-#include <gconf/gconf-client.h>
+#include <stdarg.h>
+#include <eel/eel.h>
-void mn_conf_init (void);
-void mn_conf_deinit (void);
+#define MN_CONF_NAMESPACE "/apps/mail-notification"
+#define MN_CONF_LOCAL_NAMESPACE MN_CONF_NAMESPACE "/local" /* obsolete */
+#define MN_CONF_LOCAL_ENABLED MN_CONF_LOCAL_NAMESPACE "/enabled" /* obsolete */
+#define MN_CONF_LOCAL_DELAY_MINUTES MN_CONF_LOCAL_NAMESPACE "/delay/minutes" /* obsolete */
+#define MN_CONF_LOCAL_DELAY_SECONDS MN_CONF_LOCAL_NAMESPACE "/delay/seconds" /* obsolete */
+#define MN_CONF_REMOTE_NAMESPACE MN_CONF_NAMESPACE "/remote" /* obsolete */
+#define MN_CONF_REMOTE_ENABLED MN_CONF_REMOTE_NAMESPACE "/enabled" /* obsolete */
+#define MN_CONF_REMOTE_DELAY_MINUTES MN_CONF_REMOTE_NAMESPACE "/delay/minutes" /* obsolete */
+#define MN_CONF_REMOTE_DELAY_SECONDS MN_CONF_REMOTE_NAMESPACE "/delay/seconds" /* obsolete */
+#define MN_CONF_DELAY_NAMESPACE MN_CONF_NAMESPACE "/delay"
+#define MN_CONF_DELAY_MINUTES MN_CONF_DELAY_NAMESPACE "/minutes"
+#define MN_CONF_DELAY_SECONDS MN_CONF_DELAY_NAMESPACE "/seconds"
+#define MN_CONF_COMMANDS_NEW_MAIL_ENABLED MN_CONF_NAMESPACE "/commands/new-mail/enabled"
+#define MN_CONF_COMMANDS_NEW_MAIL_COMMAND MN_CONF_NAMESPACE "/commands/new-mail/command"
+#define MN_CONF_COMMANDS_CLICKED_ENABLED MN_CONF_NAMESPACE "/commands/clicked/enabled"
+#define MN_CONF_COMMANDS_CLICKED_COMMAND MN_CONF_NAMESPACE "/commands/clicked/command"
+#define MN_CONF_MAILBOXES MN_CONF_NAMESPACE "/mailboxes"
+#define MN_CONF_UI_NAMESPACE MN_CONF_NAMESPACE "/ui"
+#define MN_CONF_PREFERENCES_DIALOG MN_CONF_UI_NAMESPACE "/preferences-dialog"
-gboolean mn_conf_get_bool (const char *key);
-int mn_conf_get_int (const char *key);
-char *mn_conf_get_string (const char *key);
-GSList *mn_conf_get_list (const char *key,
- GConfValueType list_type);
+void mn_conf_init (void);
-void mn_conf_set_bool (const char *key,
- gboolean value);
-void mn_conf_set_int (const char *key,
- int value);
-void mn_conf_set_string (const char *key,
- const char *value);
-void mn_conf_set_list (const char *key,
- GConfValueType list_type,
- GSList *value);
-void mn_conf_unset (const char *key);
-void mn_conf_remove_mailbox (const char *locator);
+void mn_conf_link (GtkWidget *widget,
+ ...);
#endif /* _MN_CONF_H */
diff --git a/src/mn-dialog.c b/src/mn-dialog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,42 +17,14 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
-#include <gtk/gtk.h>
-#include <glade/glade.h>
#include <stdarg.h>
#include <stdlib.h>
+#include <glib/gi18n-lib.h>
+#include <gtk/gtk.h>
#include "mn-util.h"
/*** implementation **********************************************************/
-void
-mn_notice (const char *format, ...)
-{
- va_list args;
- char *message;
-
- va_start(args, format);
- message = g_strdup_vprintf(format, args);
- va_end(args);
-
- g_printerr(PACKAGE ": %s\n", message);
-}
-
-void
-mn_fatal (const char *format, ...)
-{
- va_list args;
- char *message;
-
- va_start(args, format);
- message = g_strdup_vprintf(format, args);
- va_end(args);
-
- g_printerr(_("%s: FATAL ERROR: %s\n"), PACKAGE, message);
- exit(1);
-}
-
/*
* Displays an HIG-compliant modal dialog.
*
@@ -60,22 +32,26 @@ mn_fatal (const char *format, ...)
* http://bugzilla.gnome.org/show_bug.cgi?id=98779.
*/
void
-mn_error_dialog (const char *primary,
+mn_error_dialog (const char *help_link_id,
+ const char *primary,
const char *format,
...)
{
- GladeXML *xml;
GtkWidget *dialog;
GtkWidget *label;
char *secondary = NULL;
GString *message;
+ char *escaped;
- xml = mn_glade_xml_new("dialog");
+ mn_create_interface("dialog",
+ "dialog", &dialog,
+ "label", &label,
+ NULL);
- dialog = glade_xml_get_widget(xml, "dialog");
- label = glade_xml_get_widget(xml, "label");
-
gtk_window_set_title(GTK_WINDOW(dialog), "");
+
+ if (help_link_id != NULL)
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_HELP, GTK_RESPONSE_HELP);
gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_OK, GTK_RESPONSE_OK);
message = g_string_new(NULL);
@@ -90,25 +66,29 @@ mn_error_dialog (const char *primary,
}
if (primary)
- g_string_printf(message,
- "<span weight=\"bold\" size=\"larger\">%s</span>",
- primary);
+ {
+ escaped = g_markup_printf_escaped("<span weight=\"bold\" size=\"larger\">%s</span>", primary);
+ g_string_append(message, escaped);
+ g_free(escaped);
+ }
if (secondary)
{
if (primary)
g_string_append(message, "\n\n");
- g_string_append(message, secondary);
+ escaped = g_markup_escape_text(secondary, -1);
+ g_free(secondary);
+
+ g_string_append(message, escaped);
+ g_free(escaped);
}
- g_free(secondary);
-
gtk_label_set_markup(GTK_LABEL(label), message->str);
g_string_free(message, TRUE);
- gtk_dialog_run(GTK_DIALOG(dialog));
+ while (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_HELP)
+ mn_display_help(help_link_id);
gtk_widget_destroy(dialog);
- g_object_unref(xml);
}
diff --git a/src/mn-dialog.h b/src/mn-dialog.h
@@ -21,11 +21,8 @@
#include <stdarg.h>
-void mn_notice (const char *format,
- ...);
-void mn_fatal (const char *format,
- ...);
-void mn_error_dialog (const char *primary,
+void mn_error_dialog (const char *help_link_id,
+ const char *primary,
const char *format,
...);
diff --git a/src/mn-mail-icon.c b/src/mn-mail-icon.c
@@ -17,16 +17,12 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "mn-mail-icon.h"
+#include "mn-stock.h"
#include "mn-util.h"
-/*** cpp *********************************************************************/
-
-#define MAIL_NOTIFICATION_STOCK_MAIL "mail-notification-mail"
-#define MAIL_NOTIFICATION_STOCK_NO_MAIL "mail-notification-no-mail"
-
/*** types *******************************************************************/
enum {
@@ -52,8 +48,6 @@ static void mn_mail_icon_class_init (MNMailIconClass *class);
static void mn_mail_icon_init (MNMailIcon *icon);
static void mn_mail_icon_finalize (GObject *object);
-static void mn_mail_icon_stock_init (void);
-
static gboolean mn_mail_icon_press (GtkWidget *widget,
GdkEventButton *event,
gpointer data);
@@ -100,8 +94,6 @@ mn_mail_icon_class_init (MNMailIconClass *class)
object_class->finalize = mn_mail_icon_finalize;
- mn_mail_icon_stock_init();
-
mail_icon_signals[ACTIVATE] = g_signal_new("activate",
MN_TYPE_MAIL_ICON,
G_SIGNAL_RUN_LAST,
@@ -128,10 +120,11 @@ mn_mail_icon_init (MNMailIcon *icon)
g_object_ref(icon->priv->tooltips);
gtk_object_sink(GTK_OBJECT(icon->priv->tooltips));
- icon->priv->image = gtk_image_new_from_stock(MAIL_NOTIFICATION_STOCK_NO_MAIL, GTK_ICON_SIZE_MENU);
+ icon->priv->image = gtk_image_new_from_stock(MN_STOCK_NO_MAIL, GTK_ICON_SIZE_MENU);
/* configure widgets */
+ mn_setup_dnd(event_box);
gtk_tooltips_set_tip(icon->priv->tooltips,
GTK_WIDGET(icon),
_("You have no new mail"),
@@ -162,46 +155,12 @@ mn_mail_icon_finalize (GObject *object)
g_object_unref(icon->priv->tooltips);
if (icon->priv->menu)
- gtk_widget_destroy(GTK_WIDGET(icon->priv->menu));
+ g_object_unref(icon->priv->menu);
g_free(icon->priv);
G_OBJECT_CLASS(parent_class)->finalize(object);
}
-static void
-mn_mail_icon_stock_init (void)
-{
- const struct
- {
- const char *stock_id;
- const char *filename;
- } icons[] = {
- { MAIL_NOTIFICATION_STOCK_MAIL, "mail.png" },
- { MAIL_NOTIFICATION_STOCK_NO_MAIL, "no-mail.png" }
- };
- GtkIconFactory *factory;
- int i;
-
- factory = gtk_icon_factory_new();
- gtk_icon_factory_add_default(factory);
-
- for (i = 0; i < G_N_ELEMENTS(icons); i++)
- {
- GtkIconSet *icon_set;
- GdkPixbuf *pixbuf;
-
- pixbuf = mn_pixbuf_new(icons[i].filename);
-
- icon_set = gtk_icon_set_new_from_pixbuf(pixbuf);
- g_object_unref(pixbuf);
-
- gtk_icon_factory_add(factory, icons[i].stock_id, icon_set);
- gtk_icon_set_unref(icon_set);
- }
-
- g_object_unref(factory);
-}
-
static gboolean
mn_mail_icon_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
{
@@ -240,9 +199,6 @@ mn_mail_icon_new (void)
return g_object_new(MN_TYPE_MAIL_ICON, "title", "Mail Notification", NULL);
}
-/*
- * This owns MENU.
- */
void
mn_mail_icon_set_popup_menu (MNMailIcon *icon, GtkMenu *menu)
{
@@ -250,19 +206,26 @@ mn_mail_icon_set_popup_menu (MNMailIcon *icon, GtkMenu *menu)
g_return_if_fail(GTK_IS_MENU(menu));
g_return_if_fail(icon->priv->menu == NULL);
+ g_object_ref(menu);
+ gtk_object_sink(GTK_OBJECT(menu));
+
icon->priv->menu = menu;
}
void
-mn_mail_icon_set_has_new (MNMailIcon *icon, gboolean has_new)
+mn_mail_icon_set_from_stock (MNMailIcon *icon, const char *stock_id)
{
g_return_if_fail(MN_IS_MAIL_ICON(icon));
+ g_return_if_fail(stock_id != NULL);
- gtk_image_set_from_stock(GTK_IMAGE(icon->priv->image),
- has_new ? MAIL_NOTIFICATION_STOCK_MAIL : MAIL_NOTIFICATION_STOCK_NO_MAIL,
- GTK_ICON_SIZE_MENU);
- gtk_tooltips_set_tip(icon->priv->tooltips,
- GTK_WIDGET(icon),
- has_new ? _("You have new mail") : _("You have no new mail"),
- NULL);
+ gtk_image_set_from_stock(GTK_IMAGE(icon->priv->image), stock_id, GTK_ICON_SIZE_MENU);
+}
+
+void
+mn_mail_icon_set_tooltip (MNMailIcon *icon, const char *tooltip)
+{
+ g_return_if_fail(MN_IS_MAIL_ICON(icon));
+ g_return_if_fail(tooltip != NULL);
+
+ gtk_tooltips_set_tip(icon->priv->tooltips, GTK_WIDGET(icon), tooltip, NULL);
}
diff --git a/src/mn-mail-icon.h b/src/mn-mail-icon.h
@@ -43,7 +43,7 @@ typedef struct
EggTrayIconClass icon_class;
/* signals */
- void (*activate) (void);
+ void (*activate) (MNMailIcon *icon);
} MNMailIconClass;
GType mn_mail_icon_get_type (void);
@@ -51,7 +51,9 @@ GType mn_mail_icon_get_type (void);
GtkWidget *mn_mail_icon_new (void);
void mn_mail_icon_set_popup_menu (MNMailIcon *icon,
GtkMenu *menu);
-void mn_mail_icon_set_has_new (MNMailIcon *icon,
- gboolean has_new);
+void mn_mail_icon_set_from_stock (MNMailIcon *icon,
+ const char *stock_id);
+void mn_mail_icon_set_tooltip (MNMailIcon *icon,
+ const char *tooltip);
#endif /* _MN_MAIL_ICON_H */
diff --git a/src/mn-mailbox-properties-dialog.c b/src/mn-mailbox-properties-dialog.c
@@ -0,0 +1,471 @@
+/*
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+#include "mn-mailbox-properties-dialog.h"
+#include "mn-conf.h"
+#include "mn-util.h"
+#include "mn-uri.h"
+
+/*** types *******************************************************************/
+
+typedef struct
+{
+ GtkWidget *file_radio;
+ GtkWidget *location_label;
+ GtkWidget *location_entry;
+ GtkWidget *browse;
+ GtkWidget *pop3_radio;
+ GtkWidget *hostname_label;
+ GtkWidget *hostname_entry;
+ GtkWidget *port_label;
+ GtkWidget *port_spin;
+ GtkWidget *username_label;
+ GtkWidget *username_entry;
+ GtkWidget *password_label;
+ GtkWidget *password_entry;
+
+ MNMailboxPropertiesDialogMode mode;
+ char *uri;
+ GtkWidget *apply_button;
+ GtkWidget *accept_button;
+} Private;
+
+typedef enum
+{
+ RADIO_FILE,
+ RADIO_POP3
+} Radio;
+
+/*** variables ***************************************************************/
+
+static Radio selected_radio = RADIO_FILE;
+static char *current_folder_uri = NULL;
+
+/*** functions ***************************************************************/
+
+static void mn_mailbox_properties_dialog_private_free (Private *private);
+static gboolean mn_mailbox_properties_dialog_is_complete (MNMailboxPropertiesDialog *dialog);
+static void mn_mailbox_properties_dialog_update_sensitivity (MNMailboxPropertiesDialog *dialog);
+static void mn_mailbox_properties_dialog_set_uri_internal (MNMailboxPropertiesDialog *dialog,
+ const char *uri);
+static void mn_mailbox_properties_dialog_fill (MNMailboxPropertiesDialog *dialog);
+static void mn_mailbox_properties_dialog_current_folder_changed_h (GtkFileChooser *chooser,
+ gpointer user_data);
+
+/*** implementation **********************************************************/
+
+GtkWidget *
+mn_mailbox_properties_dialog_new (GtkWindow *parent,
+ MNMailboxPropertiesDialogMode mode)
+{
+ MNMailboxPropertiesDialog *dialog;
+ Private *private;
+ GtkSizeGroup *size_group;
+
+ private = g_new0(Private, 1);
+ mn_create_interface("mailbox-properties",
+ "dialog", (GtkWidget **) &dialog,
+ "file_radio", &private->file_radio,
+ "location_label", &private->location_label,
+ "location_entry", &private->location_entry,
+ "browse", &private->browse,
+ "pop3_radio", &private->pop3_radio,
+ "hostname_label", &private->hostname_label,
+ "hostname_entry", &private->hostname_entry,
+ "port_label", &private->port_label,
+ "port_spin", &private->port_spin,
+ "username_label", &private->username_label,
+ "username_entry", &private->username_entry,
+ "password_label", &private->password_label,
+ "password_entry", &private->password_entry,
+ NULL);
+ private->mode = mode;
+
+ g_object_set_data_full(G_OBJECT(dialog),
+ MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE_KEY,
+ private,
+ (GDestroyNotify) mn_mailbox_properties_dialog_private_free);
+
+ size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ gtk_size_group_add_widget(size_group, private->location_label);
+ gtk_size_group_add_widget(size_group, private->hostname_label);
+ gtk_size_group_add_widget(size_group, private->username_label);
+ g_object_unref(size_group);
+
+ if (parent)
+ gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+ if (mode == MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD)
+ {
+ gtk_window_set_title(GTK_WINDOW(dialog), _("Add a Mailbox"));
+
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ private->accept_button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT);
+ }
+ else if (mode == MN_MAILBOX_PROPERTIES_DIALOG_MODE_EDIT)
+ {
+ /* title will be set in _set_uri_internal() */
+
+ private->apply_button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_APPLY, GTK_RESPONSE_APPLY);
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ private->accept_button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_OK, GTK_RESPONSE_OK);
+ }
+ else
+ g_return_val_if_reached(NULL);
+ gtk_widget_grab_default(private->accept_button);
+
+#ifndef WITH_POP3
+ gtk_widget_set_sensitive(private->pop3_radio, FALSE);
+#endif
+
+ if (mode == MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD)
+ {
+ GtkWidget *default_radio;
+
+ switch (selected_radio)
+ {
+ case RADIO_FILE: default_radio = private->file_radio; break;
+ case RADIO_POP3: default_radio = private->pop3_radio; break;
+ default: g_return_val_if_reached(NULL);
+ }
+
+ if (! GTK_WIDGET_IS_SENSITIVE(default_radio))
+ default_radio = private->file_radio;
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(default_radio), TRUE);
+ }
+
+ mn_mailbox_properties_dialog_update_sensitivity(dialog);
+
+ return GTK_WIDGET(dialog);
+}
+
+static void
+mn_mailbox_properties_dialog_private_free (Private *private)
+{
+ g_return_if_fail(private != NULL);
+
+ g_free(private->uri);
+ g_free(private);
+}
+
+static gboolean
+mn_mailbox_properties_dialog_is_complete (MNMailboxPropertiesDialog *dialog)
+{
+ Private *private;
+ gboolean is_complete = FALSE;
+
+ g_return_val_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog), FALSE);
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(private->file_radio)))
+ {
+ const char *location;
+
+ location = gtk_entry_get_text(GTK_ENTRY(private->location_entry));
+ is_complete = *location != 0;
+ }
+ else if (GTK_WIDGET_IS_SENSITIVE(private->pop3_radio))
+ {
+ const char *hostname;
+ const char *username;
+ const char *password;
+
+ hostname = gtk_entry_get_text(GTK_ENTRY(private->hostname_entry));
+ username = gtk_entry_get_text(GTK_ENTRY(private->username_entry));
+ password = gtk_entry_get_text(GTK_ENTRY(private->password_entry));
+
+ is_complete = *hostname != 0 && *username != 0 && *password != 0;
+ }
+
+ return is_complete;
+}
+
+static void
+mn_mailbox_properties_dialog_update_sensitivity (MNMailboxPropertiesDialog *dialog)
+{
+ Private *private;
+ gboolean file_selected;
+ gboolean pop3_selected;
+ gboolean is_complete;
+
+ g_return_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog));
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+
+ file_selected = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(private->file_radio));
+ pop3_selected = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(private->pop3_radio)) && GTK_WIDGET_IS_SENSITIVE(private->pop3_radio);
+
+ gtk_widget_set_sensitive(private->location_label, file_selected);
+ gtk_widget_set_sensitive(private->location_entry, file_selected);
+ gtk_widget_set_sensitive(private->browse, file_selected);
+
+ gtk_widget_set_sensitive(private->hostname_label, pop3_selected);
+ gtk_widget_set_sensitive(private->hostname_entry, pop3_selected);
+ gtk_widget_set_sensitive(private->port_label, pop3_selected);
+ gtk_widget_set_sensitive(private->port_spin, pop3_selected);
+ gtk_widget_set_sensitive(private->username_label, pop3_selected);
+ gtk_widget_set_sensitive(private->username_entry, pop3_selected);
+ gtk_widget_set_sensitive(private->password_label, pop3_selected);
+ gtk_widget_set_sensitive(private->password_entry, pop3_selected);
+
+ is_complete = mn_mailbox_properties_dialog_is_complete(dialog);
+ if (private->apply_button)
+ gtk_widget_set_sensitive(private->apply_button, is_complete);
+ gtk_widget_set_sensitive(private->accept_button, is_complete);
+}
+
+static void
+mn_mailbox_properties_dialog_set_uri_internal (MNMailboxPropertiesDialog *dialog,
+ const char *uri)
+{
+ Private *private;
+ char *name;
+ char *title;
+
+ g_return_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog));
+ g_return_if_fail(uri != NULL);
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+
+ g_free(private->uri);
+ private->uri = g_strdup(uri);
+
+ name = mn_uri_format_for_display(private->uri);
+ title = g_strdup_printf(_("%s Properties"), name);
+ g_free(name);
+
+ gtk_window_set_title(GTK_WINDOW(dialog), title);
+ g_free(title);
+}
+
+static void
+mn_mailbox_properties_dialog_fill (MNMailboxPropertiesDialog *dialog)
+{
+ Private *private;
+ char *hostname;
+ int port;
+ char *username;
+ char *password;
+
+ g_return_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog));
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+ g_return_if_fail(private->uri != NULL);
+
+ if (mn_uri_parse_pop(private->uri, &username, &password, &hostname, &port))
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(private->pop3_radio), TRUE);
+
+ gtk_entry_set_text(GTK_ENTRY(private->hostname_entry), hostname);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(private->port_spin), port);
+ gtk_entry_set_text(GTK_ENTRY(private->username_entry), username);
+ gtk_entry_set_text(GTK_ENTRY(private->password_entry), password);
+
+ g_free(hostname);
+ g_free(username);
+ g_free(password);
+ }
+ else
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(private->file_radio), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(private->location_entry), private->uri);
+ }
+}
+
+void
+mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog,
+ const char *uri)
+{
+ Private *private;
+
+ g_return_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog));
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+ g_return_if_fail(private->uri == NULL);
+
+ mn_mailbox_properties_dialog_set_uri_internal(dialog, uri);
+ mn_mailbox_properties_dialog_fill(dialog);
+}
+
+char *
+mn_mailbox_properties_dialog_get_uri (MNMailboxPropertiesDialog *dialog)
+{
+ Private *private;
+ char *uri;
+
+ g_return_val_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog), NULL);
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(private->file_radio)))
+ {
+ const char *location;
+
+ location = gtk_entry_get_text(GTK_ENTRY(private->location_entry));
+ uri = g_strdup(location);
+ }
+ else
+ {
+ const char *hostname;
+ int port;
+ const char *username;
+ const char *password;
+
+ hostname = gtk_entry_get_text(GTK_ENTRY(private->hostname_entry));
+ port = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(private->port_spin));
+ username = gtk_entry_get_text(GTK_ENTRY(private->username_entry));
+ password = gtk_entry_get_text(GTK_ENTRY(private->password_entry));
+
+ uri = mn_uri_build_pop(username, password, hostname, port);
+ }
+
+ return uri;
+}
+
+void
+mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog *dialog)
+{
+ Private *private;
+ char *new_uri;
+
+ g_return_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog));
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+
+ new_uri = mn_mailbox_properties_dialog_get_uri(dialog);
+ g_return_if_fail(new_uri != NULL);
+
+ if (mn_uri_cmp(new_uri, private->uri))
+ {
+ GSList *gconf_mailboxes;
+ GSList *elem;
+
+ gconf_mailboxes = eel_gconf_get_string_list(MN_CONF_MAILBOXES);
+
+ elem = g_slist_find_custom(gconf_mailboxes, private->uri, (GCompareFunc) mn_uri_cmp);
+ if (elem)
+ {
+ g_free(elem->data);
+ elem->data = g_strdup(new_uri);
+ }
+
+ eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
+ mn_slist_free(gconf_mailboxes);
+
+ mn_mailbox_properties_dialog_set_uri_internal(dialog, new_uri);
+ }
+ g_free(new_uri);
+}
+
+static void
+mn_mailbox_properties_dialog_current_folder_changed_h (GtkFileChooser *chooser,
+ gpointer user_data)
+{
+ g_free(current_folder_uri);
+ current_folder_uri = gtk_file_chooser_get_current_folder_uri(chooser);
+}
+
+/* libglade callbacks */
+
+void
+mn_mailbox_properties_dialog_browse_clicked_h (gpointer user_data,
+ GtkButton *button)
+{
+ MNMailboxPropertiesDialog *dialog = user_data;
+ Private *private;
+ GtkWidget *chooser;
+ const char *location;
+
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+
+ chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
+ GTK_WINDOW(dialog),
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ "gnome-vfs",
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, 1,
+ NULL);
+
+ gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), FALSE);
+ mn_file_chooser_dialog_allow_select_folder(GTK_FILE_CHOOSER_DIALOG(chooser), 1);
+
+ if (private->mode == MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD)
+ {
+ if (current_folder_uri)
+ gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(chooser), current_folder_uri);
+ g_signal_connect(G_OBJECT(chooser), "current-folder-changed", G_CALLBACK(mn_mailbox_properties_dialog_current_folder_changed_h), NULL);
+ }
+
+ location = gtk_entry_get_text(GTK_ENTRY(private->location_entry));
+ if (*location)
+ gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(chooser), location);
+
+ if (gtk_dialog_run(GTK_DIALOG(chooser)) == 1)
+ {
+ char *uri;
+
+ uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(chooser));
+ gtk_entry_set_text(GTK_ENTRY(private->location_entry), uri);
+ g_free(uri);
+ }
+
+ gtk_widget_destroy(chooser);
+}
+
+void
+mn_mailbox_properties_dialog_radio_toggled_h (gpointer user_data,
+ GtkWidget *widget)
+{
+ MNMailboxPropertiesDialog *dialog = user_data;
+ Private *private;
+
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+ if (private->mode == MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD)
+ {
+ if (widget == private->file_radio)
+ selected_radio = RADIO_FILE;
+ else if (widget == private->pop3_radio)
+ selected_radio = RADIO_POP3;
+ else
+ g_return_if_reached();
+ }
+
+ mn_mailbox_properties_dialog_update_sensitivity(dialog);
+}
+
+void
+mn_mailbox_properties_dialog_pop3_entry_activate_h (gpointer user_data,
+ GtkWidget *widget)
+{
+ GtkWidget *next = user_data;
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_toplevel(widget);
+ if (GTK_WIDGET_TOPLEVEL(toplevel)
+ && GTK_WINDOW(toplevel)->default_widget
+ && GTK_WIDGET_IS_SENSITIVE(GTK_WINDOW(toplevel)->default_widget))
+ gtk_window_activate_default(GTK_WINDOW(toplevel));
+ else
+ gtk_widget_grab_focus(next);
+}
+
+void
+mn_mailbox_properties_dialog_entry_changed_h (gpointer user_data,
+ GtkWidget *widget)
+{
+ MNMailboxPropertiesDialog *dialog = user_data;
+
+ mn_mailbox_properties_dialog_update_sensitivity(dialog);
+}
diff --git a/src/mn-mailbox-properties-dialog.h b/src/mn-mailbox-properties-dialog.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _MN_MAILBOX_PROPERTIES_DIALOG_H
+#define _MN_MAILBOX_PROPERTIES_DIALOG_H
+
+#include <gtk/gtk.h>
+
+#define MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE_KEY "mn-mailbox-properties-dialog-private"
+#define MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(obj) (g_object_get_data(G_OBJECT(obj), MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE_KEY))
+
+#define MN_TYPE_MAILBOX_PROPERTIES_DIALOG (GTK_TYPE_DIALOG)
+#define MN_MAILBOX_PROPERTIES_DIALOG(obj) (GTK_DIALOG(obj))
+#define MN_MAILBOX_PROPERTIES_DIALOG_CLASS(klass) (GTK_DIALOG_CLASS(klass))
+#define MN_IS_MAILBOX_PROPERTIES_DIALOG(obj) (GTK_IS_DIALOG(obj) && MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(obj))
+#define MN_IS_MAILBOX_PROPERTIES_DIALOG_CLASS(klass) (GTK_IS_DIALOG_CLASS(klass))
+#define MN_MAILBOX_PROPERTIES_DIALOG_GET_CLASS(obj) (GTK_DIALOG_GET_CLASS(obj))
+
+typedef GtkDialog MNMailboxPropertiesDialog;
+typedef GtkDialogClass MNMailboxPropertiesDialogClass;
+
+typedef enum
+{
+ MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD,
+ MN_MAILBOX_PROPERTIES_DIALOG_MODE_EDIT
+} MNMailboxPropertiesDialogMode;
+
+GtkWidget *mn_mailbox_properties_dialog_new (GtkWindow *parent,
+ MNMailboxPropertiesDialogMode mode);
+
+void mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog,
+ const char *uri);
+char *mn_mailbox_properties_dialog_get_uri (MNMailboxPropertiesDialog *dialog);
+
+void mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog *dialog);
+
+#endif /* _MN_MAILBOX_PROPERTIES_DIALOG_H */
diff --git a/src/mn-mailbox.c b/src/mn-mailbox.c
@@ -17,7 +17,9 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
+#include <stdarg.h>
+#include <glib/gi18n-lib.h>
+#include <libgnomevfs/gnome-vfs.h>
#include "mn-mailbox.h"
#ifdef WITH_MBOX
#include "mn-mbox-mailbox.h"
@@ -35,44 +37,49 @@
#include "mn-sylpheed-mailbox.h"
#endif
#include "mn-unsupported-mailbox.h"
-
-/*** cpp *********************************************************************/
-
-#define MN_MAILBOX_TRY_NEW(type) \
-{ \
- MNMailboxClass *class; \
- \
- class = g_type_class_ref(type); \
- if (class->is(locator)) \
- { \
- MNMailbox *mailbox; \
- \
- mailbox = g_object_new(type, \
- "locator", locator, \
- NULL); \
- if (mailbox->err) \
- { \
- g_set_error(err, \
- MN_MAILBOX_ERROR, \
- MN_MAILBOX_ERROR_INITIALIZATION, \
- _("unable to initialize %s mailbox: %s"), \
- class->format, \
- mailbox->err->message); \
- g_object_unref(mailbox); \
- goto unsupported; \
- } \
- \
- return mailbox; \
- } \
-}
+#include "mn-util.h"
+#include "mn-uri.h"
+#include "mn-conf.h"
+#include "mn-dialog.h"
+#include "mn-vfs.h"
/*** types *******************************************************************/
enum {
PROP_0,
- PROP_LOCATOR
+ PROP_URI,
+ PROP_NAME,
+ PROP_AUTOMATIC,
+ PROP_HAS_NEW,
+ PROP_ERROR
+};
+
+struct _MNMailboxPrivate
+{
+ char *init_error;
+ char *uri;
+ char *name;
+ gboolean automatic;
+ gboolean has_new;
+ char *error;
+
+ GnomeVFSMonitorHandle *monitor_handle;
+ char *monitor_uri;
+ MNMailboxMonitorEventType monitor_events;
+
+ gboolean checking;
};
+typedef struct
+{
+ char *uri;
+ MNMailbox *mailbox;
+ const GType *types;
+ int i;
+ MNMailboxNewAsyncCallback *callback;
+ gpointer user_data;
+} NewInfo;
+
/*** variables ***************************************************************/
static GObjectClass *parent_class = NULL;
@@ -80,15 +87,67 @@ static GObjectClass *parent_class = NULL;
/*** functions ***************************************************************/
static void mn_mailbox_class_init (MNMailboxClass *class);
+static void mn_mailbox_init (MNMailbox *mailbox);
+static void mn_mailbox_finalize (GObject *object);
static void mn_mailbox_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
-static void mn_mailbox_init (MNMailbox *mailbox);
-static void mn_mailbox_finalize (GObject *object);
+static void mn_mailbox_get_property (GObject *object,
+ unsigned int prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void mn_mailbox_monitor_cb (GnomeVFSMonitorHandle *handle,
+ const char *monitor_uri,
+ const char *info_uri,
+ GnomeVFSMonitorEventType event_type,
+ gpointer user_data);
+
+static void mn_mailbox_new_async_test_cb (gboolean result, gpointer user_data);
+static void mn_mailbox_new_async_continue (NewInfo *info);
+static void mn_mailbox_new_async_is_cb (gboolean result, gpointer user_data);
+static void mn_mailbox_new_async_unsupported (NewInfo *info, const char *reason);
+static void mn_mailbox_new_async_finish (NewInfo *info);
/*** implementation **********************************************************/
+const GType *
+mn_mailbox_get_types (void)
+{
+ static GType *types = NULL;
+
+ if (! types)
+ {
+ GType tmp_types[5];
+ int n_types = 0;
+ int i;
+
+#ifdef WITH_MBOX
+ tmp_types[n_types++] = MN_TYPE_MBOX_MAILBOX;
+#endif
+#ifdef WITH_MH
+ tmp_types[n_types++] = MN_TYPE_MH_MAILBOX;
+#endif
+#ifdef WITH_MAILDIR
+ tmp_types[n_types++] = MN_TYPE_MAILDIR_MAILBOX;
+#endif
+#ifdef WITH_POP3
+ tmp_types[n_types++] = MN_TYPE_POP3_MAILBOX;
+#endif
+#ifdef WITH_SYLPHEED
+ tmp_types[n_types++] = MN_TYPE_SYLPHEED_MAILBOX;
+#endif
+
+ types = g_new(GType, n_types + 1);
+ for (i = 0; i < n_types; i++)
+ types[i] = tmp_types[i];
+ types[n_types] = 0;
+ }
+
+ return types;
+}
+
GType
mn_mailbox_get_type (void)
{
@@ -124,21 +183,76 @@ mn_mailbox_class_init (MNMailboxClass *class)
parent_class = g_type_class_peek_parent(class);
- class->format = NULL;
- class->is_remote = FALSE;
- class->is = NULL;
- class->has_new = NULL;
-
object_class->set_property = mn_mailbox_set_property;
+ object_class->get_property = mn_mailbox_get_property;
object_class->finalize = mn_mailbox_finalize;
g_object_class_install_property(object_class,
- PROP_LOCATOR,
- g_param_spec_string("locator",
- "Locator",
- _("The mailbox's locator"),
+ PROP_URI,
+ g_param_spec_string("uri",
+ _("URI"),
+ _("The mailbox URI"),
NULL,
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_WRITABLE | G_PARAM_READABLE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property(object_class,
+ PROP_NAME,
+ g_param_spec_string("name",
+ _("Name"),
+ _("The mailbox human-readable name"),
+ NULL,
+ G_PARAM_READABLE));
+ g_object_class_install_property(object_class,
+ PROP_AUTOMATIC,
+ g_param_spec_boolean("automatic",
+ _("Automatic"),
+ _("Whether the mailbox has to be manually checked or not"),
+ FALSE,
+ G_PARAM_WRITABLE | G_PARAM_READABLE));
+ g_object_class_install_property(object_class,
+ PROP_HAS_NEW,
+ g_param_spec_boolean("has-new",
+ _("Has new"),
+ _("Whether the mailbox has new mail or not"),
+ FALSE,
+ G_PARAM_WRITABLE | G_PARAM_READABLE));
+ g_object_class_install_property(object_class,
+ PROP_ERROR,
+ g_param_spec_string("error",
+ _("Error"),
+ _("The mailbox error if any"),
+ NULL,
+ G_PARAM_WRITABLE | G_PARAM_READABLE));
+}
+
+static void
+mn_mailbox_init (MNMailbox *mailbox)
+{
+ mailbox->priv = g_new0(MNMailboxPrivate, 1);
+}
+
+static void
+mn_mailbox_finalize (GObject *object)
+{
+ MNMailbox *mailbox = MN_MAILBOX(object);
+
+ g_free(mailbox->priv->init_error);
+ g_free(mailbox->priv->uri);
+ g_free(mailbox->priv->name);
+ g_free(mailbox->priv->error);
+ if (mailbox->priv->monitor_handle)
+ {
+ GnomeVFSResult result;
+
+ result = gnome_vfs_monitor_cancel(mailbox->priv->monitor_handle);
+ if (result != GNOME_VFS_OK)
+ g_warning(_("unable to cancel monitoring of %s: %s"),
+ mailbox->priv->monitor_uri,
+ gnome_vfs_result_to_string(result));
+ }
+ g_free(mailbox->priv->monitor_uri);
+ g_free(mailbox->priv);
+
+ G_OBJECT_CLASS(parent_class)->finalize(object);
}
static void
@@ -151,13 +265,23 @@ mn_mailbox_set_property (GObject *object,
switch (prop_id)
{
- case PROP_LOCATOR:
- mailbox->locator = g_value_dup_string(value);
- /*
- * The default visible name is the locator itself, subclasses
- * are free to override it.
- */
- mailbox->name = mailbox->locator;
+ case PROP_URI:
+ g_return_if_fail(mailbox->priv->uri == NULL);
+ mailbox->priv->uri = g_value_dup_string(value);
+ mailbox->priv->name = mn_uri_format_for_display(mailbox->priv->uri);
+ break;
+
+ case PROP_AUTOMATIC:
+ mailbox->priv->automatic = g_value_get_boolean(value);
+ break;
+
+ case PROP_HAS_NEW:
+ mailbox->priv->has_new = g_value_get_boolean(value);
+ break;
+
+ case PROP_ERROR:
+ g_free(mailbox->priv->error);
+ mailbox->priv->error = g_value_dup_string(value);
break;
default:
@@ -166,72 +290,353 @@ mn_mailbox_set_property (GObject *object,
}
}
-static void
-mn_mailbox_init (MNMailbox *mailbox)
+void
+mn_mailbox_set_automatic (MNMailbox *mailbox, gboolean automatic)
{
- mailbox->locator = NULL;
- mailbox->name = NULL;
- mailbox->err = NULL;
+ g_return_if_fail(MN_IS_MAILBOX(mailbox));
+
+ g_object_set(G_OBJECT(mailbox), "automatic", automatic, NULL);
+}
+
+void
+mn_mailbox_set_has_new (MNMailbox *mailbox, gboolean has_new)
+{
+ g_return_if_fail(MN_IS_MAILBOX(mailbox));
+
+ g_object_set(G_OBJECT(mailbox), "has-new", has_new, NULL);
+}
+
+void
+mn_mailbox_set_error (MNMailbox *mailbox, const char *format, ...)
+{
+ char *error = NULL;
+
+ g_return_if_fail(MN_IS_MAILBOX(mailbox));
+
+ if (format)
+ {
+ va_list args;
+
+ va_start(args, format);
+ error = g_strdup_vprintf(format, args);
+ va_end(args);
+ }
+
+ g_object_set(G_OBJECT(mailbox), "error", error, NULL);
+ g_free(error);
}
static void
-mn_mailbox_finalize (GObject *object)
+mn_mailbox_get_property (GObject *object,
+ unsigned int prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
MNMailbox *mailbox = MN_MAILBOX(object);
- g_free(mailbox->locator);
- if (mailbox->err)
- g_error_free(mailbox->err);
+ switch (prop_id)
+ {
+ case PROP_URI:
+ g_value_set_string(value, mn_mailbox_get_uri(mailbox));
+ break;
- G_OBJECT_CLASS(parent_class)->finalize(object);
+ case PROP_NAME:
+ g_value_set_string(value, mn_mailbox_get_name(mailbox));
+ break;
+
+ case PROP_AUTOMATIC:
+ g_value_set_boolean(value, mn_mailbox_get_automatic(mailbox));
+ break;
+
+ case PROP_HAS_NEW:
+ g_value_set_boolean(value, mn_mailbox_get_has_new(mailbox));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
}
-MNMailbox *mn_mailbox_new (const char *locator, GError **err)
+const char *
+mn_mailbox_get_uri (MNMailbox *mailbox)
{
- g_return_val_if_fail(locator != NULL, NULL);
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), NULL);
-#ifdef WITH_POP3
- MN_MAILBOX_TRY_NEW(MN_TYPE_POP3_MAILBOX);
-#endif
+ return mailbox->priv->uri;
+}
+
+const char *
+mn_mailbox_get_name (MNMailbox *mailbox)
+{
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), NULL);
+
+ return mailbox->priv->name;
+}
- if (! g_file_test(locator, G_FILE_TEST_EXISTS))
+gboolean
+mn_mailbox_get_automatic (MNMailbox *mailbox)
+{
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), FALSE);
+
+ return mailbox->priv->automatic;
+}
+
+gboolean
+mn_mailbox_get_has_new (MNMailbox *mailbox)
+{
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), FALSE);
+
+ return mailbox->priv->has_new;
+}
+
+const char *
+mn_mailbox_get_error (MNMailbox *mailbox)
+{
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), NULL);
+
+ return mailbox->priv->error;
+}
+
+void
+mn_mailbox_new_async (const char *uri,
+ MNMailboxNewAsyncCallback *callback,
+ gpointer user_data)
+{
+ NewInfo *info;
+ GnomeVFSURI *vfs_uri;
+
+ g_return_if_fail(uri != NULL);
+ g_return_if_fail(callback != NULL);
+
+ info = g_new(NewInfo, 1);
+ info->uri = g_strdup(uri);
+ info->types = mn_mailbox_get_types();
+ info->i = 0;
+ info->callback = callback;
+ info->user_data = user_data;
+
+ vfs_uri = gnome_vfs_uri_new(uri);
+ if (vfs_uri)
{
- g_set_error(err, MN_MAILBOX_ERROR, MN_MAILBOX_ERROR_NOT_FOUND,
- _("mailbox not found"));
- goto unsupported;
+ mn_vfs_async_test(uri, G_FILE_TEST_EXISTS, mn_mailbox_new_async_test_cb, info);
+ gnome_vfs_uri_unref(vfs_uri);
}
-
-#ifdef WITH_MBOX
- MN_MAILBOX_TRY_NEW(MN_TYPE_MBOX_MAILBOX);
-#endif
-#ifdef WITH_MH
- MN_MAILBOX_TRY_NEW(MN_TYPE_MH_MAILBOX);
-#endif
-#ifdef WITH_MAILDIR
- MN_MAILBOX_TRY_NEW(MN_TYPE_MAILDIR_MAILBOX);
-#endif
-#ifdef WITH_SYLPHEED
- MN_MAILBOX_TRY_NEW(MN_TYPE_SYLPHEED_MAILBOX);
-#endif
+ else
+ mn_mailbox_new_async_continue(info);
+}
- /* unknown format, set err and use the dummy MNUnsupportedMailbox class */
+static void
+mn_mailbox_new_async_test_cb (gboolean result, gpointer user_data)
+{
+ NewInfo *info = user_data;
- g_set_error(err, MN_MAILBOX_ERROR, MN_MAILBOX_ERROR_UNKNOWN_FORMAT,
- _("unknown mailbox format"));
+ if (result)
+ mn_mailbox_new_async_continue(info);
+ else
+ mn_mailbox_new_async_unsupported(info, _("does not exist"));
+}
- unsupported:
- return g_object_new(MN_TYPE_UNSUPPORTED_MAILBOX,
- "locator", locator,
- NULL);
+static void
+mn_mailbox_new_async_continue (NewInfo *info)
+{
+ g_return_if_fail(info != NULL);
+
+ if (info->types[info->i])
+ {
+ MNMailboxClass *class;
+
+ class = g_type_class_ref(info->types[info->i]);
+ class->is(info->uri, mn_mailbox_new_async_is_cb, info);
+ g_type_class_unref(class);
+ }
+ else
+ mn_mailbox_new_async_unsupported(info, _("unknown format"));
+}
+
+static void
+mn_mailbox_new_async_is_cb (gboolean result, gpointer user_data)
+{
+ NewInfo *info = user_data;
+
+ if (result)
+ {
+ MNMailbox *mailbox;
+
+ mailbox = g_object_new(info->types[info->i], "uri", info->uri, NULL);
+ if (! mailbox->priv->init_error)
+ {
+ info->mailbox = mailbox;
+ mn_mailbox_new_async_finish(info);
+ }
+ else
+ {
+ mn_mailbox_new_async_unsupported(info, mailbox->priv->init_error);
+ g_object_unref(mailbox);
+ }
+ }
+ else
+ {
+ info->i++;
+ mn_mailbox_new_async_continue(info);
+ }
+}
+
+static void
+mn_mailbox_new_async_unsupported (NewInfo *info, const char *reason)
+{
+ g_return_if_fail(info != NULL);
+ g_return_if_fail(reason != NULL);
+
+ info->mailbox = mn_unsupported_mailbox_new(info->uri, reason);
+ mn_mailbox_new_async_finish(info);
+}
+
+static void
+mn_mailbox_new_async_finish (NewInfo *info)
+{
+ info->callback(info->mailbox, info->user_data);
+
+ g_free(info->uri);
+ /* do not unref info->mailbox, it's now owned by the callback */
+ g_free(info);
+}
+
+void
+mn_mailbox_set_init_error (MNMailbox *mailbox, const char *format, ...)
+{
+ va_list args;
+
+ g_return_if_fail(MN_IS_MAILBOX(mailbox));
+ g_return_if_fail(format != NULL);
+ g_return_if_fail(mailbox->priv->init_error == NULL);
+
+ va_start(args, format);
+ mailbox->priv->init_error = g_strdup_vprintf(format, args);
+ va_end(args);
+}
+
+void
+mn_mailbox_monitor (MNMailbox *mailbox,
+ const char *uri,
+ GnomeVFSMonitorType monitor_type,
+ MNMailboxMonitorEventType events)
+{
+ GnomeVFSResult result;
+
+ g_return_if_fail(MN_IS_MAILBOX(mailbox));
+ g_return_if_fail(MN_MAILBOX_GET_CLASS(mailbox)->check != NULL);
+ g_return_if_fail(mailbox->priv->monitor_handle == NULL);
+ g_return_if_fail(uri != NULL);
+
+ result = gnome_vfs_monitor_add(&mailbox->priv->monitor_handle,
+ uri,
+ monitor_type,
+ mn_mailbox_monitor_cb,
+ mailbox);
+ if (result == GNOME_VFS_OK)
+ {
+ mailbox->priv->monitor_uri = g_strdup(uri);
+ mailbox->priv->monitor_events = events;
+ mn_mailbox_set_automatic(mailbox, TRUE);
+ }
+ else
+ {
+ static gboolean first_time = TRUE;
+
+ g_warning(_("unable to monitor %s: %s"), uri, gnome_vfs_result_to_string(result));
+
+ if (first_time)
+ {
+ int minutes;
+ int seconds;
+ char *str;
+
+ first_time = FALSE;
+
+ minutes = eel_gconf_get_integer(MN_CONF_DELAY_MINUTES);
+ seconds = eel_gconf_get_integer(MN_CONF_DELAY_SECONDS);
+
+ if (minutes == 0)
+ str = g_strdup_printf(ngettext("As a fallback, they will be "
+ "checked every %i second (this "
+ "delay is configurable from the "
+ "Preferences Dialog).",
+ "As a fallback, they will be "
+ "checked every %i seconds (this "
+ "delay is configurable from the "
+ "Preferences Dialog).",
+ seconds),
+ seconds);
+ else if (seconds == 0)
+ str = g_strdup_printf(ngettext("As a fallback, they will be "
+ "checked every %i minute (this "
+ "delay is configurable from the "
+ "Preferences Dialog).",
+ "As a fallback, they will be "
+ "checked every %i minutes (this "
+ "delay is configurable from the "
+ "Preferences Dialog).",
+ minutes),
+ minutes);
+ else
+ str = g_strdup_printf(ngettext("As a fallback, they will be "
+ "checked approximately every %i "
+ "minute (this delay is "
+ "configurable from the "
+ "Preferences Dialog).",
+ "As a fallback, they will be "
+ "checked approximately every %i "
+ "minutes (this delay is "
+ "configurable from the "
+ "Preferences Dialog).",
+ minutes),
+ minutes);
+
+ mn_error_dialog("automatic-notification",
+ _("A monitoring error has occurred."),
+ _("Mail Notification was unable to enable automatic "
+ "notification for one or more mailboxes. %s"), str);
+ g_free(str);
+ }
+ }
}
-GQuark
-mn_mailbox_error_quark (void)
+static void
+mn_mailbox_monitor_cb (GnomeVFSMonitorHandle *handle,
+ const char *monitor_uri,
+ const char *info_uri,
+ GnomeVFSMonitorEventType event_type,
+ gpointer user_data)
+{
+ MNMailbox *mailbox = user_data;
+
+ if (mailbox->priv->monitor_events & (1 << event_type))
+ mn_mailbox_check(mailbox);
+}
+
+void
+mn_mailbox_check (MNMailbox *mailbox)
{
- static GQuark quark = 0;
+ g_return_if_fail(MN_IS_MAILBOX(mailbox));
+ g_return_if_fail(MN_MAILBOX_GET_CLASS(mailbox)->check != NULL);
- if (! quark)
- quark = g_quark_from_static_string("mn_mailbox_error");
+ if (! mailbox->priv->checking)
+ {
+ g_object_ref(mailbox);
+ mailbox->priv->checking = TRUE;
+ mn_mailbox_set_error(mailbox, NULL);
+
+ MN_MAILBOX_GET_CLASS(mailbox)->check(mailbox);
+ }
+}
+
+void
+mn_mailbox_end_check (MNMailbox *mailbox)
+{
+ g_return_if_fail(MN_IS_MAILBOX(mailbox));
+ g_return_if_fail(mailbox->priv->checking == TRUE);
- return quark;
+ mailbox->priv->checking = FALSE;
+ g_object_unref(mailbox);
}
diff --git a/src/mn-mailbox.h b/src/mn-mailbox.h
@@ -19,8 +19,9 @@
#ifndef _MN_MAILBOX_H
#define _MN_MAILBOX_H
-#include <glib.h>
+#include <stdarg.h>
#include <glib-object.h>
+#include <libgnomevfs/gnome-vfs.h>
#define MN_TYPE_MAILBOX (mn_mailbox_get_type())
#define MN_MAILBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MN_TYPE_MAILBOX, MNMailbox))
@@ -29,40 +30,75 @@
#define MN_IS_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MN_TYPE_MAILBOX))
#define MN_MAILBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MN_TYPE_MAILBOX, MNMailboxClass))
-#define MN_MAILBOX_ERROR (mn_mailbox_error_quark())
-
-typedef enum
-{
- MN_MAILBOX_ERROR_NOT_FOUND,
- MN_MAILBOX_ERROR_INITIALIZATION,
- MN_MAILBOX_ERROR_UNKNOWN_FORMAT
-} MNMailboxError;
+typedef struct _MNMailboxPrivate MNMailboxPrivate;
typedef struct
{
GObject object;
- char *locator; /* internal locator */
- char *name; /* visible mailbox name */
-
- GError *err; /* initialization error */
+ MNMailboxPrivate *priv;
} MNMailbox;
+typedef void (MNMailboxIsCallback) (gboolean is, gpointer user_data);
+
typedef struct
{
GObjectClass object_class;
- const char *format; /* visible format name */
- gboolean is_remote;
+ const char *stock_id;
+ const char *format;
- gboolean (*is) (const char *locator);
- gboolean (*has_new) (MNMailbox *mailbox, GError **err);
+ void (*is) (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data);
+ void (*check) (MNMailbox *mailbox);
} MNMailboxClass;
-GType mn_mailbox_get_type (void);
-GQuark mn_mailbox_error_quark (void);
+const GType *mn_mailbox_get_types (void);
+GType mn_mailbox_get_type (void);
+
+typedef void (MNMailboxNewAsyncCallback) (MNMailbox *mailbox,
+ gpointer user_data);
+
+void mn_mailbox_new_async (const char *uri,
+ MNMailboxNewAsyncCallback *callback,
+ gpointer user_data);
+void mn_mailbox_set_init_error (MNMailbox *mailbox,
+ const char *format,
+ ...);
+
+const char *mn_mailbox_get_uri (MNMailbox *mailbox);
+const char *mn_mailbox_get_name (MNMailbox *mailbox);
+
+void mn_mailbox_set_automatic (MNMailbox *mailbox,
+ gboolean automatic);
+gboolean mn_mailbox_get_automatic (MNMailbox *mailbox);
+
+void mn_mailbox_set_has_new (MNMailbox *mailbox,
+ gboolean has_new);
+gboolean mn_mailbox_get_has_new (MNMailbox *mailbox);
+
+void mn_mailbox_set_error (MNMailbox *mailbox,
+ const char *format,
+ ...);
+const char *mn_mailbox_get_error (MNMailbox *mailbox);
+
+typedef enum
+{
+ MN_MAILBOX_MONITOR_EVENT_CHANGED = 1 << GNOME_VFS_MONITOR_EVENT_CHANGED,
+ MN_MAILBOX_MONITOR_EVENT_DELETED = 1 << GNOME_VFS_MONITOR_EVENT_DELETED,
+ MN_MAILBOX_MONITOR_EVENT_STARTEXECUTING = 1 << GNOME_VFS_MONITOR_EVENT_STARTEXECUTING,
+ MN_MAILBOX_MONITOR_EVENT_STOPEXECUTING = 1 << GNOME_VFS_MONITOR_EVENT_STOPEXECUTING,
+ MN_MAILBOX_MONITOR_EVENT_CREATED = 1 << GNOME_VFS_MONITOR_EVENT_CREATED,
+ MN_MAILBOX_MONITOR_EVENT_METADATA_CHANGED = 1 << GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED
+} MNMailboxMonitorEventType;
+
+void mn_mailbox_monitor (MNMailbox *mailbox,
+ const char *uri,
+ GnomeVFSMonitorType monitor_type,
+ MNMailboxMonitorEventType events);
-MNMailbox *mn_mailbox_new (const char *locator,
- GError **err);
+void mn_mailbox_check (MNMailbox *mailbox);
+void mn_mailbox_end_check (MNMailbox *mailbox);
#endif /* _MN_MAILBOX_H */
diff --git a/src/mn-mailboxes.c b/src/mn-mailboxes.c
@@ -17,77 +17,203 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
#include "mn-conf.h"
#include "mn-dialog.h"
#include "mn-mailbox.h"
-#include "mn-settings.h"
#include "mn-util.h"
+#include "mn-ui.h"
+#include "mn-mailboxes.h"
+#include "mn-uri.h"
+#include "mn-preferences.h"
+#include "mn-pending-mailbox.h"
/*** variables ***************************************************************/
static GSList *mailboxes = NULL;
-G_LOCK_DEFINE_STATIC(mailboxes);
+static unsigned int timeout_id = -1;
+
+/*** functions ***************************************************************/
+
+static void mn_mailboxes_changed (void);
+static void mn_mailboxes_new_cb (MNMailbox *mailbox, gpointer user_data);
+static void mn_mailboxes_notify_h (GObject *object,
+ GParamSpec *pspec,
+ gpointer user_data);
+static gboolean mn_mailboxes_timeout_cb (gpointer data);
+static int mn_mailboxes_compare_func (gconstpointer a, gconstpointer b);
/*** implementation **********************************************************/
void
-mn_mailboxes_register_all (void)
+mn_mailboxes_register (void)
{
GSList *gconf_mailboxes;
- GSList *new_mailboxes = NULL;
GSList *l;
- gconf_mailboxes = mn_conf_get_list("/apps/mail-notification/mailboxes", GCONF_VALUE_STRING);
+ gconf_mailboxes = eel_gconf_get_string_list(MN_CONF_MAILBOXES);
- MN_LIST_FOREACH(l, gconf_mailboxes)
+ /* first step: remove old mailboxes */
+
+ loop:
+ MN_LIST_FOREACH(l, mailboxes)
{
- char *locator = l->data;
- MNMailbox *mailbox;
- GError *err = NULL;
-
- mailbox = mn_mailbox_new(locator, &err);
- g_return_if_fail(mailbox != NULL);
-
- new_mailboxes = g_slist_append(new_mailboxes, mailbox);
- if (err)
- mn_error_dialog(_("Mailbox error."),
- _("Mailbox <i>%s</i> is unsupported: %s."),
- mailbox->name,
- err->message);
- else
+ MNMailbox *mailbox = l->data;
+
+ if (! g_slist_find_custom(gconf_mailboxes, mn_mailbox_get_uri(mailbox), (GCompareFunc) mn_uri_cmp))
{
- MNMailboxClass *class;
+ g_object_unref(mailbox);
+ mailboxes = g_slist_delete_link(mailboxes, l);
+ goto loop;
+ }
+ }
+
+ /* second step: add new mailboxes */
- class = g_type_class_peek(G_TYPE_FROM_INSTANCE(mailbox));
+ MN_LIST_FOREACH(l, gconf_mailboxes)
+ {
+ const char *uri = l->data;
+
+ if (! mn_mailboxes_find(uri))
+ {
+ MNMailbox *mailbox;
- if (mn_settings.debug)
- mn_notice(class->is_remote
- ? _("registered remote %s mailbox %s")
- : _("registered local %s mailbox %s"),
- class->format, mailbox->name);
+ mailbox = mn_pending_mailbox_new(uri);
+ mailboxes = g_slist_append(mailboxes, mailbox);
+
+ mn_mailbox_new_async(uri, mn_mailboxes_new_cb, NULL);
}
-
- g_free(locator);
}
- g_slist_free(gconf_mailboxes);
+ mn_slist_free(gconf_mailboxes);
+ mn_mailboxes_changed();
+}
+
+static void
+mn_mailboxes_changed (void)
+{
+ mn_preferences_update_list();
+ mn_ui_update_sensitivity();
+ mn_ui_update_icon();
+}
+
+static void
+mn_mailboxes_new_cb (MNMailbox *mailbox, gpointer user_data)
+{
+ GSList *elem;
+
+ elem = g_slist_find_custom(mailboxes, mn_mailbox_get_uri(mailbox), mn_mailboxes_compare_func);
+ if (elem)
+ {
+ g_signal_connect(G_OBJECT(mailbox), "notify", G_CALLBACK(mn_mailboxes_notify_h), NULL);
+ if (MN_MAILBOX_GET_CLASS(mailbox)->check)
+ mn_mailbox_check(mailbox);
+
+ g_object_unref(elem->data);
+ elem->data = mailbox;
+
+ mn_mailboxes_changed();
+ }
+ else
+ g_object_unref(mailbox);
+}
+
+static void
+mn_mailboxes_notify_h (GObject *object, GParamSpec *pspec, gpointer user_data)
+{
+ MNMailbox *mailbox = MN_MAILBOX(object);
+ gboolean update = FALSE;
+
+ if (! strcmp(g_param_spec_get_name(pspec), "has-new"))
+ {
+ gboolean has_new;
+
+ has_new = mn_mailbox_get_has_new(mailbox);
+ mn_info(has_new ? _("%s has new mail") : _("%s has no new mail"), mn_mailbox_get_name(mailbox));
+
+ update = TRUE;
+ }
+ else if (! strcmp(g_param_spec_get_name(pspec), "error"))
+ {
+ const char *error;
- G_LOCK(mailboxes);
- mn_objects_free(mailboxes);
- mailboxes = new_mailboxes;
- G_UNLOCK(mailboxes);
+ error = mn_mailbox_get_error(mailbox);
+ if (error)
+ mn_info(_("%s reported an error: %s"), mn_mailbox_get_name(mailbox), error);
+
+ update = TRUE;
+ }
+
+ if (update)
+ mn_ui_update_icon();
+}
+
+void
+mn_mailboxes_install_timeout (void)
+{
+ int minutes;
+ int seconds;
+
+ if (timeout_id != -1)
+ {
+ g_source_remove(timeout_id);
+ timeout_id = -1;
+ }
+
+ minutes = eel_gconf_get_integer(MN_CONF_DELAY_MINUTES);
+ seconds = eel_gconf_get_integer(MN_CONF_DELAY_SECONDS);
+
+ if (minutes != 0 || seconds != 0)
+ timeout_id = g_timeout_add(((minutes * 60) + seconds) * 1000,
+ mn_mailboxes_timeout_cb,
+ NULL);
+}
+
+static gboolean
+mn_mailboxes_timeout_cb (gpointer data)
+{
+ mn_mailboxes_check();
+ return TRUE; /* continue */
+}
+
+void
+mn_mailboxes_check (void)
+{
+ GSList *l;
+
+ MN_LIST_FOREACH(l, mailboxes)
+ {
+ MNMailbox *mailbox = l->data;
+
+ if (MN_MAILBOX_GET_CLASS(mailbox)->check && ! mn_mailbox_get_automatic(mailbox))
+ mn_mailbox_check(mailbox);
+ }
}
GSList *
mn_mailboxes_get (void)
{
- GSList *copy;
+ return mailboxes;
+}
+
+MNMailbox *
+mn_mailboxes_find (const char *uri)
+{
+ GSList *elem;
+
+ g_return_val_if_fail(uri != NULL, NULL);
- G_LOCK(mailboxes);
- copy = mn_objects_copy(mailboxes);
- G_UNLOCK(mailboxes);
+ elem = g_slist_find_custom(mailboxes, uri, mn_mailboxes_compare_func);
+ return elem ? elem->data : NULL;
+}
+
+static int
+mn_mailboxes_compare_func (gconstpointer a, gconstpointer b)
+{
+ MNMailbox *mailbox = (MNMailbox *) a;
+ const char *uri = b;
- return copy;
+ return mn_uri_cmp(mn_mailbox_get_uri(mailbox), uri);
}
diff --git a/src/mn-mailboxes.h b/src/mn-mailboxes.h
@@ -20,8 +20,12 @@
#define _MN_MAILBOXES_H
#include <glib.h>
+#include "mn-mailbox.h"
-void mn_mailboxes_register_all (void);
-GSList *mn_mailboxes_get (void);
+void mn_mailboxes_register (void);
+void mn_mailboxes_install_timeout (void);
+void mn_mailboxes_check (void);
+GSList *mn_mailboxes_get (void);
+MNMailbox *mn_mailboxes_find (const char *uri);
#endif /* _MN_MAILBOXES_H */
diff --git a/src/mn-maildir-mailbox.c b/src/mn-maildir-mailbox.c
@@ -17,15 +17,47 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n-lib.h>
+#include <libgnomevfs/gnome-vfs.h>
#include "mn-maildir-mailbox.h"
+#include "mn-util.h"
+#include "mn-vfs.h"
+
+/*** types *******************************************************************/
+
+typedef struct
+{
+ char *uri;
+ int i;
+ MNMailboxIsCallback *callback;
+ gpointer user_data;
+} IsInfo;
+
+/*** variables ***************************************************************/
+
+static GObjectClass *parent_class = NULL;
+static const char *constitutive_dirs[] = { "cur", "new", "tmp" };
/*** functions ***************************************************************/
-static void mn_maildir_mailbox_class_init (MNMaildirMailboxClass *class);
-static gboolean mn_maildir_mailbox_is (const char *locator);
-static gboolean mn_maildir_mailbox_has_new (MNMailbox *mailbox,
- GError **err);
+static void mn_maildir_mailbox_class_init (MNMaildirMailboxClass *class);
+
+static GObject *mn_maildir_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params);
+
+static void mn_maildir_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data);
+static void mn_maildir_mailbox_is_continue (IsInfo *info);
+static void mn_maildir_mailbox_is_cb (gboolean result, gpointer user_data);
+
+static void mn_maildir_mailbox_check (MNMailbox *mailbox);
+static void mn_maildir_mailbox_check_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ GList *list,
+ unsigned int entries_read,
+ gpointer user_data);
/*** implementation **********************************************************/
@@ -60,79 +92,141 @@ mn_maildir_mailbox_get_type (void)
static void
mn_maildir_mailbox_class_init (MNMaildirMailboxClass *class)
{
+ GObjectClass *object_class = G_OBJECT_CLASS(class);
MNMailboxClass *mailbox_class = MN_MAILBOX_CLASS(class);
+ parent_class = g_type_class_peek_parent(class);
+
+ object_class->constructor = mn_maildir_mailbox_constructor;
+
mailbox_class->format = "Maildir";
- mailbox_class->is_remote = FALSE;
mailbox_class->is = mn_maildir_mailbox_is;
- mailbox_class->has_new = mn_maildir_mailbox_has_new;
+ mailbox_class->check = mn_maildir_mailbox_check;
}
-static gboolean
-mn_maildir_mailbox_is (const char *locator)
+static GObject *
+mn_maildir_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params)
{
- gboolean is;
- char *cur, *new, *tmp;
-
- cur = g_build_filename(locator, "cur", NULL);
- new = g_build_filename(locator, "new", NULL);
- tmp = g_build_filename(locator, "tmp", NULL);
+ GObject *object;
+ MNMailbox *mailbox;
+ char *new_uri;
+
+ object = G_OBJECT_CLASS(parent_class)->constructor(type, n_construct_properties, construct_params);
+ mailbox = MN_MAILBOX(object);
+
+ new_uri = g_build_path("/", mn_mailbox_get_uri(mailbox), "new", NULL);
+ mn_mailbox_monitor(mailbox,
+ new_uri,
+ GNOME_VFS_MONITOR_DIRECTORY,
+ MN_MAILBOX_MONITOR_EVENT_DELETED
+ | MN_MAILBOX_MONITOR_EVENT_CREATED);
+ g_free(new_uri);
+
+ return object;
+}
- is = g_file_test(cur, G_FILE_TEST_IS_DIR)
- && g_file_test(new, G_FILE_TEST_IS_DIR)
- && g_file_test(tmp, G_FILE_TEST_IS_DIR);
+static void
+mn_maildir_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data)
+{
+ IsInfo *info;
+
+ info = g_new(IsInfo, 1);
+ info->uri = g_strdup(uri);
+ info->i = 0;
+ info->callback = callback;
+ info->user_data = user_data;
+
+ mn_maildir_mailbox_is_continue(info);
+}
- g_free(cur);
- g_free(new);
- g_free(tmp);
+static void
+mn_maildir_mailbox_is_continue (IsInfo *info)
+{
+ char *uri;
- return is;
+ uri = g_build_path("/", info->uri, constitutive_dirs[info->i], NULL);
+ mn_vfs_async_test(uri, G_FILE_TEST_IS_DIR, mn_maildir_mailbox_is_cb, info);
+ g_free(uri);
}
-static gboolean
-mn_maildir_mailbox_has_new (MNMailbox *mailbox, GError **err)
+static void
+mn_maildir_mailbox_is_cb (gboolean result, gpointer user_data)
{
- char *new;
- GDir *dir;
- GError *tmp_err = NULL;
- gboolean has_new = FALSE;
- const char *filename;
-
- new = g_build_filename(mailbox->locator, "new", NULL);
- dir = g_dir_open(new, 0, &tmp_err);
- g_free(new);
+ IsInfo *info = user_data;
+ gboolean is = FALSE;
- if (! dir)
+ if (result)
{
- g_set_error(err,
- MN_MAILDIR_MAILBOX_ERROR,
- MN_MAILDIR_MAILBOX_ERROR_OPEN_NEW,
- _("unable to open %s: %s"),
- mailbox->locator,
- tmp_err->message);
- g_error_free(tmp_err);
- return FALSE;
+ if (++info->i < G_N_ELEMENTS(constitutive_dirs))
+ {
+ mn_maildir_mailbox_is_continue(info);
+ return;
+ }
+ else
+ is = TRUE;
}
-
- while ((filename = g_dir_read_name(dir)))
- if (filename[0] != '.')
- {
- has_new = TRUE;
- break;
- }
-
- g_dir_close(dir);
-
- return has_new;
+
+ info->callback(is, info->user_data);
+ g_free(info->uri);
+ g_free(info);
}
-GQuark
-mn_maildir_mailbox_error_quark (void)
+static void
+mn_maildir_mailbox_check (MNMailbox *mailbox)
{
- static GQuark quark = 0;
+ char *new_uri;
+ GnomeVFSAsyncHandle *handle;
+
+ new_uri = g_build_path("/", mn_mailbox_get_uri(mailbox), "new", NULL);
+ gnome_vfs_async_load_directory(&handle,
+ new_uri,
+ GNOME_VFS_FILE_INFO_DEFAULT,
+ 32,
+ GNOME_VFS_PRIORITY_DEFAULT,
+ mn_maildir_mailbox_check_cb,
+ mailbox);
+ g_free(new_uri);
+}
- if (! quark)
- quark = g_quark_from_static_string("mn_maildir_mailbox_error");
+static void
+mn_maildir_mailbox_check_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ GList *list,
+ unsigned int entries_read,
+ gpointer user_data)
+{
+ MNMaildirMailbox *mailbox = user_data;
+ gboolean has_new = FALSE;
+ GList *l;
- return quark;
+ MN_LIST_FOREACH(l, list)
+ {
+ GnomeVFSFileInfo *file_info = l->data;
+
+ if (file_info->name[0] != '.')
+ {
+ has_new = TRUE;
+ break;
+ }
+ }
+
+ if (has_new)
+ {
+ gnome_vfs_async_cancel(handle);
+ goto end;
+ }
+
+ if (result != GNOME_VFS_OK) /* we're done */
+ {
+ if (result != GNOME_VFS_ERROR_EOF)
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), _("error while reading folder: %s"), gnome_vfs_result_to_string(result));
+
+ end:
+ mn_mailbox_set_has_new(MN_MAILBOX(mailbox), has_new);
+ mn_mailbox_end_check(MN_MAILBOX(mailbox));
+ }
}
diff --git a/src/mn-maildir-mailbox.h b/src/mn-maildir-mailbox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
#ifndef _MN_MAILDIR_MAILBOX_H
#define _MN_MAILDIR_MAILBOX_H
-#include <glib.h>
#include <glib-object.h>
#include "mn-mailbox.h"
@@ -30,24 +29,20 @@
#define MN_IS_MAILDIR_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MN_TYPE_MAILDIR_MAILBOX))
#define MN_MAILDIR_MAILBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MN_TYPE_MAILDIR_MAILBOX, MNMaildirMailboxClass))
-#define MN_MAILDIR_MAILBOX_ERROR (mn_maildir_mailbox_error_quark())
-
-typedef enum
-{
- MN_MAILDIR_MAILBOX_ERROR_OPEN_NEW
-} MNMaildirMailboxError;
+typedef struct _MNMaildirMailboxPrivate MNMaildirMailboxPrivate;
typedef struct
{
- MNMailbox mailbox;
+ MNMailbox mailbox;
+
+ MNMaildirMailboxPrivate *priv;
} MNMaildirMailbox;
typedef struct
{
- MNMailboxClass mailbox_class;
+ MNMailboxClass mailbox_class;
} MNMaildirMailboxClass;
GType mn_maildir_mailbox_get_type (void);
-GQuark mn_maildir_mailbox_error_quark (void);
#endif /* _MN_MAILDIR_MAILBOX_H */
diff --git a/src/mn-main.c b/src/mn-main.c
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <gnome.h>
+#include <libgnomevfs/gnome-vfs.h>
+#include "mn-conf.h"
+#include "mn-mailboxes.h"
+#include "mn-ui.h"
+#include "mn-util.h"
+#include "mn-stock.h"
+
+/*** variables ***************************************************************/
+
+static gboolean arg_enable_info = FALSE;
+
+/*** functions ***************************************************************/
+
+static void mn_main_list_handlers (void);
+static void mn_main_info_log_cb (const char *log_domain,
+ GLogLevelFlags log_level,
+ const char *message,
+ gpointer user_data);
+
+/*** implementation **********************************************************/
+
+static void
+mn_main_list_handlers (void)
+{
+ const GType *types;
+ int i;
+
+ g_print(_("Compiled in handlers:\n"));
+
+ types = mn_mailbox_get_types();
+ for (i = 0; types[i]; i++)
+ {
+ MNMailboxClass *class;
+
+ class = g_type_class_ref(types[i]);
+ g_print(" %s\n", class->format);
+ g_type_class_unref(class);
+ }
+}
+
+static void
+mn_main_info_log_cb (const char *log_domain,
+ GLogLevelFlags log_level,
+ const char *message,
+ gpointer user_data)
+{
+ if (arg_enable_info)
+ g_log_default_handler(log_domain, log_level, message, user_data);
+}
+
+int
+main (int argc, char **argv)
+{
+ gboolean arg_list_handlers = FALSE;
+ const struct poptOption popt_options[] = {
+ {
+ "enable-info",
+ 0,
+ POPT_ARG_NONE,
+ &arg_enable_info,
+ 0,
+ N_("Enable informational output"),
+ NULL
+ },
+ {
+ "list-handlers",
+ 0,
+ POPT_ARG_NONE,
+ &arg_list_handlers,
+ 0,
+ N_("List compiled-in handlers and exit"),
+ NULL
+ },
+ POPT_TABLEEND
+ };
+
+ g_log_set_fatal_mask(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL);
+ g_log_set_handler(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, mn_main_info_log_cb, NULL);
+
+#ifdef ENABLE_NLS
+ bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain(GETTEXT_PACKAGE);
+#endif
+
+ gnome_program_init(PACKAGE,
+ VERSION,
+ LIBGNOMEUI_MODULE,
+ argc,
+ argv,
+ GNOME_PARAM_HUMAN_READABLE_NAME, _("Mail Notification"),
+ GNOME_PROGRAM_STANDARD_PROPERTIES,
+ GNOME_PARAM_POPT_TABLE, popt_options,
+ NULL);
+
+ if (arg_list_handlers)
+ {
+ mn_main_list_handlers();
+ exit(0);
+ }
+
+ if (! gnome_vfs_init())
+ g_critical(_("unable to initialize GnomeVFS"));
+
+ mn_conf_init();
+ mn_stock_init();
+ mn_ui_init();
+
+ mn_mailboxes_register();
+ mn_mailboxes_install_timeout();
+ gtk_main();
+
+ return 0;
+}
diff --git a/src/mn-mbox-mailbox.c b/src/mn-mbox-mailbox.c
@@ -17,34 +17,81 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <string.h>
+#include <glib/gi18n-lib.h>
#include "mn-mbox-mailbox.h"
+#include "mn-vfs.h"
/*** types *******************************************************************/
struct _MNmboxMailboxPrivate
{
- time_t last_mtime;
- off_t last_size;
- gboolean last_has_new;
+ time_t last_mtime;
+ GnomeVFSFileSize last_size;
};
+typedef struct
+{
+ gboolean is;
+ char *uri;
+ char frombuf[5];
+ MNMailboxIsCallback *callback;
+ gpointer user_data;
+} IsInfo;
+
+typedef struct
+{
+ MNmboxMailbox *mailbox;
+ gboolean in_header;
+ gboolean seen;
+} CheckInfo;
+
/*** variables ***************************************************************/
static GObjectClass *parent_class = NULL;
/*** functions ***************************************************************/
-static void mn_mbox_mailbox_class_init (MNmboxMailboxClass *class);
-static void mn_mbox_mailbox_init (MNmboxMailbox *mailbox);
-static void mn_mbox_mailbox_finalize (GObject *object);
-static gboolean mn_mbox_mailbox_is (const char *locator);
-static gboolean mn_mbox_mailbox_has_new (MNMailbox *mailbox,
- GError **err);
+static void mn_mbox_mailbox_class_init (MNmboxMailboxClass *class);
+static void mn_mbox_mailbox_init (MNmboxMailbox *mailbox);
+static void mn_mbox_mailbox_finalize (GObject *object);
+
+static GObject *mn_mbox_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params);
+
+static void mn_mbox_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data);
+static void mn_mbox_mailbox_is_get_file_info_cb (GnomeVFSAsyncHandle *handle,
+ GList *results,
+ gpointer user_data);
+static void mn_mbox_mailbox_is_open_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
+static void mn_mbox_mailbox_is_read_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer buffer,
+ GnomeVFSFileSize bytes_requested,
+ GnomeVFSFileSize bytes_read,
+ gpointer user_data);
+static void mn_mbox_mailbox_is_close_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
+static void mn_mbox_mailbox_is_finish (IsInfo *info, gboolean is);
+
+static void mn_mbox_mailbox_check (MNMailbox *mailbox);
+static void mn_mbox_mailbox_check_open_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
+static void mn_mbox_mailbox_check_read_line_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ const char *line,
+ gpointer user_data);
+static void mn_mbox_mailbox_check_close_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
/*** implementation **********************************************************/
@@ -64,7 +111,7 @@ mn_mbox_mailbox_get_type (void)
NULL,
sizeof(MNmboxMailbox),
0,
- (GInstanceInitFunc) mn_mbox_mailbox_init,
+ (GInstanceInitFunc) mn_mbox_mailbox_init
};
mbox_mailbox_type = g_type_register_static(MN_TYPE_MAILBOX,
@@ -85,11 +132,11 @@ mn_mbox_mailbox_class_init (MNmboxMailboxClass *class)
parent_class = g_type_class_peek_parent(class);
object_class->finalize = mn_mbox_mailbox_finalize;
+ object_class->constructor = mn_mbox_mailbox_constructor;
mailbox_class->format = "mbox";
- mailbox_class->is_remote = FALSE;
mailbox_class->is = mn_mbox_mailbox_is;
- mailbox_class->has_new = mn_mbox_mailbox_has_new;
+ mailbox_class->check = mn_mbox_mailbox_check;
}
static void
@@ -101,134 +148,274 @@ mn_mbox_mailbox_init (MNmboxMailbox *mailbox)
static void
mn_mbox_mailbox_finalize (GObject *object)
{
- MNmboxMailbox *mbox_mailbox = MN_MBOX_MAILBOX(object);
+ MNmboxMailbox *mailbox = MN_MBOX_MAILBOX(object);
- g_free(mbox_mailbox->priv);
+ g_free(mailbox->priv);
G_OBJECT_CLASS(parent_class)->finalize(object);
}
-static gboolean
-mn_mbox_mailbox_is (const char *locator)
+static GObject *
+mn_mbox_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params)
{
- g_return_val_if_fail(locator != NULL, FALSE);
-
- return g_file_test(locator, G_FILE_TEST_IS_REGULAR);
+ GObject *object;
+ MNMailbox *mailbox;
+
+ object = G_OBJECT_CLASS(parent_class)->constructor(type, n_construct_properties, construct_params);
+ mailbox = MN_MAILBOX(object);
+
+ mn_mailbox_monitor(mailbox,
+ mn_mailbox_get_uri(mailbox),
+ GNOME_VFS_MONITOR_FILE,
+ MN_MAILBOX_MONITOR_EVENT_CHANGED
+ | MN_MAILBOX_MONITOR_EVENT_DELETED
+ | MN_MAILBOX_MONITOR_EVENT_CREATED);
+
+ return object;
}
-static gboolean
-mn_mbox_mailbox_has_new (MNMailbox *mailbox, GError **err)
+static void
+mn_mbox_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data)
{
- MNmboxMailbox *mbox_mailbox = MN_MBOX_MAILBOX(mailbox);
- struct stat sb;
+ GnomeVFSURI *vfs_uri;
+ GList *uri_list = NULL;
+ IsInfo *info;
+ GnomeVFSAsyncHandle *handle;
- if (stat(mailbox->locator, &sb) == -1)
+ vfs_uri = gnome_vfs_uri_new(uri);
+ if (! vfs_uri)
{
- g_set_error(err,
- MN_MBOX_MAILBOX_ERROR,
- MN_MBOX_MAILBOX_ERROR_STAT,
- _("unable to stat %s: %s"),
- mailbox->locator,
- g_strerror(errno));
- return FALSE;
+ callback(FALSE, user_data);
+ return;
}
+
+ uri_list = g_list_append(uri_list, vfs_uri);
+
+ info = g_new(IsInfo, 1);
+ info->is = FALSE;
+ info->uri = g_strdup(uri);
+ info->callback = callback;
+ info->user_data = user_data;
+
+ gnome_vfs_async_get_file_info(&handle,
+ uri_list,
+ GNOME_VFS_FILE_INFO_FOLLOW_LINKS,
+ GNOME_VFS_PRIORITY_DEFAULT,
+ mn_mbox_mailbox_is_get_file_info_cb,
+ info);
+
+ gnome_vfs_uri_unref(vfs_uri);
+ g_list_free(uri_list);
+}
+
+static void
+mn_mbox_mailbox_is_get_file_info_cb (GnomeVFSAsyncHandle *handle,
+ GList *results,
+ gpointer user_data)
+{
+ IsInfo *info = user_data;
+ GnomeVFSGetFileInfoResult *result;
+
+ g_return_if_fail(results->data != NULL);
+ result = results->data;
- if (mbox_mailbox->priv->last_mtime != sb.st_mtime || mbox_mailbox->priv->last_size != sb.st_size)
+ if (result->result == GNOME_VFS_OK)
{
- GIOChannel *channel;
- GIOStatus status;
- GError *tmp_err = NULL;
- char *line;
- int total_count = 0;
- int seen_count = 0;
- gboolean in_header = FALSE;
-
- mbox_mailbox->priv->last_mtime = sb.st_mtime;
- mbox_mailbox->priv->last_size = sb.st_size;
-
- channel = g_io_channel_new_file(mailbox->locator, "r", &tmp_err);
- if (! channel)
+ if (result->file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE
+ && result->file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE
+ && result->file_info->type == GNOME_VFS_FILE_TYPE_REGULAR)
{
- g_set_error(err,
- MN_MBOX_MAILBOX_ERROR,
- MN_MBOX_MAILBOX_ERROR_OPEN,
- _("unable to open %s: %s"),
- mailbox->locator,
- tmp_err->message);
- g_error_free(tmp_err);
- return FALSE;
+ if (result->file_info->size == 0)
+ info->is = TRUE;
+ else
+ {
+ GnomeVFSAsyncHandle *handle;
+
+ gnome_vfs_async_open(&handle,
+ info->uri,
+ GNOME_VFS_OPEN_READ,
+ GNOME_VFS_PRIORITY_DEFAULT,
+ mn_mbox_mailbox_is_open_cb,
+ info);
+ return;
+ }
}
+ }
+
+ mn_mbox_mailbox_is_finish(info, info->is);
+}
+
+static void
+mn_mbox_mailbox_is_open_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data)
+{
+ IsInfo *info = user_data;
+
+ if (result == GNOME_VFS_OK)
+ gnome_vfs_async_read(handle,
+ info->frombuf,
+ sizeof(info->frombuf),
+ mn_mbox_mailbox_is_read_cb,
+ info);
+ else
+ mn_mbox_mailbox_is_finish(info, FALSE);
+}
+
+static void
+mn_mbox_mailbox_is_read_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer buffer,
+ GnomeVFSFileSize bytes_requested,
+ GnomeVFSFileSize bytes_read,
+ gpointer user_data)
+{
+ IsInfo *info = user_data;
+
+ if (result == GNOME_VFS_OK && bytes_requested == bytes_read && ! strncmp(info->frombuf, "From ", sizeof(info->frombuf)))
+ info->is = TRUE;
+
+ gnome_vfs_async_close(handle, mn_mbox_mailbox_is_close_cb, info);
+}
+
+static void
+mn_mbox_mailbox_is_close_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data)
+{
+ IsInfo *info = user_data;
+
+ mn_mbox_mailbox_is_finish(info, result == GNOME_VFS_OK && info->is);
+}
+
+static void
+mn_mbox_mailbox_is_finish (IsInfo *info, gboolean is)
+{
+ info->callback(is, info->user_data);
+ g_free(info->uri);
+ g_free(info);
+}
+
+static void
+mn_mbox_mailbox_check (MNMailbox *mailbox)
+{
+ MNmboxMailbox *mbox_mailbox = MN_MBOX_MAILBOX(mailbox);
+ const char *uri;
+ GnomeVFSFileInfo *file_info;
+ GnomeVFSResult result;
+ gboolean changed;
+
+ uri = mn_mailbox_get_uri(mailbox);
+
+ file_info = gnome_vfs_file_info_new();
+ result = gnome_vfs_get_file_info(uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
+ changed = result == GNOME_VFS_OK && (file_info->mtime != mbox_mailbox->priv->last_mtime || file_info->size != mbox_mailbox->priv->last_size);
+ if (changed)
+ {
+ mbox_mailbox->priv->last_mtime = file_info->mtime;
+ mbox_mailbox->priv->last_size = file_info->size;
+ }
+ gnome_vfs_file_info_unref(file_info);
- /* to not get a read error if some line is not valid UTF-8 */
- if (g_io_channel_set_encoding(channel, "ISO8859-1", &tmp_err) != G_IO_STATUS_NORMAL)
+ if (result == GNOME_VFS_OK)
+ {
+ if (changed)
{
- g_set_error(err,
- MN_MBOX_MAILBOX_ERROR,
- MN_MBOX_MAILBOX_ERROR_ENCODING,
- _("unable to set the encoding for %s: %s"),
- mailbox->locator,
- tmp_err->message);
- g_error_free(tmp_err);
-
- g_io_channel_shutdown(channel, TRUE, NULL);
- g_io_channel_unref(channel);
-
- return FALSE;
+ MNVFSAsyncHandle *handle;
+
+ mn_vfs_async_open(&handle,
+ uri,
+ GNOME_VFS_OPEN_READ,
+ mn_mbox_mailbox_check_open_cb,
+ mailbox);
+ return;
}
-
- while ((status = g_io_channel_read_line(channel,
- &line,
- NULL,
- NULL,
- &tmp_err)) == G_IO_STATUS_NORMAL)
- {
- if (line[0] == '\n')
- in_header = FALSE;
- else if (! strncmp(line, "From ", 5))
- {
- total_count++;
- in_header = TRUE;
- }
- else if (in_header
- && ! strncmp(line, "Status:", 7)
- && (strchr(line, 'O') || strchr(line, 'R')))
- seen_count++;
+ }
+ else
+ mn_mailbox_set_error(mailbox, _("unable to get mailbox information: %s"), gnome_vfs_result_to_string(result));
- g_free(line);
- }
+ mn_mailbox_end_check(mailbox);
+}
- if (status == G_IO_STATUS_ERROR)
+static void
+mn_mbox_mailbox_check_open_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data)
+{
+ MNmboxMailbox *mailbox = user_data;
+
+ if (result == GNOME_VFS_OK)
+ {
+ CheckInfo *info;
+
+ info = g_new(CheckInfo, 1);
+ info->mailbox = mailbox;
+ info->in_header = FALSE;
+ info->seen = TRUE; /* so that mailbox with errors or empty mailbox will not be reported as having new mail */
+
+ mn_vfs_async_read_line(handle, 0, mn_mbox_mailbox_check_read_line_cb, info);
+ }
+ else
+ {
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), _("unable to open mailbox: %s"), gnome_vfs_result_to_string(result));
+ mn_mailbox_end_check(MN_MAILBOX(mailbox));
+ }
+}
+
+static void
+mn_mbox_mailbox_check_read_line_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ const char *line,
+ gpointer user_data)
+{
+ CheckInfo *info = user_data;
+
+ if (line)
+ {
+ if (! *line) /* end of headers */
{
- g_set_error(err,
- MN_MBOX_MAILBOX_ERROR,
- MN_MBOX_MAILBOX_ERROR_READ,
- _("error while reading %s: %s"),
- mailbox->locator,
- tmp_err->message);
- g_error_free(tmp_err);
-
- g_io_channel_shutdown(channel, TRUE, NULL);
- g_io_channel_unref(channel);
-
- return FALSE;
+ if (! info->seen)
+ goto end;
+ info->in_header = FALSE;
}
-
- g_io_channel_shutdown(channel, TRUE, NULL);
- g_io_channel_unref(channel);
-
- return mbox_mailbox->priv->last_has_new = total_count != seen_count;
+ else if (! strncmp(line, "From ", 5))
+ {
+ info->in_header = TRUE;
+ info->seen = FALSE;
+ }
+ else if (info->in_header
+ && ! strncmp(line, "Status:", 7)
+ && (strchr(line, 'O') || strchr(line, 'R')))
+ info->seen = TRUE;
}
- return mbox_mailbox->priv->last_has_new;
+ if (result == GNOME_VFS_OK)
+ mn_vfs_async_read_line(handle, 0, mn_mbox_mailbox_check_read_line_cb, info);
+ else /* we're done */
+ {
+ if (result != GNOME_VFS_ERROR_EOF)
+ mn_mailbox_set_error(MN_MAILBOX(info->mailbox), _("error while reading mailbox: %s"), gnome_vfs_result_to_string(result));
+
+ end:
+ mn_mailbox_set_has_new(MN_MAILBOX(info->mailbox), ! info->seen);
+ mn_vfs_async_close(handle, mn_mbox_mailbox_check_close_cb, info);
+ }
}
-GQuark
-mn_mbox_mailbox_error_quark (void)
+static void
+mn_mbox_mailbox_check_close_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data)
{
- static GQuark quark = 0;
+ CheckInfo *info = user_data;
- if (! quark)
- quark = g_quark_from_static_string("mn_mbox_mailbox_error");
+ if (result != GNOME_VFS_OK)
+ mn_mailbox_set_error(MN_MAILBOX(info->mailbox), _("unable to close mailbox: %s"), gnome_vfs_result_to_string(result));
- return quark;
+ mn_mailbox_end_check(MN_MAILBOX(info->mailbox));
+ g_free(info);
}
diff --git a/src/mn-mbox-mailbox.h b/src/mn-mbox-mailbox.h
@@ -19,7 +19,6 @@
#ifndef _MN_MBOX_MAILBOX_H
#define _MN_MBOX_MAILBOX_H
-#include <glib.h>
#include <glib-object.h>
#include "mn-mailbox.h"
@@ -30,16 +29,6 @@
#define MN_IS_MBOX_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MN_TYPE_MBOX_MAILBOX))
#define MN_MBOX_MAILBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MN_TYPE_MBOX_MAILBOX, MNmboxMailboxClass))
-#define MN_MBOX_MAILBOX_ERROR (mn_mbox_mailbox_error_quark())
-
-typedef enum
-{
- MN_MBOX_MAILBOX_ERROR_STAT,
- MN_MBOX_MAILBOX_ERROR_OPEN,
- MN_MBOX_MAILBOX_ERROR_ENCODING,
- MN_MBOX_MAILBOX_ERROR_READ
-} MNmboxMailboxError;
-
typedef struct _MNmboxMailboxPrivate MNmboxMailboxPrivate;
typedef struct
@@ -55,6 +44,5 @@ typedef struct
} MNmboxMailboxClass;
GType mn_mbox_mailbox_get_type (void);
-GQuark mn_mbox_mailbox_error_quark (void);
#endif /* _MN_MBOX_MAILBOX_H */
diff --git a/src/mn-mh-mailbox.c b/src/mn-mh-mailbox.c
@@ -17,18 +17,50 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
#include <stdio.h>
#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <libgnomevfs/gnome-vfs.h>
#include "mn-mh-mailbox.h"
+#include "mn-vfs.h"
-/*** functions ***************************************************************/
+/*** types *******************************************************************/
+
+typedef struct
+{
+ MNMailboxIsCallback *callback;
+ gpointer user_data;
+} IsInfo;
+
+/*** variables ***************************************************************/
+
+static GObjectClass *parent_class = NULL;
-static void mn_mh_mailbox_class_init (MNMHMailboxClass *class);
-static gboolean mn_mh_mailbox_is (const char *locator);
-static gboolean mn_mh_mailbox_has_new (MNMailbox *mailbox,
- GError **err);
+/*** functions ***************************************************************/
+static void mn_mh_mailbox_class_init (MNMHMailboxClass *class);
+
+static GObject *mn_mh_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params);
+
+static void mn_mh_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data);
+static void mn_mh_mailbox_is_cb (gboolean result, gpointer user_data);
+
+static void mn_mh_mailbox_check (MNMailbox *mailbox);
+static void mn_mh_mailbox_check_open_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
+static void mn_mh_mailbox_check_read_line_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ const char *line,
+ gpointer user_data);
+static void mn_mh_mailbox_check_close_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
+
/*** implementation **********************************************************/
GType
@@ -62,95 +94,140 @@ mn_mh_mailbox_get_type (void)
static void
mn_mh_mailbox_class_init (MNMHMailboxClass *class)
{
+ GObjectClass *object_class = G_OBJECT_CLASS(class);
MNMailboxClass *mailbox_class = MN_MAILBOX_CLASS(class);
+ parent_class = g_type_class_peek_parent(class);
+
+ object_class->constructor = mn_mh_mailbox_constructor;
+
mailbox_class->format = "MH";
- mailbox_class->is_remote = FALSE;
mailbox_class->is = mn_mh_mailbox_is;
- mailbox_class->has_new = mn_mh_mailbox_has_new;
+ mailbox_class->check = mn_mh_mailbox_check;
}
-static gboolean
-mn_mh_mailbox_is (const char *locator)
+static GObject *
+mn_mh_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params)
{
- char *sequences;
- gboolean is;
+ GObject *object;
+ MNMailbox *mailbox;
+ char *sequences_uri;
+
+ object = G_OBJECT_CLASS(parent_class)->constructor(type, n_construct_properties, construct_params);
+ mailbox = MN_MAILBOX(object);
+
+ sequences_uri = g_build_path("/", mn_mailbox_get_uri(mailbox), ".mh_sequences", NULL);
+ mn_mailbox_monitor(mailbox,
+ sequences_uri,
+ GNOME_VFS_MONITOR_FILE,
+ MN_MAILBOX_MONITOR_EVENT_CHANGED
+ | MN_MAILBOX_MONITOR_EVENT_DELETED
+ | MN_MAILBOX_MONITOR_EVENT_CREATED);
+ g_free(sequences_uri);
+
+ return object;
+}
- sequences = g_build_filename(locator, ".mh_sequences", NULL);
- is = g_file_test(sequences, G_FILE_TEST_IS_REGULAR);
- g_free(sequences);
+static void
+mn_mh_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data)
+{
+ IsInfo *info;
+ char *sequences_uri;
+
+ info = g_new(IsInfo, 1);
+ info->callback = callback;
+ info->user_data = user_data;
- return is;
+ sequences_uri = g_build_path("/", uri, ".mh_sequences", NULL);
+ mn_vfs_async_test(sequences_uri, G_FILE_TEST_IS_REGULAR, mn_mh_mailbox_is_cb, info);
+ g_free(sequences_uri);
}
-static gboolean
-mn_mh_mailbox_has_new (MNMailbox *mailbox, GError **err)
+static void
+mn_mh_mailbox_is_cb (gboolean result, gpointer user_data)
{
- char *sequences;
- gboolean has_new = FALSE;
- GIOChannel *channel;
- GIOStatus status;
- GError *tmp_err = NULL;
- char *line;
+ IsInfo *info = user_data;
+
+ info->callback(result, info->user_data);
+ g_free(info);
+}
- sequences = g_build_filename(mailbox->locator, ".mh_sequences", NULL);
+static void
+mn_mh_mailbox_check (MNMailbox *mailbox)
+{
+ char *sequences_uri;
+ MNVFSAsyncHandle *handle;
+
+ sequences_uri = g_build_path("/", mn_mailbox_get_uri(mailbox), ".mh_sequences", NULL);
+ mn_vfs_async_open(&handle,
+ sequences_uri,
+ GNOME_VFS_OPEN_READ,
+ mn_mh_mailbox_check_open_cb,
+ mailbox);
+ g_free(sequences_uri);
+}
- channel = g_io_channel_new_file(sequences, "r", &tmp_err);
- if (! channel)
+static void
+mn_mh_mailbox_check_open_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data)
+{
+ MNMHMailbox *mailbox = user_data;
+
+ if (result == GNOME_VFS_OK)
+ mn_vfs_async_read_line(handle, 0, mn_mh_mailbox_check_read_line_cb, mailbox);
+ else
{
- g_set_error(err, MN_MH_MAILBOX_ERROR, MN_MH_MAILBOX_ERROR_OPEN_SEQUENCES,
- _("unable to open %s: %s"), sequences, tmp_err->message);
- g_error_free(tmp_err);
- goto end;
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), _("unable to open .mh_sequences: %s"), gnome_vfs_result_to_string(result));
+ mn_mailbox_end_check(MN_MAILBOX(mailbox));
}
+}
- while ((status = g_io_channel_read_line(channel,
- &line,
- NULL,
- NULL,
- &tmp_err)) == G_IO_STATUS_NORMAL)
- {
- if (! strncmp(line, "unseen", 6))
- {
- int num;
- int first;
+static void
+mn_mh_mailbox_check_read_line_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ const char *line,
+ gpointer user_data)
+{
+ MNMHMailbox *mailbox = user_data;
+ gboolean has_new = FALSE;
- num = sscanf(line, "unseen: %d", &first);
- has_new = num == 1;
+ if (line && ! strncmp(line, "unseen", 6))
+ {
+ int first;
- g_free(line);
- break;
+ if (sscanf(line, "unseen: %d", &first) == 1)
+ {
+ has_new = TRUE;
+ goto end;
}
-
- g_free(line);
}
- if (status == G_IO_STATUS_ERROR)
+ if (result == GNOME_VFS_OK)
+ mn_vfs_async_read_line(handle, 0, mn_mh_mailbox_check_read_line_cb, mailbox);
+ else
{
- g_set_error(err,
- MN_MH_MAILBOX_ERROR,
- MN_MH_MAILBOX_ERROR_READ_SEQUENCES,
- _("error while reading %s: %s"),
- mailbox->locator,
- tmp_err->message);
- g_error_free(tmp_err);
- }
+ if (result != GNOME_VFS_ERROR_EOF)
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), _("error while reading .mh_sequences: %s"), gnome_vfs_result_to_string(result));
- g_io_channel_shutdown(channel, TRUE, NULL);
- g_io_channel_unref(channel);
-
- end:
- g_free(sequences);
- return has_new;
+ end:
+ mn_mailbox_set_has_new(MN_MAILBOX(mailbox), has_new);
+ mn_vfs_async_close(handle, mn_mh_mailbox_check_close_cb, mailbox);
+ }
}
-GQuark
-mn_mh_mailbox_error_quark (void)
+static void
+mn_mh_mailbox_check_close_cb (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data)
{
- static GQuark quark = 0;
-
- if (! quark)
- quark = g_quark_from_static_string("mn_mh_mailbox_error");
+ MNMHMailbox *mailbox = user_data;
- return quark;
+ if (result != GNOME_VFS_OK)
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), _("unable to close .mh_sequences: %s"), gnome_vfs_result_to_string(result));
+ mn_mailbox_end_check(MN_MAILBOX(mailbox));
}
diff --git a/src/mn-mh-mailbox.h b/src/mn-mh-mailbox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
#ifndef _MN_MH_MAILBOX_H
#define _MN_MH_MAILBOX_H
-#include <glib.h>
#include <glib-object.h>
#include "mn-mailbox.h"
@@ -30,17 +29,13 @@
#define MN_IS_MH_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MN_TYPE_MH_MAILBOX))
#define MN_MH_MAILBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MN_TYPE_MH_MAILBOX, MNMHMailboxClass))
-#define MN_MH_MAILBOX_ERROR (mn_mh_mailbox_error_quark())
-
-typedef enum
-{
- MN_MH_MAILBOX_ERROR_OPEN_SEQUENCES,
- MN_MH_MAILBOX_ERROR_READ_SEQUENCES
-} MNMHMailboxError;
+typedef struct _MNMHMailboxPrivate MNMHMailboxPrivate;
typedef struct
{
MNMailbox mailbox;
+
+ MNMHMailboxPrivate *priv;
} MNMHMailbox;
typedef struct
@@ -49,6 +44,5 @@ typedef struct
} MNMHMailboxClass;
GType mn_mh_mailbox_get_type (void);
-GQuark mn_mh_mailbox_error_quark (void);
#endif /* _MN_MH_MAILBOX_H */
diff --git a/src/mn-pending-mailbox.c b/src/mn-pending-mailbox.c
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+#include <gtk/gtk.h>
+#include "mn-pending-mailbox.h"
+
+/*** functions ***************************************************************/
+
+static void mn_pending_mailbox_class_init (MNPendingMailboxClass *class);
+
+/*** implementation **********************************************************/
+
+GType
+mn_pending_mailbox_get_type (void)
+{
+ static GType pending_mailbox_type = 0;
+
+ if (! pending_mailbox_type)
+ {
+ static const GTypeInfo pending_mailbox_info = {
+ sizeof(MNPendingMailboxClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) mn_pending_mailbox_class_init,
+ NULL,
+ NULL,
+ sizeof(MNPendingMailbox),
+ 0,
+ NULL
+ };
+
+ pending_mailbox_type = g_type_register_static(MN_TYPE_MAILBOX,
+ "MNPendingMailbox",
+ &pending_mailbox_info,
+ 0);
+ }
+
+ return pending_mailbox_type;
+}
+
+static void
+mn_pending_mailbox_class_init (MNPendingMailboxClass *class)
+{
+ MNMailboxClass *mailbox_class = MN_MAILBOX_CLASS(class);
+
+ mailbox_class->stock_id = GTK_STOCK_EXECUTE;
+ mailbox_class->format = _("detecting...");
+}
+
+MNMailbox *
+mn_pending_mailbox_new (const char *uri)
+{
+ g_return_val_if_fail(uri != NULL, NULL);
+
+ return g_object_new(MN_TYPE_PENDING_MAILBOX,
+ "uri", uri,
+ NULL);
+}
diff --git a/src/mn-pending-mailbox.h b/src/mn-pending-mailbox.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _MN_PENDING_MAILBOX_H
+#define _MN_PENDING_MAILBOX_H
+
+#include <glib-object.h>
+#include "mn-mailbox.h"
+
+#define MN_TYPE_PENDING_MAILBOX (mn_pending_mailbox_get_type())
+#define MN_PENDING_MAILBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MN_TYPE_PENDING_MAILBOX, MNPendingMailbox))
+#define MN_PENDING_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MN_TYPE_PENDING_MAILBOX, MNPendingMailboxClass))
+#define MN_IS_PENDING_MAILBOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MN_TYPE_PENDING_MAILBOX))
+#define MN_IS_PENDING_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MN_TYPE_PENDING_MAILBOX))
+#define MN_PENDING_MAILBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MN_TYPE_PENDING_MAILBOX, MNPendingMailboxClass))
+
+typedef struct
+{
+ MNMailbox mailbox;
+} MNPendingMailbox;
+
+typedef struct
+{
+ MNMailboxClass mailbox_class;
+} MNPendingMailboxClass;
+
+GType mn_pending_mailbox_get_type (void);
+MNMailbox *mn_pending_mailbox_new (const char *uri);
+
+#endif /* _MN_PENDING_MAILBOX_H */
diff --git a/src/mn-pop3-mailbox.c b/src/mn-pop3-mailbox.c
@@ -17,33 +17,36 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
#include <stdio.h>
#include <stdarg.h>
-#include <stdlib.h>
-#include <gnet.h>
#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <gnet.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
#include "mn-pop3-mailbox.h"
-#include "mn-dialog.h"
-#include "mn-settings.h"
#include "mn-util.h"
-
-/*** cpp *********************************************************************/
-
-#define MN_POP3_MAILBOX_MAX_RESPONSE_LEN 512 /* RFC 1939 */
+#include "mn-uri.h"
/*** types *******************************************************************/
+typedef enum
+{
+ STATE_CONNECT,
+ STATE_ACK,
+ STATE_USER,
+ STATE_PASS,
+ STATE_STAT,
+ STATE_QUIT
+} State;
+
struct _MNPOP3MailboxPrivate
{
char *hostname;
int port;
-
- char *user;
+ char *username;
char *password;
- GTcpSocket *socket;
- GIOChannel *channel;
+ State state;
};
/*** variables ***************************************************************/
@@ -52,26 +55,23 @@ static GObjectClass *parent_class = NULL;
/*** functions ***************************************************************/
-static void mn_pop3_mailbox_class_init (MNPOP3MailboxClass *class);
-static GObject *mn_pop3_mailbox_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_params);
-static void mn_pop3_mailbox_finalize (GObject *object);
-static void mn_pop3_mailbox_init (MNPOP3Mailbox *mailbox);
-
-static gboolean mn_pop3_mailbox_is (const char *locator);
-static gboolean mn_pop3_mailbox_has_new (MNMailbox *mailbox,
- GError **err);
-
-static void mn_pop3_mailbox_parse_locator (MNPOP3Mailbox *pop3_mailbox);
-static void mn_pop3_mailbox_strip_crlf (char *str);
-static gboolean mn_pop3_mailbox_server_connect (MNPOP3Mailbox *mailbox,
- GError **err);
-static gboolean mn_pop3_mailbox_server_read (MNPOP3Mailbox *mailbox,
- char *buf);
-static gboolean mn_pop3_mailbox_server_command (MNPOP3Mailbox *mailbox,
- const char *format,
- ...);
+static void mn_pop3_mailbox_class_init (MNPOP3MailboxClass *class);
+static void mn_pop3_mailbox_init (MNPOP3Mailbox *mailbox);
+static void mn_pop3_mailbox_finalize (GObject *object);
+
+static GObject *mn_pop3_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params);
+
+static void mn_pop3_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data);
+static void mn_pop3_mailbox_check (MNMailbox *mailbox);
+
+static void mn_pop3_mailbox_conn_write (GConn *conn, const char *format, ...);
+static void mn_pop3_mailbox_conn_cb (GConn *conn,
+ GConnEvent *event,
+ gpointer user_data);
/*** implementation **********************************************************/
@@ -115,9 +115,8 @@ mn_pop3_mailbox_class_init (MNPOP3MailboxClass *class)
object_class->finalize = mn_pop3_mailbox_finalize;
mailbox_class->format = "POP3";
- mailbox_class->is_remote = TRUE;
mailbox_class->is = mn_pop3_mailbox_is;
- mailbox_class->has_new = mn_pop3_mailbox_has_new;
+ mailbox_class->check = mn_pop3_mailbox_check;
}
static void
@@ -126,34 +125,12 @@ mn_pop3_mailbox_init (MNPOP3Mailbox *mailbox)
mailbox->priv = g_new0(MNPOP3MailboxPrivate, 1);
}
-static GObject *
-mn_pop3_mailbox_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_params)
-{
- GObject *object;
- MNPOP3Mailbox *pop3_mailbox;
-
- object = G_OBJECT_CLASS(parent_class)->constructor(type,
- n_construct_properties,
- construct_params);
- pop3_mailbox = MN_POP3_MAILBOX(object);
-
- mn_pop3_mailbox_parse_locator(pop3_mailbox);
-
- return object;
-}
-
static void
mn_pop3_mailbox_finalize (GObject *object)
{
- MNMailbox *mailbox = MN_MAILBOX(object);
MNPOP3Mailbox *pop3_mailbox = MN_POP3_MAILBOX(object);
- if (! mailbox->err) /* mailbox->name has been set only if ! mailbox->err */
- g_free(mailbox->name);
-
- g_free(pop3_mailbox->priv->user);
+ g_free(pop3_mailbox->priv->username);
g_free(pop3_mailbox->priv->password);
g_free(pop3_mailbox->priv->hostname);
g_free(pop3_mailbox->priv);
@@ -161,308 +138,200 @@ mn_pop3_mailbox_finalize (GObject *object)
G_OBJECT_CLASS(parent_class)->finalize(object);
}
-static gboolean
-mn_pop3_mailbox_is (const char *locator)
-{
- g_return_val_if_fail(locator != NULL, FALSE);
-
- return ! strncmp(locator, "pop3:", 5);
-}
-
-static void
-mn_pop3_mailbox_parse_locator (MNPOP3Mailbox *pop3_mailbox)
+static GObject *
+mn_pop3_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params)
{
- MNMailbox *mailbox = MN_MAILBOX(pop3_mailbox);
- char *user;
- char *password;
- char *hostname;
- char *port;
-
- g_assert(mailbox->locator != NULL);
+ GObject *object;
+ MNMailbox *mailbox;
+ MNPOP3Mailbox *pop3_mailbox;
- user = mailbox->locator + 5;
- if (strlen(mailbox->locator) < 5)
- goto error;
+ object = G_OBJECT_CLASS(parent_class)->constructor(type,
+ n_construct_properties,
+ construct_params);
+ mailbox = MN_MAILBOX(object);
+ pop3_mailbox = MN_POP3_MAILBOX(object);
- password = strchr(user, ':');
- if (! password++) /* ++ to skip the colon */
- goto error;
+ if (! mn_uri_parse_pop(mn_mailbox_get_uri(mailbox),
+ &pop3_mailbox->priv->username,
+ &pop3_mailbox->priv->password,
+ &pop3_mailbox->priv->hostname,
+ &pop3_mailbox->priv->port))
+ mn_mailbox_set_init_error(mailbox, _("unable to parse URI"));
- hostname = strchr(password, '@');
- if (! hostname++) /* ++ to skip the arobas */
- goto error;
-
- port = strchr(hostname, ':');
- if (! (port++ && mn_str_isnumeric(port))) /* ++ to skip the colon */
- goto error;
-
- if ((password - user - 1 <= 0)
- || (hostname - password - 1 <= 0)
- || (port - hostname - 1 <= 0))
- goto error;
-
- pop3_mailbox->priv->user = g_strndup(user, password - user - 1);
- pop3_mailbox->priv->password = g_strndup(password, hostname - password - 1);
- pop3_mailbox->priv->hostname = g_strndup(hostname, port - hostname - 1);
- pop3_mailbox->priv->port = atoi(port);
-
- mailbox->name = g_strdup_printf("%s@%s:%i",
- pop3_mailbox->priv->user,
- pop3_mailbox->priv->hostname,
- pop3_mailbox->priv->port);
-
- return; /* locator's okay */
-
- error:
- mailbox->err = g_error_new(MN_POP3_MAILBOX_ERROR,
- MN_POP3_MAILBOX_ERROR_PARSE_LOCATOR,
- _("unable to parse locator \"%s\""),
- mailbox->locator);
+ return object;
}
static void
-mn_pop3_mailbox_strip_crlf (char *str)
+mn_pop3_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data)
{
- char *ptr;
-
- ptr = strrchr(str, '\n');
- if (ptr)
- *ptr = 0;
+ char *scheme;
+ gboolean is;
- ptr = strrchr(str, '\r');
- if (ptr)
- *ptr = 0;
-}
-
-static gboolean
-mn_pop3_mailbox_server_connect (MNPOP3Mailbox *mailbox, GError **err)
-{
- GInetAddr *addr;
-
- if (mn_settings.debug)
- mn_notice(_("resolving IP address of %s"), mailbox->priv->hostname);
-
- addr = gnet_inetaddr_new(mailbox->priv->hostname, mailbox->priv->port);
- if (! addr)
- {
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_RESOLVE,
- _("unable to resolve %s"), mailbox->priv->hostname);
- return FALSE;
- }
-
- if (mn_settings.debug)
- mn_notice(_("connecting to POP3 server %s:%i"),
- mailbox->priv->hostname, mailbox->priv->port);
-
- mailbox->priv->socket = gnet_tcp_socket_new(addr);
- gnet_inetaddr_unref(addr);
-
- if (! mailbox->priv->socket)
- {
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_CONNECT,
- _("unable to connect to %s"), mailbox->priv->hostname);
- return FALSE;
- }
-
- if (mn_settings.debug)
- mn_notice(_("successfully connected to %s:%i"),
- mailbox->priv->hostname, mailbox->priv->port);
-
- mailbox->priv->channel = gnet_tcp_socket_get_io_channel(mailbox->priv->socket);
+ scheme = gnome_vfs_get_uri_scheme(uri);
+ is = scheme && ! strcmp(scheme, "pop");
+ g_free(scheme);
- return TRUE;
+ callback(is, user_data);
}
-/*
- * Reads a line from MAILBOX's server, storing the output in BUF.
- *
- * Returns true if the line was read successfully, and the server reported
- * a POP3 success message (+OK).
- *
- * BUF is guaranteed to be valid in all cases (eitheir server's reply
- * or empty string).
- */
-static gboolean
-mn_pop3_mailbox_server_read (MNPOP3Mailbox *mailbox, char *buf)
+static void
+mn_pop3_mailbox_check (MNMailbox *mailbox)
{
- GIOError status;
- gsize count;
+ MNPOP3Mailbox *pop3_mailbox = MN_POP3_MAILBOX(mailbox);
+ GConn *conn;
- status = gnet_io_channel_readline(mailbox->priv->channel,
- buf,
- MN_POP3_MAILBOX_MAX_RESPONSE_LEN,
- &count);
-
- if (status != G_IO_ERROR_NONE)
- buf[0] = 0;
+ mn_info(_("connecting to POP3 server %s:%i"), pop3_mailbox->priv->hostname, pop3_mailbox->priv->port);
- if (mn_settings.debug)
- {
- if (status == G_IO_ERROR_NONE && count != 0)
- {
- char tmp[MN_POP3_MAILBOX_MAX_RESPONSE_LEN];
-
- strcpy(tmp, buf);
- mn_pop3_mailbox_strip_crlf(tmp);
-
- mn_notice("<%20-s> %s", mailbox->priv->hostname, tmp);
- }
- else
- mn_notice(_("unable to read from %s"), mailbox->priv->hostname);
- }
-
- return status == G_IO_ERROR_NONE && count != 0 && ! strncmp(buf, "+OK", 3);
+ pop3_mailbox->priv->state = STATE_CONNECT;
+ conn = gnet_conn_new(pop3_mailbox->priv->hostname, pop3_mailbox->priv->port, mn_pop3_mailbox_conn_cb, mailbox);
+ gnet_conn_connect(conn);
}
-/*
- * Sends a command to MAILBOX's server, automatically appending a
- * trailing crlf.
- *
- * Returns true if the command was sent successfully.
- */
-static gboolean
-mn_pop3_mailbox_server_command (MNPOP3Mailbox *mailbox,
- const char *format,
- ...)
+static void
+mn_pop3_mailbox_conn_write (GConn *conn, const char *format, ...)
{
va_list args;
char *command;
char *full;
- int len;
- GIOError status;
- gsize count;
+
+ g_return_if_fail(conn != NULL);
+ g_return_if_fail(format != NULL);
va_start(args, format);
command = g_strdup_vprintf(format, args);
va_end(args);
- if (mn_settings.debug)
- mn_notice("<%20-s> %s", PACKAGE, command);
-
+ mn_info("<%20-s> %s", PACKAGE, command);
full = g_strconcat(command, "\r\n", NULL);
g_free(command);
- len = strlen(full);
- status = gnet_io_channel_writen(mailbox->priv->channel, full, len, &count);
+ gnet_conn_write(conn, full, strlen(full));
g_free(full);
-
- return status == G_IO_ERROR_NONE && count == len;
}
-static gboolean
-mn_pop3_mailbox_has_new (MNMailbox *mailbox, GError **err)
+static void
+mn_pop3_mailbox_conn_cb (GConn *conn, GConnEvent *event, gpointer user_data)
{
- MNPOP3Mailbox *pop3_mailbox = MN_POP3_MAILBOX(mailbox);
- char buf[MN_POP3_MAILBOX_MAX_RESPONSE_LEN];
- gboolean has_new = FALSE;
- char ok[4];
- int count;
- int size;
-
- if (! mn_pop3_mailbox_server_connect(pop3_mailbox, err))
- return FALSE;
-
- /* get ack */
-
- if (! mn_pop3_mailbox_server_read(pop3_mailbox, buf))
- {
- mn_pop3_mailbox_strip_crlf(buf);
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_ACK,
- _("acknowledgement error (server replied \"%s\")"), buf);
- goto end;
- }
-
- /* authenticate */
-
- if (! mn_pop3_mailbox_server_command(pop3_mailbox,
- "USER %s",
- pop3_mailbox->priv->user))
- {
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_SEND,
- _("unable to send username"));
- goto end;
- }
-
- if (! mn_pop3_mailbox_server_read(pop3_mailbox, buf))
- {
- mn_pop3_mailbox_strip_crlf(buf);
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_AUTH,
- _("username authentication error (server replied \"%s\")"), buf);
- goto quit;
- }
-
- if (! mn_pop3_mailbox_server_command(pop3_mailbox,
- "PASS %s",
- pop3_mailbox->priv->password))
- {
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_SEND,
- _("unable to send password"));
- goto end;
- }
-
- if (! mn_pop3_mailbox_server_read(pop3_mailbox, buf))
- {
- mn_pop3_mailbox_strip_crlf(buf);
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_AUTH,
- _("password authentication error (server replied \"%s\")"), buf);
- goto quit;
- }
-
- /* issue a STAT */
-
- if (! mn_pop3_mailbox_server_command(pop3_mailbox, "STAT"))
- {
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_SEND,
- _("unable to issue a STAT"));
- goto end;
- }
-
- if (! mn_pop3_mailbox_server_read(pop3_mailbox, buf))
- {
- mn_pop3_mailbox_strip_crlf(buf);
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_REPLY,
- _("error in STAT reply (server replied \"%s\")"), buf);
- goto quit;
- }
+ MNPOP3Mailbox *mailbox = user_data;
- if (sscanf(buf, "%s %d %d", ok, &count, &size) < 3)
+ switch (event->type)
{
- mn_pop3_mailbox_strip_crlf(buf);
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_REPLY,
- _("could not parse STAT reply \"%s\""), buf);
- goto quit;
- }
+ case GNET_CONN_CONNECT:
+ mn_info(_("successfully connected to %s:%i"), mailbox->priv->hostname, mailbox->priv->port);
+ mailbox->priv->state = STATE_ACK;
+ gnet_conn_readline(conn);
+ break;
- has_new = count != 0;
-
- quit:
- if (! mn_pop3_mailbox_server_command(pop3_mailbox, "QUIT"))
- {
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_SEND,
- _("unable to issue a QUIT"));
- goto end;
- }
-
- if (! mn_pop3_mailbox_server_read(pop3_mailbox, buf))
- {
- mn_pop3_mailbox_strip_crlf(buf);
- g_set_error(err, MN_POP3_MAILBOX_ERROR, MN_POP3_MAILBOX_ERROR_REPLY,
- _("error in QUIT reply (server replied \"%s\")"), buf);
- goto end;
+ case GNET_CONN_ERROR:
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), _("unable to connect to server"));
+ goto unref;
+
+ case GNET_CONN_CLOSE:
+ if (! mn_mailbox_get_error(MN_MAILBOX(mailbox)))
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), _("connection to server unexpectedly closed"));
+ goto unref;
+
+ case GNET_CONN_READ:
+ {
+ mn_info("<%20-s> %s", mailbox->priv->hostname, event->buffer);
+
+ if (! strcmp(event->buffer, "+OK") || ! strncmp(event->buffer, "+OK ", 4))
+ switch (mailbox->priv->state)
+ {
+ case STATE_ACK:
+ mailbox->priv->state = STATE_USER;
+ mn_pop3_mailbox_conn_write(conn, "USER %s", mailbox->priv->username);
+ break;
+
+ case STATE_USER:
+ mailbox->priv->state = STATE_PASS;
+ mn_pop3_mailbox_conn_write(conn, "PASS %s", mailbox->priv->password);
+ break;
+
+ case STATE_PASS:
+ mailbox->priv->state = STATE_STAT;
+ mn_pop3_mailbox_conn_write(conn, "STAT");
+ break;
+
+ case STATE_STAT:
+ {
+ char ok[4];
+ int count;
+ int size;
+
+ if (sscanf(event->buffer, "%3s %d %d", ok, &count, &size) == 3)
+ {
+ mn_mailbox_set_has_new(MN_MAILBOX(mailbox), count != 0);
+ mailbox->priv->state = STATE_QUIT;
+ mn_pop3_mailbox_conn_write(conn, "QUIT");
+ }
+ else
+ {
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), _("invalid STAT reply \"%s\""), event->buffer);
+ /* the server is uncompliant, we do not send a QUIT */
+ goto unref;
+ }
+ }
+ break;
+
+ case STATE_QUIT:
+ goto unref;
+ break;
+
+ default:
+ g_return_if_reached();
+ }
+ else /* error reply */
+ {
+ if (! mn_mailbox_get_error(MN_MAILBOX(mailbox)))
+ mn_mailbox_set_error(MN_MAILBOX(mailbox), "%s", event->buffer);
+
+ switch (mailbox->priv->state)
+ {
+ case STATE_ACK:
+ case STATE_QUIT:
+ goto unref;
+
+ case STATE_USER:
+ case STATE_PASS:
+ case STATE_STAT:
+ mailbox->priv->state = STATE_QUIT;
+ mn_pop3_mailbox_conn_write(conn, "QUIT");
+ break;
+
+ default:
+ g_return_if_reached();
+ }
+ }
+ }
+ break;
+
+ case GNET_CONN_WRITE:
+ switch (mailbox->priv->state)
+ {
+ case STATE_USER:
+ case STATE_PASS:
+ case STATE_STAT:
+ case STATE_QUIT:
+ gnet_conn_readline(conn);
+ break;
+
+ default:
+ g_return_if_reached();
+ }
+ break;
+
+ default:
+ /* nop */
+ break;
}
-
- end:
- gnet_tcp_socket_delete(pop3_mailbox->priv->socket);
- return has_new;
-}
-
-GQuark
-mn_pop3_mailbox_error_quark (void)
-{
- static GQuark quark = 0;
-
- if (! quark)
- quark = g_quark_from_static_string("mn_pop3_mailbox_error");
+ return;
- return quark;
+ unref:
+ gnet_conn_unref(conn);
+ mn_mailbox_end_check(MN_MAILBOX(mailbox));
}
diff --git a/src/mn-pop3-mailbox.h b/src/mn-pop3-mailbox.h
@@ -19,7 +19,6 @@
#ifndef _MN_POP3_MAILBOX_H
#define _MN_POP3_MAILBOX_H
-#include <glib.h>
#include <glib-object.h>
#include "mn-mailbox.h"
@@ -30,19 +29,6 @@
#define MN_IS_POP3_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MN_TYPE_POP3_MAILBOX))
#define MN_POP3_MAILBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MN_TYPE_POP3_MAILBOX, MNPOP3MailboxClass))
-#define MN_POP3_MAILBOX_ERROR (mn_pop3_mailbox_error_quark())
-
-typedef enum
-{
- MN_POP3_MAILBOX_ERROR_PARSE_LOCATOR,
- MN_POP3_MAILBOX_ERROR_RESOLVE,
- MN_POP3_MAILBOX_ERROR_CONNECT,
- MN_POP3_MAILBOX_ERROR_ACK,
- MN_POP3_MAILBOX_ERROR_SEND,
- MN_POP3_MAILBOX_ERROR_AUTH,
- MN_POP3_MAILBOX_ERROR_REPLY
-} MNPOP3MailboxError;
-
typedef struct _MNPOP3MailboxPrivate MNPOP3MailboxPrivate;
typedef struct
@@ -58,6 +44,5 @@ typedef struct
} MNPOP3MailboxClass;
GType mn_pop3_mailbox_get_type (void);
-GQuark mn_pop3_mailbox_error_quark (void);
#endif /* _MN_POP3_MAILBOX_H */
diff --git a/src/mn-preferences.c b/src/mn-preferences.c
@@ -17,521 +17,666 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#include <glade/glade.h>
-#include <string.h>
#include "mn-conf.h"
#include "mn-dialog.h"
-#include "mn-mailbox.h"
#include "mn-mailboxes.h"
#include "mn-preferences.h"
#include "mn-util.h"
+#include "mn-stock.h"
+#include "mn-unsupported-mailbox.h"
+#include "mn-pending-mailbox.h"
+#include "mn-mailbox-properties-dialog.h"
+#include "mn-uri.h"
+
+/*** cpp *********************************************************************/
+
+#define GNOME_COPIED_FILES "x-special/gnome-copied-files"
/*** types *******************************************************************/
enum {
- COLUMN_OBJECT,
+ COLUMN_URI,
+ COLUMN_MAILBOX_ICON,
COLUMN_MAILBOX,
COLUMN_FORMAT,
N_COLUMNS
};
-/*** variables ***************************************************************/
-
-static GladeXML *preferences_xml = NULL;
-static GtkWidget *preferences;
-
-static GtkWidget *local_check;
-static GtkWidget *local_minutes_spin;
-static GtkWidget *local_minutes_label;
-static GtkWidget *local_seconds_spin;
-static GtkWidget *local_seconds_label;
-
-static GtkWidget *remote_check;
-static GtkWidget *remote_minutes_spin;
-static GtkWidget *remote_minutes_label;
-static GtkWidget *remote_seconds_spin;
-static GtkWidget *remote_seconds_label;
-
-static GtkWidget *list;
-static GtkWidget *add_remote;
-static GtkWidget *remove;
+typedef struct
+{
+ GtkWidget *dialog;
+
+ GtkWidget *delay_label;
+ GtkWidget *minutes_spin;
+ GtkWidget *seconds_spin;
+
+ GtkWidget *scrolled;
+ GtkWidget *list;
+ GtkWidget *selected_label;
+ GtkWidget *remove;
+ GtkWidget *properties;
+
+ GtkWidget *command_new_mail_check;
+ GtkWidget *command_new_mail_entry;
+ GtkWidget *command_clicked_check;
+ GtkWidget *command_clicked_entry;
+
+ GtkWidget *mailbox_menu;
+ GtkWidget *remove_item;
+ GtkWidget *cut_item;
+ GtkWidget *copy_item;
+ GtkWidget *paste_item;
+ GtkWidget *properties_item;
+ GtkListStore *store;
+} PreferencesDialog;
-static GtkWidget *command_new_mail_check;
-static GtkWidget *command_new_mail_entry;
-static GtkWidget *command_clicked_check;
-static GtkWidget *command_clicked_entry;
+/*** variables ***************************************************************/
-static GtkListStore *store;
+static GtkClipboard *clipboard = NULL;
+static GdkAtom gnome_copied_files_atom;
+static PreferencesDialog preferences = { NULL };
+static GtkWidget *add_mailbox = NULL;
+
/*** functions ***************************************************************/
-static void mn_preferences_add_column (int id,
- const char *label);
-static void mn_preferences_bind_boolean (GtkWidget *widget,
- gpointer key);
-static void mn_preferences_boolean_toggled (GtkToggleButton *button,
- gpointer user_data);
-static void mn_preferences_bind_int (GtkWidget *widget,
- gpointer key);
-static void mn_preferences_int_changed (GtkSpinButton *button,
- gpointer user_data);
-static void mn_preferences_bind_string (GtkWidget *widget,
- gpointer key);
-static void mn_preferences_string_changed (GtkEditable *editable,
- gpointer user_data);
-static void mn_preferences_selection_changed (GtkTreeSelection *selection,
- gpointer user_data);
-static void mn_preferences_remove_mailbox_cb (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer data);
-static gboolean mn_preferences_search_equal_func (GtkTreeModel *model,
- int column,
- const char *key,
- GtkTreeIter *iter,
- gpointer search_data);
-static void mn_preferences_update_sensitivity (void);
-static void mn_preferences_add_local_mailbox (void);
-static void mn_preferences_add_remote_mailbox (void);
-static void mn_preferences_remove_mailbox (void);
+static void mn_preferences_update_iter (GtkTreeIter *iter, MNMailbox *mailbox);
+static gboolean mn_preferences_has_mailbox (MNMailbox *mailbox);
+
+static void mn_preferences_update_selected_label (void);
+static void mn_preferences_update_sensitivity (void);
+
+static void mn_preferences_add_mailbox (void);
+
+static void mn_preferences_remove_mailbox (void);
+static void mn_preferences_remove_mailbox_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data);
+
+static void mn_preferences_cut_mailbox (void);
+
+static void mn_preferences_copy_mailbox (void);
+static void mn_preferences_copy_mailbox_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data);
+
+static void mn_preferences_get_clipboard_cb (GtkClipboard *clipboard,
+ GtkSelectionData *selection_data,
+ unsigned int info,
+ gpointer user_data_or_owner);
+static void mn_preferences_clear_clipboard_cb (GtkClipboard *clipboard,
+ gpointer user_data_or_owner);
+
+static void mn_preferences_paste_mailbox (void);
+static void mn_preferences_paste_mailbox_receive_cb (GtkClipboard *clipboard,
+ GtkSelectionData *selection_data,
+ gpointer data);
+
+static void mn_preferences_edit_mailbox (void);
+static void mn_preferences_edit_mailbox_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data);
+
+static void mn_preferences_selection_changed_h (GtkTreeSelection *selection,
+ gpointer user_data);
+static void mn_preferences_mailbox_properties_response_h (GtkDialog *dialog,
+ int response,
+ gpointer user_data);
+
+static void mn_preferences_popup_mailbox_menu (unsigned int button,
+ guint32 activate_time);
+static void mn_preferences_popup_mailbox_menu_receive_cb (GtkClipboard *clipboard,
+ GtkSelectionData *selection_data,
+ gpointer data);
/*** implementation **********************************************************/
-static void
-mn_preferences_add_column (int id, const char *label)
-{
- GtkTreeViewColumn *column;
-
- g_return_if_fail(label != NULL);
-
- column = gtk_tree_view_column_new_with_attributes(label,
- gtk_cell_renderer_text_new(),
- "text", id,
- NULL);
- gtk_tree_view_column_set_sort_column_id(column, id);
- gtk_tree_view_column_set_resizable(column, TRUE);
- gtk_tree_view_append_column(GTK_TREE_VIEW(list), column);
-}
-
void
mn_preferences_display (void)
{
+ GtkAccelGroup *accel_group;
GtkSizeGroup *size_group;
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer;
GtkTreeSelection *selection;
- if (preferences_xml)
+ if (! clipboard)
{
- gtk_window_present(GTK_WINDOW(preferences));
+ clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ gnome_copied_files_atom = gdk_atom_intern(GNOME_COPIED_FILES, FALSE);
+ }
+
+ if (preferences.dialog)
+ {
+ gtk_window_present(GTK_WINDOW(preferences.dialog));
return;
}
- preferences_xml = mn_glade_xml_new("preferences");
-
- preferences = glade_xml_get_widget(preferences_xml, "dialog");
- local_check = glade_xml_get_widget(preferences_xml, "local_check");
- local_minutes_spin = glade_xml_get_widget(preferences_xml, "local_minutes_spin");
- local_minutes_label = glade_xml_get_widget(preferences_xml, "local_minutes_label");
- local_seconds_spin = glade_xml_get_widget(preferences_xml, "local_seconds_spin");
- local_seconds_label = glade_xml_get_widget(preferences_xml, "local_seconds_label");
- remote_check = glade_xml_get_widget(preferences_xml, "remote_check");
- remote_minutes_spin = glade_xml_get_widget(preferences_xml, "remote_minutes_spin");
- remote_minutes_label = glade_xml_get_widget(preferences_xml, "remote_minutes_label");
- remote_seconds_spin = glade_xml_get_widget(preferences_xml, "remote_seconds_spin");
- remote_seconds_label = glade_xml_get_widget(preferences_xml, "remote_seconds_label");
- list = glade_xml_get_widget(preferences_xml, "list");
- add_remote = glade_xml_get_widget(preferences_xml, "add_remote");
- remove = glade_xml_get_widget(preferences_xml, "remove");
- command_new_mail_check = glade_xml_get_widget(preferences_xml, "command_new_mail_check");
- command_new_mail_entry = glade_xml_get_widget(preferences_xml, "command_new_mail_entry");
- command_clicked_check = glade_xml_get_widget(preferences_xml, "command_clicked_check");
- command_clicked_entry = glade_xml_get_widget(preferences_xml, "command_clicked_entry");
-
-#ifndef WITH_POP3
- gtk_widget_set_sensitive(add_remote, FALSE);
-#endif
+ mn_create_interface("preferences",
+ "dialog", &preferences.dialog,
+ "delay_label", &preferences.delay_label,
+ "minutes_spin", &preferences.minutes_spin,
+ "seconds_spin", &preferences.seconds_spin,
+ "scrolled", &preferences.scrolled,
+ "list", &preferences.list,
+ "selected_label", &preferences.selected_label,
+ "remove", &preferences.remove,
+ "properties", &preferences.properties,
+ "command_new_mail_check", &preferences.command_new_mail_check,
+ "command_new_mail_entry", &preferences.command_new_mail_entry,
+ "command_clicked_check", &preferences.command_clicked_check,
+ "command_clicked_entry", &preferences.command_clicked_entry,
+ "mailbox_menu", &preferences.mailbox_menu,
+ "remove_item", &preferences.remove_item,
+ "cut_item", &preferences.cut_item,
+ "copy_item", &preferences.copy_item,
+ "paste_item", &preferences.paste_item,
+ "properties_item", &preferences.properties_item,
+ NULL);
+
+ accel_group = gtk_menu_get_accel_group(GTK_MENU(preferences.mailbox_menu));
+ gtk_window_add_accel_group(GTK_WINDOW(preferences.dialog), accel_group);
/* finish the mailboxes list */
- store = gtk_list_store_new(N_COLUMNS,
- MN_TYPE_MAILBOX,
- G_TYPE_STRING,
- G_TYPE_STRING);
- gtk_tree_view_set_model(GTK_TREE_VIEW(list), GTK_TREE_MODEL(store));
+ preferences.store = gtk_list_store_new(N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(preferences.list), GTK_TREE_MODEL(preferences.store));
+
+ column = gtk_tree_view_column_new();
+ gtk_tree_view_column_set_title(column, _("Mailbox"));
+ gtk_tree_view_column_set_resizable(column, TRUE);
+ gtk_tree_view_column_set_sort_column_id(column, COLUMN_MAILBOX);
+
+ renderer = gtk_cell_renderer_pixbuf_new();
+ gtk_tree_view_column_pack_start(column, renderer, FALSE);
+ gtk_tree_view_column_add_attribute(column, renderer, "stock-id", COLUMN_MAILBOX_ICON);
+
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(column, renderer, TRUE);
+ gtk_tree_view_column_add_attribute(column, renderer, "text", COLUMN_MAILBOX);
+
+ gtk_tree_view_append_column(GTK_TREE_VIEW(preferences.list), column);
- mn_preferences_add_column(COLUMN_MAILBOX, _("Mailbox"));
- mn_preferences_add_column(COLUMN_FORMAT, _("Format"));
+ column = gtk_tree_view_column_new_with_attributes(_("Format"),
+ gtk_cell_renderer_text_new(),
+ "text", COLUMN_FORMAT,
+ NULL);
- gtk_tree_view_set_enable_search(GTK_TREE_VIEW(list), TRUE);
- gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(list),
- mn_preferences_search_equal_func,
- NULL,
- NULL);
+ gtk_tree_view_column_set_resizable(column, TRUE);
+ gtk_tree_view_column_set_sort_column_id(column, COLUMN_FORMAT);
+ gtk_tree_view_append_column(GTK_TREE_VIEW(preferences.list), column);
+
+ gtk_tree_view_set_search_column(GTK_TREE_VIEW(preferences.list), COLUMN_MAILBOX);
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(preferences.list));
gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
- g_signal_connect(G_OBJECT(selection), "changed",
- G_CALLBACK(mn_preferences_selection_changed), NULL);
+ g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(mn_preferences_selection_changed_h), NULL);
+ mn_setup_dnd(preferences.scrolled);
+
/* create the GtkSizeGroup */
size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget(size_group, local_check);
- gtk_size_group_add_widget(size_group, remote_check);
- gtk_size_group_add_widget(size_group, command_new_mail_check);
- gtk_size_group_add_widget(size_group, command_clicked_check);
-
- mn_preferences_update_values();
+ gtk_size_group_add_widget(size_group, preferences.delay_label);
+ gtk_size_group_add_widget(size_group, preferences.command_new_mail_check);
+ gtk_size_group_add_widget(size_group, preferences.command_clicked_check);
+ g_object_unref(size_group);
+
+ mn_conf_link(preferences.dialog, MN_CONF_PREFERENCES_DIALOG,
+ preferences.minutes_spin, MN_CONF_DELAY_MINUTES,
+ preferences.seconds_spin, MN_CONF_DELAY_SECONDS,
+ preferences.command_new_mail_check, MN_CONF_COMMANDS_NEW_MAIL_ENABLED,
+ preferences.command_new_mail_entry, MN_CONF_COMMANDS_NEW_MAIL_COMMAND,
+ preferences.command_clicked_check, MN_CONF_COMMANDS_CLICKED_ENABLED,
+ preferences.command_clicked_entry, MN_CONF_COMMANDS_CLICKED_COMMAND,
+ NULL);
+
+ mn_preferences_update_list();
+ mn_preferences_update_selected_label();
mn_preferences_update_sensitivity();
- mn_preferences_bind_boolean(local_check, "/apps/mail-notification/local/enabled");
- mn_preferences_bind_int(local_minutes_spin, "/apps/mail-notification/local/delay/minutes");
- mn_preferences_bind_int(local_seconds_spin, "/apps/mail-notification/local/delay/seconds");
- mn_preferences_bind_boolean(remote_check, "/apps/mail-notification/remote/enabled");
- mn_preferences_bind_int(remote_minutes_spin, "/apps/mail-notification/remote/delay/minutes");
- mn_preferences_bind_int(remote_seconds_spin, "/apps/mail-notification/remote/delay/seconds");
- mn_preferences_bind_boolean(command_new_mail_check, "/apps/mail-notification/commands/new-mail/enabled");
- mn_preferences_bind_string(command_new_mail_entry, "/apps/mail-notification/commands/new-mail/command");
- mn_preferences_bind_boolean(command_clicked_check, "/apps/mail-notification/commands/clicked/enabled");
- mn_preferences_bind_string(command_clicked_entry, "/apps/mail-notification/commands/clicked/command");
-
- gtk_widget_show(GTK_WIDGET(preferences));
+ gtk_widget_show(preferences.dialog);
}
void
-mn_preferences_update_values (void)
+mn_preferences_update_list (void)
{
- if (preferences)
+ if (preferences.dialog)
{
- const char *command_new_mail;
- const char *command_clicked;
- GSList *mailboxes;
+ GtkTreeIter iter;
+ gboolean valid;
+ MNMailbox *mailbox;
GSList *l;
- command_new_mail = mn_conf_get_string("/apps/mail-notification/commands/new-mail/command");
- command_clicked = mn_conf_get_string("/apps/mail-notification/commands/clicked/command");
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(local_check),
- mn_conf_get_bool("/apps/mail-notification/local/enabled"));
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(local_minutes_spin),
- mn_conf_get_int("/apps/mail-notification/local/delay/minutes"));
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(local_seconds_spin),
- mn_conf_get_int("/apps/mail-notification/local/delay/seconds"));
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remote_check),
- mn_conf_get_bool("/apps/mail-notification/remote/enabled"));
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(remote_minutes_spin),
- mn_conf_get_int("/apps/mail-notification/remote/delay/minutes"));
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(remote_seconds_spin),
- mn_conf_get_int("/apps/mail-notification/remote/delay/seconds"));
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(command_new_mail_check),
- mn_conf_get_bool("/apps/mail-notification/commands/new-mail/enabled"));
- gtk_entry_set_text(GTK_ENTRY(command_new_mail_entry), command_new_mail ? command_new_mail : "");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(command_clicked_check),
- mn_conf_get_bool("/apps/mail-notification/commands/clicked/enabled"));
- gtk_entry_set_text(GTK_ENTRY(command_clicked_entry), command_clicked ? command_clicked : "");
-
- gtk_list_store_clear(store);
-
- mailboxes = mn_mailboxes_get();
- MN_LIST_FOREACH(l, mailboxes)
+ /* first step: remove or update old mailboxes */
+
+ valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(preferences.store), &iter);
+ while (valid)
{
- MNMailbox *mailbox = l->data;
- MNMailboxClass *class;
- GtkTreeIter iter;
-
- class = g_type_class_peek(G_TYPE_FROM_INSTANCE(mailbox));
-
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store,
- &iter,
- COLUMN_OBJECT, mailbox,
- COLUMN_MAILBOX, mailbox->name,
- COLUMN_FORMAT, class->format,
- -1);
+ char *uri;
+
+ gtk_tree_model_get(GTK_TREE_MODEL(preferences.store), &iter, COLUMN_URI, &uri, -1);
+ mailbox = mn_mailboxes_find(uri);
+ g_free(uri);
+
+ if (mailbox)
+ {
+ mn_preferences_update_iter(&iter, mailbox);
+ valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(preferences.store), &iter);
+ }
+ else
+ valid = gtk_list_store_remove(preferences.store, &iter);
+ }
+
+ /* second step: add new mailboxes */
+
+ MN_LIST_FOREACH(l, mn_mailboxes_get())
+ {
+ mailbox = l->data;
+
+ if (! mn_preferences_has_mailbox(mailbox))
+ {
+ gtk_list_store_append(preferences.store, &iter);
+ mn_preferences_update_iter(&iter, mailbox);
+ }
}
- mn_objects_free(mailboxes);
}
}
static void
-mn_preferences_update_sensitivity (void)
+mn_preferences_update_iter (GtkTreeIter *iter, MNMailbox *mailbox)
+{
+ MNMailboxClass *class;
+ const char *uri;
+ const char *stock_id;
+
+ g_return_if_fail(iter != NULL);
+ g_return_if_fail(MN_IS_MAILBOX(mailbox));
+
+ class = MN_MAILBOX_GET_CLASS(mailbox);
+ uri = mn_mailbox_get_uri(mailbox);
+
+ if (class->stock_id)
+ stock_id = class->stock_id;
+ else
+ stock_id = mn_uri_is_local(uri) ? MN_STOCK_LOCAL : MN_STOCK_REMOTE;
+
+ gtk_list_store_set(preferences.store, iter,
+ COLUMN_URI, uri,
+ COLUMN_MAILBOX_ICON, stock_id,
+ COLUMN_MAILBOX, mn_mailbox_get_name(mailbox),
+ COLUMN_FORMAT, class->format,
+ -1);
+}
+
+static gboolean
+mn_preferences_has_mailbox (MNMailbox *mailbox)
+{
+ const char *uri;
+ GtkTreeIter iter;
+ gboolean valid;
+ gboolean has = FALSE;
+
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), FALSE);
+
+ uri = mn_mailbox_get_uri(mailbox);
+
+ valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(preferences.store), &iter);
+ while (valid)
+ {
+ char *this_uri;
+
+ gtk_tree_model_get(GTK_TREE_MODEL(preferences.store), &iter, COLUMN_URI, &this_uri, -1);
+ has = ! mn_uri_cmp(this_uri, uri);
+ g_free(this_uri);
+
+ if (has)
+ break;
+
+ valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(preferences.store), &iter);
+ }
+
+ return has;
+}
+
+static void
+mn_preferences_update_selected_label (void)
{
- gboolean local_check_enabled;
- gboolean remote_check_enabled;
- gboolean command_new_mail_enabled;
- gboolean command_clicked_enabled;
GtkTreeSelection *selection;
- gboolean has_selection;
+ int n_rows;
- local_check_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(local_check));
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(preferences.list));
+ n_rows = gtk_tree_selection_count_selected_rows(selection);
- gtk_widget_set_sensitive(local_minutes_spin, local_check_enabled);
- gtk_widget_set_sensitive(local_minutes_label, local_check_enabled);
- gtk_widget_set_sensitive(local_seconds_spin, local_check_enabled);
- gtk_widget_set_sensitive(local_seconds_label, local_check_enabled);
+ if (n_rows == 0)
+ gtk_label_set_text(GTK_LABEL(preferences.selected_label), _("No mailbox selected."));
+ else
+ {
+ char *str;
- remote_check_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remote_check));
+ str = g_strdup_printf(ngettext("%i mailbox selected.",
+ "%i mailboxes selected.",
+ n_rows), n_rows);
+ gtk_label_set_text(GTK_LABEL(preferences.selected_label), str);
+ g_free(str);
+ }
+}
- gtk_widget_set_sensitive(remote_minutes_spin, remote_check_enabled);
- gtk_widget_set_sensitive(remote_minutes_label, remote_check_enabled);
- gtk_widget_set_sensitive(remote_seconds_spin, remote_check_enabled);
- gtk_widget_set_sensitive(remote_seconds_label, remote_check_enabled);
+static void
+mn_preferences_update_sensitivity (void)
+{
+ GtkTreeSelection *selection;
+ gboolean has_selection;
+ gboolean command_new_mail_enabled;
+ gboolean command_clicked_enabled;
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(preferences.list));
has_selection = gtk_tree_selection_count_selected_rows(selection) > 0;
- gtk_widget_set_sensitive(remove, has_selection);
+ gtk_widget_set_sensitive(preferences.remove, has_selection);
+ gtk_widget_set_sensitive(preferences.properties, has_selection);
+ gtk_widget_set_sensitive(preferences.remove_item, has_selection);
+ gtk_widget_set_sensitive(preferences.cut_item, has_selection);
+ gtk_widget_set_sensitive(preferences.copy_item, has_selection);
+ gtk_widget_set_sensitive(preferences.properties_item, has_selection);
- command_new_mail_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(command_new_mail_check));
- command_clicked_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(command_clicked_check));
+ command_new_mail_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(preferences.command_new_mail_check));
+ command_clicked_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(preferences.command_clicked_check));
- gtk_widget_set_sensitive(command_new_mail_entry, command_new_mail_enabled);
- gtk_widget_set_sensitive(command_clicked_entry, command_clicked_enabled);
+ gtk_widget_set_sensitive(preferences.command_new_mail_entry, command_new_mail_enabled);
+ gtk_widget_set_sensitive(preferences.command_clicked_entry, command_clicked_enabled);
}
static void
-mn_preferences_bind_boolean (GtkWidget *widget, gpointer key)
+mn_preferences_add_mailbox (void)
{
- g_signal_connect(G_OBJECT(widget),
- "toggled",
- G_CALLBACK(mn_preferences_boolean_toggled),
- key);
+ add_mailbox = mn_mailbox_properties_dialog_new(GTK_WINDOW(preferences.dialog), MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD);
+
+ run:
+ if (gtk_dialog_run(GTK_DIALOG(add_mailbox)) == GTK_RESPONSE_ACCEPT)
+ {
+ char *uri;
+
+ uri = mn_mailbox_properties_dialog_get_uri(MN_MAILBOX_PROPERTIES_DIALOG(add_mailbox));
+ g_return_if_fail(uri != NULL);
+
+ if (! mn_mailboxes_find(uri))
+ {
+ GSList *gconf_mailboxes;
+
+ gconf_mailboxes = eel_gconf_get_string_list(MN_CONF_MAILBOXES);
+ gconf_mailboxes = g_slist_append(gconf_mailboxes, uri);
+ eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
+ mn_slist_free(gconf_mailboxes);
+ }
+ else
+ {
+ mn_error_dialog(NULL, _("Unable to add mailbox."), _("The mailbox is already in the list."));
+ g_free(uri);
+ goto run;
+ }
+ }
+
+ gtk_widget_destroy(add_mailbox);
}
static void
-mn_preferences_boolean_toggled (GtkToggleButton *button, gpointer user_data)
+mn_preferences_remove_mailbox (void)
{
- const char *key = user_data;
- mn_conf_set_bool(key, gtk_toggle_button_get_active(button));
+ GtkTreeSelection *selection;
+ GSList *gconf_mailboxes;
+
+ gconf_mailboxes = eel_gconf_get_string_list(MN_CONF_MAILBOXES);
+
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(preferences.list));
+ gtk_tree_selection_selected_foreach(selection, mn_preferences_remove_mailbox_cb, &gconf_mailboxes);
+ eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
+ mn_slist_free(gconf_mailboxes);
}
static void
-mn_preferences_bind_int (GtkWidget *widget, gpointer key)
+mn_preferences_remove_mailbox_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
{
- g_signal_connect(G_OBJECT(widget),
- "value-changed",
- G_CALLBACK(mn_preferences_int_changed),
- key);
+ GSList **gconf_mailboxes = data;
+ char *uri;
+ GSList *elem;
+
+ gtk_tree_model_get(model, iter, COLUMN_URI, &uri, -1);
+
+ /* remove all the mailboxes with that URI */
+ while ((elem = g_slist_find_custom(*gconf_mailboxes, uri, (GCompareFunc) mn_uri_cmp)))
+ {
+ *gconf_mailboxes = g_slist_remove_link(*gconf_mailboxes, elem);
+ g_free(elem->data);
+ g_slist_free(elem);
+ }
+
+ g_free(uri);
}
static void
-mn_preferences_int_changed (GtkSpinButton *button, gpointer user_data)
+mn_preferences_cut_mailbox (void)
{
- const char *key = user_data;
- mn_conf_set_int(key, gtk_spin_button_get_value(button));
+ mn_preferences_copy_mailbox();
+ mn_preferences_remove_mailbox();
}
static void
-mn_preferences_bind_string (GtkWidget *widget, gpointer key)
+mn_preferences_copy_mailbox (void)
{
- g_signal_connect(G_OBJECT(widget),
- "changed",
- G_CALLBACK(mn_preferences_string_changed),
- key);
+ GtkTreeSelection *selection;
+ GSList *uri_list = NULL;
+ char *gnome_copied_files;
+ const GtkTargetEntry target = { GNOME_COPIED_FILES, 0, 0 };
+ gboolean status;
+
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(preferences.list));
+ gtk_tree_selection_selected_foreach(selection, mn_preferences_copy_mailbox_cb, &uri_list);
+
+ gnome_copied_files = mn_build_gnome_copied_files(MN_GNOME_COPIED_FILES_COPY, uri_list);
+ mn_slist_free(uri_list);
+
+ status = gtk_clipboard_set_with_data(clipboard,
+ &target,
+ 1,
+ mn_preferences_get_clipboard_cb,
+ mn_preferences_clear_clipboard_cb,
+ gnome_copied_files);
+ g_return_if_fail(status == TRUE);
}
static void
-mn_preferences_string_changed (GtkEditable *editable, gpointer user_data)
+mn_preferences_copy_mailbox_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
{
- const char *key = user_data;
- const char *str;
+ GSList **uri_list = data;
+ char *uri;
- str = gtk_editable_get_chars(editable, 0, -1);
- if (*str)
- mn_conf_set_string(key, gtk_editable_get_chars(editable, 0, -1));
- else
- mn_conf_unset(key);
+ gtk_tree_model_get(model, iter, COLUMN_URI, &uri, -1);
+ *uri_list = g_slist_append(*uri_list, uri);
+ /* uri is now owned by uri_list, do not free */
}
static void
-mn_preferences_selection_changed (GtkTreeSelection *selection,
- gpointer user_data)
+mn_preferences_get_clipboard_cb (GtkClipboard *clipboard,
+ GtkSelectionData *selection_data,
+ unsigned int info,
+ gpointer user_data_or_owner)
{
- mn_preferences_update_sensitivity();
+ const char *gnome_copied_files = user_data_or_owner;
+ gtk_selection_data_set(selection_data, gnome_copied_files_atom, 8, gnome_copied_files, strlen(gnome_copied_files));
}
static void
-mn_preferences_add_local_mailbox (void)
+mn_preferences_clear_clipboard_cb (GtkClipboard *clipboard,
+ gpointer user_data_or_owner)
{
- GtkWidget *file_selection;
- static char *path = NULL;
-
- file_selection = gtk_file_selection_new(_("Select One or More Mailboxes"));
- gtk_window_set_transient_for(GTK_WINDOW(file_selection), GTK_WINDOW(preferences));
-
- if (path)
- gtk_file_selection_set_filename(GTK_FILE_SELECTION(file_selection), path);
+ char *gnome_copied_files = user_data_or_owner;
+ g_free(gnome_copied_files);
+}
- gtk_file_selection_set_select_multiple(GTK_FILE_SELECTION(file_selection), TRUE);
+static void
+mn_preferences_paste_mailbox (void)
+{
+ gtk_clipboard_request_contents(clipboard,
+ gnome_copied_files_atom,
+ mn_preferences_paste_mailbox_receive_cb,
+ NULL);
+}
- if (gtk_dialog_run(GTK_DIALOG(file_selection)) == GTK_RESPONSE_OK)
+static void
+mn_preferences_paste_mailbox_receive_cb (GtkClipboard *clipboard,
+ GtkSelectionData *selection_data,
+ gpointer data)
+{
+ if (selection_data->type == gnome_copied_files_atom
+ && selection_data->format == 8
+ && selection_data->length > 0)
{
- char **selections;
- GSList *gconf_mailboxes;
- int i;
- char *tmp_path;
-
- /* remember path for next time */
- tmp_path = g_path_get_dirname(gtk_file_selection_get_filename(GTK_FILE_SELECTION(file_selection)));
- g_free(path);
- path = g_strconcat(tmp_path, "/", NULL);
- g_free(tmp_path);
-
- selections = gtk_file_selection_get_selections(GTK_FILE_SELECTION(file_selection));
- gconf_mailboxes = mn_conf_get_list("/apps/mail-notification/mailboxes",
- GCONF_VALUE_STRING);
-
- for (i = 0; selections[i]; i++)
- {
- char *mailbox;
+ char *gnome_copied_files;
+ gboolean status;
+ MNGnomeCopiedFilesType type;
+ GSList *uri_list;
- mailbox = g_filename_to_utf8(selections[i], -1, NULL, NULL, NULL);
- gconf_mailboxes = g_slist_append(gconf_mailboxes, mailbox);
- }
+ gnome_copied_files = g_strndup(selection_data->data, selection_data->length);
+ status = mn_parse_gnome_copied_files(gnome_copied_files, &type, &uri_list);
+ g_free(gnome_copied_files);
- g_strfreev(selections);
-
- mn_conf_set_list("/apps/mail-notification/mailboxes",
- GCONF_VALUE_STRING,
- gconf_mailboxes);
- mn_slist_free(gconf_mailboxes);
+ if (status)
+ {
+ if (type == MN_GNOME_COPIED_FILES_COPY)
+ {
+ GSList *new_mailboxes = NULL;
+ GSList *l;
+
+ MN_LIST_FOREACH(l, uri_list)
+ {
+ const char *uri = l->data;
+
+ if (! mn_mailboxes_find(uri))
+ new_mailboxes = g_slist_append(new_mailboxes, g_strdup(uri));
+ }
+
+ if (new_mailboxes)
+ {
+ GSList *gconf_mailboxes;
+
+ gconf_mailboxes = eel_gconf_get_string_list(MN_CONF_MAILBOXES);
+ gconf_mailboxes = g_slist_concat(gconf_mailboxes, new_mailboxes);
+ eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
+ mn_slist_free(gconf_mailboxes);
+ }
+ }
+
+ mn_slist_free(uri_list);
+ }
}
-
- gtk_widget_destroy(file_selection);
}
static void
-mn_preferences_add_remote_mailbox (void)
+mn_preferences_edit_mailbox (void)
{
- GladeXML *xml;
- GtkWidget *dialog;
- GtkSizeGroup *size_group;
- GtkWidget *hostname_label;
- GtkWidget *port_label;
- GtkWidget *username_label;
- GtkWidget *password_label;
-
- xml = mn_glade_xml_new("add-pop3");
-
- dialog = glade_xml_get_widget(xml, "dialog");
- hostname_label = glade_xml_get_widget(xml, "hostname_label");
- port_label = glade_xml_get_widget(xml, "port_label");
- username_label = glade_xml_get_widget(xml, "username_label");
- password_label = glade_xml_get_widget(xml, "password_label");
-
- size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget(size_group, hostname_label);
- gtk_size_group_add_widget(size_group, port_label);
- gtk_size_group_add_widget(size_group, username_label);
- gtk_size_group_add_widget(size_group, password_label);
+ GtkTreeSelection *selection;
- gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(preferences));
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(preferences.list));
+ gtk_tree_selection_selected_foreach(selection, mn_preferences_edit_mailbox_cb, NULL);
+}
- run:
- if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
- {
- GtkWidget *hostname_entry;
- GtkWidget *port_spin;
- GtkWidget *username_entry;
- GtkWidget *password_entry;
- const char *hostname;
- int port;
- const char *username;
- const char *password;
- char *locator;
- GSList *gconf_mailboxes;
-
- hostname_entry = glade_xml_get_widget(xml, "hostname_entry");
- port_spin = glade_xml_get_widget(xml, "port_spin");
- username_entry = glade_xml_get_widget(xml, "username_entry");
- password_entry = glade_xml_get_widget(xml, "password_entry");
-
- hostname = gtk_editable_get_chars(GTK_EDITABLE(hostname_entry), 0, -1);
- port = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(port_spin));
- username = gtk_editable_get_chars(GTK_EDITABLE(username_entry), 0, -1);
- password = gtk_editable_get_chars(GTK_EDITABLE(password_entry), 0, -1);
-
- if (! *hostname)
- {
- mn_error_dialog(_("Unable to add mailbox."),
- _("The hostname field must be filled."));
- goto run;
- }
-
- if (! *username)
- {
- mn_error_dialog(_("Unable to add mailbox."),
- _("The username field must be filled."));
- goto run;
- }
+static void
+mn_preferences_edit_mailbox_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ GtkWidget *dialog;
+ char *uri;
- if (! *password)
- {
- mn_error_dialog(_("Unable to add mailbox."),
- _("The password field must be filled."));
- goto run;
- }
+ dialog = mn_mailbox_properties_dialog_new(GTK_WINDOW(preferences.dialog), MN_MAILBOX_PROPERTIES_DIALOG_MODE_EDIT);
- locator = g_strdup_printf("pop3:%s:%s@%s:%i", username, password, hostname, port);
+ gtk_tree_model_get(model, iter, COLUMN_URI, &uri, -1);
+ mn_mailbox_properties_dialog_set_uri(MN_MAILBOX_PROPERTIES_DIALOG(dialog), uri);
+ g_free(uri);
- gconf_mailboxes = mn_conf_get_list("/apps/mail-notification/mailboxes",
- GCONF_VALUE_STRING);
- gconf_mailboxes = g_slist_append(gconf_mailboxes, locator);
- mn_conf_set_list("/apps/mail-notification/mailboxes",
- GCONF_VALUE_STRING,
- gconf_mailboxes);
- mn_slist_free(gconf_mailboxes); /* this frees locator aswell */
- }
+ g_signal_connect(G_OBJECT(dialog),
+ "response",
+ G_CALLBACK(mn_preferences_mailbox_properties_response_h),
+ NULL);
- gtk_widget_destroy(dialog);
- g_object_unref(xml);
+ gtk_widget_show(dialog);
}
static void
-mn_preferences_remove_mailbox (void)
+mn_preferences_selection_changed_h (GtkTreeSelection *selection,
+ gpointer user_data)
{
- GtkTreeSelection *selection;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
- gtk_tree_selection_selected_foreach(selection, mn_preferences_remove_mailbox_cb, NULL);
+ mn_preferences_update_selected_label();
+ mn_preferences_update_sensitivity();
}
static void
-mn_preferences_remove_mailbox_cb (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer data)
+mn_preferences_mailbox_properties_response_h (GtkDialog *dialog,
+ int response,
+ gpointer user_data)
{
- MNMailbox *mailbox;
+ if (response == GTK_RESPONSE_APPLY || response == GTK_RESPONSE_OK)
+ mn_mailbox_properties_dialog_apply(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
+ if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_OK)
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+}
- gtk_tree_model_get(model, iter, COLUMN_OBJECT, &mailbox, -1);
- mn_conf_remove_mailbox(mailbox->locator);
- g_object_unref(mailbox);
+static void
+mn_preferences_popup_mailbox_menu (unsigned int button, guint32 activate_time)
+{
+ gtk_clipboard_request_contents(clipboard,
+ gnome_copied_files_atom,
+ mn_preferences_popup_mailbox_menu_receive_cb,
+ NULL);
+ gtk_menu_popup(GTK_MENU(preferences.mailbox_menu), NULL, NULL, NULL, NULL, button, activate_time);
}
-static gboolean
-mn_preferences_search_equal_func (GtkTreeModel *model,
- int column,
- const char *key,
- GtkTreeIter *iter,
- gpointer search_data)
+static void
+mn_preferences_popup_mailbox_menu_receive_cb (GtkClipboard *clipboard,
+ GtkSelectionData *selection_data,
+ gpointer data)
{
- char *mailbox;
- char *format;
- gboolean equal = FALSE;
+ gboolean can_paste = FALSE;
- gtk_tree_model_get(model, iter,
- COLUMN_MAILBOX, &mailbox,
- COLUMN_FORMAT, &format,
- -1);
+ if (selection_data->type == gnome_copied_files_atom
+ && selection_data->format == 8
+ && selection_data->length > 0)
+ {
+ char *gnome_copied_files;
+ gboolean status;
+ MNGnomeCopiedFilesType type;
+ GSList *uri_list;
+
+ gnome_copied_files = g_strndup(selection_data->data, selection_data->length);
+ status = mn_parse_gnome_copied_files(gnome_copied_files, &type, &uri_list);
+ g_free(gnome_copied_files);
- equal = mn_utf8_strcasecontains(mailbox, key) || mn_utf8_strcasecontains(format, key);
-
- g_free(mailbox);
- g_free(format);
+ if (status)
+ {
+ if (type == MN_GNOME_COPIED_FILES_COPY && uri_list)
+ can_paste = TRUE;
+ mn_slist_free(uri_list);
+ }
+ }
- return ! equal;
+ gtk_widget_set_sensitive(preferences.paste_item, can_paste);
}
/* libglade callbacks */
@@ -543,33 +688,124 @@ mn_preferences_toggled_h (GtkToggleButton *togglebutton, gpointer user_data)
}
void
-mn_preferences_add_local_clicked_h (GtkButton *button, gpointer user_data)
+mn_preferences_add_clicked_h (GtkButton *button, gpointer user_data)
{
- mn_preferences_add_local_mailbox();
+ mn_preferences_add_mailbox();
}
void
-mn_preferences_add_remote_clicked_h (GtkButton *button, gpointer user_data)
+mn_preferences_remove_clicked_h (GtkButton *button, gpointer user_data)
{
- mn_preferences_add_remote_mailbox();
+ mn_preferences_remove_mailbox();
}
void
-mn_preferences_remove_clicked_h (GtkButton *button, gpointer user_data)
+mn_preferences_properties_clicked_h (GtkButton *button, gpointer user_data)
+{
+ mn_preferences_edit_mailbox();
+}
+
+void
+mn_preferences_add_item_activate_h (GtkMenuItem *menuitem, gpointer user_data)
+{
+ mn_preferences_add_mailbox();
+}
+
+void
+mn_preferences_remove_item_activate_h (GtkMenuItem *menuitem,
+ gpointer user_data)
{
mn_preferences_remove_mailbox();
}
void
+mn_preferences_cut_item_activate_h (GtkMenuItem *menuitem, gpointer user_data)
+{
+ mn_preferences_cut_mailbox();
+}
+
+void
+mn_preferences_copy_item_activate_h (GtkMenuItem *menuitem, gpointer user_data)
+{
+ mn_preferences_copy_mailbox();
+}
+
+void
+mn_preferences_paste_item_activate_h (GtkMenuItem *menuitem, gpointer user_data)
+{
+ mn_preferences_paste_mailbox();
+}
+
+void
+mn_preferences_properties_item_activate_h (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ mn_preferences_edit_mailbox();
+}
+
+gboolean
+mn_preferences_list_popup_menu_h (GtkWidget *widget, gpointer user_data)
+{
+ mn_preferences_popup_mailbox_menu(0, gtk_get_current_event_time());
+
+ return TRUE; /* a menu was activated */
+}
+
+gboolean
+mn_preferences_list_button_press_event_h (GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer user_data)
+{
+ if (event->button == 3)
+ mn_preferences_popup_mailbox_menu(event->button, event->time);
+
+ return FALSE; /* propagate event */
+}
+
+void
+mn_preferences_list_row_activated_h (GtkTreeView *treeview,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer user_data)
+{
+ mn_preferences_edit_mailbox();
+}
+
+gboolean
+mn_preferences_scrolled_drag_motion_h (GtkWidget *widget,
+ GdkDragContext *drag_context,
+ int x,
+ int y,
+ unsigned int time,
+ gpointer user_data)
+{
+ GtkAdjustment *adjustment;
+
+ adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(preferences.scrolled));
+ gtk_adjustment_set_value(adjustment, (double) y / (widget->allocation.height - 2) * (adjustment->upper - adjustment->page_size));
+
+ return TRUE;
+}
+
+void
mn_preferences_response_h (GtkDialog *dialog, int response, gpointer user_data)
{
- if (response == GTK_RESPONSE_CLOSE)
- gtk_widget_destroy(GTK_WIDGET(preferences));
+ switch (response)
+ {
+ case GTK_RESPONSE_HELP:
+ mn_display_help("preferences");
+ break;
+
+ case GTK_RESPONSE_CLOSE:
+ gtk_widget_destroy(preferences.dialog);
+ break;
+ }
}
void
-mn_preferences_destroy_h (GtkWidget *widget, gpointer user_data)
+mn_preferences_destroy_h (GtkObject *object, gpointer user_data)
{
- g_object_unref(preferences_xml);
- preferences_xml = NULL;
+ gtk_widget_destroy(preferences.mailbox_menu);
+ g_object_unref(preferences.store);
+ preferences.dialog = NULL;
}
diff --git a/src/mn-preferences.h b/src/mn-preferences.h
@@ -20,6 +20,6 @@
#define _MN_PREFERENCES_H
void mn_preferences_display (void);
-void mn_preferences_update_values (void);
+void mn_preferences_update_list (void);
#endif /* _MN_PREFERENCES_H */
diff --git a/src/mn-settings.c b/src/mn-settings.c
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "mn-settings.h"
-
-/*** variables ***************************************************************/
-
-MNSettings mn_settings = {
- FALSE
-};
diff --git a/src/mn-settings.h b/src/mn-settings.h
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef _MN_SETTINGS_H
-#define _MN_SETTINGS_H
-
-#include <glib.h>
-
-typedef struct
-{
- gboolean debug;
-} MNSettings;
-
-extern MNSettings mn_settings;
-
-#endif /* _MN_SETTINGS_H */
diff --git a/src/mn-stock.c b/src/mn-stock.c
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include <gtk/gtk.h>
+#include "mn-stock.h"
+#include "mn-util.h"
+
+/*** implementation **********************************************************/
+
+void
+mn_stock_init (void)
+{
+ const struct
+ {
+ const char *stock_id;
+ const char *filename;
+ const char *icon_name;
+ } icons[] = {
+ { MN_STOCK_MAIL, "mail.png", NULL },
+ { MN_STOCK_MAIL_ERROR, "mail-error.png", NULL },
+ { MN_STOCK_NO_MAIL, "no-mail.png", NULL },
+ { MN_STOCK_NO_MAIL_ERROR, "no-mail-error.png", NULL },
+ { MN_STOCK_LOCAL, NULL, "stock_folder" },
+ { MN_STOCK_REMOTE, NULL, "stock_internet" },
+ { MN_STOCK_UNSUPPORTED, "unsupported.png", NULL }
+ };
+ GtkIconFactory *factory;
+ GtkIconTheme *icon_theme;
+ int i;
+
+ factory = gtk_icon_factory_new();
+ gtk_icon_factory_add_default(factory);
+ icon_theme = gtk_icon_theme_get_default();
+
+ for (i = 0; i < G_N_ELEMENTS(icons); i++)
+ {
+ GtkIconSet *icon_set;
+
+ if (icons[i].filename)
+ {
+ GdkPixbuf *pixbuf;
+
+ pixbuf = mn_pixbuf_new(icons[i].filename);
+ icon_set = gtk_icon_set_new_from_pixbuf(pixbuf);
+ g_object_unref(pixbuf);
+ }
+ else if (icons[i].icon_name)
+ {
+ GtkIconSource *icon_source;
+
+ icon_set = gtk_icon_set_new();
+ icon_source = gtk_icon_source_new();
+ gtk_icon_source_set_icon_name(icon_source, icons[i].icon_name);
+ gtk_icon_set_add_source(icon_set, icon_source);
+ gtk_icon_source_free(icon_source);
+ }
+ else
+ g_return_if_reached();
+
+ gtk_icon_factory_add(factory, icons[i].stock_id, icon_set);
+ gtk_icon_set_unref(icon_set);
+ }
+
+ g_object_unref(factory);
+}
diff --git a/src/mn-stock.h b/src/mn-stock.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _MN_STOCK_H
+#define _MN_STOCK_H
+
+#define MN_STOCK_MAIL "mail-notification-mail"
+#define MN_STOCK_MAIL_ERROR "mail-notification-mail-error"
+#define MN_STOCK_NO_MAIL "mail-notification-no-mail"
+#define MN_STOCK_NO_MAIL_ERROR "mail-notification-no-mail-error"
+#define MN_STOCK_LOCAL "mail-notification-local"
+#define MN_STOCK_REMOTE "mail-notification-remote"
+#define MN_STOCK_UNSUPPORTED "mail-notification-unsupported"
+
+void mn_stock_init (void);
+
+#endif /* _MN_STOCK_H */
diff --git a/src/mn-sylpheed-mailbox.c b/src/mn-sylpheed-mailbox.c
@@ -17,19 +17,51 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <libgnomevfs/gnome-vfs.h>
#include "mn-sylpheed-mailbox.h"
#include "mn-util.h"
+#include "mn-vfs.h"
+
+/*** types *******************************************************************/
+
+typedef struct
+{
+ MNMailboxIsCallback *callback;
+ gpointer user_data;
+} IsInfo;
+
+typedef struct
+{
+ MNSylpheedMailbox *mailbox;
+ unsigned int total_count;
+ unsigned int mark_count;
+} CheckInfo;
+
+/*** variables ***************************************************************/
+
+static GObjectClass *parent_class = NULL;
/*** functions ***************************************************************/
-static void mn_sylpheed_mailbox_class_init (MNSylpheedMailboxClass *class);
-static gboolean mn_sylpheed_mailbox_is (const char *locator);
-static gboolean mn_sylpheed_mailbox_has_new (MNMailbox *mailbox,
- GError **err);
+static void mn_sylpheed_mailbox_class_init (MNSylpheedMailboxClass *class);
+
+static GObject *mn_sylpheed_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params);
+
+static void mn_sylpheed_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data);
+static void mn_sylpheed_mailbox_is_cb (gboolean result, gpointer user_data);
+
+static void mn_sylpheed_mailbox_check (MNMailbox *mailbox);
+static void mn_sylpheed_mailbox_check_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ GList *list,
+ unsigned int entries_read,
+ gpointer user_data);
/*** implementation **********************************************************/
@@ -64,96 +96,121 @@ mn_sylpheed_mailbox_get_type (void)
static void
mn_sylpheed_mailbox_class_init (MNSylpheedMailboxClass *class)
{
+ GObjectClass *object_class = G_OBJECT_CLASS(class);
MNMailboxClass *mailbox_class = MN_MAILBOX_CLASS(class);
+ parent_class = g_type_class_peek_parent(class);
+
+ object_class->constructor = mn_sylpheed_mailbox_constructor;
+
mailbox_class->format = "Sylpheed";
- mailbox_class->is_remote = FALSE;
mailbox_class->is = mn_sylpheed_mailbox_is;
- mailbox_class->has_new = mn_sylpheed_mailbox_has_new;
+ mailbox_class->check = mn_sylpheed_mailbox_check;
}
-static gboolean
-mn_sylpheed_mailbox_is (const char *locator)
+static GObject *
+mn_sylpheed_mailbox_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params)
{
- char *markfile;
- gboolean is;
+ GObject *object;
+ MNMailbox *mailbox;
- markfile = g_build_filename(locator, ".sylpheed_mark", NULL);
- is = g_file_test(markfile, G_FILE_TEST_IS_REGULAR);
- g_free(markfile);
+ object = G_OBJECT_CLASS(parent_class)->constructor(type, n_construct_properties, construct_params);
+ mailbox = MN_MAILBOX(object);
- return is;
+ mn_mailbox_monitor(mailbox,
+ mn_mailbox_get_uri(mailbox),
+ GNOME_VFS_MONITOR_DIRECTORY,
+ MN_MAILBOX_MONITOR_EVENT_CHANGED
+ | MN_MAILBOX_MONITOR_EVENT_DELETED
+ | MN_MAILBOX_MONITOR_EVENT_CREATED);
+
+ return object;
}
-static gboolean
-mn_sylpheed_mailbox_has_new (MNMailbox *mailbox, GError **err)
+static void
+mn_sylpheed_mailbox_is (const char *uri,
+ MNMailboxIsCallback *callback,
+ gpointer user_data)
{
- GError *tmp_err = NULL;
- GDir *dir;
- const char *filename;
- int total_count = 0;
- int mark_count = 0;
- char *markfile;
- gboolean has_new = FALSE;
- struct stat sb;
-
- /* count total number of messages */
-
- dir = g_dir_open(mailbox->locator, 0, &tmp_err);
- if (! dir)
- {
- g_set_error(err,
- MN_SYLPHEED_MAILBOX_ERROR,
- MN_SYLPHEED_MAILBOX_ERROR_OPEN_DIR,
- _("unable to open directory %s: %s"),
- mailbox->locator,
- tmp_err->message);
- g_error_free(tmp_err);
- return FALSE;
- }
+ IsInfo *info;
+ char *markfile_uri;
+
+ info = g_new(IsInfo, 1);
+ info->callback = callback;
+ info->user_data = user_data;
- while ((filename = g_dir_read_name(dir)))
- if (filename[0] != '.' && mn_str_isnumeric(filename))
- total_count++;
+ markfile_uri = g_build_path("/", uri, ".sylpheed_mark", NULL);
+ mn_vfs_async_test(markfile_uri, G_FILE_TEST_IS_REGULAR, mn_sylpheed_mailbox_is_cb, info);
+ g_free(markfile_uri);
+}
- g_dir_close(dir);
+static void
+mn_sylpheed_mailbox_is_cb (gboolean result, gpointer user_data)
+{
+ IsInfo *info = user_data;
+
+ info->callback(result, info->user_data);
+ g_free(info);
+}
- /* extrapolate mark_count from size of markfile */
+static void
+mn_sylpheed_mailbox_check (MNMailbox *mailbox)
+{
+ MNSylpheedMailbox *sylpheed_mailbox = MN_SYLPHEED_MAILBOX(mailbox);
+ CheckInfo *info;
+ GnomeVFSAsyncHandle *handle;
+
+ info = g_new(CheckInfo, 1);
+ info->mailbox = sylpheed_mailbox;
+ info->total_count = 0;
+ info->mark_count = 0;
+
+ gnome_vfs_async_load_directory(&handle,
+ mn_mailbox_get_uri(mailbox),
+ GNOME_VFS_FILE_INFO_DEFAULT,
+ 32,
+ GNOME_VFS_PRIORITY_DEFAULT,
+ mn_sylpheed_mailbox_check_cb,
+ info);
+}
- markfile = g_build_filename(mailbox->locator, ".sylpheed_mark", NULL);
+static void
+mn_sylpheed_mailbox_check_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ GList *list,
+ unsigned int entries_read,
+ gpointer user_data)
+{
+ CheckInfo *info = user_data;
+ GList *l;
- if (stat(markfile, &sb) == -1)
+ MN_LIST_FOREACH(l, list)
{
- g_set_error(err,
- MN_SYLPHEED_MAILBOX_ERROR,
- MN_SYLPHEED_MAILBOX_ERROR_STAT_MARKFILE,
- _("unable to stat %s: %s"),
- markfile,
- g_strerror(errno));
- goto end;
+ GnomeVFSFileInfo *file_info = l->data;
+
+ if (file_info->name[0] != '.')
+ {
+ if (mn_str_isnumeric(file_info->name))
+ info->total_count++;
+ }
+ else if (! strcmp(file_info->name, ".sylpheed_mark") && file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE)
+ /*
+ * Format of a Sylpheed markfile:
+ * int version, int num, int flags, int num, int flags, ...
+ */
+ info->mark_count = (file_info->size - sizeof(int)) / (sizeof(int) * 2);
}
- /*
- * The format of a Sylpheed markfile is:
- *
- * int version, int num, int flag, int num, int flag, ...
- */
-
- mark_count = (sb.st_size - sizeof(int)) / (sizeof(int) * 2);
- has_new = total_count != mark_count;
-
- end:
- g_free(markfile);
- return has_new;
-}
-
-GQuark
-mn_sylpheed_mailbox_error_quark (void)
-{
- static GQuark quark = 0;
+ if (result != GNOME_VFS_OK) /* we're done */
+ {
+ if (result != GNOME_VFS_ERROR_EOF)
+ mn_mailbox_set_error(MN_MAILBOX(info->mailbox), _("error while reading folder: %s"), gnome_vfs_result_to_string(result));
- if (! quark)
- quark = g_quark_from_static_string("mn_sylpheed_mailbox_error");
+ mn_mailbox_set_has_new(MN_MAILBOX(info->mailbox), info->total_count != info->mark_count);
+ mn_mailbox_end_check(MN_MAILBOX(info->mailbox));
- return quark;
+ g_free(info);
+ }
}
diff --git a/src/mn-sylpheed-mailbox.h b/src/mn-sylpheed-mailbox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
#ifndef _MN_SYLPHEED_MAILBOX_H
#define _MN_SYLPHEED_MAILBOX_H
-#include <glib.h>
#include <glib-object.h>
#include "mn-mailbox.h"
@@ -30,25 +29,16 @@
#define MN_IS_SYLPHEED_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MN_TYPE_SYLPHEED_MAILBOX))
#define MN_SYLPHEED_MAILBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MN_TYPE_SYLPHEED_MAILBOX, MNSylpheedMailboxClass))
-#define MN_SYLPHEED_MAILBOX_ERROR (mn_sylpheed_mailbox_error_quark())
-
-typedef enum
-{
- MN_SYLPHEED_MAILBOX_ERROR_OPEN_DIR,
- MN_SYLPHEED_MAILBOX_ERROR_STAT_MARKFILE
-} MNSylpheedMailboxError;
-
typedef struct
{
- MNMailbox mailbox;
+ MNMailbox mailbox;
} MNSylpheedMailbox;
typedef struct
{
- MNMailboxClass mailbox_class;
+ MNMailboxClass mailbox_class;
} MNSylpheedMailboxClass;
GType mn_sylpheed_mailbox_get_type (void);
-GQuark mn_sylpheed_mailbox_error_quark (void);
#endif /* _MN_SYLPHEED_MAILBOX_H */
diff --git a/src/mn-ui.c b/src/mn-ui.c
@@ -19,16 +19,18 @@
#include "config.h"
#include <gnome.h>
#include "mn-mail-icon.h"
-#include "mn-check.h"
#include "mn-preferences.h"
#include "mn-dialog.h"
#include "mn-util.h"
#include "mn-conf.h"
+#include "mn-mailboxes.h"
+#include "mn-stock.h"
+#include "mn-unsupported-mailbox.h"
/*** variables ***************************************************************/
static MNMailIcon *mail_icon;
-static GtkWidget *check_for_mail_item;
+static GtkWidget *update_item;
/*** functions ***************************************************************/
@@ -49,16 +51,14 @@ mn_ui_init (void)
static void
mn_ui_icon_init (void)
{
- GladeXML *xml;
GtkWidget *menu;
mail_icon = MN_MAIL_ICON(mn_mail_icon_new());
- xml = mn_glade_xml_new("menu");
- menu = glade_xml_get_widget(xml, "menu");
- check_for_mail_item = glade_xml_get_widget(xml, "check_for_mail");
- g_object_unref(xml);
-
+ mn_create_interface("menu",
+ "menu", &menu,
+ "update", &update_item,
+ NULL);
mn_mail_icon_set_popup_menu(mail_icon, GTK_MENU(menu));
g_signal_connect(G_OBJECT(mail_icon), "activate",
@@ -72,22 +72,25 @@ mn_ui_icon_init (void)
static void
mn_ui_icon_activate_h (MNMailIcon *icon, gpointer user_data)
{
- if (mn_conf_get_bool("/apps/mail-notification/commands/clicked/enabled"))
+ if (eel_gconf_get_boolean(MN_CONF_COMMANDS_CLICKED_ENABLED))
{
- const char *command;
+ char *command;
- command = mn_conf_get_string("/apps/mail-notification/commands/clicked/command");
+ command = eel_gconf_get_string(MN_CONF_COMMANDS_CLICKED_COMMAND);
if (command)
{
GError *err = NULL;
if (! g_spawn_command_line_async(command, &err))
{
- mn_error_dialog(_("Command error."),
+ mn_error_dialog(NULL,
+ _("A command error has occurred."),
_("Unable to execute clicked command: %s."),
err->message);
g_error_free(err);
}
+
+ g_free(command);
}
}
}
@@ -100,24 +103,120 @@ mn_ui_icon_destroy_h (GtkObject *object, gpointer user_data)
}
void
-mn_ui_set_has_new (gboolean has_new)
+mn_ui_update_sensitivity (void)
{
- mn_mail_icon_set_has_new(mail_icon, has_new);
+ gboolean has_manual = FALSE;
+ GSList *l;
+
+ MN_LIST_FOREACH(l, mn_mailboxes_get())
+ {
+ MNMailbox *mailbox = l->data;
+
+ if (MN_MAILBOX_GET_CLASS(mailbox)->check && ! mn_mailbox_get_automatic(mailbox))
+ {
+ has_manual = TRUE;
+ break;
+ }
+ }
+
+ gtk_widget_set_sensitive(update_item, has_manual);
}
void
-mn_ui_set_can_check (gboolean can_check)
+mn_ui_update_icon (void)
{
- gtk_widget_set_sensitive(check_for_mail_item, can_check);
+ GSList *l;
+ int n_new = 0;
+ int n_error = 0;
+ int n_unsupported = 0;
+ GString *new_string;
+ GString *error_string;
+ GString *unsupported_string;
+ const char *stock_id;
+ GString *tooltip;
+
+ new_string = g_string_new(NULL);
+ error_string = g_string_new(NULL);
+ unsupported_string = g_string_new(NULL);
+
+ MN_LIST_FOREACH(l, mn_mailboxes_get())
+ {
+ MNMailbox *mailbox = l->data;
+ const char *name;
+ const char *error;
+
+ name = mn_mailbox_get_name(mailbox);
+ error = mn_mailbox_get_error(mailbox);
+
+ if (mn_mailbox_get_has_new(mailbox))
+ {
+ n_new++;
+ if (*new_string->str)
+ g_string_append_c(new_string, '\n');
+ g_string_append_printf(new_string, " %s", name);
+ }
+
+ if (error)
+ {
+ n_error++;
+ if (*error_string->str)
+ g_string_append_c(error_string, '\n');
+ g_string_append_printf(error_string, " %s (%s)", name, error);
+ }
+
+ if (MN_IS_UNSUPPORTED_MAILBOX(mailbox))
+ {
+ n_unsupported++;
+ if (*unsupported_string->str)
+ g_string_append_c(unsupported_string, '\n');
+ g_string_append_printf(unsupported_string, " %s (%s)", name, mn_unsupported_mailbox_get_reason(MN_UNSUPPORTED_MAILBOX(mailbox)));
+ }
+ }
+
+ if (n_new > 0)
+ {
+ stock_id = n_error > 0 ? MN_STOCK_MAIL_ERROR : MN_STOCK_MAIL;
+ g_string_prepend(new_string, ngettext("The following mailbox has new mail:\n",
+ "The following mailboxes have new mail:\n",
+ n_new));
+ }
+ else
+ {
+ stock_id = n_error > 0 ? MN_STOCK_NO_MAIL_ERROR : MN_STOCK_NO_MAIL;
+ g_string_prepend(new_string, _("You have no new mail."));
+ }
+
+ if (n_error > 0)
+ g_string_prepend(error_string, ngettext("The following mailbox reported an error:\n",
+ "The following mailboxes reported an error:\n",
+ n_error));
+
+ if (n_unsupported > 0)
+ g_string_prepend(unsupported_string, ngettext("The following mailbox is unsupported:\n",
+ "The following mailboxes are unsupported:\n",
+ n_unsupported));
+
+ tooltip = g_string_new(new_string->str);
+ if (n_error > 0)
+ g_string_append_printf(tooltip, "\n\n%s", error_string->str);
+ if (n_unsupported > 0)
+ g_string_append_printf(tooltip, "\n\n%s", unsupported_string->str);
+
+ mn_mail_icon_set_from_stock(mail_icon, stock_id);
+ mn_mail_icon_set_tooltip(mail_icon, tooltip->str);
+
+ g_string_free(tooltip, TRUE);
+ g_string_free(new_string, TRUE);
+ g_string_free(error_string, TRUE);
+ g_string_free(unsupported_string, TRUE);
}
/* libglade callbacks */
void
-mn_ui_check_for_mail_activate_h (GtkMenuItem *menuitem, gpointer user_data)
+mn_ui_update_activate_h (GtkMenuItem *menuitem, gpointer user_data)
{
- mn_check(MN_CHECK_INTERACTIVE); /* local mail */
- mn_check(MN_CHECK_INTERACTIVE | MN_CHECK_REMOTE); /* remote mail */
+ mn_mailboxes_check();
}
void
@@ -127,6 +226,12 @@ mn_ui_preferences_activate_h (GtkMenuItem *menuitem, gpointer user_data)
}
void
+mn_ui_help_activate_h (GtkMenuItem *menuitem, gpointer user_data)
+{
+ mn_display_help(NULL);
+}
+
+void
mn_ui_about_activate_h (GtkMenuItem *menuitem, gpointer user_data)
{
static const char *authors[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
@@ -143,8 +248,8 @@ mn_ui_about_activate_h (GtkMenuItem *menuitem, gpointer user_data)
logo = mn_pixbuf_new("logo.png");
about = gnome_about_new(_("Mail Notification"),
VERSION,
- _("Copyright (c) 2003, 2004 Jean-Yves Lefort"),
- _("A Mail Notification for the Panel Notification Area"),
+ "Copyright \302\251 2003, 2004 Jean-Yves Lefort",
+ _("A Mail Notification Icon"),
authors,
NULL,
NULL,
diff --git a/src/mn-ui.h b/src/mn-ui.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,8 +19,10 @@
#ifndef _MN_UI_H
#define _MN_UI_H
-void mn_ui_init (void);
-void mn_ui_set_has_new (gboolean has_new);
-void mn_ui_set_can_check (gboolean can_check);
+#include <glib.h>
+
+void mn_ui_init (void);
+void mn_ui_update_sensitivity (void);
+void mn_ui_update_icon (void);
#endif /* _MN_UI_H */
diff --git a/src/mn-unsupported-mailbox.c b/src/mn-unsupported-mailbox.c
@@ -17,12 +17,40 @@
*/
#include "config.h"
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n-lib.h>
#include "mn-unsupported-mailbox.h"
+#include "mn-stock.h"
+
+/*** types *******************************************************************/
+
+enum {
+ PROP_0,
+ PROP_REASON
+};
+
+struct _MNUnsupportedMailboxPrivate
+{
+ char *reason;
+};
+
+/*** variables ***************************************************************/
+
+static GObjectClass *parent_class = NULL;
/*** functions ***************************************************************/
static void mn_unsupported_mailbox_class_init (MNUnsupportedMailboxClass *class);
+static void mn_unsupported_mailbox_init (MNUnsupportedMailbox *mailbox);
+static void mn_unsupported_mailbox_finalize (GObject *object);
+
+static void mn_unsupported_mailbox_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void mn_unsupported_mailbox_get_property (GObject *object,
+ unsigned int prop_id,
+ GValue *value,
+ GParamSpec *pspec);
/*** implementation **********************************************************/
@@ -42,7 +70,7 @@ mn_unsupported_mailbox_get_type (void)
NULL,
sizeof(MNUnsupportedMailbox),
0,
- NULL
+ (GInstanceInitFunc) mn_unsupported_mailbox_init
};
unsupported_mailbox_type = g_type_register_static(MN_TYPE_MAILBOX,
@@ -57,9 +85,101 @@ mn_unsupported_mailbox_get_type (void)
static void
mn_unsupported_mailbox_class_init (MNUnsupportedMailboxClass *class)
{
+ GObjectClass *object_class = G_OBJECT_CLASS(class);
MNMailboxClass *mailbox_class = MN_MAILBOX_CLASS(class);
+ parent_class = g_type_class_peek_parent(class);
+
+ object_class->set_property = mn_unsupported_mailbox_set_property;
+ object_class->get_property = mn_unsupported_mailbox_get_property;
+ object_class->finalize = mn_unsupported_mailbox_finalize;
+
+ mailbox_class->stock_id = MN_STOCK_UNSUPPORTED;
mailbox_class->format = _("unsupported");
- mailbox_class->is_remote = FALSE;
- mailbox_class->is = NULL;
+
+ g_object_class_install_property(object_class,
+ PROP_REASON,
+ g_param_spec_string("reason",
+ _("Reason"),
+ _("The reason why the mailbox is unsupported"),
+ NULL,
+ G_PARAM_WRITABLE | G_PARAM_READABLE | G_PARAM_CONSTRUCT_ONLY));
+}
+
+static void
+mn_unsupported_mailbox_init (MNUnsupportedMailbox *mailbox)
+{
+ mailbox->priv = g_new0(MNUnsupportedMailboxPrivate, 1);
+}
+
+static void
+mn_unsupported_mailbox_finalize (GObject *object)
+{
+ MNUnsupportedMailbox *mailbox = MN_UNSUPPORTED_MAILBOX(object);
+
+ g_free(mailbox->priv->reason);
+ g_free(mailbox->priv);
+
+ G_OBJECT_CLASS(parent_class)->finalize(object);
+}
+
+static void
+mn_unsupported_mailbox_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ MNUnsupportedMailbox *mailbox = MN_UNSUPPORTED_MAILBOX(object);
+
+ switch (prop_id)
+ {
+ case PROP_REASON:
+ g_return_if_fail(mailbox->priv->reason == NULL);
+ mailbox->priv->reason = g_value_dup_string(value);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+mn_unsupported_mailbox_get_property (GObject *object,
+ unsigned int prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ MNUnsupportedMailbox *mailbox = MN_UNSUPPORTED_MAILBOX(object);
+
+ switch (prop_id)
+ {
+ case PROP_REASON:
+ g_value_set_string(value, mn_unsupported_mailbox_get_reason(mailbox));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+const char *
+mn_unsupported_mailbox_get_reason (MNUnsupportedMailbox *mailbox)
+{
+ g_return_val_if_fail(MN_IS_UNSUPPORTED_MAILBOX(mailbox), NULL);
+
+ return mailbox->priv->reason;
+}
+
+MNMailbox *
+mn_unsupported_mailbox_new (const char *uri, const char *reason)
+{
+ g_return_val_if_fail(uri != NULL, NULL);
+ g_return_val_if_fail(reason != NULL, NULL);
+
+ return g_object_new(MN_TYPE_UNSUPPORTED_MAILBOX,
+ "uri", uri,
+ "reason", reason,
+ NULL);
}
diff --git a/src/mn-unsupported-mailbox.h b/src/mn-unsupported-mailbox.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
#ifndef _MN_UNSUPPORTED_MAILBOX_H
#define _MN_UNSUPPORTED_MAILBOX_H
-#include <glib.h>
#include <glib-object.h>
#include "mn-mailbox.h"
@@ -30,16 +29,23 @@
#define MN_IS_UNSUPPORTED_MAILBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MN_TYPE_UNSUPPORTED_MAILBOX))
#define MN_UNSUPPORTED_MAILBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MN_TYPE_UNSUPPORTED_MAILBOX, MNUnsupportedMailboxClass))
+typedef struct _MNUnsupportedMailboxPrivate MNUnsupportedMailboxPrivate;
+
typedef struct
{
- MNMailbox mailbox;
+ MNMailbox mailbox;
+
+ MNUnsupportedMailboxPrivate *priv;
} MNUnsupportedMailbox;
typedef struct
{
- MNMailboxClass mailbox_class;
+ MNMailboxClass mailbox_class;
} MNUnsupportedMailboxClass;
-GType mn_unsupported_mailbox_get_type (void);
+GType mn_unsupported_mailbox_get_type (void);
+MNMailbox *mn_unsupported_mailbox_new (const char *uri, const char *reason);
+
+const char *mn_unsupported_mailbox_get_reason (MNUnsupportedMailbox *mailbox);
#endif /* _MN_UNSUPPORTED_MAILBOX_H */
diff --git a/src/mn-uri.c b/src/mn-uri.c
@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
+#include "mn-uri.h"
+#include "mn-util.h"
+
+/*** implementation **********************************************************/
+
+char *
+mn_uri_build_pop (const char *username,
+ const char *password,
+ const char *hostname,
+ int port)
+{
+ g_return_val_if_fail(username != NULL, NULL);
+ g_return_val_if_fail(password != NULL, NULL);
+ g_return_val_if_fail(hostname != NULL, NULL);
+
+ return port == 110
+ ? g_strdup_printf("pop://%s:%s@%s", username, password, hostname)
+ : g_strdup_printf("pop://%s:%s@%s:%i", username, password, hostname, port);
+}
+
+/*
+ * Parse a POP URI.
+ *
+ * About compliance:
+ *
+ * We comply with RFC 1738, but for obvious reasons we require <user>
+ * and <password>. We do not comply with RFC 2384 because it forbids
+ * <password>.
+ */
+gboolean
+mn_uri_parse_pop (const char *uri,
+ char **username,
+ char **password,
+ char **hostname,
+ int *port)
+{
+ const char *_username;
+ char *_password;
+ char *_hostname;
+ char *_port = NULL;
+
+ g_return_val_if_fail(uri != NULL, FALSE);
+
+ if (strncmp(uri, "pop://", 6))
+ return FALSE;
+
+ _username = uri + 6;
+ if (strlen(uri) < 6)
+ return FALSE;
+
+ _password = strchr(_username, ':');
+ if (! _password++) /* ++ to skip the colon */
+ return FALSE;
+
+ _hostname = strchr(_password, '@');
+ if (! _hostname++) /* ++ to skip the arobas */
+ return FALSE;
+
+ _port = strchr(_hostname, ':');
+ /* port is optional */
+ if (_port && ! mn_str_isnumeric(++_port)) /* ++ to skip the colon */
+ return FALSE;
+
+ if ((_password - _username - 1 <= 0)
+ || (_hostname - _password - 1 <= 0)
+ || (_port && _port - _hostname - 1 <= 0))
+ return FALSE;
+
+ if (username)
+ *username = g_strndup(_username, _password - _username - 1);
+ if (password)
+ *password = g_strndup(_password, _hostname - _password - 1);
+ if (hostname)
+ *hostname = _port ? g_strndup(_hostname, _port - _hostname - 1) : g_strdup(_hostname);
+ if (port)
+ *port = _port ? atoi(_port) : 110;
+
+ return TRUE;
+}
+
+char *
+mn_uri_canonicalize (const char *uri)
+{
+ char *canonical_uri;
+ char *username;
+ char *password;
+ char *hostname;
+ int port;
+
+ g_return_val_if_fail(uri != NULL, NULL);
+
+ if (mn_uri_parse_pop(uri, &username, &password, &hostname, &port))
+ {
+ canonical_uri = mn_uri_build_pop(username, password, hostname, port);
+ g_free(username);
+ g_free(password);
+ g_free(hostname);
+ }
+ else
+ canonical_uri = gnome_vfs_make_uri_canonical(uri);
+
+ return canonical_uri;
+}
+
+int
+mn_uri_cmp (const char *uri1, const char *uri2)
+{
+ char *canonicalized1;
+ char *canonicalized2;
+ int cmp;
+
+ g_return_val_if_fail(uri1 != NULL, 0);
+ g_return_val_if_fail(uri2 != NULL, 0);
+
+ canonicalized1 = mn_uri_canonicalize(uri1);
+ canonicalized2 = mn_uri_canonicalize(uri2);
+
+ cmp = strcmp(canonicalized1, canonicalized2);
+
+ g_free(canonicalized1);
+ g_free(canonicalized2);
+
+ return cmp;
+}
+
+char *
+mn_uri_format_for_display (const char *uri)
+{
+ char *name = NULL;
+ char *path;
+
+ g_return_val_if_fail(uri != NULL, NULL);
+
+ path = gnome_vfs_get_local_path_from_uri(uri);
+ if (path)
+ {
+ name = g_filename_to_utf8(path, -1, NULL, NULL, NULL);
+ g_free(path);
+ }
+ if (! name)
+ {
+ GnomeVFSURI *vfs_uri;
+
+ vfs_uri = gnome_vfs_uri_new(uri);
+ if (vfs_uri)
+ {
+ name = gnome_vfs_uri_to_string(vfs_uri, GNOME_VFS_URI_HIDE_PASSWORD);
+ gnome_vfs_uri_unref(vfs_uri);
+ }
+ }
+ if (! name)
+ {
+ char *username;
+ char *hostname;
+
+ if (mn_uri_parse_pop(uri, &username, NULL, &hostname, NULL))
+ {
+ name = g_strdup_printf("%s@%s", username, hostname);
+ g_free(username);
+ g_free(hostname);
+ }
+ else
+ name = g_strdup(uri); /* fallback to the URI */
+ }
+
+ return name;
+}
+
+gboolean
+mn_uri_is_local (const char *uri)
+{
+ GnomeVFSURI *vfs_uri;
+ gboolean is_local = FALSE;
+
+ g_return_val_if_fail(uri != NULL, NULL);
+
+ vfs_uri = gnome_vfs_uri_new(uri);
+ if (vfs_uri)
+ {
+ is_local = gnome_vfs_uri_is_local(vfs_uri);
+ gnome_vfs_uri_unref(vfs_uri);
+ }
+
+ return is_local;
+}
diff --git a/src/mn-uri.h b/src/mn-uri.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _MN_URI_H
+#define _MN_URI_H
+
+#include <glib.h>
+
+char *mn_uri_build_pop (const char *username,
+ const char *password,
+ const char *hostname,
+ int port);
+gboolean mn_uri_parse_pop (const char *uri,
+ char **username,
+ char **password,
+ char **hostname,
+ int *port);
+
+char *mn_uri_canonicalize (const char *uri);
+int mn_uri_cmp (const char *uri1, const char *uri2);
+
+const char *mn_uri_get_unix_mailbox (void);
+
+char *mn_uri_format_for_display (const char *uri);
+
+gboolean mn_uri_is_local (const char *uri);
+
+#endif /* _MN_URI_H */
diff --git a/src/mn-util.c b/src/mn-util.c
@@ -18,88 +18,66 @@
#include "config.h"
#include <string.h>
-#include <gtk/gtk.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#ifdef HAVE_GNET
-#include <gnet.h>
-#endif
#include <stdarg.h>
+#include <gnome.h>
+#include <glade/glade.h>
#include "mn-util.h"
+#include "mn-conf.h"
+#include "mn-mailboxes.h"
+#include "mn-dialog.h"
+
+/*** types *******************************************************************/
+
+enum {
+ TARGET_URI_LIST,
+ TARGET_MOZ_URL
+};
+
+/*** functions ***************************************************************/
+
+static void mn_file_chooser_dialog_file_activated_h (GtkFileChooser *chooser,
+ gpointer user_data);
+static void mn_file_chooser_dialog_response_h (GtkDialog *dialog,
+ int response_id,
+ gpointer user_data);
+
+static void mn_drag_data_received_h (GtkWidget *widget,
+ GdkDragContext *drag_context,
+ int x,
+ int y,
+ GtkSelectionData *selection_data,
+ unsigned int info,
+ unsigned int time,
+ gpointer user_data);
/*** implementation **********************************************************/
-/*
- * Free a singly linked list of heap pointers.
- */
void
-mn_slist_free (GSList *list)
+mn_info (const char *format, ...)
{
- GSList *l;
+ va_list args;
- MN_LIST_FOREACH(l, list)
- g_free(l->data);
+ g_return_if_fail(format != NULL);
- g_slist_free(list);
+ va_start(args, format);
+ g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args);
+ va_end(args);
}
/*
- * Free a singly linked list of objects.
+ * Free a singly linked list of heap pointers.
*/
void
-mn_objects_free (GSList *list)
+mn_slist_free (GSList *list)
{
GSList *l;
MN_LIST_FOREACH(l, list)
- g_object_unref(l->data);
+ g_free(l->data);
g_slist_free(list);
}
-/*
- * Copy a singly linked list of objects.
- */
-GSList *
-mn_objects_copy (GSList *list)
-{
- GSList *l;
- GSList *copy;
-
- copy = g_slist_copy(list);
- MN_LIST_FOREACH(l, copy)
- g_object_ref(l->data);
-
- return copy;
-}
-
-#ifdef HAVE_GNET
-GIOError
-mn_gnet_io_channel_printf (GIOChannel *channel, const char *format, ...)
-{
- va_list args;
- char *message;
- GIOError status;
- int len;
- gsize count;
-
- g_return_val_if_fail(channel != NULL, G_IO_ERROR_UNKNOWN);
-
- va_start(args, format);
- message = g_strdup_vprintf(format, args);
- va_end(args);
-
- len = strlen(message);
- status = gnet_io_channel_writen(channel, message, len, &count);
- g_free(message);
-
- if (status == G_IO_ERROR_NONE && count != len)
- status = G_IO_ERROR_UNKNOWN;
-
- return status;
-}
-#endif /* HAVE_GNET */
-
gboolean
mn_str_isnumeric (const char *str)
{
@@ -114,34 +92,8 @@ mn_str_isnumeric (const char *str)
return TRUE;
}
-gboolean
-mn_utf8_strcasecontains (const char *big, const char *little)
-{
- gboolean contains;
- char *normalized_big;
- char *normalized_little;
- char *case_normalized_big;
- char *case_normalized_little;
-
- g_return_val_if_fail(big != NULL, NULL);
- g_return_val_if_fail(little != NULL, NULL);
-
- normalized_big = g_utf8_normalize(big, -1, G_NORMALIZE_ALL);
- normalized_little = g_utf8_normalize(little, -1, G_NORMALIZE_ALL);
- case_normalized_big = g_utf8_casefold(normalized_big, -1);
- case_normalized_little = g_utf8_casefold(normalized_little, -1);
-
- contains = strstr(case_normalized_big, case_normalized_little) != NULL;
-
- g_free(normalized_big);
- g_free(normalized_little);
- g_free(case_normalized_big);
- g_free(case_normalized_little);
-
- return contains;
-}
-
-GdkPixbuf *mn_pixbuf_new (const char *filename)
+GdkPixbuf *
+mn_pixbuf_new (const char *filename)
{
char *pathname;
GdkPixbuf *pixbuf;
@@ -162,20 +114,273 @@ GdkPixbuf *mn_pixbuf_new (const char *filename)
return pixbuf;
}
-GladeXML *mn_glade_xml_new (const char *filename)
+void
+mn_create_interface (const char *name, ...)
{
- char *full_filename;
+ char *filename;
char *pathname;
GladeXML *xml;
+ va_list args;
+ const char *widget_name;
+
+ g_return_if_fail(name != NULL);
- full_filename = g_strconcat(filename, ".glade", NULL);
- pathname = g_build_filename(UIDIR, full_filename, NULL);
- g_free(full_filename);
+ filename = g_strconcat(name, ".glade", NULL);
+ pathname = g_build_filename(UIDIR, filename, NULL);
+ g_free(filename);
xml = glade_xml_new(pathname, NULL, NULL);
g_free(pathname);
+ g_return_if_fail(xml != NULL);
glade_xml_signal_autoconnect(xml);
- return xml;
+ va_start(args, name);
+ while ((widget_name = va_arg(args, const char *)))
+ {
+ GtkWidget **widget;
+
+ widget = va_arg(args, GtkWidget **);
+ g_return_if_fail(widget != NULL);
+
+ *widget = glade_xml_get_widget(xml, widget_name);
+ if (! *widget)
+ g_critical(_("widget %s not found in interface %s"), widget_name, name);
+ }
+ va_end(args);
+
+ g_object_unref(xml);
+}
+
+/*
+ * The GtkFileChooser API does not allow a chooser to pick a file
+ * (GTK_FILE_CHOOSER_ACTION_OPEN) and select a folder
+ * (GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) at the same time.
+ *
+ * This function provides a workaround.
+ */
+void
+mn_file_chooser_dialog_allow_select_folder (GtkFileChooserDialog *dialog,
+ int accept_id)
+{
+ g_return_if_fail(GTK_IS_FILE_CHOOSER_DIALOG(dialog));
+ g_return_if_fail(gtk_file_chooser_get_action(GTK_FILE_CHOOSER(dialog)) == GTK_FILE_CHOOSER_ACTION_OPEN);
+ g_return_if_fail(! (accept_id == GTK_RESPONSE_ACCEPT
+ || accept_id == GTK_RESPONSE_OK
+ || accept_id == GTK_RESPONSE_YES
+ || accept_id == GTK_RESPONSE_APPLY));
+
+ g_signal_connect(G_OBJECT(dialog),
+ "file-activated",
+ G_CALLBACK(mn_file_chooser_dialog_file_activated_h),
+ GINT_TO_POINTER(accept_id));
+ g_signal_connect(G_OBJECT(dialog),
+ "response",
+ G_CALLBACK(mn_file_chooser_dialog_response_h),
+ GINT_TO_POINTER(accept_id));
+}
+
+static void
+mn_file_chooser_dialog_file_activated_h (GtkFileChooser *chooser,
+ gpointer user_data)
+{
+ int accept_id = GPOINTER_TO_INT(user_data);
+
+ gtk_dialog_response(GTK_DIALOG(chooser), accept_id);
+}
+
+static void
+mn_file_chooser_dialog_response_h (GtkDialog *dialog,
+ int response_id,
+ gpointer user_data)
+{
+ int accept_id = GPOINTER_TO_INT(user_data);
+
+ if (response_id == accept_id)
+ {
+ char *uri;
+
+ uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(dialog));
+ if (uri)
+ g_free(uri);
+ else
+ g_signal_stop_emission_by_name(dialog, "response");
+ }
+}
+
+void
+mn_setup_dnd (GtkWidget *widget)
+{
+ const GtkTargetEntry targets[] = {
+ { "text/uri-list", 0, TARGET_URI_LIST },
+ { "text/x-moz-url", 0, TARGET_MOZ_URL }
+ };
+
+ g_return_if_fail(GTK_IS_WIDGET(widget));
+
+ gtk_drag_dest_set(widget,
+ GTK_DEST_DEFAULT_ALL,
+ targets,
+ G_N_ELEMENTS(targets),
+ GDK_ACTION_COPY);
+ g_signal_connect(G_OBJECT(widget),
+ "drag-data-received",
+ G_CALLBACK(mn_drag_data_received_h),
+ NULL);
+}
+
+static void
+mn_drag_data_received_h (GtkWidget *widget,
+ GdkDragContext *drag_context,
+ int x,
+ int y,
+ GtkSelectionData *selection_data,
+ unsigned int info,
+ unsigned int time,
+ gpointer user_data)
+{
+ switch (info)
+ {
+ case TARGET_URI_LIST:
+ {
+ char *str;
+ char **uriv;
+ int i;
+ GSList *new_mailboxes = NULL;
+
+ /* complies to RFC 2483, section 5 */
+
+ if (selection_data->format != 8 || selection_data->length <= 0)
+ {
+ g_warning(_("received an invalid URI list"));
+ return;
+ }
+
+ str = g_strndup(selection_data->data, selection_data->length);
+ uriv = g_strsplit(str, "\r\n", 0);
+ g_free(str);
+
+ for (i = 0; uriv[i]; i++)
+ if (*uriv[i] && *uriv[i] != '#' && ! mn_mailboxes_find(uriv[i]))
+ new_mailboxes = g_slist_append(new_mailboxes, g_strdup(uriv[i]));
+
+ g_strfreev(uriv);
+
+ if (new_mailboxes)
+ {
+ GSList *gconf_mailboxes;
+
+ gconf_mailboxes = eel_gconf_get_string_list(MN_CONF_MAILBOXES);
+ gconf_mailboxes = g_slist_concat(gconf_mailboxes, new_mailboxes);
+ eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
+ mn_slist_free(gconf_mailboxes);
+ }
+ }
+ break;
+
+ case TARGET_MOZ_URL:
+ {
+ GString *url;
+ const guint16 *char_data;
+ int char_len;
+ int i;
+
+ /* text/x-moz-url is encoded in UCS-2 but in format 8: broken */
+ if (selection_data->format != 8 || selection_data->length <= 0 || (selection_data->length % 2) != 0)
+ {
+ g_warning(_("received an invalid Mozilla URL"));
+ return;
+ }
+
+ char_data = (const guint16 *) selection_data->data;
+ char_len = selection_data->length / 2;
+
+ url = g_string_new(NULL);
+ for (i = 0; i < char_len && char_data[i] != '\n'; i++)
+ g_string_append_unichar(url, char_data[i]);
+
+ if (! mn_mailboxes_find(url->str))
+ {
+ GSList *gconf_mailboxes;
+
+ gconf_mailboxes = eel_gconf_get_string_list(MN_CONF_MAILBOXES);
+ gconf_mailboxes = g_slist_append(gconf_mailboxes, g_strdup(url->str));
+ eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
+ mn_slist_free(gconf_mailboxes);
+ }
+
+ g_string_free(url, TRUE);
+ }
+ break;
+ }
+}
+
+char *
+mn_build_gnome_copied_files (MNGnomeCopiedFilesType type, GSList *uri_list)
+{
+ GString *string;
+ GSList *l;
+
+ string = g_string_new(type == MN_GNOME_COPIED_FILES_CUT ? "cut" : "copy");
+ MN_LIST_FOREACH(l, uri_list)
+ {
+ const char *uri = l->data;
+
+ g_string_append_c(string, '\n');
+ g_string_append(string, uri);
+ }
+
+ return g_string_free(string, FALSE);
+}
+
+gboolean
+mn_parse_gnome_copied_files (const char *gnome_copied_files,
+ MNGnomeCopiedFilesType *type,
+ GSList **uri_list)
+{
+ char **strv;
+ gboolean status = FALSE;
+
+ g_return_val_if_fail(gnome_copied_files != NULL, FALSE);
+ g_return_val_if_fail(type != NULL, FALSE);
+ g_return_val_if_fail(uri_list != NULL, FALSE);
+
+ strv = g_strsplit(gnome_copied_files, "\n", 0);
+ if (strv[0])
+ {
+ int i;
+
+ if (! strcmp(strv[0], "cut"))
+ {
+ status = TRUE;
+ *type = MN_GNOME_COPIED_FILES_CUT;
+ }
+ else if (! strcmp(strv[0], "copy"))
+ {
+ status = TRUE;
+ *type = MN_GNOME_COPIED_FILES_COPY;
+ }
+
+ if (status)
+ {
+ *uri_list = NULL;
+ for (i = 1; strv[i]; i++)
+ *uri_list = g_slist_append(*uri_list, g_strdup(strv[i]));
+ }
+ }
+
+ g_strfreev(strv);
+ return status;
+}
+
+void
+mn_display_help (const char *link_id)
+{
+ GError *err = NULL;
+
+ if (! gnome_help_display("mail-notification.xml", link_id, &err))
+ {
+ mn_error_dialog(NULL, _("Unable to display help."), "%s", err->message);
+ g_error_free(err);
+ }
}
diff --git a/src/mn-util.h b/src/mn-util.h
@@ -19,30 +19,42 @@
#ifndef _MN_UTIL_H
#define _MN_UTIL_H
-#include <gtk/gtk.h>
-#include <glade/glade.h>
+#include "config.h"
#include <stdarg.h>
+#include <gtk/gtk.h>
#define MN_LIST_FOREACH(var, head) \
for ((var) = (head); \
(var); \
(var) = (var)->next)
+void mn_info (const char *format,
+ ...);
void mn_slist_free (GSList *list);
-void mn_objects_free (GSList *list);
-GSList *mn_objects_copy (GSList *list);
+gboolean mn_str_isnumeric (const char *str);
-#ifdef HAVE_GNET
-GIOError mn_gnet_io_channel_printf (GIOChannel *channel,
- const char *format,
+GdkPixbuf *mn_pixbuf_new (const char *filename);
+void mn_create_interface (const char *name,
...);
-#endif /* HAVE_GNET */
-gboolean mn_str_isnumeric (const char *str);
-gboolean mn_utf8_strcasecontains (const char *big,
- const char *little);
-GdkPixbuf *mn_pixbuf_new (const char *filename);
-GladeXML *mn_glade_xml_new (const char *filename);
+void mn_file_chooser_dialog_allow_select_folder (GtkFileChooserDialog *dialog,
+ int accept_id);
+
+void mn_setup_dnd (GtkWidget *widget);
+
+typedef enum
+{
+ MN_GNOME_COPIED_FILES_CUT,
+ MN_GNOME_COPIED_FILES_COPY
+} MNGnomeCopiedFilesType;
+
+char *mn_build_gnome_copied_files (MNGnomeCopiedFilesType type,
+ GSList *uri_list);
+gboolean mn_parse_gnome_copied_files (const char *gnome_copied_files,
+ MNGnomeCopiedFilesType *type,
+ GSList **uri_list);
+
+void mn_display_help (const char *link_id);
#endif /* _MN_UTIL_H */
diff --git a/src/mn-vfs.c b/src/mn-vfs.c
@@ -0,0 +1,327 @@
+/*
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "mn-vfs.h"
+
+/*** cpp *********************************************************************/
+
+#define VFS_BLOCK_SIZE 16384
+
+/*** types *******************************************************************/
+
+struct _MNVFSAsyncHandle
+{
+ GnomeVFSAsyncHandle *handle;
+ GnomeVFSOpenMode open_mode;
+
+ MNVFSAsyncOpenCallback *open_callback;
+ gpointer open_user_data;
+
+ MNVFSAsyncCloseCallback *close_callback;
+ gpointer close_user_data;
+
+ MNVFSAsyncReadLineCallback *read_line_callback;
+ gpointer read_line_user_data;
+
+ unsigned int flags;
+ char *buffer;
+ GString *string;
+ GnomeVFSResult last_result;
+ GnomeVFSFileSize start;
+ GnomeVFSFileSize pos;
+ GnomeVFSFileSize len;
+};
+
+typedef struct
+{
+ GFileTest test;
+ MNVFSAsyncTestCallback *callback;
+ gpointer user_data;
+} TestInfo;
+
+/*** functions ***************************************************************/
+
+static void mn_vfs_async_open_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
+static void mn_vfs_async_close_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
+static void mn_vfs_async_free (MNVFSAsyncHandle *handle);
+
+static gboolean mn_vfs_async_read_line_idle_cb (gpointer data);
+static void mn_vfs_async_read_line_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer buffer,
+ GnomeVFSFileSize bytes_requested,
+ GnomeVFSFileSize bytes_read,
+ gpointer user_data);
+
+static gboolean mn_vfs_async_read_line_flush (MNVFSAsyncHandle *handle);
+
+static void mn_vfs_async_test_cb (GnomeVFSAsyncHandle *handle,
+ GList *results,
+ gpointer user_data);
+
+/*** implementation **********************************************************/
+
+void
+mn_vfs_async_open (MNVFSAsyncHandle **handle,
+ const char *text_uri,
+ GnomeVFSOpenMode open_mode,
+ MNVFSAsyncOpenCallback *callback,
+ gpointer user_data)
+{
+ g_return_if_fail(handle != NULL);
+ g_return_if_fail(text_uri != NULL);
+ g_return_if_fail(callback != NULL);
+
+ *handle = g_new0(MNVFSAsyncHandle, 1);
+ (*handle)->open_mode = open_mode;
+ (*handle)->open_callback = callback;
+ (*handle)->open_user_data = user_data;
+ (*handle)->buffer = g_new(char, VFS_BLOCK_SIZE);
+ (*handle)->string = g_string_new(NULL);
+ (*handle)->last_result = GNOME_VFS_OK;
+
+ gnome_vfs_async_open(&(*handle)->handle,
+ text_uri,
+ open_mode,
+ GNOME_VFS_PRIORITY_DEFAULT,
+ mn_vfs_async_open_cb,
+ *handle);
+}
+
+static void
+mn_vfs_async_open_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data)
+{
+ MNVFSAsyncHandle *mhandle = user_data;
+
+ mhandle->open_callback(mhandle, result, mhandle->open_user_data);
+ if (result != GNOME_VFS_OK)
+ mn_vfs_async_free(mhandle);
+}
+
+void
+mn_vfs_async_close (MNVFSAsyncHandle *handle,
+ MNVFSAsyncCloseCallback *callback,
+ gpointer user_data)
+{
+ g_return_if_fail(handle != NULL);
+ g_return_if_fail(callback != NULL);
+
+ handle->close_callback = callback;
+ handle->close_user_data = user_data;
+
+ gnome_vfs_async_close(handle->handle, mn_vfs_async_close_cb, handle);
+}
+
+static void
+mn_vfs_async_close_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data)
+{
+ MNVFSAsyncHandle *mhandle = user_data;
+
+ mhandle->close_callback(mhandle, result, mhandle->close_user_data);
+ mn_vfs_async_free(mhandle);
+}
+
+static void
+mn_vfs_async_free (MNVFSAsyncHandle *handle)
+{
+ g_return_if_fail(handle != NULL);
+
+ g_free(handle->buffer);
+ g_string_free(handle->string, TRUE);
+ g_free(handle);
+}
+
+/*
+ * Read a UNIX line from HANDLE.
+ */
+void
+mn_vfs_async_read_line (MNVFSAsyncHandle *handle,
+ unsigned int flags,
+ MNVFSAsyncReadLineCallback *callback,
+ gpointer user_data)
+{
+ g_return_if_fail(handle != NULL);
+ g_return_if_fail((handle->open_mode & GNOME_VFS_OPEN_READ) != 0);
+ g_return_if_fail(callback != NULL);
+
+ handle->flags = flags;
+ handle->read_line_callback = callback;
+ handle->read_line_user_data = user_data;
+
+ g_idle_add(mn_vfs_async_read_line_idle_cb, handle);
+}
+
+static gboolean
+mn_vfs_async_read_line_idle_cb (gpointer data)
+{
+ MNVFSAsyncHandle *handle = data;
+
+ if (! mn_vfs_async_read_line_flush(handle))
+ gnome_vfs_async_read(handle->handle,
+ handle->buffer,
+ VFS_BLOCK_SIZE,
+ mn_vfs_async_read_line_cb,
+ handle);
+
+ return FALSE; /* remove source */
+}
+
+static void
+mn_vfs_async_read_line_cb (GnomeVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer buffer,
+ GnomeVFSFileSize bytes_requested,
+ GnomeVFSFileSize bytes_read,
+ gpointer user_data)
+{
+ MNVFSAsyncHandle *mhandle = user_data;
+
+ mhandle->start = 0;
+ mhandle->pos = 0;
+ mhandle->len = bytes_read;
+ mhandle->last_result = result;
+
+ if (! mn_vfs_async_read_line_flush(mhandle))
+ gnome_vfs_async_read(mhandle->handle,
+ mhandle->buffer,
+ VFS_BLOCK_SIZE,
+ mn_vfs_async_read_line_cb,
+ mhandle);
+}
+
+static gboolean
+mn_vfs_async_read_line_flush (MNVFSAsyncHandle *handle)
+{
+ g_return_val_if_fail(handle != NULL, FALSE);
+
+ for (; handle->pos < handle->len; handle->pos++)
+ if (handle->buffer[handle->pos] == '\n')
+ {
+ g_string_append_len(handle->string, &handle->buffer[handle->start], handle->pos - handle->start);
+ if (handle->flags & MN_VFS_PASS_NEWLINE)
+ g_string_append_c(handle->string, handle->buffer[handle->pos]);
+
+ handle->read_line_callback(handle, handle->last_result, handle->string->str, handle->read_line_user_data);
+ g_string_truncate(handle->string, 0);
+
+ handle->start = ++handle->pos;
+ return TRUE;
+ }
+
+ if (handle->start < handle->len)
+ g_string_append_len(handle->string, &handle->buffer[handle->start], handle->len - handle->start);
+
+ if (handle->last_result != GNOME_VFS_OK)
+ {
+ handle->read_line_callback(handle, handle->last_result, *handle->string->str ? handle->string->str : NULL, handle->read_line_user_data);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void
+mn_vfs_async_test (const char *uri,
+ GFileTest test,
+ MNVFSAsyncTestCallback *callback,
+ gpointer user_data)
+{
+ GnomeVFSURI *vfs_uri;
+ GList *uri_list = NULL;
+ GnomeVFSFileInfoOptions options;
+ GnomeVFSAsyncHandle *handle;
+ TestInfo *info;
+
+ g_return_if_fail(uri != NULL);
+ g_return_if_fail(callback != NULL);
+
+ vfs_uri = gnome_vfs_uri_new(uri);
+ if (! vfs_uri)
+ {
+ callback(FALSE, user_data);
+ return;
+ }
+
+ uri_list = g_list_append(uri_list, vfs_uri);
+
+ options = GNOME_VFS_FILE_INFO_DEFAULT;
+ if (! (test & G_FILE_TEST_IS_SYMLINK))
+ options |= GNOME_VFS_FILE_INFO_FOLLOW_LINKS;
+ if (test & G_FILE_TEST_IS_EXECUTABLE)
+ options |= GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS;
+
+ info = g_new(TestInfo, 1);
+ info->test = test;
+ info->callback = callback;
+ info->user_data = user_data;
+
+ gnome_vfs_async_get_file_info(&handle,
+ uri_list,
+ options,
+ GNOME_VFS_PRIORITY_DEFAULT,
+ mn_vfs_async_test_cb,
+ info);
+
+ gnome_vfs_uri_unref(vfs_uri);
+ g_list_free(uri_list);
+}
+
+static void
+mn_vfs_async_test_cb (GnomeVFSAsyncHandle *handle,
+ GList *results,
+ gpointer user_data)
+{
+ TestInfo *info = user_data;
+ GnomeVFSGetFileInfoResult *result;
+ gboolean status = FALSE;
+
+ g_return_if_fail(results->data != NULL);
+ result = results->data;
+
+ if (result->result == GNOME_VFS_OK)
+ {
+ if (result->file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE)
+ {
+ if (info->test & G_FILE_TEST_IS_REGULAR)
+ status = result->file_info->type == GNOME_VFS_FILE_TYPE_REGULAR;
+ if (! status && info->test & G_FILE_TEST_IS_SYMLINK)
+ status = result->file_info->type == GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK;
+ if (! status && info->test & G_FILE_TEST_IS_DIR)
+ status = result->file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY;
+ }
+ if (result->file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_PERMISSIONS)
+ {
+ if (! status && info->test & G_FILE_TEST_IS_EXECUTABLE)
+ status = result->file_info->permissions & GNOME_VFS_PERM_ACCESS_EXECUTABLE;
+ }
+ if (! status && info->test & G_FILE_TEST_EXISTS)
+ status = TRUE; /* gnome_vfs_get_file_info() succeeded, so the file exists */
+ }
+
+ info->callback(status, info->user_data);
+ g_free(info);
+}
diff --git a/src/mn-vfs.h b/src/mn-vfs.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _MN_VFS_H
+#define _MN_VFS_H
+
+#include "config.h"
+#include <glib.h>
+#include <libgnomevfs/gnome-vfs.h>
+
+typedef struct _MNVFSAsyncHandle MNVFSAsyncHandle;
+
+typedef void (MNVFSAsyncCallback) (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ gpointer user_data);
+
+typedef MNVFSAsyncCallback MNVFSAsyncOpenCallback;
+typedef MNVFSAsyncCallback MNVFSAsyncCloseCallback;
+
+typedef void (MNVFSAsyncReadLineCallback) (MNVFSAsyncHandle *handle,
+ GnomeVFSResult result,
+ const char *line,
+ gpointer user_data);
+
+typedef void (MNVFSAsyncTestCallback) (gboolean result, gpointer user_data);
+
+#define MN_VFS_PASS_NEWLINE (1 << 0)
+
+void mn_vfs_async_open (MNVFSAsyncHandle **handle,
+ const char *text_uri,
+ GnomeVFSOpenMode open_mode,
+ MNVFSAsyncOpenCallback *callback,
+ gpointer user_data);
+void mn_vfs_async_close (MNVFSAsyncHandle *handle,
+ MNVFSAsyncCloseCallback *callback,
+ gpointer user_data);
+void mn_vfs_async_read_line (MNVFSAsyncHandle *handle,
+ unsigned int flags,
+ MNVFSAsyncReadLineCallback *callback,
+ gpointer user_data);
+
+void mn_vfs_async_test (const char *uri,
+ GFileTest test,
+ MNVFSAsyncTestCallback *callback,
+ gpointer user_data);
+
+#endif /* _MN_VFS_H */
diff --git a/ui/Makefile.am b/ui/Makefile.am
@@ -1,21 +1,21 @@
uidir = $(pkgdatadir)/ui
-interfaces = \
- add-pop3.glade \
- dialog.glade \
- menu.glade \
+interfaces = \
+ dialog.glade \
+ mailbox-properties.glade \
+ menu.glade \
preferences.glade
-projects = \
- add-pop3.gladep \
- dialog.gladep \
- menu.gladep \
+projects = \
+ dialog.gladep \
+ mailbox-properties.gladep \
+ menu.gladep \
preferences.gladep
-strings = \
- add-pop3-strings.c \
- dialog-strings.c \
- menu-strings.c \
+strings = \
+ dialog-strings.c \
+ mailbox-properties-strings.c \
+ menu-strings.c \
preferences-strings.c
dist_ui_DATA = $(interfaces)
diff --git a/ui/Makefile.in b/ui/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.5 from Makefile.am.
+# Makefile.in generated by automake 1.8.4 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -35,6 +34,23 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+subdir = ui
+DIST_COMMON = $(dist_ui_DATA) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__installdirs = "$(DESTDIR)$(uidir)"
+dist_uiDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_ui_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -65,16 +81,12 @@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_CFLAGS = @GLADE_CFLAGS@
-GLADE_LIBS = @GLADE_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNET_CFLAGS = @GNET_CFLAGS@
GNET_LIBS = @GNET_LIBS@
GNOME_CFLAGS = @GNOME_CFLAGS@
GNOME_LIBS = @GNOME_LIBS@
-GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
-GTHREAD_LIBS = @GTHREAD_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
G_ASSERTIONS = @G_ASSERTIONS@
@@ -143,6 +155,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
+mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -151,66 +164,75 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
uidir = $(pkgdatadir)/ui
-
interfaces = \
- add-pop3.glade \
- dialog.glade \
- menu.glade \
+ dialog.glade \
+ mailbox-properties.glade \
+ menu.glade \
preferences.glade
-
projects = \
- add-pop3.gladep \
- dialog.gladep \
- menu.gladep \
+ dialog.gladep \
+ mailbox-properties.gladep \
+ menu.gladep \
preferences.gladep
-
strings = \
- add-pop3-strings.c \
- dialog-strings.c \
- menu-strings.c \
+ dialog-strings.c \
+ mailbox-properties-strings.c \
+ menu-strings.c \
preferences-strings.c
-
dist_ui_DATA = $(interfaces)
-
EXTRA_DIST = $(projects) $(strings)
-subdir = ui
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DATA = $(dist_ui_DATA)
-
-DIST_COMMON = $(dist_ui_DATA) Makefile.am Makefile.in
all: all-am
.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ui/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign ui/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
uninstall-info-am:
-dist_uiDATA_INSTALL = $(INSTALL_DATA)
install-dist_uiDATA: $(dist_ui_DATA)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(uidir)
+ test -z "$(uidir)" || $(mkdir_p) "$(DESTDIR)$(uidir)"
@list='$(dist_ui_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " $(dist_uiDATA_INSTALL) $$d$$p $(DESTDIR)$(uidir)/$$f"; \
- $(dist_uiDATA_INSTALL) $$d$$p $(DESTDIR)$(uidir)/$$f; \
+ echo " $(dist_uiDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(uidir)/$$f'"; \
+ $(dist_uiDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(uidir)/$$f"; \
done
uninstall-dist_uiDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_ui_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(uidir)/$$f"; \
- rm -f $(DESTDIR)$(uidir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(uidir)/$$f'"; \
+ rm -f "$(DESTDIR)$(uidir)/$$f"; \
done
tags: TAGS
TAGS:
@@ -218,10 +240,6 @@ TAGS:
ctags: CTAGS
CTAGS:
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -235,7 +253,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -253,9 +271,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
-
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(uidir)
+ for dir in "$(DESTDIR)$(uidir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -267,7 +286,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -275,7 +294,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -285,13 +304,15 @@ clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-
+ -rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
+html: html-am
+
info: info-am
info-am:
@@ -307,7 +328,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-
+ -rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
@@ -325,13 +346,14 @@ ps-am:
uninstall-am: uninstall-dist_uiDATA uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am info info-am install \
- install-am install-data install-data-am install-dist_uiDATA \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
- uninstall-am uninstall-dist_uiDATA uninstall-info-am
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_uiDATA install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-dist_uiDATA \
+ uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/ui/add-pop3-strings.c b/ui/add-pop3-strings.c
@@ -1,23 +0,0 @@
-/*
- * Translatable strings file generated by Glade.
- * Add this file to your project's POTFILES.in.
- * DO NOT compile it as part of your application.
- */
-
-gchar *s = N_("The hostname or IP address of the POP3 server");
-gchar *s = N_("Add a POP3 Mailbox");
-gchar *s = N_("<span weight=\"bold\">Server</span>");
-gchar *s = N_(" ");
-gchar *s = N_("_Hostname:");
-gchar *s = N_("The hostname or IP address of the POP3 server");
-gchar *s = N_("*");
-gchar *s = N_("_Port:");
-gchar *s = N_("The port number of the POP3 server");
-gchar *s = N_("<span weight=\"bold\">Authentication</span>");
-gchar *s = N_(" ");
-gchar *s = N_("_Username:");
-gchar *s = N_("The login name used to authenticate yourself");
-gchar *s = N_("*");
-gchar *s = N_("Passw_ord:");
-gchar *s = N_("The password used to authenticate yourself");
-gchar *s = N_("*");
diff --git a/ui/add-pop3.glade b/ui/add-pop3.glade
@@ -1,460 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="dialog">
- <property name="border_width">6</property>
- <property name="tooltip" translatable="yes">The hostname or IP address of the POP3 server</property>
- <property name="title" translatable="yes">Add a POP3 Mailbox</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><span weight="bold">Server</span></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="hostname_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Hostname:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">hostname_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="hostname_entry">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">The hostname or IP address of the POP3 server</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="port_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Port:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">port_spin</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="port_spin">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">The port number of the POP3 server</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">110 0 65535 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><span weight="bold">Authentication</span></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="username_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Username:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">username_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="username_entry">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">The login name used to authenticate yourself</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="password_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Passw_ord:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">password_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="password_entry">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">The password used to authenticate yourself</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">False</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/ui/add-pop3.gladep b/ui/add-pop3.gladep
@@ -1,15 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
-
-<glade-project>
- <name>Mail Notification Add POP3</name>
- <program_name>mail-notification</program_name>
- <directory>../</directory>
- <source_directory>../src</source_directory>
- <pixmaps_directory>../art</pixmaps_directory>
- <output_main_file>FALSE</output_main_file>
- <output_support_files>FALSE</output_support_files>
- <output_build_files>FALSE</output_build_files>
- <output_translatable_strings>TRUE</output_translatable_strings>
- <translatable_strings_file>add-pop3-strings.c</translatable_strings_file>
-</glade-project>
diff --git a/ui/dialog.glade b/ui/dialog.glade
@@ -12,6 +12,11 @@
<property name="modal">False</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
@@ -60,12 +65,13 @@
<child>
<widget class="GtkLabel" id="label">
<property name="visible">True</property>
+ <property name="can_focus">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">True</property>
- <property name="selectable">False</property>
+ <property name="selectable">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0</property>
<property name="xpad">0</property>
diff --git a/ui/mailbox-properties-strings.c b/ui/mailbox-properties-strings.c
@@ -0,0 +1,25 @@
+/*
+ * Translatable strings file generated by Glade.
+ * Add this file to your project's POTFILES.in.
+ * DO NOT compile it as part of your application.
+ */
+
+gchar *s = N_("_File or folder");
+gchar *s = N_(" ");
+gchar *s = N_("_Location:");
+gchar *s = N_("The URI of the file or folder");
+gchar *s = N_("*");
+gchar *s = N_("_Browse...");
+gchar *s = N_("_POP3 mailbox");
+gchar *s = N_(" ");
+gchar *s = N_("_Hostname:");
+gchar *s = N_("The hostname or IP address of the POP3 server");
+gchar *s = N_("*");
+gchar *s = N_("P_ort:");
+gchar *s = N_("The port number of the POP3 server");
+gchar *s = N_("Us_ername:");
+gchar *s = N_("Your username on the POP3 server");
+gchar *s = N_("*");
+gchar *s = N_("P_assword:");
+gchar *s = N_("Your password on the POP3 server");
+gchar *s = N_("*");
diff --git a/ui/mailbox-properties.glade b/ui/mailbox-properties.glade
@@ -0,0 +1,506 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkDialog" id="dialog">
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes"></property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="border_width">5</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkRadioButton" id="file_radio">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_File or folder</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="mn_mailbox_properties_dialog_radio_toggled_h" object="dialog" last_modification_time="Mon, 07 Jun 2004 16:45:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox12">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="location_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Location:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">location_entry</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox13">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkEntry" id="location_entry">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">The URI of the file or folder</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">True</property>
+ <signal name="changed" handler="mn_mailbox_properties_dialog_entry_changed_h" object="dialog" last_modification_time="Mon, 07 Jun 2004 16:44:58 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="browse">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Browse...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="mn_mailbox_properties_dialog_browse_clicked_h" object="dialog" last_modification_time="Mon, 07 Jun 2004 13:05:17 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkRadioButton" id="pop3_radio">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_POP3 mailbox</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">file_radio</property>
+ <signal name="toggled" handler="mn_mailbox_properties_dialog_radio_toggled_h" object="dialog" last_modification_time="Mon, 07 Jun 2004 16:45:44 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="hostname_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Hostname:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">hostname_entry</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="hostname_entry">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">The hostname or IP address of the POP3 server</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ <signal name="activate" handler="mn_mailbox_properties_dialog_pop3_entry_activate_h" object="port_spin" last_modification_time="Mon, 07 Jun 2004 16:45:55 GMT"/>
+ <signal name="changed" handler="mn_mailbox_properties_dialog_entry_changed_h" object="dialog" last_modification_time="Mon, 07 Jun 2004 13:26:45 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="port_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">P_ort:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">port_spin</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="port_spin">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">The port number of the POP3 server</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">110 0 65535 1 10 10</property>
+ <signal name="activate" handler="mn_mailbox_properties_dialog_pop3_entry_activate_h" object="username_entry" last_modification_time="Mon, 07 Jun 2004 16:46:04 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="username_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Us_ername:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">username_entry</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="username_entry">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Your username on the POP3 server</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ <signal name="activate" handler="mn_mailbox_properties_dialog_pop3_entry_activate_h" object="password_entry" last_modification_time="Mon, 07 Jun 2004 16:46:10 GMT"/>
+ <signal name="changed" handler="mn_mailbox_properties_dialog_entry_changed_h" object="dialog" last_modification_time="Mon, 07 Jun 2004 13:29:30 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="password_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">P_assword:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">password_entry</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="password_entry">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Your password on the POP3 server</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">False</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ <signal name="activate" handler="mn_mailbox_properties_dialog_pop3_entry_activate_h" object="hostname_entry" last_modification_time="Mon, 07 Jun 2004 16:46:16 GMT"/>
+ <signal name="changed" handler="mn_mailbox_properties_dialog_entry_changed_h" object="dialog" last_modification_time="Mon, 07 Jun 2004 13:29:45 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/ui/mailbox-properties.gladep b/ui/mailbox-properties.gladep
@@ -0,0 +1,15 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+ <name>Mail Notification Mailbox Properties</name>
+ <program_name>mail-notification</program_name>
+ <directory>../</directory>
+ <source_directory>../src</source_directory>
+ <pixmaps_directory>../art</pixmaps_directory>
+ <output_main_file>FALSE</output_main_file>
+ <output_support_files>FALSE</output_support_files>
+ <output_build_files>FALSE</output_build_files>
+ <output_translatable_strings>TRUE</output_translatable_strings>
+ <translatable_strings_file>mailbox-properties-strings.c</translatable_strings_file>
+</glade-project>
diff --git a/ui/menu-strings.c b/ui/menu-strings.c
@@ -4,5 +4,7 @@
* DO NOT compile it as part of your application.
*/
-gchar *s = N_("Check for new mail");
-gchar *s = N_("_Check for Mail");
+gchar *s = N_("Update the icon");
+gchar *s = N_("_Update");
+gchar *s = N_("Show help");
+gchar *s = N_("_Help");
diff --git a/ui/menu.glade b/ui/menu.glade
@@ -7,15 +7,15 @@
<widget class="GtkMenu" id="menu">
<child>
- <widget class="GtkImageMenuItem" id="check_for_mail">
+ <widget class="GtkImageMenuItem" id="update">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Check for new mail</property>
- <property name="label" translatable="yes">_Check for Mail</property>
+ <property name="tooltip" translatable="yes">Update the icon</property>
+ <property name="label" translatable="yes">_Update</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="mn_ui_check_for_mail_activate_h" last_modification_time="Sun, 27 Jul 2003 07:10:19 GMT"/>
+ <signal name="activate" handler="mn_ui_update_activate_h" last_modification_time="Thu, 27 May 2004 18:00:02 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1">
+ <widget class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="icon_size">1</property>
@@ -29,7 +29,7 @@
</child>
<child>
- <widget class="GtkMenuItem" id="menuitem1">
+ <widget class="GtkSeparatorMenuItem" id="menuitem1">
<property name="visible">True</property>
</widget>
</child>
@@ -43,6 +43,28 @@
</child>
<child>
+ <widget class="GtkImageMenuItem" id="help1">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Show help</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="mn_ui_help_activate_h" last_modification_time="Mon, 28 Jun 2004 23:30:33 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="stock">gtk-help</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
<widget class="GtkImageMenuItem" id="imagemenuitem3">
<property name="visible">True</property>
<property name="stock_item">GNOMEUIINFO_MENU_ABOUT_ITEM</property>
@@ -51,7 +73,7 @@
</child>
<child>
- <widget class="GtkMenuItem" id="menuitem2">
+ <widget class="GtkSeparatorMenuItem" id="menuitem2">
<property name="visible">True</property>
</widget>
</child>
diff --git a/ui/preferences-strings.c b/ui/preferences-strings.c
@@ -7,22 +7,13 @@
gchar *s = N_("Mail Notification Preferences");
gchar *s = N_("<span weight=\"bold\">General</span>");
gchar *s = N_(" ");
-gchar *s = N_("Whether to periodically check for new local mail or not");
-gchar *s = N_("Check for local _mail every");
-gchar *s = N_("Delay between local mail checks (minutes part)");
+gchar *s = N_("_Delay between mail checks:");
+gchar *s = N_("The amount of time to wait between mail checks");
gchar *s = N_("minutes");
-gchar *s = N_("Delay between local mail checks (seconds part)");
-gchar *s = N_("seconds");
-gchar *s = N_("Whether to periodically check for new remote mail or not");
-gchar *s = N_("Check for rem_ote mail every");
-gchar *s = N_("Delay between remote mail checks (minutes part)");
-gchar *s = N_("minutes");
-gchar *s = N_("Delay between remote mail checks (seconds part)");
+gchar *s = N_("The amount of time to wait between mail checks");
gchar *s = N_("seconds");
gchar *s = N_("<span weight=\"bold\">Mailboxes</span>");
gchar *s = N_(" ");
-gchar *s = N_("_Add local mailbox");
-gchar *s = N_("Add remo_te mailbox");
gchar *s = N_("<span weight=\"bold\">Commands</span>");
gchar *s = N_(" ");
gchar *s = N_("Whether to run a command when new mail arrives or not");
@@ -33,3 +24,5 @@ gchar *s = N_("Whether to run a command when the icon is clicked or not");
gchar *s = N_("When click_ed:");
gchar *s = N_("The command to run when the icon is clicked");
gchar *s = N_("*");
+gchar *s = N_("_Add");
+gchar *s = N_("_Remove");
diff --git a/ui/preferences.glade b/ui/preferences.glade
@@ -13,6 +13,11 @@
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="icon">preferences-icon.png</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">False</property>
<signal name="destroy" handler="mn_preferences_destroy_h" last_modification_time="Sat, 06 Dec 2003 11:43:50 GMT"/>
<signal name="response" handler="mn_preferences_response_h" last_modification_time="Sat, 06 Dec 2003 12:33:33 GMT"/>
@@ -29,13 +34,27 @@
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
- <widget class="GtkButton" id="button1">
+ <widget class="GtkButton" id="button3">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-help</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-11</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button4">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="response_id">-7</property>
</widget>
</child>
@@ -110,70 +129,31 @@
</child>
<child>
- <widget class="GtkVBox" id="vbox4">
+ <widget class="GtkVBox" id="vbox9">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox2">
+ <widget class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <widget class="GtkCheckButton" id="local_check">
+ <widget class="GtkLabel" id="delay_label">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Whether to periodically check for new local mail or not</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Check for local _mail every</property>
+ <property name="label" translatable="yes">_Delay between mail checks:</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="mn_preferences_toggled_h" last_modification_time="Mon, 29 Sep 2003 12:23:43 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="local_minutes_spin">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Delay between local mail checks (minutes part)</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 999999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="local_minutes_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minutes</property>
- <property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0.5</property>
+ <property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
+ <property name="mnemonic_widget">minutes_spin</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -183,132 +163,92 @@
</child>
<child>
- <widget class="GtkSpinButton" id="local_seconds_spin">
+ <widget class="GtkHBox" id="hbox12">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Delay between local mail checks (seconds part)</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 999999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="local_seconds_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">seconds</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="remote_check">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Whether to periodically check for new remote mail or not</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Check for rem_ote mail every</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="mn_preferences_toggled_h" last_modification_time="Mon, 29 Sep 2003 12:23:36 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkSpinButton" id="minutes_spin">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">The amount of time to wait between mail checks</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">1 0 1440 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkSpinButton" id="remote_minutes_spin">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Delay between remote mail checks (minutes part)</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 999999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">minutes</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkLabel" id="remote_minutes_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minutes</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkSpinButton" id="seconds_spin">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">The amount of time to wait between mail checks</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">1 0 59 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkSpinButton" id="remote_seconds_spin">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Delay between remote mail checks (seconds part)</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 999999 1 10 10</property>
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">seconds</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -316,27 +256,6 @@
<property name="fill">True</property>
</packing>
</child>
-
- <child>
- <widget class="GtkLabel" id="remote_seconds_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">seconds</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -427,13 +346,14 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <widget class="GtkScrolledWindow" id="scrolled">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+ <signal name="drag_motion" handler="mn_preferences_scrolled_drag_motion_h" last_modification_time="Tue, 15 Jun 2004 14:16:09 GMT"/>
<child>
<widget class="GtkTreeView" id="list">
@@ -443,6 +363,9 @@
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
+ <signal name="popup_menu" handler="mn_preferences_list_popup_menu_h" last_modification_time="Wed, 26 May 2004 23:37:04 GMT"/>
+ <signal name="button_press_event" handler="mn_preferences_list_button_press_event_h" last_modification_time="Wed, 26 May 2004 23:37:29 GMT"/>
+ <signal name="row_activated" handler="mn_preferences_list_row_activated_h" last_modification_time="Sat, 05 Jun 2004 21:45:43 GMT"/>
</widget>
</child>
</widget>
@@ -454,6 +377,27 @@
</child>
<child>
+ <widget class="GtkLabel" id="selected_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkHBox" id="hbox5">
<property name="visible">True</property>
<property name="homogeneous">True</property>
@@ -463,64 +407,11 @@
<widget class="GtkButton" id="button2">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
- <signal name="clicked" handler="mn_preferences_add_local_clicked_h" last_modification_time="Sat, 06 Dec 2003 13:59:32 GMT"/>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Add local mailbox</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="mn_preferences_add_clicked_h" last_modification_time="Thu, 27 May 2004 20:34:29 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -530,83 +421,31 @@
</child>
<child>
- <widget class="GtkButton" id="add_remote">
+ <widget class="GtkButton" id="remove">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
- <signal name="clicked" handler="mn_preferences_add_remote_clicked_h" last_modification_time="Sat, 06 Dec 2003 13:59:44 GMT"/>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Add remo_te mailbox</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="mn_preferences_remove_clicked_h" last_modification_time="Sat, 06 Dec 2003 14:00:02 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="remove">
+ <widget class="GtkButton" id="properties">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
+ <property name="label">gtk-properties</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
- <signal name="clicked" handler="mn_preferences_remove_clicked_h" last_modification_time="Sat, 06 Dec 2003 14:00:02 GMT"/>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="mn_preferences_properties_clicked_h" last_modification_time="Sat, 05 Jun 2004 20:07:54 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -707,7 +546,7 @@
<widget class="GtkHBox" id="hbox9">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkCheckButton" id="command_new_mail_check">
@@ -717,6 +556,7 @@
<property name="label" translatable="yes">When _new mail arrives:</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -760,7 +600,7 @@
<widget class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkCheckButton" id="command_clicked_check">
@@ -770,6 +610,7 @@
<property name="label" translatable="yes">When click_ed:</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -840,4 +681,93 @@
</child>
</widget>
+<widget class="GtkMenu" id="mailbox_menu">
+
+ <child>
+ <widget class="GtkImageMenuItem" id="add_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Add</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="mn_preferences_add_item_activate_h" last_modification_time="Thu, 27 May 2004 20:35:19 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image10">
+ <property name="visible">True</property>
+ <property name="stock">gtk-add</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="remove_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Remove</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="mn_preferences_remove_item_activate_h" last_modification_time="Wed, 26 May 2004 23:31:31 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image11">
+ <property name="visible">True</property>
+ <property name="stock">gtk-remove</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkSeparatorMenuItem" id="separator1">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="cut_item">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_CUT_ITEM</property>
+ <signal name="activate" handler="mn_preferences_cut_item_activate_h" last_modification_time="Sat, 12 Jun 2004 19:00:48 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="copy_item">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_COPY_ITEM</property>
+ <signal name="activate" handler="mn_preferences_copy_item_activate_h" last_modification_time="Sat, 12 Jun 2004 19:00:48 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="paste_item">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_PASTE_ITEM</property>
+ <signal name="activate" handler="mn_preferences_paste_item_activate_h" last_modification_time="Sat, 12 Jun 2004 19:00:48 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkSeparatorMenuItem" id="separator2">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="properties_item">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_PROPERTIES_ITEM</property>
+ <signal name="activate" handler="mn_preferences_properties_item_activate_h" last_modification_time="Sat, 05 Jun 2004 20:10:49 GMT"/>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>