commit 4e15c31f6ecbf82043494043d83ca8bd4a6a951e
parent 250fff98fd565c625bdc8d7542efecc0ce3e990a
Author: Jean-Yves Lefort <jylefort@brutele.be>
Date: Mon, 7 Mar 2005 07:41:41 +1000
mail-notification-1.1
* IMAP changes:
* is more tolerant towards uncompliant FETCH responses
* ignores case of responses (RFC 3501)
* makes sure the server responses are valid ASCII (RFC
3501)
* Gmail changes:
* properly converts timestamps (requires ICU)
* handles timestamps from previous years
* displays all the messages of a conversation
* POP3 and IMAP changes:
* does not loop infinitely when no password is
specified, an authentication mechanism is specified
and authentication fails
* does not abort when a SASL authentication mechanism
is specified and the server does not support any
SASL authentication mechanism
* POP3 and Gmail changes:
* makes sure the server responses are valid UTF-8
* The mail summary dialog has been replaced by a main window,
for controlling Mail Notification when the status icon is
hidden
* Added "update the mail status" double-click action
* The tooltip mailbox lists (Mailboxes Having New Mail,
Errors, Unsupported Mailboxes) are now sorted
* GMime is now mandatory for mbox, MH, Maildir, Sylpheed, POP3
and IMAP mailbox support
* The --quit command line argument has been added
* Minor fixes and cleanups
* Updated translations:
* Polish (Maurycy Pawłowski-Wieroński)
* Serbian (Filip Miletic)
* Portuguese (Duarte Henriques)
* German (Hendrik Brandt)
Diffstat:
201 files changed, 20147 insertions(+), 10932 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -12,10 +12,16 @@ Contributors:
* Filip Miletic <filmil@gmail.com> (Serbian translations)
* Vladimir Petkov <vpetkov@i-space.org> (Bulgarian
translations)
- * Tomasz Sarota-Raczek <tomasz.sarota.raczek@gmail.com>
+ * Tomasz Sarota-Raczek <tomasz.sarota.raczek@gmail.com>,
+ Maurycy Pawłowski-Wieroński <maurycy@abstrakcja.pl>
(Polish translations)
-External art sources:
+External code sources:
+ * libegg (src/egg*)
+
+External art sources (images taken as-is or slightly modified):
* Google (gmail.png)
* Evolution (mail-notification.png)
* GTK+ (unsupported.png)
+ * GNOME Icon Theme (main-window.png)
+ * libegg (hand-open.png)
diff --git a/INSTALL b/INSTALL
@@ -11,9 +11,9 @@ Index
0. About this document
- $Id: INSTALL,v 1.14 2004/10/25 13:03:00 jylefort Exp $
+ $Id: INSTALL,v 1.17 2005/03/01 01:43:58 jylefort Exp $
- Copyright (c) 2003, 2004 Jean-Yves Lefort.
+ Copyright (C) 2003-2005 Jean-Yves Lefort.
This document is part of Mail Notification.
It may be distributed under the same terms as Mail Notification.
@@ -30,11 +30,21 @@ Index
Optional libraries:
+ * for mbox, MH, Maildir, POP3, IMAP and Sylpheed support:
+
+ GMime (version 2.1.0 or superior)
+ http://spruce.sourceforge.net/gmime/
+
* for Gmail support:
GNOME (version 2.8.0 or superior)
http://www.gnome.org/
+ * for Gmail timestamps support:
+
+ ICU (version 2.6 or superior)
+ http://ibm.com/software/globalization/icu/
+
* for SSL/TLS support:
OpenSSL (version 0.9.5b or superior)
@@ -45,11 +55,6 @@ Index
Cyrus SASL (version 2.0 or superior)
http://asg.web.cmu.edu/sasl/sasl-library.html
- * for MIME support:
-
- GMime (version 2.1.0 or superior)
- http://spruce.sourceforge.net/gmime/
-
2. Instructions
Mail Notification uses the well-known GNU build system. Hence,
@@ -83,22 +88,32 @@ Index
Enable mbox mailbox support.
+ Requirements: GMime version 2.1.0 or superior.
+
--enable-mh (default: yes)
Enable MH mailbox support.
+ Requirements: GMime version 2.1.0 or superior.
+
--enable-maildir (default: yes)
Enable Maildir mailbox support.
+ Requirements: GMime version 2.1.0 or superior.
+
--enable-pop3 (default: yes)
Enable POP3 mailbox support.
+ Requirements: GMime version 2.1.0 or superior.
+
--enable-imap (default: yes)
Enable IMAP mailbox support.
+ Requirements: GMime version 2.1.0 or superior.
+
--enable-ssl (default: yes)
Enable SSL/TLS support.
@@ -115,7 +130,9 @@ Index
--enable-sylpheed (default: yes)
- Enable Sylpheed format support.
+ Enable Sylpheed mailbox support.
+
+ Requirements: GMime version 2.1.0 or superior.
--enable-gmail (default: yes)
@@ -123,17 +140,17 @@ Index
Requirements: GNOME version 2.8.0 or superior.
- --enable-ipv6 (default: yes)
+ --enable-gmail-timestamps (default: yes)
- Enable IPv6 support.
+ Enable Gmail timestamps support. If this option is
+ disabled, Mail Notification will not be able to
+ display the timestamps of Gmail messages.
- Applies to: POP3, IMAP.
+ Requirements: GNOME version 2.8.0 or superior.
+ Applies to: Gmail.
- --enable-mime (default: yes)
+ --enable-ipv6 (default: yes)
- Enable MIME support. If this option is disabled, the
- mail summary will not be able to display messages of
- mbox, MH, Maildir, POP3, IMAP and Sylpheed mailboxes.
+ Enable IPv6 support.
- Requirements: GMime version 2.0 or superior.
- Applies to: mbox, MH, Maildir, POP3, IMAP, Sylpheed.
+ Applies to: POP3, IMAP.
diff --git a/Makefile.in b/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -40,9 +40,9 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
compile config.guess config.sub depcomp install-sh missing \
mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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 \
@@ -103,6 +103,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -113,6 +114,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -179,6 +183,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
diff --git a/NEWS b/NEWS
@@ -1,3 +1,44 @@
+1.1 March 6, 2005
+
+ * IMAP fixes:
+ * is more tolerant towards uncompliant FETCH responses
+ * ignores case of responses (RFC 3501)
+ * makes sure the server responses are valid ASCII (RFC
+ 3501)
+
+ * Gmail fixes:
+ * properly converts timestamps (requires ICU)
+ * handles timestamps from previous years
+ * displays all the messages of a conversation
+
+ * POP3 and IMAP fixes:
+ * does not loop infinitely when no password is
+ specified, an authentication mechanism is specified
+ and authentication fails
+ * does not abort when a SASL authentication mechanism
+ is specified and the server does not support any
+ SASL authentication mechanism
+
+ * POP3 and Gmail fixes:
+ * makes sure the server responses are valid UTF-8
+
+ * The mail summary dialog has been replaced by a main window,
+ for controlling Mail Notification when the status icon is
+ hidden
+ * Added "update the mail status" double-click action
+ * The tooltip mailbox lists (Mailboxes Having New Mail,
+ Errors, Unsupported Mailboxes) are now sorted
+ * GMime is now mandatory for mbox, MH, Maildir, Sylpheed, POP3
+ and IMAP mailbox support
+ * The --quit command line argument has been added
+ * Minor fixes and cleanups
+
+ * Updated translations:
+ * Polish (Maurycy Pawłowski-Wieroński)
+ * Serbian (Filip Miletic)
+ * Portuguese (Duarte Henriques)
+ * German (Hendrik Brandt)
+
1.0 November 25, 2004
* Some minor IMAP issues have been fixed
diff --git a/README b/README
@@ -6,13 +6,14 @@ Index
0. About this document
1. About Mail Notification
- 2. Installation instructions
+ 2. Issues in third-party software affecting Mail Notification
+ 3. Installation instructions
0. About this document
- $Id: README,v 1.23 2004/10/25 13:03:00 jylefort Exp $
+ $Id: README,v 1.25 2005/03/01 16:55:41 jylefort Exp $
- Copyright (c) 2003, 2004 Jean-Yves Lefort.
+ Copyright (C) 2003-2005 Jean-Yves Lefort.
This document is part of Mail Notification.
It may be distributed under the same terms as Mail Notification.
@@ -41,6 +42,23 @@ Index
* a mail summary
* HIG 2.0 compliance
-2. Installation instructions
+2. Issues in third-party software affecting Mail Notification
+
+ As of March 1, 2005, the following issues are unfixed, and may
+ cause Mail Notification (and other GNOME multi-threaded
+ programs) to crash or hang.
+
+ * thread-safety bug in GLib:
+ http://bugzilla.gnome.org/show_bug.cgi?id=64764
+
+ Reported on 2001-11-17, maintainers apparently do not care.
+
+ * thread-safety bugs in libgnomeui:
+ http://bugzilla.gnome.org/show_bug.cgi?id=152023
+
+ Reported on 2004-09-06, patches provided, maintainers
+ apparently do not care.
+
+3. Installation instructions
See the INSTALL file.
diff --git a/TODO b/TODO
@@ -4,3 +4,7 @@
* See if we can add an Evolution data server mailbox backend
* List the available IMAP folders in the mailbox properties dialog
+
+* Allow to set a different mail reader for each mailbox. Invoking the
+ mail reader action would run the mail reader of the most recent
+ message's mailbox, or fallback to the global mail reader.
diff --git a/acinclude.m4 b/acinclude.m4
@@ -1,6 +1,4 @@
-# $Id: acinclude.m4,v 1.13 2004/09/29 22:15:14 jylefort Exp $
-#
-# Copyright (c) 2003, 2004 Jean-Yves Lefort.
+# Copyright (C) 2003-2005 Jean-Yves Lefort.
#
# This file is part of Mail Notification.
# It may be distributed under the same terms as Mail Notification.
@@ -72,8 +70,23 @@ esac], [enable_compile_warnings=no])
if test $enable_compile_warnings = no; then
WARN_CFLAGS=
else
- # some flags are specific to GCC
- WARN_CFLAGS="-Wall -Wcast-align -Wredundant-decls -Wnested-externs -Winline"
+ # most flags are specific to GCC
+ WARN_CFLAGS="-Wall \
+-Wformat-y2k \
+-Wformat-security \
+-Wno-unused-parameter \
+-Wfloat-equal \
+-Wdeclaration-after-statement \
+-Wendif-labels \
+-Wpointer-arith \
+-Wcast-align \
+-Waggregate-return \
+-Wmissing-noreturn \
+-Wmissing-format-attribute \
+-Wpacked \
+-Wredundant-decls \
+-Wnested-externs \
+-Winline"
test $enable_compile_warnings = error && WARN_CFLAGS="$WARN_CFLAGS -Werror"
fi
@@ -83,7 +96,7 @@ AC_SUBST(WARN_CFLAGS)])
dnl MN_REPORT(NAME, VALUE)
dnl
-AC_DEFUN([MN_REPORT], [ m4_format([%-20s %s], [$1], [$2])])
+AC_DEFUN([MN_REPORT], [ m4_format([%-30s %s], [$1], [$2])])
dnl MN_REPORT_ARG(NAME)
dnl
diff --git a/aclocal.m4 b/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.9.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
@@ -668,7 +668,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# 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.9.2])])
+ [AM_AUTOMAKE_VERSION([1.9.4])])
# AM_AUX_DIR_EXPAND
@@ -1710,6 +1710,7 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([m4/icu.m4])
m4_include([m4/openssl.m4])
m4_include([m4/sasl2.m4])
dnl AM_GCONF_SOURCE_2
diff --git a/art/Makefile.am b/art/Makefile.am
@@ -1,12 +1,10 @@
-GNOME_IMAGES = mail-notification.png
-APP_IMAGES = \
- logo.png \
- gmail.png \
- mail-notification.png \
- unsupported.png
-
gnome_pixmapsdir = $(datadir)/pixmaps
-dist_gnome_pixmaps_DATA = $(GNOME_IMAGES)
+dist_gnome_pixmaps_DATA = mail-notification.png
app_pixmapsdir = $(pkgdatadir)/ui
-dist_app_pixmaps_DATA = $(APP_IMAGES)
+dist_app_pixmaps_DATA = \
+ gmail.png \
+ hand-open.png \
+ logo.png \
+ main-window.png \
+ unsupported.png
diff --git a/art/Makefile.in b/art/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -38,9 +38,9 @@ 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/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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
@@ -91,6 +91,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -101,6 +102,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -167,6 +171,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
@@ -222,17 +228,16 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-GNOME_IMAGES = mail-notification.png
-APP_IMAGES = \
- logo.png \
+gnome_pixmapsdir = $(datadir)/pixmaps
+dist_gnome_pixmaps_DATA = mail-notification.png
+app_pixmapsdir = $(pkgdatadir)/ui
+dist_app_pixmaps_DATA = \
gmail.png \
- mail-notification.png \
+ hand-open.png \
+ logo.png \
+ main-window.png \
unsupported.png
-gnome_pixmapsdir = $(datadir)/pixmaps
-dist_gnome_pixmaps_DATA = $(GNOME_IMAGES)
-app_pixmapsdir = $(pkgdatadir)/ui
-dist_app_pixmaps_DATA = $(APP_IMAGES)
all: all-am
.SUFFIXES:
diff --git a/art/hand-open.png b/art/hand-open.png
Binary files differ.
diff --git a/art/main-window.png b/art/main-window.png
Binary files differ.
diff --git a/config.h.in b/config.h.in
@@ -45,9 +45,6 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define to 1 if you have the `timegm' function. */
-#undef HAVE_TIMEGM
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -72,15 +69,15 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-#undef TM_IN_SYS_TIME
-
/* Version number of package */
#undef VERSION
/* Define to 1 if [gmail] is enabled */
#undef WITH_GMAIL
+/* Define to 1 if [gmail-timestamps] is enabled */
+#undef WITH_GMAIL_TIMESTAMPS
+
/* Define to 1 if [imap] is enabled */
#undef WITH_IMAP
diff --git a/configure b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for mail-notification 1.0.
+# Generated by GNU Autoconf 2.59 for mail-notification 1.1.
#
# Report bugs to <jylefort@brutele.be>.
#
@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='mail-notification'
PACKAGE_TARNAME='mail-notification'
-PACKAGE_VERSION='1.0'
-PACKAGE_STRING='mail-notification 1.0'
+PACKAGE_VERSION='1.1'
+PACKAGE_STRING='mail-notification 1.1'
PACKAGE_BUGREPORT='jylefort@brutele.be'
ac_unique_file="src/mn-main.c"
@@ -311,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 WARN_CFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar 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 INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_PROP_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XAM_RULE INTLTOOL_KBD_RULE INTLTOOL_XML_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL ICONV MSGMERGE 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 ORBIT_IDL LIBBONOBO_IDL BONOBO_ACTIVATION_IDL GOB2 OPENSSL_CFLAGS OPENSSL_LIBS SASL_CFLAGS SASL_LIBS SOUP_CFLAGS SOUP_LIBS GMIME_CFLAGS GMIME_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_IMAP_TRUE WITH_IMAP_FALSE WITH_POP3_OR_IMAP_TRUE WITH_POP3_OR_IMAP_FALSE WITH_POP3_OR_IMAP_OR_GMAIL_TRUE WITH_POP3_OR_IMAP_OR_GMAIL_FALSE WITH_SSL_TRUE WITH_SSL_FALSE WITH_SASL_TRUE WITH_SASL_FALSE WITH_SYLPHEED_TRUE WITH_SYLPHEED_FALSE WITH_GMAIL_TRUE WITH_GMAIL_FALSE WITH_MIME_TRUE WITH_MIME_FALSE WITH_REGRESSION_TESTS_TRUE WITH_REGRESSION_TESTS_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 WARN_CFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar 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 INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_PROP_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XAM_RULE INTLTOOL_KBD_RULE INTLTOOL_XML_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL ICONV MSGMERGE 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 ORBIT_IDL LIBBONOBO_IDL BONOBO_ACTIVATION_IDL GOB2 GLIB_GENMARSHAL GMIME_CFLAGS GMIME_LIBS OPENSSL_CFLAGS OPENSSL_LIBS SASL_CFLAGS SASL_LIBS SOUP_CFLAGS SOUP_LIBS ICU_CONFIG ICU_CFLAGS ICU_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_IMAP_TRUE WITH_IMAP_FALSE WITH_POP3_OR_IMAP_TRUE WITH_POP3_OR_IMAP_FALSE WITH_POP3_OR_IMAP_OR_GMAIL_TRUE WITH_POP3_OR_IMAP_OR_GMAIL_FALSE WITH_SSL_TRUE WITH_SSL_FALSE WITH_SASL_TRUE WITH_SASL_FALSE WITH_SYLPHEED_TRUE WITH_SYLPHEED_FALSE WITH_GMAIL_TRUE WITH_GMAIL_FALSE WITH_GMAIL_TIMESTAMPS_TRUE WITH_GMAIL_TIMESTAMPS_FALSE WITH_MIME_TRUE WITH_MIME_FALSE WITH_REGRESSION_TESTS_TRUE WITH_REGRESSION_TESTS_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -780,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 1.0 to adapt to many kinds of systems.
+\`configure' configures mail-notification 1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -842,7 +842,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mail-notification 1.0:";;
+ short | recursive ) echo "Configuration of mail-notification 1.1:";;
esac
cat <<\_ACEOF
@@ -858,8 +858,9 @@ Optional Features:
--disable-sasl disable SASL authentication support
--disable-sylpheed disable Sylpheed support
--disable-gmail disable Gmail support
+ --disable-gmail-timestamps
+ disable Gmail timestamps support
--disable-ipv6 disable IPv6 support
- --disable-mime disable MIME support
--enable-compile-warnings=no|yes|error
enable compiler warnings [no]
--enable-regression-tests
@@ -986,7 +987,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-mail-notification configure 1.0
+mail-notification configure 1.1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1000,7 +1001,7 @@ 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 1.0, which was
+It was created by mail-notification $as_me 1.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1450,6 +1451,18 @@ esac
else
enable_gmail=yes
fi;
+# Check whether --enable-gmail-timestamps or --disable-gmail-timestamps was given.
+if test "${enable_gmail_timestamps+set}" = set; then
+ enableval="$enable_gmail_timestamps"
+ case "$enableval" in
+ yes|no) enable_gmail_timestamps=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gmail-timestamps" >&5
+echo "$as_me: error: bad value $enableval for --enable-gmail-timestamps" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ enable_gmail_timestamps=yes
+fi;
# Check whether --enable-ipv6 or --disable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
enableval="$enable_ipv6"
@@ -1462,18 +1475,6 @@ esac
else
enable_ipv6=yes
fi;
-# Check whether --enable-mime or --disable-mime was given.
-if test "${enable_mime+set}" = set; then
- enableval="$enable_mime"
- case "$enableval" in
- yes|no) enable_mime=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-mime" >&5
-echo "$as_me: error: bad value $enableval for --enable-mime" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- enable_mime=yes
-fi;
# Check whether --enable-compile-warnings or --disable-compile-warnings was given.
if test "${enable_compile_warnings+set}" = set; then
@@ -1491,8 +1492,23 @@ fi;
if test $enable_compile_warnings = no; then
WARN_CFLAGS=
else
- # some flags are specific to GCC
- WARN_CFLAGS="-Wall -Wcast-align -Wredundant-decls -Wnested-externs -Winline"
+ # most flags are specific to GCC
+ WARN_CFLAGS="-Wall \
+-Wformat-y2k \
+-Wformat-security \
+-Wno-unused-parameter \
+-Wfloat-equal \
+-Wdeclaration-after-statement \
+-Wendif-labels \
+-Wpointer-arith \
+-Wcast-align \
+-Waggregate-return \
+-Wmissing-noreturn \
+-Wmissing-format-attribute \
+-Wpacked \
+-Wredundant-decls \
+-Wnested-externs \
+-Winline"
test $enable_compile_warnings = error && WARN_CFLAGS="$WARN_CFLAGS -Werror"
fi
@@ -1819,7 +1835,7 @@ fi
# Define the identity of the package.
PACKAGE='mail-notification'
- VERSION='1.0'
+ VERSION='1.1'
cat >>confdefs.h <<_ACEOF
@@ -6661,175 +6677,6 @@ echo "$as_me: error: ANSI C headers not present" >&2;}
{ (exit 1); exit 1; }; }
fi
-# timegm() is non-standard, define HAVE_TIMEGM if it is present
-
-for ac_func in timegm
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* 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"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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 -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=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-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
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-# see if "struct tm" is defined in sys/time.h
-echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
-echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
-if test "${ac_cv_struct_tm+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <time.h>
-
-int
-main ()
-{
-struct tm *tp; tp->tm_sec;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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 -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
- ac_cv_struct_tm=time.h
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_tm=sys/time.h
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
-echo "${ECHO_T}$ac_cv_struct_tm" >&6
-if test $ac_cv_struct_tm = sys/time.h; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TM_IN_SYS_TIME 1
-_ACEOF
-
-fi
-
-
### mandatory libraries and programs
# Check whether --enable-gtktest or --disable-gtktest was given.
@@ -7350,7 +7197,7 @@ BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
### optional libraries
-# not needed by end-users, as files generated by GOB are distributed
+# not needed by end-users, as generated files are distributed
# Extract the first word of "gob2", so it can be a program name with args.
set dummy gob2; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -7390,6 +7237,188 @@ else
echo "${ECHO_T}no" >&6
fi
+# Extract the first word of "glib-genmarshal", so it can be a program name with args.
+set dummy glib-genmarshal; 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_GLIB_GENMARSHAL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GLIB_GENMARSHAL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GLIB_GENMARSHAL="$GLIB_GENMARSHAL" # 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_GLIB_GENMARSHAL="$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
+
+ ;;
+esac
+fi
+GLIB_GENMARSHAL=$ac_cv_path_GLIB_GENMARSHAL
+
+if test -n "$GLIB_GENMARSHAL"; then
+ echo "$as_me:$LINENO: result: $GLIB_GENMARSHAL" >&5
+echo "${ECHO_T}$GLIB_GENMARSHAL" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+enable_mime=no
+if test $enable_mbox = yes ||
+ test $enable_mh = yes ||
+ test $enable_maildir = yes ||
+ test $enable_pop3 = yes ||
+ test $enable_imap = yes ||
+ test $enable_sylpheed = yes; then
+
+ succeeded=no
+
+ 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 "$PKG_CONFIG" = "no" ; then
+ echo "*** The pkg-config script could not be found. Make sure it is"
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
+ echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+ 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 gmime-2.0 >= 2.1.0" >&5
+echo $ECHO_N "checking for gmime-2.0 >= 2.1.0... $ECHO_C" >&6
+
+ if $PKG_CONFIG --exists "gmime-2.0 >= 2.1.0" ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ succeeded=yes
+
+ echo "$as_me:$LINENO: checking GMIME_CFLAGS" >&5
+echo $ECHO_N "checking GMIME_CFLAGS... $ECHO_C" >&6
+ GMIME_CFLAGS=`$PKG_CONFIG --cflags "gmime-2.0 >= 2.1.0"`
+ echo "$as_me:$LINENO: result: $GMIME_CFLAGS" >&5
+echo "${ECHO_T}$GMIME_CFLAGS" >&6
+
+ echo "$as_me:$LINENO: checking GMIME_LIBS" >&5
+echo $ECHO_N "checking GMIME_LIBS... $ECHO_C" >&6
+ GMIME_LIBS=`$PKG_CONFIG --libs "gmime-2.0 >= 2.1.0"`
+ echo "$as_me:$LINENO: result: $GMIME_LIBS" >&5
+echo "${ECHO_T}$GMIME_LIBS" >&6
+ else
+ GMIME_CFLAGS=""
+ GMIME_LIBS=""
+ ## If we have a custom action on failure, don't print errors, but
+ ## do set a variable so people can do so.
+ GMIME_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gmime-2.0 >= 2.1.0"`
+
+ fi
+
+
+
+ else
+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
+ fi
+ fi
+
+ if test $succeeded = yes; then
+ enable_mime=yes
+ else
+ :
+ fi
+
+ if test $enable_mime = no; then
+ if test $enable_mbox = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-mbox" >&5
+echo "$as_me: GMime not found: forcing --disable-mbox" >&6;}
+enable_mbox=no
+disable_mbox_reason="(GMime not found)"
+ fi
+ if test $enable_mh = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-mh" >&5
+echo "$as_me: GMime not found: forcing --disable-mh" >&6;}
+enable_mh=no
+disable_mh_reason="(GMime not found)"
+ fi
+ if test $enable_maildir = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-maildir" >&5
+echo "$as_me: GMime not found: forcing --disable-maildir" >&6;}
+enable_maildir=no
+disable_maildir_reason="(GMime not found)"
+ fi
+ if test $enable_pop3 = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-pop3" >&5
+echo "$as_me: GMime not found: forcing --disable-pop3" >&6;}
+enable_pop3=no
+disable_pop3_reason="(GMime not found)"
+ fi
+ if test $enable_imap = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-imap" >&5
+echo "$as_me: GMime not found: forcing --disable-imap" >&6;}
+enable_imap=no
+disable_imap_reason="(GMime not found)"
+ fi
+ if test $enable_sylpheed = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-sylpheed" >&5
+echo "$as_me: GMime not found: forcing --disable-sylpheed" >&6;}
+enable_sylpheed=no
+disable_sylpheed_reason="(GMime not found)"
+ fi
+ fi
+fi
if test $enable_pop3 = no && test $enable_imap = no; then
if test $enable_ssl = yes; then
@@ -7675,35 +7704,18 @@ disable_gmail_reason="(libsoup not found)"
fi
fi
-
-if test $enable_mime = yes &&
- test $enable_mbox = no &&
- test $enable_mh = no &&
- test $enable_maildir = no &&
- test $enable_pop3 = no &&
- test $enable_imap = no &&
- test $enable_sylpheed = no; then
- { echo "$as_me:$LINENO: mbox, MH, Maildir, POP3, IMAP and Sylpheed support disabled: forcing --disable-mime" >&5
-echo "$as_me: mbox, MH, Maildir, POP3, IMAP and Sylpheed support disabled: forcing --disable-mime" >&6;}
-enable_mime=no
-disable_mime_reason="(mbox, MH, Maildir, POP3, IMAP and Sylpheed support disabled)"
-fi
-
-if test $enable_mime = yes; then
-
- succeeded=no
-
- 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
+if test $enable_gmail_timestamps = yes; then
+ if test $enable_gmail = yes; then
+ # Extract the first word of "icu-config", so it can be a program name with args.
+set dummy icu-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
+if test "${ac_cv_path_ICU_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $PKG_CONFIG in
+ case $ICU_CONFIG in
[\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ac_cv_path_ICU_CONFIG="$ICU_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7713,82 +7725,123 @@ do
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"
+ ac_cv_path_ICU_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"
+ test -z "$ac_cv_path_ICU_CONFIG" && ac_cv_path_ICU_CONFIG="no"
;;
esac
fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+ICU_CONFIG=$ac_cv_path_ICU_CONFIG
-if test -n "$PKG_CONFIG"; then
- echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
+if test -n "$ICU_CONFIG"; then
+ echo "$as_me:$LINENO: result: $ICU_CONFIG" >&5
+echo "${ECHO_T}$ICU_CONFIG" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- fi
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- 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 gmime-2.0 >= 2.1.0" >&5
-echo $ECHO_N "checking for gmime-2.0 >= 2.1.0... $ECHO_C" >&6
+if test "x$ICU_CONFIG" = xno; then
+ ICU_CFLAGS=""
+ ICU_LIBS=""
- if $PKG_CONFIG --exists "gmime-2.0 >= 2.1.0" ; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- succeeded=yes
+ { echo "$as_me:$LINENO: ICU not found: forcing --disable-gmail-timestamps" >&5
+echo "$as_me: ICU not found: forcing --disable-gmail-timestamps" >&6;}
+enable_gmail_timestamps=no
+disable_gmail_timestamps_reason="(ICU not found)"
+else
+ ICU_CFLAGS=`$ICU_CONFIG --cppflags`
+ ICU_LIBS=`$ICU_CONFIG --ldflags`
- echo "$as_me:$LINENO: checking GMIME_CFLAGS" >&5
-echo $ECHO_N "checking GMIME_CFLAGS... $ECHO_C" >&6
- GMIME_CFLAGS=`$PKG_CONFIG --cflags "gmime-2.0 >= 2.1.0"`
- echo "$as_me:$LINENO: result: $GMIME_CFLAGS" >&5
-echo "${ECHO_T}$GMIME_CFLAGS" >&6
+ # the version checking API we need has been introduced in 2.4
+ icu_min_version=2.6
- echo "$as_me:$LINENO: checking GMIME_LIBS" >&5
-echo $ECHO_N "checking GMIME_LIBS... $ECHO_C" >&6
- GMIME_LIBS=`$PKG_CONFIG --libs "gmime-2.0 >= 2.1.0"`
- echo "$as_me:$LINENO: result: $GMIME_LIBS" >&5
-echo "${ECHO_T}$GMIME_LIBS" >&6
- else
- GMIME_CFLAGS=""
- GMIME_LIBS=""
- ## If we have a custom action on failure, don't print errors, but
- ## do set a variable so people can do so.
- GMIME_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gmime-2.0 >= 2.1.0"`
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $ICU_CFLAGS"
+ LIBS="$LIBS $ICU_LIBS"
- fi
+ echo "$as_me:$LINENO: checking for ICU - version >= $icu_min_version" >&5
+echo $ECHO_N "checking for ICU - version >= $icu_min_version... $ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+ found=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#include <string.h>
+#include <unicode/uversion.h>
- else
- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
- echo "*** See http://www.freedesktop.org/software/pkgconfig"
- fi
- fi
+int main() {
+ UVersionInfo min_version;
+ UVersionInfo version;
- if test $succeeded = yes; then
- :
- else
- { echo "$as_me:$LINENO: GMime not found: forcing --disable-mime" >&5
-echo "$as_me: GMime not found: forcing --disable-mime" >&6;}
-enable_mime=no
-disable_mime_reason="(GMime not found)"
- fi
+ u_versionFromString(min_version, "$icu_min_version");
+ u_getVersion(version);
+
+ if (memcmp(min_version, version, U_MAX_VERSION_LENGTH) > 0)
+ exit(1); /* version too old */
+
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (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
+ found=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+found=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+ echo "$as_me:$LINENO: result: $found" >&5
+echo "${ECHO_T}$found" >&6
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+
+ if test $found = yes; then
+ :
+ else
+ ICU_CFLAGS=""
+ ICU_LIBS=""
+ { echo "$as_me:$LINENO: ICU not found: forcing --disable-gmail-timestamps" >&5
+echo "$as_me: ICU not found: forcing --disable-gmail-timestamps" >&6;}
+enable_gmail_timestamps=no
+disable_gmail_timestamps_reason="(ICU not found)"
+ fi
+fi
+
+
+
+ else
+ { echo "$as_me:$LINENO: Gmail support disabled: forcing --disable-gmail-timestamps" >&5
+echo "$as_me: Gmail support disabled: forcing --disable-gmail-timestamps" >&6;}
+enable_gmail_timestamps=no
+disable_gmail_timestamps_reason="(Gmail support disabled)"
+ fi
fi
### Automake conditionals
@@ -7905,6 +7958,16 @@ fi
+if test $enable_gmail_timestamps = yes; then
+ WITH_GMAIL_TIMESTAMPS_TRUE=
+ WITH_GMAIL_TIMESTAMPS_FALSE='#'
+else
+ WITH_GMAIL_TIMESTAMPS_TRUE='#'
+ WITH_GMAIL_TIMESTAMPS_FALSE=
+fi
+
+
+
if test $enable_mime = yes; then
WITH_MIME_TRUE=
WITH_MIME_FALSE='#'
@@ -7989,6 +8052,13 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
+if test $enable_gmail_timestamps = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_GMAIL_TIMESTAMPS 1
+_ACEOF
+
+fi
if test $enable_ipv6 = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -8219,6 +8289,13 @@ echo "$as_me: error: conditional \"WITH_GMAIL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${WITH_GMAIL_TIMESTAMPS_TRUE}" && test -z "${WITH_GMAIL_TIMESTAMPS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"WITH_GMAIL_TIMESTAMPS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_GMAIL_TIMESTAMPS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${WITH_MIME_TRUE}" && test -z "${WITH_MIME_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"WITH_MIME\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -8504,7 +8581,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by mail-notification $as_me 1.0, which was
+This file was extended by mail-notification $as_me 1.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8567,7 +8644,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-mail-notification config.status 1.0
+mail-notification config.status 1.1
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -8877,14 +8954,18 @@ s,@ORBIT_IDL@,$ORBIT_IDL,;t t
s,@LIBBONOBO_IDL@,$LIBBONOBO_IDL,;t t
s,@BONOBO_ACTIVATION_IDL@,$BONOBO_ACTIVATION_IDL,;t t
s,@GOB2@,$GOB2,;t t
+s,@GLIB_GENMARSHAL@,$GLIB_GENMARSHAL,;t t
+s,@GMIME_CFLAGS@,$GMIME_CFLAGS,;t t
+s,@GMIME_LIBS@,$GMIME_LIBS,;t t
s,@OPENSSL_CFLAGS@,$OPENSSL_CFLAGS,;t t
s,@OPENSSL_LIBS@,$OPENSSL_LIBS,;t t
s,@SASL_CFLAGS@,$SASL_CFLAGS,;t t
s,@SASL_LIBS@,$SASL_LIBS,;t t
s,@SOUP_CFLAGS@,$SOUP_CFLAGS,;t t
s,@SOUP_LIBS@,$SOUP_LIBS,;t t
-s,@GMIME_CFLAGS@,$GMIME_CFLAGS,;t t
-s,@GMIME_LIBS@,$GMIME_LIBS,;t t
+s,@ICU_CONFIG@,$ICU_CONFIG,;t t
+s,@ICU_CFLAGS@,$ICU_CFLAGS,;t t
+s,@ICU_LIBS@,$ICU_LIBS,;t t
s,@WITH_MBOX_TRUE@,$WITH_MBOX_TRUE,;t t
s,@WITH_MBOX_FALSE@,$WITH_MBOX_FALSE,;t t
s,@WITH_MH_TRUE@,$WITH_MH_TRUE,;t t
@@ -8907,6 +8988,8 @@ s,@WITH_SYLPHEED_TRUE@,$WITH_SYLPHEED_TRUE,;t t
s,@WITH_SYLPHEED_FALSE@,$WITH_SYLPHEED_FALSE,;t t
s,@WITH_GMAIL_TRUE@,$WITH_GMAIL_TRUE,;t t
s,@WITH_GMAIL_FALSE@,$WITH_GMAIL_FALSE,;t t
+s,@WITH_GMAIL_TIMESTAMPS_TRUE@,$WITH_GMAIL_TIMESTAMPS_TRUE,;t t
+s,@WITH_GMAIL_TIMESTAMPS_FALSE@,$WITH_GMAIL_TIMESTAMPS_FALSE,;t t
s,@WITH_MIME_TRUE@,$WITH_MIME_TRUE,;t t
s,@WITH_MIME_FALSE@,$WITH_MIME_FALSE,;t t
s,@WITH_REGRESSION_TESTS_TRUE@,$WITH_REGRESSION_TESTS_TRUE,;t t
@@ -9680,27 +9763,27 @@ $PACKAGE $VERSION is ready to be built.
The following settings will be used:
Installation prefixes
- --prefix $prefix
- --exec-prefix $exec_prefix
+ --prefix $prefix
+ --exec-prefix $exec_prefix
Installation directories
- --bindir $bindir
- --datadir $datadir
- --sysconfdir $sysconfdir
- --libdir $libdir
+ --bindir $bindir
+ --datadir $datadir
+ --sysconfdir $sysconfdir
+ --libdir $libdir
Features
- --enable-mbox $enable_mbox $disable_mbox_reason
- --enable-mh $enable_mh $disable_mh_reason
- --enable-maildir $enable_maildir $disable_maildir_reason
- --enable-pop3 $enable_pop3 $disable_pop3_reason
- --enable-imap $enable_imap $disable_imap_reason
- --enable-ssl $enable_ssl $disable_ssl_reason
- --enable-sasl $enable_sasl $disable_sasl_reason
- --enable-sylpheed $enable_sylpheed $disable_sylpheed_reason
- --enable-gmail $enable_gmail $disable_gmail_reason
- --enable-ipv6 $enable_ipv6 $disable_ipv6_reason
- --enable-mime $enable_mime $disable_mime_reason
+ --enable-mbox $enable_mbox $disable_mbox_reason
+ --enable-mh $enable_mh $disable_mh_reason
+ --enable-maildir $enable_maildir $disable_maildir_reason
+ --enable-pop3 $enable_pop3 $disable_pop3_reason
+ --enable-imap $enable_imap $disable_imap_reason
+ --enable-ssl $enable_ssl $disable_ssl_reason
+ --enable-sasl $enable_sasl $disable_sasl_reason
+ --enable-sylpheed $enable_sylpheed $disable_sylpheed_reason
+ --enable-gmail $enable_gmail $disable_gmail_reason
+ --enable-gmail-timestamps $enable_gmail_timestamps $disable_gmail_timestamps_reason
+ --enable-ipv6 $enable_ipv6 $disable_ipv6_reason
Type "make" to build $PACKAGE $VERSION.
EOF
diff --git a/configure.ac b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(mail-notification, 1.0, jylefort@brutele.be)
+AC_INIT(mail-notification, 1.1, jylefort@brutele.be)
AC_CONFIG_SRCDIR(src/mn-main.c)
AC_PREREQ(2.59)
@@ -14,8 +14,8 @@ MN_ARG_ENABLE(ssl, [disable SSL/TLS support])
MN_ARG_ENABLE(sasl, [disable SASL authentication support])
MN_ARG_ENABLE(sylpheed, [disable Sylpheed support])
MN_ARG_ENABLE(gmail, [disable Gmail support])
+MN_ARG_ENABLE(gmail-timestamps, [disable Gmail timestamps support])
MN_ARG_ENABLE(ipv6, [disable IPv6 support])
-MN_ARG_ENABLE(mime, [disable MIME support])
MN_ARG_COMPILE_WARNINGS
MN_ARG_ENABLE(regression-tests, [build and run regression tests], no)
@@ -48,12 +48,6 @@ if test $ac_cv_header_stdc != yes; then
AC_MSG_ERROR([ANSI C headers not present])
fi
-# timegm() is non-standard, define HAVE_TIMEGM if it is present
-AC_CHECK_FUNCS(timegm)
-
-# see if "struct tm" is defined in sys/time.h
-AC_STRUCT_TM
-
### mandatory libraries and programs
AM_PATH_GTK_2_0(2.4.0,, [AC_MSG_ERROR([unable to find the GTK+ library])])
@@ -77,9 +71,40 @@ AC_SUBST(BONOBO_ACTIVATION_IDL)
### optional libraries
-# not needed by end-users, as files generated by GOB are distributed
+# not needed by end-users, as generated files are distributed
AC_PATH_PROG(GOB2, gob2)
-
+AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
+
+MN_FEATURE_VAR_NAME(mime)=no
+if MN_FEATURE_ENABLED(mbox) ||
+ MN_FEATURE_ENABLED(mh) ||
+ MN_FEATURE_ENABLED(maildir) ||
+ MN_FEATURE_ENABLED(pop3) ||
+ MN_FEATURE_ENABLED(imap) ||
+ MN_FEATURE_ENABLED(sylpheed); then
+ PKG_CHECK_MODULES(GMIME, [gmime-2.0 >= 2.1.0], [MN_FEATURE_VAR_NAME(mime)=yes], [:])
+ if MN_FEATURE_DISABLED(mime); then
+ if MN_FEATURE_ENABLED(mbox); then
+ MN_FEATURE_DISABLE(mbox, [GMime not found])
+ fi
+ if MN_FEATURE_ENABLED(mh); then
+ MN_FEATURE_DISABLE(mh, [GMime not found])
+ fi
+ if MN_FEATURE_ENABLED(maildir); then
+ MN_FEATURE_DISABLE(maildir, [GMime not found])
+ fi
+ if MN_FEATURE_ENABLED(pop3); then
+ MN_FEATURE_DISABLE(pop3, [GMime not found])
+ fi
+ if MN_FEATURE_ENABLED(imap); then
+ MN_FEATURE_DISABLE(imap, [GMime not found])
+ fi
+ if MN_FEATURE_ENABLED(sylpheed); then
+ MN_FEATURE_DISABLE(sylpheed, [GMime not found])
+ fi
+ fi
+fi
+
if MN_FEATURE_DISABLED(pop3) && MN_FEATURE_DISABLED(imap); then
if MN_FEATURE_ENABLED(ssl); then
MN_FEATURE_DISABLE(ssl, [POP3 and IMAP support disabled])
@@ -102,19 +127,12 @@ fi
if MN_FEATURE_ENABLED(gmail); then
PKG_CHECK_MODULES(SOUP, libsoup-2.2,, [MN_FEATURE_DISABLE(gmail, [libsoup not found])])
fi
-
-if MN_FEATURE_ENABLED(mime) &&
- MN_FEATURE_DISABLED(mbox) &&
- MN_FEATURE_DISABLED(mh) &&
- MN_FEATURE_DISABLED(maildir) &&
- MN_FEATURE_DISABLED(pop3) &&
- MN_FEATURE_DISABLED(imap) &&
- MN_FEATURE_DISABLED(sylpheed); then
- MN_FEATURE_DISABLE(mime, [mbox, MH, Maildir, POP3, IMAP and Sylpheed support disabled])
-fi
-
-if MN_FEATURE_ENABLED(mime); then
- PKG_CHECK_MODULES(GMIME, [gmime-2.0 >= 2.1.0],, [MN_FEATURE_DISABLE(mime, [GMime not found])])
+if MN_FEATURE_ENABLED(gmail-timestamps); then
+ if MN_FEATURE_ENABLED(gmail); then
+ AM_PATH_ICU(2.6,, [MN_FEATURE_DISABLE(gmail-timestamps, [ICU not found])])
+ else
+ MN_FEATURE_DISABLE(gmail-timestamps, [Gmail support disabled])
+ fi
fi
### Automake conditionals
@@ -130,12 +148,13 @@ AM_CONDITIONAL(WITH_SSL, [MN_FEATURE_ENABLED(ssl)])
AM_CONDITIONAL(WITH_SASL, [MN_FEATURE_ENABLED(sasl)])
AM_CONDITIONAL(WITH_SYLPHEED, [MN_FEATURE_ENABLED(sylpheed)])
AM_CONDITIONAL(WITH_GMAIL, [MN_FEATURE_ENABLED(gmail)])
+AM_CONDITIONAL(WITH_GMAIL_TIMESTAMPS, [MN_FEATURE_ENABLED(gmail-timestamps)])
AM_CONDITIONAL(WITH_MIME, [MN_FEATURE_ENABLED(mime)])
AM_CONDITIONAL(WITH_REGRESSION_TESTS, [MN_FEATURE_ENABLED(regression-tests)])
### config.h definitions
-MN_FEATURES_DEFINE([mbox, mh, maildir, pop3, imap, ssl, sasl, sylpheed, gmail, ipv6, mime])
+MN_FEATURES_DEFINE([mbox, mh, maildir, pop3, imap, ssl, sasl, sylpheed, gmail, gmail-timestamps, ipv6, mime])
### output
@@ -163,6 +182,6 @@ MN_REPORT_ARGS([prefix, exec-prefix])
Installation directories
MN_REPORT_ARGS([bindir, datadir, sysconfdir, libdir])
Features
-MN_REPORT_FEATURES([mbox, mh, maildir, pop3, imap, ssl, sasl, sylpheed, gmail, ipv6, mime])
+MN_REPORT_FEATURES([mbox, mh, maildir, pop3, imap, ssl, sasl, sylpheed, gmail, gmail-timestamps, ipv6])
Type "make" to build $PACKAGE $VERSION.
EOF
diff --git a/data/Makefile.in b/data/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -37,9 +37,9 @@ POST_UNINSTALL = :
subdir = data
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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
@@ -95,6 +95,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -105,6 +106,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -171,6 +175,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
diff --git a/data/mail-notification-properties.desktop.in b/data/mail-notification-properties.desktop.in
@@ -8,3 +8,4 @@ Categories=GNOME;Application;Settings;
Exec=mail-notification --display-properties
Terminal=false
StartupNotify=true
+X-GNOME-DocPath=mail-notification/mail-notification.xml
+\ No newline at end of file
diff --git a/data/mail-notification.desktop.in b/data/mail-notification.desktop.in
@@ -5,5 +5,7 @@ Icon=mail-notification.png
_Comment=Get notified when new mail arrives
Type=Application
Categories=GNOME;Application;Network;
-Exec=mail-notification
+Exec=mail-notification --display-main-window
Terminal=false
+StartupNotify=true
+X-GNOME-DocPath=mail-notification/mail-notification.xml
+\ No newline at end of file
diff --git a/data/mail-notification.schemas.in b/data/mail-notification.schemas.in
@@ -120,38 +120,93 @@
</locale>
</schema>
<schema>
- <key>/schemas/apps/mail-notification/ui/summary-dialog/height</key>
- <applyto>/apps/mail-notification/ui/summary-dialog/height</applyto>
+ <key>/schemas/apps/mail-notification/ui/immediate-notification-error-dialog/do-not-show</key>
+ <applyto>/apps/mail-notification/ui/immediate-notification-error-dialog/do-not-show</applyto>
+ <owner>mail-notification</owner>
+ <type>bool</type>
+ <default>0</default>
+ <locale name="C">
+ <short>Do not show the immediate notification error dialog</short>
+ <long>Whether to prevent the immediate notification error dialog from being displayed or not.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/ui/main-window/dimensions/height</key>
+ <applyto>/apps/mail-notification/ui/main-window/dimensions/height</applyto>
<owner>mail-notification</owner>
<type>int</type>
- <default>-1</default>
+ <default>300</default>
<locale name="C">
- <short>Height of mail summary dialog</short>
- <long>The height of the mail summary dialog in pixels.</long>
+ <short>Height of main window</short>
+ <long>The height of the main window in pixels.</long>
</locale>
</schema>
<schema>
- <key>/schemas/apps/mail-notification/ui/summary-dialog/width</key>
- <applyto>/apps/mail-notification/ui/summary-dialog/width</applyto>
+ <key>/schemas/apps/mail-notification/ui/main-window/dimensions/width</key>
+ <applyto>/apps/mail-notification/ui/main-window/dimensions/width</applyto>
<owner>mail-notification</owner>
<type>int</type>
- <default>-1</default>
+ <default>400</default>
<locale name="C">
- <short>Width of mail summary dialog</short>
- <long>The width of the mail summary dialog in pixels.</long>
+ <short>Width of main window</short>
+ <long>The width of the main window in pixels.</long>
</locale>
</schema>
<schema>
- <key>/schemas/apps/mail-notification/ui/immediate-notification-error-dialog/do-not-show</key>
- <applyto>/apps/mail-notification/ui/immediate-notification-error-dialog/do-not-show</applyto>
+ <key>/schemas/apps/mail-notification/ui/main-window/view-toolbars</key>
+ <applyto>/apps/mail-notification/ui/main-window/view-toolbars</applyto>
<owner>mail-notification</owner>
<type>bool</type>
- <default>0</default>
+ <default>1</default>
<locale name="C">
- <short>Do not show the immediate notification error dialog</short>
- <long>Whether to prevent the immediate notification error dialog from being displayed or not.</long>
+ <short>View toolbars</short>
+ <long>Whether the toolbars should be visible or not.</long>
</locale>
- </schema>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/ui/main-window/view-statusbar</key>
+ <applyto>/apps/mail-notification/ui/main-window/view-statusbar</applyto>
+ <owner>mail-notification</owner>
+ <type>bool</type>
+ <default>1</default>
+ <locale name="C">
+ <short>View statusbar</short>
+ <long>Whether the statusbar should be visible or not.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/ui/main-window/toolbars-style</key>
+ <applyto>/apps/mail-notification/ui/main-window/toolbars-style</applyto>
+ <owner>mail-notification</owner>
+ <type>string</type>
+ <default>desktop-default</default>
+ <locale name="C">
+ <short>Toolbars style</short>
+ <long>The style of the toolbars. Must be "desktop-default", "icons", "text", "both" or "both-horiz".</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/ui/main-window/edit-toolbars-dialog/height</key>
+ <applyto>/apps/mail-notification/ui/main-window/edit-toolbars-dialog/height</applyto>
+ <owner>mail-notification</owner>
+ <type>int</type>
+ <default>-1</default>
+ <locale name="C">
+ <short>Height of edit toolbars dialog</short>
+ <long>The height of the edit toolbars dialog in pixels.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/ui/main-window/edit-toolbars-dialog/width</key>
+ <applyto>/apps/mail-notification/ui/main-window/edit-toolbars-dialog/width</applyto>
+ <owner>mail-notification</owner>
+ <type>int</type>
+ <default>-1</default>
+ <locale name="C">
+ <short>Width of edit toolbars dialog</short>
+ <long>The width of the edit toolbars dialog in pixels.</long>
+ </locale>
+ </schema>
<schema>
<key>/schemas/apps/mail-notification/already-run</key>
<applyto>/apps/mail-notification/already-run</applyto>
@@ -285,16 +340,16 @@
</locale>
</schema>
<schema>
- <key>/schemas/apps/mail-notification/mail-summary-popup/fonts/title/enabled</key>
- <applyto>/apps/mail-notification/mail-summary-popup/fonts/title/enabled</applyto>
+ <key>/schemas/apps/mail-notification/mail-summary-popup/fonts/aspect-source</key>
+ <applyto>/apps/mail-notification/mail-summary-popup/fonts/aspect-source</applyto>
<owner>mail-notification</owner>
- <type>bool</type>
- <default>0</default>
+ <type>string</type>
+ <default>theme</default>
<locale name="C">
- <short>Use a custom font for the title of the mail summary popup</short>
- <long>Whether to use a custom font for the title of the mail summary popup or not.</long>
+ <short>Mail summary popup fonts aspect source</short>
+ <long>The aspect source of the mail summary popup fonts. Must be "theme" or "custom".</long>
</locale>
- </schema>
+ </schema>
<schema>
<key>/schemas/apps/mail-notification/mail-summary-popup/fonts/title/font</key>
<applyto>/apps/mail-notification/mail-summary-popup/fonts/title/font</applyto>
@@ -307,17 +362,6 @@
</locale>
</schema>
<schema>
- <key>/schemas/apps/mail-notification/mail-summary-popup/fonts/contents/enabled</key>
- <applyto>/apps/mail-notification/mail-summary-popup/fonts/contents/enabled</applyto>
- <owner>mail-notification</owner>
- <type>bool</type>
- <default>0</default>
- <locale name="C">
- <short>Use a custom font for the contents of the mail summary popup</short>
- <long>Whether to use a custom font for the contents of the mail summary popup or not.</long>
- </locale>
- </schema>
- <schema>
<key>/schemas/apps/mail-notification/mail-summary-popup/fonts/contents/font</key>
<applyto>/apps/mail-notification/mail-summary-popup/fonts/contents/font</applyto>
<owner>mail-notification</owner>
@@ -329,14 +373,14 @@
</locale>
</schema>
<schema>
- <key>/schemas/apps/mail-notification/double-click-action</key>
- <applyto>/apps/mail-notification/double-click-action</applyto>
+ <key>/schemas/apps/mail-notification/double-click-action-2</key>
+ <applyto>/apps/mail-notification/double-click-action-2</applyto>
<owner>mail-notification</owner>
<type>string</type>
- <default>display-mail-summary</default>
+ <default>display-main-window</default>
<locale name="C">
<short>Double-click action</short>
- <long>The action to perform when the icon is double-clicked. Must be "display-mail-summary" or "launch-mail-reader".</long>
+ <long>The action to perform when the icon is double-clicked. Must be "display-main-window", "launch-mail-reader" or "update-mail-status".</long>
</locale>
</schema>
<schema>
diff --git a/help/C/Makefile.in b/help/C/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -99,9 +99,9 @@ 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/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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
@@ -141,6 +141,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -151,6 +152,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -217,6 +221,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
diff --git a/help/C/mail-notification-C.omf b/help/C/mail-notification-C.omf
@@ -12,9 +12,9 @@
Mail Notification Manual
</title>
<date>
- 2004-11-25
+ 2005-03-06
</date>
- <version identifier="2.10" date="2004-11-25" description="Eleventh release"/>
+ <version identifier="2.11" date="2005-03-06" description="Twelfth release"/>
<subject category="GNOME|Internet"/>
<description>
Mail Notification Manual
diff --git a/help/C/mail-notification.xml b/help/C/mail-notification.xml
@@ -2,9 +2,9 @@
<!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 "1.0">
- <!ENTITY manrevision "2.10">
- <!ENTITY date "Thursday, November 25, 2004">
+ <!ENTITY appversion "1.1">
+ <!ENTITY manrevision "2.11">
+ <!ENTITY date "Sunday, March 6, 2005">
<!ENTITY project "The Mail Notification Project">
@@ -26,10 +26,10 @@
<!ENTITY gnomevfs "<link linkend="gnomevfs">GnomeVFS</link>">
]>
-<!-- $Id: mail-notification.xml,v 1.82 2004/11/25 00:35:55 jylefort Exp $ -->
+<!-- $Id: mail-notification.xml,v 1.94 2005/03/06 21:37:27 jylefort Exp $ -->
<!-- Mail Notification Manual -->
-<!-- Copyright (c) 2004 Jean-Yves Lefort -->
+<!-- Copyright (C) 2004, 2005 Jean-Yves Lefort -->
<!-- All rights reserved. -->
<!-- Redistribution and use in source (SGML DocBook) and 'compiled' -->
@@ -72,6 +72,7 @@
<copyright>
<year>2004</year>
+ <year>2005</year>
<holder>Jean-Yves Lefort</holder>
</copyright>
<!-- translators: uncomment this:
@@ -134,6 +135,17 @@
</revdescription>
</revision>
<revision>
+ <revnumber>Mail Notification Manual V2.10</revnumber>
+ <date>Thursday, November 25, 2004</date>
+ <revdescription>
+ <para role="author">
+ Jean-Yves Lefort
+ <email>jylefort@brutele.be</email>
+ </para>
+ <para role="publisher">&project;</para>
+ </revdescription>
+ </revision>
+ <revision>
<revnumber>Mail Notification Manual V2.9</revnumber>
<date>Monday, November 15, 2004</date>
<revdescription>
@@ -342,12 +354,12 @@
<varlistentry>
<term>--list-features</term>
- <listitem><para>List compiled-in features and exit</para></listitem>
+ <listitem><para>List the compiled-in features</para></listitem>
</varlistentry>
<varlistentry>
- <term>--display-mail-summary</term>
- <listitem><para>Display the mail summary dialog</para></listitem>
+ <term>--display-main-window</term>
+ <listitem><para>Display the main window</para></listitem>
</varlistentry>
<varlistentry>
@@ -386,12 +398,17 @@
<varlistentry>
<term>--unset-obsolete-configuration</term>
- <listitem><para>Unset obsolete GConf configuration and exit</para></listitem>
+ <listitem><para>Unset obsolete GConf configuration</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>--quit</term>
+ <listitem><para>Quit &app;</para></listitem>
</varlistentry>
<varlistentry>
<term>--help</term>
- <listitem><para>Show help and exit</para></listitem>
+ <listitem><para>Show help</para></listitem>
</varlistentry>
</variablelist>
</listitem>
@@ -461,6 +478,99 @@
</sect2>
</sect1>
+ <sect1 id="main-window">
+ <title>Main Window</title>
+ <para>
+ You can access the main window 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>
+ Type the following command, then press <keycap>Return</keycap>:
+ </para>
+ <para>
+ <command>mail-notification --display-main-window</command>
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Mail icon</term>
+ <listitem>
+ <para>
+ Right-click on the mail icon and choose
+ <menuchoice><guimenuitem>Main Window</guimenuitem></menuchoice>.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The main window displays the list of new and unread messages,
+ sorted by sent date in descending order.
+ </para>
+ <para>
+ The main window can also be used to invoke &app; features when
+ the mail icon is hidden.
+ </para>
+
+ <sect2 id="main-window-edit-toolbars">
+ <title>Editing the Main Window Toolbars</title>
+ <para>
+ To edit the main window toolbars, choose
+ <menuchoice>
+ <guimenu>Edit</guimenu>
+ <guimenuitem>Toolbars</guimenuitem>
+ </menuchoice>, then:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ To add or remove buttons from your toolbars, drag icons
+ from and to the editor.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ To reset the toolbars configuration to factory defaults,
+ click on the <guibutton>Use Default</guibutton> button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ To add a new toolbar, click on the <guibutton>Add a New
+ Toolbar</guibutton> button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ To remove a toolbar, remove all items from it. The toolbar
+ will then automatically be removed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Drag buttons to rearrange them either on the same toolbar
+ or between different toolbars.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </sect2>
+ </sect1>
+
<sect1 id="properties">
<title>Properties</title>
<para>To configure &app;, choose
@@ -547,10 +657,10 @@
<listitem>
<para>
You can choose an action to be performed when the mail
- icon is double-clicked: <guilabel>display the mail summary dialog</guilabel>
- or <guilabel>launch the mail reader</guilabel>.
- The latter is only available if a mail reader is
- configured in the <link linkend="commands">Commands</link> properties.
+ icon is double-clicked:
+ <guilabel>display the main window</guilabel>,
+ <guilabel>launch the mail reader</guilabel> or
+ <guilabel>update the mail status</guilabel>.
</para>
</listitem>
</varlistentry>
@@ -576,6 +686,11 @@
not support <link linkend="immediate-notification">immediate
notification</link> of changes.
</para>
+ <para>
+ If all the mailboxes support <link
+ linkend="immediate-notification">immediate
+ notification</link>, this control is disabled.
+ </para>
</note>
</para>
</listitem>
@@ -617,8 +732,8 @@
will be displayed when new mail arrives.
<note>
<para>
- The mail summary popup will not be displayed if the <link linkend="mail-summary">Mail Summary</link>
- dialog is displayed.
+ The mail summary popup will not be displayed
+ if the <link linkend="main-window">main window</link> is displayed.
</para>
</note>
</para>
@@ -691,30 +806,10 @@
<term><guilabel>Fonts</guilabel></term>
<listitem>
<para>
- You can choose to override your default desktop font and
+ You can choose to override your default theme fonts and
use custom fonts in the mail summary popup. To further
customise the appearance of &app;, see <xref linkend="modifying-appearance"/>.
</para>
- <variablelist>
- <varlistentry>
- <term><guilabel>Title font</guilabel></term>
- <listitem>
- <para>
- If this option is enabled, the title of the mail
- summary popup will use the specified font.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Contents font</guilabel></term>
- <listitem>
- <para>
- If this option is enabled, the contents of the
- mail summary popup will use the specified font.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
<note>
<para>
The specified fonts are relative to the text
@@ -959,32 +1054,6 @@
</variablelist>
</sect1>
- <sect1 id="mail-summary">
- <title>Mail Summary</title>
- <para>
- The <guilabel>Mail Summary</guilabel> dialog can be accessed by
- double-clicking on the mail icon, or by right-clicking on it and
- choosing <menuchoice><guimenuitem>Mail Summary</guimenuitem></menuchoice>.
- </para>
- <para>
- The <guilabel>Mail Summary</guilabel> dialog displays the list
- of new and unread messages, sorted by sent date in descending
- order.
- </para>
- <important>
- <para>
- To be able to extract messages from mbox, MH, Maildir, POP3,
- IMAP and Sylpheed mailboxes, &app; must have been compiled
- with MIME support.
- </para>
- <para>
- &app; has been compiled with MIME support if
- <command>mail-notification --list-features</command> lists the
- MIME feature.
- </para>
- </important>
- </sect1>
-
<sect1 id="troubleshooting">
<title>Troubleshooting</title>
<para>
@@ -1048,7 +1117,7 @@
<term>&pop3; and &gmail; mailboxes:</term>
<listitem>
<para>
- Immediate notification is not supported.
+ Immediate notification is not supported by these mailbox types.
</para>
</listitem>
</varlistentry>
@@ -1163,23 +1232,15 @@ endif</programlisting>
<entry>mn-mail-summary-popup-title</entry>
</row>
<row>
- <entry>message box</entry>
- <entry>mn-message-box</entry>
- </row>
- <row>
- <entry>message header name</entry>
- <entry>name</entry>
- </row>
- <row>
- <entry>message header value</entry>
- <entry>value</entry>
+ <entry>message list</entry>
+ <entry>mn-message-view</entry>
</row>
<row>
<entry>tooltip section title</entry>
<entry>mn-tooltip-section-title</entry>
</row>
<row>
- <entry>tooltip section body</entry>
+ <entry>tooltip section body (except message list)</entry>
<entry>mn-tooltip-section-body</entry>
</row>
</tbody>
@@ -1227,6 +1288,18 @@ endif</programlisting>
<entry>mail summary</entry>
<entry>mn-mail-summary</entry>
</row>
+ <row>
+ <entry>mail reader</entry>
+ <entry>mn-mail-reader</entry>
+ </row>
+ <row>
+ <entry>main window</entry>
+ <entry>mn-main-window</entry>
+ </row>
+ <row>
+ <entry>leave fullscreen</entry>
+ <entry>mn-leave-fullscreen</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -1260,7 +1333,7 @@ widget "*.mn-mail-summary-popup-title"
font_name = "Sans 8"
}
-widget "mn-mail-summary-popup.*.mn-message-box.*"
+widget "mn-mail-summary-popup.*.mn-message-view"
style "mn-mail-summary-popup-messages"</programlisting>
<para>
To use a small font for the mail summary tooltip messages:
@@ -1270,19 +1343,9 @@ widget "mn-mail-summary-popup.*.mn-message-box.*"
font_name = "Sans 8"
}
-widget "gtk-tooltips.*.mn-message-box.*"
+widget "gtk-tooltips.*.mn-message-view"
style "mn-mail-summary-tooltip-messages"</programlisting>
<para>
- To use italic for the message header names:
- </para>
- <programlisting>style "mn-message-header-name"
-{
- font_name = "Italic"
-}
-
-widget "*.mn-message-box.*.name"
- style "mn-message-header-name"</programlisting>
- <para>
To use some custom icons:
</para>
<programlisting>pixmap_path "/home/myaccount/icons"
@@ -1308,7 +1371,7 @@ widget "*" style "mn-icons"</programlisting>
<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
+ &app;, visit the
<ulink url="http://www.nongnu.org/mailnotify" type="http">Mail Notification web page</ulink>.
</para>
@@ -1330,6 +1393,7 @@ widget "*" style "mn-icons"</programlisting>
<listitem><para>Dan Korostelev</para></listitem>
<listitem><para>Filip Miletic</para></listitem>
<listitem><para>Phil Nelson</para></listitem>
+ <listitem><para>Maurycy Pawłowski-Wieroński</para></listitem>
<listitem><para>Vladimir Petkov</para></listitem>
<listitem><para>Tomasz Sarota-Raczek</para></listitem>
<listitem><para>Edwin Shin</para></listitem>
diff --git a/help/Makefile.in b/help/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -36,9 +36,9 @@ 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/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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
@@ -87,6 +87,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -97,6 +98,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -163,6 +167,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
diff --git a/m4/Makefile.in b/m4/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -36,9 +36,9 @@ 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/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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
@@ -78,6 +78,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -88,6 +89,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -154,6 +158,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
diff --git a/m4/icu.m4 b/m4/icu.m4
@@ -0,0 +1,67 @@
+# This file is part of Mail Notification.
+#
+# Copyright (C) 2005 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.
+
+dnl AM_PATH_ICU([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl
+AC_DEFUN([AM_PATH_ICU],
+[AC_PATH_PROG(ICU_CONFIG, icu-config, no)
+
+if test "x$ICU_CONFIG" = xno; then
+ ICU_CFLAGS=""
+ ICU_LIBS=""
+
+ ifelse([$3],, :, [$3])
+else
+ ICU_CFLAGS=`$ICU_CONFIG --cppflags`
+ ICU_LIBS=`$ICU_CONFIG --ldflags`
+
+ # the version checking API we need has been introduced in 2.4
+ icu_min_version=ifelse([$1],, 2.4, [$1])
+
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $ICU_CFLAGS"
+ LIBS="$LIBS $ICU_LIBS"
+
+ AC_MSG_CHECKING([for ICU - version >= $icu_min_version])
+
+ AC_RUN_IFELSE([
+#include <string.h>
+#include <unicode/uversion.h>
+
+int main() {
+ UVersionInfo min_version;
+ UVersionInfo version;
+
+ u_versionFromString(min_version, "$icu_min_version");
+ u_getVersion(version);
+
+ if (memcmp(min_version, version, U_MAX_VERSION_LENGTH) > 0)
+ exit(1); /* version too old */
+
+ exit(0);
+}
+], [found=yes], [found=no], [found=yes])
+
+ AC_MSG_RESULT($found)
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+
+ if test $found = yes; then
+ ifelse([$2],, :, [$2])
+ else
+ ICU_CFLAGS=""
+ ICU_LIBS=""
+
+ ifelse([$3],, :, [$3])
+ fi
+fi
+
+AC_SUBST(ICU_CFLAGS)
+AC_SUBST(ICU_LIBS)])
diff --git a/m4/openssl.m4 b/m4/openssl.m4
@@ -1,8 +1,6 @@
-# $Id: openssl.m4,v 1.1 2004/08/04 22:54:08 jylefort Exp $
-#
# This file is part of Mail Notification.
#
-# Copyright (c) 2004 Jean-Yves Lefort.
+# Copyright (C) 2004 Jean-Yves Lefort.
#
# As a special exception to the Mail Notification licensing terms,
# Jean-Yves Lefort gives unlimited permission to copy, distribute and
diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
@@ -1,8 +1,6 @@
-# $Id: sasl2.m4,v 1.2 2004/08/04 22:54:08 jylefort Exp $
-#
# This file is part of Mail Notification.
#
-# Copyright (c) 2004 Jean-Yves Lefort.
+# Copyright (C) 2004 Jean-Yves Lefort.
#
# As a special exception to the Mail Notification licensing terms,
# Jean-Yves Lefort gives unlimited permission to copy, distribute and
diff --git a/po/POTFILES.in b/po/POTFILES.in
@@ -5,6 +5,12 @@ data/mail-notification.desktop.in
data/mail-notification.schemas.in
data/mail-notification.soundlist.in
src/MNAutomation.idl
+src/egg-editable-toolbar.c
+src/egg-editable-toolbar.h
+src/egg-toolbar-editor.c
+src/egg-toolbar-editor.h
+src/egg-toolbars-model.c
+src/egg-toolbars-model.h
src/eggtrayicon.c
src/eggtrayicon.h
src/mn-about-dialog.gob
@@ -20,6 +26,8 @@ src/mn-conf.h
src/mn-gmail-mailbox-properties.gob
src/mn-gmail-mailbox.gob
src/mn-gmime-stream-vfs.gob
+src/mn-icu.c
+src/mn-icu.h
src/mn-imap-mailbox-properties.gob
src/mn-imap-mailbox.gob
src/mn-mail-icon.gob
@@ -33,21 +41,23 @@ src/mn-mailbox-view.gob
src/mn-mailbox.gob
src/mn-mailboxes.gob
src/mn-maildir-mailbox.gob
+src/mn-main-window.c
+src/mn-main-window.h
src/mn-main.c
src/mn-mbox-mailbox.gob
src/mn-md5.c
src/mn-md5.h
-src/mn-message-box.gob
src/mn-message-mime.c
src/mn-message-mime.h
+src/mn-message-view.gob
src/mn-message.gob
src/mn-mh-mailbox.gob
src/mn-pending-mailbox.gob
src/mn-pi-mailbox-properties.gob
src/mn-pop3-mailbox-properties.gob
src/mn-pop3-mailbox.gob
-src/mn-properties.c
-src/mn-properties.h
+src/mn-properties-dialog.c
+src/mn-properties-dialog.h
src/mn-sasl.c
src/mn-sasl.h
src/mn-sgml-ref.c
@@ -59,12 +69,8 @@ src/mn-ssl.c
src/mn-ssl.h
src/mn-stock.c
src/mn-stock.h
-src/mn-summary-dialog.c
-src/mn-summary-dialog.h
src/mn-summary-popup.c
src/mn-summary-popup.h
-src/mn-summary.c
-src/mn-summary.h
src/mn-sylpheed-mailbox.gob
src/mn-system-mailbox-properties.gob
src/mn-tooltips.gob
@@ -75,8 +81,9 @@ src/mn-util.h
src/mn-vfs.c
src/mn-vfs.h
ui/authentication.glade
+ui/edit-toolbars.glade
ui/mailbox-properties.glade
+ui/main.glade
ui/properties.glade
-ui/summary-dialog.glade
ui/summary-popup.glade
ui/welcome.glade
diff --git a/po/bg.gmo b/po/bg.gmo
Binary files differ.
diff --git a/po/bg.po b/po/bg.po
@@ -1,5 +1,5 @@
# Bulgarian translations for mail-notification.
-# Copyright (c) 2003, 2004 Jean-Yves Lefort.
+# Copyright (C) 2003, 2004 Jean-Yves Lefort.
#
# This file is distributed under the same license as the
# mail-notification package.
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome in bulgarian 0.6.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\n"
"PO-Revision-Date: 2004-10-05 16:13+0200\n"
"Last-Translator: Vladimir \"Kaladan\" Petkov <vpetkov@i-space.org>\n"
"Language-Team: Bulgarian <bg@li.org>\n"
@@ -27,14 +27,14 @@ msgstr "Автоматизиране на известяването за пощ
msgid "Mail Notification automation factory"
msgstr "Фабрика за автоматизирането на известяването за поща"
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
msgid "Configure Mail Notification"
msgstr "Настройване на известяването за поща"
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
msgstr "Известяване за поща"
@@ -85,259 +85,294 @@ msgstr "Вече е стартиран"
#: data/mail-notification.schemas.in.h:11
#, fuzzy
-msgid "Height of mail summary dialog"
+msgid "Height of edit toolbars dialog"
msgstr "Височина на диалоговия прозорец за настройките"
#: data/mail-notification.schemas.in.h:12
+msgid "Height of main window"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:13
msgid "Height of properties dialog"
msgstr "Височина на диалоговия прозорец за настройките"
-#: data/mail-notification.schemas.in.h:13
+#: data/mail-notification.schemas.in.h:14
#, fuzzy
msgid "Mail read command"
msgstr "Нова команда за поща"
-#: data/mail-notification.schemas.in.h:14
+#: data/mail-notification.schemas.in.h:15
#, fuzzy
msgid "Mail reader command"
msgstr "Нова команда за поща"
-#: data/mail-notification.schemas.in.h:15
+#: data/mail-notification.schemas.in.h:16
msgid "Mail summary popup contents font"
msgstr ""
-#: data/mail-notification.schemas.in.h:16
+#: data/mail-notification.schemas.in.h:17
+msgid "Mail summary popup fonts aspect source"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:18
msgid "Mail summary popup horizontal offset"
msgstr ""
-#: data/mail-notification.schemas.in.h:17
+#: data/mail-notification.schemas.in.h:19
msgid "Mail summary popup position"
msgstr ""
-#: data/mail-notification.schemas.in.h:18
+#: data/mail-notification.schemas.in.h:20
msgid "Mail summary popup title font"
msgstr ""
-#: data/mail-notification.schemas.in.h:19
+#: data/mail-notification.schemas.in.h:21
msgid "Mail summary popup vertical offset"
msgstr ""
-#: data/mail-notification.schemas.in.h:20
+#: data/mail-notification.schemas.in.h:22
#, fuzzy
msgid "Mailbox list"
msgstr "Списък на пощенските кутии"
-#: data/mail-notification.schemas.in.h:21
+#: data/mail-notification.schemas.in.h:23
msgid "Minutes between mail checks"
msgstr "Минути между проверките"
-#: data/mail-notification.schemas.in.h:22
+#: data/mail-notification.schemas.in.h:24
msgid "Minutes to wait before closing the mail summary popup"
msgstr ""
-#: data/mail-notification.schemas.in.h:23
+#: data/mail-notification.schemas.in.h:25
msgid "New mail command"
msgstr "Нова команда за поща"
-#: data/mail-notification.schemas.in.h:24
+#: data/mail-notification.schemas.in.h:26
msgid "Only display recent mail in mail summary popup"
msgstr ""
-#: data/mail-notification.schemas.in.h:25
+#: data/mail-notification.schemas.in.h:27
#, fuzzy
msgid "Run a command when all mail is read"
msgstr "Стартиране на команда при пристигането на нова поща"
-#: data/mail-notification.schemas.in.h:26
+#: data/mail-notification.schemas.in.h:28
msgid "Run a command when new mail arrives"
msgstr "Стартиране на команда при пристигането на нова поща"
-#: data/mail-notification.schemas.in.h:27
+#: data/mail-notification.schemas.in.h:29
msgid "Seconds between mail checks"
msgstr "Секунди между проверките за поща"
-#: data/mail-notification.schemas.in.h:28
+#: data/mail-notification.schemas.in.h:30
msgid "Seconds to wait before closing the mail summary popup"
msgstr ""
-#: data/mail-notification.schemas.in.h:29
+#: data/mail-notification.schemas.in.h:31
#, fuzzy
msgid "Set a mail reader"
msgstr "Избор на файл или папка"
-#: data/mail-notification.schemas.in.h:30
+#: data/mail-notification.schemas.in.h:32
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
#, fuzzy
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
msgstr "Времевият интервал за изчакване между проверките за нова поща"
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
#, fuzzy
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
msgstr "Времевият интервал за изчакване между проверките за нова поща"
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:36
#, fuzzy
msgid "The command to run to launch the mail reader."
msgstr "Командата, която да се стартира при пристигането на нова поща."
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
#, fuzzy
msgid "The command to run when all mail is read."
msgstr "Командата, която да се стартира при пристигането на нова поща."
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
msgid "The command to run when new mail arrives."
msgstr "Командата, която да се стартира при пристигането на нова поща."
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:38
+#: data/mail-notification.schemas.in.h:41
#, fuzzy
-msgid "The height of the mail summary dialog in pixels."
+msgid "The height of the edit toolbars dialog in pixels."
msgstr "Височината в пиксели на диалоговия прозорец за настройките."
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+#, fuzzy
+msgid "The height of the main window in pixels."
+msgstr "Височината в пиксели на диалоговия прозорец за настройките."
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr "Височината в пиксели на диалоговия прозорец за настройките."
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr "Списъкът на пощенските кутии за следене."
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
msgstr ""
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr ""
"Списъкът на проверените сертификати тип X509, представени от техните "
"пръстови отпечатъци в MD5 формат."
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
msgstr ""
-#: data/mail-notification.schemas.in.h:46
+#: data/mail-notification.schemas.in.h:50
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:51
#, fuzzy
-msgid "The width of the mail summary dialog in pixels."
+msgid "The width of the edit toolbars dialog in pixels."
msgstr "Ширината на диалоговия прозорец за настройките в пиксели."
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:52
+#, fuzzy
+msgid "The width of the main window in pixels."
+msgstr "Ширината на диалоговия прозорец за настройките в пиксели."
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr "Ширината на диалоговия прозорец за настройките в пиксели."
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr "Списък на проверените сървъри"
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
msgstr ""
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
msgstr ""
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
msgstr "Дали известяването за поща вече е стартирано или не."
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
msgstr "Дали иконата за състоянието да мига при грешки или не"
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+#, fuzzy
+msgid "Whether the statusbar should be visible or not."
+msgstr "Дали иконата за състоянието да мига при грешки или не"
+
+#: data/mail-notification.schemas.in.h:61
+#, fuzzy
+msgid "Whether the toolbars should be visible or not."
+msgstr "Дали иконата за състоянието да мига при грешки или не"
+
+#: data/mail-notification.schemas.in.h:62
#, fuzzy
msgid "Whether to automatically close the mail summary popup or not."
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
#, fuzzy
msgid "Whether to display the mail summary popup when new mail arrives or not."
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
#, fuzzy
msgid "Whether to run a command when all mail is read or not."
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
msgid "Whether to run a command when new mail arrives or not."
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
#, fuzzy
msgid "Whether to set a mail reader or not."
msgstr "Дали известяването за поща вече е стартирано или не."
-#: data/mail-notification.schemas.in.h:61
-#, fuzzy
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
-msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-
-#: data/mail-notification.schemas.in.h:62
-#, fuzzy
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
-msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-
-#: data/mail-notification.schemas.in.h:63
+#: data/mail-notification.schemas.in.h:70
#, fuzzy
-msgid "Width of mail summary dialog"
+msgid "Width of edit toolbars dialog"
msgstr "Ширина на диалоговия прозорец за настройките"
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:71
+msgid "Width of main window"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr "Ширина на диалоговия прозорец за настройките"
@@ -345,6 +380,20 @@ msgstr "Ширина на диалоговия прозорец за настр
msgid "New Mail"
msgstr "Нова поща"
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr ""
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr ""
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr "Ориентация"
@@ -353,20 +402,20 @@ msgstr "Ориентация"
msgid "The orientation of the tray."
msgstr ""
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr "Уведомяване за поща"
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr "Vladimir Petkov <vpetkov@i-space.org>"
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
msgstr "<span style=\"italic\">автоматично засичане</span>"
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -375,12 +424,12 @@ msgid ""
"Please re-enter your password."
msgstr ""
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr ""
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -389,11 +438,11 @@ msgid ""
"%s"
msgstr ""
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr "_Местоположение:"
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr "_Разглеждане..."
@@ -401,7 +450,7 @@ msgstr "_Разглеждане..."
msgid "The URI of the mailbox"
msgstr "Адресът на пощенската кутия"
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr "Избор на файл или папка"
@@ -531,156 +580,190 @@ msgstr "неуспех при четенето от сървър: EOF"
msgid "unable to decode data using SASL: %s"
msgstr ""
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr ""
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr "неуспех при записването на сървър: %s"
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr "неуспех при записването на сървър: EOF"
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr ""
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr ""
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr ""
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr ""
-#: src/mn-client-session.c:974
-#, c-format
-msgid "warning: unable to set SASL security properties: %s"
-msgstr ""
+#: src/mn-client-session.c:971
+#, fuzzy, c-format
+msgid "unable to set SASL security properties: %s"
+msgstr "неуспех при записването на сървър: %s"
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr ""
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr ""
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr ""
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr ""
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr ""
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr ""
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
msgstr ""
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
msgstr ""
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr ""
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr ""
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr ""
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+#, fuzzy
+msgid "A directory creation error has occurred"
+msgstr "Получи се грешка при наблюдението"
+
+#: src/mn-conf.c:239
+#, fuzzy, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr "Неуспех при създаването на нишка: %s."
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr ""
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr "синхронизиране на базата данни на GConf"
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr "завършено"
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr "Вашето Gmail потребителско име"
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
msgstr ""
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr ""
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, fuzzy, c-format
msgid "unable to parse URI \"%s\""
msgstr "неуспех при преглед на отговор \"%s\""
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr "неуспех при пренасянето на данни: %s"
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr "влизане"
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr "влизането е неуспешно"
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr "търсене за непрочетена поща"
#: src/mn-gmail-mailbox.gob:527
+#, fuzzy
+msgid "unable to initialize the ICU library"
+msgstr "Неуспех при инициализирането на библиотеката GnomeVFS."
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr "неуспех при прегледа на данни от Gmail"
+#: src/mn-gmail-mailbox.gob:891
+#, fuzzy, c-format
+msgid "unable to open calendar: %s"
+msgstr "неуспех при отварянето на папката: %s"
+
+#: src/mn-gmail-mailbox.gob:899
+#, fuzzy, c-format
+msgid "unable to set calendar time: %s"
+msgstr "неуспех при затварянето на папката: %s"
+
+#: src/mn-gmail-mailbox.gob:968
+#, fuzzy, c-format
+msgid "unable to get calendar time: %s"
+msgstr "неуспех при пренасянето на данни: %s"
+
#: src/mn-gmime-stream-vfs.gob:49
#, fuzzy, c-format
msgid "unable to read %s: %s"
@@ -706,19 +789,19 @@ msgstr "неуспех при следенето %s: %s"
msgid "unable to close %s: %s"
msgstr "неуспех при затварянето на папката: %s"
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr "Пощенска кутия:"
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr "ку_тия"
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr "др_уги"
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr ""
@@ -749,76 +832,75 @@ msgstr "Име на пощенската кутия"
msgid "If possible, whether to use idle mode or not"
msgstr ""
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
msgstr ""
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr ""
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr ""
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr "неуспех при влизането"
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
#, fuzzy
msgid "server did not send search results"
msgstr "сървърът не изпраща състоянието"
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
#, fuzzy
msgid "server did not send all the messages we requested"
msgstr "сървърът не изпраща състоянието"
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
#, fuzzy
msgid "unable to fetch message"
msgstr "неуспех при свързването: %s"
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr "сървърът не изпраща състоянието"
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr "неизвестна грешка в сървъра"
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr ""
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
msgstr ""
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr "неизвестен механизъм за идентификация \"%s\""
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
msgstr ""
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
msgstr "неуспешна идентификация"
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
msgstr ""
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+msgid "_Mail Reader"
+msgstr ""
+
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
msgstr "_Актуализиране"
@@ -826,20 +908,20 @@ msgstr "_Актуализиране"
msgid "R_emove From Notification Area"
msgstr "Пре_махване от зоната за известяване"
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
msgstr "Добавяне на пощенска кутия"
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr "%s Настройки"
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
msgstr "_Име:"
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr "_Парола:"
@@ -879,64 +961,60 @@ msgstr "Завършено"
msgid "Whether the properties are completely filled or not"
msgstr ""
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr "Пощенска кутия"
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr "Формат"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr "Неуспех при добавянето на пощенската кутия"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr "Пощенската кутия е вече в списъка."
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr "Адресът на пощенската кутия"
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr "Името на пощенската кутия във формат разбираем от хора"
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
#, fuzzy
msgid "Whether the mailbox has to be polled or not"
msgstr "Дали изображението да мига или не"
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr ""
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr ""
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr "Грешката в пощенската кутия, ако има"
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr "не съществува"
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr "непознат формат"
-#: src/mn-mailbox.gob:407
+#: src/mn-mailbox.gob:403
#, fuzzy, c-format
-msgid "unable to enable immediate notification for %s: %s"
+msgid "unable to enable immediate notification: %s"
msgstr ""
"Известяването за поща не можа да разреши моменталното известяване за една "
"или повече пощенски кутии. %s"
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -947,7 +1025,7 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -958,7 +1036,7 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -969,11 +1047,11 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr "Получи се грешка при наблюдението"
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
@@ -982,125 +1060,292 @@ msgstr ""
"Известяването за поща не можа да разреши моменталното известяване за една "
"или повече пощенски кутии. %s"
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr ""
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
msgstr "%s е неподдържан: %s"
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has new mail"
-msgstr "%s има поща"
-
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has no new mail"
-msgstr "%s няма нова поща"
+#: src/mn-mailboxes.gob:290
+#, fuzzy, c-format
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] "%s има поща"
+msgstr[1] "%s има поща"
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr "%s докладва за грешка: %s"
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr "неуспех при отварянето на папка \"нови\": %s"
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr "неуспех при отварянето на папка \"нови\": %s"
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr "грешка при четенето на папката \"нови\": %s"
+#. Toplevel
+#: src/mn-main-window.c:92
+#, fuzzy
+msgid "_Mail"
+msgstr "Пощенска кутия"
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr ""
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr ""
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr ""
+
+#: src/mn-main-window.c:103
+msgid "Launch the mail reader"
+msgstr ""
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr "Актуализиране състоянието на пощата"
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr ""
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr ""
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr ""
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+#, fuzzy
+msgid "Quit Mail Notification"
+msgstr "Известяване за поща"
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr ""
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr ""
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr ""
+
+#: src/mn-main-window.c:163
+msgid "_Contents"
+msgstr ""
+
+#: src/mn-main-window.c:165
+#, fuzzy
+msgid "Display help"
+msgstr "Неуспех при показването на помощта"
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr ""
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr ""
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr ""
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr ""
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr ""
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr ""
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr ""
+
+#: src/mn-main-window.c:215
+msgid "Only display the toolbars icons"
+msgstr ""
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr ""
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr ""
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr ""
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr ""
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr ""
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr ""
+
+#: src/mn-main-window.c:363
+#, fuzzy, c-format
+msgid "unable to load menus.xml: %s"
+msgstr "грешка при отварянето на пощенската кутия: %s"
+
+#: src/mn-main-window.c:398
+msgid "Help messages"
+msgstr ""
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr ""
+
+#: src/mn-main-window.c:503
+#, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/mn-main-window.c:540
+#, fuzzy
+msgid "unable to load toolbars.xml"
+msgstr "неуспех при затварянето на папката: %s"
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr ""
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr ""
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr "Компилирани възможности: %s\n"
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr "Разрешаване на информационния изход"
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
+#: src/mn-main.c:185
+#, fuzzy
+msgid "List the compiled-in features"
msgstr "Изписване на компилираните възможности и излизане"
-#: src/mn-main.c:193
+#: src/mn-main.c:194
#, fuzzy
-msgid "Display the mail summary dialog"
+msgid "Display the main window"
msgstr "Изобразяване на диалоговия прозорец с информацията"
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr "Показване на диалоговия прозорец с настройките"
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr "Изобразяване на диалоговия прозорец с информацията"
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr ""
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr "Актуализиране състоянието на пощата"
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr "Докладване за състоянието на пощата"
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
+#: src/mn-main.c:248
+#, fuzzy
+msgid "Unset obsolete GConf configuration"
msgstr "Премахване на остарелите настройки в GConf и излизане"
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr "много-нишки не е налично"
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
msgstr ""
-#: src/mn-main.c:325
+#: src/mn-main.c:344
+#, fuzzy
+msgid "quitting Mail Notification"
+msgstr "Известяване за поща"
+
+#: src/mn-main.c:348
+#, fuzzy
+msgid "Mail Notification is not running"
+msgstr "Известяването за поща вече е стартирано"
+
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr "Неуспех при инициализирането на библиотеката GnomeVFS."
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr "актуализиране състоянието на пощата"
-#: src/mn-main.c:379
+#: src/mn-main.c:409
msgid "Mail Notification is already running"
msgstr "Известяването за поща вече е стартирано"
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
msgstr ""
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
@@ -1108,82 +1353,81 @@ msgstr ""
"Bonobo не успя да регистрира сървъра за автоматизация. Моля, проверете "
"инсталацията на известяването за поща."
-#: src/mn-mbox-mailbox.gob:221
-#, c-format
-msgid "error while reading mailbox: %s"
-msgstr "грешка при четенето на пощенската кутия: %s"
-
-#: src/mn-mbox-mailbox.gob:230
+#: src/mn-mbox-mailbox.gob:184
#, c-format
msgid "unable to open mailbox: %s"
msgstr "грешка при отварянето на пощенската кутия: %s"
-#: src/mn-message-box.gob:64
+#: src/mn-message-mime.c:105
+#, fuzzy
+msgid "unable to parse MIME message"
+msgstr "неуспех при преглед на отговор \"%s\""
+
+#: src/mn-message-view.gob:81
+msgid "You have no new mail."
+msgstr "Нямата нова поща."
+
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr ""
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr ""
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr ""
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr ""
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr ""
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:196
+#: src/mn-message.gob:130
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:201
+#: src/mn-message.gob:135
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:206
+#: src/mn-message.gob:140
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:211
+#: src/mn-message.gob:145
#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-mime.c:105
-#, fuzzy
-msgid "unable to parse MIME message"
-msgstr "неуспех при преглед на отговор \"%s\""
-
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr ""
-
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr "грешка при четенето на .mh_sequences: %s"
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr "неуспех при отварянето на .mh_sequences: %s"
@@ -1192,23 +1436,23 @@ msgstr "неуспех при отварянето на .mh_sequences: %s"
msgid "detecting"
msgstr "засичане"
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
msgstr "_Хост:"
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr "_Подробности"
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
msgstr "стан_дартно"
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
msgstr "_in-band SSL/TLS"
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr "SSL/TLS на отделен по_рт"
@@ -1230,80 +1474,80 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr "Номера на порта на POP3 сървъра"
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr ""
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
#, fuzzy
msgid "unknown error"
msgstr "неизвестна грешка в сървъра"
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr "Сървърът не поддържа идентификация тип APOP"
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr ""
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr ""
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
#, fuzzy
msgid "top left"
msgstr "Завършено"
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
msgstr ""
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
msgstr ""
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
msgstr ""
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
msgstr "Няма избрана кутия."
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, fuzzy, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
msgstr[0] "%i избрана кутия."
msgstr[1] "%i избрана кутия."
-#: src/mn-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
msgstr "Имате поща."
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
msgstr ""
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr ""
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
#, fuzzy
msgid "Unsupported Mailboxes"
msgstr "Системна кутия"
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
msgstr ""
@@ -1321,20 +1565,20 @@ msgid "Select _All"
msgstr "Избор на _всички"
#: src/mn-stock.c:29
-msgid "_Mail Summary"
+msgid "Leave Fullscreen"
msgstr ""
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr "неуспех при отварянето на папката: %s"
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr "неуспех при затварянето на папката: %s"
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr "грешка при четенето на папката: %s"
@@ -1366,105 +1610,114 @@ msgstr "Причината защо пощенската кутия е непо
msgid "unsupported"
msgstr "не е поддържан"
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr "грешка при зареждането на изображение: %s"
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, fuzzy, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr "уиджета %s не е намерен в интерфейса %s"
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr "получен е некоректен списък с адреси"
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr "получен е некоректен Mozilla адрес"
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr "Неуспех при показването на помощта"
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr "Неуспех при създаването на нишка: %s."
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr ""
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr "Получи се сериозна грешка в известяването за поща"
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, fuzzy, c-format
msgid "unable to get current time: %s"
msgstr "неуспех при свързването с %s"
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr ""
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr "Грешка с командите се получи в известяването за поща"
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, fuzzy, c-format
msgid "Unable to execute \"%s\": %s."
msgstr "неуспех при намирането на %s: %s"
#: ui/authentication.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: ui/authentication.glade.h:2
#, fuzzy
msgid "_Authenticate"
msgstr "Механизъм за _идентификация:"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr ""
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr ""
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
+msgstr ""
+
#: ui/mailbox-properties.glade.h:1
msgid "_Mailbox type:"
msgstr "_Тип на пощенската кутия:"
#: ui/properties.glade.h:1
-msgid " "
-msgstr " "
-
-#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Commands</span>"
msgstr "<span weight=\"bold\">Команди</span>"
-#: ui/properties.glade.h:3
+#: ui/properties.glade.h:2
#, fuzzy
msgid "<span weight=\"bold\">Double-click Action</span>"
msgstr "<span weight=\"bold\">Основни</span>"
-#: ui/properties.glade.h:4
+#: ui/properties.glade.h:3
#, fuzzy
msgid "<span weight=\"bold\">Fonts</span>"
msgstr "<span weight=\"bold\">Команди</span>"
-#: ui/properties.glade.h:5
+#: ui/properties.glade.h:4
msgid "<span weight=\"bold\">General</span>"
msgstr "<span weight=\"bold\">Основни</span>"
-#: ui/properties.glade.h:6
+#: ui/properties.glade.h:5
#, fuzzy
msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr "<span weight=\"bold\">Пощенски кутии</span>"
-#: ui/properties.glade.h:7
+#: ui/properties.glade.h:6
#, fuzzy
msgid "<span weight=\"bold\">Position</span>"
msgstr "<span weight=\"bold\">Команди</span>"
+#: ui/properties.glade.h:7
+#, fuzzy
+msgid "Co_ntents:"
+msgstr "Свъ_рзване"
+
#: ui/properties.glade.h:8
msgid "Dis_play mail summary in tooltip"
msgstr ""
@@ -1535,109 +1788,105 @@ msgid ""
msgstr ""
#: ui/properties.glade.h:23
+msgid "Use these _fonts:"
+msgstr ""
+
+#: ui/properties.glade.h:24
#, fuzzy
msgid "When _all mail is read:"
msgstr "При пристигане на _нова поща:"
-#: ui/properties.glade.h:24
+#: ui/properties.glade.h:25
msgid "When _new mail arrives:"
msgstr "При пристигане на _нова поща:"
-#: ui/properties.glade.h:25
+#: ui/properties.glade.h:26
msgid "Whether the status icon should blink on errors or not"
msgstr "Дали иконата за състоянието да започне да мига при грешки или не"
-#: ui/properties.glade.h:26
+#: ui/properties.glade.h:27
#, fuzzy
msgid "Whether to automatically close the mail summary popup or not"
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: ui/properties.glade.h:27
+#: ui/properties.glade.h:28
msgid "Whether to display the mail summary in the status icon tooltip or not"
msgstr ""
-#: ui/properties.glade.h:28
+#: ui/properties.glade.h:29
#, fuzzy
msgid "Whether to display the mail summary popup when new mail arrives or not"
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: ui/properties.glade.h:29
+#: ui/properties.glade.h:30
msgid "Whether to hide previously displayed mail or not"
msgstr ""
-#: ui/properties.glade.h:30
+#: ui/properties.glade.h:31
#, fuzzy
msgid "Whether to run a command when all mail is read or not"
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: ui/properties.glade.h:31
+#: ui/properties.glade.h:32
msgid "Whether to run a command when new mail arrives or not"
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: ui/properties.glade.h:32
+#: ui/properties.glade.h:33
#, fuzzy
msgid "Whether to set a mail reader or not"
msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-#: ui/properties.glade.h:33
+#: ui/properties.glade.h:34
msgid ""
"Whether to start Mail Notification when you log into your GNOME session or "
"not"
msgstr ""
"Дали да се стартира известяването за поща, когато влизате в GNOME или не"
-#: ui/properties.glade.h:34
-#, fuzzy
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not"
-msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-
#: ui/properties.glade.h:35
-#, fuzzy
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
-msgstr "Дали да се стартира команда при пристигането на нова поща или не"
-
-#: ui/properties.glade.h:36
msgid "_Automatically close after:"
msgstr ""
-#: ui/properties.glade.h:37
+#: ui/properties.glade.h:36
msgid "_Blink on errors"
msgstr "_Мигане при грешки"
-#: ui/properties.glade.h:38
-msgid "_Contents font:"
-msgstr ""
-
-#: ui/properties.glade.h:39
+#: ui/properties.glade.h:37
msgid "_Delay between mail checks:"
msgstr "_Време между проверките за поща:"
-#: ui/properties.glade.h:40
+#: ui/properties.glade.h:38
#, fuzzy
-msgid "_Display the mail summary dialog"
+msgid "_Display the main window"
msgstr "Изобразяване на диалоговия прозорец с информацията"
-#: ui/properties.glade.h:41
+#: ui/properties.glade.h:39
msgid "_Enable mail summary popup"
msgstr ""
-#: ui/properties.glade.h:42
+#: ui/properties.glade.h:40
msgid "_Launch the mail reader"
msgstr ""
-#: ui/properties.glade.h:43
+#: ui/properties.glade.h:41
msgid "_Mail reader:"
msgstr ""
-#: ui/properties.glade.h:44
+#: ui/properties.glade.h:42
msgid "_Start Mail Notification on GNOME login"
msgstr "_Стартиране на известяването за поща при влизане в GNOME"
+#: ui/properties.glade.h:43
+msgid "_Title:"
+msgstr ""
+
+#: ui/properties.glade.h:44
+#, fuzzy
+msgid "_Update the mail status"
+msgstr "Актуализиране състоянието на пощата"
+
#: ui/properties.glade.h:45
-msgid "_Title font:"
+msgid "_Use fonts from theme"
msgstr ""
#: ui/properties.glade.h:46
@@ -1662,12 +1911,13 @@ msgid "<span size=\"larger\" weight=\"bold\">Mail Summary</span>"
msgstr "<span weight=\"bold\">Пощенски кутии</span>"
#: ui/welcome.glade.h:1
+#, fuzzy
msgid ""
"<span weight=\"bold\" size=\"larger\">First startup</span>\n"
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
@@ -1723,6 +1973,12 @@ msgstr "_Пропускане на настройването"
#~ msgid "_Run Default Action"
#~ msgstr "_Стартиране на стандартното действие"
+#~ msgid "%s has no new mail"
+#~ msgstr "%s няма нова поща"
+
+#~ msgid "error while reading mailbox: %s"
+#~ msgstr "грешка при четенето на пощенската кутия: %s"
+
#~ msgid "Your password on the POP3 server"
#~ msgstr "Паролата ви в POP3 сървъра"
@@ -1735,9 +1991,6 @@ msgstr "_Пропускане на настройването"
#~ msgid "The following mailbox has new mail:\n"
#~ msgstr "Следната пощенска кутия има нова поща:\n"
-#~ msgid "You have no new mail."
-#~ msgstr "Нямата нова поща."
-
#~ msgid "The following mailbox reported an error:\n"
#~ msgstr "Следната пощенска кутия докладва за грешка:\n"
@@ -1747,6 +2000,12 @@ msgstr "_Пропускане на настройването"
#~ msgid "Unable to execute new mail command: %s."
#~ msgstr "Неуспех при стартирането на нова пощенска команда: %s."
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "*"
+#~ msgstr "*"
+
#~ msgid "The command to run when the icon is double-clicked"
#~ msgstr ""
#~ "Командата, която да се стартира когато иконата-писмо се натисне два пъти"
diff --git a/po/de.gmo b/po/de.gmo
Binary files differ.
diff --git a/po/de.po b/po/de.po
@@ -1,18 +1,18 @@
# German translations for mail-notification.
-# Copyright (c) 2003, 2004 Jean-Yves Lefort.
+# Copyright (C) 2003-2005 Jean-Yves Lefort.
#
# This file is distributed under the same license as the
# mail-notification package.
#
-# Hendrik Brandt <eru@gmx.li>, 2004.
+# Hendrik Brandt <heb@gnome-de.org>, 2004-2005.
#
msgid ""
msgstr ""
-"Project-Id-Version: mail-notification 1.0\n"
+"Project-Id-Version: mail-notification 1.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
-"PO-Revision-Date: 2004-11-21 17:14+0100\n"
-"Last-Translator: Hendrik Brandt <eru@gmx.li>\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\n"
+"PO-Revision-Date: 2005-03-02 21:38+0100\n"
+"Last-Translator: Hendrik Brandt <heb@gnome-de.org>\n"
"Language-Team: German <gnome-de@gnome.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -27,14 +27,14 @@ msgstr "Automatische E-Mail-Eingangsüberwachnung"
msgid "Mail Notification automation factory"
msgstr "Automatische E-Mail-Eingangsüberwachnung"
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
msgid "Configure Mail Notification"
msgstr "Die E-Mail-Eingangsüberwachung einstellen"
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
msgstr "E-Mail-Eingangsüberwachung"
@@ -83,137 +83,158 @@ msgid "Has already been run"
msgstr "Wurde schon einmal gestartet"
#: data/mail-notification.schemas.in.h:11
-msgid "Height of mail summary dialog"
-msgstr "Höhe der Nachrichtenübersicht"
+msgid "Height of edit toolbars dialog"
+msgstr "Höhe des Dialogs zum Bearbeiten der Werkzeugleisten"
#: data/mail-notification.schemas.in.h:12
+msgid "Height of main window"
+msgstr "Höhe des Hauptfensters"
+
+#: data/mail-notification.schemas.in.h:13
msgid "Height of properties dialog"
msgstr "Höhe des Einstellungen-Dialogs"
-#: data/mail-notification.schemas.in.h:13
+#: data/mail-notification.schemas.in.h:14
msgid "Mail read command"
msgstr "Befehl zum Lesen einer Nachricht"
-#: data/mail-notification.schemas.in.h:14
+#: data/mail-notification.schemas.in.h:15
msgid "Mail reader command"
msgstr "Befehl zum Starten des E-Mail-Programms"
-#: data/mail-notification.schemas.in.h:15
+#: data/mail-notification.schemas.in.h:16
msgid "Mail summary popup contents font"
msgstr "Schrift für den Inhalt der Nachrichtenübersicht"
-#: data/mail-notification.schemas.in.h:16
+#: data/mail-notification.schemas.in.h:17
+msgid "Mail summary popup fonts aspect source"
+msgstr "Quelle der Schrift für die Nachrichtenübersicht"
+
+#: data/mail-notification.schemas.in.h:18
msgid "Mail summary popup horizontal offset"
msgstr "Horizontaler Abstand der Nachrichtenübersicht"
-#: data/mail-notification.schemas.in.h:17
+#: data/mail-notification.schemas.in.h:19
msgid "Mail summary popup position"
msgstr "Position der Nachrichtenübersicht"
-#: data/mail-notification.schemas.in.h:18
+#: data/mail-notification.schemas.in.h:20
msgid "Mail summary popup title font"
msgstr "Schrift für den Titel der Nachrichtenübersicht"
-#: data/mail-notification.schemas.in.h:19
+#: data/mail-notification.schemas.in.h:21
msgid "Mail summary popup vertical offset"
msgstr "Vertikaler"
-#: data/mail-notification.schemas.in.h:20
+#: data/mail-notification.schemas.in.h:22
msgid "Mailbox list"
msgstr "Liste der Postfächer"
-#: data/mail-notification.schemas.in.h:21
+#: data/mail-notification.schemas.in.h:23
msgid "Minutes between mail checks"
msgstr "Minuten zwischen den Aktualisierungen"
-#: data/mail-notification.schemas.in.h:22
+#: data/mail-notification.schemas.in.h:24
msgid "Minutes to wait before closing the mail summary popup"
msgstr "Wartezeit bis zum Schließen der Nachrichtenübersicht"
-#: data/mail-notification.schemas.in.h:23
+#: data/mail-notification.schemas.in.h:25
msgid "New mail command"
msgstr "Befehl bei neuer Nachricht"
-#: data/mail-notification.schemas.in.h:24
+#: data/mail-notification.schemas.in.h:26
msgid "Only display recent mail in mail summary popup"
msgstr "Nur aktuelle Nachrichten in der Nachrichtenübersicht anzeigen"
-#: data/mail-notification.schemas.in.h:25
+#: data/mail-notification.schemas.in.h:27
msgid "Run a command when all mail is read"
msgstr "Einen Befehl ausführen, wenn alle Nachrichten gelesen sind"
-#: data/mail-notification.schemas.in.h:26
+#: data/mail-notification.schemas.in.h:28
msgid "Run a command when new mail arrives"
msgstr "Einen Befehl ausführen, wenn eine neue Nachricht eintrifft"
-#: data/mail-notification.schemas.in.h:27
+#: data/mail-notification.schemas.in.h:29
msgid "Seconds between mail checks"
msgstr "Sekunden zwischen den Aktualisierungen"
-#: data/mail-notification.schemas.in.h:28
+#: data/mail-notification.schemas.in.h:30
msgid "Seconds to wait before closing the mail summary popup"
msgstr "Wartezeit in Sekunden bis zum Schließen der Nachrichtenübersicht"
-#: data/mail-notification.schemas.in.h:29
+#: data/mail-notification.schemas.in.h:31
msgid "Set a mail reader"
msgstr "Ein E-Mail-Programm festlegen"
-#: data/mail-notification.schemas.in.h:30
+#: data/mail-notification.schemas.in.h:32
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
"Die auszuführende Aktion wenn das Symbol doppelt angeklickt wird. Hat "
-"entweder den Wert »display-mail-summary« oder »launch-mail-reader«."
+"entweder den Wert »display-mail-window«, »launch-mail-reader« oder »update-"
+"mail-status«."
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
msgstr ""
"Die Zeitspanne bis zum Schließen der Nachrichtenübersicht (Minutenteil)."
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
msgstr ""
"Die Zeitspanne bis zum Schließen der Nachrichtenübersicht (Sekundenteil)."
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr ""
+"Die Quelle aus der die Schrift für die Nachrichtenübersicht festgelegt wird. "
+"Der Wert muss entweder »theme« oder »custom« sein."
+
+#: data/mail-notification.schemas.in.h:36
msgid "The command to run to launch the mail reader."
msgstr "Der Befehl um das E-Mail-Programm zu starten"
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
msgid "The command to run when all mail is read."
msgstr "Der Befehl der ausgeführt wird, wenn alle Nachrichten gelesen wurden"
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
msgid "The command to run when new mail arrives."
msgstr "Der Befehl der ausgeführt wird, wenn eine neue Nachricht eintrifft."
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr ""
"Die benutzerdefinierte Schrift für den Inhalt der Nachrichtenübersicht."
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr "Die benutzerdefinierte Schrift für den Titel der Nachrichtenübersicht."
-#: data/mail-notification.schemas.in.h:38
-msgid "The height of the mail summary dialog in pixels."
-msgstr "Die Höhe der Nachrichtenübersicht in Pixel."
+#: data/mail-notification.schemas.in.h:41
+msgid "The height of the edit toolbars dialog in pixels."
+msgstr "Die Höhe des Dialogs zum Bearbeiten der Werkzeugleisten in Pixel."
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+msgid "The height of the main window in pixels."
+msgstr "Die Höhe des Hauptfensters in Pixel."
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr "Die Höhe des Einstellungsdialogs in Pixel."
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr "Die Liste der zu überwachenden Postfächer."
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
@@ -221,14 +242,14 @@ msgstr ""
"Die Liste vertrauensvoller SSL/TLS-Server (Host-Name:Port) ohne X509-"
"Zertifikat."
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr ""
"Die Liste vertrauensvoller X509-Zertifikate, repräsentiert durch ihre MD5-"
"Fingerabdrücke."
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
@@ -236,7 +257,7 @@ msgstr ""
"Die Anzahl an Pixeln die zwischen dem linken oder rechten Bildschirmrand und "
"der Nachrichtenübersicht."
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
@@ -244,7 +265,7 @@ msgstr ""
"Die Anzahl an Pixeln die zwischen dem oberen oder runteren Bildschirmrand "
"und der Nachrichtenübersicht."
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
@@ -252,106 +273,115 @@ msgstr ""
"Die Position der Nachrichtenübersicht. Der Wert muss »oben-links«, »oben-"
"rechts«, »unten-links« oder »unten-rechts« sein."
-#: data/mail-notification.schemas.in.h:46
-msgid "The width of the mail summary dialog in pixels."
-msgstr "Die Breite der Nachrichtenübersicht in Pixel."
+#: data/mail-notification.schemas.in.h:50
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
+msgstr ""
+"Der Werkzeugleistenmodus. Muss den Wert »desktop-default«, »icons«, »text«, "
+"»both« oder »both-horiz« haben."
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:51
+msgid "The width of the edit toolbars dialog in pixels."
+msgstr "Die Breite des Werkzeugleistenbearbeitungsdialogs in Pixel."
+
+#: data/mail-notification.schemas.in.h:52
+msgid "The width of the main window in pixels."
+msgstr "Die Breite des Hauptfensters in Pixel."
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr "Die Breite des Einstellungen-Dialogs in Pixel."
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr "Werkzeugleistenmodus"
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr "Liste vertrauensvoller Server"
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
-msgstr ""
-"Eine benutzerdefinierte Schrift für den Inhalt der Nachrichtenübersicht "
-"verwenden"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
+msgstr "Statusleiste anzeigen"
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
-msgstr ""
-"Eine benutzerdefinierte Schrift für den Titel der Nachrichtenübersicht "
-"verwenden"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
+msgstr "Werkzeugleisten anzeigen"
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
msgstr ""
"Legt fest, ob die E-Mail-Eingangsüberwachnung schon einmal gestartet wurde."
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
msgstr ""
"Legt fest, ob das Nachrichtensymbol bei Auftreten eines Fehlers blinkt."
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+msgid "Whether the statusbar should be visible or not."
+msgstr "Legt fest, ob die Statusleiste angezeigt werden."
+
+#: data/mail-notification.schemas.in.h:61
+msgid "Whether the toolbars should be visible or not."
+msgstr "Legt fest, ob die Werkzeugleisten angezeigt werden."
+
+#: data/mail-notification.schemas.in.h:62
msgid "Whether to automatically close the mail summary popup or not."
msgstr ""
"Legt fest, ob ein Befehl ausgeführt wird, wenn eine neue Nachricht eintrifft."
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
"Legt fest, ob die Nachrichtenübersicht in der Minihilfe des Statussymbols "
"angezeigt wird."
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
msgid "Whether to display the mail summary popup when new mail arrives or not."
msgstr ""
"Legt fest, ob die Nachrichtenübersicht angezeigt wird, wenn eine neue "
"Nachricht eintrifft."
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
"Legt fest, ob zuvor angezeigte Nachrichten in der Nachrichtenübersicht "
"erneut angezeigt werden."
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
msgstr ""
"Legt fest, ob der Fehlerdialog der Sofortbenachrichtigung angezeigt wird."
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
msgid "Whether to run a command when all mail is read or not."
msgstr ""
"Legt fest, ob ein Befehl ausgeführt wird, wenn alle Nachrichten gelesen "
"wurden."
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
msgid "Whether to run a command when new mail arrives or not."
msgstr ""
"Legt fest, ob ein Befehl ausgeführt wird, wenn eine neue Nachricht eintrifft."
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
msgid "Whether to set a mail reader or not."
msgstr "Legt fest, ob ein E-Mail-Programm ausgewählt ist."
-#: data/mail-notification.schemas.in.h:61
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
-msgstr ""
-"Legt fest, ob für den Inhalt der Nachrichtenübersicht eine eigene Schrift "
-"verwendet werden soll."
-
-#: data/mail-notification.schemas.in.h:62
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
-msgstr ""
-"Legt fest, ob für den Titel der Nachrichtenübersicht eine eigene Schrift "
-"verwendet werden soll."
+#: data/mail-notification.schemas.in.h:70
+msgid "Width of edit toolbars dialog"
+msgstr "Breite des Werkzeugleistenbearbeitungsdialogs"
-#: data/mail-notification.schemas.in.h:63
-msgid "Width of mail summary dialog"
-msgstr "Breite der Nachrichtenübersicht"
+#: data/mail-notification.schemas.in.h:71
+msgid "Width of main window"
+msgstr "Breite des Hauptfensters"
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr "Breite des Einstellungen-Dialogs"
@@ -359,6 +389,23 @@ msgstr "Breite des Einstellungen-Dialogs"
msgid "New Mail"
msgstr "Neue Nachricht"
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr "Werkzeugleiste _entfernen"
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr "Trennlinie"
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+"Ziehen Sie einen Eintrag auf die Werkzeugleiste, um diesen hinzu zufügen "
+"oder ziehen Sie einen Eintrag von der Werkzeugleiste in das Depot um diesen "
+"zu entfernen."
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr "Ausrichtung"
@@ -367,22 +414,22 @@ msgstr "Ausrichtung"
msgid "The orientation of the tray."
msgstr "Die Ausrichtung des Benachrichtigungsfeldes"
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr ""
"Ein Benachrichtigungssymbol das erscheint, wenn neue Nachrichten in Ihren "
"Postfächern liegen."
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr "Hendrik Brandt <eru@gmx.li>"
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
msgstr "<span style=\"italic\">automatisch erkennen</span>"
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -396,12 +443,12 @@ msgstr ""
"\n"
"Bitte geben Sie das Passwort für dieses Postfach ein."
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr "Bitte geben Sie das Passwort für %s-Postfach »%s«."
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -414,11 +461,11 @@ msgstr ""
"\n"
"%s"
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr "_Ort:"
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr "_Durchsuchen..."
@@ -426,7 +473,7 @@ msgstr "_Durchsuchen..."
msgid "The URI of the mailbox"
msgstr "Die Adresse des Postfachs"
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr "Wählen Sie eine Datei oder ein Verzeichnis"
@@ -563,82 +610,81 @@ msgstr "Es konnte nicht vom Server gelesen werden: EOF"
msgid "unable to decode data using SASL: %s"
msgstr "Die Daten konnten nicht per SASL dekodiert werden: %s"
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr "Die Daten konnten nicht per SASL kodiert werden: %s"
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr "Es konnte nicht auf den Server geschrieben werden: %s"
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr "Es konnte nicht auf den Server geschrieben werden: EOF"
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr "Es konnte nicht mit Base64 kodiert werden: %s"
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr "Die SASL-Bibliothek konnte nicht initializiert werden: %s"
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr "Die lokale Adresse des Socket konnte nicht herausgefunden werden: %s"
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr ""
"Die entfernte Adresse des Socket konnte nicht herausgefunden werden: %s"
-#: src/mn-client-session.c:974
+#: src/mn-client-session.c:971
#, c-format
-msgid "warning: unable to set SASL security properties: %s"
-msgstr ""
-"Warnung: Die SASL-Sicherheitseigenschaften konnten nicht gesetzt werden: %s"
+msgid "unable to set SASL security properties: %s"
+msgstr "die SASL-Sicherheitseigenschaften konnten nicht gesetzt werden: %s"
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr ""
"Die SASL-Authentifizierung konnte nicht gestartet werden: es wurde eine "
"unbekannte Anfrage von SASL gestellt"
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr "Die SASL-Authentifizierung konnte nicht gestartet werden: %s"
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr "Es konnte keine Verbindung mit SASL erzeugt werden: %s"
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr ""
"Es wurde eine unbekannte Anfrage von SASL gestellt, SASL-Authentifizierung "
"wird abgebrochen"
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr "%s, SASL-Authentifizierung wird abgebrochen"
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr "Die Server-seitige Base64-Eingabe konnte nicht dekodiert werden: %s"
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
@@ -646,7 +692,7 @@ msgstr ""
"Der Server hat während einer beginnenden SASL-Client-Antwort einen Fehler "
"gesendet"
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
@@ -654,40 +700,49 @@ msgstr ""
"Der Server hat kein SASL-Problem gesendet, während noch eine Client-seitige "
"SASL-Reaktion begonnen wurde"
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr "Die SASL-Sicherheitsebene der Stärke %i ist jetzt aktiv"
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr "Der Wert SASL_MAXOUTBUF wurde nicht gefunden: %s"
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr "Warnung: Der Wert SASL_SSF wurde nicht gefunden: %s"
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+msgid "A directory creation error has occurred"
+msgstr "Beim Verzeichniserstellen ist ein Fehler aufgetreten"
+
+#: src/mn-conf.c:239
+#, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr "Das Verzeichnis»%s« konnte nicht angelegt werden: %s."
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr "%s rekursiv zurück setzen"
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr "Synchronisiere mit der GConf-Datenbank"
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr "Abgeschlossen"
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr "Ihr Gmail-Benutzername"
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
@@ -695,36 +750,59 @@ msgstr ""
"Ihr Gmail-Passwort (falls Sie nichts eingeben, werden Sie jedesmal wenn es "
"notwendig ist nach dem Passwort gefragt)"
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr "»libsoup« wurde nicht mit SSL/TLS-Unterstützung erstellt"
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, c-format
msgid "unable to parse URI \"%s\""
msgstr "Die Adresse »%s« konnte nicht analysiert werden"
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr "Vom Server wurden nicht-UTF-8-Daten übermittelt"
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr "Daten konnten nicht übertragen werden: %s"
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr "Anmelden bei"
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr "Anmeldung fehlgeschlagen"
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr "Es wird nach ungelesenen Nachrichten gesucht"
#: src/mn-gmail-mailbox.gob:527
+msgid "unable to initialize the ICU library"
+msgstr "Die ICU-Bibliothek konnte nicht initializiert werden"
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr "Die Gmail-Daten konnte nicht analysiert werden"
+#: src/mn-gmail-mailbox.gob:891
+#, c-format
+msgid "unable to open calendar: %s"
+msgstr "Kalender konnte nicht geöffnet werden: %s"
+
+#: src/mn-gmail-mailbox.gob:899
+#, c-format
+msgid "unable to set calendar time: %s"
+msgstr "Die Kalenderzeit konnte nicht gesetzt werden: %s"
+
+#: src/mn-gmail-mailbox.gob:968
+#, c-format
+msgid "unable to get calendar time: %s"
+msgstr "Die aktuelle Kalenderzeit konnte nicht ermittelt werden: %s"
+
#: src/mn-gmime-stream-vfs.gob:49
#, c-format
msgid "unable to read %s: %s"
@@ -750,19 +828,19 @@ msgstr "Die Position von %s konnte nicht ermittelt werden: %s"
msgid "unable to close %s: %s"
msgstr "%s konnte nicht geschlossen werden: %s"
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr "Postfach:"
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr "In_box"
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr "_Anderer:"
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr "Wenn möglich Leerlauf_modus verwenden"
@@ -795,54 +873,49 @@ msgstr "Der Postfachname"
msgid "If possible, whether to use idle mode or not"
msgstr "Wenn möglich wird der Leerlauf_modus verwenden"
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
msgstr ""
"Die Unterstützung für SSL/TLS wurde beim Erstellen des Programms nicht "
"eingebaut"
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr "Der Server hat seine Fähigkeiten nicht bekannt gegeben"
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr ""
"Der Server gibt LOGINDISABLED zurück, LOGIN-Authentifizierung wird nicht "
"verwendet"
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr "Anmeldung fehlgeschlagen"
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
msgid "server did not send search results"
msgstr "Der Server hat keine Suchergebnisse gesendet"
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
msgid "server did not send all the messages we requested"
msgstr "Der Server hat nicht alle angeforderten Nachrichten gesendet"
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
msgid "unable to fetch message"
msgstr "Nachrichten konnten nicht abgerufen werden"
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr "Der Server hat seinen Status nicht bekannt gegeben"
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr "Unbekannter Server-Fehler"
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr "Der Server unterstütz kein band-internes SSL/TLS"
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
@@ -850,24 +923,28 @@ msgstr ""
"Sie haben eine Authentifizierung mit SASL ausgewählt, jedoch wurde die "
"Unterstützung für SASL beim Erstellen des Programms nicht eingebaut"
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr "Unbekannte Authentifizierungsmethode »%s«"
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
msgstr "Es wird auf die Authentifizierung per IMAP LOGIN zurückgegriffen"
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
msgstr "Authentifizierung fehlgeschlagen"
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
-msgstr "_E-Mail-Programm starten"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
+msgstr "_Hauptfenster"
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+msgid "_Mail Reader"
+msgstr "_E-Mail-Programm"
+
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
msgstr "_Aktualisieren"
@@ -875,20 +952,20 @@ msgstr "_Aktualisieren"
msgid "R_emove From Notification Area"
msgstr "Aus dem Benachrichtigungsfeld entfernen"
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
msgstr "Ein Postfach hinzufügen"
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr "%s Eigenschaften"
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
msgstr "Ben_utzername:"
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr "_Passwort:"
@@ -928,61 +1005,57 @@ msgstr "Vollständig"
msgid "Whether the properties are completely filled or not"
msgstr "Legt fest, ob die Einstellungen vollständig ausgefüllt sind"
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr "Postfach"
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr "Protokoll"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr "Postfach konnte nicht hinzugefügt werden"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr "Dieses Postfach exisitiert bereits in Ihrer Liste."
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr "Die Postfachadresse"
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr "Der lesbare Postfachname"
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
msgid "Whether the mailbox has to be polled or not"
msgstr "Legt fest, ob das Postfach abgefragt werden muss"
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr "Legt fest, ob das Postfach neue Nachrichten enthält"
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr "Die Liste neuer und ungelesener MNMessage-Objekte"
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr "Der Postfachfehler, falls vorhanden"
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr "existiert nicht"
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr "unbekanntes Format"
-#: src/mn-mailbox.gob:407
+#: src/mn-mailbox.gob:403
#, c-format
-msgid "unable to enable immediate notification for %s: %s"
-msgstr "Die Sofortbenachrichtigung konnte für %s nicht aktiviert werden: %s"
+msgid "unable to enable immediate notification: %s"
+msgstr "die Sofortbenachrichtigung konnte nicht aktiviert werden: %s"
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, fuzzy, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -1001,7 +1074,7 @@ msgstr[1] ""
"alle %i Sekunden überprüft (Dieser Wert kann über den Einstellungsdialog "
"angepasst werden)."
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, fuzzy, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -1020,7 +1093,7 @@ msgstr[1] ""
"alle %i Minuten überprüft (Dieser Wert kann über den Einstellungsdialog "
"angepasst werden)."
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, fuzzy, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -1039,11 +1112,11 @@ msgstr[1] ""
"alle %i Minuten überprüft (Dieser Wert kann über den Einstellungsdialog "
"angepasst werden)."
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr "Bei der Überwachung ist ein Fehler aufgetreten"
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
@@ -1052,100 +1125,251 @@ msgstr ""
"Die E-Mail-Eingangsüberwachung konnte die Sofortbenachrichtigung für ein "
"oder mehrere Postfächer nicht aktivieren: %s"
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr "Legt fest, ob ein oder mehrere Postfächer befragt werden sollen"
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
msgstr "%s wird nicht unterstützt: %s"
-#: src/mn-mailboxes.gob:304
+#: src/mn-mailboxes.gob:290
#, c-format
-msgid "%s has new mail"
-msgstr "%s hat neue Nachrichten"
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] "%s hat %i neue Nachricht"
+msgstr[1] "%s hat %i neue Nachrichten"
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has no new mail"
-msgstr "%s hat keine neuen Nachrichten"
-
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr "%s hat einen Fehler erzeugt: %s"
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr "Der Ordner »new« konnte nicht geöffnet werden: %s"
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr "Der Ordner »new« konnte nicht geschlossen werden: %s"
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr "Fehler beim Lesen des Ordners »new«: %s"
+#. Toplevel
+#: src/mn-main-window.c:92
+msgid "_Mail"
+msgstr "_Nachricht"
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr "_Bearbeiten"
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr "_Ansicht"
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr "_Hilfe"
+
+#: src/mn-main-window.c:103
+msgid "Launch the mail reader"
+msgstr "Das E-Mail-Programm starten"
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr "Nach neuen Nachrichten sehen"
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr "_Schließen"
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr "Dieses Fenster schließen"
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr "_Beenden"
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+msgid "Quit Mail Notification"
+msgstr "Die E-Mail-Eingangsüberwachung beenden"
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr "_Werkzeugleisten"
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr "Die Werkzeugleisten an die eigenen Bedürfnisse anpassen"
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr "_Einstellungen"
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr "Werkzeugleistenmodus"
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr "Den Modus der Werkzeugleisten anpassen"
+
+#: src/mn-main-window.c:163
+msgid "_Contents"
+msgstr "I_nhalt"
+
+#: src/mn-main-window.c:165
+msgid "Display help"
+msgstr "Die Hilfe anzeigen"
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr "_Info"
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr "Mitwirkende anzeigen"
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr "Die Werkzeugleisten anzeigen oder verstecken"
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr "_Statusleiste"
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr "Die Statusleiste anzeigen oder verstecken"
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr "_Systemvorgabe"
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr "Den Werkzeugleistenmodus wie vom System vorgegeben benutzen"
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr "Nur _Symbole"
+
+#: src/mn-main-window.c:215
+msgid "Only display the toolbars icons"
+msgstr "Nur Werkzeugleistensymbole anzeigen"
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr "Nur _Beschriftungen"
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr "Nur Werkzeugleistentexte anzeigen"
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr "Beschriftungen _unter Symbolen"
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr "Die Werkzeugleistenbeschriftung unter den Symbolen anzeigen"
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr "Beschriftung _neben Symbolen"
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr "Die Werkzeugleistenbeschriftung neben den Symbolen anzeigen"
+
+#: src/mn-main-window.c:363
+#, c-format
+msgid "unable to load menus.xml: %s"
+msgstr "menus.xml konnte nicht geladen werden: %s"
+
+#: src/mn-main-window.c:398
+msgid "Help messages"
+msgstr "Hilfetexte"
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr "Nachrichten zählen"
+
+#: src/mn-main-window.c:503
+#, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] "%i neue Nachricht"
+msgstr[1] "%i neue Nachrichten"
+
+#: src/mn-main-window.c:540
+msgid "unable to load toolbars.xml"
+msgstr "toolbars.xml konnte nicht geladen werden"
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr "Eingebaute Postfacharten: %s\n"
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr "Gmail-Zeitstempel"
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr "Eingebaute Programmfähigkeiten: %s\n"
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr "Ausgabe von Informationen aktivieren"
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
-msgstr "Eingebaute Programmfähigkeiten anzeigen und beenden"
+#: src/mn-main.c:185
+msgid "List the compiled-in features"
+msgstr "Eingebaute Programmfähigkeiten anzeigen"
-#: src/mn-main.c:193
-msgid "Display the mail summary dialog"
-msgstr "Die Nachrichtenübersicht anzeigen"
+#: src/mn-main.c:194
+msgid "Display the main window"
+msgstr "Das Hauptfenster anzeigen"
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr "Den Dialog zum Einstellen der E-Mail-Eingangsüberwachung anzeigen"
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr "Den Info-Dialog anzeigen"
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr "Die Nachrichtenübersicht schließen"
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr "Nach neuen Nachrichten sehen"
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr "Den aktuellen Nachrichten anzeigen"
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
-msgstr "Veraltete GConf-Konfiguration zurücksetzen und beenden"
+#: src/mn-main.c:248
+msgid "Unset obsolete GConf configuration"
+msgstr "Veraltete GConf-Konfiguration zurücksetzen"
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr "Multi-Threading steht nicht zur Verfügung"
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
@@ -1153,19 +1377,27 @@ msgstr ""
"Bonobo konnte das Automatisierungsobjekt nicht finden. Bitte überprüfen Sie "
"Ihre Installation der E-Mail-Eingangsüberwachung."
-#: src/mn-main.c:325
+#: src/mn-main.c:344
+msgid "quitting Mail Notification"
+msgstr "E-Mail-Eingangsüberwachung wir beendet"
+
+#: src/mn-main.c:348
+msgid "Mail Notification is not running"
+msgstr "Die E-Mail-Eingangsüberwachung ist nicht aktiv"
+
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr "Die GnomeVFS-Bibliothek konnte nicht initializiert werden."
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr "Nachrichtenstatus wird aktualisiert"
-#: src/mn-main.c:379
+#: src/mn-main.c:409
msgid "Mail Notification is already running"
msgstr "Die E-Mail-Eingangsüberwachung ist bereits aktiv"
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
@@ -1174,7 +1406,7 @@ msgstr ""
"finden. Bitte überprüfen Sie Ihre Installation der E-Mail-"
"Eingangsüberwachung."
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
@@ -1182,77 +1414,79 @@ msgstr ""
"Bonobo konnte den Automatisierungs-Server nicht registrieren.Bitte "
"überprüfen Sie Ihre Installation der E-Mail-Eingangsüberwachung."
-#: src/mn-mbox-mailbox.gob:221
-#, c-format
-msgid "error while reading mailbox: %s"
-msgstr "Postfach konnte nicht neu geladen werden: %s"
-
-#: src/mn-mbox-mailbox.gob:230
+#: src/mn-mbox-mailbox.gob:184
#, c-format
msgid "unable to open mailbox: %s"
msgstr "Postfach konnte nicht geöffnet werden: %s"
-#: src/mn-message-box.gob:64
+#: src/mn-message-mime.c:105
+msgid "unable to parse MIME message"
+msgstr "Die MIME-Nachricht konnte nicht analysiert werden"
+
+#: src/mn-message-view.gob:81
+msgid "You have no new mail."
+msgstr "Sie haben keine neuen Nachrichten."
+
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr "Nichtlesbare Nachricht"
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr "Von"
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr "Betreff"
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr "Gesendet"
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr "Inactive"
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
msgstr[0] "Vor %i Sekunde"
-#: src/mn-message-box.gob:196
+#: src/mn-message.gob:130
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
-msgstr[0] "Vor %i Minute"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
+msgstr[0] "vor etwa %i Minute"
+msgstr[1] "vor etwa %i Minuten"
-#: src/mn-message-box.gob:201
+#: src/mn-message.gob:135
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
-msgstr[0] "Vor %i Stunde"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
+msgstr[0] "vor etwa %i Stunde"
+msgstr[1] "vor etwa %i Stunden"
-#: src/mn-message-box.gob:206
+#: src/mn-message.gob:140
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
-msgstr[0] "Vor %i Tag"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
+msgstr[0] "vor etwa %i Tag"
+msgstr[1] "vor etwa %i Tagen"
-#: src/mn-message-box.gob:211
+#: src/mn-message.gob:145
#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
-msgstr[0] "Vor %i Woche"
-msgstr[1] "Vor %i Wochen"
-
-#: src/mn-message-mime.c:105
-msgid "unable to parse MIME message"
-msgstr "Die MIME-Nachricht konnte nicht analysiert werden"
-
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr "Inactive"
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
+msgstr[0] "vor etwa %i Woche"
+msgstr[1] "vor etwa %i Wochen"
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr "Fehler beim lesen der .mh_sequences: %s"
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr ".mh_sequences konnten nicht geöffnet werden: %s"
@@ -1261,23 +1495,23 @@ msgstr ".mh_sequences konnten nicht geöffnet werden: %s"
msgid "detecting"
msgstr "ermitteln"
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
msgstr "_Server:"
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr "_Details"
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
msgstr "Sta_ndard"
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
msgstr "_band-internes SSL/TLS"
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr "SSL/TLS über e_xtra Port"
@@ -1301,15 +1535,15 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr "Die Port-Nummer des POP3-Servers"
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr "Ungültige Argumente für die Anmeldeverzögerung"
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
msgid "unknown error"
msgstr "Unbekannter Fehler"
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
@@ -1318,63 +1552,63 @@ msgstr[0] ""
"gewartetAnmeldeverzögerung wird berücksichtigt, es wird für %i Sekunden "
"gewartet"
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr "Der Server unterstütz eine Authentifizierung per APOP nicht."
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr "Es wird auf Authentifizierung mit APOP zurück gegriffen."
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr ""
"Es wird auf Authentifizierung per Nutzername und Passwort zurück gegriffen."
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
msgid "top left"
msgstr "oben links"
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
msgstr "oben rechts"
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
msgstr "unten links"
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
msgstr "unten rechts"
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
msgstr "Kein Postfach ausgewählt."
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
msgstr[0] "Ein Posfach ausgewählt."
msgstr[1] "%i Postfächer ausgewählt."
-#: src/mn-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
msgstr "Sie haben neue Nachrichten."
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
-msgstr "Folgende Postfächer haben neuen Nachrichten"
+msgstr "Folgende Postfächer haben neue Nachrichten"
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr "Fehler"
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
msgid "Unsupported Mailboxes"
msgstr "Nichtunterstützte Postfächer"
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
msgstr "Nachrichtenübersicht"
@@ -1392,20 +1626,20 @@ msgid "Select _All"
msgstr "_Alles auswählen"
#: src/mn-stock.c:29
-msgid "_Mail Summary"
-msgstr "_Nachrichtenübersicht"
+msgid "Leave Fullscreen"
+msgstr "Vollbild verlassen"
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr "Ordner konnte nicht geöffnet werden: %s"
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr "Ordner konnte nicht geschlossen werden: %s"
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr "Fehler beim Lesen von Ordner: %s"
@@ -1436,104 +1670,112 @@ msgstr "Der Grund weshalb dieses Postfach nicht unerstützt wird"
msgid "unsupported"
msgstr "nicht unterstützt"
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr "Bild konnte nicht geladen werden: %s"
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr "Widget »%s« konnte nicht in Interface »%s« gefunden werden"
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr "Es wurde eine ungültige Adressliste erhalten"
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr "Es wurde eine ungültige Mozilla-Adresse erhalten"
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr "Die Hilfe kann nicht angezeigt werden"
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr "Es konnte kein Thread erzeugt werden: %s."
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr "_Diese Meldung nicht erneut anzeigen"
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr ""
"Ein schwerwiegender Fehler ist beim Ausführen der E-Mail-Eingangsüberwachung "
"aufgetreten"
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, c-format
msgid "unable to get current time: %s"
msgstr "Die aktuelle Zeit konnte nicht ermittelt werden: %s"
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr "Ungültige Signalspezifikation »%s«"
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr ""
"Es ist ein Fehler beim Ausführen eines Befehls in der E-Mail-"
"Eingangsüberwachung aufgetreten."
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, c-format
msgid "Unable to execute \"%s\": %s."
msgstr "»%s« konnte nicht ausgeführt werden: %s."
#: ui/authentication.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: ui/authentication.glade.h:2
msgid "_Authenticate"
msgstr "_Authentifizieren:"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr "Werkzeugleisten bearbeiten"
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr "_Neue Werkzeugleiste hinzufügen"
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
+msgstr "_Vorgabe verwenden"
+
#: ui/mailbox-properties.glade.h:1
msgid "_Mailbox type:"
msgstr "_Art des Postfachs:"
#: ui/properties.glade.h:1
-msgid " "
-msgstr " "
-
-#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Commands</span>"
msgstr "<span weight=\"bold\">Befehle</span>"
-#: ui/properties.glade.h:3
+#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Double-click Action</span>"
msgstr "<span weight=\"bold\">Aktion bei Doppelklick</span>"
-#: ui/properties.glade.h:4
+#: ui/properties.glade.h:3
msgid "<span weight=\"bold\">Fonts</span>"
msgstr "<span weight=\"bold\">Schriften</span>"
-#: ui/properties.glade.h:5
+#: ui/properties.glade.h:4
msgid "<span weight=\"bold\">General</span>"
msgstr "<span weight=\"bold\">Allgemein</span>"
-#: ui/properties.glade.h:6
+#: ui/properties.glade.h:5
msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr "<span weight=\"bold\">Postfächer</span>"
-#: ui/properties.glade.h:7
+#: ui/properties.glade.h:6
msgid "<span weight=\"bold\">Position</span>"
msgstr "<span weight=\"bold\">Position</span>"
+#: ui/properties.glade.h:7
+msgid "Co_ntents:"
+msgstr "_Inhalt:"
+
#: ui/properties.glade.h:8
msgid "Dis_play mail summary in tooltip"
msgstr "_Nachrichtenübersicht anzeigen"
@@ -1605,55 +1847,59 @@ msgstr ""
"Nachrichtenübersicht."
#: ui/properties.glade.h:23
+msgid "Use these _fonts:"
+msgstr "Folgende _Schriften verwenden:"
+
+#: ui/properties.glade.h:24
msgid "When _all mail is read:"
msgstr "Wenn alle Nachricht _gelesen wurden:"
-#: ui/properties.glade.h:24
+#: ui/properties.glade.h:25
msgid "When _new mail arrives:"
msgstr "Wenn neue Nachricht _eintrifft:"
-#: ui/properties.glade.h:25
+#: ui/properties.glade.h:26
msgid "Whether the status icon should blink on errors or not"
msgstr ""
"Wenn diese Option gewählt ist, blinkt das Nachrichtensymbol bei Auftreten "
"eines Fehlers."
-#: ui/properties.glade.h:26
+#: ui/properties.glade.h:27
msgid "Whether to automatically close the mail summary popup or not"
msgstr "Legt fest, ob die Nachrichtenübersicht automatisch geschlossen wird"
-#: ui/properties.glade.h:27
+#: ui/properties.glade.h:28
msgid "Whether to display the mail summary in the status icon tooltip or not"
msgstr ""
"Legt fest, ob die Nachrichtenübersicht in der Minihilfe des Statussymbols "
"angezeigt wird"
-#: ui/properties.glade.h:28
+#: ui/properties.glade.h:29
msgid "Whether to display the mail summary popup when new mail arrives or not"
msgstr ""
"Legt fest, ob die Nachrichtenübersicht aufklappt wenn eine neue Nachricht "
"eintrifft"
-#: ui/properties.glade.h:29
+#: ui/properties.glade.h:30
msgid "Whether to hide previously displayed mail or not"
msgstr "Legt fest, ob zuvor angezeigte Nachrichten erneut angezeigt werden"
-#: ui/properties.glade.h:30
+#: ui/properties.glade.h:31
msgid "Whether to run a command when all mail is read or not"
msgstr ""
"Legt fest, ob ein Befehl ausgeführt wird wenn alle Nachrichten gelesen wurden"
-#: ui/properties.glade.h:31
+#: ui/properties.glade.h:32
msgid "Whether to run a command when new mail arrives or not"
msgstr ""
"Wenn diese Option ausgewählt ist, können Sie einen Befehl angeben der "
"ausgeführt wird, sobald eine neue Nachricht eintrifft."
-#: ui/properties.glade.h:32
+#: ui/properties.glade.h:33
msgid "Whether to set a mail reader or not"
msgstr "Legt das E-Mail-Programm fest"
-#: ui/properties.glade.h:33
+#: ui/properties.glade.h:34
msgid ""
"Whether to start Mail Notification when you log into your GNOME session or "
"not"
@@ -1661,60 +1907,49 @@ msgstr ""
"Wenn diese Option ausgewählt ist, wird die E-Mail-Eingangsüberwachnung beim "
"Starten von GNOME ebenfalls gestartet."
-#: ui/properties.glade.h:34
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not"
-msgstr ""
-"Legt fest, ob für den Inhalt der Nachrichtenübersicht eine eigene Schrift "
-"verwendet wird"
-
#: ui/properties.glade.h:35
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
-msgstr ""
-"Legt fest, ob für den Titel der Nachrichtenübersicht eine eigene Schrift "
-"verwendet wird"
-
-#: ui/properties.glade.h:36
msgid "_Automatically close after:"
msgstr "_Automatisch schließen nach:"
-#: ui/properties.glade.h:37
+#: ui/properties.glade.h:36
msgid "_Blink on errors"
msgstr "_Bei Fehler blinken"
-#: ui/properties.glade.h:38
-msgid "_Contents font:"
-msgstr "Schrift für den _Inhalt:"
-
-#: ui/properties.glade.h:39
+#: ui/properties.glade.h:37
msgid "_Delay between mail checks:"
msgstr "_Nach neuen Nachrichten sehen alle:"
-#: ui/properties.glade.h:40
-msgid "_Display the mail summary dialog"
-msgstr "_Nachrichtenübersicht anzeigen"
+#: ui/properties.glade.h:38
+msgid "_Display the main window"
+msgstr "_Hauptfenster anzeigen"
-#: ui/properties.glade.h:41
+#: ui/properties.glade.h:39
msgid "_Enable mail summary popup"
msgstr "_Aufklappende Nachrichtenübersicht aktivieren"
-#: ui/properties.glade.h:42
+#: ui/properties.glade.h:40
msgid "_Launch the mail reader"
msgstr "E-Mail-Programm _starten"
-#: ui/properties.glade.h:43
+#: ui/properties.glade.h:41
msgid "_Mail reader:"
msgstr "_E-Mail-Programm:"
-#: ui/properties.glade.h:44
+#: ui/properties.glade.h:42
msgid "_Start Mail Notification on GNOME login"
msgstr "_Laden beim Starten von GNOME"
+#: ui/properties.glade.h:43
+msgid "_Title:"
+msgstr "_Titel:"
+
+#: ui/properties.glade.h:44
+msgid "_Update the mail status"
+msgstr "_Nach neuen Nachrichten sehen"
+
#: ui/properties.glade.h:45
-msgid "_Title font:"
-msgstr "Schrift für den _Titel:"
+msgid "_Use fonts from theme"
+msgstr "Schriften des _Themas verwenden"
#: ui/properties.glade.h:46
msgid "_Vertical offset:"
@@ -1742,7 +1977,7 @@ msgid ""
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
@@ -1760,11 +1995,11 @@ msgstr ""
"\n"
"Hinweis: Diese Meldung wird nicht erneut angezeigt. Um die E-Mail-"
"Eingangsüberwachnung zu einem später Zeitpunkt einzustellen, starten Sie "
-"bitte <span weight=\"bold\">Anwendungen</span> → <span weight=\"bold"
-"\">Desktop-Einstellungen</span> → <span weight=\"bold\">E-Mail-"
-"Eingangsüberwachnung</span> (auf einigen Systemen auch <span weight=\"bold"
-"\">Anwendungen → Präferenzen → erweiterte Präferenzen → E-Mail-"
-"Eingansüberwachung</span>)."
+"bitte <span weight=\"bold\">Desktop</span> → <span weight=\"bold"
+"\">Einstellungen</span> → <span weight=\"bold\">E-Mail-Eingangsüberwachnung</"
+"span> (auf einigen Systemen auch <span weight=\"bold\">Anwendungen</span> → "
+"<span weight=\"bold\">Desktop-Einstellungen</span> → <span weight=\"bold\">E-"
+"Mail-Eingansüberwachung</span>)."
#: ui/welcome.glade.h:8
msgid "_Configure Mail Notification"
@@ -1774,6 +2009,9 @@ msgstr "Die E-Mail-Eingangsüberwachung anpassen"
msgid "_Skip configuration"
msgstr "Konfiguration über_springen"
+#~ msgid "received non-ASCII data from server"
+#~ msgstr "Vom Server wurden nicht-ASCII-Daten übermittelt"
+
#~ msgid ""
#~ "As a fallback, they will be checked approximately every %i minute (this "
#~ "delay is configurable from the Properties Dialog).As a fallback, they "
diff --git a/po/fr.gmo b/po/fr.gmo
Binary files differ.
diff --git a/po/fr.po b/po/fr.po
@@ -1,17 +1,17 @@
# French translations for mail-notification.
-# Copyright (c) 2003, 2004 Jean-Yves Lefort.
+# Copyright (C) 2003-2005 Jean-Yves Lefort.
#
# This file is distributed under the same license as the
# mail-notification package.
#
-# Jean-Yves Lefort <jylefort@brutele.be>, 2004.
+# Jean-Yves Lefort <jylefort@brutele.be>, 2005.
#
msgid ""
msgstr ""
-"Project-Id-Version: mail-notification 1.0\n"
+"Project-Id-Version: mail-notification 1.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
-"PO-Revision-Date: 2004-11-25 01:40+0100\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\n"
+"PO-Revision-Date: 2005-03-06 22:30+0100\n"
"Last-Translator: Jean-Yves Lefort <jylefort@brutele.be>\n"
"Language-Team: Jean-Yves Lefort <jylefort@brutele.be>\n"
"MIME-Version: 1.0\n"
@@ -27,14 +27,14 @@ msgstr "automation Notification de Courrier"
msgid "Mail Notification automation factory"
msgstr "usine d'automation Notification de Courrier"
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
msgid "Configure Mail Notification"
msgstr "Configurer la Notification de Courrier"
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
msgstr "Notification de Courrier"
@@ -85,91 +85,100 @@ msgid "Has already been run"
msgstr "A déjà été exécuté"
#: data/mail-notification.schemas.in.h:11
-msgid "Height of mail summary dialog"
-msgstr "Hauteur de la boîte de dialogue contenant l'aperçu du courrier"
+msgid "Height of edit toolbars dialog"
+msgstr "Hauteur de la boîte de dialogue contenant l'éditeur de barres d'outils"
#: data/mail-notification.schemas.in.h:12
+msgid "Height of main window"
+msgstr "Hauteur de la fenêtre principale"
+
+#: data/mail-notification.schemas.in.h:13
msgid "Height of properties dialog"
msgstr "Hauteur de la boîte de dialogue contenant les propriétés"
-#: data/mail-notification.schemas.in.h:13
+#: data/mail-notification.schemas.in.h:14
msgid "Mail read command"
msgstr "Commande de courrier lu"
-#: data/mail-notification.schemas.in.h:14
+#: data/mail-notification.schemas.in.h:15
msgid "Mail reader command"
msgstr "Commande de lecteur de courrier"
-#: data/mail-notification.schemas.in.h:15
+#: data/mail-notification.schemas.in.h:16
msgid "Mail summary popup contents font"
msgstr "Police du contenu du popup d'aperçu du courrier"
-#: data/mail-notification.schemas.in.h:16
+#: data/mail-notification.schemas.in.h:17
+msgid "Mail summary popup fonts aspect source"
+msgstr ""
+"Source d'aspect des polices de caractères du popup d'aperçu du courrier"
+
+#: data/mail-notification.schemas.in.h:18
msgid "Mail summary popup horizontal offset"
msgstr "Décalage horizontal du popup d'aperçu du courrier"
-#: data/mail-notification.schemas.in.h:17
+#: data/mail-notification.schemas.in.h:19
msgid "Mail summary popup position"
msgstr "Position du popup d'aperçu du courrier"
-#: data/mail-notification.schemas.in.h:18
+#: data/mail-notification.schemas.in.h:20
msgid "Mail summary popup title font"
msgstr "Police du titre du popup d'aperçu du courrier"
-#: data/mail-notification.schemas.in.h:19
+#: data/mail-notification.schemas.in.h:21
msgid "Mail summary popup vertical offset"
msgstr "Décalage vertical du popup d'aperçu du courrier"
-#: data/mail-notification.schemas.in.h:20
+#: data/mail-notification.schemas.in.h:22
msgid "Mailbox list"
msgstr "Liste des boîtes aux lettres"
-#: data/mail-notification.schemas.in.h:21
+#: data/mail-notification.schemas.in.h:23
msgid "Minutes between mail checks"
msgstr "Minutes entre les vérifications de courrier"
-#: data/mail-notification.schemas.in.h:22
+#: data/mail-notification.schemas.in.h:24
msgid "Minutes to wait before closing the mail summary popup"
msgstr "Minutes à attendre avant de fermer le popup d'aperçu du courrier"
-#: data/mail-notification.schemas.in.h:23
+#: data/mail-notification.schemas.in.h:25
msgid "New mail command"
msgstr "Commande de nouveau message"
-#: data/mail-notification.schemas.in.h:24
+#: data/mail-notification.schemas.in.h:26
msgid "Only display recent mail in mail summary popup"
msgstr ""
"Afficher uniquement le courrier récent dans le popup d'aperçu du courrier"
-#: data/mail-notification.schemas.in.h:25
+#: data/mail-notification.schemas.in.h:27
msgid "Run a command when all mail is read"
msgstr "Exécuter une commande lorsque tout le courrier est lu"
-#: data/mail-notification.schemas.in.h:26
+#: data/mail-notification.schemas.in.h:28
msgid "Run a command when new mail arrives"
msgstr "Exécuter une commande lorsque du nouveau courrier arrive"
-#: data/mail-notification.schemas.in.h:27
+#: data/mail-notification.schemas.in.h:29
msgid "Seconds between mail checks"
msgstr "Secondes entre les vérifications de courrier"
-#: data/mail-notification.schemas.in.h:28
+#: data/mail-notification.schemas.in.h:30
msgid "Seconds to wait before closing the mail summary popup"
msgstr "Secondes à attendre avant de fermer le popup d'aperçu du courrier"
-#: data/mail-notification.schemas.in.h:29
+#: data/mail-notification.schemas.in.h:31
msgid "Set a mail reader"
msgstr "Spécifier un lecteur de courrier"
-#: data/mail-notification.schemas.in.h:30
+#: data/mail-notification.schemas.in.h:32
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
"L'action à effectuer lorsque l'icône est double-clickée. Doit être \"display-"
-"mail-summary\" ou \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" ou \"update-mail-status\"."
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
@@ -177,7 +186,7 @@ msgstr ""
"La quantité de temps à attendre avant de fermer le popup d'aperçu du "
"courrier (partie minutes)."
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
@@ -185,44 +194,57 @@ msgstr ""
"La quantité de temps à attendre avant de fermer le popup d'aperçu du "
"courrier (partie secondes)."
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr ""
+"La source d'aspect des polices de caractères du popup d'aperçu du courrier. "
+"Doit être \"theme\" ou \"custom\"."
+
+#: data/mail-notification.schemas.in.h:36
msgid "The command to run to launch the mail reader."
msgstr "La commande à exécuter pour démarrer le lecteur de courrier."
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
msgid "The command to run when all mail is read."
msgstr "La commande à exécuter lorsque tout le courrier est lu"
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
msgid "The command to run when new mail arrives."
msgstr "La commande à exécuter lorsque du nouveau courrier arrive."
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr ""
"La police de caractères à utiliser pour le contenu du popup d'aperçu du "
"courrier."
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr ""
"La police de caractères à utiliser pour le titre du popup d'aperçu du "
"courrier."
-#: data/mail-notification.schemas.in.h:38
-msgid "The height of the mail summary dialog in pixels."
+#: data/mail-notification.schemas.in.h:41
+msgid "The height of the edit toolbars dialog in pixels."
msgstr ""
-"La hauteur de la boîte de dialogue contenant l'aperçu du courrier en pixels."
+"La hauteur de la boîte de dialogue contenant l'éditeur de barres d'outils en "
+"pixels."
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+msgid "The height of the main window in pixels."
+msgstr "La hauteur de la fenêtre principale en pixels."
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr "La hauteur de la boîte de dialogue contenant les propriétés en pixels."
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr "La liste des boîtes aux lettres à surveiller."
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
@@ -230,14 +252,14 @@ msgstr ""
"La liste des serveurs SSL/TLS (hôte:port) de confiance auxquels il manque un "
"certificat X509."
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr ""
"La liste des certificats X509 de confiance, représentés par leur empreinte "
"digitale."
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
@@ -245,7 +267,7 @@ msgstr ""
"Le nombre de pixels à laisser entre la gauche ou la droite de l'écran et le "
"popup d'aperçu du courrier."
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
@@ -253,72 +275,93 @@ msgstr ""
"Le nombre de pixels à laisser entre le haut ou le bas de l'écran et le popup "
"d'aperçu du courrier."
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
msgstr ""
-"La position du popup d'aperçu du courrier. Doit etre \"top-left\", \"top-"
+"La position du popup d'aperçu du courrier. Doit être \"top-left\", \"top-"
"right\", \"bottom-left\" or \"bottom-right\"."
-#: data/mail-notification.schemas.in.h:46
-msgid "The width of the mail summary dialog in pixels."
+#: data/mail-notification.schemas.in.h:50
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
msgstr ""
-"La largeur de la boîte de dialogue contenant l'aperçu du courrier en pixels."
+"Le style des barres d'outils. Doit être \"desktop-default\", \"icons\", "
+"\"text\", \"both\" ou \"both-horiz\"."
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:51
+msgid "The width of the edit toolbars dialog in pixels."
+msgstr ""
+"La largeur de la boîte de dialogue contenant l'éditeur de barres d'outils en "
+"pixels."
+
+#: data/mail-notification.schemas.in.h:52
+msgid "The width of the main window in pixels."
+msgstr "La largeur de la fenêtre principale en pixels."
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr "La largeur de la boîte de dialogue contenant les propriétés en pixels."
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr "Style des barres d'outils"
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr "Liste des serveurs de confiance"
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
-msgstr ""
-"Utiliser une police de caractères à la carte pour le contenu du popup "
-"d'aperçu du courrier"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
+msgstr "Afficher la barre d'état"
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
-msgstr ""
-"Utiliser une police de caractères à la carte pour le titre du popup d'aperçu "
-"du courrier"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
+msgstr "Afficher les barres d'outils"
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
msgstr "Si la Notification de Courrier a déjà été exécutée ou pas."
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
msgstr "Si l'icône de statut doit clignoter lors d'erreurs ou pas."
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+msgid "Whether the statusbar should be visible or not."
+msgstr "Si la barre d'état doit être visible ou pas."
+
+#: data/mail-notification.schemas.in.h:61
+msgid "Whether the toolbars should be visible or not."
+msgstr "Si les barres d'outils doivent être visibles ou pas."
+
+#: data/mail-notification.schemas.in.h:62
msgid "Whether to automatically close the mail summary popup or not."
msgstr ""
"Si le popup d'aperçu du courrier doit être automatiquement fermé ou pas."
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
"Si l'aperçu du courrier doit être affiché dans le tooltip de l'icône de "
"statut ou pas."
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
msgid "Whether to display the mail summary popup when new mail arrives or not."
msgstr ""
"Si le popup d'aperçu du courrier doit être affiché lorsque du nouveau "
"courrier arrive ou pas."
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
"Si le courrier précédemment affiché dans le popup d'aperçu du courrier doit "
"être caché ou pas."
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
@@ -326,40 +369,29 @@ msgstr ""
"Si il faut empêcher la boîte de dialogue contenant l'erreur de notification "
"immédiate de s'afficher ou pas."
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
msgid "Whether to run a command when all mail is read or not."
msgstr ""
"Si une commande doit être exécutée lorsque tout le courrier est lu ou pas."
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
msgid "Whether to run a command when new mail arrives or not."
msgstr ""
"Si une commande doit être exécutée lorsque du nouveau courrier arrive ou pas."
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
msgid "Whether to set a mail reader or not."
msgstr "Si un lecteur de courrier est spécifié ou pas."
-#: data/mail-notification.schemas.in.h:61
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
-msgstr ""
-"Si une police de caractères à la carte doit être utilisée pour le contenu du "
-"popup d'aperçu du courrier ou pas."
-
-#: data/mail-notification.schemas.in.h:62
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
-msgstr ""
-"Si une police de caractères à la carte doit être utilisée pour le titre du "
-"popup d'aperçu du courrier ou pas."
+#: data/mail-notification.schemas.in.h:70
+msgid "Width of edit toolbars dialog"
+msgstr "Largeur de la boîte de dialogue contenant l'éditeur de barres d'outils"
-#: data/mail-notification.schemas.in.h:63
-msgid "Width of mail summary dialog"
-msgstr "Largeur de la boîte de dialogue contenant l'aperçu du courrier"
+#: data/mail-notification.schemas.in.h:71
+msgid "Width of main window"
+msgstr "Largeur de la fenêtre principale"
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr "Largeur de la boîte de dialogue contenant les propriétés"
@@ -367,6 +399,22 @@ msgstr "Largeur de la boîte de dialogue contenant les propriétés"
msgid "New Mail"
msgstr "Nouveau Courrier"
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr "_Enlever la Barre d'Outils"
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr "Séparateur"
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+"Glissez un élément sur la barre d'outils pour l'y ajouter, et de celle-ci "
+"vers le tableau d'icônes pour l'en enlever."
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr "Orientation"
@@ -375,20 +423,20 @@ msgstr "Orientation"
msgid "The orientation of the tray."
msgstr "L'orientation du plateau."
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr "Une Icône de Notification de Courrier"
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr "Jean-Yves Lefort <jylefort@brutele.be>"
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
msgstr "<span style=\"italic\">autodétecter</span>"
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -402,12 +450,12 @@ msgstr ""
"\n"
"Veuillez à nouveau saisir votre mot de passe."
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr "Entrez votre mot de passe pour la boîte aux lettres %s %s."
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -420,11 +468,11 @@ msgstr ""
"\n"
"%s"
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr "_Emplacement:"
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr "_Parcourir..."
@@ -432,7 +480,7 @@ msgstr "_Parcourir..."
msgid "The URI of the mailbox"
msgstr "L'URI de la boîte aux lettres"
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr "Sélectionnez un Fichier ou Dossier"
@@ -569,81 +617,80 @@ msgstr "impossible de lire depuis le serveur: EOF"
msgid "unable to decode data using SASL: %s"
msgstr "impossible de décoder les données en utilisant SASL: %s"
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr "impossible d'encoder les données en utilisant SASL: %s"
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr "impossible d'écrire vers le serveur: %s"
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr "impossible d'écrire vers le serveur: EOF"
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr "impossible d'encoder en Base64: %s"
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr "impossible d'initialiser la bibliothèque SASL: %s"
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr "impossible d'obtenir l'adresse locale du socket: %s"
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr "impossible d'obtenir l'adresse distante du socket: %s"
-#: src/mn-client-session.c:974
+#: src/mn-client-session.c:971
#, c-format
-msgid "warning: unable to set SASL security properties: %s"
-msgstr ""
-"avertissement: impossible de spécifier les propriétés de sécurité SASL: %s"
+msgid "unable to set SASL security properties: %s"
+msgstr "impossible de spécifier les propriétés de sécurité SASL: %s"
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr ""
"impossible de démarrer l'authentification SASL: SASL a demandé quelque chose "
"que nous ne connaissions pas"
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr "impossible de démarrer l'authentification SASL: %s"
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr "impossible de créer une connection SASL: %s"
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr ""
"SASL a demandé quelque chose que nous ne connaissions pas, annulation de "
"l'authentification SASL"
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr "%s, annulation de l'authentification SASL"
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr "impossible de décoder l'entrée Base64 du serveur: %s"
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
@@ -651,7 +698,7 @@ msgstr ""
"le serveur a envoyé un défi SASL, mais il y avait une réponse client SASL "
"initiale en attente"
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
@@ -659,41 +706,50 @@ msgstr ""
"le serveur n'a pas envoyé de défi SASL, mais il n'y avait pas de réponse "
"client SASL initiale en attente"
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr ""
"une couche de sécurité SASL de facteur de force %i est maintenant active"
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr "impossible d'obtenir la propriété SASL_MAXOUTBUF: %s"
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr "avertissement: impossible d'obtenir la propriété SASL_SSF: %s"
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+msgid "A directory creation error has occurred"
+msgstr "Une erreur de création de répertoire s'est produite"
+
+#: src/mn-conf.c:239
+#, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr "Impossible de créer le répertoire \"%s\": %s."
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr "en train de supprimer récursivement %s"
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr "en train de synchroniser la base de données GConf"
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr "terminé"
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr "Votre nom d'utilisateur Gmail"
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
@@ -701,36 +757,59 @@ msgstr ""
"Votre mot de passe Gmail (si laissé vide, le mot de passe vous sera demandé "
"en temps utile)"
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr "libsoup n'a pas été compilé avec le support SSL/TLS"
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, c-format
msgid "unable to parse URI \"%s\""
msgstr "impossible d'interpréter l'URI \"%s\""
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr "des données non-UTF-8 ont été reçues du serveur"
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr "impossible de transférer des données: %s"
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr "ouverture de session en cours"
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr "l'ouverture de session a échoué"
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr "recherche du courrier non lu"
#: src/mn-gmail-mailbox.gob:527
+msgid "unable to initialize the ICU library"
+msgstr "impossible d'initialiser la bibliothèque ICU"
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr "impossible d'interpréter les données Gmail"
+#: src/mn-gmail-mailbox.gob:891
+#, c-format
+msgid "unable to open calendar: %s"
+msgstr "impossible d'ouvrir le calendrier: %s"
+
+#: src/mn-gmail-mailbox.gob:899
+#, c-format
+msgid "unable to set calendar time: %s"
+msgstr "impossible de spécifier l'heure du calendrier: %s"
+
+#: src/mn-gmail-mailbox.gob:968
+#, c-format
+msgid "unable to get calendar time: %s"
+msgstr "impossible d'obtenir l'heure du calendrier: %s"
+
#: src/mn-gmime-stream-vfs.gob:49
#, c-format
msgid "unable to read %s: %s"
@@ -756,19 +835,19 @@ msgstr "impossible de dire la position de %s: %s"
msgid "unable to close %s: %s"
msgstr "impossible de fermer %s: %s"
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr "Boîte aux lettres:"
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr "_boîte de réception"
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr "autr_e:"
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr "Utili_ser le mode idle si possible"
@@ -801,52 +880,47 @@ msgstr "Le nom de la boîte aux lettres"
msgid "If possible, whether to use idle mode or not"
msgstr "Si possible, si le mode idle doit être utilisé ou pas"
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
msgstr "le support SSL/TLS n'a pas été inclus lors de la compilation"
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr "le serveur n'a pas envoyé ses possibilités"
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr ""
"le serveur a annoncé LOGINDISABLED, pas d'utilisation de l'authentification "
"LOGIN"
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr "impossible d'ouvrir la session"
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
msgid "server did not send search results"
msgstr "le serveur n'a pas envoyé les résultats de la recherche"
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
msgid "server did not send all the messages we requested"
msgstr "le serveur n'a pas envoyé tous les messages que nous avons demandé"
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
msgid "unable to fetch message"
msgstr "impossible d'obtenir le message"
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr "le serveur n'a pas envoyé de statut"
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr "erreur serveur inconnue"
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr "le serveur ne supporte pas le mode SSL/TLS interne"
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
@@ -854,24 +928,28 @@ msgstr ""
"un mécanisme d'authentification SASL a été sélectionné mais le support SASL "
"n'a pas été inclus lors de la compilation"
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr "mécanisme d'authentification inconnu \"%s\""
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
msgstr "rétrogradation vers l'authentification IMAP LOGIN"
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
msgstr "l'authentification a échoué"
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
-msgstr "_Exécuter le Lecteur de Courrier"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
+msgstr "_Fenêtre Principale"
+
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+msgid "_Mail Reader"
+msgstr "_Lecteur de Courrier"
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
msgstr "_Mettre à Jour"
@@ -879,20 +957,20 @@ msgstr "_Mettre à Jour"
msgid "R_emove From Notification Area"
msgstr "_Enlever de l'Aire de Notification"
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
msgstr "Ajouter une Boîte aux Lettres"
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr "Propriétés de %s"
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
msgstr "_Nom d'utilisateur:"
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr "_Mot de passe:"
@@ -932,61 +1010,57 @@ msgstr "Complet"
msgid "Whether the properties are completely filled or not"
msgstr "Si les propriétés sont complètement remplies ou pas"
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr "Boîte aux lettres"
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr "Format"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr "Impossible d'ajouter la boîte aux lettres"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr "La boîte aux lettres est déjà dans la liste."
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr "L'URI de la boîte aux lettres"
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr "Le nom, lisible par un humain, de la boîte aux lettres"
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
msgid "Whether the mailbox has to be polled or not"
msgstr "Si la boîte aux lettres doit être vérifiée explicitement ou pas"
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr "Si la boîte aux lettres a du nouveau courrier ou pas"
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr "La liste des objets MNMessage neufs et non lus"
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr "L'erreur de la boîte aux lettres si il y en a une"
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr "n'existe pas"
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr "format inconnu"
-#: src/mn-mailbox.gob:407
+#: src/mn-mailbox.gob:403
#, c-format
-msgid "unable to enable immediate notification for %s: %s"
-msgstr "impossible d'activer la notification immédiate pour %s: %s"
+msgid "unable to enable immediate notification: %s"
+msgstr "impossible d'activer la notification immédiate: %s"
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -1001,7 +1075,7 @@ msgstr[1] ""
"Comme solution de secours, elles seront vérifiées toutes les %i secondes (ce "
"délai est configurable depuis les Propriétés)."
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -1016,7 +1090,7 @@ msgstr[1] ""
"Comme solution de secours, elles seront vérifiées toutes les %i minutes (ce "
"délai est configurable depuis les Propriétés)."
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -1031,11 +1105,11 @@ msgstr[1] ""
"Comme solution de secours, elles seront vérifiées approximativement toutes "
"les %i minutes (ce délai est configurable depuis les Propriétés)."
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr "Une erreur de surveillance s'est produite"
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
@@ -1044,101 +1118,253 @@ msgstr ""
"La Notification de Courrier n'a pas été en mesure d'activer la notification "
"immédiate pour une ou plusieures boîtes aux lettres. %s"
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr ""
"Si une ou plusieurs boîtes aux lettres doivent être vérifiées explicitement"
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
msgstr "%s n'est pas pris en charge: %s"
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has new mail"
-msgstr "%s a du nouveau courrier"
-
-#: src/mn-mailboxes.gob:304
+#: src/mn-mailboxes.gob:290
#, c-format
-msgid "%s has no new mail"
-msgstr "%s n'a pas de nouveau courrier"
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] "%s a %i nouveau message"
+msgstr[1] "%s a %i nouveaux messages"
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr "%s a indiqué une erreur: %s"
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr "impossible d'ouvrir le dossier \"new\": %s"
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr "impossible de fermer le dossier \"new\": %s"
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr "erreur lors de la lecture du dossier \"new\": %s"
+#. Toplevel
+#: src/mn-main-window.c:92
+msgid "_Mail"
+msgstr "_Courrier"
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr "_Edition"
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr "Afficha_ge"
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr "_Aide"
+
+#: src/mn-main-window.c:103
+msgid "Launch the mail reader"
+msgstr "Exécuter le lecteur de courrier"
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr "Mettre à jour le statut du courrier"
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr "_Fermer"
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr "Fermer cette fenêtre"
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr "_Quitter"
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+msgid "Quit Mail Notification"
+msgstr "Quitter la Notification de Courrier"
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr "_Barres d'Outils"
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr "Personnaliser les barres d'outils"
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr "_Préférences"
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr "Styl_e des Barres d'Outils"
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr "Personnaliser le style des barres d'outils"
+
+#: src/mn-main-window.c:163
+msgid "_Contents"
+msgstr "_Contenu"
+
+#: src/mn-main-window.c:165
+msgid "Display help"
+msgstr "Afficher l'aide"
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr "_A Propos"
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr "Afficher les crédits"
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr "Afficher ou cacher les barres d'outils"
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr "Barre d'_Etat"
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr "Afficher ou cacher la barre d'état"
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr "Valeur par Défaut du _Bureau"
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr ""
+"Utiliser la valeur par défaut du bureau pour le style des barres d'outils"
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr "Seulement _Icônes"
+
+#: src/mn-main-window.c:215
+msgid "Only display the toolbars icons"
+msgstr "Afficher uniquement les icônes des barres d'outils"
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr "Seulement _Texte"
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr "Afficher uniquement le texte des barres d'outils"
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr "Texte en _Dessous des Icônes"
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr "Afficher le texte des barres d'outils en dessous des icônes"
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr "Texte à _Côté des Icônes"
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr "Afficher le texte des barres d'outils à côté des icônes"
+
+#: src/mn-main-window.c:363
+#, c-format
+msgid "unable to load menus.xml: %s"
+msgstr "impossible de charger menus.xml: %s"
+
+#: src/mn-main-window.c:398
+msgid "Help messages"
+msgstr "Messages d'aide"
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr "Messages de comptes"
+
+#: src/mn-main-window.c:503
+#, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] "%i nouveau message"
+msgstr[1] "%i nouveaux messages"
+
+#: src/mn-main-window.c:540
+msgid "unable to load toolbars.xml"
+msgstr "impossible de charger toolbars.xml"
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr "Prises en charge de boîtes aux lettres disponibles: %s\n"
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr "timestamps Gmail"
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr "Fonctionnalités disponibles: %s\n"
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr "Activer la sortie informationnelle"
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
-msgstr "Afficher les fonctionnalités disponibles et quitter"
+#: src/mn-main.c:185
+msgid "List the compiled-in features"
+msgstr "Afficher les fonctionnalités disponibles"
-#: src/mn-main.c:193
-msgid "Display the mail summary dialog"
-msgstr "Afficher la boîte de dialogue contenant l'aperçu du courrier"
+#: src/mn-main.c:194
+msgid "Display the main window"
+msgstr "Afficher la fenêtre principale"
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr "Afficher la boîte de dialogue contenant les propriétés"
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr "Afficher la boîte de dialogue \"à propos\""
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr "Fermer le popup d'aperçu du courrier"
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr "Mettre à jour le statut du courrier"
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr "Rapporter le statut du courrier"
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
-msgstr "Supprimer la configuration GConf obsolète et quitter"
+#: src/mn-main.c:248
+msgid "Unset obsolete GConf configuration"
+msgstr "Supprimer la configuration GConf obsolète"
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr "le multi-threading n'est pas disponible"
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
@@ -1146,19 +1372,27 @@ msgstr ""
"Bonobo n'a pas pu localiser l'objet automation. Veuillez vérifier votre "
"installation de la Notification de Courrier."
-#: src/mn-main.c:325
+#: src/mn-main.c:344
+msgid "quitting Mail Notification"
+msgstr "en train de quitter la Notification de Courrier"
+
+#: src/mn-main.c:348
+msgid "Mail Notification is not running"
+msgstr "La Notification de Courrier n'est pas en cours d'exécution"
+
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr "Impossible d'initialiser la bibliothèque GnomeVFS."
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr "mise à jour du statut du courrier"
-#: src/mn-main.c:379
+#: src/mn-main.c:409
msgid "Mail Notification is already running"
msgstr "La Notification de Courrier est déjà en cours d'exécution"
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
@@ -1166,7 +1400,7 @@ msgstr ""
"Bonobo n'a pas pu localiser le fichier GNOME_MailNotification_Automation."
"server. Veuillez vérifier votre installation de la Notification de Courrier."
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
@@ -1174,81 +1408,80 @@ msgstr ""
"Bonobo n'a pas été en mesure d'inscrire le serveur d'automation. Veuillez "
"vérifier votre installation de la Notification de Courrier."
-#: src/mn-mbox-mailbox.gob:221
-#, c-format
-msgid "error while reading mailbox: %s"
-msgstr "erreur lors de la lecture de la boîte aux lettres: %s"
-
-#: src/mn-mbox-mailbox.gob:230
+#: src/mn-mbox-mailbox.gob:184
#, c-format
msgid "unable to open mailbox: %s"
msgstr "impossible d'ouvrir la boîte aux lettres: %s"
-#: src/mn-message-box.gob:64
+#: src/mn-message-mime.c:105
+msgid "unable to parse MIME message"
+msgstr "impossible d'interpréter le message MIME"
+
+#: src/mn-message-view.gob:81
+msgid "You have no new mail."
+msgstr "Vous n'avez pas de nouveau courrier."
+
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr "Message non lisible"
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr "De"
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr "Sujet"
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr "Envoyé"
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
msgstr[0] "il y a %i seconde"
msgstr[1] "il y a %i secondes"
-#: src/mn-message-box.gob:196
+#: src/mn-message.gob:130
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
-msgstr[0] "il y a %i minute"
-msgstr[1] "il y a %i minutes"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
+msgstr[0] "il y a approximativement %i minute"
+msgstr[1] "il y a approximativement %i minutes"
-#: src/mn-message-box.gob:201
+#: src/mn-message.gob:135
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
-msgstr[0] "il y a %i heure"
-msgstr[1] "il y a %i heures"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
+msgstr[0] "il y a approximativement %i heure"
+msgstr[1] "il y a approximativement %i heures"
-#: src/mn-message-box.gob:206
+#: src/mn-message.gob:140
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
-msgstr[0] "il y a %i jour"
-msgstr[1] "il y a %i jours"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
+msgstr[0] "il y a approximativement %i jour"
+msgstr[1] "il y a approximativement %i jours"
-#: src/mn-message-box.gob:211
+#: src/mn-message.gob:145
#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
-msgstr[0] "il y a %i semaine"
-msgstr[1] "il y a %i semaines"
-
-#: src/mn-message-mime.c:105
-msgid "unable to parse MIME message"
-msgstr "impossible d'interpréter le message MIME"
-
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr "Inconnu"
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
+msgstr[0] "il y a approximativement %i semaine"
+msgstr[1] "il y a approximativement %i semaines"
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr "erreur lors de la lecture de .mh_sequences: %s"
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr "impossible d'ouvrir .mh_sequences: %s"
@@ -1257,23 +1490,23 @@ msgstr "impossible d'ouvrir .mh_sequences: %s"
msgid "detecting"
msgstr "en cours de détection"
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
msgstr "Nom d'_hôte:"
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr "_Détails"
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
msgstr "sta_ndard"
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
msgstr "SSL/TLS _interne"
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr "SSL/TLS sur port sépa_ré"
@@ -1297,77 +1530,77 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr "Le numéro de port du serveur POP3"
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr "arguments invalides pour la possibilité LOGIN-DELAY"
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
msgid "unknown error"
msgstr "erreur inconnue"
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
msgstr[0] "attente de %i seconde afin d'obéir à LOGIN-DELAY"
msgstr[1] "attente de %i secondes afin d'obéir à LOGIN-DELAY"
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr "le serveur ne supporte pas l'authentification APOP"
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr "rétrogradation vers l'authentification APOP"
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr "rétrogradation vers l'authentification USER/PASS"
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
msgid "top left"
msgstr "en haut à gauche"
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
msgstr "en haut à droite"
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
msgstr "en bas à gauche"
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
msgstr "en bas à droite"
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
msgstr "Pas de boîte aux lettres sélectionnée."
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, 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-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
msgstr "Vous avez du nouveau courrier."
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
msgstr "Boîtes aux Lettres Ayant du Nouveau Courrier"
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr "Erreurs"
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
msgid "Unsupported Mailboxes"
msgstr "Boîtes aux Lettres Non Supportées"
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
msgstr "Aperçu du Courrier"
@@ -1385,20 +1618,20 @@ msgid "Select _All"
msgstr "Sélectionner _Tout"
#: src/mn-stock.c:29
-msgid "_Mail Summary"
-msgstr "_Aperçu du Courrier"
+msgid "Leave Fullscreen"
+msgstr "Quitter le Mode Plein Ecran"
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr "impossible d'ouvrir le dossier: %s"
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr "impossible de fermer le dossier: %s"
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr "erreur lors de la lecture du dossier: %s"
@@ -1430,100 +1663,108 @@ msgstr "La raison pour laquelle la boîte aux lettres n'est pas prise en charge"
msgid "unsupported"
msgstr "non pris en charge"
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr "erreur de chargement d'image: %s"
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr "élément \"%s\" non trouvé dans interface \"%s\""
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr "une liste d'URI invalide a été reçue"
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr "une URL Mozilla invalide a été reçue"
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr "Impossible d'afficher l'aide"
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr "Impossible de créer un thread: %s."
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr "_Ne plus afficher ce message"
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr "Une erreur fatale s'est produite dans la Notification de Courrier"
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, c-format
msgid "unable to get current time: %s"
msgstr "impossible d'obtenir l'heure courante: %s"
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr "spécification de signal \"%s\" invalide"
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr "Une erreur de commande s'est produite dans la Notification de Courrier"
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, c-format
msgid "Unable to execute \"%s\": %s."
msgstr "Impossible d'exécuter \"%s\": %s"
#: ui/authentication.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: ui/authentication.glade.h:2
msgid "_Authenticate"
msgstr "S'_Authentifier"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr "Editer les Barres d'Outils"
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr "_Ajouter une Nouvelle Barre d'Outils"
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
+msgstr "_Par Défaut"
+
#: ui/mailbox-properties.glade.h:1
msgid "_Mailbox type:"
msgstr "_Type de boîte aux lettres:"
#: ui/properties.glade.h:1
-msgid " "
-msgstr " "
-
-#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Commands</span>"
msgstr "<span weight=\"bold\">Commandes</span>"
-#: ui/properties.glade.h:3
+#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Double-click Action</span>"
msgstr "<span weight=\"bold\">Action du Double-Click</span>"
-#: ui/properties.glade.h:4
+#: ui/properties.glade.h:3
msgid "<span weight=\"bold\">Fonts</span>"
msgstr "<span weight=\"bold\">Polices de Caractères</span>"
-#: ui/properties.glade.h:5
+#: ui/properties.glade.h:4
msgid "<span weight=\"bold\">General</span>"
msgstr "<span weight=\"bold\">Général</span>"
-#: ui/properties.glade.h:6
+#: ui/properties.glade.h:5
msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr "<span weight=\"bold\">Liste des Boîtes aux Lettres</span>"
-#: ui/properties.glade.h:7
+#: ui/properties.glade.h:6
msgid "<span weight=\"bold\">Position</span>"
msgstr "<span weight=\"bold\">Position</span>"
+#: ui/properties.glade.h:7
+msgid "Co_ntents:"
+msgstr "Co_ntenu:"
+
#: ui/properties.glade.h:8
msgid "Dis_play mail summary in tooltip"
msgstr "Afficher l'a_perçu du courrier dans le tooltip"
@@ -1594,53 +1835,57 @@ msgstr ""
"d'aperçu du courrier"
#: ui/properties.glade.h:23
+msgid "Use these _fonts:"
+msgstr "Utiliser ces _polices de caractères:"
+
+#: ui/properties.glade.h:24
msgid "When _all mail is read:"
msgstr "Quand _tout le courrier est lu:"
-#: ui/properties.glade.h:24
+#: ui/properties.glade.h:25
msgid "When _new mail arrives:"
msgstr "Quand du _nouveau courrier arrive:"
-#: ui/properties.glade.h:25
+#: ui/properties.glade.h:26
msgid "Whether the status icon should blink on errors or not"
msgstr "Si l'icône de statut doit clignoter lors d'erreurs ou pas"
-#: ui/properties.glade.h:26
+#: ui/properties.glade.h:27
msgid "Whether to automatically close the mail summary popup or not"
msgstr ""
"Si le popup d'aperçu du courrier doit être automatiquement fermé ou pas"
-#: ui/properties.glade.h:27
+#: ui/properties.glade.h:28
msgid "Whether to display the mail summary in the status icon tooltip or not"
msgstr ""
"Si l'aperçu du courrier doit être affiché dans le tooltip de l'icône de "
"statut ou pas"
-#: ui/properties.glade.h:28
+#: ui/properties.glade.h:29
msgid "Whether to display the mail summary popup when new mail arrives or not"
msgstr ""
"Si le popup d'aperçu du courrier doit être affiché lorsque du nouveau "
"courrier arrive ou pas"
-#: ui/properties.glade.h:29
+#: ui/properties.glade.h:30
msgid "Whether to hide previously displayed mail or not"
msgstr "Si le courrier précédemment affiché doit être caché ou pas"
-#: ui/properties.glade.h:30
+#: ui/properties.glade.h:31
msgid "Whether to run a command when all mail is read or not"
msgstr ""
"Si une commande doit être exécutée lorsque tout le courrier est lu ou pas"
-#: ui/properties.glade.h:31
+#: ui/properties.glade.h:32
msgid "Whether to run a command when new mail arrives or not"
msgstr ""
"Si une commande doit être exécutée lorsque du nouveau courrier arrive ou pas"
-#: ui/properties.glade.h:32
+#: ui/properties.glade.h:33
msgid "Whether to set a mail reader or not"
msgstr "Si un lecteur de courrier est spécifié ou pas"
-#: ui/properties.glade.h:33
+#: ui/properties.glade.h:34
msgid ""
"Whether to start Mail Notification when you log into your GNOME session or "
"not"
@@ -1648,61 +1893,50 @@ msgstr ""
"Si la Notification de Courrier doit être démarrée lorsque vous ouvrez votre "
"session GNOME ou pas"
-#: ui/properties.glade.h:34
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not"
-msgstr ""
-"Si une police de caractères à la carte doit être utilisée pour le contenu du "
-"popup d'aperçu du courrier ou pas"
-
#: ui/properties.glade.h:35
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
-msgstr ""
-"Si une police de caractères à la carte doit être utilisée pour le titre du "
-"popup d'aperçu du courrier ou pas"
-
-#: ui/properties.glade.h:36
msgid "_Automatically close after:"
msgstr "_Fermer automatiquement après:"
-#: ui/properties.glade.h:37
+#: ui/properties.glade.h:36
msgid "_Blink on errors"
msgstr "_Clignoter lors d'erreurs"
-#: ui/properties.glade.h:38
-msgid "_Contents font:"
-msgstr "Police du _contenu:"
-
-#: ui/properties.glade.h:39
+#: ui/properties.glade.h:37
msgid "_Delay between mail checks:"
msgstr "_Délai entre les vérifications de courrier:"
-#: ui/properties.glade.h:40
-msgid "_Display the mail summary dialog"
-msgstr "_Afficher la boîte de dialogue contenant l'aperçu du courrier"
+#: ui/properties.glade.h:38
+msgid "_Display the main window"
+msgstr "_Afficher la fenêtre principale"
-#: ui/properties.glade.h:41
+#: ui/properties.glade.h:39
msgid "_Enable mail summary popup"
msgstr "_Activer le popup d'aperçu du courrier"
-#: ui/properties.glade.h:42
+#: ui/properties.glade.h:40
msgid "_Launch the mail reader"
msgstr "_Exécuter le lecteur de courrier"
-#: ui/properties.glade.h:43
+#: ui/properties.glade.h:41
msgid "_Mail reader:"
msgstr "_Lecteur de courrier:"
-#: ui/properties.glade.h:44
+#: ui/properties.glade.h:42
msgid "_Start Mail Notification on GNOME login"
msgstr ""
"_Démarrer la Notification de Courrier lors de l'ouverture de session GNOME"
+#: ui/properties.glade.h:43
+msgid "_Title:"
+msgstr "_Titre:"
+
+#: ui/properties.glade.h:44
+msgid "_Update the mail status"
+msgstr "_Mettre à jour le statut du courrier"
+
#: ui/properties.glade.h:45
-msgid "_Title font:"
-msgstr "Police du _titre:"
+msgid "_Use fonts from theme"
+msgstr "_Utiliser les polices de caractères du thème"
#: ui/properties.glade.h:46
msgid "_Vertical offset:"
@@ -1730,7 +1964,7 @@ msgid ""
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
@@ -1744,7 +1978,7 @@ msgstr ""
"La Notification de Courrier a été chargée avec succès.\n"
"\n"
"Etant donné que c'est la première fois que vous utilisez la Notification de "
-"Courrier, vous voudrez probablement la configurer.\n"
+"Courrier, il est nécessaire que vous la configuriez.\n"
"\n"
"Note: ce message ne sera plus affiché à nouveau. Pour configurer la "
"Notification de Courrier ultérieurement, choisissez <span weight=\"bold"
diff --git a/po/mail-notification.pot b/po/mail-notification.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\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"
@@ -25,14 +25,14 @@ msgstr ""
msgid "Mail Notification automation factory"
msgstr ""
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
msgid "Configure Mail Notification"
msgstr ""
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
msgstr ""
@@ -81,239 +81,272 @@ msgid "Has already been run"
msgstr ""
#: data/mail-notification.schemas.in.h:11
-msgid "Height of mail summary dialog"
+msgid "Height of edit toolbars dialog"
msgstr ""
#: data/mail-notification.schemas.in.h:12
-msgid "Height of properties dialog"
+msgid "Height of main window"
msgstr ""
#: data/mail-notification.schemas.in.h:13
-msgid "Mail read command"
+msgid "Height of properties dialog"
msgstr ""
#: data/mail-notification.schemas.in.h:14
-msgid "Mail reader command"
+msgid "Mail read command"
msgstr ""
#: data/mail-notification.schemas.in.h:15
-msgid "Mail summary popup contents font"
+msgid "Mail reader command"
msgstr ""
#: data/mail-notification.schemas.in.h:16
-msgid "Mail summary popup horizontal offset"
+msgid "Mail summary popup contents font"
msgstr ""
#: data/mail-notification.schemas.in.h:17
-msgid "Mail summary popup position"
+msgid "Mail summary popup fonts aspect source"
msgstr ""
#: data/mail-notification.schemas.in.h:18
-msgid "Mail summary popup title font"
+msgid "Mail summary popup horizontal offset"
msgstr ""
#: data/mail-notification.schemas.in.h:19
-msgid "Mail summary popup vertical offset"
+msgid "Mail summary popup position"
msgstr ""
#: data/mail-notification.schemas.in.h:20
-msgid "Mailbox list"
+msgid "Mail summary popup title font"
msgstr ""
#: data/mail-notification.schemas.in.h:21
-msgid "Minutes between mail checks"
+msgid "Mail summary popup vertical offset"
msgstr ""
#: data/mail-notification.schemas.in.h:22
-msgid "Minutes to wait before closing the mail summary popup"
+msgid "Mailbox list"
msgstr ""
#: data/mail-notification.schemas.in.h:23
-msgid "New mail command"
+msgid "Minutes between mail checks"
msgstr ""
#: data/mail-notification.schemas.in.h:24
-msgid "Only display recent mail in mail summary popup"
+msgid "Minutes to wait before closing the mail summary popup"
msgstr ""
#: data/mail-notification.schemas.in.h:25
-msgid "Run a command when all mail is read"
+msgid "New mail command"
msgstr ""
#: data/mail-notification.schemas.in.h:26
-msgid "Run a command when new mail arrives"
+msgid "Only display recent mail in mail summary popup"
msgstr ""
#: data/mail-notification.schemas.in.h:27
-msgid "Seconds between mail checks"
+msgid "Run a command when all mail is read"
msgstr ""
#: data/mail-notification.schemas.in.h:28
-msgid "Seconds to wait before closing the mail summary popup"
+msgid "Run a command when new mail arrives"
msgstr ""
#: data/mail-notification.schemas.in.h:29
-msgid "Set a mail reader"
+msgid "Seconds between mail checks"
msgstr ""
#: data/mail-notification.schemas.in.h:30
+msgid "Seconds to wait before closing the mail summary popup"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:31
+msgid "Set a mail reader"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:32
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
msgstr ""
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
msgstr ""
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:36
msgid "The command to run to launch the mail reader."
msgstr ""
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
msgid "The command to run when all mail is read."
msgstr ""
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
msgid "The command to run when new mail arrives."
msgstr ""
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:38
-msgid "The height of the mail summary dialog in pixels."
+#: data/mail-notification.schemas.in.h:41
+msgid "The height of the edit toolbars dialog in pixels."
msgstr ""
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+msgid "The height of the main window in pixels."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr ""
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr ""
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
msgstr ""
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr ""
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
msgstr ""
-#: data/mail-notification.schemas.in.h:46
-msgid "The width of the mail summary dialog in pixels."
+#: data/mail-notification.schemas.in.h:50
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
msgstr ""
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:51
+msgid "The width of the edit toolbars dialog in pixels."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:52
+msgid "The width of the main window in pixels."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr ""
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr ""
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
msgstr ""
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
msgstr ""
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+msgid "Whether the statusbar should be visible or not."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:61
+msgid "Whether the toolbars should be visible or not."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:62
msgid "Whether to automatically close the mail summary popup or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
msgid "Whether to display the mail summary popup when new mail arrives or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
msgid "Whether to run a command when all mail is read or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
msgid "Whether to run a command when new mail arrives or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
msgid "Whether to set a mail reader or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:61
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
+#: data/mail-notification.schemas.in.h:70
+msgid "Width of edit toolbars dialog"
msgstr ""
-#: data/mail-notification.schemas.in.h:62
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
+#: data/mail-notification.schemas.in.h:71
+msgid "Width of main window"
msgstr ""
-#: data/mail-notification.schemas.in.h:63
-msgid "Width of mail summary dialog"
-msgstr ""
-
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr ""
@@ -321,6 +354,20 @@ msgstr ""
msgid "New Mail"
msgstr ""
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr ""
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr ""
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr ""
@@ -329,20 +376,20 @@ msgstr ""
msgid "The orientation of the tray."
msgstr ""
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr ""
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr ""
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
msgstr ""
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -351,12 +398,12 @@ msgid ""
"Please re-enter your password."
msgstr ""
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr ""
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -365,11 +412,11 @@ msgid ""
"%s"
msgstr ""
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr ""
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr ""
@@ -377,7 +424,7 @@ msgstr ""
msgid "The URI of the mailbox"
msgstr ""
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr ""
@@ -507,156 +554,188 @@ msgstr ""
msgid "unable to decode data using SASL: %s"
msgstr ""
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr ""
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr ""
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr ""
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr ""
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr ""
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr ""
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr ""
-#: src/mn-client-session.c:974
+#: src/mn-client-session.c:971
#, c-format
-msgid "warning: unable to set SASL security properties: %s"
+msgid "unable to set SASL security properties: %s"
msgstr ""
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr ""
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr ""
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr ""
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr ""
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr ""
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr ""
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
msgstr ""
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
msgstr ""
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr ""
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr ""
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr ""
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+msgid "A directory creation error has occurred"
+msgstr ""
+
+#: src/mn-conf.c:239
+#, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr ""
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr ""
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr ""
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr ""
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr ""
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
msgstr ""
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr ""
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, c-format
msgid "unable to parse URI \"%s\""
msgstr ""
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr ""
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr ""
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr ""
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr ""
#: src/mn-gmail-mailbox.gob:527
+msgid "unable to initialize the ICU library"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr ""
+#: src/mn-gmail-mailbox.gob:891
+#, c-format
+msgid "unable to open calendar: %s"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:899
+#, c-format
+msgid "unable to set calendar time: %s"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:968
+#, c-format
+msgid "unable to get calendar time: %s"
+msgstr ""
+
#: src/mn-gmime-stream-vfs.gob:49
#, c-format
msgid "unable to read %s: %s"
@@ -682,19 +761,19 @@ msgstr ""
msgid "unable to close %s: %s"
msgstr ""
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr ""
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr ""
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr ""
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr ""
@@ -725,73 +804,72 @@ msgstr ""
msgid "If possible, whether to use idle mode or not"
msgstr ""
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
msgstr ""
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr ""
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr ""
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr ""
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
msgid "server did not send search results"
msgstr ""
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
msgid "server did not send all the messages we requested"
msgstr ""
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
msgid "unable to fetch message"
msgstr ""
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr ""
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr ""
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr ""
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
msgstr ""
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr ""
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
msgstr ""
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
msgstr ""
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
+msgstr ""
+
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+msgid "_Mail Reader"
msgstr ""
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
msgstr ""
@@ -799,20 +877,20 @@ msgstr ""
msgid "R_emove From Notification Area"
msgstr ""
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
msgstr ""
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr ""
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
msgstr ""
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr ""
@@ -852,61 +930,57 @@ msgstr ""
msgid "Whether the properties are completely filled or not"
msgstr ""
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr ""
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr ""
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr ""
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr ""
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr ""
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr ""
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
msgid "Whether the mailbox has to be polled or not"
msgstr ""
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr ""
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr ""
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr ""
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr ""
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr ""
-#: src/mn-mailbox.gob:407
+#: src/mn-mailbox.gob:403
#, c-format
-msgid "unable to enable immediate notification for %s: %s"
+msgid "unable to enable immediate notification: %s"
msgstr ""
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -917,7 +991,7 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -928,7 +1002,7 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -939,215 +1013,373 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr ""
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
"more mailboxes. %s"
msgstr ""
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr ""
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
msgstr ""
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has new mail"
-msgstr ""
-
-#: src/mn-mailboxes.gob:304
+#: src/mn-mailboxes.gob:290
#, c-format
-msgid "%s has no new mail"
-msgstr ""
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] ""
+msgstr[1] ""
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr ""
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr ""
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr ""
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr ""
+#. Toplevel
+#: src/mn-main-window.c:92
+msgid "_Mail"
+msgstr ""
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr ""
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr ""
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr ""
+
+#: src/mn-main-window.c:103
+msgid "Launch the mail reader"
+msgstr ""
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr ""
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr ""
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr ""
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr ""
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+msgid "Quit Mail Notification"
+msgstr ""
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr ""
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr ""
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr ""
+
+#: src/mn-main-window.c:163
+msgid "_Contents"
+msgstr ""
+
+#: src/mn-main-window.c:165
+msgid "Display help"
+msgstr ""
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr ""
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr ""
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr ""
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr ""
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr ""
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr ""
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr ""
+
+#: src/mn-main-window.c:215
+msgid "Only display the toolbars icons"
+msgstr ""
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr ""
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr ""
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr ""
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr ""
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr ""
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr ""
+
+#: src/mn-main-window.c:363
+#, c-format
+msgid "unable to load menus.xml: %s"
+msgstr ""
+
+#: src/mn-main-window.c:398
+msgid "Help messages"
+msgstr ""
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr ""
+
+#: src/mn-main-window.c:503
+#, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/mn-main-window.c:540
+msgid "unable to load toolbars.xml"
+msgstr ""
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr ""
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr ""
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr ""
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr ""
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
+#: src/mn-main.c:185
+msgid "List the compiled-in features"
msgstr ""
-#: src/mn-main.c:193
-msgid "Display the mail summary dialog"
+#: src/mn-main.c:194
+msgid "Display the main window"
msgstr ""
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr ""
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr ""
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr ""
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr ""
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr ""
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
+#: src/mn-main.c:248
+msgid "Unset obsolete GConf configuration"
msgstr ""
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr ""
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
msgstr ""
-#: src/mn-main.c:325
+#: src/mn-main.c:344
+msgid "quitting Mail Notification"
+msgstr ""
+
+#: src/mn-main.c:348
+msgid "Mail Notification is not running"
+msgstr ""
+
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr ""
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr ""
-#: src/mn-main.c:379
+#: src/mn-main.c:409
msgid "Mail Notification is already running"
msgstr ""
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
msgstr ""
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
msgstr ""
-#: src/mn-mbox-mailbox.gob:221
+#: src/mn-mbox-mailbox.gob:184
#, c-format
-msgid "error while reading mailbox: %s"
+msgid "unable to open mailbox: %s"
msgstr ""
-#: src/mn-mbox-mailbox.gob:230
-#, c-format
-msgid "unable to open mailbox: %s"
+#: src/mn-message-mime.c:105
+msgid "unable to parse MIME message"
+msgstr ""
+
+#: src/mn-message-view.gob:81
+msgid "You have no new mail."
msgstr ""
-#: src/mn-message-box.gob:64
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr ""
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr ""
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr ""
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr ""
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr ""
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:196
+#: src/mn-message.gob:130
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:201
+#: src/mn-message.gob:135
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:206
+#: src/mn-message.gob:140
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:211
+#: src/mn-message.gob:145
#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-mime.c:105
-msgid "unable to parse MIME message"
-msgstr ""
-
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr ""
-
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr ""
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr ""
@@ -1156,23 +1388,23 @@ msgstr ""
msgid "detecting"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr ""
@@ -1194,77 +1426,77 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr ""
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr ""
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
msgid "unknown error"
msgstr ""
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr ""
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr ""
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr ""
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
msgid "top left"
msgstr ""
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
msgstr ""
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
msgstr ""
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
msgstr ""
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
msgstr ""
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
msgstr[0] ""
msgstr[1] ""
-#: src/mn-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
msgstr ""
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
msgstr ""
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr ""
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
msgid "Unsupported Mailboxes"
msgstr ""
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
msgstr ""
@@ -1282,20 +1514,20 @@ msgid "Select _All"
msgstr ""
#: src/mn-stock.c:29
-msgid "_Mail Summary"
+msgid "Leave Fullscreen"
msgstr ""
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr ""
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr ""
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr ""
@@ -1323,66 +1555,74 @@ msgstr ""
msgid "unsupported"
msgstr ""
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr ""
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr ""
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr ""
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr ""
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr ""
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr ""
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr ""
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr ""
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, c-format
msgid "unable to get current time: %s"
msgstr ""
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr ""
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr ""
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, c-format
msgid "Unable to execute \"%s\": %s."
msgstr ""
#: ui/authentication.glade.h:1
-msgid "*"
+msgid "_Authenticate"
msgstr ""
-#: ui/authentication.glade.h:2
-msgid "_Authenticate"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr ""
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr ""
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
msgstr ""
#: ui/mailbox-properties.glade.h:1
@@ -1390,31 +1630,31 @@ msgid "_Mailbox type:"
msgstr ""
#: ui/properties.glade.h:1
-msgid " "
+msgid "<span weight=\"bold\">Commands</span>"
msgstr ""
#: ui/properties.glade.h:2
-msgid "<span weight=\"bold\">Commands</span>"
+msgid "<span weight=\"bold\">Double-click Action</span>"
msgstr ""
#: ui/properties.glade.h:3
-msgid "<span weight=\"bold\">Double-click Action</span>"
+msgid "<span weight=\"bold\">Fonts</span>"
msgstr ""
#: ui/properties.glade.h:4
-msgid "<span weight=\"bold\">Fonts</span>"
+msgid "<span weight=\"bold\">General</span>"
msgstr ""
#: ui/properties.glade.h:5
-msgid "<span weight=\"bold\">General</span>"
+msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr ""
#: ui/properties.glade.h:6
-msgid "<span weight=\"bold\">Mailbox List</span>"
+msgid "<span weight=\"bold\">Position</span>"
msgstr ""
#: ui/properties.glade.h:7
-msgid "<span weight=\"bold\">Position</span>"
+msgid "Co_ntents:"
msgstr ""
#: ui/properties.glade.h:8
@@ -1482,100 +1722,97 @@ msgid ""
msgstr ""
#: ui/properties.glade.h:23
-msgid "When _all mail is read:"
+msgid "Use these _fonts:"
msgstr ""
#: ui/properties.glade.h:24
-msgid "When _new mail arrives:"
+msgid "When _all mail is read:"
msgstr ""
#: ui/properties.glade.h:25
-msgid "Whether the status icon should blink on errors or not"
+msgid "When _new mail arrives:"
msgstr ""
#: ui/properties.glade.h:26
-msgid "Whether to automatically close the mail summary popup or not"
+msgid "Whether the status icon should blink on errors or not"
msgstr ""
#: ui/properties.glade.h:27
-msgid "Whether to display the mail summary in the status icon tooltip or not"
+msgid "Whether to automatically close the mail summary popup or not"
msgstr ""
#: ui/properties.glade.h:28
-msgid "Whether to display the mail summary popup when new mail arrives or not"
+msgid "Whether to display the mail summary in the status icon tooltip or not"
msgstr ""
#: ui/properties.glade.h:29
-msgid "Whether to hide previously displayed mail or not"
+msgid "Whether to display the mail summary popup when new mail arrives or not"
msgstr ""
#: ui/properties.glade.h:30
-msgid "Whether to run a command when all mail is read or not"
+msgid "Whether to hide previously displayed mail or not"
msgstr ""
#: ui/properties.glade.h:31
-msgid "Whether to run a command when new mail arrives or not"
+msgid "Whether to run a command when all mail is read or not"
msgstr ""
#: ui/properties.glade.h:32
-msgid "Whether to set a mail reader or not"
+msgid "Whether to run a command when new mail arrives or not"
msgstr ""
#: ui/properties.glade.h:33
-msgid ""
-"Whether to start Mail Notification when you log into your GNOME session or "
-"not"
+msgid "Whether to set a mail reader or not"
msgstr ""
#: ui/properties.glade.h:34
msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
+"Whether to start Mail Notification when you log into your GNOME session or "
"not"
msgstr ""
#: ui/properties.glade.h:35
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
+msgid "_Automatically close after:"
msgstr ""
#: ui/properties.glade.h:36
-msgid "_Automatically close after:"
+msgid "_Blink on errors"
msgstr ""
#: ui/properties.glade.h:37
-msgid "_Blink on errors"
+msgid "_Delay between mail checks:"
msgstr ""
#: ui/properties.glade.h:38
-msgid "_Contents font:"
+msgid "_Display the main window"
msgstr ""
#: ui/properties.glade.h:39
-msgid "_Delay between mail checks:"
+msgid "_Enable mail summary popup"
msgstr ""
#: ui/properties.glade.h:40
-msgid "_Display the mail summary dialog"
+msgid "_Launch the mail reader"
msgstr ""
#: ui/properties.glade.h:41
-msgid "_Enable mail summary popup"
+msgid "_Mail reader:"
msgstr ""
#: ui/properties.glade.h:42
-msgid "_Launch the mail reader"
+msgid "_Start Mail Notification on GNOME login"
msgstr ""
#: ui/properties.glade.h:43
-msgid "_Mail reader:"
+msgid "_Title:"
msgstr ""
#: ui/properties.glade.h:44
-msgid "_Start Mail Notification on GNOME login"
+msgid "_Update the mail status"
msgstr ""
#: ui/properties.glade.h:45
-msgid "_Title font:"
+msgid "_Use fonts from theme"
msgstr ""
#: ui/properties.glade.h:46
@@ -1604,7 +1841,7 @@ msgid ""
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
diff --git a/po/pl.gmo b/po/pl.gmo
Binary files differ.
diff --git a/po/pl.po b/po/pl.po
@@ -4,16 +4,17 @@
# This file is distributed under the same license as the
# mail-notification package.
#
+# Maurycy Pawłowski-Wieroński <maurycy@abstrakcja.pl>, 2005.
# Tomasz Sarota-Raczek <tomasz.sarota.raczek@gmail.com>, 2004.
#
msgid ""
msgstr ""
"Project-Id-Version: mail-notification 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\n"
"PO-Revision-Date: 2004-11-23 18:06+0100\n"
-"Last-Translator: Tomasz Sarota-Raczek <tomasz.sarota.raczek@gmail.com>\n"
-"Language-Team: Tomasz Sarota-Raczek <tomasz.sarota.raczek@gmail.com>\n"
+"Last-Translator: Maurycy Pawłowski-Wieroński <maurycy@abstrakcja.pl>\n"
+"Language-Team: Polish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -28,20 +29,20 @@ msgstr "Automatyzacja Zawiadomienia Pocztowego"
msgid "Mail Notification automation factory"
msgstr "Fabryka automatyzacji Zawiadomienia Pocztowego"
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
msgid "Configure Mail Notification"
-msgstr "Konfiguracja Zawiadomienia Pocztowego"
+msgstr "Konfiguracja zawiadomienia pocztowego"
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
-msgstr "Zawiadomienie Pocztowe"
+msgstr "Zawiadomienie pocztowe"
#: data/mail-notification.desktop.in.h:1
msgid "Get notified when new mail arrives"
-msgstr "Otrzymaj zawiadomienie po przyjściu nowej poczty"
+msgstr "Otrzymaj zawiadomienie po nadejściu nowej poczty"
#: data/mail-notification.schemas.in.h:1
msgid "Automatically close the mail summary popup"
@@ -49,7 +50,7 @@ msgstr "Automatycznie zamknij wyskakujące okienko streszczenia poczty"
#: data/mail-notification.schemas.in.h:2
msgid "Blink on errors"
-msgstr "Migaj na błędach"
+msgstr "Miganie przy błędach"
#: data/mail-notification.schemas.in.h:3
msgid "Delay between mail checks (minutes part)."
@@ -61,7 +62,7 @@ msgstr "Zwłoka pomiędzy sprawdzaniem poczty (sekundy)."
#: data/mail-notification.schemas.in.h:5
msgid "Display mail summary in tooltip"
-msgstr "Wyświetlij streszczenie poczty w etykietce narzędzi"
+msgstr "Wyświetlanie streszczenia poczty w obszarze powiadamiania"
#: data/mail-notification.schemas.in.h:6
msgid "Do not show the immediate notification error dialog"
@@ -84,94 +85,106 @@ msgid "Has already been run"
msgstr "Polecenie już było wykonane"
#: data/mail-notification.schemas.in.h:11
-msgid "Height of mail summary dialog"
+#, fuzzy
+msgid "Height of edit toolbars dialog"
msgstr "Wysokość dialogu streszenia poczty"
#: data/mail-notification.schemas.in.h:12
+#, fuzzy
+msgid "Height of main window"
+msgstr "Wysokość dialogu streszenia poczty"
+
+#: data/mail-notification.schemas.in.h:13
msgid "Height of properties dialog"
msgstr "Wysokość dialogu wlaściwości"
-#: data/mail-notification.schemas.in.h:13
+#: data/mail-notification.schemas.in.h:14
msgid "Mail read command"
msgstr "Rozkaz do przeczytania poczty"
-#: data/mail-notification.schemas.in.h:14
+#: data/mail-notification.schemas.in.h:15
msgid "Mail reader command"
msgstr "Rozkaz do uruchomienia czytnika poczty"
-#: data/mail-notification.schemas.in.h:15
+#: data/mail-notification.schemas.in.h:16
msgid "Mail summary popup contents font"
msgstr "Czcionka zawartości wyskakującego okienka streszczenia poczty"
-#: data/mail-notification.schemas.in.h:16
+#: data/mail-notification.schemas.in.h:17
+#, fuzzy
+msgid "Mail summary popup fonts aspect source"
+msgstr "Czcionka zawartości wyskakującego okienka streszczenia poczty"
+
+#: data/mail-notification.schemas.in.h:18
msgid "Mail summary popup horizontal offset"
msgstr "Poziomę przesunięcie wyskakującego okienka streszczenia poczty"
-#: data/mail-notification.schemas.in.h:17
+#: data/mail-notification.schemas.in.h:19
msgid "Mail summary popup position"
msgstr "Pozycja wyskakującego okienka streszczenia poczty"
-#: data/mail-notification.schemas.in.h:18
+#: data/mail-notification.schemas.in.h:20
msgid "Mail summary popup title font"
msgstr "Czcionka tytułu wyskakującego okienka streszczenia poczty"
-#: data/mail-notification.schemas.in.h:19
+#: data/mail-notification.schemas.in.h:21
msgid "Mail summary popup vertical offset"
msgstr "Pionowę przesunięcie wyskakującego okienka streszczenia poczty"
-#: data/mail-notification.schemas.in.h:20
+#: data/mail-notification.schemas.in.h:22
msgid "Mailbox list"
msgstr "Lista skrzynek pocztowych"
-#: data/mail-notification.schemas.in.h:21
+#: data/mail-notification.schemas.in.h:23
msgid "Minutes between mail checks"
msgstr "Ilość minut pomiędzy sprawdzaniem poczty"
-#: data/mail-notification.schemas.in.h:22
+#: data/mail-notification.schemas.in.h:24
msgid "Minutes to wait before closing the mail summary popup"
msgstr ""
"Ile minut czekać przed zamknięciem wyskakującego okienka streszczenia poczty"
-#: data/mail-notification.schemas.in.h:23
+#: data/mail-notification.schemas.in.h:25
msgid "New mail command"
msgstr "Rozkaz do rozpoczęcia nowej poczty"
-#: data/mail-notification.schemas.in.h:24
+#: data/mail-notification.schemas.in.h:26
msgid "Only display recent mail in mail summary popup"
msgstr ""
"Tylko wyświetlaj niedawną pocztę w wyskakującym okienku streszczenia poczty"
-#: data/mail-notification.schemas.in.h:25
+#: data/mail-notification.schemas.in.h:27
msgid "Run a command when all mail is read"
msgstr "Wykonaj rozkaz kiedy cała poczta jest przeczytana"
-#: data/mail-notification.schemas.in.h:26
+#: data/mail-notification.schemas.in.h:28
msgid "Run a command when new mail arrives"
-msgstr "Wykonaj rozkaz po przyjściu nowej poczty"
+msgstr "Wykonaj rozkaz po nadejściu nowej poczty"
-#: data/mail-notification.schemas.in.h:27
+#: data/mail-notification.schemas.in.h:29
msgid "Seconds between mail checks"
msgstr "Sekundy pomiędzy sprawdzaniem poczty"
-#: data/mail-notification.schemas.in.h:28
+#: data/mail-notification.schemas.in.h:30
msgid "Seconds to wait before closing the mail summary popup"
msgstr ""
"Ilość sekund do poczekania przed zamknięciem wyskakującego okienka "
"streszczenia poczty"
-#: data/mail-notification.schemas.in.h:29
+#: data/mail-notification.schemas.in.h:31
msgid "Set a mail reader"
msgstr "Ustaw czytnika poczty"
-#: data/mail-notification.schemas.in.h:30
+#: data/mail-notification.schemas.in.h:32
+#, fuzzy
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
"Akcja do wykonania kiedy ikon jest podwójnię kliknięty. Musi być \"display-"
"mail-summary\" lub \"launch-mail-reader\"."
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
@@ -179,7 +192,7 @@ msgstr ""
"Ilość czasu do czekania przed zamknięciem wyskakującego okienka streszczenia "
"poczty (minuty)."
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
@@ -187,56 +200,71 @@ msgstr ""
"Ilość czasu do czekania przed zamknięciem wyskakującego okienka streszczenia "
"poczty (sekundy)."
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+#, fuzzy
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr ""
+"Pozycja wyskakującego okienka streszczenia poczty. Musi być \"top-left\", "
+"\"top-right\", \"bottom-left\" lub \"bottom-right\"."
+
+#: data/mail-notification.schemas.in.h:36
msgid "The command to run to launch the mail reader."
msgstr "Rozkaz do wykonania żeby uruchomić czytnika poczty."
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
msgid "The command to run when all mail is read."
msgstr "Rozkaz do wykonania kiedy cała poczta jest przeczytana."
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
msgid "The command to run when new mail arrives."
-msgstr "Rozkaz do wykonania po przyjściu nowej poczty."
+msgstr "Polecenie do wykonania po nadejściu owej poczty."
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr ""
"Niestandardowa czcionka użyta dla zawartości wyskakującego okienka "
"streszczenia poczty."
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr ""
"Niestandardowa czcionka użyta dla tytułu wyskakującego okienka streszczenia "
"poczty."
-#: data/mail-notification.schemas.in.h:38
-msgid "The height of the mail summary dialog in pixels."
+#: data/mail-notification.schemas.in.h:41
+#, fuzzy
+msgid "The height of the edit toolbars dialog in pixels."
msgstr "Wysokość dialogu streszczenia poczty w pikselach."
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+#, fuzzy
+msgid "The height of the main window in pixels."
+msgstr "Wysokość dialogu streszczenia poczty w pikselach."
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr "Wysokość dialogu właściwości w pikselach."
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr "Lista monitorowanych skrzynek pocztowych."
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
msgstr "Lista zaufanych serwerów SSL/TSL (hostname:port) bez certyfikatu X509."
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr ""
"Lista zaufanych certyfikatów X509, przedstawionych przez ich MD5 odciski "
"palców."
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
@@ -244,7 +272,7 @@ msgstr ""
"Ilość pikselów do pozostawienia pomiędzy lewą lub prawą stroną ekranu i "
"wyskakującym okienkiem streszczenia poczty."
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
@@ -252,7 +280,7 @@ msgstr ""
"Ilość pikselów do pozostawienia pomiędzy górną lub dolną stroną ekranu i "
"wyskakującym okienkiem streszczenia poczty."
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
@@ -260,62 +288,86 @@ msgstr ""
"Pozycja wyskakującego okienka streszczenia poczty. Musi być \"top-left\", "
"\"top-right\", \"bottom-left\" lub \"bottom-right\"."
-#: data/mail-notification.schemas.in.h:46
-msgid "The width of the mail summary dialog in pixels."
+#: data/mail-notification.schemas.in.h:50
+#, fuzzy
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
+msgstr ""
+"Pozycja wyskakującego okienka streszczenia poczty. Musi być \"top-left\", "
+"\"top-right\", \"bottom-left\" lub \"bottom-right\"."
+
+#: data/mail-notification.schemas.in.h:51
+#, fuzzy
+msgid "The width of the edit toolbars dialog in pixels."
msgstr "Szerokość dialogu streszczenia poczty w pikselach."
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:52
+#, fuzzy
+msgid "The width of the main window in pixels."
+msgstr "Szerokość dialogu streszczenia poczty w pikselach."
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr "Szerokość dialogu właściwości w pikselach."
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr "Lista zaufanych serwerów"
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
msgstr ""
-"Użyj niestandardową czcionkę dla zawartości wyskakującego okienka "
-"streszczenia poczty"
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
msgstr ""
-"Użyj niestandardową czcionkę dla tytułu wyskakującego okienka streszczenia "
-"poczty"
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
-msgstr "Czy Zawiadomienie Pocztowe było już uruchomione czy nie."
+msgstr "Czy Zawiadomienie pocztowe było już uruchomione czy nie."
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
-msgstr "Czy ikon stanu ma migać na błędach czy nie."
+msgstr "Czy ikona statusu ma migać przy błędach"
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+#, fuzzy
+msgid "Whether the statusbar should be visible or not."
+msgstr "Czy ikona statusu ma migać przy błędach"
+
+#: data/mail-notification.schemas.in.h:61
+#, fuzzy
+msgid "Whether the toolbars should be visible or not."
+msgstr "Czy skrzynka pocztowa była sprawdzona czy nie"
+
+#: data/mail-notification.schemas.in.h:62
msgid "Whether to automatically close the mail summary popup or not."
msgstr ""
-"Czy automatycznie zamknąć wyskakujące okienko streszczenia poczty czy nie."
+"Automatycznie zamyka okienko ze streszczeniem poczty po upływie zadanego "
+"czasu"
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
"Czy wyświetlać streszczenie poczty w ikonie stanu etykiety narzędzi czy nie."
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
msgid "Whether to display the mail summary popup when new mail arrives or not."
-msgstr ""
-"Czy wyświetlać wyskakujące okienko streszczenia poczty po przyjściu nowej "
-"poczty czy nie."
+msgstr "Wyświetl streszczenie poczty po nadejściu nowych listów"
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
"Czy schować poprzednio wyświetloną pocztę w wyskakującym okienku "
"streszczenia poczty czy nie."
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
@@ -323,38 +375,29 @@ msgstr ""
"Czy zapobiegać wyświetleniu dialogu błędowego natychmiastowego "
"zawiadomieniaczy nie."
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
msgid "Whether to run a command when all mail is read or not."
msgstr "Czy wykonać rozkaz kiedy cała poczta jest przeczytanacza czy nie."
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
msgid "Whether to run a command when new mail arrives or not."
msgstr "Czy wykonać rozkaz kiedy przyjdzie nowa poczta czy nie."
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
msgid "Whether to set a mail reader or not."
msgstr "Czy ustawić czytnika poczty."
-#: data/mail-notification.schemas.in.h:61
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
-msgstr ""
-"Czy użyć niestandardową czcionkę dla zawartości wyskakującego okienka "
-"streszczenia poczty czy nie."
-
-#: data/mail-notification.schemas.in.h:62
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
-msgstr ""
-"Czy użyć niestandardową czcionkę dla tytułu wyskakującego okienka "
-"streszczenia poczty czy nie."
+#: data/mail-notification.schemas.in.h:70
+#, fuzzy
+msgid "Width of edit toolbars dialog"
+msgstr "Szerokość dialogu streszczenia poczty"
-#: data/mail-notification.schemas.in.h:63
-msgid "Width of mail summary dialog"
+#: data/mail-notification.schemas.in.h:71
+#, fuzzy
+msgid "Width of main window"
msgstr "Szerokość dialogu streszczenia poczty"
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr "Szerokość dialogu właściwości"
@@ -362,6 +405,20 @@ msgstr "Szerokość dialogu właściwości"
msgid "New Mail"
msgstr "Nowa Poczta"
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr ""
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr ""
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr "Orientacja"
@@ -370,20 +427,20 @@ msgstr "Orientacja"
msgid "The orientation of the tray."
msgstr "Orientacja tacy."
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr "Ikon Zawiadomienia Pocztowego"
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr "Tomasz Sarota-Raczek <tomasz.sarota.raczek@gmail.com>"
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
-msgstr "<span style=\"italic\">autoodkrycie</span>"
+msgstr "<span style=\"italic\">automatycznie</span>"
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -391,17 +448,17 @@ msgid ""
"\n"
"Please re-enter your password."
msgstr ""
-"Zawiadomienie Pocztowe nie mogło się wlogować w skrzynkę %s %s ponieważ było "
+"Zawiadomienie pocztowe nie mogło się wlogować w skrzynkę %s %s ponieważ było "
"wpisanę niepoprawnę hasło.\n"
"\n"
"Proszę jeszcze raz wpisać hasło."
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr "Wpisz twoje hasło dla skrzynki %s %s."
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -409,16 +466,16 @@ msgid ""
"\n"
"%s"
msgstr ""
-"<span weight=\"bold\" size=\"larger\">Zawiadomienie Pocztowe wymaga hasła</"
+"<span weight=\"bold\" size=\"larger\">Zawiadomienie pocztowe wymaga hasła</"
"span>\n"
"\n"
"%s"
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr "_Lokacja:"
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr "_Przeglądaj..."
@@ -426,7 +483,7 @@ msgstr "_Przeglądaj..."
msgid "The URI of the mailbox"
msgstr "URI skrzynki pocztowej"
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr "Wybierz Plik lub Teczkę"
@@ -447,7 +504,7 @@ msgstr "niezdolny rozwiązać %s: %s"
#: src/mn-client-session.c:267
#, c-format
msgid "%s: unsupported address family"
-msgstr "%s: brak poparcia rodziny adresowej"
+msgstr "%s: nieobsługiwana rodzina adresów"
#: src/mn-client-session.c:274
#, c-format
@@ -523,7 +580,7 @@ msgid ""
"to \"%s\". If you choose to connect to the server, this message will not be "
"shown again."
msgstr ""
-"Zawiadomienie Pocztowe nie mogło zaufać \"%s\" (%s). Jest możliwe że ktoś "
+"Zawiadomienie pocztowe nie mogło zaufać \"%s\" (%s). Jest możliwe że ktoś "
"przechwyta twoje komunikacje żeby uzyskać twoją konfidencjalną informację.\n"
"\n"
"Powinieneś się tylko łączyć z serwerem jeśli jesteś pewny że jesteś "
@@ -562,80 +619,80 @@ msgstr "niezdolny do przeczytania z serwera: EOF"
msgid "unable to decode data using SASL: %s"
msgstr "niezdolny do rozszyfrowania danych używając SASL: %s"
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr "niezdolny do rozszyfrowania danych używając SASL: %s"
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr "niezdolny do pisania do serwera: %s"
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr "niezdolny do pisania do serwera: EOF"
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr "niezdolny do zakodowania Base64: %s"
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr "niezdolny do inicjalizacji biblioteki SASL: %s"
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr "niezdolny odzyskać lokalnego adresu gniazda: %s"
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr "niezdolny odzyskać odległego adresu gniazda: %s"
-#: src/mn-client-session.c:974
-#, c-format
-msgid "warning: unable to set SASL security properties: %s"
+#: src/mn-client-session.c:971
+#, fuzzy, c-format
+msgid "unable to set SASL security properties: %s"
msgstr "ostrzeżenie: niezdolny ustawić właściwości ochronnę SASL: %s"
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr ""
"niezdolny rozpocząć potwierdzenie tożsamości SASL: SASL zapytało się o coś "
"czego nie wiemy"
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr "niezdolny rozpocząć potwierdzenie tożsamości SASL: %s"
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr "niezdolny do stworzenia połączenia SASL: %s"
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr ""
"SASL zapytał się o coś czego nie wiemy, przerywam potwierdzenie tożsamości "
"SASL"
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr "%s, przerywam potwierdzenie tożsamości SASL"
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr "niezdolny rozszyfrować wprowadzenie Base64 od serweru : %s"
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
@@ -643,7 +700,7 @@ msgstr ""
"serwer wysłał wyzwanie SASL, ale już była początkowa odpowiedź SASL od "
"klienta."
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
@@ -651,40 +708,50 @@ msgstr ""
"serwer nie wysłał wyzwania SASL, ale nie było początkowej odpowiedź SASL od "
"klienta."
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr "warstwa ochronna SASL czynnika mocy %i jest teraz aktywna"
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr "niezdolny otrzymać właściwość SASL_MAXOUTBUF: %s"
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr "ostrzeżenie: niezdolny otrzymać właściwość SASL_SSF: %s"
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+#, fuzzy
+msgid "A directory creation error has occurred"
+msgstr "Wydarzył się błąd nasłuchowy"
+
+#: src/mn-conf.c:239
+#, fuzzy, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr "Niezdolny do wykonania \"%s\": %s"
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr "rekursywnie usuwam %s"
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr "synchronizacja bazy danych GConf"
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr "skończonę"
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr "Twoję Gmail imię użytkownika"
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
@@ -692,36 +759,60 @@ msgstr ""
"Twoję Gmail hasło (jeśli pozostawione pustę, to będziesz zapytany o hasło "
"wtedy kiedy będzie potrzebnę)"
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr "libsoup nie było kompilowanę z poparciem SSL/TLS"
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, c-format
msgid "unable to parse URI \"%s\""
msgstr "niezdolny wykonać rozbiór URI \"%s\""
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr "niezdolny do przesłania danych: %s"
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr "logowanie"
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr "nieudanę logowanie"
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr "szukam nieprzeczytanej poczty"
#: src/mn-gmail-mailbox.gob:527
+#, fuzzy
+msgid "unable to initialize the ICU library"
+msgstr "niezdolny do inicjalizacji biblioteki SASL: %s"
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr "niezdolny wykonać rozbioru danych Gmail"
+#: src/mn-gmail-mailbox.gob:891
+#, fuzzy, c-format
+msgid "unable to open calendar: %s"
+msgstr "niezdolny otworzyć teczkę: %s"
+
+#: src/mn-gmail-mailbox.gob:899
+#, fuzzy, c-format
+msgid "unable to set calendar time: %s"
+msgstr "niezdolny otrzymać aktualny czas: %s"
+
+#: src/mn-gmail-mailbox.gob:968
+#, fuzzy, c-format
+msgid "unable to get calendar time: %s"
+msgstr "niezdolny otrzymać aktualny czas: %s"
+
#: src/mn-gmime-stream-vfs.gob:49
#, c-format
msgid "unable to read %s: %s"
@@ -747,19 +838,19 @@ msgstr "niezdolny opisać pozycję %s: %s"
msgid "unable to close %s: %s"
msgstr "niezdolny zamknąć %s: %s"
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr "Skrzynka pocztowa:"
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr "_skrzynka odbiorcza"
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr "innę:"
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr "Użyj bezczynny tryb jeśli to jest możliwę"
@@ -792,103 +883,101 @@ msgstr "Imię skrzynki pocztowej"
msgid "If possible, whether to use idle mode or not"
msgstr "Jeśli możliwę, czy użyć bezczynny tryb czy nie"
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
-msgstr "Poparcię SSL/TSL nie zostało wkompilowanę"
+msgstr "Protokół SSL/TLS nie jest obsługiwany"
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr "serwer nie wysłał możliwości"
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr ""
"serwer reklamował LOGINDISABLED, bez używania potwierdzenia tożsamości LOGIN"
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr "niezdolny do logowania"
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
msgid "server did not send search results"
msgstr "serwer nie wysłał wyników poszukiwania"
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
msgid "server did not send all the messages we requested"
msgstr "serwer nie wysłał wszystkich wiadomości o które prosiliśmy"
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
msgid "unable to fetch message"
msgstr "niezdolny do sprowadzenia wiadomości"
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr "serwer nie wysłał stanu"
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr "nieznany błąd serweru"
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr "serwer nie popiera wewnątrzpasmowego SSL/TSL"
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
-msgstr ""
-"mechanizm potwierdzenia tożsamości SASL był wybrany ale poparcię SSL/TSL nie "
-"zostało wkompilowanę"
+msgstr "wybrany został nieobsługiwany mechanizm potwierdzania tożsamości SASL"
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr "nieznany mechanizm potwierdzenia tożsamości \"%s\""
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
-msgstr "wycofanię do potwierdzenia tożsamości IMAP LOGIN"
+msgstr "powrót do potwierdzenia tożsamości IMAP LOGIN"
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
-msgstr "potwierdzenie tożsamości doznało niepowodzenia"
+msgstr "logowanie nie udało się"
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
-msgstr "_Uruchom Czytnik Poczty"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
+msgstr ""
+
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+#, fuzzy
+msgid "_Mail Reader"
+msgstr "C_zytnik poczty:"
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
-msgstr "_Udoskonalenie"
+msgstr "_Odśwież"
#: src/mn-mail-icon.gob:99
msgid "R_emove From Notification Area"
-msgstr "U_suń z Przestrzeni Zawiadomienia"
+msgstr "U_suń z obszaru powiadomienia"
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
-msgstr "Dodaj Skrzynkę Pocztową"
+msgstr "Dodaj skrzynkę pocztową"
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr "Właściwości %s"
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
-msgstr "_Imię użytkownika:"
+msgstr "_Użytkownik:"
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr "_Hasło:"
#: src/mn-mailbox-properties-util.c:154
msgid "Connection type:"
-msgstr "Rodzaj połączenia:"
+msgstr "Konfiguracja serwera:"
#: src/mn-mailbox-properties-util.c:161
msgid "Port:"
@@ -896,7 +985,7 @@ msgstr "Port:"
#: src/mn-mailbox-properties-util.c:189
msgid "_Authentication mechanism:"
-msgstr "Mechanizm potwierdzenia tożsamości:"
+msgstr "Uwierzytelnianie:"
#: src/mn-mailbox-properties.c:63
msgid "Label"
@@ -922,61 +1011,57 @@ msgstr "Skończonę"
msgid "Whether the properties are completely filled or not"
msgstr "Czy właściwości są całkowicię wypełnione czy nie"
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr "Skrzynka pocztowa"
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr "Format"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr "Niezdolny dodać skrzynkę pocztową"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr "Skrzynka pocztowa już jest w spisie."
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr "URI skrzynki pocztowej"
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr "Ludzko-czytelne imię skrzynki pocztowej"
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
msgid "Whether the mailbox has to be polled or not"
msgstr "Czy skrzynka pocztowa była sprawdzona czy nie"
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr "Czy skrzynka pocztowa ma nową pocztę czy nie"
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr "Spis przeczytanych i nie przeczytanych obiektów MNMessage"
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr "Błąd skrzynki pocztowej, jeżeli wszelki"
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr "nie istnieje"
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr "nieznany format"
-#: src/mn-mailbox.gob:407
-#, c-format
-msgid "unable to enable immediate notification for %s: %s"
+#: src/mn-mailbox.gob:403
+#, fuzzy, c-format
+msgid "unable to enable immediate notification: %s"
msgstr "niezdolny umożliwić natychmiastowę zawiadomienie dla %s: %s"
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -994,7 +1079,7 @@ msgstr[2] ""
"Pod reżimem awaryjnym, one będą sprawdzanę co każdę %i sekundy (ta zwłoka "
"może być skonfigurowana w Dialogu Właściowści)."
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -1012,7 +1097,7 @@ msgstr[2] ""
"Pod reżimem awaryjnym, one będą sprawdzanę co każdę %i minuty (ta zwłoka "
"może być skonfigurowana w Dialogu Właściowści)."
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -1030,133 +1115,307 @@ msgstr[2] ""
"Pod reżimem awaryjnym, one będą sprawdzanę co mniej więcej każdę %i minuty "
"(ta zwłoka może być skonfigurowana w Dialogu Właściowści)."
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr "Wydarzył się błąd nasłuchowy"
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
"more mailboxes. %s"
msgstr ""
-"Zawiadomienie Pocztowe było niezdolnę umożliwić natychmiastowę zawiadomienie "
+"Zawiadomienie pocztowe było niezdolnę umożliwić natychmiastowę zawiadomienie "
"jednej albo większej ilość skrzynek pocztowych. %s"
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr "Czy jedna lub więcej szkrzynek pocztowych była sprawdzona czy nie"
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
-msgstr "%s nie ma poparcia: %s"
+msgstr "%s jest nieobsługiwane: %s"
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has new mail"
-msgstr "%s ma nową pocztę"
-
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has no new mail"
-msgstr "%s nie ma nowej poczty"
+#: src/mn-mailboxes.gob:290
+#, fuzzy, c-format
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] "%s ma nową pocztę"
+msgstr[1] "%s ma nową pocztę"
+msgstr[2] "%s ma nową pocztę"
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr "%s zgłosiło błąd: %s"
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr "niezdolny otworzyć teczkę \"new\": %s"
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr "niezdolny zamknąć teczkę \"new\": %s"
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr "błąd podczas czytania teczki \"new\": %s"
+#. Toplevel
+#: src/mn-main-window.c:92
+#, fuzzy
+msgid "_Mail"
+msgstr "Skrzynka pocztowa"
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr ""
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr ""
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr ""
+
+#: src/mn-main-window.c:103
+#, fuzzy
+msgid "Launch the mail reader"
+msgstr "U_ruchom czytnik poczty"
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr "Odśwież stan poczty"
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr ""
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr ""
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr ""
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+#, fuzzy
+msgid "Quit Mail Notification"
+msgstr "Zawiadomienie pocztowe"
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr ""
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr ""
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr ""
+
+#: src/mn-main-window.c:163
+#, fuzzy
+msgid "_Contents"
+msgstr "_Wybór czcionki treści:"
+
+#: src/mn-main-window.c:165
+#, fuzzy
+msgid "Display help"
+msgstr "Niezdolny do wyświetlenia pomocy"
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr ""
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr ""
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr ""
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr ""
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr ""
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr ""
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr ""
+
+#: src/mn-main-window.c:215
+#, fuzzy
+msgid "Only display the toolbars icons"
+msgstr "Wyświetlanie tylko nieprzeczytanych listów"
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr ""
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr ""
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr ""
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr ""
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr ""
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr ""
+
+#: src/mn-main-window.c:363
+#, fuzzy, c-format
+msgid "unable to load menus.xml: %s"
+msgstr "niezdolny przeczytać %s: %s"
+
+#: src/mn-main-window.c:398
+#, fuzzy
+msgid "Help messages"
+msgstr "Nieczytalna wiadomość"
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr ""
+
+#: src/mn-main-window.c:503
+#, fuzzy, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] "Nieczytalna wiadomość"
+msgstr[1] "Nieczytalna wiadomość"
+msgstr[2] "Nieczytalna wiadomość"
+
+#: src/mn-main-window.c:540
+#, fuzzy
+msgid "unable to load toolbars.xml"
+msgstr "niezdolny zamknąć teczkę: %s"
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr "Wkompilowanę wewnętrzne cechy skrzynki pocztowej: %s\n"
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr ""
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr "Wkompilowanę cechy: %s\n"
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr "Umożliw informacyjny wydruk"
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
+#: src/mn-main.c:185
+#, fuzzy
+msgid "List the compiled-in features"
msgstr "Wydrukuj spis wkompilowanych cech i zakończ"
-#: src/mn-main.c:193
-msgid "Display the mail summary dialog"
-msgstr "Wyświetlij dialog streszczenia poczty"
+#: src/mn-main.c:194
+#, fuzzy
+msgid "Display the main window"
+msgstr "Wyświetlij dialog \"O\""
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr "Wyświetlij dialog właściwości"
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr "Wyświetlij dialog \"O\""
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr "Zamknij wyskakujące okienko streszczenia poczty"
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr "Odśwież stan poczty"
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr "Zgłoś stan poczty"
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
+#: src/mn-main.c:248
+#, fuzzy
+msgid "Unset obsolete GConf configuration"
msgstr "Usuń przestarzałą konfigurację GConf i zakończ"
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr "wielowątkowość nie jest dostępna "
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
msgstr ""
"Bonobo nie potrafiło znaleźć obiektu automatyzacyjnego. Proszę sprawdzić "
-"instalację Zawiadomienie Pocztowego"
+"instalację Zawiadomienie pocztowego"
+
+#: src/mn-main.c:344
+#, fuzzy
+msgid "quitting Mail Notification"
+msgstr "Zawiadomienie pocztowe"
+
+#: src/mn-main.c:348
+#, fuzzy
+msgid "Mail Notification is not running"
+msgstr "Zawiadomienie pocztowe jest już uruchomione."
-#: src/mn-main.c:325
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr "Niezdolny do inicjalizacji biblioteki GnomeVFS."
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr "odświeżanie stanu poczty"
-#: src/mn-main.c:379
+#: src/mn-main.c:409
msgid "Mail Notification is already running"
-msgstr "Zawiadomienie Pocztowe jest już uruchomione."
+msgstr "Zawiadomienie pocztowe jest już uruchomione."
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
@@ -1164,7 +1423,7 @@ msgstr ""
"Bonobo nie mogło znaleźć pliku GNOME_MailNotification_Automation.server."
"Proszę sprawdzić swoją instalację Zawiadomienia Pocztowego."
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
@@ -1172,33 +1431,41 @@ msgstr ""
"Bonobo nie potrafiło zarejestrować serwera automatyzacyjnego. Proszę "
"sprawdzić instalację Zawiadomienia Pocztowego"
-#: src/mn-mbox-mailbox.gob:221
-#, c-format
-msgid "error while reading mailbox: %s"
-msgstr "błąd podczas odczytywania skrzynki pocztowej: %s"
-
-#: src/mn-mbox-mailbox.gob:230
+#: src/mn-mbox-mailbox.gob:184
#, c-format
msgid "unable to open mailbox: %s"
msgstr "niezdolny otworzyć skrzynkę pocztową: %s"
-#: src/mn-message-box.gob:64
+#: src/mn-message-mime.c:105
+msgid "unable to parse MIME message"
+msgstr "niezdolny do zrobienia rozbioru wiadomości MIME"
+
+#: src/mn-message-view.gob:81
+#, fuzzy
+msgid "You have no new mail."
+msgstr "Masz wiadomość!"
+
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr "Nieczytalna wiadomość"
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr "Od"
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr "Temat"
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr "Posłanę"
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr "Nieznany"
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
@@ -1206,52 +1473,44 @@ msgstr[0] "%i sekundę temu"
msgstr[1] "%i sekund temu"
msgstr[2] "%i sekundy temu"
-#: src/mn-message-box.gob:196
-#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
+#: src/mn-message.gob:130
+#, fuzzy, c-format
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
msgstr[0] "%i minutę temu"
msgstr[1] "%i minut temu"
msgstr[2] "%i minuty temu"
-#: src/mn-message-box.gob:201
-#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
+#: src/mn-message.gob:135
+#, fuzzy, c-format
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
msgstr[0] "%i godzinę temu"
msgstr[1] "%i godzin temu"
msgstr[2] "%i godziny temu"
-#: src/mn-message-box.gob:206
-#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
+#: src/mn-message.gob:140
+#, fuzzy, c-format
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
msgstr[0] "%i dzień temu"
msgstr[1] "%i dni temu"
msgstr[2] "%i dni temu"
-#: src/mn-message-box.gob:211
-#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
+#: src/mn-message.gob:145
+#, fuzzy, c-format
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
msgstr[0] "%i tydzień temu"
msgstr[1] "%i tygodni temu"
msgstr[2] "%i tygodnie temu"
-#: src/mn-message-mime.c:105
-msgid "unable to parse MIME message"
-msgstr "niezdolny do zrobienia rozbioru wiadomości MIME"
-
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr "Nieznany"
-
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr "błąd podczas czytania .mh_sequences: %s"
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr "niezdolny do otwarcia .mh_sequences: %s"
@@ -1260,23 +1519,23 @@ msgstr "niezdolny do otwarcia .mh_sequences: %s"
msgid "detecting"
msgstr "odkrywanie"
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
-msgstr "Imię komputera:"
+msgstr "Nazwa serwera:"
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr "_Szczegóły"
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
-msgstr "norma"
+msgstr "bez szyfrowania"
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
-msgstr "wewnątrzpasmowy SSL/TLS"
+msgstr "wewnątrzpasmowy TLS"
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr "SSL/TLS na oddzielnym porcie"
@@ -1300,15 +1559,15 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr "Numer portu serweru POP3"
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr "nieważne argumenty do zdolności LOGIN-DELAY"
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
msgid "unknown error"
msgstr "nieznany błąd"
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
@@ -1316,65 +1575,65 @@ msgstr[0] "honorujemy LOGIN-DELAY, śpimy przez %i sekundę"
msgstr[1] "honorujemy LOGIN-DELAY, śpimy przez %i sekund"
msgstr[2] "honorujemy LOGIN-DELAY, śpimy przez %i sekundy"
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr "serwer nie popiera potwierdzenia tożsamości APOP"
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr "wycofanię do potwierdzenia tożsamości APOP"
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr "wycofanię do potwierdzenia tożsamości USER/PASS"
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
msgid "top left"
-msgstr "lewy górny"
+msgstr "lewy górny róg ekranu"
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
-msgstr "prawy górny"
+msgstr "prawy górny róg ekranu"
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
-msgstr "lewy dolny"
+msgstr "lewy dolny róg ekranu"
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
-msgstr "prawy dolny"
+msgstr "prawy dolny róg ekranu"
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
-msgstr "Żadna skrzynka pocztowa nie wybrana."
+msgstr "Żadna skrzynka pocztowa nie została wybrana."
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
msgstr[0] "%i skrzynka pocztowa wybrana"
-msgstr[1] "%i skrzynkek pocztowych wybranych"
+msgstr[1] "%i skrzynek pocztowych wybranych"
msgstr[2] "%i skrzynki pocztowe wybranę"
-#: src/mn-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
-msgstr "Masz Nową Pocztę."
+msgstr "Masz wiadomość!"
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
-msgstr "Skrzynki Pocztowę z Nową Pocztą"
+msgstr "Skrzynki pocztowe z nową pocztą"
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr "Błędy"
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
msgid "Unsupported Mailboxes"
-msgstr "Nie Popierane Skrzynki Pocztowe"
+msgstr "Nieskonfigurowane skrzynki pocztowe"
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
-msgstr "Streszczenie Poczty"
+msgstr "Streszczenie poczty"
#: src/mn-soup.c:140
#, c-format
@@ -1390,27 +1649,27 @@ msgid "Select _All"
msgstr "Wybierz _Wszystkie"
#: src/mn-stock.c:29
-msgid "_Mail Summary"
-msgstr "_Streszczenie Poczty"
+msgid "Leave Fullscreen"
+msgstr ""
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr "niezdolny otworzyć teczkę: %s"
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr "niezdolny zamknąć teczkę: %s"
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr "błąd podczas czytania teczki: %s"
#: src/mn-system-mailbox-properties.gob:34 src/mn-uri.gob:411
msgid "System Mailbox"
-msgstr "Skrzynka Pocztowa Systemu"
+msgstr "Lokalna skrzynka"
#: src/mn-system-mailbox-properties.gob:57
#, c-format
@@ -1433,113 +1692,122 @@ msgstr "Powód z powodu którego skrzynka pocztowa nie jest popierana"
#: src/mn-unsupported-mailbox.gob:40
msgid "unsupported"
-msgstr "brak poparcia"
+msgstr "nieobsługiwany"
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr "błąd w ładowaniu obrazka: %s"
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr "element \"%s\" nie mógł byc znaleziony w interfejsie \"%s\""
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr "otrzymano nieważną listę URIów"
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr "otrzymano nieważny Mozillowy URL"
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr "Niezdolny do wyświetlenia pomocy"
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr "Niezdolny do stworzenia wątku: %s."
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr "_Nie pokazuj tej wiadomości ponownie"
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr "Fatalny błąd zdarzył się w Zawiadomieniu Pocztowym"
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, c-format
msgid "unable to get current time: %s"
msgstr "niezdolny otrzymać aktualny czas: %s"
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr "nieważna specyfikacja sygnału \"%s\""
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr "Błąd rozkazowy występił w Zawiadomieniu Pocztowym"
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, c-format
msgid "Unable to execute \"%s\": %s."
msgstr "Niezdolny do wykonania \"%s\": %s"
#: ui/authentication.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: ui/authentication.glade.h:2
msgid "_Authenticate"
msgstr "_Potwierdź tożsamości"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr ""
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr ""
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
+msgstr ""
+
#: ui/mailbox-properties.glade.h:1
msgid "_Mailbox type:"
-msgstr "_Rodzaję skrzynek pocztowych:"
+msgstr "_Typ połączenia:"
#: ui/properties.glade.h:1
-msgid " "
-msgstr " "
-
-#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Commands</span>"
-msgstr "<span weight=\"bold\">Rozkazy</span>"
+msgstr "<span weight=\"bold\">Polecenia</span>"
-#: ui/properties.glade.h:3
+#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Double-click Action</span>"
-msgstr "<span weight=\"bold\">Akcję podwójnego klikowania</span>"
+msgstr "<span weight=\"bold\">Podwójne kliknięcie</span>"
-#: ui/properties.glade.h:4
+#: ui/properties.glade.h:3
msgid "<span weight=\"bold\">Fonts</span>"
msgstr "<span weight=\"bold\">Czcionki</span>"
-#: ui/properties.glade.h:5
+#: ui/properties.glade.h:4
msgid "<span weight=\"bold\">General</span>"
-msgstr "<span weight=\"bold\">Ogólnę</span>"
+msgstr "<span weight=\"bold\">Ogólne</span>"
-#: ui/properties.glade.h:6
+#: ui/properties.glade.h:5
msgid "<span weight=\"bold\">Mailbox List</span>"
-msgstr "<span weight=\"bold\">Lista Skrzynek Pocztowych</span>"
+msgstr "<span weight=\"bold\">Skrzynki pocztowe</span>"
-#: ui/properties.glade.h:7
+#: ui/properties.glade.h:6
msgid "<span weight=\"bold\">Position</span>"
msgstr "<span weight=\"bold\">Pozycja</span>"
+#: ui/properties.glade.h:7
+#, fuzzy
+msgid "Co_ntents:"
+msgstr "_Wybór czcionki treści:"
+
#: ui/properties.glade.h:8
msgid "Dis_play mail summary in tooltip"
-msgstr "Wyświetlaj streszczenia poczty w etykietce narzędzi"
+msgstr "_Wyświetlanie streszczenia poczty na obszarze powiadamiania"
#: ui/properties.glade.h:9
msgid "General"
-msgstr "Ogólnę"
+msgstr "Ogólne"
#: ui/properties.glade.h:10
msgid "Hori_zontal offset:"
-msgstr "Poziomę przesunięcie:"
+msgstr "Poziome przesunięcie:"
#: ui/properties.glade.h:11
msgid "Mail Notification Properties"
@@ -1547,7 +1815,7 @@ msgstr "Właściwości Zawiadomienia Pocztowego"
#: ui/properties.glade.h:12
msgid "Mail Summary Popup"
-msgstr "Wyskakujące okienko streszczenia poczty"
+msgstr "Streszczenie poczty"
#: ui/properties.glade.h:13
msgid "Mailboxes"
@@ -1555,7 +1823,7 @@ msgstr "Skrzynki pocztowe"
#: ui/properties.glade.h:14
msgid "Only display _recent mail"
-msgstr "Tylko wyświetlaj niedawną pocztę"
+msgstr "Wyświetlanie tylko nieprzeczytanych listów"
#: ui/properties.glade.h:15
msgid "P_osition:"
@@ -1581,7 +1849,7 @@ msgstr "Rozkaz do wykonania po przeczytaniu całej poczty"
#: ui/properties.glade.h:20
msgid "The command to run when new mail arrives"
-msgstr "Rozkaz do wykonania po przyjściu nowej poczty"
+msgstr "Rozkaz do wykonania po nadejściu nowej poczty"
#: ui/properties.glade.h:21
msgid ""
@@ -1600,110 +1868,101 @@ msgstr ""
"wyskakującym okienkiem streszczenia poczty."
#: ui/properties.glade.h:23
-msgid "When _all mail is read:"
-msgstr "Po przeczytaniu całej poczty:"
+msgid "Use these _fonts:"
+msgstr ""
#: ui/properties.glade.h:24
-msgid "When _new mail arrives:"
-msgstr "Po przyjściu nowej poczty:"
+msgid "When _all mail is read:"
+msgstr "Po przeczytaniu całej poczty:"
#: ui/properties.glade.h:25
-msgid "Whether the status icon should blink on errors or not"
-msgstr "Czy ikon stanu ma migać na błędach czy nie"
+msgid "When _new mail arrives:"
+msgstr "Po nadejściu nowej poczty:"
#: ui/properties.glade.h:26
-msgid "Whether to automatically close the mail summary popup or not"
-msgstr ""
-"Czy automatycznie zamknąć wyskakujące okienko streszczenia poczty czy nie."
+msgid "Whether the status icon should blink on errors or not"
+msgstr "Migaj przy wystąpieniu błędów"
#: ui/properties.glade.h:27
-msgid "Whether to display the mail summary in the status icon tooltip or not"
-msgstr ""
-"Czy wyświetlać streszczenie poczty w ikonie stanu etykiety narzędzi czy nie"
+msgid "Whether to automatically close the mail summary popup or not"
+msgstr "Zamknij automatycznie streszczenie poczty po upływie zadanego czasu"
#: ui/properties.glade.h:28
-msgid "Whether to display the mail summary popup when new mail arrives or not"
-msgstr ""
-"Czy wyświetlać wyskakujące okienko streszczenia poczty po przyjściu nowej "
-"poczty czy nie"
+msgid "Whether to display the mail summary in the status icon tooltip or not"
+msgstr "Wyświetl streszczenie poczty w obszarze powiadamiania"
#: ui/properties.glade.h:29
-msgid "Whether to hide previously displayed mail or not"
-msgstr "Czy schować poprzednio wyświetlaną pocztę czy nie"
+msgid "Whether to display the mail summary popup when new mail arrives or not"
+msgstr "Wyświetl streszczenie poczty po nadejściu nowych wiadomości"
#: ui/properties.glade.h:30
-msgid "Whether to run a command when all mail is read or not"
-msgstr "Czy wykonywać rozkaz kiedy cała poczta jest przeczytana czy nie"
+msgid "Whether to hide previously displayed mail or not"
+msgstr "Ukrywaj przeczytane listy"
#: ui/properties.glade.h:31
-msgid "Whether to run a command when new mail arrives or not"
-msgstr "Czy wydać rozkaz kiedy przyjdzie nowa poczta czy nie"
+msgid "Whether to run a command when all mail is read or not"
+msgstr "Uruchom polecenie, gdy cała poczta zostanie przeczytana"
#: ui/properties.glade.h:32
-msgid "Whether to set a mail reader or not"
-msgstr "Czy ustawić czytnika poczty czy nie"
+msgid "Whether to run a command when new mail arrives or not"
+msgstr "Uruchom polecenie, gdy nadejdzie nowa poczta"
#: ui/properties.glade.h:33
-msgid ""
-"Whether to start Mail Notification when you log into your GNOME session or "
-"not"
-msgstr ""
-"Czy załadować Zawiadomienie Pocztowe po wlogowaniu się w sesję GNOME czy nie"
+msgid "Whether to set a mail reader or not"
+msgstr "Ustaw czytnik poczty"
#: ui/properties.glade.h:34
msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
+"Whether to start Mail Notification when you log into your GNOME session or "
"not"
-msgstr ""
-"Czy użyć niestandardową czcionkę do zawartości wyskakującego okienka "
-"streszczenia poczty czy nie"
+msgstr "Uruchom zawiadomienie pocztowe w trakcie startu środowiska graficznego"
#: ui/properties.glade.h:35
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
-msgstr ""
-"Czy użyć niestandardową czcionkę do tytułu wyskakującego okienka "
-"streszczenia poczty czy nie"
+msgid "_Automatically close after:"
+msgstr "_Automatyczne zamknięcie okienka po:"
#: ui/properties.glade.h:36
-msgid "_Automatically close after:"
-msgstr "_Automatycznie zamknij po:"
+msgid "_Blink on errors"
+msgstr "_Miganie przy błędach"
#: ui/properties.glade.h:37
-msgid "_Blink on errors"
-msgstr "_Migaj na błędach"
+msgid "_Delay between mail checks:"
+msgstr "_Sprawdzanie poczty co:"
#: ui/properties.glade.h:38
-msgid "_Contents font:"
-msgstr "_Czcionka zawartości:"
+#, fuzzy
+msgid "_Display the main window"
+msgstr "_Wyświetl streszczenie poczty"
#: ui/properties.glade.h:39
-msgid "_Delay between mail checks:"
-msgstr "_Opuźnienie pomiędzy sprawdzaniem poczty:"
+msgid "_Enable mail summary popup"
+msgstr "_Streszczenie poczty"
#: ui/properties.glade.h:40
-msgid "_Display the mail summary dialog"
-msgstr "_Wyświetlaj dialog streszczenia poczty"
+msgid "_Launch the mail reader"
+msgstr "U_ruchom czytnik poczty"
#: ui/properties.glade.h:41
-msgid "_Enable mail summary popup"
-msgstr "_Umożliwij wyskakujące okienko streszczenia poczty"
+msgid "_Mail reader:"
+msgstr "C_zytnik poczty:"
#: ui/properties.glade.h:42
-msgid "_Launch the mail reader"
-msgstr "U_ruchom czytnika poczty"
+msgid "_Start Mail Notification on GNOME login"
+msgstr "_Uruchomienie zawiadomienia pocztowego podczas logowania"
#: ui/properties.glade.h:43
-msgid "_Mail reader:"
-msgstr "C_zytnik poczty:"
+#, fuzzy
+msgid "_Title:"
+msgstr "_Wybór czcionki tytułu:"
#: ui/properties.glade.h:44
-msgid "_Start Mail Notification on GNOME login"
-msgstr "_Uruchom Zawiadomienie Pocztowe po wlogowaniu w GNOME"
+#, fuzzy
+msgid "_Update the mail status"
+msgstr "Odśwież stan poczty"
#: ui/properties.glade.h:45
-msgid "_Title font:"
-msgstr "_Czcionka tytułu:"
+msgid "_Use fonts from theme"
+msgstr ""
#: ui/properties.glade.h:46
msgid "_Vertical offset:"
@@ -1711,7 +1970,7 @@ msgstr "_Pionowę przesunięcie"
#: ui/properties.glade.h:47
msgid "minutes"
-msgstr "minuty"
+msgstr "minut"
#: ui/properties.glade.h:48
msgid "pixels"
@@ -1719,19 +1978,20 @@ msgstr "piksele"
#: ui/properties.glade.h:49
msgid "seconds"
-msgstr "sekundy"
+msgstr "sekund"
#: ui/summary-popup.glade.h:1
msgid "<span size=\"larger\" weight=\"bold\">Mail Summary</span>"
-msgstr "<span size=\"larger\" weight=\"bold\">Zawiadomienie Pocztowe</span>"
+msgstr "<span size=\"larger\" weight=\"bold\">Zawiadomienie pocztowe</span>"
#: ui/welcome.glade.h:1
+#, fuzzy
msgid ""
"<span weight=\"bold\" size=\"larger\">First startup</span>\n"
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
@@ -1742,23 +2002,86 @@ msgid ""
msgstr ""
"<span weight=\"bold\" size=\"larger\">Premier démarrage</span>\n"
"\n"
-"Zawiadomienie Pocztowe było pomyślnię załadowane.\n"
+"Zawiadomienie pocztowe było pomyślnie załadowane.\n"
"\n"
"Ponieważ uruchamiasz Zawiadomienia Pocztowego poraz pierwszy raz, może byś "
"chciał je skonfigurować.\n"
"\n"
"Uwaga: ta wiadomość nie będzie więcej pokazywana. Jeśli byś ponownie chciał "
-"skonfigurować Zawiadomienie Pocztowe, wybież <span weight=\"bold"
+"skonfigurować Zawiadomienie pocztowe, wybierz <span weight=\"bold"
"\">Aplikacje</span> → <span weight=\"bold\">Preferencje Desktopowe</span> → "
-"<span weight=\"bold\">Zawiadomienie Pocztowe</span> (lub na pewnych "
+"<span weight=\"bold\">Zawiadomienie pocztowe</span> (lub na pewnych "
"systemach <span weight=\"bold\">Aplikacje</span> → <span weight=\"bold"
"\">Preferencje</span> → <span weight=\"bold\">Więcej Preferencji</span> → "
-"<span weight=\"bold\">Zawiadomienie Pocztowe</span>)."
+"<span weight=\"bold\">Zawiadomienie pocztowe</span>)."
#: ui/welcome.glade.h:8
msgid "_Configure Mail Notification"
-msgstr "_Konfiguracja Zawiadomienia Pocztowego"
+msgstr "_Konfiguracja Zawiadomienia pocztowego"
#: ui/welcome.glade.h:9
msgid "_Skip configuration"
-msgstr "_Omiń konfigurację"
+msgstr "_Pomiń konfigurację"
+
+#~ msgid "Use a custom font for the contents of the mail summary popup"
+#~ msgstr ""
+#~ "Użyj niestandardową czcionkę dla zawartości wyskakującego okienka "
+#~ "streszczenia poczty"
+
+#~ msgid "Use a custom font for the title of the mail summary popup"
+#~ msgstr ""
+#~ "Użyj niestandardową czcionkę dla tytułu wyskakującego okienka "
+#~ "streszczenia poczty"
+
+#~ msgid ""
+#~ "Whether to use a custom font for the contents of the mail summary popup "
+#~ "or not."
+#~ msgstr ""
+#~ "Czy użyć niestandardową czcionkę dla zawartości wyskakującego okienka "
+#~ "streszczenia poczty czy nie."
+
+#~ msgid ""
+#~ "Whether to use a custom font for the title of the mail summary popup or "
+#~ "not."
+#~ msgstr ""
+#~ "Czy użyć niestandardową czcionkę dla tytułu wyskakującego okienka "
+#~ "streszczenia poczty czy nie."
+
+#~ msgid "server did not send status"
+#~ msgstr "serwer nie wysłał stanu"
+
+#~ msgid "_Launch Mail Reader"
+#~ msgstr "_Uruchom czytnik poczty"
+
+#~ msgid "Whether the mailbox has new mail or not"
+#~ msgstr "Czy skrzynka pocztowa ma nową pocztę czy nie"
+
+#~ msgid "%s has no new mail"
+#~ msgstr "%s nie ma nowej poczty"
+
+#~ msgid "Display the mail summary dialog"
+#~ msgstr "Wyświetlij dialog streszczenia poczty"
+
+#~ msgid "error while reading mailbox: %s"
+#~ msgstr "błąd podczas odczytywania skrzynki pocztowej: %s"
+
+#~ msgid "_Mail Summary"
+#~ msgstr "_Streszczenie poczty"
+
+#~ msgid "*"
+#~ msgstr "*"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid ""
+#~ "Whether to use a custom font for the contents of the mail summary popup "
+#~ "or not"
+#~ msgstr "Ustaw czcionkę dla tytułu streszczenia poczty"
+
+#~ msgid ""
+#~ "Whether to use a custom font for the title of the mail summary popup or "
+#~ "not"
+#~ msgstr ""
+#~ "Czy użyć niestandardową czcionkę do tytułu wyskakującego okienka "
+#~ "streszczenia poczty czy nie"
diff --git a/po/pt.gmo b/po/pt.gmo
Binary files differ.
diff --git a/po/pt.po b/po/pt.po
@@ -1,17 +1,17 @@
# Portuguese translations for mail-notification.
-# Copyright (c) 2003, 2004 Jean-Yves Lefort.
+# Copyright (C) 2003-2005 Jean-Yves Lefort.
#
# This file is distributed under the same license as the
# mail-notification package.
#
-# Duarte Henriques <duarte_henriques@myrealbox.com>, 2004.
+# Duarte Henriques <duarte_henriques@myrealbox.com>, 2004-2005.
#
msgid ""
msgstr ""
"Project-Id-Version: mail-notification 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
-"PO-Revision-Date: 2004-11-23 14:28+0100\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\n"
+"PO-Revision-Date: 2005-03-01 02:19+0100\n"
"Last-Translator: Duarte Henriques <duarte_henriques@myrealbox.com>\n"
"Language-Team: Duarte Henriques <duarte_henriques@myrealbox.com>\n"
"MIME-Version: 1.0\n"
@@ -27,14 +27,14 @@ msgstr "Automação da Notificação de Correio"
msgid "Mail Notification automation factory"
msgstr "Fábrica de automação de Notificação de Correio"
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
msgid "Configure Mail Notification"
msgstr "Configurar Notificação de Correio"
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
msgstr "Notificação de Correio"
@@ -83,90 +83,98 @@ msgid "Has already been run"
msgstr "Já foi executado"
#: data/mail-notification.schemas.in.h:11
-msgid "Height of mail summary dialog"
-msgstr "Altura do diálogo de resumo de correio"
+msgid "Height of edit toolbars dialog"
+msgstr "Altura do diálogo de edição de barras"
#: data/mail-notification.schemas.in.h:12
+msgid "Height of main window"
+msgstr "Altura da janela principal"
+
+#: data/mail-notification.schemas.in.h:13
msgid "Height of properties dialog"
msgstr "Altura do diálogo de propriedades"
-#: data/mail-notification.schemas.in.h:13
+#: data/mail-notification.schemas.in.h:14
msgid "Mail read command"
msgstr "Comando de leitura de correio"
-#: data/mail-notification.schemas.in.h:14
+#: data/mail-notification.schemas.in.h:15
msgid "Mail reader command"
msgstr "Comando de leitor de correio"
-#: data/mail-notification.schemas.in.h:15
+#: data/mail-notification.schemas.in.h:16
msgid "Mail summary popup contents font"
msgstr "Fonte do conteúdo do popup de resumo de correio"
-#: data/mail-notification.schemas.in.h:16
+#: data/mail-notification.schemas.in.h:17
+msgid "Mail summary popup fonts aspect source"
+msgstr "Fonte do aspecto dasd fontes do popup de resumo de correio"
+
+#: data/mail-notification.schemas.in.h:18
msgid "Mail summary popup horizontal offset"
msgstr "Intervalo horizontal do popup de resumo de correio"
-#: data/mail-notification.schemas.in.h:17
+#: data/mail-notification.schemas.in.h:19
msgid "Mail summary popup position"
msgstr "Posição do popup de resumo de correio"
-#: data/mail-notification.schemas.in.h:18
+#: data/mail-notification.schemas.in.h:20
msgid "Mail summary popup title font"
msgstr "Fonte do título do popup de resumo de correio"
-#: data/mail-notification.schemas.in.h:19
+#: data/mail-notification.schemas.in.h:21
msgid "Mail summary popup vertical offset"
msgstr "Intervalo vertical do popup de resumo de correio"
-#: data/mail-notification.schemas.in.h:20
+#: data/mail-notification.schemas.in.h:22
msgid "Mailbox list"
msgstr "Lista de Caixas de Correio"
-#: data/mail-notification.schemas.in.h:21
+#: data/mail-notification.schemas.in.h:23
msgid "Minutes between mail checks"
msgstr "Minutos entre verificações de correio"
-#: data/mail-notification.schemas.in.h:22
+#: data/mail-notification.schemas.in.h:24
msgid "Minutes to wait before closing the mail summary popup"
msgstr "Minutos a esperar antes de fechar o popup de resumo de correio"
-#: data/mail-notification.schemas.in.h:23
+#: data/mail-notification.schemas.in.h:25
msgid "New mail command"
msgstr "Novo comando de correio"
-#: data/mail-notification.schemas.in.h:24
+#: data/mail-notification.schemas.in.h:26
msgid "Only display recent mail in mail summary popup"
msgstr "Mostrar apenas o correio recente no popup de resumo de correio"
-#: data/mail-notification.schemas.in.h:25
+#: data/mail-notification.schemas.in.h:27
msgid "Run a command when all mail is read"
msgstr "Executar um comando quando todo o correio está lido"
-#: data/mail-notification.schemas.in.h:26
+#: data/mail-notification.schemas.in.h:28
msgid "Run a command when new mail arrives"
msgstr "Executar um comando quando chega novo correio"
-#: data/mail-notification.schemas.in.h:27
+#: data/mail-notification.schemas.in.h:29
msgid "Seconds between mail checks"
msgstr "Segundos entre verificações de correio"
-#: data/mail-notification.schemas.in.h:28
+#: data/mail-notification.schemas.in.h:30
msgid "Seconds to wait before closing the mail summary popup"
msgstr "Segundos a esperar antes de fechar o popup de resumo de correio"
-#: data/mail-notification.schemas.in.h:29
+#: data/mail-notification.schemas.in.h:31
msgid "Set a mail reader"
msgstr "Definir um leitor de correio"
-#: data/mail-notification.schemas.in.h:30
+#: data/mail-notification.schemas.in.h:32
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
-"A acção a efectuar quando o se faz duplo-clique no ícone. Tem de ser "
-"\"display-mail-summary\" ou \"launch-mail-reader\"."
+"A acção a efectuar quando se faz duplo-clique no ícone. Tem de ser \"display-"
+"main-window\", \"launch-mail-reader\" ou \"update-mail-status\"."
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
@@ -174,7 +182,7 @@ msgstr ""
"A quantidade de tempo a esperar antes de fechar o popup de resumo de correio "
"(parte dos minutos)."
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
@@ -182,39 +190,51 @@ msgstr ""
"A quantidade de tempo a esperar antes de fechar o popup de resumo de correio "
"(parte dos segundos)."
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr ""
+"A fonte de aspecto das fontes do popup de resumo de correio. Tem de ser "
+"\"theme\" ou \"custom\"."
+
+#: data/mail-notification.schemas.in.h:36
msgid "The command to run to launch the mail reader."
msgstr "O comando a executar para lançar o leitor de correio."
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
msgid "The command to run when all mail is read."
msgstr "O comando a executar quando todo o correio está lido."
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
msgid "The command to run when new mail arrives."
msgstr "O comando a executar quando chega novo correio."
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr "A fonte personalizada para o conteúdo do popup de resumo de correio."
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr "A fonte personalizada para o título do popup de resumo de correio."
-#: data/mail-notification.schemas.in.h:38
-msgid "The height of the mail summary dialog in pixels."
-msgstr "A altura em pixeis do diálogo de resumo de correio."
+#: data/mail-notification.schemas.in.h:41
+msgid "The height of the edit toolbars dialog in pixels."
+msgstr "A altura em pixeis do diálogo de edição de barras."
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+msgid "The height of the main window in pixels."
+msgstr "A altura em pixeis da janela principal."
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr "A altura em pixeis do diálogo de propriedades."
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr "A lista de caixas de correio a monitorizar."
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
@@ -222,14 +242,14 @@ msgstr ""
"A lista de servidores SSL/TLS confiados (hostname:port) se faltar um "
"certificado x509."
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr ""
"A lista de certificados x509 confiados, representados pela sua fingerprint "
"MD5."
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
@@ -237,7 +257,7 @@ msgstr ""
"O número de pixeis a deixar entre o extremo esquerdo ou direito do ecran e o "
"popup de resumo de correio."
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
@@ -245,7 +265,7 @@ msgstr ""
"O número de pixeis a deixar entre o topo ou fundo do ecran e o popup de "
"resumo de correio."
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
@@ -253,99 +273,110 @@ msgstr ""
"A posição do popup de resumo de correio. Tem de ser \"top-left\", \"top-right"
"\", \"bottom-left\" ou \"bottom-right\"."
-#: data/mail-notification.schemas.in.h:46
-msgid "The width of the mail summary dialog in pixels."
-msgstr "A largura em pixeis do diálogo de resumo de correio."
+#: data/mail-notification.schemas.in.h:50
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
+msgstr ""
+"O estilo das barras de ferramentas. Tem de ser \"desktop-default\", \"icons"
+"\", \"text\", \"both\" ou \"both-horiz\"."
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:51
+msgid "The width of the edit toolbars dialog in pixels."
+msgstr "A largura em pixeis do diálogo de edição de barras."
+
+#: data/mail-notification.schemas.in.h:52
+msgid "The width of the main window in pixels."
+msgstr "A largura em pixeis da janela principal."
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr "A largura em pixeis do diálogo de propriedades."
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr "Estilo das barras de ferramentas"
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr "Lista de servidores confiados"
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
-msgstr ""
-"Usar uma fonte personalizada para o conteúdo do popup de resumo de correio"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
+msgstr "Ver barra de estado"
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
-msgstr ""
-"Usar uma fonte personalizada para o título do popup de resumo de correio"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
+msgstr "Ver barras de ferramentas"
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
msgstr "Se a Notificação de Correio já foi executada ou não."
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
msgstr "Se o ícone de estado deve piscar em erros ou não."
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+msgid "Whether the statusbar should be visible or not."
+msgstr "Se a barra de estado deve estar visível ou não."
+
+#: data/mail-notification.schemas.in.h:61
+msgid "Whether the toolbars should be visible or not."
+msgstr "Se as barras de ferramentas devem estar visíveis ou não."
+
+#: data/mail-notification.schemas.in.h:62
msgid "Whether to automatically close the mail summary popup or not."
msgstr ""
"Se o popup de resumo de correio deve ser automaticamente fechado ou não."
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
"Se o resumo de correio deve ser mostrado na dica do ícone de estado ou não."
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
msgid "Whether to display the mail summary popup when new mail arrives or not."
msgstr ""
"Se o popup de resumo de correio deve ser mostrado quando chega correio ou "
"não."
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
"Se o correio previamente mostrado deve ser escondido no popup de resumo de "
"correio ou não."
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
msgstr ""
"Se se evita o diálogo de erro de notificação imediata de ser mostrado ou não."
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
msgid "Whether to run a command when all mail is read or not."
msgstr ""
"Se um comando deverá ser executado quando todo o correio é lido ou não."
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
msgid "Whether to run a command when new mail arrives or not."
msgstr "Se um comando deverá ser executado quando chega novo correio."
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
msgid "Whether to set a mail reader or not."
msgstr "Se um leitor de correio deve ser definido ou não."
-#: data/mail-notification.schemas.in.h:61
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
-msgstr ""
-"Se deve ser usada uma fonte personalizada para o conteúdo do popup de resumo "
-"de correio ou não."
-
-#: data/mail-notification.schemas.in.h:62
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
-msgstr ""
-"Se deve ser usada uma fonte personalizada para o título do popup de resumo "
-"de correio ou não."
+#: data/mail-notification.schemas.in.h:70
+msgid "Width of edit toolbars dialog"
+msgstr "Largura do diálogo de edição de barras"
-#: data/mail-notification.schemas.in.h:63
-msgid "Width of mail summary dialog"
-msgstr "Largura do diálogo de resumo de correio"
+#: data/mail-notification.schemas.in.h:71
+msgid "Width of main window"
+msgstr "Largura da janela principal"
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr "Largura do diálogo de propriedades"
@@ -353,6 +384,22 @@ msgstr "Largura do diálogo de propriedades"
msgid "New Mail"
msgstr "Novo Correio"
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr "_Remover Barra de Ferramentas"
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr "Separador"
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+"Arraste um item para as barras para o adicionar, das barras para a tabela de "
+"items para o remover"
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr "Orientação"
@@ -361,20 +408,20 @@ msgstr "Orientação"
msgid "The orientation of the tray."
msgstr "A orientação do tabuleiro."
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr "Um Ícone de Notificação de Correio"
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr "Duarte Henriques <duarte_henriques@myrealbox.com>"
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
msgstr "<span style=\"italic\">autodetectar</span>"
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -387,12 +434,12 @@ msgstr ""
"\n"
"Por favor re-insira a senha."
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr "Digite a senha para a caixa de correio %s, utilizador %s."
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -405,11 +452,11 @@ msgstr ""
"\n"
"%s"
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr "_Localização:"
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr "_Procurar..."
@@ -417,7 +464,7 @@ msgstr "_Procurar..."
msgid "The URI of the mailbox"
msgstr "O URI da caixa de correio"
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr "Escolha um Ficheiro ou Pasta"
@@ -553,77 +600,77 @@ msgstr "incapaz de ler do servidor: EOF"
msgid "unable to decode data using SASL: %s"
msgstr "incapaz de descodificar dados usando SASL: %s"
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr "incapaz de encodificar dados usando SASL: %s"
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr "incapaz de escrever para o servidor: %s"
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr "incapaz de escrever para o servidor: EOF"
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr "incapaz de encodificar em Base64: %s"
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr "incapaz de inicializar a biblioteca SASL: %s"
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr "incapaz de obter o endereço local do socket: %s"
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr "incapaz de obter endereço remoto do socket: %s"
-#: src/mn-client-session.c:974
+#: src/mn-client-session.c:971
#, c-format
-msgid "warning: unable to set SASL security properties: %s"
-msgstr "aviso: incapaz de definir as propriedades de segurança SASL: %s"
+msgid "unable to set SASL security properties: %s"
+msgstr "incapaz de definir as propriedades de segurança SASL: %s"
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr ""
"incapaz de iniciar a autenticação SASL: SASL perguntou algo que não sabíamos"
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr "incapaz de iniciar autenticação SASL: %s"
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr "incapaz de criar uma ligação SASL: %s"
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr "SASL perguntou algo que não sabíamos, abortando a autenticação SASL"
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr "%s, abortando a autenticação SASL"
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr "incapaz de descodificar o input em Base64 do servidor: %s"
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
@@ -631,7 +678,7 @@ msgstr ""
"o servidor enviou um desafio SASL, mas havia uma resposta SASL inicial "
"pendente do cliente"
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
@@ -639,40 +686,49 @@ msgstr ""
"o servidor não enviou um desafio SASL, mas não havia uma resposta SASL "
"inicial pendente do cliente"
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr "está agora activa uma camada de segurança SASL com factor de força %i"
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr "incapaz de obter a propriedade SASL_MAXOUTBUF: %s"
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr "aviso: incapaz de obter a propriedade SASL_SSF: %s"
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+msgid "A directory creation error has occurred"
+msgstr "Ocorreu um erro de criação de directoria"
+
+#: src/mn-conf.c:239
+#, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr "Incapaz de criar directoria \"%s\": %s."
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr "apagando recursivamente %s"
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr "sincronizando a base de dados GConf"
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr "completo"
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr "O seu nome de utilizador Gmail"
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
@@ -680,36 +736,59 @@ msgstr ""
"A sua senha Gmail (se deixar em branco, a senha será pedida quando "
"necessária)"
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr "libsoup não foi compilada com suporte SSL/TLS"
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, c-format
msgid "unable to parse URI \"%s\""
msgstr "incapaz de processar URI \"%s\""
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr "dados não-UTF-8 recebidos do servidor"
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr "incapaz de transferir dados: %s"
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr "ligando-se"
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr "login falhou"
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr "a procurar correio não lido"
#: src/mn-gmail-mailbox.gob:527
+msgid "unable to initialize the ICU library"
+msgstr "incapaz de inicializar a biblioteca ICU"
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr "incapaz de processar dados Gmail"
+#: src/mn-gmail-mailbox.gob:891
+#, c-format
+msgid "unable to open calendar: %s"
+msgstr "incapaz de abrir calendário: %s"
+
+#: src/mn-gmail-mailbox.gob:899
+#, c-format
+msgid "unable to set calendar time: %s"
+msgstr "incapaz de definir tempo de calendário: %s"
+
+#: src/mn-gmail-mailbox.gob:968
+#, c-format
+msgid "unable to get calendar time: %s"
+msgstr "incapaz de obter tempo de calendário: %s"
+
#: src/mn-gmime-stream-vfs.gob:49
#, c-format
msgid "unable to read %s: %s"
@@ -735,19 +814,19 @@ msgstr "incapaz de dizer a posição em %s: %s"
msgid "unable to close %s: %s"
msgstr "incapaz de fechar %s: %s"
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr "Caixa de Correio:"
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr "caixa de _entrada"
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr "_outros"
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr "U_sar modo inactivo se possível"
@@ -780,50 +859,45 @@ msgstr "O nome da caixa de correio"
msgid "If possible, whether to use idle mode or not"
msgstr "Se possível, usar modo inactivo ou não"
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
msgstr "suporte SSL/TLS não foi compilado"
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr "servidor não enviou habilidades"
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr "servidor anunciou LOGINDISABLED, não usando a autenticação LOGIN"
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr "incapaz de ligar"
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
msgid "server did not send search results"
msgstr "servidor não enviou resultados da procura"
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
msgid "server did not send all the messages we requested"
msgstr "servidor não enviou todas as mensagens pedidas"
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
msgid "unable to fetch message"
msgstr "incapaz de obter mensagem"
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr "servidor não enviou estado"
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr "erro de servidor desconhecido"
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr "servidor não suporta SSL/TLS in-band"
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
@@ -831,24 +905,28 @@ msgstr ""
"foi escolhido um mecanismo de autenticação SASL, mas o suporte SASL não foi "
"compilado"
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr "mecanismo de autenticação desconhecido \"%s\""
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
msgstr "recorrendo à autenticação IMAP LOGIN"
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
msgstr "autenticação falhou"
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
-msgstr "_Lançar Leitor de Correio"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
+msgstr "_Janela Principal"
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+msgid "_Mail Reader"
+msgstr "_Leitor de correio"
+
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
msgstr "_Actualizar"
@@ -856,20 +934,20 @@ msgstr "_Actualizar"
msgid "R_emove From Notification Area"
msgstr "_Remover da área de notificação"
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
msgstr "Acrescentar uma Caixa de Correio"
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr "Propriedades de %s"
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
msgstr "Nome de _Utilizador:"
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr "_Senha:"
@@ -909,61 +987,57 @@ msgstr "Completo"
msgid "Whether the properties are completely filled or not"
msgstr "Se as propriedades estão completamente preenchidas"
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr "Caixa de Correio"
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr "Formato"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr "Incapaz de adicionar caixa de correio"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr "A caixa de correio já está na lista."
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr "O URI da caixa de correio"
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr "O nome legível da caixa de correio"
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
msgid "Whether the mailbox has to be polled or not"
msgstr "Se a caixa de correio tem de ser constantemente verificada ou não"
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr "Se a caixa de correio tem novo correio"
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr "A lista de objectos MNMessage novos e não lidos"
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr "O erro da caixa de correio, se houver"
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr "não existe"
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr "formato desconhecido"
-#: src/mn-mailbox.gob:407
+#: src/mn-mailbox.gob:403
#, c-format
-msgid "unable to enable immediate notification for %s: %s"
-msgstr "incapaz de activar notificação imediata para %s: %s"
+msgid "unable to enable immediate notification: %s"
+msgstr "incapaz de activar notificação imediata: %s"
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -978,7 +1052,7 @@ msgstr[1] ""
"Como medida de recurso, serão verificadas a cada %i segundos (este atraso é "
"configurável no Diálogo de Propriedades)."
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -993,7 +1067,7 @@ msgstr[1] ""
"Como medida de recurso, serão verificadas a cada %i minutos (este atraso é "
"configurável no Diálogo de Propriedades)."
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -1008,11 +1082,11 @@ msgstr[1] ""
"Como medida de recurso, serão verificadas aproximadamente cada %i minutos "
"(este atraso é configurável no Diálogo de Propriedades)."
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr "Ocorreu um erro de monitorização"
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
@@ -1021,100 +1095,253 @@ msgstr ""
"A Notificação de Correio foi incapaz de activar notificação imediata para "
"uma ou mais caixas de correio. %s"
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr "Se uma ou mais caixas de correio têm de ser manualmente verificadas"
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
msgstr "%s não é suportado: %s"
-#: src/mn-mailboxes.gob:304
+#: src/mn-mailboxes.gob:290
#, c-format
-msgid "%s has new mail"
-msgstr "%s tem correio novo"
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] "%s tem %i mensagem nova"
+msgstr[1] "%s tem %i mensagens novas"
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has no new mail"
-msgstr "%s não tem correio novo"
-
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr "%s relatou um erro: %s"
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr "incapaz de abrir pasta \"new\": %s"
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr "incapaz de fechar pasta \"new\": %s"
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr "erro ao ler pasta \"new\": %s"
+#. Toplevel
+#: src/mn-main-window.c:92
+msgid "_Mail"
+msgstr "_Correio"
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr "_Editar"
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr "_Ver"
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr "_Ajuda"
+
+#: src/mn-main-window.c:103
+msgid "Launch the mail reader"
+msgstr "Lançar o leitor de correio"
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr "Actualizar o estado do correio"
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr "_Fechar"
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr "Fechar esta janela"
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr "_Sair"
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+msgid "Quit Mail Notification"
+msgstr "Sair da Notificação de Correio"
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr "_Barras de Ferramentas"
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr "Personalizar as barras"
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr "_Preferências"
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr "_Estilo das Barras"
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr "Personalizar o estilo das barras"
+
+#: src/mn-main-window.c:163
+msgid "_Contents"
+msgstr "_Conteúdo"
+
+#: src/mn-main-window.c:165
+msgid "Display help"
+msgstr "Mostrar Ajuda"
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr "_Sobre"
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr "Mostrar créditos"
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr "mostrar ou esconder as barras de ferramentas"
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr "_Barra de estado"
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr "Mostrar ou esconder a barra de estado"
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr "_Omissão do Ambiente"
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr ""
+"Definir o estilo de barras de ferramentas para a definição por omissão do "
+"ambiente de trabalho"
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr "Apenas Ì_cones"
+
+#: src/mn-main-window.c:215
+msgid "Only display the toolbars icons"
+msgstr "Mostrar apenas ícones da barra de ferramentas"
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr "apenas _Texto"
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr "Mostrar apenas o testo da barra de ferramentas"
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr "Texto _sob Icones"
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr "Mostrar o texto das barras sob os ícones"
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr "Texto ao lado dos Icones"
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr "Mostrar o texto das barras de ferramentas ao lado dos ícones"
+
+#: src/mn-main-window.c:363
+#, c-format
+msgid "unable to load menus.xml: %s"
+msgstr "incapaz de varregar menus.xml: %s"
+
+#: src/mn-main-window.c:398
+msgid "Help messages"
+msgstr "Mensagens de Ajuda"
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr "Mensagens de contagem"
+
+#: src/mn-main-window.c:503
+#, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] "%i mensagem nova"
+msgstr[1] "%i mensagens novas"
+
+#: src/mn-main-window.c:540
+msgid "unable to load toolbars.xml"
+msgstr "incapaz de carregar barras de ferramentas.xml"
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr "Backends mailbox compilados: %s\n"
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr "timestamps do Gmail"
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr "Características compiladas: %s\n"
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr "Activar output informacional"
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
-msgstr "Listar características compiladas e sair"
+#: src/mn-main.c:185
+msgid "List the compiled-in features"
+msgstr "Listar características compiladas"
-#: src/mn-main.c:193
-msgid "Display the mail summary dialog"
-msgstr "Mostrar o diálogo de resumo de correio"
+#: src/mn-main.c:194
+msgid "Display the main window"
+msgstr "Mostrar a janela principal"
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr "Mostrar o diálogo de propriedades"
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr "Mostrar o diálogo Sobre"
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr "Fechar o popup de resumo de correio"
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr "Actualizar o estado do correio"
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr "Relatar o estado do correio"
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
-msgstr "Apagar configurações GConf obsoletas e sair"
+#: src/mn-main.c:248
+msgid "Unset obsolete GConf configuration"
+msgstr "Apagar configurações GConf obsoletas"
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr "multi-threading não está disponível"
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
@@ -1122,19 +1349,27 @@ msgstr ""
"Bonobo não conseguiu encontrar o objecto de automação. Por favor verifique a "
"sua instalação de Notificação de Correio."
-#: src/mn-main.c:325
+#: src/mn-main.c:344
+msgid "quitting Mail Notification"
+msgstr "saindo da Notificação de Correio"
+
+#: src/mn-main.c:348
+msgid "Mail Notification is not running"
+msgstr "Notificação de Correio não está a ser executado"
+
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr "Incapaz de inicializar a biblioteca GnomeVFS."
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr "actualizando o estado do correio"
-#: src/mn-main.c:379
+#: src/mn-main.c:409
msgid "Mail Notification is already running"
msgstr "Notificação de Correio já está a ser executado"
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
@@ -1142,7 +1377,7 @@ msgstr ""
"Bonobo não conseguiu encontrar o ficheiro GNOME_MailNotification_Automation."
"server. Por favor verifique a sua instalação da Notificação de Correio."
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
@@ -1150,81 +1385,80 @@ msgstr ""
"Bonobo foi incapaz de registar o servidor de automação. Por favor verifique "
"a sua instalação da Notificação de Correio."
-#: src/mn-mbox-mailbox.gob:221
-#, c-format
-msgid "error while reading mailbox: %s"
-msgstr "erro ao ler a caixa de correio: %s"
-
-#: src/mn-mbox-mailbox.gob:230
+#: src/mn-mbox-mailbox.gob:184
#, c-format
msgid "unable to open mailbox: %s"
msgstr "erro ao abrir a caixa de correio: %s"
-#: src/mn-message-box.gob:64
+#: src/mn-message-mime.c:105
+msgid "unable to parse MIME message"
+msgstr "incapaz de processar mensagem MIME"
+
+#: src/mn-message-view.gob:81
+msgid "You have no new mail."
+msgstr "Não tem correio novo."
+
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr "Mensagem ilegível"
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr "De"
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr "Assunto"
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr "Enviado"
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
msgstr[0] "%i segundo atrás"
msgstr[1] "%i segundos atrás"
-#: src/mn-message-box.gob:196
+#: src/mn-message.gob:130
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
-msgstr[0] "%i minuto atrás"
-msgstr[1] "%i minutos atrás"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
+msgstr[0] "há cerca de %i minuto atrás"
+msgstr[1] "há cerca de %i minutos atrás"
-#: src/mn-message-box.gob:201
+#: src/mn-message.gob:135
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
-msgstr[0] "%i hora atrás"
-msgstr[1] "%i horas atrás"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
+msgstr[0] "há cerca de %i hora atrás"
+msgstr[1] "há cerca de %i horas atrás"
-#: src/mn-message-box.gob:206
+#: src/mn-message.gob:140
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
-msgstr[0] "%i dia atrás"
-msgstr[1] "%i dias atrás"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
+msgstr[0] "há cerca de %i dia atrás"
+msgstr[1] "há cerca de %i dias atrás"
-#: src/mn-message-box.gob:211
+#: src/mn-message.gob:145
#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
-msgstr[0] "%i semana atrás"
-msgstr[1] "%i semanas atrás"
-
-#: src/mn-message-mime.c:105
-msgid "unable to parse MIME message"
-msgstr "incapaz de processar mensagem MIME"
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
+msgstr[0] "há cerca de %i semana atrás"
+msgstr[1] "há cerca de %i semanas atrás"
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr "Desconhecido"
-
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr "erro ao ler .mh_sequences: %s"
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr "erro ao abrir .mh_sequences: %s"
@@ -1233,23 +1467,23 @@ msgstr "erro ao abrir .mh_sequences: %s"
msgid "detecting"
msgstr "detectando"
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
msgstr "_Hostname:"
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr "_Detalhes"
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
msgstr "sta_ndard"
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
msgstr "SSL/TLS _in-band"
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr "SSL/TLS num porto sepa_rado"
@@ -1273,77 +1507,77 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr "O número do porto do servidor POP3"
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr "argumentos inválidos para a habilidade LOGIN-DELAY"
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
msgid "unknown error"
msgstr "erro desconhecido"
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
msgstr[0] "honrando LOGIN-DELAY, dormindo por %i segundo"
msgstr[1] "honrando LOGIN-DELAY, dormindo por %i segundos"
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr "servidor não suporta autenticação APOP"
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr "recorrendo a autenticação APOP"
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr "recorrendo a autenticação USER/PASS"
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
msgid "top left"
msgstr "topo esquerdo"
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
msgstr "topo direito"
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
msgstr "fundo esquerdo"
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
msgstr "fundo direito"
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
msgstr "Nenhuma caixa de correio seleccionada."
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
msgstr[0] "%i caixa de correio seleccionada."
msgstr[1] "%i caixas de correio seleccionadas."
-#: src/mn-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
msgstr "Tem novo correio."
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
msgstr "Caixas de Correio Com Novo Correio"
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr "Erros"
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
msgid "Unsupported Mailboxes"
msgstr "Caixas de Correio Não Suportadas"
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
msgstr "Resumo de Correio"
@@ -1361,20 +1595,20 @@ msgid "Select _All"
msgstr "Seleccionar _Todas"
#: src/mn-stock.c:29
-msgid "_Mail Summary"
-msgstr "_Resumo de Correio"
+msgid "Leave Fullscreen"
+msgstr "Sair de Ecrã Inteiro"
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr "incapaz de abrir pasta: %s"
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr "incapaz de fechar pasta: %s"
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr "erro ao ler pasta: %s"
@@ -1406,100 +1640,108 @@ msgstr "A razão pela qual a caixa de correio não é suportada"
msgid "unsupported"
msgstr "não suportado"
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr "erro ao carregar imagem: %s"
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr "widget \"%s\" não foi encontrada na interface \"%s\""
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr "recebida uma lista de URIs inválida"
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr "recebido um URL Mozilla inválido"
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr "Incapaz de mostrar ajuda"
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr "Incapaz de criar uma thread: %s."
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr "_Não mostrar esta mensagem de novo"
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr "Ocorreu um erro fatal na Notificação de Correio"
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, c-format
msgid "unable to get current time: %s"
msgstr "incapaz de obter tempo actual: %s"
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr "especificação de sinal inválida \"%s\""
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr "Ocorreu um erro de comando na Notificação de Correio"
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, c-format
msgid "Unable to execute \"%s\": %s."
msgstr "incapaz de executar \"%s\": %s."
#: ui/authentication.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: ui/authentication.glade.h:2
msgid "_Authenticate"
msgstr "_Autenticar"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr "Editar Barras de Ferramentas"
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr "_Adicionar Nova Barra"
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
+msgstr "_Usar Omissão"
+
#: ui/mailbox-properties.glade.h:1
msgid "_Mailbox type:"
msgstr "_Tipo de caixa de correio:"
#: ui/properties.glade.h:1
-msgid " "
-msgstr " "
-
-#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Commands</span>"
msgstr "<span weight=\"bold\">Comandos</span>"
-#: ui/properties.glade.h:3
+#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Double-click Action</span>"
msgstr "<span weight=\"bold\">Acção de Duplo-Clique</span>"
-#: ui/properties.glade.h:4
+#: ui/properties.glade.h:3
msgid "<span weight=\"bold\">Fonts</span>"
msgstr "<span weight=\"bold\">Fontes</span>"
-#: ui/properties.glade.h:5
+#: ui/properties.glade.h:4
msgid "<span weight=\"bold\">General</span>"
msgstr "<span weight=\"bold\">Geral</span>"
-#: ui/properties.glade.h:6
+#: ui/properties.glade.h:5
msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr "<span weight=\"bold\">Lista de Caixas de Correio</span>"
-#: ui/properties.glade.h:7
+#: ui/properties.glade.h:6
msgid "<span weight=\"bold\">Position</span>"
msgstr "<span weight=\"bold\">Posição</span>"
+#: ui/properties.glade.h:7
+msgid "Co_ntents:"
+msgstr "Co_nteúdos:"
+
#: ui/properties.glade.h:8
msgid "Dis_play mail summary in tooltip"
msgstr "_Mostrar o resumo de correio numa dica"
@@ -1570,49 +1812,53 @@ msgstr ""
"resumo de correio"
#: ui/properties.glade.h:23
+msgid "Use these _fonts:"
+msgstr "Usar estas _fontes:"
+
+#: ui/properties.glade.h:24
msgid "When _all mail is read:"
msgstr "Quando _todo o correio está lido:"
-#: ui/properties.glade.h:24
+#: ui/properties.glade.h:25
msgid "When _new mail arrives:"
msgstr "Quando chega _novo correio:"
-#: ui/properties.glade.h:25
+#: ui/properties.glade.h:26
msgid "Whether the status icon should blink on errors or not"
msgstr "Se o ícone de estado deve piscar em erros ou não"
-#: ui/properties.glade.h:26
+#: ui/properties.glade.h:27
msgid "Whether to automatically close the mail summary popup or not"
msgstr ""
"Se o popup de resumo de correio deve ser automaticamente fechado ou não"
-#: ui/properties.glade.h:27
+#: ui/properties.glade.h:28
msgid "Whether to display the mail summary in the status icon tooltip or not"
msgstr ""
"Se o resumo de correio deve ser mostrado na dica do ícone de estado ou não"
-#: ui/properties.glade.h:28
+#: ui/properties.glade.h:29
msgid "Whether to display the mail summary popup when new mail arrives or not"
msgstr ""
"Se o popup de resumo de correio deve ser mostrado quando chega correio ou não"
-#: ui/properties.glade.h:29
+#: ui/properties.glade.h:30
msgid "Whether to hide previously displayed mail or not"
msgstr "Se o correio mostrado previamente deve ser escondido ou não"
-#: ui/properties.glade.h:30
+#: ui/properties.glade.h:31
msgid "Whether to run a command when all mail is read or not"
msgstr "Se deve ser executado um comando quando todo o correio está lido"
-#: ui/properties.glade.h:31
+#: ui/properties.glade.h:32
msgid "Whether to run a command when new mail arrives or not"
msgstr "Se deve ser executado um comando quando chega novo correio"
-#: ui/properties.glade.h:32
+#: ui/properties.glade.h:33
msgid "Whether to set a mail reader or not"
msgstr "Se deve ser definido um leitor de correio ou não"
-#: ui/properties.glade.h:33
+#: ui/properties.glade.h:34
msgid ""
"Whether to start Mail Notification when you log into your GNOME session or "
"not"
@@ -1620,60 +1866,49 @@ msgstr ""
"Se a Notificação de Correio deve ser iniciada quando faz se liga à sessão "
"GNOME ou não"
-#: ui/properties.glade.h:34
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not"
-msgstr ""
-"Se deve ser usada uma fonte personalizada para o conteúdo do popup de resumo "
-"de correio ou não"
-
#: ui/properties.glade.h:35
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
-msgstr ""
-"Se deve ser usada uma fonte personalizada para o título do popup de resumo "
-"de correio ou não"
-
-#: ui/properties.glade.h:36
msgid "_Automatically close after:"
msgstr "Fechar _Automáticamente após:"
-#: ui/properties.glade.h:37
+#: ui/properties.glade.h:36
msgid "_Blink on errors"
msgstr "_Piscar em erros"
-#: ui/properties.glade.h:38
-msgid "_Contents font:"
-msgstr "Fonte do conteúdo:"
-
-#: ui/properties.glade.h:39
+#: ui/properties.glade.h:37
msgid "_Delay between mail checks:"
msgstr "_Intervalo entre verificações de correio:"
-#: ui/properties.glade.h:40
-msgid "_Display the mail summary dialog"
-msgstr "_Mostrar o diálogo de resumo de correio"
+#: ui/properties.glade.h:38
+msgid "_Display the main window"
+msgstr "_Mostrar a janela principal"
-#: ui/properties.glade.h:41
+#: ui/properties.glade.h:39
msgid "_Enable mail summary popup"
msgstr "_Activar popup de resumo de correio"
-#: ui/properties.glade.h:42
+#: ui/properties.glade.h:40
msgid "_Launch the mail reader"
msgstr "_Lançar o leitor de correio"
-#: ui/properties.glade.h:43
+#: ui/properties.glade.h:41
msgid "_Mail reader:"
msgstr "_Leitor de correio:"
-#: ui/properties.glade.h:44
+#: ui/properties.glade.h:42
msgid "_Start Mail Notification on GNOME login"
msgstr "_Iniciar Notificação de Correio no login GNOME"
+#: ui/properties.glade.h:43
+msgid "_Title:"
+msgstr "_Título:"
+
+#: ui/properties.glade.h:44
+msgid "_Update the mail status"
+msgstr "_Actualizar o estado do correio"
+
#: ui/properties.glade.h:45
-msgid "_Title font:"
-msgstr "Fonte para o _título:"
+msgid "_Use fonts from theme"
+msgstr "_Usar fontes do tema"
#: ui/properties.glade.h:46
msgid "_Vertical offset:"
@@ -1701,7 +1936,7 @@ msgid ""
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
@@ -1714,8 +1949,8 @@ msgstr ""
"\n"
"A Notificação de Correio foi carregada com sucesso.\n"
"\n"
-"Como esta é a primeira vez que executa a Notificação de Correio, talvez "
-"queira configurá-la.\n"
+"Como esta é a primeira vez que executa a Notificação de Correio, precisa de "
+"a configurar.\n"
"\n"
"Nota: esta mensagem não será mostrada de novo. Para configurar a Notificação "
"de Correio outra vez, escolha <span weight=\"bold\">Aplicações</span> → "
@@ -1732,14 +1967,77 @@ msgstr "_Configurar Notificação de Correio"
msgid "_Skip configuration"
msgstr "_Saltar configuração"
+#~ msgid "received non-ASCII data from server"
+#~ msgstr "dados não-ASCII recebidos do servidor"
+
+#~ msgid "Use a custom font for the contents of the mail summary popup"
+#~ msgstr ""
+#~ "Usar uma fonte personalizada para o conteúdo do popup de resumo de correio"
+
+#~ msgid "Use a custom font for the title of the mail summary popup"
+#~ msgstr ""
+#~ "Usar uma fonte personalizada para o título do popup de resumo de correio"
+
+#~ msgid ""
+#~ "Whether to use a custom font for the contents of the mail summary popup "
+#~ "or not."
+#~ msgstr ""
+#~ "Se deve ser usada uma fonte personalizada para o conteúdo do popup de "
+#~ "resumo de correio ou não."
+
+#~ msgid ""
+#~ "Whether to use a custom font for the title of the mail summary popup or "
+#~ "not."
+#~ msgstr ""
+#~ "Se deve ser usada uma fonte personalizada para o título do popup de "
+#~ "resumo de correio ou não."
+
+#~ msgid "server did not send status"
+#~ msgstr "servidor não enviou estado"
+
+#~ msgid "_Launch Mail Reader"
+#~ msgstr "_Lançar Leitor de Correio"
+
+#~ msgid "Whether the mailbox has new mail or not"
+#~ msgstr "Se a caixa de correio tem novo correio"
+
+#~ msgid "%s has no new mail"
+#~ msgstr "%s não tem correio novo"
+
+#~ msgid "Display the mail summary dialog"
+#~ msgstr "Mostrar o diálogo de resumo de correio"
+
+#~ msgid "error while reading mailbox: %s"
+#~ msgstr "erro ao ler a caixa de correio: %s"
+
+#~ msgid "_Mail Summary"
+#~ msgstr "_Resumo de Correio"
+
+#~ msgid "*"
+#~ msgstr "*"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid ""
+#~ "Whether to use a custom font for the contents of the mail summary popup "
+#~ "or not"
+#~ msgstr ""
+#~ "Se deve ser usada uma fonte personalizada para o conteúdo do popup de "
+#~ "resumo de correio ou não"
+
+#~ msgid ""
+#~ "Whether to use a custom font for the title of the mail summary popup or "
+#~ "not"
+#~ msgstr ""
+#~ "Se deve ser usada uma fonte personalizada para o título do popup de "
+#~ "resumo de correio ou não"
+
#~ msgid "The following mailbox has new mail:\n"
#~ msgid_plural "The following mailboxes have new mail:\n"
#~ msgstr[0] "A seguinte caixa de correio tem novo correio:\n"
#~ msgstr[1] "As seguintes caixas de correio têm novo correio:\n"
-#~ msgid "You have no new mail."
-#~ msgstr "Não tem correio novo."
-
#~ msgid "The following mailbox reported an error:\n"
#~ msgid_plural "The following mailboxes reported an error:\n"
#~ msgstr[0] "A seguinte caixa de correio relatou um erro:\n"
diff --git a/po/ru.gmo b/po/ru.gmo
Binary files differ.
diff --git a/po/ru.po b/po/ru.po
@@ -1,5 +1,5 @@
# Russian translations for mail-notification.
-# Copyright (c) 2003, 2004 Jean-Yves Lefort.
+# Copyright (C) 2003, 2004 Jean-Yves Lefort.
#
# This file is distributed under the same license as the
# mail-notification package.
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mail-notification 0.5.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\n"
"PO-Revision-Date: 2004-07-21 21:58+0200\n"
"Last-Translator: Dan Korostelev <dan@ats.energo.ru>\n"
"Language-Team: Russian\n"
@@ -30,15 +30,15 @@ msgstr "Иконка входящих сообщений"
msgid "Mail Notification automation factory"
msgstr "Иконка входящих сообщений"
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
#, fuzzy
msgid "Configure Mail Notification"
msgstr "Иконка входящих сообщений"
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
msgstr "Иконка входящих сообщений"
@@ -88,263 +88,292 @@ msgid "Has already been run"
msgstr ""
#: data/mail-notification.schemas.in.h:11
-msgid "Height of mail summary dialog"
+msgid "Height of edit toolbars dialog"
msgstr ""
#: data/mail-notification.schemas.in.h:12
-msgid "Height of properties dialog"
+msgid "Height of main window"
msgstr ""
#: data/mail-notification.schemas.in.h:13
-msgid "Mail read command"
+msgid "Height of properties dialog"
msgstr ""
#: data/mail-notification.schemas.in.h:14
-msgid "Mail reader command"
+msgid "Mail read command"
msgstr ""
#: data/mail-notification.schemas.in.h:15
-msgid "Mail summary popup contents font"
+msgid "Mail reader command"
msgstr ""
#: data/mail-notification.schemas.in.h:16
-msgid "Mail summary popup horizontal offset"
+msgid "Mail summary popup contents font"
msgstr ""
#: data/mail-notification.schemas.in.h:17
-msgid "Mail summary popup position"
+msgid "Mail summary popup fonts aspect source"
msgstr ""
#: data/mail-notification.schemas.in.h:18
-msgid "Mail summary popup title font"
+msgid "Mail summary popup horizontal offset"
msgstr ""
#: data/mail-notification.schemas.in.h:19
-msgid "Mail summary popup vertical offset"
+msgid "Mail summary popup position"
msgstr ""
#: data/mail-notification.schemas.in.h:20
-msgid "Mailbox list"
+msgid "Mail summary popup title font"
msgstr ""
#: data/mail-notification.schemas.in.h:21
-msgid "Minutes between mail checks"
+msgid "Mail summary popup vertical offset"
msgstr ""
#: data/mail-notification.schemas.in.h:22
-msgid "Minutes to wait before closing the mail summary popup"
+msgid "Mailbox list"
msgstr ""
#: data/mail-notification.schemas.in.h:23
-msgid "New mail command"
+msgid "Minutes between mail checks"
msgstr ""
#: data/mail-notification.schemas.in.h:24
-msgid "Only display recent mail in mail summary popup"
+msgid "Minutes to wait before closing the mail summary popup"
msgstr ""
#: data/mail-notification.schemas.in.h:25
+msgid "New mail command"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:26
+msgid "Only display recent mail in mail summary popup"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:27
#, fuzzy
msgid "Run a command when all mail is read"
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:26
+#: data/mail-notification.schemas.in.h:28
#, fuzzy
msgid "Run a command when new mail arrives"
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:27
+#: data/mail-notification.schemas.in.h:29
msgid "Seconds between mail checks"
msgstr ""
-#: data/mail-notification.schemas.in.h:28
+#: data/mail-notification.schemas.in.h:30
msgid "Seconds to wait before closing the mail summary popup"
msgstr ""
-#: data/mail-notification.schemas.in.h:29
+#: data/mail-notification.schemas.in.h:31
msgid "Set a mail reader"
msgstr ""
-#: data/mail-notification.schemas.in.h:30
+#: data/mail-notification.schemas.in.h:32
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
msgstr ""
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
msgstr ""
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:36
#, fuzzy
msgid "The command to run to launch the mail reader."
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
#, fuzzy
msgid "The command to run when all mail is read."
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
#, fuzzy
msgid "The command to run when new mail arrives."
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:38
-msgid "The height of the mail summary dialog in pixels."
+#: data/mail-notification.schemas.in.h:41
+msgid "The height of the edit toolbars dialog in pixels."
msgstr ""
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+msgid "The height of the main window in pixels."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr ""
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr ""
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
msgstr ""
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr ""
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
msgstr ""
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
msgstr ""
-#: data/mail-notification.schemas.in.h:46
-msgid "The width of the mail summary dialog in pixels."
+#: data/mail-notification.schemas.in.h:50
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
msgstr ""
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:51
+msgid "The width of the edit toolbars dialog in pixels."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:52
+msgid "The width of the main window in pixels."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr ""
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr ""
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
msgstr ""
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
msgstr ""
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+msgid "Whether the statusbar should be visible or not."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:61
+msgid "Whether the toolbars should be visible or not."
+msgstr ""
+
+#: data/mail-notification.schemas.in.h:62
#, fuzzy
msgid "Whether to automatically close the mail summary popup or not."
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
#, fuzzy
msgid "Whether to display the mail summary popup when new mail arrives or not."
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
msgstr ""
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
#, fuzzy
msgid "Whether to run a command when all mail is read or not."
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
#, fuzzy
msgid "Whether to run a command when new mail arrives or not."
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
#, fuzzy
msgid "Whether to set a mail reader or not."
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:61
-#, fuzzy
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
-msgstr ""
-"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-
-#: data/mail-notification.schemas.in.h:62
-#, fuzzy
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
+#: data/mail-notification.schemas.in.h:70
+msgid "Width of edit toolbars dialog"
msgstr ""
-"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: data/mail-notification.schemas.in.h:63
-msgid "Width of mail summary dialog"
+#: data/mail-notification.schemas.in.h:71
+msgid "Width of main window"
msgstr ""
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr ""
@@ -352,6 +381,20 @@ msgstr ""
msgid "New Mail"
msgstr ""
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr ""
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr ""
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr ""
@@ -360,20 +403,20 @@ msgstr ""
msgid "The orientation of the tray."
msgstr ""
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr ""
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr "Dan Korostelev <dan@ats.energo.ru>"
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
msgstr ""
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -382,12 +425,12 @@ msgid ""
"Please re-enter your password."
msgstr ""
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr ""
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -396,11 +439,11 @@ msgid ""
"%s"
msgstr ""
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr ""
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr ""
@@ -408,7 +451,7 @@ msgstr ""
msgid "The URI of the mailbox"
msgstr ""
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr ""
@@ -538,156 +581,188 @@ msgstr ""
msgid "unable to decode data using SASL: %s"
msgstr ""
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr ""
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr ""
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr ""
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr ""
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr ""
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr ""
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr ""
-#: src/mn-client-session.c:974
+#: src/mn-client-session.c:971
#, c-format
-msgid "warning: unable to set SASL security properties: %s"
+msgid "unable to set SASL security properties: %s"
msgstr ""
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr ""
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr ""
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr ""
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr ""
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr ""
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr ""
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
msgstr ""
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
msgstr ""
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr ""
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr ""
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr ""
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+msgid "A directory creation error has occurred"
+msgstr ""
+
+#: src/mn-conf.c:239
+#, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr ""
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr ""
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr ""
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr ""
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr ""
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
msgstr ""
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr ""
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, c-format
msgid "unable to parse URI \"%s\""
msgstr ""
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr ""
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr ""
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr ""
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr ""
#: src/mn-gmail-mailbox.gob:527
+msgid "unable to initialize the ICU library"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr ""
+#: src/mn-gmail-mailbox.gob:891
+#, c-format
+msgid "unable to open calendar: %s"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:899
+#, c-format
+msgid "unable to set calendar time: %s"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:968
+#, c-format
+msgid "unable to get calendar time: %s"
+msgstr ""
+
#: src/mn-gmime-stream-vfs.gob:49
#, c-format
msgid "unable to read %s: %s"
@@ -713,19 +788,19 @@ msgstr ""
msgid "unable to close %s: %s"
msgstr ""
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr ""
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr ""
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr ""
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr ""
@@ -756,73 +831,72 @@ msgstr ""
msgid "If possible, whether to use idle mode or not"
msgstr ""
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
msgstr ""
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr ""
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr ""
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr ""
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
msgid "server did not send search results"
msgstr ""
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
msgid "server did not send all the messages we requested"
msgstr ""
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
msgid "unable to fetch message"
msgstr ""
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr ""
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr ""
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr ""
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
msgstr ""
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr ""
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
msgstr ""
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
msgstr ""
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
+msgstr ""
+
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+msgid "_Mail Reader"
msgstr ""
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
msgstr ""
@@ -830,20 +904,20 @@ msgstr ""
msgid "R_emove From Notification Area"
msgstr ""
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
msgstr ""
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr ""
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
msgstr ""
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr ""
@@ -883,61 +957,57 @@ msgstr ""
msgid "Whether the properties are completely filled or not"
msgstr ""
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr ""
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr ""
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr ""
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr ""
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr ""
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr ""
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
msgid "Whether the mailbox has to be polled or not"
msgstr ""
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr ""
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr ""
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr ""
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr ""
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr ""
-#: src/mn-mailbox.gob:407
+#: src/mn-mailbox.gob:403
#, c-format
-msgid "unable to enable immediate notification for %s: %s"
+msgid "unable to enable immediate notification: %s"
msgstr ""
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -948,7 +1018,7 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -959,7 +1029,7 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -970,216 +1040,377 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr ""
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
"more mailboxes. %s"
msgstr ""
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr ""
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
msgstr ""
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has new mail"
-msgstr ""
-
-#: src/mn-mailboxes.gob:304
+#: src/mn-mailboxes.gob:290
#, c-format
-msgid "%s has no new mail"
-msgstr ""
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] ""
+msgstr[1] ""
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr ""
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr ""
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr ""
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr ""
+#. Toplevel
+#: src/mn-main-window.c:92
+msgid "_Mail"
+msgstr ""
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr ""
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr ""
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr ""
+
+#: src/mn-main-window.c:103
+msgid "Launch the mail reader"
+msgstr ""
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr ""
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr ""
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr ""
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr ""
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+#, fuzzy
+msgid "Quit Mail Notification"
+msgstr "Иконка входящих сообщений"
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr ""
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr ""
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr ""
+
+#: src/mn-main-window.c:163
+msgid "_Contents"
+msgstr ""
+
+#: src/mn-main-window.c:165
+msgid "Display help"
+msgstr ""
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr ""
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr ""
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr ""
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr ""
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr ""
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr ""
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr ""
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr ""
+
+#: src/mn-main-window.c:215
+msgid "Only display the toolbars icons"
+msgstr ""
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr ""
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr ""
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr ""
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr ""
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr ""
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr ""
+
+#: src/mn-main-window.c:363
+#, c-format
+msgid "unable to load menus.xml: %s"
+msgstr ""
+
+#: src/mn-main-window.c:398
+msgid "Help messages"
+msgstr ""
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr ""
+
+#: src/mn-main-window.c:503
+#, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/mn-main-window.c:540
+msgid "unable to load toolbars.xml"
+msgstr ""
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr ""
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr ""
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr ""
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr ""
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
+#: src/mn-main.c:185
+msgid "List the compiled-in features"
msgstr ""
-#: src/mn-main.c:193
-msgid "Display the mail summary dialog"
+#: src/mn-main.c:194
+msgid "Display the main window"
msgstr ""
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr ""
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr ""
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr ""
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr ""
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr ""
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
+#: src/mn-main.c:248
+msgid "Unset obsolete GConf configuration"
msgstr ""
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr ""
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
msgstr ""
-#: src/mn-main.c:325
+#: src/mn-main.c:344
+#, fuzzy
+msgid "quitting Mail Notification"
+msgstr "Иконка входящих сообщений"
+
+#: src/mn-main.c:348
+#, fuzzy
+msgid "Mail Notification is not running"
+msgstr "Иконка входящих сообщений"
+
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr ""
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr ""
-#: src/mn-main.c:379
+#: src/mn-main.c:409
#, fuzzy
msgid "Mail Notification is already running"
msgstr "Иконка входящих сообщений"
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
msgstr ""
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
msgstr ""
-#: src/mn-mbox-mailbox.gob:221
+#: src/mn-mbox-mailbox.gob:184
#, c-format
-msgid "error while reading mailbox: %s"
+msgid "unable to open mailbox: %s"
msgstr ""
-#: src/mn-mbox-mailbox.gob:230
-#, c-format
-msgid "unable to open mailbox: %s"
+#: src/mn-message-mime.c:105
+msgid "unable to parse MIME message"
msgstr ""
-#: src/mn-message-box.gob:64
+#: src/mn-message-view.gob:81
+msgid "You have no new mail."
+msgstr ""
+
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr ""
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr ""
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr ""
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr ""
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr ""
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:196
+#: src/mn-message.gob:130
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:201
+#: src/mn-message.gob:135
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:206
+#: src/mn-message.gob:140
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-box.gob:211
+#: src/mn-message.gob:145
#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-message-mime.c:105
-msgid "unable to parse MIME message"
-msgstr ""
-
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr ""
-
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr ""
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr ""
@@ -1188,23 +1419,23 @@ msgstr ""
msgid "detecting"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
msgstr ""
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr ""
@@ -1226,77 +1457,77 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr ""
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr ""
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
msgid "unknown error"
msgstr ""
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
msgstr[0] ""
msgstr[1] ""
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr ""
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr ""
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr ""
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
msgid "top left"
msgstr ""
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
msgstr ""
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
msgstr ""
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
msgstr ""
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
msgstr ""
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
msgstr[0] ""
msgstr[1] ""
-#: src/mn-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
msgstr ""
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
msgstr ""
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr ""
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
msgid "Unsupported Mailboxes"
msgstr ""
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
msgstr ""
@@ -1314,20 +1545,20 @@ msgid "Select _All"
msgstr ""
#: src/mn-stock.c:29
-msgid "_Mail Summary"
+msgid "Leave Fullscreen"
msgstr ""
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr ""
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr ""
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr ""
@@ -1355,66 +1586,74 @@ msgstr ""
msgid "unsupported"
msgstr ""
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr ""
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr ""
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr ""
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr ""
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr ""
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr ""
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr ""
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr ""
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, c-format
msgid "unable to get current time: %s"
msgstr ""
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr ""
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr ""
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, c-format
msgid "Unable to execute \"%s\": %s."
msgstr ""
#: ui/authentication.glade.h:1
-msgid "*"
+msgid "_Authenticate"
msgstr ""
-#: ui/authentication.glade.h:2
-msgid "_Authenticate"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr ""
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr ""
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
msgstr ""
#: ui/mailbox-properties.glade.h:1
@@ -1422,31 +1661,31 @@ msgid "_Mailbox type:"
msgstr ""
#: ui/properties.glade.h:1
-msgid " "
+msgid "<span weight=\"bold\">Commands</span>"
msgstr ""
#: ui/properties.glade.h:2
-msgid "<span weight=\"bold\">Commands</span>"
+msgid "<span weight=\"bold\">Double-click Action</span>"
msgstr ""
#: ui/properties.glade.h:3
-msgid "<span weight=\"bold\">Double-click Action</span>"
+msgid "<span weight=\"bold\">Fonts</span>"
msgstr ""
#: ui/properties.glade.h:4
-msgid "<span weight=\"bold\">Fonts</span>"
+msgid "<span weight=\"bold\">General</span>"
msgstr ""
#: ui/properties.glade.h:5
-msgid "<span weight=\"bold\">General</span>"
+msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr ""
#: ui/properties.glade.h:6
-msgid "<span weight=\"bold\">Mailbox List</span>"
+msgid "<span weight=\"bold\">Position</span>"
msgstr ""
#: ui/properties.glade.h:7
-msgid "<span weight=\"bold\">Position</span>"
+msgid "Co_ntents:"
msgstr ""
#: ui/properties.glade.h:8
@@ -1519,111 +1758,104 @@ msgid ""
msgstr ""
#: ui/properties.glade.h:23
-msgid "When _all mail is read:"
+msgid "Use these _fonts:"
msgstr ""
#: ui/properties.glade.h:24
-msgid "When _new mail arrives:"
+msgid "When _all mail is read:"
msgstr ""
#: ui/properties.glade.h:25
-msgid "Whether the status icon should blink on errors or not"
+msgid "When _new mail arrives:"
msgstr ""
#: ui/properties.glade.h:26
-msgid "Whether to automatically close the mail summary popup or not"
+msgid "Whether the status icon should blink on errors or not"
msgstr ""
#: ui/properties.glade.h:27
-msgid "Whether to display the mail summary in the status icon tooltip or not"
+msgid "Whether to automatically close the mail summary popup or not"
msgstr ""
#: ui/properties.glade.h:28
+msgid "Whether to display the mail summary in the status icon tooltip or not"
+msgstr ""
+
+#: ui/properties.glade.h:29
#, fuzzy
msgid "Whether to display the mail summary popup when new mail arrives or not"
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: ui/properties.glade.h:29
+#: ui/properties.glade.h:30
msgid "Whether to hide previously displayed mail or not"
msgstr ""
-#: ui/properties.glade.h:30
+#: ui/properties.glade.h:31
#, fuzzy
msgid "Whether to run a command when all mail is read or not"
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: ui/properties.glade.h:31
+#: ui/properties.glade.h:32
msgid "Whether to run a command when new mail arrives or not"
msgstr ""
-#: ui/properties.glade.h:32
+#: ui/properties.glade.h:33
#, fuzzy
msgid "Whether to set a mail reader or not"
msgstr ""
"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
-#: ui/properties.glade.h:33
-msgid ""
-"Whether to start Mail Notification when you log into your GNOME session or "
-"not"
-msgstr ""
-
#: ui/properties.glade.h:34
-#, fuzzy
msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
+"Whether to start Mail Notification when you log into your GNOME session or "
"not"
msgstr ""
-"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
#: ui/properties.glade.h:35
-#, fuzzy
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
+msgid "_Automatically close after:"
msgstr ""
-"Иконка в области уведомления панели, уведомляющая о приходе новой почты."
#: ui/properties.glade.h:36
-msgid "_Automatically close after:"
+msgid "_Blink on errors"
msgstr ""
#: ui/properties.glade.h:37
-msgid "_Blink on errors"
+msgid "_Delay between mail checks:"
msgstr ""
#: ui/properties.glade.h:38
-msgid "_Contents font:"
+msgid "_Display the main window"
msgstr ""
#: ui/properties.glade.h:39
-msgid "_Delay between mail checks:"
+msgid "_Enable mail summary popup"
msgstr ""
#: ui/properties.glade.h:40
-msgid "_Display the mail summary dialog"
+msgid "_Launch the mail reader"
msgstr ""
#: ui/properties.glade.h:41
-msgid "_Enable mail summary popup"
+msgid "_Mail reader:"
msgstr ""
#: ui/properties.glade.h:42
-msgid "_Launch the mail reader"
-msgstr ""
+#, fuzzy
+msgid "_Start Mail Notification on GNOME login"
+msgstr "Иконка входящих сообщений"
#: ui/properties.glade.h:43
-msgid "_Mail reader:"
+msgid "_Title:"
msgstr ""
#: ui/properties.glade.h:44
-#, fuzzy
-msgid "_Start Mail Notification on GNOME login"
-msgstr "Иконка входящих сообщений"
+msgid "_Update the mail status"
+msgstr ""
#: ui/properties.glade.h:45
-msgid "_Title font:"
+msgid "_Use fonts from theme"
msgstr ""
#: ui/properties.glade.h:46
@@ -1652,7 +1884,7 @@ msgid ""
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
diff --git a/po/sr.gmo b/po/sr.gmo
Binary files differ.
diff --git a/po/sr.po b/po/sr.po
@@ -1,20 +1,20 @@
# Serbian translations for mail-notification.
-# Copyright (c) 2003, 2004 Jean-Yves Lefort.
+# Copyright (C) 2003-2005 Jean-Yves Lefort.
#
# This file is distributed under the same license as the
# mail-notification package.
#
-# Filip Miletic <filmil@gmail.com>, 2004.
+# Filip Miletic <filmil@gmail.com>, 2004, 2005.
#
# Both Serbian Cyrillic and Serbian Latin files should
# be available.
#
msgid ""
msgstr ""
-"Project-Id-Version: mail-notification 1.0\n"
+"Project-Id-Version: mail-notification 1.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
-"PO-Revision-Date: 2004-11-21 19:32:+0100\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\n"
+"PO-Revision-Date: 2005-03-01 02:17+0100\n"
"Last-Translator: Филип Милетић <filmil@gmail.com>\n"
"Language-Team: Serbian (sr) <gnu@prevod.org>\n"
"MIME-Version: 1.0\n"
@@ -31,14 +31,14 @@ msgstr "Дојава приспећа поште"
msgid "Mail Notification automation factory"
msgstr "Фабрика ѕа дојаву приспећа поште"
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
msgid "Configure Mail Notification"
msgstr "Подеси дојаву приспећа поште"
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
msgstr "Дојава поште"
@@ -87,149 +87,168 @@ msgid "Has already been run"
msgstr "Већ је покренут"
#: data/mail-notification.schemas.in.h:11
-msgid "Height of mail summary dialog"
-msgstr "Висина прозора са сажетком порука"
+msgid "Height of edit toolbars dialog"
+msgstr "Висина прозора за уређивање алатних трака"
#: data/mail-notification.schemas.in.h:12
+msgid "Height of main window"
+msgstr "Висина главног прозора"
+
+#: data/mail-notification.schemas.in.h:13
msgid "Height of properties dialog"
msgstr "Висина прозора са поставкама"
-#: data/mail-notification.schemas.in.h:13
+#: data/mail-notification.schemas.in.h:14
msgid "Mail read command"
msgstr "Команда за читање поште"
-#: data/mail-notification.schemas.in.h:14
+#: data/mail-notification.schemas.in.h:15
msgid "Mail reader command"
msgstr "Команда за читање поште"
-#: data/mail-notification.schemas.in.h:15
+#: data/mail-notification.schemas.in.h:16
msgid "Mail summary popup contents font"
msgstr "Писмо које се користи за садржај прозора са сажетком порука"
-#: data/mail-notification.schemas.in.h:16
+#: data/mail-notification.schemas.in.h:17
+msgid "Mail summary popup fonts aspect source"
+msgstr "Извор за аспект за писмо у прозору за сажетак (???)"
+
+#: data/mail-notification.schemas.in.h:18
msgid "Mail summary popup horizontal offset"
msgstr "Померај хоризонталних тачака за прозор са сажетком порука"
-#: data/mail-notification.schemas.in.h:17
+#: data/mail-notification.schemas.in.h:19
msgid "Mail summary popup position"
msgstr "Број хоризонталних тачака за прозор са сажетком порука"
-#: data/mail-notification.schemas.in.h:18
+#: data/mail-notification.schemas.in.h:20
msgid "Mail summary popup title font"
msgstr "Писмо које се користи за наслов прозора са сажетком порука"
-#: data/mail-notification.schemas.in.h:19
+#: data/mail-notification.schemas.in.h:21
msgid "Mail summary popup vertical offset"
msgstr "Померај вертикалних тачака ѕа прозор са сажетком порука"
-#: data/mail-notification.schemas.in.h:20
+#: data/mail-notification.schemas.in.h:22
msgid "Mailbox list"
msgstr "Списак сандучића"
-#: data/mail-notification.schemas.in.h:21
+#: data/mail-notification.schemas.in.h:23
msgid "Minutes between mail checks"
msgstr "Минута између две провере"
-#: data/mail-notification.schemas.in.h:22
+#: data/mail-notification.schemas.in.h:24
msgid "Minutes to wait before closing the mail summary popup"
msgstr ""
"Број минута који треба да протекне пре затварања прозора са сажетком порука"
-#: data/mail-notification.schemas.in.h:23
+#: data/mail-notification.schemas.in.h:25
msgid "New mail command"
msgstr "Изврши када пошта стигне"
-#: data/mail-notification.schemas.in.h:24
+#: data/mail-notification.schemas.in.h:26
msgid "Only display recent mail in mail summary popup"
msgstr "Прикажи само скоро приспеле поруке у сажетку"
-#: data/mail-notification.schemas.in.h:25
+#: data/mail-notification.schemas.in.h:27
msgid "Run a command when all mail is read"
msgstr "Покрени команду када је сва пошта прочитана"
-#: data/mail-notification.schemas.in.h:26
+#: data/mail-notification.schemas.in.h:28
msgid "Run a command when new mail arrives"
msgstr "Покрени команду када стигне нова пошта"
-#: data/mail-notification.schemas.in.h:27
+#: data/mail-notification.schemas.in.h:29
msgid "Seconds between mail checks"
msgstr "Секунди између две провере"
-#: data/mail-notification.schemas.in.h:28
+#: data/mail-notification.schemas.in.h:30
msgid "Seconds to wait before closing the mail summary popup"
msgstr "Број секунди који треба да протекне пре затварања сажетка порука"
-#: data/mail-notification.schemas.in.h:29
+#: data/mail-notification.schemas.in.h:31
msgid "Set a mail reader"
msgstr "Изаберите читач поште"
-#: data/mail-notification.schemas.in.h:30
+#: data/mail-notification.schemas.in.h:32
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
"Постављање наредбе која се извршава при двоструком клику на сличицу. Могући "
-"избори су: ?прикажи-сажетак-поште? или ?покрени-читач-поште?."
+"избори су: ?главни-прозор?, ?покрени-читач-поште? или ?ажурирај-статус-"
+"поште?."
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
msgstr "Пауза пре затварања прозора са сажетком порука (минути)."
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
msgstr "Пауза пре затварања прозора са сажетком порука (секунде)."
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr "Извор за подешавања писма. Може бити: ?тема? или ?посебан?."
+
+#: data/mail-notification.schemas.in.h:36
msgid "The command to run to launch the mail reader."
msgstr "Команда којом се покреће читач поште"
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
msgid "The command to run when all mail is read."
msgstr "Команда коју треба покренути када је сва пошта прочитана."
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
msgid "The command to run when new mail arrives."
msgstr "Покрени ову команду када стигне нова пошта."
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr ""
"Посебно писмо које се користи за испис садржаја прозора са сажетком порука."
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr ""
"Посебно писмо које се користи за испис наслова прозора са сажетком порука."
-#: data/mail-notification.schemas.in.h:38
-msgid "The height of the mail summary dialog in pixels."
-msgstr "Висина прозора са сажетком порука изражена у тачкама."
+#: data/mail-notification.schemas.in.h:41
+msgid "The height of the edit toolbars dialog in pixels."
+msgstr "Висина прозора за уређивање статусних трака, изражена у тачкама."
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+msgid "The height of the main window in pixels."
+msgstr "Висина главног прозора изражена у тачкама."
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr "Висина прозора са поставкама изражена у тачкама."
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr "Списак сандучића који се прате."
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
msgstr ""
"Списак проверених SSL/TLS сервера (рачунар:порт) који немају X509 сертификат."
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr "Списак проверених X509 сертификата, представљених MD5 отиском."
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
@@ -237,7 +256,7 @@ msgstr ""
"Број тачака које треба оставити између леве, одн. десне стране екрана и "
"прозора са сажетком порука."
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
@@ -245,7 +264,7 @@ msgstr ""
"Број тачака које треба оставити између врха, одн. дна екрана и прозора са "
"сажетком порука."
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
@@ -253,93 +272,106 @@ msgstr ""
"Положај прозора са сажетком порука. Може бити: ?горе-лево?, ?горе-десно?, ?"
"доле-лево? или ?доле-десно?."
-#: data/mail-notification.schemas.in.h:46
-msgid "The width of the mail summary dialog in pixels."
-msgstr "Ширина прозора са сажетком порука изражена у тачкама."
+#: data/mail-notification.schemas.in.h:50
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
+msgstr ""
+"Стил алатних трака. Може бити: ?подразумеван?, ?слике?, ?текст?, ?оба?, ?оба-"
+"водоравно?."
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:51
+msgid "The width of the edit toolbars dialog in pixels."
+msgstr "Ширина прозора за уређивање статусних трака, изражена у тачкама."
+
+#: data/mail-notification.schemas.in.h:52
+msgid "The width of the main window in pixels."
+msgstr "Ширина прозора главног прозора изражена у тачкама."
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr "Ширина прозора са поставкама изражена у тачкама."
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr "Стил алатне траке"
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr "Списак проверених сервера"
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
-msgstr "Користи посебно писмо за садржај прозора са сажетком порука"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
+msgstr "Прикажи статусну траку"
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
-msgstr "Користи посебно писмо за наслов прозора са сажетком порука"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
+msgstr "Прикажи алатну траку"
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
msgstr "Да ли је програм покретан пре или није."
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
msgstr "Да ли сличица треба да трепери ако дође до грешке или не."
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+msgid "Whether the statusbar should be visible or not."
+msgstr "Да ли статусна линија треба да се види или не."
+
+#: data/mail-notification.schemas.in.h:61
+msgid "Whether the toolbars should be visible or not."
+msgstr "Да ли алатне траке треба да се виде или не"
+
+#: data/mail-notification.schemas.in.h:62
msgid "Whether to automatically close the mail summary popup or not."
msgstr ""
"Да ли треба или не треба аутоматски затворити прозор са сажетком поште."
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
"Да ли треба приказати сажетак порука у облачићу статусне сличице или не."
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
msgid "Whether to display the mail summary popup when new mail arrives or not."
msgstr "Да ли треба приказати сажетак порука када стигне нова пошта."
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
"Да ли из сажетка треба уклонити поруке које су се у њему већ пре појавиле."
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
msgstr "Да ли треба или не треба спречити појаву прозора са описом грешака."
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
msgid "Whether to run a command when all mail is read or not."
msgstr ""
"Да ли треба или не треба покренути неку команду када је сва пошта прочитана."
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
msgid "Whether to run a command when new mail arrives or not."
msgstr "Да ли треба покренути неку команду када стигне нова пошта."
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
msgid "Whether to set a mail reader or not."
msgstr "Да ли треба поставити читач поште или не."
-#: data/mail-notification.schemas.in.h:61
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
-msgstr ""
-"Да ли треба или не треба користити посебно писмо за садржај прозора са "
-"сажетком поште."
-
-#: data/mail-notification.schemas.in.h:62
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
-msgstr ""
-"Да ли треба или не треба кориситити посебно писмо за наслов прозора са "
-"сажетком поште."
+#: data/mail-notification.schemas.in.h:70
+msgid "Width of edit toolbars dialog"
+msgstr "Ширина прозора за уређивање статусних трака"
-#: data/mail-notification.schemas.in.h:63
-msgid "Width of mail summary dialog"
-msgstr "Ширина прозора са сажетком порука"
+#: data/mail-notification.schemas.in.h:71
+msgid "Width of main window"
+msgstr "Ширина главног прозора"
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr "Ширина прозора са поставкама"
@@ -347,6 +379,22 @@ msgstr "Ширина прозора са поставкама"
msgid "New Mail"
msgstr "Нова пошта"
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr "_Уклони алатну траку"
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr "Граничник"
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+"Превуците ставку на алатну траку како бисте је додали, или са алатне траке у "
+"табелу, како бисте је уклонили."
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr "Оријентација"
@@ -355,21 +403,21 @@ msgstr "Оријентација"
msgid "The orientation of the tray."
msgstr "Оријентација обавештајне зоне."
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr "Сличица за дојаву приспећа поште"
# The email of the translator goes here
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr "Филип Милетић <filmil@gmail.com>"
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
msgstr "<span style=\"italic\">сам пронађи</span>"
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -382,12 +430,12 @@ msgstr ""
"\n"
"Молим унесите поново лозинку."
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr "Унесите лозинку за %s сандуче %s."
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -400,11 +448,11 @@ msgstr ""
"\n"
"%s"
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr "_Место:"
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr "_Прегледај..."
@@ -412,7 +460,7 @@ msgstr "_Прегледај..."
msgid "The URI of the mailbox"
msgstr "URI ознака поштанског сандучега"
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr "Изаберите датотеку или директоријум"
@@ -549,123 +597,132 @@ msgstr "Није могуће читање са сервера: EOF"
msgid "unable to decode data using SASL: %s"
msgstr "Не могу се декодовати подаци путем SASL: %s"
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr "није могуће кодирати податке уз помоћ SASL: %s"
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr "није могућ упис на сервер: %s"
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr "није могућ упис на сервер: EOF"
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr "није могуће кодирати Base64: %s"
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr "не може се покренути SASL библиотека: %s"
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr "не може да се добави локална адреса утичнице: %s"
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr "не може да се добави удаљена адреса утичнице: %s"
-#: src/mn-client-session.c:974
+#: src/mn-client-session.c:971
#, c-format
-msgid "warning: unable to set SASL security properties: %s"
-msgstr "упозорење: није могуће поставити SASL сигурносне поставке %s"
+msgid "unable to set SASL security properties: %s"
+msgstr "није могуће поставити SASL сигурносне поставке: %s"
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr "не може се покренути SASL пријава: SASL тражи податке које немамо"
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr "не може се покренути SASL пријава: %s"
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr "није могуће успоставити SASL везу: %s"
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr "SASL је тражио нама непознате податке, обустављам SASL пријаву"
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr "%s, обустављам SASL пријаву"
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr "није могуће декодовати Base64 улаз са сервера: %s"
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
msgstr ""
"сервер је започео SASL разговор, али одговор од клијента стигао пре тога"
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
msgstr ""
"сервер није послао SASL разговор, али није било ни одговора од клијента."
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr "SASL сигурносни слој нивоа снаге %i је успостављен"
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr "не могу да прочитам поставку SASL_MAXOUTBUF: %s"
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr "упозорење: не могу да прочитам поставку SASL_SSF: %s"
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+msgid "A directory creation error has occurred"
+msgstr "Дошло је до грешке при прављењу директоријума"
+
+#: src/mn-conf.c:239
+#, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr "Није могуће направити директоријум ?%s?: %s."
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr "рекурзивно поништавам %s"
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr "усклађујем GConf базу података"
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr "урађено"
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr "Ваш налог на сервису Gmail"
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
@@ -673,36 +730,59 @@ msgstr ""
"Ваша лозинка на сервису Gmail (ако не упишете лозинку, програм ће Вас "
"замолити да је унесете када то буде потребно)"
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr "libsoup није изграђен са подршком за SSL/TLS"
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, c-format
msgid "unable to parse URI \"%s\""
msgstr "није могуће обрадити URI \"%s\""
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr "сервер је послао знаке који не спадају у скуп УТФ-8"
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr "не могу да преузмем податке: %s"
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr "пријава у току"
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr "пријава није успела"
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr "тражим нову пошту"
#: src/mn-gmail-mailbox.gob:527
+msgid "unable to initialize the ICU library"
+msgstr "не може се покренути ICU библиотека"
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr "не могу да обрадим податке са сервиса Gmail"
+#: src/mn-gmail-mailbox.gob:891
+#, c-format
+msgid "unable to open calendar: %s"
+msgstr "није могуће отворити календар: %s"
+
+#: src/mn-gmail-mailbox.gob:899
+#, c-format
+msgid "unable to set calendar time: %s"
+msgstr "није могуће поставити време из календара: %s"
+
+#: src/mn-gmail-mailbox.gob:968
+#, c-format
+msgid "unable to get calendar time: %s"
+msgstr "није могуће добавити време из календара: %s"
+
#: src/mn-gmime-stream-vfs.gob:49
#, c-format
msgid "unable to read %s: %s"
@@ -728,19 +808,19 @@ msgstr "није могуће сазнати положај за %s: %s"
msgid "unable to close %s: %s"
msgstr "није могуће затворити %s: %s"
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr "Сандуче:"
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr "in_box"
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr "_друго:"
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr "К_ористи време доколице, ако је могуће"
@@ -773,50 +853,45 @@ msgstr "Име сандучета"
msgid "If possible, whether to use idle mode or not"
msgstr "Да ли треба користити време доколице или не"
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
msgstr "Подршка за SSL/TLS није уграђена"
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr "сервер није обавестио о својим могућностима"
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr "сервер је дојавио LOGINDISABLED, LOGIN пријавa неће бити коришћена"
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr "пријава није могућа"
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
msgid "server did not send search results"
msgstr "сервер није послао резултате претраге"
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
msgid "server did not send all the messages we requested"
msgstr "сервер није послао све тражене поруке"
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
msgid "unable to fetch message"
msgstr "није могуће добавити поруку"
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr "сервер није послао статус"
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr "непозната грешка на серверу"
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr "сервер не подржава заштиту путем SSL/TLS"
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
@@ -824,24 +899,28 @@ msgstr ""
"изабран је механизам за пријаву који користи SASL али подршка за SASL није "
"уграђена у програм"
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr "непознат механизам за пријаву \"%s\""
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
msgstr "повратак на IMAP LOGIN пријаву"
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
msgstr "пријава није успела"
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
-msgstr "_Покрени читач поште"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
+msgstr "Главни _прозор"
+
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+msgid "_Mail Reader"
+msgstr "_Читач поште"
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
msgstr "_Освежи"
@@ -849,20 +928,20 @@ msgstr "_Освежи"
msgid "R_emove From Notification Area"
msgstr "_Уклони са обавештајне зоне"
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
msgstr "Додај сандуче"
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr "Поставке за %s"
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
msgstr "_Кор.име:"
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr "_Лозинка:"
@@ -902,61 +981,57 @@ msgstr "Готово"
msgid "Whether the properties are completely filled or not"
msgstr "Да ли су поставке сасвим попуњене или не"
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr "Сандуче"
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr "Формат"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr "Није могуће додати сандуче"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr "Сандуче је већ у списку."
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr "URI ознака за сандуче"
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr "Име сандучета"
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
msgid "Whether the mailbox has to be polled or not"
msgstr "Да ли се ово сандуче ручно проверава или не"
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr "Да ли у сандучету стоји нова пошта или не"
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr "Списак нових и непрочитаних MNMessage објеката"
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr "Грешка у приступу сандучету, ако постоји"
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr "не постоји"
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr "непознат формат"
-#: src/mn-mailbox.gob:407
+#: src/mn-mailbox.gob:403
#, c-format
-msgid "unable to enable immediate notification for %s: %s"
-msgstr "Није могуће наместити непосредну дојаву нове поште за %s: %s"
+msgid "unable to enable immediate notification: %s"
+msgstr "Није могуће наместити непосредну дојаву нове поште: %s"
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -974,7 +1049,7 @@ msgstr[2] ""
"Пошто нема друге могућности, биће проверавани сваких %i секунди (ово кашњење "
"се може променити из прозора са поставкама)"
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -992,7 +1067,7 @@ msgstr[2] ""
"Пошто нема друге могућности, биће проверавани сваких %i минута (ово кашњење "
"се може променити из прозора са поставкама)"
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -1010,11 +1085,11 @@ msgstr[2] ""
"Пошто нема друге могућности, биће проверавани на око %i минута (ово кашњење "
"се може променити из прозора са поставкама)"
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr "Дошло је до грешке при мотрењу"
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
@@ -1023,101 +1098,254 @@ msgstr ""
"Није могуће наместити непосредну дојаву нове поште за један или више "
"сандучића. %s"
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr ""
"Показује да ли постоји бар једно сандуче које мора да се учестало проверава"
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
msgstr "%s није подржан: %s"
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has new mail"
-msgstr "Сандуче %s има нову пошту"
-
-#: src/mn-mailboxes.gob:304
+#: src/mn-mailboxes.gob:290
#, c-format
-msgid "%s has no new mail"
-msgstr "Сандуче %s нема нову пошту"
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] "Сандуче %s има %i нову поруку"
+msgstr[1] "Сандуче %s има %i нове поруке"
+msgstr[2] "Сандуче %s има %i нових порука"
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr "%s је дојавио грешку: %s"
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr "није могуће отворити директоријум \"new\": %s"
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr "није могуће затворити директоријум \"new\": %s"
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr "грешка при читању директоријума \"new\": %s"
+#. Toplevel
+#: src/mn-main-window.c:92
+msgid "_Mail"
+msgstr "_Пошта"
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr "_Уреди"
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr "_Преглед"
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr "П_омоћ"
+
+#: src/mn-main-window.c:103
+msgid "Launch the mail reader"
+msgstr "П_окрени читач поште"
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr "Освежи податке о пошти"
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr "_Затвори"
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr "Затвори овај прозор"
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr "_Крај"
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+msgid "Quit Mail Notification"
+msgstr "Угаси дојаву поште"
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr "_Алатне траке"
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr "Уреди алатне траке"
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr "_Поставке"
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr "Стил алатних _трака"
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr "Прилагоди стил алатних трака"
+
+#: src/mn-main-window.c:163
+msgid "_Contents"
+msgstr "_Садржај"
+
+#: src/mn-main-window.c:165
+msgid "Display help"
+msgstr "Прикажи помоћ"
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr "_О програму"
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr "Прикажи заслуге"
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr "Прикажи или уклони алатну траку"
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr "_Статусна трака"
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr "Прикажи или уклони статусну траку"
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr "_Подразумевано у окружењу"
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr "Постави стилове трака на стил који важи у целом радном окружењу"
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr "Само _слике"
+
+#: src/mn-main-window.c:215
+msgid "Only display the toolbars icons"
+msgstr "Прикажи само слике у статусној траци"
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr "Само _текст"
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr "Прикажи само текст у алатној траци"
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr "Текст _испод слика"
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr "Прикажи текст испод одговарајуће слике у алатној траци"
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr "Текст _поред слика"
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr "Прикажи текст поред одговарајуће слике у алатној траци"
+
+#: src/mn-main-window.c:363
+#, c-format
+msgid "unable to load menus.xml: %s"
+msgstr "Није могуће прочитати menus.xml: %s"
+
+#: src/mn-main-window.c:398
+msgid "Help messages"
+msgstr "Поруке за помоћ"
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr "Преброј поруке"
+
+#: src/mn-main-window.c:503
+#, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] "%i нова порука"
+msgstr[1] "%i нове поруке"
+msgstr[2] "%i нових порука"
+
+#: src/mn-main-window.c:540
+msgid "unable to load toolbars.xml"
+msgstr "није могуће учитати toolbars.xml: %s"
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr "Програм уме да чита сандучиће у форматима: %s\n"
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr "ГМАИЛ временски печат"
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr "Уграђене могућности: %s\n"
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr "Дозволи речитији излаз"
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
-msgstr "Испиши уграђене могућности и изађи"
+#: src/mn-main.c:185
+msgid "List the compiled-in features"
+msgstr "Испиши уграђене могућности"
-#: src/mn-main.c:193
-msgid "Display the mail summary dialog"
-msgstr "Прикажи прозор са сажетком порука"
+#: src/mn-main.c:194
+msgid "Display the main window"
+msgstr "Прикажи главни прозор"
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr "Прикажи прозор са поставкама"
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr "Прикажи податке о програму"
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr "Затвори прозор са сажетком порука"
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr "Освежи податке о пошти"
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr "Провери пошту"
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
-msgstr "Поништи застарела GConf подешавања и изађи"
+#: src/mn-main.c:248
+msgid "Unset obsolete GConf configuration"
+msgstr "Поништи застарела GConf подешавања"
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr "вишенитни рад није подржан"
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
@@ -1127,19 +1355,27 @@ msgstr ""
"Бонобо у Гному 2.6, када инсталирате програм за обавештења, треба да се "
"одјавите и поново пријавите на систем да би све почело да ради)"
-#: src/mn-main.c:325
+#: src/mn-main.c:344
+msgid "quitting Mail Notification"
+msgstr "Гасим дојаву поште"
+
+#: src/mn-main.c:348
+msgid "Mail Notification is not running"
+msgstr "Програм за дојаву поште није покренут."
+
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr "Није могуће покренути библиотеку GnomeVFS."
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr "Проверавам пошту"
-#: src/mn-main.c:379
+#: src/mn-main.c:409
msgid "Mail Notification is already running"
msgstr "Програм за дојаву поште је већ покренут."
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
@@ -1149,7 +1385,7 @@ msgstr ""
"Бонобо у Гному 2.6, када инсталирате програм за обавештења, треба да се "
"одјавите и поново пријавите на систем да би све почело да ради)"
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
@@ -1159,33 +1395,40 @@ msgstr ""
"Бонобо у Гному 2.6, када инсталирате програм за обавештења, треба да се "
"одјавите и поново пријавите на систем да би све почело да ради)"
-#: src/mn-mbox-mailbox.gob:221
-#, c-format
-msgid "error while reading mailbox: %s"
-msgstr "грешка при читању сандучета: %s"
-
-#: src/mn-mbox-mailbox.gob:230
+#: src/mn-mbox-mailbox.gob:184
#, c-format
msgid "unable to open mailbox: %s"
msgstr "није могуће отворити сандуче: %s"
-#: src/mn-message-box.gob:64
+#: src/mn-message-mime.c:105
+msgid "unable to parse MIME message"
+msgstr "није могуће обрадити MIME поруку"
+
+#: src/mn-message-view.gob:81
+msgid "You have no new mail."
+msgstr "Нема поште."
+
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr "Нечитљива порука"
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr "Од"
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr "Тема"
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr "Послато"
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr "Непознато"
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
@@ -1193,52 +1436,44 @@ msgstr[0] "пре %i секунду"
msgstr[1] "пре %i секунде"
msgstr[2] "пре %i секунди"
-#: src/mn-message-box.gob:196
+#: src/mn-message.gob:130
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
-msgstr[0] "пре %i минут"
-msgstr[1] "пре %i минута"
-msgstr[2] "пре %i минута"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
+msgstr[0] "пре око %i минут"
+msgstr[1] "пре око %i минута"
+msgstr[2] "пре око %i минута"
-#: src/mn-message-box.gob:201
+#: src/mn-message.gob:135
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
-msgstr[0] "пре %i сат"
-msgstr[1] "пре %i сата"
-msgstr[2] "пре %i сати"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
+msgstr[0] "пре око %i сат"
+msgstr[1] "пре око %i сата"
+msgstr[2] "пре око %i сати"
-#: src/mn-message-box.gob:206
+#: src/mn-message.gob:140
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
-msgstr[0] "пре %i дан"
-msgstr[1] "пре %i дана"
-msgstr[2] "пре %i дана"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
+msgstr[0] "пре око %i дан"
+msgstr[1] "пре око %i дана"
+msgstr[2] "пре око %i дана"
-#: src/mn-message-box.gob:211
+#: src/mn-message.gob:145
#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
-msgstr[0] "пре %i недељу"
-msgstr[1] "пре %i недеље"
-msgstr[2] "пре %i недеља"
-
-#: src/mn-message-mime.c:105
-msgid "unable to parse MIME message"
-msgstr "није могуће обрадити MIME поруку"
-
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr "Непознато"
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
+msgstr[0] "пре око %i недељу"
+msgstr[1] "пре око %i недеље"
+msgstr[2] "пре око %i недеља"
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr "грешка при читању датотеке .mh_sequences: %s"
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr "није могуће отворити датотеку .mh_sequences: %s"
@@ -1247,23 +1482,23 @@ msgstr "није могуће отворити датотеку .mh_sequences: %
msgid "detecting"
msgstr "истражујем"
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
msgstr "_Рачунар:"
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr "_Детаљи"
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
msgstr "_стандард"
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
msgstr "_уграђени SSL/TLS"
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr "SSL/TLS на посебном порту"
@@ -1287,15 +1522,15 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr "Број порта на POP3 серверу"
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr "параметри за могућност LOGIN-DELAY нису исправно постављени"
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
msgid "unknown error"
msgstr "непозната грешка"
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
@@ -1303,39 +1538,39 @@ msgstr[0] "тражен је застој при пријави, паузира
msgstr[1] "тражен је застој при пријави, паузирам %i секундe"
msgstr[2] "тражен је застој при пријави, паузирам %i секунди"
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr "сервер не подржава пријаву коришћењем механизма APOP"
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr "прелазим на APOP пријаву"
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr "прелазим на пријаву помоћу имена и лозинке"
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
msgid "top left"
msgstr "горе-лево"
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
msgstr "горе-десно"
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
msgstr "доле-лево"
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
msgstr "доле-десно"
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
msgstr "Ниједно сандуче није изабрано."
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
@@ -1343,23 +1578,23 @@ msgstr[0] "Изабрано %i сандуче"
msgstr[1] "Изабрана %i сандучета"
msgstr[2] "Изабрано %i сандучета"
-#: src/mn-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
msgstr "Имате нову пошту."
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
msgstr "Сандучићи са новом поштом"
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr "Грешке"
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
msgid "Unsupported Mailboxes"
msgstr "Неподржани сандучићи"
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
msgstr "Сажетак порука"
@@ -1377,20 +1612,20 @@ msgid "Select _All"
msgstr "Изабери _све"
#: src/mn-stock.c:29
-msgid "_Mail Summary"
-msgstr "_Сажетак порука"
+msgid "Leave Fullscreen"
+msgstr "Остави на целом екрану"
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr "није могуће отворити директоријум: %s"
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr "није могуће затворити директоријум: %s"
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr "грешка при читању директоријума: %s"
@@ -1420,100 +1655,108 @@ msgstr "Разлог зашто сандуче није подржано"
msgid "unsupported"
msgstr "није подржано"
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr "грешка при учитавању слике: %s"
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr "елемент ?%s? није пронађен у сучељу ?%s?"
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr "примљен је неисправан списак URI ознака"
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr "примљен је неисправан Мозилин URL"
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr "Није могуће приказати помоћ"
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr "Није могуће покренути нит: %s."
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr "_Не приказуј више ову поруку"
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr "Дошло је до кобне грешке у програму за дојаву поште"
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, c-format
msgid "unable to get current time: %s"
msgstr "није могуће добавити тренутно време: %s"
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr "неважећа одредница за сигнал ?%s?"
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr "Дошло је до грешке у командама"
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, c-format
msgid "Unable to execute \"%s\": %s."
msgstr "Није могуће извршити %s: %s"
#: ui/authentication.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: ui/authentication.glade.h:2
msgid "_Authenticate"
msgstr "Пријави се"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr "Уреди алатне траке"
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr "_Додај нову алатну траку"
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
+msgstr "_Користи подразумевано"
+
#: ui/mailbox-properties.glade.h:1
msgid "_Mailbox type:"
msgstr "_Врста сандучета:"
#: ui/properties.glade.h:1
-msgid " "
-msgstr " "
-
-#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Commands</span>"
msgstr "<span weight=\"bold\">Наредбе</span>"
-#: ui/properties.glade.h:3
+#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Double-click Action</span>"
msgstr "<span weight=\"bold\">Наредба за дупли клик</span>"
-#: ui/properties.glade.h:4
+#: ui/properties.glade.h:3
msgid "<span weight=\"bold\">Fonts</span>"
msgstr "<span weight=\"bold\">Писма</span>"
-#: ui/properties.glade.h:5
+#: ui/properties.glade.h:4
msgid "<span weight=\"bold\">General</span>"
msgstr "<span weight=\"bold\">Опште</span>"
-#: ui/properties.glade.h:6
+#: ui/properties.glade.h:5
msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr "<span weight=\"bold\">Сандучићи</span>"
-#: ui/properties.glade.h:7
+#: ui/properties.glade.h:6
msgid "<span weight=\"bold\">Position</span>"
msgstr "<span weight=\"bold\">Место</span>"
+#: ui/properties.glade.h:7
+msgid "Co_ntents:"
+msgstr "_Садржај:"
+
#: ui/properties.glade.h:8
msgid "Dis_play mail summary in tooltip"
msgstr "Прикажи прозор са сажетком порука у облачићу"
@@ -1583,107 +1826,100 @@ msgstr ""
"сажетком порука"
#: ui/properties.glade.h:23
+msgid "Use these _fonts:"
+msgstr "Користи ова _писма:"
+
+#: ui/properties.glade.h:24
msgid "When _all mail is read:"
msgstr "Када је с_ва пошта прочитана:"
-#: ui/properties.glade.h:24
+#: ui/properties.glade.h:25
msgid "When _new mail arrives:"
msgstr "Када _стигне нова пошта:"
-#: ui/properties.glade.h:25
+#: ui/properties.glade.h:26
msgid "Whether the status icon should blink on errors or not"
msgstr "Да ли статусна сличица трепери при грешкама или не"
-#: ui/properties.glade.h:26
+#: ui/properties.glade.h:27
msgid "Whether to automatically close the mail summary popup or not"
msgstr ""
"Да ли треба или не треба аутоматски затворити прозор са сажетком порука"
-#: ui/properties.glade.h:27
+#: ui/properties.glade.h:28
msgid "Whether to display the mail summary in the status icon tooltip or not"
msgstr "Да ли треба или не треба приказивати сажетак порука у облачићу"
-#: ui/properties.glade.h:28
+#: ui/properties.glade.h:29
msgid "Whether to display the mail summary popup when new mail arrives or not"
msgstr ""
"Да ли треба или не треба приказивати сажетак порука када стигне нова пошта"
-#: ui/properties.glade.h:29
+#: ui/properties.glade.h:30
msgid "Whether to hide previously displayed mail or not"
msgstr "Да ли треба приказивати претходно приказане поруке или не"
-#: ui/properties.glade.h:30
+#: ui/properties.glade.h:31
msgid "Whether to run a command when all mail is read or not"
msgstr "Да ли се покреће или не покреће команда када је сва пошта прочитана"
-#: ui/properties.glade.h:31
+#: ui/properties.glade.h:32
msgid "Whether to run a command when new mail arrives or not"
msgstr "Да ли се покреће команда када стигне пошта или не"
-#: ui/properties.glade.h:32
+#: ui/properties.glade.h:33
msgid "Whether to set a mail reader or not"
msgstr "Да ли треба поставити читач поште"
-#: ui/properties.glade.h:33
+#: ui/properties.glade.h:34
msgid ""
"Whether to start Mail Notification when you log into your GNOME session or "
"not"
msgstr "Да ли покренути дојаву поште када се пријавите на систем"
-#: ui/properties.glade.h:34
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not"
-msgstr ""
-"Да ли треба или не треба користити посебно писмо за садржај прозора са "
-"сажетком порука"
-
#: ui/properties.glade.h:35
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
-msgstr ""
-"Да ли треба или не треба користити посебно писмо за наслов прозора са "
-"сажетком порука"
-
-#: ui/properties.glade.h:36
msgid "_Automatically close after:"
msgstr "_Аутоматски затвори после:"
-#: ui/properties.glade.h:37
+#: ui/properties.glade.h:36
msgid "_Blink on errors"
msgstr "_Трепери при грешкама"
-#: ui/properties.glade.h:38
-msgid "_Contents font:"
-msgstr "_Писмо за садржај:"
-
-#: ui/properties.glade.h:39
+#: ui/properties.glade.h:37
msgid "_Delay between mail checks:"
msgstr "_Пауза између провера:"
-#: ui/properties.glade.h:40
-msgid "_Display the mail summary dialog"
-msgstr "Прикажи прозор са сажетком порука"
+#: ui/properties.glade.h:38
+msgid "_Display the main window"
+msgstr "_Прикажи главни прозор"
-#: ui/properties.glade.h:41
+#: ui/properties.glade.h:39
msgid "_Enable mail summary popup"
msgstr "Дозволи приказ сажетка порука"
-#: ui/properties.glade.h:42
+#: ui/properties.glade.h:40
msgid "_Launch the mail reader"
msgstr "П_окрени читач поште"
-#: ui/properties.glade.h:43
+#: ui/properties.glade.h:41
msgid "_Mail reader:"
msgstr "_Читач поште:"
-#: ui/properties.glade.h:44
+#: ui/properties.glade.h:42
msgid "_Start Mail Notification on GNOME login"
msgstr "Покрени _дојаву при пријави"
+#: ui/properties.glade.h:43
+msgid "_Title:"
+msgstr "_Наслов:"
+
+#: ui/properties.glade.h:44
+msgid "_Update the mail status"
+msgstr "_Освежи податке о пошти"
+
#: ui/properties.glade.h:45
-msgid "_Title font:"
-msgstr "Писмо за _наслов:"
+msgid "_Use fonts from theme"
+msgstr "Користи писма из _теме"
#: ui/properties.glade.h:46
msgid "_Vertical offset:"
@@ -1711,7 +1947,7 @@ msgid ""
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
@@ -1741,15 +1977,76 @@ msgstr "_Подеси дојаву поште"
msgid "_Skip configuration"
msgstr "П_рескочи подешавања"
+#~ msgid "received non-ASCII data from server"
+#~ msgstr "сервер је послао знаке који не спадају у скуп АСКРИ"
+
+#~ msgid "Use a custom font for the contents of the mail summary popup"
+#~ msgstr "Користи посебно писмо за садржај прозора са сажетком порука"
+
+#~ msgid "Use a custom font for the title of the mail summary popup"
+#~ msgstr "Користи посебно писмо за наслов прозора са сажетком порука"
+
+#~ msgid ""
+#~ "Whether to use a custom font for the contents of the mail summary popup "
+#~ "or not."
+#~ msgstr ""
+#~ "Да ли треба или не треба користити посебно писмо за садржај прозора са "
+#~ "сажетком поште."
+
+#~ msgid ""
+#~ "Whether to use a custom font for the title of the mail summary popup or "
+#~ "not."
+#~ msgstr ""
+#~ "Да ли треба или не треба кориситити посебно писмо за наслов прозора са "
+#~ "сажетком поште."
+
+#~ msgid "server did not send status"
+#~ msgstr "сервер није послао статус"
+
+#~ msgid "_Launch Mail Reader"
+#~ msgstr "_Покрени читач поште"
+
+#~ msgid "Whether the mailbox has new mail or not"
+#~ msgstr "Да ли у сандучету стоји нова пошта или не"
+
+#~ msgid "%s has no new mail"
+#~ msgstr "Сандуче %s нема нову пошту"
+
+#~ msgid "Display the mail summary dialog"
+#~ msgstr "Прикажи прозор са сажетком порука"
+
+#~ msgid "error while reading mailbox: %s"
+#~ msgstr "грешка при читању сандучета: %s"
+
+#~ msgid "_Mail Summary"
+#~ msgstr "_Сажетак порука"
+
+#~ msgid "*"
+#~ msgstr "*"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid ""
+#~ "Whether to use a custom font for the contents of the mail summary popup "
+#~ "or not"
+#~ msgstr ""
+#~ "Да ли треба или не треба користити посебно писмо за садржај прозора са "
+#~ "сажетком порука"
+
+#~ msgid ""
+#~ "Whether to use a custom font for the title of the mail summary popup or "
+#~ "not"
+#~ msgstr ""
+#~ "Да ли треба или не треба користити посебно писмо за наслов прозора са "
+#~ "сажетком порука"
+
#~ msgid "The following mailbox has new mail:\n"
#~ msgid_plural "The following mailboxes have new mail:\n"
#~ msgstr[0] "Сандуче са новом поштом:\n"
#~ msgstr[1] "Сандучићи са новом поштом:\n"
#~ msgstr[2] "Сандучићи са новом поштом:\n"
-#~ msgid "You have no new mail."
-#~ msgstr "Нема поште."
-
#~ msgid "The following mailbox reported an error:\n"
#~ msgid_plural "The following mailboxes reported an error:\n"
#~ msgstr[0] "Ово сандуче има грешку:\n"
@@ -1806,4 +2103,4 @@ msgstr "П_рескочи подешавања"
#~ msgstr "При _двоструком клику:"
#~ msgid "Whether to run a command when the icon is double-clicked or not"
-#~ msgstr "Да ли се покреће команд� при двоструком клику или не"
+#~ msgstr "Да ли се покреће команда при двоструком клику или не"
diff --git a/po/sr@Latn.gmo b/po/sr@Latn.gmo
Binary files differ.
diff --git a/po/sr@Latn.po b/po/sr@Latn.po
@@ -1,20 +1,20 @@
# Serbian translations for mail-notification.
-# Copyright (c) 2003, 2004 Jean-Yves Lefort.
+# Copyright (C) 2003-2005 Jean-Yves Lefort.
#
# This file is distributed under the same license as the
# mail-notification package.
#
-# Filip Miletic <filmil@gmail.com>, 2004.
+# Filip Miletic <filmil@gmail.com>, 2004, 2005.
#
# Both Serbian Cyrillic and Serbian Latin files should
# be available.
#
msgid ""
msgstr ""
-"Project-Id-Version: mail-notification 1.0\n"
+"Project-Id-Version: mail-notification 1.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-25 01:43+0100\n"
-"PO-Revision-Date: 2004-11-21 19:32:+0100\n"
+"POT-Creation-Date: 2005-03-02 02:32+0100\n"
+"PO-Revision-Date: 2005-03-01 02:18+0100\n"
"Last-Translator: Filip Miletić <filmil@gmail.com>\n"
"Language-Team: Serbian (sr) <gnu@prevod.org>\n"
"MIME-Version: 1.0\n"
@@ -31,14 +31,14 @@ msgstr "Dojava prispeća pošte"
msgid "Mail Notification automation factory"
msgstr "Fabrika ѕa dojavu prispeća pošte"
-#: data/mail-notification-properties.desktop.in.h:1
+#: data/mail-notification-properties.desktop.in.h:1 src/mn-main-window.c:145
msgid "Configure Mail Notification"
msgstr "Podesi dojavu prispeća pošte"
#: data/mail-notification-properties.desktop.in.h:2
#: data/mail-notification.desktop.in.h:2
-#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:40
-#: src/mn-mail-icon.gob:194 src/mn-main.c:281
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:39
+#: src/mn-mail-icon.gob:224 src/mn-main.c:292 ui/main.glade.h:1
msgid "Mail Notification"
msgstr "Dojava pošte"
@@ -87,149 +87,168 @@ msgid "Has already been run"
msgstr "Već je pokrenut"
#: data/mail-notification.schemas.in.h:11
-msgid "Height of mail summary dialog"
-msgstr "Visina prozora sa sažetkom poruka"
+msgid "Height of edit toolbars dialog"
+msgstr "Visina prozora za uređivanje alatnih traka"
#: data/mail-notification.schemas.in.h:12
+msgid "Height of main window"
+msgstr "Visina glavnog prozora"
+
+#: data/mail-notification.schemas.in.h:13
msgid "Height of properties dialog"
msgstr "Visina prozora sa postavkama"
-#: data/mail-notification.schemas.in.h:13
+#: data/mail-notification.schemas.in.h:14
msgid "Mail read command"
msgstr "Komanda za čitanje pošte"
-#: data/mail-notification.schemas.in.h:14
+#: data/mail-notification.schemas.in.h:15
msgid "Mail reader command"
msgstr "Komanda za čitanje pošte"
-#: data/mail-notification.schemas.in.h:15
+#: data/mail-notification.schemas.in.h:16
msgid "Mail summary popup contents font"
msgstr "Pismo koje se koristi za sadržaj prozora sa sažetkom poruka"
-#: data/mail-notification.schemas.in.h:16
+#: data/mail-notification.schemas.in.h:17
+msgid "Mail summary popup fonts aspect source"
+msgstr "Izvor za aspekt za pismo u prozoru za sažetak (???)"
+
+#: data/mail-notification.schemas.in.h:18
msgid "Mail summary popup horizontal offset"
msgstr "Pomeraj horizontalnih tačaka za prozor sa sažetkom poruka"
-#: data/mail-notification.schemas.in.h:17
+#: data/mail-notification.schemas.in.h:19
msgid "Mail summary popup position"
msgstr "Broj horizontalnih tačaka za prozor sa sažetkom poruka"
-#: data/mail-notification.schemas.in.h:18
+#: data/mail-notification.schemas.in.h:20
msgid "Mail summary popup title font"
msgstr "Pismo koje se koristi za naslov prozora sa sažetkom poruka"
-#: data/mail-notification.schemas.in.h:19
+#: data/mail-notification.schemas.in.h:21
msgid "Mail summary popup vertical offset"
msgstr "Pomeraj vertikalnih tačaka ѕa prozor sa sažetkom poruka"
-#: data/mail-notification.schemas.in.h:20
+#: data/mail-notification.schemas.in.h:22
msgid "Mailbox list"
msgstr "Spisak sandučića"
-#: data/mail-notification.schemas.in.h:21
+#: data/mail-notification.schemas.in.h:23
msgid "Minutes between mail checks"
msgstr "Minuta između dve provere"
-#: data/mail-notification.schemas.in.h:22
+#: data/mail-notification.schemas.in.h:24
msgid "Minutes to wait before closing the mail summary popup"
msgstr ""
"Broj minuta koji treba da protekne pre zatvaranja prozora sa sažetkom poruka"
-#: data/mail-notification.schemas.in.h:23
+#: data/mail-notification.schemas.in.h:25
msgid "New mail command"
msgstr "Izvrši kada pošta stigne"
-#: data/mail-notification.schemas.in.h:24
+#: data/mail-notification.schemas.in.h:26
msgid "Only display recent mail in mail summary popup"
msgstr "Prikaži samo skoro prispele poruke u sažetku"
-#: data/mail-notification.schemas.in.h:25
+#: data/mail-notification.schemas.in.h:27
msgid "Run a command when all mail is read"
msgstr "Pokreni komandu kada je sva pošta pročitana"
-#: data/mail-notification.schemas.in.h:26
+#: data/mail-notification.schemas.in.h:28
msgid "Run a command when new mail arrives"
msgstr "Pokreni komandu kada stigne nova pošta"
-#: data/mail-notification.schemas.in.h:27
+#: data/mail-notification.schemas.in.h:29
msgid "Seconds between mail checks"
msgstr "Sekundi između dve provere"
-#: data/mail-notification.schemas.in.h:28
+#: data/mail-notification.schemas.in.h:30
msgid "Seconds to wait before closing the mail summary popup"
msgstr "Broj sekundi koji treba da protekne pre zatvaranja sažetka poruka"
-#: data/mail-notification.schemas.in.h:29
+#: data/mail-notification.schemas.in.h:31
msgid "Set a mail reader"
msgstr "Izaberite čitač pošte"
-#: data/mail-notification.schemas.in.h:30
+#: data/mail-notification.schemas.in.h:32
msgid ""
"The action to perform when the icon is double-clicked. Must be \"display-"
-"mail-summary\" or \"launch-mail-reader\"."
+"main-window\", \"launch-mail-reader\" or \"update-mail-status\"."
msgstr ""
"Postavljanje naredbe koja se izvršava pri dvostrukom kliku na sličicu. "
-"Mogući izbori su: ?prikaži-sažetak-pošte? ili ?pokreni-čitač-pošte?."
+"Mogući izbori su: ?glavni-prozor?, ?pokreni-čitač-pošte? ili ?ažuriraj-"
+"status-pošte?."
-#: data/mail-notification.schemas.in.h:31
+#: data/mail-notification.schemas.in.h:33
msgid ""
"The amount of time to wait before closing the mail summary popup (minutes "
"part)."
msgstr "Pauza pre zatvaranja prozora sa sažetkom poruka (minuti)."
-#: data/mail-notification.schemas.in.h:32
+#: data/mail-notification.schemas.in.h:34
msgid ""
"The amount of time to wait before closing the mail summary popup (seconds "
"part)."
msgstr "Pauza pre zatvaranja prozora sa sažetkom poruka (sekunde)."
-#: data/mail-notification.schemas.in.h:33
+#: data/mail-notification.schemas.in.h:35
+msgid ""
+"The aspect source of the mail summary popup fonts. Must be \"theme\" or "
+"\"custom\"."
+msgstr "Izvor za podešavanja pisma. Može biti: ?tema? ili ?poseban?."
+
+#: data/mail-notification.schemas.in.h:36
msgid "The command to run to launch the mail reader."
msgstr "Komanda kojom se pokreće čitač pošte"
-#: data/mail-notification.schemas.in.h:34
+#: data/mail-notification.schemas.in.h:37
msgid "The command to run when all mail is read."
msgstr "Komanda koju treba pokrenuti kada je sva pošta pročitana."
-#: data/mail-notification.schemas.in.h:35
+#: data/mail-notification.schemas.in.h:38
msgid "The command to run when new mail arrives."
msgstr "Pokreni ovu komandu kada stigne nova pošta."
-#: data/mail-notification.schemas.in.h:36
+#: data/mail-notification.schemas.in.h:39
msgid "The custom font to use for the contents of the mail summary popup."
msgstr ""
"Posebno pismo koje se koristi za ispis sadržaja prozora sa sažetkom poruka."
-#: data/mail-notification.schemas.in.h:37
+#: data/mail-notification.schemas.in.h:40
msgid "The custom font to use for the title of the mail summary popup."
msgstr ""
"Posebno pismo koje se koristi za ispis naslova prozora sa sažetkom poruka."
-#: data/mail-notification.schemas.in.h:38
-msgid "The height of the mail summary dialog in pixels."
-msgstr "Visina prozora sa sažetkom poruka izražena u tačkama."
+#: data/mail-notification.schemas.in.h:41
+msgid "The height of the edit toolbars dialog in pixels."
+msgstr "Visina prozora za uređivanje statusnih traka, izražena u tačkama."
-#: data/mail-notification.schemas.in.h:39
+#: data/mail-notification.schemas.in.h:42
+msgid "The height of the main window in pixels."
+msgstr "Visina glavnog prozora izražena u tačkama."
+
+#: data/mail-notification.schemas.in.h:43
msgid "The height of the properties dialog in pixels."
msgstr "Visina prozora sa postavkama izražena u tačkama."
-#: data/mail-notification.schemas.in.h:40
+#: data/mail-notification.schemas.in.h:44
msgid "The list of mailboxes to monitor."
msgstr "Spisak sandučića koji se prate."
-#: data/mail-notification.schemas.in.h:41
+#: data/mail-notification.schemas.in.h:45
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
msgstr ""
"Spisak proverenih SSL/TLS servera (računar:port) koji nemaju X509 sertifikat."
-#: data/mail-notification.schemas.in.h:42
+#: data/mail-notification.schemas.in.h:46
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr "Spisak proverenih X509 sertifikata, predstavljenih MD5 otiskom."
-#: data/mail-notification.schemas.in.h:43
+#: data/mail-notification.schemas.in.h:47
msgid ""
"The number of pixels to leave between the left or right side of the screen "
"and the mail summary popup."
@@ -237,7 +256,7 @@ msgstr ""
"Broj tačaka koje treba ostaviti između leve, odn. desne strane ekrana i "
"prozora sa sažetkom poruka."
-#: data/mail-notification.schemas.in.h:44
+#: data/mail-notification.schemas.in.h:48
msgid ""
"The number of pixels to leave between the top or bottom side of the screen "
"and the mail summary popup."
@@ -245,7 +264,7 @@ msgstr ""
"Broj tačaka koje treba ostaviti između vrha, odn. dna ekrana i prozora sa "
"sažetkom poruka."
-#: data/mail-notification.schemas.in.h:45
+#: data/mail-notification.schemas.in.h:49
msgid ""
"The position of the mail summary popup. Must be \"top-left\", \"top-right\", "
"\"bottom-left\" or \"bottom-right\"."
@@ -253,93 +272,106 @@ msgstr ""
"Položaj prozora sa sažetkom poruka. Može biti: ?gore-levo?, ?gore-desno?, ?"
"dole-levo? ili ?dole-desno?."
-#: data/mail-notification.schemas.in.h:46
-msgid "The width of the mail summary dialog in pixels."
-msgstr "Širina prozora sa sažetkom poruka izražena u tačkama."
+#: data/mail-notification.schemas.in.h:50
+msgid ""
+"The style of the toolbars. Must be \"desktop-default\", \"icons\", \"text\", "
+"\"both\" or \"both-horiz\"."
+msgstr ""
+"Stil alatnih traka. Može biti: ?podrazumevan?, ?slike?, ?tekst?, ?oba?, ?oba-"
+"vodoravno?."
-#: data/mail-notification.schemas.in.h:47
+#: data/mail-notification.schemas.in.h:51
+msgid "The width of the edit toolbars dialog in pixels."
+msgstr "Širina prozora za uređivanje statusnih traka, izražena u tačkama."
+
+#: data/mail-notification.schemas.in.h:52
+msgid "The width of the main window in pixels."
+msgstr "Širina prozora glavnog prozora izražena u tačkama."
+
+#: data/mail-notification.schemas.in.h:53
msgid "The width of the properties dialog in pixels."
msgstr "Širina prozora sa postavkama izražena u tačkama."
-#: data/mail-notification.schemas.in.h:48
+#: data/mail-notification.schemas.in.h:54
+msgid "Toolbars style"
+msgstr "Stil alatne trake"
+
+#: data/mail-notification.schemas.in.h:55
msgid "Trusted servers list"
msgstr "Spisak proverenih servera"
-#: data/mail-notification.schemas.in.h:49
-msgid "Use a custom font for the contents of the mail summary popup"
-msgstr "Koristi posebno pismo za sadržaj prozora sa sažetkom poruka"
+#: data/mail-notification.schemas.in.h:56
+msgid "View statusbar"
+msgstr "Prikaži statusnu traku"
-#: data/mail-notification.schemas.in.h:50
-msgid "Use a custom font for the title of the mail summary popup"
-msgstr "Koristi posebno pismo za naslov prozora sa sažetkom poruka"
+#: data/mail-notification.schemas.in.h:57
+msgid "View toolbars"
+msgstr "Prikaži alatnu traku"
-#: data/mail-notification.schemas.in.h:51
+#: data/mail-notification.schemas.in.h:58
msgid "Whether Mail Notification has already been run or not."
msgstr "Da li je program pokretan pre ili nije."
-#: data/mail-notification.schemas.in.h:52
+#: data/mail-notification.schemas.in.h:59
msgid "Whether the status icon should blink on errors or not."
msgstr "Da li sličica treba da treperi ako dođe do greške ili ne."
-#: data/mail-notification.schemas.in.h:53
+#: data/mail-notification.schemas.in.h:60
+msgid "Whether the statusbar should be visible or not."
+msgstr "Da li statusna linija treba da se vidi ili ne."
+
+#: data/mail-notification.schemas.in.h:61
+msgid "Whether the toolbars should be visible or not."
+msgstr "Da li alatne trake treba da se vide ili ne"
+
+#: data/mail-notification.schemas.in.h:62
msgid "Whether to automatically close the mail summary popup or not."
msgstr ""
"Da li treba ili ne treba automatski zatvoriti prozor sa sažetkom pošte."
-#: data/mail-notification.schemas.in.h:54
+#: data/mail-notification.schemas.in.h:63
msgid "Whether to display the mail summary in the status icon tooltip or not."
msgstr ""
"Da li treba prikazati sažetak poruka u oblačiću statusne sličice ili ne."
-#: data/mail-notification.schemas.in.h:55
+#: data/mail-notification.schemas.in.h:64
msgid "Whether to display the mail summary popup when new mail arrives or not."
msgstr "Da li treba prikazati sažetak poruka kada stigne nova pošta."
-#: data/mail-notification.schemas.in.h:56
+#: data/mail-notification.schemas.in.h:65
msgid ""
"Whether to hide previously displayed mail in the mail summary popup or not."
msgstr ""
"Da li iz sažetka treba ukloniti poruke koje su se u njemu već pre pojavile."
-#: data/mail-notification.schemas.in.h:57
+#: data/mail-notification.schemas.in.h:66
msgid ""
"Whether to prevent the immediate notification error dialog from being "
"displayed or not."
msgstr "Da li treba ili ne treba sprečiti pojavu prozora sa opisom grešaka."
-#: data/mail-notification.schemas.in.h:58
+#: data/mail-notification.schemas.in.h:67
msgid "Whether to run a command when all mail is read or not."
msgstr ""
"Da li treba ili ne treba pokrenuti neku komandu kada je sva pošta pročitana."
-#: data/mail-notification.schemas.in.h:59
+#: data/mail-notification.schemas.in.h:68
msgid "Whether to run a command when new mail arrives or not."
msgstr "Da li treba pokrenuti neku komandu kada stigne nova pošta."
-#: data/mail-notification.schemas.in.h:60
+#: data/mail-notification.schemas.in.h:69
msgid "Whether to set a mail reader or not."
msgstr "Da li treba postaviti čitač pošte ili ne."
-#: data/mail-notification.schemas.in.h:61
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not."
-msgstr ""
-"Da li treba ili ne treba koristiti posebno pismo za sadržaj prozora sa "
-"sažetkom pošte."
-
-#: data/mail-notification.schemas.in.h:62
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not."
-msgstr ""
-"Da li treba ili ne treba korisititi posebno pismo za naslov prozora sa "
-"sažetkom pošte."
+#: data/mail-notification.schemas.in.h:70
+msgid "Width of edit toolbars dialog"
+msgstr "Širina prozora za uređivanje statusnih traka"
-#: data/mail-notification.schemas.in.h:63
-msgid "Width of mail summary dialog"
-msgstr "Širina prozora sa sažetkom poruka"
+#: data/mail-notification.schemas.in.h:71
+msgid "Width of main window"
+msgstr "Širina glavnog prozora"
-#: data/mail-notification.schemas.in.h:64
+#: data/mail-notification.schemas.in.h:72
msgid "Width of properties dialog"
msgstr "Širina prozora sa postavkama"
@@ -347,6 +379,22 @@ msgstr "Širina prozora sa postavkama"
msgid "New Mail"
msgstr "Nova pošta"
+#: src/egg-editable-toolbar.c:536
+msgid "_Remove Toolbar"
+msgstr "_Ukloni alatnu traku"
+
+#: src/egg-toolbar-editor.c:558
+msgid "Separator"
+msgstr "Graničnik"
+
+#: src/egg-toolbar-editor.c:588
+msgid ""
+"Drag an item onto the toolbars above to add it, from the toolbars in the "
+"items table to remove it."
+msgstr ""
+"Prevucite stavku na alatnu traku kako biste je dodali, ili sa alatne trake u "
+"tabelu, kako biste je uklonili."
+
#: src/eggtrayicon.c:109
msgid "Orientation"
msgstr "Orijentacija"
@@ -355,21 +403,21 @@ msgstr "Orijentacija"
msgid "The orientation of the tray."
msgstr "Orijentacija obaveštajne zone."
-#: src/mn-about-dialog.gob:43
+#: src/mn-about-dialog.gob:42
msgid "A Mail Notification Icon"
msgstr "Sličica za dojavu prispeća pošte"
# The email of the translator goes here
#. translator: replace with your name and email
-#: src/mn-about-dialog.gob:47
+#: src/mn-about-dialog.gob:46
msgid "Jean-Yves Lefort <jylefort@brutele.be>"
msgstr "Filip Miletić <filmil@gmail.com>"
-#: src/mn-auth-combo-box.gob:101 src/mn-autodetect-mailbox-properties.gob:37
+#: src/mn-auth-combo-box.gob:102 src/mn-autodetect-mailbox-properties.gob:39
msgid "<span style=\"italic\">autodetect</span>"
msgstr "<span style=\"italic\">sam pronađi</span>"
-#: src/mn-authenticated-mailbox.gob:80
+#: src/mn-authenticated-mailbox.gob:85
#, c-format
msgid ""
"Mail Notification was unable to log into %s mailbox %s, possibly because the "
@@ -382,12 +430,12 @@ msgstr ""
"\n"
"Molim unesite ponovo lozinku."
-#: src/mn-authenticated-mailbox.gob:81
+#: src/mn-authenticated-mailbox.gob:86
#, c-format
msgid "Enter your password for %s mailbox %s."
msgstr "Unesite lozinku za %s sanduče %s."
-#: src/mn-authenticated-mailbox.gob:132
+#: src/mn-authenticated-mailbox.gob:137
#, c-format
msgid ""
"<span weight=\"bold\" size=\"larger\">Mail Notification requires a password</"
@@ -400,11 +448,11 @@ msgstr ""
"\n"
"%s"
-#: src/mn-autodetect-mailbox-properties.gob:68
+#: src/mn-autodetect-mailbox-properties.gob:70
msgid "_Location:"
msgstr "_Mesto:"
-#: src/mn-autodetect-mailbox-properties.gob:74
+#: src/mn-autodetect-mailbox-properties.gob:76
msgid "_Browse..."
msgstr "_Pregledaj..."
@@ -412,7 +460,7 @@ msgstr "_Pregledaj..."
msgid "The URI of the mailbox"
msgstr "URI oznaka poštanskog sandučega"
-#: src/mn-autodetect-mailbox-properties.gob:118
+#: src/mn-autodetect-mailbox-properties.gob:123
msgid "Select a File or Folder"
msgstr "Izaberite datoteku ili direktorijum"
@@ -549,123 +597,132 @@ msgstr "Nije moguće čitanje sa servera: EOF"
msgid "unable to decode data using SASL: %s"
msgstr "Ne mogu se dekodovati podaci putem SASL: %s"
-#: src/mn-client-session.c:746
+#: src/mn-client-session.c:743
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr "nije moguće kodirati podatke uz pomoć SASL: %s"
-#: src/mn-client-session.c:777 src/mn-client-session.c:784
+#: src/mn-client-session.c:774 src/mn-client-session.c:781
#, c-format
msgid "unable to write to server: %s"
msgstr "nije moguć upis na server: %s"
-#: src/mn-client-session.c:782
+#: src/mn-client-session.c:779
msgid "unable to write to server: EOF"
msgstr "nije moguć upis na server: EOF"
-#: src/mn-client-session.c:814
+#: src/mn-client-session.c:811
#, c-format
msgid "unable to encode Base64: %s"
msgstr "nije moguće kodirati Base64: %s"
-#: src/mn-client-session.c:925
+#: src/mn-client-session.c:922
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr "ne može se pokrenuti SASL biblioteka: %s"
-#: src/mn-client-session.c:934
+#: src/mn-client-session.c:931
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr "ne može da se dobavi lokalna adresa utičnice: %s"
-#: src/mn-client-session.c:940
+#: src/mn-client-session.c:937
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr "ne može da se dobavi udaljena adresa utičnice: %s"
-#: src/mn-client-session.c:974
+#: src/mn-client-session.c:971
#, c-format
-msgid "warning: unable to set SASL security properties: %s"
-msgstr "upozorenje: nije moguće postaviti SASL sigurnosne postavke %s"
+msgid "unable to set SASL security properties: %s"
+msgstr "nije moguće postaviti SASL sigurnosne postavke: %s"
-#: src/mn-client-session.c:998
+#: src/mn-client-session.c:995
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr "ne može se pokrenuti SASL prijava: SASL traži podatke koje nemamo"
-#: src/mn-client-session.c:1017
+#: src/mn-client-session.c:1014
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr "ne može se pokrenuti SASL prijava: %s"
-#: src/mn-client-session.c:1021
+#: src/mn-client-session.c:1018
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr "nije moguće uspostaviti SASL vezu: %s"
-#: src/mn-client-session.c:1058
+#: src/mn-client-session.c:1055
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr "SASL je tražio nama nepoznate podatke, obustavljam SASL prijavu"
-#: src/mn-client-session.c:1075
+#: src/mn-client-session.c:1072
#, c-format
msgid "%s, aborting SASL authentication"
msgstr "%s, obustavljam SASL prijavu"
#. compliance error
-#: src/mn-client-session.c:1080
+#: src/mn-client-session.c:1077
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr "nije moguće dekodovati Base64 ulaz sa servera: %s"
-#: src/mn-client-session.c:1083
+#: src/mn-client-session.c:1080
msgid ""
"the server sent a SASL challenge, but there was a pending initial SASL "
"client response"
msgstr ""
"server je započeo SASL razgovor, ali odgovor od klijenta stigao pre toga"
-#: src/mn-client-session.c:1097
+#: src/mn-client-session.c:1094
msgid ""
"the server did not send a SASL challenge, but there was no pending initial "
"SASL client response"
msgstr ""
"server nije poslao SASL razgovor, ali nije bilo ni odgovora od klijenta."
-#: src/mn-client-session.c:1122
+#: src/mn-client-session.c:1119
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr "SASL sigurnosni sloj nivoa snage %i je uspostavljen"
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: src/mn-client-session.c:1127
+#: src/mn-client-session.c:1124
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr "ne mogu da pročitam postavku SASL_MAXOUTBUF: %s"
-#: src/mn-client-session.c:1133
+#: src/mn-client-session.c:1130
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr "upozorenje: ne mogu da pročitam postavku SASL_SSF: %s"
-#: src/mn-conf.c:145
+#: src/mn-conf.c:238
+msgid "A directory creation error has occurred"
+msgstr "Došlo je do greške pri pravljenju direktorijuma"
+
+#: src/mn-conf.c:239
+#, c-format
+msgid "Unable to create directory \"%s\": %s."
+msgstr "Nije moguće napraviti direktorijum ?%s?: %s."
+
+#: src/mn-conf.c:313
#, c-format
msgid "recursively unsetting %s"
msgstr "rekurzivno poništavam %s"
-#: src/mn-conf.c:149
+#: src/mn-conf.c:317
msgid "syncing the GConf database"
msgstr "usklađujem GConf bazu podataka"
-#: src/mn-conf.c:152
+#: src/mn-conf.c:320
msgid "completed"
msgstr "urađeno"
-#: src/mn-gmail-mailbox-properties.gob:77
+#: src/mn-gmail-mailbox-properties.gob:76
msgid "Your Gmail username"
msgstr "Vaš nalog na servisu Gmail"
-#: src/mn-gmail-mailbox-properties.gob:78
+#: src/mn-gmail-mailbox-properties.gob:77
msgid ""
"Your Gmail password (if left blank, you will be prompted for the password "
"when needed)"
@@ -673,36 +730,59 @@ msgstr ""
"Vaša lozinka na servisu Gmail (ako ne upišete lozinku, program će Vas "
"zamoliti da je unesete kada to bude potrebno)"
-#: src/mn-gmail-mailbox.gob:82
+#: src/mn-gmail-mailbox.gob:86
msgid "libsoup has not been compiled with SSL/TLS support"
msgstr "libsoup nije izgrađen sa podrškom za SSL/TLS"
-#: src/mn-gmail-mailbox.gob:160
+#: src/mn-gmail-mailbox.gob:164
#, c-format
msgid "unable to parse URI \"%s\""
msgstr "nije moguće obraditi URI \"%s\""
-#: src/mn-gmail-mailbox.gob:214
+#: src/mn-gmail-mailbox.gob:217
+msgid "received non-UTF-8 data from server"
+msgstr "server je poslao znake koji ne spadaju u skup UTF-8"
+
+#: src/mn-gmail-mailbox.gob:224
#, c-format
msgid "unable to transfer data: %s"
msgstr "ne mogu da preuzmem podatke: %s"
-#: src/mn-gmail-mailbox.gob:335
+#: src/mn-gmail-mailbox.gob:345
msgid "logging in"
msgstr "prijava u toku"
-#: src/mn-gmail-mailbox.gob:413
+#: src/mn-gmail-mailbox.gob:423
msgid "login failed"
msgstr "prijava nije uspela"
-#: src/mn-gmail-mailbox.gob:488
+#: src/mn-gmail-mailbox.gob:496
msgid "searching for unread mail"
msgstr "tražim novu poštu"
#: src/mn-gmail-mailbox.gob:527
+msgid "unable to initialize the ICU library"
+msgstr "ne može se pokrenuti ICU biblioteka"
+
+#: src/mn-gmail-mailbox.gob:554
msgid "unable to parse Gmail data"
msgstr "ne mogu da obradim podatke sa servisa Gmail"
+#: src/mn-gmail-mailbox.gob:891
+#, c-format
+msgid "unable to open calendar: %s"
+msgstr "nije moguće otvoriti kalendar: %s"
+
+#: src/mn-gmail-mailbox.gob:899
+#, c-format
+msgid "unable to set calendar time: %s"
+msgstr "nije moguće postaviti vreme iz kalendara: %s"
+
+#: src/mn-gmail-mailbox.gob:968
+#, c-format
+msgid "unable to get calendar time: %s"
+msgstr "nije moguće dobaviti vreme iz kalendara: %s"
+
#: src/mn-gmime-stream-vfs.gob:49
#, c-format
msgid "unable to read %s: %s"
@@ -728,19 +808,19 @@ msgstr "nije moguće saznati položaj za %s: %s"
msgid "unable to close %s: %s"
msgstr "nije moguće zatvoriti %s: %s"
-#: src/mn-imap-mailbox-properties.gob:94
+#: src/mn-imap-mailbox-properties.gob:95
msgid "Mailbox:"
msgstr "Sanduče:"
-#: src/mn-imap-mailbox-properties.gob:98
+#: src/mn-imap-mailbox-properties.gob:99
msgid "in_box"
msgstr "in_box"
-#: src/mn-imap-mailbox-properties.gob:109
+#: src/mn-imap-mailbox-properties.gob:110
msgid "oth_er:"
msgstr "_drugo:"
-#: src/mn-imap-mailbox-properties.gob:121
+#: src/mn-imap-mailbox-properties.gob:122
msgid "U_se idle mode if possible"
msgstr "K_oristi vreme dokolice, ako je moguće"
@@ -773,50 +853,45 @@ msgstr "Ime sandučeta"
msgid "If possible, whether to use idle mode or not"
msgstr "Da li treba koristiti vreme dokolice ili ne"
-#: src/mn-imap-mailbox.gob:166 src/mn-pop3-mailbox.gob:143
+#: src/mn-imap-mailbox.gob:156 src/mn-pop3-mailbox.gob:136
msgid "SSL/TLS support has not been compiled in"
msgstr "Podrška za SSL/TLS nije ugrađena"
-#: src/mn-imap-mailbox.gob:246
+#: src/mn-imap-mailbox.gob:236
msgid "server did not send capabilities"
msgstr "server nije obavestio o svojim mogućnostima"
-#: src/mn-imap-mailbox.gob:418
+#: src/mn-imap-mailbox.gob:408
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr "server je dojavio LOGINDISABLED, LOGIN prijava neće biti korišćena"
-#: src/mn-imap-mailbox.gob:419
+#: src/mn-imap-mailbox.gob:409
msgid "unable to login"
msgstr "prijava nije moguća"
#. compliance error
-#: src/mn-imap-mailbox.gob:571
+#: src/mn-imap-mailbox.gob:542
msgid "server did not send search results"
msgstr "server nije poslao rezultate pretrage"
#. compliance error
-#: src/mn-imap-mailbox.gob:651
+#: src/mn-imap-mailbox.gob:617
msgid "server did not send all the messages we requested"
msgstr "server nije poslao sve tražene poruke"
-#: src/mn-imap-mailbox.gob:700
+#: src/mn-imap-mailbox.gob:671
msgid "unable to fetch message"
msgstr "nije moguće dobaviti poruku"
-#. compliance error
-#: src/mn-imap-mailbox.gob:818
-msgid "server did not send status"
-msgstr "server nije poslao status"
-
-#: src/mn-imap-mailbox.gob:1096 src/mn-pop3-mailbox.gob:972
+#: src/mn-imap-mailbox.gob:1006 src/mn-pop3-mailbox.gob:927
msgid "unknown server error"
msgstr "nepoznata greška na serveru"
-#: src/mn-imap-mailbox.gob:1198 src/mn-pop3-mailbox.gob:227
+#: src/mn-imap-mailbox.gob:1108 src/mn-pop3-mailbox.gob:220
msgid "server does not support in-band SSL/TLS"
msgstr "server ne podržava zaštitu putem SSL/TLS"
-#: src/mn-imap-mailbox.gob:1217 src/mn-pop3-mailbox.gob:885
+#: src/mn-imap-mailbox.gob:1127 src/mn-pop3-mailbox.gob:837
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
@@ -824,24 +899,28 @@ msgstr ""
"izabran je mehanizam za prijavu koji koristi SASL ali podrška za SASL nije "
"ugrađena u program"
-#: src/mn-imap-mailbox.gob:1225 src/mn-pop3-mailbox.gob:897
+#: src/mn-imap-mailbox.gob:1137 src/mn-pop3-mailbox.gob:857
#, c-format
msgid "unknown authentication mechanism \"%s\""
msgstr "nepoznat mehanizam za prijavu \"%s\""
-#: src/mn-imap-mailbox.gob:1246
+#: src/mn-imap-mailbox.gob:1160
msgid "falling back to IMAP LOGIN authentication"
msgstr "povratak na IMAP LOGIN prijavu"
-#: src/mn-imap-mailbox.gob:1257 src/mn-pop3-mailbox.gob:938
+#: src/mn-imap-mailbox.gob:1172 src/mn-pop3-mailbox.gob:901
msgid "authentication failed"
msgstr "prijava nije uspela"
-#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
-msgid "_Launch Mail Reader"
-msgstr "_Pokreni čitač pošte"
+#: src/mn-mail-icon.gob:91
+msgid "Main _Window"
+msgstr "Glavni _prozor"
+
+#: src/mn-mail-icon.gob:92 src/mn-main-window.c:101
+msgid "_Mail Reader"
+msgstr "_Čitač pošte"
-#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
+#: src/mn-mail-icon.gob:93 src/mn-main-window.c:109
msgid "_Update"
msgstr "_Osveži"
@@ -849,20 +928,20 @@ msgstr "_Osveži"
msgid "R_emove From Notification Area"
msgstr "_Ukloni sa obaveštajne zone"
-#: src/mn-mailbox-properties-dialog.c:109
+#: src/mn-mailbox-properties-dialog.c:156
msgid "Add a Mailbox"
msgstr "Dodaj sanduče"
-#: src/mn-mailbox-properties-dialog.c:328
+#: src/mn-mailbox-properties-dialog.c:325
#, c-format
msgid "%s Properties"
msgstr "Postavke za %s"
-#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:4
+#: src/mn-mailbox-properties-util.c:77 ui/authentication.glade.h:3
msgid "_Username:"
msgstr "_Kor.ime:"
-#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:3
+#: src/mn-mailbox-properties-util.c:87 ui/authentication.glade.h:2
msgid "_Password:"
msgstr "_Lozinka:"
@@ -902,61 +981,57 @@ msgstr "Gotovo"
msgid "Whether the properties are completely filled or not"
msgstr "Da li su postavke sasvim popunjene ili ne"
-#: src/mn-mailbox-view.gob:263 src/mn-message-box.gob:61
+#: src/mn-mailbox-view.gob:271 src/mn-message-view.gob:312
msgid "Mailbox"
msgstr "Sanduče"
#. format column
-#: src/mn-mailbox-view.gob:279
+#: src/mn-mailbox-view.gob:287
msgid "Format"
msgstr "Format"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "Unable to add mailbox"
msgstr "Nije moguće dodati sanduče"
-#: src/mn-mailbox-view.gob:569
+#: src/mn-mailbox-view.gob:577
msgid "The mailbox is already in the list."
msgstr "Sanduče je već u spisku."
-#: src/mn-mailbox.gob:130
+#: src/mn-mailbox.gob:131
msgid "The mailbox URI"
msgstr "URI oznaka za sanduče"
-#: src/mn-mailbox.gob:141
+#: src/mn-mailbox.gob:142
msgid "The mailbox human-readable name"
msgstr "Ime sandučeta"
-#: src/mn-mailbox.gob:145
+#: src/mn-mailbox.gob:146
msgid "Whether the mailbox has to be polled or not"
msgstr "Da li se ovo sanduče ručno proverava ili ne"
-#: src/mn-mailbox.gob:151
-msgid "Whether the mailbox has new mail or not"
-msgstr "Da li u sandučetu stoji nova pošta ili ne"
-
-#: src/mn-mailbox.gob:156
+#: src/mn-mailbox.gob:152
msgid "The list of new and unread MNMessage objects"
msgstr "Spisak novih i nepročitanih MNMessage objekata"
-#: src/mn-mailbox.gob:210
+#: src/mn-mailbox.gob:206
msgid "The mailbox error, if any"
msgstr "Greška u pristupu sandučetu, ako postoji"
-#: src/mn-mailbox.gob:309
+#: src/mn-mailbox.gob:305
msgid "does not exist"
msgstr "ne postoji"
-#: src/mn-mailbox.gob:341
+#: src/mn-mailbox.gob:337
msgid "unknown format"
msgstr "nepoznat format"
-#: src/mn-mailbox.gob:407
+#: src/mn-mailbox.gob:403
#, c-format
-msgid "unable to enable immediate notification for %s: %s"
-msgstr "Nije moguće namestiti neposrednu dojavu nove pošte za %s: %s"
+msgid "unable to enable immediate notification: %s"
+msgstr "Nije moguće namestiti neposrednu dojavu nove pošte: %s"
-#: src/mn-mailbox.gob:425
+#: src/mn-mailbox.gob:421
#, c-format
msgid ""
"As a fallback, they will be checked every %i second (this delay is "
@@ -974,7 +1049,7 @@ msgstr[2] ""
"Pošto nema druge mogućnosti, biće proveravani svakih %i sekundi (ovo "
"kašnjenje se može promeniti iz prozora sa postavkama)"
-#: src/mn-mailbox.gob:436
+#: src/mn-mailbox.gob:432
#, c-format
msgid ""
"As a fallback, they will be checked every %i minute (this delay is "
@@ -992,7 +1067,7 @@ msgstr[2] ""
"Pošto nema druge mogućnosti, biće proveravani svakih %i minuta (ovo "
"kašnjenje se može promeniti iz prozora sa postavkama)"
-#: src/mn-mailbox.gob:447
+#: src/mn-mailbox.gob:443
#, c-format
msgid ""
"As a fallback, they will be checked approximately every %i minute (this "
@@ -1010,11 +1085,11 @@ msgstr[2] ""
"Pošto nema druge mogućnosti, biće proveravani na oko %i minuta (ovo "
"kašnjenje se može promeniti iz prozora sa postavkama)"
-#: src/mn-mailbox.gob:463
+#: src/mn-mailbox.gob:459
msgid "A monitoring error has occurred"
msgstr "Došlo je do greške pri motrenju"
-#: src/mn-mailbox.gob:464
+#: src/mn-mailbox.gob:460
#, c-format
msgid ""
"Mail Notification was unable to enable immediate notification for one or "
@@ -1023,101 +1098,254 @@ msgstr ""
"Nije moguće namestiti neposrednu dojavu nove pošte za jedan ili više "
"sandučića. %s"
-#: src/mn-mailboxes.gob:142
+#: src/mn-mailboxes.gob:130
msgid "Whether one or more of the mailboxes has to be polled"
msgstr ""
"Pokazuje da li postoji bar jedno sanduče koje mora da se učestalo proverava"
-#: src/mn-mailboxes.gob:272
+#: src/mn-mailboxes.gob:260
#, c-format
msgid "%s is unsupported: %s"
msgstr "%s nije podržan: %s"
-#: src/mn-mailboxes.gob:304
-#, c-format
-msgid "%s has new mail"
-msgstr "Sanduče %s ima novu poštu"
-
-#: src/mn-mailboxes.gob:304
+#: src/mn-mailboxes.gob:290
#, c-format
-msgid "%s has no new mail"
-msgstr "Sanduče %s nema novu poštu"
+msgid "%s has %i new message"
+msgid_plural "%s has %i new messages"
+msgstr[0] "Sanduče %s ima %i novu poruku"
+msgstr[1] "Sanduče %s ima %i nove poruke"
+msgstr[2] "Sanduče %s ima %i novih poruka"
-#: src/mn-mailboxes.gob:330
+#: src/mn-mailboxes.gob:307
#, c-format
msgid "%s reported an error: %s"
msgstr "%s je dojavio grešku: %s"
-#: src/mn-maildir-mailbox.gob:119
+#: src/mn-maildir-mailbox.gob:112
#, c-format
msgid "unable to open folder \"new\": %s"
msgstr "nije moguće otvoriti direktorijum \"new\": %s"
-#: src/mn-maildir-mailbox.gob:161
+#: src/mn-maildir-mailbox.gob:141
#, c-format
msgid "unable to close folder \"new\": %s"
msgstr "nije moguće zatvoriti direktorijum \"new\": %s"
-#: src/mn-maildir-mailbox.gob:164
+#: src/mn-maildir-mailbox.gob:144
#, c-format
msgid "error while reading folder \"new\": %s"
msgstr "greška pri čitanju direktorijuma \"new\": %s"
+#. Toplevel
+#: src/mn-main-window.c:92
+msgid "_Mail"
+msgstr "_Pošta"
+
+#: src/mn-main-window.c:93
+msgid "_Edit"
+msgstr "_Uredi"
+
+#: src/mn-main-window.c:94
+msgid "_View"
+msgstr "_Pregled"
+
+#: src/mn-main-window.c:95
+msgid "_Help"
+msgstr "P_omoć"
+
+#: src/mn-main-window.c:103
+msgid "Launch the mail reader"
+msgstr "P_okreni čitač pošte"
+
+#. Reload
+#: src/mn-main-window.c:111 src/mn-main.c:230
+msgid "Update the mail status"
+msgstr "Osveži podatke o pošti"
+
+#: src/mn-main-window.c:117
+msgid "_Close"
+msgstr "_Zatvori"
+
+#: src/mn-main-window.c:119
+msgid "Close this window"
+msgstr "Zatvori ovaj prozor"
+
+#: src/mn-main-window.c:125
+msgid "_Quit"
+msgstr "_Kraj"
+
+#: src/mn-main-window.c:127 src/mn-main.c:257
+msgid "Quit Mail Notification"
+msgstr "Ugasi dojavu pošte"
+
+#: src/mn-main-window.c:135 src/mn-main-window.c:183
+msgid "_Toolbars"
+msgstr "_Alatne trake"
+
+#: src/mn-main-window.c:137
+msgid "Customize the toolbars"
+msgstr "Uredi alatne trake"
+
+#: src/mn-main-window.c:143
+msgid "_Preferences"
+msgstr "_Postavke"
+
+#: src/mn-main-window.c:153
+msgid "Toolbars Styl_e"
+msgstr "Stil alatnih _traka"
+
+#: src/mn-main-window.c:155
+msgid "Customize the toolbars style"
+msgstr "Prilagodi stil alatnih traka"
+
+#: src/mn-main-window.c:163
+msgid "_Contents"
+msgstr "_Sadržaj"
+
+#: src/mn-main-window.c:165
+msgid "Display help"
+msgstr "Prikaži pomoć"
+
+#: src/mn-main-window.c:171
+msgid "_About"
+msgstr "_O programu"
+
+#: src/mn-main-window.c:173
+msgid "Display credits"
+msgstr "Prikaži zasluge"
+
+#: src/mn-main-window.c:185
+msgid "Show or hide the toolbars"
+msgstr "Prikaži ili ukloni alatnu traku"
+
+#: src/mn-main-window.c:192
+msgid "_Statusbar"
+msgstr "_Statusna traka"
+
+#: src/mn-main-window.c:194
+msgid "Show or hide the statusbar"
+msgstr "Prikaži ili ukloni statusnu traku"
+
+#: src/mn-main-window.c:205
+msgid "_Desktop Default"
+msgstr "_Podrazumevano u okruženju"
+
+#: src/mn-main-window.c:207
+msgid "Set the toolbars style to the desktop default setting"
+msgstr "Postavi stilove traka na stil koji važi u celom radnom okruženju"
+
+#: src/mn-main-window.c:213
+msgid "I_cons Only"
+msgstr "Samo _slike"
+
+#: src/mn-main-window.c:215
+msgid "Only display the toolbars icons"
+msgstr "Prikaži samo slike u statusnoj traci"
+
+#: src/mn-main-window.c:221
+msgid "_Text Only"
+msgstr "Samo _tekst"
+
+#: src/mn-main-window.c:223
+msgid "Only display the toolbars text"
+msgstr "Prikaži samo tekst u alatnoj traci"
+
+#: src/mn-main-window.c:229
+msgid "Text Belo_w Icons"
+msgstr "Tekst _ispod slika"
+
+#: src/mn-main-window.c:231
+msgid "Display the toolbars text below the icons"
+msgstr "Prikaži tekst ispod odgovarajuće slike u alatnoj traci"
+
+#: src/mn-main-window.c:237
+msgid "Text Be_side Icons"
+msgstr "Tekst _pored slika"
+
+#: src/mn-main-window.c:239
+msgid "Display the toolbars text beside the icons"
+msgstr "Prikaži tekst pored odgovarajuće slike u alatnoj traci"
+
+#: src/mn-main-window.c:363
+#, c-format
+msgid "unable to load menus.xml: %s"
+msgstr "Nije moguće pročitati menus.xml: %s"
+
+#: src/mn-main-window.c:398
+msgid "Help messages"
+msgstr "Poruke za pomoć"
+
+#: src/mn-main-window.c:399
+msgid "Count messages"
+msgstr "Prebroj poruke"
+
+#: src/mn-main-window.c:503
+#, c-format
+msgid "%i new message"
+msgid_plural "%i new messages"
+msgstr[0] "%i nova poruka"
+msgstr[1] "%i nove poruke"
+msgstr[2] "%i novih poruka"
+
+#: src/mn-main-window.c:540
+msgid "unable to load toolbars.xml"
+msgstr "nije moguće učitati toolbars.xml: %s"
+
#: src/mn-main.c:99
#, c-format
msgid "Compiled-in mailbox backends: %s\n"
msgstr "Program ume da čita sandučiće u formatima: %s\n"
+#: src/mn-main.c:113
+msgid "Gmail timestamps"
+msgstr "GMAIL vremenski pečat"
+
#: src/mn-main.c:116
#, c-format
msgid "Compiled-in features: %s\n"
msgstr "Ugrađene mogućnosti: %s\n"
-#: src/mn-main.c:175
+#: src/mn-main.c:176
msgid "Enable informational output"
msgstr "Dozvoli rečitiji izlaz"
-#: src/mn-main.c:184
-msgid "List compiled-in features and exit"
-msgstr "Ispiši ugrađene mogućnosti i izađi"
+#: src/mn-main.c:185
+msgid "List the compiled-in features"
+msgstr "Ispiši ugrađene mogućnosti"
-#: src/mn-main.c:193
-msgid "Display the mail summary dialog"
-msgstr "Prikaži prozor sa sažetkom poruka"
+#: src/mn-main.c:194
+msgid "Display the main window"
+msgstr "Prikaži glavni prozor"
-#: src/mn-main.c:202
+#: src/mn-main.c:203
msgid "Display the properties dialog"
msgstr "Prikaži prozor sa postavkama"
-#: src/mn-main.c:211
+#: src/mn-main.c:212
msgid "Display the about dialog"
msgstr "Prikaži podatke o programu"
-#: src/mn-main.c:220
+#: src/mn-main.c:221
msgid "Close the mail summary popup"
msgstr "Zatvori prozor sa sažetkom poruka"
-#: src/mn-main.c:229
-msgid "Update the mail status"
-msgstr "Osveži podatke o pošti"
-
-#: src/mn-main.c:238
+#: src/mn-main.c:239
msgid "Report the mail status"
msgstr "Proveri poštu"
-#: src/mn-main.c:247
-msgid "Unset obsolete GConf configuration and exit"
-msgstr "Poništi zastarela GConf podešavanja i izađi"
+#: src/mn-main.c:248
+msgid "Unset obsolete GConf configuration"
+msgstr "Poništi zastarela GConf podešavanja"
#.
#. * We can't use mn_error_dialog() because gtk_init() has not been
#. * called yet.
#.
-#: src/mn-main.c:273
+#: src/mn-main.c:284
msgid "multi-threading is not available"
msgstr "višenitni rad nije podržan"
-#: src/mn-main.c:320
+#: src/mn-main.c:338
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
@@ -1127,19 +1355,27 @@ msgstr ""
"Bonobo u Gnomu 2.6, kada instalirate program za obaveštenja, treba da se "
"odjavite i ponovo prijavite na sistem da bi sve počelo da radi)"
-#: src/mn-main.c:325
+#: src/mn-main.c:344
+msgid "quitting Mail Notification"
+msgstr "Gasim dojavu pošte"
+
+#: src/mn-main.c:348
+msgid "Mail Notification is not running"
+msgstr "Program za dojavu pošte nije pokrenut."
+
+#: src/mn-main.c:355
msgid "Unable to initialize the GnomeVFS library."
msgstr "Nije moguće pokrenuti biblioteku GnomeVFS."
-#: src/mn-main.c:361
+#: src/mn-main.c:391
msgid "updating the mail status"
msgstr "Proveravam poštu"
-#: src/mn-main.c:379
+#: src/mn-main.c:409
msgid "Mail Notification is already running"
msgstr "Program za dojavu pošte je već pokrenut."
-#: src/mn-main.c:386
+#: src/mn-main.c:417
msgid ""
"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
"Please check your Mail Notification installation."
@@ -1149,7 +1385,7 @@ msgstr ""
"Bonobo u Gnomu 2.6, kada instalirate program za obaveštenja, treba da se "
"odjavite i ponovo prijavite na sistem da bi sve počelo da radi)"
-#: src/mn-main.c:390
+#: src/mn-main.c:421
msgid ""
"Bonobo was unable to register the automation server. Please check your Mail "
"Notification installation."
@@ -1159,33 +1395,40 @@ msgstr ""
"Bonobo u Gnomu 2.6, kada instalirate program za obaveštenja, treba da se "
"odjavite i ponovo prijavite na sistem da bi sve počelo da radi)"
-#: src/mn-mbox-mailbox.gob:221
-#, c-format
-msgid "error while reading mailbox: %s"
-msgstr "greška pri čitanju sandučeta: %s"
-
-#: src/mn-mbox-mailbox.gob:230
+#: src/mn-mbox-mailbox.gob:184
#, c-format
msgid "unable to open mailbox: %s"
msgstr "nije moguće otvoriti sanduče: %s"
-#: src/mn-message-box.gob:64
+#: src/mn-message-mime.c:105
+msgid "unable to parse MIME message"
+msgstr "nije moguće obraditi MIME poruku"
+
+#: src/mn-message-view.gob:81
+msgid "You have no new mail."
+msgstr "Nema pošte."
+
+#: src/mn-message-view.gob:321
msgid "Unreadable message"
msgstr "Nečitljiva poruka"
-#: src/mn-message-box.gob:69
+#: src/mn-message-view.gob:329
msgid "From"
msgstr "Od"
-#: src/mn-message-box.gob:70
+#: src/mn-message-view.gob:337
msgid "Subject"
msgstr "Tema"
-#: src/mn-message-box.gob:75
+#: src/mn-message-view.gob:348
msgid "Sent"
msgstr "Poslato"
-#: src/mn-message-box.gob:192
+#: src/mn-message.gob:101
+msgid "Unknown"
+msgstr "Nepoznato"
+
+#: src/mn-message.gob:126
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
@@ -1193,52 +1436,44 @@ msgstr[0] "pre %i sekundu"
msgstr[1] "pre %i sekunde"
msgstr[2] "pre %i sekundi"
-#: src/mn-message-box.gob:196
+#: src/mn-message.gob:130
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
-msgstr[0] "pre %i minut"
-msgstr[1] "pre %i minuta"
-msgstr[2] "pre %i minuta"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
+msgstr[0] "pre oko %i minut"
+msgstr[1] "pre oko %i minuta"
+msgstr[2] "pre oko %i minuta"
-#: src/mn-message-box.gob:201
+#: src/mn-message.gob:135
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
-msgstr[0] "pre %i sat"
-msgstr[1] "pre %i sata"
-msgstr[2] "pre %i sati"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
+msgstr[0] "pre oko %i sat"
+msgstr[1] "pre oko %i sata"
+msgstr[2] "pre oko %i sati"
-#: src/mn-message-box.gob:206
+#: src/mn-message.gob:140
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
-msgstr[0] "pre %i dan"
-msgstr[1] "pre %i dana"
-msgstr[2] "pre %i dana"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
+msgstr[0] "pre oko %i dan"
+msgstr[1] "pre oko %i dana"
+msgstr[2] "pre oko %i dana"
-#: src/mn-message-box.gob:211
+#: src/mn-message.gob:145
#, c-format
-msgid "%i week ago"
-msgid_plural "%i weeks ago"
-msgstr[0] "pre %i nedelju"
-msgstr[1] "pre %i nedelje"
-msgstr[2] "pre %i nedelja"
-
-#: src/mn-message-mime.c:105
-msgid "unable to parse MIME message"
-msgstr "nije moguće obraditi MIME poruku"
-
-#: src/mn-message.gob:101
-msgid "Unknown"
-msgstr "Nepoznato"
+msgid "about %i week ago"
+msgid_plural "about %i weeks ago"
+msgstr[0] "pre oko %i nedelju"
+msgstr[1] "pre oko %i nedelje"
+msgstr[2] "pre oko %i nedelja"
-#: src/mn-mh-mailbox.gob:184
+#: src/mn-mh-mailbox.gob:147
#, c-format
msgid "error while reading .mh_sequences: %s"
msgstr "greška pri čitanju datoteke .mh_sequences: %s"
-#: src/mn-mh-mailbox.gob:196
+#: src/mn-mh-mailbox.gob:157
#, c-format
msgid "unable to open .mh_sequences: %s"
msgstr "nije moguće otvoriti datoteku .mh_sequences: %s"
@@ -1247,23 +1482,23 @@ msgstr "nije moguće otvoriti datoteku .mh_sequences: %s"
msgid "detecting"
msgstr "istražujem"
-#: src/mn-pi-mailbox-properties.gob:76
+#: src/mn-pi-mailbox-properties.gob:75
msgid "_Hostname:"
msgstr "_Računar:"
-#: src/mn-pi-mailbox-properties.gob:94
+#: src/mn-pi-mailbox-properties.gob:93
msgid "_Details"
msgstr "_Detalji"
-#: src/mn-pi-mailbox-properties.gob:106
+#: src/mn-pi-mailbox-properties.gob:105
msgid "sta_ndard"
msgstr "_standard"
-#: src/mn-pi-mailbox-properties.gob:116
+#: src/mn-pi-mailbox-properties.gob:115
msgid "_in-band SSL/TLS"
msgstr "_ugrađeni SSL/TLS"
-#: src/mn-pi-mailbox-properties.gob:126
+#: src/mn-pi-mailbox-properties.gob:125
msgid "SSL/TLS on sepa_rate port"
msgstr "SSL/TLS na posebnom portu"
@@ -1287,15 +1522,15 @@ msgstr ""
msgid "The port number of the POP3 server"
msgstr "Broj porta na POP3 serveru"
-#: src/mn-pop3-mailbox.gob:273
+#: src/mn-pop3-mailbox.gob:266
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr "parametri za mogućnost LOGIN-DELAY nisu ispravno postavljeni"
-#: src/mn-pop3-mailbox.gob:590
+#: src/mn-pop3-mailbox.gob:569
msgid "unknown error"
msgstr "nepoznata greška"
-#: src/mn-pop3-mailbox.gob:729
+#: src/mn-pop3-mailbox.gob:656
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
@@ -1303,39 +1538,39 @@ msgstr[0] "tražen je zastoj pri prijavi, pauziram %i sekundu"
msgstr[1] "tražen je zastoj pri prijavi, pauziram %i sekunde"
msgstr[2] "tražen je zastoj pri prijavi, pauziram %i sekundi"
-#: src/mn-pop3-mailbox.gob:893
+#: src/mn-pop3-mailbox.gob:849
msgid "server does not support APOP authentication"
msgstr "server ne podržava prijavu korišćenjem mehanizma APOP"
-#: src/mn-pop3-mailbox.gob:922
+#: src/mn-pop3-mailbox.gob:884
msgid "falling back to APOP authentication"
msgstr "prelazim na APOP prijavu"
-#: src/mn-pop3-mailbox.gob:927
+#: src/mn-pop3-mailbox.gob:889
msgid "falling back to USER/PASS authentication"
msgstr "prelazim na prijavu pomoću imena i lozinke"
-#: src/mn-properties.c:193
+#: src/mn-properties-dialog.c:218
msgid "top left"
msgstr "gore-levo"
-#: src/mn-properties.c:194
+#: src/mn-properties-dialog.c:219
msgid "top right"
msgstr "gore-desno"
-#: src/mn-properties.c:195
+#: src/mn-properties-dialog.c:220
msgid "bottom left"
msgstr "dole-levo"
-#: src/mn-properties.c:196
+#: src/mn-properties-dialog.c:221
msgid "bottom right"
msgstr "dole-desno"
-#: src/mn-properties.c:287
+#: src/mn-properties-dialog.c:323
msgid "No mailbox selected."
msgstr "Nijedno sanduče nije izabrano."
-#: src/mn-properties.c:292
+#: src/mn-properties-dialog.c:328
#, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
@@ -1343,23 +1578,23 @@ msgstr[0] "Izabrano %i sanduče"
msgstr[1] "Izabrana %i sandučeta"
msgstr[2] "Izabrano %i sandučeta"
-#: src/mn-shell.gob:93
+#: src/mn-shell.gob:96
msgid "You have new mail."
msgstr "Imate novu poštu."
-#: src/mn-shell.gob:360
+#: src/mn-shell.gob:361
msgid "Mailboxes Having New Mail"
msgstr "Sandučići sa novom poštom"
-#: src/mn-shell.gob:362
+#: src/mn-shell.gob:382
msgid "Errors"
msgstr "Greške"
-#: src/mn-shell.gob:364
+#: src/mn-shell.gob:403
msgid "Unsupported Mailboxes"
msgstr "Nepodržani sandučići"
-#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
+#: src/mn-shell.gob:418
msgid "Mail Summary"
msgstr "Sažetak poruka"
@@ -1377,20 +1612,20 @@ msgid "Select _All"
msgstr "Izaberi _sve"
#: src/mn-stock.c:29
-msgid "_Mail Summary"
-msgstr "_Sažetak poruka"
+msgid "Leave Fullscreen"
+msgstr "Ostavi na celom ekranu"
-#: src/mn-sylpheed-mailbox.gob:119
+#: src/mn-sylpheed-mailbox.gob:113
#, c-format
msgid "unable to open folder: %s"
msgstr "nije moguće otvoriti direktorijum: %s"
-#: src/mn-sylpheed-mailbox.gob:165
+#: src/mn-sylpheed-mailbox.gob:147
#, c-format
msgid "unable to close folder: %s"
msgstr "nije moguće zatvoriti direktorijum: %s"
-#: src/mn-sylpheed-mailbox.gob:168
+#: src/mn-sylpheed-mailbox.gob:150
#, c-format
msgid "error while reading folder: %s"
msgstr "greška pri čitanju direktorijuma: %s"
@@ -1420,100 +1655,108 @@ msgstr "Razlog zašto sanduče nije podržano"
msgid "unsupported"
msgstr "nije podržano"
-#: src/mn-util.c:233
+#: src/mn-util.c:245
#, c-format
msgid "error loading image: %s"
msgstr "greška pri učitavanju slike: %s"
-#: src/mn-util.c:271
+#: src/mn-util.c:276
#, c-format
msgid "widget \"%s\" not found in interface \"%s\""
msgstr "element ?%s? nije pronađen u sučelju ?%s?"
-#: src/mn-util.c:385
+#: src/mn-util.c:390
msgid "received an invalid URI list"
msgstr "primljen je neispravan spisak URI oznaka"
-#: src/mn-util.c:421
+#: src/mn-util.c:426
msgid "received an invalid Mozilla URL"
msgstr "primljen je neispravan Mozilin URL"
-#: src/mn-util.c:514
+#: src/mn-util.c:519
msgid "Unable to display help"
msgstr "Nije moguće prikazati pomoć"
-#: src/mn-util.c:528
+#: src/mn-util.c:533
#, c-format
msgid "Unable to create a thread: %s."
msgstr "Nije moguće pokrenuti nit: %s."
-#: src/mn-util.c:705
+#: src/mn-util.c:626
msgid "_Do not show this message again"
msgstr "_Ne prikazuj više ovu poruku"
-#: src/mn-util.c:789
+#: src/mn-util.c:710
msgid "A fatal error has occurred in Mail Notification"
msgstr "Došlo je do kobne greške u programu za dojavu pošte"
-#: src/mn-util.c:804
+#: src/mn-util.c:725
#, c-format
msgid "unable to get current time: %s"
msgstr "nije moguće dobaviti trenutno vreme: %s"
-#: src/mn-util.c:906
+#: src/mn-util.c:787
#, c-format
msgid "invalid signal specification \"%s\""
msgstr "nevažeća odrednica za signal ?%s?"
-#: src/mn-util.c:945
+#: src/mn-util.c:826
msgid "A command error has occurred in Mail Notification"
msgstr "Došlo je do greške u komandama"
-#: src/mn-util.c:946
+#: src/mn-util.c:827
#, c-format
msgid "Unable to execute \"%s\": %s."
msgstr "Nije moguće izvršiti %s: %s"
#: ui/authentication.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: ui/authentication.glade.h:2
msgid "_Authenticate"
msgstr "Prijavi se"
+#: ui/edit-toolbars.glade.h:1
+msgid "Edit Toolbars"
+msgstr "Uredi alatne trake"
+
+#: ui/edit-toolbars.glade.h:2
+msgid "_Add a New Toolbar"
+msgstr "_Dodaj novu alatnu traku"
+
+#: ui/edit-toolbars.glade.h:3
+msgid "_Use Default"
+msgstr "_Koristi podrazumevano"
+
#: ui/mailbox-properties.glade.h:1
msgid "_Mailbox type:"
msgstr "_Vrsta sandučeta:"
#: ui/properties.glade.h:1
-msgid " "
-msgstr " "
-
-#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Commands</span>"
msgstr "<span weight=\"bold\">Naredbe</span>"
-#: ui/properties.glade.h:3
+#: ui/properties.glade.h:2
msgid "<span weight=\"bold\">Double-click Action</span>"
msgstr "<span weight=\"bold\">Naredba za dupli klik</span>"
-#: ui/properties.glade.h:4
+#: ui/properties.glade.h:3
msgid "<span weight=\"bold\">Fonts</span>"
msgstr "<span weight=\"bold\">Pisma</span>"
-#: ui/properties.glade.h:5
+#: ui/properties.glade.h:4
msgid "<span weight=\"bold\">General</span>"
msgstr "<span weight=\"bold\">Opšte</span>"
-#: ui/properties.glade.h:6
+#: ui/properties.glade.h:5
msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr "<span weight=\"bold\">Sandučići</span>"
-#: ui/properties.glade.h:7
+#: ui/properties.glade.h:6
msgid "<span weight=\"bold\">Position</span>"
msgstr "<span weight=\"bold\">Mesto</span>"
+#: ui/properties.glade.h:7
+msgid "Co_ntents:"
+msgstr "_Sadržaj:"
+
#: ui/properties.glade.h:8
msgid "Dis_play mail summary in tooltip"
msgstr "Prikaži prozor sa sažetkom poruka u oblačiću"
@@ -1583,107 +1826,100 @@ msgstr ""
"sažetkom poruka"
#: ui/properties.glade.h:23
+msgid "Use these _fonts:"
+msgstr "Koristi ova _pisma:"
+
+#: ui/properties.glade.h:24
msgid "When _all mail is read:"
msgstr "Kada je s_va pošta pročitana:"
-#: ui/properties.glade.h:24
+#: ui/properties.glade.h:25
msgid "When _new mail arrives:"
msgstr "Kada _stigne nova pošta:"
-#: ui/properties.glade.h:25
+#: ui/properties.glade.h:26
msgid "Whether the status icon should blink on errors or not"
msgstr "Da li statusna sličica treperi pri greškama ili ne"
-#: ui/properties.glade.h:26
+#: ui/properties.glade.h:27
msgid "Whether to automatically close the mail summary popup or not"
msgstr ""
"Da li treba ili ne treba automatski zatvoriti prozor sa sažetkom poruka"
-#: ui/properties.glade.h:27
+#: ui/properties.glade.h:28
msgid "Whether to display the mail summary in the status icon tooltip or not"
msgstr "Da li treba ili ne treba prikazivati sažetak poruka u oblačiću"
-#: ui/properties.glade.h:28
+#: ui/properties.glade.h:29
msgid "Whether to display the mail summary popup when new mail arrives or not"
msgstr ""
"Da li treba ili ne treba prikazivati sažetak poruka kada stigne nova pošta"
-#: ui/properties.glade.h:29
+#: ui/properties.glade.h:30
msgid "Whether to hide previously displayed mail or not"
msgstr "Da li treba prikazivati prethodno prikazane poruke ili ne"
-#: ui/properties.glade.h:30
+#: ui/properties.glade.h:31
msgid "Whether to run a command when all mail is read or not"
msgstr "Da li se pokreće ili ne pokreće komanda kada je sva pošta pročitana"
-#: ui/properties.glade.h:31
+#: ui/properties.glade.h:32
msgid "Whether to run a command when new mail arrives or not"
msgstr "Da li se pokreće komanda kada stigne pošta ili ne"
-#: ui/properties.glade.h:32
+#: ui/properties.glade.h:33
msgid "Whether to set a mail reader or not"
msgstr "Da li treba postaviti čitač pošte"
-#: ui/properties.glade.h:33
+#: ui/properties.glade.h:34
msgid ""
"Whether to start Mail Notification when you log into your GNOME session or "
"not"
msgstr "Da li pokrenuti dojavu pošte kada se prijavite na sistem"
-#: ui/properties.glade.h:34
-msgid ""
-"Whether to use a custom font for the contents of the mail summary popup or "
-"not"
-msgstr ""
-"Da li treba ili ne treba koristiti posebno pismo za sadržaj prozora sa "
-"sažetkom poruka"
-
#: ui/properties.glade.h:35
-msgid ""
-"Whether to use a custom font for the title of the mail summary popup or not"
-msgstr ""
-"Da li treba ili ne treba koristiti posebno pismo za naslov prozora sa "
-"sažetkom poruka"
-
-#: ui/properties.glade.h:36
msgid "_Automatically close after:"
msgstr "_Automatski zatvori posle:"
-#: ui/properties.glade.h:37
+#: ui/properties.glade.h:36
msgid "_Blink on errors"
msgstr "_Treperi pri greškama"
-#: ui/properties.glade.h:38
-msgid "_Contents font:"
-msgstr "_Pismo za sadržaj:"
-
-#: ui/properties.glade.h:39
+#: ui/properties.glade.h:37
msgid "_Delay between mail checks:"
msgstr "_Pauza između provera:"
-#: ui/properties.glade.h:40
-msgid "_Display the mail summary dialog"
-msgstr "Prikaži prozor sa sažetkom poruka"
+#: ui/properties.glade.h:38
+msgid "_Display the main window"
+msgstr "_Prikaži glavni prozor"
-#: ui/properties.glade.h:41
+#: ui/properties.glade.h:39
msgid "_Enable mail summary popup"
msgstr "Dozvoli prikaz sažetka poruka"
-#: ui/properties.glade.h:42
+#: ui/properties.glade.h:40
msgid "_Launch the mail reader"
msgstr "P_okreni čitač pošte"
-#: ui/properties.glade.h:43
+#: ui/properties.glade.h:41
msgid "_Mail reader:"
msgstr "_Čitač pošte:"
-#: ui/properties.glade.h:44
+#: ui/properties.glade.h:42
msgid "_Start Mail Notification on GNOME login"
msgstr "Pokreni _dojavu pri prijavi"
+#: ui/properties.glade.h:43
+msgid "_Title:"
+msgstr "_Naslov:"
+
+#: ui/properties.glade.h:44
+msgid "_Update the mail status"
+msgstr "_Osveži podatke o pošti"
+
#: ui/properties.glade.h:45
-msgid "_Title font:"
-msgstr "Pismo za _naslov:"
+msgid "_Use fonts from theme"
+msgstr "Koristi pisma iz _teme"
#: ui/properties.glade.h:46
msgid "_Vertical offset:"
@@ -1711,7 +1947,7 @@ msgid ""
"\n"
"Mail Notification has been loaded successfully.\n"
"\n"
-"Since this is the first time you run Mail Notification, you might want to "
+"Since this is the first time you run Mail Notification, you need to "
"configure it.\n"
"\n"
"Note: this message will not be shown anymore. To configure Mail Notification "
@@ -1741,15 +1977,76 @@ msgstr "_Podesi dojavu pošte"
msgid "_Skip configuration"
msgstr "P_reskoči podešavanja"
+#~ msgid "received non-ASCII data from server"
+#~ msgstr "server je poslao znake koji ne spadaju u skup ASKRI"
+
+#~ msgid "Use a custom font for the contents of the mail summary popup"
+#~ msgstr "Koristi posebno pismo za sadržaj prozora sa sažetkom poruka"
+
+#~ msgid "Use a custom font for the title of the mail summary popup"
+#~ msgstr "Koristi posebno pismo za naslov prozora sa sažetkom poruka"
+
+#~ msgid ""
+#~ "Whether to use a custom font for the contents of the mail summary popup "
+#~ "or not."
+#~ msgstr ""
+#~ "Da li treba ili ne treba koristiti posebno pismo za sadržaj prozora sa "
+#~ "sažetkom pošte."
+
+#~ msgid ""
+#~ "Whether to use a custom font for the title of the mail summary popup or "
+#~ "not."
+#~ msgstr ""
+#~ "Da li treba ili ne treba korisititi posebno pismo za naslov prozora sa "
+#~ "sažetkom pošte."
+
+#~ msgid "server did not send status"
+#~ msgstr "server nije poslao status"
+
+#~ msgid "_Launch Mail Reader"
+#~ msgstr "_Pokreni čitač pošte"
+
+#~ msgid "Whether the mailbox has new mail or not"
+#~ msgstr "Da li u sandučetu stoji nova pošta ili ne"
+
+#~ msgid "%s has no new mail"
+#~ msgstr "Sanduče %s nema novu poštu"
+
+#~ msgid "Display the mail summary dialog"
+#~ msgstr "Prikaži prozor sa sažetkom poruka"
+
+#~ msgid "error while reading mailbox: %s"
+#~ msgstr "greška pri čitanju sandučeta: %s"
+
+#~ msgid "_Mail Summary"
+#~ msgstr "_Sažetak poruka"
+
+#~ msgid "*"
+#~ msgstr "*"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid ""
+#~ "Whether to use a custom font for the contents of the mail summary popup "
+#~ "or not"
+#~ msgstr ""
+#~ "Da li treba ili ne treba koristiti posebno pismo za sadržaj prozora sa "
+#~ "sažetkom poruka"
+
+#~ msgid ""
+#~ "Whether to use a custom font for the title of the mail summary popup or "
+#~ "not"
+#~ msgstr ""
+#~ "Da li treba ili ne treba koristiti posebno pismo za naslov prozora sa "
+#~ "sažetkom poruka"
+
#~ msgid "The following mailbox has new mail:\n"
#~ msgid_plural "The following mailboxes have new mail:\n"
#~ msgstr[0] "Sanduče sa novom poštom:\n"
#~ msgstr[1] "Sandučići sa novom poštom:\n"
#~ msgstr[2] "Sandučići sa novom poštom:\n"
-#~ msgid "You have no new mail."
-#~ msgstr "Nema pošte."
-
#~ msgid "The following mailbox reported an error:\n"
#~ msgid_plural "The following mailboxes reported an error:\n"
#~ msgstr[0] "Ovo sanduče ima grešku:\n"
@@ -1806,4 +2103,4 @@ msgstr "P_reskoči podešavanja"
#~ msgstr "Pri _dvostrukom kliku:"
#~ msgid "Whether to run a command when the icon is double-clicked or not"
-#~ msgstr "Da li se pokreće komand� pri dvostrukom kliku ili ne"
+#~ msgstr "Da li se pokreće komanda pri dvostrukom kliku ili ne"
diff --git a/src/MNAutomation.idl b/src/MNAutomation.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -24,9 +24,10 @@ module GNOME
{
void update ();
void report (out string report);
- void displayMailSummary ();
+ void displayMainWindow ();
void displayProperties ();
void displayAbout ();
void closePopup ();
+ void quit ();
};
};
diff --git a/src/Makefile.am b/src/Makefile.am
@@ -100,6 +100,10 @@ gmail_sources = \
mn-soup.h
gmail_built_sources = \
mn-sgml-entities.h
+
+if WITH_GMAIL_TIMESTAMPS
+icu_sources = mn-icu.c mn-icu.h
+endif
endif
if WITH_MIME
@@ -148,7 +152,7 @@ gob_sources = \
mn-mailbox-view.gob \
mn-mailbox.gob \
mn-mailboxes.gob \
- mn-message-box.gob \
+ mn-message-view.gob \
mn-message.gob \
mn-pending-mailbox.gob \
mn-shell.gob \
@@ -191,9 +195,9 @@ gob_built_sources = \
mn-mailboxes-private.h \
mn-mailboxes.c \
mn-mailboxes.h \
- mn-message-box-private.h \
- mn-message-box.c \
- mn-message-box.h \
+ mn-message-view-private.h \
+ mn-message-view.c \
+ mn-message-view.h \
mn-message-private.h \
mn-message.c \
mn-message.h \
@@ -216,11 +220,16 @@ gob_built_sources = \
mn-uri.c \
mn-uri.h
+egg_built_sources = \
+ eggmarshalers.c \
+ eggmarshalers.h
+
nodist_mail_notification_SOURCES = $(idl_built_sources)
mail_notification_SOURCES = \
$(idl_sources) \
$(gob_sources) \
$(gob_built_sources) \
+ $(egg_built_sources) \
$(gmail_sources) \
$(gmail_built_sources) \
$(md5_sources) \
@@ -228,6 +237,13 @@ mail_notification_SOURCES = \
$(ssl_sources) \
$(sasl_sources) \
$(mime_sources) \
+ $(icu_sources) \
+ egg-editable-toolbar.c \
+ egg-editable-toolbar.h \
+ egg-toolbar-editor.c \
+ egg-toolbar-editor.h \
+ egg-toolbars-model.c \
+ egg-toolbars-model.h \
eggtrayicon.c \
eggtrayicon.h \
mn-conf.c \
@@ -238,17 +254,15 @@ mail_notification_SOURCES = \
mn-mailbox-properties-util.h \
mn-mailbox-properties.c \
mn-mailbox-properties.h \
+ mn-main-window.c \
+ mn-main-window.h \
mn-main.c \
- mn-properties.c \
- mn-properties.h \
+ mn-properties-dialog.c \
+ mn-properties-dialog.h \
mn-stock.c \
mn-stock.h \
- mn-summary-dialog.c \
- mn-summary-dialog.h \
mn-summary-popup.c \
mn-summary-popup.h \
- mn-summary.c \
- mn-summary.h \
mn-util.c \
mn-util.h \
mn-vfs.c \
@@ -256,24 +270,26 @@ mail_notification_SOURCES = \
BUILT_SOURCES = \
$(idl_built_sources) \
$(gob_built_sources) \
+ $(egg_built_sources) \
$(gmail_built_sources)
-AM_CPPFLAGS = $(WARN_CFLAGS) $(GNOME_CFLAGS) $(GMIME_CFLAGS) $(SOUP_CFLAGS) $(OPENSSL_CFLAGS) $(SASL_CFLAGS) \
+AM_CPPFLAGS = $(WARN_CFLAGS) $(GNOME_CFLAGS) $(GMIME_CFLAGS) $(SOUP_CFLAGS) $(OPENSSL_CFLAGS) $(SASL_CFLAGS) $(ICU_CFLAGS) \
-I$(top_srcdir) \
-DPREFIX="\"$(prefix)\"" \
-DSYSCONFDIR="\"$(sysconfdir)\"" \
-DDATADIR="\"$(datadir)\"" \
-DLIBDIR="\"$(libdir)\"" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
+ -DGNOMEPIXMAPSDIR="\"$(datadir)/pixmaps\"" \
-DUIDIR="\"$(pkgdatadir)/ui\"" \
-DG_LOG_DOMAIN="\"$(PACKAGE)\""
-AM_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(GMIME_LIBS) $(SOUP_LIBS) $(OPENSSL_LIBS) $(SASL_LIBS)
+AM_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(GMIME_LIBS) $(SOUP_LIBS) $(OPENSSL_LIBS) $(SASL_LIBS) $(ICU_LIBS)
CLEANFILES = $(idl_built_sources)
-MAINTAINERCLEANFILES = $(gob_built_sources) $(gmail_built_sources)
+MAINTAINERCLEANFILES = $(gob_built_sources) $(egg_built_sources) $(gmail_built_sources)
entity_sets = xhtml-lat1.ent xhtml-special.ent xhtml-symbol.ent
-EXTRA_DIST = ent2h.sh $(entity_sets)
+EXTRA_DIST = ent2h.sh $(entity_sets) eggmarshalers.list
%.c %.h %-private.h: %.gob
$(GOB2) --always-private-header --exit-on-warn $<
@@ -282,3 +298,15 @@ EXTRA_DIST = ent2h.sh $(entity_sets)
mn-sgml-entities.h: ent2h.sh $(entity_sets)
./ent2h.sh $(entity_sets) > $@
+
+eggmarshalers.h: eggmarshalers.list
+ cd $(srcdir) \
+ && $(GLIB_GENMARSHAL) --prefix=_egg_marshal eggmarshalers.list --header > xgen-emh \
+ && cp xgen-emh eggmarshalers.h \
+ && rm -f xgen-emh xgen-emh~
+
+eggmarshalers.c: eggmarshalers.list
+ cd $(srcdir) \
+ && $(GLIB_GENMARSHAL) --prefix=_egg_marshal eggmarshalers.list --body > xgen-emc \
+ && cp xgen-emc eggmarshalers.c \
+ && rm -f xgen-emc xgen-emc~
diff --git a/src/Makefile.in b/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -40,9 +40,9 @@ 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/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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
@@ -61,7 +61,7 @@ am__mail_notification_SOURCES_DIST = MNAutomation.idl \
mn-gmime-stream-vfs.gob mn-about-dialog.gob \
mn-autodetect-mailbox-properties.gob mn-automation.gob \
mn-blinking-image.gob mn-mail-icon.gob mn-mailbox-view.gob \
- mn-mailbox.gob mn-mailboxes.gob mn-message-box.gob \
+ mn-mailbox.gob mn-mailboxes.gob mn-message-view.gob \
mn-message.gob mn-pending-mailbox.gob mn-shell.gob \
mn-system-mailbox-properties.gob mn-tooltips.gob \
mn-unsupported-mailbox.gob mn-uri.gob \
@@ -94,8 +94,8 @@ am__mail_notification_SOURCES_DIST = MNAutomation.idl \
mn-mail-icon.c mn-mail-icon.h mn-mailbox-view-private.h \
mn-mailbox-view.c mn-mailbox-view.h mn-mailbox-private.h \
mn-mailbox.c mn-mailbox.h mn-mailboxes-private.h \
- mn-mailboxes.c mn-mailboxes.h mn-message-box-private.h \
- mn-message-box.c mn-message-box.h mn-message-private.h \
+ mn-mailboxes.c mn-mailboxes.h mn-message-view-private.h \
+ mn-message-view.c mn-message-view.h mn-message-private.h \
mn-message.c mn-message.h mn-pending-mailbox-private.h \
mn-pending-mailbox.c mn-pending-mailbox.h mn-shell-private.h \
mn-shell.c mn-shell.h mn-system-mailbox-properties-private.h \
@@ -103,17 +103,20 @@ am__mail_notification_SOURCES_DIST = MNAutomation.idl \
mn-tooltips-private.h mn-tooltips.c mn-tooltips.h \
mn-unsupported-mailbox-private.h mn-unsupported-mailbox.c \
mn-unsupported-mailbox.h mn-uri-private.h mn-uri.c mn-uri.h \
- mn-sgml-ref.c mn-sgml-ref.h mn-soup.c mn-soup.h \
- mn-sgml-entities.h mn-md5.c mn-md5.h mn-client-session.c \
- mn-client-session.h mn-ssl.c mn-ssl.h mn-sasl.c mn-sasl.h \
- mn-message-mime.c mn-message-mime.h eggtrayicon.c \
- eggtrayicon.h mn-conf.c mn-conf.h \
+ eggmarshalers.c eggmarshalers.h mn-sgml-ref.c mn-sgml-ref.h \
+ mn-soup.c mn-soup.h mn-sgml-entities.h mn-md5.c mn-md5.h \
+ mn-client-session.c mn-client-session.h mn-ssl.c mn-ssl.h \
+ mn-sasl.c mn-sasl.h mn-message-mime.c mn-message-mime.h \
+ mn-icu.c mn-icu.h egg-editable-toolbar.c \
+ egg-editable-toolbar.h egg-toolbar-editor.c \
+ egg-toolbar-editor.h egg-toolbars-model.c egg-toolbars-model.h \
+ eggtrayicon.c eggtrayicon.h mn-conf.c mn-conf.h \
mn-mailbox-properties-dialog.c mn-mailbox-properties-dialog.h \
mn-mailbox-properties-util.c mn-mailbox-properties-util.h \
- mn-mailbox-properties.c mn-mailbox-properties.h mn-main.c \
- mn-properties.c mn-properties.h mn-stock.c mn-stock.h \
- mn-summary-dialog.c mn-summary-dialog.h mn-summary-popup.c \
- mn-summary-popup.h mn-summary.c mn-summary.h mn-util.c \
+ mn-mailbox-properties.c mn-mailbox-properties.h \
+ mn-main-window.c mn-main-window.h mn-main.c \
+ mn-properties-dialog.c mn-properties-dialog.h mn-stock.c \
+ mn-stock.h mn-summary-popup.c mn-summary-popup.h mn-util.c \
mn-util.h mn-vfs.c mn-vfs.h
am__objects_1 =
am__objects_2 = $(am__objects_1) $(am__objects_1) $(am__objects_1) \
@@ -143,30 +146,36 @@ am__objects_13 = $(am__objects_3) $(am__objects_4) $(am__objects_5) \
mn-automation.$(OBJEXT) mn-blinking-image.$(OBJEXT) \
mn-mail-icon.$(OBJEXT) mn-mailbox-view.$(OBJEXT) \
mn-mailbox.$(OBJEXT) mn-mailboxes.$(OBJEXT) \
- mn-message-box.$(OBJEXT) mn-message.$(OBJEXT) \
+ mn-message-view.$(OBJEXT) mn-message.$(OBJEXT) \
mn-pending-mailbox.$(OBJEXT) mn-shell.$(OBJEXT) \
mn-system-mailbox-properties.$(OBJEXT) mn-tooltips.$(OBJEXT) \
mn-unsupported-mailbox.$(OBJEXT) mn-uri.$(OBJEXT)
-@WITH_GMAIL_TRUE@am__objects_14 = mn-sgml-ref.$(OBJEXT) \
+am__objects_14 = eggmarshalers.$(OBJEXT)
+@WITH_GMAIL_TRUE@am__objects_15 = mn-sgml-ref.$(OBJEXT) \
@WITH_GMAIL_TRUE@ mn-soup.$(OBJEXT)
-@WITH_POP3_TRUE@am__objects_15 = mn-md5.$(OBJEXT)
-@WITH_POP3_OR_IMAP_TRUE@am__objects_16 = mn-client-session.$(OBJEXT)
-@WITH_SSL_TRUE@am__objects_17 = mn-ssl.$(OBJEXT)
-@WITH_SASL_TRUE@am__objects_18 = mn-sasl.$(OBJEXT)
-@WITH_MIME_TRUE@am__objects_19 = mn-message-mime.$(OBJEXT)
+@WITH_POP3_TRUE@am__objects_16 = mn-md5.$(OBJEXT)
+@WITH_POP3_OR_IMAP_TRUE@am__objects_17 = mn-client-session.$(OBJEXT)
+@WITH_SSL_TRUE@am__objects_18 = mn-ssl.$(OBJEXT)
+@WITH_SASL_TRUE@am__objects_19 = mn-sasl.$(OBJEXT)
+@WITH_MIME_TRUE@am__objects_20 = mn-message-mime.$(OBJEXT)
+@WITH_GMAIL_TIMESTAMPS_TRUE@@WITH_GMAIL_TRUE@am__objects_21 = \
+@WITH_GMAIL_TIMESTAMPS_TRUE@@WITH_GMAIL_TRUE@ mn-icu.$(OBJEXT)
am_mail_notification_OBJECTS = $(am__objects_1) $(am__objects_2) \
- $(am__objects_13) $(am__objects_14) $(am__objects_1) \
- $(am__objects_15) $(am__objects_16) $(am__objects_17) \
- $(am__objects_18) $(am__objects_19) eggtrayicon.$(OBJEXT) \
- mn-conf.$(OBJEXT) mn-mailbox-properties-dialog.$(OBJEXT) \
+ $(am__objects_13) $(am__objects_14) $(am__objects_15) \
+ $(am__objects_1) $(am__objects_16) $(am__objects_17) \
+ $(am__objects_18) $(am__objects_19) $(am__objects_20) \
+ $(am__objects_21) egg-editable-toolbar.$(OBJEXT) \
+ egg-toolbar-editor.$(OBJEXT) egg-toolbars-model.$(OBJEXT) \
+ eggtrayicon.$(OBJEXT) mn-conf.$(OBJEXT) \
+ mn-mailbox-properties-dialog.$(OBJEXT) \
mn-mailbox-properties-util.$(OBJEXT) \
- mn-mailbox-properties.$(OBJEXT) mn-main.$(OBJEXT) \
- mn-properties.$(OBJEXT) mn-stock.$(OBJEXT) \
- mn-summary-dialog.$(OBJEXT) mn-summary-popup.$(OBJEXT) \
- mn-summary.$(OBJEXT) mn-util.$(OBJEXT) mn-vfs.$(OBJEXT)
-am__objects_20 = MNAutomation-common.$(OBJEXT) \
+ mn-mailbox-properties.$(OBJEXT) mn-main-window.$(OBJEXT) \
+ mn-main.$(OBJEXT) mn-properties-dialog.$(OBJEXT) \
+ mn-stock.$(OBJEXT) mn-summary-popup.$(OBJEXT) \
+ mn-util.$(OBJEXT) mn-vfs.$(OBJEXT)
+am__objects_22 = MNAutomation-common.$(OBJEXT) \
MNAutomation-stubs.$(OBJEXT) MNAutomation-skels.$(OBJEXT)
-nodist_mail_notification_OBJECTS = $(am__objects_20)
+nodist_mail_notification_OBJECTS = $(am__objects_22)
mail_notification_OBJECTS = $(am_mail_notification_OBJECTS) \
$(nodist_mail_notification_OBJECTS)
mail_notification_LDADD = $(LDADD)
@@ -214,6 +223,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -224,6 +234,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -290,6 +303,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
@@ -436,6 +451,7 @@ target_alias = @target_alias@
@WITH_GMAIL_TRUE@gmail_built_sources = \
@WITH_GMAIL_TRUE@ mn-sgml-entities.h
+@WITH_GMAIL_TIMESTAMPS_TRUE@@WITH_GMAIL_TRUE@icu_sources = mn-icu.c mn-icu.h
@WITH_MIME_TRUE@mime_gob_sources = \
@WITH_MIME_TRUE@ mn-gmime-stream-vfs.gob
@@ -476,7 +492,7 @@ gob_sources = \
mn-mailbox-view.gob \
mn-mailbox.gob \
mn-mailboxes.gob \
- mn-message-box.gob \
+ mn-message-view.gob \
mn-message.gob \
mn-pending-mailbox.gob \
mn-shell.gob \
@@ -520,9 +536,9 @@ gob_built_sources = \
mn-mailboxes-private.h \
mn-mailboxes.c \
mn-mailboxes.h \
- mn-message-box-private.h \
- mn-message-box.c \
- mn-message-box.h \
+ mn-message-view-private.h \
+ mn-message-view.c \
+ mn-message-view.h \
mn-message-private.h \
mn-message.c \
mn-message.h \
@@ -545,11 +561,16 @@ gob_built_sources = \
mn-uri.c \
mn-uri.h
+egg_built_sources = \
+ eggmarshalers.c \
+ eggmarshalers.h
+
nodist_mail_notification_SOURCES = $(idl_built_sources)
mail_notification_SOURCES = \
$(idl_sources) \
$(gob_sources) \
$(gob_built_sources) \
+ $(egg_built_sources) \
$(gmail_sources) \
$(gmail_built_sources) \
$(md5_sources) \
@@ -557,6 +578,13 @@ mail_notification_SOURCES = \
$(ssl_sources) \
$(sasl_sources) \
$(mime_sources) \
+ $(icu_sources) \
+ egg-editable-toolbar.c \
+ egg-editable-toolbar.h \
+ egg-toolbar-editor.c \
+ egg-toolbar-editor.h \
+ egg-toolbars-model.c \
+ egg-toolbars-model.h \
eggtrayicon.c \
eggtrayicon.h \
mn-conf.c \
@@ -567,17 +595,15 @@ mail_notification_SOURCES = \
mn-mailbox-properties-util.h \
mn-mailbox-properties.c \
mn-mailbox-properties.h \
+ mn-main-window.c \
+ mn-main-window.h \
mn-main.c \
- mn-properties.c \
- mn-properties.h \
+ mn-properties-dialog.c \
+ mn-properties-dialog.h \
mn-stock.c \
mn-stock.h \
- mn-summary-dialog.c \
- mn-summary-dialog.h \
mn-summary-popup.c \
mn-summary-popup.h \
- mn-summary.c \
- mn-summary.h \
mn-util.c \
mn-util.h \
mn-vfs.c \
@@ -586,23 +612,25 @@ mail_notification_SOURCES = \
BUILT_SOURCES = \
$(idl_built_sources) \
$(gob_built_sources) \
+ $(egg_built_sources) \
$(gmail_built_sources)
-AM_CPPFLAGS = $(WARN_CFLAGS) $(GNOME_CFLAGS) $(GMIME_CFLAGS) $(SOUP_CFLAGS) $(OPENSSL_CFLAGS) $(SASL_CFLAGS) \
+AM_CPPFLAGS = $(WARN_CFLAGS) $(GNOME_CFLAGS) $(GMIME_CFLAGS) $(SOUP_CFLAGS) $(OPENSSL_CFLAGS) $(SASL_CFLAGS) $(ICU_CFLAGS) \
-I$(top_srcdir) \
-DPREFIX="\"$(prefix)\"" \
-DSYSCONFDIR="\"$(sysconfdir)\"" \
-DDATADIR="\"$(datadir)\"" \
-DLIBDIR="\"$(libdir)\"" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
+ -DGNOMEPIXMAPSDIR="\"$(datadir)/pixmaps\"" \
-DUIDIR="\"$(pkgdatadir)/ui\"" \
-DG_LOG_DOMAIN="\"$(PACKAGE)\""
-AM_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(GMIME_LIBS) $(SOUP_LIBS) $(OPENSSL_LIBS) $(SASL_LIBS)
+AM_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(GMIME_LIBS) $(SOUP_LIBS) $(OPENSSL_LIBS) $(SASL_LIBS) $(ICU_LIBS)
CLEANFILES = $(idl_built_sources)
-MAINTAINERCLEANFILES = $(gob_built_sources) $(gmail_built_sources)
+MAINTAINERCLEANFILES = $(gob_built_sources) $(egg_built_sources) $(gmail_built_sources)
entity_sets = xhtml-lat1.ent xhtml-special.ent xhtml-symbol.ent
-EXTRA_DIST = ent2h.sh $(entity_sets)
+EXTRA_DIST = ent2h.sh $(entity_sets) eggmarshalers.list
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -673,6 +701,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNAutomation-common.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNAutomation-skels.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNAutomation-stubs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egg-editable-toolbar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egg-toolbar-editor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egg-toolbars-model.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eggmarshalers.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eggtrayicon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-about-dialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-auth-combo-box.Po@am__quote@
@@ -685,6 +717,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-gmail-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-gmail-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-gmime-stream-vfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-icu.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-imap-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-imap-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mail-icon.Po@am__quote@
@@ -695,27 +728,26 @@ distclean-compile:
@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-window.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-md5.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-message-box.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-message-mime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-message-view.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-message.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-pi-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-pop3-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-pop3-mailbox.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-properties-dialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-sasl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-sgml-ref.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-shell.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-soup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-ssl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-stock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-summary-dialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-summary-popup.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-summary.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-sylpheed-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-system-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-tooltips.Po@am__quote@
@@ -918,6 +950,18 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
mn-sgml-entities.h: ent2h.sh $(entity_sets)
./ent2h.sh $(entity_sets) > $@
+
+eggmarshalers.h: eggmarshalers.list
+ cd $(srcdir) \
+ && $(GLIB_GENMARSHAL) --prefix=_egg_marshal eggmarshalers.list --header > xgen-emh \
+ && cp xgen-emh eggmarshalers.h \
+ && rm -f xgen-emh xgen-emh~
+
+eggmarshalers.c: eggmarshalers.list
+ cd $(srcdir) \
+ && $(GLIB_GENMARSHAL) --prefix=_egg_marshal eggmarshalers.list --body > xgen-emc \
+ && cp xgen-emc eggmarshalers.c \
+ && rm -f xgen-emc xgen-emc~
# 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/src/egg-editable-toolbar.c b/src/egg-editable-toolbar.c
@@ -0,0 +1,1468 @@
+/*
+ * Copyright (C) 2003-2004 Marco Pesenti Gritti
+ * Copyright (C) 2004 Christian Persch
+ *
+ * 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.
+ *
+ * $Id: egg-editable-toolbar.c,v 1.1 2005/02/10 17:08:30 jylefort Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "egg-editable-toolbar.h"
+#include "egg-toolbars-model.h"
+#include "egg-toolbar-editor.h"
+
+#include <gtk/gtkvseparator.h>
+#include <gtk/gtkiconfactory.h>
+#include <gtk/gtkwindow.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkdnd.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkimage.h>
+#include <gtk/gtkimagemenuitem.h>
+#include <gtk/gtkmenu.h>
+#include <gtk/gtkstock.h>
+#include <gtk/gtktoolbar.h>
+#include <gtk/gtktoolitem.h>
+#include <gtk/gtkseparatortoolitem.h>
+#include <glib/gi18n.h>
+#include <string.h>
+
+static void egg_editable_toolbar_class_init (EggEditableToolbarClass *klass);
+static void egg_editable_toolbar_init (EggEditableToolbar *t);
+static void egg_editable_toolbar_finalize (GObject *object);
+
+#define MIN_TOOLBAR_HEIGHT 20
+
+static GtkTargetEntry dest_drag_types[] = {
+ {EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
+};
+static int n_dest_drag_types = G_N_ELEMENTS (dest_drag_types);
+
+enum
+{
+ PROP_0,
+ PROP_TOOLBARS_MODEL,
+ PROP_UI_MANAGER
+};
+
+enum
+{
+ ACTION_REQUEST,
+ LAST_SIGNAL
+};
+
+static guint egg_editable_toolbar_signals[LAST_SIGNAL] = { 0 };
+
+static GObjectClass *parent_class = NULL;
+
+#define EGG_EDITABLE_TOOLBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarPrivate))
+
+struct EggEditableToolbarPrivate
+{
+ GtkUIManager *manager;
+ EggToolbarsModel *model;
+ gboolean edit_mode;
+ GtkWidget *selected_toolbar;
+ GtkToolItem *fixed;
+ GtkWidget *fixed_toolbar;
+
+ gboolean pending;
+ GtkToolbar *target_toolbar;
+ GtkWidget *dragged_item;
+};
+
+GType
+egg_editable_toolbar_get_type (void)
+{
+ static GType egg_editable_toolbar_type = 0;
+
+ if (egg_editable_toolbar_type == 0)
+ {
+ static const GTypeInfo our_info = {
+ sizeof (EggEditableToolbarClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) egg_editable_toolbar_class_init,
+ NULL,
+ NULL, /* class_data */
+ sizeof (EggEditableToolbar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) egg_editable_toolbar_init
+ };
+
+ egg_editable_toolbar_type = g_type_register_static (GTK_TYPE_VBOX,
+ "EggEditableToolbar",
+ &our_info, 0);
+ }
+
+ return egg_editable_toolbar_type;
+}
+
+static int
+get_toolbar_position (EggEditableToolbar *etoolbar, GtkWidget *toolbar)
+{
+ GList *l;
+ int result;
+
+ l = gtk_container_get_children (GTK_CONTAINER (etoolbar));
+ result = g_list_index (l, toolbar->parent);
+ g_list_free (l);
+
+ return result;
+}
+
+static int
+get_n_toolbars (EggEditableToolbar *etoolbar)
+{
+ GList *l;
+ int result;
+
+ l = gtk_container_get_children (GTK_CONTAINER (etoolbar));
+ result = g_list_length (l);
+ g_list_free (l);
+
+ return result;
+}
+
+static GtkWidget *
+get_dock_nth (EggEditableToolbar *etoolbar,
+ int position)
+{
+ GList *l;
+ GtkWidget *result;
+
+ l = gtk_container_get_children (GTK_CONTAINER (etoolbar));
+ result = g_list_nth_data (l, position);
+ g_list_free (l);
+
+ return result;
+}
+
+static GtkWidget *
+get_toolbar_nth (EggEditableToolbar *etoolbar,
+ int position)
+{
+ GList *l;
+ GtkWidget *dock;
+ GtkWidget *result;
+
+ dock = get_dock_nth (etoolbar, position);
+
+ l = gtk_container_get_children (GTK_CONTAINER (dock));
+ result = GTK_WIDGET (l->data);
+ g_list_free (l);
+
+ return result;
+}
+
+static GtkAction *
+find_action (EggEditableToolbar *t,
+ const char *name)
+{
+ GList *l;
+ GtkAction *action = NULL;
+
+ l = gtk_ui_manager_get_action_groups (t->priv->manager);
+
+ g_return_val_if_fail (name != NULL, NULL);
+
+ for (; l != NULL; l = l->next)
+ {
+ GtkAction *tmp;
+
+ tmp = gtk_action_group_get_action (GTK_ACTION_GROUP (l->data), name);
+ if (tmp)
+ action = tmp;
+ }
+
+ return action;
+}
+
+static void
+drag_data_delete_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ EggEditableToolbar *etoolbar)
+{
+ int pos, toolbar_pos;
+
+ g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (etoolbar));
+
+ pos = gtk_toolbar_get_item_index (GTK_TOOLBAR (widget->parent),
+ GTK_TOOL_ITEM (widget));
+ toolbar_pos = get_toolbar_position (etoolbar, widget->parent);
+
+ egg_toolbars_model_remove_item (etoolbar->priv->model,
+ toolbar_pos, pos);
+}
+
+static void
+drag_begin_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ EggEditableToolbar *etoolbar)
+{
+ gtk_widget_hide (widget);
+}
+
+static void
+drag_end_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ EggEditableToolbar *etoolbar)
+{
+ gtk_widget_show (widget);
+}
+
+static void
+drag_data_get_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint32 time,
+ EggEditableToolbar *etoolbar)
+{
+ const char *id, *type;
+ char *target;
+
+ g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (etoolbar));
+
+ type = g_object_get_data (G_OBJECT (widget), "type");
+ id = g_object_get_data (G_OBJECT (widget), "id");
+ if (strcmp (id, "separator") == 0)
+ {
+ target = g_strdup (id);
+ }
+ else
+ {
+ target = egg_toolbars_model_get_item_data (etoolbar->priv->model,
+ type, id);
+ }
+
+ gtk_selection_data_set (selection_data,
+ selection_data->target, 8, target, strlen (target));
+
+ g_free (target);
+}
+
+static void
+set_drag_cursor (GtkWidget *widget)
+{
+ if (widget->window)
+ {
+ GdkCursor *cursor;
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gdk_pixbuf_new_from_file (UIDIR G_DIR_SEPARATOR_S "hand-open.png", NULL);
+ cursor = gdk_cursor_new_from_pixbuf (gdk_display_get_default (),
+ pixbuf, 12, 12);
+ gdk_window_set_cursor (widget->window, cursor);
+ gdk_cursor_unref (cursor);
+ g_object_unref (pixbuf);
+ }
+}
+
+static void
+unset_drag_cursor (GtkWidget *widget)
+{
+ if (widget->window)
+ {
+ gdk_window_set_cursor (widget->window, NULL);
+ }
+}
+
+static void
+set_item_drag_source (EggToolbarsModel *model,
+ GtkWidget *item,
+ GtkAction *action,
+ gboolean is_separator,
+ const char *type)
+{
+ GtkTargetEntry target_entry;
+ const char *id;
+
+ target_entry.target = (char *)type;
+ target_entry.flags = GTK_TARGET_SAME_APP;
+ target_entry.info = 0;
+
+ gtk_drag_source_set (item, GDK_BUTTON1_MASK,
+ &target_entry, 1,
+ GDK_ACTION_MOVE);
+
+ if (is_separator)
+ {
+ GtkWidget *icon;
+ GdkPixbuf *pixbuf;
+
+ id = "separator";
+
+ icon = _egg_editable_toolbar_new_separator_image ();
+ pixbuf = gtk_image_get_pixbuf (GTK_IMAGE (icon));
+ gtk_drag_source_set_icon_pixbuf (item, pixbuf);
+ }
+ else
+ {
+ const char *stock_id;
+ GValue value = { 0, };
+ GdkPixbuf *pixbuf;
+
+ id = gtk_action_get_name (action);
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_object_get_property (G_OBJECT (action), "stock_id", &value);
+ stock_id = g_value_get_string (&value);
+
+ if (stock_id != NULL)
+ {
+ pixbuf = gtk_widget_render_icon (item, stock_id,
+ GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
+ }
+ else
+ {
+ pixbuf = gtk_widget_render_icon (item, GTK_STOCK_DND,
+ GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
+ }
+
+ gtk_drag_source_set_icon_pixbuf (item, pixbuf);
+ g_object_unref (pixbuf);
+
+ g_value_unset (&value);
+ }
+
+ g_object_set_data_full (G_OBJECT (item), "id",
+ g_strdup (id), g_free);
+ g_object_set_data_full (G_OBJECT (item), "type",
+ g_strdup (type), g_free);
+}
+
+static GtkWidget *
+create_item_from_action (EggEditableToolbar *t,
+ const char *action_name,
+ const char *type,
+ gboolean is_separator,
+ GtkAction **ret_action)
+{
+ GtkWidget *item;
+ GtkAction *action;
+
+ if (is_separator)
+ {
+ item = GTK_WIDGET (gtk_separator_tool_item_new ());
+ action = NULL;
+ }
+ else
+ {
+ g_return_val_if_fail (action_name != NULL, NULL);
+
+ g_signal_emit (G_OBJECT (t), egg_editable_toolbar_signals[ACTION_REQUEST],
+ 0, action_name);
+
+ action = find_action (t, action_name);
+ if (action)
+ {
+ item = gtk_action_create_tool_item (action);
+ }
+ else
+ {
+ return NULL;
+ }
+ }
+
+ gtk_widget_show (item);
+
+ g_signal_connect (item, "drag_begin",
+ G_CALLBACK (drag_begin_cb), t);
+ g_signal_connect (item, "drag_end",
+ G_CALLBACK (drag_end_cb), t);
+ g_signal_connect (item, "drag_data_get",
+ G_CALLBACK (drag_data_get_cb), t);
+ g_signal_connect (item, "drag_data_delete",
+ G_CALLBACK (drag_data_delete_cb), t);
+
+ if (t->priv->edit_mode)
+ {
+ set_drag_cursor (item);
+ gtk_widget_set_sensitive (item, TRUE);
+ set_item_drag_source (t->priv->model, item, action,
+ is_separator, type);
+ gtk_tool_item_set_use_drag_window (GTK_TOOL_ITEM (item), TRUE);
+ }
+
+ if (ret_action)
+ {
+ *ret_action = action;
+ }
+
+ return item;
+}
+
+static GtkWidget *
+create_item (EggEditableToolbar *t,
+ EggToolbarsModel *model,
+ int toolbar_position,
+ int position,
+ GtkAction **ret_action)
+{
+ const char *action_name, *type;
+ gboolean is_separator;
+
+ egg_toolbars_model_item_nth (model, toolbar_position, position,
+ &is_separator, &action_name, &type);
+ return create_item_from_action (t, action_name, type,
+ is_separator, ret_action);
+}
+
+static gboolean
+data_is_separator (const char *data)
+{
+ return strcmp (data, "separator") == 0;
+}
+
+static void
+drag_data_received_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ EggEditableToolbar *etoolbar)
+{
+ char *type;
+ char *id;
+
+ GdkAtom target;
+
+ target = gtk_drag_dest_find_target (widget, context, NULL);
+ type = egg_toolbars_model_get_item_type (etoolbar->priv->model, target);
+ id = egg_toolbars_model_get_item_id (etoolbar->priv->model, type, selection_data->data);
+
+ /* This function can be called for two reasons
+ *
+ * (1) drag_motion() needs an item to pass to
+ * gtk_toolbar_set_drop_highlight_item(). We can
+ * recognize this case by etoolbar->priv->pending being TRUE
+ * We should just create an item and return.
+ *
+ * (2) The drag has finished, and drag_drop() wants us to
+ * actually add a new item to the toolbar.
+ */
+
+ if (id == NULL)
+ {
+ etoolbar->priv->pending = FALSE;
+ g_free (type);
+ return;
+ }
+
+ if (etoolbar->priv->pending)
+ {
+ etoolbar->priv->pending = FALSE;
+ etoolbar->priv->dragged_item =
+ create_item_from_action (etoolbar, id, type,
+ data_is_separator (id), NULL);
+ g_object_ref (etoolbar->priv->dragged_item);
+ gtk_object_sink (GTK_OBJECT (etoolbar->priv->dragged_item));
+ }
+ else
+ {
+ int pos, toolbar_pos;
+
+ pos = gtk_toolbar_get_drop_index (GTK_TOOLBAR (widget), x, y);
+ toolbar_pos = get_toolbar_position (etoolbar, widget);
+
+ if (data_is_separator (selection_data->data))
+ {
+ egg_toolbars_model_add_separator (etoolbar->priv->model,
+ toolbar_pos, pos);
+ }
+ else
+ {
+ egg_toolbars_model_add_item (etoolbar->priv->model,
+ toolbar_pos, pos, id, type);
+ }
+
+ gtk_drag_finish (context, TRUE, context->action == GDK_ACTION_MOVE,
+ time);
+ }
+
+ g_free (type);
+ g_free (id);
+}
+
+static void
+remove_toolbar_cb (GtkWidget *menuitem,
+ EggEditableToolbar *etoolbar)
+{
+ int pos;
+
+ pos = get_toolbar_position (etoolbar, etoolbar->priv->selected_toolbar);
+ egg_toolbars_model_remove_toolbar (etoolbar->priv->model, pos);
+}
+
+static void
+popup_toolbar_context_menu_cb (GtkWidget *toolbar,
+ gint x,
+ gint y,
+ gint button_number,
+ EggEditableToolbar *t)
+{
+ GtkWidget *menu;
+ GtkWidget *item;
+ GtkWidget *image;
+
+ if (t->priv->edit_mode)
+ {
+ EggTbModelFlags flags;
+ int position;
+
+ t->priv->selected_toolbar = toolbar;
+
+ menu = gtk_menu_new ();
+
+ item = gtk_image_menu_item_new_with_mnemonic (_("_Remove Toolbar"));
+ gtk_widget_show (item);
+ image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
+ gtk_widget_show (image);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+ g_signal_connect (item, "activate",
+ G_CALLBACK (remove_toolbar_cb),
+ t);
+
+ position = get_toolbar_position (t, toolbar);
+ flags = egg_toolbars_model_get_flags (t->priv->model, position);
+ if (flags & EGG_TB_MODEL_NOT_REMOVABLE)
+ {
+ gtk_widget_set_sensitive (GTK_WIDGET (item), FALSE);
+ }
+
+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 2,
+ gtk_get_current_event_time ());
+ }
+}
+
+static void
+free_dragged_item (EggEditableToolbar *etoolbar)
+{
+ if (etoolbar->priv->dragged_item)
+ {
+ gtk_widget_destroy (etoolbar->priv->dragged_item);
+ g_object_unref (etoolbar->priv->dragged_item);
+ etoolbar->priv->dragged_item = NULL;
+ }
+}
+
+static gboolean
+toolbar_drag_drop_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ EggEditableToolbar *etoolbar)
+{
+ GdkAtom target;
+
+ target = gtk_drag_dest_find_target (widget, context, NULL);
+ if (target != GDK_NONE)
+ {
+ gtk_drag_get_data (widget, context,
+ target,
+ time);
+ return TRUE;
+ }
+
+ free_dragged_item (etoolbar);
+
+ return FALSE;
+}
+
+static gboolean
+toolbar_drag_motion_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ EggEditableToolbar *etoolbar)
+{
+ GdkAtom target;
+ int index;
+ GtkToolbar *toolbar = GTK_TOOLBAR (widget);
+ GtkToolItem *item;
+ GtkWidget *source;
+
+ source = gtk_drag_get_source_widget (context);
+ if (source)
+ {
+ EggTbModelFlags flags;
+ int pos;
+ gboolean is_item;
+
+ pos = get_toolbar_position (etoolbar, widget);
+ flags = egg_toolbars_model_get_flags (etoolbar->priv->model, pos);
+
+ is_item = etoolbar->priv->edit_mode &&
+ (gtk_widget_get_ancestor (source, EGG_TYPE_EDITABLE_TOOLBAR) ||
+ gtk_widget_get_ancestor (source, EGG_TYPE_TOOLBAR_EDITOR));
+
+ if ((flags & EGG_TB_MODEL_ACCEPT_ITEMS_ONLY) && !is_item)
+ {
+ gdk_drag_status (context, 0, time);
+ return FALSE;
+ }
+
+ if (gtk_widget_is_ancestor (source, widget))
+ {
+ context->suggested_action = GDK_ACTION_MOVE;
+ }
+ }
+
+ target = gtk_drag_dest_find_target (widget, context, NULL);
+ if (target == GDK_NONE)
+ {
+ gdk_drag_status (context, 0, time);
+ return FALSE;
+ }
+
+ if (etoolbar->priv->target_toolbar != toolbar)
+ {
+ if (etoolbar->priv->target_toolbar)
+ gtk_toolbar_set_drop_highlight_item
+ (etoolbar->priv->target_toolbar, NULL, 0);
+
+ free_dragged_item (etoolbar);
+ etoolbar->priv->pending = TRUE;
+
+ etoolbar->priv->target_toolbar = toolbar;
+
+ gtk_drag_get_data (widget, context, target, time);
+ }
+
+ if (etoolbar->priv->dragged_item != NULL &&
+ etoolbar->priv->edit_mode)
+ {
+ item = GTK_TOOL_ITEM (etoolbar->priv->dragged_item);
+
+ index = gtk_toolbar_get_drop_index (toolbar, x, y);
+ gtk_toolbar_set_drop_highlight_item (toolbar, item, index);
+ }
+
+ gdk_drag_status (context, context->suggested_action, time);
+
+ return TRUE;
+}
+
+static void
+toolbar_drag_leave_cb (GtkToolbar *toolbar,
+ GdkDragContext *context,
+ guint time,
+ EggEditableToolbar *etoolbar)
+{
+ /* This is a workaround for bug 125557. Sometimes
+ * we seemingly enter another toolbar *before* leaving
+ * the current one.
+ *
+ * In that case etoolbar->priv->target_toolbar will
+ * have been set to something else and the highlighting
+ * will already have been turned off
+ */
+
+ if (etoolbar->priv->target_toolbar == toolbar)
+ {
+ gtk_toolbar_set_drop_highlight_item (toolbar, NULL, 0);
+
+ etoolbar->priv->target_toolbar = NULL;
+ free_dragged_item (etoolbar);
+ }
+}
+
+static GtkWidget *
+create_dock (EggEditableToolbar *t)
+{
+ GtkWidget *toolbar, *hbox;
+
+ hbox = gtk_hbox_new (0, FALSE);
+ gtk_widget_show (hbox);
+
+ toolbar = gtk_toolbar_new ();
+ gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), TRUE);
+ gtk_widget_show (toolbar);
+ gtk_box_pack_start (GTK_BOX (hbox), toolbar, TRUE, TRUE, 0);
+
+ gtk_drag_dest_set (toolbar, 0,
+ dest_drag_types, n_dest_drag_types,
+ GDK_ACTION_MOVE | GDK_ACTION_COPY);
+
+ g_signal_connect (toolbar, "drag_drop",
+ G_CALLBACK (toolbar_drag_drop_cb), t);
+ g_signal_connect (toolbar, "drag_motion",
+ G_CALLBACK (toolbar_drag_motion_cb), t);
+ g_signal_connect (toolbar, "drag_leave",
+ G_CALLBACK (toolbar_drag_leave_cb), t);
+
+ g_signal_connect (toolbar, "drag_data_received",
+ G_CALLBACK (drag_data_received_cb), t);
+ g_signal_connect (toolbar, "popup_context_menu",
+ G_CALLBACK (popup_toolbar_context_menu_cb), t);
+
+ return hbox;
+}
+
+static void
+set_fixed_style (EggEditableToolbar *t, GtkToolbarStyle style)
+{
+ g_return_if_fail (GTK_IS_TOOLBAR (t->priv->fixed_toolbar));
+ gtk_toolbar_set_style (GTK_TOOLBAR (t->priv->fixed_toolbar), style);
+}
+
+static void
+unset_fixed_style (EggEditableToolbar *t)
+{
+ g_return_if_fail (GTK_IS_TOOLBAR (t->priv->fixed_toolbar));
+ gtk_toolbar_unset_style (GTK_TOOLBAR (t->priv->fixed_toolbar));
+}
+
+static void
+toolbar_changed_cb (EggToolbarsModel *model,
+ int position,
+ EggEditableToolbar *t)
+{
+ GtkWidget *toolbar;
+ EggTbModelFlags flags;
+ GtkToolbarStyle style;
+
+ flags = egg_toolbars_model_get_flags (model, position);
+ toolbar = get_toolbar_nth (t, position);
+
+ if (flags & EGG_TB_MODEL_ICONS_ONLY)
+ {
+ style = GTK_TOOLBAR_ICONS;
+ }
+ else if (flags & EGG_TB_MODEL_TEXT_ONLY)
+ {
+ style = GTK_TOOLBAR_TEXT;
+ }
+ else if (flags & EGG_TB_MODEL_ICONS_TEXT)
+ {
+ style = GTK_TOOLBAR_BOTH;
+ }
+ else if (flags & EGG_TB_MODEL_ICONS_TEXT_HORIZ)
+ {
+ style = GTK_TOOLBAR_BOTH_HORIZ;
+ }
+ else
+ {
+ gtk_toolbar_unset_style (GTK_TOOLBAR (toolbar));
+ if (position == 0 && t->priv->fixed_toolbar)
+ {
+ unset_fixed_style (t);
+ }
+ return;
+ }
+
+ gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), style);
+ if (position == 0 && t->priv->fixed_toolbar)
+ {
+ set_fixed_style (t, style);
+ }
+}
+
+static void
+unparent_fixed (EggEditableToolbar *t)
+{
+ GtkWidget *toolbar, *dock;
+ g_return_if_fail (GTK_IS_TOOLBAR (t->priv->fixed_toolbar));
+
+ toolbar = t->priv->fixed_toolbar;
+ dock = get_dock_nth (t, 0);
+
+ if (dock && toolbar->parent != NULL)
+ {
+ gtk_container_remove (GTK_CONTAINER (dock), toolbar);
+ }
+}
+
+static void
+update_fixed (EggEditableToolbar *t)
+{
+ GtkWidget *toolbar, *dock;
+ if (!t->priv->fixed_toolbar) return;
+
+ toolbar = t->priv->fixed_toolbar;
+ dock = get_dock_nth (t, 0);
+
+ if (dock && toolbar && toolbar->parent == NULL)
+ {
+ gtk_box_pack_end (GTK_BOX (dock), toolbar, FALSE, TRUE, 0);
+
+ gtk_widget_show_all (toolbar);
+ }
+}
+
+static void
+toolbar_added_cb (EggToolbarsModel *model,
+ int position,
+ EggEditableToolbar *t)
+{
+ GtkWidget *dock;
+
+ dock = create_dock (t);
+
+ gtk_widget_set_size_request (dock, -1, MIN_TOOLBAR_HEIGHT);
+
+ gtk_box_pack_start (GTK_BOX (t), dock, TRUE, TRUE, 0);
+
+ gtk_box_reorder_child (GTK_BOX (t), dock, position);
+
+ gtk_widget_show_all (dock);
+
+ update_fixed (t);
+}
+
+static void
+toolbar_removed_cb (EggToolbarsModel *model,
+ int position,
+ EggEditableToolbar *t)
+{
+ GtkWidget *toolbar;
+
+ toolbar = get_dock_nth (t, position);
+ gtk_widget_destroy (toolbar);
+
+ update_fixed (t);
+}
+
+static void
+item_added_cb (EggToolbarsModel *model,
+ int toolbar_position,
+ int position,
+ EggEditableToolbar *t)
+{
+ GtkWidget *dock;
+ GtkWidget *toolbar;
+ GtkWidget *item;
+ GtkAction *action;
+
+ toolbar = get_toolbar_nth (t, toolbar_position);
+ item = create_item (t, model, toolbar_position, position, &action);
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
+ GTK_TOOL_ITEM (item), position);
+
+ dock = get_dock_nth (t, toolbar_position);
+ gtk_widget_set_size_request (dock, -1, -1);
+ gtk_widget_queue_resize_no_redraw (dock);
+
+ /* FIXME Hack to make tooltip work from gtk */
+ if (action)
+ {
+ g_object_notify (G_OBJECT (action), "tooltip");
+ }
+}
+
+static void
+item_removed_cb (EggToolbarsModel *model,
+ int toolbar_position,
+ int position,
+ EggEditableToolbar *t)
+{
+ GtkWidget *toolbar;
+ GtkWidget *item;
+
+ toolbar = get_toolbar_nth (t, toolbar_position);
+ item = GTK_WIDGET (gtk_toolbar_get_nth_item
+ (GTK_TOOLBAR (toolbar), position));
+ g_return_if_fail (item != NULL);
+ gtk_container_remove (GTK_CONTAINER (toolbar), item);
+
+ if (egg_toolbars_model_n_items (model, toolbar_position) == 0)
+ {
+ egg_toolbars_model_remove_toolbar (model, toolbar_position);
+ }
+}
+
+static void
+egg_editable_toolbar_construct (EggEditableToolbar *t)
+{
+ int i, l, n_items, n_toolbars;
+ EggToolbarsModel *model = t->priv->model;
+
+ g_return_if_fail (model != NULL);
+ g_return_if_fail (t->priv->manager != NULL);
+
+ n_toolbars = egg_toolbars_model_n_toolbars (model);
+
+ for (i = 0; i < n_toolbars; i++)
+ {
+ GtkWidget *toolbar, *dock;
+ EggTbModelFlags flags;
+
+ dock = create_dock (t);
+ gtk_box_pack_start (GTK_BOX (t), dock, TRUE, TRUE, 0);
+ toolbar = get_toolbar_nth (t, i);
+
+ flags = egg_toolbars_model_get_flags (model, i);
+ if (flags & EGG_TB_MODEL_ICONS_ONLY)
+ {
+ gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);
+ if (i == 0 && t->priv->fixed_toolbar)
+ {
+ set_fixed_style (t, GTK_TOOLBAR_ICONS);
+ }
+ }
+
+ n_items = egg_toolbars_model_n_items (model, i);
+ for (l = 0; l < n_items; l++)
+ {
+ GtkWidget *item;
+ GtkAction *action;
+
+ item = create_item (t, model, i, l, &action);
+ if (item)
+ {
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
+ GTK_TOOL_ITEM (item), l);
+ /* FIXME Hack to make tooltip work from gtk */
+ if (action)
+ {
+ g_object_notify (G_OBJECT (action), "tooltip");
+ }
+ }
+ else
+ {
+ egg_toolbars_model_remove_item (model, i, l);
+ l--;
+ n_items--;
+ }
+ }
+
+ if (n_items == 0)
+ {
+ gtk_widget_set_size_request (dock, -1, MIN_TOOLBAR_HEIGHT);
+ }
+ }
+
+ update_fixed (t);
+}
+
+static void
+egg_editable_toolbar_disconnect_model (EggEditableToolbar *toolbar)
+{
+ EggToolbarsModel *model = toolbar->priv->model;
+
+ g_signal_handlers_disconnect_by_func
+ (model, G_CALLBACK (item_added_cb), toolbar);
+ g_signal_handlers_disconnect_by_func
+ (model, G_CALLBACK (item_removed_cb), toolbar);
+ g_signal_handlers_disconnect_by_func
+ (model, G_CALLBACK (toolbar_added_cb), toolbar);
+ g_signal_handlers_disconnect_by_func
+ (model, G_CALLBACK (toolbar_removed_cb), toolbar);
+ g_signal_handlers_disconnect_by_func
+ (model, G_CALLBACK (toolbar_changed_cb), toolbar);
+}
+
+static void
+egg_editable_toolbar_deconstruct (EggEditableToolbar *toolbar)
+{
+ EggToolbarsModel *model = toolbar->priv->model;
+ GList *children;
+
+ g_return_if_fail (model != NULL);
+
+ if (toolbar->priv->fixed_toolbar)
+ {
+ unset_fixed_style (toolbar);
+ unparent_fixed (toolbar);
+ }
+
+ children = gtk_container_get_children (GTK_CONTAINER (toolbar));
+ g_list_foreach (children, (GFunc) gtk_widget_destroy, NULL);
+ g_list_free (children);
+}
+
+void
+egg_editable_toolbar_set_model (EggEditableToolbar *toolbar,
+ EggToolbarsModel *model)
+{
+ g_return_if_fail (EGG_IS_TOOLBARS_MODEL (model));
+ g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (toolbar));
+ g_return_if_fail (toolbar->priv->manager);
+
+ if (toolbar->priv->model == model) return;
+
+ if (toolbar->priv->model)
+ {
+ egg_editable_toolbar_disconnect_model (toolbar);
+ egg_editable_toolbar_deconstruct (toolbar);
+
+ g_object_unref (toolbar->priv->model);
+ }
+
+ toolbar->priv->model = g_object_ref (model);
+
+ egg_editable_toolbar_construct (toolbar);
+
+ g_signal_connect (model, "item_added",
+ G_CALLBACK (item_added_cb), toolbar);
+ g_signal_connect (model, "item_removed",
+ G_CALLBACK (item_removed_cb), toolbar);
+ g_signal_connect (model, "toolbar_added",
+ G_CALLBACK (toolbar_added_cb), toolbar);
+ g_signal_connect (model, "toolbar_removed",
+ G_CALLBACK (toolbar_removed_cb), toolbar);
+ g_signal_connect (model, "toolbar_changed",
+ G_CALLBACK (toolbar_changed_cb), toolbar);
+}
+
+static void
+egg_editable_toolbar_set_ui_manager (EggEditableToolbar *t,
+ GtkUIManager *manager)
+{
+ g_return_if_fail (GTK_IS_UI_MANAGER (manager));
+
+ t->priv->manager = g_object_ref (manager);
+}
+
+static void
+egg_editable_toolbar_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ EggEditableToolbar *t = EGG_EDITABLE_TOOLBAR (object);
+
+ switch (prop_id)
+ {
+ case PROP_UI_MANAGER:
+ egg_editable_toolbar_set_ui_manager (t, g_value_get_object (value));
+ break;
+ case PROP_TOOLBARS_MODEL:
+ egg_editable_toolbar_set_model (t, g_value_get_object (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+egg_editable_toolbar_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ EggEditableToolbar *t = EGG_EDITABLE_TOOLBAR (object);
+
+ switch (prop_id)
+ {
+ case PROP_UI_MANAGER:
+ g_value_set_object (value, t->priv->manager);
+ break;
+ case PROP_TOOLBARS_MODEL:
+ g_value_set_object (value, t->priv->model);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+egg_editable_toolbar_class_init (EggEditableToolbarClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ object_class->finalize = egg_editable_toolbar_finalize;
+ object_class->set_property = egg_editable_toolbar_set_property;
+ object_class->get_property = egg_editable_toolbar_get_property;
+
+ egg_editable_toolbar_signals[ACTION_REQUEST] =
+ g_signal_new ("action_request",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggEditableToolbarClass, action_request),
+ NULL, NULL, g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
+
+ g_object_class_install_property (object_class,
+ PROP_UI_MANAGER,
+ g_param_spec_object ("ui-manager",
+ "UI-Mmanager",
+ "UI Manager",
+ GTK_TYPE_UI_MANAGER,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (object_class,
+ PROP_TOOLBARS_MODEL,
+ g_param_spec_object ("model",
+ "Model",
+ "Toolbars Model",
+ EGG_TYPE_TOOLBARS_MODEL,
+ G_PARAM_READWRITE));
+
+ g_type_class_add_private (object_class, sizeof (EggEditableToolbarPrivate));
+}
+
+static void
+egg_editable_toolbar_init (EggEditableToolbar *t)
+{
+ t->priv = EGG_EDITABLE_TOOLBAR_GET_PRIVATE (t);
+}
+
+static void
+egg_editable_toolbar_finalize (GObject *object)
+{
+ EggEditableToolbar *t = EGG_EDITABLE_TOOLBAR (object);
+
+ if (t->priv->fixed_toolbar)
+ {
+ g_object_unref (t->priv->fixed_toolbar);
+ }
+
+ if (t->priv->manager)
+ {
+ g_object_unref (t->priv->manager);
+ }
+
+ if (t->priv->model)
+ {
+ egg_editable_toolbar_disconnect_model (t);
+ g_object_unref (t->priv->model);
+ }
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+GtkWidget *
+egg_editable_toolbar_new (GtkUIManager *manager)
+{
+ return GTK_WIDGET (g_object_new (EGG_TYPE_EDITABLE_TOOLBAR,
+ "ui-manager", manager,
+ NULL));
+}
+
+GtkWidget *
+egg_editable_toolbar_new_with_model (GtkUIManager *manager,
+ EggToolbarsModel *model)
+{
+ return GTK_WIDGET (g_object_new (EGG_TYPE_EDITABLE_TOOLBAR,
+ "ui-manager", manager,
+ "model", model,
+ NULL));
+}
+
+gboolean
+egg_editable_toolbar_get_edit_mode (EggEditableToolbar *etoolbar)
+{
+ return etoolbar->priv->edit_mode;
+}
+
+void
+egg_editable_toolbar_set_edit_mode (EggEditableToolbar *etoolbar,
+ gboolean mode)
+{
+ int i, l, n_toolbars, n_items;
+
+ etoolbar->priv->edit_mode = mode;
+
+ n_toolbars = get_n_toolbars (etoolbar);
+ for (i = 0; i < n_toolbars; i++)
+ {
+ GtkWidget *toolbar;
+
+ toolbar = get_toolbar_nth (etoolbar, i);
+ n_items = gtk_toolbar_get_n_items (GTK_TOOLBAR (toolbar));
+ for (l = 0; l < n_items; l++)
+ {
+ GtkToolItem *item;
+ const char *action_name, *type;
+ gboolean is_separator;
+ GtkAction *action = NULL;
+
+ egg_toolbars_model_item_nth (etoolbar->priv->model, i, l,
+ &is_separator, &action_name, &type);
+ action = find_action (etoolbar, action_name);
+
+ item = gtk_toolbar_get_nth_item (GTK_TOOLBAR (toolbar), l);
+ gtk_tool_item_set_use_drag_window (item, mode);
+
+ if (mode)
+ {
+ set_drag_cursor (GTK_WIDGET (item));
+ gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE);
+ set_item_drag_source (etoolbar->priv->model, GTK_WIDGET (item),
+ action, is_separator, type);
+ }
+ else
+ {
+ unset_drag_cursor (GTK_WIDGET (item));
+ gtk_drag_source_unset (GTK_WIDGET (item));
+
+ if (!is_separator)
+ {
+ g_object_notify (G_OBJECT (action), "sensitive");
+ }
+ }
+ }
+ }
+}
+
+void
+egg_editable_toolbar_show (EggEditableToolbar *etoolbar,
+ const char *name)
+{
+ int i, n_toolbars;
+ EggToolbarsModel *model = etoolbar->priv->model;
+
+ g_return_if_fail (model != NULL);
+
+ n_toolbars = egg_toolbars_model_n_toolbars (model);
+ for (i = 0; i < n_toolbars; i++)
+ {
+ const char *toolbar_name;
+
+ toolbar_name = egg_toolbars_model_toolbar_nth (model, i);
+ if (strcmp (toolbar_name, name) == 0)
+ {
+ gtk_widget_show (get_dock_nth (etoolbar, i));
+ }
+ }
+}
+
+void
+egg_editable_toolbar_hide (EggEditableToolbar *etoolbar,
+ const char *name)
+{
+ int i, n_toolbars;
+ EggToolbarsModel *model = etoolbar->priv->model;
+
+ g_return_if_fail (model != NULL);
+
+ n_toolbars = egg_toolbars_model_n_toolbars (model);
+ for (i = 0; i < n_toolbars; i++)
+ {
+ const char *toolbar_name;
+
+ toolbar_name = egg_toolbars_model_toolbar_nth (model, i);
+ if (strcmp (toolbar_name, name) == 0)
+ {
+ gtk_widget_hide (get_dock_nth (etoolbar, i));
+ }
+ }
+}
+
+void
+egg_editable_toolbar_set_fixed (EggEditableToolbar *toolbar,
+ GtkToolItem *fixed)
+{
+ g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (toolbar));
+ g_return_if_fail (!fixed || GTK_IS_TOOL_ITEM (fixed));
+
+ if (!toolbar->priv->fixed_toolbar)
+ {
+ toolbar->priv->fixed_toolbar = gtk_toolbar_new ();
+ gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar->priv->fixed_toolbar), FALSE);
+ g_object_ref (toolbar->priv->fixed_toolbar);
+ gtk_object_sink (GTK_OBJECT (toolbar->priv->fixed_toolbar));
+ }
+
+ if (toolbar->priv->fixed)
+ {
+ gtk_container_remove (GTK_CONTAINER (toolbar->priv->fixed_toolbar),
+ GTK_WIDGET (toolbar->priv->fixed));
+ g_object_unref (toolbar->priv->fixed);
+ }
+
+ toolbar->priv->fixed = fixed;
+
+ if (fixed)
+ {
+ g_object_ref (fixed);
+ gtk_object_sink (GTK_OBJECT (fixed));
+
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar->priv->fixed_toolbar), fixed, 0);
+ }
+}
+
+void
+egg_editable_toolbar_set_drag_dest (EggEditableToolbar *etoolbar,
+ const GtkTargetEntry *targets,
+ gint n_targets,
+ const char *toolbar_name)
+{
+ int i, n_toolbars;
+ EggToolbarsModel *model = etoolbar->priv->model;
+
+ g_return_if_fail (model != NULL);
+
+ n_toolbars = egg_toolbars_model_n_toolbars (model);
+ for (i = 0; i < n_toolbars; i++)
+ {
+ const char *name;
+
+ name = egg_toolbars_model_toolbar_nth (model, i);
+ if (strcmp (toolbar_name, name) == 0)
+ {
+ GtkWidget *widget = get_toolbar_nth (etoolbar, i);
+
+ gtk_drag_dest_unset (widget);
+ gtk_drag_dest_set (widget, 0,
+ targets, n_targets,
+ GDK_ACTION_MOVE | GDK_ACTION_COPY);
+ }
+ }
+}
+
+#define DEFAULT_ICON_HEIGHT 20
+#define DEFAULT_ICON_WIDTH 0
+
+static void
+fake_expose_widget (GtkWidget *widget,
+ GdkPixmap *pixmap)
+{
+ GdkWindow *tmp_window;
+ GdkEventExpose event;
+
+ event.type = GDK_EXPOSE;
+ event.window = pixmap;
+ event.send_event = FALSE;
+ event.area = widget->allocation;
+ event.region = NULL;
+ event.count = 0;
+
+ tmp_window = widget->window;
+ widget->window = pixmap;
+ gtk_widget_send_expose (widget, (GdkEvent *) &event);
+ widget->window = tmp_window;
+}
+
+/* We should probably experiment some more with this.
+ * Right now the rendered icon is pretty good for most
+ * themes. However, the icon is slightly large for themes
+ * with large toolbar icons.
+ */
+static GdkPixbuf *
+new_pixbuf_from_widget (GtkWidget *widget)
+{
+ GtkWidget *window;
+ GdkPixbuf *pixbuf;
+ GtkRequisition requisition;
+ GtkAllocation allocation;
+ GdkPixmap *pixmap;
+ GdkVisual *visual;
+ gint icon_width;
+ gint icon_height;
+
+ icon_width = DEFAULT_ICON_WIDTH;
+
+ if (!gtk_icon_size_lookup_for_settings (gtk_settings_get_default (),
+ GTK_ICON_SIZE_LARGE_TOOLBAR,
+ NULL,
+ &icon_height))
+ {
+ icon_height = DEFAULT_ICON_HEIGHT;
+ }
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ gtk_container_add (GTK_CONTAINER (window), widget);
+ gtk_widget_realize (window);
+ gtk_widget_show (widget);
+ gtk_widget_realize (widget);
+ gtk_widget_map (widget);
+
+ /* Gtk will never set the width or height of a window to 0. So setting the width to
+ * 0 and than getting it will provide us with the minimum width needed to render
+ * the icon correctly, without any additional window background noise.
+ * This is needed mostly for pixmap based themes.
+ */
+ gtk_window_set_default_size (GTK_WINDOW (window), icon_width, icon_height);
+ gtk_window_get_size (GTK_WINDOW (window),&icon_width, &icon_height);
+
+ gtk_widget_size_request (window, &requisition);
+ allocation.x = 0;
+ allocation.y = 0;
+ allocation.width = icon_width;
+ allocation.height = icon_height;
+ gtk_widget_size_allocate (window, &allocation);
+ gtk_widget_size_request (window, &requisition);
+
+ /* Create a pixmap */
+ visual = gtk_widget_get_visual (window);
+ pixmap = gdk_pixmap_new (NULL, icon_width, icon_height, gdk_visual_get_best_depth());
+ gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), gtk_widget_get_colormap (window));
+
+ /* Draw the window */
+ gtk_widget_ensure_style (window);
+ g_assert (window->style);
+ g_assert (window->style->font_desc);
+
+ fake_expose_widget (window, pixmap);
+ fake_expose_widget (widget, pixmap);
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, icon_width, icon_height);
+ gdk_pixbuf_get_from_drawable (pixbuf, pixmap, NULL, 0, 0, 0, 0, icon_width, icon_height);
+
+ return pixbuf;
+}
+
+static GdkPixbuf *
+new_separator_pixbuf ()
+{
+ GtkWidget *separator;
+ GdkPixbuf *pixbuf;
+
+ separator = gtk_vseparator_new ();
+ pixbuf = new_pixbuf_from_widget (separator);
+ gtk_widget_destroy (separator);
+ return pixbuf;
+}
+
+static void
+update_separator_image (GtkImage *image)
+{
+ GdkPixbuf *pixbuf = new_separator_pixbuf ();
+ gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
+ g_object_unref (pixbuf);
+}
+
+static gboolean
+style_set_cb (GtkWidget *widget,
+ GtkStyle *previous_style,
+ GtkImage *image)
+{
+
+ update_separator_image (image);
+ return FALSE;
+}
+
+GtkWidget *
+_egg_editable_toolbar_new_separator_image (void)
+{
+ GtkWidget *image = gtk_image_new ();
+ update_separator_image (GTK_IMAGE (image));
+ g_signal_connect (G_OBJECT (image), "style_set",
+ G_CALLBACK (style_set_cb), GTK_IMAGE (image));
+
+ return image;
+}
+
+EggToolbarsModel *
+egg_editable_toolbar_get_model (EggEditableToolbar *etoolbar)
+{
+ return etoolbar->priv->model;
+}
diff --git a/src/egg-editable-toolbar.h b/src/egg-editable-toolbar.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2003-2004 Marco Pesenti Gritti
+ * Copyright (C) 2004 Christian Persch
+ *
+ * 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.
+ *
+ * $Id: egg-editable-toolbar.h,v 1.1 2005/02/10 17:08:30 jylefort Exp $
+ */
+
+#ifndef EGG_EDITABLE_TOOLBAR_H
+#define EGG_EDITABLE_TOOLBAR_H
+
+#include "egg-toolbars-model.h"
+
+#include <gtk/gtkuimanager.h>
+#include <gtk/gtkselection.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtktoolitem.h>
+#include <gtk/gtktoolbar.h>
+
+G_BEGIN_DECLS
+
+typedef struct EggEditableToolbarClass EggEditableToolbarClass;
+
+#define EGG_TYPE_EDITABLE_TOOLBAR (egg_editable_toolbar_get_type ())
+#define EGG_EDITABLE_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbar))
+#define EGG_EDITABLE_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
+#define EGG_IS_EDITABLE_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_EDITABLE_TOOLBAR))
+#define EGG_IS_EDITABLE_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_EDITABLE_TOOLBAR))
+#define EGG_EDITABLE_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
+
+
+typedef struct EggEditableToolbar EggEditableToolbar;
+typedef struct EggEditableToolbarPrivate EggEditableToolbarPrivate;
+
+struct EggEditableToolbar
+{
+ GtkVBox parent_object;
+
+ /*< private >*/
+ EggEditableToolbarPrivate *priv;
+};
+
+struct EggEditableToolbarClass
+{
+ GtkVBoxClass parent_class;
+
+ void (* action_request) (EggEditableToolbar *etoolbar,
+ const char *action_name);
+};
+
+GType egg_editable_toolbar_get_type (void);
+GtkWidget *egg_editable_toolbar_new (GtkUIManager *manager);
+GtkWidget *egg_editable_toolbar_new_with_model (GtkUIManager *manager,
+ EggToolbarsModel *model);
+void egg_editable_toolbar_set_model (EggEditableToolbar *etoolbar,
+ EggToolbarsModel *model);
+EggToolbarsModel *egg_editable_toolbar_get_model (EggEditableToolbar *etoolbar);
+void egg_editable_toolbar_set_edit_mode (EggEditableToolbar *etoolbar,
+ gboolean mode);
+gboolean egg_editable_toolbar_get_edit_mode (EggEditableToolbar *etoolbar);
+void egg_editable_toolbar_show (EggEditableToolbar *etoolbar,
+ const char *name);
+void egg_editable_toolbar_hide (EggEditableToolbar *etoolbar,
+ const char *name);
+void egg_editable_toolbar_set_drag_dest (EggEditableToolbar *etoolbar,
+ const GtkTargetEntry *targets,
+ gint n_targets,
+ const char *toolbar_name);
+void egg_editable_toolbar_set_fixed (EggEditableToolbar *etoolbar,
+ GtkToolItem *fixed);
+
+
+/* Private Functions */
+
+GtkWidget *_egg_editable_toolbar_new_separator_image (void);
+
+G_END_DECLS
+
+#endif
diff --git a/src/egg-toolbar-editor.c b/src/egg-toolbar-editor.c
@@ -0,0 +1,710 @@
+/*
+ * Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ * 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.
+ *
+ * $Id: egg-toolbar-editor.c,v 1.1 2005/02/10 17:08:30 jylefort Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "egg-toolbar-editor.h"
+#include "egg-editable-toolbar.h"
+
+#include <string.h>
+#include <libxml/tree.h>
+#include <glib/gi18n.h>
+#include <gtk/gtkimage.h>
+#include <gtk/gtkeventbox.h>
+#include <gtk/gtkdnd.h>
+#include <gtk/gtkscrolledwindow.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtktable.h>
+#include <gtk/gtkstock.h>
+#include <gtk/gtkhbox.h>
+
+static GtkTargetEntry dest_drag_types[] = {
+ {EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
+};
+static int n_dest_drag_types = G_N_ELEMENTS (dest_drag_types);
+
+static GtkTargetEntry source_drag_types[] = {
+ {EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
+};
+static int n_source_drag_types = G_N_ELEMENTS (source_drag_types);
+
+static void egg_toolbar_editor_class_init (EggToolbarEditorClass *klass);
+static void egg_toolbar_editor_init (EggToolbarEditor *t);
+static void egg_toolbar_editor_finalize (GObject *object);
+static void update_actions_list (EggToolbarEditor *editor);
+static void update_editor_sheet (EggToolbarEditor *editor);
+
+enum
+{
+ PROP_0,
+ PROP_UI_MANAGER,
+ PROP_TOOLBARS_MODEL
+};
+
+static GObjectClass *parent_class = NULL;
+
+#define EGG_TOOLBAR_EDITOR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorPrivate))
+
+struct EggToolbarEditorPrivate
+{
+ GtkUIManager *manager;
+ EggToolbarsModel *model;
+
+ GtkWidget *table;
+ GtkWidget *scrolled_window;
+
+ GList *default_actions_list;
+ GList *actions_list;
+};
+
+GType
+egg_toolbar_editor_get_type (void)
+{
+ static GType egg_toolbar_editor_type = 0;
+
+ if (egg_toolbar_editor_type == 0)
+ {
+ static const GTypeInfo our_info = {
+ sizeof (EggToolbarEditorClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) egg_toolbar_editor_class_init,
+ NULL,
+ NULL, /* class_data */
+ sizeof (EggToolbarEditor),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) egg_toolbar_editor_init
+ };
+
+ egg_toolbar_editor_type = g_type_register_static (GTK_TYPE_VBOX,
+ "EggToolbarEditor",
+ &our_info, 0);
+ }
+
+ return egg_toolbar_editor_type;
+}
+
+static gint
+compare_actions (gconstpointer a,
+ gconstpointer b)
+{
+ GValue value_a = { 0, }, value_b = { 0, };
+ const char *short_label_a, *short_label_b;
+ int ret;
+
+ g_value_init (&value_a, G_TYPE_STRING);
+ g_object_get_property (G_OBJECT (a), "short_label", &value_a);
+ short_label_a = g_value_get_string (&value_a);
+
+ g_value_init (&value_b, G_TYPE_STRING);
+ g_object_get_property (G_OBJECT (b), "short_label", &value_b);
+ short_label_b = g_value_get_string (&value_b);
+
+ ret = g_utf8_collate (short_label_a, short_label_b);
+
+ g_value_unset (&value_a);
+ g_value_unset (&value_b);
+
+ return ret;
+}
+
+static GtkAction *
+find_action (EggToolbarEditor *t,
+ const char *name)
+{
+ GList *l;
+ GtkAction *action = NULL;
+
+ l = gtk_ui_manager_get_action_groups (t->priv->manager);
+
+ g_return_val_if_fail (EGG_IS_TOOLBAR_EDITOR (t), NULL);
+ g_return_val_if_fail (name != NULL, NULL);
+
+ for (; l != NULL; l = l->next)
+ {
+ GtkAction *tmp;
+
+ tmp = gtk_action_group_get_action (GTK_ACTION_GROUP (l->data), name);
+ if (tmp)
+ action = tmp;
+ }
+
+ return action;
+}
+
+static void
+egg_toolbar_editor_set_ui_manager (EggToolbarEditor *t,
+ GtkUIManager *manager)
+{
+ g_return_if_fail (GTK_IS_UI_MANAGER (manager));
+
+ t->priv->manager = g_object_ref (manager);
+}
+
+static void
+toolbar_removed_cb (EggToolbarsModel *model,
+ int position,
+ EggToolbarEditor *editor)
+{
+ update_actions_list (editor);
+ update_editor_sheet (editor);
+}
+
+static void
+egg_toolbar_editor_set_model (EggToolbarEditor *t,
+ EggToolbarsModel *model)
+{
+ g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (t));
+
+ t->priv->model = g_object_ref (model);
+
+ g_signal_connect_object (model, "toolbar_removed",
+ G_CALLBACK (toolbar_removed_cb), t, 0);
+}
+
+static void
+egg_toolbar_editor_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ EggToolbarEditor *t = EGG_TOOLBAR_EDITOR (object);
+
+ switch (prop_id)
+ {
+ case PROP_UI_MANAGER:
+ egg_toolbar_editor_set_ui_manager (t, g_value_get_object (value));
+ break;
+ case PROP_TOOLBARS_MODEL:
+ egg_toolbar_editor_set_model (t, g_value_get_object (value));
+ break;
+ }
+}
+
+static void
+egg_toolbar_editor_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ EggToolbarEditor *t = EGG_TOOLBAR_EDITOR (object);
+
+ switch (prop_id)
+ {
+ case PROP_UI_MANAGER:
+ g_value_set_object (value, t->priv->manager);
+ break;
+ case PROP_TOOLBARS_MODEL:
+ g_value_set_object (value, t->priv->model);
+ break;
+ }
+}
+
+static void
+egg_toolbar_editor_class_init (EggToolbarEditorClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ object_class->finalize = egg_toolbar_editor_finalize;
+ object_class->set_property = egg_toolbar_editor_set_property;
+ object_class->get_property = egg_toolbar_editor_get_property;
+
+ g_object_class_install_property (object_class,
+ PROP_UI_MANAGER,
+ g_param_spec_object ("ui-manager",
+ "UI-Manager",
+ "UI Manager",
+ GTK_TYPE_UI_MANAGER,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class,
+ PROP_TOOLBARS_MODEL,
+ g_param_spec_object ("model",
+ "Model",
+ "Toolbars Model",
+ EGG_TYPE_TOOLBARS_MODEL,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY));
+
+ g_type_class_add_private (object_class, sizeof (EggToolbarEditorPrivate));
+}
+
+static void
+egg_toolbar_editor_finalize (GObject *object)
+{
+ EggToolbarEditor *editor = EGG_TOOLBAR_EDITOR (object);
+
+ if (editor->priv->manager)
+ {
+ g_object_unref (editor->priv->manager);
+ }
+
+ if (editor->priv->model)
+ {
+ g_object_unref (editor->priv->model);
+ }
+
+ g_list_free (editor->priv->default_actions_list);
+ g_list_free (editor->priv->actions_list);
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+GtkWidget *
+egg_toolbar_editor_new (GtkUIManager *manager,
+ EggToolbarsModel *model)
+{
+ return GTK_WIDGET (g_object_new (EGG_TYPE_TOOLBAR_EDITOR,
+ "ui-manager", manager,
+ "model", model,
+ NULL));
+}
+
+static void
+drag_begin_cb (GtkWidget *widget,
+ GdkDragContext *context)
+{
+ gtk_widget_hide (widget);
+}
+
+static void
+drag_end_cb (GtkWidget *widget,
+ GdkDragContext *context)
+{
+ gtk_widget_show (widget);
+}
+
+static void
+editor_drag_data_received_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time_,
+ EggToolbarEditor *editor)
+{
+ GtkAction *action;
+ const char *data;
+
+ g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (editor));
+ g_return_if_fail (selection_data != NULL);
+
+ if (selection_data->length <= 0 || selection_data->data == NULL) return;
+
+ data = (const char *) selection_data->data;
+
+ if (strcmp (data, "separator") == 0) return;
+
+ action = find_action (editor, data);
+ g_return_if_fail (action != NULL);
+
+ if (g_list_find (editor->priv->default_actions_list, action))
+ {
+ editor->priv->actions_list = g_list_insert_sorted
+ (editor->priv->actions_list, action, compare_actions);
+ }
+
+ update_editor_sheet (editor);
+}
+
+static void
+editor_drag_data_delete_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ EggToolbarEditor *editor)
+{
+ GtkAction *action;
+ g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (editor));
+
+ action = GTK_ACTION (g_object_get_data (G_OBJECT (widget), "egg-action"));
+ if (action)
+ {
+ editor->priv->actions_list = g_list_remove
+ (editor->priv->actions_list, action);
+ }
+
+ update_editor_sheet (editor);
+}
+
+static void
+drag_data_get_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint32 time,
+ EggToolbarEditor *editor)
+{
+ GtkAction *action;
+ const char *target;
+
+ action = GTK_ACTION (g_object_get_data (G_OBJECT (widget), "egg-action"));
+
+ if (action)
+ {
+ target = gtk_action_get_name (action);
+ }
+ else
+ {
+ target = "separator";
+ }
+
+ gtk_selection_data_set (selection_data,
+ selection_data->target, 8, target, strlen (target));
+}
+
+static gchar *
+elide_underscores (const gchar *original)
+{
+ gchar *q, *result;
+ const gchar *p;
+ gboolean last_underscore;
+
+ q = result = g_malloc (strlen (original) + 1);
+ last_underscore = FALSE;
+
+ for (p = original; *p; p++)
+ {
+ if (!last_underscore && *p == '_')
+ last_underscore = TRUE;
+ else
+ {
+ last_underscore = FALSE;
+ *q++ = *p;
+ }
+ }
+
+ *q = '\0';
+
+ return result;
+}
+
+static void
+set_drag_cursor (GtkWidget *widget)
+{
+ GdkCursor *cursor;
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gdk_pixbuf_new_from_file (UIDIR G_DIR_SEPARATOR_S "hand-open.png", NULL);
+ cursor = gdk_cursor_new_from_pixbuf (gdk_display_get_default (), pixbuf, 12, 12);
+
+ gdk_window_set_cursor (widget->window, cursor);
+ gdk_cursor_unref (cursor);
+ g_object_unref (pixbuf);
+}
+
+static void
+event_box_realize_cb (GtkWidget *widget, GtkImage *icon)
+{
+ GtkImageType type;
+
+ set_drag_cursor (widget);
+
+ type = gtk_image_get_storage_type (icon);
+ if (type == GTK_IMAGE_STOCK)
+ {
+ gchar *stock_id;
+ GdkPixbuf *pixbuf;
+ gtk_image_get_stock (icon, &stock_id, NULL);
+ pixbuf = gtk_widget_render_icon (widget, stock_id,
+ GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
+ gtk_drag_source_set_icon_pixbuf (widget, pixbuf);
+ g_object_unref (pixbuf);
+ }
+ else if (type == GTK_IMAGE_PIXBUF)
+ {
+ GdkPixbuf *pixbuf = gtk_image_get_pixbuf (icon);
+ gtk_drag_source_set_icon_pixbuf (widget, pixbuf);
+ }
+}
+
+static GtkWidget *
+editor_create_item (EggToolbarEditor *editor,
+ GtkImage *icon,
+ const char *label_text,
+ GdkDragAction action)
+{
+ GtkWidget *event_box;
+ GtkWidget *vbox;
+ GtkWidget *label;
+ gchar *label_no_mnemonic = NULL;
+
+ event_box = gtk_event_box_new ();
+ gtk_event_box_set_visible_window (GTK_EVENT_BOX (event_box), FALSE);
+ gtk_widget_show (event_box);
+ gtk_drag_source_set (event_box,
+ GDK_BUTTON1_MASK,
+ source_drag_types, n_source_drag_types, action);
+ g_signal_connect (event_box, "drag_data_get",
+ G_CALLBACK (drag_data_get_cb), editor);
+ g_signal_connect (event_box, "drag_data_delete",
+ G_CALLBACK (editor_drag_data_delete_cb), editor);
+ g_signal_connect_after (event_box, "realize",
+ G_CALLBACK (event_box_realize_cb), icon);
+
+ if (action == GDK_ACTION_MOVE)
+ {
+ g_signal_connect (event_box, "drag_begin",
+ G_CALLBACK (drag_begin_cb), NULL);
+ g_signal_connect (event_box, "drag_end",
+ G_CALLBACK (drag_end_cb), NULL);
+ }
+
+ vbox = gtk_vbox_new (0, FALSE);
+ gtk_widget_show (vbox);
+ gtk_container_add (GTK_CONTAINER (event_box), vbox);
+
+ gtk_widget_show (GTK_WIDGET (icon));
+ gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (icon), FALSE, TRUE, 0);
+ label_no_mnemonic = elide_underscores (label_text);
+ label = gtk_label_new (label_no_mnemonic);
+ g_free (label_no_mnemonic);
+ gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
+
+ return event_box;
+}
+
+static void
+update_editor_sheet (EggToolbarEditor *editor)
+{
+ GList *l;
+ GList *to_drag;
+ int x, y, height, width;
+ GtkWidget *table;
+ GtkWidget *viewport;
+ GtkWidget *item;
+ GtkWidget *icon;
+
+ g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (editor));
+
+ viewport = GTK_BIN (editor->priv->scrolled_window)->child;
+ if (viewport)
+ {
+ table = GTK_BIN (viewport)->child;
+ gtk_container_remove (GTK_CONTAINER (viewport), table);
+ }
+ table = gtk_table_new (0, 0, TRUE);
+ editor->priv->table = table;
+ gtk_container_set_border_width (GTK_CONTAINER (table), 12);
+ gtk_widget_show (table);
+ gtk_scrolled_window_add_with_viewport
+ (GTK_SCROLLED_WINDOW (editor->priv->scrolled_window), table);
+ gtk_drag_dest_set (table, GTK_DEST_DEFAULT_ALL,
+ dest_drag_types, n_dest_drag_types, GDK_ACTION_MOVE);
+ g_signal_connect (table, "drag_data_received",
+ G_CALLBACK (editor_drag_data_received_cb), editor);
+
+ to_drag = editor->priv->actions_list;
+
+ x = y = 0;
+ width = 3;
+ height = (g_list_length (to_drag)) / width + 1;
+ gtk_table_resize (GTK_TABLE (editor->priv->table), height, width);
+
+ for (l = to_drag; l != NULL; l = l->next)
+ {
+ GtkAction *action = (l->data);
+ const char *stock_id, *short_label;
+ GValue value = { 0, };
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_object_get_property (G_OBJECT (action), "stock_id", &value);
+ stock_id = g_value_get_string (&value);
+ icon = gtk_image_new_from_stock
+ (stock_id ? stock_id : GTK_STOCK_DND,
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
+ g_value_unset (&value);
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_object_get_property (G_OBJECT (action), "short_label", &value);
+ short_label = g_value_get_string (&value);
+ item = editor_create_item (editor, GTK_IMAGE (icon),
+ short_label, GDK_ACTION_MOVE);
+ g_value_unset (&value);
+ g_object_set_data (G_OBJECT (item), "egg-action", action);
+ gtk_table_attach_defaults (GTK_TABLE (editor->priv->table),
+ item, x, x + 1, y, y + 1);
+
+ x++;
+ if (x >= width)
+ {
+ x = 0;
+ y++;
+ }
+ }
+
+ icon = _egg_editable_toolbar_new_separator_image ();
+ item = editor_create_item (editor, GTK_IMAGE (icon), _("Separator"),
+ GDK_ACTION_COPY);
+ gtk_table_attach_defaults (GTK_TABLE (editor->priv->table),
+ item, x, x + 1, y, y + 1);
+}
+
+static void
+setup_editor (EggToolbarEditor *editor)
+{
+ GtkWidget *scrolled_window;
+ GtkWidget *label_hbox;
+ GtkWidget *image;
+ GtkWidget *label;
+
+ g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (editor));
+
+ gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
+ scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ editor->priv->scrolled_window = scrolled_window;
+ gtk_widget_show (scrolled_window);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_box_pack_start (GTK_BOX (editor), scrolled_window, TRUE, TRUE, 0);
+ label_hbox = gtk_hbox_new (FALSE, 6);
+ gtk_widget_show (label_hbox);
+ gtk_box_pack_start (GTK_BOX (editor), label_hbox, FALSE, FALSE, 0);
+ image =
+ gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
+ gtk_widget_show (image);
+ gtk_box_pack_start (GTK_BOX (label_hbox), image, FALSE, FALSE, 0);
+ label = gtk_label_new (_("Drag an item onto the toolbars above to add it, "
+ "from the toolbars in the items table to remove it."));
+ gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+ gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (label_hbox), label, FALSE, TRUE, 0);
+}
+
+static void
+egg_toolbar_editor_init (EggToolbarEditor *t)
+{
+ t->priv = EGG_TOOLBAR_EDITOR_GET_PRIVATE (t);
+
+ t->priv->manager = NULL;
+ t->priv->default_actions_list = NULL;
+ t->priv->actions_list = NULL;
+
+ setup_editor (t);
+}
+
+void
+egg_toolbar_editor_add_action (EggToolbarEditor *editor,
+ const char *action_name)
+{
+ GtkAction *action;
+
+ action = find_action (editor, action_name);
+ g_return_if_fail (action != NULL);
+
+ editor->priv->default_actions_list = g_list_insert_sorted
+ (editor->priv->default_actions_list, action, compare_actions);
+}
+
+static void
+parse_item_list (EggToolbarEditor *t,
+ xmlNodePtr child)
+{
+ while (child)
+ {
+ if (xmlStrEqual (child->name, "toolitem"))
+ {
+ xmlChar *name;
+
+ name = xmlGetProp (child, "name");
+ egg_toolbar_editor_add_action (t, name);
+ xmlFree (name);
+ }
+ child = child->next;
+ }
+}
+
+static gboolean
+model_has_action (EggToolbarsModel *model, GtkAction *action)
+{
+ int i, l, n_items, n_toolbars;
+
+ n_toolbars = egg_toolbars_model_n_toolbars (model);
+ for (i = 0; i < n_toolbars; i++)
+ {
+ n_items = egg_toolbars_model_n_items (model, i);
+ for (l = 0; l < n_items; l++)
+ {
+ const char *name;
+ const char *action_name;
+ gboolean sep;
+
+ egg_toolbars_model_item_nth (model, i, l, &sep, &name, NULL);
+ action_name = gtk_action_get_name (action);
+ if (!sep && strcmp (name, action_name) == 0) return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static void
+update_actions_list (EggToolbarEditor *editor)
+{
+ GList *l;
+
+ if (editor->priv->actions_list)
+ g_list_free (editor->priv->actions_list);
+
+ /* Remove the already used items */
+ editor->priv->actions_list = NULL;
+
+ for (l = editor->priv->default_actions_list; l != NULL; l = l->next)
+ {
+ GtkAction *action = GTK_ACTION (l->data);
+
+ if (!model_has_action (editor->priv->model, action))
+ {
+ editor->priv->actions_list = g_list_insert_sorted
+ (editor->priv->actions_list, action, compare_actions);
+ }
+ }
+}
+
+void
+egg_toolbar_editor_load_actions (EggToolbarEditor *editor,
+ const char *xml_file)
+{
+ xmlDocPtr doc;
+ xmlNodePtr root;
+ xmlNodePtr child;
+
+ doc = xmlParseFile (xml_file);
+ root = xmlDocGetRootElement (doc);
+ child = root->children;
+
+ while (child)
+ {
+ if (xmlStrEqual (child->name, "available"))
+ {
+ parse_item_list (editor, child->children);
+ }
+ child = child->next;
+ }
+
+ xmlFreeDoc (doc);
+
+ update_actions_list (editor);
+ update_editor_sheet (editor);
+}
diff --git a/src/egg-toolbar-editor.h b/src/egg-toolbar-editor.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ * 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.
+ */
+
+#ifndef EGG_TOOLBAR_EDITOR_H
+#define EGG_TOOLBAR_EDITOR_H
+
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkuimanager.h>
+
+#include "egg-toolbars-model.h"
+
+G_BEGIN_DECLS
+
+typedef struct EggToolbarEditorClass EggToolbarEditorClass;
+
+#define EGG_TYPE_TOOLBAR_EDITOR (egg_toolbar_editor_get_type ())
+#define EGG_TOOLBAR_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditor))
+#define EGG_TOOLBAR_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorClass))
+#define EGG_IS_TOOLBAR_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TOOLBAR_EDITOR))
+#define EGG_IS_TOOLBAR_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TOOLBAR_EDITOR))
+#define EGG_TOOLBAR_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorClass))
+
+
+typedef struct EggToolbarEditor EggToolbarEditor;
+typedef struct EggToolbarEditorPrivate EggToolbarEditorPrivate;
+
+struct EggToolbarEditor
+{
+ GtkVBox parent_object;
+
+ /*< private >*/
+ EggToolbarEditorPrivate *priv;
+};
+
+struct EggToolbarEditorClass
+{
+ GtkVBoxClass parent_class;
+};
+
+
+GType egg_toolbar_editor_get_type (void);
+GtkWidget *egg_toolbar_editor_new (GtkUIManager *manager,
+ EggToolbarsModel *model);
+void egg_toolbar_editor_load_actions (EggToolbarEditor *editor,
+ const char *xml_file);
+
+void egg_toolbar_editor_add_action (EggToolbarEditor *editor,
+ const char *action_name);
+
+G_END_DECLS
+
+#endif
diff --git a/src/egg-toolbars-model.c b/src/egg-toolbars-model.c
@@ -0,0 +1,830 @@
+/*
+ * Copyright (C) 2002-2004 Marco Pesenti Gritti
+ * Copyright (C) 2004 Christian Persch
+ *
+ * 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.
+ *
+ * $Id: egg-toolbars-model.c,v 1.1 2005/02/10 17:08:30 jylefort Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "egg-toolbars-model.h"
+#include "eggmarshalers.h"
+
+#include <unistd.h>
+#include <string.h>
+#include <libxml/tree.h>
+#include <gdk/gdkproperty.h>
+
+static void egg_toolbars_model_class_init (EggToolbarsModelClass *klass);
+static void egg_toolbars_model_init (EggToolbarsModel *t);
+static void egg_toolbars_model_finalize (GObject *object);
+
+enum
+{
+ ITEM_ADDED,
+ ITEM_REMOVED,
+ TOOLBAR_ADDED,
+ TOOLBAR_CHANGED,
+ TOOLBAR_REMOVED,
+ GET_ITEM_TYPE,
+ GET_ITEM_ID,
+ GET_ITEM_DATA,
+ LAST_SIGNAL
+};
+
+typedef struct
+{
+ char *name;
+ EggTbModelFlags flags;
+} EggToolbarsToolbar;
+
+typedef struct
+{
+ char *id;
+ char *type;
+ gboolean separator;
+} EggToolbarsItem;
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+static GObjectClass *parent_class = NULL;
+
+#define EGG_TOOLBARS_MODEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelPrivate))
+
+struct EggToolbarsModelPrivate
+{
+ GNode *toolbars;
+};
+
+GType
+egg_toolbars_model_get_type (void)
+{
+ static GType type = 0;
+
+ if (type == 0)
+ {
+ static const GTypeInfo our_info = {
+ sizeof (EggToolbarsModelClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) egg_toolbars_model_class_init,
+ NULL,
+ NULL, /* class_data */
+ sizeof (EggToolbarsModel),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) egg_toolbars_model_init
+ };
+
+ type = g_type_register_static (G_TYPE_OBJECT,
+ "EggToolbarsModel",
+ &our_info, 0);
+ }
+
+ return type;
+}
+
+static xmlDocPtr
+egg_toolbars_model_to_xml (EggToolbarsModel *t)
+{
+ GNode *l1, *l2, *tl;
+ xmlDocPtr doc;
+
+ g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (t), NULL);
+
+ tl = t->priv->toolbars;
+
+ xmlIndentTreeOutput = TRUE;
+ doc = xmlNewDoc ("1.0");
+ doc->children = xmlNewDocNode (doc, NULL, "toolbars", NULL);
+
+ for (l1 = tl->children; l1 != NULL; l1 = l1->next)
+ {
+ xmlNodePtr tnode;
+ EggToolbarsToolbar *toolbar = l1->data;
+
+ tnode = xmlNewChild (doc->children, NULL, "toolbar", NULL);
+ xmlSetProp (tnode, "name", toolbar->name);
+
+ for (l2 = l1->children; l2 != NULL; l2 = l2->next)
+ {
+ xmlNodePtr node;
+ EggToolbarsItem *item = l2->data;
+
+ if (item->separator)
+ {
+ node = xmlNewChild (tnode, NULL, "separator", NULL);
+ }
+ else
+ {
+ char *data;
+
+ node = xmlNewChild (tnode, NULL, "toolitem", NULL);
+ data = egg_toolbars_model_get_item_data (t, item->type, item->id);
+ xmlSetProp (node, "type", item->type);
+ xmlSetProp (node, "name", data);
+ g_free (data);
+ }
+ }
+ }
+
+ return doc;
+}
+
+static gboolean
+safe_save_xml (const char *xml_file, xmlDocPtr doc)
+{
+ char *tmp_file;
+ char *old_file;
+ gboolean old_exist;
+ gboolean retval = TRUE;
+
+ tmp_file = g_strconcat (xml_file, ".tmp", NULL);
+ old_file = g_strconcat (xml_file, ".old", NULL);
+
+ if (xmlSaveFormatFile (tmp_file, doc, 1) <= 0)
+ {
+ g_warning ("Failed to write XML data to %s", tmp_file);
+ goto failed;
+ }
+
+ old_exist = g_file_test (xml_file, G_FILE_TEST_EXISTS);
+
+ if (old_exist)
+ {
+ if (rename (xml_file, old_file) < 0)
+ {
+ g_warning ("Failed to rename %s to %s", xml_file, old_file);
+ retval = FALSE;
+ goto failed;
+ }
+ }
+
+ if (rename (tmp_file, xml_file) < 0)
+ {
+ g_warning ("Failed to rename %s to %s", tmp_file, xml_file);
+
+ if (rename (old_file, xml_file) < 0)
+ {
+ g_warning ("Failed to restore %s from %s", xml_file, tmp_file);
+ }
+ retval = FALSE;
+ goto failed;
+ }
+
+ if (old_exist)
+ {
+ if (unlink (old_file) < 0)
+ {
+ g_warning ("Failed to delete old file %s", old_file);
+ }
+ }
+
+ failed:
+ g_free (old_file);
+ g_free (tmp_file);
+
+ return retval;
+}
+
+void
+egg_toolbars_model_save (EggToolbarsModel *t,
+ const char *xml_file,
+ const char *version)
+{
+ xmlDocPtr doc;
+ xmlNodePtr root;
+
+ g_return_if_fail (EGG_IS_TOOLBARS_MODEL (t));
+
+ doc = egg_toolbars_model_to_xml (t);
+ root = xmlDocGetRootElement (doc);
+ xmlSetProp (root, "version", version);
+ safe_save_xml (xml_file, doc);
+ xmlFreeDoc (doc);
+}
+
+static EggToolbarsToolbar *
+toolbars_toolbar_new (const char *name)
+{
+ EggToolbarsToolbar *toolbar;
+
+ toolbar = g_new (EggToolbarsToolbar, 1);
+ toolbar->name = g_strdup (name);
+ toolbar->flags = 0;
+
+ return toolbar;
+}
+
+static EggToolbarsItem *
+toolbars_item_new (const char *id,
+ const char *type,
+ gboolean separator)
+{
+ EggToolbarsItem *item;
+
+ g_return_val_if_fail (id != NULL, NULL);
+ g_return_val_if_fail (type != NULL, NULL);
+
+ item = g_new (EggToolbarsItem, 1);
+ item->id = g_strdup (id);
+ item->type = g_strdup (type);
+ item->separator = separator;
+
+ return item;
+}
+
+static void
+free_toolbar_node (GNode *toolbar_node)
+{
+ EggToolbarsToolbar *toolbar = toolbar_node->data;
+
+ g_free (toolbar->name);
+ g_free (toolbar);
+
+ g_node_destroy (toolbar_node);
+}
+
+static void
+free_item_node (GNode *item_node)
+{
+ EggToolbarsItem *item = item_node->data;
+
+ g_free (item->id);
+ g_free (item->type);
+ g_free (item);
+
+ g_node_destroy (item_node);
+}
+
+EggTbModelFlags
+egg_toolbars_model_get_flags (EggToolbarsModel *t,
+ int toolbar_position)
+{
+ GNode *toolbar_node;
+ EggToolbarsToolbar *toolbar;
+
+ toolbar_node = g_node_nth_child (t->priv->toolbars, toolbar_position);
+ g_return_val_if_fail (toolbar_node != NULL, 0);
+
+ toolbar = toolbar_node->data;
+
+ return toolbar->flags;
+}
+
+void
+egg_toolbars_model_set_flags (EggToolbarsModel *t,
+ int toolbar_position,
+ EggTbModelFlags flags)
+{
+ GNode *toolbar_node;
+ EggToolbarsToolbar *toolbar;
+
+ toolbar_node = g_node_nth_child (t->priv->toolbars, toolbar_position);
+ g_return_if_fail (toolbar_node != NULL);
+
+ toolbar = toolbar_node->data;
+
+ toolbar->flags = flags;
+
+ g_signal_emit (G_OBJECT (t), signals[TOOLBAR_CHANGED],
+ 0, toolbar_position);
+}
+
+void
+egg_toolbars_model_add_separator (EggToolbarsModel *t,
+ int toolbar_position,
+ int position)
+{
+ GNode *parent_node;
+ GNode *node;
+ EggToolbarsItem *item;
+ int real_position;
+
+ g_return_if_fail (EGG_IS_TOOLBARS_MODEL (t));
+
+ parent_node = g_node_nth_child (t->priv->toolbars, toolbar_position);
+ item = toolbars_item_new ("separator", EGG_TOOLBAR_ITEM_TYPE, TRUE);
+ node = g_node_new (item);
+ g_node_insert (parent_node, position, node);
+
+ real_position = g_node_child_position (parent_node, node);
+
+ g_signal_emit (G_OBJECT (t), signals[ITEM_ADDED], 0,
+ toolbar_position, real_position);
+}
+
+static gboolean
+impl_add_item (EggToolbarsModel *t,
+ int toolbar_position,
+ int position,
+ const char *id,
+ const char *type)
+{
+ GNode *parent_node;
+ GNode *node;
+ EggToolbarsItem *item;
+ int real_position;
+
+ g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (t), FALSE);
+ g_return_val_if_fail (id != NULL, FALSE);
+ g_return_val_if_fail (type != NULL, FALSE);
+
+ parent_node = g_node_nth_child (t->priv->toolbars, toolbar_position);
+ item = toolbars_item_new (id, type, FALSE);
+ node = g_node_new (item);
+ g_node_insert (parent_node, position, node);
+
+ real_position = g_node_child_position (parent_node, node);
+
+ g_signal_emit (G_OBJECT (t), signals[ITEM_ADDED], 0,
+ toolbar_position, real_position);
+
+ return TRUE;
+}
+
+static void
+parse_item_list (EggToolbarsModel *t,
+ xmlNodePtr child,
+ int position)
+{
+ while (child)
+ {
+ if (xmlStrEqual (child->name, "toolitem"))
+ {
+ xmlChar *name, *type;
+ char *id;
+
+ name = xmlGetProp (child, "name");
+ type = xmlGetProp (child, "type");
+ if (type == NULL)
+ {
+ type = xmlStrdup (EGG_TOOLBAR_ITEM_TYPE);
+ }
+
+ if (name != NULL && name[0] != '\0' && type != NULL)
+ {
+ id = egg_toolbars_model_get_item_id (t, type, name);
+ if (id != NULL)
+ {
+ egg_toolbars_model_add_item (t, position, -1, id, type);
+ }
+ g_free (id);
+ }
+ xmlFree (name);
+ xmlFree (type);
+ }
+ else if (xmlStrEqual (child->name, "separator"))
+ {
+ egg_toolbars_model_add_separator (t, position, -1);
+ }
+
+ child = child->next;
+ }
+}
+
+int
+egg_toolbars_model_add_toolbar (EggToolbarsModel *t,
+ int position,
+ const char *name)
+{
+ GNode *node;
+ int real_position;
+
+ g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (t), -1);
+
+ node = g_node_new (toolbars_toolbar_new (name));
+ g_node_insert (t->priv->toolbars, position, node);
+
+ real_position = g_node_child_position (t->priv->toolbars, node);
+
+ g_signal_emit (G_OBJECT (t), signals[TOOLBAR_ADDED],
+ 0, real_position);
+
+ return g_node_child_position (t->priv->toolbars, node);
+}
+
+static void
+parse_toolbars (EggToolbarsModel *t,
+ xmlNodePtr child)
+{
+ while (child)
+ {
+ if (xmlStrEqual (child->name, "toolbar"))
+ {
+ xmlChar *name;
+ xmlChar *style;
+ int position;
+
+ name = xmlGetProp (child, "name");
+ position = egg_toolbars_model_add_toolbar (t, -1, name);
+ xmlFree (name);
+
+ style = xmlGetProp (child, "style");
+ if (style && xmlStrEqual (style, "icons-only"))
+ {
+ /* FIXME: use toolbar position instead of 0 */
+ egg_toolbars_model_set_flags (t, 0, EGG_TB_MODEL_ICONS_ONLY);
+ }
+ xmlFree (style);
+
+ parse_item_list (t, child->children, position);
+ }
+
+ child = child->next;
+ }
+}
+
+gboolean
+egg_toolbars_model_load (EggToolbarsModel *t,
+ const char *xml_file)
+{
+ xmlDocPtr doc;
+ xmlNodePtr root;
+
+ g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (t), FALSE);
+
+ if (!xml_file || !g_file_test (xml_file, G_FILE_TEST_EXISTS)) return FALSE;
+
+ doc = xmlParseFile (xml_file);
+ if (doc == NULL)
+ {
+ g_warning ("Failed to load XML data from %s", xml_file);
+ return FALSE;
+ }
+ root = xmlDocGetRootElement (doc);
+
+ parse_toolbars (t, root->children);
+
+ xmlFreeDoc (doc);
+
+ return TRUE;
+}
+
+static char *
+impl_get_item_id (EggToolbarsModel *t,
+ const char *type,
+ const char *data)
+{
+ if (strcmp (type, EGG_TOOLBAR_ITEM_TYPE) == 0)
+ {
+ return g_strdup (data);
+ }
+
+ return NULL;
+}
+
+static char *
+impl_get_item_data (EggToolbarsModel *t,
+ const char *type,
+ const char *id)
+{
+ if (strcmp (type, EGG_TOOLBAR_ITEM_TYPE) == 0)
+ {
+ return g_strdup (id);
+ }
+
+ return NULL;
+}
+
+static char *
+impl_get_item_type (EggToolbarsModel *t,
+ GdkAtom type)
+{
+ if (gdk_atom_intern (EGG_TOOLBAR_ITEM_TYPE, FALSE) == type)
+ {
+ return g_strdup (EGG_TOOLBAR_ITEM_TYPE);
+ }
+
+ return NULL;
+}
+
+static gboolean
+_egg_accumulator_STRING (GSignalInvocationHint *ihint,
+ GValue *return_accu,
+ const GValue *handler_return,
+ gpointer dummy)
+{
+ gboolean continue_emission;
+ const char *retval;
+
+ retval = g_value_get_string (handler_return);
+ g_value_set_string (return_accu, retval);
+ continue_emission = !retval || !retval[0];
+
+ return continue_emission;
+}
+
+
+static void
+egg_toolbars_model_class_init (EggToolbarsModelClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ object_class->finalize = egg_toolbars_model_finalize;
+
+ klass->add_item = impl_add_item;
+ klass->get_item_id = impl_get_item_id;
+ klass->get_item_data = impl_get_item_data;
+ klass->get_item_type = impl_get_item_type;
+
+ signals[ITEM_ADDED] =
+ g_signal_new ("item_added",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggToolbarsModelClass, item_added),
+ NULL, NULL, _egg_marshal_VOID__INT_INT,
+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
+ signals[TOOLBAR_ADDED] =
+ g_signal_new ("toolbar_added",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggToolbarsModelClass, toolbar_added),
+ NULL, NULL, g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
+ signals[ITEM_REMOVED] =
+ g_signal_new ("item_removed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggToolbarsModelClass, item_removed),
+ NULL, NULL, _egg_marshal_VOID__INT_INT,
+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
+ signals[TOOLBAR_REMOVED] =
+ g_signal_new ("toolbar_removed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggToolbarsModelClass, toolbar_removed),
+ NULL, NULL, g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
+ signals[TOOLBAR_CHANGED] =
+ g_signal_new ("toolbar_changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggToolbarsModelClass, toolbar_changed),
+ NULL, NULL, g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
+ signals[GET_ITEM_TYPE] =
+ g_signal_new ("get_item_type",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggToolbarsModelClass, get_item_type),
+ _egg_accumulator_STRING, NULL,
+ _egg_marshal_STRING__POINTER,
+ G_TYPE_STRING, 1, G_TYPE_POINTER);
+ signals[GET_ITEM_ID] =
+ g_signal_new ("get_item_id",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggToolbarsModelClass, get_item_id),
+ _egg_accumulator_STRING, NULL,
+ _egg_marshal_STRING__STRING_STRING,
+ G_TYPE_STRING, 2, G_TYPE_STRING, G_TYPE_STRING);
+ signals[GET_ITEM_DATA] =
+ g_signal_new ("get_item_data",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggToolbarsModelClass, get_item_data),
+ _egg_accumulator_STRING, NULL,
+ _egg_marshal_STRING__STRING_STRING,
+ G_TYPE_STRING, 2, G_TYPE_STRING, G_TYPE_STRING);
+
+ g_type_class_add_private (object_class, sizeof (EggToolbarsModelPrivate));
+}
+
+static void
+egg_toolbars_model_init (EggToolbarsModel *t)
+{
+ t->priv =EGG_TOOLBARS_MODEL_GET_PRIVATE (t);
+
+ t->priv->toolbars = g_node_new (NULL);
+}
+
+static void
+free_toolbar (GNode *toolbar_node)
+{
+ g_node_children_foreach (toolbar_node, G_TRAVERSE_ALL,
+ (GNodeForeachFunc) free_item_node, NULL);
+ free_toolbar_node (toolbar_node);
+}
+
+static void
+egg_toolbars_model_finalize (GObject *object)
+{
+ EggToolbarsModel *t = EGG_TOOLBARS_MODEL (object);
+
+ g_node_children_foreach (t->priv->toolbars, G_TRAVERSE_ALL,
+ (GNodeForeachFunc) free_toolbar, NULL);
+ g_node_destroy (t->priv->toolbars);
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+EggToolbarsModel *
+egg_toolbars_model_new (void)
+{
+ return EGG_TOOLBARS_MODEL (g_object_new (EGG_TYPE_TOOLBARS_MODEL, NULL));
+}
+
+void
+egg_toolbars_model_remove_toolbar (EggToolbarsModel *t,
+ int position)
+{
+ GNode *node;
+ EggTbModelFlags flags;
+
+ g_return_if_fail (EGG_IS_TOOLBARS_MODEL (t));
+
+ flags = egg_toolbars_model_get_flags (t, position);
+
+ if (!(flags & EGG_TB_MODEL_NOT_REMOVABLE))
+ {
+ node = g_node_nth_child (t->priv->toolbars, position);
+ g_return_if_fail (node != NULL);
+
+ free_toolbar_node (node);
+
+ g_signal_emit (G_OBJECT (t), signals[TOOLBAR_REMOVED],
+ 0, position);
+ }
+}
+
+void
+egg_toolbars_model_remove_item (EggToolbarsModel *t,
+ int toolbar_position,
+ int position)
+{
+ GNode *node, *toolbar;
+
+ g_return_if_fail (EGG_IS_TOOLBARS_MODEL (t));
+
+ toolbar = g_node_nth_child (t->priv->toolbars, toolbar_position);
+ g_return_if_fail (toolbar != NULL);
+
+ node = g_node_nth_child (toolbar, position);
+ g_return_if_fail (node != NULL);
+
+ free_item_node (node);
+
+ g_signal_emit (G_OBJECT (t), signals[ITEM_REMOVED], 0,
+ toolbar_position, position);
+}
+
+void
+egg_toolbars_model_move_item (EggToolbarsModel *t,
+ int toolbar_position,
+ int position,
+ int new_toolbar_position,
+ int new_position)
+{
+ GNode *node, *toolbar, *new_toolbar;
+
+ g_return_if_fail (EGG_IS_TOOLBARS_MODEL (t));
+
+ toolbar = g_node_nth_child (t->priv->toolbars, toolbar_position);
+ g_return_if_fail (toolbar != NULL);
+
+ new_toolbar = g_node_nth_child (t->priv->toolbars, new_toolbar_position);
+ g_return_if_fail (new_toolbar != NULL);
+
+ node = g_node_nth_child (toolbar, position);
+ g_return_if_fail (node != NULL);
+
+ g_node_unlink (node);
+
+ g_signal_emit (G_OBJECT (t), signals[ITEM_REMOVED], 0,
+ toolbar_position, position);
+
+ g_node_insert (new_toolbar, new_position, node);
+
+ g_signal_emit (G_OBJECT (t), signals[ITEM_ADDED], 0,
+ new_toolbar_position, new_position);
+}
+
+int
+egg_toolbars_model_n_items (EggToolbarsModel *t,
+ int toolbar_position)
+{
+ GNode *toolbar;
+
+ toolbar = g_node_nth_child (t->priv->toolbars, toolbar_position);
+ g_return_val_if_fail (toolbar != NULL, -1);
+
+ return g_node_n_children (toolbar);
+}
+
+void
+egg_toolbars_model_item_nth (EggToolbarsModel *t,
+ int toolbar_position,
+ int position,
+ gboolean *is_separator,
+ const char **id,
+ const char **type)
+{
+ GNode *toolbar;
+ GNode *item;
+ EggToolbarsItem *idata;
+
+ toolbar = g_node_nth_child (t->priv->toolbars, toolbar_position);
+ g_return_if_fail (toolbar != NULL);
+
+ item = g_node_nth_child (toolbar, position);
+ g_return_if_fail (item != NULL);
+
+ idata = item->data;
+
+ *is_separator = idata->separator;
+
+ if (id)
+ {
+ *id = idata->id;
+ }
+
+ if (type)
+ {
+ *type = idata->type;
+ }
+}
+
+int
+egg_toolbars_model_n_toolbars (EggToolbarsModel *t)
+{
+ return g_node_n_children (t->priv->toolbars);
+}
+
+const char *
+egg_toolbars_model_toolbar_nth (EggToolbarsModel *t,
+ int position)
+{
+ GNode *toolbar;
+ EggToolbarsToolbar *tdata;
+
+ toolbar = g_node_nth_child (t->priv->toolbars, position);
+ g_return_val_if_fail (toolbar != NULL, NULL);
+
+ tdata = toolbar->data;
+
+ return tdata->name;
+}
+
+gboolean
+egg_toolbars_model_add_item (EggToolbarsModel *t,
+ int toolbar_position,
+ int position,
+ const char *id,
+ const char *type)
+{
+ EggToolbarsModelClass *klass = EGG_TOOLBARS_MODEL_GET_CLASS (t);
+ return klass->add_item (t, toolbar_position, position, id, type);
+}
+
+char *
+egg_toolbars_model_get_item_id (EggToolbarsModel *t,
+ const char *type,
+ const char *name)
+{
+ char *retval;
+
+ g_signal_emit (t, signals[GET_ITEM_ID], 0, type, name, &retval);
+
+ return retval;
+}
+
+char *
+egg_toolbars_model_get_item_data (EggToolbarsModel *t,
+ const char *type,
+ const char *id)
+{
+ char *retval;
+
+ g_signal_emit (t, signals[GET_ITEM_DATA], 0, type, id, &retval);
+
+ return retval;
+}
+
+char *
+egg_toolbars_model_get_item_type (EggToolbarsModel *t,
+ GdkAtom type)
+{
+ char *retval;
+
+ g_signal_emit (t, signals[GET_ITEM_TYPE], 0, type, &retval);
+
+ return retval;
+}
diff --git a/src/egg-toolbars-model.h b/src/egg-toolbars-model.h
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2003-2004 Marco Pesenti Gritti
+ *
+ * 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.
+ */
+
+#ifndef EGG_TOOLBARS_MODEL_H
+#define EGG_TOOLBARS_MODEL_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gdk/gdktypes.h>
+
+G_BEGIN_DECLS
+
+
+#define EGG_TYPE_TOOLBARS_MODEL (egg_toolbars_model_get_type ())
+#define EGG_TOOLBARS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModel))
+#define EGG_TOOLBARS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelClass))
+#define EGG_IS_TOOLBARS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TOOLBARS_MODEL))
+#define EGG_IS_TOOLBARS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TOOLBARS_MODEL))
+#define EGG_TOOLBARS_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelClass))
+
+typedef struct EggToolbarsModel EggToolbarsModel;
+typedef struct EggToolbarsModelPrivate EggToolbarsModelPrivate;
+typedef struct EggToolbarsModelClass EggToolbarsModelClass;
+
+#define EGG_TOOLBAR_ITEM_TYPE "application/x-toolbar-item"
+
+typedef enum
+{
+ EGG_TB_MODEL_NOT_REMOVABLE = 1 << 0,
+ EGG_TB_MODEL_ICONS_ONLY = 1 << 1,
+ EGG_TB_MODEL_TEXT_ONLY = 1 << 2,
+ EGG_TB_MODEL_ICONS_TEXT = 1 << 3,
+ EGG_TB_MODEL_ICONS_TEXT_HORIZ = 1 << 4,
+ EGG_TB_MODEL_ACCEPT_ITEMS_ONLY = 1 << 5
+} EggTbModelFlags;
+
+struct EggToolbarsModel
+{
+ GObject parent_object;
+
+ /*< private >*/
+ EggToolbarsModelPrivate *priv;
+};
+
+struct EggToolbarsModelClass
+{
+ GObjectClass parent_class;
+
+ /* Signals */
+ void (* item_added) (EggToolbarsModel *model,
+ int toolbar_position,
+ int position);
+ void (* item_removed) (EggToolbarsModel *model,
+ int toolbar_position,
+ int position);
+ void (* toolbar_added) (EggToolbarsModel *model,
+ int position);
+ void (* toolbar_changed) (EggToolbarsModel *model,
+ int position);
+ void (* toolbar_removed) (EggToolbarsModel *model,
+ int position);
+ char * (* get_item_type) (EggToolbarsModel *model,
+ GdkAtom dnd_type);
+ char * (* get_item_id) (EggToolbarsModel *model,
+ const char *type,
+ const char *data);
+ char * (* get_item_data) (EggToolbarsModel *model,
+ const char *type,
+ const char *id);
+
+ /* Virtual Table */
+ gboolean (* add_item) (EggToolbarsModel *t,
+ int toolbar_position,
+ int position,
+ const char *id,
+ const char *type);
+};
+
+GType egg_toolbars_model_get_type (void);
+EggToolbarsModel *egg_toolbars_model_new (void);
+gboolean egg_toolbars_model_load (EggToolbarsModel *model,
+ const char *xml_file);
+void egg_toolbars_model_save (EggToolbarsModel *model,
+ const char *xml_file,
+ const char *version);
+int egg_toolbars_model_add_toolbar (EggToolbarsModel *model,
+ int position,
+ const char *name);
+EggTbModelFlags egg_toolbars_model_get_flags (EggToolbarsModel *model,
+ int toolbar_position);
+void egg_toolbars_model_set_flags (EggToolbarsModel *model,
+ int toolbar_position,
+ EggTbModelFlags flags);
+void egg_toolbars_model_add_separator (EggToolbarsModel *model,
+ int toolbar_position,
+ int position);
+char *egg_toolbars_model_get_item_type (EggToolbarsModel *model,
+ GdkAtom dnd_type);
+char *egg_toolbars_model_get_item_id (EggToolbarsModel *model,
+ const char *type,
+ const char *name);
+char *egg_toolbars_model_get_item_data (EggToolbarsModel *model,
+ const char *type,
+ const char *id);
+gboolean egg_toolbars_model_add_item (EggToolbarsModel *model,
+ int toolbar_position,
+ int position,
+ const char *id,
+ const char *type);
+void egg_toolbars_model_remove_toolbar (EggToolbarsModel *model,
+ int position);
+void egg_toolbars_model_remove_item (EggToolbarsModel *model,
+ int toolbar_position,
+ int position);
+void egg_toolbars_model_move_item (EggToolbarsModel *model,
+ int toolbar_position,
+ int position,
+ int new_toolbar_position,
+ int new_position);
+int egg_toolbars_model_n_items (EggToolbarsModel *model,
+ int toolbar_position);
+void egg_toolbars_model_item_nth (EggToolbarsModel *model,
+ int toolbar_position,
+ int position,
+ gboolean *is_separator,
+ const char **id,
+ const char **type);
+int egg_toolbars_model_n_toolbars (EggToolbarsModel *model);
+const char *egg_toolbars_model_toolbar_nth (EggToolbarsModel *model,
+ int position);
+
+G_END_DECLS
+
+#endif
diff --git a/src/eggmarshalers.c b/src/eggmarshalers.c
@@ -0,0 +1,679 @@
+
+#include <glib-object.h>
+
+
+#ifdef G_ENABLE_DEBUG
+#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
+#define g_marshal_value_peek_char(v) g_value_get_char (v)
+#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
+#define g_marshal_value_peek_int(v) g_value_get_int (v)
+#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
+#define g_marshal_value_peek_long(v) g_value_get_long (v)
+#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
+#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
+#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
+#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
+#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
+#define g_marshal_value_peek_float(v) g_value_get_float (v)
+#define g_marshal_value_peek_double(v) g_value_get_double (v)
+#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
+#define g_marshal_value_peek_param(v) g_value_get_param (v)
+#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
+#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
+#define g_marshal_value_peek_object(v) g_value_get_object (v)
+#else /* !G_ENABLE_DEBUG */
+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
+ * Do not access GValues directly in your code. Instead, use the
+ * g_value_get_*() functions
+ */
+#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
+#define g_marshal_value_peek_char(v) (v)->data[0].v_int
+#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
+#define g_marshal_value_peek_int(v) (v)->data[0].v_int
+#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
+#define g_marshal_value_peek_long(v) (v)->data[0].v_long
+#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
+#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
+#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
+#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
+#define g_marshal_value_peek_float(v) (v)->data[0].v_float
+#define g_marshal_value_peek_double(v) (v)->data[0].v_double
+#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
+#endif /* !G_ENABLE_DEBUG */
+
+
+/* VOID:OBJECT,OBJECT (eggmarshalers.list:1) */
+void
+_egg_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_OBJECT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_object (param_values + 2),
+ data2);
+}
+
+/* VOID:OBJECT,STRING,LONG,LONG (eggmarshalers.list:2) */
+void
+_egg_marshal_VOID__OBJECT_STRING_LONG_LONG (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ glong arg_3,
+ glong arg_4,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 5);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ g_marshal_value_peek_long (param_values + 3),
+ g_marshal_value_peek_long (param_values + 4),
+ data2);
+}
+
+/* VOID:OBJECT,LONG (eggmarshalers.list:3) */
+void
+_egg_marshal_VOID__OBJECT_LONG (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_LONG) (gpointer data1,
+ gpointer arg_1,
+ glong arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_LONG callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_LONG) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_long (param_values + 2),
+ data2);
+}
+
+/* VOID:OBJECT,STRING,STRING (eggmarshalers.list:4) */
+void
+_egg_marshal_VOID__OBJECT_STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_STRING_STRING) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_STRING_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ g_marshal_value_peek_string (param_values + 3),
+ data2);
+}
+
+/* VOID:UINT,UINT (eggmarshalers.list:5) */
+void
+_egg_marshal_VOID__UINT_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1,
+ guint arg_1,
+ guint arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__UINT_UINT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_uint (param_values + 1),
+ g_marshal_value_peek_uint (param_values + 2),
+ data2);
+}
+
+/* BOOLEAN:INT (eggmarshalers.list:6) */
+void
+_egg_marshal_BOOLEAN__INT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__INT) (gpointer data1,
+ gint arg_1,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__INT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 2);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__INT) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_int (param_values + 1),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:ENUM (eggmarshalers.list:7) */
+void
+_egg_marshal_BOOLEAN__ENUM (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__ENUM) (gpointer data1,
+ gint arg_1,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__ENUM callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 2);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__ENUM) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_enum (param_values + 1),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:VOID (eggmarshalers.list:8) */
+void
+_egg_marshal_BOOLEAN__VOID (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__VOID callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 1);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* OBJECT:VOID (eggmarshalers.list:9) */
+void
+_egg_marshal_OBJECT__VOID (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef GObject* (*GMarshalFunc_OBJECT__VOID) (gpointer data1,
+ gpointer data2);
+ register GMarshalFunc_OBJECT__VOID callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ GObject* v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 1);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_OBJECT__VOID) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ data2);
+
+ g_value_take_object (return_value, v_return);
+}
+
+/* VOID:VOID (eggmarshalers.list:10) */
+
+/* VOID:INT,INT (eggmarshalers.list:11) */
+void
+_egg_marshal_VOID__INT_INT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__INT_INT) (gpointer data1,
+ gint arg_1,
+ gint arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__INT_INT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_int (param_values + 1),
+ g_marshal_value_peek_int (param_values + 2),
+ data2);
+}
+
+/* VOID:UINT,UINT (eggmarshalers.list:12) */
+
+/* VOID:BOOLEAN (eggmarshalers.list:13) */
+
+/* VOID:OBJECT,ENUM,BOXED (eggmarshalers.list:14) */
+void
+_egg_marshal_VOID__OBJECT_ENUM_BOXED (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_ENUM_BOXED) (gpointer data1,
+ gpointer arg_1,
+ gint arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_ENUM_BOXED callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_ENUM_BOXED) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_enum (param_values + 2),
+ g_marshal_value_peek_boxed (param_values + 3),
+ data2);
+}
+
+/* VOID:BOXED (eggmarshalers.list:15) */
+
+/* BOOLEAN:BOOLEAN (eggmarshalers.list:16) */
+void
+_egg_marshal_BOOLEAN__BOOLEAN (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN) (gpointer data1,
+ gboolean arg_1,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__BOOLEAN callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 2);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__BOOLEAN) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_boolean (param_values + 1),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:OBJECT,STRING,STRING (eggmarshalers.list:17) */
+void
+_egg_marshal_BOOLEAN__OBJECT_STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_STRING_STRING) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__OBJECT_STRING_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__OBJECT_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ g_marshal_value_peek_string (param_values + 3),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:ENUM,INT (eggmarshalers.list:18) */
+void
+_egg_marshal_BOOLEAN__ENUM_INT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__ENUM_INT) (gpointer data1,
+ gint arg_1,
+ gint arg_2,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__ENUM_INT callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__ENUM_INT) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_enum (param_values + 1),
+ g_marshal_value_peek_int (param_values + 2),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* STRING:POINTER (eggmarshalers.list:19) */
+void
+_egg_marshal_STRING__POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef gchar* (*GMarshalFunc_STRING__POINTER) (gpointer data1,
+ gpointer arg_1,
+ gpointer data2);
+ register GMarshalFunc_STRING__POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gchar* v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 2);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_STRING__POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_pointer (param_values + 1),
+ data2);
+
+ g_value_take_string (return_value, v_return);
+}
+
+/* STRING:STRING,STRING (eggmarshalers.list:20) */
+void
+_egg_marshal_STRING__STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ typedef gchar* (*GMarshalFunc_STRING__STRING_STRING) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_STRING__STRING_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gchar* v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_STRING__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ data2);
+
+ g_value_take_string (return_value, v_return);
+}
+
diff --git a/src/eggmarshalers.h b/src/eggmarshalers.h
@@ -0,0 +1,151 @@
+
+#ifndef ___egg_marshal_MARSHAL_H__
+#define ___egg_marshal_MARSHAL_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* VOID:OBJECT,OBJECT (eggmarshalers.list:1) */
+extern void _egg_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:OBJECT,STRING,LONG,LONG (eggmarshalers.list:2) */
+extern void _egg_marshal_VOID__OBJECT_STRING_LONG_LONG (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:OBJECT,LONG (eggmarshalers.list:3) */
+extern void _egg_marshal_VOID__OBJECT_LONG (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:OBJECT,STRING,STRING (eggmarshalers.list:4) */
+extern void _egg_marshal_VOID__OBJECT_STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:UINT,UINT (eggmarshalers.list:5) */
+extern void _egg_marshal_VOID__UINT_UINT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* BOOLEAN:INT (eggmarshalers.list:6) */
+extern void _egg_marshal_BOOLEAN__INT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* BOOLEAN:ENUM (eggmarshalers.list:7) */
+extern void _egg_marshal_BOOLEAN__ENUM (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* BOOLEAN:VOID (eggmarshalers.list:8) */
+extern void _egg_marshal_BOOLEAN__VOID (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* OBJECT:VOID (eggmarshalers.list:9) */
+extern void _egg_marshal_OBJECT__VOID (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:VOID (eggmarshalers.list:10) */
+#define _egg_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID
+
+/* VOID:INT,INT (eggmarshalers.list:11) */
+extern void _egg_marshal_VOID__INT_INT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:UINT,UINT (eggmarshalers.list:12) */
+
+/* VOID:BOOLEAN (eggmarshalers.list:13) */
+#define _egg_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN
+
+/* VOID:OBJECT,ENUM,BOXED (eggmarshalers.list:14) */
+extern void _egg_marshal_VOID__OBJECT_ENUM_BOXED (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:BOXED (eggmarshalers.list:15) */
+#define _egg_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED
+
+/* BOOLEAN:BOOLEAN (eggmarshalers.list:16) */
+extern void _egg_marshal_BOOLEAN__BOOLEAN (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* BOOLEAN:OBJECT,STRING,STRING (eggmarshalers.list:17) */
+extern void _egg_marshal_BOOLEAN__OBJECT_STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* BOOLEAN:ENUM,INT (eggmarshalers.list:18) */
+extern void _egg_marshal_BOOLEAN__ENUM_INT (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* STRING:POINTER (eggmarshalers.list:19) */
+extern void _egg_marshal_STRING__POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* STRING:STRING,STRING (eggmarshalers.list:20) */
+extern void _egg_marshal_STRING__STRING_STRING (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+G_END_DECLS
+
+#endif /* ___egg_marshal_MARSHAL_H__ */
+
diff --git a/src/eggmarshalers.list b/src/eggmarshalers.list
@@ -0,0 +1,20 @@
+VOID:OBJECT,OBJECT
+VOID:OBJECT,STRING,LONG,LONG
+VOID:OBJECT,LONG
+VOID:OBJECT,STRING,STRING
+VOID:UINT,UINT
+BOOLEAN:INT
+BOOLEAN:ENUM
+BOOLEAN:VOID
+OBJECT:VOID
+VOID:VOID
+VOID:INT,INT
+VOID:UINT,UINT
+VOID:BOOLEAN
+VOID:OBJECT,ENUM,BOXED
+VOID:BOXED
+BOOLEAN:BOOLEAN
+BOOLEAN:OBJECT,STRING,STRING
+BOOLEAN:ENUM,INT
+STRING:POINTER
+STRING:STRING,STRING
diff --git a/src/ent2h.sh b/src/ent2h.sh
@@ -1,9 +1,9 @@
#!/bin/sh
#
# ent2h.sh - convert one or more SGML entity sets to a C header
-# $Id: ent2h.sh,v 1.1 2004/09/20 02:02:54 jylefort Exp $
+# $Id: ent2h.sh,v 1.2 2005/01/19 01:49:14 jylefort Exp $
#
-# Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+# 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
diff --git a/src/mn-about-dialog.c b/src/mn-about-dialog.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -113,13 +113,12 @@ mn_about_dialog_init (MNAboutDialog * self G_GNUC_UNUSED)
const char *authors[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
const char *documenters[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
GdkPixbuf *logo;
- GdkPixbuf *icon;
- logo = mn_pixbuf_new("logo.png");
+ logo = mn_pixbuf_new(MN_IMAGE_FILE(UIDIR, "logo.png"));
gnome_about_construct(GNOME_ABOUT(self),
_("Mail Notification"),
VERSION,
- "Copyright \302\251 2003, 2004 Jean-Yves Lefort",
+ "Copyright \302\251 2003-2005 Jean-Yves Lefort",
_("A Mail Notification Icon"),
authors,
documenters,
@@ -127,28 +126,24 @@ mn_about_dialog_init (MNAboutDialog * self G_GNUC_UNUSED)
_("Jean-Yves Lefort <jylefort@brutele.be>"),
logo);
g_object_unref(logo);
-
- icon = mn_pixbuf_new("mail-notification.png");
- gtk_window_set_icon(GTK_WINDOW(self), icon);
- g_object_unref(icon);
-#line 136 "mn-about-dialog.c"
+#line 131 "mn-about-dialog.c"
}
}
#undef __GOB_FUNCTION__
-#line 56 "mn-about-dialog.gob"
+#line 51 "mn-about-dialog.gob"
GtkWidget *
mn_about_dialog_new (void)
-#line 146 "mn-about-dialog.c"
+#line 141 "mn-about-dialog.c"
{
#define __GOB_FUNCTION__ "MN:About:Dialog::new"
{
-#line 58 "mn-about-dialog.gob"
+#line 53 "mn-about-dialog.gob"
return GTK_WIDGET(GET_NEW);
}}
-#line 154 "mn-about-dialog.c"
+#line 149 "mn-about-dialog.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-about-dialog.gob b/src/mn-about-dialog.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -33,13 +33,12 @@ class MN:About:Dialog from Gnome:About
const char *authors[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
const char *documenters[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
GdkPixbuf *logo;
- GdkPixbuf *icon;
- logo = mn_pixbuf_new("logo.png");
+ logo = mn_pixbuf_new(MN_IMAGE_FILE(UIDIR, "logo.png"));
gnome_about_construct(GNOME_ABOUT(self),
_("Mail Notification"),
VERSION,
- "Copyright \302\251 2003, 2004 Jean-Yves Lefort",
+ "Copyright \302\251 2003-2005 Jean-Yves Lefort",
_("A Mail Notification Icon"),
authors,
documenters,
@@ -47,10 +46,6 @@ class MN:About:Dialog from Gnome:About
_("Jean-Yves Lefort <jylefort@brutele.be>"),
logo);
g_object_unref(logo);
-
- icon = mn_pixbuf_new("mail-notification.png");
- gtk_window_set_icon(GTK_WINDOW(self), icon);
- g_object_unref(icon);
}
public GtkWidget *
diff --git a/src/mn-auth-combo-box.c b/src/mn-auth-combo-box.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -139,14 +139,14 @@ mn_auth_combo_box_class_init (MNAuthComboBoxClass * c G_GNUC_UNUSED)
}
}
#undef __GOB_FUNCTION__
-#line 86 "mn-auth-combo-box.gob"
+#line 87 "mn-auth-combo-box.gob"
static void
mn_auth_combo_box_init (MNAuthComboBox * self G_GNUC_UNUSED)
#line 146 "mn-auth-combo-box.c"
{
#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::init"
{
-#line 87 "mn-auth-combo-box.gob"
+#line 88 "mn-auth-combo-box.gob"
GtkListStore *store;
GtkCellRenderer *renderer;
@@ -265,17 +265,18 @@ ___object_get_property (GObject *object,
#line 73 "mn-auth-combo-box.gob"
char *mechanism = NULL;
- GtkTreeModel *model;
GtkTreeIter iter;
- model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(self), &iter))
- gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &mechanism, -1);
+ {
+ GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
+ gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &mechanism, -1);
+ }
g_value_set_string(VAL, mechanism);
g_free(mechanism);
-#line 279 "mn-auth-combo-box.c"
+#line 280 "mn-auth-combo-box.c"
}
break;
default:
@@ -294,45 +295,45 @@ ___object_get_property (GObject *object,
#line 73 "mn-auth-combo-box.gob"
gchar *
mn_auth_combo_box_get_active_mechanism (MNAuthComboBox * self)
-#line 298 "mn-auth-combo-box.c"
+#line 299 "mn-auth-combo-box.c"
{
#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::get_active_mechanism"
{
#line 42 "mn-auth-combo-box.gob"
gchar* val; g_object_get (G_OBJECT (self), "active_mechanism", &val, NULL); return val;
}}
-#line 305 "mn-auth-combo-box.c"
+#line 306 "mn-auth-combo-box.c"
#undef __GOB_FUNCTION__
#line 44 "mn-auth-combo-box.gob"
void
mn_auth_combo_box_set_active_mechanism (MNAuthComboBox * self, gchar * val)
-#line 311 "mn-auth-combo-box.c"
+#line 312 "mn-auth-combo-box.c"
{
#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::set_active_mechanism"
{
#line 42 "mn-auth-combo-box.gob"
g_object_set (G_OBJECT (self), "active_mechanism", val, NULL);
}}
-#line 318 "mn-auth-combo-box.c"
+#line 319 "mn-auth-combo-box.c"
#undef __GOB_FUNCTION__
-#line 126 "mn-auth-combo-box.gob"
+#line 127 "mn-auth-combo-box.gob"
void
mn_auth_combo_box_append (MNAuthComboBox * self, const char * mechanism, const char * label)
-#line 325 "mn-auth-combo-box.c"
+#line 326 "mn-auth-combo-box.c"
{
#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::append"
-#line 126 "mn-auth-combo-box.gob"
+#line 127 "mn-auth-combo-box.gob"
g_return_if_fail (self != NULL);
-#line 126 "mn-auth-combo-box.gob"
+#line 127 "mn-auth-combo-box.gob"
g_return_if_fail (MN_IS_AUTH_COMBO_BOX (self));
-#line 126 "mn-auth-combo-box.gob"
+#line 127 "mn-auth-combo-box.gob"
g_return_if_fail (label != NULL);
-#line 334 "mn-auth-combo-box.c"
+#line 335 "mn-auth-combo-box.c"
{
-#line 128 "mn-auth-combo-box.gob"
+#line 129 "mn-auth-combo-box.gob"
GtkTreeModel *model;
GtkTreeIter iter;
@@ -345,19 +346,19 @@ mn_auth_combo_box_append (MNAuthComboBox * self, const char * mechanism, const c
COLUMN_LABEL, label,
-1);
}}
-#line 349 "mn-auth-combo-box.c"
+#line 350 "mn-auth-combo-box.c"
#undef __GOB_FUNCTION__
-#line 141 "mn-auth-combo-box.gob"
+#line 142 "mn-auth-combo-box.gob"
GtkWidget *
mn_auth_combo_box_new (void)
-#line 355 "mn-auth-combo-box.c"
+#line 356 "mn-auth-combo-box.c"
{
#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::new"
{
-#line 143 "mn-auth-combo-box.gob"
+#line 144 "mn-auth-combo-box.gob"
return GTK_WIDGET(GET_NEW);
}}
-#line 363 "mn-auth-combo-box.c"
+#line 364 "mn-auth-combo-box.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-auth-combo-box.gob b/src/mn-auth-combo-box.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
@@ -72,12 +72,13 @@ class MN:Auth:Combo:Box from Gtk:Combo:Box
get
{
char *mechanism = NULL;
- GtkTreeModel *model;
GtkTreeIter iter;
- model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(self), &iter))
- gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &mechanism, -1);
+ {
+ GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
+ gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &mechanism, -1);
+ }
g_value_set_string(VAL, mechanism);
g_free(mechanism);
diff --git a/src/mn-authenticated-mailbox-private.h b/src/mn-authenticated-mailbox-private.h
@@ -10,9 +10,9 @@ extern "C" {
#endif /* __cplusplus */
struct _MNAuthenticatedMailboxPrivate {
-#line 38 "mn-authenticated-mailbox.gob"
- gboolean authentication_failed;
#line 39 "mn-authenticated-mailbox.gob"
+ gboolean authentication_failed;
+#line 40 "mn-authenticated-mailbox.gob"
GtkWidget * dialog;
#line 18 "mn-authenticated-mailbox-private.h"
};
diff --git a/src/mn-authenticated-mailbox.c b/src/mn-authenticated-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -138,9 +138,9 @@ mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * c G_GNUC_UNUS
parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-#line 41 "mn-authenticated-mailbox.gob"
+#line 42 "mn-authenticated-mailbox.gob"
mn_mailbox_class->removed = ___1_mn_authenticated_mailbox_removed;
-#line 52 "mn-authenticated-mailbox.gob"
+#line 53 "mn-authenticated-mailbox.gob"
mn_mailbox_class->impl_check = ___2_mn_authenticated_mailbox_impl_check;
#line 146 "mn-authenticated-mailbox.c"
g_object_class->finalize = ___finalize;
@@ -149,7 +149,7 @@ mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * c G_GNUC_UNUS
-#line 41 "mn-authenticated-mailbox.gob"
+#line 42 "mn-authenticated-mailbox.gob"
static void
___1_mn_authenticated_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
#line 156 "mn-authenticated-mailbox.c"
@@ -158,13 +158,13 @@ ___1_mn_authenticated_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
(* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::removed"
-#line 41 "mn-authenticated-mailbox.gob"
+#line 42 "mn-authenticated-mailbox.gob"
g_return_if_fail (mailbox != NULL);
-#line 41 "mn-authenticated-mailbox.gob"
+#line 42 "mn-authenticated-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
#line 166 "mn-authenticated-mailbox.c"
{
-#line 43 "mn-authenticated-mailbox.gob"
+#line 44 "mn-authenticated-mailbox.gob"
Self *self = SELF(mailbox);
@@ -177,7 +177,7 @@ ___1_mn_authenticated_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 52 "mn-authenticated-mailbox.gob"
+#line 53 "mn-authenticated-mailbox.gob"
static void
___2_mn_authenticated_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
#line 184 "mn-authenticated-mailbox.c"
@@ -186,55 +186,57 @@ ___2_mn_authenticated_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
(* MN_MAILBOX_CLASS(parent_class)->impl_check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::impl_check"
-#line 52 "mn-authenticated-mailbox.gob"
+#line 53 "mn-authenticated-mailbox.gob"
g_return_if_fail (mailbox != NULL);
-#line 52 "mn-authenticated-mailbox.gob"
+#line 53 "mn-authenticated-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
#line 194 "mn-authenticated-mailbox.c"
{
-#line 54 "mn-authenticated-mailbox.gob"
+#line 55 "mn-authenticated-mailbox.gob"
Self *self = SELF(mailbox);
+
+ self->prompted = FALSE;
selfp->authentication_failed = FALSE;
}}
-#line 201 "mn-authenticated-mailbox.c"
+#line 203 "mn-authenticated-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 59 "mn-authenticated-mailbox.gob"
+#line 62 "mn-authenticated-mailbox.gob"
void
mn_authenticated_mailbox_authentication_failed (MNAuthenticatedMailbox * self)
-#line 208 "mn-authenticated-mailbox.c"
+#line 210 "mn-authenticated-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::authentication_failed"
-#line 59 "mn-authenticated-mailbox.gob"
+#line 62 "mn-authenticated-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 59 "mn-authenticated-mailbox.gob"
+#line 62 "mn-authenticated-mailbox.gob"
g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
-#line 215 "mn-authenticated-mailbox.c"
+#line 217 "mn-authenticated-mailbox.c"
{
-#line 61 "mn-authenticated-mailbox.gob"
+#line 64 "mn-authenticated-mailbox.gob"
g_free(self->password);
self->password = NULL;
selfp->authentication_failed = TRUE;
}}
-#line 223 "mn-authenticated-mailbox.c"
+#line 225 "mn-authenticated-mailbox.c"
#undef __GOB_FUNCTION__
-#line 67 "mn-authenticated-mailbox.gob"
+#line 70 "mn-authenticated-mailbox.gob"
void
mn_authenticated_mailbox_fill_password (MNAuthenticatedMailbox * self)
-#line 229 "mn-authenticated-mailbox.c"
+#line 231 "mn-authenticated-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::fill_password"
-#line 67 "mn-authenticated-mailbox.gob"
+#line 70 "mn-authenticated-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 67 "mn-authenticated-mailbox.gob"
+#line 70 "mn-authenticated-mailbox.gob"
g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
-#line 236 "mn-authenticated-mailbox.c"
+#line 238 "mn-authenticated-mailbox.c"
{
-#line 69 "mn-authenticated-mailbox.gob"
+#line 72 "mn-authenticated-mailbox.gob"
self->cancelled = FALSE;
if (! self->password)
@@ -244,6 +246,8 @@ mn_authenticated_mailbox_fill_password (MNAuthenticatedMailbox * self)
{
GDK_THREADS_ENTER();
+ self->prompted = TRUE;
+
self->password = self_password_prompt(self,
selfp->authentication_failed
? _("Mail Notification was unable to log into %s mailbox %s, possibly because the password you have entered is invalid.\n\nPlease re-enter your password.")
@@ -259,24 +263,24 @@ mn_authenticated_mailbox_fill_password (MNAuthenticatedMailbox * self)
}
}
}}
-#line 263 "mn-authenticated-mailbox.c"
+#line 267 "mn-authenticated-mailbox.c"
#undef __GOB_FUNCTION__
-#line 94 "mn-authenticated-mailbox.gob"
+#line 99 "mn-authenticated-mailbox.gob"
static char *
mn_authenticated_mailbox_password_prompt (MNAuthenticatedMailbox * self, const char * format, ...)
-#line 269 "mn-authenticated-mailbox.c"
+#line 273 "mn-authenticated-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::password_prompt"
-#line 94 "mn-authenticated-mailbox.gob"
+#line 99 "mn-authenticated-mailbox.gob"
g_return_val_if_fail (self != NULL, (char * )0);
-#line 94 "mn-authenticated-mailbox.gob"
+#line 99 "mn-authenticated-mailbox.gob"
g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (char * )0);
-#line 94 "mn-authenticated-mailbox.gob"
+#line 99 "mn-authenticated-mailbox.gob"
g_return_val_if_fail (format != NULL, (char * )0);
-#line 278 "mn-authenticated-mailbox.c"
+#line 282 "mn-authenticated-mailbox.c"
{
-#line 96 "mn-authenticated-mailbox.gob"
+#line 101 "mn-authenticated-mailbox.gob"
GtkWidget *label;
GtkWidget *username_label;
@@ -291,7 +295,7 @@ mn_authenticated_mailbox_password_prompt (MNAuthenticatedMailbox * self, const c
g_return_val_if_fail(selfp->dialog == NULL, NULL);
- mn_create_interface("authentication",
+ mn_create_interface(MN_INTERFACE_FILE("authentication.glade"),
"dialog", &selfp->dialog,
"label", &label,
"username_label", &username_label,
@@ -324,24 +328,24 @@ mn_authenticated_mailbox_password_prompt (MNAuthenticatedMailbox * self, const c
gtk_entry_set_text(GTK_ENTRY(username_entry), MN_MAILBOX(self)->uri->username);
- if (gtk_dialog_run(GTK_DIALOG(selfp->dialog)) == GTK_RESPONSE_OK)
+ if (mn_dialog_run_nonmodal(GTK_DIALOG(selfp->dialog)) == GTK_RESPONSE_OK)
password = g_strdup(gtk_entry_get_text(GTK_ENTRY(password_entry)));
gtk_widget_destroy(selfp->dialog);
return password;
}}
-#line 335 "mn-authenticated-mailbox.c"
+#line 339 "mn-authenticated-mailbox.c"
#undef __GOB_FUNCTION__
-#line 153 "mn-authenticated-mailbox.gob"
+#line 158 "mn-authenticated-mailbox.gob"
void
mn_authenticated_mailbox_password_prompt_changed_h (gpointer user_data, GtkEditable * editable)
-#line 341 "mn-authenticated-mailbox.c"
+#line 345 "mn-authenticated-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::password_prompt_changed_h"
{
-#line 156 "mn-authenticated-mailbox.gob"
+#line 161 "mn-authenticated-mailbox.gob"
GtkDialog *dialog = user_data;
const char *password;
@@ -349,5 +353,5 @@ mn_authenticated_mailbox_password_prompt_changed_h (gpointer user_data, GtkEdita
password = gtk_entry_get_text(GTK_ENTRY(editable));
gtk_dialog_set_response_sensitive(dialog, GTK_RESPONSE_OK, *password != 0);
}}
-#line 353 "mn-authenticated-mailbox.c"
+#line 357 "mn-authenticated-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-authenticated-mailbox.gob b/src/mn-authenticated-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -34,6 +34,7 @@ requires 2.0.10
class MN:Authenticated:Mailbox from MN:Mailbox
{
protected char *password = NULL destroywith g_free;
+ protected gboolean prompted;
protected gboolean cancelled;
private gboolean authentication_failed;
private GtkWidget *dialog;
@@ -53,6 +54,8 @@ class MN:Authenticated:Mailbox from MN:Mailbox
impl_check (MN:Mailbox *mailbox (check null type))
{
Self *self = SELF(mailbox);
+
+ self->prompted = FALSE;
selfp->authentication_failed = FALSE;
}
@@ -75,6 +78,8 @@ class MN:Authenticated:Mailbox from MN:Mailbox
{
GDK_THREADS_ENTER();
+ self->prompted = TRUE;
+
self->password = self_password_prompt(self,
selfp->authentication_failed
? _("Mail Notification was unable to log into %s mailbox %s, possibly because the password you have entered is invalid.\n\nPlease re-enter your password.")
@@ -107,7 +112,7 @@ class MN:Authenticated:Mailbox from MN:Mailbox
g_return_val_if_fail(selfp->dialog == NULL, NULL);
- mn_create_interface("authentication",
+ mn_create_interface(MN_INTERFACE_FILE("authentication.glade"),
"dialog", &selfp->dialog,
"label", &label,
"username_label", &username_label,
@@ -140,7 +145,7 @@ class MN:Authenticated:Mailbox from MN:Mailbox
gtk_entry_set_text(GTK_ENTRY(username_entry), MN_MAILBOX(self)->uri->username);
- if (gtk_dialog_run(GTK_DIALOG(selfp->dialog)) == GTK_RESPONSE_OK)
+ if (mn_dialog_run_nonmodal(GTK_DIALOG(selfp->dialog)) == GTK_RESPONSE_OK)
password = g_strdup(gtk_entry_get_text(GTK_ENTRY(password_entry)));
gtk_widget_destroy(selfp->dialog);
diff --git a/src/mn-authenticated-mailbox.h b/src/mn-authenticated-mailbox.h
@@ -40,6 +40,7 @@ struct _MNAuthenticatedMailbox {
MNMailbox __parent__;
/*< private >*/
char * password; /* protected */
+ gboolean prompted; /* protected */
gboolean cancelled; /* protected */
MNAuthenticatedMailboxPrivate *_priv;
};
diff --git a/src/mn-autodetect-mailbox-properties-private.h b/src/mn-autodetect-mailbox-properties-private.h
@@ -10,12 +10,12 @@ extern "C" {
#endif /* __cplusplus */
struct _MNAutodetectMailboxPropertiesPrivate {
-#line 39 "mn-autodetect-mailbox-properties.gob"
+#line 41 "mn-autodetect-mailbox-properties.gob"
GtkSizeGroup * size_group;
-#line 51 "mn-autodetect-mailbox-properties.gob"
- GtkTooltips * tooltips;
-#line 52 "mn-autodetect-mailbox-properties.gob"
+#line 53 "mn-autodetect-mailbox-properties.gob"
GtkWidget * location_entry;
+#line 54 "mn-autodetect-mailbox-properties.gob"
+ GtkWidget * chooser;
#line 20 "mn-autodetect-mailbox-properties-private.h"
};
diff --git a/src/mn-autodetect-mailbox-properties.c b/src/mn-autodetect-mailbox-properties.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -27,13 +27,15 @@
#include "config.h"
#include <glib/gi18n.h>
+#include <eel/eel.h>
#include "mn-mailbox-properties.h"
#include "mn-mailbox-properties-util.h"
#include "mn-util.h"
+#include "mn-properties-dialog.h"
static char *current_folder_uri = NULL;
-#line 37 "mn-autodetect-mailbox-properties.c"
+#line 39 "mn-autodetect-mailbox-properties.c"
/* self casting macros */
#define SELF(x) MN_AUTODETECT_MAILBOX_PROPERTIES(x)
#define SELF_CONST(x) MN_AUTODETECT_MAILBOX_PROPERTIES_CONST(x)
@@ -56,6 +58,7 @@ static GObject * ___1_mn_autodetect_mailbox_properties_constructor (GType type,
static void mn_autodetect_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data) G_GNUC_UNUSED;
static void mn_autodetect_mailbox_properties_browse_clicked_h (GtkButton * button, gpointer user_data) G_GNUC_UNUSED;
static void mn_autodetect_mailbox_properties_current_folder_changed_h (GtkFileChooser * chooser, gpointer user_data) G_GNUC_UNUSED;
+static void mn_autodetect_mailbox_properties_chooser_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED;
static gboolean mn_autodetect_mailbox_properties_set_uri (MNMailboxProperties * self, MNURI * uri) G_GNUC_UNUSED;
static MNURI * mn_autodetect_mailbox_properties_get_uri (MNMailboxProperties * self) G_GNUC_UNUSED;
@@ -73,6 +76,7 @@ static GtkHBoxClass *parent_class = NULL;
#define self_entry_changed_h mn_autodetect_mailbox_properties_entry_changed_h
#define self_browse_clicked_h mn_autodetect_mailbox_properties_browse_clicked_h
#define self_current_folder_changed_h mn_autodetect_mailbox_properties_current_folder_changed_h
+#define self_chooser_response_h mn_autodetect_mailbox_properties_chooser_response_h
#define self_set_uri mn_autodetect_mailbox_properties_set_uri
#define self_get_uri mn_autodetect_mailbox_properties_get_uri
@@ -80,11 +84,11 @@ static GtkHBoxClass *parent_class = NULL;
static void
___MN_Mailbox_Properties_init (MNMailboxPropertiesIface *iface)
{
-#line 157 "mn-autodetect-mailbox-properties.gob"
+#line 176 "mn-autodetect-mailbox-properties.gob"
iface->set_uri = self_set_uri;
-#line 165 "mn-autodetect-mailbox-properties.gob"
+#line 184 "mn-autodetect-mailbox-properties.gob"
iface->get_uri = self_get_uri;
-#line 88 "mn-autodetect-mailbox-properties.c"
+#line 92 "mn-autodetect-mailbox-properties.c"
}
GType
@@ -146,12 +150,9 @@ ___dispose (GObject *obj_self)
MNAutodetectMailboxProperties *self G_GNUC_UNUSED = MN_AUTODETECT_MAILBOX_PROPERTIES (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 39 "mn-autodetect-mailbox-properties.gob"
+#line 41 "mn-autodetect-mailbox-properties.gob"
if(self->_priv->size_group) { g_object_unref ((gpointer) self->_priv->size_group); self->_priv->size_group = NULL; }
-#line 152 "mn-autodetect-mailbox-properties.c"
-#line 51 "mn-autodetect-mailbox-properties.gob"
- if(self->_priv->tooltips) { g_object_unref ((gpointer) self->_priv->tooltips); self->_priv->tooltips = NULL; }
-#line 155 "mn-autodetect-mailbox-properties.c"
+#line 156 "mn-autodetect-mailbox-properties.c"
}
#undef __GOB_FUNCTION__
@@ -172,9 +173,6 @@ mn_autodetect_mailbox_properties_init (MNAutodetectMailboxProperties * o G_GNUC_
{
#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::init"
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNAutodetectMailboxPropertiesPrivate);
-#line 51 "mn-autodetect-mailbox-properties.gob"
- o->_priv->tooltips = mn_gtk_tooltips_new();
-#line 178 "mn-autodetect-mailbox-properties.c"
}
#undef __GOB_FUNCTION__
static void
@@ -187,9 +185,9 @@ mn_autodetect_mailbox_properties_class_init (MNAutodetectMailboxPropertiesClass
parent_class = g_type_class_ref (GTK_TYPE_HBOX);
-#line 54 "mn-autodetect-mailbox-properties.gob"
+#line 56 "mn-autodetect-mailbox-properties.gob"
g_object_class->constructor = ___1_mn_autodetect_mailbox_properties_constructor;
-#line 193 "mn-autodetect-mailbox-properties.c"
+#line 191 "mn-autodetect-mailbox-properties.c"
g_object_class->dispose = ___dispose;
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
@@ -222,9 +220,9 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_SIZE_GROUP:
{
-#line 40 "mn-autodetect-mailbox-properties.gob"
+#line 42 "mn-autodetect-mailbox-properties.gob"
{ GObject *___old = (GObject *)self->_priv->size_group; self->_priv->size_group = (void *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
-#line 228 "mn-autodetect-mailbox-properties.c"
+#line 226 "mn-autodetect-mailbox-properties.c"
}
break;
default:
@@ -253,28 +251,28 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_LABEL:
{
-#line 37 "mn-autodetect-mailbox-properties.gob"
+#line 39 "mn-autodetect-mailbox-properties.gob"
g_value_set_string(VAL, _("<span style=\"italic\">autodetect</span>"));
-#line 259 "mn-autodetect-mailbox-properties.c"
+#line 257 "mn-autodetect-mailbox-properties.c"
}
break;
case PROP_SIZE_GROUP:
{
-#line 40 "mn-autodetect-mailbox-properties.gob"
+#line 42 "mn-autodetect-mailbox-properties.gob"
g_value_set_object (VAL, (gpointer)self->_priv->size_group);
-#line 266 "mn-autodetect-mailbox-properties.c"
+#line 264 "mn-autodetect-mailbox-properties.c"
}
break;
case PROP_COMPLETE:
{
-#line 44 "mn-autodetect-mailbox-properties.gob"
+#line 46 "mn-autodetect-mailbox-properties.gob"
const char *location;
location = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->location_entry));
g_value_set_boolean(VAL, *location != 0);
-#line 278 "mn-autodetect-mailbox-properties.c"
+#line 276 "mn-autodetect-mailbox-properties.c"
}
break;
default:
@@ -291,10 +289,10 @@ g_value_set_object (VAL, (gpointer)self->_priv->size_group);
-#line 54 "mn-autodetect-mailbox-properties.gob"
+#line 56 "mn-autodetect-mailbox-properties.gob"
static GObject *
___1_mn_autodetect_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 298 "mn-autodetect-mailbox-properties.c"
+#line 296 "mn-autodetect-mailbox-properties.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -302,7 +300,7 @@ ___1_mn_autodetect_mailbox_properties_constructor (GType type G_GNUC_UNUSED, gui
{
#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::constructor"
{
-#line 56 "mn-autodetect-mailbox-properties.gob"
+#line 58 "mn-autodetect-mailbox-properties.gob"
GObject *object;
Self *self;
@@ -326,9 +324,7 @@ ___1_mn_autodetect_mailbox_properties_constructor (GType type G_GNUC_UNUSED, gui
gtk_label_set_mnemonic_widget(GTK_LABEL(label), selfp->location_entry);
gtk_entry_set_activates_default(GTK_ENTRY(selfp->location_entry), TRUE);
- mn_gtk_tooltips_set_tip(selfp->tooltips,
- selfp->location_entry,
- _("The URI of the mailbox"));
+ mn_properties_dialog_set_tooltip(selfp->location_entry, _("The URI of the mailbox"));
gtk_box_pack_start(GTK_BOX(hbox), selfp->location_entry, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
@@ -346,14 +342,14 @@ ___1_mn_autodetect_mailbox_properties_constructor (GType type G_GNUC_UNUSED, gui
return object;
}}
-#line 350 "mn-autodetect-mailbox-properties.c"
+#line 346 "mn-autodetect-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
#line 100 "mn-autodetect-mailbox-properties.gob"
static void
mn_autodetect_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data)
-#line 357 "mn-autodetect-mailbox-properties.c"
+#line 353 "mn-autodetect-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::entry_changed_h"
#line 100 "mn-autodetect-mailbox-properties.gob"
@@ -362,20 +358,20 @@ mn_autodetect_mailbox_properties_entry_changed_h (GtkEditable * editable, gpoint
g_return_if_fail (GTK_IS_EDITABLE (editable));
#line 100 "mn-autodetect-mailbox-properties.gob"
g_return_if_fail (user_data != NULL);
-#line 366 "mn-autodetect-mailbox-properties.c"
+#line 362 "mn-autodetect-mailbox-properties.c"
{
#line 103 "mn-autodetect-mailbox-properties.gob"
Self *self = user_data;
g_object_notify(G_OBJECT(self), "complete");
}}
-#line 373 "mn-autodetect-mailbox-properties.c"
+#line 369 "mn-autodetect-mailbox-properties.c"
#undef __GOB_FUNCTION__
#line 108 "mn-autodetect-mailbox-properties.gob"
static void
mn_autodetect_mailbox_properties_browse_clicked_h (GtkButton * button, gpointer user_data)
-#line 379 "mn-autodetect-mailbox-properties.c"
+#line 375 "mn-autodetect-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::browse_clicked_h"
#line 108 "mn-autodetect-mailbox-properties.gob"
@@ -384,111 +380,143 @@ mn_autodetect_mailbox_properties_browse_clicked_h (GtkButton * button, gpointer
g_return_if_fail (GTK_IS_BUTTON (button));
#line 108 "mn-autodetect-mailbox-properties.gob"
g_return_if_fail (user_data != NULL);
-#line 388 "mn-autodetect-mailbox-properties.c"
+#line 384 "mn-autodetect-mailbox-properties.c"
{
#line 111 "mn-autodetect-mailbox-properties.gob"
Self *self = user_data;
GtkWidget *toplevel;
- GtkWidget *chooser;
const char *location;
+ if (selfp->chooser)
+ {
+ gtk_window_present(GTK_WINDOW(selfp->chooser));
+ return;
+ }
+
toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
- chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
- GTK_WINDOW(toplevel),
- GTK_FILE_CHOOSER_ACTION_OPEN,
- "gnome-vfs",
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, 1,
- NULL);
+ selfp->chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
+ GTK_WINDOW(toplevel),
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ "gnome-vfs",
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, 1,
+ NULL);
+ eel_add_weak_pointer(&selfp->chooser);
- gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), FALSE);
- mn_file_chooser_dialog_allow_select_folder(GTK_FILE_CHOOSER_DIALOG(chooser), 1);
+ gtk_window_set_destroy_with_parent(GTK_WINDOW(selfp->chooser), TRUE);
+ gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(selfp->chooser), FALSE);
+ mn_file_chooser_dialog_allow_select_folder(GTK_FILE_CHOOSER_DIALOG(selfp->chooser), 1);
location = gtk_entry_get_text(GTK_ENTRY(selfp->location_entry));
if (*location)
- gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(chooser), location);
+ gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(selfp->chooser), location);
else if (current_folder_uri)
- gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(chooser), current_folder_uri);
+ gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(selfp->chooser), current_folder_uri);
- g_signal_connect(chooser, "current-folder-changed", G_CALLBACK(self_current_folder_changed_h), self);
+ g_object_connect(selfp->chooser,
+ "signal::current-folder-changed", self_current_folder_changed_h, self,
+ "signal::response", self_chooser_response_h, self,
+ NULL);
- 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(selfp->location_entry), uri);
- g_free(uri);
- }
-
- gtk_widget_destroy(chooser);
+ gtk_widget_show(selfp->chooser);
}}
-#line 428 "mn-autodetect-mailbox-properties.c"
+#line 425 "mn-autodetect-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 149 "mn-autodetect-mailbox-properties.gob"
+#line 150 "mn-autodetect-mailbox-properties.gob"
static void
mn_autodetect_mailbox_properties_current_folder_changed_h (GtkFileChooser * chooser, gpointer user_data)
-#line 434 "mn-autodetect-mailbox-properties.c"
+#line 431 "mn-autodetect-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::current_folder_changed_h"
-#line 149 "mn-autodetect-mailbox-properties.gob"
+#line 150 "mn-autodetect-mailbox-properties.gob"
g_return_if_fail (chooser != NULL);
-#line 149 "mn-autodetect-mailbox-properties.gob"
+#line 150 "mn-autodetect-mailbox-properties.gob"
g_return_if_fail (GTK_IS_FILE_CHOOSER (chooser));
-#line 441 "mn-autodetect-mailbox-properties.c"
+#line 438 "mn-autodetect-mailbox-properties.c"
{
-#line 152 "mn-autodetect-mailbox-properties.gob"
+#line 153 "mn-autodetect-mailbox-properties.gob"
g_free(current_folder_uri);
current_folder_uri = gtk_file_chooser_get_current_folder_uri(chooser);
}}
-#line 448 "mn-autodetect-mailbox-properties.c"
+#line 445 "mn-autodetect-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 158 "mn-autodetect-mailbox-properties.gob"
+static void
+mn_autodetect_mailbox_properties_chooser_response_h (GtkDialog * dialog, int response, gpointer user_data)
+#line 451 "mn-autodetect-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::chooser_response_h"
+#line 158 "mn-autodetect-mailbox-properties.gob"
+ g_return_if_fail (dialog != NULL);
+#line 158 "mn-autodetect-mailbox-properties.gob"
+ g_return_if_fail (GTK_IS_DIALOG (dialog));
+#line 158 "mn-autodetect-mailbox-properties.gob"
+ g_return_if_fail (user_data != NULL);
+#line 460 "mn-autodetect-mailbox-properties.c"
+{
+#line 162 "mn-autodetect-mailbox-properties.gob"
+
+ if (response == 1)
+ {
+ Self *self = user_data;
+ char *uri;
+
+ uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(dialog));
+ gtk_entry_set_text(GTK_ENTRY(selfp->location_entry), uri);
+ g_free(uri);
+ }
+
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+ }}
+#line 476 "mn-autodetect-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 157 "mn-autodetect-mailbox-properties.gob"
+#line 176 "mn-autodetect-mailbox-properties.gob"
static gboolean
mn_autodetect_mailbox_properties_set_uri (MNMailboxProperties * self, MNURI * uri)
-#line 454 "mn-autodetect-mailbox-properties.c"
+#line 482 "mn-autodetect-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::set_uri"
-#line 157 "mn-autodetect-mailbox-properties.gob"
+#line 176 "mn-autodetect-mailbox-properties.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 157 "mn-autodetect-mailbox-properties.gob"
+#line 176 "mn-autodetect-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (gboolean )0);
-#line 157 "mn-autodetect-mailbox-properties.gob"
+#line 176 "mn-autodetect-mailbox-properties.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 157 "mn-autodetect-mailbox-properties.gob"
+#line 176 "mn-autodetect-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_URI (uri), (gboolean )0);
-#line 465 "mn-autodetect-mailbox-properties.c"
+#line 493 "mn-autodetect-mailbox-properties.c"
{
-#line 160 "mn-autodetect-mailbox-properties.gob"
+#line 179 "mn-autodetect-mailbox-properties.gob"
gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->location_entry), uri->text);
return TRUE;
}}
-#line 472 "mn-autodetect-mailbox-properties.c"
+#line 500 "mn-autodetect-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 165 "mn-autodetect-mailbox-properties.gob"
+#line 184 "mn-autodetect-mailbox-properties.gob"
static MNURI *
mn_autodetect_mailbox_properties_get_uri (MNMailboxProperties * self)
-#line 478 "mn-autodetect-mailbox-properties.c"
+#line 506 "mn-autodetect-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::get_uri"
-#line 165 "mn-autodetect-mailbox-properties.gob"
+#line 184 "mn-autodetect-mailbox-properties.gob"
g_return_val_if_fail (self != NULL, (MNURI * )0);
-#line 165 "mn-autodetect-mailbox-properties.gob"
+#line 184 "mn-autodetect-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (MNURI * )0);
-#line 485 "mn-autodetect-mailbox-properties.c"
+#line 513 "mn-autodetect-mailbox-properties.c"
{
-#line 167 "mn-autodetect-mailbox-properties.gob"
+#line 186 "mn-autodetect-mailbox-properties.gob"
const char *location;
location = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->location_entry));
return mn_uri_new(location);
}}
-#line 494 "mn-autodetect-mailbox-properties.c"
+#line 522 "mn-autodetect-mailbox-properties.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-autodetect-mailbox-properties.gob b/src/mn-autodetect-mailbox-properties.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -24,9 +24,11 @@ requires 2.0.10
%{
#include "config.h"
#include <glib/gi18n.h>
+#include <eel/eel.h>
#include "mn-mailbox-properties.h"
#include "mn-mailbox-properties-util.h"
#include "mn-util.h"
+#include "mn-properties-dialog.h"
static char *current_folder_uri = NULL;
%}
@@ -48,8 +50,8 @@ class MN:Autodetect:Mailbox:Properties from Gtk:HBox (interface MN:Mailbox:Prope
g_value_set_boolean(VAL, *location != 0);
};
- private GtkTooltips *tooltips = {mn_gtk_tooltips_new()} unrefwith g_object_unref;
private GtkWidget *location_entry;
+ private GtkWidget *chooser;
override (G:Object) GObject *
constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
@@ -76,9 +78,7 @@ class MN:Autodetect:Mailbox:Properties from Gtk:HBox (interface MN:Mailbox:Prope
gtk_label_set_mnemonic_widget(GTK_LABEL(label), selfp->location_entry);
gtk_entry_set_activates_default(GTK_ENTRY(selfp->location_entry), TRUE);
- mn_gtk_tooltips_set_tip(selfp->tooltips,
- selfp->location_entry,
- _("The URI of the mailbox"));
+ mn_properties_dialog_set_tooltip(selfp->location_entry, _("The URI of the mailbox"));
gtk_box_pack_start(GTK_BOX(hbox), selfp->location_entry, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
@@ -111,39 +111,40 @@ class MN:Autodetect:Mailbox:Properties from Gtk:HBox (interface MN:Mailbox:Prope
{
Self *self = user_data;
GtkWidget *toplevel;
- GtkWidget *chooser;
const char *location;
+ if (selfp->chooser)
+ {
+ gtk_window_present(GTK_WINDOW(selfp->chooser));
+ return;
+ }
+
toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
- chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
- GTK_WINDOW(toplevel),
- GTK_FILE_CHOOSER_ACTION_OPEN,
- "gnome-vfs",
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, 1,
- NULL);
+ selfp->chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
+ GTK_WINDOW(toplevel),
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ "gnome-vfs",
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, 1,
+ NULL);
+ eel_add_weak_pointer(&selfp->chooser);
- gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), FALSE);
- mn_file_chooser_dialog_allow_select_folder(GTK_FILE_CHOOSER_DIALOG(chooser), 1);
+ gtk_window_set_destroy_with_parent(GTK_WINDOW(selfp->chooser), TRUE);
+ gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(selfp->chooser), FALSE);
+ mn_file_chooser_dialog_allow_select_folder(GTK_FILE_CHOOSER_DIALOG(selfp->chooser), 1);
location = gtk_entry_get_text(GTK_ENTRY(selfp->location_entry));
if (*location)
- gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(chooser), location);
+ gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(selfp->chooser), location);
else if (current_folder_uri)
- gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(chooser), current_folder_uri);
+ gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(selfp->chooser), current_folder_uri);
- g_signal_connect(chooser, "current-folder-changed", G_CALLBACK(self_current_folder_changed_h), self);
+ g_object_connect(selfp->chooser,
+ "signal::current-folder-changed", self_current_folder_changed_h, self,
+ "signal::response", self_chooser_response_h, self,
+ NULL);
- 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(selfp->location_entry), uri);
- g_free(uri);
- }
-
- gtk_widget_destroy(chooser);
+ gtk_widget_show(selfp->chooser);
}
private void
@@ -154,6 +155,24 @@ class MN:Autodetect:Mailbox:Properties from Gtk:HBox (interface MN:Mailbox:Prope
current_folder_uri = gtk_file_chooser_get_current_folder_uri(chooser);
}
+ private void
+ chooser_response_h (Gtk:Dialog *dialog (check null type),
+ int response,
+ gpointer user_data (check null))
+ {
+ if (response == 1)
+ {
+ Self *self = user_data;
+ char *uri;
+
+ uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(dialog));
+ gtk_entry_set_text(GTK_ENTRY(selfp->location_entry), uri);
+ g_free(uri);
+ }
+
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+ }
+
interface MN:Mailbox:Properties private gboolean
set_uri (MN:Mailbox:Properties *self (check null type),
MN:URI *uri (check null type))
diff --git a/src/mn-automation.c b/src/mn-automation.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -25,9 +25,9 @@
#line 25 "mn-automation.gob"
-#include "mn-summary-dialog.h"
+#include "mn-main-window.h"
#include "mn-summary-popup.h"
-#include "mn-properties.h"
+#include "mn-properties-dialog.h"
#include "mn-shell.h"
#line 34 "mn-automation.c"
@@ -49,10 +49,11 @@ static void mn_automation_init (MNAutomation * o) G_GNUC_UNUSED;
static void mn_automation_class_init (MNAutomationClass * c) G_GNUC_UNUSED;
static void mn_automation_update (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
static void mn_automation_report (PortableServer_Servant servant, CORBA_char ** report, CORBA_Environment * env) G_GNUC_UNUSED;
-static void mn_automation_displayMailSummary (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
+static void mn_automation_displayMainWindow (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
static void mn_automation_displayProperties (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
static void mn_automation_displayAbout (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
static void mn_automation_closePopup (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
+static void mn_automation_quit (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static BonoboObjectClass *parent_class = NULL;
@@ -60,10 +61,11 @@ static BonoboObjectClass *parent_class = NULL;
/* Short form macros */
#define self_update mn_automation_update
#define self_report mn_automation_report
-#define self_displayMailSummary mn_automation_displayMailSummary
+#define self_displayMainWindow mn_automation_displayMainWindow
#define self_displayProperties mn_automation_displayProperties
#define self_displayAbout mn_automation_displayAbout
#define self_closePopup mn_automation_closePopup
+#define self_quit mn_automation_quit
#define self_new mn_automation_new
GType
mn_automation_get_type (void)
@@ -129,14 +131,16 @@ mn_automation_class_init (MNAutomationClass * c G_GNUC_UNUSED)
#line 41 "mn-automation.gob"
c->_epv.report = self_report;
#line 50 "mn-automation.gob"
- c->_epv.displayMailSummary = self_displayMailSummary;
+ c->_epv.displayMainWindow = self_displayMainWindow;
#line 57 "mn-automation.gob"
c->_epv.displayProperties = self_displayProperties;
#line 64 "mn-automation.gob"
c->_epv.displayAbout = self_displayAbout;
#line 71 "mn-automation.gob"
c->_epv.closePopup = self_closePopup;
-#line 140 "mn-automation.c"
+#line 78 "mn-automation.gob"
+ c->_epv.quit = self_quit;
+#line 144 "mn-automation.c"
}
#undef __GOB_FUNCTION__
@@ -145,7 +149,7 @@ mn_automation_class_init (MNAutomationClass * c G_GNUC_UNUSED)
#line 34 "mn-automation.gob"
static void
mn_automation_update (PortableServer_Servant servant, CORBA_Environment * env)
-#line 149 "mn-automation.c"
+#line 153 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::update"
{
@@ -154,13 +158,13 @@ mn_automation_update (PortableServer_Servant servant, CORBA_Environment * env)
g_return_if_fail(mn_shell != NULL);
mn_mailboxes_check(mn_shell->mailboxes);
}}
-#line 158 "mn-automation.c"
+#line 162 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 41 "mn-automation.gob"
static void
mn_automation_report (PortableServer_Servant servant, CORBA_char ** report, CORBA_Environment * env)
-#line 164 "mn-automation.c"
+#line 168 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::report"
{
@@ -169,58 +173,58 @@ mn_automation_report (PortableServer_Servant servant, CORBA_char ** report, CORB
g_return_if_fail(mn_shell != NULL);
mn_shell_report(mn_shell, report);
}}
-#line 173 "mn-automation.c"
+#line 177 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 50 "mn-automation.gob"
static void
-mn_automation_displayMailSummary (PortableServer_Servant servant, CORBA_Environment * env)
-#line 179 "mn-automation.c"
+mn_automation_displayMainWindow (PortableServer_Servant servant, CORBA_Environment * env)
+#line 183 "mn-automation.c"
{
-#define __GOB_FUNCTION__ "MN:Automation::displayMailSummary"
+#define __GOB_FUNCTION__ "MN:Automation::displayMainWindow"
{
#line 52 "mn-automation.gob"
g_return_if_fail(mn_shell != NULL);
- mn_summary_dialog_display();
+ mn_main_window_display();
}}
-#line 188 "mn-automation.c"
+#line 192 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 57 "mn-automation.gob"
static void
mn_automation_displayProperties (PortableServer_Servant servant, CORBA_Environment * env)
-#line 194 "mn-automation.c"
+#line 198 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::displayProperties"
{
#line 59 "mn-automation.gob"
g_return_if_fail(mn_shell != NULL);
- mn_properties_display();
+ mn_properties_dialog_display();
}}
-#line 203 "mn-automation.c"
+#line 207 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 64 "mn-automation.gob"
static void
mn_automation_displayAbout (PortableServer_Servant servant, CORBA_Environment * env)
-#line 209 "mn-automation.c"
+#line 213 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::displayAbout"
{
#line 66 "mn-automation.gob"
g_return_if_fail(mn_shell != NULL);
- mn_shell_display_about(mn_shell);
+ mn_shell_display_about_dialog(mn_shell);
}}
-#line 218 "mn-automation.c"
+#line 222 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 71 "mn-automation.gob"
static void
mn_automation_closePopup (PortableServer_Servant servant, CORBA_Environment * env)
-#line 224 "mn-automation.c"
+#line 228 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::closePopup"
{
@@ -229,19 +233,34 @@ mn_automation_closePopup (PortableServer_Servant servant, CORBA_Environment * en
g_return_if_fail(mn_shell != NULL);
mn_summary_popup_destroy();
}}
-#line 233 "mn-automation.c"
+#line 237 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 78 "mn-automation.gob"
+static void
+mn_automation_quit (PortableServer_Servant servant, CORBA_Environment * env)
+#line 243 "mn-automation.c"
+{
+#define __GOB_FUNCTION__ "MN:Automation::quit"
+{
+#line 80 "mn-automation.gob"
+
+ g_return_if_fail(mn_shell != NULL);
+ g_object_unref(mn_shell);
+ }}
+#line 252 "mn-automation.c"
+#undef __GOB_FUNCTION__
+
+#line 85 "mn-automation.gob"
MNAutomation *
mn_automation_new (void)
-#line 239 "mn-automation.c"
+#line 258 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::new"
{
-#line 80 "mn-automation.gob"
+#line 87 "mn-automation.gob"
return GET_NEW;
}}
-#line 247 "mn-automation.c"
+#line 266 "mn-automation.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-automation.gob b/src/mn-automation.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -23,9 +23,9 @@ requires 2.0.10
#include "MNAutomation.h"
%}
%{
-#include "mn-summary-dialog.h"
+#include "mn-main-window.h"
#include "mn-summary-popup.h"
-#include "mn-properties.h"
+#include "mn-properties-dialog.h"
#include "mn-shell.h"
%}
@@ -48,24 +48,24 @@ class MN:Automation from Bonobo:Object (BonoboObject GNOME_MNAutomation)
}
BonoboObject private void
- displayMailSummary (PortableServer_Servant servant, CORBA_Environment *env)
+ displayMainWindow (PortableServer_Servant servant, CORBA_Environment *env)
{
g_return_if_fail(mn_shell != NULL);
- mn_summary_dialog_display();
+ mn_main_window_display();
}
BonoboObject private void
displayProperties (PortableServer_Servant servant, CORBA_Environment *env)
{
g_return_if_fail(mn_shell != NULL);
- mn_properties_display();
+ mn_properties_dialog_display();
}
BonoboObject private void
displayAbout (PortableServer_Servant servant, CORBA_Environment *env)
{
g_return_if_fail(mn_shell != NULL);
- mn_shell_display_about(mn_shell);
+ mn_shell_display_about_dialog(mn_shell);
}
BonoboObject private void
@@ -75,6 +75,13 @@ class MN:Automation from Bonobo:Object (BonoboObject GNOME_MNAutomation)
mn_summary_popup_destroy();
}
+ BonoboObject private void
+ quit (PortableServer_Servant servant, CORBA_Environment *env)
+ {
+ g_return_if_fail(mn_shell != NULL);
+ g_object_unref(mn_shell);
+ }
+
public MNAutomation *
new (void)
{
diff --git a/src/mn-blinking-image.c b/src/mn-blinking-image.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
diff --git a/src/mn-blinking-image.gob b/src/mn-blinking-image.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-client-session.c b/src/mn-client-session.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -114,7 +114,7 @@ static int mn_client_session_write_base64 (MNClientSession *session,
unsigned int len);
static gboolean mn_client_session_sasl_fill_interact (MNClientSession *session,
sasl_interact_t *interact,
- const char *unknown_notice);
+ const char *unknown_warning);
static char *mn_client_session_sasl_get_ip_port (const struct sockaddr *addr);
#endif /* WITH_SASL */
@@ -461,7 +461,7 @@ mn_client_session_run_untrusted_dialog (const char *hostname,
gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
gtk_dialog_add_button(GTK_DIALOG(dialog), _("Co_nnect"), GTK_RESPONSE_OK);
- status = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
+ status = mn_dialog_run_nonmodal(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
gtk_widget_destroy(dialog);
gdk_flush();
@@ -638,8 +638,7 @@ mn_client_session_fill_input_buffer (MNClientSession *session)
gconstpointer
mn_client_session_read (MNClientSession *session, unsigned int nbytes)
{
- GString *printable;
- int i;
+ char *str;
g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->input_buffer != NULL, FALSE);
@@ -652,15 +651,11 @@ mn_client_session_read (MNClientSession *session, unsigned int nbytes)
return FALSE;
session->bytes_to_remove = nbytes;
-
- printable = g_string_new(NULL);
- for (i = 0; i < nbytes; i++)
- if (g_ascii_isprint(session->input_buffer->data[i]))
- g_string_append_c(printable, session->input_buffer->data[i]);
- else
- g_string_append_printf(printable, "<%02X>", (int) session->input_buffer->data[i]);
- mn_client_session_notice(session, "< %s", printable->str);
- g_string_free(printable, TRUE);
+
+ str = g_strndup(session->input_buffer->data, nbytes);
+ /* g_log() escapes unsafe and non UTF-8 characters, so this is safe */
+ mn_client_session_notice(session, "< %s", str);
+ g_free(str);
return session->input_buffer->data;
}
@@ -698,6 +693,8 @@ mn_client_session_read_line (MNClientSession *session)
session->bytes_to_remove = terminator - (char *) session->input_buffer->data + 2;
line = session->input_buffer->data;
+
+ /* g_log() escapes unsafe and non UTF-8 characters, so this is safe */
mn_client_session_notice(session, "< %s", line);
return line;
@@ -823,7 +820,7 @@ mn_client_session_write_base64 (MNClientSession *session,
static gboolean
mn_client_session_sasl_fill_interact (MNClientSession *session,
sasl_interact_t *interact,
- const char *unknown_notice)
+ const char *unknown_warning)
{
sasl_interact_t *i;
@@ -847,7 +844,7 @@ mn_client_session_sasl_fill_interact (MNClientSession *session,
default:
data = NULL;
- mn_client_session_notice(session, unknown_notice);
+ mn_client_session_warning(session, unknown_warning);
};
if (data)
@@ -917,12 +914,12 @@ mn_client_session_sasl_authentication_start (MNClientSession *session,
g_return_val_if_fail(session->callbacks->sasl_get_username != NULL, FALSE);
g_return_val_if_fail(session->callbacks->sasl_get_password != NULL, FALSE);
g_return_val_if_fail(service != NULL, 0);
- g_return_val_if_fail(mechanisms != NULL, 0);
+ g_return_val_if_fail(mechanisms != NULL || forced_mechanism != NULL, 0);
session->sasl_available = mn_sasl_use(&err);
if (! session->sasl_available)
{
- mn_client_session_notice(session, _("unable to initialize the SASL library: %s"), err->message);
+ mn_client_session_warning(session, _("unable to initialize the SASL library: %s"), err->message);
g_error_free(err);
return FALSE;
}
@@ -931,13 +928,13 @@ mn_client_session_sasl_authentication_start (MNClientSession *session,
if (getsockname(session->s, &name, &namelen) >= 0)
local_ip_port = mn_client_session_sasl_get_ip_port(&name);
else
- mn_client_session_notice(session, _("unable to retrieve local address of socket: %s"), g_strerror(errno));
+ mn_client_session_warning(session, _("unable to retrieve local address of socket: %s"), g_strerror(errno));
namelen = sizeof(name);
if (getpeername(session->s, &name, &namelen) >= 0)
remote_ip_port = mn_client_session_sasl_get_ip_port(&name);
else
- mn_client_session_notice(session, _("unable to retrieve remote address of socket: %s"), g_strerror(errno));
+ mn_client_session_warning(session, _("unable to retrieve remote address of socket: %s"), g_strerror(errno));
result = sasl_client_new(service,
session->hostname,
@@ -971,7 +968,7 @@ mn_client_session_sasl_authentication_start (MNClientSession *session,
security.property_values = NULL;
if (sasl_setprop(session->sasl_conn, SASL_SEC_PROPS, &security) != SASL_OK)
- mn_client_session_notice(session, _("warning: unable to set SASL security properties: %s"), sasl_errdetail(session->sasl_conn));
+ mn_client_session_warning(session, _("unable to set SASL security properties: %s"), sasl_errdetail(session->sasl_conn));
mechanisms_string = g_string_new(NULL);
if (forced_mechanism)
@@ -1014,11 +1011,11 @@ mn_client_session_sasl_authentication_start (MNClientSession *session,
break;
default:
- mn_client_session_notice(session, _("unable to start SASL authentication: %s"), sasl_errdetail(session->sasl_conn));
+ mn_client_session_warning(session, _("unable to start SASL authentication: %s"), sasl_errdetail(session->sasl_conn));
}
}
else
- mn_client_session_notice(session, _("unable to create a SASL connection: %s"), sasl_errdetail(session->sasl_conn));
+ mn_client_session_warning(session, _("unable to create a SASL connection: %s"), sasl_errdetail(session->sasl_conn));
return FALSE;
}
@@ -1072,7 +1069,7 @@ mn_client_session_sasl_authentication_step (MNClientSession *session,
return mn_client_session_write(session, "*");
default:
- mn_client_session_notice(session, _("%s, aborting SASL authentication"), sasl_errdetail(session->sasl_conn));
+ mn_client_session_warning(session, _("%s, aborting SASL authentication"), sasl_errdetail(session->sasl_conn));
return mn_client_session_write(session, "*");
}
}
@@ -1130,7 +1127,7 @@ mn_client_session_sasl_authentication_done (MNClientSession *session)
}
}
else
- mn_client_session_notice(session, _("warning: unable to get SASL_SSF property: %s"), sasl_errdetail(session->sasl_conn));
+ mn_client_session_warning(session, _("warning: unable to get SASL_SSF property: %s"), sasl_errdetail(session->sasl_conn));
return TRUE;
}
@@ -1166,6 +1163,28 @@ mn_client_session_notice (MNClientSession *session,
}
}
+void
+mn_client_session_warning (MNClientSession *session,
+ const char *format,
+ ...)
+{
+ g_return_if_fail(session != NULL);
+ g_return_if_fail(format != NULL);
+
+ if (session->callbacks->warning)
+ {
+ va_list args;
+ char *str;
+
+ va_start(args, format);
+ str = g_strdup_vprintf(format, args);
+ va_end(args);
+
+ session->callbacks->warning(session, str, session->private);
+ g_free(str);
+ }
+}
+
int
mn_client_session_error (MNClientSession *session,
const char *format,
diff --git a/src/mn-client-session.h b/src/mn-client-session.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -51,6 +51,9 @@ typedef struct
void (*notice) (MNClientSession *session,
const char *str,
MNClientSessionPrivate *private);
+ void (*warning) (MNClientSession *session,
+ const char *str,
+ MNClientSessionPrivate *private);
MNClientSessionResponse *(*response_new) (MNClientSession *session,
const char *input,
@@ -114,6 +117,9 @@ int mn_client_session_sasl_get_ssf (MNClientSession *session);
void mn_client_session_notice (MNClientSession *session,
const char *format,
...) G_GNUC_PRINTF(2, 3);
+void mn_client_session_warning (MNClientSession *session,
+ const char *format,
+ ...);
int mn_client_session_error (MNClientSession *session,
const char *format,
...) G_GNUC_PRINTF(2, 3);
diff --git a/src/mn-conf.c b/src/mn-conf.c
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1999 Free Software Foundation, Inc.
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 1999 Free Software Foundation, Inc.
+ * Copyright (C) 2003-2005 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
@@ -18,29 +18,108 @@
*/
#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
#include <stdarg.h>
#include <gnome.h>
#include <eel/eel.h>
#include "mn-util.h"
#include "mn-conf.h"
+#include "mn-shell.h"
/*** cpp *********************************************************************/
+/* obsolete keys */
+#define MN_CONF_OBSOLETE_LOCAL_NAMESPACE \
+ MN_CONF_NAMESPACE "/local"
+#define MN_CONF_OBSOLETE_LOCAL_ENABLED \
+ MN_CONF_OBSOLETE_LOCAL_NAMESPACE "/enabled"
+#define MN_CONF_OBSOLETE_LOCAL_DELAY_MINUTES \
+ MN_CONF_OBSOLETE_LOCAL_NAMESPACE "/delay/minutes"
+#define MN_CONF_OBSOLETE_LOCAL_DELAY_SECONDS \
+ MN_CONF_OBSOLETE_LOCAL_NAMESPACE "/delay/seconds"
+#define MN_CONF_OBSOLETE_REMOTE_NAMESPACE \
+ MN_CONF_NAMESPACE "/remote"
+#define MN_CONF_OBSOLETE_REMOTE_ENABLED \
+ MN_CONF_OBSOLETE_REMOTE_NAMESPACE "/enabled"
+#define MN_CONF_OBSOLETE_REMOTE_DELAY_MINUTES \
+ MN_CONF_OBSOLETE_REMOTE_NAMESPACE "/delay/minutes"
+#define MN_CONF_OBSOLETE_REMOTE_DELAY_SECONDS \
+ MN_CONF_OBSOLETE_REMOTE_NAMESPACE "/delay/seconds"
+#define MN_CONF_OBSOLETE_COMMANDS_CLICKED_NAMESPACE \
+ MN_CONF_COMMANDS_NAMESPACE "/clicked"
+#define MN_CONF_OBSOLETE_COMMANDS_CLICKED_ENABLED \
+ MN_CONF_OBSOLETE_COMMANDS_CLICKED_NAMESPACE "/enabled"
+#define MN_CONF_OBSOLETE_COMMANDS_CLICKED_COMMAND \
+ MN_CONF_OBSOLETE_COMMANDS_CLICKED_NAMESPACE "/command"
+#define MN_CONF_OBSOLETE_COMMANDS_DOUBLE_CLICKED_NAMESPACE \
+ MN_CONF_COMMANDS_NAMESPACE "/double-clicked"
+#define MN_CONF_OBSOLETE_COMMANDS_DOUBLE_CLICKED_ENABLED \
+ MN_CONF_OBSOLETE_COMMANDS_DOUBLE_CLICKED_NAMESPACE "/enabled"
+#define MN_CONF_OBSOLETE_COMMANDS_DOUBLE_CLICKED_COMMAND \
+ MN_CONF_OBSOLETE_COMMANDS_DOUBLE_CLICKED_NAMESPACE "/command"
+#define MN_CONF_OBSOLETE_PREFERENCES_DIALOG \
+ MN_CONF_UI_NAMESPACE "/preferences-dialog"
+#define MN_CONF_OBSOLETE_SUMMARY_DIALOG \
+ MN_CONF_UI_NAMESPACE "/summary-dialog"
+#define MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_TITLE_ENABLED \
+ MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_NAMESPACE "/enabled"
+#define MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_ENABLED \
+ MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_NAMESPACE "/enabled"
+#define MN_CONF_OBSOLETE_DOUBLE_CLICK_ACTION \
+ MN_CONF_NAMESPACE "/double-click-action"
+
+#define BLOCK(info) \
+ g_signal_handler_block((info)->object, (info)->handler_id)
+#define UNBLOCK(info) \
+ g_signal_handler_unblock((info)->object, (info)->handler_id)
+
+#define LINK_INFO(ptr) ((LinkInfo *) (ptr))
+
#define SESSION_MANUAL_CONFIG_PREFIX "session-manual/"
#define SESSION_MANUAL_NAME "Default"
-#define WINDOW_WIDTH_KEY "mn-conf-window-width-key"
-#define WINDOW_HEIGHT_KEY "mn-conf-window-height-key"
+/*** types *******************************************************************/
-#define COMBO_BOX_KEY "mn-conf-combo-box-key"
-#define COMBO_BOX_STRING_COLUMN "mn-conf-combo-box-string-column"
+typedef struct
+{
+ gpointer object;
+ char *key;
+ unsigned long handler_id;
+ GDestroyNotify finalize;
+} LinkInfo;
-#define RADIO_BUTTON_KEY "mn-conf-radio-button-key"
-#define RADIO_BUTTON_STRING "mn-conf-radio-button-string"
+typedef struct
+{
+ LinkInfo parent;
+ int string_column;
+} LinkComboBoxToStringInfo;
-#define STRING_TO_FONT(str) ((str) ? (str) : "Sans 10")
+typedef struct
+{
+ LinkInfo parent;
+ char *str;
+} LinkRadioButtonToStringInfo;
-/*** types *******************************************************************/
+typedef struct
+{
+ LinkInfo parent;
+ char *width_key;
+ char *height_key;
+} LinkWindowInfo;
+
+typedef struct
+{
+ LinkInfo parent;
+ GEnumClass *enum_class;
+} LinkRadioActionInfo;
+
+typedef struct
+{
+ LinkInfo parent;
+ GParamSpec *pspec;
+} LinkObjectInfo;
typedef struct
{
@@ -49,62 +128,79 @@ typedef struct
char **argv;
} StartupClient;
+/*** variables ***************************************************************/
+
+const char *mn_conf_dot_dir = NULL;
+
/*** functions ***************************************************************/
-static void mn_conf_link_combo_box_to_string_update_active (GtkComboBox *combo,
- int string_column,
- const char *value);
-static void mn_conf_link_combo_box_to_string_changed_h (GtkComboBox *combo,
- gpointer user_data);
+static void mn_conf_handle_obsolete_key (const char *obsolete, const char *new);
+
+static void mn_conf_link_weak_notify_cb (gpointer data, GObject *former_object);
+
+static void mn_conf_link_combo_box_to_string_set (LinkComboBoxToStringInfo *info,
+ const GConfValue *value);
+static void mn_conf_link_combo_box_to_string_h (GtkComboBox *combo,
+ gpointer user_data);
static void mn_conf_link_combo_box_to_string_notify_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data);
static void mn_conf_link_radio_button_to_string (GtkRadioButton *radio,
const char *key,
const char *str);
-static void mn_conf_link_radio_button_to_string_toggled_h (GtkToggleButton *toggle,
- gpointer user_data);
+static void mn_conf_link_radio_button_to_string_h (GtkToggleButton *toggle,
+ gpointer user_data);
static void mn_conf_link_radio_button_to_string_notify_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data);
+static void mn_conf_link_radio_button_to_string_free_info (LinkRadioButtonToStringInfo *info);
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,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data);
-
-static void mn_conf_link_toggle_button_h (GtkToggleButton*button,
+static void mn_conf_link_window_free_info (LinkWindowInfo *info);
+
+static void mn_conf_link_radio_action_set (LinkRadioActionInfo *info,
+ const GConfValue *value);
+static void mn_conf_link_radio_action_h (GtkRadioAction *action,
+ GtkRadioAction *current,
+ gpointer user_data);
+static void mn_conf_link_radio_action_notify_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
+static void mn_conf_link_radio_action_free_info (LinkRadioActionInfo *info);
+
+static void mn_conf_link_toggle_action_h (GtkToggleAction *action,
gpointer user_data);
-static void mn_conf_link_toggle_button_notify_cb (GConfClient *client,
- guint cnxn_id,
+static void mn_conf_link_toggle_action_notify_cb (GConfClient *client,
+ unsigned int 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,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data);
-static void mn_conf_link_font_button_h (GtkFontButton *button,
- gpointer user_data);
-static void mn_conf_link_font_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_object_set (LinkObjectInfo *info,
+ const GConfValue *value);
+static void mn_conf_link_object_h (GObject *object,
+ GParamSpec *pspec,
+ gpointer user_data);
+static void mn_conf_link_object_notify_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
static void mn_conf_startup_client_free (StartupClient *client);
static void mn_conf_startup_clients_free (GSList *list);
@@ -124,19 +220,91 @@ static void mn_conf_notification_add_weak_notify_cb (gpointer data,
void
mn_conf_init (void)
{
+ g_return_if_fail(mn_conf_dot_dir == NULL);
+
+ /* create our dot dir if it does not already exist */
+
+ mn_conf_dot_dir = g_build_filename(g_get_home_dir(),
+ GNOME_DOT_GNOME,
+ "mail-notification",
+ NULL);
+
+ if (! g_file_test(mn_conf_dot_dir, G_FILE_TEST_IS_DIR))
+ {
+ if (mkdir(mn_conf_dot_dir, 0755) < 0)
+ mn_error_dialog(NULL,
+ NULL,
+ NULL,
+ _("A directory creation error has occurred"),
+ _("Unable to create directory \"%s\": %s."),
+ mn_conf_dot_dir,
+ g_strerror(errno));
+ }
+
/* monitor our namespace */
+
eel_gconf_monitor_add(MN_CONF_NAMESPACE);
+
+ /* import obsolete keys */
+
+ mn_conf_handle_obsolete_key(MN_CONF_OBSOLETE_PREFERENCES_DIALOG "/height",
+ MN_CONF_PROPERTIES_DIALOG "/height");
+ mn_conf_handle_obsolete_key(MN_CONF_OBSOLETE_PREFERENCES_DIALOG "/width",
+ MN_CONF_PROPERTIES_DIALOG "/width");
+
+ if (! mn_conf_is_set(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_ASPECT_SOURCE)
+ && mn_conf_is_set(MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_TITLE_ENABLED)
+ && mn_conf_is_set(MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_ENABLED)
+ && eel_gconf_get_boolean(MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_TITLE_ENABLED)
+ && eel_gconf_get_boolean(MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_ENABLED))
+ {
+ GEnumClass *enum_class;
+ GEnumValue *enum_value;
+
+ enum_class = g_type_class_ref(MN_TYPE_ASPECT_SOURCE);
+ enum_value = g_enum_get_value(enum_class, MN_ASPECT_SOURCE_CUSTOM);
+ g_return_if_fail(enum_value != NULL);
+
+ eel_gconf_set_string(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_ASPECT_SOURCE, enum_value->value_nick);
+ g_type_class_unref(enum_class);
+ }
+
+ mn_conf_handle_obsolete_key(MN_CONF_OBSOLETE_DOUBLE_CLICK_ACTION,
+ MN_CONF_DOUBLE_CLICK_ACTION_2);
+}
+
+static void
+mn_conf_handle_obsolete_key (const char *obsolete, const char *new)
+{
+ g_return_if_fail(obsolete != NULL);
+ g_return_if_fail(new != NULL);
+
+ if (! mn_conf_is_set(new) && mn_conf_is_set(obsolete))
+ {
+ GConfValue *value;
+
+ value = eel_gconf_get_value(obsolete);
+ if (value)
+ {
+ mn_conf_set_value(new, value);
+ gconf_value_free(value);
+ }
+ }
}
void
mn_conf_unset_obsolete (void)
{
const char *obsolete[] = {
- MN_CONF_LOCAL_NAMESPACE,
- MN_CONF_REMOTE_NAMESPACE,
- MN_CONF_COMMANDS_CLICKED_NAMESPACE,
- MN_CONF_COMMANDS_DOUBLE_CLICKED_NAMESPACE,
- MN_CONF_PREFERENCES_DIALOG
+ MN_CONF_OBSOLETE_LOCAL_NAMESPACE,
+ MN_CONF_OBSOLETE_REMOTE_NAMESPACE,
+ MN_CONF_OBSOLETE_COMMANDS_CLICKED_NAMESPACE,
+ MN_CONF_OBSOLETE_COMMANDS_DOUBLE_CLICKED_NAMESPACE,
+ MN_CONF_OBSOLETE_PREFERENCES_DIALOG,
+ MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_TITLE_ENABLED,
+ MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_ENABLED,
+ MN_CONF_OBSOLETE_SUMMARY_DIALOG,
+ MN_CONF_OBSOLETE_DOUBLE_CLICK_ACTION
};
int i;
@@ -167,142 +335,235 @@ mn_conf_recursive_unset (const char *key, GConfUnsetFlags flags)
eel_gconf_handle_error(&err);
}
+gboolean
+mn_conf_is_set (const char *key)
+{
+ GConfValue *value;
+ GConfClient *client;
+ GError *err = NULL;
+ gboolean set = FALSE;
+
+ g_return_val_if_fail(key != NULL, FALSE);
+
+ client = eel_gconf_client_get_global();
+ g_return_val_if_fail(client != NULL, FALSE);
+
+ value = gconf_client_get_without_default(client, key, &err);
+ if (value)
+ {
+ set = TRUE;
+ gconf_value_free(value);
+ }
+
+ if (eel_gconf_handle_error(&err))
+ set = FALSE;
+
+ return set;
+}
+
void
-mn_conf_link (GtkWidget *widget, ...)
+mn_conf_set_value (const char *key, const GConfValue *value)
+{
+ GConfClient *client;
+ GError *err = NULL;
+
+ g_return_if_fail(key != NULL);
+ g_return_if_fail(value != NULL);
+
+ client = eel_gconf_client_get_global();
+ g_return_if_fail(client != NULL);
+
+ gconf_client_set(client, key, value, &err);
+ eel_gconf_handle_error(&err);
+}
+
+void
+mn_conf_link (gpointer object, ...)
{
va_list args;
- va_start(args, widget);
- while (widget)
+ va_start(args, object);
+ while (object)
{
const char *key;
const char *signal_name;
+ gpointer free_me = NULL;
GCallback signal_handler;
GConfClientNotifyFunc notification_cb;
+ LinkInfo *info = NULL;
key = va_arg(args, const char *);
g_return_if_fail(key != NULL);
/* the order of these tests is important */
- if (GTK_IS_WINDOW(widget))
+ if (GTK_IS_WINDOW(object))
{
- 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);
+ LinkWindowInfo *window_info;
+
+ window_info = g_new0(LinkWindowInfo, 1);
+ window_info->width_key = g_strdup_printf("%s/width", key);
+ window_info->height_key = g_strdup_printf("%s/height", key);
+ info = LINK_INFO(window_info);
+ info->finalize = (GDestroyNotify) mn_conf_link_window_free_info;
- gtk_window_set_default_size(GTK_WINDOW(widget),
- eel_gconf_get_integer(width_key),
- eel_gconf_get_integer(height_key));
+ gtk_window_set_default_size(object,
+ eel_gconf_get_integer(window_info->width_key),
+ eel_gconf_get_integer(window_info->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))
+ else if (GTK_IS_RADIO_ACTION(object))
{
- 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;
+ LinkRadioActionInfo *radio_action_info;
+ GType enum_type;
+ GConfValue *value;
+
+ enum_type = va_arg(args, GType);
+ g_return_if_fail(enum_type != 0);
+
+ radio_action_info = g_new0(LinkRadioActionInfo, 1);
+ radio_action_info->enum_class = g_type_class_ref(enum_type);
+ info = LINK_INFO(radio_action_info);
+ info->object = object;
+ info->finalize = (GDestroyNotify) mn_conf_link_radio_action_free_info;
+
+ value = eel_gconf_get_value(key);
+ mn_conf_link_radio_action_set(radio_action_info, value);
+ if (value)
+ gconf_value_free(value);
+
+ signal_name = g_strdup("changed");
+ signal_handler = G_CALLBACK(mn_conf_link_radio_action_h);
+ notification_cb = mn_conf_link_radio_action_notify_cb;
+ }
+ else if (GTK_IS_TOGGLE_ACTION(object))
+ {
+ gtk_toggle_action_set_active(object, eel_gconf_get_boolean(key));
+
+ signal_name = g_strdup("toggled");
+ signal_handler = G_CALLBACK(mn_conf_link_toggle_action_h);
+ notification_cb = mn_conf_link_toggle_action_notify_cb;
}
- else if (GTK_IS_SPIN_BUTTON(widget))
+ else if (GTK_IS_SPIN_BUTTON(object))
{
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), eel_gconf_get_integer(key));
+ gtk_spin_button_set_value(object, 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_FONT_BUTTON(widget))
+ else if (G_IS_OBJECT(object))
{
- char *str;
+ LinkObjectInfo *object_info;
+ const char *property_name;
+ GConfValue *value;
- str = eel_gconf_get_string(key);
- gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), STRING_TO_FONT(str));
- g_free(str);
+ property_name = va_arg(args, const char *);
+ g_return_if_fail(property_name != NULL);
- signal_name = "font-set";
- signal_handler = G_CALLBACK(mn_conf_link_font_button_h);
- notification_cb = mn_conf_link_font_button_notify_cb;
- }
- else if (GTK_IS_ENTRY(widget))
- {
- char *str;
+ object_info = g_new0(LinkObjectInfo, 1);
+ object_info->pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(object), property_name);
+ g_return_if_fail(object_info->pspec != NULL);
- str = eel_gconf_get_string(key);
- gtk_entry_set_text(GTK_ENTRY(widget), MN_POINTER_TO_STRING(str));
- g_free(str);
+ info = LINK_INFO(object_info);
+ info->object = object;
- signal_name = "changed";
- signal_handler = G_CALLBACK(mn_conf_link_entry_h);
- notification_cb = mn_conf_link_entry_notify_cb;
+ value = eel_gconf_get_value(key);
+ mn_conf_link_object_set(object_info, value);
+ if (value)
+ gconf_value_free(value);
+
+ signal_name = free_me = g_strconcat("notify::", property_name, NULL);
+ signal_handler = G_CALLBACK(mn_conf_link_object_h);
+ notification_cb = mn_conf_link_object_notify_cb;
}
else
g_return_if_reached();
- g_signal_connect_data(widget, signal_name, signal_handler, g_strdup(key), (GClosureNotify) g_free, 0);
- mn_conf_notification_add(widget, key, notification_cb, widget);
+ if (! info)
+ info = g_new0(LinkInfo, 1);
+
+ info->object = object;
+ g_free(info->key);
+ info->key = g_strdup(key);
+ info->handler_id = g_signal_connect(object, signal_name, signal_handler, info);
+ mn_conf_notification_add(object, key, notification_cb, info);
+ g_object_weak_ref(object, mn_conf_link_weak_notify_cb, info);
- widget = va_arg(args, GtkWidget *);
+ g_free(free_me);
+ object = va_arg(args, gpointer);
}
va_end(args);
}
+static void
+mn_conf_link_weak_notify_cb (gpointer data, GObject *former_object)
+{
+ LinkInfo *info = data;
+
+ if (info->finalize)
+ info->finalize(info);
+ g_free(info);
+}
+
void
mn_conf_link_combo_box_to_string (GtkComboBox *combo,
int string_column,
const char *key)
{
- char *value;
+ LinkComboBoxToStringInfo *info;
+ GConfValue *value;
g_return_if_fail(GTK_IS_COMBO_BOX(combo));
g_return_if_fail(key != NULL);
- g_object_set_data_full(G_OBJECT(combo), COMBO_BOX_KEY, g_strdup(key), g_free);
- g_object_set_data(G_OBJECT(combo), COMBO_BOX_STRING_COLUMN, GINT_TO_POINTER(string_column));
+ info = g_new0(LinkComboBoxToStringInfo, 1);
+ info->string_column = string_column;
+ LINK_INFO(info)->object = combo;
+ LINK_INFO(info)->key = g_strdup(key);
- value = eel_gconf_get_string(key);
- mn_conf_link_combo_box_to_string_update_active(combo, string_column, value);
- g_free(value);
+ value = eel_gconf_get_value(key);
+ mn_conf_link_combo_box_to_string_set(info, value);
+ if (value)
+ eel_gconf_value_free(value);
- g_signal_connect(combo, "changed", G_CALLBACK(mn_conf_link_combo_box_to_string_changed_h), NULL);
- mn_conf_notification_add(combo, key, mn_conf_link_combo_box_to_string_notify_cb, combo);
+ LINK_INFO(info)->handler_id = g_signal_connect(combo, "changed", G_CALLBACK(mn_conf_link_combo_box_to_string_h), info);
+ mn_conf_notification_add(combo, key, mn_conf_link_combo_box_to_string_notify_cb, info);
+ g_object_weak_ref(G_OBJECT(combo), mn_conf_link_weak_notify_cb, info);
}
static void
-mn_conf_link_combo_box_to_string_update_active (GtkComboBox *combo,
- int string_column,
- const char *value)
+mn_conf_link_combo_box_to_string_set (LinkComboBoxToStringInfo *info,
+ const GConfValue *value)
{
- g_return_if_fail(GTK_IS_COMBO_BOX(combo));
+ const char *str;
- if (value)
+ g_return_if_fail(info != NULL);
+
+ str = value ? gconf_value_get_string(value) : NULL;
+ if (str)
{
GtkTreeModel *model;
GtkTreeIter iter;
gboolean valid;
- model = gtk_combo_box_get_model(combo);
+ model = gtk_combo_box_get_model(LINK_INFO(info)->object);
valid = gtk_tree_model_get_iter_first(model, &iter);
while (valid)
{
- char *this_value;
+ char *this_str;
gboolean found;
- gtk_tree_model_get(model, &iter, string_column, &this_value, -1);
- found = this_value && ! strcmp(this_value, value);
- g_free(this_value);
+ gtk_tree_model_get(model, &iter, info->string_column, &this_str, -1);
+ found = this_str && ! strcmp(this_str, str);
+ g_free(this_str);
if (found)
{
- gtk_combo_box_set_active_iter(combo, &iter);
+ gtk_combo_box_set_active_iter(LINK_INFO(info)->object, &iter);
break;
}
@@ -312,8 +573,7 @@ mn_conf_link_combo_box_to_string_update_active (GtkComboBox *combo,
}
static void
-mn_conf_link_combo_box_to_string_changed_h (GtkComboBox *combo,
- gpointer user_data)
+mn_conf_link_combo_box_to_string_h (GtkComboBox *combo, gpointer user_data)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -321,29 +581,27 @@ mn_conf_link_combo_box_to_string_changed_h (GtkComboBox *combo,
model = gtk_combo_box_get_model(combo);
if (gtk_combo_box_get_active_iter(combo, &iter))
{
- const char *key = g_object_get_data(G_OBJECT(combo), COMBO_BOX_KEY);
- int string_column = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(combo), COMBO_BOX_STRING_COLUMN));
+ LinkComboBoxToStringInfo *info = user_data;
char *value;
- gtk_tree_model_get(model, &iter, string_column, &value, -1);
- eel_gconf_set_string(key, value);
+ gtk_tree_model_get(model, &iter, info->string_column, &value, -1);
+ eel_gconf_set_string(LINK_INFO(info)->key, value);
g_free(value);
}
}
static void
mn_conf_link_combo_box_to_string_notify_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
- GtkComboBox *combo = user_data;
- int string_column = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(combo), COMBO_BOX_STRING_COLUMN));
- GConfValue *value = gconf_entry_get_value(entry);
- const char *str = value ? gconf_value_get_string(value) : NULL;
+ LinkComboBoxToStringInfo *info = user_data;
GDK_THREADS_ENTER();
- mn_conf_link_combo_box_to_string_update_active(combo, string_column, str);
+ BLOCK(LINK_INFO(info));
+ mn_conf_link_combo_box_to_string_set(info, gconf_entry_get_value(entry));
+ UNBLOCK(LINK_INFO(info));
GDK_THREADS_LEAVE();
}
@@ -384,6 +642,7 @@ mn_conf_link_radio_button_to_string (GtkRadioButton *radio,
const char *key,
const char *str)
{
+ LinkRadioButtonToStringInfo *info;
char *current_str;
g_return_if_fail(GTK_IS_RADIO_BUTTON(radio));
@@ -398,170 +657,270 @@ mn_conf_link_radio_button_to_string (GtkRadioButton *radio,
g_free(current_str);
}
- g_object_set_data_full(G_OBJECT(radio), RADIO_BUTTON_KEY, g_strdup(key), g_free);
- g_object_set_data_full(G_OBJECT(radio), RADIO_BUTTON_STRING, g_strdup(str), g_free);
-
- g_signal_connect(radio, "toggled", G_CALLBACK(mn_conf_link_radio_button_to_string_toggled_h), NULL);
- mn_conf_notification_add(radio, key, mn_conf_link_radio_button_to_string_notify_cb, radio);
+ info = g_new0(LinkRadioButtonToStringInfo, 1);
+ info->str = g_strdup(str);
+ LINK_INFO(info)->object = radio;
+ LINK_INFO(info)->key = g_strdup(key);
+ LINK_INFO(info)->finalize = (GDestroyNotify) mn_conf_link_radio_button_to_string_free_info;
+
+ LINK_INFO(info)->handler_id = g_signal_connect(radio, "toggled", G_CALLBACK(mn_conf_link_radio_button_to_string_h), info);
+ mn_conf_notification_add(radio, key, mn_conf_link_radio_button_to_string_notify_cb, info);
+ g_object_weak_ref(G_OBJECT(radio), mn_conf_link_weak_notify_cb, info);
}
static void
-mn_conf_link_radio_button_to_string_toggled_h (GtkToggleButton *toggle,
- gpointer user_data)
+mn_conf_link_radio_button_to_string_h (GtkToggleButton *toggle,
+ gpointer user_data)
{
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle)))
{
- const char *key = g_object_get_data(G_OBJECT(toggle), RADIO_BUTTON_KEY);
- const char *str = g_object_get_data(G_OBJECT(toggle), RADIO_BUTTON_STRING);
+ LinkRadioButtonToStringInfo *info = user_data;
- eel_gconf_set_string(key, str);
+ eel_gconf_set_string(LINK_INFO(info)->key, info->str);
}
}
static void
mn_conf_link_radio_button_to_string_notify_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
- GtkRadioButton *radio = user_data;
+ LinkRadioButtonToStringInfo *info = user_data;
GConfValue *value = gconf_entry_get_value(entry);
const char *str = value ? gconf_value_get_string(value) : NULL;
- if (str)
+ if (str && ! strcmp(str, info->str))
{
GDK_THREADS_ENTER();
-
- if (! strcmp(str, g_object_get_data(G_OBJECT(radio), RADIO_BUTTON_STRING)))
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), TRUE);
-
+ BLOCK(LINK_INFO(info));
+ gtk_toggle_button_set_active(LINK_INFO(info)->object, TRUE);
+ UNBLOCK(LINK_INFO(info));
GDK_THREADS_LEAVE();
}
}
+static void
+mn_conf_link_radio_button_to_string_free_info (LinkRadioButtonToStringInfo *info)
+{
+ g_free(info->str);
+}
+
static gboolean
mn_conf_link_window_h (GtkWidget *widget,
GdkEventConfigure *event,
gpointer user_data)
{
- 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);
+ LinkWindowInfo *info = user_data;
- eel_gconf_set_integer(width_key, event->width);
- eel_gconf_set_integer(height_key, event->height);
+ eel_gconf_set_integer(info->width_key, event->width);
+ eel_gconf_set_integer(info->height_key, event->height);
return FALSE;
}
static void
mn_conf_link_window_notify_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
- GtkWindow *window = user_data;
- const char *width_key;
- const char *height_key;
+ LinkWindowInfo *info = user_data;
GDK_THREADS_ENTER();
- width_key = g_object_get_data(G_OBJECT(window), WINDOW_WIDTH_KEY);
- height_key = g_object_get_data(G_OBJECT(window), WINDOW_HEIGHT_KEY);
- gtk_window_resize(window,
- eel_gconf_get_integer(width_key),
- eel_gconf_get_integer(height_key));
+ BLOCK(LINK_INFO(info));
+ gtk_window_resize(LINK_INFO(info)->object,
+ eel_gconf_get_integer(info->width_key),
+ eel_gconf_get_integer(info->height_key));
+ UNBLOCK(LINK_INFO(info));
GDK_THREADS_LEAVE();
}
static void
-mn_conf_link_toggle_button_h (GtkToggleButton *button, gpointer user_data)
+mn_conf_link_window_free_info (LinkWindowInfo *info)
{
- const char *key = user_data;
- eel_gconf_set_boolean(key, gtk_toggle_button_get_active(button));
+ g_free(info->width_key);
+ g_free(info->height_key);
}
static void
-mn_conf_link_toggle_button_notify_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+mn_conf_link_radio_action_set (LinkRadioActionInfo *info,
+ const GConfValue *value)
{
- GConfValue *value = gconf_entry_get_value(entry);
- GtkToggleButton *button = user_data;
+ GEnumValue *enum_value;
+ const char *nick;
+
+ g_return_if_fail(info != NULL);
+
+ if (! value)
+ return;
+
+ nick = gconf_value_get_string(value);
+ enum_value = nick ? g_enum_get_value_by_nick(info->enum_class, nick) : NULL;
+
+ if (enum_value)
+ {
+ GSList *l;
+
+ MN_LIST_FOREACH(l, gtk_radio_action_get_group(LINK_INFO(info)->object))
+ {
+ GtkRadioAction *this_action = l->data;
+ int this_value;
+
+ g_object_get(this_action, "value", &this_value, NULL);
+ if (this_value == enum_value->value)
+ {
+ gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(this_action), TRUE);
+ break;
+ }
+ }
+ }
+}
+
+static void
+mn_conf_link_radio_action_h (GtkRadioAction *action,
+ GtkRadioAction *current,
+ gpointer user_data)
+{
+ LinkRadioActionInfo *info = user_data;
+ int current_value;
+ GEnumValue *enum_value;
+
+ g_object_get(current, "value", ¤t_value, NULL);
+
+ enum_value = g_enum_get_value(info->enum_class, current_value);
+ g_return_if_fail(enum_value != NULL);
+
+ eel_gconf_set_string(LINK_INFO(info)->key, enum_value->value_nick);
+}
+
+static void
+mn_conf_link_radio_action_notify_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
+{
+ LinkRadioActionInfo *info = user_data;
GDK_THREADS_ENTER();
- gtk_toggle_button_set_active(button, value ? gconf_value_get_bool(value) : FALSE);
+ BLOCK(LINK_INFO(info));
+ mn_conf_link_radio_action_set(info, gconf_entry_get_value(entry));
+ UNBLOCK(LINK_INFO(info));
GDK_THREADS_LEAVE();
}
static void
-mn_conf_link_spin_button_h (GtkSpinButton *button, gpointer user_data)
+mn_conf_link_radio_action_free_info (LinkRadioActionInfo *info)
{
- const char *key = user_data;
- eel_gconf_set_integer(key, gtk_spin_button_get_value_as_int(button));
+ g_type_class_unref(info->enum_class);
}
static void
-mn_conf_link_spin_button_notify_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+mn_conf_link_toggle_action_h (GtkToggleAction *action,
+ gpointer user_data)
{
- GConfValue *value = gconf_entry_get_value(entry);
- GtkSpinButton *button = user_data;
+ LinkInfo *info = user_data;
+
+ eel_gconf_set_boolean(info->key, gtk_toggle_action_get_active(action));
+}
+static void
+mn_conf_link_toggle_action_notify_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
+{
+ LinkInfo *info = user_data;
+ GConfValue *value = gconf_entry_get_value(entry);
+
GDK_THREADS_ENTER();
- gtk_spin_button_set_value(button, value ? gconf_value_get_int(value) : 0);
+ BLOCK(info);
+ gtk_toggle_action_set_active(info->object, value ? gconf_value_get_bool(value) : FALSE);
+ UNBLOCK(info);
GDK_THREADS_LEAVE();
}
static void
-mn_conf_link_font_button_h (GtkFontButton *button, gpointer user_data)
+mn_conf_link_spin_button_h (GtkSpinButton *button, gpointer user_data)
{
- const char *key = user_data;
+ LinkInfo *info = user_data;
- eel_gconf_set_string(key, gtk_font_button_get_font_name(button));
+ eel_gconf_set_integer(info->key, gtk_spin_button_get_value_as_int(button));
}
static void
-mn_conf_link_font_button_notify_cb (GConfClient *client,
- guint cnxn_id,
+mn_conf_link_spin_button_notify_cb (GConfClient *client,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
- GtkFontButton *button = user_data;
GConfValue *value = gconf_entry_get_value(entry);
- const char *str = value ? gconf_value_get_string(value) : NULL;
+ LinkInfo *info = user_data;
GDK_THREADS_ENTER();
- gtk_font_button_set_font_name(button, STRING_TO_FONT(str));
+ BLOCK(info);
+ gtk_spin_button_set_value(info->object, value ? gconf_value_get_int(value) : 0);
+ UNBLOCK(info);
GDK_THREADS_LEAVE();
}
static void
-mn_conf_link_entry_h (GtkEditable *editable, gpointer user_data)
+mn_conf_link_object_set (LinkObjectInfo *info, const GConfValue *value)
{
- const char *key = user_data;
- const char *str;
+ GValue gvalue = { 0, };
+
+ g_return_if_fail(info != NULL);
+
+ if (! value)
+ return;
- str = gtk_entry_get_text(GTK_ENTRY(editable));
- if (*str)
- eel_gconf_set_string(key, str);
+ g_value_init(&gvalue, G_PARAM_SPEC_VALUE_TYPE(info->pspec));
+
+ if (G_PARAM_SPEC_VALUE_TYPE(info->pspec) == G_TYPE_BOOLEAN)
+ g_value_set_boolean(&gvalue, gconf_value_get_bool(value));
+ else if (G_PARAM_SPEC_VALUE_TYPE(info->pspec) == G_TYPE_STRING)
+ g_value_set_string(&gvalue, gconf_value_get_string(value));
else
- eel_gconf_unset(key);
+ g_return_if_reached();
+
+ g_object_set_property(LINK_INFO(info)->object, g_param_spec_get_name(info->pspec), &gvalue);
+ g_value_unset(&gvalue);
}
static void
-mn_conf_link_entry_notify_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+mn_conf_link_object_h (GObject *object, GParamSpec *pspec, gpointer user_data)
{
- GtkEntry *entry_widget = user_data;
- GConfValue *value = gconf_entry_get_value(entry);
- const char *str = value ? gconf_value_get_string(value) : NULL;
+ LinkInfo *info = user_data;
+ GValue value = { 0, };
+
+ g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+ g_object_get_property(object, g_param_spec_get_name(pspec), &value);
+
+ if (G_PARAM_SPEC_VALUE_TYPE(pspec) == G_TYPE_BOOLEAN)
+ eel_gconf_set_boolean(info->key, g_value_get_boolean(&value));
+ else if (G_PARAM_SPEC_VALUE_TYPE(pspec) == G_TYPE_STRING)
+ {
+ const char *str = g_value_get_string(&value);
+ eel_gconf_set_string(info->key, str ? str : "");
+ }
+ else
+ g_return_if_reached();
+
+ g_value_unset(&value);
+}
+
+static void
+mn_conf_link_object_notify_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
+{
+ LinkObjectInfo *info = user_data;
GDK_THREADS_ENTER();
- gtk_entry_set_text(entry_widget, MN_POINTER_TO_STRING(str));
+ BLOCK(LINK_INFO(info));
+ mn_conf_link_object_set(info, gconf_entry_get_value(entry));
+ UNBLOCK(LINK_INFO(info));
GDK_THREADS_LEAVE();
}
@@ -799,3 +1158,33 @@ mn_conf_notification_add_weak_notify_cb (gpointer data, GObject *former_object)
unsigned int notification_id = GPOINTER_TO_UINT(data);
eel_gconf_notification_remove(notification_id);
}
+
+gboolean
+mn_conf_has_command (const char *namespace)
+{
+ char *enabled_key;
+ gboolean has = FALSE;
+
+ g_return_val_if_fail(namespace != NULL, FALSE);
+
+ enabled_key = g_strconcat(namespace, "/enabled", NULL);
+ if (eel_gconf_get_boolean(enabled_key))
+ {
+ char *command_key;
+ char *command;
+
+ command_key = g_strconcat(namespace, "/command", NULL);
+ command = eel_gconf_get_string(command_key);
+ g_free(command_key);
+
+ if (command)
+ {
+ if (*command)
+ has = TRUE;
+ g_free(command);
+ }
+ }
+ g_free(enabled_key);
+
+ return has;
+}
diff --git a/src/mn-conf.h b/src/mn-conf.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -25,22 +25,6 @@
#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 \
@@ -67,32 +51,28 @@
MN_CONF_COMMANDS_MAIL_READER_NAMESPACE "/enabled"
#define MN_CONF_COMMANDS_MAIL_READER_COMMAND \
MN_CONF_COMMANDS_MAIL_READER_NAMESPACE "/command"
-#define MN_CONF_COMMANDS_CLICKED_NAMESPACE \
- MN_CONF_COMMANDS_NAMESPACE "/clicked" /* obsolete */
-#define MN_CONF_COMMANDS_CLICKED_ENABLED \
- MN_CONF_COMMANDS_CLICKED_NAMESPACE "/enabled" /* obsolete */
-#define MN_CONF_COMMANDS_CLICKED_COMMAND \
- MN_CONF_COMMANDS_CLICKED_NAMESPACE "/command" /* obsolete */
-#define MN_CONF_COMMANDS_DOUBLE_CLICKED_NAMESPACE \
- MN_CONF_COMMANDS_NAMESPACE "/double-clicked" /* obsolete */
-#define MN_CONF_COMMANDS_DOUBLE_CLICKED_ENABLED \
- MN_CONF_COMMANDS_DOUBLE_CLICKED_NAMESPACE "/enabled" /* obsolete */
-#define MN_CONF_COMMANDS_DOUBLE_CLICKED_COMMAND \
- MN_CONF_COMMANDS_DOUBLE_CLICKED_NAMESPACE "/command" /* obsolete */
#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" /* obsolete */
#define MN_CONF_PROPERTIES_DIALOG \
MN_CONF_UI_NAMESPACE "/properties-dialog"
-#define MN_CONF_SUMMARY_DIALOG \
- MN_CONF_UI_NAMESPACE "/summary-dialog"
#define MN_CONF_IMMEDIATE_NOTIFICATION_ERROR_DIALOG_NAMESPACE \
MN_CONF_UI_NAMESPACE "/immediate-notification-error-dialog"
#define MN_CONF_IMMEDIATE_NOTIFICATION_ERROR_DIALOG_DO_NOT_SHOW \
MN_CONF_IMMEDIATE_NOTIFICATION_ERROR_DIALOG_NAMESPACE "/do-not-show"
+#define MN_CONF_MAIN_WINDOW_NAMESPACE \
+ MN_CONF_UI_NAMESPACE "/main-window"
+#define MN_CONF_MAIN_WINDOW_DIMENSIONS \
+ MN_CONF_MAIN_WINDOW_NAMESPACE "/dimensions"
+#define MN_CONF_MAIN_WINDOW_VIEW_TOOLBARS \
+ MN_CONF_MAIN_WINDOW_NAMESPACE "/view-toolbars"
+#define MN_CONF_MAIN_WINDOW_VIEW_STATUSBAR \
+ MN_CONF_MAIN_WINDOW_NAMESPACE "/view-statusbar"
+#define MN_CONF_MAIN_WINDOW_TOOLBARS_STYLE \
+ MN_CONF_MAIN_WINDOW_NAMESPACE "/toolbars-style"
+#define MN_CONF_MAIN_WINDOW_EDIT_TOOLBARS_DIALOG \
+ MN_CONF_MAIN_WINDOW_NAMESPACE "/edit-toolbars-dialog"
#define MN_CONF_ALREADY_RUN \
MN_CONF_NAMESPACE "/already-run"
#define MN_CONF_BLINK_ON_ERRORS \
@@ -125,30 +105,35 @@
MN_CONF_MAIL_SUMMARY_POPUP_NAMESPACE "/only-recent"
#define MN_CONF_MAIL_SUMMARY_POPUP_FONTS_NAMESPACE \
MN_CONF_MAIL_SUMMARY_POPUP_NAMESPACE "/fonts"
+#define MN_CONF_MAIL_SUMMARY_POPUP_FONTS_ASPECT_SOURCE \
+ MN_CONF_MAIL_SUMMARY_POPUP_FONTS_NAMESPACE "/aspect-source"
#define MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_NAMESPACE \
MN_CONF_MAIL_SUMMARY_POPUP_FONTS_NAMESPACE "/title"
-#define MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_ENABLED \
- MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_NAMESPACE "/enabled"
#define MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_FONT \
MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_NAMESPACE "/font"
#define MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_NAMESPACE \
MN_CONF_MAIL_SUMMARY_POPUP_FONTS_NAMESPACE "/contents"
-#define MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_ENABLED \
- MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_NAMESPACE "/enabled"
#define MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_FONT \
MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_NAMESPACE "/font"
-#define MN_CONF_DOUBLE_CLICK_ACTION \
- MN_CONF_NAMESPACE "/double-click-action"
+#define MN_CONF_DOUBLE_CLICK_ACTION_2 \
+ MN_CONF_NAMESPACE "/double-click-action-2"
#define MN_CONF_SUMMARY_TOOLTIP \
MN_CONF_NAMESPACE "/summary-tooltip"
+extern const char *mn_conf_dot_dir;
+
void mn_conf_init (void);
void mn_conf_unset_obsolete (void);
void mn_conf_recursive_unset (const char *key,
GConfUnsetFlags flags);
-void mn_conf_link (GtkWidget *widget,
+gboolean mn_conf_is_set (const char *key);
+
+void mn_conf_set_value (const char *key,
+ const GConfValue *value);
+
+void mn_conf_link (gpointer object,
...);
void mn_conf_link_combo_box_to_string (GtkComboBox *combo,
int string_column,
@@ -168,4 +153,6 @@ void mn_conf_notification_add (gpointer object,
GConfClientNotifyFunc callback,
gpointer user_data);
+gboolean mn_conf_has_command (const char *namespace);
+
#endif /* _MN_CONF_H */
diff --git a/src/mn-gmail-mailbox-private.h b/src/mn-gmail-mailbox-private.h
@@ -16,9 +16,9 @@ extern "C" {
#line 18 "mn-gmail-mailbox-private.h"
struct _MNGmailMailboxPrivate {
-#line 65 "mn-gmail-mailbox.gob"
+#line 69 "mn-gmail-mailbox.gob"
GHashTable * cookies;
-#line 66 "mn-gmail-mailbox.gob"
+#line 70 "mn-gmail-mailbox.gob"
gboolean logged_in;
#line 24 "mn-gmail-mailbox-private.h"
};
diff --git a/src/mn-gmail-mailbox-properties-private.h b/src/mn-gmail-mailbox-properties-private.h
@@ -10,15 +10,13 @@ extern "C" {
#endif /* __cplusplus */
struct _MNGmailMailboxPropertiesPrivate {
-#line 37 "mn-gmail-mailbox-properties.gob"
+#line 38 "mn-gmail-mailbox-properties.gob"
GtkSizeGroup * size_group;
-#line 50 "mn-gmail-mailbox-properties.gob"
- GtkWidget * username_entry;
#line 51 "mn-gmail-mailbox-properties.gob"
- GtkWidget * password_entry;
+ GtkWidget * username_entry;
#line 52 "mn-gmail-mailbox-properties.gob"
- GtkTooltips * tooltips;
-#line 22 "mn-gmail-mailbox-properties-private.h"
+ GtkWidget * password_entry;
+#line 20 "mn-gmail-mailbox-properties-private.h"
};
#ifdef __cplusplus
diff --git a/src/mn-gmail-mailbox-properties.c b/src/mn-gmail-mailbox-properties.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -30,8 +30,9 @@
#include "mn-mailbox-properties.h"
#include "mn-mailbox-properties-util.h"
#include "mn-util.h"
+#include "mn-properties-dialog.h"
-#line 35 "mn-gmail-mailbox-properties.c"
+#line 36 "mn-gmail-mailbox-properties.c"
/* self casting macros */
#define SELF(x) MN_GMAIL_MAILBOX_PROPERTIES(x)
#define SELF_CONST(x) MN_GMAIL_MAILBOX_PROPERTIES_CONST(x)
@@ -50,7 +51,7 @@ static void ___object_set_property (GObject *object, guint property_id, const GV
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_gmail_mailbox_properties_init (MNGmailMailboxProperties * o) G_GNUC_UNUSED;
static void mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * c) G_GNUC_UNUSED;
-static GObject * ___1_mn_gmail_mailbox_properties_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___1_mn_gmail_mailbox_properties_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static void mn_gmail_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data) G_GNUC_UNUSED;
static gboolean mn_gmail_mailbox_properties_set_uri (MNMailboxProperties * self, MNURI * uri) G_GNUC_UNUSED;
static MNURI * mn_gmail_mailbox_properties_get_uri (MNMailboxProperties * self) G_GNUC_UNUSED;
@@ -74,11 +75,11 @@ static GtkVBoxClass *parent_class = NULL;
static void
___MN_Mailbox_Properties_init (MNMailboxPropertiesIface *iface)
{
-#line 98 "mn-gmail-mailbox-properties.gob"
+#line 97 "mn-gmail-mailbox-properties.gob"
iface->set_uri = self_set_uri;
-#line 113 "mn-gmail-mailbox-properties.gob"
+#line 112 "mn-gmail-mailbox-properties.gob"
iface->get_uri = self_get_uri;
-#line 82 "mn-gmail-mailbox-properties.c"
+#line 83 "mn-gmail-mailbox-properties.c"
}
GType
@@ -140,12 +141,9 @@ ___dispose (GObject *obj_self)
MNGmailMailboxProperties *self G_GNUC_UNUSED = MN_GMAIL_MAILBOX_PROPERTIES (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 37 "mn-gmail-mailbox-properties.gob"
+#line 38 "mn-gmail-mailbox-properties.gob"
if(self->_priv->size_group) { g_object_unref ((gpointer) self->_priv->size_group); self->_priv->size_group = NULL; }
-#line 146 "mn-gmail-mailbox-properties.c"
-#line 52 "mn-gmail-mailbox-properties.gob"
- if(self->_priv->tooltips) { g_object_unref ((gpointer) self->_priv->tooltips); self->_priv->tooltips = NULL; }
-#line 149 "mn-gmail-mailbox-properties.c"
+#line 147 "mn-gmail-mailbox-properties.c"
}
#undef __GOB_FUNCTION__
@@ -166,9 +164,6 @@ mn_gmail_mailbox_properties_init (MNGmailMailboxProperties * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::init"
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNGmailMailboxPropertiesPrivate);
-#line 52 "mn-gmail-mailbox-properties.gob"
- o->_priv->tooltips = mn_gtk_tooltips_new();
-#line 172 "mn-gmail-mailbox-properties.c"
}
#undef __GOB_FUNCTION__
static void
@@ -183,7 +178,7 @@ mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * c G_GNUC
#line 54 "mn-gmail-mailbox-properties.gob"
g_object_class->constructor = ___1_mn_gmail_mailbox_properties_constructor;
-#line 187 "mn-gmail-mailbox-properties.c"
+#line 182 "mn-gmail-mailbox-properties.c"
g_object_class->dispose = ___dispose;
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
@@ -216,9 +211,9 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_SIZE_GROUP:
{
-#line 38 "mn-gmail-mailbox-properties.gob"
+#line 39 "mn-gmail-mailbox-properties.gob"
{ GObject *___old = (GObject *)self->_priv->size_group; self->_priv->size_group = (void *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
-#line 222 "mn-gmail-mailbox-properties.c"
+#line 217 "mn-gmail-mailbox-properties.c"
}
break;
default:
@@ -247,21 +242,21 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_LABEL:
{
-#line 35 "mn-gmail-mailbox-properties.gob"
+#line 36 "mn-gmail-mailbox-properties.gob"
g_value_set_string(VAL, "Gmail");
-#line 253 "mn-gmail-mailbox-properties.c"
+#line 248 "mn-gmail-mailbox-properties.c"
}
break;
case PROP_SIZE_GROUP:
{
-#line 38 "mn-gmail-mailbox-properties.gob"
+#line 39 "mn-gmail-mailbox-properties.gob"
g_value_set_object (VAL, (gpointer)self->_priv->size_group);
-#line 260 "mn-gmail-mailbox-properties.c"
+#line 255 "mn-gmail-mailbox-properties.c"
}
break;
case PROP_COMPLETE:
{
-#line 42 "mn-gmail-mailbox-properties.gob"
+#line 43 "mn-gmail-mailbox-properties.gob"
const char *username;
@@ -269,7 +264,7 @@ g_value_set_object (VAL, (gpointer)self->_priv->size_group);
g_value_set_boolean(VAL, *username != 0);
-#line 273 "mn-gmail-mailbox-properties.c"
+#line 268 "mn-gmail-mailbox-properties.c"
}
break;
default:
@@ -288,8 +283,8 @@ g_value_set_object (VAL, (gpointer)self->_priv->size_group);
#line 54 "mn-gmail-mailbox-properties.gob"
static GObject *
-___1_mn_gmail_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 293 "mn-gmail-mailbox-properties.c"
+___1_mn_gmail_mailbox_properties_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 288 "mn-gmail-mailbox-properties.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -318,10 +313,9 @@ ___1_mn_gmail_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_
gtk_size_group_add_widget(selfp->size_group, label1);
gtk_size_group_add_widget(selfp->size_group, label2);
- mn_gtk_tooltips_set_tips(selfp->tooltips,
- selfp->username_entry, _("Your Gmail username"),
- selfp->password_entry, _("Your Gmail password (if left blank, you will be prompted for the password when needed)"),
- NULL);
+ mn_properties_dialog_set_tooltips(selfp->username_entry, _("Your Gmail username"),
+ selfp->password_entry, _("Your Gmail password (if left blank, you will be prompted for the password when needed)"),
+ NULL);
mn_mailbox_properties_link_entries(GTK_ENTRY(selfp->username_entry),
GTK_ENTRY(selfp->password_entry),
@@ -331,76 +325,76 @@ ___1_mn_gmail_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_
return object;
}}
-#line 335 "mn-gmail-mailbox-properties.c"
+#line 329 "mn-gmail-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 90 "mn-gmail-mailbox-properties.gob"
+#line 89 "mn-gmail-mailbox-properties.gob"
static void
mn_gmail_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data)
-#line 342 "mn-gmail-mailbox-properties.c"
+#line 336 "mn-gmail-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::entry_changed_h"
-#line 90 "mn-gmail-mailbox-properties.gob"
+#line 89 "mn-gmail-mailbox-properties.gob"
g_return_if_fail (editable != NULL);
-#line 90 "mn-gmail-mailbox-properties.gob"
+#line 89 "mn-gmail-mailbox-properties.gob"
g_return_if_fail (GTK_IS_EDITABLE (editable));
-#line 90 "mn-gmail-mailbox-properties.gob"
+#line 89 "mn-gmail-mailbox-properties.gob"
g_return_if_fail (user_data != NULL);
-#line 351 "mn-gmail-mailbox-properties.c"
+#line 345 "mn-gmail-mailbox-properties.c"
{
-#line 93 "mn-gmail-mailbox-properties.gob"
+#line 92 "mn-gmail-mailbox-properties.gob"
Self *self = user_data;
g_object_notify(G_OBJECT(self), "complete");
}}
-#line 358 "mn-gmail-mailbox-properties.c"
+#line 352 "mn-gmail-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 98 "mn-gmail-mailbox-properties.gob"
+#line 97 "mn-gmail-mailbox-properties.gob"
static gboolean
mn_gmail_mailbox_properties_set_uri (MNMailboxProperties * self, MNURI * uri)
-#line 364 "mn-gmail-mailbox-properties.c"
+#line 358 "mn-gmail-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::set_uri"
-#line 98 "mn-gmail-mailbox-properties.gob"
+#line 97 "mn-gmail-mailbox-properties.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 98 "mn-gmail-mailbox-properties.gob"
+#line 97 "mn-gmail-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (gboolean )0);
-#line 98 "mn-gmail-mailbox-properties.gob"
+#line 97 "mn-gmail-mailbox-properties.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 98 "mn-gmail-mailbox-properties.gob"
+#line 97 "mn-gmail-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_URI (uri), (gboolean )0);
-#line 375 "mn-gmail-mailbox-properties.c"
+#line 369 "mn-gmail-mailbox-properties.c"
{
-#line 101 "mn-gmail-mailbox-properties.gob"
+#line 100 "mn-gmail-mailbox-properties.gob"
if (MN_URI_IS_GMAIL(uri))
{
gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->username_entry), uri->username);
- gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->password_entry), MN_POINTER_TO_STRING(uri->password));
+ gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->password_entry), uri->password ? uri->password : "");
return TRUE;
}
else
return FALSE;
}}
-#line 389 "mn-gmail-mailbox-properties.c"
+#line 383 "mn-gmail-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 113 "mn-gmail-mailbox-properties.gob"
+#line 112 "mn-gmail-mailbox-properties.gob"
static MNURI *
mn_gmail_mailbox_properties_get_uri (MNMailboxProperties * self)
-#line 395 "mn-gmail-mailbox-properties.c"
+#line 389 "mn-gmail-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::get_uri"
-#line 113 "mn-gmail-mailbox-properties.gob"
+#line 112 "mn-gmail-mailbox-properties.gob"
g_return_val_if_fail (self != NULL, (MNURI * )0);
-#line 113 "mn-gmail-mailbox-properties.gob"
+#line 112 "mn-gmail-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (MNURI * )0);
-#line 402 "mn-gmail-mailbox-properties.c"
+#line 396 "mn-gmail-mailbox-properties.c"
{
-#line 115 "mn-gmail-mailbox-properties.gob"
+#line 114 "mn-gmail-mailbox-properties.gob"
const char *username;
const char *password;
@@ -408,7 +402,7 @@ mn_gmail_mailbox_properties_get_uri (MNMailboxProperties * self)
username = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->username_entry));
password = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->password_entry));
- return mn_uri_new_gmail(username, MN_STRING_TO_POINTER(password));
+ return mn_uri_new_gmail(username, *password ? password : NULL);
}}
-#line 414 "mn-gmail-mailbox-properties.c"
+#line 408 "mn-gmail-mailbox-properties.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-gmail-mailbox-properties.gob b/src/mn-gmail-mailbox-properties.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -27,6 +27,7 @@ requires 2.0.10
#include "mn-mailbox-properties.h"
#include "mn-mailbox-properties-util.h"
#include "mn-util.h"
+#include "mn-properties-dialog.h"
%}
class MN:Gmail:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties)
@@ -49,10 +50,9 @@ class MN:Gmail:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties
private GtkWidget *username_entry;
private GtkWidget *password_entry;
- private GtkTooltips *tooltips = {mn_gtk_tooltips_new()} unrefwith g_object_unref;
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
Self *self;
@@ -73,10 +73,9 @@ class MN:Gmail:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties
gtk_size_group_add_widget(selfp->size_group, label1);
gtk_size_group_add_widget(selfp->size_group, label2);
- mn_gtk_tooltips_set_tips(selfp->tooltips,
- selfp->username_entry, _("Your Gmail username"),
- selfp->password_entry, _("Your Gmail password (if left blank, you will be prompted for the password when needed)"),
- NULL);
+ mn_properties_dialog_set_tooltips(selfp->username_entry, _("Your Gmail username"),
+ selfp->password_entry, _("Your Gmail password (if left blank, you will be prompted for the password when needed)"),
+ NULL);
mn_mailbox_properties_link_entries(GTK_ENTRY(selfp->username_entry),
GTK_ENTRY(selfp->password_entry),
@@ -102,7 +101,7 @@ class MN:Gmail:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties
if (MN_URI_IS_GMAIL(uri))
{
gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->username_entry), uri->username);
- gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->password_entry), MN_POINTER_TO_STRING(uri->password));
+ gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->password_entry), uri->password ? uri->password : "");
return TRUE;
}
@@ -119,6 +118,6 @@ class MN:Gmail:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties
username = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->username_entry));
password = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->password_entry));
- return mn_uri_new_gmail(username, MN_STRING_TO_POINTER(password));
+ return mn_uri_new_gmail(username, *password ? password : NULL);
}
}
diff --git a/src/mn-gmail-mailbox.c b/src/mn-gmail-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -27,12 +27,16 @@
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <time.h>
-#ifdef TM_IN_SYS_TIME
-#include <sys/time.h>
-#endif
#include <glib/gi18n.h>
#include <eel/eel.h>
+#ifdef WITH_GMAIL_TIMESTAMPS
+#include <unicode/uenum.h>
+#include <unicode/uloc.h>
+#include <unicode/ucal.h>
+#include "mn-icu.h"
+#endif /* WITH_GMAIL_TIMESTAMPS */
#include "mn-mailbox-private.h"
#include "mn-authenticated-mailbox-private.h"
#include "mn-util.h"
@@ -55,7 +59,7 @@
} value;
} JSArg;
-#line 59 "mn-gmail-mailbox.c"
+#line 63 "mn-gmail-mailbox.c"
/* self casting macros */
#define SELF(x) MN_GMAIL_MAILBOX(x)
#define SELF_CONST(x) MN_GMAIL_MAILBOX_CONST(x)
@@ -72,7 +76,7 @@ typedef MNGmailMailboxClass SelfClass;
/* here are local prototypes */
static void mn_gmail_mailbox_init (MNGmailMailbox * o) G_GNUC_UNUSED;
static void mn_gmail_mailbox_class_init (MNGmailMailboxClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_gmail_mailbox_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_gmail_mailbox_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static gboolean ___3_mn_gmail_mailbox_impl_is (MNMailbox * dummy, MNURI * uri) G_GNUC_UNUSED;
static void ___4_mn_gmail_mailbox_impl_check (MNMailbox * mailbox) G_GNUC_UNUSED;
static SoupUri * mn_gmail_mailbox_soup_uri_new (const char * text_uri, GError ** err) G_GNUC_UNUSED;
@@ -88,14 +92,14 @@ static void mn_gmail_mailbox_update_cookies (MNGmailMailbox * self, SoupMessage
static char * mn_gmail_mailbox_build_cookie (MNGmailMailbox * self) G_GNUC_UNUSED;
static void mn_gmail_mailbox_build_cookie_cb (gpointer key, gpointer value, gpointer user_data) G_GNUC_UNUSED;
static gboolean mn_gmail_mailbox_check (MNGmailMailbox * self, SoupSession * session, GError ** err) G_GNUC_UNUSED;
-static void mn_gmail_mailbox_append_message (MNGmailMailbox * self, GSList ** messages, JSArg * arg) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_append_message (MNGmailMailbox * self, GSList ** messages, JSArg * arg, gboolean icu_available) G_GNUC_UNUSED;
static gboolean mn_gmail_mailbox_js_get_arg_list (char ** str, GSList ** list) G_GNUC_UNUSED;
static gboolean mn_gmail_mailbox_js_arg_list_scan (GSList * list, ...) G_GNUC_UNUSED;
static void mn_gmail_mailbox_js_arg_list_free (GSList * list) G_GNUC_UNUSED;
static JSArg * mn_gmail_mailbox_js_arg_new_string (const char * string) G_GNUC_UNUSED;
static JSArg * mn_gmail_mailbox_js_arg_new_list (GSList * list) G_GNUC_UNUSED;
static void mn_gmail_mailbox_js_arg_free (JSArg * arg) G_GNUC_UNUSED;
-static time_t mn_gmail_mailbox_parse_date (const char * date) G_GNUC_UNUSED;
+static time_t mn_gmail_mailbox_parse_date (MNGmailMailbox * self, const char * date) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNAuthenticatedMailboxClass *parent_class = NULL;
@@ -173,9 +177,9 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 65 "mn-gmail-mailbox.gob"
+#line 69 "mn-gmail-mailbox.gob"
if(self->_priv->cookies) { g_hash_table_destroy ((gpointer) self->_priv->cookies); self->_priv->cookies = NULL; }
-#line 179 "mn-gmail-mailbox.c"
+#line 183 "mn-gmail-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -186,10 +190,10 @@ mn_gmail_mailbox_init (MNGmailMailbox * o G_GNUC_UNUSED)
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNGmailMailboxPrivate);
}
#undef __GOB_FUNCTION__
-#line 68 "mn-gmail-mailbox.gob"
+#line 72 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_class_init (MNGmailMailboxClass * class G_GNUC_UNUSED)
-#line 193 "mn-gmail-mailbox.c"
+#line 197 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -199,31 +203,31 @@ mn_gmail_mailbox_class_init (MNGmailMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX);
-#line 74 "mn-gmail-mailbox.gob"
+#line 78 "mn-gmail-mailbox.gob"
g_object_class->constructor = ___2_mn_gmail_mailbox_constructor;
-#line 87 "mn-gmail-mailbox.gob"
+#line 91 "mn-gmail-mailbox.gob"
mn_mailbox_class->impl_is = ___3_mn_gmail_mailbox_impl_is;
-#line 93 "mn-gmail-mailbox.gob"
+#line 97 "mn-gmail-mailbox.gob"
mn_mailbox_class->impl_check = ___4_mn_gmail_mailbox_impl_check;
-#line 209 "mn-gmail-mailbox.c"
+#line 213 "mn-gmail-mailbox.c"
g_object_class->finalize = ___finalize;
{
-#line 69 "mn-gmail-mailbox.gob"
+#line 73 "mn-gmail-mailbox.gob"
MN_MAILBOX_CLASS(class)->stock_id = MN_STOCK_GMAIL;
MN_MAILBOX_CLASS(class)->format = "Gmail";
-#line 217 "mn-gmail-mailbox.c"
+#line 221 "mn-gmail-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 74 "mn-gmail-mailbox.gob"
+#line 78 "mn-gmail-mailbox.gob"
static GObject *
-___2_mn_gmail_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 227 "mn-gmail-mailbox.c"
+___2_mn_gmail_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 231 "mn-gmail-mailbox.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -231,7 +235,7 @@ ___2_mn_gmail_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_p
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::constructor"
{
-#line 76 "mn-gmail-mailbox.gob"
+#line 80 "mn-gmail-mailbox.gob"
GObject *object;
@@ -242,50 +246,50 @@ ___2_mn_gmail_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_p
return object;
}}
-#line 246 "mn-gmail-mailbox.c"
+#line 250 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 87 "mn-gmail-mailbox.gob"
+#line 91 "mn-gmail-mailbox.gob"
static gboolean
___3_mn_gmail_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
-#line 253 "mn-gmail-mailbox.c"
+#line 257 "mn-gmail-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->impl_is)? \
(* MN_MAILBOX_CLASS(parent_class)->impl_is)(___dummy,___uri): \
((gboolean )0))
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::impl_is"
-#line 87 "mn-gmail-mailbox.gob"
+#line 91 "mn-gmail-mailbox.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 87 "mn-gmail-mailbox.gob"
+#line 91 "mn-gmail-mailbox.gob"
g_return_val_if_fail (MN_IS_URI (uri), (gboolean )0);
-#line 264 "mn-gmail-mailbox.c"
+#line 268 "mn-gmail-mailbox.c"
{
-#line 89 "mn-gmail-mailbox.gob"
+#line 93 "mn-gmail-mailbox.gob"
return MN_URI_IS_GMAIL(uri);
}}
-#line 270 "mn-gmail-mailbox.c"
+#line 274 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 93 "mn-gmail-mailbox.gob"
+#line 97 "mn-gmail-mailbox.gob"
static void
___4_mn_gmail_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 277 "mn-gmail-mailbox.c"
+#line 281 "mn-gmail-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->impl_check) \
(* MN_MAILBOX_CLASS(parent_class)->impl_check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::impl_check"
-#line 93 "mn-gmail-mailbox.gob"
+#line 97 "mn-gmail-mailbox.gob"
g_return_if_fail (mailbox != NULL);
-#line 93 "mn-gmail-mailbox.gob"
+#line 97 "mn-gmail-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 287 "mn-gmail-mailbox.c"
+#line 291 "mn-gmail-mailbox.c"
{
-#line 95 "mn-gmail-mailbox.gob"
+#line 99 "mn-gmail-mailbox.gob"
MNAuthenticatedMailbox *authenticated_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
Self *self = SELF(mailbox);
@@ -343,21 +347,21 @@ ___4_mn_gmail_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
gdk_flush();
GDK_THREADS_LEAVE();
}}
-#line 347 "mn-gmail-mailbox.c"
+#line 351 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 153 "mn-gmail-mailbox.gob"
+#line 157 "mn-gmail-mailbox.gob"
static SoupUri *
mn_gmail_mailbox_soup_uri_new (const char * text_uri, GError ** err)
-#line 354 "mn-gmail-mailbox.c"
+#line 358 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::soup_uri_new"
-#line 153 "mn-gmail-mailbox.gob"
+#line 157 "mn-gmail-mailbox.gob"
g_return_val_if_fail (text_uri != NULL, (SoupUri * )0);
-#line 359 "mn-gmail-mailbox.c"
+#line 363 "mn-gmail-mailbox.c"
{
-#line 155 "mn-gmail-mailbox.gob"
+#line 159 "mn-gmail-mailbox.gob"
SoupUri *uri;
@@ -367,28 +371,28 @@ mn_gmail_mailbox_soup_uri_new (const char * text_uri, GError ** err)
return uri;
}}
-#line 371 "mn-gmail-mailbox.c"
+#line 375 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 165 "mn-gmail-mailbox.gob"
+#line 169 "mn-gmail-mailbox.gob"
static char *
mn_gmail_mailbox_get (MNGmailMailbox * self, SoupSession * session, const char * text_uri, GError ** err)
-#line 377 "mn-gmail-mailbox.c"
+#line 381 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::get"
-#line 165 "mn-gmail-mailbox.gob"
+#line 169 "mn-gmail-mailbox.gob"
g_return_val_if_fail (self != NULL, (char * )0);
-#line 165 "mn-gmail-mailbox.gob"
+#line 169 "mn-gmail-mailbox.gob"
g_return_val_if_fail (MN_IS_GMAIL_MAILBOX (self), (char * )0);
-#line 165 "mn-gmail-mailbox.gob"
+#line 169 "mn-gmail-mailbox.gob"
g_return_val_if_fail (session != NULL, (char * )0);
-#line 165 "mn-gmail-mailbox.gob"
+#line 169 "mn-gmail-mailbox.gob"
g_return_val_if_fail (SOUP_IS_SESSION (session), (char * )0);
-#line 165 "mn-gmail-mailbox.gob"
+#line 169 "mn-gmail-mailbox.gob"
g_return_val_if_fail (text_uri != NULL, (char * )0);
-#line 390 "mn-gmail-mailbox.c"
+#line 394 "mn-gmail-mailbox.c"
{
-#line 170 "mn-gmail-mailbox.gob"
+#line 174 "mn-gmail-mailbox.gob"
SoupUri *uri;
char *body;
@@ -402,28 +406,28 @@ mn_gmail_mailbox_get (MNGmailMailbox * self, SoupSession * session, const char *
return body;
}}
-#line 406 "mn-gmail-mailbox.c"
+#line 410 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 184 "mn-gmail-mailbox.gob"
+#line 188 "mn-gmail-mailbox.gob"
static char *
mn_gmail_mailbox_get_from_uri (MNGmailMailbox * self, SoupSession * session, SoupUri * uri, GError ** err)
-#line 412 "mn-gmail-mailbox.c"
+#line 416 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::get_from_uri"
-#line 184 "mn-gmail-mailbox.gob"
+#line 188 "mn-gmail-mailbox.gob"
g_return_val_if_fail (self != NULL, (char * )0);
-#line 184 "mn-gmail-mailbox.gob"
+#line 188 "mn-gmail-mailbox.gob"
g_return_val_if_fail (MN_IS_GMAIL_MAILBOX (self), (char * )0);
-#line 184 "mn-gmail-mailbox.gob"
+#line 188 "mn-gmail-mailbox.gob"
g_return_val_if_fail (session != NULL, (char * )0);
-#line 184 "mn-gmail-mailbox.gob"
+#line 188 "mn-gmail-mailbox.gob"
g_return_val_if_fail (SOUP_IS_SESSION (session), (char * )0);
-#line 184 "mn-gmail-mailbox.gob"
+#line 188 "mn-gmail-mailbox.gob"
g_return_val_if_fail (uri != NULL, (char * )0);
-#line 425 "mn-gmail-mailbox.c"
+#line 429 "mn-gmail-mailbox.c"
{
-#line 189 "mn-gmail-mailbox.gob"
+#line 193 "mn-gmail-mailbox.gob"
SoupMessage *message;
char *cookie;
@@ -444,7 +448,13 @@ mn_gmail_mailbox_get_from_uri (MNGmailMailbox * self, SoupSession * session, Sou
if (SOUP_STATUS_IS_SUCCESSFUL(message->status_code))
{
- body = g_strndup(message->response.body, message->response.length);
+ const char *end;
+
+ /* Gmail returns UTF-8, so we don't need to parse Content-Type */
+ if (! g_utf8_validate(message->response.body, message->response.length, &end))
+ mn_mailbox_warning(MN_MAILBOX(self), _("received non-UTF-8 data from server"));
+
+ body = g_strndup(message->response.body, end - message->response.body);
self_dump_response(self, message, body);
self_update_cookies(self, message);
}
@@ -455,26 +465,26 @@ mn_gmail_mailbox_get_from_uri (MNGmailMailbox * self, SoupSession * session, Sou
return body;
}}
-#line 459 "mn-gmail-mailbox.c"
+#line 469 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 221 "mn-gmail-mailbox.gob"
+#line 231 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_dump_request (MNGmailMailbox * self, SoupMessage * message)
-#line 465 "mn-gmail-mailbox.c"
+#line 475 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::dump_request"
-#line 221 "mn-gmail-mailbox.gob"
+#line 231 "mn-gmail-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 221 "mn-gmail-mailbox.gob"
+#line 231 "mn-gmail-mailbox.gob"
g_return_if_fail (MN_IS_GMAIL_MAILBOX (self));
-#line 221 "mn-gmail-mailbox.gob"
+#line 231 "mn-gmail-mailbox.gob"
g_return_if_fail (message != NULL);
-#line 221 "mn-gmail-mailbox.gob"
+#line 231 "mn-gmail-mailbox.gob"
g_return_if_fail (SOUP_IS_MESSAGE (message));
-#line 476 "mn-gmail-mailbox.c"
+#line 486 "mn-gmail-mailbox.c"
{
-#line 223 "mn-gmail-mailbox.gob"
+#line 233 "mn-gmail-mailbox.gob"
const SoupUri *suri;
char *uri;
@@ -486,24 +496,24 @@ mn_gmail_mailbox_dump_request (MNGmailMailbox * self, SoupMessage * message)
soup_message_foreach_header(message->request_headers, self_dump_request_cb, self);
}}
-#line 490 "mn-gmail-mailbox.c"
+#line 500 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 235 "mn-gmail-mailbox.gob"
+#line 245 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_dump_request_cb (gpointer key, gpointer value, gpointer user_data)
-#line 496 "mn-gmail-mailbox.c"
+#line 506 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::dump_request_cb"
-#line 235 "mn-gmail-mailbox.gob"
+#line 245 "mn-gmail-mailbox.gob"
g_return_if_fail (key != NULL);
-#line 235 "mn-gmail-mailbox.gob"
+#line 245 "mn-gmail-mailbox.gob"
g_return_if_fail (value != NULL);
-#line 235 "mn-gmail-mailbox.gob"
+#line 245 "mn-gmail-mailbox.gob"
g_return_if_fail (user_data != NULL);
-#line 505 "mn-gmail-mailbox.c"
+#line 515 "mn-gmail-mailbox.c"
{
-#line 239 "mn-gmail-mailbox.gob"
+#line 249 "mn-gmail-mailbox.gob"
Self *self = user_data;
const char *header_name = key;
@@ -511,28 +521,28 @@ mn_gmail_mailbox_dump_request_cb (gpointer key, gpointer value, gpointer user_da
mn_mailbox_notice(MN_MAILBOX(self), "> %s: %s", header_name, header_value);
}}
-#line 515 "mn-gmail-mailbox.c"
+#line 525 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 247 "mn-gmail-mailbox.gob"
+#line 257 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_dump_response (MNGmailMailbox * self, SoupMessage * message, const char * body)
-#line 521 "mn-gmail-mailbox.c"
+#line 531 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::dump_response"
-#line 247 "mn-gmail-mailbox.gob"
+#line 257 "mn-gmail-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 247 "mn-gmail-mailbox.gob"
+#line 257 "mn-gmail-mailbox.gob"
g_return_if_fail (MN_IS_GMAIL_MAILBOX (self));
-#line 247 "mn-gmail-mailbox.gob"
+#line 257 "mn-gmail-mailbox.gob"
g_return_if_fail (message != NULL);
-#line 247 "mn-gmail-mailbox.gob"
+#line 257 "mn-gmail-mailbox.gob"
g_return_if_fail (SOUP_IS_MESSAGE (message));
-#line 247 "mn-gmail-mailbox.gob"
+#line 257 "mn-gmail-mailbox.gob"
g_return_if_fail (body != NULL);
-#line 534 "mn-gmail-mailbox.c"
+#line 544 "mn-gmail-mailbox.c"
{
-#line 251 "mn-gmail-mailbox.gob"
+#line 261 "mn-gmail-mailbox.gob"
char **lines;
int i;
@@ -544,24 +554,24 @@ mn_gmail_mailbox_dump_response (MNGmailMailbox * self, SoupMessage * message, co
mn_mailbox_notice(MN_MAILBOX(self), "< %s", lines[i]);
g_strfreev(lines);
}}
-#line 548 "mn-gmail-mailbox.c"
+#line 558 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 263 "mn-gmail-mailbox.gob"
+#line 273 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_dump_response_cb (gpointer key, gpointer value, gpointer user_data)
-#line 554 "mn-gmail-mailbox.c"
+#line 564 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::dump_response_cb"
-#line 263 "mn-gmail-mailbox.gob"
+#line 273 "mn-gmail-mailbox.gob"
g_return_if_fail (key != NULL);
-#line 263 "mn-gmail-mailbox.gob"
+#line 273 "mn-gmail-mailbox.gob"
g_return_if_fail (value != NULL);
-#line 263 "mn-gmail-mailbox.gob"
+#line 273 "mn-gmail-mailbox.gob"
g_return_if_fail (user_data != NULL);
-#line 563 "mn-gmail-mailbox.c"
+#line 573 "mn-gmail-mailbox.c"
{
-#line 267 "mn-gmail-mailbox.gob"
+#line 277 "mn-gmail-mailbox.gob"
Self *self = user_data;
const char *header_name = key;
@@ -569,7 +579,7 @@ mn_gmail_mailbox_dump_response_cb (gpointer key, gpointer value, gpointer user_d
mn_mailbox_notice(MN_MAILBOX(self), "< %s: %s", header_name, header_value);
}}
-#line 573 "mn-gmail-mailbox.c"
+#line 583 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
/**
@@ -585,21 +595,21 @@ mn_gmail_mailbox_dump_response_cb (gpointer key, gpointer value, gpointer user_d
* Return value: a newly allocated string containing the substring
* or %NULL if not found.
**/
-#line 288 "mn-gmail-mailbox.gob"
+#line 298 "mn-gmail-mailbox.gob"
static char *
mn_gmail_mailbox_get_substring (const char * str, const char * pre, const char * post, gboolean include_pre, gboolean include_post)
-#line 592 "mn-gmail-mailbox.c"
+#line 602 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::get_substring"
-#line 288 "mn-gmail-mailbox.gob"
+#line 298 "mn-gmail-mailbox.gob"
g_return_val_if_fail (str != NULL, (char * )0);
-#line 288 "mn-gmail-mailbox.gob"
+#line 298 "mn-gmail-mailbox.gob"
g_return_val_if_fail (pre != NULL, (char * )0);
-#line 288 "mn-gmail-mailbox.gob"
+#line 298 "mn-gmail-mailbox.gob"
g_return_val_if_fail (post != NULL, (char * )0);
-#line 601 "mn-gmail-mailbox.c"
+#line 611 "mn-gmail-mailbox.c"
{
-#line 294 "mn-gmail-mailbox.gob"
+#line 304 "mn-gmail-mailbox.gob"
char *sub = NULL;
char *pre_loc;
@@ -623,28 +633,28 @@ mn_gmail_mailbox_get_substring (const char * str, const char * pre, const char *
return sub;
}}
-#line 627 "mn-gmail-mailbox.c"
+#line 637 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 318 "mn-gmail-mailbox.gob"
+#line 328 "mn-gmail-mailbox.gob"
static gboolean
mn_gmail_mailbox_login (MNGmailMailbox * self, SoupSession * session, gboolean * authentication_failed, GError ** err)
-#line 633 "mn-gmail-mailbox.c"
+#line 643 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::login"
-#line 318 "mn-gmail-mailbox.gob"
+#line 328 "mn-gmail-mailbox.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 318 "mn-gmail-mailbox.gob"
+#line 328 "mn-gmail-mailbox.gob"
g_return_val_if_fail (MN_IS_GMAIL_MAILBOX (self), (gboolean )0);
-#line 318 "mn-gmail-mailbox.gob"
+#line 328 "mn-gmail-mailbox.gob"
g_return_val_if_fail (session != NULL, (gboolean )0);
-#line 318 "mn-gmail-mailbox.gob"
+#line 328 "mn-gmail-mailbox.gob"
g_return_val_if_fail (SOUP_IS_SESSION (session), (gboolean )0);
-#line 318 "mn-gmail-mailbox.gob"
+#line 328 "mn-gmail-mailbox.gob"
g_return_val_if_fail (authentication_failed != NULL, (gboolean )0);
-#line 646 "mn-gmail-mailbox.c"
+#line 656 "mn-gmail-mailbox.c"
{
-#line 323 "mn-gmail-mailbox.gob"
+#line 333 "mn-gmail-mailbox.gob"
char *text_uri;
char *escaped_username;
@@ -738,32 +748,30 @@ mn_gmail_mailbox_login (MNGmailMailbox * self, SoupSession * session, gboolean *
g_set_error(err, 0, 0, _("login failed"));
return FALSE;
}}
-#line 742 "mn-gmail-mailbox.c"
+#line 752 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 417 "mn-gmail-mailbox.gob"
+#line 427 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_update_cookies (MNGmailMailbox * self, SoupMessage * message)
-#line 748 "mn-gmail-mailbox.c"
+#line 758 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::update_cookies"
-#line 417 "mn-gmail-mailbox.gob"
+#line 427 "mn-gmail-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 417 "mn-gmail-mailbox.gob"
+#line 427 "mn-gmail-mailbox.gob"
g_return_if_fail (MN_IS_GMAIL_MAILBOX (self));
-#line 417 "mn-gmail-mailbox.gob"
+#line 427 "mn-gmail-mailbox.gob"
g_return_if_fail (message != NULL);
-#line 417 "mn-gmail-mailbox.gob"
+#line 427 "mn-gmail-mailbox.gob"
g_return_if_fail (SOUP_IS_MESSAGE (message));
-#line 759 "mn-gmail-mailbox.c"
+#line 769 "mn-gmail-mailbox.c"
{
-#line 419 "mn-gmail-mailbox.gob"
+#line 429 "mn-gmail-mailbox.gob"
- const GSList *set_cookie_headers;
const GSList *l;
- set_cookie_headers = soup_message_get_header_list(message->response_headers, "Set-Cookie");
- MN_LIST_FOREACH(l, set_cookie_headers)
+ MN_LIST_FOREACH(l, soup_message_get_header_list(message->response_headers, "Set-Cookie"))
{
const char *value = l->data;
char *equal;
@@ -786,22 +794,22 @@ mn_gmail_mailbox_update_cookies (MNGmailMailbox * self, SoupMessage * message)
}
}
}}
-#line 790 "mn-gmail-mailbox.c"
+#line 798 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 448 "mn-gmail-mailbox.gob"
+#line 456 "mn-gmail-mailbox.gob"
static char *
mn_gmail_mailbox_build_cookie (MNGmailMailbox * self)
-#line 796 "mn-gmail-mailbox.c"
+#line 804 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::build_cookie"
-#line 448 "mn-gmail-mailbox.gob"
+#line 456 "mn-gmail-mailbox.gob"
g_return_val_if_fail (self != NULL, (char * )0);
-#line 448 "mn-gmail-mailbox.gob"
+#line 456 "mn-gmail-mailbox.gob"
g_return_val_if_fail (MN_IS_GMAIL_MAILBOX (self), (char * )0);
-#line 803 "mn-gmail-mailbox.c"
+#line 811 "mn-gmail-mailbox.c"
{
-#line 450 "mn-gmail-mailbox.gob"
+#line 458 "mn-gmail-mailbox.gob"
GString *cookie;
char *str;
@@ -819,17 +827,17 @@ mn_gmail_mailbox_build_cookie (MNGmailMailbox * self)
return str;
}}
-#line 823 "mn-gmail-mailbox.c"
+#line 831 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 468 "mn-gmail-mailbox.gob"
+#line 476 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_build_cookie_cb (gpointer key, gpointer value, gpointer user_data)
-#line 829 "mn-gmail-mailbox.c"
+#line 837 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::build_cookie_cb"
{
-#line 470 "mn-gmail-mailbox.gob"
+#line 478 "mn-gmail-mailbox.gob"
GString *cookie = user_data;
@@ -838,26 +846,26 @@ mn_gmail_mailbox_build_cookie_cb (gpointer key, gpointer value, gpointer user_da
g_string_append_printf(cookie, "%s=%s", (const char *) key, (const char *) value);
}}
-#line 842 "mn-gmail-mailbox.c"
+#line 850 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 479 "mn-gmail-mailbox.gob"
+#line 487 "mn-gmail-mailbox.gob"
static gboolean
mn_gmail_mailbox_check (MNGmailMailbox * self, SoupSession * session, GError ** err)
-#line 848 "mn-gmail-mailbox.c"
+#line 856 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::check"
-#line 479 "mn-gmail-mailbox.gob"
+#line 487 "mn-gmail-mailbox.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 479 "mn-gmail-mailbox.gob"
+#line 487 "mn-gmail-mailbox.gob"
g_return_val_if_fail (MN_IS_GMAIL_MAILBOX (self), (gboolean )0);
-#line 479 "mn-gmail-mailbox.gob"
+#line 487 "mn-gmail-mailbox.gob"
g_return_val_if_fail (session != NULL, (gboolean )0);
-#line 479 "mn-gmail-mailbox.gob"
+#line 487 "mn-gmail-mailbox.gob"
g_return_val_if_fail (SOUP_IS_SESSION (session), (gboolean )0);
-#line 859 "mn-gmail-mailbox.c"
+#line 867 "mn-gmail-mailbox.c"
{
-#line 481 "mn-gmail-mailbox.gob"
+#line 489 "mn-gmail-mailbox.gob"
char *body;
char *work;
@@ -886,16 +894,35 @@ mn_gmail_mailbox_check (MNGmailMailbox * self, SoupSession * session, GError **
if (self_js_get_arg_list(&work, &arg_list) && arg_list)
{
GSList *l;
-
+ gboolean icu_available = FALSE;
+
+#ifdef WITH_GMAIL_TIMESTAMPS
+ if (arg_list->next)
+ {
+ GError *err = NULL;
+
+ icu_available = mn_icu_use(&err);
+ if (! icu_available)
+ {
+ mn_mailbox_warning(MN_MAILBOX(self), _("unable to initialize the ICU library"), err->message);
+ g_error_free(err);
+ }
+ }
+#endif /* WITH_GMAIL_TIMESTAMPS */
+
MN_LIST_FOREACH(l, arg_list->next)
- self_append_message(self, &messages, l->data);
+ self_append_message(self, &messages, l->data, icu_available);
+
+#ifdef WITH_GMAIL_TIMESTAMPS
+ if (icu_available)
+ mn_icu_unuse();
+#endif /* WITH_GMAIL_TIMESTAMPS */
self_js_arg_list_free(arg_list);
}
}
GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(MN_MAILBOX(self), messages != NULL);
mn_mailbox_set_messages(MN_MAILBOX(self), messages);
gdk_flush();
GDK_THREADS_LEAVE();
@@ -910,26 +937,26 @@ mn_gmail_mailbox_check (MNGmailMailbox * self, SoupSession * session, GError **
return status;
}}
-#line 914 "mn-gmail-mailbox.c"
+#line 941 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 534 "mn-gmail-mailbox.gob"
+#line 561 "mn-gmail-mailbox.gob"
static void
-mn_gmail_mailbox_append_message (MNGmailMailbox * self, GSList ** messages, JSArg * arg)
-#line 920 "mn-gmail-mailbox.c"
+mn_gmail_mailbox_append_message (MNGmailMailbox * self, GSList ** messages, JSArg * arg, gboolean icu_available)
+#line 947 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::append_message"
-#line 534 "mn-gmail-mailbox.gob"
+#line 561 "mn-gmail-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 534 "mn-gmail-mailbox.gob"
+#line 561 "mn-gmail-mailbox.gob"
g_return_if_fail (MN_IS_GMAIL_MAILBOX (self));
-#line 534 "mn-gmail-mailbox.gob"
+#line 561 "mn-gmail-mailbox.gob"
g_return_if_fail (messages != NULL);
-#line 534 "mn-gmail-mailbox.gob"
+#line 561 "mn-gmail-mailbox.gob"
g_return_if_fail (arg != NULL);
-#line 931 "mn-gmail-mailbox.c"
+#line 958 "mn-gmail-mailbox.c"
{
-#line 538 "mn-gmail-mailbox.gob"
+#line 566 "mn-gmail-mailbox.gob"
char *date_field;
char *sender_field;
@@ -938,15 +965,18 @@ mn_gmail_mailbox_append_message (MNGmailMailbox * self, GSList ** messages, JSAr
GSList *l;
gboolean in_inbox = FALSE;
- char *date;
+ char *count_str;
char *sender_email;
char *sender_name;
char *subject;
+ int count = 1;
time_t sent_time = 0;
char *from = NULL;
char *expanded_subject = NULL;
+ int i;
+
if (arg->type != JS_ARG_LIST
|| ! self_js_arg_list_scan(arg->value.list,
3, JS_ARG_STRING, &date_field,
@@ -970,17 +1000,31 @@ mn_gmail_mailbox_append_message (MNGmailMailbox * self, GSList ** messages, JSAr
if (! in_inbox)
return;
- date = self_get_substring(date_field, "<b>", "</b>", FALSE, FALSE);
- sender_email = self_get_substring(sender_field, "<span id='_user_", "'", FALSE, FALSE);
- sender_name = self_get_substring(sender_field, "'><b>", "</b>", FALSE, FALSE);
- subject = self_get_substring(subject_field, "<b>", "</b>", FALSE, FALSE);
-
- if (date)
+#ifdef WITH_GMAIL_TIMESTAMPS
+ if (icu_available)
{
- sent_time = self_parse_date(date);
- g_free(date);
+ char *date;
+
+ date = self_get_substring(date_field, "<b>", "</b>", FALSE, FALSE);
+ if (date)
+ {
+ sent_time = self_parse_date(self, date);
+ g_free(date);
+ }
+ }
+#endif /* WITH_GMAIL_TIMESTAMPS */
+
+ count_str = self_get_substring(sender_field, "</span> (", ")", FALSE, FALSE);
+ if (count_str)
+ {
+ if (mn_str_isnumeric(count_str))
+ count = atoi(count_str);
+ g_free(count_str);
}
+ sender_email = self_get_substring(sender_field, "<span id='_user_", "'", FALSE, FALSE);
+ sender_name = self_get_substring(sender_field, "'><b>", "</b>", FALSE, FALSE);
+
if (sender_name && sender_email)
{
char *tmp;
@@ -997,6 +1041,7 @@ mn_gmail_mailbox_append_message (MNGmailMailbox * self, GSList ** messages, JSAr
g_free(sender_email);
g_free(sender_name);
+ subject = self_get_substring(subject_field, "<b>", "</b>", FALSE, FALSE);
if (subject)
{
if (strcmp(subject, "(no subject)"))
@@ -1004,32 +1049,33 @@ mn_gmail_mailbox_append_message (MNGmailMailbox * self, GSList ** messages, JSAr
g_free(subject);
}
- *messages = g_slist_append(*messages, mn_message_new(MN_MAILBOX(self)->uri,
- NULL,
- sent_time,
- NULL,
- from,
- expanded_subject));
+ for (i = 0; i < count; i++)
+ *messages = g_slist_append(*messages, mn_message_new(MN_MAILBOX(self)->uri,
+ NULL,
+ sent_time,
+ NULL,
+ from,
+ expanded_subject));
g_free(from);
g_free(expanded_subject);
}}
-#line 1018 "mn-gmail-mailbox.c"
+#line 1064 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 623 "mn-gmail-mailbox.gob"
+#line 670 "mn-gmail-mailbox.gob"
static gboolean
mn_gmail_mailbox_js_get_arg_list (char ** str, GSList ** list)
-#line 1024 "mn-gmail-mailbox.c"
+#line 1070 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::js_get_arg_list"
-#line 623 "mn-gmail-mailbox.gob"
+#line 670 "mn-gmail-mailbox.gob"
g_return_val_if_fail (str != NULL, (gboolean )0);
-#line 623 "mn-gmail-mailbox.gob"
+#line 670 "mn-gmail-mailbox.gob"
g_return_val_if_fail (list != NULL, (gboolean )0);
-#line 1031 "mn-gmail-mailbox.c"
+#line 1077 "mn-gmail-mailbox.c"
{
-#line 625 "mn-gmail-mailbox.gob"
+#line 672 "mn-gmail-mailbox.gob"
GSList *our_list = NULL;
gboolean done = FALSE;
@@ -1124,17 +1170,17 @@ mn_gmail_mailbox_js_get_arg_list (char ** str, GSList ** list)
return FALSE;
}
}}
-#line 1128 "mn-gmail-mailbox.c"
+#line 1174 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 720 "mn-gmail-mailbox.gob"
+#line 767 "mn-gmail-mailbox.gob"
static gboolean
mn_gmail_mailbox_js_arg_list_scan (GSList * list, ...)
-#line 1134 "mn-gmail-mailbox.c"
+#line 1180 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::js_arg_list_scan"
{
-#line 722 "mn-gmail-mailbox.gob"
+#line 769 "mn-gmail-mailbox.gob"
va_list args;
int position;
@@ -1182,34 +1228,34 @@ mn_gmail_mailbox_js_arg_list_scan (GSList * list, ...)
return status;
}}
-#line 1186 "mn-gmail-mailbox.c"
+#line 1232 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 770 "mn-gmail-mailbox.gob"
+#line 817 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_js_arg_list_free (GSList * list)
-#line 1192 "mn-gmail-mailbox.c"
+#line 1238 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::js_arg_list_free"
{
-#line 772 "mn-gmail-mailbox.gob"
+#line 819 "mn-gmail-mailbox.gob"
eel_g_slist_free_deep_custom(list, (GFunc) self_js_arg_free, NULL);
}}
-#line 1200 "mn-gmail-mailbox.c"
+#line 1246 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 776 "mn-gmail-mailbox.gob"
+#line 823 "mn-gmail-mailbox.gob"
static JSArg *
mn_gmail_mailbox_js_arg_new_string (const char * string)
-#line 1206 "mn-gmail-mailbox.c"
+#line 1252 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::js_arg_new_string"
-#line 776 "mn-gmail-mailbox.gob"
+#line 823 "mn-gmail-mailbox.gob"
g_return_val_if_fail (string != NULL, (JSArg * )0);
-#line 1211 "mn-gmail-mailbox.c"
+#line 1257 "mn-gmail-mailbox.c"
{
-#line 778 "mn-gmail-mailbox.gob"
+#line 825 "mn-gmail-mailbox.gob"
JSArg *arg;
@@ -1219,17 +1265,17 @@ mn_gmail_mailbox_js_arg_new_string (const char * string)
return arg;
}}
-#line 1223 "mn-gmail-mailbox.c"
+#line 1269 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 788 "mn-gmail-mailbox.gob"
+#line 835 "mn-gmail-mailbox.gob"
static JSArg *
mn_gmail_mailbox_js_arg_new_list (GSList * list)
-#line 1229 "mn-gmail-mailbox.c"
+#line 1275 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::js_arg_new_list"
{
-#line 790 "mn-gmail-mailbox.gob"
+#line 837 "mn-gmail-mailbox.gob"
JSArg *arg;
@@ -1239,20 +1285,20 @@ mn_gmail_mailbox_js_arg_new_list (GSList * list)
return arg;
}}
-#line 1243 "mn-gmail-mailbox.c"
+#line 1289 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 800 "mn-gmail-mailbox.gob"
+#line 847 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_js_arg_free (JSArg * arg)
-#line 1249 "mn-gmail-mailbox.c"
+#line 1295 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::js_arg_free"
-#line 800 "mn-gmail-mailbox.gob"
+#line 847 "mn-gmail-mailbox.gob"
g_return_if_fail (arg != NULL);
-#line 1254 "mn-gmail-mailbox.c"
+#line 1300 "mn-gmail-mailbox.c"
{
-#line 802 "mn-gmail-mailbox.gob"
+#line 849 "mn-gmail-mailbox.gob"
switch (arg->type)
{
@@ -1270,72 +1316,133 @@ mn_gmail_mailbox_js_arg_free (JSArg * arg)
g_free(arg);
}}
-#line 1274 "mn-gmail-mailbox.c"
+#line 1320 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 820 "mn-gmail-mailbox.gob"
+#line 867 "mn-gmail-mailbox.gob"
static time_t
-mn_gmail_mailbox_parse_date (const char * date)
-#line 1280 "mn-gmail-mailbox.c"
+mn_gmail_mailbox_parse_date (MNGmailMailbox * self, const char * date)
+#line 1326 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::parse_date"
-#line 820 "mn-gmail-mailbox.gob"
+#line 867 "mn-gmail-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (time_t )0);
+#line 867 "mn-gmail-mailbox.gob"
+ g_return_val_if_fail (MN_IS_GMAIL_MAILBOX (self), (time_t )0);
+#line 867 "mn-gmail-mailbox.gob"
g_return_val_if_fail (date != NULL, (time_t )0);
-#line 1285 "mn-gmail-mailbox.c"
+#line 1335 "mn-gmail-mailbox.c"
{
-#line 822 "mn-gmail-mailbox.gob"
+#line 869 "mn-gmail-mailbox.gob"
+#ifdef WITH_GMAIL_TIMESTAMPS
time_t t = 0;
-#ifdef HAVE_TIMEGM
- time_t now;
+ UChar *zone_id;
+ UCalendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ UDate ud;
+ int hour;
+ int minute;
+ char ampm[3];
+ char month_str[4];
+ int year;
+ int month;
+ int day;
+ gboolean valid = FALSE;
+
+ zone_id = mn_icu_ustr_new("PST"); /* Gmail's timezone */
+ cal = ucal_open(zone_id, -1, NULL, UCAL_TRADITIONAL, &status);
+ g_free(zone_id);
- now = mn_time();
- if (now > 0)
+ if (! cal)
{
- int hours;
- int minutes;
- char ampm[3];
- char month_str[4];
- int day;
- struct tm *tm = NULL;
-
- /* convert now to UTC-7 (Gmail time) */
- now -= (7 * 3600);
-
- if (sscanf(date, "%d:%d%2s", &hours, &minutes, ampm) == 3)
- {
- tm = gmtime(&now);
- tm->tm_hour = hours;
- if (ampm[0] == 'p')
- tm->tm_hour += 12;
- tm->tm_min = minutes;
- tm->tm_sec = 0;
- }
- else if (sscanf(date, "%3s %d", month_str, &day) == 2)
- {
- const char *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
- int i;
-
- for (i = 0; i < G_N_ELEMENTS(months); i++)
- if (! strcmp(month_str, months[i]))
- {
- tm = gmtime(&now);
- tm->tm_mon = i;
- tm->tm_mday = day;
- tm->tm_hour = 0;
- tm->tm_min = 0;
- tm->tm_sec = 0;
-
- break;
- }
- }
+ mn_mailbox_warning(MN_MAILBOX(self), _("unable to open calendar: %s"), u_errorName(status));
+ return 0;
+ }
+
+ ud = ucal_getNow();
+ ucal_setMillis(cal, ud, &status);
+ if (U_FAILURE(status))
+ {
+ mn_mailbox_warning(MN_MAILBOX(self), _("unable to set calendar time: %s"), u_errorName(status));
+ goto end;
+ }
- if (tm)
- t = timegm(tm) + (7 * 3600); /* add 7 hours, because Gmail time is UTC-7 */
+ if (sscanf(date, "%d:%d%2s", &hour, &minute, ampm) == 3)
+ {
+ ucal_set(cal, UCAL_HOUR, hour);
+ ucal_set(cal, UCAL_MINUTE, minute);
+ ucal_set(cal, UCAL_SECOND, 0);
+ ucal_set(cal, UCAL_AM_PM, ampm[0] == 'p' ? 1 : 0);
+ valid = TRUE;
}
-#endif /* HAVE_TIMEGM */
+ else if (sscanf(date, "%d/%d/%d", &month, &day, &year) == 3)
+ {
+ /*
+ * Convert year from 2-digits to 4-digits, conforms to the
+ * POSIX or X/Open standard.
+ */
+ year += year >= 69 && year <= 99 ? 1900 : 2000;
+
+ ucal_set(cal, UCAL_MONTH, month);
+ ucal_set(cal, UCAL_DATE, day);
+ ucal_set(cal, UCAL_YEAR, year);
+ ucal_set(cal, UCAL_HOUR, 0);
+ ucal_set(cal, UCAL_MINUTE, 0);
+ ucal_set(cal, UCAL_SECOND, 0);
+ valid = TRUE;
+ }
+ else if (sscanf(date, "%3s %d", month_str, &day) == 2)
+ {
+ const struct
+ {
+ const char *name;
+ int value;
+ } months[] = {
+ { "Jan", UCAL_JANUARY },
+ { "Feb", UCAL_FEBRUARY },
+ { "Mar", UCAL_MARCH },
+ { "Apr", UCAL_APRIL },
+ { "May", UCAL_MAY },
+ { "Jun", UCAL_JUNE },
+ { "Jul", UCAL_JULY },
+ { "Aug", UCAL_AUGUST },
+ { "Sep", UCAL_SEPTEMBER },
+ { "Oct", UCAL_OCTOBER },
+ { "Nov", UCAL_NOVEMBER },
+ { "Dec", UCAL_DECEMBER }
+ };
+ int i;
+
+ for (i = 0; i < G_N_ELEMENTS(months); i++)
+ if (! strcmp(month_str, months[i].name))
+ {
+ ucal_set(cal, UCAL_MONTH, months[i].value);
+ ucal_set(cal, UCAL_DATE, day);
+ ucal_set(cal, UCAL_HOUR, 0);
+ ucal_set(cal, UCAL_MINUTE, 0);
+ ucal_set(cal, UCAL_SECOND, 0);
+ valid = TRUE;
+ break;
+ }
+ }
+
+ if (valid)
+ {
+ ud = ucal_getMillis(cal, &status);
+ if (U_SUCCESS(status))
+ t = ud / 1000;
+ else
+ mn_mailbox_warning(MN_MAILBOX(self), _("unable to get calendar time: %s"), u_errorName(status));
+ }
+
+ end:
+ ucal_close(cal);
return t;
+#else
+ g_return_val_if_reached(0);
+#endif /* WITH_GMAIL_TIMESTAMPS */
}}
-#line 1341 "mn-gmail-mailbox.c"
+#line 1448 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-gmail-mailbox.gob b/src/mn-gmail-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -31,12 +31,16 @@ requires 2.0.10
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <time.h>
-#ifdef TM_IN_SYS_TIME
-#include <sys/time.h>
-#endif
#include <glib/gi18n.h>
#include <eel/eel.h>
+#ifdef WITH_GMAIL_TIMESTAMPS
+#include <unicode/uenum.h>
+#include <unicode/uloc.h>
+#include <unicode/ucal.h>
+#include "mn-icu.h"
+#endif /* WITH_GMAIL_TIMESTAMPS */
#include "mn-mailbox-private.h"
#include "mn-authenticated-mailbox-private.h"
#include "mn-util.h"
@@ -72,7 +76,7 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
@@ -206,7 +210,13 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
if (SOUP_STATUS_IS_SUCCESSFUL(message->status_code))
{
- body = g_strndup(message->response.body, message->response.length);
+ const char *end;
+
+ /* Gmail returns UTF-8, so we don't need to parse Content-Type */
+ if (! g_utf8_validate(message->response.body, message->response.length, &end))
+ mn_mailbox_warning(MN_MAILBOX(self), _("received non-UTF-8 data from server"));
+
+ body = g_strndup(message->response.body, end - message->response.body);
self_dump_response(self, message, body);
self_update_cookies(self, message);
}
@@ -417,11 +427,9 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
private void
update_cookies (self, Soup:Message *message (check null type))
{
- const GSList *set_cookie_headers;
const GSList *l;
- set_cookie_headers = soup_message_get_header_list(message->response_headers, "Set-Cookie");
- MN_LIST_FOREACH(l, set_cookie_headers)
+ MN_LIST_FOREACH(l, soup_message_get_header_list(message->response_headers, "Set-Cookie"))
{
const char *value = l->data;
char *equal;
@@ -506,16 +514,35 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
if (self_js_get_arg_list(&work, &arg_list) && arg_list)
{
GSList *l;
-
+ gboolean icu_available = FALSE;
+
+#ifdef WITH_GMAIL_TIMESTAMPS
+ if (arg_list->next)
+ {
+ GError *err = NULL;
+
+ icu_available = mn_icu_use(&err);
+ if (! icu_available)
+ {
+ mn_mailbox_warning(MN_MAILBOX(self), _("unable to initialize the ICU library"), err->message);
+ g_error_free(err);
+ }
+ }
+#endif /* WITH_GMAIL_TIMESTAMPS */
+
MN_LIST_FOREACH(l, arg_list->next)
- self_append_message(self, &messages, l->data);
+ self_append_message(self, &messages, l->data, icu_available);
+
+#ifdef WITH_GMAIL_TIMESTAMPS
+ if (icu_available)
+ mn_icu_unuse();
+#endif /* WITH_GMAIL_TIMESTAMPS */
self_js_arg_list_free(arg_list);
}
}
GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(MN_MAILBOX(self), messages != NULL);
mn_mailbox_set_messages(MN_MAILBOX(self), messages);
gdk_flush();
GDK_THREADS_LEAVE();
@@ -534,7 +561,8 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
private void
append_message (self,
GSList **messages (check null),
- JSArg *arg (check null))
+ JSArg *arg (check null),
+ gboolean icu_available)
{
char *date_field;
char *sender_field;
@@ -543,15 +571,18 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
GSList *l;
gboolean in_inbox = FALSE;
- char *date;
+ char *count_str;
char *sender_email;
char *sender_name;
char *subject;
+ int count = 1;
time_t sent_time = 0;
char *from = NULL;
char *expanded_subject = NULL;
+ int i;
+
if (arg->type != JS_ARG_LIST
|| ! self_js_arg_list_scan(arg->value.list,
3, JS_ARG_STRING, &date_field,
@@ -575,17 +606,31 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
if (! in_inbox)
return;
- date = self_get_substring(date_field, "<b>", "</b>", FALSE, FALSE);
- sender_email = self_get_substring(sender_field, "<span id='_user_", "'", FALSE, FALSE);
- sender_name = self_get_substring(sender_field, "'><b>", "</b>", FALSE, FALSE);
- subject = self_get_substring(subject_field, "<b>", "</b>", FALSE, FALSE);
-
- if (date)
+#ifdef WITH_GMAIL_TIMESTAMPS
+ if (icu_available)
{
- sent_time = self_parse_date(date);
- g_free(date);
+ char *date;
+
+ date = self_get_substring(date_field, "<b>", "</b>", FALSE, FALSE);
+ if (date)
+ {
+ sent_time = self_parse_date(self, date);
+ g_free(date);
+ }
+ }
+#endif /* WITH_GMAIL_TIMESTAMPS */
+
+ count_str = self_get_substring(sender_field, "</span> (", ")", FALSE, FALSE);
+ if (count_str)
+ {
+ if (mn_str_isnumeric(count_str))
+ count = atoi(count_str);
+ g_free(count_str);
}
+ sender_email = self_get_substring(sender_field, "<span id='_user_", "'", FALSE, FALSE);
+ sender_name = self_get_substring(sender_field, "'><b>", "</b>", FALSE, FALSE);
+
if (sender_name && sender_email)
{
char *tmp;
@@ -602,6 +647,7 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
g_free(sender_email);
g_free(sender_name);
+ subject = self_get_substring(subject_field, "<b>", "</b>", FALSE, FALSE);
if (subject)
{
if (strcmp(subject, "(no subject)"))
@@ -609,12 +655,13 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
g_free(subject);
}
- *messages = g_slist_append(*messages, mn_message_new(MN_MAILBOX(self)->uri,
- NULL,
- sent_time,
- NULL,
- from,
- expanded_subject));
+ for (i = 0; i < count; i++)
+ *messages = g_slist_append(*messages, mn_message_new(MN_MAILBOX(self)->uri,
+ NULL,
+ sent_time,
+ NULL,
+ from,
+ expanded_subject));
g_free(from);
g_free(expanded_subject);
@@ -818,58 +865,115 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
}
private time_t
- parse_date (const char *date (check null))
+ parse_date (self, const char *date (check null))
{
+#ifdef WITH_GMAIL_TIMESTAMPS
time_t t = 0;
-#ifdef HAVE_TIMEGM
- time_t now;
+ UChar *zone_id;
+ UCalendar *cal;
+ UErrorCode status = U_ZERO_ERROR;
+ UDate ud;
+ int hour;
+ int minute;
+ char ampm[3];
+ char month_str[4];
+ int year;
+ int month;
+ int day;
+ gboolean valid = FALSE;
+
+ zone_id = mn_icu_ustr_new("PST"); /* Gmail's timezone */
+ cal = ucal_open(zone_id, -1, NULL, UCAL_TRADITIONAL, &status);
+ g_free(zone_id);
- now = mn_time();
- if (now > 0)
+ if (! cal)
{
- int hours;
- int minutes;
- char ampm[3];
- char month_str[4];
- int day;
- struct tm *tm = NULL;
-
- /* convert now to UTC-7 (Gmail time) */
- now -= (7 * 3600);
-
- if (sscanf(date, "%d:%d%2s", &hours, &minutes, ampm) == 3)
- {
- tm = gmtime(&now);
- tm->tm_hour = hours;
- if (ampm[0] == 'p')
- tm->tm_hour += 12;
- tm->tm_min = minutes;
- tm->tm_sec = 0;
- }
- else if (sscanf(date, "%3s %d", month_str, &day) == 2)
- {
- const char *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
- int i;
-
- for (i = 0; i < G_N_ELEMENTS(months); i++)
- if (! strcmp(month_str, months[i]))
- {
- tm = gmtime(&now);
- tm->tm_mon = i;
- tm->tm_mday = day;
- tm->tm_hour = 0;
- tm->tm_min = 0;
- tm->tm_sec = 0;
-
- break;
- }
- }
+ mn_mailbox_warning(MN_MAILBOX(self), _("unable to open calendar: %s"), u_errorName(status));
+ return 0;
+ }
+
+ ud = ucal_getNow();
+ ucal_setMillis(cal, ud, &status);
+ if (U_FAILURE(status))
+ {
+ mn_mailbox_warning(MN_MAILBOX(self), _("unable to set calendar time: %s"), u_errorName(status));
+ goto end;
+ }
- if (tm)
- t = timegm(tm) + (7 * 3600); /* add 7 hours, because Gmail time is UTC-7 */
+ if (sscanf(date, "%d:%d%2s", &hour, &minute, ampm) == 3)
+ {
+ ucal_set(cal, UCAL_HOUR, hour);
+ ucal_set(cal, UCAL_MINUTE, minute);
+ ucal_set(cal, UCAL_SECOND, 0);
+ ucal_set(cal, UCAL_AM_PM, ampm[0] == 'p' ? 1 : 0);
+ valid = TRUE;
+ }
+ else if (sscanf(date, "%d/%d/%d", &month, &day, &year) == 3)
+ {
+ /*
+ * Convert year from 2-digits to 4-digits, conforms to the
+ * POSIX or X/Open standard.
+ */
+ year += year >= 69 && year <= 99 ? 1900 : 2000;
+
+ ucal_set(cal, UCAL_MONTH, month);
+ ucal_set(cal, UCAL_DATE, day);
+ ucal_set(cal, UCAL_YEAR, year);
+ ucal_set(cal, UCAL_HOUR, 0);
+ ucal_set(cal, UCAL_MINUTE, 0);
+ ucal_set(cal, UCAL_SECOND, 0);
+ valid = TRUE;
}
-#endif /* HAVE_TIMEGM */
+ else if (sscanf(date, "%3s %d", month_str, &day) == 2)
+ {
+ const struct
+ {
+ const char *name;
+ int value;
+ } months[] = {
+ { "Jan", UCAL_JANUARY },
+ { "Feb", UCAL_FEBRUARY },
+ { "Mar", UCAL_MARCH },
+ { "Apr", UCAL_APRIL },
+ { "May", UCAL_MAY },
+ { "Jun", UCAL_JUNE },
+ { "Jul", UCAL_JULY },
+ { "Aug", UCAL_AUGUST },
+ { "Sep", UCAL_SEPTEMBER },
+ { "Oct", UCAL_OCTOBER },
+ { "Nov", UCAL_NOVEMBER },
+ { "Dec", UCAL_DECEMBER }
+ };
+ int i;
+
+ for (i = 0; i < G_N_ELEMENTS(months); i++)
+ if (! strcmp(month_str, months[i].name))
+ {
+ ucal_set(cal, UCAL_MONTH, months[i].value);
+ ucal_set(cal, UCAL_DATE, day);
+ ucal_set(cal, UCAL_HOUR, 0);
+ ucal_set(cal, UCAL_MINUTE, 0);
+ ucal_set(cal, UCAL_SECOND, 0);
+ valid = TRUE;
+ break;
+ }
+ }
+
+ if (valid)
+ {
+ ud = ucal_getMillis(cal, &status);
+ if (U_SUCCESS(status))
+ t = ud / 1000;
+ else
+ mn_mailbox_warning(MN_MAILBOX(self), _("unable to get calendar time: %s"), u_errorName(status));
+ }
+
+ end:
+ ucal_close(cal);
return t;
+#else
+ g_return_val_if_reached(0);
+#endif /* WITH_GMAIL_TIMESTAMPS */
}
}
diff --git a/src/mn-gmime-stream-vfs.c b/src/mn-gmime-stream-vfs.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
diff --git a/src/mn-gmime-stream-vfs.gob b/src/mn-gmime-stream-vfs.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-icu.c b/src/mn-icu.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2005 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 <string.h>
+#include <glib.h>
+#include <unicode/uclean.h>
+#include <unicode/utypes.h>
+#include <unicode/putil.h>
+#include <unicode/uiter.h>
+#include <unicode/ustring.h>
+
+/*** variables ***************************************************************/
+
+static int use_count = 0;
+G_LOCK_DEFINE_STATIC(use_count);
+
+/*** implementation **********************************************************/
+
+gboolean
+mn_icu_use (GError **err)
+{
+ gboolean success;
+ UErrorCode status = U_ZERO_ERROR;
+
+ G_LOCK(use_count);
+
+ /* u_init() must be called in every thread, so we always call it */
+
+ u_init(&status);
+ if (U_SUCCESS(status))
+ {
+ use_count++;
+ success = TRUE;
+ }
+ else
+ {
+ g_set_error(err, 0, 0, "%s", u_errorName(status));
+ success = FALSE;
+ }
+
+ G_UNLOCK(use_count);
+
+ return success;
+}
+
+void
+mn_icu_unuse (void)
+{
+ G_LOCK(use_count);
+ g_return_if_fail(use_count > 0);
+ if (--use_count == 0)
+ u_cleanup();
+ G_UNLOCK(use_count);
+}
+
+UChar *
+mn_icu_ustr_new (const char *str)
+{
+ UChar *ustr;
+
+ g_return_val_if_fail(str != NULL, NULL);
+
+ ustr = g_new(UChar, sizeof(UChar) * (strlen(str) + 1));
+ u_uastrcpy(ustr, str);
+
+ return ustr;
+}
diff --git a/src/mn-icu.h b/src/mn-icu.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2005 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_ICU_H
+#define _MN_ICU_H
+
+#include <glib.h>
+#include <unicode/utypes.h>
+
+gboolean mn_icu_use (GError **err);
+void mn_icu_unuse (void);
+
+UChar *mn_icu_ustr_new (const char *str);
+
+#endif /* _MN_ICU_H */
diff --git a/src/mn-imap-mailbox-private.h b/src/mn-imap-mailbox-private.h
@@ -16,11 +16,11 @@ extern "C" {
#line 18 "mn-imap-mailbox-private.h"
struct _MNIMAPMailboxPrivate {
-#line 145 "mn-imap-mailbox.gob"
+#line 135 "mn-imap-mailbox.gob"
int removed;
-#line 147 "mn-imap-mailbox.gob"
+#line 137 "mn-imap-mailbox.gob"
MNClientSessionPrivate * idle_session;
-#line 148 "mn-imap-mailbox.gob"
+#line 138 "mn-imap-mailbox.gob"
GMutex * idle_session_mutex;
#line 26 "mn-imap-mailbox-private.h"
};
diff --git a/src/mn-imap-mailbox-properties-private.h b/src/mn-imap-mailbox-properties-private.h
@@ -10,13 +10,13 @@ extern "C" {
#endif /* __cplusplus */
struct _MNIMAPMailboxPropertiesPrivate {
-#line 67 "mn-imap-mailbox-properties.gob"
- GtkWidget * inbox_radio;
#line 68 "mn-imap-mailbox-properties.gob"
- GtkWidget * other_radio;
+ GtkWidget * inbox_radio;
#line 69 "mn-imap-mailbox-properties.gob"
- GtkWidget * mailbox_entry;
+ GtkWidget * other_radio;
#line 70 "mn-imap-mailbox-properties.gob"
+ GtkWidget * mailbox_entry;
+#line 71 "mn-imap-mailbox-properties.gob"
GtkWidget * idle_check;
#line 22 "mn-imap-mailbox-properties-private.h"
};
diff --git a/src/mn-imap-mailbox-properties.c b/src/mn-imap-mailbox-properties.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:09 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -32,8 +32,9 @@
#include "mn-pi-mailbox-properties-private.h"
#include "mn-auth-combo-box.h"
#include "mn-util.h"
+#include "mn-properties-dialog.h"
-#line 37 "mn-imap-mailbox-properties.c"
+#line 38 "mn-imap-mailbox-properties.c"
/* self casting macros */
#define SELF(x) MN_IMAP_MAILBOX_PROPERTIES(x)
#define SELF_CONST(x) MN_IMAP_MAILBOX_PROPERTIES_CONST(x)
@@ -51,7 +52,7 @@ typedef MNIMAPMailboxPropertiesClass SelfClass;
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_imap_mailbox_properties_init (MNIMAPMailboxProperties * o) G_GNUC_UNUSED;
static void mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_imap_mailbox_properties_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_imap_mailbox_properties_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static void mn_imap_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) G_GNUC_UNUSED;
static gboolean mn_imap_mailbox_properties_set_uri (MNMailboxProperties * properties, MNURI * uri) G_GNUC_UNUSED;
static MNURI * mn_imap_mailbox_properties_get_uri (MNMailboxProperties * properties) G_GNUC_UNUSED;
@@ -77,7 +78,7 @@ ___MN_Mailbox_Properties_init (MNMailboxPropertiesIface *iface)
iface->set_uri = self_set_uri;
#line 187 "mn-imap-mailbox-properties.gob"
iface->get_uri = self_get_uri;
-#line 81 "mn-imap-mailbox-properties.c"
+#line 82 "mn-imap-mailbox-properties.c"
}
GType
@@ -150,10 +151,10 @@ mn_imap_mailbox_properties_init (MNIMAPMailboxProperties * o G_GNUC_UNUSED)
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNIMAPMailboxPropertiesPrivate);
}
#undef __GOB_FUNCTION__
-#line 72 "mn-imap-mailbox-properties.gob"
+#line 73 "mn-imap-mailbox-properties.gob"
static void
mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GNUC_UNUSED)
-#line 157 "mn-imap-mailbox-properties.c"
+#line 158 "mn-imap-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -162,9 +163,9 @@ mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GN
parent_class = g_type_class_ref (MN_TYPE_PI_MAILBOX_PROPERTIES);
-#line 81 "mn-imap-mailbox-properties.gob"
+#line 82 "mn-imap-mailbox-properties.gob"
g_object_class->constructor = ___2_mn_imap_mailbox_properties_constructor;
-#line 168 "mn-imap-mailbox-properties.c"
+#line 169 "mn-imap-mailbox-properties.c"
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
{
@@ -173,7 +174,7 @@ mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GN
"complete");
}
{
-#line 73 "mn-imap-mailbox-properties.gob"
+#line 74 "mn-imap-mailbox-properties.gob"
MNPIMailboxPropertiesClass *pi_class = MN_PI_MAILBOX_PROPERTIES_CLASS(class);
@@ -181,7 +182,7 @@ mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GN
pi_class->default_port[0] = mn_uri_get_default_port("imap");
pi_class->default_port[1] = mn_uri_get_default_port("imaps");
-#line 185 "mn-imap-mailbox-properties.c"
+#line 186 "mn-imap-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
@@ -200,7 +201,7 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_COMPLETE:
{
-#line 38 "mn-imap-mailbox-properties.gob"
+#line 39 "mn-imap-mailbox-properties.gob"
MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
gboolean complete;
@@ -229,7 +230,7 @@ ___object_get_property (GObject *object,
g_value_set_boolean(VAL, complete);
-#line 233 "mn-imap-mailbox-properties.c"
+#line 234 "mn-imap-mailbox-properties.c"
}
break;
default:
@@ -246,10 +247,10 @@ ___object_get_property (GObject *object,
-#line 81 "mn-imap-mailbox-properties.gob"
+#line 82 "mn-imap-mailbox-properties.gob"
static GObject *
-___2_mn_imap_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 253 "mn-imap-mailbox-properties.c"
+___2_mn_imap_mailbox_properties_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 254 "mn-imap-mailbox-properties.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -257,7 +258,7 @@ ___2_mn_imap_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_c
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::constructor"
{
-#line 83 "mn-imap-mailbox-properties.gob"
+#line 84 "mn-imap-mailbox-properties.gob"
GObject *object;
Self *self;
@@ -303,15 +304,14 @@ ___2_mn_imap_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_c
mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+LOGIN", "IMAP LOGIN");
- mn_gtk_tooltips_set_tips(pi->tooltips,
- pi->hostname_entry, _("The hostname or IP address of the IMAP server"),
- pi->username_entry, _("Your username on the IMAP server"),
- pi->password_entry, _("Your password on the IMAP server (if left blank, you will be prompted for the password when needed)"),
- pi->port_spin[0], _("The port number of the IMAP server"),
- pi->port_spin[1], _("The port number of the IMAP server"),
- selfp->mailbox_entry, _("The mailbox name"),
- selfp->idle_check, _("If possible, whether to use idle mode or not"),
- NULL);
+ mn_properties_dialog_set_tooltips(pi->hostname_entry, _("The hostname or IP address of the IMAP server"),
+ pi->username_entry, _("Your username on the IMAP server"),
+ pi->password_entry, _("Your password on the IMAP server (if left blank, you will be prompted for the password when needed)"),
+ pi->port_spin[0], _("The port number of the IMAP server"),
+ pi->port_spin[1], _("The port number of the IMAP server"),
+ selfp->mailbox_entry, _("The mailbox name"),
+ selfp->idle_check, _("If possible, whether to use idle mode or not"),
+ NULL);
g_signal_connect(selfp->inbox_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
g_signal_connect(selfp->other_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
diff --git a/src/mn-imap-mailbox-properties.gob b/src/mn-imap-mailbox-properties.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -29,6 +29,7 @@ requires 2.0.10
#include "mn-pi-mailbox-properties-private.h"
#include "mn-auth-combo-box.h"
#include "mn-util.h"
+#include "mn-properties-dialog.h"
%}
class MN:IMAP:Mailbox:Properties from MN:PI:Mailbox:Properties (interface MN:Mailbox:Properties)
@@ -79,7 +80,7 @@ class MN:IMAP:Mailbox:Properties from MN:PI:Mailbox:Properties (interface MN:Mai
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
Self *self;
@@ -125,15 +126,14 @@ class MN:IMAP:Mailbox:Properties from MN:PI:Mailbox:Properties (interface MN:Mai
mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+LOGIN", "IMAP LOGIN");
- mn_gtk_tooltips_set_tips(pi->tooltips,
- pi->hostname_entry, _("The hostname or IP address of the IMAP server"),
- pi->username_entry, _("Your username on the IMAP server"),
- pi->password_entry, _("Your password on the IMAP server (if left blank, you will be prompted for the password when needed)"),
- pi->port_spin[0], _("The port number of the IMAP server"),
- pi->port_spin[1], _("The port number of the IMAP server"),
- selfp->mailbox_entry, _("The mailbox name"),
- selfp->idle_check, _("If possible, whether to use idle mode or not"),
- NULL);
+ mn_properties_dialog_set_tooltips(pi->hostname_entry, _("The hostname or IP address of the IMAP server"),
+ pi->username_entry, _("Your username on the IMAP server"),
+ pi->password_entry, _("Your password on the IMAP server (if left blank, you will be prompted for the password when needed)"),
+ pi->port_spin[0], _("The port number of the IMAP server"),
+ pi->port_spin[1], _("The port number of the IMAP server"),
+ selfp->mailbox_entry, _("The mailbox name"),
+ selfp->idle_check, _("If possible, whether to use idle mode or not"),
+ NULL);
g_signal_connect(selfp->inbox_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
g_signal_connect(selfp->other_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
diff --git a/src/mn-imap-mailbox.c b/src/mn-imap-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:09 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -34,12 +34,10 @@
#include "mn-mailbox-private.h"
#include "mn-authenticated-mailbox-private.h"
#include "mn-util.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
#define HAS_CURRENT_TAG(response, priv) (! strcmp((response)->tag, (priv)->tag))
-#define IS(response, token) (! strcmp((response)->response, (token)))
+#define IS(response, token) (! g_ascii_strcasecmp((response)->response, (token)))
#define IS_OK(response) IS(response, "OK")
#define IS_NO(response) IS(response, "NO")
#define IS_BAD(response) IS(response, "BAD")
@@ -60,11 +58,7 @@
STATE_LOGIN,
STATE_EXAMINE,
STATE_SEARCH,
-#ifdef WITH_MIME
STATE_FETCH,
-#else /* WITH_MIME */
- STATE_STATUS,
-#endif
STATE_IDLE,
STATE_LOGOUT
};
@@ -101,12 +95,8 @@
GSList *fetch_numbers;
char *fetch_set;
-#ifdef WITH_MIME
GSList *received_numbers;
GSList *messages;
-#else /* WITH_MIME */
- gboolean status_received;
-#endif
#ifdef WITH_SSL
gboolean starttls_completed;
@@ -128,7 +118,7 @@
char *arguments;
};
-#line 132 "mn-imap-mailbox.c"
+#line 122 "mn-imap-mailbox.c"
/* self casting macros */
#define SELF(x) MN_IMAP_MAILBOX(x)
#define SELF_CONST(x) MN_IMAP_MAILBOX_CONST(x)
@@ -145,7 +135,7 @@ typedef MNIMAPMailboxClass SelfClass;
/* here are local prototypes */
static void mn_imap_mailbox_init (MNIMAPMailbox * o) G_GNUC_UNUSED;
static void mn_imap_mailbox_class_init (MNIMAPMailboxClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_imap_mailbox_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_imap_mailbox_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static gboolean ___3_mn_imap_mailbox_impl_is (MNMailbox * dummy, MNURI * uri) G_GNUC_UNUSED;
static void ___4_mn_imap_mailbox_removed (MNMailbox * mailbox) G_GNUC_UNUSED;
static int mn_imap_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
@@ -167,12 +157,11 @@ static int mn_imap_mailbox_enter_fetch_cb (MNClientSession * session, MNClientSe
static int mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_imap_mailbox_enter_idle_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_imap_mailbox_handle_idle_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-static int mn_imap_mailbox_enter_status_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-static int mn_imap_mailbox_handle_status_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_imap_mailbox_enter_logout_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_imap_mailbox_handle_logout_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-static void ___1c_mn_imap_mailbox_impl_check (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void ___1a_mn_imap_mailbox_impl_check (MNMailbox * mailbox) G_GNUC_UNUSED;
static void mn_imap_mailbox_notice_cb (MNClientSession * session, const char * str, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
+static void mn_imap_mailbox_warning_cb (MNClientSession * session, const char * str, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static MNClientSessionResponse * mn_imap_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static void mn_imap_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_imap_mailbox_custom_handler_cb (MNClientSession * session, MNClientSessionResponse * response, int result, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
@@ -186,7 +175,6 @@ static gboolean mn_imap_mailbox_session_has_capability (MNClientSessionPrivate *
static int mn_imap_mailbox_session_after_capability (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_imap_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_login) G_GNUC_UNUSED;
-static int mn_imap_mailbox_session_check_mail (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static char * mn_imap_mailbox_quote (const char * str) G_GNUC_UNUSED;
/* pointer to the class of our parent */
@@ -212,11 +200,10 @@ static MNAuthenticatedMailboxClass *parent_class = NULL;
#define self_handle_fetch_cb mn_imap_mailbox_handle_fetch_cb
#define self_enter_idle_cb mn_imap_mailbox_enter_idle_cb
#define self_handle_idle_cb mn_imap_mailbox_handle_idle_cb
-#define self_enter_status_cb mn_imap_mailbox_enter_status_cb
-#define self_handle_status_cb mn_imap_mailbox_handle_status_cb
#define self_enter_logout_cb mn_imap_mailbox_enter_logout_cb
#define self_handle_logout_cb mn_imap_mailbox_handle_logout_cb
#define self_notice_cb mn_imap_mailbox_notice_cb
+#define self_warning_cb mn_imap_mailbox_warning_cb
#define self_response_new_cb mn_imap_mailbox_response_new_cb
#define self_response_free_cb mn_imap_mailbox_response_free_cb
#define self_custom_handler_cb mn_imap_mailbox_custom_handler_cb
@@ -230,7 +217,6 @@ static MNAuthenticatedMailboxClass *parent_class = NULL;
#define self_session_after_capability mn_imap_mailbox_session_after_capability
#define self_session_authenticate mn_imap_mailbox_session_authenticate
#define self_session_authenticate_fallback mn_imap_mailbox_session_authenticate_fallback
-#define self_session_check_mail mn_imap_mailbox_session_check_mail
#define self_quote mn_imap_mailbox_quote
GType
mn_imap_mailbox_get_type (void)
@@ -283,9 +269,9 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 148 "mn-imap-mailbox.gob"
+#line 138 "mn-imap-mailbox.gob"
if(self->_priv->idle_session_mutex) { g_mutex_free ((gpointer) self->_priv->idle_session_mutex); self->_priv->idle_session_mutex = NULL; }
-#line 289 "mn-imap-mailbox.c"
+#line 275 "mn-imap-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -294,15 +280,15 @@ mn_imap_mailbox_init (MNIMAPMailbox * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::init"
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNIMAPMailboxPrivate);
-#line 148 "mn-imap-mailbox.gob"
+#line 138 "mn-imap-mailbox.gob"
o->_priv->idle_session_mutex = g_mutex_new();
-#line 300 "mn-imap-mailbox.c"
+#line 286 "mn-imap-mailbox.c"
}
#undef __GOB_FUNCTION__
-#line 150 "mn-imap-mailbox.gob"
+#line 140 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_class_init (MNIMAPMailboxClass * class G_GNUC_UNUSED)
-#line 306 "mn-imap-mailbox.c"
+#line 292 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -312,32 +298,32 @@ mn_imap_mailbox_class_init (MNIMAPMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX);
-#line 155 "mn-imap-mailbox.gob"
+#line 145 "mn-imap-mailbox.gob"
g_object_class->constructor = ___2_mn_imap_mailbox_constructor;
-#line 172 "mn-imap-mailbox.gob"
+#line 162 "mn-imap-mailbox.gob"
mn_mailbox_class->impl_is = ___3_mn_imap_mailbox_impl_is;
-#line 178 "mn-imap-mailbox.gob"
+#line 168 "mn-imap-mailbox.gob"
mn_mailbox_class->removed = ___4_mn_imap_mailbox_removed;
-#line 878 "mn-imap-mailbox.gob"
- mn_mailbox_class->impl_check = ___1c_mn_imap_mailbox_impl_check;
-#line 324 "mn-imap-mailbox.c"
+#line 778 "mn-imap-mailbox.gob"
+ mn_mailbox_class->impl_check = ___1a_mn_imap_mailbox_impl_check;
+#line 310 "mn-imap-mailbox.c"
g_object_class->finalize = ___finalize;
{
-#line 151 "mn-imap-mailbox.gob"
+#line 141 "mn-imap-mailbox.gob"
MN_MAILBOX_CLASS(class)->format = "IMAP";
-#line 331 "mn-imap-mailbox.c"
+#line 317 "mn-imap-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 155 "mn-imap-mailbox.gob"
+#line 145 "mn-imap-mailbox.gob"
static GObject *
-___2_mn_imap_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 341 "mn-imap-mailbox.c"
+___2_mn_imap_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 327 "mn-imap-mailbox.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -345,7 +331,7 @@ ___2_mn_imap_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_pr
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::constructor"
{
-#line 157 "mn-imap-mailbox.gob"
+#line 147 "mn-imap-mailbox.gob"
GObject *object;
MNMailbox *mailbox;
@@ -360,50 +346,50 @@ ___2_mn_imap_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_pr
return object;
}}
-#line 364 "mn-imap-mailbox.c"
+#line 350 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 172 "mn-imap-mailbox.gob"
+#line 162 "mn-imap-mailbox.gob"
static gboolean
___3_mn_imap_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
-#line 371 "mn-imap-mailbox.c"
+#line 357 "mn-imap-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->impl_is)? \
(* MN_MAILBOX_CLASS(parent_class)->impl_is)(___dummy,___uri): \
((gboolean )0))
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::impl_is"
-#line 172 "mn-imap-mailbox.gob"
+#line 162 "mn-imap-mailbox.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 172 "mn-imap-mailbox.gob"
+#line 162 "mn-imap-mailbox.gob"
g_return_val_if_fail (MN_IS_URI (uri), (gboolean )0);
-#line 382 "mn-imap-mailbox.c"
+#line 368 "mn-imap-mailbox.c"
{
-#line 174 "mn-imap-mailbox.gob"
+#line 164 "mn-imap-mailbox.gob"
return MN_URI_IS_IMAP(uri);
}}
-#line 388 "mn-imap-mailbox.c"
+#line 374 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 178 "mn-imap-mailbox.gob"
+#line 168 "mn-imap-mailbox.gob"
static void
___4_mn_imap_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 395 "mn-imap-mailbox.c"
+#line 381 "mn-imap-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->removed) \
(* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::removed"
-#line 178 "mn-imap-mailbox.gob"
+#line 168 "mn-imap-mailbox.gob"
g_return_if_fail (mailbox != NULL);
-#line 178 "mn-imap-mailbox.gob"
+#line 168 "mn-imap-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 405 "mn-imap-mailbox.c"
+#line 391 "mn-imap-mailbox.c"
{
-#line 180 "mn-imap-mailbox.gob"
+#line 170 "mn-imap-mailbox.gob"
Self *self = SELF(mailbox);
@@ -419,25 +405,25 @@ ___4_mn_imap_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
PARENT_HANDLER(mailbox);
}}
-#line 423 "mn-imap-mailbox.c"
+#line 409 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 196 "mn-imap-mailbox.gob"
+#line 186 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 430 "mn-imap-mailbox.c"
+#line 416 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_greeting_cb"
-#line 196 "mn-imap-mailbox.gob"
+#line 186 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 196 "mn-imap-mailbox.gob"
+#line 186 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 196 "mn-imap-mailbox.gob"
+#line 186 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 439 "mn-imap-mailbox.c"
+#line 425 "mn-imap-mailbox.c"
{
-#line 200 "mn-imap-mailbox.gob"
+#line 190 "mn-imap-mailbox.gob"
priv->session = session;
@@ -461,43 +447,43 @@ mn_imap_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionRe
else
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}}
-#line 465 "mn-imap-mailbox.c"
+#line 451 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 224 "mn-imap-mailbox.gob"
+#line 214 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_capability_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 471 "mn-imap-mailbox.c"
+#line 457 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_capability_cb"
-#line 224 "mn-imap-mailbox.gob"
+#line 214 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 224 "mn-imap-mailbox.gob"
+#line 214 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 478 "mn-imap-mailbox.c"
+#line 464 "mn-imap-mailbox.c"
{
-#line 227 "mn-imap-mailbox.gob"
+#line 217 "mn-imap-mailbox.gob"
return self_session_write(priv, "CAPABILITY");
}}
-#line 484 "mn-imap-mailbox.c"
+#line 470 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 231 "mn-imap-mailbox.gob"
+#line 221 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_capability_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 490 "mn-imap-mailbox.c"
+#line 476 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_capability_cb"
-#line 231 "mn-imap-mailbox.gob"
+#line 221 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 231 "mn-imap-mailbox.gob"
+#line 221 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 231 "mn-imap-mailbox.gob"
+#line 221 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 499 "mn-imap-mailbox.c"
+#line 485 "mn-imap-mailbox.c"
{
-#line 235 "mn-imap-mailbox.gob"
+#line 225 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -525,22 +511,22 @@ mn_imap_mailbox_handle_capability_cb (MNClientSession * session, MNClientSession
return RESULT_DEFAULT_HANDLER;
}}
-#line 529 "mn-imap-mailbox.c"
+#line 515 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 263 "mn-imap-mailbox.gob"
+#line 253 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_starttls_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 535 "mn-imap-mailbox.c"
+#line 521 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_starttls_cb"
-#line 263 "mn-imap-mailbox.gob"
+#line 253 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 263 "mn-imap-mailbox.gob"
+#line 253 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 542 "mn-imap-mailbox.c"
+#line 528 "mn-imap-mailbox.c"
{
-#line 266 "mn-imap-mailbox.gob"
+#line 256 "mn-imap-mailbox.gob"
#ifdef WITH_SSL
return self_session_write(priv, "STARTTLS");
@@ -548,24 +534,24 @@ mn_imap_mailbox_enter_starttls_cb (MNClientSession * session, MNClientSessionPri
g_return_val_if_reached(0);
#endif /* WITH_SSL */
}}
-#line 552 "mn-imap-mailbox.c"
+#line 538 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 274 "mn-imap-mailbox.gob"
+#line 264 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_starttls_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 558 "mn-imap-mailbox.c"
+#line 544 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_starttls_cb"
-#line 274 "mn-imap-mailbox.gob"
+#line 264 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 274 "mn-imap-mailbox.gob"
+#line 264 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 274 "mn-imap-mailbox.gob"
+#line 264 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 567 "mn-imap-mailbox.c"
+#line 553 "mn-imap-mailbox.c"
{
-#line 278 "mn-imap-mailbox.gob"
+#line 268 "mn-imap-mailbox.gob"
#ifdef WITH_SSL
if (response->continuation)
@@ -593,22 +579,22 @@ mn_imap_mailbox_handle_starttls_cb (MNClientSession * session, MNClientSessionRe
g_return_val_if_reached(0);
#endif /* WITH_SSL */
}}
-#line 597 "mn-imap-mailbox.c"
+#line 583 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 306 "mn-imap-mailbox.gob"
+#line 296 "mn-imap-mailbox.gob"
static const char *
mn_imap_mailbox_sasl_get_username_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 603 "mn-imap-mailbox.c"
+#line 589 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::sasl_get_username_cb"
-#line 306 "mn-imap-mailbox.gob"
+#line 296 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (const char * )0);
-#line 306 "mn-imap-mailbox.gob"
+#line 296 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (const char * )0);
-#line 610 "mn-imap-mailbox.c"
+#line 596 "mn-imap-mailbox.c"
{
-#line 309 "mn-imap-mailbox.gob"
+#line 299 "mn-imap-mailbox.gob"
#ifdef WITH_SASL
return priv->mailbox->uri->username;
@@ -616,22 +602,22 @@ mn_imap_mailbox_sasl_get_username_cb (MNClientSession * session, MNClientSession
g_return_val_if_reached(NULL);
#endif /* WITH_SASL */
}}
-#line 620 "mn-imap-mailbox.c"
+#line 606 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 317 "mn-imap-mailbox.gob"
+#line 307 "mn-imap-mailbox.gob"
static const char *
mn_imap_mailbox_sasl_get_password_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 626 "mn-imap-mailbox.c"
+#line 612 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::sasl_get_password_cb"
-#line 317 "mn-imap-mailbox.gob"
+#line 307 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (const char * )0);
-#line 317 "mn-imap-mailbox.gob"
+#line 307 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (const char * )0);
-#line 633 "mn-imap-mailbox.c"
+#line 619 "mn-imap-mailbox.c"
{
-#line 320 "mn-imap-mailbox.gob"
+#line 310 "mn-imap-mailbox.gob"
#ifdef WITH_SASL
mn_authenticated_mailbox_fill_password(priv->authenticated_mailbox);
@@ -640,22 +626,22 @@ mn_imap_mailbox_sasl_get_password_cb (MNClientSession * session, MNClientSession
g_return_val_if_reached(NULL);
#endif /* WITH_SASL */
}}
-#line 644 "mn-imap-mailbox.c"
+#line 630 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 329 "mn-imap-mailbox.gob"
+#line 319 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_authenticate_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 650 "mn-imap-mailbox.c"
+#line 636 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_authenticate_cb"
-#line 329 "mn-imap-mailbox.gob"
+#line 319 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 329 "mn-imap-mailbox.gob"
+#line 319 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 657 "mn-imap-mailbox.c"
+#line 643 "mn-imap-mailbox.c"
{
-#line 332 "mn-imap-mailbox.gob"
+#line 322 "mn-imap-mailbox.gob"
#ifdef WITH_SASL
if (mn_client_session_sasl_authentication_start(priv->session,
@@ -678,24 +664,24 @@ mn_imap_mailbox_enter_authenticate_cb (MNClientSession * session, MNClientSessio
g_return_val_if_reached(0);
#endif /* WITH_SASL */
}}
-#line 682 "mn-imap-mailbox.c"
+#line 668 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 355 "mn-imap-mailbox.gob"
+#line 345 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_authenticate_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 688 "mn-imap-mailbox.c"
+#line 674 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_authenticate_cb"
-#line 355 "mn-imap-mailbox.gob"
+#line 345 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 355 "mn-imap-mailbox.gob"
+#line 345 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 355 "mn-imap-mailbox.gob"
+#line 345 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 697 "mn-imap-mailbox.c"
+#line 683 "mn-imap-mailbox.c"
{
-#line 359 "mn-imap-mailbox.gob"
+#line 349 "mn-imap-mailbox.gob"
#ifdef WITH_SASL
if (response->tag)
@@ -726,7 +712,7 @@ mn_imap_mailbox_handle_authenticate_cb (MNClientSession * session, MNClientSessi
* CAPABILITY command in this case.
*/
return self_handle_capability_code(priv, response) && mn_client_session_sasl_get_ssf(session)
- ? self_session_check_mail(priv)
+ ? STATE_EXAMINE
: STATE_CAPABILITY;
}
else
@@ -748,22 +734,22 @@ mn_imap_mailbox_handle_authenticate_cb (MNClientSession * session, MNClientSessi
g_return_val_if_reached(0);
#endif /* WITH_SASL */
}}
-#line 752 "mn-imap-mailbox.c"
+#line 738 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 412 "mn-imap-mailbox.gob"
+#line 402 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_login_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 758 "mn-imap-mailbox.c"
+#line 744 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_login_cb"
-#line 412 "mn-imap-mailbox.gob"
+#line 402 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 412 "mn-imap-mailbox.gob"
+#line 402 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 765 "mn-imap-mailbox.c"
+#line 751 "mn-imap-mailbox.c"
{
-#line 415 "mn-imap-mailbox.gob"
+#line 405 "mn-imap-mailbox.gob"
if (self_session_has_capability(priv, "LOGINDISABLED"))
{
@@ -790,24 +776,24 @@ mn_imap_mailbox_enter_login_cb (MNClientSession * session, MNClientSessionPrivat
return result;
}
}}
-#line 794 "mn-imap-mailbox.c"
+#line 780 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 442 "mn-imap-mailbox.gob"
+#line 432 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_login_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 800 "mn-imap-mailbox.c"
+#line 786 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_login_cb"
-#line 442 "mn-imap-mailbox.gob"
+#line 432 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 442 "mn-imap-mailbox.gob"
+#line 432 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 442 "mn-imap-mailbox.gob"
+#line 432 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 809 "mn-imap-mailbox.c"
+#line 795 "mn-imap-mailbox.c"
{
-#line 446 "mn-imap-mailbox.gob"
+#line 436 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -819,7 +805,7 @@ mn_imap_mailbox_handle_login_cb (MNClientSession * session, MNClientSessionRespo
{
priv->authenticated = TRUE;
return self_handle_capability_code(priv, response)
- ? self_session_check_mail(priv)
+ ? STATE_EXAMINE
: STATE_CAPABILITY;
}
else if (IS_NO(response) || IS_BAD(response))
@@ -831,22 +817,22 @@ mn_imap_mailbox_handle_login_cb (MNClientSession * session, MNClientSessionRespo
return RESULT_DEFAULT_HANDLER;
}}
-#line 835 "mn-imap-mailbox.c"
+#line 821 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 470 "mn-imap-mailbox.gob"
+#line 460 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_examine_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 841 "mn-imap-mailbox.c"
+#line 827 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_examine_cb"
-#line 470 "mn-imap-mailbox.gob"
+#line 460 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 470 "mn-imap-mailbox.gob"
+#line 460 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 848 "mn-imap-mailbox.c"
+#line 834 "mn-imap-mailbox.c"
{
-#line 473 "mn-imap-mailbox.gob"
+#line 463 "mn-imap-mailbox.gob"
char *quoted_mailbox;
int result;
@@ -857,24 +843,24 @@ mn_imap_mailbox_enter_examine_cb (MNClientSession * session, MNClientSessionPriv
return result;
}}
-#line 861 "mn-imap-mailbox.c"
+#line 847 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 484 "mn-imap-mailbox.gob"
+#line 474 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_examine_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 867 "mn-imap-mailbox.c"
+#line 853 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_examine_cb"
-#line 484 "mn-imap-mailbox.gob"
+#line 474 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 484 "mn-imap-mailbox.gob"
+#line 474 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 484 "mn-imap-mailbox.gob"
+#line 474 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 876 "mn-imap-mailbox.c"
+#line 862 "mn-imap-mailbox.c"
{
-#line 488 "mn-imap-mailbox.gob"
+#line 478 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -893,22 +879,22 @@ mn_imap_mailbox_handle_examine_cb (MNClientSession * session, MNClientSessionRes
return RESULT_DEFAULT_HANDLER;
}}
-#line 897 "mn-imap-mailbox.c"
+#line 883 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 507 "mn-imap-mailbox.gob"
+#line 497 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_search_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 903 "mn-imap-mailbox.c"
+#line 889 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_search_cb"
-#line 507 "mn-imap-mailbox.gob"
+#line 497 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 507 "mn-imap-mailbox.gob"
+#line 497 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 910 "mn-imap-mailbox.c"
+#line 896 "mn-imap-mailbox.c"
{
-#line 510 "mn-imap-mailbox.gob"
+#line 500 "mn-imap-mailbox.gob"
priv->search_received = FALSE;
@@ -920,24 +906,24 @@ mn_imap_mailbox_enter_search_cb (MNClientSession * session, MNClientSessionPriva
return self_session_write(priv, "SEARCH UNSEEN");
}}
-#line 924 "mn-imap-mailbox.c"
+#line 910 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 522 "mn-imap-mailbox.gob"
+#line 512 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_search_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 930 "mn-imap-mailbox.c"
+#line 916 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_search_cb"
-#line 522 "mn-imap-mailbox.gob"
+#line 512 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 522 "mn-imap-mailbox.gob"
+#line 512 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 522 "mn-imap-mailbox.gob"
+#line 512 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 939 "mn-imap-mailbox.c"
+#line 925 "mn-imap-mailbox.c"
{
-#line 526 "mn-imap-mailbox.gob"
+#line 516 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -950,30 +936,11 @@ mn_imap_mailbox_handle_search_cb (MNClientSession * session, MNClientSessionResp
if (priv->search_received)
{
if (priv->fetch_set)
- {
-#ifdef WITH_MIME
- return STATE_FETCH;
-#else
- GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, TRUE);
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- /*
- * We are here and not in STATE_STATUS because
- * the IDLE capability has already been
- * tested, so proceed.
- */
- return STATE_IDLE;
-#endif /* WITH_MIME */
- }
+ return STATE_FETCH;
else
{
GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, FALSE);
-#ifdef WITH_MIME
mn_mailbox_set_messages(priv->mailbox, NULL);
-#endif
gdk_flush();
GDK_THREADS_LEAVE();
@@ -1024,24 +991,23 @@ mn_imap_mailbox_handle_search_cb (MNClientSession * session, MNClientSessionResp
return RESULT_DEFAULT_HANDLER;
}}
-#line 1028 "mn-imap-mailbox.c"
+#line 995 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 613 "mn-imap-mailbox.gob"
+#line 584 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_fetch_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1034 "mn-imap-mailbox.c"
+#line 1001 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_fetch_cb"
-#line 613 "mn-imap-mailbox.gob"
+#line 584 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 613 "mn-imap-mailbox.gob"
+#line 584 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1041 "mn-imap-mailbox.c"
+#line 1008 "mn-imap-mailbox.c"
{
-#line 616 "mn-imap-mailbox.gob"
+#line 587 "mn-imap-mailbox.gob"
-#ifdef WITH_MIME
g_return_val_if_fail(priv->fetch_set != NULL, 0);
g_slist_free(priv->received_numbers);
@@ -1051,30 +1017,26 @@ mn_imap_mailbox_enter_fetch_cb (MNClientSession * session, MNClientSessionPrivat
priv->messages = NULL;
return self_session_write(priv, "FETCH %s BODY[HEADER]", priv->fetch_set);
-#else /* WITH_MIME */
- g_return_val_if_reached(0);
-#endif
}}
-#line 1059 "mn-imap-mailbox.c"
+#line 1022 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 632 "mn-imap-mailbox.gob"
+#line 599 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1065 "mn-imap-mailbox.c"
+#line 1028 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_fetch_cb"
-#line 632 "mn-imap-mailbox.gob"
+#line 599 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 632 "mn-imap-mailbox.gob"
+#line 599 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 632 "mn-imap-mailbox.gob"
+#line 599 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1074 "mn-imap-mailbox.c"
+#line 1037 "mn-imap-mailbox.c"
{
-#line 636 "mn-imap-mailbox.gob"
+#line 603 "mn-imap-mailbox.gob"
-#ifdef WITH_MIME
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
else if (response->tag)
@@ -1091,7 +1053,6 @@ mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionRespo
return mn_client_session_error(session, _("server did not send all the messages we requested"));
GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, priv->messages != NULL);
mn_mailbox_set_messages(priv->mailbox, priv->messages);
gdk_flush();
GDK_THREADS_LEAVE();
@@ -1108,8 +1069,14 @@ mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionRespo
}
else if (mn_str_isnumeric(response->response)
&& response->arguments
- && g_str_has_prefix(response->arguments, "FETCH (BODY[HEADER]"))
+ && (mn_ascii_str_case_has_prefix(response->arguments, "FETCH (BODY[HEADER]")
+ || mn_ascii_str_case_has_prefix(response->arguments, "FETCH (BODY[HEADER "))) /* [1] */
{
+ /*
+ * [1] Non-compliant response (see RFC 3501 BNF), sent by Binc
+ * IMAP and maybe others. We are tolerant.
+ */
+
int n = atoi(response->response);
if (g_slist_find(priv->fetch_numbers, GINT_TO_POINTER(n)))
@@ -1144,48 +1111,45 @@ mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionRespo
}
return RESULT_DEFAULT_HANDLER;
-#else /* WITH_MIME */
- g_return_val_if_reached(0);
-#endif
}}
-#line 1152 "mn-imap-mailbox.c"
+#line 1116 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 712 "mn-imap-mailbox.gob"
+#line 680 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_idle_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1158 "mn-imap-mailbox.c"
+#line 1122 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_idle_cb"
-#line 712 "mn-imap-mailbox.gob"
+#line 680 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 712 "mn-imap-mailbox.gob"
+#line 680 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1165 "mn-imap-mailbox.c"
+#line 1129 "mn-imap-mailbox.c"
{
-#line 715 "mn-imap-mailbox.gob"
+#line 683 "mn-imap-mailbox.gob"
priv->idle_state = IDLE_STATE_NORMAL;
return REMOVED(priv->self) ? STATE_LOGOUT : self_session_write(priv, "IDLE");
}}
-#line 1172 "mn-imap-mailbox.c"
+#line 1136 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 720 "mn-imap-mailbox.gob"
+#line 688 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_idle_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1178 "mn-imap-mailbox.c"
+#line 1142 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_idle_cb"
-#line 720 "mn-imap-mailbox.gob"
+#line 688 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 720 "mn-imap-mailbox.gob"
+#line 688 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 720 "mn-imap-mailbox.gob"
+#line 688 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1187 "mn-imap-mailbox.c"
+#line 1151 "mn-imap-mailbox.c"
{
-#line 724 "mn-imap-mailbox.gob"
+#line 692 "mn-imap-mailbox.gob"
if (priv->idle_state == IDLE_STATE_IDLING)
{
@@ -1244,136 +1208,43 @@ mn_imap_mailbox_handle_idle_cb (MNClientSession * session, MNClientSessionRespon
return RESULT_DEFAULT_HANDLER;
}}
-#line 1248 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 783 "mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_status_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1254 "mn-imap-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_status_cb"
-#line 783 "mn-imap-mailbox.gob"
- g_return_val_if_fail (session != NULL, (int )0);
-#line 783 "mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1261 "mn-imap-mailbox.c"
-{
-#line 786 "mn-imap-mailbox.gob"
-
-#ifndef WITH_MIME
- char *quoted_mailbox;
- int result;
-
- quoted_mailbox = self_quote(priv->mailbox->uri->path);
- result = self_session_write(priv, "STATUS %s (UNSEEN)", quoted_mailbox);
- g_free(quoted_mailbox);
-
- return result;
-#else /* ! WITH_MIME */
- g_return_val_if_reached(0);
-#endif
- }}
-#line 1278 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 801 "mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_status_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1284 "mn-imap-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_status_cb"
-#line 801 "mn-imap-mailbox.gob"
- g_return_val_if_fail (session != NULL, (int )0);
-#line 801 "mn-imap-mailbox.gob"
- g_return_val_if_fail (response != NULL, (int )0);
-#line 801 "mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1293 "mn-imap-mailbox.c"
-{
-#line 805 "mn-imap-mailbox.gob"
-
-#ifndef WITH_MIME
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- if (priv->status_received)
- return STATE_LOGOUT;
- else /* compliance error */
- return mn_client_session_error(session, _("server did not send status"));
- }
- else if (IS_NO(response) || IS_BAD(response))
- return RESULT_ERROR_LOGOUT;
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (IS(response, "STATUS"))
- {
- int count;
-
- if (response->arguments && sscanf(response->arguments, "%*s (UNSEEN %i)", &count) == 1)
- {
- priv->status_received = TRUE;
-
- GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, count != 0);
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
-
- return RESULT_DEFAULT_HANDLER;
-#else /* ! WITH_MIME */
- g_return_val_if_reached(0);
-#endif
- }}
-#line 1341 "mn-imap-mailbox.c"
+#line 1212 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 851 "mn-imap-mailbox.gob"
+#line 751 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_logout_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1347 "mn-imap-mailbox.c"
+#line 1218 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_logout_cb"
-#line 851 "mn-imap-mailbox.gob"
+#line 751 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 851 "mn-imap-mailbox.gob"
+#line 751 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1354 "mn-imap-mailbox.c"
+#line 1225 "mn-imap-mailbox.c"
{
-#line 854 "mn-imap-mailbox.gob"
+#line 754 "mn-imap-mailbox.gob"
return self_session_write(priv, "LOGOUT");
}}
-#line 1360 "mn-imap-mailbox.c"
+#line 1231 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 858 "mn-imap-mailbox.gob"
+#line 758 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_logout_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1366 "mn-imap-mailbox.c"
+#line 1237 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_logout_cb"
-#line 858 "mn-imap-mailbox.gob"
+#line 758 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 858 "mn-imap-mailbox.gob"
+#line 758 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 858 "mn-imap-mailbox.gob"
+#line 758 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1375 "mn-imap-mailbox.c"
+#line 1246 "mn-imap-mailbox.c"
{
-#line 862 "mn-imap-mailbox.gob"
+#line 762 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -1389,25 +1260,25 @@ mn_imap_mailbox_handle_logout_cb (MNClientSession * session, MNClientSessionResp
else
return MN_CLIENT_SESSION_RESULT_CONTINUE;
}}
-#line 1393 "mn-imap-mailbox.c"
+#line 1264 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 878 "mn-imap-mailbox.gob"
+#line 778 "mn-imap-mailbox.gob"
static void
-___1c_mn_imap_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 1399 "mn-imap-mailbox.c"
+___1a_mn_imap_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 1270 "mn-imap-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->impl_check) \
(* MN_MAILBOX_CLASS(parent_class)->impl_check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::impl_check"
-#line 878 "mn-imap-mailbox.gob"
+#line 778 "mn-imap-mailbox.gob"
g_return_if_fail (mailbox != NULL);
-#line 878 "mn-imap-mailbox.gob"
+#line 778 "mn-imap-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1409 "mn-imap-mailbox.c"
+#line 1280 "mn-imap-mailbox.c"
{
-#line 880 "mn-imap-mailbox.gob"
+#line 780 "mn-imap-mailbox.gob"
Self *self = SELF(mailbox);
MNClientSessionState states[] = {
@@ -1422,11 +1293,7 @@ ___1c_mn_imap_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
{ STATE_LOGIN, self_enter_login_cb, self_handle_login_cb },
{ STATE_EXAMINE, self_enter_examine_cb, self_handle_examine_cb },
{ STATE_SEARCH, self_enter_search_cb, self_handle_search_cb },
-#ifdef WITH_MIME
{ STATE_FETCH, self_enter_fetch_cb, self_handle_fetch_cb },
-#else
- { STATE_STATUS, self_enter_status_cb, self_handle_status_cb },
-#endif
{ STATE_IDLE, self_enter_idle_cb, self_handle_idle_cb },
{ STATE_LOGOUT, self_enter_logout_cb, self_handle_logout_cb },
@@ -1434,6 +1301,7 @@ ___1c_mn_imap_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
};
MNClientSessionCallbacks callbacks = {
self_notice_cb,
+ self_warning_cb,
self_response_new_cb,
self_response_free_cb,
self_custom_handler_cb,
@@ -1473,10 +1341,8 @@ ___1c_mn_imap_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
g_slist_free(priv.fetch_numbers);
g_free(priv.fetch_set);
-#ifdef WITH_MIME
g_slist_free(priv.received_numbers);
mn_g_object_slist_free(priv.messages);
-#endif
}
while (status && priv.could_idle && ! REMOVED(self));
@@ -1493,110 +1359,138 @@ ___1c_mn_imap_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
gdk_flush();
GDK_THREADS_LEAVE();
}}
-#line 1497 "mn-imap-mailbox.c"
+#line 1363 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 966 "mn-imap-mailbox.gob"
+#line 861 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_notice_cb (MNClientSession * session, const char * str, MNClientSessionPrivate * priv)
-#line 1504 "mn-imap-mailbox.c"
+#line 1370 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::notice_cb"
-#line 966 "mn-imap-mailbox.gob"
+#line 861 "mn-imap-mailbox.gob"
g_return_if_fail (session != NULL);
-#line 966 "mn-imap-mailbox.gob"
+#line 861 "mn-imap-mailbox.gob"
g_return_if_fail (str != NULL);
-#line 966 "mn-imap-mailbox.gob"
+#line 861 "mn-imap-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1513 "mn-imap-mailbox.c"
+#line 1379 "mn-imap-mailbox.c"
{
-#line 970 "mn-imap-mailbox.gob"
+#line 865 "mn-imap-mailbox.gob"
mn_mailbox_notice(priv->mailbox, "%s", str);
}}
-#line 1519 "mn-imap-mailbox.c"
+#line 1385 "mn-imap-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 869 "mn-imap-mailbox.gob"
+static void
+mn_imap_mailbox_warning_cb (MNClientSession * session, const char * str, MNClientSessionPrivate * priv)
+#line 1391 "mn-imap-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::warning_cb"
+#line 869 "mn-imap-mailbox.gob"
+ g_return_if_fail (session != NULL);
+#line 869 "mn-imap-mailbox.gob"
+ g_return_if_fail (str != NULL);
+#line 869 "mn-imap-mailbox.gob"
+ g_return_if_fail (priv != NULL);
+#line 1400 "mn-imap-mailbox.c"
+{
+#line 873 "mn-imap-mailbox.gob"
+
+ mn_mailbox_warning(priv->mailbox, "%s", str);
+ }}
+#line 1406 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 974 "mn-imap-mailbox.gob"
+#line 877 "mn-imap-mailbox.gob"
static MNClientSessionResponse *
mn_imap_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv)
-#line 1525 "mn-imap-mailbox.c"
+#line 1412 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::response_new_cb"
-#line 974 "mn-imap-mailbox.gob"
+#line 877 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (MNClientSessionResponse * )0);
-#line 974 "mn-imap-mailbox.gob"
+#line 877 "mn-imap-mailbox.gob"
g_return_val_if_fail (input != NULL, (MNClientSessionResponse * )0);
-#line 974 "mn-imap-mailbox.gob"
+#line 877 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (MNClientSessionResponse * )0);
-#line 1534 "mn-imap-mailbox.c"
+#line 1421 "mn-imap-mailbox.c"
{
-#line 978 "mn-imap-mailbox.gob"
+#line 881 "mn-imap-mailbox.gob"
MNClientSessionResponse *response = NULL;
- if (g_str_has_prefix(input, "+ "))
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->continuation = g_strdup(input + 2);
- }
- else
+ /*
+ * RFC 3501 1.2: "Characters are 7-bit US-ASCII unless otherwise
+ * specified."
+ */
+ if (mn_ascii_validate(input))
{
- char **tokens;
-
- tokens = g_strsplit(input, " ", 3);
- if (tokens[0] && tokens[1])
+ if (g_str_has_prefix(input, "+ "))
+ {
+ response = g_new0(MNClientSessionResponse, 1);
+ response->continuation = g_strdup(input + 2);
+ }
+ else
{
- if (tokens[2] && tokens[2][0] == '[')
+ char **tokens;
+
+ tokens = g_strsplit(input, " ", 3);
+ if (tokens[0] && tokens[1])
{
- char *code_start;
- char *code_end;
-
- code_start = tokens[2] + 1;
- code_end = strchr(code_start, ']');
- if (code_end)
+ if (tokens[2] && tokens[2][0] == '[')
+ {
+ char *code_start;
+ char *code_end;
+
+ code_start = tokens[2] + 1;
+ code_end = strchr(code_start, ']');
+ if (code_end)
+ {
+ response = g_new0(MNClientSessionResponse, 1);
+ response->code = g_strndup(code_start, code_end - code_start);
+ response->arguments = code_end[1] ? g_strdup(code_end + 2) : NULL;
+ }
+ }
+ else
{
response = g_new0(MNClientSessionResponse, 1);
- response->code = g_strndup(code_start, code_end - code_start);
- response->arguments = code_end[1] ? g_strdup(code_end + 2) : NULL;
+ response->arguments = g_strdup(tokens[2]);
+ }
+
+ if (response)
+ {
+ response->tag = ! strcmp(tokens[0], "*") ? NULL : g_strdup(tokens[0]);
+ response->response = g_strdup(tokens[1]);
}
}
- else
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->arguments = g_strdup(tokens[2]);
- }
-
- if (response)
- {
- response->tag = ! strcmp(tokens[0], "*") ? NULL : g_strdup(tokens[0]);
- response->response = g_strdup(tokens[1]);
- }
+ g_strfreev(tokens);
}
- g_strfreev(tokens);
}
-
+
return response;
}}
-#line 1583 "mn-imap-mailbox.c"
+#line 1477 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1025 "mn-imap-mailbox.gob"
+#line 935 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1589 "mn-imap-mailbox.c"
+#line 1483 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::response_free_cb"
-#line 1025 "mn-imap-mailbox.gob"
+#line 935 "mn-imap-mailbox.gob"
g_return_if_fail (session != NULL);
-#line 1025 "mn-imap-mailbox.gob"
+#line 935 "mn-imap-mailbox.gob"
g_return_if_fail (response != NULL);
-#line 1025 "mn-imap-mailbox.gob"
+#line 935 "mn-imap-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1598 "mn-imap-mailbox.c"
+#line 1492 "mn-imap-mailbox.c"
{
-#line 1029 "mn-imap-mailbox.gob"
+#line 939 "mn-imap-mailbox.gob"
g_free(response->continuation);
g_free(response->tag);
@@ -1605,24 +1499,24 @@ mn_imap_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResp
g_free(response->arguments);
g_free(response);
}}
-#line 1609 "mn-imap-mailbox.c"
+#line 1503 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1038 "mn-imap-mailbox.gob"
+#line 948 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_custom_handler_cb (MNClientSession * session, MNClientSessionResponse * response, int result, MNClientSessionPrivate * priv)
-#line 1615 "mn-imap-mailbox.c"
+#line 1509 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::custom_handler_cb"
-#line 1038 "mn-imap-mailbox.gob"
+#line 948 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 1038 "mn-imap-mailbox.gob"
+#line 948 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 1038 "mn-imap-mailbox.gob"
+#line 948 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1624 "mn-imap-mailbox.c"
+#line 1518 "mn-imap-mailbox.c"
{
-#line 1043 "mn-imap-mailbox.gob"
+#line 953 "mn-imap-mailbox.gob"
switch (result)
{
@@ -1644,22 +1538,22 @@ mn_imap_mailbox_custom_handler_cb (MNClientSession * session, MNClientSessionRes
g_return_val_if_reached(0);
}
}}
-#line 1648 "mn-imap-mailbox.c"
+#line 1542 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1065 "mn-imap-mailbox.gob"
+#line 975 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_pre_read_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1654 "mn-imap-mailbox.c"
+#line 1548 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::pre_read_cb"
-#line 1065 "mn-imap-mailbox.gob"
+#line 975 "mn-imap-mailbox.gob"
g_return_if_fail (session != NULL);
-#line 1065 "mn-imap-mailbox.gob"
+#line 975 "mn-imap-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1661 "mn-imap-mailbox.c"
+#line 1555 "mn-imap-mailbox.c"
{
-#line 1068 "mn-imap-mailbox.gob"
+#line 978 "mn-imap-mailbox.gob"
if (priv->idle_state == IDLE_STATE_IDLING)
{
@@ -1668,22 +1562,22 @@ mn_imap_mailbox_pre_read_cb (MNClientSession * session, MNClientSessionPrivate *
g_mutex_unlock(priv->self->_priv->idle_session_mutex);
}
}}
-#line 1672 "mn-imap-mailbox.c"
+#line 1566 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1077 "mn-imap-mailbox.gob"
+#line 987 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_post_read_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1678 "mn-imap-mailbox.c"
+#line 1572 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::post_read_cb"
-#line 1077 "mn-imap-mailbox.gob"
+#line 987 "mn-imap-mailbox.gob"
g_return_if_fail (session != NULL);
-#line 1077 "mn-imap-mailbox.gob"
+#line 987 "mn-imap-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1685 "mn-imap-mailbox.c"
+#line 1579 "mn-imap-mailbox.c"
{
-#line 1080 "mn-imap-mailbox.gob"
+#line 990 "mn-imap-mailbox.gob"
if (priv->idle_state == IDLE_STATE_IDLING)
{
@@ -1692,44 +1586,44 @@ mn_imap_mailbox_post_read_cb (MNClientSession * session, MNClientSessionPrivate
g_mutex_unlock(priv->self->_priv->idle_session_mutex);
}
}}
-#line 1696 "mn-imap-mailbox.c"
+#line 1590 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1089 "mn-imap-mailbox.gob"
+#line 999 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_session_set_error_from_arguments (MNClientSessionPrivate * priv, MNClientSessionResponse * response)
-#line 1702 "mn-imap-mailbox.c"
+#line 1596 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_set_error_from_arguments"
-#line 1089 "mn-imap-mailbox.gob"
+#line 999 "mn-imap-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1089 "mn-imap-mailbox.gob"
+#line 999 "mn-imap-mailbox.gob"
g_return_if_fail (response != NULL);
-#line 1709 "mn-imap-mailbox.c"
+#line 1603 "mn-imap-mailbox.c"
{
-#line 1092 "mn-imap-mailbox.gob"
+#line 1002 "mn-imap-mailbox.gob"
if (response->arguments)
mn_client_session_error(priv->session, "\"%s\"", response->arguments);
else
mn_client_session_error(priv->session, _("unknown server error"));
}}
-#line 1718 "mn-imap-mailbox.c"
+#line 1612 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1099 "mn-imap-mailbox.gob"
+#line 1009 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_write (MNClientSessionPrivate * priv, const char * format, ...)
-#line 1724 "mn-imap-mailbox.c"
+#line 1618 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_write"
-#line 1099 "mn-imap-mailbox.gob"
+#line 1009 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1099 "mn-imap-mailbox.gob"
+#line 1009 "mn-imap-mailbox.gob"
g_return_val_if_fail (format != NULL, (int )0);
-#line 1731 "mn-imap-mailbox.c"
+#line 1625 "mn-imap-mailbox.c"
{
-#line 1103 "mn-imap-mailbox.gob"
+#line 1013 "mn-imap-mailbox.gob"
va_list args;
char *command;
@@ -1748,31 +1642,31 @@ mn_imap_mailbox_session_write (MNClientSessionPrivate * priv, const char * forma
return result;
}}
-#line 1752 "mn-imap-mailbox.c"
+#line 1646 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1122 "mn-imap-mailbox.gob"
+#line 1032 "mn-imap-mailbox.gob"
static gboolean
mn_imap_mailbox_handle_capability_code (MNClientSessionPrivate * priv, MNClientSessionResponse * response)
-#line 1758 "mn-imap-mailbox.c"
+#line 1652 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_capability_code"
-#line 1122 "mn-imap-mailbox.gob"
+#line 1032 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (gboolean )0);
-#line 1122 "mn-imap-mailbox.gob"
+#line 1032 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (gboolean )0);
-#line 1765 "mn-imap-mailbox.c"
+#line 1659 "mn-imap-mailbox.c"
{
-#line 1125 "mn-imap-mailbox.gob"
+#line 1035 "mn-imap-mailbox.gob"
if (response->code)
{
- if (! strcmp(response->code, "CAPABILITY"))
+ if (! g_ascii_strcasecmp(response->code, "CAPABILITY"))
{
self_session_parse_capabilities(priv, NULL);
return TRUE;
}
- else if (g_str_has_prefix(response->code, "CAPABILITY "))
+ else if (mn_ascii_str_case_has_prefix(response->code, "CAPABILITY "))
{
self_session_parse_capabilities(priv, response->code + 11);
return TRUE;
@@ -1781,20 +1675,20 @@ mn_imap_mailbox_handle_capability_code (MNClientSessionPrivate * priv, MNClientS
return FALSE;
}}
-#line 1785 "mn-imap-mailbox.c"
+#line 1679 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1143 "mn-imap-mailbox.gob"
+#line 1053 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_session_parse_capabilities (MNClientSessionPrivate * priv, const char * capabilities)
-#line 1791 "mn-imap-mailbox.c"
+#line 1685 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_parse_capabilities"
-#line 1143 "mn-imap-mailbox.gob"
+#line 1053 "mn-imap-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1796 "mn-imap-mailbox.c"
+#line 1690 "mn-imap-mailbox.c"
{
-#line 1146 "mn-imap-mailbox.gob"
+#line 1056 "mn-imap-mailbox.gob"
g_strfreev(priv->capabilities);
priv->capabilities = NULL;
@@ -1815,50 +1709,50 @@ mn_imap_mailbox_session_parse_capabilities (MNClientSessionPrivate * priv, const
else
priv->capabilities = g_new0(char *, 1);
}}
-#line 1819 "mn-imap-mailbox.c"
+#line 1713 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1167 "mn-imap-mailbox.gob"
+#line 1077 "mn-imap-mailbox.gob"
static gboolean
mn_imap_mailbox_session_has_capability (MNClientSessionPrivate * priv, const char * capability)
-#line 1825 "mn-imap-mailbox.c"
+#line 1719 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_has_capability"
-#line 1167 "mn-imap-mailbox.gob"
+#line 1077 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (gboolean )0);
-#line 1167 "mn-imap-mailbox.gob"
+#line 1077 "mn-imap-mailbox.gob"
g_return_val_if_fail (capability != NULL, (gboolean )0);
-#line 1832 "mn-imap-mailbox.c"
+#line 1726 "mn-imap-mailbox.c"
{
-#line 1170 "mn-imap-mailbox.gob"
+#line 1080 "mn-imap-mailbox.gob"
int i;
g_return_val_if_fail(priv->capabilities != NULL, FALSE);
for (i = 0; priv->capabilities[i]; i++)
- if (! strcmp(priv->capabilities[i], capability))
+ if (! g_ascii_strcasecmp(priv->capabilities[i], capability))
return TRUE;
return FALSE;
}}
-#line 1846 "mn-imap-mailbox.c"
+#line 1740 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1182 "mn-imap-mailbox.gob"
+#line 1092 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_after_capability (MNClientSessionPrivate * priv)
-#line 1852 "mn-imap-mailbox.c"
+#line 1746 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_after_capability"
-#line 1182 "mn-imap-mailbox.gob"
+#line 1092 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1857 "mn-imap-mailbox.c"
+#line 1751 "mn-imap-mailbox.c"
{
-#line 1184 "mn-imap-mailbox.gob"
+#line 1094 "mn-imap-mailbox.gob"
if (priv->authenticated)
- return self_session_check_mail(priv);
+ return STATE_EXAMINE;
else
{
#ifdef WITH_SSL
@@ -1878,20 +1772,20 @@ mn_imap_mailbox_session_after_capability (MNClientSessionPrivate * priv)
return self_session_authenticate(priv);
}
}}
-#line 1882 "mn-imap-mailbox.c"
+#line 1776 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1207 "mn-imap-mailbox.gob"
+#line 1117 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv)
-#line 1888 "mn-imap-mailbox.c"
+#line 1782 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_authenticate"
-#line 1207 "mn-imap-mailbox.gob"
+#line 1117 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1893 "mn-imap-mailbox.c"
+#line 1787 "mn-imap-mailbox.c"
{
-#line 1209 "mn-imap-mailbox.gob"
+#line 1119 "mn-imap-mailbox.gob"
if (priv->mailbox->uri->authmech)
{
@@ -1900,7 +1794,8 @@ mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv)
#ifdef WITH_SASL
return STATE_AUTHENTICATE;
#else
- return mn_client_session_error(priv->session, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
+ mn_client_session_error(priv->session, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
+ return STATE_LOGOUT;
#endif /* WITH_SASL */
}
else
@@ -1908,7 +1803,10 @@ mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv)
if (! strcmp(priv->mailbox->uri->authmech, "+LOGIN"))
return STATE_LOGIN;
else
- return mn_client_session_error(priv->session, _("unknown authentication mechanism \"%s\""), priv->mailbox->uri->authmech);
+ {
+ mn_client_session_error(priv->session, _("unknown authentication mechanism \"%s\""), priv->mailbox->uri->authmech);
+ return STATE_LOGOUT;
+ }
}
}
else
@@ -1920,20 +1818,20 @@ mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv)
return STATE_LOGIN;
}
}}
-#line 1924 "mn-imap-mailbox.c"
+#line 1822 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1238 "mn-imap-mailbox.gob"
+#line 1152 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_login)
-#line 1930 "mn-imap-mailbox.c"
+#line 1828 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_authenticate_fallback"
-#line 1238 "mn-imap-mailbox.gob"
+#line 1152 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1935 "mn-imap-mailbox.c"
+#line 1833 "mn-imap-mailbox.c"
{
-#line 1241 "mn-imap-mailbox.gob"
+#line 1155 "mn-imap-mailbox.gob"
if (! priv->mailbox->uri->authmech)
{
@@ -1944,38 +1842,18 @@ mn_imap_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gb
}
}
- if (! priv->mailbox->uri->password)
+ if (! priv->mailbox->uri->password && priv->authenticated_mailbox->prompted)
{
mn_authenticated_mailbox_authentication_failed(priv->authenticated_mailbox);
return self_session_authenticate(priv);
}
else
- return mn_client_session_error(priv->session, _("authentication failed"));
- }}
-#line 1956 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1260 "mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_session_check_mail (MNClientSessionPrivate * priv)
-#line 1962 "mn-imap-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_check_mail"
-#line 1260 "mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1967 "mn-imap-mailbox.c"
-{
-#line 1262 "mn-imap-mailbox.gob"
-
-#ifdef WITH_MIME
- return STATE_EXAMINE;
-#else
- return self_session_has_capability(priv, "IDLE") && ! mn_uri_has_query(priv->mailbox->uri, "noidle")
- ? STATE_EXAMINE
- : STATE_STATUS;
-#endif /* WITH_MIME */
+ {
+ mn_client_session_error(priv->session, _("authentication failed"));
+ return STATE_LOGOUT;
+ }
}}
-#line 1979 "mn-imap-mailbox.c"
+#line 1857 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
/**
@@ -1986,17 +1864,17 @@ mn_imap_mailbox_session_check_mail (MNClientSessionPrivate * priv)
*
* Return value: the quoted string.
**/
-#line 1280 "mn-imap-mailbox.gob"
+#line 1185 "mn-imap-mailbox.gob"
static char *
mn_imap_mailbox_quote (const char * str)
-#line 1993 "mn-imap-mailbox.c"
+#line 1871 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::quote"
-#line 1280 "mn-imap-mailbox.gob"
+#line 1185 "mn-imap-mailbox.gob"
g_return_val_if_fail (str != NULL, (char * )0);
-#line 1998 "mn-imap-mailbox.c"
+#line 1876 "mn-imap-mailbox.c"
{
-#line 1282 "mn-imap-mailbox.gob"
+#line 1187 "mn-imap-mailbox.gob"
GString *quoted;
int i;
@@ -2011,5 +1889,5 @@ mn_imap_mailbox_quote (const char * str)
return g_string_free(quoted, FALSE);
}}
-#line 2015 "mn-imap-mailbox.c"
+#line 1893 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-imap-mailbox.gob b/src/mn-imap-mailbox.gob
@@ -6,7 +6,7 @@
* - RFC 3501
* - RFC 2177
*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -45,12 +45,10 @@ requires 2.0.10
#include "mn-mailbox-private.h"
#include "mn-authenticated-mailbox-private.h"
#include "mn-util.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
#define HAS_CURRENT_TAG(response, priv) (! strcmp((response)->tag, (priv)->tag))
-#define IS(response, token) (! strcmp((response)->response, (token)))
+#define IS(response, token) (! g_ascii_strcasecmp((response)->response, (token)))
#define IS_OK(response) IS(response, "OK")
#define IS_NO(response) IS(response, "NO")
#define IS_BAD(response) IS(response, "BAD")
@@ -71,11 +69,7 @@ requires 2.0.10
STATE_LOGIN,
STATE_EXAMINE,
STATE_SEARCH,
-#ifdef WITH_MIME
STATE_FETCH,
-#else /* WITH_MIME */
- STATE_STATUS,
-#endif
STATE_IDLE,
STATE_LOGOUT
};
@@ -112,12 +106,8 @@ requires 2.0.10
GSList *fetch_numbers;
char *fetch_set;
-#ifdef WITH_MIME
GSList *received_numbers;
GSList *messages;
-#else /* WITH_MIME */
- gboolean status_received;
-#endif
#ifdef WITH_SSL
gboolean starttls_completed;
@@ -153,7 +143,7 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
MNMailbox *mailbox;
@@ -386,7 +376,7 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
* CAPABILITY command in this case.
*/
return self_handle_capability_code(priv, response) && mn_client_session_sasl_get_ssf(session)
- ? self_session_check_mail(priv)
+ ? STATE_EXAMINE
: STATE_CAPABILITY;
}
else
@@ -454,7 +444,7 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
{
priv->authenticated = TRUE;
return self_handle_capability_code(priv, response)
- ? self_session_check_mail(priv)
+ ? STATE_EXAMINE
: STATE_CAPABILITY;
}
else if (IS_NO(response) || IS_BAD(response))
@@ -535,30 +525,11 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
if (priv->search_received)
{
if (priv->fetch_set)
- {
-#ifdef WITH_MIME
- return STATE_FETCH;
-#else
- GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, TRUE);
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- /*
- * We are here and not in STATE_STATUS because
- * the IDLE capability has already been
- * tested, so proceed.
- */
- return STATE_IDLE;
-#endif /* WITH_MIME */
- }
+ return STATE_FETCH;
else
{
GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, FALSE);
-#ifdef WITH_MIME
mn_mailbox_set_messages(priv->mailbox, NULL);
-#endif
gdk_flush();
GDK_THREADS_LEAVE();
@@ -614,7 +585,6 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
enter_fetch_cb (MNClientSession *session (check null),
MNClientSessionPrivate *priv (check null))
{
-#ifdef WITH_MIME
g_return_val_if_fail(priv->fetch_set != NULL, 0);
g_slist_free(priv->received_numbers);
@@ -624,9 +594,6 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
priv->messages = NULL;
return self_session_write(priv, "FETCH %s BODY[HEADER]", priv->fetch_set);
-#else /* WITH_MIME */
- g_return_val_if_reached(0);
-#endif
}
private int
@@ -634,7 +601,6 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
MNClientSessionResponse *response (check null),
MNClientSessionPrivate *priv (check null))
{
-#ifdef WITH_MIME
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
else if (response->tag)
@@ -651,7 +617,6 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
return mn_client_session_error(session, _("server did not send all the messages we requested"));
GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, priv->messages != NULL);
mn_mailbox_set_messages(priv->mailbox, priv->messages);
gdk_flush();
GDK_THREADS_LEAVE();
@@ -668,8 +633,14 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
}
else if (mn_str_isnumeric(response->response)
&& response->arguments
- && g_str_has_prefix(response->arguments, "FETCH (BODY[HEADER]"))
+ && (mn_ascii_str_case_has_prefix(response->arguments, "FETCH (BODY[HEADER]")
+ || mn_ascii_str_case_has_prefix(response->arguments, "FETCH (BODY[HEADER "))) /* [1] */
{
+ /*
+ * [1] Non-compliant response (see RFC 3501 BNF), sent by Binc
+ * IMAP and maybe others. We are tolerant.
+ */
+
int n = atoi(response->response);
if (g_slist_find(priv->fetch_numbers, GINT_TO_POINTER(n)))
@@ -704,9 +675,6 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
}
return RESULT_DEFAULT_HANDLER;
-#else /* WITH_MIME */
- g_return_val_if_reached(0);
-#endif
}
private int
@@ -781,74 +749,6 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
}
private int
- enter_status_cb (MNClientSession *session (check null),
- MNClientSessionPrivate *priv (check null))
- {
-#ifndef WITH_MIME
- char *quoted_mailbox;
- int result;
-
- quoted_mailbox = self_quote(priv->mailbox->uri->path);
- result = self_session_write(priv, "STATUS %s (UNSEEN)", quoted_mailbox);
- g_free(quoted_mailbox);
-
- return result;
-#else /* ! WITH_MIME */
- g_return_val_if_reached(0);
-#endif
- }
-
- private int
- handle_status_cb (MNClientSession *session (check null),
- MNClientSessionResponse *response (check null),
- MNClientSessionPrivate *priv (check null))
- {
-#ifndef WITH_MIME
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- if (priv->status_received)
- return STATE_LOGOUT;
- else /* compliance error */
- return mn_client_session_error(session, _("server did not send status"));
- }
- else if (IS_NO(response) || IS_BAD(response))
- return RESULT_ERROR_LOGOUT;
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (IS(response, "STATUS"))
- {
- int count;
-
- if (response->arguments && sscanf(response->arguments, "%*s (UNSEEN %i)", &count) == 1)
- {
- priv->status_received = TRUE;
-
- GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, count != 0);
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
-
- return RESULT_DEFAULT_HANDLER;
-#else /* ! WITH_MIME */
- g_return_val_if_reached(0);
-#endif
- }
-
- private int
enter_logout_cb (MNClientSession *session (check null),
MNClientSessionPrivate *priv (check null))
{
@@ -891,11 +791,7 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
{ STATE_LOGIN, self_enter_login_cb, self_handle_login_cb },
{ STATE_EXAMINE, self_enter_examine_cb, self_handle_examine_cb },
{ STATE_SEARCH, self_enter_search_cb, self_handle_search_cb },
-#ifdef WITH_MIME
{ STATE_FETCH, self_enter_fetch_cb, self_handle_fetch_cb },
-#else
- { STATE_STATUS, self_enter_status_cb, self_handle_status_cb },
-#endif
{ STATE_IDLE, self_enter_idle_cb, self_handle_idle_cb },
{ STATE_LOGOUT, self_enter_logout_cb, self_handle_logout_cb },
@@ -903,6 +799,7 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
};
MNClientSessionCallbacks callbacks = {
self_notice_cb,
+ self_warning_cb,
self_response_new_cb,
self_response_free_cb,
self_custom_handler_cb,
@@ -942,10 +839,8 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
g_slist_free(priv.fetch_numbers);
g_free(priv.fetch_set);
-#ifdef WITH_MIME
g_slist_free(priv.received_numbers);
mn_g_object_slist_free(priv.messages);
-#endif
}
while (status && priv.could_idle && ! REMOVED(self));
@@ -971,6 +866,14 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
mn_mailbox_notice(priv->mailbox, "%s", str);
}
+ private void
+ warning_cb (MNClientSession *session (check null),
+ const char *str (check null),
+ MNClientSessionPrivate *priv (check null))
+ {
+ mn_mailbox_warning(priv->mailbox, "%s", str);
+ }
+
private MNClientSessionResponse *
response_new_cb (MNClientSession *session (check null),
const char *input (check null),
@@ -978,47 +881,54 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
{
MNClientSessionResponse *response = NULL;
- if (g_str_has_prefix(input, "+ "))
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->continuation = g_strdup(input + 2);
- }
- else
+ /*
+ * RFC 3501 1.2: "Characters are 7-bit US-ASCII unless otherwise
+ * specified."
+ */
+ if (mn_ascii_validate(input))
{
- char **tokens;
-
- tokens = g_strsplit(input, " ", 3);
- if (tokens[0] && tokens[1])
+ if (g_str_has_prefix(input, "+ "))
{
- if (tokens[2] && tokens[2][0] == '[')
+ response = g_new0(MNClientSessionResponse, 1);
+ response->continuation = g_strdup(input + 2);
+ }
+ else
+ {
+ char **tokens;
+
+ tokens = g_strsplit(input, " ", 3);
+ if (tokens[0] && tokens[1])
{
- char *code_start;
- char *code_end;
-
- code_start = tokens[2] + 1;
- code_end = strchr(code_start, ']');
- if (code_end)
+ if (tokens[2] && tokens[2][0] == '[')
+ {
+ char *code_start;
+ char *code_end;
+
+ code_start = tokens[2] + 1;
+ code_end = strchr(code_start, ']');
+ if (code_end)
+ {
+ response = g_new0(MNClientSessionResponse, 1);
+ response->code = g_strndup(code_start, code_end - code_start);
+ response->arguments = code_end[1] ? g_strdup(code_end + 2) : NULL;
+ }
+ }
+ else
{
response = g_new0(MNClientSessionResponse, 1);
- response->code = g_strndup(code_start, code_end - code_start);
- response->arguments = code_end[1] ? g_strdup(code_end + 2) : NULL;
+ response->arguments = g_strdup(tokens[2]);
+ }
+
+ if (response)
+ {
+ response->tag = ! strcmp(tokens[0], "*") ? NULL : g_strdup(tokens[0]);
+ response->response = g_strdup(tokens[1]);
}
}
- else
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->arguments = g_strdup(tokens[2]);
- }
-
- if (response)
- {
- response->tag = ! strcmp(tokens[0], "*") ? NULL : g_strdup(tokens[0]);
- response->response = g_strdup(tokens[1]);
- }
+ g_strfreev(tokens);
}
- g_strfreev(tokens);
}
-
+
return response;
}
@@ -1125,12 +1035,12 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
{
if (response->code)
{
- if (! strcmp(response->code, "CAPABILITY"))
+ if (! g_ascii_strcasecmp(response->code, "CAPABILITY"))
{
self_session_parse_capabilities(priv, NULL);
return TRUE;
}
- else if (g_str_has_prefix(response->code, "CAPABILITY "))
+ else if (mn_ascii_str_case_has_prefix(response->code, "CAPABILITY "))
{
self_session_parse_capabilities(priv, response->code + 11);
return TRUE;
@@ -1173,7 +1083,7 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
g_return_val_if_fail(priv->capabilities != NULL, FALSE);
for (i = 0; priv->capabilities[i]; i++)
- if (! strcmp(priv->capabilities[i], capability))
+ if (! g_ascii_strcasecmp(priv->capabilities[i], capability))
return TRUE;
return FALSE;
@@ -1183,7 +1093,7 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
session_after_capability (MNClientSessionPrivate *priv (check null))
{
if (priv->authenticated)
- return self_session_check_mail(priv);
+ return STATE_EXAMINE;
else
{
#ifdef WITH_SSL
@@ -1214,7 +1124,8 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
#ifdef WITH_SASL
return STATE_AUTHENTICATE;
#else
- return mn_client_session_error(priv->session, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
+ mn_client_session_error(priv->session, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
+ return STATE_LOGOUT;
#endif /* WITH_SASL */
}
else
@@ -1222,7 +1133,10 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
if (! strcmp(priv->mailbox->uri->authmech, "+LOGIN"))
return STATE_LOGIN;
else
- return mn_client_session_error(priv->session, _("unknown authentication mechanism \"%s\""), priv->mailbox->uri->authmech);
+ {
+ mn_client_session_error(priv->session, _("unknown authentication mechanism \"%s\""), priv->mailbox->uri->authmech);
+ return STATE_LOGOUT;
+ }
}
}
else
@@ -1248,25 +1162,16 @@ class MN:IMAP:Mailbox from MN:Authenticated:Mailbox
}
}
- if (! priv->mailbox->uri->password)
+ if (! priv->mailbox->uri->password && priv->authenticated_mailbox->prompted)
{
mn_authenticated_mailbox_authentication_failed(priv->authenticated_mailbox);
return self_session_authenticate(priv);
}
else
- return mn_client_session_error(priv->session, _("authentication failed"));
- }
-
- private int
- session_check_mail (MNClientSessionPrivate *priv (check null))
- {
-#ifdef WITH_MIME
- return STATE_EXAMINE;
-#else
- return self_session_has_capability(priv, "IDLE") && ! mn_uri_has_query(priv->mailbox->uri, "noidle")
- ? STATE_EXAMINE
- : STATE_STATUS;
-#endif /* WITH_MIME */
+ {
+ mn_client_session_error(priv->session, _("authentication failed"));
+ return STATE_LOGOUT;
+ }
}
/**
diff --git a/src/mn-mail-icon.c b/src/mn-mail-icon.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -47,7 +47,7 @@ typedef MNMailIconClass SelfClass;
/* here are local prototypes */
static void mn_mail_icon_activate (MNMailIcon * self) G_GNUC_UNUSED;
-static void mn_mail_icon_activate_summary (MNMailIcon * self) G_GNUC_UNUSED;
+static void mn_mail_icon_activate_main_window (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_mail_reader (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_update (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_properties (MNMailIcon * self) G_GNUC_UNUSED;
@@ -60,6 +60,7 @@ static gboolean mn_mail_icon_show_help_h (GtkWidget * widget, GtkWidgetHelpType
static gboolean mn_mail_icon_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data) G_GNUC_UNUSED;
static gboolean mn_mail_icon_button_release_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data) G_GNUC_UNUSED;
static gboolean mn_mail_icon_popup_menu_h (GtkWidget * widget, gpointer user_data) G_GNUC_UNUSED;
+static void mn_mail_icon_popup_menu_position_cb (GtkMenu * menu, int * x, int * y, gboolean * push_in, gpointer user_data) G_GNUC_UNUSED;
/*
* Signal connection wrapper macro shortcuts
@@ -67,9 +68,9 @@ static gboolean mn_mail_icon_popup_menu_h (GtkWidget * widget, gpointer user_dat
#define self_connect__activate(object,func,data) mn_mail_icon_connect__activate((object),(func),(data))
#define self_connect_after__activate(object,func,data) mn_mail_icon_connect_after__activate((object),(func),(data))
#define self_connect_data__activate(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_summary(object,func,data) mn_mail_icon_connect__activate_summary((object),(func),(data))
-#define self_connect_after__activate_summary(object,func,data) mn_mail_icon_connect_after__activate_summary((object),(func),(data))
-#define self_connect_data__activate_summary(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_summary((object),(func),(data),(destroy_data),(flags))
+#define self_connect__activate_main_window(object,func,data) mn_mail_icon_connect__activate_main_window((object),(func),(data))
+#define self_connect_after__activate_main_window(object,func,data) mn_mail_icon_connect_after__activate_main_window((object),(func),(data))
+#define self_connect_data__activate_main_window(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_main_window((object),(func),(data),(destroy_data),(flags))
#define self_connect__activate_mail_reader(object,func,data) mn_mail_icon_connect__activate_mail_reader((object),(func),(data))
#define self_connect_after__activate_mail_reader(object,func,data) mn_mail_icon_connect_after__activate_mail_reader((object),(func),(data))
#define self_connect_data__activate_mail_reader(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_mail_reader((object),(func),(data),(destroy_data),(flags))
@@ -91,7 +92,7 @@ static gboolean mn_mail_icon_popup_menu_h (GtkWidget * widget, gpointer user_dat
enum {
ACTIVATE_SIGNAL,
- ACTIVATE_SUMMARY_SIGNAL,
+ ACTIVATE_MAIN_WINDOW_SIGNAL,
ACTIVATE_MAIL_READER_SIGNAL,
ACTIVATE_UPDATE_SIGNAL,
ACTIVATE_PROPERTIES_SIGNAL,
@@ -108,7 +109,7 @@ static EggTrayIconClass *parent_class = NULL;
/* Short form macros */
#define self_activate mn_mail_icon_activate
-#define self_activate_summary mn_mail_icon_activate_summary
+#define self_activate_main_window mn_mail_icon_activate_main_window
#define self_activate_mail_reader mn_mail_icon_activate_mail_reader
#define self_activate_update mn_mail_icon_activate_update
#define self_activate_properties mn_mail_icon_activate_properties
@@ -119,6 +120,7 @@ static EggTrayIconClass *parent_class = NULL;
#define self_button_press_event_h mn_mail_icon_button_press_event_h
#define self_button_release_event_h mn_mail_icon_button_release_event_h
#define self_popup_menu_h mn_mail_icon_popup_menu_h
+#define self_popup_menu_position_cb mn_mail_icon_popup_menu_position_cb
#define self_set_tip_widget mn_mail_icon_set_tip_widget
#define self_new mn_mail_icon_new
GType
@@ -173,7 +175,7 @@ ___dispose (GObject *obj_self)
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
#line 41 "mn-mail-icon.gob"
if(self->_priv->tooltips) { g_object_unref ((gpointer) self->_priv->tooltips); self->_priv->tooltips = NULL; }
-#line 177 "mn-mail-icon.c"
+#line 179 "mn-mail-icon.c"
}
#undef __GOB_FUNCTION__
@@ -188,14 +190,14 @@ ___finalize(GObject *obj_self)
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
#line 45 "mn-mail-icon.gob"
if(self->_priv->menu) { gtk_widget_destroy ((gpointer) self->_priv->menu); self->_priv->menu = NULL; }
-#line 192 "mn-mail-icon.c"
+#line 194 "mn-mail-icon.c"
}
#undef __GOB_FUNCTION__
#line 66 "mn-mail-icon.gob"
static void
mn_mail_icon_class_init (MNMailIconClass * class G_GNUC_UNUSED)
-#line 199 "mn-mail-icon.c"
+#line 201 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -212,11 +214,11 @@ mn_mail_icon_class_init (MNMailIconClass * class G_GNUC_UNUSED)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- object_signals[ACTIVATE_SUMMARY_SIGNAL] =
- g_signal_new ("activate_summary",
+ object_signals[ACTIVATE_MAIN_WINDOW_SIGNAL] =
+ g_signal_new ("activate_main_window",
G_TYPE_FROM_CLASS (g_object_class),
(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_summary),
+ G_STRUCT_OFFSET (MNMailIconClass, activate_main_window),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
@@ -270,7 +272,7 @@ mn_mail_icon_class_init (MNMailIconClass * class G_GNUC_UNUSED)
G_TYPE_NONE, 0);
class->activate = NULL;
- class->activate_summary = NULL;
+ class->activate_main_window = NULL;
class->activate_mail_reader = NULL;
class->activate_update = NULL;
class->activate_properties = NULL;
@@ -294,39 +296,39 @@ mn_mail_icon_class_init (MNMailIconClass * class G_GNUC_UNUSED)
gtk_binding_entry_add_signal(binding_set, GDK_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
gtk_binding_entry_add_signal(binding_set, GDK_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
-#line 298 "mn-mail-icon.c"
+#line 300 "mn-mail-icon.c"
}
}
#undef __GOB_FUNCTION__
#line 81 "mn-mail-icon.gob"
static void
mn_mail_icon_init (MNMailIcon * self G_GNUC_UNUSED)
-#line 305 "mn-mail-icon.c"
+#line 307 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,TYPE_SELF,MNMailIconPrivate);
#line 41 "mn-mail-icon.gob"
self->_priv->tooltips = mn_tooltips_new();
-#line 311 "mn-mail-icon.c"
+#line 313 "mn-mail-icon.c"
#line 43 "mn-mail-icon.gob"
self->image = mn_blinking_image_new_from_stock(MN_STOCK_MAIL, GTK_ICON_SIZE_LARGE_TOOLBAR);
-#line 314 "mn-mail-icon.c"
+#line 316 "mn-mail-icon.c"
#line 45 "mn-mail-icon.gob"
self->_priv->menu = gtk_menu_new();
-#line 317 "mn-mail-icon.c"
+#line 319 "mn-mail-icon.c"
{
#line 82 "mn-mail-icon.gob"
GtkMenuShell *shell;
- GtkWidget *summary_item;
+ GtkWidget *main_window_item;
GtkWidget *properties_item;
GtkWidget *help_item;
GtkWidget *about_item;
GtkWidget *remove_item;
shell = GTK_MENU_SHELL(selfp->menu);
- summary_item = mn_menu_shell_append(shell, MN_STOCK_MAIL_SUMMARY, NULL);
- self->mail_reader_item = mn_menu_shell_append(shell, GTK_STOCK_EXECUTE, _("_Launch Mail Reader"));
+ main_window_item = mn_menu_shell_append(shell, MN_STOCK_MAIN_WINDOW, _("Main _Window"));
+ self->mail_reader_item = mn_menu_shell_append(shell, MN_STOCK_MAIL_READER, _("_Mail Reader"));
self->update_item = mn_menu_shell_append(shell, GTK_STOCK_REFRESH, _("_Update"));
mn_menu_shell_append(shell, NULL, NULL);
properties_item = mn_menu_shell_append(shell, GTK_STOCK_PROPERTIES, NULL);
@@ -335,7 +337,7 @@ mn_mail_icon_init (MNMailIcon * self G_GNUC_UNUSED)
mn_menu_shell_append(shell, NULL, NULL);
remove_item = mn_menu_shell_append(shell, GTK_STOCK_REMOVE, _("R_emove From Notification Area"));
- g_signal_connect_swapped(summary_item, "activate", G_CALLBACK(self_activate_summary), self);
+ g_signal_connect_swapped(main_window_item, "activate", G_CALLBACK(self_activate_main_window), self);
g_signal_connect_swapped(self->mail_reader_item, "activate", G_CALLBACK(self_activate_mail_reader), self);
g_signal_connect_swapped(self->update_item, "activate", G_CALLBACK(self_activate_update), self);
g_signal_connect_swapped(properties_item, "activate", G_CALLBACK(self_activate_properties), self);
@@ -345,6 +347,7 @@ mn_mail_icon_init (MNMailIcon * self G_GNUC_UNUSED)
selfp->event_box = gtk_event_box_new();
GTK_WIDGET_SET_FLAGS(selfp->event_box, GTK_CAN_FOCUS);
+ gtk_event_box_set_visible_window(GTK_EVENT_BOX(selfp->event_box), FALSE);
mn_setup_dnd(selfp->event_box);
gtk_container_add(GTK_CONTAINER(selfp->event_box), self->image);
@@ -360,7 +363,7 @@ mn_mail_icon_init (MNMailIcon * self G_GNUC_UNUSED)
gtk_widget_show(self->image);
gtk_widget_show(selfp->event_box);
-#line 364 "mn-mail-icon.c"
+#line 367 "mn-mail-icon.c"
}
}
#undef __GOB_FUNCTION__
@@ -368,7 +371,7 @@ mn_mail_icon_init (MNMailIcon * self G_GNUC_UNUSED)
#line 49 "mn-mail-icon.gob"
static void
mn_mail_icon_activate (MNMailIcon * self)
-#line 372 "mn-mail-icon.c"
+#line 375 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -380,7 +383,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 49 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 384 "mn-mail-icon.c"
+#line 387 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -396,8 +399,8 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 51 "mn-mail-icon.gob"
static void
-mn_mail_icon_activate_summary (MNMailIcon * self)
-#line 401 "mn-mail-icon.c"
+mn_mail_icon_activate_main_window (MNMailIcon * self)
+#line 404 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -409,14 +412,14 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 51 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 413 "mn-mail-icon.c"
+#line 416 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
g_value_set_instance (&___param_values[0], (gpointer) self);
g_signal_emitv (___param_values,
- object_signals[ACTIVATE_SUMMARY_SIGNAL],
+ object_signals[ACTIVATE_MAIN_WINDOW_SIGNAL],
0 /* detail */,
&___return_val);
@@ -426,7 +429,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 53 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_mail_reader (MNMailIcon * self)
-#line 430 "mn-mail-icon.c"
+#line 433 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -438,7 +441,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 53 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 442 "mn-mail-icon.c"
+#line 445 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -455,7 +458,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 55 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_update (MNMailIcon * self)
-#line 459 "mn-mail-icon.c"
+#line 462 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -467,7 +470,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 55 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 471 "mn-mail-icon.c"
+#line 474 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -484,7 +487,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 57 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_properties (MNMailIcon * self)
-#line 488 "mn-mail-icon.c"
+#line 491 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -496,7 +499,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 57 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 500 "mn-mail-icon.c"
+#line 503 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -513,7 +516,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 59 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_help (MNMailIcon * self)
-#line 517 "mn-mail-icon.c"
+#line 520 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -525,7 +528,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 59 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 529 "mn-mail-icon.c"
+#line 532 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -542,7 +545,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 61 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_about (MNMailIcon * self)
-#line 546 "mn-mail-icon.c"
+#line 549 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -554,7 +557,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 61 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 558 "mn-mail-icon.c"
+#line 561 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -571,7 +574,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 63 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_remove (MNMailIcon * self)
-#line 575 "mn-mail-icon.c"
+#line 578 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -583,7 +586,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 63 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 587 "mn-mail-icon.c"
+#line 590 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -599,19 +602,19 @@ memset (&___param_values, 0, sizeof (___param_values));
-#line 127 "mn-mail-icon.gob"
+#line 128 "mn-mail-icon.gob"
static gboolean
mn_mail_icon_show_help_h (GtkWidget * widget, GtkWidgetHelpType help_type, gpointer user_data)
-#line 606 "mn-mail-icon.c"
+#line 609 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::show_help_h"
-#line 127 "mn-mail-icon.gob"
+#line 128 "mn-mail-icon.gob"
g_return_val_if_fail (widget != NULL, (gboolean )0);
-#line 127 "mn-mail-icon.gob"
+#line 128 "mn-mail-icon.gob"
g_return_val_if_fail (GTK_IS_WIDGET (widget), (gboolean )0);
-#line 613 "mn-mail-icon.c"
+#line 616 "mn-mail-icon.c"
{
-#line 131 "mn-mail-icon.gob"
+#line 132 "mn-mail-icon.gob"
if (help_type == GTK_WIDGET_HELP_TOOLTIP)
{
@@ -621,26 +624,26 @@ mn_mail_icon_show_help_h (GtkWidget * widget, GtkWidgetHelpType help_type, gpoin
else
return FALSE;
}}
-#line 625 "mn-mail-icon.c"
+#line 628 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 141 "mn-mail-icon.gob"
+#line 142 "mn-mail-icon.gob"
static gboolean
mn_mail_icon_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-#line 631 "mn-mail-icon.c"
+#line 634 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::button_press_event_h"
-#line 141 "mn-mail-icon.gob"
+#line 142 "mn-mail-icon.gob"
g_return_val_if_fail (widget != NULL, (gboolean )0);
-#line 141 "mn-mail-icon.gob"
+#line 142 "mn-mail-icon.gob"
g_return_val_if_fail (GTK_IS_WIDGET (widget), (gboolean )0);
-#line 141 "mn-mail-icon.gob"
+#line 142 "mn-mail-icon.gob"
g_return_val_if_fail (event != NULL, (gboolean )0);
-#line 141 "mn-mail-icon.gob"
+#line 142 "mn-mail-icon.gob"
g_return_val_if_fail (user_data != NULL, (gboolean )0);
-#line 642 "mn-mail-icon.c"
+#line 645 "mn-mail-icon.c"
{
-#line 145 "mn-mail-icon.gob"
+#line 146 "mn-mail-icon.gob"
Self *self = user_data;
@@ -648,32 +651,32 @@ mn_mail_icon_button_press_event_h (GtkWidget * widget, GdkEventButton * event, g
self_activate(self);
else if (event->button == 3)
{
- gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, NULL, NULL, event->button, event->time);
+ gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, self_popup_menu_position_cb, self, event->button, event->time);
return TRUE; /* do not propagate event */
}
return FALSE; /* propagate event */
}}
-#line 658 "mn-mail-icon.c"
+#line 661 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 159 "mn-mail-icon.gob"
+#line 160 "mn-mail-icon.gob"
static gboolean
mn_mail_icon_button_release_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-#line 664 "mn-mail-icon.c"
+#line 667 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::button_release_event_h"
-#line 159 "mn-mail-icon.gob"
+#line 160 "mn-mail-icon.gob"
g_return_val_if_fail (widget != NULL, (gboolean )0);
-#line 159 "mn-mail-icon.gob"
+#line 160 "mn-mail-icon.gob"
g_return_val_if_fail (GTK_IS_WIDGET (widget), (gboolean )0);
-#line 159 "mn-mail-icon.gob"
+#line 160 "mn-mail-icon.gob"
g_return_val_if_fail (event != NULL, (gboolean )0);
-#line 159 "mn-mail-icon.gob"
+#line 160 "mn-mail-icon.gob"
g_return_val_if_fail (user_data != NULL, (gboolean )0);
-#line 675 "mn-mail-icon.c"
+#line 678 "mn-mail-icon.c"
{
-#line 163 "mn-mail-icon.gob"
+#line 164 "mn-mail-icon.gob"
Self *self = user_data;
@@ -685,62 +688,108 @@ mn_mail_icon_button_release_event_h (GtkWidget * widget, GdkEventButton * event,
return FALSE; /* propagate event */
}}
-#line 689 "mn-mail-icon.c"
+#line 692 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 175 "mn-mail-icon.gob"
+#line 176 "mn-mail-icon.gob"
static gboolean
mn_mail_icon_popup_menu_h (GtkWidget * widget, gpointer user_data)
-#line 695 "mn-mail-icon.c"
+#line 698 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::popup_menu_h"
-#line 175 "mn-mail-icon.gob"
+#line 176 "mn-mail-icon.gob"
g_return_val_if_fail (widget != NULL, (gboolean )0);
-#line 175 "mn-mail-icon.gob"
+#line 176 "mn-mail-icon.gob"
g_return_val_if_fail (GTK_IS_WIDGET (widget), (gboolean )0);
-#line 175 "mn-mail-icon.gob"
+#line 176 "mn-mail-icon.gob"
g_return_val_if_fail (user_data != NULL, (gboolean )0);
-#line 704 "mn-mail-icon.c"
+#line 707 "mn-mail-icon.c"
{
-#line 178 "mn-mail-icon.gob"
+#line 179 "mn-mail-icon.gob"
Self *self = user_data;
- gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time());
+ gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, self_popup_menu_position_cb, self, 0, gtk_get_current_event_time());
+ gtk_menu_shell_select_first(GTK_MENU_SHELL(selfp->menu), FALSE);
+
return TRUE; /* a menu was activated */
}}
-#line 713 "mn-mail-icon.c"
+#line 718 "mn-mail-icon.c"
+#undef __GOB_FUNCTION__
+
+#line 188 "mn-mail-icon.gob"
+static void
+mn_mail_icon_popup_menu_position_cb (GtkMenu * menu, int * x, int * y, gboolean * push_in, gpointer user_data)
+#line 724 "mn-mail-icon.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon::popup_menu_position_cb"
+#line 188 "mn-mail-icon.gob"
+ g_return_if_fail (menu != NULL);
+#line 188 "mn-mail-icon.gob"
+ g_return_if_fail (GTK_IS_MENU (menu));
+#line 188 "mn-mail-icon.gob"
+ g_return_if_fail (x != NULL);
+#line 188 "mn-mail-icon.gob"
+ g_return_if_fail (y != NULL);
+#line 188 "mn-mail-icon.gob"
+ g_return_if_fail (push_in != NULL);
+#line 188 "mn-mail-icon.gob"
+ g_return_if_fail (user_data != NULL);
+#line 739 "mn-mail-icon.c"
+{
+#line 194 "mn-mail-icon.gob"
+
+ GtkWidget *widget = user_data;
+
+ gdk_window_get_origin(widget->window, x, y);
+
+ *x += widget->allocation.x;
+ *y += widget->allocation.y;
+
+ if (*y > gdk_screen_get_height(gtk_widget_get_screen(widget)) / 2)
+ {
+ GtkRequisition req;
+
+ gtk_widget_size_request(GTK_WIDGET(menu), &req);
+ *y -= req.height;
+ }
+ else
+ *y += widget->allocation.height;
+
+ *push_in = TRUE;
+ }}
+#line 762 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 185 "mn-mail-icon.gob"
+#line 215 "mn-mail-icon.gob"
void
mn_mail_icon_set_tip_widget (MNMailIcon * self, GtkWidget * tip_widget)
-#line 719 "mn-mail-icon.c"
+#line 768 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::set_tip_widget"
-#line 185 "mn-mail-icon.gob"
+#line 215 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 185 "mn-mail-icon.gob"
+#line 215 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 726 "mn-mail-icon.c"
+#line 775 "mn-mail-icon.c"
{
-#line 187 "mn-mail-icon.gob"
+#line 217 "mn-mail-icon.gob"
mn_tooltips_set_tip_widget(selfp->tooltips, selfp->event_box, tip_widget);
}}
-#line 732 "mn-mail-icon.c"
+#line 781 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 191 "mn-mail-icon.gob"
+#line 221 "mn-mail-icon.gob"
GtkWidget *
mn_mail_icon_new (void)
-#line 738 "mn-mail-icon.c"
+#line 787 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::new"
{
-#line 193 "mn-mail-icon.gob"
+#line 223 "mn-mail-icon.gob"
return GTK_WIDGET(GET_NEW_VARG("title", _("Mail Notification"), NULL));
}}
-#line 746 "mn-mail-icon.c"
+#line 795 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mail-icon.gob b/src/mn-mail-icon.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -49,7 +49,7 @@ class MN:Mail:Icon from Egg:Tray:Icon
signal (ACTION) private NONE (NONE)
void activate (self);
signal (ACTION) private NONE (NONE)
- void activate_summary (self);
+ void activate_main_window (self);
signal (ACTION) private NONE (NONE)
void activate_mail_reader (self);
signal (ACTION) private NONE (NONE)
@@ -81,15 +81,15 @@ class MN:Mail:Icon from Egg:Tray:Icon
init (self)
{
GtkMenuShell *shell;
- GtkWidget *summary_item;
+ GtkWidget *main_window_item;
GtkWidget *properties_item;
GtkWidget *help_item;
GtkWidget *about_item;
GtkWidget *remove_item;
shell = GTK_MENU_SHELL(selfp->menu);
- summary_item = mn_menu_shell_append(shell, MN_STOCK_MAIL_SUMMARY, NULL);
- self->mail_reader_item = mn_menu_shell_append(shell, GTK_STOCK_EXECUTE, _("_Launch Mail Reader"));
+ main_window_item = mn_menu_shell_append(shell, MN_STOCK_MAIN_WINDOW, _("Main _Window"));
+ self->mail_reader_item = mn_menu_shell_append(shell, MN_STOCK_MAIL_READER, _("_Mail Reader"));
self->update_item = mn_menu_shell_append(shell, GTK_STOCK_REFRESH, _("_Update"));
mn_menu_shell_append(shell, NULL, NULL);
properties_item = mn_menu_shell_append(shell, GTK_STOCK_PROPERTIES, NULL);
@@ -98,7 +98,7 @@ class MN:Mail:Icon from Egg:Tray:Icon
mn_menu_shell_append(shell, NULL, NULL);
remove_item = mn_menu_shell_append(shell, GTK_STOCK_REMOVE, _("R_emove From Notification Area"));
- g_signal_connect_swapped(summary_item, "activate", G_CALLBACK(self_activate_summary), self);
+ g_signal_connect_swapped(main_window_item, "activate", G_CALLBACK(self_activate_main_window), self);
g_signal_connect_swapped(self->mail_reader_item, "activate", G_CALLBACK(self_activate_mail_reader), self);
g_signal_connect_swapped(self->update_item, "activate", G_CALLBACK(self_activate_update), self);
g_signal_connect_swapped(properties_item, "activate", G_CALLBACK(self_activate_properties), self);
@@ -108,6 +108,7 @@ class MN:Mail:Icon from Egg:Tray:Icon
selfp->event_box = gtk_event_box_new();
GTK_WIDGET_SET_FLAGS(selfp->event_box, GTK_CAN_FOCUS);
+ gtk_event_box_set_visible_window(GTK_EVENT_BOX(selfp->event_box), FALSE);
mn_setup_dnd(selfp->event_box);
gtk_container_add(GTK_CONTAINER(selfp->event_box), self->image);
@@ -149,7 +150,7 @@ class MN:Mail:Icon from Egg:Tray:Icon
self_activate(self);
else if (event->button == 3)
{
- gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, NULL, NULL, event->button, event->time);
+ gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, self_popup_menu_position_cb, self, event->button, event->time);
return TRUE; /* do not propagate event */
}
@@ -178,10 +179,39 @@ class MN:Mail:Icon from Egg:Tray:Icon
{
Self *self = user_data;
- gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time());
+ gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, self_popup_menu_position_cb, self, 0, gtk_get_current_event_time());
+ gtk_menu_shell_select_first(GTK_MENU_SHELL(selfp->menu), FALSE);
+
return TRUE; /* a menu was activated */
}
+ private void
+ popup_menu_position_cb (Gtk:Menu *menu (check null type),
+ int *x (check null),
+ int *y (check null),
+ gboolean *push_in (check null),
+ gpointer user_data (check null))
+ {
+ GtkWidget *widget = user_data;
+
+ gdk_window_get_origin(widget->window, x, y);
+
+ *x += widget->allocation.x;
+ *y += widget->allocation.y;
+
+ if (*y > gdk_screen_get_height(gtk_widget_get_screen(widget)) / 2)
+ {
+ GtkRequisition req;
+
+ gtk_widget_size_request(GTK_WIDGET(menu), &req);
+ *y -= req.height;
+ }
+ else
+ *y += widget->allocation.height;
+
+ *push_in = TRUE;
+ }
+
public void
set_tip_widget (self, Gtk:Widget *tip_widget)
{
diff --git a/src/mn-mail-icon.h b/src/mn-mail-icon.h
@@ -54,7 +54,7 @@ typedef struct _MNMailIconClass MNMailIconClass;
struct _MNMailIconClass {
EggTrayIconClass __parent__;
/*signal*/void (* activate) (MNMailIcon * self);
- /*signal*/void (* activate_summary) (MNMailIcon * self);
+ /*signal*/void (* activate_main_window) (MNMailIcon * self);
/*signal*/void (* activate_mail_reader) (MNMailIcon * self);
/*signal*/void (* activate_update) (MNMailIcon * self);
/*signal*/void (* activate_properties) (MNMailIcon * self);
@@ -79,9 +79,9 @@ GtkWidget * mn_mail_icon_new (void);
#define mn_mail_icon_connect__activate(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate",(GCallback) __extension__ ({void (* ___activate) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate; }), (data))
#define mn_mail_icon_connect_after__activate(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate",(GCallback) __extension__ ({void (* ___activate) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate; }), (data))
#define mn_mail_icon_connect_data__activate(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate",(GCallback) __extension__ ({void (* ___activate) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_summary(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_summary",(GCallback) __extension__ ({void (* ___activate_summary) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_summary; }), (data))
-#define mn_mail_icon_connect_after__activate_summary(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_summary",(GCallback) __extension__ ({void (* ___activate_summary) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_summary; }), (data))
-#define mn_mail_icon_connect_data__activate_summary(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_summary",(GCallback) __extension__ ({void (* ___activate_summary) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_summary; }), (data), (destroy_data), (GConnectFlags)(flags))
+#define mn_mail_icon_connect__activate_main_window(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_main_window",(GCallback) __extension__ ({void (* ___activate_main_window) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_main_window; }), (data))
+#define mn_mail_icon_connect_after__activate_main_window(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_main_window",(GCallback) __extension__ ({void (* ___activate_main_window) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_main_window; }), (data))
+#define mn_mail_icon_connect_data__activate_main_window(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_main_window",(GCallback) __extension__ ({void (* ___activate_main_window) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_main_window; }), (data), (destroy_data), (GConnectFlags)(flags))
#define mn_mail_icon_connect__activate_mail_reader(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_mail_reader",(GCallback) __extension__ ({void (* ___activate_mail_reader) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_mail_reader; }), (data))
#define mn_mail_icon_connect_after__activate_mail_reader(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_mail_reader",(GCallback) __extension__ ({void (* ___activate_mail_reader) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_mail_reader; }), (data))
#define mn_mail_icon_connect_data__activate_mail_reader(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_mail_reader",(GCallback) __extension__ ({void (* ___activate_mail_reader) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_mail_reader; }), (data), (destroy_data), (GConnectFlags)(flags))
@@ -104,9 +104,9 @@ GtkWidget * mn_mail_icon_new (void);
#define mn_mail_icon_connect__activate(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate",(GCallback)(func),(data))
#define mn_mail_icon_connect_after__activate(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate",(GCallback)(func),(data))
#define mn_mail_icon_connect_data__activate(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_summary(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_summary",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_summary(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_summary",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_summary(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_summary",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
+#define mn_mail_icon_connect__activate_main_window(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_main_window",(GCallback)(func),(data))
+#define mn_mail_icon_connect_after__activate_main_window(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_main_window",(GCallback)(func),(data))
+#define mn_mail_icon_connect_data__activate_main_window(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_main_window",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
#define mn_mail_icon_connect__activate_mail_reader(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_mail_reader",(GCallback)(func),(data))
#define mn_mail_icon_connect_after__activate_mail_reader(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_mail_reader",(GCallback)(func),(data))
#define mn_mail_icon_connect_data__activate_mail_reader(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_mail_reader",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
diff --git a/src/mn-mailbox-private.h b/src/mn-mailbox-private.h
@@ -26,33 +26,32 @@ extern "C" {
#line 28 "mn-mailbox-private.h"
struct _MNMailboxPrivate {
-#line 140 "mn-mailbox.gob"
+#line 141 "mn-mailbox.gob"
char * name;
-#line 144 "mn-mailbox.gob"
+#line 145 "mn-mailbox.gob"
gboolean must_poll;
-#line 150 "mn-mailbox.gob"
- gboolean has_new;
-#line 155 "mn-mailbox.gob"
+#line 151 "mn-mailbox.gob"
GSList * messages;
-#line 209 "mn-mailbox.gob"
+#line 205 "mn-mailbox.gob"
char * error;
-#line 229 "mn-mailbox.gob"
+#line 225 "mn-mailbox.gob"
GnomeVFSMonitorHandle * monitor_handle;
-#line 230 "mn-mailbox.gob"
+#line 226 "mn-mailbox.gob"
char * monitor_uri;
-#line 231 "mn-mailbox.gob"
+#line 227 "mn-mailbox.gob"
MNMailboxMonitorEventType monitor_events;
-#line 233 "mn-mailbox.gob"
+#line 229 "mn-mailbox.gob"
gboolean checking;
-#line 364 "mn-mailbox.gob"
+#line 360 "mn-mailbox.gob"
char * init_error;
-#line 50 "mn-mailbox-private.h"
+#line 48 "mn-mailbox-private.h"
};
void mn_mailbox_set_error (MNMailbox * self, const char * format, ...);
void mn_mailbox_set_init_error (MNMailbox * self, const char * format, ...);
void mn_mailbox_monitor (MNMailbox * self, const char * uri, GnomeVFSMonitorType monitor_type, MNMailboxMonitorEventType events);
void mn_mailbox_end_check (MNMailbox * self);
void mn_mailbox_notice (MNMailbox * self, const char * format, ...);
+void mn_mailbox_warning (MNMailbox * self, const char * format, ...);
#ifdef __cplusplus
}
diff --git a/src/mn-mailbox-properties-dialog.c b/src/mn-mailbox-properties-dialog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -44,7 +44,6 @@ typedef struct
GtkWidget *mailbox_type_combo;
GtkWidget *properties_event_box;
- MNMailboxPropertiesDialogMode mode;
MNURI *uri;
GtkWidget *apply_button;
GtkWidget *accept_button;
@@ -73,27 +72,27 @@ static void mn_mailbox_properties_dialog_set_active_properties (MNMailboxPropert
static MNMailboxProperties *mn_mailbox_properties_dialog_get_active_properties (MNMailboxPropertiesDialog *dialog);
static MNMailboxProperties *mn_mailbox_properties_dialog_get_properties_by_type (MNMailboxPropertiesDialog *dialog, GType type);
-static void mn_mailbox_properties_dialog_set_uri_internal (MNMailboxPropertiesDialog *dialog, MNURI *uri);
+static void mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog, MNURI *uri);
+static void mn_mailbox_properties_dialog_set_contents (MNMailboxPropertiesDialog *dialog);
+
static void mn_mailbox_properties_dialog_update_sensitivity (MNMailboxPropertiesDialog *dialog);
/*** implementation **********************************************************/
GtkWidget *
-mn_mailbox_properties_dialog_new (GtkWindow *parent,
- MNMailboxPropertiesDialogMode mode)
+mn_mailbox_properties_dialog_new (GtkWindow *parent, MNURI *uri)
{
MNMailboxPropertiesDialog *dialog;
Private *private;
GtkCellRenderer *renderer;
private = g_new0(Private, 1);
- mn_create_interface("mailbox-properties",
+ mn_create_interface(MN_INTERFACE_FILE("mailbox-properties.glade"),
"dialog", &dialog,
"mailbox_type_label", &private->mailbox_type_label,
"mailbox_type_combo", &private->mailbox_type_combo,
"properties_event_box", &private->properties_event_box,
NULL);
- private->mode = mode;
g_object_set_data_full(G_OBJECT(dialog),
MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE_KEY,
@@ -103,27 +102,7 @@ mn_mailbox_properties_dialog_new (GtkWindow *parent,
if (parent)
gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
- gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_HELP, GTK_RESPONSE_HELP);
- 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);
-
- /* finish the combo box */
+ /* finish the type combo box */
private->store = gtk_list_store_new(N_COLUMNS,
GTK_TYPE_WIDGET,
@@ -149,16 +128,34 @@ mn_mailbox_properties_dialog_new (GtkWindow *parent,
gtk_combo_box_set_model(GTK_COMBO_BOX(private->mailbox_type_combo), GTK_TREE_MODEL(private->store));
- if (mode == MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD)
+ /* setup the dialog depending on the mode (edit or add) */
+
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_HELP, GTK_RESPONSE_HELP);
+ if (uri)
+ {
+ 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);
+
+ mn_mailbox_properties_dialog_set_uri(dialog, uri);
+ mn_mailbox_properties_dialog_set_contents(dialog);
+ }
+ else
{
MNMailboxProperties *properties;
+ 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);
+
if (! selected_type)
selected_type = MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES;
properties = mn_mailbox_properties_dialog_get_properties_by_type(dialog, selected_type);
mn_mailbox_properties_dialog_set_active_properties(dialog, properties);
+
+ gtk_window_set_title(GTK_WINDOW(dialog), _("Add a Mailbox"));
}
+ gtk_widget_grab_default(private->accept_button);
return GTK_WIDGET(dialog);
}
@@ -191,8 +188,7 @@ mn_mailbox_properties_dialog_add_type (MNMailboxPropertiesDialog *dialog,
properties = g_object_new(properties_type, "size-group", size_group, NULL);
g_object_unref(size_group);
- g_object_ref(properties);
- gtk_object_sink(GTK_OBJECT(properties));
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(properties));
gtk_list_store_append(private->store, &iter);
@@ -311,14 +307,15 @@ mn_mailbox_properties_dialog_get_properties_by_type (MNMailboxPropertiesDialog *
}
static void
-mn_mailbox_properties_dialog_set_uri_internal (MNMailboxPropertiesDialog *dialog,
- MNURI *uri)
+mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog,
+ MNURI *uri)
{
Private *private;
char *title;
g_return_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog));
g_return_if_fail(MN_IS_URI(uri));
+
private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
if (private->uri)
@@ -330,9 +327,8 @@ mn_mailbox_properties_dialog_set_uri_internal (MNMailboxPropertiesDialog *dialog
g_free(title);
}
-void
-mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog,
- MNURI *uri)
+static void
+mn_mailbox_properties_dialog_set_contents (MNMailboxPropertiesDialog *dialog)
{
Private *private;
gboolean valid;
@@ -341,10 +337,9 @@ mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog,
gboolean found = FALSE;
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);
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+ g_return_if_fail(private->uri != NULL);
valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(private->store), &iter);
while (valid)
@@ -353,7 +348,7 @@ mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog,
g_object_unref(properties);
if (! MN_IS_AUTODETECT_MAILBOX_PROPERTIES(properties)
- && mn_mailbox_properties_set_uri(properties, uri))
+ && mn_mailbox_properties_set_uri(properties, private->uri))
{
found = TRUE;
break;
@@ -365,7 +360,7 @@ mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog,
if (! found)
{
properties = mn_mailbox_properties_dialog_get_properties_by_type(dialog, MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES);
- mn_mailbox_properties_set_uri(properties, uri);
+ mn_mailbox_properties_set_uri(properties, private->uri);
}
mn_mailbox_properties_dialog_set_active_properties(dialog, properties);
}
@@ -374,6 +369,17 @@ MNURI *
mn_mailbox_properties_dialog_get_uri (MNMailboxPropertiesDialog *dialog)
{
Private *private;
+
+ g_return_val_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog), NULL);
+ private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
+
+ return private->uri;
+}
+
+MNURI *
+mn_mailbox_properties_dialog_get_current_uri (MNMailboxPropertiesDialog *dialog)
+{
+ Private *private;
MNMailboxProperties *properties;
g_return_val_if_fail(MN_IS_MAILBOX_PROPERTIES_DIALOG(dialog), NULL);
@@ -392,7 +398,7 @@ mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog *dialog)
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);
+ new_uri = mn_mailbox_properties_dialog_get_current_uri(dialog);
g_return_if_fail(MN_IS_URI(new_uri));
if (strcmp(new_uri->text, private->uri->text))
@@ -412,7 +418,7 @@ mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog *dialog)
eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
eel_g_slist_free_deep(gconf_mailboxes);
- mn_mailbox_properties_dialog_set_uri_internal(dialog, new_uri);
+ mn_mailbox_properties_dialog_set_uri(dialog, new_uri);
}
g_object_unref(new_uri);
}
@@ -451,7 +457,7 @@ mn_mailbox_properties_dialog_mailbox_type_changed_h (gpointer user_data,
private = MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE(dialog);
mn_mailbox_properties_dialog_select_properties(dialog);
- if (private->mode == MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD)
+ if (! private->uri) /* mode is add */
{
MNMailboxProperties *properties;
diff --git a/src/mn-mailbox-properties-dialog.h b/src/mn-mailbox-properties-dialog.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -35,18 +35,10 @@
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, MNURI *uri);
-GtkWidget *mn_mailbox_properties_dialog_new (GtkWindow *parent,
- MNMailboxPropertiesDialogMode mode);
-
-void mn_mailbox_properties_dialog_set_uri (MNMailboxPropertiesDialog *dialog,
- MNURI *uri);
MNURI *mn_mailbox_properties_dialog_get_uri (MNMailboxPropertiesDialog *dialog);
+MNURI *mn_mailbox_properties_dialog_get_current_uri (MNMailboxPropertiesDialog *dialog);
void mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog *dialog);
diff --git a/src/mn-mailbox-properties-util.c b/src/mn-mailbox-properties-util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-mailbox-properties-util.h b/src/mn-mailbox-properties-util.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-mailbox-properties.c b/src/mn-mailbox-properties.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-mailbox-properties.h b/src/mn-mailbox-properties.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-mailbox-view.c b/src/mn-mailbox-view.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -220,7 +220,7 @@ ___finalize(GObject *obj_self)
}
#undef __GOB_FUNCTION__
-#line 187 "mn-mailbox-view.gob"
+#line 195 "mn-mailbox-view.gob"
static void
mn_mailbox_view_class_init (MNMailboxViewClass * class G_GNUC_UNUSED)
#line 227 "mn-mailbox-view.c"
@@ -296,7 +296,7 @@ mn_mailbox_view_class_init (MNMailboxViewClass * class G_GNUC_UNUSED)
#line 297 "mn-mailbox-view.c"
g_object_class->finalize = ___finalize;
{
-#line 188 "mn-mailbox-view.gob"
+#line 196 "mn-mailbox-view.gob"
GtkBindingSet *binding_set;
@@ -328,7 +328,7 @@ mn_mailbox_view_class_init (MNMailboxViewClass * class G_GNUC_UNUSED)
}
}
#undef __GOB_FUNCTION__
-#line 216 "mn-mailbox-view.gob"
+#line 224 "mn-mailbox-view.gob"
static void
mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
#line 335 "mn-mailbox-view.c"
@@ -339,7 +339,7 @@ mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
self->_priv->menu = gtk_menu_new();
#line 341 "mn-mailbox-view.c"
{
-#line 217 "mn-mailbox-view.gob"
+#line 225 "mn-mailbox-view.gob"
GtkMenuShell *shell;
GtkWidget *add_item;
@@ -483,7 +483,7 @@ ___real_mn_mailbox_view_activate_add (MNMailboxView * self G_GNUC_UNUSED)
GtkWidget *dialog;
toplevel = gtk_widget_get_toplevel(GTK_WIDGET(self));
- dialog = mn_mailbox_properties_dialog_new((GtkWindow *) toplevel, MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD);
+ dialog = mn_mailbox_properties_dialog_new(GTK_WINDOW(toplevel), NULL);
g_signal_connect(dialog,
"response",
@@ -793,46 +793,54 @@ mn_mailbox_view_activate_properties_cb (GtkTreeModel * model, GtkTreePath * path
#line 166 "mn-mailbox-view.gob"
Self *self = data;
- GtkWidget *toplevel;
- GtkWidget *dialog;
MNURI *uri;
-
- toplevel = gtk_widget_get_toplevel(GTK_WIDGET(self));
- dialog = mn_mailbox_properties_dialog_new((GtkWindow *) toplevel, MN_MAILBOX_PROPERTIES_DIALOG_MODE_EDIT);
+ GtkWidget *dialog;
gtk_tree_model_get(model, iter, COLUMN_URI, &uri, -1);
- mn_mailbox_properties_dialog_set_uri(MN_MAILBOX_PROPERTIES_DIALOG(dialog), uri);
- g_object_unref(uri);
-
- g_signal_connect(dialog,
- "response",
- G_CALLBACK(self_properties_edit_response_h),
- NULL);
- gtk_widget_show(dialog);
+ dialog = (GtkWidget *) mn_shell_get_mailbox_properties_dialog(mn_shell, uri);
+ if (dialog)
+ gtk_window_present(GTK_WINDOW(dialog));
+ else
+ {
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(self));
+ dialog = mn_mailbox_properties_dialog_new(GTK_WINDOW(toplevel), uri);
+
+ g_signal_connect(dialog,
+ "response",
+ G_CALLBACK(self_properties_edit_response_h),
+ NULL);
+
+ mn_shell_add_mailbox_properties_dialog(mn_shell, MN_MAILBOX_PROPERTIES_DIALOG(dialog));
+ gtk_widget_show(dialog);
+ }
+
+ g_object_unref(uri);
}}
-#line 815 "mn-mailbox-view.c"
+#line 823 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 315 "mn-mailbox-view.gob"
+#line 323 "mn-mailbox-view.gob"
static void
mn_mailbox_view_append (MNMailboxView * self, MNMailbox * mailbox)
-#line 823 "mn-mailbox-view.c"
+#line 831 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::append"
-#line 315 "mn-mailbox-view.gob"
+#line 323 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 315 "mn-mailbox-view.gob"
+#line 323 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 315 "mn-mailbox-view.gob"
+#line 323 "mn-mailbox-view.gob"
g_return_if_fail (mailbox != NULL);
-#line 315 "mn-mailbox-view.gob"
+#line 323 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 834 "mn-mailbox-view.c"
+#line 842 "mn-mailbox-view.c"
{
-#line 317 "mn-mailbox-view.gob"
+#line 325 "mn-mailbox-view.gob"
GtkTreeModel *model;
GtkTreeIter iter;
@@ -841,55 +849,55 @@ mn_mailbox_view_append (MNMailboxView * self, MNMailbox * mailbox)
gtk_list_store_append(GTK_LIST_STORE(model), &iter);
self_update_iter(self, &iter, mailbox);
}}
-#line 845 "mn-mailbox-view.c"
+#line 853 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 326 "mn-mailbox-view.gob"
+#line 334 "mn-mailbox-view.gob"
static void
mn_mailbox_view_mailbox_added_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data)
-#line 851 "mn-mailbox-view.c"
+#line 859 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::mailbox_added_h"
-#line 326 "mn-mailbox-view.gob"
+#line 334 "mn-mailbox-view.gob"
g_return_if_fail (mailboxes != NULL);
-#line 326 "mn-mailbox-view.gob"
+#line 334 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOXES (mailboxes));
-#line 326 "mn-mailbox-view.gob"
+#line 334 "mn-mailbox-view.gob"
g_return_if_fail (mailbox != NULL);
-#line 326 "mn-mailbox-view.gob"
+#line 334 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 326 "mn-mailbox-view.gob"
+#line 334 "mn-mailbox-view.gob"
g_return_if_fail (user_data != NULL);
-#line 864 "mn-mailbox-view.c"
+#line 872 "mn-mailbox-view.c"
{
-#line 330 "mn-mailbox-view.gob"
+#line 338 "mn-mailbox-view.gob"
Self *self = user_data;
self_append(self, mailbox);
}}
-#line 872 "mn-mailbox-view.c"
+#line 880 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 336 "mn-mailbox-view.gob"
+#line 344 "mn-mailbox-view.gob"
static void
mn_mailbox_view_mailbox_changed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data)
-#line 878 "mn-mailbox-view.c"
+#line 886 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::mailbox_changed_h"
-#line 336 "mn-mailbox-view.gob"
+#line 344 "mn-mailbox-view.gob"
g_return_if_fail (mailboxes != NULL);
-#line 336 "mn-mailbox-view.gob"
+#line 344 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOXES (mailboxes));
-#line 336 "mn-mailbox-view.gob"
+#line 344 "mn-mailbox-view.gob"
g_return_if_fail (mailbox != NULL);
-#line 336 "mn-mailbox-view.gob"
+#line 344 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 336 "mn-mailbox-view.gob"
+#line 344 "mn-mailbox-view.gob"
g_return_if_fail (user_data != NULL);
-#line 891 "mn-mailbox-view.c"
+#line 899 "mn-mailbox-view.c"
{
-#line 340 "mn-mailbox-view.gob"
+#line 348 "mn-mailbox-view.gob"
Self *self = user_data;
GtkTreeIter iter;
@@ -897,28 +905,28 @@ mn_mailbox_view_mailbox_changed_h (MNMailboxes * mailboxes, MNMailbox * mailbox,
if (self_find_mailbox(self, mailbox, &iter))
self_update_iter(self, &iter, mailbox);
}}
-#line 901 "mn-mailbox-view.c"
+#line 909 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 348 "mn-mailbox-view.gob"
+#line 356 "mn-mailbox-view.gob"
static void
mn_mailbox_view_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data)
-#line 907 "mn-mailbox-view.c"
+#line 915 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::mailbox_removed_h"
-#line 348 "mn-mailbox-view.gob"
+#line 356 "mn-mailbox-view.gob"
g_return_if_fail (mailboxes != NULL);
-#line 348 "mn-mailbox-view.gob"
+#line 356 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOXES (mailboxes));
-#line 348 "mn-mailbox-view.gob"
+#line 356 "mn-mailbox-view.gob"
g_return_if_fail (mailbox != NULL);
-#line 348 "mn-mailbox-view.gob"
+#line 356 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 348 "mn-mailbox-view.gob"
+#line 356 "mn-mailbox-view.gob"
g_return_if_fail (user_data != NULL);
-#line 920 "mn-mailbox-view.c"
+#line 928 "mn-mailbox-view.c"
{
-#line 352 "mn-mailbox-view.gob"
+#line 360 "mn-mailbox-view.gob"
Self *self = user_data;
GtkTreeIter iter;
@@ -931,28 +939,28 @@ mn_mailbox_view_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox,
gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
}
}}
-#line 935 "mn-mailbox-view.c"
+#line 943 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 365 "mn-mailbox-view.gob"
+#line 373 "mn-mailbox-view.gob"
static void
mn_mailbox_view_update_iter (MNMailboxView * self, GtkTreeIter * iter, MNMailbox * mailbox)
-#line 941 "mn-mailbox-view.c"
+#line 949 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::update_iter"
-#line 365 "mn-mailbox-view.gob"
+#line 373 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 365 "mn-mailbox-view.gob"
+#line 373 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 365 "mn-mailbox-view.gob"
+#line 373 "mn-mailbox-view.gob"
g_return_if_fail (iter != NULL);
-#line 365 "mn-mailbox-view.gob"
+#line 373 "mn-mailbox-view.gob"
g_return_if_fail (mailbox != NULL);
-#line 365 "mn-mailbox-view.gob"
+#line 373 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 954 "mn-mailbox-view.c"
+#line 962 "mn-mailbox-view.c"
{
-#line 369 "mn-mailbox-view.gob"
+#line 377 "mn-mailbox-view.gob"
MNMailboxClass *class;
const char *stock_id;
@@ -978,28 +986,28 @@ mn_mailbox_view_update_iter (MNMailboxView * self, GtkTreeIter * iter, MNMailbox
COLUMN_FORMAT, class->format,
-1);
}}
-#line 982 "mn-mailbox-view.c"
+#line 990 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 395 "mn-mailbox-view.gob"
+#line 403 "mn-mailbox-view.gob"
static gboolean
mn_mailbox_view_find_mailbox (MNMailboxView * self, MNMailbox * mailbox, GtkTreeIter * iter)
-#line 988 "mn-mailbox-view.c"
+#line 996 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::find_mailbox"
-#line 395 "mn-mailbox-view.gob"
+#line 403 "mn-mailbox-view.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 395 "mn-mailbox-view.gob"
+#line 403 "mn-mailbox-view.gob"
g_return_val_if_fail (MN_IS_MAILBOX_VIEW (self), (gboolean )0);
-#line 395 "mn-mailbox-view.gob"
+#line 403 "mn-mailbox-view.gob"
g_return_val_if_fail (mailbox != NULL, (gboolean )0);
-#line 395 "mn-mailbox-view.gob"
+#line 403 "mn-mailbox-view.gob"
g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (gboolean )0);
-#line 395 "mn-mailbox-view.gob"
+#line 403 "mn-mailbox-view.gob"
g_return_val_if_fail (iter != NULL, (gboolean )0);
-#line 1001 "mn-mailbox-view.c"
+#line 1009 "mn-mailbox-view.c"
{
-#line 399 "mn-mailbox-view.gob"
+#line 407 "mn-mailbox-view.gob"
GtkTreeModel *model;
GtkTreeIter our_iter;
@@ -1028,22 +1036,22 @@ mn_mailbox_view_find_mailbox (MNMailboxView * self, MNMailbox * mailbox, GtkTree
return FALSE;
}}
-#line 1032 "mn-mailbox-view.c"
+#line 1040 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 428 "mn-mailbox-view.gob"
+#line 436 "mn-mailbox-view.gob"
static void
mn_mailbox_view_update_sensitivity (MNMailboxView * self)
-#line 1038 "mn-mailbox-view.c"
+#line 1046 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::update_sensitivity"
-#line 428 "mn-mailbox-view.gob"
+#line 436 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 428 "mn-mailbox-view.gob"
+#line 436 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1045 "mn-mailbox-view.c"
+#line 1053 "mn-mailbox-view.c"
{
-#line 430 "mn-mailbox-view.gob"
+#line 438 "mn-mailbox-view.gob"
GtkTreeSelection *selection;
gboolean has_selection;
@@ -1056,22 +1064,22 @@ mn_mailbox_view_update_sensitivity (MNMailboxView * self)
gtk_widget_set_sensitive(selfp->copy_item, has_selection);
gtk_widget_set_sensitive(selfp->properties_item, has_selection);
}}
-#line 1060 "mn-mailbox-view.c"
+#line 1068 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 443 "mn-mailbox-view.gob"
+#line 451 "mn-mailbox-view.gob"
static void
mn_mailbox_view_remove_mailbox (MNMailboxView * self)
-#line 1066 "mn-mailbox-view.c"
+#line 1074 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::remove_mailbox"
-#line 443 "mn-mailbox-view.gob"
+#line 451 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 443 "mn-mailbox-view.gob"
+#line 451 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1073 "mn-mailbox-view.c"
+#line 1081 "mn-mailbox-view.c"
{
-#line 445 "mn-mailbox-view.gob"
+#line 453 "mn-mailbox-view.gob"
GtkTreeSelection *selection;
GSList *gconf_mailboxes;
@@ -1083,28 +1091,28 @@ mn_mailbox_view_remove_mailbox (MNMailboxView * self)
eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
eel_g_slist_free_deep(gconf_mailboxes);
}}
-#line 1087 "mn-mailbox-view.c"
+#line 1095 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 457 "mn-mailbox-view.gob"
+#line 465 "mn-mailbox-view.gob"
static void
mn_mailbox_view_remove_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-#line 1093 "mn-mailbox-view.c"
+#line 1101 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::remove_mailbox_cb"
-#line 457 "mn-mailbox-view.gob"
+#line 465 "mn-mailbox-view.gob"
g_return_if_fail (model != NULL);
-#line 457 "mn-mailbox-view.gob"
+#line 465 "mn-mailbox-view.gob"
g_return_if_fail (GTK_IS_TREE_MODEL (model));
-#line 457 "mn-mailbox-view.gob"
+#line 465 "mn-mailbox-view.gob"
g_return_if_fail (path != NULL);
-#line 457 "mn-mailbox-view.gob"
+#line 465 "mn-mailbox-view.gob"
g_return_if_fail (iter != NULL);
-#line 457 "mn-mailbox-view.gob"
+#line 465 "mn-mailbox-view.gob"
g_return_if_fail (data != NULL);
-#line 1106 "mn-mailbox-view.c"
+#line 1114 "mn-mailbox-view.c"
{
-#line 462 "mn-mailbox-view.gob"
+#line 470 "mn-mailbox-view.gob"
GSList **gconf_mailboxes = data;
MNURI *uri;
@@ -1118,22 +1126,22 @@ mn_mailbox_view_remove_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, Gtk
g_object_unref(uri);
}}
-#line 1122 "mn-mailbox-view.c"
+#line 1130 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 476 "mn-mailbox-view.gob"
+#line 484 "mn-mailbox-view.gob"
static void
mn_mailbox_view_copy_mailbox (MNMailboxView * self)
-#line 1128 "mn-mailbox-view.c"
+#line 1136 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::copy_mailbox"
-#line 476 "mn-mailbox-view.gob"
+#line 484 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 476 "mn-mailbox-view.gob"
+#line 484 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1135 "mn-mailbox-view.c"
+#line 1143 "mn-mailbox-view.c"
{
-#line 478 "mn-mailbox-view.gob"
+#line 486 "mn-mailbox-view.gob"
GtkTreeSelection *selection;
GSList *uri_list = NULL;
@@ -1155,28 +1163,28 @@ mn_mailbox_view_copy_mailbox (MNMailboxView * self)
gnome_copied_files);
g_return_if_fail(status == TRUE);
}}
-#line 1159 "mn-mailbox-view.c"
+#line 1167 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 500 "mn-mailbox-view.gob"
+#line 508 "mn-mailbox-view.gob"
static void
mn_mailbox_view_copy_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-#line 1165 "mn-mailbox-view.c"
+#line 1173 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::copy_mailbox_cb"
-#line 500 "mn-mailbox-view.gob"
+#line 508 "mn-mailbox-view.gob"
g_return_if_fail (model != NULL);
-#line 500 "mn-mailbox-view.gob"
+#line 508 "mn-mailbox-view.gob"
g_return_if_fail (GTK_IS_TREE_MODEL (model));
-#line 500 "mn-mailbox-view.gob"
+#line 508 "mn-mailbox-view.gob"
g_return_if_fail (path != NULL);
-#line 500 "mn-mailbox-view.gob"
+#line 508 "mn-mailbox-view.gob"
g_return_if_fail (iter != NULL);
-#line 500 "mn-mailbox-view.gob"
+#line 508 "mn-mailbox-view.gob"
g_return_if_fail (data != NULL);
-#line 1178 "mn-mailbox-view.c"
+#line 1186 "mn-mailbox-view.c"
{
-#line 505 "mn-mailbox-view.gob"
+#line 513 "mn-mailbox-view.gob"
GSList **uri_list = data;
MNURI *uri;
@@ -1185,86 +1193,86 @@ mn_mailbox_view_copy_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTr
*uri_list = g_slist_append(*uri_list, g_strdup(uri->text));
g_object_unref(uri);
}}
-#line 1189 "mn-mailbox-view.c"
+#line 1197 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 514 "mn-mailbox-view.gob"
+#line 522 "mn-mailbox-view.gob"
static void
mn_mailbox_view_get_clipboard_cb (GtkClipboard * clipboard, GtkSelectionData * selection_data, unsigned int info, gpointer user_data_or_owner)
-#line 1195 "mn-mailbox-view.c"
+#line 1203 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::get_clipboard_cb"
-#line 514 "mn-mailbox-view.gob"
+#line 522 "mn-mailbox-view.gob"
g_return_if_fail (clipboard != NULL);
-#line 514 "mn-mailbox-view.gob"
+#line 522 "mn-mailbox-view.gob"
g_return_if_fail (selection_data != NULL);
-#line 514 "mn-mailbox-view.gob"
+#line 522 "mn-mailbox-view.gob"
g_return_if_fail (user_data_or_owner != NULL);
-#line 1204 "mn-mailbox-view.c"
+#line 1212 "mn-mailbox-view.c"
{
-#line 519 "mn-mailbox-view.gob"
+#line 527 "mn-mailbox-view.gob"
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));
}}
-#line 1211 "mn-mailbox-view.c"
+#line 1219 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 524 "mn-mailbox-view.gob"
+#line 532 "mn-mailbox-view.gob"
static void
mn_mailbox_view_clear_clipboard_cb (GtkClipboard * clipboard, gpointer user_data_or_owner)
-#line 1217 "mn-mailbox-view.c"
+#line 1225 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::clear_clipboard_cb"
-#line 524 "mn-mailbox-view.gob"
+#line 532 "mn-mailbox-view.gob"
g_return_if_fail (clipboard != NULL);
-#line 524 "mn-mailbox-view.gob"
+#line 532 "mn-mailbox-view.gob"
g_return_if_fail (user_data_or_owner != NULL);
-#line 1224 "mn-mailbox-view.c"
+#line 1232 "mn-mailbox-view.c"
{
-#line 527 "mn-mailbox-view.gob"
+#line 535 "mn-mailbox-view.gob"
char *gnome_copied_files = user_data_or_owner;
g_free(gnome_copied_files);
}}
-#line 1231 "mn-mailbox-view.c"
+#line 1239 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 532 "mn-mailbox-view.gob"
+#line 540 "mn-mailbox-view.gob"
static void
mn_mailbox_view_select_all (MNMailboxView * self)
-#line 1237 "mn-mailbox-view.c"
+#line 1245 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::select_all"
-#line 532 "mn-mailbox-view.gob"
+#line 540 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 532 "mn-mailbox-view.gob"
+#line 540 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1244 "mn-mailbox-view.c"
+#line 1252 "mn-mailbox-view.c"
{
-#line 534 "mn-mailbox-view.gob"
+#line 542 "mn-mailbox-view.gob"
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
gtk_tree_selection_select_all(selection);
}}
-#line 1253 "mn-mailbox-view.c"
+#line 1261 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 541 "mn-mailbox-view.gob"
+#line 549 "mn-mailbox-view.gob"
static void
mn_mailbox_view_properties_add_response_h (GtkDialog * dialog, int response, gpointer user_data)
-#line 1259 "mn-mailbox-view.c"
+#line 1267 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::properties_add_response_h"
-#line 541 "mn-mailbox-view.gob"
+#line 549 "mn-mailbox-view.gob"
g_return_if_fail (dialog != NULL);
-#line 541 "mn-mailbox-view.gob"
+#line 549 "mn-mailbox-view.gob"
g_return_if_fail (GTK_IS_DIALOG (dialog));
-#line 1266 "mn-mailbox-view.c"
+#line 1274 "mn-mailbox-view.c"
{
-#line 545 "mn-mailbox-view.gob"
+#line 553 "mn-mailbox-view.gob"
if (response == GTK_RESPONSE_HELP)
mn_display_help(GTK_WINDOW(dialog), "mailbox-properties");
@@ -1274,7 +1282,7 @@ mn_mailbox_view_properties_add_response_h (GtkDialog * dialog, int response, gpo
{
MNURI *uri;
- uri = mn_mailbox_properties_dialog_get_uri(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
+ uri = mn_mailbox_properties_dialog_get_current_uri(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
g_return_if_fail(MN_IS_URI(uri));
if (! mn_mailboxes_find_uri(mn_shell->mailboxes, uri))
@@ -1294,22 +1302,22 @@ mn_mailbox_view_properties_add_response_h (GtkDialog * dialog, int response, gpo
g_object_unref(uri);
}
}}
-#line 1298 "mn-mailbox-view.c"
+#line 1306 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 575 "mn-mailbox-view.gob"
+#line 583 "mn-mailbox-view.gob"
static void
mn_mailbox_view_properties_edit_response_h (GtkDialog * dialog, int response, gpointer user_data)
-#line 1304 "mn-mailbox-view.c"
+#line 1312 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::properties_edit_response_h"
-#line 575 "mn-mailbox-view.gob"
+#line 583 "mn-mailbox-view.gob"
g_return_if_fail (dialog != NULL);
-#line 575 "mn-mailbox-view.gob"
+#line 583 "mn-mailbox-view.gob"
g_return_if_fail (GTK_IS_DIALOG (dialog));
-#line 1311 "mn-mailbox-view.c"
+#line 1319 "mn-mailbox-view.c"
{
-#line 579 "mn-mailbox-view.gob"
+#line 587 "mn-mailbox-view.gob"
if (response == GTK_RESPONSE_HELP)
mn_display_help(GTK_WINDOW(dialog), "mailbox-properties");
@@ -1321,22 +1329,22 @@ mn_mailbox_view_properties_edit_response_h (GtkDialog * dialog, int response, gp
gtk_widget_destroy(GTK_WIDGET(dialog));
}
}}
-#line 1325 "mn-mailbox-view.c"
+#line 1333 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 591 "mn-mailbox-view.gob"
+#line 599 "mn-mailbox-view.gob"
static void
mn_mailbox_view_popup_menu (MNMailboxView * self, unsigned int button, guint32 activate_time)
-#line 1331 "mn-mailbox-view.c"
+#line 1339 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu"
-#line 591 "mn-mailbox-view.gob"
+#line 599 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 591 "mn-mailbox-view.gob"
+#line 599 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1338 "mn-mailbox-view.c"
+#line 1346 "mn-mailbox-view.c"
{
-#line 593 "mn-mailbox-view.gob"
+#line 601 "mn-mailbox-view.gob"
gtk_clipboard_request_contents(global_clipboard,
gnome_copied_files_atom,
@@ -1344,24 +1352,24 @@ mn_mailbox_view_popup_menu (MNMailboxView * self, unsigned int button, guint32 a
self);
gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, NULL, NULL, button, activate_time);
}}
-#line 1348 "mn-mailbox-view.c"
+#line 1356 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 601 "mn-mailbox-view.gob"
+#line 609 "mn-mailbox-view.gob"
static void
mn_mailbox_view_popup_menu_receive_cb (GtkClipboard * clipboard, GtkSelectionData * selection_data, gpointer data)
-#line 1354 "mn-mailbox-view.c"
+#line 1362 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu_receive_cb"
-#line 601 "mn-mailbox-view.gob"
+#line 609 "mn-mailbox-view.gob"
g_return_if_fail (clipboard != NULL);
-#line 601 "mn-mailbox-view.gob"
+#line 609 "mn-mailbox-view.gob"
g_return_if_fail (selection_data != NULL);
-#line 601 "mn-mailbox-view.gob"
+#line 609 "mn-mailbox-view.gob"
g_return_if_fail (data != NULL);
-#line 1363 "mn-mailbox-view.c"
+#line 1371 "mn-mailbox-view.c"
{
-#line 605 "mn-mailbox-view.gob"
+#line 613 "mn-mailbox-view.gob"
Self *self = data;
gboolean can_paste = FALSE;
@@ -1389,89 +1397,93 @@ mn_mailbox_view_popup_menu_receive_cb (GtkClipboard * clipboard, GtkSelectionDat
gtk_widget_set_sensitive(selfp->paste_item, can_paste);
}}
-#line 1393 "mn-mailbox-view.c"
+#line 1401 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 633 "mn-mailbox-view.gob"
+#line 641 "mn-mailbox-view.gob"
static gboolean
mn_mailbox_view_popup_menu_h (GtkWidget * widget, gpointer user_data)
-#line 1399 "mn-mailbox-view.c"
+#line 1407 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu_h"
-#line 633 "mn-mailbox-view.gob"
+#line 641 "mn-mailbox-view.gob"
g_return_val_if_fail (widget != NULL, (gboolean )0);
-#line 633 "mn-mailbox-view.gob"
+#line 641 "mn-mailbox-view.gob"
g_return_val_if_fail (GTK_IS_WIDGET (widget), (gboolean )0);
-#line 1406 "mn-mailbox-view.c"
+#line 1414 "mn-mailbox-view.c"
{
-#line 636 "mn-mailbox-view.gob"
+#line 644 "mn-mailbox-view.gob"
- self_popup_menu(SELF(widget), 0, gtk_get_current_event_time());
+ Self *self = SELF(widget);
+
+ self_popup_menu(self, 0, gtk_get_current_event_time());
+ gtk_menu_shell_select_first(GTK_MENU_SHELL(selfp->menu), FALSE);
+
return TRUE; /* a menu was activated */
}}
-#line 1413 "mn-mailbox-view.c"
+#line 1425 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 641 "mn-mailbox-view.gob"
+#line 653 "mn-mailbox-view.gob"
static gboolean
mn_mailbox_view_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-#line 1419 "mn-mailbox-view.c"
+#line 1431 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::button_press_event_h"
-#line 641 "mn-mailbox-view.gob"
+#line 653 "mn-mailbox-view.gob"
g_return_val_if_fail (widget != NULL, (gboolean )0);
-#line 641 "mn-mailbox-view.gob"
+#line 653 "mn-mailbox-view.gob"
g_return_val_if_fail (GTK_IS_WIDGET (widget), (gboolean )0);
-#line 641 "mn-mailbox-view.gob"
+#line 653 "mn-mailbox-view.gob"
g_return_val_if_fail (event != NULL, (gboolean )0);
-#line 1428 "mn-mailbox-view.c"
+#line 1440 "mn-mailbox-view.c"
{
-#line 645 "mn-mailbox-view.gob"
+#line 657 "mn-mailbox-view.gob"
if (event->button == 3)
self_popup_menu(SELF(widget), event->button, event->time);
return FALSE; /* propagate event */
}}
-#line 1437 "mn-mailbox-view.c"
+#line 1449 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 652 "mn-mailbox-view.gob"
+#line 664 "mn-mailbox-view.gob"
static void
mn_mailbox_view_row_activated_h (GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * column, gpointer user_data)
-#line 1443 "mn-mailbox-view.c"
+#line 1455 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::row_activated_h"
-#line 652 "mn-mailbox-view.gob"
+#line 664 "mn-mailbox-view.gob"
g_return_if_fail (treeview != NULL);
-#line 652 "mn-mailbox-view.gob"
+#line 664 "mn-mailbox-view.gob"
g_return_if_fail (GTK_IS_TREE_VIEW (treeview));
-#line 652 "mn-mailbox-view.gob"
+#line 664 "mn-mailbox-view.gob"
g_return_if_fail (path != NULL);
-#line 652 "mn-mailbox-view.gob"
+#line 664 "mn-mailbox-view.gob"
g_return_if_fail (column != NULL);
-#line 652 "mn-mailbox-view.gob"
+#line 664 "mn-mailbox-view.gob"
g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (column));
-#line 1456 "mn-mailbox-view.c"
+#line 1468 "mn-mailbox-view.c"
{
-#line 657 "mn-mailbox-view.gob"
+#line 669 "mn-mailbox-view.gob"
self_activate_properties(SELF(treeview));
}}
-#line 1462 "mn-mailbox-view.c"
+#line 1474 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 661 "mn-mailbox-view.gob"
+#line 673 "mn-mailbox-view.gob"
GtkWidget *
mn_mailbox_view_new (void)
-#line 1468 "mn-mailbox-view.c"
+#line 1480 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::new"
{
-#line 663 "mn-mailbox-view.gob"
+#line 675 "mn-mailbox-view.gob"
g_return_val_if_fail(mn_shell != NULL, NULL);
return GTK_WIDGET(GET_NEW);
}}
-#line 1477 "mn-mailbox-view.c"
+#line 1489 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mailbox-view.gob b/src/mn-mailbox-view.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -62,7 +62,7 @@ class MN:Mailbox:View from Gtk:Tree:View
GtkWidget *dialog;
toplevel = gtk_widget_get_toplevel(GTK_WIDGET(self));
- dialog = mn_mailbox_properties_dialog_new((GtkWindow *) toplevel, MN_MAILBOX_PROPERTIES_DIALOG_MODE_ADD);
+ dialog = mn_mailbox_properties_dialog_new(GTK_WINDOW(toplevel), NULL);
g_signal_connect(dialog,
"response",
@@ -165,23 +165,31 @@ class MN:Mailbox:View from Gtk:Tree:View
gpointer data (check null))
{
Self *self = data;
- GtkWidget *toplevel;
- GtkWidget *dialog;
MNURI *uri;
-
- toplevel = gtk_widget_get_toplevel(GTK_WIDGET(self));
- dialog = mn_mailbox_properties_dialog_new((GtkWindow *) toplevel, MN_MAILBOX_PROPERTIES_DIALOG_MODE_EDIT);
+ GtkWidget *dialog;
gtk_tree_model_get(model, iter, COLUMN_URI, &uri, -1);
- mn_mailbox_properties_dialog_set_uri(MN_MAILBOX_PROPERTIES_DIALOG(dialog), uri);
- g_object_unref(uri);
-
- g_signal_connect(dialog,
- "response",
- G_CALLBACK(self_properties_edit_response_h),
- NULL);
- gtk_widget_show(dialog);
+ dialog = (GtkWidget *) mn_shell_get_mailbox_properties_dialog(mn_shell, uri);
+ if (dialog)
+ gtk_window_present(GTK_WINDOW(dialog));
+ else
+ {
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(self));
+ dialog = mn_mailbox_properties_dialog_new(GTK_WINDOW(toplevel), uri);
+
+ g_signal_connect(dialog,
+ "response",
+ G_CALLBACK(self_properties_edit_response_h),
+ NULL);
+
+ mn_shell_add_mailbox_properties_dialog(mn_shell, MN_MAILBOX_PROPERTIES_DIALOG(dialog));
+ gtk_widget_show(dialog);
+ }
+
+ g_object_unref(uri);
}
class_init (class)
@@ -551,7 +559,7 @@ class MN:Mailbox:View from Gtk:Tree:View
{
MNURI *uri;
- uri = mn_mailbox_properties_dialog_get_uri(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
+ uri = mn_mailbox_properties_dialog_get_current_uri(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
g_return_if_fail(MN_IS_URI(uri));
if (! mn_mailboxes_find_uri(mn_shell->mailboxes, uri))
@@ -634,7 +642,11 @@ class MN:Mailbox:View from Gtk:Tree:View
popup_menu_h (Gtk:Widget *widget (check null type),
gpointer user_data)
{
- self_popup_menu(SELF(widget), 0, gtk_get_current_event_time());
+ Self *self = SELF(widget);
+
+ self_popup_menu(self, 0, gtk_get_current_event_time());
+ gtk_menu_shell_select_first(GTK_MENU_SHELL(selfp->menu), FALSE);
+
return TRUE; /* a menu was activated */
}
diff --git a/src/mn-mailbox.c b/src/mn-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -83,7 +83,7 @@ static void ___object_get_property (GObject *object, guint property_id, GValue *
static void mn_mailbox_init (MNMailbox * o) G_GNUC_UNUSED;
static void mn_mailbox_class_init (MNMailboxClass * c) G_GNUC_UNUSED;
static void mn_mailbox_messages_changed (MNMailbox * self, gboolean has_new) G_GNUC_UNUSED;
-static void ___c_mn_mailbox_finalize (GObject * object) G_GNUC_UNUSED;
+static void ___a_mn_mailbox_finalize (GObject * object) G_GNUC_UNUSED;
static gpointer mn_mailbox_new_async_thread (gpointer data) G_GNUC_UNUSED;
static void mn_mailbox_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data) G_GNUC_UNUSED;
static gboolean mn_mailbox_impl_is (MNMailbox * self, MNURI * uri) G_GNUC_UNUSED;
@@ -142,7 +142,6 @@ enum {
PROP_URI,
PROP_NAME,
PROP_MUST_POLL,
- PROP_HAS_NEW,
PROP_MESSAGES,
PROP_ERROR
};
@@ -157,8 +156,6 @@ static GObjectClass *parent_class = NULL;
#define self_get_name mn_mailbox_get_name
#define self_get_must_poll mn_mailbox_get_must_poll
#define self_set_must_poll mn_mailbox_set_must_poll
-#define self_get_has_new mn_mailbox_get_has_new
-#define self_set_has_new mn_mailbox_set_has_new
#define self_get_messages mn_mailbox_get_messages
#define self_set_messages mn_mailbox_set_messages
#define self_messages_changed mn_mailbox_messages_changed
@@ -175,6 +172,7 @@ static GObjectClass *parent_class = NULL;
#define self_check mn_mailbox_check
#define self_end_check mn_mailbox_end_check
#define self_notice mn_mailbox_notice
+#define self_warning mn_mailbox_warning
GType
mn_mailbox_get_type (void)
{
@@ -225,9 +223,9 @@ ___dispose (GObject *obj_self)
MNMailbox *self G_GNUC_UNUSED = MN_MAILBOX (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 129 "mn-mailbox.gob"
+#line 130 "mn-mailbox.gob"
if(self->uri) { g_object_unref ((gpointer) self->uri); self->uri = NULL; }
-#line 231 "mn-mailbox.c"
+#line 229 "mn-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -238,24 +236,24 @@ ___finalize(GObject *obj_self)
#define __GOB_FUNCTION__ "MN:Mailbox::finalize"
MNMailbox *self G_GNUC_UNUSED = MN_MAILBOX (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 235 "mn-mailbox.gob"
- ___c_mn_mailbox_finalize(obj_self);
-#line 244 "mn-mailbox.c"
-#line 140 "mn-mailbox.gob"
+#line 231 "mn-mailbox.gob"
+ ___a_mn_mailbox_finalize(obj_self);
+#line 242 "mn-mailbox.c"
+#line 141 "mn-mailbox.gob"
if(self->_priv->name) { g_free ((gpointer) self->_priv->name); self->_priv->name = NULL; }
-#line 247 "mn-mailbox.c"
-#line 155 "mn-mailbox.gob"
+#line 245 "mn-mailbox.c"
+#line 151 "mn-mailbox.gob"
if(self->_priv->messages) { mn_g_object_slist_free ((gpointer) self->_priv->messages); self->_priv->messages = NULL; }
-#line 250 "mn-mailbox.c"
-#line 209 "mn-mailbox.gob"
+#line 248 "mn-mailbox.c"
+#line 205 "mn-mailbox.gob"
if(self->_priv->error) { g_free ((gpointer) self->_priv->error); self->_priv->error = NULL; }
-#line 253 "mn-mailbox.c"
-#line 230 "mn-mailbox.gob"
+#line 251 "mn-mailbox.c"
+#line 226 "mn-mailbox.gob"
if(self->_priv->monitor_uri) { g_free ((gpointer) self->_priv->monitor_uri); self->_priv->monitor_uri = NULL; }
-#line 256 "mn-mailbox.c"
-#line 364 "mn-mailbox.gob"
+#line 254 "mn-mailbox.c"
+#line 360 "mn-mailbox.gob"
if(self->_priv->init_error) { g_free ((gpointer) self->_priv->init_error); self->_priv->init_error = NULL; }
-#line 259 "mn-mailbox.c"
+#line 257 "mn-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -266,10 +264,10 @@ mn_mailbox_init (MNMailbox * o G_GNUC_UNUSED)
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNMailboxPrivate);
#line 52 "mn-mailbox.gob"
o->uri = NULL;
-#line 270 "mn-mailbox.c"
-#line 142 "mn-mailbox.gob"
+#line 268 "mn-mailbox.c"
+#line 143 "mn-mailbox.gob"
o->_priv->must_poll = TRUE;
-#line 273 "mn-mailbox.c"
+#line 271 "mn-mailbox.c"
}
#undef __GOB_FUNCTION__
static void
@@ -300,14 +298,14 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
if ___GOB_UNLIKELY(sizeof(gboolean ) != sizeof(gboolean ) || parent_class == NULL /* avoid warning */) {
- g_error("mn-mailbox.gob line 206: Type mismatch of \"messages_changed\" signal signature");
+ g_error("mn-mailbox.gob line 202: Type mismatch of \"messages_changed\" signal signature");
}
c->removed = NULL;
c->messages_changed = NULL;
-#line 235 "mn-mailbox.gob"
+#line 231 "mn-mailbox.gob"
g_object_class->finalize = ___finalize;
-#line 311 "mn-mailbox.c"
+#line 309 "mn-mailbox.c"
c->impl_is = NULL;
c->impl_check = NULL;
g_object_class->dispose = ___dispose;
@@ -343,15 +341,6 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
g_object_class_install_property (g_object_class,
PROP_MUST_POLL,
param_spec);
- param_spec = g_param_spec_boolean
- ("has_new" /* name */,
- NULL /* nick */,
- _("Whether the mailbox has new mail or not") /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
- g_object_class_install_property (g_object_class,
- PROP_HAS_NEW,
- param_spec);
param_spec = g_param_spec_pointer
("messages" /* name */,
NULL /* nick */,
@@ -387,39 +376,32 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_URI:
{
-#line 134 "mn-mailbox.gob"
+#line 135 "mn-mailbox.gob"
g_return_if_fail(self->uri == NULL);
self->uri = MN_URI(g_value_dup_object(VAL));
selfp->name = g_strdup(self->uri->human_readable);
-#line 397 "mn-mailbox.c"
+#line 386 "mn-mailbox.c"
}
break;
case PROP_NAME:
{
-#line 141 "mn-mailbox.gob"
+#line 142 "mn-mailbox.gob"
{ char *old = self->_priv->name; self->_priv->name = g_value_dup_string (VAL); g_free (old); }
-#line 404 "mn-mailbox.c"
+#line 393 "mn-mailbox.c"
}
break;
case PROP_MUST_POLL:
{
-#line 145 "mn-mailbox.gob"
+#line 146 "mn-mailbox.gob"
self->_priv->must_poll = g_value_get_boolean (VAL);
-#line 411 "mn-mailbox.c"
- }
- break;
- case PROP_HAS_NEW:
- {
-#line 151 "mn-mailbox.gob"
-self->_priv->has_new = g_value_get_boolean (VAL);
-#line 418 "mn-mailbox.c"
+#line 400 "mn-mailbox.c"
}
break;
case PROP_MESSAGES:
{
-#line 159 "mn-mailbox.gob"
+#line 155 "mn-mailbox.gob"
GSList *messages;
GSList *l;
@@ -449,14 +431,14 @@ self->_priv->has_new = g_value_get_boolean (VAL);
if (changed)
self_messages_changed(self, has_new);
-#line 453 "mn-mailbox.c"
+#line 435 "mn-mailbox.c"
}
break;
case PROP_ERROR:
{
-#line 210 "mn-mailbox.gob"
+#line 206 "mn-mailbox.gob"
{ char *old = self->_priv->error; self->_priv->error = g_value_dup_string (VAL); g_free (old); }
-#line 460 "mn-mailbox.c"
+#line 442 "mn-mailbox.c"
}
break;
default:
@@ -485,39 +467,32 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_NAME:
{
-#line 141 "mn-mailbox.gob"
+#line 142 "mn-mailbox.gob"
g_value_set_string (VAL, self->_priv->name);
-#line 491 "mn-mailbox.c"
+#line 473 "mn-mailbox.c"
}
break;
case PROP_MUST_POLL:
{
-#line 145 "mn-mailbox.gob"
+#line 146 "mn-mailbox.gob"
g_value_set_boolean (VAL, self->_priv->must_poll);
-#line 498 "mn-mailbox.c"
- }
- break;
- case PROP_HAS_NEW:
- {
-#line 151 "mn-mailbox.gob"
-g_value_set_boolean (VAL, self->_priv->has_new);
-#line 505 "mn-mailbox.c"
+#line 480 "mn-mailbox.c"
}
break;
case PROP_MESSAGES:
{
-#line 189 "mn-mailbox.gob"
+#line 185 "mn-mailbox.gob"
g_value_set_pointer(VAL, selfp->messages);
-#line 514 "mn-mailbox.c"
+#line 489 "mn-mailbox.c"
}
break;
case PROP_ERROR:
{
-#line 210 "mn-mailbox.gob"
+#line 206 "mn-mailbox.gob"
g_value_set_string (VAL, self->_priv->error);
-#line 521 "mn-mailbox.c"
+#line 496 "mn-mailbox.c"
}
break;
default:
@@ -541,10 +516,10 @@ g_value_set_string (VAL, self->_priv->error);
* This signal gets emitted after the mailbox is removed from the
* mailboxes list.
**/
-#line 126 "mn-mailbox.gob"
+#line 127 "mn-mailbox.gob"
void
mn_mailbox_removed (MNMailbox * self)
-#line 548 "mn-mailbox.c"
+#line 523 "mn-mailbox.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -552,11 +527,11 @@ mn_mailbox_removed (MNMailbox * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 126 "mn-mailbox.gob"
+#line 127 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 126 "mn-mailbox.gob"
+#line 127 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 560 "mn-mailbox.c"
+#line 535 "mn-mailbox.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -570,105 +545,79 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 142 "mn-mailbox.gob"
+#line 143 "mn-mailbox.gob"
const char *
mn_mailbox_get_name (MNMailbox * self)
-#line 577 "mn-mailbox.c"
+#line 552 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_name"
-#line 142 "mn-mailbox.gob"
+#line 143 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (const char * )0);
-#line 142 "mn-mailbox.gob"
+#line 143 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (const char * )0);
-#line 584 "mn-mailbox.c"
+#line 559 "mn-mailbox.c"
{
-#line 142 "mn-mailbox.gob"
+#line 143 "mn-mailbox.gob"
return selfp->name; }}
-#line 588 "mn-mailbox.c"
+#line 563 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 145 "mn-mailbox.gob"
+#line 146 "mn-mailbox.gob"
gboolean
mn_mailbox_get_must_poll (MNMailbox * self)
-#line 594 "mn-mailbox.c"
+#line 569 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_must_poll"
{
-#line 145 "mn-mailbox.gob"
+#line 146 "mn-mailbox.gob"
gboolean val; g_object_get (G_OBJECT (self), "must_poll", &val, NULL); return val;
}}
-#line 601 "mn-mailbox.c"
+#line 576 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 145 "mn-mailbox.gob"
+#line 146 "mn-mailbox.gob"
void
mn_mailbox_set_must_poll (MNMailbox * self, gboolean val)
-#line 607 "mn-mailbox.c"
+#line 582 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_must_poll"
{
-#line 145 "mn-mailbox.gob"
+#line 146 "mn-mailbox.gob"
g_object_set (G_OBJECT (self), "must_poll", val, NULL);
}}
-#line 614 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 151 "mn-mailbox.gob"
-gboolean
-mn_mailbox_get_has_new (MNMailbox * self)
-#line 620 "mn-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:Mailbox::get_has_new"
-{
-#line 151 "mn-mailbox.gob"
- gboolean val; g_object_get (G_OBJECT (self), "has_new", &val, NULL); return val;
-}}
-#line 627 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 151 "mn-mailbox.gob"
-void
-mn_mailbox_set_has_new (MNMailbox * self, gboolean val)
-#line 633 "mn-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:Mailbox::set_has_new"
-{
-#line 151 "mn-mailbox.gob"
- g_object_set (G_OBJECT (self), "has_new", val, NULL);
-}}
-#line 640 "mn-mailbox.c"
+#line 589 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 189 "mn-mailbox.gob"
+#line 185 "mn-mailbox.gob"
gpointer
mn_mailbox_get_messages (MNMailbox * self)
-#line 646 "mn-mailbox.c"
+#line 595 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_messages"
{
-#line 156 "mn-mailbox.gob"
+#line 152 "mn-mailbox.gob"
gpointer val; g_object_get (G_OBJECT (self), "messages", &val, NULL); return val;
}}
-#line 653 "mn-mailbox.c"
+#line 602 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 159 "mn-mailbox.gob"
+#line 155 "mn-mailbox.gob"
void
mn_mailbox_set_messages (MNMailbox * self, gpointer val)
-#line 659 "mn-mailbox.c"
+#line 608 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_messages"
{
-#line 156 "mn-mailbox.gob"
+#line 152 "mn-mailbox.gob"
g_object_set (G_OBJECT (self), "messages", val, NULL);
}}
-#line 666 "mn-mailbox.c"
+#line 615 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 206 "mn-mailbox.gob"
+#line 202 "mn-mailbox.gob"
static void
mn_mailbox_messages_changed (MNMailbox * self, gboolean has_new)
-#line 672 "mn-mailbox.c"
+#line 621 "mn-mailbox.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -676,11 +625,11 @@ mn_mailbox_messages_changed (MNMailbox * self, gboolean has_new)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 206 "mn-mailbox.gob"
+#line 202 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 206 "mn-mailbox.gob"
+#line 202 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 684 "mn-mailbox.c"
+#line 633 "mn-mailbox.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -699,19 +648,19 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[1]);
}
-#line 211 "mn-mailbox.gob"
+#line 207 "mn-mailbox.gob"
void
mn_mailbox_set_error (MNMailbox * self, const char * format, ...)
-#line 706 "mn-mailbox.c"
+#line 655 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_error"
-#line 211 "mn-mailbox.gob"
+#line 207 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 211 "mn-mailbox.gob"
+#line 207 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 713 "mn-mailbox.c"
+#line 662 "mn-mailbox.c"
{
-#line 213 "mn-mailbox.gob"
+#line 209 "mn-mailbox.gob"
va_list args;
char *error = NULL;
@@ -726,42 +675,42 @@ mn_mailbox_set_error (MNMailbox * self, const char * format, ...)
g_object_set(G_OBJECT(self), MN_MAILBOX_PROP_ERROR(error), NULL);
g_free(error);
}}
-#line 730 "mn-mailbox.c"
+#line 679 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 227 "mn-mailbox.gob"
+#line 223 "mn-mailbox.gob"
const char *
mn_mailbox_get_error (MNMailbox * self)
-#line 736 "mn-mailbox.c"
+#line 685 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_error"
-#line 227 "mn-mailbox.gob"
+#line 223 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (const char * )0);
-#line 227 "mn-mailbox.gob"
+#line 223 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (const char * )0);
-#line 743 "mn-mailbox.c"
+#line 692 "mn-mailbox.c"
{
-#line 227 "mn-mailbox.gob"
+#line 223 "mn-mailbox.gob"
return selfp->error; }}
-#line 747 "mn-mailbox.c"
+#line 696 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 235 "mn-mailbox.gob"
+#line 231 "mn-mailbox.gob"
static void
-___c_mn_mailbox_finalize (GObject * object G_GNUC_UNUSED)
-#line 753 "mn-mailbox.c"
+___a_mn_mailbox_finalize (GObject * object G_GNUC_UNUSED)
+#line 702 "mn-mailbox.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
{
#define __GOB_FUNCTION__ "MN:Mailbox::finalize"
-#line 235 "mn-mailbox.gob"
+#line 231 "mn-mailbox.gob"
g_return_if_fail (object != NULL);
-#line 235 "mn-mailbox.gob"
+#line 231 "mn-mailbox.gob"
g_return_if_fail (G_IS_OBJECT (object));
-#line 763 "mn-mailbox.c"
+#line 712 "mn-mailbox.c"
{
-#line 237 "mn-mailbox.gob"
+#line 233 "mn-mailbox.gob"
Self *self = SELF(object);
@@ -770,18 +719,18 @@ ___c_mn_mailbox_finalize (GObject * object G_GNUC_UNUSED)
PARENT_HANDLER(object);
}}
-#line 774 "mn-mailbox.c"
+#line 723 "mn-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 246 "mn-mailbox.gob"
+#line 242 "mn-mailbox.gob"
void
mn_mailbox_init_types (void)
-#line 781 "mn-mailbox.c"
+#line 730 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::init_types"
{
-#line 248 "mn-mailbox.gob"
+#line 244 "mn-mailbox.gob"
int i = 0;
@@ -808,7 +757,7 @@ mn_mailbox_init_types (void)
#endif
mn_mailbox_types[i] = 0;
}}
-#line 812 "mn-mailbox.c"
+#line 761 "mn-mailbox.c"
#undef __GOB_FUNCTION__
/**
@@ -821,21 +770,21 @@ mn_mailbox_init_types (void)
* Creates a new #MNMailbox asynchronously. The newly created
* #MNMailbox will be passed to @callback.
**/
-#line 285 "mn-mailbox.gob"
+#line 281 "mn-mailbox.gob"
void
mn_mailbox_new_async (MNURI * uri, gpointer callback, gpointer user_data)
-#line 828 "mn-mailbox.c"
+#line 777 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::new_async"
-#line 285 "mn-mailbox.gob"
+#line 281 "mn-mailbox.gob"
g_return_if_fail (uri != NULL);
-#line 285 "mn-mailbox.gob"
+#line 281 "mn-mailbox.gob"
g_return_if_fail (MN_IS_URI (uri));
-#line 285 "mn-mailbox.gob"
+#line 281 "mn-mailbox.gob"
g_return_if_fail (callback != NULL);
-#line 837 "mn-mailbox.c"
+#line 786 "mn-mailbox.c"
{
-#line 289 "mn-mailbox.gob"
+#line 285 "mn-mailbox.gob"
NewInfo *info;
@@ -846,17 +795,17 @@ mn_mailbox_new_async (MNURI * uri, gpointer callback, gpointer user_data)
mn_thread_create(self_new_async_thread, info);
}}
-#line 850 "mn-mailbox.c"
+#line 799 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 300 "mn-mailbox.gob"
+#line 296 "mn-mailbox.gob"
static gpointer
mn_mailbox_new_async_thread (gpointer data)
-#line 856 "mn-mailbox.c"
+#line 805 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::new_async_thread"
{
-#line 302 "mn-mailbox.gob"
+#line 298 "mn-mailbox.gob"
NewInfo *info = data;
Self *mailbox = NULL;
@@ -918,24 +867,24 @@ mn_mailbox_new_async_thread (gpointer data)
return NULL;
}}
-#line 922 "mn-mailbox.c"
+#line 871 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 365 "mn-mailbox.gob"
+#line 361 "mn-mailbox.gob"
void
mn_mailbox_set_init_error (MNMailbox * self, const char * format, ...)
-#line 928 "mn-mailbox.c"
+#line 877 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_init_error"
-#line 365 "mn-mailbox.gob"
+#line 361 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 365 "mn-mailbox.gob"
+#line 361 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 365 "mn-mailbox.gob"
+#line 361 "mn-mailbox.gob"
g_return_if_fail (format != NULL);
-#line 937 "mn-mailbox.c"
+#line 886 "mn-mailbox.c"
{
-#line 367 "mn-mailbox.gob"
+#line 363 "mn-mailbox.gob"
va_list args;
@@ -945,24 +894,24 @@ mn_mailbox_set_init_error (MNMailbox * self, const char * format, ...)
selfp->init_error = g_strdup_vprintf(format, args);
va_end(args);
}}
-#line 949 "mn-mailbox.c"
+#line 898 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 377 "mn-mailbox.gob"
+#line 373 "mn-mailbox.gob"
void
mn_mailbox_monitor (MNMailbox * self, const char * uri, GnomeVFSMonitorType monitor_type, MNMailboxMonitorEventType events)
-#line 955 "mn-mailbox.c"
+#line 904 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::monitor"
-#line 377 "mn-mailbox.gob"
+#line 373 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 377 "mn-mailbox.gob"
+#line 373 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 377 "mn-mailbox.gob"
+#line 373 "mn-mailbox.gob"
g_return_if_fail (uri != NULL);
-#line 964 "mn-mailbox.c"
+#line 913 "mn-mailbox.c"
{
-#line 382 "mn-mailbox.gob"
+#line 378 "mn-mailbox.gob"
GnomeVFSResult result;
@@ -988,7 +937,7 @@ mn_mailbox_monitor (MNMailbox * self, const char * uri, GnomeVFSMonitorType moni
}
else
{
- g_warning(_("unable to enable immediate notification for %s: %s"), uri, gnome_vfs_result_to_string(result));
+ self_warning(self, _("unable to enable immediate notification: %s"), gnome_vfs_result_to_string(result));
if (! eel_gconf_get_boolean(MN_CONF_IMMEDIATE_NOTIFICATION_ERROR_DIALOG_DO_NOT_SHOW))
{
@@ -1052,20 +1001,20 @@ mn_mailbox_monitor (MNMailbox * self, const char * uri, GnomeVFSMonitorType moni
}
}
}}
-#line 1056 "mn-mailbox.c"
+#line 1005 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 472 "mn-mailbox.gob"
+#line 468 "mn-mailbox.gob"
static void
mn_mailbox_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data)
-#line 1062 "mn-mailbox.c"
+#line 1011 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::monitor_cb"
-#line 472 "mn-mailbox.gob"
+#line 468 "mn-mailbox.gob"
g_return_if_fail (user_data != NULL);
-#line 1067 "mn-mailbox.c"
+#line 1016 "mn-mailbox.c"
{
-#line 478 "mn-mailbox.gob"
+#line 474 "mn-mailbox.gob"
Self *self = user_data;
@@ -1074,20 +1023,20 @@ mn_mailbox_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri,
self_check(self);
GDK_THREADS_LEAVE();
}}
-#line 1078 "mn-mailbox.c"
+#line 1027 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 487 "mn-mailbox.gob"
+#line 483 "mn-mailbox.gob"
static gboolean
mn_mailbox_impl_is (MNMailbox * self, MNURI * uri)
-#line 1084 "mn-mailbox.c"
+#line 1033 "mn-mailbox.c"
{
MNMailboxClass *klass;
-#line 487 "mn-mailbox.gob"
+#line 483 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 487 "mn-mailbox.gob"
+#line 483 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (gboolean )0);
-#line 1091 "mn-mailbox.c"
+#line 1040 "mn-mailbox.c"
klass = MN_MAILBOX_GET_CLASS(self);
if(klass->impl_is)
@@ -1096,36 +1045,36 @@ mn_mailbox_impl_is (MNMailbox * self, MNURI * uri)
return (gboolean )(0);
}
-#line 489 "mn-mailbox.gob"
+#line 485 "mn-mailbox.gob"
static void
mn_mailbox_impl_check (MNMailbox * self)
-#line 1103 "mn-mailbox.c"
+#line 1052 "mn-mailbox.c"
{
MNMailboxClass *klass;
-#line 489 "mn-mailbox.gob"
+#line 485 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 489 "mn-mailbox.gob"
+#line 485 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1110 "mn-mailbox.c"
+#line 1059 "mn-mailbox.c"
klass = MN_MAILBOX_GET_CLASS(self);
if(klass->impl_check)
(*klass->impl_check)(self);
}
-#line 492 "mn-mailbox.gob"
+#line 488 "mn-mailbox.gob"
void
mn_mailbox_check (MNMailbox * self)
-#line 1120 "mn-mailbox.c"
+#line 1069 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::check"
-#line 492 "mn-mailbox.gob"
+#line 488 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 492 "mn-mailbox.gob"
+#line 488 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1127 "mn-mailbox.c"
+#line 1076 "mn-mailbox.c"
{
-#line 494 "mn-mailbox.gob"
+#line 490 "mn-mailbox.gob"
g_return_if_fail(MN_MAILBOX_CAN_CHECK(self));
@@ -1138,56 +1087,85 @@ mn_mailbox_check (MNMailbox * self)
mn_thread_create((GThreadFunc) SELF_GET_CLASS(self)->impl_check, self);
}
}}
-#line 1142 "mn-mailbox.c"
+#line 1091 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 507 "mn-mailbox.gob"
+#line 503 "mn-mailbox.gob"
void
mn_mailbox_end_check (MNMailbox * self)
-#line 1148 "mn-mailbox.c"
+#line 1097 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::end_check"
-#line 507 "mn-mailbox.gob"
+#line 503 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 507 "mn-mailbox.gob"
+#line 503 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1155 "mn-mailbox.c"
+#line 1104 "mn-mailbox.c"
{
-#line 509 "mn-mailbox.gob"
+#line 505 "mn-mailbox.gob"
g_return_if_fail(selfp->checking == TRUE);
selfp->checking = FALSE;
g_object_unref(self);
}}
-#line 1164 "mn-mailbox.c"
+#line 1113 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 516 "mn-mailbox.gob"
+#line 512 "mn-mailbox.gob"
void
mn_mailbox_notice (MNMailbox * self, const char * format, ...)
-#line 1170 "mn-mailbox.c"
+#line 1119 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::notice"
-#line 516 "mn-mailbox.gob"
+#line 512 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 516 "mn-mailbox.gob"
+#line 512 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 516 "mn-mailbox.gob"
+#line 512 "mn-mailbox.gob"
g_return_if_fail (format != NULL);
-#line 1179 "mn-mailbox.c"
+#line 1128 "mn-mailbox.c"
{
-#line 518 "mn-mailbox.gob"
+#line 514 "mn-mailbox.gob"
va_list args;
- char *notice;
+ char *message;
va_start(args, format);
- notice = g_strdup_vprintf(format, args);
+ message = g_strdup_vprintf(format, args);
+ va_end(args);
+
+ mn_info("%s: %s", self->uri->text, message);
+ g_free(message);
+ }}
+#line 1142 "mn-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 526 "mn-mailbox.gob"
+void
+mn_mailbox_warning (MNMailbox * self, const char * format, ...)
+#line 1148 "mn-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Mailbox::warning"
+#line 526 "mn-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 526 "mn-mailbox.gob"
+ g_return_if_fail (MN_IS_MAILBOX (self));
+#line 526 "mn-mailbox.gob"
+ g_return_if_fail (format != NULL);
+#line 1157 "mn-mailbox.c"
+{
+#line 528 "mn-mailbox.gob"
+
+ va_list args;
+ char *message;
+
+ va_start(args, format);
+ message = g_strdup_vprintf(format, args);
va_end(args);
- mn_info("%s: %s", self->uri->text, notice);
- g_free(notice);
+ g_warning("%s: %s", self->uri->text, message);
+ g_free(message);
}}
-#line 1193 "mn-mailbox.c"
+#line 1171 "mn-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mailbox.gob b/src/mn-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -96,9 +96,10 @@ typedef struct
* MNMailbox API functions must be called with the GDK lock
* held. Exceptions are:
*
- * mn_mailbox_get_types()
- * mn_mailbox_notice()
+ * mn_mailbox_init_types()
* mn_mailbox_set_init_error()
+ * mn_mailbox_notice()
+ * mn_mailbox_warning()
*
* (No code can be hooked to these functions through signals or other
* means, therefore we are sure GDK will never be used from these
@@ -147,11 +148,6 @@ class MN:Mailbox from G:Object
link,
export);
- private gboolean has_new;
- property BOOLEAN has_new (blurb = _("Whether the mailbox has new mail or not"),
- link,
- export);
-
private GSList *messages destroywith mn_g_object_slist_free;
property POINTER messages (blurb = _("The list of new and unread MNMessage objects"),
export)
@@ -404,7 +400,7 @@ class MN:Mailbox from G:Object
}
else
{
- g_warning(_("unable to enable immediate notification for %s: %s"), uri, gnome_vfs_result_to_string(result));
+ self_warning(self, _("unable to enable immediate notification: %s"), gnome_vfs_result_to_string(result));
if (! eel_gconf_get_boolean(MN_CONF_IMMEDIATE_NOTIFICATION_ERROR_DIALOG_DO_NOT_SHOW))
{
@@ -517,13 +513,27 @@ class MN:Mailbox from G:Object
notice (self, const char *format (check null), ...)
{
va_list args;
- char *notice;
+ char *message;
va_start(args, format);
- notice = g_strdup_vprintf(format, args);
+ message = g_strdup_vprintf(format, args);
+ va_end(args);
+
+ mn_info("%s: %s", self->uri->text, message);
+ g_free(message);
+ }
+
+ protected void
+ warning (self, const char *format (check null), ...)
+ {
+ va_list args;
+ char *message;
+
+ va_start(args, format);
+ message = g_strdup_vprintf(format, args);
va_end(args);
- mn_info("%s: %s", self->uri->text, notice);
- g_free(notice);
+ g_warning("%s: %s", self->uri->text, message);
+ g_free(message);
}
}
diff --git a/src/mn-mailbox.h b/src/mn-mailbox.h
@@ -80,9 +80,6 @@ const char * mn_mailbox_get_name (MNMailbox * self);
gboolean mn_mailbox_get_must_poll (MNMailbox * self);
void mn_mailbox_set_must_poll (MNMailbox * self,
gboolean val);
-gboolean mn_mailbox_get_has_new (MNMailbox * self);
-void mn_mailbox_set_has_new (MNMailbox * self,
- gboolean val);
gpointer mn_mailbox_get_messages (MNMailbox * self);
void mn_mailbox_set_messages (MNMailbox * self,
gpointer val);
@@ -122,8 +119,6 @@ void mn_mailbox_check (MNMailbox * self);
#define MN_MAILBOX_GET_PROP_NAME(arg) "name", __extension__ ({gchar **z = (arg); z;})
#define MN_MAILBOX_PROP_MUST_POLL(arg) "must_poll", __extension__ ({gboolean z = (arg); z;})
#define MN_MAILBOX_GET_PROP_MUST_POLL(arg) "must_poll", __extension__ ({gboolean *z = (arg); z;})
-#define MN_MAILBOX_PROP_HAS_NEW(arg) "has_new", __extension__ ({gboolean z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_HAS_NEW(arg) "has_new", __extension__ ({gboolean *z = (arg); z;})
#define MN_MAILBOX_PROP_MESSAGES(arg) "messages", __extension__ ({gpointer z = (arg); z;})
#define MN_MAILBOX_GET_PROP_MESSAGES(arg) "messages", __extension__ ({gpointer *z = (arg); z;})
#define MN_MAILBOX_PROP_ERROR(arg) "error", __extension__ ({gchar *z = (arg); z;})
@@ -134,8 +129,6 @@ void mn_mailbox_check (MNMailbox * self);
#define MN_MAILBOX_GET_PROP_NAME(arg) "name",(gchar **)(arg)
#define MN_MAILBOX_PROP_MUST_POLL(arg) "must_poll",(gboolean )(arg)
#define MN_MAILBOX_GET_PROP_MUST_POLL(arg) "must_poll",(gboolean *)(arg)
-#define MN_MAILBOX_PROP_HAS_NEW(arg) "has_new",(gboolean )(arg)
-#define MN_MAILBOX_GET_PROP_HAS_NEW(arg) "has_new",(gboolean *)(arg)
#define MN_MAILBOX_PROP_MESSAGES(arg) "messages",(gpointer )(arg)
#define MN_MAILBOX_GET_PROP_MESSAGES(arg) "messages",(gpointer *)(arg)
#define MN_MAILBOX_PROP_ERROR(arg) "error",(gchar *)(arg)
diff --git a/src/mn-mailboxes.c b/src/mn-mailboxes.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -56,16 +56,14 @@ static void ___real_mn_mailboxes_mailbox_removed (MNMailboxes * self, MNMailbox
static void mn_mailboxes_mailbox_removed (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
static void ___real_mn_mailboxes_list_changed (MNMailboxes * self);
static void mn_mailboxes_list_changed (MNMailboxes * self) G_GNUC_UNUSED;
-static void mn_mailboxes_has_new_changed (MNMailboxes * self) G_GNUC_UNUSED;
static void mn_mailboxes_messages_changed (MNMailboxes * self, gboolean has_new) G_GNUC_UNUSED;
static void mn_mailboxes_error_changed (MNMailboxes * self) G_GNUC_UNUSED;
static void mn_mailboxes_init (MNMailboxes * self) G_GNUC_UNUSED;
-static void ___a_mn_mailboxes_finalize (GObject * object) G_GNUC_UNUSED;
-static void mn_mailboxes_notify_delay_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-static void mn_mailboxes_notify_mailboxes_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
+static void ___9_mn_mailboxes_finalize (GObject * object) G_GNUC_UNUSED;
+static void mn_mailboxes_notify_delay_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
+static void mn_mailboxes_notify_mailboxes_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
static void mn_mailboxes_update_from_conf (MNMailboxes * self) G_GNUC_UNUSED;
static void mn_mailboxes_new_cb (MNMailbox * mailbox, gpointer user_data) G_GNUC_UNUSED;
-static void mn_mailboxes_notify_has_new_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
static void mn_mailboxes_messages_changed_h (MNMailbox * mailbox, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
static void mn_mailboxes_notify_error_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
static void mn_mailboxes_notify_must_poll_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
@@ -89,9 +87,6 @@ static int mn_mailboxes_conf_find_compare_func (gconstpointer a, gconstpointer b
#define self_connect__list_changed(object,func,data) mn_mailboxes_connect__list_changed((object),(func),(data))
#define self_connect_after__list_changed(object,func,data) mn_mailboxes_connect_after__list_changed((object),(func),(data))
#define self_connect_data__list_changed(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__list_changed((object),(func),(data),(destroy_data),(flags))
-#define self_connect__has_new_changed(object,func,data) mn_mailboxes_connect__has_new_changed((object),(func),(data))
-#define self_connect_after__has_new_changed(object,func,data) mn_mailboxes_connect_after__has_new_changed((object),(func),(data))
-#define self_connect_data__has_new_changed(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__has_new_changed((object),(func),(data),(destroy_data),(flags))
#define self_connect__messages_changed(object,func,data) mn_mailboxes_connect__messages_changed((object),(func),(data))
#define self_connect_after__messages_changed(object,func,data) mn_mailboxes_connect_after__messages_changed((object),(func),(data))
#define self_connect_data__messages_changed(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__messages_changed((object),(func),(data),(destroy_data),(flags))
@@ -168,7 +163,6 @@ enum {
MAILBOX_CHANGED_SIGNAL,
MAILBOX_REMOVED_SIGNAL,
LIST_CHANGED_SIGNAL,
- HAS_NEW_CHANGED_SIGNAL,
MESSAGES_CHANGED_SIGNAL,
ERROR_CHANGED_SIGNAL,
LAST_SIGNAL
@@ -189,7 +183,6 @@ static GObjectClass *parent_class = NULL;
#define self_mailbox_changed mn_mailboxes_mailbox_changed
#define self_mailbox_removed mn_mailboxes_mailbox_removed
#define self_list_changed mn_mailboxes_list_changed
-#define self_has_new_changed mn_mailboxes_has_new_changed
#define self_messages_changed mn_mailboxes_messages_changed
#define self_error_changed mn_mailboxes_error_changed
#define self_get_must_poll mn_mailboxes_get_must_poll
@@ -197,7 +190,6 @@ static GObjectClass *parent_class = NULL;
#define self_notify_mailboxes_cb mn_mailboxes_notify_mailboxes_cb
#define self_update_from_conf mn_mailboxes_update_from_conf
#define self_new_cb mn_mailboxes_new_cb
-#define self_notify_has_new_h mn_mailboxes_notify_has_new_h
#define self_messages_changed_h mn_mailboxes_messages_changed_h
#define self_notify_error_h mn_mailboxes_notify_error_h
#define self_notify_must_poll_h mn_mailboxes_notify_must_poll_h
@@ -209,7 +201,6 @@ static GObjectClass *parent_class = NULL;
#define self_find mn_mailboxes_find
#define self_find_uri mn_mailboxes_find_uri
#define self_find_compare_func mn_mailboxes_find_compare_func
-#define self_conf_find mn_mailboxes_conf_find
#define self_conf_find_uri mn_mailboxes_conf_find_uri
#define self_conf_find_compare_func mn_mailboxes_conf_find_compare_func
#define self_new mn_mailboxes_new
@@ -262,12 +253,12 @@ ___finalize(GObject *obj_self)
#define __GOB_FUNCTION__ "MN:Mailboxes::finalize"
MNMailboxes *self G_GNUC_UNUSED = MN_MAILBOXES (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 168 "mn-mailboxes.gob"
- ___a_mn_mailboxes_finalize(obj_self);
-#line 268 "mn-mailboxes.c"
+#line 156 "mn-mailboxes.gob"
+ ___9_mn_mailboxes_finalize(obj_self);
+#line 259 "mn-mailboxes.c"
#line 36 "mn-mailboxes.gob"
if(self->_priv->list) { mn_g_object_slist_free ((gpointer) self->_priv->list); self->_priv->list = NULL; }
-#line 271 "mn-mailboxes.c"
+#line 262 "mn-mailboxes.c"
}
#undef __GOB_FUNCTION__
@@ -325,14 +316,6 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- object_signals[HAS_NEW_CHANGED_SIGNAL] =
- g_signal_new ("has_new_changed",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST),
- G_STRUCT_OFFSET (MNMailboxesClass, has_new_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
object_signals[MESSAGES_CHANGED_SIGNAL] =
g_signal_new ("messages_changed",
G_TYPE_FROM_CLASS (g_object_class),
@@ -343,7 +326,7 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
if ___GOB_UNLIKELY(sizeof(gboolean ) != sizeof(gboolean ) || parent_class == NULL /* avoid warning */) {
- g_error("mn-mailboxes.gob line 127: Type mismatch of \"messages_changed\" signal signature");
+ g_error("mn-mailboxes.gob line 115: Type mismatch of \"messages_changed\" signal signature");
}
object_signals[ERROR_CHANGED_SIGNAL] =
g_signal_new ("error_changed",
@@ -358,15 +341,14 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
c->mailbox_changed = NULL;
#line 67 "mn-mailboxes.gob"
c->mailbox_removed = ___real_mn_mailboxes_mailbox_removed;
-#line 95 "mn-mailboxes.gob"
+#line 93 "mn-mailboxes.gob"
c->list_changed = ___real_mn_mailboxes_list_changed;
-#line 364 "mn-mailboxes.c"
- c->has_new_changed = NULL;
+#line 347 "mn-mailboxes.c"
c->messages_changed = NULL;
c->error_changed = NULL;
-#line 168 "mn-mailboxes.gob"
+#line 156 "mn-mailboxes.gob"
g_object_class->finalize = ___finalize;
-#line 370 "mn-mailboxes.c"
+#line 352 "mn-mailboxes.c"
g_object_class->get_property = ___object_get_property;
{
GParamSpec *param_spec;
@@ -383,15 +365,15 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
}
}
#undef __GOB_FUNCTION__
-#line 159 "mn-mailboxes.gob"
+#line 147 "mn-mailboxes.gob"
static void
mn_mailboxes_init (MNMailboxes * self G_GNUC_UNUSED)
-#line 390 "mn-mailboxes.c"
+#line 372 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,TYPE_SELF,MNMailboxesPrivate);
{
-#line 160 "mn-mailboxes.gob"
+#line 148 "mn-mailboxes.gob"
self_update_from_conf(self);
self_install_timeout(self);
@@ -399,7 +381,7 @@ mn_mailboxes_init (MNMailboxes * self G_GNUC_UNUSED)
mn_conf_notification_add(self, MN_CONF_DELAY_NAMESPACE, self_notify_delay_cb, self);
mn_conf_notification_add(self, MN_CONF_MAILBOXES, self_notify_mailboxes_cb, self);
-#line 403 "mn-mailboxes.c"
+#line 385 "mn-mailboxes.c"
}
}
#undef __GOB_FUNCTION__
@@ -418,7 +400,7 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_MUST_POLL:
{
-#line 145 "mn-mailboxes.gob"
+#line 133 "mn-mailboxes.gob"
gboolean must_poll = FALSE;
GSList *l;
@@ -432,7 +414,7 @@ ___object_get_property (GObject *object,
g_value_set_boolean(VAL, must_poll);
-#line 436 "mn-mailboxes.c"
+#line 418 "mn-mailboxes.c"
}
break;
default:
@@ -451,7 +433,7 @@ ___object_get_property (GObject *object,
#line 46 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_added (MNMailboxes * self, MNMailbox * mailbox)
-#line 455 "mn-mailboxes.c"
+#line 437 "mn-mailboxes.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -467,7 +449,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (mailbox != NULL);
#line 46 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 471 "mn-mailboxes.c"
+#line 453 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -489,7 +471,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 56 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_changed (MNMailboxes * self, MNMailbox * mailbox)
-#line 493 "mn-mailboxes.c"
+#line 475 "mn-mailboxes.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -505,7 +487,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (mailbox != NULL);
#line 56 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 509 "mn-mailboxes.c"
+#line 491 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -527,7 +509,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 67 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_removed (MNMailboxes * self, MNMailbox * mailbox)
-#line 531 "mn-mailboxes.c"
+#line 513 "mn-mailboxes.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -543,7 +525,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (mailbox != NULL);
#line 67 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 547 "mn-mailboxes.c"
+#line 529 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -564,7 +546,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 67 "mn-mailboxes.gob"
static void
___real_mn_mailboxes_mailbox_removed (MNMailboxes * self G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 568 "mn-mailboxes.c"
+#line 550 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_removed"
{
@@ -572,27 +554,25 @@ ___real_mn_mailboxes_mailbox_removed (MNMailboxes * self G_GNUC_UNUSED, MNMailbo
/* disconnect signals */
g_object_disconnect(mailbox,
- "any_signal", self_notify_has_new_h, self,
- "any_signal", self_messages_changed_h, self,
- "any_signal", self_notify_error_h, self,
- "any_signal", self_notify_must_poll_h, self,
+ "any-signal", self_messages_changed_h, self,
+ "any-signal", self_notify_error_h, self,
+ "any-signal", self_notify_must_poll_h, self,
NULL);
/* emit the "removed" signal on the mailbox */
mn_mailbox_removed(mailbox);
- /* has-new, messages and error have possibly changed */
- self_has_new_changed(self);
+ /* messages and error have possibly changed */
self_messages_changed(self, FALSE);
self_error_changed(self);
}}
-#line 590 "mn-mailboxes.c"
+#line 570 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 95 "mn-mailboxes.gob"
+#line 93 "mn-mailboxes.gob"
static void
mn_mailboxes_list_changed (MNMailboxes * self)
-#line 596 "mn-mailboxes.c"
+#line 576 "mn-mailboxes.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -600,11 +580,11 @@ mn_mailboxes_list_changed (MNMailboxes * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 95 "mn-mailboxes.gob"
+#line 93 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 95 "mn-mailboxes.gob"
+#line 93 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 608 "mn-mailboxes.c"
+#line 588 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -617,54 +597,25 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 95 "mn-mailboxes.gob"
+#line 93 "mn-mailboxes.gob"
static void
___real_mn_mailboxes_list_changed (MNMailboxes * self G_GNUC_UNUSED)
-#line 624 "mn-mailboxes.c"
+#line 604 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::list_changed"
{
-#line 97 "mn-mailboxes.gob"
+#line 95 "mn-mailboxes.gob"
/* must-poll has possibly changed */
g_object_notify(G_OBJECT(self), "must-poll");
}}
-#line 633 "mn-mailboxes.c"
+#line 613 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 111 "mn-mailboxes.gob"
-static void
-mn_mailboxes_has_new_changed (MNMailboxes * self)
-#line 639 "mn-mailboxes.c"
-{
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 111 "mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 111 "mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 651 "mn-mailboxes.c"
-
- ___param_values[0].g_type = 0;
- g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
- g_value_set_instance (&___param_values[0], (gpointer) self);
-
- g_signal_emitv (___param_values,
- object_signals[HAS_NEW_CHANGED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 127 "mn-mailboxes.gob"
+#line 115 "mn-mailboxes.gob"
static void
mn_mailboxes_messages_changed (MNMailboxes * self, gboolean has_new)
-#line 668 "mn-mailboxes.c"
+#line 619 "mn-mailboxes.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -672,11 +623,11 @@ mn_mailboxes_messages_changed (MNMailboxes * self, gboolean has_new)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 127 "mn-mailboxes.gob"
+#line 115 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 127 "mn-mailboxes.gob"
+#line 115 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 680 "mn-mailboxes.c"
+#line 631 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -695,10 +646,10 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[1]);
}
-#line 139 "mn-mailboxes.gob"
+#line 127 "mn-mailboxes.gob"
static void
mn_mailboxes_error_changed (MNMailboxes * self)
-#line 702 "mn-mailboxes.c"
+#line 653 "mn-mailboxes.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -706,11 +657,11 @@ mn_mailboxes_error_changed (MNMailboxes * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 139 "mn-mailboxes.gob"
+#line 127 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 139 "mn-mailboxes.gob"
+#line 127 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 714 "mn-mailboxes.c"
+#line 665 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -724,36 +675,36 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 145 "mn-mailboxes.gob"
+#line 133 "mn-mailboxes.gob"
gboolean
mn_mailboxes_get_must_poll (MNMailboxes * self)
-#line 731 "mn-mailboxes.c"
+#line 682 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::get_must_poll"
{
-#line 142 "mn-mailboxes.gob"
+#line 130 "mn-mailboxes.gob"
gboolean val; g_object_get (G_OBJECT (self), "must_poll", &val, NULL); return val;
}}
-#line 738 "mn-mailboxes.c"
+#line 689 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 168 "mn-mailboxes.gob"
+#line 156 "mn-mailboxes.gob"
static void
-___a_mn_mailboxes_finalize (GObject * object G_GNUC_UNUSED)
-#line 745 "mn-mailboxes.c"
+___9_mn_mailboxes_finalize (GObject * object G_GNUC_UNUSED)
+#line 696 "mn-mailboxes.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
{
#define __GOB_FUNCTION__ "MN:Mailboxes::finalize"
-#line 168 "mn-mailboxes.gob"
+#line 156 "mn-mailboxes.gob"
g_return_if_fail (object != NULL);
-#line 168 "mn-mailboxes.gob"
+#line 156 "mn-mailboxes.gob"
g_return_if_fail (G_IS_OBJECT (object));
-#line 755 "mn-mailboxes.c"
+#line 706 "mn-mailboxes.c"
{
-#line 170 "mn-mailboxes.gob"
+#line 158 "mn-mailboxes.gob"
Self *self = SELF(object);
@@ -762,21 +713,21 @@ ___a_mn_mailboxes_finalize (GObject * object G_GNUC_UNUSED)
PARENT_HANDLER(object);
}}
-#line 766 "mn-mailboxes.c"
+#line 717 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 179 "mn-mailboxes.gob"
+#line 167 "mn-mailboxes.gob"
static void
-mn_mailboxes_notify_delay_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 773 "mn-mailboxes.c"
+mn_mailboxes_notify_delay_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
+#line 724 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::notify_delay_cb"
-#line 179 "mn-mailboxes.gob"
+#line 167 "mn-mailboxes.gob"
g_return_if_fail (user_data != NULL);
-#line 778 "mn-mailboxes.c"
+#line 729 "mn-mailboxes.c"
{
-#line 184 "mn-mailboxes.gob"
+#line 172 "mn-mailboxes.gob"
Self *self = user_data;
@@ -784,20 +735,20 @@ mn_mailboxes_notify_delay_cb (GConfClient * client, guint cnxn_id, GConfEntry *
self_install_timeout(self);
GDK_THREADS_LEAVE();
}}
-#line 788 "mn-mailboxes.c"
+#line 739 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 192 "mn-mailboxes.gob"
+#line 180 "mn-mailboxes.gob"
static void
-mn_mailboxes_notify_mailboxes_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 794 "mn-mailboxes.c"
+mn_mailboxes_notify_mailboxes_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
+#line 745 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::notify_mailboxes_cb"
-#line 192 "mn-mailboxes.gob"
+#line 180 "mn-mailboxes.gob"
g_return_if_fail (user_data != NULL);
-#line 799 "mn-mailboxes.c"
+#line 750 "mn-mailboxes.c"
{
-#line 197 "mn-mailboxes.gob"
+#line 185 "mn-mailboxes.gob"
Self *self = user_data;
@@ -805,22 +756,22 @@ mn_mailboxes_notify_mailboxes_cb (GConfClient * client, guint cnxn_id, GConfEntr
self_update_from_conf(self);
GDK_THREADS_LEAVE();
}}
-#line 809 "mn-mailboxes.c"
+#line 760 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 205 "mn-mailboxes.gob"
+#line 193 "mn-mailboxes.gob"
static void
mn_mailboxes_update_from_conf (MNMailboxes * self)
-#line 815 "mn-mailboxes.c"
+#line 766 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::update_from_conf"
-#line 205 "mn-mailboxes.gob"
+#line 193 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 205 "mn-mailboxes.gob"
+#line 193 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 822 "mn-mailboxes.c"
+#line 773 "mn-mailboxes.c"
{
-#line 207 "mn-mailboxes.gob"
+#line 195 "mn-mailboxes.gob"
GSList *gconf_mailboxes;
GSList *l;
@@ -874,24 +825,24 @@ mn_mailboxes_update_from_conf (MNMailboxes * self)
if (changed)
self_list_changed(self);
}}
-#line 878 "mn-mailboxes.c"
+#line 829 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 261 "mn-mailboxes.gob"
+#line 249 "mn-mailboxes.gob"
static void
mn_mailboxes_new_cb (MNMailbox * mailbox, gpointer user_data)
-#line 884 "mn-mailboxes.c"
+#line 835 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::new_cb"
-#line 261 "mn-mailboxes.gob"
+#line 249 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 261 "mn-mailboxes.gob"
+#line 249 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 261 "mn-mailboxes.gob"
+#line 249 "mn-mailboxes.gob"
g_return_if_fail (user_data != NULL);
-#line 893 "mn-mailboxes.c"
+#line 844 "mn-mailboxes.c"
{
-#line 264 "mn-mailboxes.gob"
+#line 252 "mn-mailboxes.gob"
Self *self = user_data;
GSList *elem;
@@ -903,7 +854,6 @@ mn_mailboxes_new_cb (MNMailbox * mailbox, gpointer user_data)
mn_info(_("%s is unsupported: %s"), mn_mailbox_get_name(mailbox), mn_unsupported_mailbox_get_reason(MN_UNSUPPORTED_MAILBOX(mailbox)));
g_object_connect(mailbox,
- "signal::notify::has-new", self_notify_has_new_h, self,
"signal::messages-changed", self_messages_changed_h, self,
"signal::notify::error", self_notify_error_h, self,
"signal::notify::must-poll", self_notify_must_poll_h, self,
@@ -921,79 +871,54 @@ mn_mailboxes_new_cb (MNMailbox * mailbox, gpointer user_data)
else
g_object_unref(mailbox);
}}
-#line 925 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 294 "mn-mailboxes.gob"
-static void
-mn_mailboxes_notify_has_new_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-#line 931 "mn-mailboxes.c"
-{
-#define __GOB_FUNCTION__ "MN:Mailboxes::notify_has_new_h"
-#line 294 "mn-mailboxes.gob"
- g_return_if_fail (object != NULL);
-#line 294 "mn-mailboxes.gob"
- g_return_if_fail (G_IS_OBJECT (object));
-#line 294 "mn-mailboxes.gob"
- g_return_if_fail (pspec != NULL);
-#line 294 "mn-mailboxes.gob"
- g_return_if_fail (user_data != NULL);
-#line 942 "mn-mailboxes.c"
-{
-#line 298 "mn-mailboxes.gob"
-
- Self *self = user_data;
- MNMailbox *mailbox = MN_MAILBOX(object);
- 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));
-
- self_has_new_changed(self);
- }}
-#line 955 "mn-mailboxes.c"
+#line 875 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 309 "mn-mailboxes.gob"
+#line 281 "mn-mailboxes.gob"
static void
mn_mailboxes_messages_changed_h (MNMailbox * mailbox, gboolean has_new, gpointer user_data)
-#line 961 "mn-mailboxes.c"
+#line 881 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::messages_changed_h"
-#line 309 "mn-mailboxes.gob"
+#line 281 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 309 "mn-mailboxes.gob"
+#line 281 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 309 "mn-mailboxes.gob"
+#line 281 "mn-mailboxes.gob"
g_return_if_fail (user_data != NULL);
-#line 970 "mn-mailboxes.c"
+#line 890 "mn-mailboxes.c"
{
-#line 313 "mn-mailboxes.gob"
+#line 285 "mn-mailboxes.gob"
Self *self = user_data;
+ int n_messages;
+ n_messages = g_slist_length(mn_mailbox_get_messages(mailbox));
+ mn_info(ngettext("%s has %i new message", "%s has %i new messages", n_messages),
+ mn_mailbox_get_name(mailbox), n_messages);
+
self_messages_changed(self, has_new);
}}
-#line 978 "mn-mailboxes.c"
+#line 903 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 319 "mn-mailboxes.gob"
+#line 296 "mn-mailboxes.gob"
static void
mn_mailboxes_notify_error_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-#line 984 "mn-mailboxes.c"
+#line 909 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::notify_error_h"
-#line 319 "mn-mailboxes.gob"
+#line 296 "mn-mailboxes.gob"
g_return_if_fail (object != NULL);
-#line 319 "mn-mailboxes.gob"
+#line 296 "mn-mailboxes.gob"
g_return_if_fail (G_IS_OBJECT (object));
-#line 319 "mn-mailboxes.gob"
+#line 296 "mn-mailboxes.gob"
g_return_if_fail (pspec != NULL);
-#line 319 "mn-mailboxes.gob"
+#line 296 "mn-mailboxes.gob"
g_return_if_fail (user_data != NULL);
-#line 995 "mn-mailboxes.c"
+#line 920 "mn-mailboxes.c"
{
-#line 323 "mn-mailboxes.gob"
+#line 300 "mn-mailboxes.gob"
Self *self = user_data;
MNMailbox *mailbox = MN_MAILBOX(object);
@@ -1005,80 +930,69 @@ mn_mailboxes_notify_error_h (GObject * object, GParamSpec * pspec, gpointer user
self_error_changed(self);
}}
-#line 1009 "mn-mailboxes.c"
+#line 934 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 335 "mn-mailboxes.gob"
+#line 312 "mn-mailboxes.gob"
static void
mn_mailboxes_notify_must_poll_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-#line 1015 "mn-mailboxes.c"
+#line 940 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::notify_must_poll_h"
-#line 335 "mn-mailboxes.gob"
+#line 312 "mn-mailboxes.gob"
g_return_if_fail (object != NULL);
-#line 335 "mn-mailboxes.gob"
+#line 312 "mn-mailboxes.gob"
g_return_if_fail (G_IS_OBJECT (object));
-#line 335 "mn-mailboxes.gob"
+#line 312 "mn-mailboxes.gob"
g_return_if_fail (pspec != NULL);
-#line 335 "mn-mailboxes.gob"
+#line 312 "mn-mailboxes.gob"
g_return_if_fail (user_data != NULL);
-#line 1026 "mn-mailboxes.c"
+#line 951 "mn-mailboxes.c"
{
-#line 339 "mn-mailboxes.gob"
+#line 316 "mn-mailboxes.gob"
Self *self = user_data;
/* must-poll has possibly changed */
g_object_notify(G_OBJECT(self), "must-poll");
}}
-#line 1035 "mn-mailboxes.c"
+#line 960 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 346 "mn-mailboxes.gob"
+#line 323 "mn-mailboxes.gob"
static void
mn_mailboxes_install_timeout (MNMailboxes * self)
-#line 1041 "mn-mailboxes.c"
+#line 966 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::install_timeout"
-#line 346 "mn-mailboxes.gob"
+#line 323 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 346 "mn-mailboxes.gob"
+#line 323 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 1048 "mn-mailboxes.c"
+#line 973 "mn-mailboxes.c"
{
-#line 348 "mn-mailboxes.gob"
+#line 325 "mn-mailboxes.gob"
- int minutes;
- int seconds;
-
- if (selfp->timeout_id)
- {
- g_source_remove(selfp->timeout_id);
- selfp->timeout_id = 0;
- }
-
- minutes = eel_gconf_get_integer(MN_CONF_DELAY_MINUTES);
- seconds = eel_gconf_get_integer(MN_CONF_DELAY_SECONDS);
-
- if (minutes != 0 || seconds != 0)
- selfp->timeout_id = g_timeout_add(((minutes * 60) + seconds) * 1000,
- self_timeout_cb,
- self);
+ mn_source_remove(&selfp->timeout_id);
+ selfp->timeout_id = mn_timeout_add(MN_CONF_DELAY_MINUTES,
+ MN_CONF_DELAY_SECONDS,
+ self_timeout_cb,
+ self);
}}
-#line 1069 "mn-mailboxes.c"
+#line 983 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 367 "mn-mailboxes.gob"
+#line 333 "mn-mailboxes.gob"
static gboolean
mn_mailboxes_timeout_cb (gpointer data)
-#line 1075 "mn-mailboxes.c"
+#line 989 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::timeout_cb"
-#line 367 "mn-mailboxes.gob"
+#line 333 "mn-mailboxes.gob"
g_return_val_if_fail (data != NULL, (gboolean )0);
-#line 1080 "mn-mailboxes.c"
+#line 994 "mn-mailboxes.c"
{
-#line 369 "mn-mailboxes.gob"
+#line 335 "mn-mailboxes.gob"
Self *self = data;
@@ -1088,22 +1002,22 @@ mn_mailboxes_timeout_cb (gpointer data)
return TRUE; /* continue */
}}
-#line 1092 "mn-mailboxes.c"
+#line 1006 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 379 "mn-mailboxes.gob"
+#line 345 "mn-mailboxes.gob"
void
mn_mailboxes_check (MNMailboxes * self)
-#line 1098 "mn-mailboxes.c"
+#line 1012 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::check"
-#line 379 "mn-mailboxes.gob"
+#line 345 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 379 "mn-mailboxes.gob"
+#line 345 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 1105 "mn-mailboxes.c"
+#line 1019 "mn-mailboxes.c"
{
-#line 381 "mn-mailboxes.gob"
+#line 347 "mn-mailboxes.gob"
GSList *l;
@@ -1115,41 +1029,41 @@ mn_mailboxes_check (MNMailboxes * self)
mn_mailbox_check(mailbox);
}
}}
-#line 1119 "mn-mailboxes.c"
+#line 1033 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 393 "mn-mailboxes.gob"
+#line 359 "mn-mailboxes.gob"
GSList *
mn_mailboxes_get (MNMailboxes * self)
-#line 1125 "mn-mailboxes.c"
+#line 1039 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::get"
-#line 393 "mn-mailboxes.gob"
+#line 359 "mn-mailboxes.gob"
g_return_val_if_fail (self != NULL, (GSList * )0);
-#line 393 "mn-mailboxes.gob"
+#line 359 "mn-mailboxes.gob"
g_return_val_if_fail (MN_IS_MAILBOXES (self), (GSList * )0);
-#line 1132 "mn-mailboxes.c"
+#line 1046 "mn-mailboxes.c"
{
-#line 395 "mn-mailboxes.gob"
+#line 361 "mn-mailboxes.gob"
return selfp->list;
}}
-#line 1138 "mn-mailboxes.c"
+#line 1052 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 399 "mn-mailboxes.gob"
+#line 365 "mn-mailboxes.gob"
GSList *
mn_mailboxes_get_messages (MNMailboxes * self)
-#line 1144 "mn-mailboxes.c"
+#line 1058 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::get_messages"
-#line 399 "mn-mailboxes.gob"
+#line 365 "mn-mailboxes.gob"
g_return_val_if_fail (self != NULL, (GSList * )0);
-#line 399 "mn-mailboxes.gob"
+#line 365 "mn-mailboxes.gob"
g_return_val_if_fail (MN_IS_MAILBOXES (self), (GSList * )0);
-#line 1151 "mn-mailboxes.c"
+#line 1065 "mn-mailboxes.c"
{
-#line 401 "mn-mailboxes.gob"
+#line 367 "mn-mailboxes.gob"
GSList *messages = NULL;
GSList *l;
@@ -1165,24 +1079,24 @@ mn_mailboxes_get_messages (MNMailboxes * self)
return messages;
}}
-#line 1169 "mn-mailboxes.c"
+#line 1083 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 417 "mn-mailboxes.gob"
+#line 383 "mn-mailboxes.gob"
GSList *
mn_mailboxes_find (MNMailboxes * self, const char * text_uri)
-#line 1175 "mn-mailboxes.c"
+#line 1089 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::find"
-#line 417 "mn-mailboxes.gob"
+#line 383 "mn-mailboxes.gob"
g_return_val_if_fail (self != NULL, (GSList * )0);
-#line 417 "mn-mailboxes.gob"
+#line 383 "mn-mailboxes.gob"
g_return_val_if_fail (MN_IS_MAILBOXES (self), (GSList * )0);
-#line 417 "mn-mailboxes.gob"
+#line 383 "mn-mailboxes.gob"
g_return_val_if_fail (text_uri != NULL, (GSList * )0);
-#line 1184 "mn-mailboxes.c"
+#line 1098 "mn-mailboxes.c"
{
-#line 419 "mn-mailboxes.gob"
+#line 385 "mn-mailboxes.gob"
MNURI *uri;
GSList *elem;
@@ -1193,100 +1107,76 @@ mn_mailboxes_find (MNMailboxes * self, const char * text_uri)
return elem;
}}
-#line 1197 "mn-mailboxes.c"
+#line 1111 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 430 "mn-mailboxes.gob"
+#line 396 "mn-mailboxes.gob"
GSList *
mn_mailboxes_find_uri (MNMailboxes * self, MNURI * uri)
-#line 1203 "mn-mailboxes.c"
+#line 1117 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::find_uri"
-#line 430 "mn-mailboxes.gob"
+#line 396 "mn-mailboxes.gob"
g_return_val_if_fail (self != NULL, (GSList * )0);
-#line 430 "mn-mailboxes.gob"
+#line 396 "mn-mailboxes.gob"
g_return_val_if_fail (MN_IS_MAILBOXES (self), (GSList * )0);
-#line 430 "mn-mailboxes.gob"
+#line 396 "mn-mailboxes.gob"
g_return_val_if_fail (uri != NULL, (GSList * )0);
-#line 430 "mn-mailboxes.gob"
+#line 396 "mn-mailboxes.gob"
g_return_val_if_fail (MN_IS_URI (uri), (GSList * )0);
-#line 1214 "mn-mailboxes.c"
+#line 1128 "mn-mailboxes.c"
{
-#line 432 "mn-mailboxes.gob"
+#line 398 "mn-mailboxes.gob"
return g_slist_find_custom(selfp->list, uri, self_find_compare_func);
}}
-#line 1220 "mn-mailboxes.c"
+#line 1134 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 436 "mn-mailboxes.gob"
+#line 402 "mn-mailboxes.gob"
static int
mn_mailboxes_find_compare_func (gconstpointer a, gconstpointer b)
-#line 1226 "mn-mailboxes.c"
+#line 1140 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::find_compare_func"
{
-#line 438 "mn-mailboxes.gob"
+#line 404 "mn-mailboxes.gob"
MNMailbox *mailbox = (MNMailbox *) a;
MNURI *uri = (MNURI *) b;
return strcmp(mailbox->uri->text, uri->text);
}}
-#line 1237 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 445 "mn-mailboxes.gob"
-GSList *
-mn_mailboxes_conf_find (GSList * gconf_mailboxes, const char * text_uri)
-#line 1243 "mn-mailboxes.c"
-{
-#define __GOB_FUNCTION__ "MN:Mailboxes::conf_find"
-#line 445 "mn-mailboxes.gob"
- g_return_val_if_fail (text_uri != NULL, (GSList * )0);
-#line 1248 "mn-mailboxes.c"
-{
-#line 447 "mn-mailboxes.gob"
-
- MNURI *uri;
- GSList *elem;
-
- uri = mn_uri_new(text_uri);
- elem = self_conf_find_uri(gconf_mailboxes, uri);
- g_object_unref(uri);
-
- return elem;
- }}
-#line 1261 "mn-mailboxes.c"
+#line 1151 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 458 "mn-mailboxes.gob"
+#line 411 "mn-mailboxes.gob"
GSList *
mn_mailboxes_conf_find_uri (GSList * gconf_mailboxes, MNURI * uri)
-#line 1267 "mn-mailboxes.c"
+#line 1157 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::conf_find_uri"
-#line 458 "mn-mailboxes.gob"
+#line 411 "mn-mailboxes.gob"
g_return_val_if_fail (uri != NULL, (GSList * )0);
-#line 458 "mn-mailboxes.gob"
+#line 411 "mn-mailboxes.gob"
g_return_val_if_fail (MN_IS_URI (uri), (GSList * )0);
-#line 1274 "mn-mailboxes.c"
+#line 1164 "mn-mailboxes.c"
{
-#line 460 "mn-mailboxes.gob"
+#line 413 "mn-mailboxes.gob"
return g_slist_find_custom(gconf_mailboxes, uri, self_conf_find_compare_func);
}}
-#line 1280 "mn-mailboxes.c"
+#line 1170 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 464 "mn-mailboxes.gob"
+#line 417 "mn-mailboxes.gob"
static int
mn_mailboxes_conf_find_compare_func (gconstpointer a, gconstpointer b)
-#line 1286 "mn-mailboxes.c"
+#line 1176 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::conf_find_compare_func"
{
-#line 466 "mn-mailboxes.gob"
+#line 419 "mn-mailboxes.gob"
MNURI *uri_a;
MNURI *uri_b = (MNURI *) b;
@@ -1298,19 +1188,19 @@ mn_mailboxes_conf_find_compare_func (gconstpointer a, gconstpointer b)
return cmp;
}}
-#line 1302 "mn-mailboxes.c"
+#line 1192 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 478 "mn-mailboxes.gob"
+#line 431 "mn-mailboxes.gob"
MNMailboxes *
mn_mailboxes_new (void)
-#line 1308 "mn-mailboxes.c"
+#line 1198 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::new"
{
-#line 480 "mn-mailboxes.gob"
+#line 433 "mn-mailboxes.gob"
return GET_NEW;
}}
-#line 1316 "mn-mailboxes.c"
+#line 1206 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mailboxes.gob b/src/mn-mailboxes.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -69,17 +69,15 @@ class MN:Mailboxes from G:Object
{
/* disconnect signals */
g_object_disconnect(mailbox,
- "any_signal", self_notify_has_new_h, self,
- "any_signal", self_messages_changed_h, self,
- "any_signal", self_notify_error_h, self,
- "any_signal", self_notify_must_poll_h, self,
+ "any-signal", self_messages_changed_h, self,
+ "any-signal", self_notify_error_h, self,
+ "any-signal", self_notify_must_poll_h, self,
NULL);
/* emit the "removed" signal on the mailbox */
mn_mailbox_removed(mailbox);
- /* has-new, messages and error have possibly changed */
- self_has_new_changed(self);
+ /* messages and error have possibly changed */
self_messages_changed(self, FALSE);
self_error_changed(self);
}
@@ -100,25 +98,15 @@ class MN:Mailboxes from G:Object
}
/**
- * has-new-changed:
- * @self: the object which received the signal
- *
- * This signal gets emitted whenever the global has-new state has
- * possibly changed, either because one of the mailboxes has-new
- * property has changed, or because a mailbox has been removed from
- * the list.
- **/
- signal private NONE (NONE)
- void has_new_changed (self);
-
- /**
* messages-changed:
* @self: the object which received the signal
* @has_new: whether a new message has been received or not
*
* This signal gets emitted whenever a call to
- * mn_mailboxes_get_messages() would lead to a different list than
- * before the signal emission.
+ * mn_mailboxes_get_messages() may possibly lead to a different list
+ * than before the signal emission, either because one of the
+ * mailboxes messages property has changed, or because a mailbox has
+ * been removed from the list.
*
* Note: messages are only compared by id, therefore two messages
* having the same id and different data are not considered
@@ -178,7 +166,7 @@ class MN:Mailboxes from G:Object
private void
notify_delay_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data (check null))
{
@@ -191,7 +179,7 @@ class MN:Mailboxes from G:Object
private void
notify_mailboxes_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data (check null))
{
@@ -272,7 +260,6 @@ class MN:Mailboxes from G:Object
mn_info(_("%s is unsupported: %s"), mn_mailbox_get_name(mailbox), mn_unsupported_mailbox_get_reason(MN_UNSUPPORTED_MAILBOX(mailbox)));
g_object_connect(mailbox,
- "signal::notify::has-new", self_notify_has_new_h, self,
"signal::messages-changed", self_messages_changed_h, self,
"signal::notify::error", self_notify_error_h, self,
"signal::notify::must-poll", self_notify_must_poll_h, self,
@@ -292,27 +279,17 @@ class MN:Mailboxes from G:Object
}
private void
- notify_has_new_h (G:Object *object (check null type),
- GParamSpec *pspec (check null),
- gpointer user_data (check null))
- {
- Self *self = user_data;
- MNMailbox *mailbox = MN_MAILBOX(object);
- 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));
-
- self_has_new_changed(self);
- }
-
- private void
messages_changed_h (MN:Mailbox *mailbox (check null type),
gboolean has_new,
gpointer user_data (check null))
{
Self *self = user_data;
+ int n_messages;
+ n_messages = g_slist_length(mn_mailbox_get_messages(mailbox));
+ mn_info(ngettext("%s has %i new message", "%s has %i new messages", n_messages),
+ mn_mailbox_get_name(mailbox), n_messages);
+
self_messages_changed(self, has_new);
}
@@ -346,22 +323,11 @@ class MN:Mailboxes from G:Object
private void
install_timeout (self)
{
- int minutes;
- int seconds;
-
- if (selfp->timeout_id)
- {
- g_source_remove(selfp->timeout_id);
- selfp->timeout_id = 0;
- }
-
- minutes = eel_gconf_get_integer(MN_CONF_DELAY_MINUTES);
- seconds = eel_gconf_get_integer(MN_CONF_DELAY_SECONDS);
-
- if (minutes != 0 || seconds != 0)
- selfp->timeout_id = g_timeout_add(((minutes * 60) + seconds) * 1000,
- self_timeout_cb,
- self);
+ mn_source_remove(&selfp->timeout_id);
+ selfp->timeout_id = mn_timeout_add(MN_CONF_DELAY_MINUTES,
+ MN_CONF_DELAY_SECONDS,
+ self_timeout_cb,
+ self);
}
private gboolean
@@ -443,19 +409,6 @@ class MN:Mailboxes from G:Object
}
public GSList *
- conf_find (GSList *gconf_mailboxes, const char *text_uri (check null))
- {
- MNURI *uri;
- GSList *elem;
-
- uri = mn_uri_new(text_uri);
- elem = self_conf_find_uri(gconf_mailboxes, uri);
- g_object_unref(uri);
-
- return elem;
- }
-
- public GSList *
conf_find_uri (GSList *gconf_mailboxes, MN:URI *uri (check null type))
{
return g_slist_find_custom(gconf_mailboxes, uri, self_conf_find_compare_func);
diff --git a/src/mn-mailboxes.h b/src/mn-mailboxes.h
@@ -51,7 +51,6 @@ struct _MNMailboxesClass {
/*signal*/void (* mailbox_changed) (MNMailboxes * self, MNMailbox * mailbox);
/*signal*/void (* mailbox_removed) (MNMailboxes * self, MNMailbox * mailbox);
/*signal*/void (* list_changed) (MNMailboxes * self);
- /*signal*/void (* has_new_changed) (MNMailboxes * self);
/*signal*/void (* messages_changed) (MNMailboxes * self, gboolean has_new);
/*signal*/void (* error_changed) (MNMailboxes * self);
};
@@ -69,8 +68,6 @@ GSList * mn_mailboxes_find (MNMailboxes * self,
const char * text_uri);
GSList * mn_mailboxes_find_uri (MNMailboxes * self,
MNURI * uri);
-GSList * mn_mailboxes_conf_find (GSList * gconf_mailboxes,
- const char * text_uri);
GSList * mn_mailboxes_conf_find_uri (GSList * gconf_mailboxes,
MNURI * uri);
MNMailboxes * mn_mailboxes_new (void);
@@ -91,9 +88,6 @@ MNMailboxes * mn_mailboxes_new (void);
#define mn_mailboxes_connect__list_changed(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"list_changed",(GCallback) __extension__ ({void (* ___list_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___list_changed; }), (data))
#define mn_mailboxes_connect_after__list_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"list_changed",(GCallback) __extension__ ({void (* ___list_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___list_changed; }), (data))
#define mn_mailboxes_connect_data__list_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"list_changed",(GCallback) __extension__ ({void (* ___list_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___list_changed; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailboxes_connect__has_new_changed(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"has_new_changed",(GCallback) __extension__ ({void (* ___has_new_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___has_new_changed; }), (data))
-#define mn_mailboxes_connect_after__has_new_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"has_new_changed",(GCallback) __extension__ ({void (* ___has_new_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___has_new_changed; }), (data))
-#define mn_mailboxes_connect_data__has_new_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"has_new_changed",(GCallback) __extension__ ({void (* ___has_new_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___has_new_changed; }), (data), (destroy_data), (GConnectFlags)(flags))
#define mn_mailboxes_connect__messages_changed(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailboxes * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data))
#define mn_mailboxes_connect_after__messages_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailboxes * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data))
#define mn_mailboxes_connect_data__messages_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailboxes * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data), (destroy_data), (GConnectFlags)(flags))
@@ -113,9 +107,6 @@ MNMailboxes * mn_mailboxes_new (void);
#define mn_mailboxes_connect__list_changed(object,func,data) g_signal_connect(MN_MAILBOXES(object),"list_changed",(GCallback)(func),(data))
#define mn_mailboxes_connect_after__list_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"list_changed",(GCallback)(func),(data))
#define mn_mailboxes_connect_data__list_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"list_changed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailboxes_connect__has_new_changed(object,func,data) g_signal_connect(MN_MAILBOXES(object),"has_new_changed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_after__has_new_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"has_new_changed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_data__has_new_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"has_new_changed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
#define mn_mailboxes_connect__messages_changed(object,func,data) g_signal_connect(MN_MAILBOXES(object),"messages_changed",(GCallback)(func),(data))
#define mn_mailboxes_connect_after__messages_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"messages_changed",(GCallback)(func),(data))
#define mn_mailboxes_connect_data__messages_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"messages_changed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
diff --git a/src/mn-maildir-mailbox.c b/src/mn-maildir-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:09 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:26 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -30,11 +30,9 @@
#include "mn-mailbox-private.h"
#include "mn-vfs.h"
#include "mn-util.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
-#line 38 "mn-maildir-mailbox.c"
+#line 36 "mn-maildir-mailbox.c"
/* self casting macros */
#define SELF(x) MN_MAILDIR_MAILBOX(x)
#define SELF_CONST(x) MN_MAILDIR_MAILBOX_CONST(x)
@@ -51,7 +49,7 @@ typedef MNMaildirMailboxClass SelfClass;
/* here are local prototypes */
static void mn_maildir_mailbox_init (MNMaildirMailbox * o) G_GNUC_UNUSED;
static void mn_maildir_mailbox_class_init (MNMaildirMailboxClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_maildir_mailbox_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_maildir_mailbox_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static gboolean ___3_mn_maildir_mailbox_impl_is (MNMailbox * dummy, MNURI * uri) G_GNUC_UNUSED;
static void ___4_mn_maildir_mailbox_impl_check (MNMailbox * self) G_GNUC_UNUSED;
@@ -106,10 +104,10 @@ mn_maildir_mailbox_init (MNMaildirMailbox * o G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox::init"
}
#undef __GOB_FUNCTION__
-#line 37 "mn-maildir-mailbox.gob"
+#line 35 "mn-maildir-mailbox.gob"
static void
mn_maildir_mailbox_class_init (MNMaildirMailboxClass * class G_GNUC_UNUSED)
-#line 113 "mn-maildir-mailbox.c"
+#line 111 "mn-maildir-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox::class_init"
GObjectClass *g_object_class = (GObjectClass *)class;
@@ -117,29 +115,29 @@ mn_maildir_mailbox_class_init (MNMaildirMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-#line 42 "mn-maildir-mailbox.gob"
+#line 40 "mn-maildir-mailbox.gob"
g_object_class->constructor = ___2_mn_maildir_mailbox_constructor;
-#line 73 "mn-maildir-mailbox.gob"
+#line 69 "mn-maildir-mailbox.gob"
mn_mailbox_class->impl_is = ___3_mn_maildir_mailbox_impl_is;
-#line 99 "mn-maildir-mailbox.gob"
+#line 95 "mn-maildir-mailbox.gob"
mn_mailbox_class->impl_check = ___4_mn_maildir_mailbox_impl_check;
-#line 127 "mn-maildir-mailbox.c"
+#line 125 "mn-maildir-mailbox.c"
{
-#line 38 "mn-maildir-mailbox.gob"
+#line 36 "mn-maildir-mailbox.gob"
MN_MAILBOX_CLASS(class)->format = "Maildir";
-#line 133 "mn-maildir-mailbox.c"
+#line 131 "mn-maildir-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 42 "mn-maildir-mailbox.gob"
+#line 40 "mn-maildir-mailbox.gob"
static GObject *
-___2_mn_maildir_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 143 "mn-maildir-mailbox.c"
+___2_mn_maildir_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 141 "mn-maildir-mailbox.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -147,7 +145,7 @@ ___2_mn_maildir_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox::constructor"
{
-#line 44 "mn-maildir-mailbox.gob"
+#line 42 "mn-maildir-mailbox.gob"
GObject *object;
MNMailbox *self;
@@ -164,9 +162,7 @@ ___2_mn_maildir_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct
new_uri,
GNOME_VFS_MONITOR_DIRECTORY,
MN_MAILBOX_MONITOR_EVENT_DELETED
-#ifdef WITH_MIME
| MN_MAILBOX_MONITOR_EVENT_CHANGED
-#endif
| MN_MAILBOX_MONITOR_EVENT_CREATED);
gdk_flush();
@@ -176,25 +172,25 @@ ___2_mn_maildir_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct
return object;
}}
-#line 180 "mn-maildir-mailbox.c"
+#line 176 "mn-maildir-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 73 "mn-maildir-mailbox.gob"
+#line 69 "mn-maildir-mailbox.gob"
static gboolean
___3_mn_maildir_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
-#line 187 "mn-maildir-mailbox.c"
+#line 183 "mn-maildir-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->impl_is)? \
(* MN_MAILBOX_CLASS(parent_class)->impl_is)(___dummy,___uri): \
((gboolean )0))
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox::impl_is"
-#line 73 "mn-maildir-mailbox.gob"
+#line 69 "mn-maildir-mailbox.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 196 "mn-maildir-mailbox.c"
+#line 192 "mn-maildir-mailbox.c"
{
-#line 75 "mn-maildir-mailbox.gob"
+#line 71 "mn-maildir-mailbox.gob"
gboolean is = FALSE;
@@ -218,36 +214,33 @@ ___3_mn_maildir_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
return is;
}}
-#line 222 "mn-maildir-mailbox.c"
+#line 218 "mn-maildir-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 99 "mn-maildir-mailbox.gob"
+#line 95 "mn-maildir-mailbox.gob"
static void
___4_mn_maildir_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
-#line 229 "mn-maildir-mailbox.c"
+#line 225 "mn-maildir-mailbox.c"
#define PARENT_HANDLER(___self) \
{ if(MN_MAILBOX_CLASS(parent_class)->impl_check) \
(* MN_MAILBOX_CLASS(parent_class)->impl_check)(___self); }
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox::impl_check"
-#line 99 "mn-maildir-mailbox.gob"
+#line 95 "mn-maildir-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 99 "mn-maildir-mailbox.gob"
+#line 95 "mn-maildir-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 239 "mn-maildir-mailbox.c"
+#line 235 "mn-maildir-mailbox.c"
{
-#line 101 "mn-maildir-mailbox.gob"
+#line 97 "mn-maildir-mailbox.gob"
GnomeVFSURI *new_uri;
GnomeVFSResult result;
GnomeVFSResult close_result;
GnomeVFSDirectoryHandle *handle;
GnomeVFSFileInfo *file_info;
- gboolean has_new = FALSE;
-#ifdef WITH_MIME
GSList *messages = NULL;
-#endif
new_uri = gnome_vfs_uri_append_path(self->uri->vfs, "new");
result = gnome_vfs_directory_open_from_uri(&handle, new_uri, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
@@ -269,19 +262,11 @@ ___4_mn_maildir_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
while ((result = gnome_vfs_directory_read_next(handle, file_info)) == GNOME_VFS_OK)
if (file_info->name[0] != '.')
{
-#ifdef WITH_MIME
GnomeVFSURI *message_uri;
-#endif /* WITH_MIME */
- has_new = TRUE;
-
-#ifdef WITH_MIME
message_uri = gnome_vfs_uri_append_file_name(new_uri, file_info->name);
messages = g_slist_append(messages, mn_message_new_from_uri(self->uri, message_uri));
gnome_vfs_uri_unref(message_uri);
-#else /* WITH_MIME */
- break;
-#endif
}
gnome_vfs_file_info_unref(file_info);
close_result = gnome_vfs_directory_close(handle);
@@ -291,12 +276,7 @@ ___4_mn_maildir_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF)
{
if (close_result == GNOME_VFS_OK)
- {
- mn_mailbox_set_has_new(self, has_new);
-#ifdef WITH_MIME
- mn_mailbox_set_messages(self, messages);
-#endif /* WITH_MIME */
- }
+ mn_mailbox_set_messages(self, messages);
else
mn_mailbox_set_error(self, _("unable to close folder \"new\": %s"), gnome_vfs_result_to_string(close_result));
}
@@ -307,13 +287,11 @@ ___4_mn_maildir_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
gdk_flush();
GDK_THREADS_LEAVE();
-#ifdef WITH_MIME
mn_g_object_slist_free(messages);
-#endif
end:
gnome_vfs_uri_unref(new_uri);
}}
-#line 318 "mn-maildir-mailbox.c"
+#line 296 "mn-maildir-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-maildir-mailbox.gob b/src/mn-maildir-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -27,9 +27,7 @@ requires 2.0.10
#include "mn-mailbox-private.h"
#include "mn-vfs.h"
#include "mn-util.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
%}
class MN:Maildir:Mailbox from MN:Mailbox
@@ -40,7 +38,7 @@ class MN:Maildir:Mailbox from MN:Mailbox
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
MNMailbox *self;
@@ -57,9 +55,7 @@ class MN:Maildir:Mailbox from MN:Mailbox
new_uri,
GNOME_VFS_MONITOR_DIRECTORY,
MN_MAILBOX_MONITOR_EVENT_DELETED
-#ifdef WITH_MIME
| MN_MAILBOX_MONITOR_EVENT_CHANGED
-#endif
| MN_MAILBOX_MONITOR_EVENT_CREATED);
gdk_flush();
@@ -104,10 +100,7 @@ class MN:Maildir:Mailbox from MN:Mailbox
GnomeVFSResult close_result;
GnomeVFSDirectoryHandle *handle;
GnomeVFSFileInfo *file_info;
- gboolean has_new = FALSE;
-#ifdef WITH_MIME
GSList *messages = NULL;
-#endif
new_uri = gnome_vfs_uri_append_path(self->uri->vfs, "new");
result = gnome_vfs_directory_open_from_uri(&handle, new_uri, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
@@ -129,19 +122,11 @@ class MN:Maildir:Mailbox from MN:Mailbox
while ((result = gnome_vfs_directory_read_next(handle, file_info)) == GNOME_VFS_OK)
if (file_info->name[0] != '.')
{
-#ifdef WITH_MIME
GnomeVFSURI *message_uri;
-#endif /* WITH_MIME */
- has_new = TRUE;
-
-#ifdef WITH_MIME
message_uri = gnome_vfs_uri_append_file_name(new_uri, file_info->name);
messages = g_slist_append(messages, mn_message_new_from_uri(self->uri, message_uri));
gnome_vfs_uri_unref(message_uri);
-#else /* WITH_MIME */
- break;
-#endif
}
gnome_vfs_file_info_unref(file_info);
close_result = gnome_vfs_directory_close(handle);
@@ -151,12 +136,7 @@ class MN:Maildir:Mailbox from MN:Mailbox
if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF)
{
if (close_result == GNOME_VFS_OK)
- {
- mn_mailbox_set_has_new(self, has_new);
-#ifdef WITH_MIME
- mn_mailbox_set_messages(self, messages);
-#endif /* WITH_MIME */
- }
+ mn_mailbox_set_messages(self, messages);
else
mn_mailbox_set_error(self, _("unable to close folder \"new\": %s"), gnome_vfs_result_to_string(close_result));
}
@@ -167,9 +147,7 @@ class MN:Maildir:Mailbox from MN:Mailbox
gdk_flush();
GDK_THREADS_LEAVE();
-#ifdef WITH_MIME
mn_g_object_slist_free(messages);
-#endif
end:
gnome_vfs_uri_unref(new_uri);
diff --git a/src/mn-main-window.c b/src/mn-main-window.c
@@ -0,0 +1,1007 @@
+/*
+ * Copyright (C) 2005 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 <eel/eel.h>
+#include "egg-editable-toolbar.h"
+#include "egg-toolbar-editor.h"
+#include "mn-util.h"
+#include "mn-stock.h"
+#include "mn-shell.h"
+#include "mn-conf.h"
+#include "mn-properties-dialog.h"
+#include "mn-summary-popup.h"
+#include "mn-message-view.h"
+
+/*** cpp *********************************************************************/
+
+#define STATUS_PUSH(cid, str) \
+ gtk_statusbar_push(GTK_STATUSBAR(self.statusbar), (cid), (str))
+#define STATUS_POP(cid) \
+ gtk_statusbar_pop(GTK_STATUSBAR(self.statusbar), (cid))
+#define GET_ACTION(name) \
+ gtk_action_group_get_action(self.action_group, (name))
+#define FULLSCREEN \
+ (self.leave_fullscreen_popup != NULL)
+
+/*** types *******************************************************************/
+
+typedef struct
+{
+ GtkWidget *window;
+
+ GtkWidget *menubar;
+ GtkWidget *toolbar;
+ GtkWidget *statusbar;
+
+ GtkWidget *scrolled;
+ GtkWidget *message_view;
+
+ GtkWidget *edit_toolbars_dialog;
+ GtkWidget *edit_toolbars_editor;
+
+ GtkUIManager *ui_manager;
+ GtkActionGroup *action_group;
+
+ EggToolbarsModel *toolbars_model;
+ char *toolbars_file;
+ unsigned int toolbars_model_save_idle_id;
+
+ GSList *transients;
+ unsigned int help_cid;
+ unsigned int count_cid;
+
+ GtkWidget *leave_fullscreen_popup;
+ gboolean leave_fullscreen_popup_visible;
+ unsigned int leave_fullscreen_timeout_id;
+} MainWindow;
+
+/*** variables ***************************************************************/
+
+static MainWindow self = { NULL };
+
+/*** actions *****************************************************************/
+
+static void mn_main_window_mail_reader_activate_h (void);
+static void mn_main_window_update_activate_h (void);
+static void mn_main_window_close_activate_h (void);
+static void mn_main_window_quit_activate_h (void);
+static void mn_main_window_edit_toolbars_activate_h (void);
+static void mn_main_window_preferences_activate_h (void);
+static void mn_main_window_help_contents_activate_h (void);
+static void mn_main_window_about_activate_h (void);
+
+static GtkActionEntry menu_entries[] = {
+ /* Toplevel */
+ { "Mail", NULL, N_("_Mail") },
+ { "Edit", NULL, N_("_Edit") },
+ { "View", NULL, N_("_View") },
+ { "Help", NULL, N_("_Help") },
+
+ /* Mail menu */
+ {
+ "MailMailReader",
+ MN_STOCK_MAIL_READER,
+ N_("_Mail Reader"),
+ "<control>M",
+ N_("Launch the mail reader"),
+ mn_main_window_mail_reader_activate_h
+ },
+ {
+ "MailUpdate",
+ GTK_STOCK_REFRESH,
+ N_("_Update"),
+ "<control>R", /* Reload */
+ N_("Update the mail status"),
+ mn_main_window_update_activate_h
+ },
+ {
+ "MailClose",
+ GTK_STOCK_CLOSE,
+ N_("_Close"),
+ "<control>W",
+ N_("Close this window"),
+ mn_main_window_close_activate_h
+ },
+ {
+ "MailQuit",
+ GTK_STOCK_QUIT,
+ N_("_Quit"),
+ "<control>Q",
+ N_("Quit Mail Notification"),
+ mn_main_window_quit_activate_h
+ },
+
+ /* Edit menu */
+ {
+ "EditToolbars",
+ NULL,
+ N_("_Toolbars"),
+ NULL,
+ N_("Customize the toolbars"),
+ mn_main_window_edit_toolbars_activate_h
+ },
+ {
+ "EditPreferences",
+ GTK_STOCK_PREFERENCES,
+ N_("_Preferences"),
+ NULL,
+ N_("Configure Mail Notification"),
+ mn_main_window_preferences_activate_h
+ },
+
+ /* View menu */
+ {
+ "ViewToolbarsStyle",
+ NULL,
+ N_("Toolbars Styl_e"),
+ NULL,
+ N_("Customize the toolbars style"),
+ NULL
+ },
+
+ /* Help menu */
+ {
+ "HelpContents",
+ GTK_STOCK_HELP,
+ N_("_Contents"),
+ "F1",
+ N_("Display help"),
+ mn_main_window_help_contents_activate_h,
+ },
+ {
+ "HelpAbout",
+ GNOME_STOCK_ABOUT,
+ N_("_About"),
+ NULL,
+ N_("Display credits"),
+ mn_main_window_about_activate_h
+ }
+};
+
+static GtkToggleActionEntry toggle_entries[] = {
+ /* View menu */
+ {
+ "ViewToolbars",
+ NULL,
+ N_("_Toolbars"),
+ NULL,
+ N_("Show or hide the toolbars"),
+ NULL,
+ FALSE
+ },
+ {
+ "ViewStatusbar",
+ NULL,
+ N_("_Statusbar"),
+ NULL,
+ N_("Show or hide the statusbar"),
+ NULL,
+ FALSE
+ }
+};
+
+static GtkRadioActionEntry toolbars_style_entries[] = {
+ /* View menu */
+ {
+ "ViewToolbarsStyleDesktopDefault",
+ NULL,
+ N_("_Desktop Default"),
+ NULL,
+ N_("Set the toolbars style to the desktop default setting"),
+ MN_TOOLBAR_STYLE_DESKTOP_DEFAULT
+ },
+ {
+ "ViewToolbarsStyleIconsOnly",
+ NULL,
+ N_("I_cons Only"),
+ NULL,
+ N_("Only display the toolbars icons"),
+ MN_TOOLBAR_STYLE_ICONS
+ },
+ {
+ "ViewToolbarsStyleTextOnly",
+ NULL,
+ N_("_Text Only"),
+ NULL,
+ N_("Only display the toolbars text"),
+ MN_TOOLBAR_STYLE_TEXT
+ },
+ {
+ "ViewToolbarsStyleTextBelowIcons",
+ NULL,
+ N_("Text Belo_w Icons"),
+ NULL,
+ N_("Display the toolbars text below the icons"),
+ MN_TOOLBAR_STYLE_BOTH
+ },
+ {
+ "ViewToolbarsStyleTextBesideIcons",
+ NULL,
+ N_("Text Be_side Icons"),
+ NULL,
+ N_("Display the toolbars text beside the icons"),
+ MN_TOOLBAR_STYLE_BOTH_HORIZ
+ }
+};
+
+/*** functions ***************************************************************/
+
+static void mn_main_window_transient_weak_notify_cb (gpointer data,
+ GObject *former_object);
+
+static void mn_main_window_weak_notify_cb (gpointer data,
+ GObject *former_object);
+
+static void mn_main_window_notify_mail_reader_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
+
+static void mn_main_window_update_messages (void);
+static void mn_main_window_update_sensitivity (void);
+
+static void mn_main_window_create_toolbars_model (gboolean use_dot_file);
+
+static void mn_main_window_ui_manager_connect_proxy_h (GtkUIManager *manager,
+ GtkAction *action,
+ GtkWidget *proxy,
+ gpointer user_data);
+static void mn_main_window_ui_manager_disconnect_proxy_h (GtkUIManager *manager,
+ GtkAction *action,
+ GtkWidget *proxy,
+ gpointer user_data);
+
+static void mn_main_window_menu_item_select_h (GtkMenuItem *item,
+ gpointer user_data);
+static void mn_main_window_menu_item_deselect_h (GtkMenuItem *item,
+ gpointer user_data);
+
+static void mn_main_window_link_view_action (GtkToggleAction *action, GCallback cb);
+
+static void mn_main_window_update_toolbars_visibility (void);
+static void mn_main_window_update_statusbar_visibility (void);
+static void mn_main_window_update_toolbars_style (void);
+
+static void mn_main_window_toolbars_model_save_changes (void);
+static gboolean mn_main_window_toolbars_model_save_changes_cb (gpointer data);
+
+static void mn_main_window_toolbars_model_update_flags_and_save_changes (void);
+
+static void mn_main_window_edit_toolbars_create_editor (void);
+static void mn_main_window_edit_toolbars_weak_notify_cb (gpointer data,
+ GObject *former_object);
+
+static void mn_main_window_fullscreen (void);
+static void mn_main_window_unfullscreen (void);
+
+static gboolean mn_main_window_leave_fullscreen_timeout_cb (gpointer data);
+
+static gboolean mn_main_window_leave_fullscreen_enter_notify_event_h (GtkWidget *widget,
+ GdkEventCrossing *event,
+ gpointer user_data);
+static gboolean mn_main_window_leave_fullscreen_leave_notify_event_h (GtkWidget *widget,
+ GdkEventCrossing *event,
+ gpointer user_data);
+
+static void mn_main_window_update_leave_fullscreen_popup_position (void);
+
+static gboolean mn_main_window_fullscreen_key_press_event_h (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer user_data);
+static void mn_main_window_fullscreen_menubar_deactivate_h (GtkMenuShell *menushell,
+ gpointer user_data);
+
+/*** implementation **********************************************************/
+
+void
+mn_main_window_display (void)
+{
+ GError *err = NULL;
+ GtkAccelGroup *accel_group;
+ GSList *l;
+
+ g_return_if_fail(mn_shell != NULL);
+
+ if (self.window)
+ {
+ gtk_window_present(GTK_WINDOW(self.window));
+ return;
+ }
+
+ /* we don't need the popup anymore */
+ mn_summary_popup_destroy();
+
+ self.ui_manager = gtk_ui_manager_new();
+
+ g_object_connect(self.ui_manager,
+ "signal::connect-proxy", mn_main_window_ui_manager_connect_proxy_h, NULL,
+ "signal::disconnect-proxy", mn_main_window_ui_manager_disconnect_proxy_h, NULL,
+ NULL);
+
+ self.action_group = gtk_action_group_new("MainWindowActions");
+ gtk_action_group_set_translation_domain(self.action_group, NULL);
+
+ gtk_action_group_add_actions(self.action_group,
+ menu_entries,
+ G_N_ELEMENTS(menu_entries),
+ NULL);
+ gtk_action_group_add_toggle_actions(self.action_group,
+ toggle_entries,
+ G_N_ELEMENTS(toggle_entries),
+ NULL);
+ gtk_action_group_add_radio_actions(self.action_group,
+ toolbars_style_entries,
+ G_N_ELEMENTS(toolbars_style_entries),
+ -1,
+ G_CALLBACK(mn_main_window_update_toolbars_style),
+ NULL);
+ gtk_ui_manager_insert_action_group(self.ui_manager, self.action_group, 0);
+
+ g_object_set(G_OBJECT(GET_ACTION("MailMailReader")),
+ "is-important", TRUE,
+ NULL);
+
+ if (! gtk_ui_manager_add_ui_from_file(self.ui_manager, MN_INTERFACE_FILE("menus.xml"), &err))
+ {
+ g_critical(_("unable to load menus.xml: %s"), err->message);
+ g_error_free(err);
+ }
+
+ self.toolbars_file = g_build_filename(mn_conf_dot_dir, "toolbars.xml", NULL);
+ mn_main_window_create_toolbars_model(TRUE);
+
+ mn_create_interface(MN_INTERFACE_FILE("main.glade"),
+ "window", &self.window,
+ "menubar", &self.menubar,
+ "toolbar", &self.toolbar,
+ "statusbar", &self.statusbar,
+ "scrolled", &self.scrolled,
+ NULL);
+ g_object_weak_ref(G_OBJECT(self.window), mn_main_window_weak_notify_cb, NULL);
+
+ /*
+ * Glade forces an useless viewport into the scrolled window if we
+ * use a custom widget, so we don't.
+ */
+ self.message_view = mn_message_view_new(FALSE, TRUE);
+ gtk_widget_set_name(self.message_view, "mn-message-view");
+ gtk_container_set_border_width(GTK_CONTAINER(self.message_view), 12);
+ gtk_container_add(GTK_CONTAINER(self.scrolled), self.message_view);
+ gtk_widget_show(self.message_view);
+
+ accel_group = gtk_ui_manager_get_accel_group(self.ui_manager);
+ gtk_window_add_accel_group(GTK_WINDOW(self.window), accel_group);
+
+ /*
+ * ~/.gnome2/accels/mail-notification is automatically loaded by the
+ * libgnomeui module, we just need to save it ourselves.
+ */
+ g_signal_connect(accel_group, "accel-changed", G_CALLBACK(gnome_accelerators_sync), NULL);
+
+ self.help_cid = gtk_statusbar_get_context_id(GTK_STATUSBAR(self.statusbar), _("Help messages"));
+ self.count_cid = gtk_statusbar_get_context_id(GTK_STATUSBAR(self.statusbar), _("Count messages"));
+
+ mn_conf_link(self.window, MN_CONF_MAIN_WINDOW_DIMENSIONS,
+ GET_ACTION("ViewToolbars"), MN_CONF_MAIN_WINDOW_VIEW_TOOLBARS,
+ GET_ACTION("ViewStatusbar"), MN_CONF_MAIN_WINDOW_VIEW_STATUSBAR,
+ GET_ACTION("ViewToolbarsStyleDesktopDefault"), MN_CONF_MAIN_WINDOW_TOOLBARS_STYLE, MN_TYPE_TOOLBAR_STYLE,
+ NULL);
+
+ mn_main_window_link_view_action(GTK_TOGGLE_ACTION(GET_ACTION("ViewToolbars")), mn_main_window_update_toolbars_visibility);
+ mn_main_window_link_view_action(GTK_TOGGLE_ACTION(GET_ACTION("ViewStatusbar")), mn_main_window_update_statusbar_visibility);
+
+ mn_main_window_update_messages();
+ mn_main_window_update_sensitivity();
+
+ mn_conf_notification_add(self.window,
+ MN_CONF_COMMANDS_MAIL_READER_NAMESPACE,
+ mn_main_window_notify_mail_reader_cb,
+ NULL);
+ mn_g_object_connect(self.window,
+ mn_shell->mailboxes,
+ "signal::notify::must-poll", mn_main_window_update_sensitivity, NULL,
+ "signal::messages-changed", mn_main_window_update_messages, NULL,
+ NULL);
+
+ gtk_widget_grab_focus(self.message_view);
+ gtk_widget_show(self.window);
+
+ MN_LIST_FOREACH(l, self.transients)
+ {
+ GtkWindow *window = l->data;
+ gtk_window_set_transient_for(window, GTK_WINDOW(self.window));
+ }
+}
+
+gboolean
+mn_main_window_is_displayed (void)
+{
+ return self.window != NULL;
+}
+
+void
+mn_main_window_add_transient (GtkWindow *window)
+{
+ self.transients = g_slist_append(self.transients, window);
+ g_object_weak_ref(G_OBJECT(window), mn_main_window_transient_weak_notify_cb, NULL);
+
+ if (self.window)
+ gtk_window_set_transient_for(window, GTK_WINDOW(self.window));
+}
+
+static void
+mn_main_window_transient_weak_notify_cb (gpointer data, GObject *former_object)
+{
+ self.transients = g_slist_remove(self.transients, former_object);
+}
+
+static void
+mn_main_window_weak_notify_cb (gpointer data, GObject *former_object)
+{
+ g_object_unref(self.ui_manager);
+ self.ui_manager = NULL;
+
+ g_object_unref(self.action_group);
+ self.action_group = NULL;
+
+ g_object_unref(self.toolbars_model);
+ self.toolbars_model = NULL;
+
+ g_free(self.toolbars_file);
+ self.toolbars_file = NULL;
+
+ mn_source_remove(&self.toolbars_model_save_idle_id);
+
+ self.window = NULL;
+ self.toolbar = NULL;
+}
+
+static void
+mn_main_window_notify_mail_reader_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
+{
+ GDK_THREADS_ENTER();
+ mn_main_window_update_sensitivity();
+ GDK_THREADS_LEAVE();
+}
+
+static void
+mn_main_window_update_messages (void)
+{
+ GSList *messages;
+ int count;
+
+ messages = mn_mailboxes_get_messages(mn_shell->mailboxes);
+ count = g_slist_length(messages);
+
+ mn_message_view_set_messages(MN_MESSAGE_VIEW(self.message_view), messages);
+ mn_g_object_slist_free(messages);
+
+ if (count > 0)
+ {
+ char *status;
+
+ status = g_strdup_printf(ngettext("%i new message", "%i new messages", count), count);
+ STATUS_PUSH(self.count_cid, status);
+ g_free(status);
+ }
+ else
+ STATUS_POP(self.count_cid);
+}
+
+static void
+mn_main_window_update_sensitivity (void)
+{
+ g_object_set(GET_ACTION("MailMailReader"),
+ "sensitive", mn_conf_has_command(MN_CONF_COMMANDS_MAIL_READER_NAMESPACE),
+ NULL);
+ g_object_set(GET_ACTION("MailUpdate"),
+ "sensitive", mn_mailboxes_get_must_poll(mn_shell->mailboxes),
+ NULL);
+}
+
+static void
+mn_main_window_create_toolbars_model (gboolean use_dot_file)
+{
+ if (self.toolbars_model)
+ g_object_unref(self.toolbars_model);
+
+ self.toolbars_model = egg_toolbars_model_new();
+
+ g_object_connect(self.toolbars_model,
+ "signal-after::item-added", mn_main_window_toolbars_model_save_changes, NULL,
+ "signal-after::item-removed", mn_main_window_toolbars_model_save_changes, NULL,
+ "signal-after::toolbar-added", mn_main_window_toolbars_model_update_flags_and_save_changes, NULL,
+ "signal-after::toolbar-removed", mn_main_window_toolbars_model_update_flags_and_save_changes, NULL,
+ NULL);
+
+ if (! use_dot_file || ! egg_toolbars_model_load(self.toolbars_model, self.toolbars_file))
+ {
+ if (! egg_toolbars_model_load(self.toolbars_model, MN_INTERFACE_FILE("toolbars.xml")))
+ g_critical(_("unable to load toolbars.xml"));
+ }
+
+ if (egg_toolbars_model_n_toolbars(self.toolbars_model) < 1)
+ egg_toolbars_model_add_toolbar(self.toolbars_model, 0, "DefaultToolbar");
+
+ if (self.toolbar)
+ egg_editable_toolbar_set_model(EGG_EDITABLE_TOOLBAR(self.toolbar), self.toolbars_model);
+}
+
+static void
+mn_main_window_ui_manager_connect_proxy_h (GtkUIManager *manager,
+ GtkAction *action,
+ GtkWidget *proxy,
+ gpointer user_data)
+{
+ if (GTK_IS_MENU_ITEM(proxy))
+ g_object_connect(proxy,
+ "signal::select", mn_main_window_menu_item_select_h, NULL,
+ "signal::deselect", mn_main_window_menu_item_deselect_h, NULL,
+ NULL);
+}
+
+static void
+mn_main_window_ui_manager_disconnect_proxy_h (GtkUIManager *manager,
+ GtkAction *action,
+ GtkWidget *proxy,
+ gpointer user_data)
+{
+ if (GTK_IS_MENU_ITEM(proxy))
+ g_object_disconnect(proxy,
+ "any-signal", mn_main_window_menu_item_select_h, NULL,
+ "any-signal", mn_main_window_menu_item_deselect_h, NULL,
+ NULL);
+}
+
+static void
+mn_main_window_menu_item_select_h (GtkMenuItem *item, gpointer user_data)
+{
+ GtkAction *action;
+ char *tooltip = NULL;
+
+ action = g_object_get_data(G_OBJECT(item), "gtk-action");
+ g_return_if_fail(action != NULL);
+
+ g_object_get(G_OBJECT(action), "tooltip", &tooltip, NULL);
+ if (tooltip)
+ {
+ STATUS_PUSH(self.help_cid, tooltip);
+ g_free(tooltip);
+ }
+}
+
+static void
+mn_main_window_menu_item_deselect_h (GtkMenuItem *item, gpointer user_data)
+{
+ STATUS_POP(self.help_cid);
+}
+
+static void
+mn_main_window_update_toolbars_style (void)
+{
+ MNToolbarStyle style;
+ EggTbModelFlags flag;
+ int n_toolbars;
+ int i;
+
+ style = gtk_radio_action_get_current_value(GTK_RADIO_ACTION(GET_ACTION("ViewToolbarsStyleDesktopDefault")));
+ if (style == MN_TOOLBAR_STYLE_DESKTOP_DEFAULT)
+ g_object_get(gtk_widget_get_settings(self.toolbar), "gtk-toolbar-style", &style, NULL);
+
+ if (FULLSCREEN && style == MN_TOOLBAR_STYLE_BOTH)
+ style = MN_TOOLBAR_STYLE_ICONS;
+
+ flag = 1 << (style + 1);
+ n_toolbars = egg_toolbars_model_n_toolbars(self.toolbars_model);
+
+ for (i = 0; i < n_toolbars; i++)
+ {
+ EggTbModelFlags flags;
+
+ flags = egg_toolbars_model_get_flags(self.toolbars_model, i);
+ flags &= ~ (EGG_TB_MODEL_ICONS_ONLY
+ | EGG_TB_MODEL_TEXT_ONLY
+ | EGG_TB_MODEL_ICONS_TEXT
+ | EGG_TB_MODEL_ICONS_TEXT_HORIZ);
+ flags |= flag;
+ egg_toolbars_model_set_flags(self.toolbars_model, i, flags);
+ }
+}
+
+static void
+mn_main_window_toolbars_model_save_changes (void)
+{
+ if (! self.toolbars_model_save_idle_id)
+ self.toolbars_model_save_idle_id = g_idle_add(mn_main_window_toolbars_model_save_changes_cb, NULL);
+}
+
+static gboolean
+mn_main_window_toolbars_model_save_changes_cb (gpointer data)
+{
+ GDK_THREADS_ENTER();
+ egg_toolbars_model_save(self.toolbars_model, self.toolbars_file, "1.0");
+ self.toolbars_model_save_idle_id = 0;
+ GDK_THREADS_LEAVE();
+
+ return FALSE; /* remove */
+}
+
+static void
+mn_main_window_toolbars_model_update_flags_and_save_changes (void)
+{
+ int i;
+ int n_toolbars;
+ EggTbModelFlags flag = EGG_TB_MODEL_ACCEPT_ITEMS_ONLY;
+
+ n_toolbars = egg_toolbars_model_n_toolbars(self.toolbars_model);
+
+ if (n_toolbars <= 1)
+ flag |= EGG_TB_MODEL_NOT_REMOVABLE;
+
+ for (i = 0; i < n_toolbars; i++)
+ {
+ EggTbModelFlags flags;
+
+ flags = egg_toolbars_model_get_flags(self.toolbars_model, i);
+ flags &= ~EGG_TB_MODEL_NOT_REMOVABLE;
+ flags |= flag;
+ egg_toolbars_model_set_flags(self.toolbars_model, i, flags);
+ }
+
+ mn_main_window_toolbars_model_save_changes();
+}
+
+static void
+mn_main_window_link_view_action (GtkToggleAction *action, GCallback cb)
+{
+ g_return_if_fail(GTK_IS_TOGGLE_ACTION(action));
+ g_return_if_fail(cb != NULL);
+
+ cb();
+ g_signal_connect(action, "toggled", cb, NULL);
+}
+
+static void
+mn_main_window_update_toolbars_visibility (void)
+{
+ g_object_set(G_OBJECT(self.toolbar), "visible", gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(GET_ACTION("ViewToolbars"))), NULL);
+}
+
+static void
+mn_main_window_update_statusbar_visibility (void)
+{
+ g_object_set(G_OBJECT(self.statusbar), "visible", ! FULLSCREEN && gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(GET_ACTION("ViewStatusbar"))), NULL);
+}
+
+static void
+mn_main_window_mail_reader_activate_h (void)
+{
+ mn_execute_command(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
+}
+
+static void
+mn_main_window_update_activate_h (void)
+{
+ mn_mailboxes_check(mn_shell->mailboxes);
+}
+
+static void
+mn_main_window_close_activate_h (void)
+{
+ gtk_widget_destroy(self.window);
+}
+
+static void
+mn_main_window_quit_activate_h (void)
+{
+ g_object_unref(mn_shell);
+}
+
+static void
+mn_main_window_edit_toolbars_activate_h (void)
+{
+ if (self.edit_toolbars_dialog)
+ {
+ gtk_window_present(GTK_WINDOW(self.edit_toolbars_dialog));
+ return;
+ }
+
+ mn_create_interface(MN_INTERFACE_FILE("edit-toolbars.glade"),
+ "dialog", &self.edit_toolbars_dialog,
+ NULL);
+
+ eel_add_weak_pointer(&self.edit_toolbars_dialog);
+ g_object_weak_ref(G_OBJECT(self.edit_toolbars_dialog), mn_main_window_edit_toolbars_weak_notify_cb, NULL);
+
+ gtk_window_set_transient_for(GTK_WINDOW(self.edit_toolbars_dialog), GTK_WINDOW(self.window));
+
+ mn_main_window_edit_toolbars_create_editor();
+ egg_editable_toolbar_set_edit_mode(EGG_EDITABLE_TOOLBAR(self.toolbar), TRUE);
+
+ mn_conf_link(self.edit_toolbars_dialog, MN_CONF_MAIN_WINDOW_EDIT_TOOLBARS_DIALOG, NULL);
+ gtk_widget_show(self.edit_toolbars_dialog);
+}
+
+static void
+mn_main_window_edit_toolbars_create_editor (void)
+{
+ g_return_if_fail(self.edit_toolbars_dialog != NULL);
+
+ if (self.edit_toolbars_editor)
+ gtk_widget_destroy(self.edit_toolbars_editor);
+
+ self.edit_toolbars_editor = egg_toolbar_editor_new(self.ui_manager, self.toolbars_model);
+ eel_add_weak_pointer(&self.edit_toolbars_editor);
+
+ gtk_container_set_border_width(GTK_CONTAINER(self.edit_toolbars_editor), 5);
+ gtk_box_set_spacing(GTK_BOX(self.edit_toolbars_editor), 6);
+
+ egg_toolbar_editor_load_actions(EGG_TOOLBAR_EDITOR(self.edit_toolbars_editor), MN_INTERFACE_FILE("toolbars.xml"));
+
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(self.edit_toolbars_dialog)->vbox), self.edit_toolbars_editor);
+ gtk_widget_show(self.edit_toolbars_editor);
+}
+
+static void
+mn_main_window_edit_toolbars_weak_notify_cb (gpointer data, GObject *former_object)
+{
+ egg_editable_toolbar_set_edit_mode(EGG_EDITABLE_TOOLBAR(self.toolbar), FALSE);
+}
+
+static void
+mn_main_window_preferences_activate_h (void)
+{
+ mn_properties_dialog_display();
+}
+
+static void
+mn_main_window_help_contents_activate_h (void)
+{
+ mn_display_help(GTK_WINDOW(self.window), "main-window");
+}
+
+static void
+mn_main_window_about_activate_h (void)
+{
+ mn_shell_display_about_dialog(mn_shell);
+}
+
+static void
+mn_main_window_fullscreen (void)
+{
+ GtkWidget *button;
+
+ self.leave_fullscreen_popup = gtk_window_new(GTK_WINDOW_POPUP);
+ eel_add_weak_pointer(&self.leave_fullscreen_popup);
+
+ button = gtk_button_new_from_stock(MN_STOCK_LEAVE_FULLSCREEN);
+ gtk_container_add(GTK_CONTAINER(self.leave_fullscreen_popup), button);
+ gtk_widget_show(button);
+
+ g_signal_connect_swapped(button, "clicked", G_CALLBACK(gtk_window_unfullscreen), self.window);
+
+ gtk_widget_hide(self.menubar);
+ mn_main_window_update_toolbars_style();
+ mn_main_window_update_statusbar_visibility();
+
+ self.leave_fullscreen_popup_visible = TRUE;
+ mn_main_window_update_leave_fullscreen_popup_position();
+ gtk_widget_show(self.leave_fullscreen_popup);
+
+ g_signal_connect(gdk_screen_get_default(),
+ "size-changed",
+ G_CALLBACK(mn_main_window_update_leave_fullscreen_popup_position),
+ NULL);
+ g_signal_connect(self.window,
+ "key-press-event",
+ G_CALLBACK(mn_main_window_fullscreen_key_press_event_h),
+ NULL);
+
+ g_object_connect(self.leave_fullscreen_popup,
+ "signal::enter-notify-event", mn_main_window_leave_fullscreen_enter_notify_event_h, NULL,
+ "signal::leave-notify-event", mn_main_window_leave_fullscreen_leave_notify_event_h, NULL,
+ NULL);
+
+ self.leave_fullscreen_timeout_id = g_timeout_add(5000, mn_main_window_leave_fullscreen_timeout_cb, NULL);
+}
+
+static void
+mn_main_window_unfullscreen (void)
+{
+ g_signal_handlers_disconnect_by_func(gdk_screen_get_default(), mn_main_window_update_leave_fullscreen_popup_position, NULL);
+ g_signal_handlers_disconnect_by_func(self.window, mn_main_window_fullscreen_key_press_event_h, NULL);
+
+ mn_source_remove(&self.leave_fullscreen_timeout_id);
+ gtk_widget_destroy(self.leave_fullscreen_popup);
+
+ gtk_widget_show(self.menubar);
+ mn_main_window_update_toolbars_style();
+ mn_main_window_update_statusbar_visibility();
+}
+
+static gboolean
+mn_main_window_leave_fullscreen_timeout_cb (gpointer data)
+{
+ GDK_THREADS_ENTER();
+
+ self.leave_fullscreen_popup_visible = FALSE;
+ mn_main_window_update_leave_fullscreen_popup_position();
+ self.leave_fullscreen_timeout_id = 0;
+
+ GDK_THREADS_LEAVE();
+
+ return FALSE; /* remove timeout */
+}
+
+static gboolean
+mn_main_window_leave_fullscreen_enter_notify_event_h (GtkWidget *widget,
+ GdkEventCrossing *event,
+ gpointer user_data)
+{
+ mn_source_remove(&self.leave_fullscreen_timeout_id);
+ self.leave_fullscreen_popup_visible = TRUE;
+ mn_main_window_update_leave_fullscreen_popup_position();
+
+ return FALSE; /* propagate event */
+}
+
+static gboolean
+mn_main_window_leave_fullscreen_leave_notify_event_h (GtkWidget *widget,
+ GdkEventCrossing *event,
+ gpointer user_data)
+{
+ mn_source_remove(&self.leave_fullscreen_timeout_id);
+ self.leave_fullscreen_timeout_id = g_timeout_add(5000, mn_main_window_leave_fullscreen_timeout_cb, NULL);
+
+ return FALSE; /* propagate event */
+}
+
+static void
+mn_main_window_update_leave_fullscreen_popup_position (void)
+{
+ GdkScreen *screen;
+ int monitor_num;
+ GdkRectangle screen_rect;
+ int popup_width;
+ int popup_height;
+ int y;
+
+ g_return_if_fail(self.leave_fullscreen_popup != NULL);
+
+ screen = gdk_screen_get_default();
+ monitor_num = gdk_screen_get_monitor_at_window(screen, GTK_WIDGET(self.window)->window);
+ gdk_screen_get_monitor_geometry(screen, monitor_num, &screen_rect);
+ gtk_window_get_size(GTK_WINDOW(self.leave_fullscreen_popup), &popup_width, &popup_height);
+
+ y = screen_rect.y;
+ if (! self.leave_fullscreen_popup_visible)
+ y -= popup_height - 2;
+
+ gtk_window_move(GTK_WINDOW(self.leave_fullscreen_popup), screen_rect.width - popup_width, y);
+}
+
+static gboolean
+mn_main_window_fullscreen_key_press_event_h (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer user_data)
+{
+ unsigned int modifiers = gtk_accelerator_get_default_mod_mask();
+
+ if (event->keyval == GDK_Escape && (event->state & modifiers) == 0)
+ {
+ gtk_window_unfullscreen(GTK_WINDOW(self.window));
+ return TRUE; /* do not propagate event */
+ }
+ else if (event->keyval == GDK_F10 && (event->state & modifiers) == 0)
+ {
+ g_signal_connect(self.menubar, "deactivate", G_CALLBACK(mn_main_window_fullscreen_menubar_deactivate_h), NULL);
+
+ gtk_widget_show(self.menubar);
+ gtk_menu_shell_select_first(GTK_MENU_SHELL(self.menubar), FALSE);
+
+ return TRUE; /* do not propagate event */
+ }
+ else
+ return FALSE; /* propagate event */
+}
+
+static void
+mn_main_window_fullscreen_menubar_deactivate_h (GtkMenuShell *menushell,
+ gpointer user_data)
+{
+ g_signal_handlers_disconnect_by_func(self.menubar, G_CALLBACK(mn_main_window_fullscreen_menubar_deactivate_h), NULL);
+ gtk_menu_shell_deselect(menushell);
+ gtk_widget_hide(self.menubar);
+}
+
+/* libglade callbacks */
+
+GtkWidget *
+mn_main_window_get_widget_cb (const char *widget_name,
+ const char *string1,
+ const char *string2,
+ int int1,
+ int int2)
+{
+ GtkWidget *widget;
+
+ widget = gtk_ui_manager_get_widget(self.ui_manager, string1);
+ g_return_val_if_fail(widget != NULL, NULL);
+
+ return widget;
+}
+
+GtkWidget *
+mn_main_window_toolbar_new_cb (void)
+{
+ GtkWidget *toolbar;
+
+ toolbar = egg_editable_toolbar_new_with_model(self.ui_manager, self.toolbars_model);
+ gtk_widget_show(toolbar);
+
+ return toolbar;
+}
+
+void
+mn_main_window_edit_toolbars_response_h (GtkDialog *dialog,
+ int response,
+ gpointer user_data)
+{
+ switch (response)
+ {
+ case GTK_RESPONSE_HELP:
+ mn_display_help(GTK_WINDOW(self.edit_toolbars_dialog), "main-window-edit-toolbars");
+ break;
+
+ case 1: /* use default */
+ /* recreate the model, discarding the dot file */
+ mn_main_window_create_toolbars_model(FALSE);
+ /* and recreate the editor, since the model has changed */
+ mn_main_window_edit_toolbars_create_editor();
+ break;
+
+ case 2: /* add toolbar */
+ egg_toolbars_model_add_toolbar(self.toolbars_model, -1, "UserCreated");
+ break;
+
+ case GTK_RESPONSE_CLOSE:
+ gtk_widget_destroy(self.edit_toolbars_dialog);
+ break;
+ }
+}
+
+gboolean
+mn_main_window_window_state_event_h (GtkWidget *widget,
+ GdkEventWindowState *event,
+ gpointer user_data)
+{
+ if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN)
+ {
+ if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)
+ mn_main_window_fullscreen();
+ else
+ mn_main_window_unfullscreen();
+ }
+
+ return FALSE; /* propagate event */
+}
diff --git a/src/mn-main-window.h b/src/mn-main-window.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2005 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_MAIN_WINDOW_H
+#define _MN_MAIN_WINDOW_H
+
+#include <gtk/gtk.h>
+
+void mn_main_window_display (void);
+gboolean mn_main_window_is_displayed (void);
+
+void mn_main_window_add_transient (GtkWindow *window);
+
+#endif /* _MN_MAIN_WINDOW_H */
diff --git a/src/mn-main.c b/src/mn-main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -109,8 +109,8 @@ mn_main_list_features (void)
#ifdef WITH_IPV6
ADD_FEATURE(features, "IPv6");
#endif
-#ifdef WITH_MIME
- ADD_FEATURE(features, "MIME");
+#ifdef WITH_GMAIL_TIMESTAMPS
+ ADD_FEATURE(features, _("Gmail timestamps"));
#endif
g_print(_("Compiled-in features: %s\n"), features->str);
@@ -158,13 +158,14 @@ int
main (int argc, char **argv)
{
gboolean arg_list_features = FALSE;
- gboolean arg_display_mail_summary = FALSE;
+ gboolean arg_display_main_window = FALSE;
gboolean arg_display_properties = FALSE;
gboolean arg_display_about = FALSE;
gboolean arg_close_popup = FALSE;
gboolean arg_update = FALSE;
gboolean arg_report = FALSE;
gboolean arg_unset_obsolete_configuration = FALSE;
+ gboolean arg_quit = FALSE;
const struct poptOption popt_options[] = {
{
"enable-info",
@@ -181,16 +182,16 @@ main (int argc, char **argv)
POPT_ARG_NONE,
&arg_list_features,
0,
- N_("List compiled-in features and exit"),
+ N_("List the compiled-in features"),
NULL
},
{
- "display-mail-summary",
+ "display-main-window",
'm',
POPT_ARG_NONE,
- &arg_display_mail_summary,
+ &arg_display_main_window,
0,
- N_("Display the mail summary dialog"),
+ N_("Display the main window"),
NULL
},
{
@@ -244,11 +245,21 @@ main (int argc, char **argv)
POPT_ARG_NONE,
&arg_unset_obsolete_configuration,
0,
- N_("Unset obsolete GConf configuration and exit"),
+ N_("Unset obsolete GConf configuration"),
+ NULL
+ },
+ {
+ "quit",
+ 'q',
+ POPT_ARG_NONE,
+ &arg_quit,
+ 0,
+ N_("Quit Mail Notification"),
NULL
},
POPT_TABLEEND
};
+ GdkPixbuf *icon;
BonoboGenericFactory *automation_factory;
GClosure *automation_factory_closure;
CORBA_Environment ev;
@@ -302,6 +313,13 @@ main (int argc, char **argv)
GDK_THREADS_ENTER();
+ icon = mn_pixbuf_new(MN_IMAGE_FILE(GNOMEPIXMAPSDIR, "mail-notification.png"));
+ if (icon)
+ {
+ gtk_window_set_default_icon(icon);
+ g_object_unref(icon);
+ }
+
mn_stock_init();
bonobo_activate();
@@ -319,64 +337,77 @@ main (int argc, char **argv)
if (CORBA_Object_is_nil(automation, &ev))
mn_fatal_error_dialog(NULL, _("Bonobo could not locate the automation object. Please check your Mail Notification installation."));
- if (result != Bonobo_ACTIVATION_REG_ALREADY_ACTIVE)
+ if (arg_quit)
{
- if (! gnome_vfs_init())
- mn_fatal_error_dialog(NULL, _("Unable to initialize the GnomeVFS library."));
-#ifdef WITH_MIME
- g_mime_init(0);
-#endif
-
- mn_conf_init();
- /*
- * Work around
- * http://bugzilla.gnome.org/show_bug.cgi?id=64764:
- * initialize our non GTK-based classes before any thread is
- * created.
- */
- mn_main_init_classes();
- mn_shell_new();
-
- if (! eel_gconf_get_boolean(MN_CONF_ALREADY_RUN))
+ if (result == Bonobo_ACTIVATION_REG_ALREADY_ACTIVE)
{
- if (! arg_display_properties)
- mn_shell_run_welcome(mn_shell);
- eel_gconf_set_boolean(MN_CONF_ALREADY_RUN, TRUE);
+ g_message(_("quitting Mail Notification"));
+ GNOME_MNAutomation_quit(automation, &ev);
}
+ else
+ g_message(_("Mail Notification is not running"));
}
-
- if (arg_display_mail_summary)
- GNOME_MNAutomation_displayMailSummary(automation, &ev);
- if (arg_display_properties)
- GNOME_MNAutomation_displayProperties(automation, &ev);
- if (arg_display_about)
- GNOME_MNAutomation_displayAbout(automation, &ev);
- if (arg_close_popup)
- GNOME_MNAutomation_closePopup(automation, &ev);
-
- if (result == Bonobo_ACTIVATION_REG_ALREADY_ACTIVE)
+ else
{
- if (arg_update)
+ if (result != Bonobo_ACTIVATION_REG_ALREADY_ACTIVE)
{
- g_message(_("updating the mail status"));
- GNOME_MNAutomation_update(automation, &ev);
+ if (! gnome_vfs_init())
+ mn_fatal_error_dialog(NULL, _("Unable to initialize the GnomeVFS library."));
+#ifdef WITH_MIME
+ g_mime_init(0);
+#endif
+
+ mn_conf_init();
+ /*
+ * Work around
+ * http://bugzilla.gnome.org/show_bug.cgi?id=64764:
+ * initialize our non GTK-based classes before any
+ * thread is created.
+ */
+ mn_main_init_classes();
+ mn_shell_new();
+
+ if (! eel_gconf_get_boolean(MN_CONF_ALREADY_RUN))
+ {
+ if (! arg_display_properties)
+ mn_shell_display_welcome_dialog(mn_shell);
+ eel_gconf_set_boolean(MN_CONF_ALREADY_RUN, TRUE);
+ }
}
- if (arg_report)
+
+ if (arg_display_main_window)
+ GNOME_MNAutomation_displayMainWindow(automation, &ev);
+ if (arg_display_properties)
+ GNOME_MNAutomation_displayProperties(automation, &ev);
+ if (arg_display_about)
+ GNOME_MNAutomation_displayAbout(automation, &ev);
+ if (arg_close_popup)
+ GNOME_MNAutomation_closePopup(automation, &ev);
+
+ if (result == Bonobo_ACTIVATION_REG_ALREADY_ACTIVE)
{
- CORBA_char *report;
-
- GNOME_MNAutomation_report(automation, &report, &ev);
- g_print("%s", report);
- CORBA_free(report);
+ if (arg_update)
+ {
+ g_message(_("updating the mail status"));
+ GNOME_MNAutomation_update(automation, &ev);
+ }
+ if (arg_report)
+ {
+ CORBA_char *report;
+
+ GNOME_MNAutomation_report(automation, &report, &ev);
+ g_print("%s", report);
+ CORBA_free(report);
+ }
+
+ if (! (arg_display_main_window
+ || arg_display_properties
+ || arg_display_about
+ || arg_close_popup
+ || arg_update
+ || arg_report))
+ g_message(_("Mail Notification is already running"));
}
-
- if (! (arg_display_mail_summary
- || arg_display_properties
- || arg_display_about
- || arg_close_popup
- || arg_update
- || arg_report))
- g_message(_("Mail Notification is already running"));
}
bonobo_object_release_unref(automation, &ev);
@@ -396,7 +427,7 @@ main (int argc, char **argv)
CORBA_exception_free(&ev);
gdk_notify_startup_complete();
- if (result != Bonobo_ACTIVATION_REG_ALREADY_ACTIVE)
+ if (result != Bonobo_ACTIVATION_REG_ALREADY_ACTIVE && ! arg_quit)
gtk_main();
GDK_THREADS_LEAVE();
diff --git a/src/mn-mbox-mailbox-private.h b/src/mn-mbox-mailbox-private.h
@@ -16,7 +16,7 @@ extern "C" {
#line 18 "mn-mbox-mailbox-private.h"
struct _MNmboxMailboxPrivate {
-#line 43 "mn-mbox-mailbox.gob"
+#line 41 "mn-mbox-mailbox.gob"
time_t last_mtime;
#line 22 "mn-mbox-mailbox-private.h"
};
diff --git a/src/mn-mbox-mailbox.c b/src/mn-mbox-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:09 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:26 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -29,13 +29,11 @@
#include <gdk/gdk.h>
#include "mn-mailbox-private.h"
#include "mn-vfs.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
#include "mn-gmime-stream-vfs.h"
-#endif /* WITH_MIME */
#include "mn-util.h"
-#line 39 "mn-mbox-mailbox.c"
+#line 37 "mn-mbox-mailbox.c"
/* self casting macros */
#define SELF(x) MN_MBOX_MAILBOX(x)
#define SELF_CONST(x) MN_MBOX_MAILBOX_CONST(x)
@@ -52,7 +50,7 @@ typedef MNmboxMailboxClass SelfClass;
/* here are local prototypes */
static void mn_mbox_mailbox_init (MNmboxMailbox * o) G_GNUC_UNUSED;
static void mn_mbox_mailbox_class_init (MNmboxMailboxClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_mbox_mailbox_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_mbox_mailbox_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static gboolean ___3_mn_mbox_mailbox_impl_is (MNMailbox * dummy, MNURI * uri) G_GNUC_UNUSED;
static void ___4_mn_mbox_mailbox_impl_check (MNMailbox * mailbox) G_GNUC_UNUSED;
@@ -120,10 +118,10 @@ mn_mbox_mailbox_init (MNmboxMailbox * o G_GNUC_UNUSED)
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNmboxMailboxPrivate);
}
#undef __GOB_FUNCTION__
-#line 45 "mn-mbox-mailbox.gob"
+#line 43 "mn-mbox-mailbox.gob"
static void
mn_mbox_mailbox_class_init (MNmboxMailboxClass * class G_GNUC_UNUSED)
-#line 127 "mn-mbox-mailbox.c"
+#line 125 "mn-mbox-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:mbox:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -133,30 +131,30 @@ mn_mbox_mailbox_class_init (MNmboxMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-#line 50 "mn-mbox-mailbox.gob"
+#line 48 "mn-mbox-mailbox.gob"
g_object_class->constructor = ___2_mn_mbox_mailbox_constructor;
-#line 74 "mn-mbox-mailbox.gob"
+#line 72 "mn-mbox-mailbox.gob"
mn_mailbox_class->impl_is = ___3_mn_mbox_mailbox_impl_is;
-#line 115 "mn-mbox-mailbox.gob"
+#line 113 "mn-mbox-mailbox.gob"
mn_mailbox_class->impl_check = ___4_mn_mbox_mailbox_impl_check;
-#line 143 "mn-mbox-mailbox.c"
+#line 141 "mn-mbox-mailbox.c"
g_object_class->finalize = ___finalize;
{
-#line 46 "mn-mbox-mailbox.gob"
+#line 44 "mn-mbox-mailbox.gob"
MN_MAILBOX_CLASS(class)->format = "mbox";
-#line 150 "mn-mbox-mailbox.c"
+#line 148 "mn-mbox-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 50 "mn-mbox-mailbox.gob"
+#line 48 "mn-mbox-mailbox.gob"
static GObject *
-___2_mn_mbox_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 160 "mn-mbox-mailbox.c"
+___2_mn_mbox_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 158 "mn-mbox-mailbox.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -164,7 +162,7 @@ ___2_mn_mbox_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_pr
{
#define __GOB_FUNCTION__ "MN:mbox:Mailbox::constructor"
{
-#line 52 "mn-mbox-mailbox.gob"
+#line 50 "mn-mbox-mailbox.gob"
GObject *object;
MNMailbox *self;
@@ -186,27 +184,27 @@ ___2_mn_mbox_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_pr
return object;
}}
-#line 190 "mn-mbox-mailbox.c"
+#line 188 "mn-mbox-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 74 "mn-mbox-mailbox.gob"
+#line 72 "mn-mbox-mailbox.gob"
static gboolean
___3_mn_mbox_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
-#line 197 "mn-mbox-mailbox.c"
+#line 195 "mn-mbox-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->impl_is)? \
(* MN_MAILBOX_CLASS(parent_class)->impl_is)(___dummy,___uri): \
((gboolean )0))
{
#define __GOB_FUNCTION__ "MN:mbox:Mailbox::impl_is"
-#line 74 "mn-mbox-mailbox.gob"
+#line 72 "mn-mbox-mailbox.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 74 "mn-mbox-mailbox.gob"
+#line 72 "mn-mbox-mailbox.gob"
g_return_val_if_fail (MN_IS_URI (uri), (gboolean )0);
-#line 208 "mn-mbox-mailbox.c"
+#line 206 "mn-mbox-mailbox.c"
{
-#line 76 "mn-mbox-mailbox.gob"
+#line 74 "mn-mbox-mailbox.gob"
gboolean is = FALSE;
@@ -245,26 +243,26 @@ ___3_mn_mbox_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
return is;
}}
-#line 249 "mn-mbox-mailbox.c"
+#line 247 "mn-mbox-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 115 "mn-mbox-mailbox.gob"
+#line 113 "mn-mbox-mailbox.gob"
static void
___4_mn_mbox_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 256 "mn-mbox-mailbox.c"
+#line 254 "mn-mbox-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->impl_check) \
(* MN_MAILBOX_CLASS(parent_class)->impl_check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:mbox:Mailbox::impl_check"
-#line 115 "mn-mbox-mailbox.gob"
+#line 113 "mn-mbox-mailbox.gob"
g_return_if_fail (mailbox != NULL);
-#line 115 "mn-mbox-mailbox.gob"
+#line 113 "mn-mbox-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 266 "mn-mbox-mailbox.c"
+#line 264 "mn-mbox-mailbox.c"
{
-#line 117 "mn-mbox-mailbox.gob"
+#line 115 "mn-mbox-mailbox.gob"
Self *self = SELF(mailbox);
gboolean check = TRUE;
@@ -294,7 +292,6 @@ ___4_mn_mbox_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
result = gnome_vfs_open_uri(&handle, mailbox->uri->vfs, GNOME_VFS_OPEN_READ);
if (result == GNOME_VFS_OK)
{
-#ifdef WITH_MIME
GMimeStream *stream;
GMimeParser *parser;
GSList *messages = NULL;
@@ -326,54 +323,11 @@ ___4_mn_mbox_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
gnome_vfs_close(handle);
GDK_THREADS_ENTER();
-
- mn_mailbox_set_has_new(mailbox, messages != NULL);
mn_mailbox_set_messages(mailbox, messages);
-
gdk_flush();
GDK_THREADS_LEAVE();
mn_g_object_slist_free(messages);
-
-#else /* WITH_MIME */
-
- MNVFSReadLineContext *context = NULL;
- const char *line;
- gboolean in_header = FALSE;
- gboolean seen = TRUE; /* empty mailboxes have no new mail */
-
- while ((result = mn_vfs_read_line(&context, handle, &line)) == GNOME_VFS_OK)
- {
- if (! *line)
- {
- if (! seen)
- break;
- in_header = FALSE;
- }
- else if (g_str_has_prefix(line, "From "))
- {
- in_header = TRUE;
- seen = FALSE;
- }
- else if (in_header
- && g_str_has_prefix(line, "Status:")
- && (strchr(line, 'O') || strchr(line, 'R')))
- seen = TRUE;
- }
-
- mn_vfs_read_line_context_free(context);
- gnome_vfs_close(handle);
-
- GDK_THREADS_ENTER();
-
- if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF)
- mn_mailbox_set_has_new(mailbox, ! seen);
- else
- mn_mailbox_set_error(mailbox, _("error while reading mailbox: %s"), gnome_vfs_result_to_string(result));
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-#endif /* WITH_MIME */
}
else
{
@@ -389,6 +343,6 @@ ___4_mn_mbox_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
gdk_flush();
GDK_THREADS_LEAVE();
}}
-#line 393 "mn-mbox-mailbox.c"
+#line 347 "mn-mbox-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-mbox-mailbox.gob b/src/mn-mbox-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -31,10 +31,8 @@ requires 2.0.10
#include <gdk/gdk.h>
#include "mn-mailbox-private.h"
#include "mn-vfs.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
#include "mn-gmime-stream-vfs.h"
-#endif /* WITH_MIME */
#include "mn-util.h"
%}
@@ -48,7 +46,7 @@ class MN:mbox:Mailbox from MN:Mailbox
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
MNMailbox *self;
@@ -143,7 +141,6 @@ class MN:mbox:Mailbox from MN:Mailbox
result = gnome_vfs_open_uri(&handle, mailbox->uri->vfs, GNOME_VFS_OPEN_READ);
if (result == GNOME_VFS_OK)
{
-#ifdef WITH_MIME
GMimeStream *stream;
GMimeParser *parser;
GSList *messages = NULL;
@@ -175,54 +172,11 @@ class MN:mbox:Mailbox from MN:Mailbox
gnome_vfs_close(handle);
GDK_THREADS_ENTER();
-
- mn_mailbox_set_has_new(mailbox, messages != NULL);
mn_mailbox_set_messages(mailbox, messages);
-
gdk_flush();
GDK_THREADS_LEAVE();
mn_g_object_slist_free(messages);
-
-#else /* WITH_MIME */
-
- MNVFSReadLineContext *context = NULL;
- const char *line;
- gboolean in_header = FALSE;
- gboolean seen = TRUE; /* empty mailboxes have no new mail */
-
- while ((result = mn_vfs_read_line(&context, handle, &line)) == GNOME_VFS_OK)
- {
- if (! *line)
- {
- if (! seen)
- break;
- in_header = FALSE;
- }
- else if (g_str_has_prefix(line, "From "))
- {
- in_header = TRUE;
- seen = FALSE;
- }
- else if (in_header
- && g_str_has_prefix(line, "Status:")
- && (strchr(line, 'O') || strchr(line, 'R')))
- seen = TRUE;
- }
-
- mn_vfs_read_line_context_free(context);
- gnome_vfs_close(handle);
-
- GDK_THREADS_ENTER();
-
- if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF)
- mn_mailbox_set_has_new(mailbox, ! seen);
- else
- mn_mailbox_set_error(mailbox, _("error while reading mailbox: %s"), gnome_vfs_result_to_string(result));
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-#endif /* WITH_MIME */
}
else
{
diff --git a/src/mn-message-box-private.h b/src/mn-message-box-private.h
@@ -1,32 +0,0 @@
-/* Generated by GOB (v2.0.11) (do not edit directly) */
-
-#ifndef __MN_MESSAGE_BOX_PRIVATE_H__
-#define __MN_MESSAGE_BOX_PRIVATE_H__
-
-#include "mn-message-box.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNMessageBoxPrivate {
-#line 33 "mn-message-box.gob"
- GtkWidget * sent_label;
-#line 34 "mn-message-box.gob"
- unsigned int update_timeout_id;
-#line 36 "mn-message-box.gob"
- GtkSizeGroup * size_group;
-#line 41 "mn-message-box.gob"
- MNMessage * message;
-#line 46 "mn-message-box.gob"
- gboolean selectable;
-#line 49 "mn-message-box.gob"
- GSList * labels;
-#line 26 "mn-message-box-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/src/mn-message-box.c b/src/mn-message-box.c
@@ -1,584 +0,0 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
- (do not edit directly) */
-
-/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
-
-#define GOB_VERSION_MAJOR 2
-#define GOB_VERSION_MINOR 0
-#define GOB_VERSION_PATCHLEVEL 11
-
-#define selfp (self->_priv)
-
-#include <string.h> /* memset() */
-
-#include "mn-message-box.h"
-
-#include "mn-message-box-private.h"
-
-#ifdef G_LIKELY
-#define ___GOB_LIKELY(expr) G_LIKELY(expr)
-#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
-#else /* ! G_LIKELY */
-#define ___GOB_LIKELY(expr) (expr)
-#define ___GOB_UNLIKELY(expr) (expr)
-#endif /* G_LIKELY */
-
-#line 25 "mn-message-box.gob"
-
-#include "config.h"
-#include <glib/gi18n.h>
-#include "mn-util.h"
-
-#line 33 "mn-message-box.c"
-/* self casting macros */
-#define SELF(x) MN_MESSAGE_BOX(x)
-#define SELF_CONST(x) MN_MESSAGE_BOX_CONST(x)
-#define IS_SELF(x) MN_IS_MESSAGE_BOX(x)
-#define TYPE_SELF MN_TYPE_MESSAGE_BOX
-#define SELF_CLASS(x) MN_MESSAGE_BOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MESSAGE_BOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMessageBox Self;
-typedef MNMessageBoxClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-static void mn_message_box_init (MNMessageBox * o) G_GNUC_UNUSED;
-static void mn_message_box_class_init (MNMessageBoxClass * c) G_GNUC_UNUSED;
-static GObject * ___1_mn_message_box_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
-static void ___2_mn_message_box_finalize (GObject * object) G_GNUC_UNUSED;
-static gboolean mn_message_box_update_cb (gpointer data) G_GNUC_UNUSED;
-static void mn_message_box_append_row (MNMessageBox * self, const char * name, const char * value, GtkWidget ** value_label) G_GNUC_UNUSED;
-static char * mn_message_box_get_ago (MNMessageBox * self) G_GNUC_UNUSED;
-static char * mn_message_box_format_delay (time_t delay) G_GNUC_UNUSED;
-
-enum {
- PROP_0,
- PROP_SIZE_GROUP,
- PROP_MESSAGE,
- PROP_SELECTABLE
-};
-
-/* pointer to the class of our parent */
-static GtkVBoxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_update_cb mn_message_box_update_cb
-#define self_append_row mn_message_box_append_row
-#define self_get_ago mn_message_box_get_ago
-#define self_format_delay mn_message_box_format_delay
-#define self_new mn_message_box_new
-#define self_get_labels mn_message_box_get_labels
-GType
-mn_message_box_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMessageBoxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_message_box_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMessageBox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_message_box_init,
- NULL
- };
-
- type = g_type_register_static (GTK_TYPE_VBOX, "MNMessageBox", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMessageBox *)g_object_new(mn_message_box_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMessageBox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMessageBox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMessageBox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMessageBox *)g_object_new_valist (mn_message_box_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::dispose"
- MNMessageBox *self G_GNUC_UNUSED = MN_MESSAGE_BOX (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 36 "mn-message-box.gob"
- if(self->_priv->size_group) { g_object_unref ((gpointer) self->_priv->size_group); self->_priv->size_group = NULL; }
-#line 128 "mn-message-box.c"
-#line 41 "mn-message-box.gob"
- if(self->_priv->message) { g_object_unref ((gpointer) self->_priv->message); self->_priv->message = NULL; }
-#line 131 "mn-message-box.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::finalize"
- MNMessageBox *self G_GNUC_UNUSED = MN_MESSAGE_BOX (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 84 "mn-message-box.gob"
- ___2_mn_message_box_finalize(obj_self);
-#line 144 "mn-message-box.c"
-#line 49 "mn-message-box.gob"
- if(self->_priv->labels) { g_slist_free ((gpointer) self->_priv->labels); self->_priv->labels = NULL; }
-#line 147 "mn-message-box.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_message_box_init (MNMessageBox * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNMessageBoxPrivate);
-}
-#undef __GOB_FUNCTION__
-static void
-mn_message_box_class_init (MNMessageBoxClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNMessageBoxPrivate));
-
- parent_class = g_type_class_ref (GTK_TYPE_VBOX);
-
-#line 51 "mn-message-box.gob"
- g_object_class->constructor = ___1_mn_message_box_constructor;
-#line 84 "mn-message-box.gob"
- g_object_class->finalize = ___finalize;
-#line 172 "mn-message-box.c"
- g_object_class->dispose = ___dispose;
- g_object_class->get_property = ___object_get_property;
- g_object_class->set_property = ___object_set_property;
- {
- GParamSpec *param_spec;
-
- param_spec = g_param_spec_object
- ("size_group" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- GTK_TYPE_SIZE_GROUP /* object_type */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_SIZE_GROUP,
- param_spec);
- param_spec = g_param_spec_object
- ("message" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- MN_TYPE_MESSAGE /* object_type */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_MESSAGE,
- param_spec);
- param_spec = g_param_spec_boolean
- ("selectable" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_SELECTABLE,
- param_spec);
- }
-}
-#undef __GOB_FUNCTION__
-
-static void
-___object_set_property (GObject *object,
- guint property_id,
- const GValue *VAL G_GNUC_UNUSED,
- GParamSpec *pspec G_GNUC_UNUSED)
-#define __GOB_FUNCTION__ "MN:Message:Box::set_property"
-{
- MNMessageBox *self G_GNUC_UNUSED;
-
- self = MN_MESSAGE_BOX (object);
-
- switch (property_id) {
- case PROP_SIZE_GROUP:
- {
-#line 37 "mn-message-box.gob"
-{ GObject *___old = (GObject *)self->_priv->size_group; self->_priv->size_group = (GtkSizeGroup *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
-#line 226 "mn-message-box.c"
- }
- break;
- case PROP_MESSAGE:
- {
-#line 42 "mn-message-box.gob"
-{ GObject *___old = (GObject *)self->_priv->message; self->_priv->message = (MNMessage *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
-#line 233 "mn-message-box.c"
- }
- break;
- case PROP_SELECTABLE:
- {
-#line 47 "mn-message-box.gob"
-self->_priv->selectable = g_value_get_boolean (VAL);
-#line 240 "mn-message-box.c"
- }
- break;
- default:
-/* Apparently in g++ this is needed, glib is b0rk */
-#ifndef __PRETTY_FUNCTION__
-# undef G_STRLOC
-# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
-#endif
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-#undef __GOB_FUNCTION__
-
-static void
-___object_get_property (GObject *object,
- guint property_id,
- GValue *VAL G_GNUC_UNUSED,
- GParamSpec *pspec G_GNUC_UNUSED)
-#define __GOB_FUNCTION__ "MN:Message:Box::get_property"
-{
- MNMessageBox *self G_GNUC_UNUSED;
-
- self = MN_MESSAGE_BOX (object);
-
- switch (property_id) {
- case PROP_SIZE_GROUP:
- {
-#line 37 "mn-message-box.gob"
-g_value_set_object (VAL, (gpointer)self->_priv->size_group);
-#line 271 "mn-message-box.c"
- }
- break;
- case PROP_MESSAGE:
- {
-#line 42 "mn-message-box.gob"
-g_value_set_object (VAL, (gpointer)self->_priv->message);
-#line 278 "mn-message-box.c"
- }
- break;
- case PROP_SELECTABLE:
- {
-#line 47 "mn-message-box.gob"
-g_value_set_boolean (VAL, self->_priv->selectable);
-#line 285 "mn-message-box.c"
- }
- break;
- default:
-/* Apparently in g++ this is needed, glib is b0rk */
-#ifndef __PRETTY_FUNCTION__
-# undef G_STRLOC
-# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
-#endif
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 51 "mn-message-box.gob"
-static GObject *
-___1_mn_message_box_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 305 "mn-message-box.c"
-#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
- ((G_OBJECT_CLASS(parent_class)->constructor)? \
- (* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
- ((GObject * )0))
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::constructor"
-{
-#line 53 "mn-message-box.gob"
-
- GObject *object;
- Self *self;
-
- object = PARENT_HANDLER(type, n_construct_properties, construct_params);
- self = SELF(object);
-
- gtk_widget_set_name(GTK_WIDGET(self), "mn-message-box");
- self_append_row(self, _("Mailbox"), selfp->message->mailbox_uri->human_readable, NULL);
-
- if (selfp->message->error)
- self_append_row(self, _("Unreadable message"), selfp->message->error, NULL);
- else
- {
- char *ago;
-
- self_append_row(self, _("From"), selfp->message->from, NULL);
- self_append_row(self, _("Subject"), selfp->message->subject, NULL);
-
- ago = self_get_ago(self);
- if (ago)
- {
- self_append_row(self, _("Sent"), ago, &selfp->sent_label);
- g_free(ago);
- selfp->update_timeout_id = g_timeout_add(500, self_update_cb, self);
- }
- }
-
- return object;
- }}
-#line 344 "mn-message-box.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 84 "mn-message-box.gob"
-static void
-___2_mn_message_box_finalize (GObject * object G_GNUC_UNUSED)
-#line 351 "mn-message-box.c"
-#define PARENT_HANDLER(___object) \
- { if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::finalize"
-#line 84 "mn-message-box.gob"
- g_return_if_fail (object != NULL);
-#line 84 "mn-message-box.gob"
- g_return_if_fail (G_IS_OBJECT (object));
-#line 361 "mn-message-box.c"
-{
-#line 86 "mn-message-box.gob"
-
- Self *self = SELF(object);
-
- if (selfp->update_timeout_id)
- g_source_remove(selfp->update_timeout_id);
-
- PARENT_HANDLER(object);
- }}
-#line 372 "mn-message-box.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 95 "mn-message-box.gob"
-static gboolean
-mn_message_box_update_cb (gpointer data)
-#line 379 "mn-message-box.c"
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::update_cb"
-#line 95 "mn-message-box.gob"
- g_return_val_if_fail (data != NULL, (gboolean )0);
-#line 384 "mn-message-box.c"
-{
-#line 97 "mn-message-box.gob"
-
- Self *self = data;
- char *ago;
-
- ago = self_get_ago(self);
-
- GDK_THREADS_ENTER();
- gtk_label_set_text(GTK_LABEL(selfp->sent_label), ago);
- GDK_THREADS_LEAVE();
-
- g_free(ago);
-
- return TRUE; /* continue */
- }}
-#line 401 "mn-message-box.c"
-#undef __GOB_FUNCTION__
-
-#line 112 "mn-message-box.gob"
-static void
-mn_message_box_append_row (MNMessageBox * self, const char * name, const char * value, GtkWidget ** value_label)
-#line 407 "mn-message-box.c"
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::append_row"
-#line 112 "mn-message-box.gob"
- g_return_if_fail (self != NULL);
-#line 112 "mn-message-box.gob"
- g_return_if_fail (MN_IS_MESSAGE_BOX (self));
-#line 112 "mn-message-box.gob"
- g_return_if_fail (name != NULL);
-#line 416 "mn-message-box.c"
-{
-#line 117 "mn-message-box.gob"
-
- GtkWidget *hbox;
- GtkWidget *label;
- char *markup;
-
- hbox = gtk_hbox_new(FALSE, 0);
-
- /* name */
-
- markup = g_markup_printf_escaped("<span weight=\"bold\">%s:</span>", name);
- label = gtk_label_new(markup);
- g_free(markup);
-
- gtk_widget_set_name(label, "name");
- gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
- gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
- gtk_label_set_selectable(GTK_LABEL(label), selfp->selectable);
-
- gtk_size_group_add_widget(selfp->size_group, label);
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- selfp->labels = g_slist_append(selfp->labels, label);
-
- /* separator */
-
- label = gtk_label_new(" ");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- selfp->labels = g_slist_append(selfp->labels, label);
-
- /* value */
-
- label = gtk_label_new(value);
-
- gtk_widget_set_name(label, "value");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
- gtk_label_set_selectable(GTK_LABEL(label), selfp->selectable);
-
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
- selfp->labels = g_slist_append(selfp->labels, label);
-
- if (value_label)
- *value_label = label;
-
- gtk_box_pack_start(GTK_BOX(self), hbox, FALSE, FALSE, 0);
- gtk_widget_show_all(hbox);
- }}
-#line 464 "mn-message-box.c"
-#undef __GOB_FUNCTION__
-
-#line 163 "mn-message-box.gob"
-static char *
-mn_message_box_get_ago (MNMessageBox * self)
-#line 470 "mn-message-box.c"
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::get_ago"
-#line 163 "mn-message-box.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 163 "mn-message-box.gob"
- g_return_val_if_fail (MN_IS_MESSAGE_BOX (self), (char * )0);
-#line 477 "mn-message-box.c"
-{
-#line 165 "mn-message-box.gob"
-
- char *ago = NULL;
-
- if (selfp->message->sent_time)
- {
- time_t now;
-
- now = mn_time();
- if (now > 0)
- {
- time_t diff;
-
- diff = now - selfp->message->sent_time;
- if (diff >= 0)
- ago = self_format_delay(diff);
- }
- }
-
- return ago;
- }}
-#line 500 "mn-message-box.c"
-#undef __GOB_FUNCTION__
-
-#line 186 "mn-message-box.gob"
-static char *
-mn_message_box_format_delay (time_t delay)
-#line 506 "mn-message-box.c"
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::format_delay"
-{
-#line 188 "mn-message-box.gob"
-
- char *str;
-
- if (delay < 60)
- str = g_strdup_printf(ngettext("%i second ago", "%i seconds ago", delay), delay);
- else if (delay < 60 * 60)
- {
- int minutes = delay / 60;
- str = g_strdup_printf(ngettext("%i minute ago", "%i minutes ago", minutes), minutes);
- }
- else if (delay < 60 * 60 * 24)
- {
- int hours = delay / (60 * 60);
- str = g_strdup_printf(ngettext("%i hour ago", "%i hours ago", hours), hours);
- }
- else if (delay < 60 * 60 * 24 * 7)
- {
- int days = delay / (60 * 60 * 24);
- str = g_strdup_printf(ngettext("%i day ago", "%i days ago", days), days);
- }
- else
- {
- int weeks = delay / (60 * 60 * 24 * 7);
- str = g_strdup_printf(ngettext("%i week ago", "%i weeks ago", weeks), weeks);
- }
-
- return str;
- }}
-#line 539 "mn-message-box.c"
-#undef __GOB_FUNCTION__
-
-#line 217 "mn-message-box.gob"
-GtkWidget *
-mn_message_box_new (GtkSizeGroup * size_group, MNMessage * message, gboolean selectable)
-#line 545 "mn-message-box.c"
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::new"
-#line 217 "mn-message-box.gob"
- g_return_val_if_fail (size_group != NULL, (GtkWidget * )0);
-#line 217 "mn-message-box.gob"
- g_return_val_if_fail (GTK_IS_SIZE_GROUP (size_group), (GtkWidget * )0);
-#line 217 "mn-message-box.gob"
- g_return_val_if_fail (message != NULL, (GtkWidget * )0);
-#line 217 "mn-message-box.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (message), (GtkWidget * )0);
-#line 556 "mn-message-box.c"
-{
-#line 221 "mn-message-box.gob"
-
- return GTK_WIDGET(GET_NEW_VARG(MN_MESSAGE_BOX_PROP_SIZE_GROUP(G_OBJECT(size_group)),
- MN_MESSAGE_BOX_PROP_MESSAGE(G_OBJECT(message)),
- MN_MESSAGE_BOX_PROP_SELECTABLE(selectable),
- NULL));
- }}
-#line 565 "mn-message-box.c"
-#undef __GOB_FUNCTION__
-
-#line 228 "mn-message-box.gob"
-GSList *
-mn_message_box_get_labels (MNMessageBox * self)
-#line 571 "mn-message-box.c"
-{
-#define __GOB_FUNCTION__ "MN:Message:Box::get_labels"
-#line 228 "mn-message-box.gob"
- g_return_val_if_fail (self != NULL, (GSList * )0);
-#line 228 "mn-message-box.gob"
- g_return_val_if_fail (MN_IS_MESSAGE_BOX (self), (GSList * )0);
-#line 578 "mn-message-box.c"
-{
-#line 230 "mn-message-box.gob"
-
- return selfp->labels;
- }}
-#line 584 "mn-message-box.c"
-#undef __GOB_FUNCTION__
diff --git a/src/mn-message-box.gob b/src/mn-message-box.gob
@@ -1,233 +0,0 @@
-/*
- * 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.
- */
-
-requires 2.0.10
-
-%headertop{
-#include <gtk/gtk.h>
-#include "mn-message.h"
-%}
-%{
-#include "config.h"
-#include <glib/gi18n.h>
-#include "mn-util.h"
-%}
-
-class MN:Message:Box from Gtk:VBox
-{
- private GtkWidget *sent_label;
- private unsigned int update_timeout_id;
-
- private GtkSizeGroup *size_group unrefwith g_object_unref;
- property OBJECT size_group (object_type = Gtk:Size:Group,
- flags = CONSTRUCT_ONLY,
- link);
-
- private MNMessage *message unrefwith g_object_unref;
- property OBJECT message (object_type = MN:Message,
- flags = CONSTRUCT_ONLY,
- link);
-
- private gboolean selectable;
- property BOOLEAN selectable (flags = CONSTRUCT_ONLY, link);
-
- private GSList *labels destroywith g_slist_free;
-
- override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
- {
- GObject *object;
- Self *self;
-
- object = PARENT_HANDLER(type, n_construct_properties, construct_params);
- self = SELF(object);
-
- gtk_widget_set_name(GTK_WIDGET(self), "mn-message-box");
- self_append_row(self, _("Mailbox"), selfp->message->mailbox_uri->human_readable, NULL);
-
- if (selfp->message->error)
- self_append_row(self, _("Unreadable message"), selfp->message->error, NULL);
- else
- {
- char *ago;
-
- self_append_row(self, _("From"), selfp->message->from, NULL);
- self_append_row(self, _("Subject"), selfp->message->subject, NULL);
-
- ago = self_get_ago(self);
- if (ago)
- {
- self_append_row(self, _("Sent"), ago, &selfp->sent_label);
- g_free(ago);
- selfp->update_timeout_id = g_timeout_add(500, self_update_cb, self);
- }
- }
-
- return object;
- }
-
- override (G:Object) void
- finalize (G:Object *object (check null type))
- {
- Self *self = SELF(object);
-
- if (selfp->update_timeout_id)
- g_source_remove(selfp->update_timeout_id);
-
- PARENT_HANDLER(object);
- }
-
- private gboolean
- update_cb (gpointer data (check null))
- {
- Self *self = data;
- char *ago;
-
- ago = self_get_ago(self);
-
- GDK_THREADS_ENTER();
- gtk_label_set_text(GTK_LABEL(selfp->sent_label), ago);
- GDK_THREADS_LEAVE();
-
- g_free(ago);
-
- return TRUE; /* continue */
- }
-
- private void
- append_row (self,
- const char *name (check null),
- const char *value,
- GtkWidget **value_label)
- {
- GtkWidget *hbox;
- GtkWidget *label;
- char *markup;
-
- hbox = gtk_hbox_new(FALSE, 0);
-
- /* name */
-
- markup = g_markup_printf_escaped("<span weight=\"bold\">%s:</span>", name);
- label = gtk_label_new(markup);
- g_free(markup);
-
- gtk_widget_set_name(label, "name");
- gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
- gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
- gtk_label_set_selectable(GTK_LABEL(label), selfp->selectable);
-
- gtk_size_group_add_widget(selfp->size_group, label);
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- selfp->labels = g_slist_append(selfp->labels, label);
-
- /* separator */
-
- label = gtk_label_new(" ");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- selfp->labels = g_slist_append(selfp->labels, label);
-
- /* value */
-
- label = gtk_label_new(value);
-
- gtk_widget_set_name(label, "value");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
- gtk_label_set_selectable(GTK_LABEL(label), selfp->selectable);
-
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
- selfp->labels = g_slist_append(selfp->labels, label);
-
- if (value_label)
- *value_label = label;
-
- gtk_box_pack_start(GTK_BOX(self), hbox, FALSE, FALSE, 0);
- gtk_widget_show_all(hbox);
- }
-
- private char *
- get_ago (self)
- {
- char *ago = NULL;
-
- if (selfp->message->sent_time)
- {
- time_t now;
-
- now = mn_time();
- if (now > 0)
- {
- time_t diff;
-
- diff = now - selfp->message->sent_time;
- if (diff >= 0)
- ago = self_format_delay(diff);
- }
- }
-
- return ago;
- }
-
- private char *
- format_delay (time_t delay)
- {
- char *str;
-
- if (delay < 60)
- str = g_strdup_printf(ngettext("%i second ago", "%i seconds ago", delay), delay);
- else if (delay < 60 * 60)
- {
- int minutes = delay / 60;
- str = g_strdup_printf(ngettext("%i minute ago", "%i minutes ago", minutes), minutes);
- }
- else if (delay < 60 * 60 * 24)
- {
- int hours = delay / (60 * 60);
- str = g_strdup_printf(ngettext("%i hour ago", "%i hours ago", hours), hours);
- }
- else if (delay < 60 * 60 * 24 * 7)
- {
- int days = delay / (60 * 60 * 24);
- str = g_strdup_printf(ngettext("%i day ago", "%i days ago", days), days);
- }
- else
- {
- int weeks = delay / (60 * 60 * 24 * 7);
- str = g_strdup_printf(ngettext("%i week ago", "%i weeks ago", weeks), weeks);
- }
-
- return str;
- }
-
- public GtkWidget *
- new (Gtk:Size:Group *size_group (check null type),
- MN:Message *message (check null type),
- gboolean selectable)
- {
- return GTK_WIDGET(GET_NEW_VARG(MN_MESSAGE_BOX_PROP_SIZE_GROUP(G_OBJECT(size_group)),
- MN_MESSAGE_BOX_PROP_MESSAGE(G_OBJECT(message)),
- MN_MESSAGE_BOX_PROP_SELECTABLE(selectable),
- NULL));
- }
-
- public GSList *
- get_labels (self)
- {
- return selfp->labels;
- }
-}
diff --git a/src/mn-message-box.h b/src/mn-message-box.h
@@ -1,87 +0,0 @@
-/* Generated by GOB (v2.0.11) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <gtk/gtk.h>
-#include "mn-message.h"
-
-#ifndef __MN_MESSAGE_BOX_H__
-#define __MN_MESSAGE_BOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MESSAGE_BOX (mn_message_box_get_type())
-#define MN_MESSAGE_BOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_message_box_get_type(), MNMessageBox)
-#define MN_MESSAGE_BOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_message_box_get_type(), MNMessageBox const)
-#define MN_MESSAGE_BOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_message_box_get_type(), MNMessageBoxClass)
-#define MN_IS_MESSAGE_BOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_message_box_get_type ())
-
-#define MN_MESSAGE_BOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_message_box_get_type(), MNMessageBoxClass)
-
-/* Private structure type */
-typedef struct _MNMessageBoxPrivate MNMessageBoxPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MESSAGE_BOX__
-#define __TYPEDEF_MN_MESSAGE_BOX__
-typedef struct _MNMessageBox MNMessageBox;
-#endif
-struct _MNMessageBox {
- GtkVBox __parent__;
- /*< private >*/
- MNMessageBoxPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMessageBoxClass MNMessageBoxClass;
-struct _MNMessageBoxClass {
- GtkVBoxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_message_box_get_type (void);
-GtkWidget * mn_message_box_new (GtkSizeGroup * size_group,
- MNMessage * message,
- gboolean selectable);
-GSList * mn_message_box_get_labels (MNMessageBox * self);
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_MESSAGE_BOX_PROP_SIZE_GROUP(arg) "size_group", __extension__ ({GObject *z = (arg); z;})
-#define MN_MESSAGE_BOX_GET_PROP_SIZE_GROUP(arg) "size_group", __extension__ ({GObject **z = (arg); z;})
-#define MN_MESSAGE_BOX_PROP_MESSAGE(arg) "message", __extension__ ({GObject *z = (arg); z;})
-#define MN_MESSAGE_BOX_GET_PROP_MESSAGE(arg) "message", __extension__ ({GObject **z = (arg); z;})
-#define MN_MESSAGE_BOX_PROP_SELECTABLE(arg) "selectable", __extension__ ({gboolean z = (arg); z;})
-#define MN_MESSAGE_BOX_GET_PROP_SELECTABLE(arg) "selectable", __extension__ ({gboolean *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_MESSAGE_BOX_PROP_SIZE_GROUP(arg) "size_group",(GObject *)(arg)
-#define MN_MESSAGE_BOX_GET_PROP_SIZE_GROUP(arg) "size_group",(GObject **)(arg)
-#define MN_MESSAGE_BOX_PROP_MESSAGE(arg) "message",(GObject *)(arg)
-#define MN_MESSAGE_BOX_GET_PROP_MESSAGE(arg) "message",(GObject **)(arg)
-#define MN_MESSAGE_BOX_PROP_SELECTABLE(arg) "selectable",(gboolean )(arg)
-#define MN_MESSAGE_BOX_GET_PROP_SELECTABLE(arg) "selectable",(gboolean *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/src/mn-message-mime.c b/src/mn-message-mime.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-message-mime.h b/src/mn-message-mime.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-message-view-private.h b/src/mn-message-view-private.h
@@ -0,0 +1,34 @@
+/* Generated by GOB (v2.0.11) (do not edit directly) */
+
+#ifndef __MN_MESSAGE_VIEW_PRIVATE_H__
+#define __MN_MESSAGE_VIEW_PRIVATE_H__
+
+#include "mn-message-view.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct _MNMessageViewPrivate {
+#line 43 "mn-message-view.gob"
+ GtkTextBuffer * buffer;
+#line 44 "mn-message-view.gob"
+ GtkTextTag * header_tag;
+#line 45 "mn-message-view.gob"
+ unsigned int update_tabs_idle_id;
+#line 46 "mn-message-view.gob"
+ unsigned int update_sent_timeout_id;
+#line 48 "mn-message-view.gob"
+ gboolean transparent;
+#line 51 "mn-message-view.gob"
+ gboolean text_pointer;
+#line 54 "mn-message-view.gob"
+ GSList * messages;
+#line 28 "mn-message-view-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-message-view.c b/src/mn-message-view.c
@@ -0,0 +1,819 @@
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:28 2005
+ (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 11
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-message-view.h"
+
+#include "mn-message-view-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 24 "mn-message-view.gob"
+
+#include "config.h"
+#include <glib/gi18n.h>
+#include <eel/eel.h>
+#include "mn-message.h"
+#include "mn-util.h"
+
+ typedef struct
+ {
+ MNMessage *message;
+ GSList *header_marks;
+ char *last_sent;
+ GtkTextMark *sent_start;
+ GtkTextMark *sent_end;
+ } MessageInfo;
+
+#line 44 "mn-message-view.c"
+/* self casting macros */
+#define SELF(x) MN_MESSAGE_VIEW(x)
+#define SELF_CONST(x) MN_MESSAGE_VIEW_CONST(x)
+#define IS_SELF(x) MN_IS_MESSAGE_VIEW(x)
+#define TYPE_SELF MN_TYPE_MESSAGE_VIEW
+#define SELF_CLASS(x) MN_MESSAGE_VIEW_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_MESSAGE_VIEW_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNMessageView Self;
+typedef MNMessageViewClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_message_view_init (MNMessageView * o) G_GNUC_UNUSED;
+static void mn_message_view_class_init (MNMessageViewClass * c) G_GNUC_UNUSED;
+static GObject * ___2_mn_message_view_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static void mn_message_view_update_tabs (MNMessageView * self) G_GNUC_UNUSED;
+static void mn_message_view_style_set_h (GtkWidget * widget, GtkStyle * previous_style, gpointer user_data) G_GNUC_UNUSED;
+static gboolean mn_message_view_update_tabs_cb (gpointer data) G_GNUC_UNUSED;
+static void mn_message_view_realize_h (GtkWidget * widget, gpointer user_data) G_GNUC_UNUSED;
+static void mn_message_view_message_info_free (MessageInfo * info) G_GNUC_UNUSED;
+static void ___8_mn_message_view_finalize (GObject * object) G_GNUC_UNUSED;
+static gboolean mn_message_view_update_sent_cb (gpointer data) G_GNUC_UNUSED;
+static void mn_message_view_clear (MNMessageView * self) G_GNUC_UNUSED;
+static MessageInfo * mn_message_view_append_message (MNMessageView * self, MNMessage * message) G_GNUC_UNUSED;
+static void mn_message_view_append (MNMessageView * self, const char * text) G_GNUC_UNUSED;
+static void mn_message_view_append_row (MNMessageView * self, const char * name, const char * value, GSList ** header_marks, GtkTextMark ** value_start_mark, GtkTextMark ** value_end_mark) G_GNUC_UNUSED;
+
+enum {
+ PROP_0,
+ PROP_TRANSPARENT,
+ PROP_TEXT_POINTER,
+ PROP_MESSAGES
+};
+
+/* pointer to the class of our parent */
+static GtkTextViewClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_set_messages mn_message_view_set_messages
+#define self_update_tabs mn_message_view_update_tabs
+#define self_style_set_h mn_message_view_style_set_h
+#define self_update_tabs_cb mn_message_view_update_tabs_cb
+#define self_realize_h mn_message_view_realize_h
+#define self_message_info_free mn_message_view_message_info_free
+#define self_update_sent_cb mn_message_view_update_sent_cb
+#define self_clear mn_message_view_clear
+#define self_append_message mn_message_view_append_message
+#define self_append mn_message_view_append
+#define self_append_row mn_message_view_append_row
+#define self_new mn_message_view_new
+GType
+mn_message_view_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNMessageViewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_message_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNMessageView),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_message_view_init,
+ NULL
+ };
+
+ type = g_type_register_static (GTK_TYPE_TEXT_VIEW, "MNMessageView", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNMessageView *)g_object_new(mn_message_view_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNMessageView * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNMessageView *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNMessageView *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNMessageView *)g_object_new_valist (mn_message_view_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Message:View::finalize"
+ MNMessageView *self G_GNUC_UNUSED = MN_MESSAGE_VIEW (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+#line 232 "mn-message-view.gob"
+ ___8_mn_message_view_finalize(obj_self);
+#line 150 "mn-message-view.c"
+}
+#undef __GOB_FUNCTION__
+
+static void
+mn_message_view_init (MNMessageView * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Message:View::init"
+ o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNMessageViewPrivate);
+}
+#undef __GOB_FUNCTION__
+static void
+mn_message_view_class_init (MNMessageViewClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Message:View::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+
+ g_type_class_add_private(c,sizeof(MNMessageViewPrivate));
+
+ parent_class = g_type_class_ref (GTK_TYPE_TEXT_VIEW);
+
+#line 94 "mn-message-view.gob"
+ g_object_class->constructor = ___2_mn_message_view_constructor;
+#line 232 "mn-message-view.gob"
+ g_object_class->finalize = ___finalize;
+#line 175 "mn-message-view.c"
+ g_object_class->get_property = ___object_get_property;
+ g_object_class->set_property = ___object_set_property;
+ {
+ GParamSpec *param_spec;
+
+ param_spec = g_param_spec_boolean
+ ("transparent" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ FALSE /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (g_object_class,
+ PROP_TRANSPARENT,
+ param_spec);
+ param_spec = g_param_spec_boolean
+ ("text_pointer" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ FALSE /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (g_object_class,
+ PROP_TEXT_POINTER,
+ param_spec);
+ param_spec = g_param_spec_pointer
+ ("messages" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ (GParamFlags)(G_PARAM_WRITABLE));
+ g_object_class_install_property (g_object_class,
+ PROP_MESSAGES,
+ param_spec);
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_set_property (GObject *object,
+ guint property_id,
+ const GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Message:View::set_property"
+{
+ MNMessageView *self G_GNUC_UNUSED;
+
+ self = MN_MESSAGE_VIEW (object);
+
+ switch (property_id) {
+ case PROP_TRANSPARENT:
+ {
+#line 49 "mn-message-view.gob"
+self->_priv->transparent = g_value_get_boolean (VAL);
+#line 227 "mn-message-view.c"
+ }
+ break;
+ case PROP_TEXT_POINTER:
+ {
+#line 52 "mn-message-view.gob"
+self->_priv->text_pointer = g_value_get_boolean (VAL);
+#line 234 "mn-message-view.c"
+ }
+ break;
+ case PROP_MESSAGES:
+ {
+#line 57 "mn-message-view.gob"
+
+ GSList *messages;
+ MessageInfo *info;
+ GSList *l;
+ gboolean need_updates = FALSE;
+
+ eel_g_slist_free_deep_custom(selfp->messages, (GFunc) self_message_info_free, NULL);
+ selfp->messages = NULL;
+
+ self_clear(self);
+
+ messages = g_value_get_pointer(VAL);
+ if (messages)
+ MN_LIST_FOREACH(l, messages)
+ {
+ info = self_append_message(self, l->data);
+
+ if (info->last_sent)
+ need_updates = TRUE;
+
+ if (l->next)
+ self_append(self, "\n\n");
+ }
+ else
+ self_append(self, _("You have no new mail."));
+
+ self_update_tabs(self);
+
+ if (need_updates)
+ {
+ if (! selfp->update_sent_timeout_id)
+ selfp->update_sent_timeout_id = g_timeout_add(500, self_update_sent_cb, self);
+ }
+ else
+ mn_source_remove(&selfp->update_sent_timeout_id);
+
+#line 276 "mn-message-view.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+ guint property_id,
+ GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Message:View::get_property"
+{
+ MNMessageView *self G_GNUC_UNUSED;
+
+ self = MN_MESSAGE_VIEW (object);
+
+ switch (property_id) {
+ case PROP_TRANSPARENT:
+ {
+#line 49 "mn-message-view.gob"
+g_value_set_boolean (VAL, self->_priv->transparent);
+#line 307 "mn-message-view.c"
+ }
+ break;
+ case PROP_TEXT_POINTER:
+ {
+#line 52 "mn-message-view.gob"
+g_value_set_boolean (VAL, self->_priv->text_pointer);
+#line 314 "mn-message-view.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 57 "mn-message-view.gob"
+void
+mn_message_view_set_messages (MNMessageView * self, gpointer val)
+#line 334 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::set_messages"
+{
+#line 55 "mn-message-view.gob"
+ g_object_set (G_OBJECT (self), "messages", val, NULL);
+}}
+#line 341 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 94 "mn-message-view.gob"
+static GObject *
+___2_mn_message_view_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 347 "mn-message-view.c"
+#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
+ ((G_OBJECT_CLASS(parent_class)->constructor)? \
+ (* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
+ ((GObject * )0))
+{
+#define __GOB_FUNCTION__ "MN:Message:View::constructor"
+{
+#line 96 "mn-message-view.gob"
+
+ GObject *object;
+ Self *self;
+
+ object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+ self = SELF(object);
+
+ selfp->buffer = gtk_text_buffer_new(NULL);
+ selfp->header_tag = gtk_text_buffer_create_tag(selfp->buffer,
+ NULL,
+ "weight", PANGO_WEIGHT_BOLD,
+ NULL);
+
+ gtk_text_view_set_buffer(GTK_TEXT_VIEW(self), selfp->buffer);
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(self), FALSE);
+ gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(self), FALSE);
+
+ g_object_connect(self,
+ "signal-after::style-set", self_style_set_h, NULL,
+ "signal-after::realize", self_realize_h, NULL,
+ NULL);
+
+ return object;
+ }}
+#line 380 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 121 "mn-message-view.gob"
+static void
+mn_message_view_update_tabs (MNMessageView * self)
+#line 387 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::update_tabs"
+#line 121 "mn-message-view.gob"
+ g_return_if_fail (self != NULL);
+#line 121 "mn-message-view.gob"
+ g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
+#line 394 "mn-message-view.c"
+{
+#line 123 "mn-message-view.gob"
+
+ GSList *l;
+ int longest_header_len = 0;
+ PangoTabArray *tabs;
+
+ MN_LIST_FOREACH(l, selfp->messages)
+ {
+ MessageInfo *info = l->data;
+ GSList *m;
+
+ MN_LIST_FOREACH(m, info->header_marks)
+ {
+ GtkTextMark *mark = m->data;
+ GtkTextIter iter;
+ GdkRectangle rect;
+
+ gtk_text_buffer_get_iter_at_mark(selfp->buffer, &iter, mark);
+ gtk_text_view_get_iter_location(GTK_TEXT_VIEW(self), &iter, &rect);
+
+ if (rect.x > longest_header_len)
+ longest_header_len = rect.x;
+ }
+ }
+
+ tabs = pango_tab_array_new_with_positions(1, TRUE, PANGO_TAB_LEFT, longest_header_len + 12);
+ gtk_text_view_set_tabs(GTK_TEXT_VIEW(self), tabs);
+ pango_tab_array_free(tabs);
+ }}
+#line 425 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 152 "mn-message-view.gob"
+static void
+mn_message_view_style_set_h (GtkWidget * widget, GtkStyle * previous_style, gpointer user_data)
+#line 431 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::style_set_h"
+#line 152 "mn-message-view.gob"
+ g_return_if_fail (widget != NULL);
+#line 152 "mn-message-view.gob"
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+#line 438 "mn-message-view.c"
+{
+#line 156 "mn-message-view.gob"
+
+ Self *self = SELF(widget);
+
+ if (selfp->update_tabs_idle_id)
+ g_source_remove(selfp->update_tabs_idle_id);
+
+ selfp->update_tabs_idle_id = g_idle_add(self_update_tabs_cb, self);
+ }}
+#line 449 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 165 "mn-message-view.gob"
+static gboolean
+mn_message_view_update_tabs_cb (gpointer data)
+#line 455 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::update_tabs_cb"
+#line 165 "mn-message-view.gob"
+ g_return_val_if_fail (data != NULL, (gboolean )0);
+#line 460 "mn-message-view.c"
+{
+#line 167 "mn-message-view.gob"
+
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+ self_update_tabs(self);
+ selfp->update_tabs_idle_id = 0;
+ GDK_THREADS_LEAVE();
+
+ return FALSE; /* remove */
+ }}
+#line 473 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 178 "mn-message-view.gob"
+static void
+mn_message_view_realize_h (GtkWidget * widget, gpointer user_data)
+#line 479 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::realize_h"
+#line 178 "mn-message-view.gob"
+ g_return_if_fail (widget != NULL);
+#line 178 "mn-message-view.gob"
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+#line 486 "mn-message-view.c"
+{
+#line 180 "mn-message-view.gob"
+
+ Self *self = SELF(widget);
+ GtkStateType state;
+
+ if (selfp->transparent)
+ {
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_toplevel(widget);
+ g_return_if_fail(toplevel != NULL);
+ g_return_if_fail(toplevel->style != NULL);
+
+ for (state = GTK_STATE_NORMAL; state <= GTK_STATE_INSENSITIVE; state++)
+ gtk_widget_modify_base(widget, state, &toplevel->style->bg[state]);
+ }
+
+ if (! selfp->text_pointer)
+ {
+ GdkWindow *window;
+
+ window = gtk_text_view_get_window(GTK_TEXT_VIEW(self), GTK_TEXT_WINDOW_TEXT);
+ g_return_if_fail(window != NULL);
+
+ gdk_window_set_cursor(window, NULL);
+ }
+
+ g_return_if_fail(widget->style != NULL);
+ for (state = GTK_STATE_NORMAL; state <= GTK_STATE_INSENSITIVE; state++)
+ gtk_widget_modify_bg(widget, state, &widget->style->base[state]);
+ }}
+#line 519 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 211 "mn-message-view.gob"
+static void
+mn_message_view_message_info_free (MessageInfo * info)
+#line 525 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::message_info_free"
+#line 211 "mn-message-view.gob"
+ g_return_if_fail (info != NULL);
+#line 530 "mn-message-view.c"
+{
+#line 213 "mn-message-view.gob"
+
+ GSList *l;
+
+ g_object_unref(info->message);
+
+ MN_LIST_FOREACH(l, info->header_marks)
+ gtk_text_buffer_delete_mark(gtk_text_mark_get_buffer(l->data), l->data);
+ g_slist_free(info->header_marks);
+
+ if (info->sent_start)
+ {
+ gtk_text_buffer_delete_mark(gtk_text_mark_get_buffer(info->sent_start), info->sent_start);
+ gtk_text_buffer_delete_mark(gtk_text_mark_get_buffer(info->sent_end), info->sent_end);
+ }
+
+ g_free(info->last_sent);
+ g_free(info);
+ }}
+#line 551 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 232 "mn-message-view.gob"
+static void
+___8_mn_message_view_finalize (GObject * object G_GNUC_UNUSED)
+#line 557 "mn-message-view.c"
+#define PARENT_HANDLER(___object) \
+ { if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
+{
+#define __GOB_FUNCTION__ "MN:Message:View::finalize"
+#line 232 "mn-message-view.gob"
+ g_return_if_fail (object != NULL);
+#line 232 "mn-message-view.gob"
+ g_return_if_fail (G_IS_OBJECT (object));
+#line 567 "mn-message-view.c"
+{
+#line 234 "mn-message-view.gob"
+
+ Self *self = SELF(object);
+
+ if (selfp->update_tabs_idle_id)
+ g_source_remove(selfp->update_tabs_idle_id);
+ if (selfp->update_sent_timeout_id)
+ g_source_remove(selfp->update_sent_timeout_id);
+
+ eel_g_slist_free_deep_custom(selfp->messages, (GFunc) self_message_info_free, NULL);
+ g_object_unref(selfp->buffer);
+
+ PARENT_HANDLER(object);
+ }}
+#line 583 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 248 "mn-message-view.gob"
+static gboolean
+mn_message_view_update_sent_cb (gpointer data)
+#line 590 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::update_sent_cb"
+#line 248 "mn-message-view.gob"
+ g_return_val_if_fail (data != NULL, (gboolean )0);
+#line 595 "mn-message-view.c"
+{
+#line 250 "mn-message-view.gob"
+
+ Self *self = data;
+ GSList *l;
+
+ GDK_THREADS_ENTER();
+ MN_LIST_FOREACH(l, selfp->messages)
+ {
+ MessageInfo *info = l->data;
+
+ if (info->last_sent)
+ {
+ char *sent;
+
+ sent = mn_message_format_sent_time(info->message);
+ if (! sent || strcmp(sent, info->last_sent))
+ {
+ GtkTextIter start;
+ GtkTextIter end;
+
+ gtk_text_buffer_get_iter_at_mark(selfp->buffer, &start, info->sent_start);
+ gtk_text_buffer_get_iter_at_mark(selfp->buffer, &end, info->sent_end);
+
+ gtk_text_buffer_delete(selfp->buffer, &start, &end);
+
+ if (sent)
+ {
+ gtk_text_buffer_insert(selfp->buffer, &end, sent, -1);
+ gtk_text_buffer_move_mark(selfp->buffer, info->sent_end, &end);
+ }
+
+ g_free(info->last_sent);
+ info->last_sent = sent;
+ }
+ else
+ g_free(sent);
+ }
+ }
+ GDK_THREADS_LEAVE();
+
+ return TRUE; /* continue */
+ }}
+#line 639 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 292 "mn-message-view.gob"
+static void
+mn_message_view_clear (MNMessageView * self)
+#line 645 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::clear"
+#line 292 "mn-message-view.gob"
+ g_return_if_fail (self != NULL);
+#line 292 "mn-message-view.gob"
+ g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
+#line 652 "mn-message-view.c"
+{
+#line 294 "mn-message-view.gob"
+
+ GtkTextIter start;
+ GtkTextIter end;
+
+ gtk_text_buffer_get_start_iter(selfp->buffer, &start);
+ gtk_text_buffer_get_end_iter(selfp->buffer, &end);
+ gtk_text_buffer_delete(selfp->buffer, &start, &end);
+ }}
+#line 663 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 303 "mn-message-view.gob"
+static MessageInfo *
+mn_message_view_append_message (MNMessageView * self, MNMessage * message)
+#line 669 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::append_message"
+#line 303 "mn-message-view.gob"
+ g_return_val_if_fail (self != NULL, (MessageInfo * )0);
+#line 303 "mn-message-view.gob"
+ g_return_val_if_fail (MN_IS_MESSAGE_VIEW (self), (MessageInfo * )0);
+#line 303 "mn-message-view.gob"
+ g_return_val_if_fail (message != NULL, (MessageInfo * )0);
+#line 303 "mn-message-view.gob"
+ g_return_val_if_fail (MN_IS_MESSAGE (message), (MessageInfo * )0);
+#line 680 "mn-message-view.c"
+{
+#line 305 "mn-message-view.gob"
+
+ MessageInfo *info;
+
+ info = g_new0(MessageInfo, 1);
+ info->message = g_object_ref(message);
+
+ self_append_row(self,
+ _("Mailbox"),
+ message->mailbox_uri->human_readable,
+ &info->header_marks,
+ NULL,
+ NULL);
+ self_append(self, "\n");
+
+ if (message->error)
+ self_append_row(self,
+ _("Unreadable message"),
+ message->error,
+ &info->header_marks,
+ NULL,
+ NULL);
+ else
+ {
+ self_append_row(self,
+ _("From"),
+ message->from,
+ &info->header_marks,
+ NULL,
+ NULL);
+ self_append(self, "\n");
+
+ self_append_row(self,
+ _("Subject"),
+ message->subject,
+ &info->header_marks,
+ NULL,
+ NULL);
+
+ info->last_sent = mn_message_format_sent_time(message);
+ if (info->last_sent)
+ {
+ self_append(self, "\n");
+ self_append_row(self,
+ _("Sent"),
+ info->last_sent,
+ &info->header_marks,
+ &info->sent_start,
+ &info->sent_end);
+ }
+ }
+
+ selfp->messages = g_slist_append(selfp->messages, info);
+
+ return info;
+ }}
+#line 738 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 361 "mn-message-view.gob"
+static void
+mn_message_view_append (MNMessageView * self, const char * text)
+#line 744 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::append"
+#line 361 "mn-message-view.gob"
+ g_return_if_fail (self != NULL);
+#line 361 "mn-message-view.gob"
+ g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
+#line 361 "mn-message-view.gob"
+ g_return_if_fail (text != NULL);
+#line 753 "mn-message-view.c"
+{
+#line 363 "mn-message-view.gob"
+
+ GtkTextIter end;
+
+ gtk_text_buffer_get_end_iter(selfp->buffer, &end);
+ gtk_text_buffer_insert(selfp->buffer, &end, text, -1);
+ }}
+#line 762 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 370 "mn-message-view.gob"
+static void
+mn_message_view_append_row (MNMessageView * self, const char * name, const char * value, GSList ** header_marks, GtkTextMark ** value_start_mark, GtkTextMark ** value_end_mark)
+#line 768 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::append_row"
+#line 370 "mn-message-view.gob"
+ g_return_if_fail (self != NULL);
+#line 370 "mn-message-view.gob"
+ g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
+#line 370 "mn-message-view.gob"
+ g_return_if_fail (name != NULL);
+#line 370 "mn-message-view.gob"
+ g_return_if_fail (value != NULL);
+#line 370 "mn-message-view.gob"
+ g_return_if_fail (header_marks != NULL);
+#line 781 "mn-message-view.c"
+{
+#line 377 "mn-message-view.gob"
+
+ GtkTextIter end;
+
+ gtk_text_buffer_get_end_iter(selfp->buffer, &end);
+
+ gtk_text_buffer_insert_with_tags(selfp->buffer, &end, name, -1, selfp->header_tag, NULL);
+ gtk_text_buffer_insert_with_tags(selfp->buffer, &end, ":", -1, selfp->header_tag, NULL);
+
+ *header_marks = g_slist_append(*header_marks, gtk_text_buffer_create_mark(selfp->buffer, NULL, &end, TRUE));
+ gtk_text_buffer_insert(selfp->buffer, &end, "\t", -1);
+
+ if (value_start_mark)
+ *value_start_mark = gtk_text_buffer_create_mark(selfp->buffer, NULL, &end, TRUE);
+
+ gtk_text_buffer_insert(selfp->buffer, &end, value, -1);
+
+ if (value_end_mark)
+ *value_end_mark = gtk_text_buffer_create_mark(selfp->buffer, NULL, &end, TRUE);
+ }}
+#line 803 "mn-message-view.c"
+#undef __GOB_FUNCTION__
+
+#line 397 "mn-message-view.gob"
+GtkWidget *
+mn_message_view_new (gboolean transparent, gboolean text_pointer)
+#line 809 "mn-message-view.c"
+{
+#define __GOB_FUNCTION__ "MN:Message:View::new"
+{
+#line 399 "mn-message-view.gob"
+
+ return GTK_WIDGET(GET_NEW_VARG(MN_MESSAGE_VIEW_PROP_TRANSPARENT(transparent),
+ MN_MESSAGE_VIEW_PROP_TEXT_POINTER(text_pointer),
+ NULL));
+ }}
+#line 819 "mn-message-view.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-message-view.gob b/src/mn-message-view.gob
@@ -0,0 +1,404 @@
+/*
+ * Copyright (C) 2005 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.
+ */
+
+requires 2.0.10
+
+%headertop{
+#include <gtk/gtk.h>
+%}
+%{
+#include "config.h"
+#include <glib/gi18n.h>
+#include <eel/eel.h>
+#include "mn-message.h"
+#include "mn-util.h"
+
+ typedef struct
+ {
+ MNMessage *message;
+ GSList *header_marks;
+ char *last_sent;
+ GtkTextMark *sent_start;
+ GtkTextMark *sent_end;
+ } MessageInfo;
+%}
+
+class MN:Message:View from Gtk:Text:View
+{
+ private GtkTextBuffer *buffer;
+ private GtkTextTag *header_tag;
+ private unsigned int update_tabs_idle_id;
+ private unsigned int update_sent_timeout_id;
+
+ private gboolean transparent;
+ property BOOLEAN transparent (flags = CONSTRUCT_ONLY, link);
+
+ private gboolean text_pointer;
+ property BOOLEAN text_pointer (flags = CONSTRUCT_ONLY, link);
+
+ private GSList *messages;
+ property POINTER messages (export)
+ set
+ {
+ GSList *messages;
+ MessageInfo *info;
+ GSList *l;
+ gboolean need_updates = FALSE;
+
+ eel_g_slist_free_deep_custom(selfp->messages, (GFunc) self_message_info_free, NULL);
+ selfp->messages = NULL;
+
+ self_clear(self);
+
+ messages = g_value_get_pointer(VAL);
+ if (messages)
+ MN_LIST_FOREACH(l, messages)
+ {
+ info = self_append_message(self, l->data);
+
+ if (info->last_sent)
+ need_updates = TRUE;
+
+ if (l->next)
+ self_append(self, "\n\n");
+ }
+ else
+ self_append(self, _("You have no new mail."));
+
+ self_update_tabs(self);
+
+ if (need_updates)
+ {
+ if (! selfp->update_sent_timeout_id)
+ selfp->update_sent_timeout_id = g_timeout_add(500, self_update_sent_cb, self);
+ }
+ else
+ mn_source_remove(&selfp->update_sent_timeout_id);
+ };
+
+ override (G:Object) GObject *
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
+ {
+ GObject *object;
+ Self *self;
+
+ object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+ self = SELF(object);
+
+ selfp->buffer = gtk_text_buffer_new(NULL);
+ selfp->header_tag = gtk_text_buffer_create_tag(selfp->buffer,
+ NULL,
+ "weight", PANGO_WEIGHT_BOLD,
+ NULL);
+
+ gtk_text_view_set_buffer(GTK_TEXT_VIEW(self), selfp->buffer);
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(self), FALSE);
+ gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(self), FALSE);
+
+ g_object_connect(self,
+ "signal-after::style-set", self_style_set_h, NULL,
+ "signal-after::realize", self_realize_h, NULL,
+ NULL);
+
+ return object;
+ }
+
+ private void
+ update_tabs (self)
+ {
+ GSList *l;
+ int longest_header_len = 0;
+ PangoTabArray *tabs;
+
+ MN_LIST_FOREACH(l, selfp->messages)
+ {
+ MessageInfo *info = l->data;
+ GSList *m;
+
+ MN_LIST_FOREACH(m, info->header_marks)
+ {
+ GtkTextMark *mark = m->data;
+ GtkTextIter iter;
+ GdkRectangle rect;
+
+ gtk_text_buffer_get_iter_at_mark(selfp->buffer, &iter, mark);
+ gtk_text_view_get_iter_location(GTK_TEXT_VIEW(self), &iter, &rect);
+
+ if (rect.x > longest_header_len)
+ longest_header_len = rect.x;
+ }
+ }
+
+ tabs = pango_tab_array_new_with_positions(1, TRUE, PANGO_TAB_LEFT, longest_header_len + 12);
+ gtk_text_view_set_tabs(GTK_TEXT_VIEW(self), tabs);
+ pango_tab_array_free(tabs);
+ }
+
+ private void
+ style_set_h (Gtk:Widget *widget (check null type),
+ GtkStyle *previous_style,
+ gpointer user_data)
+ {
+ Self *self = SELF(widget);
+
+ if (selfp->update_tabs_idle_id)
+ g_source_remove(selfp->update_tabs_idle_id);
+
+ selfp->update_tabs_idle_id = g_idle_add(self_update_tabs_cb, self);
+ }
+
+ private gboolean
+ update_tabs_cb (gpointer data (check null))
+ {
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+ self_update_tabs(self);
+ selfp->update_tabs_idle_id = 0;
+ GDK_THREADS_LEAVE();
+
+ return FALSE; /* remove */
+ }
+
+ private void
+ realize_h (Gtk:Widget *widget (check null type), gpointer user_data)
+ {
+ Self *self = SELF(widget);
+ GtkStateType state;
+
+ if (selfp->transparent)
+ {
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_toplevel(widget);
+ g_return_if_fail(toplevel != NULL);
+ g_return_if_fail(toplevel->style != NULL);
+
+ for (state = GTK_STATE_NORMAL; state <= GTK_STATE_INSENSITIVE; state++)
+ gtk_widget_modify_base(widget, state, &toplevel->style->bg[state]);
+ }
+
+ if (! selfp->text_pointer)
+ {
+ GdkWindow *window;
+
+ window = gtk_text_view_get_window(GTK_TEXT_VIEW(self), GTK_TEXT_WINDOW_TEXT);
+ g_return_if_fail(window != NULL);
+
+ gdk_window_set_cursor(window, NULL);
+ }
+
+ g_return_if_fail(widget->style != NULL);
+ for (state = GTK_STATE_NORMAL; state <= GTK_STATE_INSENSITIVE; state++)
+ gtk_widget_modify_bg(widget, state, &widget->style->base[state]);
+ }
+
+ private void
+ message_info_free (MessageInfo *info (check null))
+ {
+ GSList *l;
+
+ g_object_unref(info->message);
+
+ MN_LIST_FOREACH(l, info->header_marks)
+ gtk_text_buffer_delete_mark(gtk_text_mark_get_buffer(l->data), l->data);
+ g_slist_free(info->header_marks);
+
+ if (info->sent_start)
+ {
+ gtk_text_buffer_delete_mark(gtk_text_mark_get_buffer(info->sent_start), info->sent_start);
+ gtk_text_buffer_delete_mark(gtk_text_mark_get_buffer(info->sent_end), info->sent_end);
+ }
+
+ g_free(info->last_sent);
+ g_free(info);
+ }
+
+ override (G:Object) void
+ finalize (G:Object *object (check null type))
+ {
+ Self *self = SELF(object);
+
+ if (selfp->update_tabs_idle_id)
+ g_source_remove(selfp->update_tabs_idle_id);
+ if (selfp->update_sent_timeout_id)
+ g_source_remove(selfp->update_sent_timeout_id);
+
+ eel_g_slist_free_deep_custom(selfp->messages, (GFunc) self_message_info_free, NULL);
+ g_object_unref(selfp->buffer);
+
+ PARENT_HANDLER(object);
+ }
+
+ private gboolean
+ update_sent_cb (gpointer data (check null))
+ {
+ Self *self = data;
+ GSList *l;
+
+ GDK_THREADS_ENTER();
+ MN_LIST_FOREACH(l, selfp->messages)
+ {
+ MessageInfo *info = l->data;
+
+ if (info->last_sent)
+ {
+ char *sent;
+
+ sent = mn_message_format_sent_time(info->message);
+ if (! sent || strcmp(sent, info->last_sent))
+ {
+ GtkTextIter start;
+ GtkTextIter end;
+
+ gtk_text_buffer_get_iter_at_mark(selfp->buffer, &start, info->sent_start);
+ gtk_text_buffer_get_iter_at_mark(selfp->buffer, &end, info->sent_end);
+
+ gtk_text_buffer_delete(selfp->buffer, &start, &end);
+
+ if (sent)
+ {
+ gtk_text_buffer_insert(selfp->buffer, &end, sent, -1);
+ gtk_text_buffer_move_mark(selfp->buffer, info->sent_end, &end);
+ }
+
+ g_free(info->last_sent);
+ info->last_sent = sent;
+ }
+ else
+ g_free(sent);
+ }
+ }
+ GDK_THREADS_LEAVE();
+
+ return TRUE; /* continue */
+ }
+
+ private void
+ clear (self)
+ {
+ GtkTextIter start;
+ GtkTextIter end;
+
+ gtk_text_buffer_get_start_iter(selfp->buffer, &start);
+ gtk_text_buffer_get_end_iter(selfp->buffer, &end);
+ gtk_text_buffer_delete(selfp->buffer, &start, &end);
+ }
+
+ private MessageInfo *
+ append_message (self, MN:Message *message (check null type))
+ {
+ MessageInfo *info;
+
+ info = g_new0(MessageInfo, 1);
+ info->message = g_object_ref(message);
+
+ self_append_row(self,
+ _("Mailbox"),
+ message->mailbox_uri->human_readable,
+ &info->header_marks,
+ NULL,
+ NULL);
+ self_append(self, "\n");
+
+ if (message->error)
+ self_append_row(self,
+ _("Unreadable message"),
+ message->error,
+ &info->header_marks,
+ NULL,
+ NULL);
+ else
+ {
+ self_append_row(self,
+ _("From"),
+ message->from,
+ &info->header_marks,
+ NULL,
+ NULL);
+ self_append(self, "\n");
+
+ self_append_row(self,
+ _("Subject"),
+ message->subject,
+ &info->header_marks,
+ NULL,
+ NULL);
+
+ info->last_sent = mn_message_format_sent_time(message);
+ if (info->last_sent)
+ {
+ self_append(self, "\n");
+ self_append_row(self,
+ _("Sent"),
+ info->last_sent,
+ &info->header_marks,
+ &info->sent_start,
+ &info->sent_end);
+ }
+ }
+
+ selfp->messages = g_slist_append(selfp->messages, info);
+
+ return info;
+ }
+
+ private void
+ append (self, const char *text (check null))
+ {
+ GtkTextIter end;
+
+ gtk_text_buffer_get_end_iter(selfp->buffer, &end);
+ gtk_text_buffer_insert(selfp->buffer, &end, text, -1);
+ }
+
+ private void
+ append_row (self,
+ const char *name (check null),
+ const char *value (check null),
+ GSList **header_marks (check null),
+ GtkTextMark **value_start_mark,
+ GtkTextMark **value_end_mark)
+ {
+ GtkTextIter end;
+
+ gtk_text_buffer_get_end_iter(selfp->buffer, &end);
+
+ gtk_text_buffer_insert_with_tags(selfp->buffer, &end, name, -1, selfp->header_tag, NULL);
+ gtk_text_buffer_insert_with_tags(selfp->buffer, &end, ":", -1, selfp->header_tag, NULL);
+
+ *header_marks = g_slist_append(*header_marks, gtk_text_buffer_create_mark(selfp->buffer, NULL, &end, TRUE));
+ gtk_text_buffer_insert(selfp->buffer, &end, "\t", -1);
+
+ if (value_start_mark)
+ *value_start_mark = gtk_text_buffer_create_mark(selfp->buffer, NULL, &end, TRUE);
+
+ gtk_text_buffer_insert(selfp->buffer, &end, value, -1);
+
+ if (value_end_mark)
+ *value_end_mark = gtk_text_buffer_create_mark(selfp->buffer, NULL, &end, TRUE);
+ }
+
+ public GtkWidget *
+ new (gboolean transparent, gboolean text_pointer)
+ {
+ return GTK_WIDGET(GET_NEW_VARG(MN_MESSAGE_VIEW_PROP_TRANSPARENT(transparent),
+ MN_MESSAGE_VIEW_PROP_TEXT_POINTER(text_pointer),
+ NULL));
+ }
+}
diff --git a/src/mn-message-view.h b/src/mn-message-view.h
@@ -0,0 +1,84 @@
+/* Generated by GOB (v2.0.11) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+
+#ifndef __MN_MESSAGE_VIEW_H__
+#define __MN_MESSAGE_VIEW_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_MESSAGE_VIEW (mn_message_view_get_type())
+#define MN_MESSAGE_VIEW(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_message_view_get_type(), MNMessageView)
+#define MN_MESSAGE_VIEW_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_message_view_get_type(), MNMessageView const)
+#define MN_MESSAGE_VIEW_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_message_view_get_type(), MNMessageViewClass)
+#define MN_IS_MESSAGE_VIEW(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_message_view_get_type ())
+
+#define MN_MESSAGE_VIEW_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_message_view_get_type(), MNMessageViewClass)
+
+/* Private structure type */
+typedef struct _MNMessageViewPrivate MNMessageViewPrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_MESSAGE_VIEW__
+#define __TYPEDEF_MN_MESSAGE_VIEW__
+typedef struct _MNMessageView MNMessageView;
+#endif
+struct _MNMessageView {
+ GtkTextView __parent__;
+ /*< private >*/
+ MNMessageViewPrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNMessageViewClass MNMessageViewClass;
+struct _MNMessageViewClass {
+ GtkTextViewClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_message_view_get_type (void);
+void mn_message_view_set_messages (MNMessageView * self,
+ gpointer val);
+GtkWidget * mn_message_view_new (gboolean transparent,
+ gboolean text_pointer);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_MESSAGE_VIEW_PROP_TRANSPARENT(arg) "transparent", __extension__ ({gboolean z = (arg); z;})
+#define MN_MESSAGE_VIEW_GET_PROP_TRANSPARENT(arg) "transparent", __extension__ ({gboolean *z = (arg); z;})
+#define MN_MESSAGE_VIEW_PROP_TEXT_POINTER(arg) "text_pointer", __extension__ ({gboolean z = (arg); z;})
+#define MN_MESSAGE_VIEW_GET_PROP_TEXT_POINTER(arg) "text_pointer", __extension__ ({gboolean *z = (arg); z;})
+#define MN_MESSAGE_VIEW_PROP_MESSAGES(arg) "messages", __extension__ ({gpointer z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_MESSAGE_VIEW_PROP_TRANSPARENT(arg) "transparent",(gboolean )(arg)
+#define MN_MESSAGE_VIEW_GET_PROP_TRANSPARENT(arg) "transparent",(gboolean *)(arg)
+#define MN_MESSAGE_VIEW_PROP_TEXT_POINTER(arg) "text_pointer",(gboolean )(arg)
+#define MN_MESSAGE_VIEW_GET_PROP_TEXT_POINTER(arg) "text_pointer",(gboolean *)(arg)
+#define MN_MESSAGE_VIEW_PROP_MESSAGES(arg) "messages",(gpointer )(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-message.c b/src/mn-message.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:11 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:28 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -48,7 +48,7 @@ static void ___object_set_property (GObject *object, guint property_id, const GV
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_message_init (MNMessage * o) G_GNUC_UNUSED;
static void mn_message_class_init (MNMessageClass * c) G_GNUC_UNUSED;
-static GObject * ___1_mn_message_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___1_mn_message_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static int mn_message_slist_find_by_id_compare_func (gconstpointer a, gconstpointer b) G_GNUC_UNUSED;
static int mn_message_slist_sort_by_sent_time_compare_func (gconstpointer a, gconstpointer b) G_GNUC_UNUSED;
@@ -66,6 +66,7 @@ enum {
static GObjectClass *parent_class = NULL;
/* Short form macros */
+#define self_format_sent_time mn_message_format_sent_time
#define self_new mn_message_new
#define self_new_from_error mn_message_new_from_error
#define self_slist_find_by_id mn_message_slist_find_by_id
@@ -124,7 +125,7 @@ ___dispose (GObject *obj_self)
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
#line 35 "mn-message.gob"
if(self->mailbox_uri) { g_object_unref ((gpointer) self->mailbox_uri); self->mailbox_uri = NULL; }
-#line 128 "mn-message.c"
+#line 129 "mn-message.c"
}
#undef __GOB_FUNCTION__
@@ -138,16 +139,16 @@ ___finalize(GObject *obj_self)
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
#line 41 "mn-message.gob"
if(self->error) { g_free ((gpointer) self->error); self->error = NULL; }
-#line 142 "mn-message.c"
+#line 143 "mn-message.c"
#line 49 "mn-message.gob"
if(self->id) { g_free ((gpointer) self->id); self->id = NULL; }
-#line 145 "mn-message.c"
+#line 146 "mn-message.c"
#line 53 "mn-message.gob"
if(self->from) { g_free ((gpointer) self->from); self->from = NULL; }
-#line 148 "mn-message.c"
+#line 149 "mn-message.c"
#line 57 "mn-message.gob"
if(self->subject) { g_free ((gpointer) self->subject); self->subject = NULL; }
-#line 151 "mn-message.c"
+#line 152 "mn-message.c"
}
#undef __GOB_FUNCTION__
@@ -167,7 +168,7 @@ mn_message_class_init (MNMessageClass * c G_GNUC_UNUSED)
#line 60 "mn-message.gob"
g_object_class->constructor = ___1_mn_message_constructor;
-#line 171 "mn-message.c"
+#line 172 "mn-message.c"
g_object_class->dispose = ___dispose;
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
@@ -251,42 +252,42 @@ ___object_set_property (GObject *object,
{
#line 36 "mn-message.gob"
{ GObject *___old = (GObject *)self->mailbox_uri; self->mailbox_uri = (MNURI *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
-#line 255 "mn-message.c"
+#line 256 "mn-message.c"
}
break;
case PROP_ERROR:
{
#line 42 "mn-message.gob"
{ char *old = self->error; self->error = g_value_dup_string (VAL); g_free (old); }
-#line 262 "mn-message.c"
+#line 263 "mn-message.c"
}
break;
case PROP_SENT_TIME:
{
#line 46 "mn-message.gob"
self->sent_time = g_value_get_ulong (VAL);
-#line 269 "mn-message.c"
+#line 270 "mn-message.c"
}
break;
case PROP_ID:
{
#line 50 "mn-message.gob"
{ char *old = self->id; self->id = g_value_dup_string (VAL); g_free (old); }
-#line 276 "mn-message.c"
+#line 277 "mn-message.c"
}
break;
case PROP_FROM:
{
#line 54 "mn-message.gob"
{ char *old = self->from; self->from = g_value_dup_string (VAL); g_free (old); }
-#line 283 "mn-message.c"
+#line 284 "mn-message.c"
}
break;
case PROP_SUBJECT:
{
#line 58 "mn-message.gob"
{ char *old = self->subject; self->subject = g_value_dup_string (VAL); g_free (old); }
-#line 290 "mn-message.c"
+#line 291 "mn-message.c"
}
break;
default:
@@ -317,42 +318,42 @@ ___object_get_property (GObject *object,
{
#line 36 "mn-message.gob"
g_value_set_object (VAL, (gpointer)self->mailbox_uri);
-#line 321 "mn-message.c"
+#line 322 "mn-message.c"
}
break;
case PROP_ERROR:
{
#line 42 "mn-message.gob"
g_value_set_string (VAL, self->error);
-#line 328 "mn-message.c"
+#line 329 "mn-message.c"
}
break;
case PROP_SENT_TIME:
{
#line 46 "mn-message.gob"
g_value_set_ulong (VAL, self->sent_time);
-#line 335 "mn-message.c"
+#line 336 "mn-message.c"
}
break;
case PROP_ID:
{
#line 50 "mn-message.gob"
g_value_set_string (VAL, self->id);
-#line 342 "mn-message.c"
+#line 343 "mn-message.c"
}
break;
case PROP_FROM:
{
#line 54 "mn-message.gob"
g_value_set_string (VAL, self->from);
-#line 349 "mn-message.c"
+#line 350 "mn-message.c"
}
break;
case PROP_SUBJECT:
{
#line 58 "mn-message.gob"
g_value_set_string (VAL, self->subject);
-#line 356 "mn-message.c"
+#line 357 "mn-message.c"
}
break;
default:
@@ -371,8 +372,8 @@ g_value_set_string (VAL, self->subject);
#line 60 "mn-message.gob"
static GObject *
-___1_mn_message_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 376 "mn-message.c"
+___1_mn_message_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 377 "mn-message.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -426,23 +427,82 @@ ___1_mn_message_constructor (GType type G_GNUC_UNUSED, guint n_construct_propert
return object;
}}
-#line 430 "mn-message.c"
+#line 431 "mn-message.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
#line 108 "mn-message.gob"
+char *
+mn_message_format_sent_time (MNMessage * self)
+#line 438 "mn-message.c"
+{
+#define __GOB_FUNCTION__ "MN:Message::format_sent_time"
+#line 108 "mn-message.gob"
+ g_return_val_if_fail (self != NULL, (char * )0);
+#line 108 "mn-message.gob"
+ g_return_val_if_fail (MN_IS_MESSAGE (self), (char * )0);
+#line 445 "mn-message.c"
+{
+#line 110 "mn-message.gob"
+
+ char *formatted = NULL;
+
+ if (self->sent_time)
+ {
+ time_t now;
+
+ now = mn_time();
+ if (now > 0)
+ {
+ time_t diff;
+
+ diff = now - self->sent_time;
+ if (diff >= 0)
+ {
+ if (diff < 60)
+ formatted = g_strdup_printf(ngettext("%i second ago", "%i seconds ago", diff), diff);
+ else if (diff < 60 * 60)
+ {
+ int minutes = diff / 60;
+ formatted = g_strdup_printf(ngettext("about %i minute ago", "about %i minutes ago", minutes), minutes);
+ }
+ else if (diff < 60 * 60 * 24)
+ {
+ int hours = diff / (60 * 60);
+ formatted = g_strdup_printf(ngettext("about %i hour ago", "about %i hours ago", hours), hours);
+ }
+ else if (diff < 60 * 60 * 24 * 7)
+ {
+ int days = diff / (60 * 60 * 24);
+ formatted = g_strdup_printf(ngettext("about %i day ago", "about %i days ago", days), days);
+ }
+ else
+ {
+ int weeks = diff / (60 * 60 * 24 * 7);
+ formatted = g_strdup_printf(ngettext("about %i week ago", "about %i weeks ago", weeks), weeks);
+ }
+ }
+ }
+ }
+
+ return formatted;
+ }}
+#line 491 "mn-message.c"
+#undef __GOB_FUNCTION__
+
+#line 154 "mn-message.gob"
MNMessage *
mn_message_new (MNURI * mailbox_uri, const char * error, time_t sent_time, const char * id, const char * from, const char * subject)
-#line 437 "mn-message.c"
+#line 497 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::new"
-#line 108 "mn-message.gob"
+#line 154 "mn-message.gob"
g_return_val_if_fail (mailbox_uri != NULL, (MNMessage * )0);
-#line 108 "mn-message.gob"
+#line 154 "mn-message.gob"
g_return_val_if_fail (MN_IS_URI (mailbox_uri), (MNMessage * )0);
-#line 444 "mn-message.c"
+#line 504 "mn-message.c"
{
-#line 115 "mn-message.gob"
+#line 161 "mn-message.gob"
return GET_NEW_VARG(MN_MESSAGE_PROP_MAILBOX_URI(G_OBJECT(mailbox_uri)),
MN_MESSAGE_PROP_ERROR((char *) error),
@@ -452,93 +512,93 @@ mn_message_new (MNURI * mailbox_uri, const char * error, time_t sent_time, const
MN_MESSAGE_PROP_SUBJECT((char *) subject),
NULL);
}}
-#line 456 "mn-message.c"
+#line 516 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 125 "mn-message.gob"
+#line 171 "mn-message.gob"
MNMessage *
mn_message_new_from_error (MNURI * mailbox_uri, const char * error)
-#line 462 "mn-message.c"
+#line 522 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::new_from_error"
-#line 125 "mn-message.gob"
+#line 171 "mn-message.gob"
g_return_val_if_fail (mailbox_uri != NULL, (MNMessage * )0);
-#line 125 "mn-message.gob"
+#line 171 "mn-message.gob"
g_return_val_if_fail (MN_IS_URI (mailbox_uri), (MNMessage * )0);
-#line 125 "mn-message.gob"
+#line 171 "mn-message.gob"
g_return_val_if_fail (error != NULL, (MNMessage * )0);
-#line 471 "mn-message.c"
+#line 531 "mn-message.c"
{
-#line 128 "mn-message.gob"
+#line 174 "mn-message.gob"
return self_new(mailbox_uri, error, 0, NULL, NULL, NULL);
}}
-#line 477 "mn-message.c"
+#line 537 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 132 "mn-message.gob"
+#line 178 "mn-message.gob"
GSList *
mn_message_slist_find_by_id (GSList * list, MNMessage * self)
-#line 483 "mn-message.c"
+#line 543 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::slist_find_by_id"
-#line 132 "mn-message.gob"
+#line 178 "mn-message.gob"
g_return_val_if_fail (self != NULL, (GSList * )0);
-#line 132 "mn-message.gob"
+#line 178 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (GSList * )0);
-#line 490 "mn-message.c"
+#line 550 "mn-message.c"
{
-#line 134 "mn-message.gob"
+#line 180 "mn-message.gob"
return g_slist_find_custom(list, self, self_slist_find_by_id_compare_func);
}}
-#line 496 "mn-message.c"
+#line 556 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 138 "mn-message.gob"
+#line 184 "mn-message.gob"
static int
mn_message_slist_find_by_id_compare_func (gconstpointer a, gconstpointer b)
-#line 502 "mn-message.c"
+#line 562 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::slist_find_by_id_compare_func"
{
-#line 140 "mn-message.gob"
+#line 186 "mn-message.gob"
Self *message_a = (Self *) a;
Self *message_b = (Self *) b;
return strcmp(message_a->id, message_b->id);
}}
-#line 513 "mn-message.c"
+#line 573 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 147 "mn-message.gob"
+#line 193 "mn-message.gob"
GSList *
mn_message_slist_sort_by_sent_time (GSList * list)
-#line 519 "mn-message.c"
+#line 579 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::slist_sort_by_sent_time"
{
-#line 149 "mn-message.gob"
+#line 195 "mn-message.gob"
return g_slist_sort(list, self_slist_sort_by_sent_time_compare_func);
}}
-#line 527 "mn-message.c"
+#line 587 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 153 "mn-message.gob"
+#line 199 "mn-message.gob"
static int
mn_message_slist_sort_by_sent_time_compare_func (gconstpointer a, gconstpointer b)
-#line 533 "mn-message.c"
+#line 593 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::slist_sort_by_sent_time_compare_func"
{
-#line 155 "mn-message.gob"
+#line 201 "mn-message.gob"
Self *message_a = (Self *) a;
Self *message_b = (Self *) b;
return message_a->sent_time - message_b->sent_time;
}}
-#line 544 "mn-message.c"
+#line 604 "mn-message.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-message.gob b/src/mn-message.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -58,7 +58,7 @@ class MN:Message from G:Object
property STRING subject (flags = CONSTRUCT_ONLY, link);
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
Self *self;
@@ -105,6 +105,52 @@ class MN:Message from G:Object
return object;
}
+ public char *
+ format_sent_time (self)
+ {
+ char *formatted = NULL;
+
+ if (self->sent_time)
+ {
+ time_t now;
+
+ now = mn_time();
+ if (now > 0)
+ {
+ time_t diff;
+
+ diff = now - self->sent_time;
+ if (diff >= 0)
+ {
+ if (diff < 60)
+ formatted = g_strdup_printf(ngettext("%i second ago", "%i seconds ago", diff), diff);
+ else if (diff < 60 * 60)
+ {
+ int minutes = diff / 60;
+ formatted = g_strdup_printf(ngettext("about %i minute ago", "about %i minutes ago", minutes), minutes);
+ }
+ else if (diff < 60 * 60 * 24)
+ {
+ int hours = diff / (60 * 60);
+ formatted = g_strdup_printf(ngettext("about %i hour ago", "about %i hours ago", hours), hours);
+ }
+ else if (diff < 60 * 60 * 24 * 7)
+ {
+ int days = diff / (60 * 60 * 24);
+ formatted = g_strdup_printf(ngettext("about %i day ago", "about %i days ago", days), days);
+ }
+ else
+ {
+ int weeks = diff / (60 * 60 * 24 * 7);
+ formatted = g_strdup_printf(ngettext("about %i week ago", "about %i weeks ago", weeks), weeks);
+ }
+ }
+ }
+ }
+
+ return formatted;
+ }
+
public MNMessage *
new (MN:URI *mailbox_uri (check null type),
const char *error,
diff --git a/src/mn-message.h b/src/mn-message.h
@@ -57,6 +57,7 @@ struct _MNMessageClass {
* Public methods
*/
GType mn_message_get_type (void);
+char * mn_message_format_sent_time (MNMessage * self);
MNMessage * mn_message_new (MNURI * mailbox_uri,
const char * error,
time_t sent_time,
diff --git a/src/mn-mh-mailbox.c b/src/mn-mh-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:09 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:26 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -31,11 +31,9 @@
#include "mn-mailbox-private.h"
#include "mn-vfs.h"
#include "mn-util.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
-#line 39 "mn-mh-mailbox.c"
+#line 37 "mn-mh-mailbox.c"
/* self casting macros */
#define SELF(x) MN_MH_MAILBOX(x)
#define SELF_CONST(x) MN_MH_MAILBOX_CONST(x)
@@ -52,7 +50,7 @@ typedef MNMHMailboxClass SelfClass;
/* here are local prototypes */
static void mn_mh_mailbox_init (MNMHMailbox * o) G_GNUC_UNUSED;
static void mn_mh_mailbox_class_init (MNMHMailboxClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_mh_mailbox_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_mh_mailbox_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static gboolean ___3_mn_mh_mailbox_impl_is (MNMailbox * dummy, MNURI * uri) G_GNUC_UNUSED;
static void ___4_mn_mh_mailbox_impl_check (MNMailbox * self) G_GNUC_UNUSED;
@@ -107,10 +105,10 @@ mn_mh_mailbox_init (MNMHMailbox * o G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "MN:MH:Mailbox::init"
}
#undef __GOB_FUNCTION__
-#line 40 "mn-mh-mailbox.gob"
+#line 38 "mn-mh-mailbox.gob"
static void
mn_mh_mailbox_class_init (MNMHMailboxClass * class G_GNUC_UNUSED)
-#line 114 "mn-mh-mailbox.c"
+#line 112 "mn-mh-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:MH:Mailbox::class_init"
GObjectClass *g_object_class = (GObjectClass *)class;
@@ -118,29 +116,29 @@ mn_mh_mailbox_class_init (MNMHMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-#line 45 "mn-mh-mailbox.gob"
+#line 43 "mn-mh-mailbox.gob"
g_object_class->constructor = ___2_mn_mh_mailbox_constructor;
-#line 84 "mn-mh-mailbox.gob"
+#line 67 "mn-mh-mailbox.gob"
mn_mailbox_class->impl_is = ___3_mn_mh_mailbox_impl_is;
-#line 101 "mn-mh-mailbox.gob"
+#line 84 "mn-mh-mailbox.gob"
mn_mailbox_class->impl_check = ___4_mn_mh_mailbox_impl_check;
-#line 128 "mn-mh-mailbox.c"
+#line 126 "mn-mh-mailbox.c"
{
-#line 41 "mn-mh-mailbox.gob"
+#line 39 "mn-mh-mailbox.gob"
MN_MAILBOX_CLASS(class)->format = "MH";
-#line 134 "mn-mh-mailbox.c"
+#line 132 "mn-mh-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 45 "mn-mh-mailbox.gob"
+#line 43 "mn-mh-mailbox.gob"
static GObject *
-___2_mn_mh_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 144 "mn-mh-mailbox.c"
+___2_mn_mh_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 142 "mn-mh-mailbox.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -148,7 +146,7 @@ ___2_mn_mh_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_prop
{
#define __GOB_FUNCTION__ "MN:MH:Mailbox::constructor"
{
-#line 47 "mn-mh-mailbox.gob"
+#line 45 "mn-mh-mailbox.gob"
GObject *object;
MNMailbox *self;
@@ -158,54 +156,39 @@ ___2_mn_mh_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_prop
GDK_THREADS_ENTER();
-#ifdef WITH_MIME
mn_mailbox_monitor(self,
self->uri->text,
GNOME_VFS_MONITOR_DIRECTORY,
MN_MAILBOX_MONITOR_EVENT_CHANGED
| MN_MAILBOX_MONITOR_EVENT_DELETED
| MN_MAILBOX_MONITOR_EVENT_CREATED);
-#else /* WITH_MIME */
- {
- char *sequences_uri;
-
- sequences_uri = g_build_path("/", self->uri->text, ".mh_sequences", NULL);
- mn_mailbox_monitor(self,
- 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);
- }
-#endif /* WITH_MIME */
gdk_flush();
GDK_THREADS_LEAVE();
return object;
}}
-#line 189 "mn-mh-mailbox.c"
+#line 172 "mn-mh-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 84 "mn-mh-mailbox.gob"
+#line 67 "mn-mh-mailbox.gob"
static gboolean
___3_mn_mh_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
-#line 196 "mn-mh-mailbox.c"
+#line 179 "mn-mh-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->impl_is)? \
(* MN_MAILBOX_CLASS(parent_class)->impl_is)(___dummy,___uri): \
((gboolean )0))
{
#define __GOB_FUNCTION__ "MN:MH:Mailbox::impl_is"
-#line 84 "mn-mh-mailbox.gob"
+#line 67 "mn-mh-mailbox.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 84 "mn-mh-mailbox.gob"
+#line 67 "mn-mh-mailbox.gob"
g_return_val_if_fail (MN_IS_URI (uri), (gboolean )0);
-#line 207 "mn-mh-mailbox.c"
+#line 190 "mn-mh-mailbox.c"
{
-#line 86 "mn-mh-mailbox.gob"
+#line 69 "mn-mh-mailbox.gob"
gboolean is = FALSE;
@@ -220,26 +203,26 @@ ___3_mn_mh_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
return is;
}}
-#line 224 "mn-mh-mailbox.c"
+#line 207 "mn-mh-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 101 "mn-mh-mailbox.gob"
+#line 84 "mn-mh-mailbox.gob"
static void
___4_mn_mh_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
-#line 231 "mn-mh-mailbox.c"
+#line 214 "mn-mh-mailbox.c"
#define PARENT_HANDLER(___self) \
{ if(MN_MAILBOX_CLASS(parent_class)->impl_check) \
(* MN_MAILBOX_CLASS(parent_class)->impl_check)(___self); }
{
#define __GOB_FUNCTION__ "MN:MH:Mailbox::impl_check"
-#line 101 "mn-mh-mailbox.gob"
+#line 84 "mn-mh-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 101 "mn-mh-mailbox.gob"
+#line 84 "mn-mh-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 241 "mn-mh-mailbox.c"
+#line 224 "mn-mh-mailbox.c"
{
-#line 103 "mn-mh-mailbox.gob"
+#line 86 "mn-mh-mailbox.gob"
GnomeVFSURI *sequences_uri;
GnomeVFSResult result;
@@ -253,17 +236,12 @@ ___4_mn_mh_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
{
MNVFSReadLineContext *context = NULL;
const char *line;
-#ifdef WITH_MIME
GSList *messages = NULL;
-#else
- gboolean has_new = FALSE;
-#endif
while ((result = mn_vfs_read_line(&context, handle, &line)) == GNOME_VFS_OK)
if (g_str_has_prefix(line, "unseen: "))
{
int first;
-#ifdef WITH_MIME
char **elements;
int i;
@@ -296,14 +274,6 @@ ___4_mn_mh_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
}
}
g_strfreev(elements);
-
-#else /* WITH_MIME */
- if (sscanf(line, "unseen: %d", &first) == 1)
- {
- has_new = TRUE;
- break;
- }
-#endif /* WITH_MIME */
}
mn_vfs_read_line_context_free(context);
@@ -312,23 +282,14 @@ ___4_mn_mh_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
GDK_THREADS_ENTER();
if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF)
- {
-#ifdef WITH_MIME
- mn_mailbox_set_has_new(self, messages != NULL);
- mn_mailbox_set_messages(self, messages);
-#else /* WITH_MIME */
- mn_mailbox_set_has_new(self, has_new);
-#endif
- }
+ mn_mailbox_set_messages(self, messages);
else
mn_mailbox_set_error(self, _("error while reading .mh_sequences: %s"), gnome_vfs_result_to_string(result));
gdk_flush();
GDK_THREADS_LEAVE();
-#ifdef WITH_MIME
mn_g_object_slist_free(messages);
-#endif
}
else
{
@@ -343,6 +304,6 @@ ___4_mn_mh_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
gdk_flush();
GDK_THREADS_LEAVE();
}}
-#line 347 "mn-mh-mailbox.c"
+#line 308 "mn-mh-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-mh-mailbox.gob b/src/mn-mh-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -30,9 +30,7 @@ requires 2.0.10
#include "mn-mailbox-private.h"
#include "mn-vfs.h"
#include "mn-util.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
%}
class MN:MH:Mailbox from MN:Mailbox
@@ -43,7 +41,7 @@ class MN:MH:Mailbox from MN:Mailbox
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
MNMailbox *self;
@@ -53,27 +51,12 @@ class MN:MH:Mailbox from MN:Mailbox
GDK_THREADS_ENTER();
-#ifdef WITH_MIME
mn_mailbox_monitor(self,
self->uri->text,
GNOME_VFS_MONITOR_DIRECTORY,
MN_MAILBOX_MONITOR_EVENT_CHANGED
| MN_MAILBOX_MONITOR_EVENT_DELETED
| MN_MAILBOX_MONITOR_EVENT_CREATED);
-#else /* WITH_MIME */
- {
- char *sequences_uri;
-
- sequences_uri = g_build_path("/", self->uri->text, ".mh_sequences", NULL);
- mn_mailbox_monitor(self,
- 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);
- }
-#endif /* WITH_MIME */
gdk_flush();
GDK_THREADS_LEAVE();
@@ -113,17 +96,12 @@ class MN:MH:Mailbox from MN:Mailbox
{
MNVFSReadLineContext *context = NULL;
const char *line;
-#ifdef WITH_MIME
GSList *messages = NULL;
-#else
- gboolean has_new = FALSE;
-#endif
while ((result = mn_vfs_read_line(&context, handle, &line)) == GNOME_VFS_OK)
if (g_str_has_prefix(line, "unseen: "))
{
int first;
-#ifdef WITH_MIME
char **elements;
int i;
@@ -156,14 +134,6 @@ class MN:MH:Mailbox from MN:Mailbox
}
}
g_strfreev(elements);
-
-#else /* WITH_MIME */
- if (sscanf(line, "unseen: %d", &first) == 1)
- {
- has_new = TRUE;
- break;
- }
-#endif /* WITH_MIME */
}
mn_vfs_read_line_context_free(context);
@@ -172,23 +142,14 @@ class MN:MH:Mailbox from MN:Mailbox
GDK_THREADS_ENTER();
if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF)
- {
-#ifdef WITH_MIME
- mn_mailbox_set_has_new(self, messages != NULL);
- mn_mailbox_set_messages(self, messages);
-#else /* WITH_MIME */
- mn_mailbox_set_has_new(self, has_new);
-#endif
- }
+ mn_mailbox_set_messages(self, messages);
else
mn_mailbox_set_error(self, _("error while reading .mh_sequences: %s"), gnome_vfs_result_to_string(result));
gdk_flush();
GDK_THREADS_LEAVE();
-#ifdef WITH_MIME
mn_g_object_slist_free(messages);
-#endif
}
else
{
diff --git a/src/mn-pending-mailbox.c b/src/mn-pending-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:11 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:28 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
diff --git a/src/mn-pending-mailbox.gob b/src/mn-pending-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-pi-mailbox-properties.c b/src/mn-pi-mailbox-properties.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -51,7 +51,7 @@ static void ___object_set_property (GObject *object, guint property_id, const GV
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_pi_mailbox_properties_init (MNPIMailboxProperties * o) G_GNUC_UNUSED;
static void mn_pi_mailbox_properties_class_init (MNPIMailboxPropertiesClass * c) G_GNUC_UNUSED;
-static GObject * ___1_mn_pi_mailbox_properties_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___1_mn_pi_mailbox_properties_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static void mn_pi_mailbox_properties_notify_expanded_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
static void mn_pi_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) G_GNUC_UNUSED;
@@ -140,9 +140,6 @@ ___dispose (GObject *obj_self)
#line 44 "mn-pi-mailbox-properties.gob"
if(self->size_group) { g_object_unref ((gpointer) self->size_group); self->size_group = NULL; }
#line 143 "mn-pi-mailbox-properties.c"
-#line 50 "mn-pi-mailbox-properties.gob"
- if(self->tooltips) { g_object_unref ((gpointer) self->tooltips); self->tooltips = NULL; }
-#line 146 "mn-pi-mailbox-properties.c"
}
#undef __GOB_FUNCTION__
@@ -150,9 +147,6 @@ static void
mn_pi_mailbox_properties_init (MNPIMailboxProperties * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::init"
-#line 50 "mn-pi-mailbox-properties.gob"
- o->tooltips = mn_gtk_tooltips_new();
-#line 156 "mn-pi-mailbox-properties.c"
}
#undef __GOB_FUNCTION__
static void
@@ -163,9 +157,9 @@ mn_pi_mailbox_properties_class_init (MNPIMailboxPropertiesClass * c G_GNUC_UNUSE
parent_class = g_type_class_ref (GTK_TYPE_VBOX);
-#line 57 "mn-pi-mailbox-properties.gob"
+#line 56 "mn-pi-mailbox-properties.gob"
g_object_class->constructor = ___1_mn_pi_mailbox_properties_constructor;
-#line 169 "mn-pi-mailbox-properties.c"
+#line 163 "mn-pi-mailbox-properties.c"
g_object_class->dispose = ___dispose;
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
@@ -199,7 +193,7 @@ ___object_set_property (GObject *object,
{
#line 45 "mn-pi-mailbox-properties.gob"
{ GObject *___old = (GObject *)self->size_group; self->size_group = (void *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
-#line 203 "mn-pi-mailbox-properties.c"
+#line 197 "mn-pi-mailbox-properties.c"
}
break;
default:
@@ -230,21 +224,21 @@ ___object_get_property (GObject *object,
{
#line 39 "mn-pi-mailbox-properties.gob"
-#line 234 "mn-pi-mailbox-properties.c"
+#line 228 "mn-pi-mailbox-properties.c"
}
break;
case PROP_LABEL:
{
#line 42 "mn-pi-mailbox-properties.gob"
g_value_set_string(VAL, SELF_GET_CLASS(self)->label);
-#line 241 "mn-pi-mailbox-properties.c"
+#line 235 "mn-pi-mailbox-properties.c"
}
break;
case PROP_SIZE_GROUP:
{
#line 45 "mn-pi-mailbox-properties.gob"
g_value_set_object (VAL, (gpointer)self->size_group);
-#line 248 "mn-pi-mailbox-properties.c"
+#line 242 "mn-pi-mailbox-properties.c"
}
break;
default:
@@ -261,10 +255,10 @@ g_value_set_object (VAL, (gpointer)self->size_group);
-#line 57 "mn-pi-mailbox-properties.gob"
+#line 56 "mn-pi-mailbox-properties.gob"
static GObject *
-___1_mn_pi_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 268 "mn-pi-mailbox-properties.c"
+___1_mn_pi_mailbox_properties_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 262 "mn-pi-mailbox-properties.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -272,7 +266,7 @@ ___1_mn_pi_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_con
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::constructor"
{
-#line 59 "mn-pi-mailbox-properties.gob"
+#line 58 "mn-pi-mailbox-properties.gob"
GObject *object;
Self *self;
@@ -380,27 +374,27 @@ ___1_mn_pi_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_con
return object;
}}
-#line 384 "mn-pi-mailbox-properties.c"
+#line 378 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 167 "mn-pi-mailbox-properties.gob"
+#line 166 "mn-pi-mailbox-properties.gob"
static void
mn_pi_mailbox_properties_notify_expanded_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-#line 391 "mn-pi-mailbox-properties.c"
+#line 385 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::notify_expanded_h"
-#line 167 "mn-pi-mailbox-properties.gob"
+#line 166 "mn-pi-mailbox-properties.gob"
g_return_if_fail (object != NULL);
-#line 167 "mn-pi-mailbox-properties.gob"
+#line 166 "mn-pi-mailbox-properties.gob"
g_return_if_fail (G_IS_OBJECT (object));
-#line 167 "mn-pi-mailbox-properties.gob"
+#line 166 "mn-pi-mailbox-properties.gob"
g_return_if_fail (pspec != NULL);
-#line 167 "mn-pi-mailbox-properties.gob"
+#line 166 "mn-pi-mailbox-properties.gob"
g_return_if_fail (user_data != NULL);
-#line 402 "mn-pi-mailbox-properties.c"
+#line 396 "mn-pi-mailbox-properties.c"
{
-#line 171 "mn-pi-mailbox-properties.gob"
+#line 170 "mn-pi-mailbox-properties.gob"
Self *self = user_data;
@@ -409,46 +403,46 @@ mn_pi_mailbox_properties_notify_expanded_h (GObject * object, GParamSpec * pspec
? GTK_SIZE_GROUP_HORIZONTAL
: GTK_SIZE_GROUP_NONE);
}}
-#line 413 "mn-pi-mailbox-properties.c"
+#line 407 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 180 "mn-pi-mailbox-properties.gob"
+#line 179 "mn-pi-mailbox-properties.gob"
void
mn_pi_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data)
-#line 419 "mn-pi-mailbox-properties.c"
+#line 413 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::entry_changed_h"
-#line 180 "mn-pi-mailbox-properties.gob"
+#line 179 "mn-pi-mailbox-properties.gob"
g_return_if_fail (editable != NULL);
-#line 180 "mn-pi-mailbox-properties.gob"
+#line 179 "mn-pi-mailbox-properties.gob"
g_return_if_fail (GTK_IS_EDITABLE (editable));
-#line 180 "mn-pi-mailbox-properties.gob"
+#line 179 "mn-pi-mailbox-properties.gob"
g_return_if_fail (user_data != NULL);
-#line 428 "mn-pi-mailbox-properties.c"
+#line 422 "mn-pi-mailbox-properties.c"
{
-#line 183 "mn-pi-mailbox-properties.gob"
+#line 182 "mn-pi-mailbox-properties.gob"
Self *self = user_data;
g_object_notify(G_OBJECT(self), "complete");
}}
-#line 435 "mn-pi-mailbox-properties.c"
+#line 429 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 188 "mn-pi-mailbox-properties.gob"
+#line 187 "mn-pi-mailbox-properties.gob"
static void
mn_pi_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data)
-#line 441 "mn-pi-mailbox-properties.c"
+#line 435 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::radio_toggled_h"
-#line 188 "mn-pi-mailbox-properties.gob"
+#line 187 "mn-pi-mailbox-properties.gob"
g_return_if_fail (togglebutton != NULL);
-#line 188 "mn-pi-mailbox-properties.gob"
+#line 187 "mn-pi-mailbox-properties.gob"
g_return_if_fail (GTK_IS_TOGGLE_BUTTON (togglebutton));
-#line 188 "mn-pi-mailbox-properties.gob"
+#line 187 "mn-pi-mailbox-properties.gob"
g_return_if_fail (user_data != NULL);
-#line 450 "mn-pi-mailbox-properties.c"
+#line 444 "mn-pi-mailbox-properties.c"
{
-#line 191 "mn-pi-mailbox-properties.gob"
+#line 190 "mn-pi-mailbox-properties.gob"
Self *self = user_data;
int i;
@@ -458,54 +452,54 @@ mn_pi_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpoint
g_object_notify(G_OBJECT(self), "complete");
}}
-#line 462 "mn-pi-mailbox-properties.c"
+#line 456 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 201 "mn-pi-mailbox-properties.gob"
+#line 200 "mn-pi-mailbox-properties.gob"
void
mn_pi_mailbox_properties_set_contents (MNPIMailboxProperties * self, gboolean ssl, gboolean inband_ssl, const char * username, const char * password, const char * authmech, const char * hostname, int port)
-#line 468 "mn-pi-mailbox-properties.c"
+#line 462 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::set_contents"
-#line 201 "mn-pi-mailbox-properties.gob"
+#line 200 "mn-pi-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 201 "mn-pi-mailbox-properties.gob"
+#line 200 "mn-pi-mailbox-properties.gob"
g_return_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self));
-#line 201 "mn-pi-mailbox-properties.gob"
+#line 200 "mn-pi-mailbox-properties.gob"
g_return_if_fail (username != NULL);
-#line 201 "mn-pi-mailbox-properties.gob"
+#line 200 "mn-pi-mailbox-properties.gob"
g_return_if_fail (hostname != NULL);
-#line 201 "mn-pi-mailbox-properties.gob"
+#line 200 "mn-pi-mailbox-properties.gob"
g_return_if_fail (port >= 0);
-#line 201 "mn-pi-mailbox-properties.gob"
+#line 200 "mn-pi-mailbox-properties.gob"
g_return_if_fail (port <= 0xFFFF);
-#line 483 "mn-pi-mailbox-properties.c"
+#line 477 "mn-pi-mailbox-properties.c"
{
-#line 210 "mn-pi-mailbox-properties.gob"
+#line 209 "mn-pi-mailbox-properties.gob"
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->conn_radio[ssl ? 2 : (inband_ssl ? 1 : 0)]), TRUE);
gtk_entry_set_text(GTK_ENTRY(self->username_entry), username);
- gtk_entry_set_text(GTK_ENTRY(self->password_entry), MN_POINTER_TO_STRING(password));
+ gtk_entry_set_text(GTK_ENTRY(self->password_entry), password ? password : "");
mn_auth_combo_box_set_active_mechanism(MN_AUTH_COMBO_BOX(self->auth_combo), (char *) authmech);
gtk_entry_set_text(GTK_ENTRY(self->hostname_entry), hostname);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(self->port_spin[ssl ? 2 : (inband_ssl ? 1 : 0)]), port);
}}
-#line 494 "mn-pi-mailbox-properties.c"
+#line 488 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 219 "mn-pi-mailbox-properties.gob"
+#line 218 "mn-pi-mailbox-properties.gob"
void
mn_pi_mailbox_properties_get_contents (MNPIMailboxProperties * self, gboolean * ssl, gboolean * inband_ssl, const char ** username, const char ** password, char ** authmech, const char ** hostname, int * port)
-#line 500 "mn-pi-mailbox-properties.c"
+#line 494 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::get_contents"
-#line 219 "mn-pi-mailbox-properties.gob"
+#line 218 "mn-pi-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 219 "mn-pi-mailbox-properties.gob"
+#line 218 "mn-pi-mailbox-properties.gob"
g_return_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self));
-#line 507 "mn-pi-mailbox-properties.c"
+#line 501 "mn-pi-mailbox-properties.c"
{
-#line 228 "mn-pi-mailbox-properties.gob"
+#line 227 "mn-pi-mailbox-properties.gob"
gboolean _ssl;
gboolean _inband_ssl;
@@ -524,7 +518,7 @@ mn_pi_mailbox_properties_get_contents (MNPIMailboxProperties * self, gboolean *
const char *_password;
_password = gtk_entry_get_text(GTK_ENTRY(self->password_entry));
- *password = MN_STRING_TO_POINTER(_password);
+ *password = *_password ? _password : NULL;
}
if (authmech)
*authmech = mn_auth_combo_box_get_active_mechanism(MN_AUTH_COMBO_BOX(self->auth_combo));
@@ -533,5 +527,5 @@ mn_pi_mailbox_properties_get_contents (MNPIMailboxProperties * self, gboolean *
if (port)
*port = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(self->port_spin[_ssl ? 2 : (_inband_ssl ? 1 : 0)]));
}}
-#line 537 "mn-pi-mailbox-properties.c"
+#line 531 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-pi-mailbox-properties.gob b/src/mn-pi-mailbox-properties.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -47,7 +47,6 @@ class MN:PI:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties)
protected GtkWidget *hostname_entry;
protected GtkWidget *username_entry;
protected GtkWidget *password_entry;
- protected GtkTooltips *tooltips = {mn_gtk_tooltips_new()} unrefwith g_object_unref;
protected GtkWidget *details_vbox;
protected GtkSizeGroup *details_size_group;
protected GtkWidget *conn_radio[3];
@@ -55,7 +54,7 @@ class MN:PI:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties)
protected GtkWidget *auth_combo;
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
Self *self;
@@ -210,7 +209,7 @@ class MN:PI:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties)
{
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->conn_radio[ssl ? 2 : (inband_ssl ? 1 : 0)]), TRUE);
gtk_entry_set_text(GTK_ENTRY(self->username_entry), username);
- gtk_entry_set_text(GTK_ENTRY(self->password_entry), MN_POINTER_TO_STRING(password));
+ gtk_entry_set_text(GTK_ENTRY(self->password_entry), password ? password : "");
mn_auth_combo_box_set_active_mechanism(MN_AUTH_COMBO_BOX(self->auth_combo), (char *) authmech);
gtk_entry_set_text(GTK_ENTRY(self->hostname_entry), hostname);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(self->port_spin[ssl ? 2 : (inband_ssl ? 1 : 0)]), port);
@@ -243,7 +242,7 @@ class MN:PI:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties)
const char *_password;
_password = gtk_entry_get_text(GTK_ENTRY(self->password_entry));
- *password = MN_STRING_TO_POINTER(_password);
+ *password = *_password ? _password : NULL;
}
if (authmech)
*authmech = mn_auth_combo_box_get_active_mechanism(MN_AUTH_COMBO_BOX(self->auth_combo));
diff --git a/src/mn-pi-mailbox-properties.h b/src/mn-pi-mailbox-properties.h
@@ -39,7 +39,6 @@ struct _MNPIMailboxProperties {
GtkWidget * hostname_entry; /* protected */
GtkWidget * username_entry; /* protected */
GtkWidget * password_entry; /* protected */
- GtkTooltips * tooltips; /* protected */
GtkWidget * details_vbox; /* protected */
GtkSizeGroup * details_size_group; /* protected */
GtkWidget * conn_radio[3]; /* protected */
diff --git a/src/mn-pop3-mailbox-private.h b/src/mn-pop3-mailbox-private.h
@@ -10,9 +10,9 @@ extern "C" {
#endif /* __cplusplus */
struct _MNPOP3MailboxPrivate {
-#line 124 "mn-pop3-mailbox.gob"
+#line 117 "mn-pop3-mailbox.gob"
int login_delay;
-#line 125 "mn-pop3-mailbox.gob"
+#line 118 "mn-pop3-mailbox.gob"
GTimer * authentication_timer;
#line 18 "mn-pop3-mailbox-private.h"
};
diff --git a/src/mn-pop3-mailbox-properties.c b/src/mn-pop3-mailbox-properties.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:09 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:26 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -32,8 +32,9 @@
#include "mn-auth-combo-box.h"
#include "mn-util.h"
#include "mn-pi-mailbox-properties-private.h"
+#include "mn-properties-dialog.h"
-#line 37 "mn-pop3-mailbox-properties.c"
+#line 38 "mn-pop3-mailbox-properties.c"
/* self casting macros */
#define SELF(x) MN_POP3_MAILBOX_PROPERTIES(x)
#define SELF_CONST(x) MN_POP3_MAILBOX_PROPERTIES_CONST(x)
@@ -51,7 +52,7 @@ typedef MNPOP3MailboxPropertiesClass SelfClass;
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_pop3_mailbox_properties_init (MNPOP3MailboxProperties * o) G_GNUC_UNUSED;
static void mn_pop3_mailbox_properties_class_init (MNPOP3MailboxPropertiesClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_pop3_mailbox_properties_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_pop3_mailbox_properties_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static gboolean mn_pop3_mailbox_properties_set_uri (MNMailboxProperties * properties, MNURI * uri) G_GNUC_UNUSED;
static MNURI * mn_pop3_mailbox_properties_get_uri (MNMailboxProperties * properties) G_GNUC_UNUSED;
@@ -75,7 +76,7 @@ ___MN_Mailbox_Properties_init (MNMailboxPropertiesIface *iface)
iface->set_uri = self_set_uri;
#line 116 "mn-pop3-mailbox-properties.gob"
iface->get_uri = self_get_uri;
-#line 79 "mn-pop3-mailbox-properties.c"
+#line 80 "mn-pop3-mailbox-properties.c"
}
GType
@@ -135,19 +136,19 @@ mn_pop3_mailbox_properties_init (MNPOP3MailboxProperties * o G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "MN:POP3:Mailbox:Properties::init"
}
#undef __GOB_FUNCTION__
-#line 62 "mn-pop3-mailbox-properties.gob"
+#line 63 "mn-pop3-mailbox-properties.gob"
static void
mn_pop3_mailbox_properties_class_init (MNPOP3MailboxPropertiesClass * class G_GNUC_UNUSED)
-#line 142 "mn-pop3-mailbox-properties.c"
+#line 143 "mn-pop3-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox:Properties::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
parent_class = g_type_class_ref (MN_TYPE_PI_MAILBOX_PROPERTIES);
-#line 71 "mn-pop3-mailbox-properties.gob"
+#line 72 "mn-pop3-mailbox-properties.gob"
g_object_class->constructor = ___2_mn_pop3_mailbox_properties_constructor;
-#line 151 "mn-pop3-mailbox-properties.c"
+#line 152 "mn-pop3-mailbox-properties.c"
g_object_class->get_property = ___object_get_property;
{
g_object_class_override_property (g_object_class,
@@ -155,7 +156,7 @@ mn_pop3_mailbox_properties_class_init (MNPOP3MailboxPropertiesClass * class G_GN
"complete");
}
{
-#line 63 "mn-pop3-mailbox-properties.gob"
+#line 64 "mn-pop3-mailbox-properties.gob"
MNPIMailboxPropertiesClass *pi_class = MN_PI_MAILBOX_PROPERTIES_CLASS(class);
@@ -163,7 +164,7 @@ mn_pop3_mailbox_properties_class_init (MNPOP3MailboxPropertiesClass * class G_GN
pi_class->default_port[0] = mn_uri_get_default_port("pop");
pi_class->default_port[1] = mn_uri_get_default_port("pops");
-#line 167 "mn-pop3-mailbox-properties.c"
+#line 168 "mn-pop3-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
@@ -182,7 +183,7 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_COMPLETE:
{
-#line 38 "mn-pop3-mailbox-properties.gob"
+#line 39 "mn-pop3-mailbox-properties.gob"
MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
gboolean complete;
@@ -206,7 +207,7 @@ ___object_get_property (GObject *object,
g_value_set_boolean(VAL, complete);
-#line 210 "mn-pop3-mailbox-properties.c"
+#line 211 "mn-pop3-mailbox-properties.c"
}
break;
default:
@@ -223,10 +224,10 @@ ___object_get_property (GObject *object,
-#line 71 "mn-pop3-mailbox-properties.gob"
+#line 72 "mn-pop3-mailbox-properties.gob"
static GObject *
-___2_mn_pop3_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 230 "mn-pop3-mailbox-properties.c"
+___2_mn_pop3_mailbox_properties_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 231 "mn-pop3-mailbox-properties.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -234,7 +235,7 @@ ___2_mn_pop3_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_c
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox:Properties::constructor"
{
-#line 73 "mn-pop3-mailbox-properties.gob"
+#line 74 "mn-pop3-mailbox-properties.gob"
GObject *object;
Self *self;
@@ -247,13 +248,12 @@ ___2_mn_pop3_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_c
mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+APOP", "APOP");
mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+USERPASS", "USER/PASS");
- mn_gtk_tooltips_set_tips(pi->tooltips,
- pi->hostname_entry, _("The hostname or IP address of the POP3 server"),
- pi->username_entry, _("Your username on the POP3 server"),
- pi->password_entry, _("Your password on the POP3 server (if left blank, you will be prompted for the password when needed)"),
- pi->port_spin[0], _("The port number of the POP3 server"),
- pi->port_spin[1], _("The port number of the POP3 server"),
- NULL);
+ mn_properties_dialog_set_tooltips(pi->hostname_entry, _("The hostname or IP address of the POP3 server"),
+ pi->username_entry, _("Your username on the POP3 server"),
+ pi->password_entry, _("Your password on the POP3 server (if left blank, you will be prompted for the password when needed)"),
+ pi->port_spin[0], _("The port number of the POP3 server"),
+ pi->port_spin[1], _("The port number of the POP3 server"),
+ NULL);
return object;
}}
diff --git a/src/mn-pop3-mailbox-properties.gob b/src/mn-pop3-mailbox-properties.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -29,6 +29,7 @@ requires 2.0.10
#include "mn-auth-combo-box.h"
#include "mn-util.h"
#include "mn-pi-mailbox-properties-private.h"
+#include "mn-properties-dialog.h"
%}
class MN:POP3:Mailbox:Properties from MN:PI:Mailbox:Properties (interface MN:Mailbox:Properties)
@@ -69,7 +70,7 @@ class MN:POP3:Mailbox:Properties from MN:PI:Mailbox:Properties (interface MN:Mai
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
Self *self;
@@ -82,13 +83,12 @@ class MN:POP3:Mailbox:Properties from MN:PI:Mailbox:Properties (interface MN:Mai
mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+APOP", "APOP");
mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+USERPASS", "USER/PASS");
- mn_gtk_tooltips_set_tips(pi->tooltips,
- pi->hostname_entry, _("The hostname or IP address of the POP3 server"),
- pi->username_entry, _("Your username on the POP3 server"),
- pi->password_entry, _("Your password on the POP3 server (if left blank, you will be prompted for the password when needed)"),
- pi->port_spin[0], _("The port number of the POP3 server"),
- pi->port_spin[1], _("The port number of the POP3 server"),
- NULL);
+ mn_properties_dialog_set_tooltips(pi->hostname_entry, _("The hostname or IP address of the POP3 server"),
+ pi->username_entry, _("Your username on the POP3 server"),
+ pi->password_entry, _("Your password on the POP3 server (if left blank, you will be prompted for the password when needed)"),
+ pi->port_spin[0], _("The port number of the POP3 server"),
+ pi->port_spin[1], _("The port number of the POP3 server"),
+ NULL);
return object;
}
diff --git a/src/mn-pop3-mailbox.c b/src/mn-pop3-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:09 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -37,9 +37,7 @@
#include "mn-client-session.h"
#include "mn-util.h"
#include "mn-md5.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
enum
{
@@ -54,12 +52,8 @@
STATE_APOP,
STATE_USER,
STATE_PASS,
-#ifdef WITH_MIME
STATE_LIST,
STATE_RETR,
-#else /* WITH_MIME */
- STATE_STAT,
-#endif
STATE_QUIT
};
@@ -76,6 +70,7 @@
MNPOP3Mailbox *self;
MNClientSession *session;
gboolean in_list;
+ gboolean in_retr;
char *apop_timestamp;
GSList *auth_mechanisms;
#ifdef WITH_SSL
@@ -87,12 +82,10 @@
#endif
gboolean authenticated;
gboolean login_delay_user;
-#ifdef WITH_MIME
GSList *message_numbers;
GSList *current_message_number;
GSList *messages;
GString *current_message;
-#endif
};
typedef enum
@@ -110,7 +103,7 @@
char *arguments;
};
-#line 114 "mn-pop3-mailbox.c"
+#line 107 "mn-pop3-mailbox.c"
/* self casting macros */
#define SELF(x) MN_POP3_MAILBOX(x)
#define SELF_CONST(x) MN_POP3_MAILBOX_CONST(x)
@@ -127,7 +120,7 @@ typedef MNPOP3MailboxClass SelfClass;
/* here are local prototypes */
static void mn_pop3_mailbox_init (MNPOP3Mailbox * o) G_GNUC_UNUSED;
static void mn_pop3_mailbox_class_init (MNPOP3MailboxClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_pop3_mailbox_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_pop3_mailbox_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static gboolean ___3_mn_pop3_mailbox_impl_is (MNMailbox * dummy, MNURI * uri) G_GNUC_UNUSED;
static int mn_pop3_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_pop3_mailbox_enter_capa_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
@@ -148,21 +141,19 @@ static int mn_pop3_mailbox_enter_list_cb (MNClientSession * session, MNClientSes
static int mn_pop3_mailbox_handle_list_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_pop3_mailbox_enter_retr_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_pop3_mailbox_handle_retr_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-static int mn_pop3_mailbox_enter_stat_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-static int mn_pop3_mailbox_handle_stat_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_pop3_mailbox_enter_quit_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_pop3_mailbox_handle_quit_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-static void ___1b_mn_pop3_mailbox_impl_check (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void ___19_mn_pop3_mailbox_impl_check (MNMailbox * mailbox) G_GNUC_UNUSED;
static void mn_pop3_mailbox_notice_cb (MNClientSession * session, const char * str, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
+static void mn_pop3_mailbox_warning_cb (MNClientSession * session, const char * str, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static MNClientSessionResponse * mn_pop3_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static void mn_pop3_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_pop3_mailbox_custom_handler_cb (MNClientSession * session, MNClientSessionResponse * response, int result, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_pop3_mailbox_session_authenticate (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static int mn_pop3_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_apop, gboolean tried_pass) G_GNUC_UNUSED;
static int mn_pop3_mailbox_session_authenticated (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-static int mn_pop3_mailbox_session_check_mail (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
static void mn_pop3_mailbox_session_set_error_from_arguments (MNClientSessionPrivate * priv, MNClientSessionResponse * response) G_GNUC_UNUSED;
-static void mn_pop3_mailbox_handle_list_response (MNClientSessionPrivate * priv, MNClientSessionResponse * response) G_GNUC_UNUSED;
+static void mn_pop3_mailbox_handle_list_response (MNClientSessionPrivate * priv, MNClientSessionResponse * response, gboolean retr) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNAuthenticatedMailboxClass *parent_class = NULL;
@@ -187,18 +178,16 @@ static MNAuthenticatedMailboxClass *parent_class = NULL;
#define self_handle_list_cb mn_pop3_mailbox_handle_list_cb
#define self_enter_retr_cb mn_pop3_mailbox_enter_retr_cb
#define self_handle_retr_cb mn_pop3_mailbox_handle_retr_cb
-#define self_enter_stat_cb mn_pop3_mailbox_enter_stat_cb
-#define self_handle_stat_cb mn_pop3_mailbox_handle_stat_cb
#define self_enter_quit_cb mn_pop3_mailbox_enter_quit_cb
#define self_handle_quit_cb mn_pop3_mailbox_handle_quit_cb
#define self_notice_cb mn_pop3_mailbox_notice_cb
+#define self_warning_cb mn_pop3_mailbox_warning_cb
#define self_response_new_cb mn_pop3_mailbox_response_new_cb
#define self_response_free_cb mn_pop3_mailbox_response_free_cb
#define self_custom_handler_cb mn_pop3_mailbox_custom_handler_cb
#define self_session_authenticate mn_pop3_mailbox_session_authenticate
#define self_session_authenticate_fallback mn_pop3_mailbox_session_authenticate_fallback
#define self_session_authenticated mn_pop3_mailbox_session_authenticated
-#define self_session_check_mail mn_pop3_mailbox_session_check_mail
#define self_session_set_error_from_arguments mn_pop3_mailbox_session_set_error_from_arguments
#define self_handle_list_response mn_pop3_mailbox_handle_list_response
GType
@@ -252,9 +241,9 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 125 "mn-pop3-mailbox.gob"
+#line 118 "mn-pop3-mailbox.gob"
if(self->_priv->authentication_timer) { g_timer_destroy ((gpointer) self->_priv->authentication_timer); self->_priv->authentication_timer = NULL; }
-#line 258 "mn-pop3-mailbox.c"
+#line 247 "mn-pop3-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -265,10 +254,10 @@ mn_pop3_mailbox_init (MNPOP3Mailbox * o G_GNUC_UNUSED)
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,TYPE_SELF,MNPOP3MailboxPrivate);
}
#undef __GOB_FUNCTION__
-#line 127 "mn-pop3-mailbox.gob"
+#line 120 "mn-pop3-mailbox.gob"
static void
mn_pop3_mailbox_class_init (MNPOP3MailboxClass * class G_GNUC_UNUSED)
-#line 272 "mn-pop3-mailbox.c"
+#line 261 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -278,30 +267,30 @@ mn_pop3_mailbox_class_init (MNPOP3MailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX);
-#line 132 "mn-pop3-mailbox.gob"
+#line 125 "mn-pop3-mailbox.gob"
g_object_class->constructor = ___2_mn_pop3_mailbox_constructor;
-#line 149 "mn-pop3-mailbox.gob"
+#line 142 "mn-pop3-mailbox.gob"
mn_mailbox_class->impl_is = ___3_mn_pop3_mailbox_impl_is;
-#line 672 "mn-pop3-mailbox.gob"
- mn_mailbox_class->impl_check = ___1b_mn_pop3_mailbox_impl_check;
-#line 288 "mn-pop3-mailbox.c"
+#line 602 "mn-pop3-mailbox.gob"
+ mn_mailbox_class->impl_check = ___19_mn_pop3_mailbox_impl_check;
+#line 277 "mn-pop3-mailbox.c"
g_object_class->finalize = ___finalize;
{
-#line 128 "mn-pop3-mailbox.gob"
+#line 121 "mn-pop3-mailbox.gob"
MN_MAILBOX_CLASS(class)->format = "POP3";
-#line 295 "mn-pop3-mailbox.c"
+#line 284 "mn-pop3-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 132 "mn-pop3-mailbox.gob"
+#line 125 "mn-pop3-mailbox.gob"
static GObject *
-___2_mn_pop3_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 305 "mn-pop3-mailbox.c"
+___2_mn_pop3_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 294 "mn-pop3-mailbox.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -309,7 +298,7 @@ ___2_mn_pop3_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_pr
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::constructor"
{
-#line 134 "mn-pop3-mailbox.gob"
+#line 127 "mn-pop3-mailbox.gob"
GObject *object;
MNMailbox *mailbox;
@@ -324,49 +313,49 @@ ___2_mn_pop3_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_pr
return object;
}}
-#line 328 "mn-pop3-mailbox.c"
+#line 317 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 149 "mn-pop3-mailbox.gob"
+#line 142 "mn-pop3-mailbox.gob"
static gboolean
___3_mn_pop3_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
-#line 335 "mn-pop3-mailbox.c"
+#line 324 "mn-pop3-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->impl_is)? \
(* MN_MAILBOX_CLASS(parent_class)->impl_is)(___dummy,___uri): \
((gboolean )0))
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::impl_is"
-#line 149 "mn-pop3-mailbox.gob"
+#line 142 "mn-pop3-mailbox.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 149 "mn-pop3-mailbox.gob"
+#line 142 "mn-pop3-mailbox.gob"
g_return_val_if_fail (MN_IS_URI (uri), (gboolean )0);
-#line 346 "mn-pop3-mailbox.c"
+#line 335 "mn-pop3-mailbox.c"
{
-#line 151 "mn-pop3-mailbox.gob"
+#line 144 "mn-pop3-mailbox.gob"
return MN_URI_IS_POP(uri);
}}
-#line 352 "mn-pop3-mailbox.c"
+#line 341 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 155 "mn-pop3-mailbox.gob"
+#line 148 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 359 "mn-pop3-mailbox.c"
+#line 348 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_greeting_cb"
-#line 155 "mn-pop3-mailbox.gob"
+#line 148 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 155 "mn-pop3-mailbox.gob"
+#line 148 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 155 "mn-pop3-mailbox.gob"
+#line 148 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 368 "mn-pop3-mailbox.c"
+#line 357 "mn-pop3-mailbox.c"
{
-#line 159 "mn-pop3-mailbox.gob"
+#line 152 "mn-pop3-mailbox.gob"
priv->session = session;
@@ -393,45 +382,45 @@ mn_pop3_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionRe
default: return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 397 "mn-pop3-mailbox.c"
+#line 386 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 186 "mn-pop3-mailbox.gob"
+#line 179 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_capa_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 403 "mn-pop3-mailbox.c"
+#line 392 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_capa_cb"
-#line 186 "mn-pop3-mailbox.gob"
+#line 179 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 186 "mn-pop3-mailbox.gob"
+#line 179 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 410 "mn-pop3-mailbox.c"
+#line 399 "mn-pop3-mailbox.c"
{
-#line 189 "mn-pop3-mailbox.gob"
+#line 182 "mn-pop3-mailbox.gob"
return mn_client_session_write(session, "CAPA");
}}
-#line 416 "mn-pop3-mailbox.c"
+#line 405 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 193 "mn-pop3-mailbox.gob"
+#line 186 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_capa_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 422 "mn-pop3-mailbox.c"
+#line 411 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_capa_cb"
-#line 193 "mn-pop3-mailbox.gob"
+#line 186 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 193 "mn-pop3-mailbox.gob"
+#line 186 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 193 "mn-pop3-mailbox.gob"
+#line 186 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 431 "mn-pop3-mailbox.c"
+#line 420 "mn-pop3-mailbox.c"
{
-#line 197 "mn-pop3-mailbox.gob"
+#line 190 "mn-pop3-mailbox.gob"
- self_handle_list_response(priv, response);
+ self_handle_list_response(priv, response, FALSE);
switch (response->type)
{
@@ -449,7 +438,7 @@ mn_pop3_mailbox_handle_capa_cb (MNClientSession * session, MNClientSessionRespon
case RESPONSE_ERR:
case RESPONSE_LIST_END:
if (priv->authenticated)
- return self_session_check_mail(priv);
+ return STATE_LIST;
#ifdef WITH_SSL
if (MN_URI_IS_INBAND_SSL(priv->mailbox->uri)
@@ -514,22 +503,22 @@ mn_pop3_mailbox_handle_capa_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 518 "mn-pop3-mailbox.c"
+#line 507 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 282 "mn-pop3-mailbox.gob"
+#line 275 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_stls_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 524 "mn-pop3-mailbox.c"
+#line 513 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_stls_cb"
-#line 282 "mn-pop3-mailbox.gob"
+#line 275 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 282 "mn-pop3-mailbox.gob"
+#line 275 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 531 "mn-pop3-mailbox.c"
+#line 520 "mn-pop3-mailbox.c"
{
-#line 285 "mn-pop3-mailbox.gob"
+#line 278 "mn-pop3-mailbox.gob"
#ifdef WITH_SSL
return mn_client_session_write(session, "STLS");
@@ -537,24 +526,24 @@ mn_pop3_mailbox_enter_stls_cb (MNClientSession * session, MNClientSessionPrivate
g_return_val_if_reached(0);
#endif /* WITH_SSL */
}}
-#line 541 "mn-pop3-mailbox.c"
+#line 530 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 293 "mn-pop3-mailbox.gob"
+#line 286 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_stls_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 547 "mn-pop3-mailbox.c"
+#line 536 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_stls_cb"
-#line 293 "mn-pop3-mailbox.gob"
+#line 286 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 293 "mn-pop3-mailbox.gob"
+#line 286 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 293 "mn-pop3-mailbox.gob"
+#line 286 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 556 "mn-pop3-mailbox.c"
+#line 545 "mn-pop3-mailbox.c"
{
-#line 297 "mn-pop3-mailbox.gob"
+#line 290 "mn-pop3-mailbox.gob"
#ifdef WITH_SSL
switch (response->type)
@@ -575,22 +564,22 @@ mn_pop3_mailbox_handle_stls_cb (MNClientSession * session, MNClientSessionRespon
g_return_val_if_reached(0);
#endif /* WITH_SSL */
}}
-#line 579 "mn-pop3-mailbox.c"
+#line 568 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 318 "mn-pop3-mailbox.gob"
+#line 311 "mn-pop3-mailbox.gob"
static const char *
mn_pop3_mailbox_sasl_get_username_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 585 "mn-pop3-mailbox.c"
+#line 574 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::sasl_get_username_cb"
-#line 318 "mn-pop3-mailbox.gob"
+#line 311 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (const char * )0);
-#line 318 "mn-pop3-mailbox.gob"
+#line 311 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (const char * )0);
-#line 592 "mn-pop3-mailbox.c"
+#line 581 "mn-pop3-mailbox.c"
{
-#line 321 "mn-pop3-mailbox.gob"
+#line 314 "mn-pop3-mailbox.gob"
#ifdef WITH_SASL
return priv->mailbox->uri->username;
@@ -598,22 +587,22 @@ mn_pop3_mailbox_sasl_get_username_cb (MNClientSession * session, MNClientSession
g_return_val_if_reached(NULL);
#endif /* WITH_SASL */
}}
-#line 602 "mn-pop3-mailbox.c"
+#line 591 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 329 "mn-pop3-mailbox.gob"
+#line 322 "mn-pop3-mailbox.gob"
static const char *
mn_pop3_mailbox_sasl_get_password_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 608 "mn-pop3-mailbox.c"
+#line 597 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::sasl_get_password_cb"
-#line 329 "mn-pop3-mailbox.gob"
+#line 322 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (const char * )0);
-#line 329 "mn-pop3-mailbox.gob"
+#line 322 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (const char * )0);
-#line 615 "mn-pop3-mailbox.c"
+#line 604 "mn-pop3-mailbox.c"
{
-#line 332 "mn-pop3-mailbox.gob"
+#line 325 "mn-pop3-mailbox.gob"
#ifdef WITH_SASL
mn_authenticated_mailbox_fill_password(priv->authenticated_mailbox);
@@ -622,22 +611,22 @@ mn_pop3_mailbox_sasl_get_password_cb (MNClientSession * session, MNClientSession
g_return_val_if_reached(NULL);
#endif /* WITH_SASL */
}}
-#line 626 "mn-pop3-mailbox.c"
+#line 615 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 341 "mn-pop3-mailbox.gob"
+#line 334 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_auth_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 632 "mn-pop3-mailbox.c"
+#line 621 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_auth_cb"
-#line 341 "mn-pop3-mailbox.gob"
+#line 334 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 341 "mn-pop3-mailbox.gob"
+#line 334 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 639 "mn-pop3-mailbox.c"
+#line 628 "mn-pop3-mailbox.c"
{
-#line 344 "mn-pop3-mailbox.gob"
+#line 337 "mn-pop3-mailbox.gob"
#ifdef WITH_SASL
if (mn_client_session_sasl_authentication_start(priv->session,
@@ -661,24 +650,24 @@ mn_pop3_mailbox_enter_auth_cb (MNClientSession * session, MNClientSessionPrivate
g_return_val_if_reached(0);
#endif /* WITH_SASL */
}}
-#line 665 "mn-pop3-mailbox.c"
+#line 654 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 368 "mn-pop3-mailbox.gob"
+#line 361 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_auth_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 671 "mn-pop3-mailbox.c"
+#line 660 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_auth_cb"
-#line 368 "mn-pop3-mailbox.gob"
+#line 361 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 368 "mn-pop3-mailbox.gob"
+#line 361 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 368 "mn-pop3-mailbox.gob"
+#line 361 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 680 "mn-pop3-mailbox.c"
+#line 669 "mn-pop3-mailbox.c"
{
-#line 372 "mn-pop3-mailbox.gob"
+#line 365 "mn-pop3-mailbox.gob"
#ifdef WITH_SASL
switch (response->type)
@@ -703,22 +692,22 @@ mn_pop3_mailbox_handle_auth_cb (MNClientSession * session, MNClientSessionRespon
g_return_val_if_reached(0);
#endif /* WITH_SASL */
}}
-#line 707 "mn-pop3-mailbox.c"
+#line 696 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 397 "mn-pop3-mailbox.gob"
+#line 390 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_apop_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 713 "mn-pop3-mailbox.c"
+#line 702 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_apop_cb"
-#line 397 "mn-pop3-mailbox.gob"
+#line 390 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 397 "mn-pop3-mailbox.gob"
+#line 390 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 720 "mn-pop3-mailbox.c"
+#line 709 "mn-pop3-mailbox.c"
{
-#line 400 "mn-pop3-mailbox.gob"
+#line 393 "mn-pop3-mailbox.gob"
MNMD5Context context;
char buf[33];
@@ -736,24 +725,24 @@ mn_pop3_mailbox_enter_apop_cb (MNClientSession * session, MNClientSessionPrivate
return mn_client_session_write(session, "APOP %s %s", priv->mailbox->uri->username, buf);
}}
-#line 740 "mn-pop3-mailbox.c"
+#line 729 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 418 "mn-pop3-mailbox.gob"
+#line 411 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_apop_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 746 "mn-pop3-mailbox.c"
+#line 735 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_apop_cb"
-#line 418 "mn-pop3-mailbox.gob"
+#line 411 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 418 "mn-pop3-mailbox.gob"
+#line 411 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 418 "mn-pop3-mailbox.gob"
+#line 411 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 755 "mn-pop3-mailbox.c"
+#line 744 "mn-pop3-mailbox.c"
{
-#line 422 "mn-pop3-mailbox.gob"
+#line 415 "mn-pop3-mailbox.gob"
switch (response->type)
{
@@ -767,43 +756,43 @@ mn_pop3_mailbox_handle_apop_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 771 "mn-pop3-mailbox.c"
+#line 760 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 436 "mn-pop3-mailbox.gob"
+#line 429 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_user_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 777 "mn-pop3-mailbox.c"
+#line 766 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_user_cb"
-#line 436 "mn-pop3-mailbox.gob"
+#line 429 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 436 "mn-pop3-mailbox.gob"
+#line 429 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 784 "mn-pop3-mailbox.c"
+#line 773 "mn-pop3-mailbox.c"
{
-#line 439 "mn-pop3-mailbox.gob"
+#line 432 "mn-pop3-mailbox.gob"
return mn_client_session_write(session, "USER %s", priv->mailbox->uri->username);
}}
-#line 790 "mn-pop3-mailbox.c"
+#line 779 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 443 "mn-pop3-mailbox.gob"
+#line 436 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_user_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 796 "mn-pop3-mailbox.c"
+#line 785 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_user_cb"
-#line 443 "mn-pop3-mailbox.gob"
+#line 436 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 443 "mn-pop3-mailbox.gob"
+#line 436 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 443 "mn-pop3-mailbox.gob"
+#line 436 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 805 "mn-pop3-mailbox.c"
+#line 794 "mn-pop3-mailbox.c"
{
-#line 447 "mn-pop3-mailbox.gob"
+#line 440 "mn-pop3-mailbox.gob"
switch (response->type)
{
@@ -817,22 +806,22 @@ mn_pop3_mailbox_handle_user_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 821 "mn-pop3-mailbox.c"
+#line 810 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 461 "mn-pop3-mailbox.gob"
+#line 454 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_pass_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 827 "mn-pop3-mailbox.c"
+#line 816 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_pass_cb"
-#line 461 "mn-pop3-mailbox.gob"
+#line 454 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 461 "mn-pop3-mailbox.gob"
+#line 454 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 834 "mn-pop3-mailbox.c"
+#line 823 "mn-pop3-mailbox.c"
{
-#line 464 "mn-pop3-mailbox.gob"
+#line 457 "mn-pop3-mailbox.gob"
mn_authenticated_mailbox_fill_password(priv->authenticated_mailbox);
if (! priv->authenticated_mailbox->password)
@@ -840,24 +829,24 @@ mn_pop3_mailbox_enter_pass_cb (MNClientSession * session, MNClientSessionPrivate
return mn_client_session_write(session, "PASS %s", priv->authenticated_mailbox->password);
}}
-#line 844 "mn-pop3-mailbox.c"
+#line 833 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 472 "mn-pop3-mailbox.gob"
+#line 465 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_pass_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 850 "mn-pop3-mailbox.c"
+#line 839 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_pass_cb"
-#line 472 "mn-pop3-mailbox.gob"
+#line 465 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 472 "mn-pop3-mailbox.gob"
+#line 465 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 472 "mn-pop3-mailbox.gob"
+#line 465 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 859 "mn-pop3-mailbox.c"
+#line 848 "mn-pop3-mailbox.c"
{
-#line 476 "mn-pop3-mailbox.gob"
+#line 469 "mn-pop3-mailbox.gob"
switch (response->type)
{
@@ -871,50 +860,45 @@ mn_pop3_mailbox_handle_pass_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 875 "mn-pop3-mailbox.c"
+#line 864 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 490 "mn-pop3-mailbox.gob"
+#line 483 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_list_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 881 "mn-pop3-mailbox.c"
+#line 870 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_list_cb"
-#line 490 "mn-pop3-mailbox.gob"
+#line 483 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 490 "mn-pop3-mailbox.gob"
+#line 483 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 888 "mn-pop3-mailbox.c"
+#line 877 "mn-pop3-mailbox.c"
{
-#line 493 "mn-pop3-mailbox.gob"
+#line 486 "mn-pop3-mailbox.gob"
-#ifdef WITH_MIME
return mn_client_session_write(session, "LIST");
-#else
- g_return_val_if_reached(0);
-#endif
}}
-#line 898 "mn-pop3-mailbox.c"
+#line 883 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 501 "mn-pop3-mailbox.gob"
+#line 490 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_list_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 904 "mn-pop3-mailbox.c"
+#line 889 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_list_cb"
-#line 501 "mn-pop3-mailbox.gob"
+#line 490 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 501 "mn-pop3-mailbox.gob"
+#line 490 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 501 "mn-pop3-mailbox.gob"
+#line 490 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 913 "mn-pop3-mailbox.c"
+#line 898 "mn-pop3-mailbox.c"
{
-#line 505 "mn-pop3-mailbox.gob"
+#line 494 "mn-pop3-mailbox.gob"
-#ifdef WITH_MIME
- self_handle_list_response(priv, response);
+ self_handle_list_response(priv, response, FALSE);
switch (response->type)
{
@@ -943,65 +927,56 @@ mn_pop3_mailbox_handle_list_cb (MNClientSession * session, MNClientSessionRespon
default:
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
-#else /* WITH_MIME */
- g_return_val_if_reached(0);
-#endif
}}
-#line 951 "mn-pop3-mailbox.c"
+#line 932 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 541 "mn-pop3-mailbox.gob"
+#line 526 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_retr_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 957 "mn-pop3-mailbox.c"
+#line 938 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_retr_cb"
-#line 541 "mn-pop3-mailbox.gob"
+#line 526 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 541 "mn-pop3-mailbox.gob"
+#line 526 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 964 "mn-pop3-mailbox.c"
+#line 945 "mn-pop3-mailbox.c"
{
-#line 544 "mn-pop3-mailbox.gob"
+#line 529 "mn-pop3-mailbox.gob"
-#ifdef WITH_MIME
if (priv->current_message_number)
return mn_client_session_write(session, "RETR %i", GPOINTER_TO_INT(priv->current_message_number->data));
else
{
GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, priv->messages != NULL);
mn_mailbox_set_messages(priv->mailbox, priv->messages);
gdk_flush();
GDK_THREADS_LEAVE();
return STATE_QUIT;
}
-#else
- g_return_val_if_reached(0);
-#endif
}}
-#line 985 "mn-pop3-mailbox.c"
+#line 961 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 563 "mn-pop3-mailbox.gob"
+#line 543 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_retr_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 991 "mn-pop3-mailbox.c"
+#line 967 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_retr_cb"
-#line 563 "mn-pop3-mailbox.gob"
+#line 543 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 563 "mn-pop3-mailbox.gob"
+#line 543 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 563 "mn-pop3-mailbox.gob"
+#line 543 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1000 "mn-pop3-mailbox.c"
+#line 976 "mn-pop3-mailbox.c"
{
-#line 567 "mn-pop3-mailbox.gob"
+#line 547 "mn-pop3-mailbox.gob"
-#ifdef WITH_MIME
- self_handle_list_response(priv, response);
+ self_handle_list_response(priv, response, TRUE);
switch (response->type)
{
@@ -1033,118 +1008,44 @@ mn_pop3_mailbox_handle_retr_cb (MNClientSession * session, MNClientSessionRespon
default:
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
-#else
- g_return_val_if_reached(0);
-#endif
}}
-#line 1041 "mn-pop3-mailbox.c"
+#line 1013 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 606 "mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_stat_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1047 "mn-pop3-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_stat_cb"
-#line 606 "mn-pop3-mailbox.gob"
- g_return_val_if_fail (session != NULL, (int )0);
-#line 606 "mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1054 "mn-pop3-mailbox.c"
-{
-#line 609 "mn-pop3-mailbox.gob"
-
-#ifndef WITH_MIME
- return mn_client_session_write(session, "STAT");
-#else
- g_return_val_if_reached(0);
-#endif
- }}
-#line 1064 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 617 "mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_stat_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1070 "mn-pop3-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_stat_cb"
-#line 617 "mn-pop3-mailbox.gob"
- g_return_val_if_fail (session != NULL, (int )0);
-#line 617 "mn-pop3-mailbox.gob"
- g_return_val_if_fail (response != NULL, (int )0);
-#line 617 "mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1079 "mn-pop3-mailbox.c"
-{
-#line 621 "mn-pop3-mailbox.gob"
-
-#ifndef WITH_MIME
- switch (response->type)
- {
- case RESPONSE_OK:
- {
- int count;
- int size;
-
- if (response->arguments && sscanf(response->arguments, "%d %d", &count, &size) == 2)
- {
- GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, count != 0);
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- return STATE_QUIT;
- }
- else /* compliance error */
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- break;
-
- case RESPONSE_ERR: return RESULT_ERROR_QUIT;
- default: return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
-#else /* ! WITH_MIME */
- g_return_val_if_reached(0);
-#endif
- }}
-#line 1112 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 652 "mn-pop3-mailbox.gob"
+#line 582 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_quit_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1118 "mn-pop3-mailbox.c"
+#line 1019 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_quit_cb"
-#line 652 "mn-pop3-mailbox.gob"
+#line 582 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 652 "mn-pop3-mailbox.gob"
+#line 582 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1125 "mn-pop3-mailbox.c"
+#line 1026 "mn-pop3-mailbox.c"
{
-#line 655 "mn-pop3-mailbox.gob"
+#line 585 "mn-pop3-mailbox.gob"
return mn_client_session_write(session, "QUIT");
}}
-#line 1131 "mn-pop3-mailbox.c"
+#line 1032 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 659 "mn-pop3-mailbox.gob"
+#line 589 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_quit_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1137 "mn-pop3-mailbox.c"
+#line 1038 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_quit_cb"
-#line 659 "mn-pop3-mailbox.gob"
+#line 589 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 659 "mn-pop3-mailbox.gob"
+#line 589 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 659 "mn-pop3-mailbox.gob"
+#line 589 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1146 "mn-pop3-mailbox.c"
+#line 1047 "mn-pop3-mailbox.c"
{
-#line 663 "mn-pop3-mailbox.gob"
+#line 593 "mn-pop3-mailbox.gob"
switch (response->type)
{
@@ -1153,25 +1054,25 @@ mn_pop3_mailbox_handle_quit_cb (MNClientSession * session, MNClientSessionRespon
default: return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 1157 "mn-pop3-mailbox.c"
+#line 1058 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 672 "mn-pop3-mailbox.gob"
+#line 602 "mn-pop3-mailbox.gob"
static void
-___1b_mn_pop3_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 1163 "mn-pop3-mailbox.c"
+___19_mn_pop3_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 1064 "mn-pop3-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->impl_check) \
(* MN_MAILBOX_CLASS(parent_class)->impl_check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::impl_check"
-#line 672 "mn-pop3-mailbox.gob"
+#line 602 "mn-pop3-mailbox.gob"
g_return_if_fail (mailbox != NULL);
-#line 672 "mn-pop3-mailbox.gob"
+#line 602 "mn-pop3-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1173 "mn-pop3-mailbox.c"
+#line 1074 "mn-pop3-mailbox.c"
{
-#line 674 "mn-pop3-mailbox.gob"
+#line 604 "mn-pop3-mailbox.gob"
Self *self = SELF(mailbox);
MNClientSessionState states[] = {
@@ -1186,18 +1087,15 @@ ___1b_mn_pop3_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
{ STATE_APOP, self_enter_apop_cb, self_handle_apop_cb },
{ STATE_USER, self_enter_user_cb, self_handle_user_cb },
{ STATE_PASS, self_enter_pass_cb, self_handle_pass_cb },
-#ifdef WITH_MIME
{ STATE_LIST, self_enter_list_cb, self_handle_list_cb },
{ STATE_RETR, self_enter_retr_cb, self_handle_retr_cb },
-#else /* WITH_MIME */
- { STATE_STAT, self_enter_stat_cb, self_handle_stat_cb },
-#endif
{ STATE_QUIT, self_enter_quit_cb, self_handle_quit_cb },
MN_CLIENT_SESSION_STATES_END
};
MNClientSessionCallbacks callbacks = {
self_notice_cb,
+ self_warning_cb,
self_response_new_cb,
self_response_free_cb,
self_custom_handler_cb,
@@ -1264,104 +1162,142 @@ ___1b_mn_pop3_mailbox_impl_check (MNMailbox * mailbox G_GNUC_UNUSED)
g_free(priv.apop_timestamp);
eel_g_slist_free_deep(priv.auth_mechanisms);
-#ifdef WITH_MIME
g_slist_free(priv.message_numbers);
mn_g_object_slist_free(priv.messages);
if (priv.current_message)
g_string_free(priv.current_message, TRUE);
-#endif
}}
-#line 1275 "mn-pop3-mailbox.c"
+#line 1171 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 774 "mn-pop3-mailbox.gob"
+#line 699 "mn-pop3-mailbox.gob"
static void
mn_pop3_mailbox_notice_cb (MNClientSession * session, const char * str, MNClientSessionPrivate * priv)
-#line 1282 "mn-pop3-mailbox.c"
+#line 1178 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::notice_cb"
-#line 774 "mn-pop3-mailbox.gob"
+#line 699 "mn-pop3-mailbox.gob"
g_return_if_fail (session != NULL);
-#line 774 "mn-pop3-mailbox.gob"
+#line 699 "mn-pop3-mailbox.gob"
g_return_if_fail (str != NULL);
-#line 774 "mn-pop3-mailbox.gob"
+#line 699 "mn-pop3-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1291 "mn-pop3-mailbox.c"
+#line 1187 "mn-pop3-mailbox.c"
{
-#line 778 "mn-pop3-mailbox.gob"
+#line 703 "mn-pop3-mailbox.gob"
mn_mailbox_notice(priv->mailbox, "%s", str);
}}
-#line 1297 "mn-pop3-mailbox.c"
+#line 1193 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 782 "mn-pop3-mailbox.gob"
+#line 707 "mn-pop3-mailbox.gob"
+static void
+mn_pop3_mailbox_warning_cb (MNClientSession * session, const char * str, MNClientSessionPrivate * priv)
+#line 1199 "mn-pop3-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:POP3:Mailbox::warning_cb"
+#line 707 "mn-pop3-mailbox.gob"
+ g_return_if_fail (session != NULL);
+#line 707 "mn-pop3-mailbox.gob"
+ g_return_if_fail (str != NULL);
+#line 707 "mn-pop3-mailbox.gob"
+ g_return_if_fail (priv != NULL);
+#line 1208 "mn-pop3-mailbox.c"
+{
+#line 711 "mn-pop3-mailbox.gob"
+
+ mn_mailbox_warning(priv->mailbox, "%s", str);
+ }}
+#line 1214 "mn-pop3-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 715 "mn-pop3-mailbox.gob"
static MNClientSessionResponse *
mn_pop3_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv)
-#line 1303 "mn-pop3-mailbox.c"
+#line 1220 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::response_new_cb"
-#line 782 "mn-pop3-mailbox.gob"
+#line 715 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (MNClientSessionResponse * )0);
-#line 782 "mn-pop3-mailbox.gob"
+#line 715 "mn-pop3-mailbox.gob"
g_return_val_if_fail (input != NULL, (MNClientSessionResponse * )0);
-#line 782 "mn-pop3-mailbox.gob"
+#line 715 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (MNClientSessionResponse * )0);
-#line 1312 "mn-pop3-mailbox.c"
+#line 1229 "mn-pop3-mailbox.c"
{
-#line 786 "mn-pop3-mailbox.gob"
+#line 719 "mn-pop3-mailbox.gob"
MNClientSessionResponse *response = NULL;
- if (priv->in_list)
- {
- response = g_new0(MNClientSessionResponse, 1);
- if (! strcmp(input, "."))
- response->type = RESPONSE_LIST_END;
- else if (g_str_has_prefix(input, ".."))
- {
- response->type = RESPONSE_LIST_ITEM;
- response->arguments = g_strdup(input + 1); /* skip the initial dot */
- }
- else
- {
- response->type = RESPONSE_LIST_ITEM;
- response->arguments = g_strdup(input);
- }
- }
- else
+ /*
+ * About character set handling:
+ *
+ * RFC 1939 3 specifies that "keywords and arguments consist of
+ * printable ASCII characters", however that refers to
+ * commands. Nothing is said about responses.
+ *
+ * We need responses to be valid UTF-8, because they might end up
+ * showing up in the UI (for instance, through
+ * session_set_error_from_arguments()).
+ *
+ * However, RETR multiline responses do not need to (and must not)
+ * be validated: most servers send them in whatever charset the
+ * original message is, and our mn-message-mime implementation
+ * handles that.
+ */
+ if (priv->in_retr || g_utf8_validate(input, -1, NULL))
{
- if (g_str_has_prefix(input, "+ "))
+ if (priv->in_list)
{
response = g_new0(MNClientSessionResponse, 1);
- response->type = RESPONSE_CONTINUATION;
- response->arguments = g_strdup(input + 2);
+ if (! strcmp(input, "."))
+ response->type = RESPONSE_LIST_END;
+ else if (g_str_has_prefix(input, ".."))
+ {
+ response->type = RESPONSE_LIST_ITEM;
+ response->arguments = g_strdup(input + 1); /* skip the initial dot */
+ }
+ else
+ {
+ response->type = RESPONSE_LIST_ITEM;
+ response->arguments = g_strdup(input);
+ }
}
else
{
- ResponseType type;
- int after_status = 0;
-
- if (g_str_has_prefix(input, "+OK"))
+ if (g_str_has_prefix(input, "+ "))
{
- type = RESPONSE_OK;
- after_status = 3;
+ response = g_new0(MNClientSessionResponse, 1);
+ response->type = RESPONSE_CONTINUATION;
+ response->arguments = g_strdup(input + 2);
}
- else if (g_str_has_prefix(input, "-ERR"))
- {
- type = RESPONSE_ERR;
- after_status = 4;
- }
-
- if (after_status)
+ else
{
- if (input[after_status] == 0 || input[after_status] == ' ')
+ ResponseType type;
+ int after_status = 0;
+
+ if (g_str_has_prefix(input, "+OK"))
+ {
+ type = RESPONSE_OK;
+ after_status = 3;
+ }
+ else if (g_str_has_prefix(input, "-ERR"))
+ {
+ type = RESPONSE_ERR;
+ after_status = 4;
+ }
+
+ if (after_status)
{
- response = g_new0(MNClientSessionResponse, 1);
- response->type = type;
- if (input[after_status] == ' ')
- response->arguments = g_strdup(input + after_status + 1);
+ if (input[after_status] == 0 || input[after_status] == ' ')
+ {
+ response = g_new0(MNClientSessionResponse, 1);
+ response->type = type;
+ if (input[after_status] == ' ')
+ response->arguments = g_strdup(input + after_status + 1);
+ }
}
}
}
@@ -1369,46 +1305,46 @@ mn_pop3_mailbox_response_new_cb (MNClientSession * session, const char * input,
return response;
}}
-#line 1373 "mn-pop3-mailbox.c"
+#line 1309 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 845 "mn-pop3-mailbox.gob"
+#line 797 "mn-pop3-mailbox.gob"
static void
mn_pop3_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1379 "mn-pop3-mailbox.c"
+#line 1315 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::response_free_cb"
-#line 845 "mn-pop3-mailbox.gob"
+#line 797 "mn-pop3-mailbox.gob"
g_return_if_fail (session != NULL);
-#line 845 "mn-pop3-mailbox.gob"
+#line 797 "mn-pop3-mailbox.gob"
g_return_if_fail (response != NULL);
-#line 845 "mn-pop3-mailbox.gob"
+#line 797 "mn-pop3-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1388 "mn-pop3-mailbox.c"
+#line 1324 "mn-pop3-mailbox.c"
{
-#line 849 "mn-pop3-mailbox.gob"
+#line 801 "mn-pop3-mailbox.gob"
g_free(response->arguments);
g_free(response);
}}
-#line 1395 "mn-pop3-mailbox.c"
+#line 1331 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 854 "mn-pop3-mailbox.gob"
+#line 806 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_custom_handler_cb (MNClientSession * session, MNClientSessionResponse * response, int result, MNClientSessionPrivate * priv)
-#line 1401 "mn-pop3-mailbox.c"
+#line 1337 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::custom_handler_cb"
-#line 854 "mn-pop3-mailbox.gob"
+#line 806 "mn-pop3-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 854 "mn-pop3-mailbox.gob"
+#line 806 "mn-pop3-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 854 "mn-pop3-mailbox.gob"
+#line 806 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1410 "mn-pop3-mailbox.c"
+#line 1346 "mn-pop3-mailbox.c"
{
-#line 859 "mn-pop3-mailbox.gob"
+#line 811 "mn-pop3-mailbox.gob"
switch (result)
{
@@ -1424,20 +1360,20 @@ mn_pop3_mailbox_custom_handler_cb (MNClientSession * session, MNClientSessionRes
g_return_val_if_reached(0);
}
}}
-#line 1428 "mn-pop3-mailbox.c"
+#line 1364 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 875 "mn-pop3-mailbox.gob"
+#line 827 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_session_authenticate (MNClientSessionPrivate * priv)
-#line 1434 "mn-pop3-mailbox.c"
+#line 1370 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticate"
-#line 875 "mn-pop3-mailbox.gob"
+#line 827 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1439 "mn-pop3-mailbox.c"
+#line 1375 "mn-pop3-mailbox.c"
{
-#line 877 "mn-pop3-mailbox.gob"
+#line 829 "mn-pop3-mailbox.gob"
if (priv->mailbox->uri->authmech)
{
@@ -1446,19 +1382,29 @@ mn_pop3_mailbox_session_authenticate (MNClientSessionPrivate * priv)
#ifdef WITH_SASL
return STATE_AUTH;
#else
- return mn_client_session_error(priv->session, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
+ mn_client_session_error(priv->session, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
+ return STATE_QUIT;
#endif /* WITH_SASL */
}
else
{
if (! strcmp(priv->mailbox->uri->authmech, "+APOP"))
- return priv->apop_timestamp
- ? STATE_APOP
- : mn_client_session_error(priv->session, _("server does not support APOP authentication"));
+ {
+ if (priv->apop_timestamp)
+ return STATE_APOP;
+ else
+ {
+ mn_client_session_error(priv->session, _("server does not support APOP authentication"));
+ return STATE_QUIT;
+ }
+ }
else if (! strcmp(priv->mailbox->uri->authmech, "+USERPASS"))
return STATE_USER;
else
- return mn_client_session_error(priv->session, _("unknown authentication mechanism \"%s\""), priv->mailbox->uri->authmech);
+ {
+ mn_client_session_error(priv->session, _("unknown authentication mechanism \"%s\""), priv->mailbox->uri->authmech);
+ return STATE_QUIT;
+ }
}
}
else
@@ -1473,20 +1419,20 @@ mn_pop3_mailbox_session_authenticate (MNClientSessionPrivate * priv)
return STATE_USER;
}
}}
-#line 1477 "mn-pop3-mailbox.c"
+#line 1423 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 913 "mn-pop3-mailbox.gob"
+#line 875 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_apop, gboolean tried_pass)
-#line 1483 "mn-pop3-mailbox.c"
+#line 1429 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticate_fallback"
-#line 913 "mn-pop3-mailbox.gob"
+#line 875 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1488 "mn-pop3-mailbox.c"
+#line 1434 "mn-pop3-mailbox.c"
{
-#line 917 "mn-pop3-mailbox.gob"
+#line 879 "mn-pop3-mailbox.gob"
if (! priv->mailbox->uri->authmech)
{
@@ -1502,28 +1448,31 @@ mn_pop3_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gb
}
}
- if (! priv->mailbox->uri->password)
+ if (! priv->mailbox->uri->password && priv->authenticated_mailbox->prompted)
{
mn_authenticated_mailbox_authentication_failed(priv->authenticated_mailbox);
return self_session_authenticate(priv);
}
else
- return mn_client_session_error(priv->session, _("authentication failed"));
+ {
+ mn_client_session_error(priv->session, _("authentication failed"));
+ return STATE_QUIT;
+ }
}}
-#line 1514 "mn-pop3-mailbox.c"
+#line 1463 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 941 "mn-pop3-mailbox.gob"
+#line 906 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_session_authenticated (MNClientSessionPrivate * priv)
-#line 1520 "mn-pop3-mailbox.c"
+#line 1469 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticated"
-#line 941 "mn-pop3-mailbox.gob"
+#line 906 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1525 "mn-pop3-mailbox.c"
+#line 1474 "mn-pop3-mailbox.c"
{
-#line 943 "mn-pop3-mailbox.gob"
+#line 908 "mn-pop3-mailbox.gob"
priv->authenticated = TRUE;
if (priv->self->_priv->login_delay)
@@ -1533,72 +1482,52 @@ mn_pop3_mailbox_session_authenticated (MNClientSessionPrivate * priv)
else
priv->self->_priv->authentication_timer = g_timer_new();
}
- return priv->login_delay_user ? STATE_CAPA : self_session_check_mail(priv);
+ return priv->login_delay_user ? STATE_CAPA : STATE_LIST;
}}
-#line 1539 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 955 "mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_session_check_mail (MNClientSessionPrivate * priv)
-#line 1545 "mn-pop3-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_check_mail"
-#line 955 "mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1550 "mn-pop3-mailbox.c"
-{
-#line 957 "mn-pop3-mailbox.gob"
-
-#ifdef WITH_MIME
- return STATE_LIST;
-#else
- return STATE_STAT;
-#endif
- }}
-#line 1560 "mn-pop3-mailbox.c"
+#line 1488 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 965 "mn-pop3-mailbox.gob"
+#line 920 "mn-pop3-mailbox.gob"
static void
mn_pop3_mailbox_session_set_error_from_arguments (MNClientSessionPrivate * priv, MNClientSessionResponse * response)
-#line 1566 "mn-pop3-mailbox.c"
+#line 1494 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_set_error_from_arguments"
-#line 965 "mn-pop3-mailbox.gob"
+#line 920 "mn-pop3-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 965 "mn-pop3-mailbox.gob"
+#line 920 "mn-pop3-mailbox.gob"
g_return_if_fail (response != NULL);
-#line 1573 "mn-pop3-mailbox.c"
+#line 1501 "mn-pop3-mailbox.c"
{
-#line 968 "mn-pop3-mailbox.gob"
+#line 923 "mn-pop3-mailbox.gob"
if (response->arguments)
mn_client_session_error(priv->session, "\"%s\"", response->arguments);
else
mn_client_session_error(priv->session, _("unknown server error"));
}}
-#line 1582 "mn-pop3-mailbox.c"
+#line 1510 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 975 "mn-pop3-mailbox.gob"
+#line 930 "mn-pop3-mailbox.gob"
static void
-mn_pop3_mailbox_handle_list_response (MNClientSessionPrivate * priv, MNClientSessionResponse * response)
-#line 1588 "mn-pop3-mailbox.c"
+mn_pop3_mailbox_handle_list_response (MNClientSessionPrivate * priv, MNClientSessionResponse * response, gboolean retr)
+#line 1516 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_list_response"
-#line 975 "mn-pop3-mailbox.gob"
+#line 930 "mn-pop3-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 975 "mn-pop3-mailbox.gob"
+#line 930 "mn-pop3-mailbox.gob"
g_return_if_fail (response != NULL);
-#line 1595 "mn-pop3-mailbox.c"
+#line 1523 "mn-pop3-mailbox.c"
{
-#line 978 "mn-pop3-mailbox.gob"
+#line 934 "mn-pop3-mailbox.gob"
switch (response->type)
{
case RESPONSE_OK:
priv->in_list = TRUE;
+ priv->in_retr = retr;
break;
case RESPONSE_LIST_ITEM: /* nop */
@@ -1606,8 +1535,9 @@ mn_pop3_mailbox_handle_list_response (MNClientSessionPrivate * priv, MNClientSes
default:
priv->in_list = FALSE;
+ priv->in_retr = FALSE;
break;
}
}}
-#line 1613 "mn-pop3-mailbox.c"
+#line 1543 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-pop3-mailbox.gob b/src/mn-pop3-mailbox.gob
@@ -8,7 +8,7 @@
* - RFC 1734
* - RFC 2595
*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -45,9 +45,7 @@ requires 2.0.10
#include "mn-client-session.h"
#include "mn-util.h"
#include "mn-md5.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
enum
{
@@ -62,12 +60,8 @@ requires 2.0.10
STATE_APOP,
STATE_USER,
STATE_PASS,
-#ifdef WITH_MIME
STATE_LIST,
STATE_RETR,
-#else /* WITH_MIME */
- STATE_STAT,
-#endif
STATE_QUIT
};
@@ -84,6 +78,7 @@ requires 2.0.10
MNPOP3Mailbox *self;
MNClientSession *session;
gboolean in_list;
+ gboolean in_retr;
char *apop_timestamp;
GSList *auth_mechanisms;
#ifdef WITH_SSL
@@ -95,12 +90,10 @@ requires 2.0.10
#endif
gboolean authenticated;
gboolean login_delay_user;
-#ifdef WITH_MIME
GSList *message_numbers;
GSList *current_message_number;
GSList *messages;
GString *current_message;
-#endif
};
typedef enum
@@ -130,7 +123,7 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
MNMailbox *mailbox;
@@ -195,7 +188,7 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
MNClientSessionResponse *response (check null),
MNClientSessionPrivate *priv (check null))
{
- self_handle_list_response(priv, response);
+ self_handle_list_response(priv, response, FALSE);
switch (response->type)
{
@@ -213,7 +206,7 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
case RESPONSE_ERR:
case RESPONSE_LIST_END:
if (priv->authenticated)
- return self_session_check_mail(priv);
+ return STATE_LIST;
#ifdef WITH_SSL
if (MN_URI_IS_INBAND_SSL(priv->mailbox->uri)
@@ -491,11 +484,7 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
enter_list_cb (MNClientSession *session (check null),
MNClientSessionPrivate *priv (check null))
{
-#ifdef WITH_MIME
return mn_client_session_write(session, "LIST");
-#else
- g_return_val_if_reached(0);
-#endif
}
private int
@@ -503,8 +492,7 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
MNClientSessionResponse *response (check null),
MNClientSessionPrivate *priv (check null))
{
-#ifdef WITH_MIME
- self_handle_list_response(priv, response);
+ self_handle_list_response(priv, response, FALSE);
switch (response->type)
{
@@ -533,31 +521,23 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
default:
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
-#else /* WITH_MIME */
- g_return_val_if_reached(0);
-#endif
}
private int
enter_retr_cb (MNClientSession *session (check null),
MNClientSessionPrivate *priv (check null))
{
-#ifdef WITH_MIME
if (priv->current_message_number)
return mn_client_session_write(session, "RETR %i", GPOINTER_TO_INT(priv->current_message_number->data));
else
{
GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, priv->messages != NULL);
mn_mailbox_set_messages(priv->mailbox, priv->messages);
gdk_flush();
GDK_THREADS_LEAVE();
return STATE_QUIT;
}
-#else
- g_return_val_if_reached(0);
-#endif
}
private int
@@ -565,8 +545,7 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
MNClientSessionResponse *response (check null),
MNClientSessionPrivate *priv (check null))
{
-#ifdef WITH_MIME
- self_handle_list_response(priv, response);
+ self_handle_list_response(priv, response, TRUE);
switch (response->type)
{
@@ -598,58 +577,9 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
default:
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
-#else
- g_return_val_if_reached(0);
-#endif
}
private int
- enter_stat_cb (MNClientSession *session (check null),
- MNClientSessionPrivate *priv (check null))
- {
-#ifndef WITH_MIME
- return mn_client_session_write(session, "STAT");
-#else
- g_return_val_if_reached(0);
-#endif
- }
-
- private int
- handle_stat_cb (MNClientSession *session (check null),
- MNClientSessionResponse *response (check null),
- MNClientSessionPrivate *priv (check null))
- {
-#ifndef WITH_MIME
- switch (response->type)
- {
- case RESPONSE_OK:
- {
- int count;
- int size;
-
- if (response->arguments && sscanf(response->arguments, "%d %d", &count, &size) == 2)
- {
- GDK_THREADS_ENTER();
- mn_mailbox_set_has_new(priv->mailbox, count != 0);
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- return STATE_QUIT;
- }
- else /* compliance error */
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- break;
-
- case RESPONSE_ERR: return RESULT_ERROR_QUIT;
- default: return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
-#else /* ! WITH_MIME */
- g_return_val_if_reached(0);
-#endif
- }
-
- private int
enter_quit_cb (MNClientSession *session (check null),
MNClientSessionPrivate *priv (check null))
{
@@ -685,18 +615,15 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
{ STATE_APOP, self_enter_apop_cb, self_handle_apop_cb },
{ STATE_USER, self_enter_user_cb, self_handle_user_cb },
{ STATE_PASS, self_enter_pass_cb, self_handle_pass_cb },
-#ifdef WITH_MIME
{ STATE_LIST, self_enter_list_cb, self_handle_list_cb },
{ STATE_RETR, self_enter_retr_cb, self_handle_retr_cb },
-#else /* WITH_MIME */
- { STATE_STAT, self_enter_stat_cb, self_handle_stat_cb },
-#endif
{ STATE_QUIT, self_enter_quit_cb, self_handle_quit_cb },
MN_CLIENT_SESSION_STATES_END
};
MNClientSessionCallbacks callbacks = {
self_notice_cb,
+ self_warning_cb,
self_response_new_cb,
self_response_free_cb,
self_custom_handler_cb,
@@ -763,12 +690,10 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
g_free(priv.apop_timestamp);
eel_g_slist_free_deep(priv.auth_mechanisms);
-#ifdef WITH_MIME
g_slist_free(priv.message_numbers);
mn_g_object_slist_free(priv.messages);
if (priv.current_message)
g_string_free(priv.current_message, TRUE);
-#endif
}
private void
@@ -779,6 +704,14 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
mn_mailbox_notice(priv->mailbox, "%s", str);
}
+ private void
+ warning_cb (MNClientSession *session (check null),
+ const char *str (check null),
+ MNClientSessionPrivate *priv (check null))
+ {
+ mn_mailbox_warning(priv->mailbox, "%s", str);
+ }
+
private MNClientSessionResponse *
response_new_cb (MNClientSession *session (check null),
const char *input (check null),
@@ -786,54 +719,73 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
{
MNClientSessionResponse *response = NULL;
- if (priv->in_list)
- {
- response = g_new0(MNClientSessionResponse, 1);
- if (! strcmp(input, "."))
- response->type = RESPONSE_LIST_END;
- else if (g_str_has_prefix(input, ".."))
- {
- response->type = RESPONSE_LIST_ITEM;
- response->arguments = g_strdup(input + 1); /* skip the initial dot */
- }
- else
- {
- response->type = RESPONSE_LIST_ITEM;
- response->arguments = g_strdup(input);
- }
- }
- else
+ /*
+ * About character set handling:
+ *
+ * RFC 1939 3 specifies that "keywords and arguments consist of
+ * printable ASCII characters", however that refers to
+ * commands. Nothing is said about responses.
+ *
+ * We need responses to be valid UTF-8, because they might end up
+ * showing up in the UI (for instance, through
+ * session_set_error_from_arguments()).
+ *
+ * However, RETR multiline responses do not need to (and must not)
+ * be validated: most servers send them in whatever charset the
+ * original message is, and our mn-message-mime implementation
+ * handles that.
+ */
+ if (priv->in_retr || g_utf8_validate(input, -1, NULL))
{
- if (g_str_has_prefix(input, "+ "))
+ if (priv->in_list)
{
response = g_new0(MNClientSessionResponse, 1);
- response->type = RESPONSE_CONTINUATION;
- response->arguments = g_strdup(input + 2);
+ if (! strcmp(input, "."))
+ response->type = RESPONSE_LIST_END;
+ else if (g_str_has_prefix(input, ".."))
+ {
+ response->type = RESPONSE_LIST_ITEM;
+ response->arguments = g_strdup(input + 1); /* skip the initial dot */
+ }
+ else
+ {
+ response->type = RESPONSE_LIST_ITEM;
+ response->arguments = g_strdup(input);
+ }
}
else
{
- ResponseType type;
- int after_status = 0;
-
- if (g_str_has_prefix(input, "+OK"))
+ if (g_str_has_prefix(input, "+ "))
{
- type = RESPONSE_OK;
- after_status = 3;
+ response = g_new0(MNClientSessionResponse, 1);
+ response->type = RESPONSE_CONTINUATION;
+ response->arguments = g_strdup(input + 2);
}
- else if (g_str_has_prefix(input, "-ERR"))
- {
- type = RESPONSE_ERR;
- after_status = 4;
- }
-
- if (after_status)
+ else
{
- if (input[after_status] == 0 || input[after_status] == ' ')
+ ResponseType type;
+ int after_status = 0;
+
+ if (g_str_has_prefix(input, "+OK"))
+ {
+ type = RESPONSE_OK;
+ after_status = 3;
+ }
+ else if (g_str_has_prefix(input, "-ERR"))
+ {
+ type = RESPONSE_ERR;
+ after_status = 4;
+ }
+
+ if (after_status)
{
- response = g_new0(MNClientSessionResponse, 1);
- response->type = type;
- if (input[after_status] == ' ')
- response->arguments = g_strdup(input + after_status + 1);
+ if (input[after_status] == 0 || input[after_status] == ' ')
+ {
+ response = g_new0(MNClientSessionResponse, 1);
+ response->type = type;
+ if (input[after_status] == ' ')
+ response->arguments = g_strdup(input + after_status + 1);
+ }
}
}
}
@@ -882,19 +834,29 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
#ifdef WITH_SASL
return STATE_AUTH;
#else
- return mn_client_session_error(priv->session, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
+ mn_client_session_error(priv->session, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
+ return STATE_QUIT;
#endif /* WITH_SASL */
}
else
{
if (! strcmp(priv->mailbox->uri->authmech, "+APOP"))
- return priv->apop_timestamp
- ? STATE_APOP
- : mn_client_session_error(priv->session, _("server does not support APOP authentication"));
+ {
+ if (priv->apop_timestamp)
+ return STATE_APOP;
+ else
+ {
+ mn_client_session_error(priv->session, _("server does not support APOP authentication"));
+ return STATE_QUIT;
+ }
+ }
else if (! strcmp(priv->mailbox->uri->authmech, "+USERPASS"))
return STATE_USER;
else
- return mn_client_session_error(priv->session, _("unknown authentication mechanism \"%s\""), priv->mailbox->uri->authmech);
+ {
+ mn_client_session_error(priv->session, _("unknown authentication mechanism \"%s\""), priv->mailbox->uri->authmech);
+ return STATE_QUIT;
+ }
}
}
else
@@ -929,13 +891,16 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
}
}
- if (! priv->mailbox->uri->password)
+ if (! priv->mailbox->uri->password && priv->authenticated_mailbox->prompted)
{
mn_authenticated_mailbox_authentication_failed(priv->authenticated_mailbox);
return self_session_authenticate(priv);
}
else
- return mn_client_session_error(priv->session, _("authentication failed"));
+ {
+ mn_client_session_error(priv->session, _("authentication failed"));
+ return STATE_QUIT;
+ }
}
private int
@@ -949,19 +914,9 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
else
priv->self->_priv->authentication_timer = g_timer_new();
}
- return priv->login_delay_user ? STATE_CAPA : self_session_check_mail(priv);
+ return priv->login_delay_user ? STATE_CAPA : STATE_LIST;
}
- private int
- session_check_mail (MNClientSessionPrivate *priv (check null))
- {
-#ifdef WITH_MIME
- return STATE_LIST;
-#else
- return STATE_STAT;
-#endif
- }
-
private void
session_set_error_from_arguments (MNClientSessionPrivate *priv (check null),
MNClientSessionResponse *response (check null))
@@ -974,12 +929,14 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
private void
handle_list_response (MNClientSessionPrivate *priv (check null),
- MNClientSessionResponse *response (check null))
+ MNClientSessionResponse *response (check null),
+ gboolean retr)
{
switch (response->type)
{
case RESPONSE_OK:
priv->in_list = TRUE;
+ priv->in_retr = retr;
break;
case RESPONSE_LIST_ITEM: /* nop */
@@ -987,6 +944,7 @@ class MN:POP3:Mailbox from MN:Authenticated:Mailbox
default:
priv->in_list = FALSE;
+ priv->in_retr = FALSE;
break;
}
}
diff --git a/src/mn-properties-dialog.c b/src/mn-properties-dialog.c
@@ -0,0 +1,514 @@
+/*
+ * Copyright (C) 2003-2005 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.h>
+#include <gtk/gtk.h>
+#include <eel/eel.h>
+#include "mn-conf.h"
+#include "mn-properties-dialog.h"
+#include "mn-util.h"
+#include "mn-mailbox-view.h"
+#include "mn-shell.h"
+#include "mn-main-window.h"
+
+/*** types *******************************************************************/
+
+typedef struct
+{
+ GtkWidget *dialog;
+ GtkWidget *notebook;
+
+ /* general tab */
+ GtkWidget *autostart_check;
+ GtkWidget *blink_check;
+ GtkWidget *summary_tooltip_check;
+ GtkWidget *command_mail_reader_check;
+ GtkWidget *command_mail_reader_entry;
+ GtkWidget *command_new_mail_check;
+ GtkWidget *command_new_mail_entry;
+ GtkWidget *command_mail_read_check;
+ GtkWidget *command_mail_read_entry;
+ GtkWidget *action_main_window_radio;
+ GtkWidget *action_mail_reader_radio;
+ GtkWidget *action_update_radio;
+
+ /* mailboxes tab */
+ GtkWidget *delay_label;
+ GtkWidget *minutes_spin;
+ GtkWidget *minutes_label;
+ GtkWidget *seconds_spin;
+ GtkWidget *seconds_label;
+ GtkWidget *scrolled;
+ GtkWidget *list;
+ GtkWidget *selected_label;
+ GtkWidget *remove;
+ GtkWidget *properties;
+
+ /* mail summary popup tab */
+ GtkWidget *summary_enable_check;
+ GtkWidget *summary_autoclose_check;
+ GtkWidget *summary_minutes_spin;
+ GtkWidget *summary_minutes_label;
+ GtkWidget *summary_seconds_spin;
+ GtkWidget *summary_seconds_label;
+ GtkWidget *summary_only_recent_check;
+ GtkWidget *summary_position_label;
+ GtkWidget *summary_position_combo;
+ GtkWidget *summary_horizontal_offset_label;
+ GtkWidget *summary_horizontal_offset_spin;
+ GtkWidget *summary_horizontal_pixels_label;
+ GtkWidget *summary_vertical_offset_label;
+ GtkWidget *summary_vertical_offset_spin;
+ GtkWidget *summary_vertical_pixels_label;
+ GtkWidget *summary_fonts_from_theme_radio;
+ GtkWidget *summary_custom_fonts_radio;
+ GtkWidget *summary_title_font_alignment;
+ GtkWidget *summary_title_font_label;
+ GtkWidget *summary_title_font_button;
+ GtkWidget *summary_contents_font_alignment;
+ GtkWidget *summary_contents_font_label;
+ GtkWidget *summary_contents_font_button;
+
+ GtkTooltips *tooltips;
+} PropertiesDialog;
+
+enum {
+ POSITION_COLUMN_NICK,
+ POSITION_COLUMN_LABEL,
+ POSITION_N_COLUMNS
+};
+
+/*** variables ***************************************************************/
+
+static PropertiesDialog self = { NULL };
+
+/*** functions ***************************************************************/
+
+static void mn_properties_dialog_weak_notify_cb (gpointer data,
+ GObject *former_dialog);
+
+static void mn_properties_dialog_add_position (GtkListStore *store,
+ MNPosition position,
+ const char *label);
+
+static void mn_properties_dialog_update_selected_label (void);
+static void mn_properties_dialog_update_sensitivity (void);
+
+static void mn_properties_dialog_selection_changed_h (GtkTreeSelection *selection,
+ gpointer user_data);
+
+/*** implementation **********************************************************/
+
+void
+mn_properties_dialog_display (void)
+{
+ GtkSizeGroup *size_group;
+ GtkTreeSelection *selection;
+ GtkListStore *position_store;
+ GtkCellRenderer *renderer;
+
+ g_return_if_fail(mn_shell != NULL);
+
+ if (self.dialog)
+ {
+ gtk_window_present(GTK_WINDOW(self.dialog));
+ return;
+ }
+
+ mn_create_interface(MN_INTERFACE_FILE("properties.glade"),
+ "dialog", &self.dialog,
+ "notebook", &self.notebook,
+ "autostart_check", &self.autostart_check,
+ "blink_check", &self.blink_check,
+ "summary_tooltip_check", &self.summary_tooltip_check,
+ "command_mail_reader_check", &self.command_mail_reader_check,
+ "command_mail_reader_entry", &self.command_mail_reader_entry,
+ "command_new_mail_check", &self.command_new_mail_check,
+ "command_new_mail_entry", &self.command_new_mail_entry,
+ "command_mail_read_check", &self.command_mail_read_check,
+ "command_mail_read_entry", &self.command_mail_read_entry,
+ "action_main_window_radio", &self.action_main_window_radio,
+ "action_mail_reader_radio", &self.action_mail_reader_radio,
+ "action_update_radio", &self.action_update_radio,
+ "delay_label", &self.delay_label,
+ "minutes_spin", &self.minutes_spin,
+ "minutes_label", &self.minutes_label,
+ "seconds_spin", &self.seconds_spin,
+ "seconds_label", &self.seconds_label,
+ "scrolled", &self.scrolled,
+ "selected_label", &self.selected_label,
+ "remove", &self.remove,
+ "properties", &self.properties,
+ "summary_enable_check", &self.summary_enable_check,
+ "summary_autoclose_check", &self.summary_autoclose_check,
+ "summary_minutes_spin", &self.summary_minutes_spin,
+ "summary_minutes_label", &self.summary_minutes_label,
+ "summary_seconds_spin", &self.summary_seconds_spin,
+ "summary_seconds_label", &self.summary_seconds_label,
+ "summary_only_recent_check", &self.summary_only_recent_check,
+ "summary_position_label", &self.summary_position_label,
+ "summary_position_combo", &self.summary_position_combo,
+ "summary_horizontal_offset_label", &self.summary_horizontal_offset_label,
+ "summary_horizontal_offset_spin", &self.summary_horizontal_offset_spin,
+ "summary_horizontal_pixels_label", &self.summary_horizontal_pixels_label,
+ "summary_vertical_offset_label", &self.summary_vertical_offset_label,
+ "summary_vertical_offset_spin", &self.summary_vertical_offset_spin,
+ "summary_vertical_pixels_label", &self.summary_vertical_pixels_label,
+ "summary_fonts_from_theme_radio", &self.summary_fonts_from_theme_radio,
+ "summary_custom_fonts_radio", &self.summary_custom_fonts_radio,
+ "summary_title_font_alignment", &self.summary_title_font_alignment,
+ "summary_title_font_label", &self.summary_title_font_label,
+ "summary_title_font_button", &self.summary_title_font_button,
+ "summary_contents_font_alignment", &self.summary_contents_font_alignment,
+ "summary_contents_font_label", &self.summary_contents_font_label,
+ "summary_contents_font_button", &self.summary_contents_font_button,
+ NULL);
+
+ eel_add_weak_pointer(&self.dialog);
+ g_object_weak_ref(G_OBJECT(self.dialog), mn_properties_dialog_weak_notify_cb, NULL);
+
+ self.tooltips = gtk_tooltips_new();
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(self.tooltips));
+ eel_add_weak_pointer(&self.tooltips);
+
+ self.list = mn_mailbox_view_new();
+ gtk_container_add(GTK_CONTAINER(self.scrolled), self.list);
+ gtk_widget_show(self.list);
+
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self.list));
+ g_signal_connect(selection, "changed", G_CALLBACK(mn_properties_dialog_selection_changed_h), NULL);
+
+ mn_setup_dnd(self.scrolled);
+
+ size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ gtk_size_group_add_widget(size_group, self.command_mail_reader_check);
+ gtk_size_group_add_widget(size_group, self.command_new_mail_check);
+ gtk_size_group_add_widget(size_group, self.command_mail_read_check);
+ g_object_unref(size_group);
+
+ size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+ gtk_size_group_add_widget(size_group, self.summary_autoclose_check);
+ gtk_size_group_add_widget(size_group, self.summary_position_label);
+ gtk_size_group_add_widget(size_group, self.summary_horizontal_offset_label);
+ gtk_size_group_add_widget(size_group, self.summary_vertical_offset_label);
+ gtk_size_group_add_widget(size_group, self.summary_title_font_alignment);
+ gtk_size_group_add_widget(size_group, self.summary_contents_font_alignment);
+ g_object_unref(size_group);
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self.autostart_check), mn_conf_get_autostart());
+
+ position_store = gtk_list_store_new(POSITION_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
+
+ mn_properties_dialog_add_position(position_store, MN_POSITION_TOP_LEFT, _("top left"));
+ mn_properties_dialog_add_position(position_store, MN_POSITION_TOP_RIGHT, _("top right"));
+ mn_properties_dialog_add_position(position_store, MN_POSITION_BOTTOM_LEFT, _("bottom left"));
+ mn_properties_dialog_add_position(position_store, MN_POSITION_BOTTOM_RIGHT, _("bottom right"));
+
+ renderer = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(self.summary_position_combo), renderer, TRUE);
+ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(self.summary_position_combo), renderer,
+ "text", POSITION_COLUMN_LABEL,
+ NULL);
+
+ gtk_combo_box_set_model(GTK_COMBO_BOX(self.summary_position_combo), GTK_TREE_MODEL(position_store));
+ g_object_unref(position_store);
+
+ mn_conf_link(self.dialog, MN_CONF_PROPERTIES_DIALOG,
+ self.blink_check, MN_CONF_BLINK_ON_ERRORS, "active",
+ self.summary_tooltip_check, MN_CONF_SUMMARY_TOOLTIP, "active",
+ self.command_mail_reader_check, MN_CONF_COMMANDS_MAIL_READER_ENABLED, "active",
+ self.command_mail_reader_entry, MN_CONF_COMMANDS_MAIL_READER_COMMAND, "text",
+ self.command_new_mail_check, MN_CONF_COMMANDS_NEW_MAIL_ENABLED, "active",
+ self.command_new_mail_entry, MN_CONF_COMMANDS_NEW_MAIL_COMMAND, "text",
+ self.command_mail_read_check, MN_CONF_COMMANDS_MAIL_READ_ENABLED, "active",
+ self.command_mail_read_entry, MN_CONF_COMMANDS_MAIL_READ_COMMAND, "text",
+ self.minutes_spin, MN_CONF_DELAY_MINUTES,
+ self.seconds_spin, MN_CONF_DELAY_SECONDS,
+ self.summary_enable_check, MN_CONF_MAIL_SUMMARY_POPUP_ENABLE, "active",
+ self.summary_autoclose_check, MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE, "active",
+ self.summary_minutes_spin, MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_MINUTES,
+ self.summary_seconds_spin, MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_SECONDS,
+ self.summary_only_recent_check, MN_CONF_MAIL_SUMMARY_POPUP_ONLY_RECENT, "active",
+ self.summary_horizontal_offset_spin, MN_CONF_MAIL_SUMMARY_POPUP_HORIZONTAL_OFFSET,
+ self.summary_vertical_offset_spin, MN_CONF_MAIL_SUMMARY_POPUP_VERTICAL_OFFSET,
+ self.summary_title_font_button, MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_FONT, "font-name",
+ self.summary_contents_font_button, MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_FONT, "font-name",
+ NULL);
+ mn_conf_link_radio_group_to_enum(MN_TYPE_ACTION,
+ MN_CONF_DOUBLE_CLICK_ACTION_2,
+ self.action_main_window_radio, MN_ACTION_DISPLAY_MAIN_WINDOW,
+ self.action_mail_reader_radio, MN_ACTION_LAUNCH_MAIL_READER,
+ self.action_update_radio, MN_ACTION_UPDATE_MAIL_STATUS,
+ NULL);
+ mn_conf_link_radio_group_to_enum(MN_TYPE_ASPECT_SOURCE,
+ MN_CONF_MAIL_SUMMARY_POPUP_FONTS_ASPECT_SOURCE,
+ self.summary_fonts_from_theme_radio, MN_ASPECT_SOURCE_THEME,
+ self.summary_custom_fonts_radio, MN_ASPECT_SOURCE_CUSTOM,
+ NULL);
+ mn_conf_link_combo_box_to_string(GTK_COMBO_BOX(self.summary_position_combo),
+ POSITION_COLUMN_NICK,
+ MN_CONF_MAIL_SUMMARY_POPUP_POSITION);
+
+ mn_properties_dialog_update_selected_label();
+ mn_properties_dialog_update_sensitivity();
+
+ mn_g_object_connect(self.dialog,
+ mn_shell->mailboxes,
+ "signal::notify::must-poll", mn_properties_dialog_update_sensitivity, NULL,
+ NULL);
+
+ mn_main_window_add_transient(GTK_WINDOW(self.dialog));
+ gtk_widget_show(self.dialog);
+}
+
+static void
+mn_properties_dialog_weak_notify_cb (gpointer data, GObject *former_dialog)
+{
+ g_object_unref(self.tooltips);
+}
+
+static void
+mn_properties_dialog_add_position (GtkListStore *store,
+ MNPosition position,
+ const char *label)
+{
+ GEnumClass *enum_class;
+ GEnumValue *enum_value;
+ GtkTreeIter iter;
+
+ g_return_if_fail(GTK_IS_LIST_STORE(store));
+ g_return_if_fail(label != NULL);
+
+ enum_class = g_type_class_ref(MN_TYPE_POSITION);
+ g_return_if_fail(enum_class != NULL);
+
+ enum_value = g_enum_get_value(enum_class, position);
+ g_return_if_fail(enum_value != NULL);
+
+ gtk_list_store_append(store, &iter);
+ gtk_list_store_set(store, &iter,
+ POSITION_COLUMN_NICK, enum_value->value_nick,
+ POSITION_COLUMN_LABEL, label,
+ -1);
+
+ g_type_class_unref(enum_class);
+}
+
+static void
+mn_properties_dialog_update_selected_label (void)
+{
+ GtkTreeSelection *selection;
+ int n_rows;
+
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self.list));
+ n_rows = gtk_tree_selection_count_selected_rows(selection);
+
+ if (n_rows == 0)
+ gtk_label_set_text(GTK_LABEL(self.selected_label), _("No mailbox selected."));
+ else
+ {
+ char *str;
+
+ str = g_strdup_printf(ngettext("%i mailbox selected.",
+ "%i mailboxes selected.",
+ n_rows), n_rows);
+ gtk_label_set_text(GTK_LABEL(self.selected_label), str);
+ g_free(str);
+ }
+}
+
+static void
+mn_properties_dialog_update_sensitivity (void)
+{
+ gboolean command_mail_reader_enabled;
+ gboolean command_new_mail_enabled;
+ gboolean command_mail_read_enabled;
+ gboolean must_poll;
+ GtkTreeSelection *selection;
+ gboolean has_selection;
+ gboolean summary_enabled;
+ gboolean summary_autoclose_enabled;
+ gboolean summary_custom_fonts_enabled;
+
+ command_mail_reader_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self.command_mail_reader_check));
+ command_new_mail_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self.command_new_mail_check));
+ command_mail_read_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self.command_mail_read_check));
+
+ gtk_widget_set_sensitive(self.command_mail_reader_entry, command_mail_reader_enabled);
+ gtk_widget_set_sensitive(self.command_new_mail_entry, command_new_mail_enabled);
+ gtk_widget_set_sensitive(self.command_mail_read_entry, command_mail_read_enabled);
+
+ must_poll = mn_mailboxes_get_must_poll(mn_shell->mailboxes);
+ gtk_widget_set_sensitive(self.delay_label, must_poll);
+ gtk_widget_set_sensitive(self.minutes_spin, must_poll);
+ gtk_widget_set_sensitive(self.minutes_label, must_poll);
+ gtk_widget_set_sensitive(self.seconds_spin, must_poll);
+ gtk_widget_set_sensitive(self.seconds_label, must_poll);
+
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self.list));
+ has_selection = gtk_tree_selection_count_selected_rows(selection) > 0;
+
+ gtk_widget_set_sensitive(self.remove, has_selection);
+ gtk_widget_set_sensitive(self.properties, has_selection);
+
+ summary_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self.summary_enable_check));
+ summary_autoclose_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self.summary_autoclose_check));
+ summary_custom_fonts_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self.summary_custom_fonts_radio));
+
+ gtk_widget_set_sensitive(self.summary_autoclose_check, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_minutes_spin, summary_enabled && summary_autoclose_enabled);
+ gtk_widget_set_sensitive(self.summary_minutes_label, summary_enabled && summary_autoclose_enabled);
+ gtk_widget_set_sensitive(self.summary_seconds_spin, summary_enabled && summary_autoclose_enabled);
+ gtk_widget_set_sensitive(self.summary_seconds_label, summary_enabled && summary_autoclose_enabled);
+ gtk_widget_set_sensitive(self.summary_only_recent_check, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_position_label, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_position_combo, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_horizontal_offset_label, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_horizontal_offset_spin, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_horizontal_pixels_label, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_vertical_offset_label, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_vertical_offset_spin, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_vertical_pixels_label, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_fonts_from_theme_radio, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_custom_fonts_radio, summary_enabled);
+ gtk_widget_set_sensitive(self.summary_title_font_label, summary_enabled && summary_custom_fonts_enabled);
+ gtk_widget_set_sensitive(self.summary_title_font_button, summary_enabled && summary_custom_fonts_enabled);
+ gtk_widget_set_sensitive(self.summary_contents_font_label, summary_enabled && summary_custom_fonts_enabled);
+ gtk_widget_set_sensitive(self.summary_contents_font_button, summary_enabled && summary_custom_fonts_enabled);
+}
+
+static void
+mn_properties_dialog_selection_changed_h (GtkTreeSelection *selection,
+ gpointer user_data)
+{
+ mn_properties_dialog_update_selected_label();
+ mn_properties_dialog_update_sensitivity();
+}
+
+void
+mn_properties_dialog_set_tooltip (GtkWidget *widget, const char *tip)
+{
+ g_return_if_fail(self.tooltips != NULL);
+ g_return_if_fail(GTK_IS_WIDGET(widget));
+
+ gtk_tooltips_set_tip(self.tooltips, widget, tip, NULL);
+}
+
+void
+mn_properties_dialog_set_tooltips (GtkWidget *widget, ...)
+{
+ va_list args;
+
+ g_return_if_fail(self.tooltips != NULL);
+
+ va_start(args, widget);
+ while (widget)
+ {
+ const char *tip;
+
+ g_return_if_fail(GTK_IS_WIDGET(widget));
+
+ tip = va_arg(args, const char *);
+
+ mn_properties_dialog_set_tooltip(widget, tip);
+
+ widget = va_arg(args, GtkWidget *);
+ }
+ va_end(args);
+}
+
+/* libglade callbacks */
+
+void
+mn_properties_dialog_autostart_toggled_h (GtkToggleButton *togglebutton,
+ gpointer user_data)
+{
+ mn_conf_set_autostart(gtk_toggle_button_get_active(togglebutton));
+}
+
+void
+mn_properties_dialog_toggled_h (GtkToggleButton *togglebutton,
+ gpointer user_data)
+{
+ mn_properties_dialog_update_sensitivity();
+}
+
+void
+mn_properties_dialog_add_clicked_h (GtkButton *button, gpointer user_data)
+{
+ mn_mailbox_view_activate_add(MN_MAILBOX_VIEW(self.list));
+}
+
+void
+mn_properties_dialog_remove_clicked_h (GtkButton *button, gpointer user_data)
+{
+ mn_mailbox_view_activate_remove(MN_MAILBOX_VIEW(self.list));
+}
+
+void
+mn_properties_dialog_properties_clicked_h (GtkButton *button,
+ gpointer user_data)
+{
+ mn_mailbox_view_activate_properties(MN_MAILBOX_VIEW(self.list));
+}
+
+gboolean
+mn_properties_dialog_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(self.scrolled));
+ gtk_adjustment_set_value(adjustment, (double) y / (widget->allocation.height - 2) * (adjustment->upper - adjustment->page_size));
+
+ return TRUE;
+}
+
+void
+mn_properties_dialog_response_h (GtkDialog *dialog,
+ int response,
+ gpointer user_data)
+{
+ switch (response)
+ {
+ case GTK_RESPONSE_HELP:
+ {
+ int current_page;
+ const char *sections[] = {
+ "properties-general",
+ "properties-mailboxes",
+ "properties-mail-summary-popup"
+ };
+
+ current_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(self.notebook));
+ g_return_if_fail(current_page >= 0 && current_page < G_N_ELEMENTS(sections));
+
+ mn_display_help(GTK_WINDOW(dialog), sections[current_page]);
+ break;
+ }
+
+ case GTK_RESPONSE_CLOSE:
+ gtk_widget_destroy(self.dialog);
+ break;
+ }
+}
diff --git a/src/mn-properties-dialog.h b/src/mn-properties-dialog.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2003-2005 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_PROPERTIES_DIALOG_H
+#define _MN_PROPERTIES_DIALOG_H
+
+#include <stdarg.h>
+#include <gtk/gtk.h>
+
+void mn_properties_dialog_display (void);
+
+void mn_properties_dialog_set_tooltip (GtkWidget *widget,
+ const char *tip);
+void mn_properties_dialog_set_tooltips (GtkWidget *widget,
+ ...);
+
+#endif /* _MN_PROPERTIES_DIALOG_H */
diff --git a/src/mn-properties.c b/src/mn-properties.c
@@ -1,445 +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 <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include <eel/eel.h>
-#include "mn-conf.h"
-#include "mn-properties.h"
-#include "mn-util.h"
-#include "mn-mailbox-view.h"
-#include "mn-shell.h"
-
-/*** types *******************************************************************/
-
-typedef struct
-{
- GtkWidget *dialog;
- GtkWidget *notebook;
-
- /* general tab */
- GtkWidget *autostart_check;
- GtkWidget *blink_check;
- GtkWidget *summary_tooltip_check;
- GtkWidget *command_mail_reader_check;
- GtkWidget *command_mail_reader_entry;
- GtkWidget *command_new_mail_check;
- GtkWidget *command_new_mail_entry;
- GtkWidget *command_mail_read_check;
- GtkWidget *command_mail_read_entry;
- GtkWidget *action_summary_radio;
- GtkWidget *action_mail_reader_radio;
-
- /* mailboxes tab */
- GtkWidget *delay_label;
- GtkWidget *minutes_spin;
- GtkWidget *seconds_spin;
- GtkWidget *scrolled;
- GtkWidget *list;
- GtkWidget *selected_label;
- GtkWidget *remove;
- GtkWidget *properties;
-
- /* mail summary popup tab */
- GtkWidget *summary_enable_check;
- GtkWidget *summary_autoclose_check;
- GtkWidget *summary_minutes_spin;
- GtkWidget *summary_minutes_label;
- GtkWidget *summary_seconds_spin;
- GtkWidget *summary_seconds_label;
- GtkWidget *summary_only_recent_check;
- GtkWidget *summary_position_label;
- GtkWidget *summary_position_combo;
- GtkWidget *summary_horizontal_offset_label;
- GtkWidget *summary_horizontal_offset_spin;
- GtkWidget *summary_horizontal_pixels_label;
- GtkWidget *summary_vertical_offset_label;
- GtkWidget *summary_vertical_offset_spin;
- GtkWidget *summary_vertical_pixels_label;
- GtkWidget *summary_title_font_check;
- GtkWidget *summary_title_font_button;
- GtkWidget *summary_contents_font_check;
- GtkWidget *summary_contents_font_button;
-} PropertiesDialog;
-
-enum {
- POSITION_COLUMN_NICK,
- POSITION_COLUMN_LABEL,
- POSITION_N_COLUMNS
-};
-
-/*** variables ***************************************************************/
-
-static PropertiesDialog properties = { NULL };
-
-/*** functions ***************************************************************/
-
-static void mn_properties_add_position (GtkListStore *store,
- MNPosition position,
- const char *label);
-
-static void mn_properties_update_selected_label (void);
-static void mn_properties_update_sensitivity (void);
-
-static void mn_properties_selection_changed_h (GtkTreeSelection *selection,
- gpointer user_data);
-
-/*** implementation **********************************************************/
-
-void
-mn_properties_display (void)
-{
- GtkSizeGroup *size_group;
- GtkTreeSelection *selection;
- GtkListStore *position_store;
- GtkCellRenderer *renderer;
-
- g_return_if_fail(mn_shell != NULL);
-
- if (properties.dialog)
- {
- gtk_window_present(GTK_WINDOW(properties.dialog));
- return;
- }
-
- mn_create_interface("properties",
- "dialog", &properties.dialog,
- "notebook", &properties.notebook,
- "autostart_check", &properties.autostart_check,
- "blink_check", &properties.blink_check,
- "summary_tooltip_check", &properties.summary_tooltip_check,
- "command_mail_reader_check", &properties.command_mail_reader_check,
- "command_mail_reader_entry", &properties.command_mail_reader_entry,
- "command_new_mail_check", &properties.command_new_mail_check,
- "command_new_mail_entry", &properties.command_new_mail_entry,
- "command_mail_read_check", &properties.command_mail_read_check,
- "command_mail_read_entry", &properties.command_mail_read_entry,
- "action_summary_radio", &properties.action_summary_radio,
- "action_mail_reader_radio", &properties.action_mail_reader_radio,
- "delay_label", &properties.delay_label,
- "minutes_spin", &properties.minutes_spin,
- "seconds_spin", &properties.seconds_spin,
- "scrolled", &properties.scrolled,
- "selected_label", &properties.selected_label,
- "remove", &properties.remove,
- "properties", &properties.properties,
- "summary_enable_check", &properties.summary_enable_check,
- "summary_autoclose_check", &properties.summary_autoclose_check,
- "summary_minutes_spin", &properties.summary_minutes_spin,
- "summary_minutes_label", &properties.summary_minutes_label,
- "summary_seconds_spin", &properties.summary_seconds_spin,
- "summary_seconds_label", &properties.summary_seconds_label,
- "summary_only_recent_check", &properties.summary_only_recent_check,
- "summary_position_label", &properties.summary_position_label,
- "summary_position_combo", &properties.summary_position_combo,
- "summary_horizontal_offset_label", &properties.summary_horizontal_offset_label,
- "summary_horizontal_offset_spin", &properties.summary_horizontal_offset_spin,
- "summary_horizontal_pixels_label", &properties.summary_horizontal_pixels_label,
- "summary_vertical_offset_label", &properties.summary_vertical_offset_label,
- "summary_vertical_offset_spin", &properties.summary_vertical_offset_spin,
- "summary_vertical_pixels_label", &properties.summary_vertical_pixels_label,
- "summary_title_font_check", &properties.summary_title_font_check,
- "summary_title_font_button", &properties.summary_title_font_button,
- "summary_contents_font_check", &properties.summary_contents_font_check,
- "summary_contents_font_button", &properties.summary_contents_font_button,
- NULL);
-
- eel_add_weak_pointer(&properties.dialog);
-
- properties.list = mn_mailbox_view_new();
- gtk_container_add(GTK_CONTAINER(properties.scrolled), properties.list);
- gtk_widget_show(properties.list);
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(properties.list));
- g_signal_connect(selection, "changed", G_CALLBACK(mn_properties_selection_changed_h), NULL);
-
- mn_setup_dnd(properties.scrolled);
-
- size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget(size_group, properties.command_mail_reader_check);
- gtk_size_group_add_widget(size_group, properties.command_new_mail_check);
- gtk_size_group_add_widget(size_group, properties.command_mail_read_check);
- g_object_unref(size_group);
-
- size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget(size_group, properties.summary_autoclose_check);
- gtk_size_group_add_widget(size_group, properties.summary_position_label);
- gtk_size_group_add_widget(size_group, properties.summary_horizontal_offset_label);
- gtk_size_group_add_widget(size_group, properties.summary_vertical_offset_label);
- gtk_size_group_add_widget(size_group, properties.summary_title_font_check);
- gtk_size_group_add_widget(size_group, properties.summary_contents_font_check);
- g_object_unref(size_group);
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(properties.autostart_check), mn_conf_get_autostart());
-
- position_store = gtk_list_store_new(POSITION_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
-
- mn_properties_add_position(position_store, MN_POSITION_TOP_LEFT, _("top left"));
- mn_properties_add_position(position_store, MN_POSITION_TOP_RIGHT, _("top right"));
- mn_properties_add_position(position_store, MN_POSITION_BOTTOM_LEFT, _("bottom left"));
- mn_properties_add_position(position_store, MN_POSITION_BOTTOM_RIGHT, _("bottom right"));
-
- renderer = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(properties.summary_position_combo), renderer, TRUE);
- gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(properties.summary_position_combo), renderer,
- "text", POSITION_COLUMN_LABEL,
- NULL);
-
- gtk_combo_box_set_model(GTK_COMBO_BOX(properties.summary_position_combo), GTK_TREE_MODEL(position_store));
- g_object_unref(position_store);
-
- mn_conf_link(properties.dialog, MN_CONF_PROPERTIES_DIALOG,
- properties.blink_check, MN_CONF_BLINK_ON_ERRORS,
- properties.summary_tooltip_check, MN_CONF_SUMMARY_TOOLTIP,
- properties.command_mail_reader_check, MN_CONF_COMMANDS_MAIL_READER_ENABLED,
- properties.command_mail_reader_entry, MN_CONF_COMMANDS_MAIL_READER_COMMAND,
- properties.command_new_mail_check, MN_CONF_COMMANDS_NEW_MAIL_ENABLED,
- properties.command_new_mail_entry, MN_CONF_COMMANDS_NEW_MAIL_COMMAND,
- properties.command_mail_read_check, MN_CONF_COMMANDS_MAIL_READ_ENABLED,
- properties.command_mail_read_entry, MN_CONF_COMMANDS_MAIL_READ_COMMAND,
- properties.minutes_spin, MN_CONF_DELAY_MINUTES,
- properties.seconds_spin, MN_CONF_DELAY_SECONDS,
- properties.summary_enable_check, MN_CONF_MAIL_SUMMARY_POPUP_ENABLE,
- properties.summary_autoclose_check, MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE,
- properties.summary_minutes_spin, MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_MINUTES,
- properties.summary_seconds_spin, MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_SECONDS,
- properties.summary_only_recent_check, MN_CONF_MAIL_SUMMARY_POPUP_ONLY_RECENT,
- properties.summary_horizontal_offset_spin, MN_CONF_MAIL_SUMMARY_POPUP_HORIZONTAL_OFFSET,
- properties.summary_vertical_offset_spin, MN_CONF_MAIL_SUMMARY_POPUP_VERTICAL_OFFSET,
- properties.summary_title_font_check, MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_ENABLED,
- properties.summary_title_font_button, MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_FONT,
- properties.summary_contents_font_check, MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_ENABLED,
- properties.summary_contents_font_button, MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_FONT,
- NULL);
- mn_conf_link_radio_group_to_enum(MN_TYPE_ACTION,
- MN_CONF_DOUBLE_CLICK_ACTION,
- properties.action_summary_radio, MN_ACTION_DISPLAY_MAIL_SUMMARY,
- properties.action_mail_reader_radio, MN_ACTION_LAUNCH_MAIL_READER,
- NULL);
- mn_conf_link_combo_box_to_string(GTK_COMBO_BOX(properties.summary_position_combo),
- POSITION_COLUMN_NICK,
- MN_CONF_MAIL_SUMMARY_POPUP_POSITION);
-
- mn_properties_update_selected_label();
- mn_properties_update_sensitivity();
-
- mn_g_object_connect(properties.dialog,
- mn_shell->mailboxes,
- "signal::notify::must-poll", mn_properties_update_sensitivity, NULL,
- NULL);
-
- gtk_widget_show(properties.dialog);
-}
-
-static void
-mn_properties_add_position (GtkListStore *store,
- MNPosition position,
- const char *label)
-{
- GEnumClass *enum_class;
- GEnumValue *enum_value;
- GtkTreeIter iter;
-
- g_return_if_fail(GTK_IS_LIST_STORE(store));
- g_return_if_fail(label != NULL);
-
- enum_class = g_type_class_ref(MN_TYPE_POSITION);
- g_return_if_fail(enum_class != NULL);
-
- enum_value = g_enum_get_value(enum_class, position);
- g_return_if_fail(enum_value != NULL);
-
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store, &iter,
- POSITION_COLUMN_NICK, enum_value->value_nick,
- POSITION_COLUMN_LABEL, label,
- -1);
-
- g_type_class_unref(enum_class);
-}
-
-static void
-mn_properties_update_selected_label (void)
-{
- GtkTreeSelection *selection;
- int n_rows;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(properties.list));
- n_rows = gtk_tree_selection_count_selected_rows(selection);
-
- if (n_rows == 0)
- gtk_label_set_text(GTK_LABEL(properties.selected_label), _("No mailbox selected."));
- else
- {
- char *str;
-
- str = g_strdup_printf(ngettext("%i mailbox selected.",
- "%i mailboxes selected.",
- n_rows), n_rows);
- gtk_label_set_text(GTK_LABEL(properties.selected_label), str);
- g_free(str);
- }
-}
-
-static void
-mn_properties_update_sensitivity (void)
-{
- gboolean command_mail_reader_enabled;
- gboolean command_new_mail_enabled;
- gboolean command_mail_read_enabled;
- char *mail_reader;
- gboolean must_poll;
- GtkTreeSelection *selection;
- gboolean has_selection;
- gboolean summary_enabled;
- gboolean summary_autoclose_enabled;
- gboolean summary_title_font_enabled;
- gboolean summary_contents_font_enabled;
-
- command_mail_reader_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(properties.command_mail_reader_check));
- command_new_mail_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(properties.command_new_mail_check));
- command_mail_read_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(properties.command_mail_read_check));
-
- gtk_widget_set_sensitive(properties.command_mail_reader_entry, command_mail_reader_enabled);
- gtk_widget_set_sensitive(properties.command_new_mail_entry, command_new_mail_enabled);
- gtk_widget_set_sensitive(properties.command_mail_read_entry, command_mail_read_enabled);
-
- mail_reader = eel_gconf_get_string(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
- gtk_widget_set_sensitive(properties.action_mail_reader_radio, command_mail_reader_enabled && mail_reader);
- g_free(mail_reader);
-
- must_poll = mn_mailboxes_get_must_poll(mn_shell->mailboxes);
- gtk_widget_set_sensitive(properties.minutes_spin, must_poll);
- gtk_widget_set_sensitive(properties.seconds_spin, must_poll);
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(properties.list));
- has_selection = gtk_tree_selection_count_selected_rows(selection) > 0;
-
- gtk_widget_set_sensitive(properties.remove, has_selection);
- gtk_widget_set_sensitive(properties.properties, has_selection);
-
- summary_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(properties.summary_enable_check));
- summary_autoclose_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(properties.summary_autoclose_check));
- summary_title_font_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(properties.summary_title_font_check));
- summary_contents_font_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(properties.summary_contents_font_check));
-
- gtk_widget_set_sensitive(properties.summary_autoclose_check, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_minutes_spin, summary_enabled && summary_autoclose_enabled);
- gtk_widget_set_sensitive(properties.summary_minutes_label, summary_enabled && summary_autoclose_enabled);
- gtk_widget_set_sensitive(properties.summary_seconds_spin, summary_enabled && summary_autoclose_enabled);
- gtk_widget_set_sensitive(properties.summary_seconds_label, summary_enabled && summary_autoclose_enabled);
- gtk_widget_set_sensitive(properties.summary_only_recent_check, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_position_label, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_position_combo, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_horizontal_offset_label, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_horizontal_offset_spin, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_horizontal_pixels_label, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_vertical_offset_label, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_vertical_offset_spin, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_vertical_pixels_label, summary_enabled);
- gtk_widget_set_sensitive(properties.summary_title_font_button, summary_title_font_enabled);
- gtk_widget_set_sensitive(properties.summary_contents_font_button, summary_contents_font_enabled);
-}
-
-static void
-mn_properties_selection_changed_h (GtkTreeSelection *selection,
- gpointer user_data)
-{
- mn_properties_update_selected_label();
- mn_properties_update_sensitivity();
-}
-
-/* libglade callbacks */
-
-void
-mn_properties_autostart_toggled_h (GtkToggleButton *togglebutton,
- gpointer user_data)
-{
- mn_conf_set_autostart(gtk_toggle_button_get_active(togglebutton));
-}
-
-void
-mn_properties_toggled_h (GtkToggleButton *togglebutton, gpointer user_data)
-{
- mn_properties_update_sensitivity();
-}
-
-void
-mn_properties_mail_reader_entry_changed_h (GtkEditable *editable,
- gpointer user_data)
-{
- mn_properties_update_sensitivity();
-}
-
-void
-mn_properties_add_clicked_h (GtkButton *button, gpointer user_data)
-{
- mn_mailbox_view_activate_add(MN_MAILBOX_VIEW(properties.list));
-}
-
-void
-mn_properties_remove_clicked_h (GtkButton *button, gpointer user_data)
-{
- mn_mailbox_view_activate_remove(MN_MAILBOX_VIEW(properties.list));
-}
-
-void
-mn_properties_properties_clicked_h (GtkButton *button, gpointer user_data)
-{
- mn_mailbox_view_activate_properties(MN_MAILBOX_VIEW(properties.list));
-}
-
-gboolean
-mn_properties_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(properties.scrolled));
- gtk_adjustment_set_value(adjustment, (double) y / (widget->allocation.height - 2) * (adjustment->upper - adjustment->page_size));
-
- return TRUE;
-}
-
-void
-mn_properties_response_h (GtkDialog *dialog, int response, gpointer user_data)
-{
- switch (response)
- {
- case GTK_RESPONSE_HELP:
- {
- int current_page;
- const char *sections[] = { "properties-general", "properties-mailboxes", "properties-mail-summary-popup" };
-
- current_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(properties.notebook));
- g_return_if_fail(current_page >= 0 && current_page < G_N_ELEMENTS(sections));
-
- mn_display_help(GTK_WINDOW(dialog), sections[current_page]);
- break;
- }
-
- case GTK_RESPONSE_CLOSE:
- gtk_widget_destroy(properties.dialog);
- break;
- }
-}
diff --git a/src/mn-properties.h b/src/mn-properties.h
@@ -1,24 +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_PROPERTIES_H
-#define _MN_PROPERTIES_H
-
-void mn_properties_display (void);
-
-#endif /* _MN_PROPERTIES_H */
diff --git a/src/mn-sasl.c b/src/mn-sasl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-sasl.h b/src/mn-sasl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-sgml-ref.c b/src/mn-sgml-ref.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -31,8 +31,6 @@ static gunichar mn_sgml_ref_get_unichar (const char *ref);
static gunichar
mn_sgml_ref_get_unichar (const char *ref)
{
- gunichar c = 0; /* 0 means "invalid reference" */
-
g_return_val_if_fail(ref != NULL, 0);
if (*ref == '#')
@@ -58,7 +56,7 @@ mn_sgml_ref_get_unichar (const char *ref)
code = strtoul(nptr, &end, base);
if (*end == 0) /* could convert */
- c = code;
+ return code;
}
}
else
@@ -67,62 +65,67 @@ mn_sgml_ref_get_unichar (const char *ref)
for (i = 0; i < G_N_ELEMENTS(entities); i++)
if (! strcmp(ref, entities[i].name))
- {
- c = entities[i].character;
- break;
- }
+ return entities[i].character;
}
- return c;
+ return 0; /* invalid reference */
}
/**
* mn_sgml_ref_expand:
- * @string: a string to expand
+ * @str: a nul-terminated string.
+ *
+ * Parses @str, expanding its SGML character references and XHTML
+ * character entities into their Unicode character value.
*
- * Parses @str, expanding every SGML character reference to its
- * Unicode character.
+ * Numerical SGML character references as well as XHTML entities are
+ * supported. Unsupported entities will be inserted verbatim into the
+ * result.
*
- * Return value: a newly-allocated UTF-8 string.
+ * Return value: the expansion of str. The returned string should be
+ * freed when no longer needed.
**/
char *
mn_sgml_ref_expand (const char *str)
{
GString *unescaped;
- char *ampersand;
- char *start;
+ const char *start;
g_return_val_if_fail(str != NULL, NULL);
unescaped = g_string_new(NULL);
- start = (char *) str;
- while ((ampersand = strchr(start, '&')))
+ while ((start = strchr(str, '&')))
{
- char *semicolon = strchr(ampersand, ';');
-
- if (semicolon)
- {
- char *ref;
- gunichar c;
-
- ref = g_strndup(ampersand + 1, semicolon - ampersand - 1);
- c = mn_sgml_ref_get_unichar(ref);
- g_free(ref);
-
- g_string_append_len(unescaped, start, ampersand - start);
- if (c)
- g_string_append_unichar(unescaped, c);
- else /* invalid reference, append it raw */
- g_string_append_len(unescaped, ampersand, semicolon - ampersand + 1);
-
- start = semicolon + 1;
- }
- else
- break;
+ const char *end;
+ gunichar c;
+
+ end = strpbrk(start + 1, "; &\t\n");
+ if (! end)
+ end = strchr(start + 1, 0);
+
+ {
+ char ref[end - start];
+
+ strncpy(ref, start + 1, end - start - 1);
+ ref[end - start - 1] = 0;
+
+ c = mn_sgml_ref_get_unichar(ref);
+ }
+
+ if (*end == ';') /* semicolon is part of entity, skip it */
+ end++;
+
+ g_string_append_len(unescaped, str, start - str);
+ if (c)
+ g_string_append_unichar(unescaped, c);
+ else /* invalid reference, append it raw */
+ g_string_append_len(unescaped, start, end - start);
+
+ str = end;
}
- g_string_append(unescaped, start);
+ g_string_append(unescaped, str);
return g_string_free(unescaped, FALSE);
}
diff --git a/src/mn-sgml-ref.h b/src/mn-sgml-ref.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-shell-private.h b/src/mn-shell-private.h
@@ -10,19 +10,21 @@ extern "C" {
#endif /* __cplusplus */
-#line 24 "mn-shell.gob"
+#line 26 "mn-shell.gob"
#include "mn-mail-icon.h"
#line 18 "mn-shell-private.h"
struct _MNShellPrivate {
-#line 48 "mn-shell.gob"
+#line 50 "mn-shell.gob"
MNMailIcon * icon;
-#line 49 "mn-shell.gob"
+#line 51 "mn-shell.gob"
GtkWidget * about;
-#line 50 "mn-shell.gob"
- int n_new;
-#line 26 "mn-shell-private.h"
+#line 52 "mn-shell.gob"
+ gboolean has_new;
+#line 53 "mn-shell.gob"
+ GSList * mailbox_properties_dialogs;
+#line 28 "mn-shell-private.h"
};
#ifdef __cplusplus
diff --git a/src/mn-shell.c b/src/mn-shell.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:11 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:28 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -23,21 +23,21 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 27 "mn-shell.gob"
+#line 29 "mn-shell.gob"
#include "config.h"
#include <errno.h>
#include <gnome.h>
#include <eel/eel.h>
-#include "mn-properties.h"
+#include "mn-properties-dialog.h"
#include "mn-util.h"
#include "mn-conf.h"
#include "mn-mailboxes.h"
#include "mn-unsupported-mailbox.h"
#include "mn-about-dialog.h"
-#include "mn-summary.h"
#include "mn-summary-popup.h"
-#include "mn-summary-dialog.h"
+#include "mn-main-window.h"
+#include "mn-message-view.h"
MNShell *mn_shell = NULL;
@@ -59,13 +59,14 @@ typedef MNShellClass SelfClass;
static void mn_shell_class_init (MNShellClass * c) G_GNUC_UNUSED;
static void mn_shell_init (MNShell * self) G_GNUC_UNUSED;
static void ___2_mn_shell_finalize (GObject * object) G_GNUC_UNUSED;
-static void mn_shell_mailboxes_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_init_icon (MNShell * self) G_GNUC_UNUSED;
-static void mn_shell_notify_blink_on_errors_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-static void mn_shell_notify_mail_reader_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-static void mn_shell_notify_summary_tooltip_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_notify_blink_on_errors_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_notify_mail_reader_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_notify_summary_tooltip_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-static void mn_shell_icon_activate_summary_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_icon_activate_main_window_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_mail_reader_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_update_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_properties_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
@@ -76,20 +77,26 @@ static void mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data) G_G
static void mn_shell_update_sensitivity (MNShell * self) G_GNUC_UNUSED;
static void mn_shell_update_icon (MNShell * self) G_GNUC_UNUSED;
static void mn_shell_update_tooltip (MNShell * self) G_GNUC_UNUSED;
+static int mn_shell_new_mailboxes_compare_func (gconstpointer a, gconstpointer b) G_GNUC_UNUSED;
+static time_t mn_shell_get_latest_sent_time (MNMailbox * mailbox) G_GNUC_UNUSED;
+static int mn_shell_mailboxes_compare_by_name_func (gconstpointer a, gconstpointer b) G_GNUC_UNUSED;
static GtkWidget * mn_shell_tooltip_section_new (GtkVBox * vbox, const char * title) G_GNUC_UNUSED;
static void mn_shell_tooltip_text_section_new (GtkVBox * vbox, const char * title, const char * text) G_GNUC_UNUSED;
+static void mn_shell_welcome_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_mailbox_properties_dialog_weak_notify_cb (gpointer data, GObject * former_object) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static GObjectClass *parent_class = NULL;
/* Short form macros */
-#define self_mailboxes_messages_changed_h mn_shell_mailboxes_messages_changed_h
+#define self_messages_changed_h mn_shell_messages_changed_h
+#define self_mailbox_removed_h mn_shell_mailbox_removed_h
#define self_init_icon mn_shell_init_icon
#define self_notify_blink_on_errors_cb mn_shell_notify_blink_on_errors_cb
#define self_notify_mail_reader_cb mn_shell_notify_mail_reader_cb
#define self_notify_summary_tooltip_cb mn_shell_notify_summary_tooltip_cb
#define self_icon_activate_h mn_shell_icon_activate_h
-#define self_icon_activate_summary_h mn_shell_icon_activate_summary_h
+#define self_icon_activate_main_window_h mn_shell_icon_activate_main_window_h
#define self_icon_activate_mail_reader_h mn_shell_icon_activate_mail_reader_h
#define self_icon_activate_update_h mn_shell_icon_activate_update_h
#define self_icon_activate_properties_h mn_shell_icon_activate_properties_h
@@ -100,12 +107,19 @@ static GObjectClass *parent_class = NULL;
#define self_update_sensitivity mn_shell_update_sensitivity
#define self_update_icon mn_shell_update_icon
#define self_update_tooltip mn_shell_update_tooltip
+#define self_new_mailboxes_compare_func mn_shell_new_mailboxes_compare_func
+#define self_get_latest_sent_time mn_shell_get_latest_sent_time
+#define self_mailboxes_compare_by_name_func mn_shell_mailboxes_compare_by_name_func
#define self_tooltip_section_new mn_shell_tooltip_section_new
#define self_tooltip_text_section_new mn_shell_tooltip_text_section_new
#define self_new mn_shell_new
-#define self_display_about mn_shell_display_about
-#define self_run_welcome mn_shell_run_welcome
+#define self_display_about_dialog mn_shell_display_about_dialog
+#define self_display_welcome_dialog mn_shell_display_welcome_dialog
+#define self_welcome_response_h mn_shell_welcome_response_h
#define self_report mn_shell_report
+#define self_add_mailbox_properties_dialog mn_shell_add_mailbox_properties_dialog
+#define self_mailbox_properties_dialog_weak_notify_cb mn_shell_mailbox_properties_dialog_weak_notify_cb
+#define self_get_mailbox_properties_dialog mn_shell_get_mailbox_properties_dialog
GType
mn_shell_get_type (void)
{
@@ -156,9 +170,9 @@ ___dispose (GObject *obj_self)
MNShell *self G_GNUC_UNUSED = MN_SHELL (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 47 "mn-shell.gob"
+#line 49 "mn-shell.gob"
if(self->mailboxes) { g_object_unref ((gpointer) self->mailboxes); self->mailboxes = NULL; }
-#line 162 "mn-shell.c"
+#line 176 "mn-shell.c"
}
#undef __GOB_FUNCTION__
@@ -169,9 +183,9 @@ ___finalize(GObject *obj_self)
#define __GOB_FUNCTION__ "MN:Shell::finalize"
MNShell *self G_GNUC_UNUSED = MN_SHELL (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 79 "mn-shell.gob"
+#line 80 "mn-shell.gob"
___2_mn_shell_finalize(obj_self);
-#line 175 "mn-shell.c"
+#line 189 "mn-shell.c"
}
#undef __GOB_FUNCTION__
@@ -185,24 +199,24 @@ mn_shell_class_init (MNShellClass * c G_GNUC_UNUSED)
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-#line 79 "mn-shell.gob"
+#line 80 "mn-shell.gob"
g_object_class->finalize = ___finalize;
-#line 191 "mn-shell.c"
+#line 205 "mn-shell.c"
g_object_class->dispose = ___dispose;
}
#undef __GOB_FUNCTION__
-#line 52 "mn-shell.gob"
+#line 55 "mn-shell.gob"
static void
mn_shell_init (MNShell * self G_GNUC_UNUSED)
-#line 198 "mn-shell.c"
+#line 212 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,TYPE_SELF,MNShellPrivate);
-#line 47 "mn-shell.gob"
+#line 49 "mn-shell.gob"
self->mailboxes = mn_mailboxes_new();
-#line 204 "mn-shell.c"
+#line 218 "mn-shell.c"
{
-#line 53 "mn-shell.gob"
+#line 56 "mn-shell.gob"
g_return_if_fail(mn_shell == NULL);
mn_shell = self;
@@ -215,91 +229,125 @@ mn_shell_init (MNShell * self G_GNUC_UNUSED)
eel_gconf_notification_add(MN_CONF_SUMMARY_TOOLTIP, self_notify_summary_tooltip_cb, self);
g_object_connect(self->mailboxes,
- "signal::messages-changed", self_mailboxes_messages_changed_h, self,
+ "signal::messages-changed", self_messages_changed_h, self,
+ "signal::mailbox-removed", self_mailbox_removed_h, self,
"swapped-signal::notify::must-poll", self_update_sensitivity, self,
"swapped-signal::list-changed", self_update_tooltip, self,
"swapped-signal::list-changed", self_update_icon, self,
- "swapped-signal::has-new-changed", self_update_tooltip, self,
- "swapped-signal::has-new-changed", self_update_icon, self,
"swapped-signal::error-changed", self_update_tooltip, self,
"swapped-signal::error-changed", self_update_icon, self,
- "swapped-signal::messages-changed", self_update_tooltip, self,
NULL);
mn_summary_popup_init();
-#line 232 "mn-shell.c"
+#line 244 "mn-shell.c"
}
}
#undef __GOB_FUNCTION__
-#line 79 "mn-shell.gob"
+#line 80 "mn-shell.gob"
static void
___2_mn_shell_finalize (GObject * object G_GNUC_UNUSED)
-#line 242 "mn-shell.c"
+#line 254 "mn-shell.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
{
#define __GOB_FUNCTION__ "MN:Shell::finalize"
{
-#line 81 "mn-shell.gob"
+#line 82 "mn-shell.gob"
gtk_main_quit();
PARENT_HANDLER(object);
}}
-#line 254 "mn-shell.c"
+#line 266 "mn-shell.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 86 "mn-shell.gob"
+#line 87 "mn-shell.gob"
static void
-mn_shell_mailboxes_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data)
-#line 261 "mn-shell.c"
+mn_shell_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data)
+#line 273 "mn-shell.c"
{
-#define __GOB_FUNCTION__ "MN:Shell::mailboxes_messages_changed_h"
-#line 86 "mn-shell.gob"
+#define __GOB_FUNCTION__ "MN:Shell::messages_changed_h"
+#line 87 "mn-shell.gob"
g_return_if_fail (mailboxes != NULL);
-#line 86 "mn-shell.gob"
+#line 87 "mn-shell.gob"
g_return_if_fail (MN_IS_MAILBOXES (mailboxes));
-#line 86 "mn-shell.gob"
+#line 87 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 270 "mn-shell.c"
+#line 282 "mn-shell.c"
{
-#line 90 "mn-shell.gob"
+#line 91 "mn-shell.gob"
+ Self *self = user_data;
+
if (has_new)
{
gnome_triggers_do(_("You have new mail."), NULL, "mail-notification", "new-mail", NULL);
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_NEW_MAIL_ENABLED))
+ if (mn_conf_has_command(MN_CONF_COMMANDS_NEW_MAIL_NAMESPACE))
mn_execute_command(MN_CONF_COMMANDS_NEW_MAIL_COMMAND);
}
+
+ self_update_tooltip(self);
+ self_update_icon(self);
+ }}
+#line 298 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 105 "mn-shell.gob"
+static void
+mn_shell_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data)
+#line 304 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::mailbox_removed_h"
+#line 105 "mn-shell.gob"
+ g_return_if_fail (mailboxes != NULL);
+#line 105 "mn-shell.gob"
+ g_return_if_fail (MN_IS_MAILBOXES (mailboxes));
+#line 105 "mn-shell.gob"
+ g_return_if_fail (mailbox != NULL);
+#line 105 "mn-shell.gob"
+ g_return_if_fail (MN_IS_MAILBOX (mailbox));
+#line 105 "mn-shell.gob"
+ g_return_if_fail (user_data != NULL);
+#line 317 "mn-shell.c"
+{
+#line 109 "mn-shell.gob"
+
+ Self *self = user_data;
+ MNMailboxPropertiesDialog *dialog;
+
+ /* destroy the associated properties dialog, if any */
+ dialog = self_get_mailbox_properties_dialog(self, mailbox->uri);
+ if (dialog)
+ gtk_widget_destroy(GTK_WIDGET(dialog));
}}
-#line 281 "mn-shell.c"
+#line 329 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 99 "mn-shell.gob"
+#line 119 "mn-shell.gob"
static void
mn_shell_init_icon (MNShell * self)
-#line 287 "mn-shell.c"
+#line 335 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::init_icon"
-#line 99 "mn-shell.gob"
+#line 119 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 99 "mn-shell.gob"
+#line 119 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 294 "mn-shell.c"
+#line 342 "mn-shell.c"
{
-#line 101 "mn-shell.gob"
+#line 121 "mn-shell.gob"
selfp->icon = MN_MAIL_ICON(mn_mail_icon_new());
g_object_connect(selfp->icon,
"signal::activate", self_icon_activate_h, self,
+ "signal::activate-main-window", self_icon_activate_main_window_h, self,
"signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
- "signal::activate-summary", self_icon_activate_summary_h, self,
"signal::activate-update", self_icon_activate_update_h, self,
"signal::activate-properties", self_icon_activate_properties_h, self,
"signal::activate-help", self_icon_activate_help_h, self,
@@ -309,22 +357,23 @@ mn_shell_init_icon (MNShell * self)
NULL);
self_update_sensitivity(self);
+ self_update_tooltip(self);
self_update_icon(self);
}}
-#line 315 "mn-shell.c"
+#line 364 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 120 "mn-shell.gob"
+#line 141 "mn-shell.gob"
static void
-mn_shell_notify_blink_on_errors_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 321 "mn-shell.c"
+mn_shell_notify_blink_on_errors_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
+#line 370 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::notify_blink_on_errors_cb"
-#line 120 "mn-shell.gob"
+#line 141 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 326 "mn-shell.c"
+#line 375 "mn-shell.c"
{
-#line 125 "mn-shell.gob"
+#line 146 "mn-shell.gob"
Self *self = user_data;
@@ -332,20 +381,20 @@ mn_shell_notify_blink_on_errors_cb (GConfClient * client, guint cnxn_id, GConfEn
self_update_icon(self);
GDK_THREADS_LEAVE();
}}
-#line 336 "mn-shell.c"
+#line 385 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 133 "mn-shell.gob"
+#line 154 "mn-shell.gob"
static void
-mn_shell_notify_mail_reader_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 342 "mn-shell.c"
+mn_shell_notify_mail_reader_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
+#line 391 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::notify_mail_reader_cb"
-#line 133 "mn-shell.gob"
+#line 154 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 347 "mn-shell.c"
+#line 396 "mn-shell.c"
{
-#line 138 "mn-shell.gob"
+#line 159 "mn-shell.gob"
Self *self = user_data;
@@ -353,20 +402,20 @@ mn_shell_notify_mail_reader_cb (GConfClient * client, guint cnxn_id, GConfEntry
self_update_sensitivity(self);
GDK_THREADS_LEAVE();
}}
-#line 357 "mn-shell.c"
+#line 406 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 146 "mn-shell.gob"
+#line 167 "mn-shell.gob"
static void
-mn_shell_notify_summary_tooltip_cb (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 363 "mn-shell.c"
+mn_shell_notify_summary_tooltip_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
+#line 412 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::notify_summary_tooltip_cb"
-#line 146 "mn-shell.gob"
+#line 167 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 368 "mn-shell.c"
+#line 417 "mn-shell.c"
{
-#line 151 "mn-shell.gob"
+#line 172 "mn-shell.gob"
Self *self = user_data;
@@ -374,294 +423,282 @@ mn_shell_notify_summary_tooltip_cb (GConfClient * client, guint cnxn_id, GConfEn
self_update_tooltip(self);
GDK_THREADS_LEAVE();
}}
-#line 378 "mn-shell.c"
+#line 427 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 159 "mn-shell.gob"
+#line 180 "mn-shell.gob"
static void
mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data)
-#line 384 "mn-shell.c"
+#line 433 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_h"
-#line 159 "mn-shell.gob"
+#line 180 "mn-shell.gob"
g_return_if_fail (icon != NULL);
-#line 159 "mn-shell.gob"
+#line 180 "mn-shell.gob"
g_return_if_fail (MN_IS_MAIL_ICON (icon));
-#line 159 "mn-shell.gob"
+#line 180 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 393 "mn-shell.c"
+#line 442 "mn-shell.c"
{
-#line 162 "mn-shell.gob"
+#line 183 "mn-shell.gob"
+ MNShell *self = user_data;
MNAction action;
- action = mn_conf_get_enum_value(MN_TYPE_ACTION, MN_CONF_DOUBLE_CLICK_ACTION);
+ action = mn_conf_get_enum_value(MN_TYPE_ACTION, MN_CONF_DOUBLE_CLICK_ACTION_2);
switch (action)
{
- case MN_ACTION_DISPLAY_MAIL_SUMMARY:
- mn_summary_dialog_display();
+ case MN_ACTION_DISPLAY_MAIN_WINDOW:
+ mn_main_window_display();
break;
case MN_ACTION_LAUNCH_MAIL_READER:
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READER_ENABLED))
+ if (mn_conf_has_command(MN_CONF_COMMANDS_MAIL_READER_NAMESPACE))
mn_execute_command(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
break;
+ case MN_ACTION_UPDATE_MAIL_STATUS:
+ mn_mailboxes_check(self->mailboxes);
+ break;
+
default:
g_return_if_reached();
}
}}
-#line 416 "mn-shell.c"
+#line 470 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 183 "mn-shell.gob"
+#line 209 "mn-shell.gob"
static void
-mn_shell_icon_activate_summary_h (MNMailIcon * icon, gpointer user_data)
-#line 422 "mn-shell.c"
+mn_shell_icon_activate_main_window_h (MNMailIcon * icon, gpointer user_data)
+#line 476 "mn-shell.c"
{
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_summary_h"
-#line 183 "mn-shell.gob"
+#define __GOB_FUNCTION__ "MN:Shell::icon_activate_main_window_h"
+#line 209 "mn-shell.gob"
g_return_if_fail (icon != NULL);
-#line 183 "mn-shell.gob"
+#line 209 "mn-shell.gob"
g_return_if_fail (MN_IS_MAIL_ICON (icon));
-#line 183 "mn-shell.gob"
+#line 209 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 431 "mn-shell.c"
+#line 485 "mn-shell.c"
{
-#line 186 "mn-shell.gob"
+#line 212 "mn-shell.gob"
- mn_summary_dialog_display();
+ mn_main_window_display();
}}
-#line 437 "mn-shell.c"
+#line 491 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 190 "mn-shell.gob"
+#line 216 "mn-shell.gob"
static void
mn_shell_icon_activate_mail_reader_h (MNMailIcon * icon, gpointer user_data)
-#line 443 "mn-shell.c"
+#line 497 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_mail_reader_h"
-#line 190 "mn-shell.gob"
+#line 216 "mn-shell.gob"
g_return_if_fail (icon != NULL);
-#line 190 "mn-shell.gob"
+#line 216 "mn-shell.gob"
g_return_if_fail (MN_IS_MAIL_ICON (icon));
-#line 190 "mn-shell.gob"
+#line 216 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 452 "mn-shell.c"
+#line 506 "mn-shell.c"
{
-#line 193 "mn-shell.gob"
+#line 219 "mn-shell.gob"
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READER_ENABLED))
- mn_execute_command(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
+ mn_execute_command(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
}}
-#line 459 "mn-shell.c"
+#line 512 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 198 "mn-shell.gob"
+#line 223 "mn-shell.gob"
static void
mn_shell_icon_activate_update_h (MNMailIcon * icon, gpointer user_data)
-#line 465 "mn-shell.c"
+#line 518 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_update_h"
-#line 198 "mn-shell.gob"
+#line 223 "mn-shell.gob"
g_return_if_fail (icon != NULL);
-#line 198 "mn-shell.gob"
+#line 223 "mn-shell.gob"
g_return_if_fail (MN_IS_MAIL_ICON (icon));
-#line 198 "mn-shell.gob"
+#line 223 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 474 "mn-shell.c"
+#line 527 "mn-shell.c"
{
-#line 201 "mn-shell.gob"
+#line 226 "mn-shell.gob"
Self *self = user_data;
mn_mailboxes_check(self->mailboxes);
}}
-#line 481 "mn-shell.c"
+#line 534 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 206 "mn-shell.gob"
+#line 231 "mn-shell.gob"
static void
mn_shell_icon_activate_properties_h (MNMailIcon * icon, gpointer user_data)
-#line 487 "mn-shell.c"
+#line 540 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_properties_h"
-#line 206 "mn-shell.gob"
+#line 231 "mn-shell.gob"
g_return_if_fail (icon != NULL);
-#line 206 "mn-shell.gob"
+#line 231 "mn-shell.gob"
g_return_if_fail (MN_IS_MAIL_ICON (icon));
-#line 206 "mn-shell.gob"
+#line 231 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 496 "mn-shell.c"
+#line 549 "mn-shell.c"
{
-#line 209 "mn-shell.gob"
+#line 234 "mn-shell.gob"
- mn_properties_display();
+ mn_properties_dialog_display();
}}
-#line 502 "mn-shell.c"
+#line 555 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 213 "mn-shell.gob"
+#line 238 "mn-shell.gob"
static void
mn_shell_icon_activate_help_h (MNMailIcon * icon, gpointer user_data)
-#line 508 "mn-shell.c"
+#line 561 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_help_h"
-#line 213 "mn-shell.gob"
+#line 238 "mn-shell.gob"
g_return_if_fail (icon != NULL);
-#line 213 "mn-shell.gob"
+#line 238 "mn-shell.gob"
g_return_if_fail (MN_IS_MAIL_ICON (icon));
-#line 213 "mn-shell.gob"
+#line 238 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 517 "mn-shell.c"
+#line 570 "mn-shell.c"
{
-#line 216 "mn-shell.gob"
+#line 241 "mn-shell.gob"
mn_display_help(NULL, NULL);
}}
-#line 523 "mn-shell.c"
+#line 576 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 220 "mn-shell.gob"
+#line 245 "mn-shell.gob"
static void
mn_shell_icon_activate_about_h (MNMailIcon * icon, gpointer user_data)
-#line 529 "mn-shell.c"
+#line 582 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_about_h"
-#line 220 "mn-shell.gob"
+#line 245 "mn-shell.gob"
g_return_if_fail (icon != NULL);
-#line 220 "mn-shell.gob"
+#line 245 "mn-shell.gob"
g_return_if_fail (MN_IS_MAIL_ICON (icon));
-#line 220 "mn-shell.gob"
+#line 245 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 538 "mn-shell.c"
+#line 591 "mn-shell.c"
{
-#line 223 "mn-shell.gob"
+#line 248 "mn-shell.gob"
Self *self = user_data;
- self_display_about(self);
+ self_display_about_dialog(self);
}}
-#line 545 "mn-shell.c"
+#line 598 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 228 "mn-shell.gob"
+#line 253 "mn-shell.gob"
static void
mn_shell_icon_activate_remove_h (MNMailIcon * icon, gpointer user_data)
-#line 551 "mn-shell.c"
+#line 604 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_remove_h"
-#line 228 "mn-shell.gob"
+#line 253 "mn-shell.gob"
g_return_if_fail (icon != NULL);
-#line 228 "mn-shell.gob"
+#line 253 "mn-shell.gob"
g_return_if_fail (MN_IS_MAIL_ICON (icon));
-#line 228 "mn-shell.gob"
+#line 253 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 560 "mn-shell.c"
+#line 613 "mn-shell.c"
{
-#line 231 "mn-shell.gob"
+#line 256 "mn-shell.gob"
Self *self = user_data;
g_object_unref(self);
}}
-#line 567 "mn-shell.c"
+#line 620 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 236 "mn-shell.gob"
+#line 261 "mn-shell.gob"
static void
mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data)
-#line 573 "mn-shell.c"
+#line 626 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_destroy_h"
-#line 236 "mn-shell.gob"
+#line 261 "mn-shell.gob"
g_return_if_fail (object != NULL);
-#line 236 "mn-shell.gob"
+#line 261 "mn-shell.gob"
g_return_if_fail (GTK_IS_OBJECT (object));
-#line 236 "mn-shell.gob"
+#line 261 "mn-shell.gob"
g_return_if_fail (user_data != NULL);
-#line 582 "mn-shell.c"
+#line 635 "mn-shell.c"
{
-#line 239 "mn-shell.gob"
+#line 264 "mn-shell.gob"
Self *self = user_data;
/* The Notification Area applet has been terminated. Recreate the icon. */
self_init_icon(self);
}}
-#line 591 "mn-shell.c"
+#line 644 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 246 "mn-shell.gob"
+#line 271 "mn-shell.gob"
static void
mn_shell_update_sensitivity (MNShell * self)
-#line 597 "mn-shell.c"
+#line 650 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::update_sensitivity"
-#line 246 "mn-shell.gob"
+#line 271 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 246 "mn-shell.gob"
+#line 271 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 604 "mn-shell.c"
+#line 657 "mn-shell.c"
{
-#line 248 "mn-shell.gob"
+#line 273 "mn-shell.gob"
- gboolean mail_reader_sensitive = FALSE;
-
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READER_ENABLED))
- {
- char *mail_reader;
-
- mail_reader = eel_gconf_get_string(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
- if (mail_reader)
- {
- mail_reader_sensitive = TRUE;
- g_free(mail_reader);
- }
- }
-
- gtk_widget_set_sensitive(selfp->icon->mail_reader_item, mail_reader_sensitive);
+ gtk_widget_set_sensitive(selfp->icon->mail_reader_item, mn_conf_has_command(MN_CONF_COMMANDS_MAIL_READER_NAMESPACE));
gtk_widget_set_sensitive(selfp->icon->update_item, mn_mailboxes_get_must_poll(self->mailboxes));
}}
-#line 625 "mn-shell.c"
+#line 664 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 267 "mn-shell.gob"
+#line 278 "mn-shell.gob"
static void
mn_shell_update_icon (MNShell * self)
-#line 631 "mn-shell.c"
+#line 670 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::update_icon"
-#line 267 "mn-shell.gob"
+#line 278 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 267 "mn-shell.gob"
+#line 278 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 638 "mn-shell.c"
+#line 677 "mn-shell.c"
{
-#line 269 "mn-shell.gob"
+#line 280 "mn-shell.gob"
- GSList *mailboxes;
GSList *l;
- int n_new = 0;
+ gboolean has_new = FALSE;
gboolean blink = FALSE;
- mailboxes = mn_mailboxes_get(self->mailboxes);
- MN_LIST_FOREACH(l, mailboxes)
+ MN_LIST_FOREACH(l, mn_mailboxes_get(self->mailboxes))
{
MNMailbox *mailbox = l->data;
- if (mn_mailbox_get_has_new(mailbox))
- n_new++;
- if (! blink && (mn_mailbox_get_error(mailbox) || MN_IS_UNSUPPORTED_MAILBOX(mailbox)))
+ if (mn_mailbox_get_messages(mailbox))
+ has_new = TRUE;
+ if (mn_mailbox_get_error(mailbox) || MN_IS_UNSUPPORTED_MAILBOX(mailbox))
blink = TRUE;
}
- if (blink && ! eel_gconf_get_boolean(MN_CONF_BLINK_ON_ERRORS))
- blink = FALSE;
-
- if (selfp->n_new > 0 && n_new == 0 && eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READ_ENABLED))
+ if (selfp->has_new && ! has_new && mn_conf_has_command(MN_CONF_COMMANDS_MAIL_READ_NAMESPACE))
mn_execute_command(MN_CONF_COMMANDS_MAIL_READ_COMMAND);
- selfp->n_new = n_new;
+ selfp->has_new = has_new;
- if (n_new > 0 || blink)
+ if (blink && ! eel_gconf_get_boolean(MN_CONF_BLINK_ON_ERRORS))
+ blink = FALSE;
+
+ if (has_new || blink)
{
mn_blinking_image_set_blinking(MN_BLINKING_IMAGE(selfp->icon->image), blink);
gtk_widget_show(GTK_WIDGET(selfp->icon));
@@ -669,22 +706,22 @@ mn_shell_update_icon (MNShell * self)
else
gtk_widget_hide(GTK_WIDGET(selfp->icon));
}}
-#line 673 "mn-shell.c"
+#line 710 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 302 "mn-shell.gob"
+#line 311 "mn-shell.gob"
static void
mn_shell_update_tooltip (MNShell * self)
-#line 679 "mn-shell.c"
+#line 716 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::update_tooltip"
-#line 302 "mn-shell.gob"
+#line 311 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 302 "mn-shell.gob"
+#line 311 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 686 "mn-shell.c"
+#line 723 "mn-shell.c"
{
-#line 304 "mn-shell.gob"
+#line 313 "mn-shell.gob"
GtkWidget *vbox;
GSList *mailboxes;
@@ -695,61 +732,89 @@ mn_shell_update_tooltip (MNShell * self)
if (mailboxes)
{
GSList *l;
- GString *new_string;
- GString *error_string;
- GString *unsupported_string;
-
- new_string = g_string_new(NULL);
- error_string = g_string_new(NULL);
- unsupported_string = g_string_new(NULL);
+ GSList *new_mailboxes = NULL;
+ GSList *error_mailboxes = NULL;
+ GSList *unsupported_mailboxes = NULL;
MN_LIST_FOREACH(l, mailboxes)
{
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))
+ if (mn_mailbox_get_messages(mailbox))
+ new_mailboxes = g_slist_append(new_mailboxes, mailbox);
+
+ if (mn_mailbox_get_error(mailbox))
+ error_mailboxes = g_slist_append(error_mailboxes, mailbox);
+
+ if (MN_IS_UNSUPPORTED_MAILBOX(mailbox))
+ unsupported_mailboxes = g_slist_append(unsupported_mailboxes, mailbox);
+ }
+
+ if (new_mailboxes)
+ {
+ GString *string = g_string_new(NULL);
+
+ new_mailboxes = g_slist_sort(new_mailboxes, self_new_mailboxes_compare_func);
+ MN_LIST_FOREACH(l, new_mailboxes)
{
+ MNMailbox *mailbox = l->data;
int n_messages;
- if (*new_string->str)
- g_string_append_c(new_string, '\n');
- g_string_append(new_string, name);
+ if (*string->str)
+ g_string_append_c(string, '\n');
+ g_string_append(string, mn_mailbox_get_name(mailbox));
n_messages = g_slist_length(mn_mailbox_get_messages(mailbox));
if (n_messages > 0)
- g_string_append_printf(new_string, " (%i)", n_messages);
+ g_string_append_printf(string, " (%i)", n_messages);
}
+ g_slist_free(new_mailboxes);
- if (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))
+ self_tooltip_text_section_new(GTK_VBOX(vbox), _("Mailboxes Having New Mail"), string->str);
+ g_string_free(string, TRUE);
+ }
+
+ if (error_mailboxes)
+ {
+ GString *string = g_string_new(NULL);
+
+ error_mailboxes = g_slist_sort(error_mailboxes, self_mailboxes_compare_by_name_func);
+ MN_LIST_FOREACH(l, error_mailboxes)
{
- 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)));
+ MNMailbox *mailbox = l->data;
+
+ if (*string->str)
+ g_string_append_c(string, '\n');
+ g_string_append_printf(string, "%s: %s",
+ mn_mailbox_get_name(mailbox),
+ mn_mailbox_get_error(mailbox));
}
+ g_slist_free(error_mailboxes);
+
+ self_tooltip_text_section_new(GTK_VBOX(vbox), _("Errors"), string->str);
+ g_string_free(string, TRUE);
}
+
+ if (unsupported_mailboxes)
+ {
+ GString *string = g_string_new(NULL);
- if (*new_string->str)
- self_tooltip_text_section_new(GTK_VBOX(vbox), _("Mailboxes Having New Mail"), new_string->str);
- if (*error_string->str)
- self_tooltip_text_section_new(GTK_VBOX(vbox), _("Errors"), error_string->str);
- if (*unsupported_string->str)
- self_tooltip_text_section_new(GTK_VBOX(vbox), _("Unsupported Mailboxes"), unsupported_string->str);
+ unsupported_mailboxes = g_slist_sort(unsupported_mailboxes, self_mailboxes_compare_by_name_func);
+ MN_LIST_FOREACH(l, unsupported_mailboxes)
+ {
+ MNMailbox *mailbox = l->data;
- g_string_free(new_string, TRUE);
- g_string_free(error_string, TRUE);
- g_string_free(unsupported_string, TRUE);
+ if (*string->str)
+ g_string_append_c(string, '\n');
+ g_string_append_printf(string, "%s: %s",
+ mn_mailbox_get_name(mailbox),
+ mn_unsupported_mailbox_get_reason(MN_UNSUPPORTED_MAILBOX(mailbox)));
+ }
+ g_slist_free(unsupported_mailboxes);
+
+ self_tooltip_text_section_new(GTK_VBOX(vbox), _("Unsupported Mailboxes"), string->str);
+ g_string_free(string, TRUE);
+ }
}
if (eel_gconf_get_boolean(MN_CONF_SUMMARY_TOOLTIP))
@@ -759,47 +824,122 @@ mn_shell_update_tooltip (MNShell * self)
messages = mn_mailboxes_get_messages(mn_shell->mailboxes);
if (messages)
{
- GtkWidget *hbox;
- GtkWidget *messages_vbox;
+ GtkWidget *alignment;
+ GtkWidget *message_view;
- hbox = self_tooltip_section_new(GTK_VBOX(vbox), _("Mail Summary"));
+ alignment = self_tooltip_section_new(GTK_VBOX(vbox), _("Mail Summary"));
- messages_vbox = gtk_vbox_new(FALSE, 0);
- gtk_widget_set_name(messages_vbox, "mn-tooltip-section-body");
+ message_view = mn_message_view_new(TRUE, FALSE);
+ gtk_widget_set_name(message_view, "mn-message-view");
- mn_summary_update(GTK_VBOX(messages_vbox), messages, FALSE);
+ mn_message_view_set_messages(MN_MESSAGE_VIEW(message_view), messages);
mn_g_object_slist_free(messages);
- gtk_box_pack_start(GTK_BOX(hbox), messages_vbox, TRUE, TRUE, 0);
+ gtk_container_add(GTK_CONTAINER(alignment), message_view);
}
}
gtk_widget_show_all(vbox);
mn_mail_icon_set_tip_widget(selfp->icon, vbox);
}}
-#line 781 "mn-shell.c"
+#line 846 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 434 "mn-shell.gob"
+static int
+mn_shell_new_mailboxes_compare_func (gconstpointer a, gconstpointer b)
+#line 852 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::new_mailboxes_compare_func"
+{
+#line 436 "mn-shell.gob"
+
+ MNMailbox *mailbox_a = (MNMailbox *) a;
+ MNMailbox *mailbox_b = (MNMailbox *) b;
+ int cmp;
+
+ /* sort by sent time (descending order) */
+ cmp = self_get_latest_sent_time(mailbox_b) - self_get_latest_sent_time(mailbox_a);
+ /* else sort by number of messages (descending order) */
+ if (cmp == 0)
+ cmp = g_slist_length(mn_mailbox_get_messages(mailbox_b)) - g_slist_length(mn_mailbox_get_messages(mailbox_a));
+ /* else sort by name (ascending order) */
+ if (cmp == 0)
+ cmp = self_mailboxes_compare_by_name_func(a, b);
+
+ return cmp;
+ }}
+#line 873 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 453 "mn-shell.gob"
+static time_t
+mn_shell_get_latest_sent_time (MNMailbox * mailbox)
+#line 879 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::get_latest_sent_time"
+#line 453 "mn-shell.gob"
+ g_return_val_if_fail (mailbox != NULL, (time_t )0);
+#line 453 "mn-shell.gob"
+ g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (time_t )0);
+#line 886 "mn-shell.c"
+{
+#line 455 "mn-shell.gob"
+
+ GSList *l;
+ time_t latest = 0;
+
+ MN_LIST_FOREACH(l, mn_mailbox_get_messages(mailbox))
+ {
+ MNMessage *message = l->data;
+
+ if (message->sent_time > latest)
+ latest = message->sent_time;
+ }
+
+ return latest;
+ }}
+#line 903 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 397 "mn-shell.gob"
+#line 470 "mn-shell.gob"
+static int
+mn_shell_mailboxes_compare_by_name_func (gconstpointer a, gconstpointer b)
+#line 909 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::mailboxes_compare_by_name_func"
+{
+#line 472 "mn-shell.gob"
+
+ MNMailbox *mailbox_a = (MNMailbox *) a;
+ MNMailbox *mailbox_b = (MNMailbox *) b;
+
+ return mn_utf8_strcasecoll(mn_mailbox_get_name(mailbox_a),
+ mn_mailbox_get_name(mailbox_b));
+ }}
+#line 921 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 480 "mn-shell.gob"
static GtkWidget *
mn_shell_tooltip_section_new (GtkVBox * vbox, const char * title)
-#line 787 "mn-shell.c"
+#line 927 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::tooltip_section_new"
-#line 397 "mn-shell.gob"
+#line 480 "mn-shell.gob"
g_return_val_if_fail (vbox != NULL, (GtkWidget * )0);
-#line 397 "mn-shell.gob"
+#line 480 "mn-shell.gob"
g_return_val_if_fail (GTK_IS_VBOX (vbox), (GtkWidget * )0);
-#line 397 "mn-shell.gob"
+#line 480 "mn-shell.gob"
g_return_val_if_fail (title != NULL, (GtkWidget * )0);
-#line 796 "mn-shell.c"
+#line 936 "mn-shell.c"
{
-#line 400 "mn-shell.gob"
+#line 483 "mn-shell.gob"
GtkWidget *child_vbox;
char *markup;
+ GtkWidget *alignment;
GtkWidget *label;
- GtkWidget *hbox;
child_vbox = gtk_vbox_new(FALSE, 6);
@@ -813,78 +953,76 @@ mn_shell_tooltip_section_new (GtkVBox * vbox, const char * title)
gtk_box_pack_start(GTK_BOX(child_vbox), label, FALSE, FALSE, 0);
- hbox = gtk_hbox_new(FALSE, 0);
-
- label = gtk_label_new(" ");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+ alignment = gtk_alignment_new(0.5, 0.5, 1.0, 1.0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0);
- gtk_box_pack_start(GTK_BOX(child_vbox), hbox, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(child_vbox), alignment, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox), child_vbox, TRUE, TRUE, 0);
- return hbox;
+ return alignment;
}}
-#line 827 "mn-shell.c"
+#line 965 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 429 "mn-shell.gob"
+#line 510 "mn-shell.gob"
static void
mn_shell_tooltip_text_section_new (GtkVBox * vbox, const char * title, const char * text)
-#line 833 "mn-shell.c"
+#line 971 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::tooltip_text_section_new"
-#line 429 "mn-shell.gob"
+#line 510 "mn-shell.gob"
g_return_if_fail (vbox != NULL);
-#line 429 "mn-shell.gob"
+#line 510 "mn-shell.gob"
g_return_if_fail (GTK_IS_VBOX (vbox));
-#line 429 "mn-shell.gob"
+#line 510 "mn-shell.gob"
g_return_if_fail (title != NULL);
-#line 429 "mn-shell.gob"
+#line 510 "mn-shell.gob"
g_return_if_fail (text != NULL);
-#line 844 "mn-shell.c"
+#line 982 "mn-shell.c"
{
-#line 433 "mn-shell.gob"
+#line 514 "mn-shell.gob"
- GtkWidget *hbox;
+ GtkWidget *alignment;
GtkWidget *label;
- hbox = self_tooltip_section_new(GTK_VBOX(vbox), title);
+ alignment = self_tooltip_section_new(GTK_VBOX(vbox), title);
label = gtk_label_new(text);
gtk_widget_set_name(label, "mn-tooltip-section-body");
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
+ gtk_container_add(GTK_CONTAINER(alignment), label);
}}
-#line 859 "mn-shell.c"
+#line 997 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 446 "mn-shell.gob"
+#line 527 "mn-shell.gob"
MNShell *
mn_shell_new (void)
-#line 865 "mn-shell.c"
+#line 1003 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::new"
{
-#line 448 "mn-shell.gob"
+#line 529 "mn-shell.gob"
return GET_NEW;
}}
-#line 873 "mn-shell.c"
+#line 1011 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 452 "mn-shell.gob"
+#line 533 "mn-shell.gob"
void
-mn_shell_display_about (MNShell * self)
-#line 879 "mn-shell.c"
+mn_shell_display_about_dialog (MNShell * self)
+#line 1017 "mn-shell.c"
{
-#define __GOB_FUNCTION__ "MN:Shell::display_about"
-#line 452 "mn-shell.gob"
+#define __GOB_FUNCTION__ "MN:Shell::display_about_dialog"
+#line 533 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 452 "mn-shell.gob"
+#line 533 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 886 "mn-shell.c"
+#line 1024 "mn-shell.c"
{
-#line 454 "mn-shell.gob"
+#line 535 "mn-shell.gob"
if (selfp->about)
{
@@ -894,55 +1032,74 @@ mn_shell_display_about (MNShell * self)
selfp->about = mn_about_dialog_new();
eel_add_weak_pointer(&selfp->about);
+
+ mn_main_window_add_transient(GTK_WINDOW(selfp->about));
gtk_widget_show(GTK_WIDGET(selfp->about));
}}
-#line 900 "mn-shell.c"
+#line 1040 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 466 "mn-shell.gob"
+#line 549 "mn-shell.gob"
void
-mn_shell_run_welcome (MNShell * self)
-#line 906 "mn-shell.c"
+mn_shell_display_welcome_dialog (MNShell * self)
+#line 1046 "mn-shell.c"
{
-#define __GOB_FUNCTION__ "MN:Shell::run_welcome"
-#line 466 "mn-shell.gob"
+#define __GOB_FUNCTION__ "MN:Shell::display_welcome_dialog"
+#line 549 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 466 "mn-shell.gob"
+#line 549 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 913 "mn-shell.c"
+#line 1053 "mn-shell.c"
{
-#line 468 "mn-shell.gob"
+#line 551 "mn-shell.gob"
GtkWidget *dialog;
- int response;
- mn_create_interface("welcome", "dialog", &dialog, NULL);
+ mn_create_interface(MN_INTERFACE_FILE("welcome.glade"), "dialog", &dialog, NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
- response = gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
+ g_signal_connect(dialog, "response", G_CALLBACK(self_welcome_response_h), NULL);
+ gtk_widget_show(dialog);
+ }}
+#line 1065 "mn-shell.c"
+#undef __GOB_FUNCTION__
+#line 561 "mn-shell.gob"
+static void
+mn_shell_welcome_response_h (GtkDialog * dialog, int response, gpointer user_data)
+#line 1071 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::welcome_response_h"
+#line 561 "mn-shell.gob"
+ g_return_if_fail (dialog != NULL);
+#line 561 "mn-shell.gob"
+ g_return_if_fail (GTK_IS_DIALOG (dialog));
+#line 1078 "mn-shell.c"
+{
+#line 565 "mn-shell.gob"
+
+ gtk_widget_destroy(GTK_WIDGET(dialog));
if (response == GTK_RESPONSE_OK)
- mn_properties_display();
+ mn_properties_dialog_display();
}}
-#line 929 "mn-shell.c"
+#line 1086 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 482 "mn-shell.gob"
+#line 571 "mn-shell.gob"
void
mn_shell_report (MNShell * self, char ** report)
-#line 935 "mn-shell.c"
+#line 1092 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::report"
-#line 482 "mn-shell.gob"
+#line 571 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 482 "mn-shell.gob"
+#line 571 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 482 "mn-shell.gob"
+#line 571 "mn-shell.gob"
g_return_if_fail (report != NULL);
-#line 944 "mn-shell.c"
+#line 1101 "mn-shell.c"
{
-#line 484 "mn-shell.gob"
+#line 573 "mn-shell.gob"
GString *string;
GSList *l;
@@ -957,7 +1114,7 @@ mn_shell_report (MNShell * self, char ** report)
g_string_append_printf(string, "%s\n", mailbox->uri->text);
- if (mn_mailbox_get_has_new(mailbox))
+ if (mn_mailbox_get_messages(mailbox))
g_string_append(string, " has-new\n");
if (error)
g_string_append_printf(string, " error %s\n", error);
@@ -968,5 +1125,151 @@ mn_shell_report (MNShell * self, char ** report)
*report = string->str;
g_string_free(string, FALSE);
}}
-#line 972 "mn-shell.c"
+#line 1129 "mn-shell.c"
#undef __GOB_FUNCTION__
+
+#line 599 "mn-shell.gob"
+void
+mn_shell_add_mailbox_properties_dialog (MNShell * self, MNMailboxPropertiesDialog * dialog)
+#line 1135 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::add_mailbox_properties_dialog"
+#line 599 "mn-shell.gob"
+ g_return_if_fail (self != NULL);
+#line 599 "mn-shell.gob"
+ g_return_if_fail (MN_IS_SHELL (self));
+#line 599 "mn-shell.gob"
+ g_return_if_fail (dialog != NULL);
+#line 599 "mn-shell.gob"
+ g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (dialog));
+#line 1146 "mn-shell.c"
+{
+#line 601 "mn-shell.gob"
+
+ g_return_if_fail(mn_mailbox_properties_dialog_get_uri(dialog) != NULL);
+
+ selfp->mailbox_properties_dialogs = g_slist_append(selfp->mailbox_properties_dialogs, dialog);
+ g_object_weak_ref(G_OBJECT(dialog), self_mailbox_properties_dialog_weak_notify_cb, self);
+ }}
+#line 1155 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 608 "mn-shell.gob"
+static void
+mn_shell_mailbox_properties_dialog_weak_notify_cb (gpointer data, GObject * former_object)
+#line 1161 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::mailbox_properties_dialog_weak_notify_cb"
+#line 608 "mn-shell.gob"
+ g_return_if_fail (data != NULL);
+#line 1166 "mn-shell.c"
+{
+#line 611 "mn-shell.gob"
+
+ Self *self = data;
+
+ selfp->mailbox_properties_dialogs = g_slist_remove(selfp->mailbox_properties_dialogs, former_object);
+ }}
+#line 1174 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 617 "mn-shell.gob"
+MNMailboxPropertiesDialog *
+mn_shell_get_mailbox_properties_dialog (MNShell * self, MNURI * uri)
+#line 1180 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::get_mailbox_properties_dialog"
+#line 617 "mn-shell.gob"
+ g_return_val_if_fail (self != NULL, (MNMailboxPropertiesDialog * )0);
+#line 617 "mn-shell.gob"
+ g_return_val_if_fail (MN_IS_SHELL (self), (MNMailboxPropertiesDialog * )0);
+#line 617 "mn-shell.gob"
+ g_return_val_if_fail (uri != NULL, (MNMailboxPropertiesDialog * )0);
+#line 617 "mn-shell.gob"
+ g_return_val_if_fail (MN_IS_URI (uri), (MNMailboxPropertiesDialog * )0);
+#line 1191 "mn-shell.c"
+{
+#line 619 "mn-shell.gob"
+
+ GSList *l;
+
+ MN_LIST_FOREACH(l, selfp->mailbox_properties_dialogs)
+ {
+ MNMailboxPropertiesDialog *dialog = l->data;
+ MNURI *this_uri;
+
+ this_uri = mn_mailbox_properties_dialog_get_uri(dialog);
+ if (! strcmp(this_uri->text, uri->text))
+ return dialog;
+ }
+
+ return NULL;
+ }}
+#line 1209 "mn-shell.c"
+#undef __GOB_FUNCTION__
+static const GEnumValue _mn_position_values[] = {
+ { MN_POSITION_TOP_LEFT, (char *)"MN_POSITION_TOP_LEFT", (char *)"top-left" },
+ { MN_POSITION_TOP_RIGHT, (char *)"MN_POSITION_TOP_RIGHT", (char *)"top-right" },
+ { MN_POSITION_BOTTOM_LEFT, (char *)"MN_POSITION_BOTTOM_LEFT", (char *)"bottom-left" },
+ { MN_POSITION_BOTTOM_RIGHT, (char *)"MN_POSITION_BOTTOM_RIGHT", (char *)"bottom-right" },
+ { 0, NULL, NULL }
+};
+
+GType
+mn_position_get_type (void)
+{
+ static GType type = 0;
+ if ___GOB_UNLIKELY(type == 0)
+ type = g_enum_register_static ("MNPosition", _mn_position_values);
+ return type;
+}
+
+static const GEnumValue _mn_action_values[] = {
+ { MN_ACTION_DISPLAY_MAIN_WINDOW, (char *)"MN_ACTION_DISPLAY_MAIN_WINDOW", (char *)"display-main-window" },
+ { MN_ACTION_LAUNCH_MAIL_READER, (char *)"MN_ACTION_LAUNCH_MAIL_READER", (char *)"launch-mail-reader" },
+ { MN_ACTION_UPDATE_MAIL_STATUS, (char *)"MN_ACTION_UPDATE_MAIL_STATUS", (char *)"update-mail-status" },
+ { 0, NULL, NULL }
+};
+
+GType
+mn_action_get_type (void)
+{
+ static GType type = 0;
+ if ___GOB_UNLIKELY(type == 0)
+ type = g_enum_register_static ("MNAction", _mn_action_values);
+ return type;
+}
+
+static const GEnumValue _mn_toolbar_style_values[] = {
+ { MN_TOOLBAR_STYLE_ICONS, (char *)"MN_TOOLBAR_STYLE_ICONS", (char *)"icons" },
+ { MN_TOOLBAR_STYLE_TEXT, (char *)"MN_TOOLBAR_STYLE_TEXT", (char *)"text" },
+ { MN_TOOLBAR_STYLE_BOTH, (char *)"MN_TOOLBAR_STYLE_BOTH", (char *)"both" },
+ { MN_TOOLBAR_STYLE_BOTH_HORIZ, (char *)"MN_TOOLBAR_STYLE_BOTH_HORIZ", (char *)"both-horiz" },
+ { MN_TOOLBAR_STYLE_DESKTOP_DEFAULT, (char *)"MN_TOOLBAR_STYLE_DESKTOP_DEFAULT", (char *)"desktop-default" },
+ { 0, NULL, NULL }
+};
+
+GType
+mn_toolbar_style_get_type (void)
+{
+ static GType type = 0;
+ if ___GOB_UNLIKELY(type == 0)
+ type = g_enum_register_static ("MNToolbarStyle", _mn_toolbar_style_values);
+ return type;
+}
+
+static const GEnumValue _mn_aspect_source_values[] = {
+ { MN_ASPECT_SOURCE_THEME, (char *)"MN_ASPECT_SOURCE_THEME", (char *)"theme" },
+ { MN_ASPECT_SOURCE_CUSTOM, (char *)"MN_ASPECT_SOURCE_CUSTOM", (char *)"custom" },
+ { 0, NULL, NULL }
+};
+
+GType
+mn_aspect_source_get_type (void)
+{
+ static GType type = 0;
+ if ___GOB_UNLIKELY(type == 0)
+ type = g_enum_register_static ("MNAspectSource", _mn_aspect_source_values);
+ return type;
+}
+
diff --git a/src/mn-shell.gob b/src/mn-shell.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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,9 @@
requires 2.0.10
%headertop{
+#include <gtk/gtk.h>
#include "mn-mailboxes.h"
+#include "mn-mailbox-properties-dialog.h"
%}
%privateheader{
#include "mn-mail-icon.h"
@@ -29,15 +31,15 @@ requires 2.0.10
#include <errno.h>
#include <gnome.h>
#include <eel/eel.h>
-#include "mn-properties.h"
+#include "mn-properties-dialog.h"
#include "mn-util.h"
#include "mn-conf.h"
#include "mn-mailboxes.h"
#include "mn-unsupported-mailbox.h"
#include "mn-about-dialog.h"
-#include "mn-summary.h"
#include "mn-summary-popup.h"
-#include "mn-summary-dialog.h"
+#include "mn-main-window.h"
+#include "mn-message-view.h"
MNShell *mn_shell = NULL;
%}
@@ -47,7 +49,8 @@ class MN:Shell from G:Object
public MNMailboxes *mailboxes = {mn_mailboxes_new()} unrefwith g_object_unref;
private MNMailIcon *icon;
private GtkWidget *about;
- private int n_new;
+ private gboolean has_new;
+ private GSList *mailbox_properties_dialogs;
init (self)
{
@@ -62,15 +65,13 @@ class MN:Shell from G:Object
eel_gconf_notification_add(MN_CONF_SUMMARY_TOOLTIP, self_notify_summary_tooltip_cb, self);
g_object_connect(self->mailboxes,
- "signal::messages-changed", self_mailboxes_messages_changed_h, self,
+ "signal::messages-changed", self_messages_changed_h, self,
+ "signal::mailbox-removed", self_mailbox_removed_h, self,
"swapped-signal::notify::must-poll", self_update_sensitivity, self,
"swapped-signal::list-changed", self_update_tooltip, self,
"swapped-signal::list-changed", self_update_icon, self,
- "swapped-signal::has-new-changed", self_update_tooltip, self,
- "swapped-signal::has-new-changed", self_update_icon, self,
"swapped-signal::error-changed", self_update_tooltip, self,
"swapped-signal::error-changed", self_update_icon, self,
- "swapped-signal::messages-changed", self_update_tooltip, self,
NULL);
mn_summary_popup_init();
@@ -84,16 +85,35 @@ class MN:Shell from G:Object
}
private void
- mailboxes_messages_changed_h (MN:Mailboxes *mailboxes (check null type),
- gboolean has_new,
- gpointer user_data (check null))
+ messages_changed_h (MN:Mailboxes *mailboxes (check null type),
+ gboolean has_new,
+ gpointer user_data (check null))
{
+ Self *self = user_data;
+
if (has_new)
{
gnome_triggers_do(_("You have new mail."), NULL, "mail-notification", "new-mail", NULL);
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_NEW_MAIL_ENABLED))
+ if (mn_conf_has_command(MN_CONF_COMMANDS_NEW_MAIL_NAMESPACE))
mn_execute_command(MN_CONF_COMMANDS_NEW_MAIL_COMMAND);
}
+
+ self_update_tooltip(self);
+ self_update_icon(self);
+ }
+
+ private void
+ mailbox_removed_h (MN:Mailboxes *mailboxes (check null type),
+ MN:Mailbox *mailbox (check null type),
+ gpointer user_data (check null))
+ {
+ Self *self = user_data;
+ MNMailboxPropertiesDialog *dialog;
+
+ /* destroy the associated properties dialog, if any */
+ dialog = self_get_mailbox_properties_dialog(self, mailbox->uri);
+ if (dialog)
+ gtk_widget_destroy(GTK_WIDGET(dialog));
}
private void
@@ -103,8 +123,8 @@ class MN:Shell from G:Object
g_object_connect(selfp->icon,
"signal::activate", self_icon_activate_h, self,
+ "signal::activate-main-window", self_icon_activate_main_window_h, self,
"signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
- "signal::activate-summary", self_icon_activate_summary_h, self,
"signal::activate-update", self_icon_activate_update_h, self,
"signal::activate-properties", self_icon_activate_properties_h, self,
"signal::activate-help", self_icon_activate_help_h, self,
@@ -114,12 +134,13 @@ class MN:Shell from G:Object
NULL);
self_update_sensitivity(self);
+ self_update_tooltip(self);
self_update_icon(self);
}
private void
notify_blink_on_errors_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data (check null))
{
@@ -132,7 +153,7 @@ class MN:Shell from G:Object
private void
notify_mail_reader_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data (check null))
{
@@ -145,7 +166,7 @@ class MN:Shell from G:Object
private void
notify_summary_tooltip_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data (check null))
{
@@ -160,39 +181,43 @@ class MN:Shell from G:Object
icon_activate_h (MN:Mail:Icon *icon (check null type),
gpointer user_data (check null))
{
+ MNShell *self = user_data;
MNAction action;
- action = mn_conf_get_enum_value(MN_TYPE_ACTION, MN_CONF_DOUBLE_CLICK_ACTION);
+ action = mn_conf_get_enum_value(MN_TYPE_ACTION, MN_CONF_DOUBLE_CLICK_ACTION_2);
switch (action)
{
- case MN_ACTION_DISPLAY_MAIL_SUMMARY:
- mn_summary_dialog_display();
+ case MN_ACTION_DISPLAY_MAIN_WINDOW:
+ mn_main_window_display();
break;
case MN_ACTION_LAUNCH_MAIL_READER:
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READER_ENABLED))
+ if (mn_conf_has_command(MN_CONF_COMMANDS_MAIL_READER_NAMESPACE))
mn_execute_command(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
break;
+ case MN_ACTION_UPDATE_MAIL_STATUS:
+ mn_mailboxes_check(self->mailboxes);
+ break;
+
default:
g_return_if_reached();
}
}
private void
- icon_activate_summary_h (MN:Mail:Icon *icon (check null type),
- gpointer user_data (check null))
+ icon_activate_main_window_h (MN:Mail:Icon *icon (check null type),
+ gpointer user_data (check null))
{
- mn_summary_dialog_display();
+ mn_main_window_display();
}
private void
icon_activate_mail_reader_h (MN:Mail:Icon *icon (check null type),
gpointer user_data (check null))
{
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READER_ENABLED))
- mn_execute_command(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
+ mn_execute_command(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
}
private void
@@ -207,7 +232,7 @@ class MN:Shell from G:Object
icon_activate_properties_h (MN:Mail:Icon *icon (check null type),
gpointer user_data (check null))
{
- mn_properties_display();
+ mn_properties_dialog_display();
}
private void
@@ -222,7 +247,7 @@ class MN:Shell from G:Object
gpointer user_data (check null))
{
Self *self = user_data;
- self_display_about(self);
+ self_display_about_dialog(self);
}
private void
@@ -246,51 +271,35 @@ class MN:Shell from G:Object
private void
update_sensitivity (self)
{
- gboolean mail_reader_sensitive = FALSE;
-
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READER_ENABLED))
- {
- char *mail_reader;
-
- mail_reader = eel_gconf_get_string(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
- if (mail_reader)
- {
- mail_reader_sensitive = TRUE;
- g_free(mail_reader);
- }
- }
-
- gtk_widget_set_sensitive(selfp->icon->mail_reader_item, mail_reader_sensitive);
+ gtk_widget_set_sensitive(selfp->icon->mail_reader_item, mn_conf_has_command(MN_CONF_COMMANDS_MAIL_READER_NAMESPACE));
gtk_widget_set_sensitive(selfp->icon->update_item, mn_mailboxes_get_must_poll(self->mailboxes));
}
private void
update_icon (self)
{
- GSList *mailboxes;
GSList *l;
- int n_new = 0;
+ gboolean has_new = FALSE;
gboolean blink = FALSE;
- mailboxes = mn_mailboxes_get(self->mailboxes);
- MN_LIST_FOREACH(l, mailboxes)
+ MN_LIST_FOREACH(l, mn_mailboxes_get(self->mailboxes))
{
MNMailbox *mailbox = l->data;
- if (mn_mailbox_get_has_new(mailbox))
- n_new++;
- if (! blink && (mn_mailbox_get_error(mailbox) || MN_IS_UNSUPPORTED_MAILBOX(mailbox)))
+ if (mn_mailbox_get_messages(mailbox))
+ has_new = TRUE;
+ if (mn_mailbox_get_error(mailbox) || MN_IS_UNSUPPORTED_MAILBOX(mailbox))
blink = TRUE;
}
- if (blink && ! eel_gconf_get_boolean(MN_CONF_BLINK_ON_ERRORS))
- blink = FALSE;
-
- if (selfp->n_new > 0 && n_new == 0 && eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READ_ENABLED))
+ if (selfp->has_new && ! has_new && mn_conf_has_command(MN_CONF_COMMANDS_MAIL_READ_NAMESPACE))
mn_execute_command(MN_CONF_COMMANDS_MAIL_READ_COMMAND);
- selfp->n_new = n_new;
+ selfp->has_new = has_new;
- if (n_new > 0 || blink)
+ if (blink && ! eel_gconf_get_boolean(MN_CONF_BLINK_ON_ERRORS))
+ blink = FALSE;
+
+ if (has_new || blink)
{
mn_blinking_image_set_blinking(MN_BLINKING_IMAGE(selfp->icon->image), blink);
gtk_widget_show(GTK_WIDGET(selfp->icon));
@@ -311,61 +320,89 @@ class MN:Shell from G:Object
if (mailboxes)
{
GSList *l;
- GString *new_string;
- GString *error_string;
- GString *unsupported_string;
-
- new_string = g_string_new(NULL);
- error_string = g_string_new(NULL);
- unsupported_string = g_string_new(NULL);
+ GSList *new_mailboxes = NULL;
+ GSList *error_mailboxes = NULL;
+ GSList *unsupported_mailboxes = NULL;
MN_LIST_FOREACH(l, mailboxes)
{
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))
+ if (mn_mailbox_get_messages(mailbox))
+ new_mailboxes = g_slist_append(new_mailboxes, mailbox);
+
+ if (mn_mailbox_get_error(mailbox))
+ error_mailboxes = g_slist_append(error_mailboxes, mailbox);
+
+ if (MN_IS_UNSUPPORTED_MAILBOX(mailbox))
+ unsupported_mailboxes = g_slist_append(unsupported_mailboxes, mailbox);
+ }
+
+ if (new_mailboxes)
+ {
+ GString *string = g_string_new(NULL);
+
+ new_mailboxes = g_slist_sort(new_mailboxes, self_new_mailboxes_compare_func);
+ MN_LIST_FOREACH(l, new_mailboxes)
{
+ MNMailbox *mailbox = l->data;
int n_messages;
- if (*new_string->str)
- g_string_append_c(new_string, '\n');
- g_string_append(new_string, name);
+ if (*string->str)
+ g_string_append_c(string, '\n');
+ g_string_append(string, mn_mailbox_get_name(mailbox));
n_messages = g_slist_length(mn_mailbox_get_messages(mailbox));
if (n_messages > 0)
- g_string_append_printf(new_string, " (%i)", n_messages);
+ g_string_append_printf(string, " (%i)", n_messages);
}
+ g_slist_free(new_mailboxes);
- if (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))
+ self_tooltip_text_section_new(GTK_VBOX(vbox), _("Mailboxes Having New Mail"), string->str);
+ g_string_free(string, TRUE);
+ }
+
+ if (error_mailboxes)
+ {
+ GString *string = g_string_new(NULL);
+
+ error_mailboxes = g_slist_sort(error_mailboxes, self_mailboxes_compare_by_name_func);
+ MN_LIST_FOREACH(l, error_mailboxes)
{
- 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)));
+ MNMailbox *mailbox = l->data;
+
+ if (*string->str)
+ g_string_append_c(string, '\n');
+ g_string_append_printf(string, "%s: %s",
+ mn_mailbox_get_name(mailbox),
+ mn_mailbox_get_error(mailbox));
}
+ g_slist_free(error_mailboxes);
+
+ self_tooltip_text_section_new(GTK_VBOX(vbox), _("Errors"), string->str);
+ g_string_free(string, TRUE);
}
+
+ if (unsupported_mailboxes)
+ {
+ GString *string = g_string_new(NULL);
- if (*new_string->str)
- self_tooltip_text_section_new(GTK_VBOX(vbox), _("Mailboxes Having New Mail"), new_string->str);
- if (*error_string->str)
- self_tooltip_text_section_new(GTK_VBOX(vbox), _("Errors"), error_string->str);
- if (*unsupported_string->str)
- self_tooltip_text_section_new(GTK_VBOX(vbox), _("Unsupported Mailboxes"), unsupported_string->str);
+ unsupported_mailboxes = g_slist_sort(unsupported_mailboxes, self_mailboxes_compare_by_name_func);
+ MN_LIST_FOREACH(l, unsupported_mailboxes)
+ {
+ MNMailbox *mailbox = l->data;
- g_string_free(new_string, TRUE);
- g_string_free(error_string, TRUE);
- g_string_free(unsupported_string, TRUE);
+ if (*string->str)
+ g_string_append_c(string, '\n');
+ g_string_append_printf(string, "%s: %s",
+ mn_mailbox_get_name(mailbox),
+ mn_unsupported_mailbox_get_reason(MN_UNSUPPORTED_MAILBOX(mailbox)));
+ }
+ g_slist_free(unsupported_mailboxes);
+
+ self_tooltip_text_section_new(GTK_VBOX(vbox), _("Unsupported Mailboxes"), string->str);
+ g_string_free(string, TRUE);
+ }
}
if (eel_gconf_get_boolean(MN_CONF_SUMMARY_TOOLTIP))
@@ -375,18 +412,18 @@ class MN:Shell from G:Object
messages = mn_mailboxes_get_messages(mn_shell->mailboxes);
if (messages)
{
- GtkWidget *hbox;
- GtkWidget *messages_vbox;
+ GtkWidget *alignment;
+ GtkWidget *message_view;
- hbox = self_tooltip_section_new(GTK_VBOX(vbox), _("Mail Summary"));
+ alignment = self_tooltip_section_new(GTK_VBOX(vbox), _("Mail Summary"));
- messages_vbox = gtk_vbox_new(FALSE, 0);
- gtk_widget_set_name(messages_vbox, "mn-tooltip-section-body");
+ message_view = mn_message_view_new(TRUE, FALSE);
+ gtk_widget_set_name(message_view, "mn-message-view");
- mn_summary_update(GTK_VBOX(messages_vbox), messages, FALSE);
+ mn_message_view_set_messages(MN_MESSAGE_VIEW(message_view), messages);
mn_g_object_slist_free(messages);
- gtk_box_pack_start(GTK_BOX(hbox), messages_vbox, TRUE, TRUE, 0);
+ gtk_container_add(GTK_CONTAINER(alignment), message_view);
}
}
@@ -394,14 +431,60 @@ class MN:Shell from G:Object
mn_mail_icon_set_tip_widget(selfp->icon, vbox);
}
+ private int
+ new_mailboxes_compare_func (gconstpointer a, gconstpointer b)
+ {
+ MNMailbox *mailbox_a = (MNMailbox *) a;
+ MNMailbox *mailbox_b = (MNMailbox *) b;
+ int cmp;
+
+ /* sort by sent time (descending order) */
+ cmp = self_get_latest_sent_time(mailbox_b) - self_get_latest_sent_time(mailbox_a);
+ /* else sort by number of messages (descending order) */
+ if (cmp == 0)
+ cmp = g_slist_length(mn_mailbox_get_messages(mailbox_b)) - g_slist_length(mn_mailbox_get_messages(mailbox_a));
+ /* else sort by name (ascending order) */
+ if (cmp == 0)
+ cmp = self_mailboxes_compare_by_name_func(a, b);
+
+ return cmp;
+ }
+
+ private time_t
+ get_latest_sent_time (MN:Mailbox *mailbox (check null type))
+ {
+ GSList *l;
+ time_t latest = 0;
+
+ MN_LIST_FOREACH(l, mn_mailbox_get_messages(mailbox))
+ {
+ MNMessage *message = l->data;
+
+ if (message->sent_time > latest)
+ latest = message->sent_time;
+ }
+
+ return latest;
+ }
+
+ private int
+ mailboxes_compare_by_name_func (gconstpointer a, gconstpointer b)
+ {
+ MNMailbox *mailbox_a = (MNMailbox *) a;
+ MNMailbox *mailbox_b = (MNMailbox *) b;
+
+ return mn_utf8_strcasecoll(mn_mailbox_get_name(mailbox_a),
+ mn_mailbox_get_name(mailbox_b));
+ }
+
private GtkWidget *
tooltip_section_new (Gtk:VBox *vbox (check null type),
const char *title (check null))
{
GtkWidget *child_vbox;
char *markup;
+ GtkWidget *alignment;
GtkWidget *label;
- GtkWidget *hbox;
child_vbox = gtk_vbox_new(FALSE, 6);
@@ -415,15 +498,13 @@ class MN:Shell from G:Object
gtk_box_pack_start(GTK_BOX(child_vbox), label, FALSE, FALSE, 0);
- hbox = gtk_hbox_new(FALSE, 0);
+ alignment = gtk_alignment_new(0.5, 0.5, 1.0, 1.0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0);
- label = gtk_label_new(" ");
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-
- gtk_box_pack_start(GTK_BOX(child_vbox), hbox, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(child_vbox), alignment, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox), child_vbox, TRUE, TRUE, 0);
- return hbox;
+ return alignment;
}
private void
@@ -431,16 +512,16 @@ class MN:Shell from G:Object
const char *title (check null),
const char *text (check null))
{
- GtkWidget *hbox;
+ GtkWidget *alignment;
GtkWidget *label;
- hbox = self_tooltip_section_new(GTK_VBOX(vbox), title);
+ alignment = self_tooltip_section_new(GTK_VBOX(vbox), title);
label = gtk_label_new(text);
gtk_widget_set_name(label, "mn-tooltip-section-body");
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
+ gtk_container_add(GTK_CONTAINER(alignment), label);
}
public MNShell *
@@ -450,7 +531,7 @@ class MN:Shell from G:Object
}
public void
- display_about (self)
+ display_about_dialog (self)
{
if (selfp->about)
{
@@ -460,23 +541,31 @@ class MN:Shell from G:Object
selfp->about = mn_about_dialog_new();
eel_add_weak_pointer(&selfp->about);
+
+ mn_main_window_add_transient(GTK_WINDOW(selfp->about));
gtk_widget_show(GTK_WIDGET(selfp->about));
}
public void
- run_welcome (self)
+ display_welcome_dialog (self)
{
GtkWidget *dialog;
- int response;
- mn_create_interface("welcome", "dialog", &dialog, NULL);
+ mn_create_interface(MN_INTERFACE_FILE("welcome.glade"), "dialog", &dialog, NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
- response = gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
-
+ g_signal_connect(dialog, "response", G_CALLBACK(self_welcome_response_h), NULL);
+ gtk_widget_show(dialog);
+ }
+
+ private void
+ welcome_response_h (Gtk:Dialog *dialog (check null type),
+ int response,
+ gpointer user_data)
+ {
+ gtk_widget_destroy(GTK_WIDGET(dialog));
if (response == GTK_RESPONSE_OK)
- mn_properties_display();
+ mn_properties_dialog_display();
}
public void
@@ -495,7 +584,7 @@ class MN:Shell from G:Object
g_string_append_printf(string, "%s\n", mailbox->uri->text);
- if (mn_mailbox_get_has_new(mailbox))
+ if (mn_mailbox_get_messages(mailbox))
g_string_append(string, " has-new\n");
if (error)
g_string_append_printf(string, " error %s\n", error);
@@ -506,8 +595,79 @@ class MN:Shell from G:Object
*report = string->str;
g_string_free(string, FALSE);
}
+
+ public void
+ add_mailbox_properties_dialog (self, MN:Mailbox:Properties:Dialog *dialog (check null type))
+ {
+ g_return_if_fail(mn_mailbox_properties_dialog_get_uri(dialog) != NULL);
+
+ selfp->mailbox_properties_dialogs = g_slist_append(selfp->mailbox_properties_dialogs, dialog);
+ g_object_weak_ref(G_OBJECT(dialog), self_mailbox_properties_dialog_weak_notify_cb, self);
+ }
+
+ private void
+ mailbox_properties_dialog_weak_notify_cb (gpointer data (check null),
+ GObject *former_object)
+ {
+ Self *self = data;
+
+ selfp->mailbox_properties_dialogs = g_slist_remove(selfp->mailbox_properties_dialogs, former_object);
+ }
+
+ public MNMailboxPropertiesDialog *
+ get_mailbox_properties_dialog (self, MN:URI *uri (check null type))
+ {
+ GSList *l;
+
+ MN_LIST_FOREACH(l, selfp->mailbox_properties_dialogs)
+ {
+ MNMailboxPropertiesDialog *dialog = l->data;
+ MNURI *this_uri;
+
+ this_uri = mn_mailbox_properties_dialog_get_uri(dialog);
+ if (! strcmp(this_uri->text, uri->text))
+ return dialog;
+ }
+
+ return NULL;
+ }
}
%h{
extern MNShell *mn_shell;
%}
+
+/*
+ * These enumerations really belong to mn-enums.gob, but gob does not
+ * allow a class-less input file.
+ */
+
+enum MN_POSITION
+{
+ TOP_LEFT,
+ TOP_RIGHT,
+ BOTTOM_LEFT,
+ BOTTOM_RIGHT
+} MN:Position;
+
+enum MN_ACTION
+{
+ DISPLAY_MAIN_WINDOW,
+ LAUNCH_MAIL_READER,
+ UPDATE_MAIL_STATUS
+} MN:Action;
+
+enum MN_TOOLBAR_STYLE
+{
+ ICONS = GTK_TOOLBAR_ICONS,
+ TEXT = GTK_TOOLBAR_TEXT,
+ BOTH = GTK_TOOLBAR_BOTH,
+ BOTH_HORIZ = GTK_TOOLBAR_BOTH_HORIZ,
+ DESKTOP_DEFAULT
+} MN:Toolbar:Style;
+
+enum MN_ASPECT_SOURCE
+{
+ THEME,
+ CUSTOM
+} MN:Aspect:Source;
diff --git a/src/mn-shell.h b/src/mn-shell.h
@@ -4,7 +4,9 @@
#include <glib-object.h>
+#include <gtk/gtk.h>
#include "mn-mailboxes.h"
+#include "mn-mailbox-properties-dialog.h"
#ifndef __MN_SHELL_H__
#define __MN_SHELL_H__
@@ -57,15 +59,57 @@ struct _MNShellClass {
*/
GType mn_shell_get_type (void);
MNShell * mn_shell_new (void);
-void mn_shell_display_about (MNShell * self);
-void mn_shell_run_welcome (MNShell * self);
+void mn_shell_display_about_dialog (MNShell * self);
+void mn_shell_display_welcome_dialog (MNShell * self);
void mn_shell_report (MNShell * self,
char ** report);
+void mn_shell_add_mailbox_properties_dialog (MNShell * self,
+ MNMailboxPropertiesDialog * dialog);
+MNMailboxPropertiesDialog * mn_shell_get_mailbox_properties_dialog (MNShell * self,
+ MNURI * uri);
extern MNShell *mn_shell;
+typedef enum {
+ MN_POSITION_TOP_LEFT,
+ MN_POSITION_TOP_RIGHT,
+ MN_POSITION_BOTTOM_LEFT,
+ MN_POSITION_BOTTOM_RIGHT
+} MNPosition;
+#define MN_TYPE_POSITION mn_position_get_type()
+GType mn_position_get_type (void);
+
+
+typedef enum {
+ MN_ACTION_DISPLAY_MAIN_WINDOW,
+ MN_ACTION_LAUNCH_MAIL_READER,
+ MN_ACTION_UPDATE_MAIL_STATUS
+} MNAction;
+#define MN_TYPE_ACTION mn_action_get_type()
+GType mn_action_get_type (void);
+
+
+typedef enum {
+ MN_TOOLBAR_STYLE_ICONS = GTK_TOOLBAR_ICONS,
+ MN_TOOLBAR_STYLE_TEXT = GTK_TOOLBAR_TEXT,
+ MN_TOOLBAR_STYLE_BOTH = GTK_TOOLBAR_BOTH,
+ MN_TOOLBAR_STYLE_BOTH_HORIZ = GTK_TOOLBAR_BOTH_HORIZ,
+ MN_TOOLBAR_STYLE_DESKTOP_DEFAULT
+} MNToolbarStyle;
+#define MN_TYPE_TOOLBAR_STYLE mn_toolbar_style_get_type()
+GType mn_toolbar_style_get_type (void);
+
+
+typedef enum {
+ MN_ASPECT_SOURCE_THEME,
+ MN_ASPECT_SOURCE_CUSTOM
+} MNAspectSource;
+#define MN_TYPE_ASPECT_SOURCE mn_aspect_source_get_type()
+GType mn_aspect_source_get_type (void);
+
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/src/mn-soup.c b/src/mn-soup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-soup.h b/src/mn-soup.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-ssl.c b/src/mn-ssl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-ssl.h b/src/mn-ssl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-stock.c b/src/mn-stock.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -26,7 +26,7 @@
static const GtkStockItem items[] = {
{ MN_STOCK_SELECT_ALL, N_("Select _All"), 0, 0, NULL },
- { MN_STOCK_MAIL_SUMMARY, N_("_Mail Summary"), 0, 0, NULL }
+ { MN_STOCK_LEAVE_FULLSCREEN, N_("Leave Fullscreen"), 0, 0, NULL }
};
/*** implementation **********************************************************/
@@ -39,17 +39,21 @@ mn_stock_init (void)
const char *stock_id;
const char *filename;
const char *icon_name;
+ const char *source_stock_id;
} icons[] = {
- { MN_STOCK_MAIL, NULL, "stock_mail" },
- { MN_STOCK_LOCAL, NULL, "stock_folder" },
- { MN_STOCK_REMOTE, NULL, "stock_internet" },
- { MN_STOCK_UNSUPPORTED, "unsupported.png", NULL },
+ { MN_STOCK_MAIL, NULL, "stock_mail" },
+ { MN_STOCK_LOCAL, NULL, "stock_folder" },
+ { MN_STOCK_REMOTE, NULL, "stock_internet" },
+ { MN_STOCK_UNSUPPORTED, MN_IMAGE_FILE(UIDIR, "unsupported.png") },
#ifdef WITH_GMAIL
- { MN_STOCK_GMAIL, "gmail.png", NULL },
+ { MN_STOCK_GMAIL, MN_IMAGE_FILE(UIDIR, "gmail.png") },
#endif
- { MN_STOCK_SYSTEM_MAILBOX, NULL, "gnome-system" },
- { MN_STOCK_SELECT_ALL, NULL, "stock_select-all" },
- { MN_STOCK_MAIL_SUMMARY, "mail-notification.png", NULL }
+ { MN_STOCK_SYSTEM_MAILBOX, NULL, "gnome-system" },
+ { MN_STOCK_SELECT_ALL, NULL, "stock_select-all" },
+ { MN_STOCK_MAIL_SUMMARY, MN_IMAGE_FILE(GNOMEPIXMAPSDIR, "mail-notification.png") },
+ { MN_STOCK_MAIL_READER, MN_IMAGE_FILE(GNOMEPIXMAPSDIR, "mail-notification.png") },
+ { MN_STOCK_MAIN_WINDOW, MN_IMAGE_FILE(UIDIR, "main-window.png") },
+ { MN_STOCK_LEAVE_FULLSCREEN, NULL, NULL, GTK_STOCK_QUIT }
};
GtkIconFactory *factory;
GtkIconTheme *icon_theme;
@@ -68,8 +72,13 @@ mn_stock_init (void)
GdkPixbuf *pixbuf;
pixbuf = mn_pixbuf_new(icons[i].filename);
- icon_set = gtk_icon_set_new_from_pixbuf(pixbuf);
- g_object_unref(pixbuf);
+ if (pixbuf)
+ {
+ icon_set = gtk_icon_set_new_from_pixbuf(pixbuf);
+ g_object_unref(pixbuf);
+ }
+ else
+ icon_set = gtk_icon_set_new();
}
else if (icons[i].icon_name)
{
@@ -81,6 +90,11 @@ mn_stock_init (void)
gtk_icon_set_add_source(icon_set, icon_source);
gtk_icon_source_free(icon_source);
}
+ else if (icons[i].source_stock_id)
+ {
+ icon_set = gtk_icon_factory_lookup_default(icons[i].source_stock_id);
+ gtk_icon_set_ref(icon_set);
+ }
else
g_return_if_reached();
diff --git a/src/mn-stock.h b/src/mn-stock.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -31,6 +31,9 @@
#define MN_STOCK_SYSTEM_MAILBOX "mn-system-mailbox"
#define MN_STOCK_SELECT_ALL "mn-select-all"
#define MN_STOCK_MAIL_SUMMARY "mn-mail-summary"
+#define MN_STOCK_MAIL_READER "mn-mail-reader"
+#define MN_STOCK_MAIN_WINDOW "mn-main-window"
+#define MN_STOCK_LEAVE_FULLSCREEN "mn-leave-fullscreen"
void mn_stock_init (void);
diff --git a/src/mn-summary-dialog.c b/src/mn-summary-dialog.c
@@ -1,170 +0,0 @@
-/*
- * 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.h>
-#include <eel/eel.h>
-#include "mn-util.h"
-#include "mn-shell.h"
-#include "mn-conf.h"
-#include "mn-summary-popup.h"
-#include "mn-summary.h"
-
-/*** types *******************************************************************/
-
-typedef struct
-{
- GtkWidget *dialog;
-
- GtkWidget *vbox;
- GtkWidget *mail_reader_button;
- GtkWidget *update_button;
-} SummaryDialog;
-
-/*** variables ***************************************************************/
-
-static SummaryDialog summary = { NULL };
-
-/*** functions ***************************************************************/
-
-static void mn_summary_dialog_notify_mail_reader_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data);
-
-static void mn_summary_dialog_update (void);
-static void mn_summary_dialog_update_sensitivity (void);
-
-/*** implementation **********************************************************/
-
-void
-mn_summary_dialog_display (void)
-{
- g_return_if_fail(mn_shell != NULL);
-
- /* we don't need the popup anymore */
- mn_summary_popup_destroy();
-
- if (summary.dialog)
- {
- gtk_window_present(GTK_WINDOW(summary.dialog));
- return;
- }
-
- mn_create_interface("summary-dialog",
- "dialog", &summary.dialog,
- "vbox", &summary.vbox,
- "mail_reader_button", &summary.mail_reader_button,
- "update_button", &summary.update_button,
- NULL);
-
- eel_add_weak_pointer(&summary.dialog);
-
- mn_conf_link(summary.dialog, MN_CONF_SUMMARY_DIALOG, NULL);
-
- mn_summary_dialog_update();
- mn_summary_dialog_update_sensitivity();
-
- mn_conf_notification_add(summary.dialog,
- MN_CONF_COMMANDS_MAIL_READER_NAMESPACE,
- mn_summary_dialog_notify_mail_reader_cb,
- NULL);
- mn_g_object_connect(summary.dialog,
- mn_shell->mailboxes,
- "signal::notify::must-poll", mn_summary_dialog_update_sensitivity, NULL,
- "signal::messages-changed", mn_summary_dialog_update, NULL,
- NULL);
-
- gtk_widget_show(summary.dialog);
-}
-
-static void
-mn_summary_dialog_notify_mail_reader_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- GDK_THREADS_ENTER();
- mn_summary_dialog_update_sensitivity();
- GDK_THREADS_LEAVE();
-}
-
-gboolean
-mn_summary_dialog_is_displayed (void)
-{
- return summary.dialog != NULL;
-}
-
-static void
-mn_summary_dialog_update (void)
-{
- GSList *messages;
-
- messages = mn_mailboxes_get_messages(mn_shell->mailboxes);
- mn_summary_update(GTK_VBOX(summary.vbox), messages, TRUE);
- mn_g_object_slist_free(messages);
-}
-
-static void
-mn_summary_dialog_update_sensitivity (void)
-{
- gboolean mail_reader_sensitive = FALSE;
-
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READER_ENABLED))
- {
- char *mail_reader;
-
- mail_reader = eel_gconf_get_string(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
- if (mail_reader)
- {
- mail_reader_sensitive = TRUE;
- g_free(mail_reader);
- }
- }
-
- gtk_widget_set_sensitive(summary.mail_reader_button, mail_reader_sensitive);
- gtk_widget_set_sensitive(summary.update_button, mn_mailboxes_get_must_poll(mn_shell->mailboxes));
-}
-
-/* libglade callbacks */
-
-void
-mn_summary_dialog_response_h (GtkDialog *dialog,
- int response,
- gpointer user_data)
-{
- switch (response)
- {
- case GTK_RESPONSE_HELP:
- mn_display_help(GTK_WINDOW(dialog), "mail-summary");
- break;
-
- case 1: /* launch mail reader */
- if (eel_gconf_get_boolean(MN_CONF_COMMANDS_MAIL_READER_ENABLED))
- mn_execute_command(MN_CONF_COMMANDS_MAIL_READER_COMMAND);
- break;
-
- case 2: /* update */
- mn_mailboxes_check(mn_shell->mailboxes);
- break;
-
- case GTK_RESPONSE_CLOSE:
- gtk_widget_destroy(summary.dialog);
- break;
- }
-}
diff --git a/src/mn-summary-dialog.h b/src/mn-summary-dialog.h
@@ -1,27 +0,0 @@
-/*
- * 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_SUMMARY_DIALOG_H
-#define _MN_SUMMARY_DIALOG_H
-
-#include <glib.h>
-
-void mn_summary_dialog_display (void);
-gboolean mn_summary_dialog_is_displayed (void);
-
-#endif /* _MN_SUMMARY_DIALOG_H */
diff --git a/src/mn-summary-popup.c b/src/mn-summary-popup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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,14 +19,13 @@
#include "config.h"
#include <glib/gi18n.h>
#include <eel/eel.h>
-#include "mn-summary.h"
#include "mn-util.h"
#include "mn-shell.h"
#include "mn-conf.h"
#include "mn-stock.h"
-#include "mn-summary-dialog.h"
+#include "mn-main-window.h"
#include "mn-summary-popup.h"
-#include "mn-message-box.h"
+#include "mn-message-view.h"
/*** types *******************************************************************/
@@ -36,7 +35,7 @@ typedef struct
GtkWidget *popup;
GtkWidget *image;
GtkWidget *title;
- GtkWidget *vbox;
+ GtkWidget *message_view;
unsigned int timeout_id;
GSList *displayed_messages;
@@ -50,12 +49,12 @@ typedef struct
/*** variables ***************************************************************/
-static SummaryPopup popup = {
+static SummaryPopup self = {
FALSE, /* enabled */
NULL, /* popup */
NULL, /* image */
NULL, /* title */
- NULL, /* vbox */
+ NULL, /* message_view */
0, /* timeout_id */
NULL, /* displayed_messages */
@@ -70,29 +69,33 @@ static SummaryPopup popup = {
/*** functions ***************************************************************/
static void mn_summary_popup_notify_enable_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data);
static void mn_summary_popup_notify_autoclose_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data);
static void mn_summary_popup_notify_delay_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data);
static void mn_summary_popup_notify_geometry_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data);
-static void mn_summary_popup_notify_title_font_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data);
-static void mn_summary_popup_notify_contents_font_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data);
+static void mn_summary_popup_notify_fonts_aspect_source_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
+static void mn_summary_popup_notify_fonts_title_font_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
+static void mn_summary_popup_notify_fonts_contents_font_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data);
static void mn_summary_popup_enable (void);
static void mn_summary_popup_disable (void);
@@ -108,11 +111,8 @@ static void mn_summary_popup_weak_notify_cb (gpointer data,
static void mn_summary_popup_set_geometry (void);
static void mn_summary_popup_set_title_font (void);
static void mn_summary_popup_set_contents_font (void);
-static void mn_summary_popup_set_contents_font_cb (GtkWidget *widget,
- gpointer user_data);
static void mn_summary_popup_install_timeout (void);
-static void mn_summary_popup_remove_timeout (void);
static gboolean mn_summary_popup_timeout_cb (gpointer data);
@@ -131,13 +131,14 @@ mn_summary_popup_init (void)
eel_gconf_notification_add(MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_NAMESPACE, mn_summary_popup_notify_delay_cb, NULL);
eel_gconf_notification_add(MN_CONF_MAIL_SUMMARY_POPUP_POSITION, mn_summary_popup_notify_geometry_cb, NULL);
eel_gconf_notification_add(MN_CONF_MAIL_SUMMARY_POPUP_OFFSET_NAMESPACE, mn_summary_popup_notify_geometry_cb, NULL);
- eel_gconf_notification_add(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_NAMESPACE, mn_summary_popup_notify_title_font_cb, NULL);
- eel_gconf_notification_add(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_NAMESPACE, mn_summary_popup_notify_contents_font_cb, NULL);
+ eel_gconf_notification_add(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_ASPECT_SOURCE, mn_summary_popup_notify_fonts_aspect_source_cb, NULL);
+ eel_gconf_notification_add(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_FONT, mn_summary_popup_notify_fonts_title_font_cb, NULL);
+ eel_gconf_notification_add(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_FONT, mn_summary_popup_notify_fonts_contents_font_cb, NULL);
}
static void
mn_summary_popup_notify_enable_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
@@ -153,21 +154,21 @@ mn_summary_popup_notify_enable_cb (GConfClient *client,
static void
mn_summary_popup_notify_autoclose_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
GDK_THREADS_ENTER();
- if (popup.enabled)
+ if (self.enabled)
{
if (eel_gconf_get_boolean(MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE))
{
- if (popup.popup && ! popup.timeout_id)
+ if (self.popup && ! self.timeout_id)
mn_summary_popup_install_timeout();
}
else
- mn_summary_popup_remove_timeout();
+ mn_source_remove(&self.timeout_id);
}
GDK_THREADS_LEAVE();
@@ -175,15 +176,15 @@ mn_summary_popup_notify_autoclose_cb (GConfClient *client,
static void
mn_summary_popup_notify_delay_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
GDK_THREADS_ENTER();
- if (popup.enabled && popup.popup && eel_gconf_get_boolean(MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE))
+ if (self.enabled && self.popup && eel_gconf_get_boolean(MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE))
{
- mn_summary_popup_remove_timeout();
+ mn_source_remove(&self.timeout_id);
mn_summary_popup_install_timeout();
}
@@ -192,43 +193,60 @@ mn_summary_popup_notify_delay_cb (GConfClient *client,
static void
mn_summary_popup_notify_geometry_cb (GConfClient *client,
- guint cnxn_id,
+ unsigned int cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
GDK_THREADS_ENTER();
- popup.position = -1; /* invalidate the position */
+ self.position = -1; /* invalidate the position */
- if (popup.enabled && popup.popup)
+ if (self.enabled && self.popup)
mn_summary_popup_set_geometry();
GDK_THREADS_LEAVE();
}
static void
-mn_summary_popup_notify_title_font_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+mn_summary_popup_notify_fonts_aspect_source_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
GDK_THREADS_ENTER();
- if (popup.enabled && popup.popup)
+ if (self.enabled && self.popup)
+ {
+ mn_summary_popup_set_title_font();
+ mn_summary_popup_set_contents_font();
+ }
+
+ GDK_THREADS_LEAVE();
+}
+
+static void
+mn_summary_popup_notify_fonts_title_font_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
+{
+ GDK_THREADS_ENTER();
+
+ if (self.enabled && self.popup)
mn_summary_popup_set_title_font();
GDK_THREADS_LEAVE();
}
static void
-mn_summary_popup_notify_contents_font_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+mn_summary_popup_notify_fonts_contents_font_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
GDK_THREADS_ENTER();
- if (popup.enabled && popup.popup)
+ if (self.enabled && self.popup)
mn_summary_popup_set_contents_font();
GDK_THREADS_LEAVE();
@@ -237,9 +255,9 @@ mn_summary_popup_notify_contents_font_cb (GConfClient *client,
static void
mn_summary_popup_enable (void)
{
- if (! popup.enabled)
+ if (! self.enabled)
{
- popup.enabled = TRUE;
+ self.enabled = TRUE;
g_signal_connect(mn_shell->mailboxes, "messages-changed", G_CALLBACK(mn_summary_popup_messages_changed_h), NULL);
}
}
@@ -247,9 +265,9 @@ mn_summary_popup_enable (void)
static void
mn_summary_popup_disable (void)
{
- if (popup.enabled)
+ if (self.enabled)
{
- popup.enabled = FALSE;
+ self.enabled = FALSE;
g_signal_handlers_disconnect_by_func(mn_shell->mailboxes, mn_summary_popup_messages_changed_h, NULL);
mn_summary_popup_destroy();
}
@@ -266,21 +284,21 @@ mn_summary_popup_messages_changed_h (MNMailboxes *mailboxes,
static void
mn_summary_popup_update (gboolean has_new)
{
- if (! mn_summary_dialog_is_displayed() && (popup.popup || has_new))
+ if (! mn_main_window_is_displayed() && (self.popup || has_new))
{
GSList *l;
- mn_g_object_slist_free(popup.displayed_messages);
- popup.displayed_messages = mn_mailboxes_get_messages(mn_shell->mailboxes);
+ mn_g_object_slist_free(self.displayed_messages);
+ self.displayed_messages = mn_mailboxes_get_messages(mn_shell->mailboxes);
loop1:
- MN_LIST_FOREACH(l, popup.previous_messages)
+ MN_LIST_FOREACH(l, self.previous_messages)
{
MNMessage *message = l->data;
- if (! mn_message_slist_find_by_id(popup.displayed_messages, message))
+ if (! mn_message_slist_find_by_id(self.displayed_messages, message))
{
- popup.previous_messages = mn_g_object_slist_delete_link(popup.previous_messages, l);
+ self.previous_messages = mn_g_object_slist_delete_link(self.previous_messages, l);
goto loop1;
}
}
@@ -288,31 +306,31 @@ mn_summary_popup_update (gboolean has_new)
if (eel_gconf_get_boolean(MN_CONF_MAIL_SUMMARY_POPUP_ONLY_RECENT))
{
loop2:
- MN_LIST_FOREACH(l, popup.displayed_messages)
+ MN_LIST_FOREACH(l, self.displayed_messages)
{
MNMessage *message = l->data;
- if (mn_message_slist_find_by_id(popup.previous_messages, message))
+ if (mn_message_slist_find_by_id(self.previous_messages, message))
{
- popup.displayed_messages = mn_g_object_slist_delete_link(popup.displayed_messages, l);
+ self.displayed_messages = mn_g_object_slist_delete_link(self.displayed_messages, l);
goto loop2;
}
}
}
- if (popup.displayed_messages)
+ if (self.displayed_messages)
{
- if (! popup.popup)
+ if (! self.popup)
{
- mn_create_interface("summary-popup",
- "mn-mail-summary-popup", &popup.popup,
- "image", &popup.image,
- "mn-mail-summary-popup-title", &popup.title,
- "vbox", &popup.vbox,
+ mn_create_interface(MN_INTERFACE_FILE("summary-popup.glade"),
+ "mn-mail-summary-popup", &self.popup,
+ "image", &self.image,
+ "mn-mail-summary-popup-title", &self.title,
+ "mn-message-view", &self.message_view,
NULL);
- eel_add_weak_pointer(&popup.popup);
- g_object_weak_ref(G_OBJECT(popup.popup), mn_summary_popup_weak_notify_cb, NULL);
+ eel_add_weak_pointer(&self.popup);
+ g_object_weak_ref(G_OBJECT(self.popup), mn_summary_popup_weak_notify_cb, NULL);
/*
* The popup must:
@@ -336,28 +354,28 @@ mn_summary_popup_update (gboolean has_new)
* http://bugzilla.gnome.org/show_bug.cgi?id=154593).
*/
- gtk_window_stick(GTK_WINDOW(popup.popup));
- gtk_window_set_keep_above(GTK_WINDOW(popup.popup), TRUE);
- gtk_window_set_accept_focus(GTK_WINDOW(popup.popup), FALSE);
+ gtk_window_stick(GTK_WINDOW(self.popup));
+ gtk_window_set_keep_above(GTK_WINDOW(self.popup), TRUE);
+ gtk_window_set_accept_focus(GTK_WINDOW(self.popup), FALSE);
- gtk_widget_realize(popup.popup);
- gdk_window_set_decorations(popup.popup->window, GDK_DECOR_BORDER);
+ gtk_widget_realize(self.popup);
+ gdk_window_set_decorations(self.popup->window, GDK_DECOR_BORDER);
- gtk_image_set_from_stock(GTK_IMAGE(popup.image), MN_STOCK_MAIL_SUMMARY, -1);
+ gtk_image_set_from_stock(GTK_IMAGE(self.image), MN_STOCK_MAIL_SUMMARY, -1);
mn_summary_popup_set_title_font();
- mn_summary_popup_set_contents_font();
}
- mn_summary_update(GTK_VBOX(popup.vbox), popup.displayed_messages, FALSE);
+ mn_message_view_set_messages(MN_MESSAGE_VIEW(self.message_view), self.displayed_messages);
+ mn_summary_popup_set_contents_font();
mn_summary_popup_set_geometry();
- gtk_widget_show(popup.popup);
+ gtk_widget_show(self.popup);
/* we only reset the timeout if there is new mail */
if (has_new && eel_gconf_get_boolean(MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE))
{
- mn_summary_popup_remove_timeout();
+ mn_source_remove(&self.timeout_id);
mn_summary_popup_install_timeout();
}
@@ -372,10 +390,10 @@ mn_summary_popup_update (gboolean has_new)
static void
mn_summary_popup_weak_notify_cb (gpointer data, GObject *former_object)
{
- mn_summary_popup_remove_timeout();
+ mn_source_remove(&self.timeout_id);
- popup.previous_messages = g_slist_concat(popup.previous_messages, popup.displayed_messages);
- popup.displayed_messages = NULL;
+ self.previous_messages = g_slist_concat(self.previous_messages, self.displayed_messages);
+ self.displayed_messages = NULL;
}
static void
@@ -396,28 +414,28 @@ mn_summary_popup_set_geometry (void)
int y;
gboolean reshow;
- g_return_if_fail(popup.popup != NULL);
+ g_return_if_fail(self.popup != NULL);
- if (popup.position == -1)
+ if (self.position == -1)
{
- popup.position = mn_conf_get_enum_value(MN_TYPE_POSITION, MN_CONF_MAIL_SUMMARY_POPUP_POSITION);
- popup.horizontal_offset = eel_gconf_get_integer(MN_CONF_MAIL_SUMMARY_POPUP_HORIZONTAL_OFFSET);
- popup.vertical_offset = eel_gconf_get_integer(MN_CONF_MAIL_SUMMARY_POPUP_VERTICAL_OFFSET);
+ self.position = mn_conf_get_enum_value(MN_TYPE_POSITION, MN_CONF_MAIL_SUMMARY_POPUP_POSITION);
+ self.horizontal_offset = eel_gconf_get_integer(MN_CONF_MAIL_SUMMARY_POPUP_HORIZONTAL_OFFSET);
+ self.vertical_offset = eel_gconf_get_integer(MN_CONF_MAIL_SUMMARY_POPUP_VERTICAL_OFFSET);
}
- gtk_window_get_size(GTK_WINDOW(popup.popup), &popup_width, &popup_height);
+ gtk_window_get_size(GTK_WINDOW(self.popup), &popup_width, &popup_height);
screen_width = gdk_screen_width();
screen_height = gdk_screen_height();
- g_return_if_fail(popup.position >= 0 && popup.position < G_N_ELEMENTS(gravity_mapping));
- gravity = gravity_mapping[popup.position];
+ g_return_if_fail(self.position >= 0 && self.position < G_N_ELEMENTS(gravity_mapping));
+ gravity = gravity_mapping[self.position];
x = (gravity == GDK_GRAVITY_NORTH_WEST || gravity == GDK_GRAVITY_SOUTH_WEST)
- ? popup.horizontal_offset
- : screen_width - popup_width - popup.horizontal_offset;
+ ? self.horizontal_offset
+ : screen_width - popup_width - self.horizontal_offset;
y = (gravity == GDK_GRAVITY_NORTH_WEST || gravity == GDK_GRAVITY_NORTH_EAST)
- ? popup.vertical_offset
- : screen_height - popup_height - popup.vertical_offset;
+ ? self.vertical_offset
+ : screen_height - popup_height - self.vertical_offset;
/*
* If the gravity changes, the gtk_window_move() call will misplace
@@ -425,22 +443,22 @@ mn_summary_popup_set_geometry (void)
*
* A workaround is to hide and reshow the window.
*/
- if (gravity != popup.gravity)
+ if (gravity != self.gravity)
{
- popup.gravity = gravity;
+ self.gravity = gravity;
reshow = TRUE;
}
else
reshow = FALSE;
if (reshow)
- gtk_widget_hide(popup.popup);
+ gtk_widget_hide(self.popup);
- gtk_window_set_gravity(GTK_WINDOW(popup.popup), gravity);
- gtk_window_move(GTK_WINDOW(popup.popup), x, y);
+ gtk_window_set_gravity(GTK_WINDOW(self.popup), gravity);
+ gtk_window_move(GTK_WINDOW(self.popup), x, y);
if (reshow)
- gtk_widget_show(popup.popup);
+ gtk_widget_show(self.popup);
}
static void
@@ -448,7 +466,7 @@ mn_summary_popup_set_title_font (void)
{
PangoFontDescription *font_desc = NULL;
- if (eel_gconf_get_boolean(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_TITLE_ENABLED))
+ if (mn_conf_get_enum_value(MN_TYPE_ASPECT_SOURCE, MN_CONF_MAIL_SUMMARY_POPUP_FONTS_ASPECT_SOURCE) == MN_ASPECT_SOURCE_CUSTOM)
{
char *str;
@@ -460,7 +478,7 @@ mn_summary_popup_set_title_font (void)
}
}
- gtk_widget_modify_font(popup.title, font_desc);
+ gtk_widget_modify_font(self.title, font_desc);
if (font_desc)
pango_font_description_free(font_desc);
}
@@ -470,7 +488,7 @@ mn_summary_popup_set_contents_font (void)
{
PangoFontDescription *font_desc = NULL;
- if (eel_gconf_get_boolean(MN_CONF_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_ENABLED))
+ if (mn_conf_get_enum_value(MN_TYPE_ASPECT_SOURCE, MN_CONF_MAIL_SUMMARY_POPUP_FONTS_ASPECT_SOURCE) == MN_ASPECT_SOURCE_CUSTOM)
{
char *str;
@@ -482,63 +500,27 @@ mn_summary_popup_set_contents_font (void)
}
}
- gtk_container_foreach(GTK_CONTAINER(popup.vbox), mn_summary_popup_set_contents_font_cb, font_desc);
+ gtk_widget_modify_font(GTK_WIDGET(self.message_view), font_desc);
if (font_desc)
pango_font_description_free(font_desc);
}
-static void
-mn_summary_popup_set_contents_font_cb (GtkWidget *widget, gpointer user_data)
-{
- PangoFontDescription *font_desc = user_data;
-
- if (MN_IS_MESSAGE_BOX(widget))
- {
- GSList *labels;
- GSList *l;
-
- labels = mn_message_box_get_labels(MN_MESSAGE_BOX(widget));
- MN_LIST_FOREACH(l, labels)
- gtk_widget_modify_font(l->data, font_desc);
- }
- else if (GTK_IS_LABEL(widget))
- gtk_widget_modify_font(widget, font_desc);
- else
- g_return_if_reached();
-}
-
void
mn_summary_popup_destroy (void)
{
- if (popup.popup)
- gtk_widget_destroy(popup.popup);
+ if (self.popup)
+ gtk_widget_destroy(self.popup);
}
static void
mn_summary_popup_install_timeout (void)
{
- int minutes;
- int seconds;
-
- g_return_if_fail(popup.timeout_id == 0);
+ g_return_if_fail(self.timeout_id == 0);
- minutes = eel_gconf_get_integer(MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_MINUTES);
- seconds = eel_gconf_get_integer(MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_SECONDS);
-
- if (minutes != 0 || seconds != 0)
- popup.timeout_id = g_timeout_add(((minutes * 60) + seconds) * 1000,
- mn_summary_popup_timeout_cb,
- NULL);
-}
-
-static void
-mn_summary_popup_remove_timeout (void)
-{
- if (popup.timeout_id)
- {
- g_source_remove(popup.timeout_id);
- popup.timeout_id = 0;
- }
+ self.timeout_id = mn_timeout_add(MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_MINUTES,
+ MN_CONF_MAIL_SUMMARY_POPUP_AUTOCLOSE_DELAY_SECONDS,
+ mn_summary_popup_timeout_cb,
+ NULL);
}
static gboolean
@@ -558,7 +540,18 @@ mn_summary_popup_button_press_event_h (GtkWidget *widget,
GdkEventButton *button,
gpointer user_data)
{
- gtk_widget_destroy(popup.popup);
+ gtk_widget_destroy(self.popup);
return TRUE; /* do not propagate event */
}
+
+GtkWidget *
+mn_summary_popup_message_view_new_cb (void)
+{
+ GtkWidget *view;
+
+ view = mn_message_view_new(TRUE, FALSE);
+ gtk_widget_show(view);
+
+ return view;
+}
diff --git a/src/mn-summary-popup.h b/src/mn-summary-popup.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-summary.c b/src/mn-summary.c
@@ -1,56 +0,0 @@
-/*
- * 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 <gtk/gtk.h>
-#include "mn-util.h"
-#include "mn-message-box.h"
-
-void
-mn_summary_update (GtkVBox *vbox, GSList *messages, gboolean selectable)
-{
- GtkSizeGroup *size_group;
- GSList *l;
-
- g_return_if_fail(GTK_IS_VBOX(vbox));
-
- gtk_container_foreach(GTK_CONTAINER(vbox), (GtkCallback) gtk_widget_destroy, NULL);
-
- size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
-
- MN_LIST_FOREACH(l, messages)
- {
- MNMessage *message = l->data;
- GtkWidget *message_box;
-
- message_box = mn_message_box_new(size_group, message, selectable);
-
- gtk_box_pack_start(GTK_BOX(vbox), message_box, FALSE, FALSE, 0);
- gtk_widget_show(message_box);
-
- if (l->next)
- { /* spacing between messages */
- GtkWidget *label;
-
- label = gtk_label_new(NULL);
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
- gtk_widget_show(label);
- }
- }
-
- g_object_unref(size_group);
-}
diff --git a/src/mn-summary.h b/src/mn-summary.h
@@ -1,26 +0,0 @@
-/*
- * 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_SUMMARY_H
-#define _MN_SUMMARY_H
-
-#include <gtk/gtk.h>
-
-void mn_summary_update (GtkVBox *vbox, GSList *messages, gboolean selectable);
-
-#endif /* _MN_SUMMARY_H */
diff --git a/src/mn-sylpheed-mailbox.c b/src/mn-sylpheed-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:10 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:27 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -31,9 +31,7 @@
#include "mn-mailbox-private.h"
#include "mn-vfs.h"
#include "mn-util.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
/* taken from procmsg.h in the Sylpheed sources */
#define SYLPHEED_MSG_NEW (1U << 0)
@@ -49,7 +47,7 @@
guint32 flags;
} MarkEntry;
-#line 53 "mn-sylpheed-mailbox.c"
+#line 51 "mn-sylpheed-mailbox.c"
/* self casting macros */
#define SELF(x) MN_SYLPHEED_MAILBOX(x)
#define SELF_CONST(x) MN_SYLPHEED_MAILBOX_CONST(x)
@@ -66,7 +64,7 @@ typedef MNSylpheedMailboxClass SelfClass;
/* here are local prototypes */
static void mn_sylpheed_mailbox_init (MNSylpheedMailbox * o) G_GNUC_UNUSED;
static void mn_sylpheed_mailbox_class_init (MNSylpheedMailboxClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_sylpheed_mailbox_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static GObject * ___2_mn_sylpheed_mailbox_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
static gboolean ___3_mn_sylpheed_mailbox_impl_is (MNMailbox * dummy, MNURI * uri) G_GNUC_UNUSED;
static void ___4_mn_sylpheed_mailbox_impl_check (MNMailbox * self) G_GNUC_UNUSED;
static GHashTable * mn_sylpheed_mailbox_get_seen_numbers (MNSylpheedMailbox * self) G_GNUC_UNUSED;
@@ -124,10 +122,10 @@ mn_sylpheed_mailbox_init (MNSylpheedMailbox * o G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox::init"
}
#undef __GOB_FUNCTION__
-#line 52 "mn-sylpheed-mailbox.gob"
+#line 50 "mn-sylpheed-mailbox.gob"
static void
mn_sylpheed_mailbox_class_init (MNSylpheedMailboxClass * class G_GNUC_UNUSED)
-#line 131 "mn-sylpheed-mailbox.c"
+#line 129 "mn-sylpheed-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox::class_init"
GObjectClass *g_object_class = (GObjectClass *)class;
@@ -135,29 +133,29 @@ mn_sylpheed_mailbox_class_init (MNSylpheedMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-#line 57 "mn-sylpheed-mailbox.gob"
+#line 55 "mn-sylpheed-mailbox.gob"
g_object_class->constructor = ___2_mn_sylpheed_mailbox_constructor;
-#line 81 "mn-sylpheed-mailbox.gob"
+#line 79 "mn-sylpheed-mailbox.gob"
mn_mailbox_class->impl_is = ___3_mn_sylpheed_mailbox_impl_is;
-#line 98 "mn-sylpheed-mailbox.gob"
+#line 96 "mn-sylpheed-mailbox.gob"
mn_mailbox_class->impl_check = ___4_mn_sylpheed_mailbox_impl_check;
-#line 145 "mn-sylpheed-mailbox.c"
+#line 143 "mn-sylpheed-mailbox.c"
{
-#line 53 "mn-sylpheed-mailbox.gob"
+#line 51 "mn-sylpheed-mailbox.gob"
MN_MAILBOX_CLASS(class)->format = "Sylpheed";
-#line 151 "mn-sylpheed-mailbox.c"
+#line 149 "mn-sylpheed-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 57 "mn-sylpheed-mailbox.gob"
+#line 55 "mn-sylpheed-mailbox.gob"
static GObject *
-___2_mn_sylpheed_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
-#line 161 "mn-sylpheed-mailbox.c"
+___2_mn_sylpheed_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 159 "mn-sylpheed-mailbox.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -165,7 +163,7 @@ ___2_mn_sylpheed_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construc
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox::constructor"
{
-#line 59 "mn-sylpheed-mailbox.gob"
+#line 57 "mn-sylpheed-mailbox.gob"
GObject *object;
MNMailbox *self;
@@ -187,27 +185,27 @@ ___2_mn_sylpheed_mailbox_constructor (GType type G_GNUC_UNUSED, guint n_construc
return object;
}}
-#line 191 "mn-sylpheed-mailbox.c"
+#line 189 "mn-sylpheed-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 81 "mn-sylpheed-mailbox.gob"
+#line 79 "mn-sylpheed-mailbox.gob"
static gboolean
___3_mn_sylpheed_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
-#line 198 "mn-sylpheed-mailbox.c"
+#line 196 "mn-sylpheed-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->impl_is)? \
(* MN_MAILBOX_CLASS(parent_class)->impl_is)(___dummy,___uri): \
((gboolean )0))
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox::impl_is"
-#line 81 "mn-sylpheed-mailbox.gob"
+#line 79 "mn-sylpheed-mailbox.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 81 "mn-sylpheed-mailbox.gob"
+#line 79 "mn-sylpheed-mailbox.gob"
g_return_val_if_fail (MN_IS_URI (uri), (gboolean )0);
-#line 209 "mn-sylpheed-mailbox.c"
+#line 207 "mn-sylpheed-mailbox.c"
{
-#line 83 "mn-sylpheed-mailbox.gob"
+#line 81 "mn-sylpheed-mailbox.gob"
gboolean is = FALSE;
@@ -222,37 +220,33 @@ ___3_mn_sylpheed_mailbox_impl_is (MNMailbox * dummy G_GNUC_UNUSED, MNURI * uri)
return is;
}}
-#line 226 "mn-sylpheed-mailbox.c"
+#line 224 "mn-sylpheed-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 98 "mn-sylpheed-mailbox.gob"
+#line 96 "mn-sylpheed-mailbox.gob"
static void
___4_mn_sylpheed_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
-#line 233 "mn-sylpheed-mailbox.c"
+#line 231 "mn-sylpheed-mailbox.c"
#define PARENT_HANDLER(___self) \
{ if(MN_MAILBOX_CLASS(parent_class)->impl_check) \
(* MN_MAILBOX_CLASS(parent_class)->impl_check)(___self); }
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox::impl_check"
-#line 98 "mn-sylpheed-mailbox.gob"
+#line 96 "mn-sylpheed-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 98 "mn-sylpheed-mailbox.gob"
+#line 96 "mn-sylpheed-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 243 "mn-sylpheed-mailbox.c"
+#line 241 "mn-sylpheed-mailbox.c"
{
-#line 100 "mn-sylpheed-mailbox.gob"
+#line 98 "mn-sylpheed-mailbox.gob"
GnomeVFSResult result;
GnomeVFSResult close_result;
GnomeVFSDirectoryHandle *handle;
GnomeVFSFileInfo *file_info;
GHashTable *seen_numbers;
-#ifdef WITH_MIME
GSList *messages = NULL;
-#else
- gboolean has_new = FALSE;
-#endif
seen_numbers = self_get_seen_numbers(SELF(self));
@@ -278,16 +272,11 @@ ___4_mn_sylpheed_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
if (! g_hash_table_lookup(seen_numbers, GINT_TO_POINTER(num)))
{
-#ifdef WITH_MIME
GnomeVFSURI *message_uri;
message_uri = gnome_vfs_uri_append_file_name(self->uri->vfs, file_info->name);
messages = g_slist_append(messages, mn_message_new_from_uri(self->uri, message_uri));
gnome_vfs_uri_unref(message_uri);
-#else /* WITH_MIME */
- has_new = TRUE;
- break;
-#endif /* WITH_MIME */
}
}
gnome_vfs_file_info_unref(file_info);
@@ -298,14 +287,7 @@ ___4_mn_sylpheed_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
{
if (close_result == GNOME_VFS_OK)
- {
-#ifdef WITH_MIME
- mn_mailbox_set_has_new(self, messages != NULL);
- mn_mailbox_set_messages(self, messages);
-#else /* WITH_MIME */
- mn_mailbox_set_has_new(self, has_new);
-#endif
- }
+ mn_mailbox_set_messages(self, messages);
else
mn_mailbox_set_error(self, _("unable to close folder: %s"), gnome_vfs_result_to_string(close_result));
}
@@ -317,28 +299,25 @@ ___4_mn_sylpheed_mailbox_impl_check (MNMailbox * self G_GNUC_UNUSED)
GDK_THREADS_LEAVE();
g_hash_table_destroy(seen_numbers);
-
-#ifdef WITH_MIME
mn_g_object_slist_free(messages);
-#endif
}}
-#line 326 "mn-sylpheed-mailbox.c"
+#line 305 "mn-sylpheed-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 181 "mn-sylpheed-mailbox.gob"
+#line 160 "mn-sylpheed-mailbox.gob"
static GHashTable *
mn_sylpheed_mailbox_get_seen_numbers (MNSylpheedMailbox * self)
-#line 333 "mn-sylpheed-mailbox.c"
+#line 312 "mn-sylpheed-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox::get_seen_numbers"
-#line 181 "mn-sylpheed-mailbox.gob"
+#line 160 "mn-sylpheed-mailbox.gob"
g_return_val_if_fail (self != NULL, (GHashTable * )0);
-#line 181 "mn-sylpheed-mailbox.gob"
+#line 160 "mn-sylpheed-mailbox.gob"
g_return_val_if_fail (MN_IS_SYLPHEED_MAILBOX (self), (GHashTable * )0);
-#line 340 "mn-sylpheed-mailbox.c"
+#line 319 "mn-sylpheed-mailbox.c"
{
-#line 183 "mn-sylpheed-mailbox.gob"
+#line 162 "mn-sylpheed-mailbox.gob"
GHashTable *seen_numbers;
char *uri;
@@ -371,5 +350,5 @@ mn_sylpheed_mailbox_get_seen_numbers (MNSylpheedMailbox * self)
return seen_numbers;
}}
-#line 375 "mn-sylpheed-mailbox.c"
+#line 354 "mn-sylpheed-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-sylpheed-mailbox.gob b/src/mn-sylpheed-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -28,9 +28,7 @@ requires 2.0.10
#include "mn-mailbox-private.h"
#include "mn-vfs.h"
#include "mn-util.h"
-#ifdef WITH_MIME
#include "mn-message-mime.h"
-#endif
/* taken from procmsg.h in the Sylpheed sources */
#define SYLPHEED_MSG_NEW (1U << 0)
@@ -55,7 +53,7 @@ class MN:Sylpheed:Mailbox from MN:Mailbox
}
override (G:Object) GObject *
- constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
{
GObject *object;
MNMailbox *self;
@@ -103,11 +101,7 @@ class MN:Sylpheed:Mailbox from MN:Mailbox
GnomeVFSDirectoryHandle *handle;
GnomeVFSFileInfo *file_info;
GHashTable *seen_numbers;
-#ifdef WITH_MIME
GSList *messages = NULL;
-#else
- gboolean has_new = FALSE;
-#endif
seen_numbers = self_get_seen_numbers(SELF(self));
@@ -133,16 +127,11 @@ class MN:Sylpheed:Mailbox from MN:Mailbox
if (! g_hash_table_lookup(seen_numbers, GINT_TO_POINTER(num)))
{
-#ifdef WITH_MIME
GnomeVFSURI *message_uri;
message_uri = gnome_vfs_uri_append_file_name(self->uri->vfs, file_info->name);
messages = g_slist_append(messages, mn_message_new_from_uri(self->uri, message_uri));
gnome_vfs_uri_unref(message_uri);
-#else /* WITH_MIME */
- has_new = TRUE;
- break;
-#endif /* WITH_MIME */
}
}
gnome_vfs_file_info_unref(file_info);
@@ -153,14 +142,7 @@ class MN:Sylpheed:Mailbox from MN:Mailbox
if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
{
if (close_result == GNOME_VFS_OK)
- {
-#ifdef WITH_MIME
- mn_mailbox_set_has_new(self, messages != NULL);
- mn_mailbox_set_messages(self, messages);
-#else /* WITH_MIME */
- mn_mailbox_set_has_new(self, has_new);
-#endif
- }
+ mn_mailbox_set_messages(self, messages);
else
mn_mailbox_set_error(self, _("unable to close folder: %s"), gnome_vfs_result_to_string(close_result));
}
@@ -172,10 +154,7 @@ class MN:Sylpheed:Mailbox from MN:Mailbox
GDK_THREADS_LEAVE();
g_hash_table_destroy(seen_numbers);
-
-#ifdef WITH_MIME
mn_g_object_slist_free(messages);
-#endif
}
private GHashTable *
diff --git a/src/mn-system-mailbox-properties.c b/src/mn-system-mailbox-properties.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:11 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:28 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
diff --git a/src/mn-system-mailbox-properties.gob b/src/mn-system-mailbox-properties.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-tooltips.c b/src/mn-tooltips.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:11 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:28 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -25,8 +25,8 @@
#line 38 "mn-tooltips.gob"
-#include "mn-util.h"
#include <eel/eel.h>
+#include "mn-util.h"
#define TOOLTIPS_DATA "mn-tooltips-data"
#define TOOLTIPS_INFO "mn-tooltips-info"
@@ -461,10 +461,7 @@ mn_tooltips_set_tip_widget (MNTooltips * self, GtkWidget * widget, GtkWidget * t
data->tip_widget = tip_widget;
if (data->tip_widget)
- {
- g_object_ref(data->tip_widget);
- gtk_object_sink(GTK_OBJECT(data->tip_widget));
- }
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(data->tip_widget));
self_draw_tips(self);
}
@@ -481,10 +478,7 @@ mn_tooltips_set_tip_widget (MNTooltips * self, GtkWidget * widget, GtkWidget * t
data->tip_widget = tip_widget;
if (data->tip_widget)
- {
- g_object_ref(data->tip_widget);
- gtk_object_sink(GTK_OBJECT(data->tip_widget));
- }
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(data->tip_widget));
selfp->data_list = g_slist_append(selfp->data_list, data);
g_signal_connect_after(widget, "event-after", G_CALLBACK(self_event_after_h), data);
@@ -498,22 +492,22 @@ mn_tooltips_set_tip_widget (MNTooltips * self, GtkWidget * widget, GtkWidget * t
NULL);
}
}}
-#line 502 "mn-tooltips.c"
+#line 496 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 262 "mn-tooltips.gob"
+#line 256 "mn-tooltips.gob"
static gboolean
mn_tooltips_paint_window (MNTooltips * self)
-#line 508 "mn-tooltips.c"
+#line 502 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::paint_window"
-#line 262 "mn-tooltips.gob"
+#line 256 "mn-tooltips.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 262 "mn-tooltips.gob"
+#line 256 "mn-tooltips.gob"
g_return_val_if_fail (MN_IS_TOOLTIPS (self), (gboolean )0);
-#line 515 "mn-tooltips.c"
+#line 509 "mn-tooltips.c"
{
-#line 264 "mn-tooltips.gob"
+#line 258 "mn-tooltips.gob"
GtkRequisition req;
@@ -532,22 +526,22 @@ mn_tooltips_paint_window (MNTooltips * self)
return FALSE;
}}
-#line 536 "mn-tooltips.c"
+#line 530 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 283 "mn-tooltips.gob"
+#line 277 "mn-tooltips.gob"
static void
mn_tooltips_draw_tips (MNTooltips * self)
-#line 542 "mn-tooltips.c"
+#line 536 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::draw_tips"
-#line 283 "mn-tooltips.gob"
+#line 277 "mn-tooltips.gob"
g_return_if_fail (self != NULL);
-#line 283 "mn-tooltips.gob"
+#line 277 "mn-tooltips.gob"
g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 549 "mn-tooltips.c"
+#line 543 "mn-tooltips.c"
{
-#line 285 "mn-tooltips.gob"
+#line 279 "mn-tooltips.gob"
GtkRequisition requisition;
GtkWidget *widget;
@@ -629,17 +623,17 @@ mn_tooltips_draw_tips (MNTooltips * self)
gtk_window_move(GTK_WINDOW(selfp->window), x, y);
gtk_widget_show(selfp->window);
}}
-#line 633 "mn-tooltips.c"
+#line 627 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 367 "mn-tooltips.gob"
+#line 361 "mn-tooltips.gob"
static gboolean
mn_tooltips_timeout_cb (gpointer data)
-#line 639 "mn-tooltips.c"
+#line 633 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::timeout_cb"
{
-#line 369 "mn-tooltips.gob"
+#line 363 "mn-tooltips.gob"
Self *self = SELF(data);
@@ -652,22 +646,22 @@ mn_tooltips_timeout_cb (gpointer data)
return FALSE; /* remove timeout */
}}
-#line 656 "mn-tooltips.c"
+#line 650 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 382 "mn-tooltips.gob"
+#line 376 "mn-tooltips.gob"
static void
mn_tooltips_set_active_widget (MNTooltips * self, GtkWidget * widget)
-#line 662 "mn-tooltips.c"
+#line 656 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::set_active_widget"
-#line 382 "mn-tooltips.gob"
+#line 376 "mn-tooltips.gob"
g_return_if_fail (self != NULL);
-#line 382 "mn-tooltips.gob"
+#line 376 "mn-tooltips.gob"
g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 669 "mn-tooltips.c"
+#line 663 "mn-tooltips.c"
{
-#line 384 "mn-tooltips.gob"
+#line 378 "mn-tooltips.gob"
if (selfp->window)
{
@@ -675,11 +669,8 @@ mn_tooltips_set_active_widget (MNTooltips * self, GtkWidget * widget)
g_get_current_time(&selfp->last_popdown);
gtk_widget_hide(selfp->window);
}
- if (selfp->timeout_id)
- {
- g_source_remove(selfp->timeout_id);
- selfp->timeout_id = 0;
- }
+
+ mn_source_remove(&selfp->timeout_id);
selfp->active_data = NULL;
@@ -701,22 +692,22 @@ mn_tooltips_set_active_widget (MNTooltips * self, GtkWidget * widget)
else
selfp->use_sticky_delay = FALSE;
}}
-#line 705 "mn-tooltips.c"
+#line 696 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 418 "mn-tooltips.gob"
+#line 409 "mn-tooltips.gob"
static void
mn_tooltips_show_tip (GtkWidget * widget)
-#line 711 "mn-tooltips.c"
+#line 702 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::show_tip"
-#line 418 "mn-tooltips.gob"
+#line 409 "mn-tooltips.gob"
g_return_if_fail (widget != NULL);
-#line 418 "mn-tooltips.gob"
+#line 409 "mn-tooltips.gob"
g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 718 "mn-tooltips.c"
+#line 709 "mn-tooltips.c"
{
-#line 420 "mn-tooltips.gob"
+#line 411 "mn-tooltips.gob"
TooltipsData *data;
@@ -730,22 +721,22 @@ mn_tooltips_show_tip (GtkWidget * widget)
self_draw_tips(data->self);
}
}}
-#line 734 "mn-tooltips.c"
+#line 725 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 434 "mn-tooltips.gob"
+#line 425 "mn-tooltips.gob"
static void
mn_tooltips_hide_tip (GtkWidget * widget)
-#line 740 "mn-tooltips.c"
+#line 731 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::hide_tip"
-#line 434 "mn-tooltips.gob"
+#line 425 "mn-tooltips.gob"
g_return_if_fail (widget != NULL);
-#line 434 "mn-tooltips.gob"
+#line 425 "mn-tooltips.gob"
g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 747 "mn-tooltips.c"
+#line 738 "mn-tooltips.c"
{
-#line 436 "mn-tooltips.gob"
+#line 427 "mn-tooltips.gob"
TooltipsData *data;
@@ -756,22 +747,22 @@ mn_tooltips_hide_tip (GtkWidget * widget)
data->self->_priv->active_data->widget == widget))
self_set_active_widget(data->self, NULL);
}}
-#line 760 "mn-tooltips.c"
+#line 751 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 447 "mn-tooltips.gob"
+#line 438 "mn-tooltips.gob"
static gboolean
mn_tooltips_recently_shown (MNTooltips * self)
-#line 766 "mn-tooltips.c"
+#line 757 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::recently_shown"
-#line 447 "mn-tooltips.gob"
+#line 438 "mn-tooltips.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 447 "mn-tooltips.gob"
+#line 438 "mn-tooltips.gob"
g_return_val_if_fail (MN_IS_TOOLTIPS (self), (gboolean )0);
-#line 773 "mn-tooltips.c"
+#line 764 "mn-tooltips.c"
{
-#line 449 "mn-tooltips.gob"
+#line 440 "mn-tooltips.gob"
GTimeVal now;
glong msec;
@@ -781,22 +772,22 @@ mn_tooltips_recently_shown (MNTooltips * self)
(now.tv_usec - selfp->last_popdown.tv_usec) / 1000;
return (msec < STICKY_REVERT_DELAY);
}}
-#line 785 "mn-tooltips.c"
+#line 776 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 459 "mn-tooltips.gob"
+#line 450 "mn-tooltips.gob"
static gboolean
mn_tooltips_get_keyboard_mode (GtkWidget * widget)
-#line 791 "mn-tooltips.c"
+#line 782 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::get_keyboard_mode"
-#line 459 "mn-tooltips.gob"
+#line 450 "mn-tooltips.gob"
g_return_val_if_fail (widget != NULL, (gboolean )0);
-#line 459 "mn-tooltips.gob"
+#line 450 "mn-tooltips.gob"
g_return_val_if_fail (GTK_IS_WIDGET (widget), (gboolean )0);
-#line 798 "mn-tooltips.c"
+#line 789 "mn-tooltips.c"
{
-#line 461 "mn-tooltips.gob"
+#line 452 "mn-tooltips.gob"
GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
@@ -805,22 +796,22 @@ mn_tooltips_get_keyboard_mode (GtkWidget * widget)
else
return FALSE;
}}
-#line 809 "mn-tooltips.c"
+#line 800 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 470 "mn-tooltips.gob"
+#line 461 "mn-tooltips.gob"
static void
mn_tooltips_start_keyboard_mode (GtkWidget * widget)
-#line 815 "mn-tooltips.c"
+#line 806 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::start_keyboard_mode"
-#line 470 "mn-tooltips.gob"
+#line 461 "mn-tooltips.gob"
g_return_if_fail (widget != NULL);
-#line 470 "mn-tooltips.gob"
+#line 461 "mn-tooltips.gob"
g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 822 "mn-tooltips.c"
+#line 813 "mn-tooltips.c"
{
-#line 472 "mn-tooltips.gob"
+#line 463 "mn-tooltips.gob"
GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
@@ -834,22 +825,22 @@ mn_tooltips_start_keyboard_mode (GtkWidget * widget)
self_show_tip(focus);
}
}}
-#line 838 "mn-tooltips.c"
+#line 829 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 486 "mn-tooltips.gob"
+#line 477 "mn-tooltips.gob"
static void
mn_tooltips_stop_keyboard_mode (GtkWidget * widget)
-#line 844 "mn-tooltips.c"
+#line 835 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::stop_keyboard_mode"
-#line 486 "mn-tooltips.gob"
+#line 477 "mn-tooltips.gob"
g_return_if_fail (widget != NULL);
-#line 486 "mn-tooltips.gob"
+#line 477 "mn-tooltips.gob"
g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 851 "mn-tooltips.c"
+#line 842 "mn-tooltips.c"
{
-#line 488 "mn-tooltips.gob"
+#line 479 "mn-tooltips.gob"
GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
@@ -863,22 +854,22 @@ mn_tooltips_stop_keyboard_mode (GtkWidget * widget)
g_object_set_data(G_OBJECT(toplevel), TOOLTIPS_KEYBOARD_MODE, GINT_TO_POINTER(FALSE));
}
}}
-#line 867 "mn-tooltips.c"
+#line 858 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 502 "mn-tooltips.gob"
+#line 493 "mn-tooltips.gob"
static void
mn_tooltips_start_delay (MNTooltips * self, GtkWidget * widget)
-#line 873 "mn-tooltips.c"
+#line 864 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::start_delay"
-#line 502 "mn-tooltips.gob"
+#line 493 "mn-tooltips.gob"
g_return_if_fail (self != NULL);
-#line 502 "mn-tooltips.gob"
+#line 493 "mn-tooltips.gob"
g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 880 "mn-tooltips.c"
+#line 871 "mn-tooltips.c"
{
-#line 504 "mn-tooltips.gob"
+#line 495 "mn-tooltips.gob"
TooltipsData *old_data;
@@ -891,24 +882,24 @@ mn_tooltips_start_delay (MNTooltips * self, GtkWidget * widget)
self);
}
}}
-#line 895 "mn-tooltips.c"
+#line 886 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 517 "mn-tooltips.gob"
+#line 508 "mn-tooltips.gob"
static void
mn_tooltips_event_after_h (GtkWidget * widget, GdkEvent * event, gpointer user_data)
-#line 901 "mn-tooltips.c"
+#line 892 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::event_after_h"
-#line 517 "mn-tooltips.gob"
+#line 508 "mn-tooltips.gob"
g_return_if_fail (widget != NULL);
-#line 517 "mn-tooltips.gob"
+#line 508 "mn-tooltips.gob"
g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 517 "mn-tooltips.gob"
+#line 508 "mn-tooltips.gob"
g_return_if_fail (event != NULL);
-#line 910 "mn-tooltips.c"
+#line 901 "mn-tooltips.c"
{
-#line 521 "mn-tooltips.gob"
+#line 512 "mn-tooltips.gob"
Self *self;
TooltipsData *old_data;
@@ -991,22 +982,22 @@ mn_tooltips_event_after_h (GtkWidget * widget, GdkEvent * event, gpointer user_d
}
}
}}
-#line 995 "mn-tooltips.c"
+#line 986 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 604 "mn-tooltips.gob"
+#line 595 "mn-tooltips.gob"
static void
mn_tooltips_widget_unmap (GtkWidget * widget, gpointer user_data)
-#line 1001 "mn-tooltips.c"
+#line 992 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::widget_unmap"
-#line 604 "mn-tooltips.gob"
+#line 595 "mn-tooltips.gob"
g_return_if_fail (widget != NULL);
-#line 604 "mn-tooltips.gob"
+#line 595 "mn-tooltips.gob"
g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 1008 "mn-tooltips.c"
+#line 999 "mn-tooltips.c"
{
-#line 606 "mn-tooltips.gob"
+#line 597 "mn-tooltips.gob"
TooltipsData *data = user_data;
Self *self = data->self;
@@ -1015,22 +1006,22 @@ mn_tooltips_widget_unmap (GtkWidget * widget, gpointer user_data)
(selfp->active_data->widget == widget))
self_set_active_widget(self, NULL);
}}
-#line 1019 "mn-tooltips.c"
+#line 1010 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 615 "mn-tooltips.gob"
+#line 606 "mn-tooltips.gob"
static void
mn_tooltips_widget_remove (GtkWidget * widget, gpointer user_data)
-#line 1025 "mn-tooltips.c"
+#line 1016 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::widget_remove"
-#line 615 "mn-tooltips.gob"
+#line 606 "mn-tooltips.gob"
g_return_if_fail (widget != NULL);
-#line 615 "mn-tooltips.gob"
+#line 606 "mn-tooltips.gob"
g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 1032 "mn-tooltips.c"
+#line 1023 "mn-tooltips.c"
{
-#line 617 "mn-tooltips.gob"
+#line 608 "mn-tooltips.gob"
TooltipsData *data = user_data;
Self *self = data->self;
@@ -1039,41 +1030,41 @@ mn_tooltips_widget_remove (GtkWidget * widget, gpointer user_data)
selfp->data_list = g_slist_remove(selfp->data_list, data);
self_destroy_data(data);
}}
-#line 1043 "mn-tooltips.c"
+#line 1034 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 626 "mn-tooltips.gob"
+#line 617 "mn-tooltips.gob"
void
mn_tooltips_toggle_keyboard_mode (GtkWidget * widget)
-#line 1049 "mn-tooltips.c"
+#line 1040 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::toggle_keyboard_mode"
-#line 626 "mn-tooltips.gob"
+#line 617 "mn-tooltips.gob"
g_return_if_fail (widget != NULL);
-#line 626 "mn-tooltips.gob"
+#line 617 "mn-tooltips.gob"
g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 1056 "mn-tooltips.c"
+#line 1047 "mn-tooltips.c"
{
-#line 628 "mn-tooltips.gob"
+#line 619 "mn-tooltips.gob"
if (self_get_keyboard_mode(widget))
self_stop_keyboard_mode(widget);
else
self_start_keyboard_mode(widget);
}}
-#line 1065 "mn-tooltips.c"
+#line 1056 "mn-tooltips.c"
#undef __GOB_FUNCTION__
-#line 635 "mn-tooltips.gob"
+#line 626 "mn-tooltips.gob"
MNTooltips *
mn_tooltips_new (void)
-#line 1071 "mn-tooltips.c"
+#line 1062 "mn-tooltips.c"
{
#define __GOB_FUNCTION__ "MN:Tooltips::new"
{
-#line 637 "mn-tooltips.gob"
+#line 628 "mn-tooltips.gob"
return GET_NEW;
}}
-#line 1079 "mn-tooltips.c"
+#line 1070 "mn-tooltips.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-tooltips.gob b/src/mn-tooltips.gob
@@ -3,7 +3,7 @@
* widget as tooltip (heavily based on GtkTooltips)
*
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -36,8 +36,8 @@ requires 2.0.10
%}
%{
-#include "mn-util.h"
#include <eel/eel.h>
+#include "mn-util.h"
#define TOOLTIPS_DATA "mn-tooltips-data"
#define TOOLTIPS_INFO "mn-tooltips-info"
@@ -221,10 +221,7 @@ class MN:Tooltips from G:Object
data->tip_widget = tip_widget;
if (data->tip_widget)
- {
- g_object_ref(data->tip_widget);
- gtk_object_sink(GTK_OBJECT(data->tip_widget));
- }
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(data->tip_widget));
self_draw_tips(self);
}
@@ -241,10 +238,7 @@ class MN:Tooltips from G:Object
data->tip_widget = tip_widget;
if (data->tip_widget)
- {
- g_object_ref(data->tip_widget);
- gtk_object_sink(GTK_OBJECT(data->tip_widget));
- }
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(data->tip_widget));
selfp->data_list = g_slist_append(selfp->data_list, data);
g_signal_connect_after(widget, "event-after", G_CALLBACK(self_event_after_h), data);
@@ -388,11 +382,8 @@ class MN:Tooltips from G:Object
g_get_current_time(&selfp->last_popdown);
gtk_widget_hide(selfp->window);
}
- if (selfp->timeout_id)
- {
- g_source_remove(selfp->timeout_id);
- selfp->timeout_id = 0;
- }
+
+ mn_source_remove(&selfp->timeout_id);
selfp->active_data = NULL;
diff --git a/src/mn-unsupported-mailbox.c b/src/mn-unsupported-mailbox.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:11 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:28 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
diff --git a/src/mn-unsupported-mailbox.gob b/src/mn-unsupported-mailbox.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 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
diff --git a/src/mn-uri.c b/src/mn-uri.c
@@ -1,4 +1,4 @@
-/* Generated by GOB (v2.0.11) on Thu Nov 25 01:42:11 2004
+/* Generated by GOB (v2.0.11) on Sun Mar 6 22:34:28 2005
(do not edit directly) */
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
@@ -665,7 +665,8 @@ mn_uri_set_human_readable (MNURI * self)
self->human_readable = g_filename_to_utf8(path, -1, NULL, NULL, NULL);
g_free(path);
}
- else
+
+ if (! self->human_readable)
self->human_readable = gnome_vfs_uri_to_string(self->vfs, GNOME_VFS_URI_HIDE_PASSWORD);
}
else if (MN_URI_IS_POP(self))
@@ -682,22 +683,22 @@ mn_uri_set_human_readable (MNURI * self)
else
self->human_readable = g_strdup(self->text);
}}
-#line 686 "mn-uri.c"
+#line 687 "mn-uri.c"
#undef __GOB_FUNCTION__
-#line 440 "mn-uri.gob"
+#line 441 "mn-uri.gob"
static void
mn_uri_post_init (MNURI * self)
-#line 692 "mn-uri.c"
+#line 693 "mn-uri.c"
{
#define __GOB_FUNCTION__ "MN:URI::post_init"
-#line 440 "mn-uri.gob"
+#line 441 "mn-uri.gob"
g_return_if_fail (self != NULL);
-#line 440 "mn-uri.gob"
+#line 441 "mn-uri.gob"
g_return_if_fail (MN_IS_URI (self));
-#line 699 "mn-uri.c"
+#line 700 "mn-uri.c"
{
-#line 442 "mn-uri.gob"
+#line 443 "mn-uri.gob"
const char *system_uri;
@@ -732,20 +733,20 @@ mn_uri_post_init (MNURI * self)
self_set_human_readable(self);
}}
-#line 736 "mn-uri.c"
+#line 737 "mn-uri.c"
#undef __GOB_FUNCTION__
-#line 477 "mn-uri.gob"
+#line 478 "mn-uri.gob"
MNURI *
mn_uri_new (const char * text_uri)
-#line 742 "mn-uri.c"
+#line 743 "mn-uri.c"
{
#define __GOB_FUNCTION__ "MN:URI::new"
-#line 477 "mn-uri.gob"
+#line 478 "mn-uri.gob"
g_return_val_if_fail (text_uri != NULL, (MNURI * )0);
-#line 747 "mn-uri.c"
+#line 748 "mn-uri.c"
{
-#line 479 "mn-uri.gob"
+#line 480 "mn-uri.gob"
Self *self;
char *scheme;
@@ -764,22 +765,22 @@ mn_uri_new (const char * text_uri)
self_post_init(self);
return self;
}}
-#line 768 "mn-uri.c"
+#line 769 "mn-uri.c"
#undef __GOB_FUNCTION__
-#line 498 "mn-uri.gob"
+#line 499 "mn-uri.gob"
MNURI *
mn_uri_new_pop (gboolean ssl, gboolean stls, const char * username, const char * password, const char * authmech, const char * hostname, int port)
-#line 774 "mn-uri.c"
+#line 775 "mn-uri.c"
{
#define __GOB_FUNCTION__ "MN:URI::new_pop"
-#line 498 "mn-uri.gob"
+#line 499 "mn-uri.gob"
g_return_val_if_fail (username != NULL, (MNURI * )0);
-#line 498 "mn-uri.gob"
+#line 499 "mn-uri.gob"
g_return_val_if_fail (hostname != NULL, (MNURI * )0);
-#line 781 "mn-uri.c"
+#line 782 "mn-uri.c"
{
-#line 506 "mn-uri.gob"
+#line 507 "mn-uri.gob"
Self *self;
@@ -801,24 +802,24 @@ mn_uri_new_pop (gboolean ssl, gboolean stls, const char * username, const char *
self_post_init(self);
return self;
}}
-#line 805 "mn-uri.c"
+#line 806 "mn-uri.c"
#undef __GOB_FUNCTION__
-#line 528 "mn-uri.gob"
+#line 529 "mn-uri.gob"
MNURI *
mn_uri_new_imap (gboolean ssl, gboolean starttls, const char * username, const char * password, const char * authmech, const char * hostname, int port, const char * mailbox, gboolean disable_idle)
-#line 811 "mn-uri.c"
+#line 812 "mn-uri.c"
{
#define __GOB_FUNCTION__ "MN:URI::new_imap"
-#line 528 "mn-uri.gob"
+#line 529 "mn-uri.gob"
g_return_val_if_fail (username != NULL, (MNURI * )0);
-#line 528 "mn-uri.gob"
+#line 529 "mn-uri.gob"
g_return_val_if_fail (hostname != NULL, (MNURI * )0);
-#line 528 "mn-uri.gob"
+#line 529 "mn-uri.gob"
g_return_val_if_fail (mailbox != NULL, (MNURI * )0);
-#line 820 "mn-uri.c"
+#line 821 "mn-uri.c"
{
-#line 538 "mn-uri.gob"
+#line 539 "mn-uri.gob"
Self *self;
GSList *queries = NULL;
@@ -852,20 +853,20 @@ mn_uri_new_imap (gboolean ssl, gboolean starttls, const char * username, const c
self_post_init(self);
return self;
}}
-#line 856 "mn-uri.c"
+#line 857 "mn-uri.c"
#undef __GOB_FUNCTION__
-#line 572 "mn-uri.gob"
+#line 573 "mn-uri.gob"
MNURI *
mn_uri_new_gmail (const char * username, const char * password)
-#line 862 "mn-uri.c"
+#line 863 "mn-uri.c"
{
#define __GOB_FUNCTION__ "MN:URI::new_gmail"
-#line 572 "mn-uri.gob"
+#line 573 "mn-uri.gob"
g_return_val_if_fail (username != NULL, (MNURI * )0);
-#line 867 "mn-uri.c"
+#line 868 "mn-uri.c"
{
-#line 575 "mn-uri.gob"
+#line 576 "mn-uri.gob"
Self *self;
@@ -878,5 +879,5 @@ mn_uri_new_gmail (const char * username, const char * password)
self_post_init(self);
return self;
}}
-#line 882 "mn-uri.c"
+#line 883 "mn-uri.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-uri.gob b/src/mn-uri.gob
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2004, 2005 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
@@ -419,7 +419,8 @@ class MN:URI from G:Object
self->human_readable = g_filename_to_utf8(path, -1, NULL, NULL, NULL);
g_free(path);
}
- else
+
+ if (! self->human_readable)
self->human_readable = gnome_vfs_uri_to_string(self->vfs, GNOME_VFS_URI_HIDE_PASSWORD);
}
else if (MN_URI_IS_POP(self))
diff --git a/src/mn-util.c b/src/mn-util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -43,6 +43,12 @@ typedef struct
gpointer instance;
unsigned long id;
} SignalHandler;
+
+typedef struct
+{
+ GMainLoop *loop;
+ int response;
+} RunNonmodalInfo;
/*** functions ***************************************************************/
@@ -78,6 +84,16 @@ static void mn_error_dialog_real_response_h (GtkDialog *dialog,
static void mn_g_object_connect_weak_notify_cb (gpointer data,
GObject *former_object);
+static void mn_dialog_run_nonmodal_unmap_h (GtkWidget *widget,
+ gpointer user_data);
+static void mn_dialog_run_nonmodal_response_h (GtkDialog *dialog,
+ int response,
+ gpointer user_data);
+static gboolean mn_dialog_run_nonmodal_delete_event_h (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data);
+static void mn_dialog_run_nonmodal_shutdown_loop (RunNonmodalInfo *info);
+
/*** implementation **********************************************************/
void
@@ -218,16 +234,12 @@ mn_str_isnumeric (const char *str)
GdkPixbuf *
mn_pixbuf_new (const char *filename)
{
- char *pathname;
GdkPixbuf *pixbuf;
GError *err = NULL;
g_return_val_if_fail(filename != NULL, NULL);
- pathname = g_build_filename(UIDIR, filename, NULL);
- pixbuf = gdk_pixbuf_new_from_file(pathname, &err);
- g_free(pathname);
-
+ pixbuf = gdk_pixbuf_new_from_file(filename, &err);
if (! pixbuf)
{
g_warning(_("error loading image: %s"), err->message);
@@ -238,27 +250,20 @@ mn_pixbuf_new (const char *filename)
}
void
-mn_create_interface (const char *name, ...)
+mn_create_interface (const char *filename, ...)
{
- char *filename;
- char *pathname;
GladeXML *xml;
va_list args;
const char *widget_name;
- g_return_if_fail(name != NULL);
-
- 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(filename != NULL);
+ xml = glade_xml_new(filename, NULL, NULL);
g_return_if_fail(xml != NULL);
+
glade_xml_signal_autoconnect(xml);
- va_start(args, name);
+ va_start(args, filename);
while ((widget_name = va_arg(args, const char *)))
{
GtkWidget **widget;
@@ -268,7 +273,7 @@ mn_create_interface (const char *name, ...)
*widget = glade_xml_get_widget(xml, widget_name);
if (! *widget)
- g_critical(_("widget \"%s\" not found in interface \"%s\""), widget_name, name);
+ g_critical(_("widget \"%s\" not found in interface \"%s\""), widget_name, filename);
}
va_end(args);
@@ -531,63 +536,6 @@ mn_thread_create (GThreadFunc func, gpointer data)
}
/**
- * mn_gtk_tooltips_new:
- *
- * Creates and sinks a #GtkTooltips object.
- *
- * Return value: the new #GtkTooltips object (sunk and with a
- * reference count of 1).
- **/
-GtkTooltips *
-mn_gtk_tooltips_new (void)
-{
- GtkTooltips *tooltips;
-
- tooltips = gtk_tooltips_new();
- g_object_ref(tooltips);
- gtk_object_sink(GTK_OBJECT(tooltips));
-
- return tooltips;
-}
-
-/**
- * mn_gtk_tooltips_set_tips:
- * @tooltips: a #GtkTooltips object
- * @...: a %NULL-terminated list of widget-tip pairs
- *
- * Sets the tooltips of several widgets at once.
- *
- * <example>
- * mn_gtk_tooltips_set_tips(tooltips,
- * button, "Click here to proceed",
- * entry, "Your username",
- * NULL);
- * </example>
- **/
-void
-mn_gtk_tooltips_set_tips (GtkTooltips *tooltips, ...)
-{
- va_list args;
- GtkWidget *widget;
-
- g_return_if_fail(GTK_IS_TOOLTIPS(tooltips));
-
- va_start(args, tooltips);
- while ((widget = va_arg(args, GtkWidget *)))
- {
- const char *tip;
-
- g_return_if_fail(GTK_IS_WIDGET(widget));
-
- tip = va_arg(args, const char *);
- g_return_if_fail(tip != NULL);
-
- mn_gtk_tooltips_set_tip(tooltips, widget, tip);
- }
- va_end(args);
-}
-
-/**
* mn_menu_shell_append:
* @shell: the #GtkMenuShell to append to
* @stock_id: the stock ID of the item or %NULL
@@ -626,33 +574,6 @@ mn_menu_shell_append (GtkMenuShell *shell,
return item;
}
-/**
- * mn_menu_shell_prepend:
- * @shell: the #GtkMenuShell to prepend to
- * @stock_id: the stock ID of the item or %NULL
- * @mnemonic: the mnemonic of the item or %NULL
- *
- * Same as mn_menu_shell_append(), but prepends the item instead of
- * appending it.
- *
- * Return value: the new menu item.
- **/
-GtkWidget *
-mn_menu_shell_prepend (GtkMenuShell *shell,
- const char *stock_id,
- const char *mnemonic)
-{
- GtkWidget *item;
-
- g_return_val_if_fail(GTK_IS_MENU_SHELL(shell), NULL);
-
- item = mn_menu_item_new(stock_id, mnemonic);
- gtk_menu_shell_prepend(shell, item);
- gtk_widget_show(item);
-
- return item;
-}
-
static GtkWidget *
mn_menu_item_new (const char *stock_id, const char *mnemonic)
{
@@ -709,7 +630,7 @@ mn_error_dialog_real (GtkWindow *parent,
gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->vbox), alignment, FALSE, FALSE, 0);
- mn_conf_link(check, not_again_key, NULL);
+ mn_conf_link(check, not_again_key, "active", NULL);
}
if (help_link_id != NULL)
@@ -780,7 +701,7 @@ mn_fatal_error_dialog (GtkWindow *parent, const char *format, ...)
va_list args;
char *secondary;
- g_return_if_fail(format != NULL);
+ g_assert(format != NULL);
va_start(args, format);
secondary = g_strdup_vprintf(format, args);
@@ -807,46 +728,6 @@ mn_time (void)
return t;
}
-GType
-mn_position_get_type (void)
-{
- static GType type = 0;
-
- if (type == 0)
- {
- static const GEnumValue values[] = {
- { MN_POSITION_TOP_LEFT, "MN_POSITION_TOP_LEFT", "top-left" },
- { MN_POSITION_TOP_RIGHT, "MN_POSITION_TOP_RIGHT", "top-right" },
- { MN_POSITION_BOTTOM_LEFT, "MN_POSITION_BOTTOM_LEFT", "bottom-left" },
- { MN_POSITION_BOTTOM_RIGHT, "MN_POSITION_BOTTOM_RIGHT", "bottom-right" },
- { 0, NULL, NULL }
- };
-
- type = g_enum_register_static("MNPosition", values);
- }
-
- return type;
-}
-
-GType
-mn_action_get_type (void)
-{
- static GType type = 0;
-
- if (type == 0)
- {
- static const GEnumValue values[] = {
- { MN_ACTION_DISPLAY_MAIL_SUMMARY, "MN_ACTION_DISPLAY_MAIL_SUMMARY", "display-mail-summary" },
- { MN_ACTION_LAUNCH_MAIL_READER, "MN_ACTION_LAUNCH_MAIL_READER", "launch-mail-reader" },
- { 0, NULL, NULL }
- };
-
- type = g_enum_register_static("MNAction", values);
- }
-
- return type;
-}
-
/**
* mn_g_object_connect:
* @object: the object to associate the handlers with
@@ -936,16 +817,185 @@ mn_execute_command (const char *conf_key)
g_return_if_fail(conf_key != NULL);
command = eel_gconf_get_string(conf_key);
- if (command)
+ g_return_if_fail(command != NULL && *command != 0);
+
+ if (gnome_execute_shell(NULL, command) < 0)
+ mn_error_dialog(NULL,
+ NULL,
+ NULL,
+ _("A command error has occurred in Mail Notification"),
+ _("Unable to execute \"%s\": %s."),
+ command,
+ g_strerror(errno));
+ g_free(command);
+}
+
+void
+mn_gtk_object_ref_and_sink (GtkObject *object)
+{
+ g_return_if_fail(GTK_IS_OBJECT(object));
+
+ g_object_ref(object);
+ gtk_object_sink(object);
+}
+
+int
+mn_utf8_strcasecoll (const char *s1, const char *s2)
+{
+ char *folded_s1;
+ char *folded_s2;
+ int coll;
+
+ g_return_val_if_fail(s1 != NULL, 0);
+ g_return_val_if_fail(s2 != NULL, 0);
+
+ folded_s1 = g_utf8_casefold(s1, -1);
+ folded_s2 = g_utf8_casefold(s2, -1);
+
+ coll = g_utf8_collate(folded_s1, folded_s2);
+
+ g_free(folded_s1);
+ g_free(folded_s2);
+
+ return coll;
+}
+
+int
+mn_dialog_run_nonmodal (GtkDialog *dialog)
+{
+ RunNonmodalInfo info = { NULL, GTK_RESPONSE_NONE };
+
+ g_return_val_if_fail(GTK_IS_DIALOG(dialog), -1);
+
+ g_object_ref(dialog);
+
+ if (! GTK_WIDGET_VISIBLE(dialog))
+ gtk_widget_show(GTK_WIDGET(dialog));
+
+ g_object_connect(dialog,
+ "signal::unmap", mn_dialog_run_nonmodal_unmap_h, &info,
+ "signal::response", mn_dialog_run_nonmodal_response_h, &info,
+ "signal::delete-event", mn_dialog_run_nonmodal_delete_event_h, &info,
+ NULL);
+
+ info.loop = g_main_loop_new(NULL, FALSE);
+
+ GDK_THREADS_LEAVE();
+ g_main_loop_run(info.loop);
+ GDK_THREADS_ENTER();
+
+ g_main_loop_unref(info.loop);
+
+ g_object_disconnect(dialog,
+ "any-signal", mn_dialog_run_nonmodal_unmap_h, &info,
+ "any-signal", mn_dialog_run_nonmodal_response_h, &info,
+ "any-signal", mn_dialog_run_nonmodal_delete_event_h, &info,
+ NULL);
+
+ g_object_unref(dialog);
+
+ return info.response;
+}
+
+static void
+mn_dialog_run_nonmodal_unmap_h (GtkWidget *widget, gpointer user_data)
+{
+ RunNonmodalInfo *info = user_data;
+
+ mn_dialog_run_nonmodal_shutdown_loop(info);
+}
+
+static void
+mn_dialog_run_nonmodal_response_h (GtkDialog *dialog,
+ int response,
+ gpointer user_data)
+{
+ RunNonmodalInfo *info = user_data;
+
+ info->response = response;
+
+ mn_dialog_run_nonmodal_shutdown_loop(info);
+}
+
+static gboolean
+mn_dialog_run_nonmodal_delete_event_h (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data)
+{
+ RunNonmodalInfo *info = user_data;
+
+ mn_dialog_run_nonmodal_shutdown_loop(info);
+
+ return TRUE; /* do not destroy */
+}
+
+static void
+mn_dialog_run_nonmodal_shutdown_loop (RunNonmodalInfo *info)
+{
+ g_return_if_fail(info != NULL);
+
+ if (g_main_loop_is_running(info->loop))
+ g_main_loop_quit(info->loop);
+}
+
+gboolean
+mn_ascii_validate (const char *str)
+{
+ g_return_val_if_fail(str != NULL, FALSE);
+
+ for (; *str; str++)
+ if ((unsigned char) *str > 127)
+ return FALSE;
+
+ return TRUE;
+}
+
+void
+mn_source_remove (unsigned int *tag)
+{
+ g_return_if_fail(tag != NULL);
+
+ if (*tag)
{
- if (gnome_execute_shell(NULL, command) < 0)
- mn_error_dialog(NULL,
- NULL,
- NULL,
- _("A command error has occurred in Mail Notification"),
- _("Unable to execute \"%s\": %s."),
- command,
- g_strerror(errno));
- g_free(command);
+ g_source_remove(*tag);
+ *tag = 0;
}
}
+
+unsigned int
+mn_timeout_add (const char *minutes_key,
+ const char *seconds_key,
+ GSourceFunc function,
+ gpointer data)
+{
+ int minutes;
+ int seconds;
+
+ g_return_val_if_fail(minutes_key != NULL, 0);
+ g_return_val_if_fail(seconds_key != NULL, 0);
+
+ minutes = eel_gconf_get_integer(minutes_key);
+ seconds = eel_gconf_get_integer(seconds_key);
+
+ return minutes != 0 || seconds != 0
+ ? g_timeout_add(((minutes * 60) + seconds) * 1000, function, data)
+ : 0;
+}
+
+gboolean
+mn_ascii_str_case_has_prefix (const char *str, const char *prefix)
+{
+ int str_len;
+ int prefix_len;
+
+ g_return_val_if_fail(str != NULL, FALSE);
+ g_return_val_if_fail(prefix != NULL, FALSE);
+
+ str_len = strlen(str);
+ prefix_len = strlen(prefix);
+
+ if (str_len < prefix_len)
+ return FALSE;
+
+ return g_ascii_strncasecmp(str, prefix, prefix_len) == 0;
+}
diff --git a/src/mn-util.h b/src/mn-util.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * Copyright (C) 2003-2005 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
@@ -50,8 +50,11 @@ GSList *mn_g_object_slist_delete_link (GSList *list,
gboolean mn_str_isnumeric (const char *str);
+#define MN_IMAGE_FILE(path, name) path G_DIR_SEPARATOR_S name
+#define MN_INTERFACE_FILE(name) UIDIR G_DIR_SEPARATOR_S name
+
GdkPixbuf *mn_pixbuf_new (const char *filename);
-void mn_create_interface (const char *name,
+void mn_create_interface (const char *filename,
...);
void mn_file_chooser_dialog_allow_select_folder (GtkFileChooserDialog *dialog,
@@ -76,13 +79,6 @@ void mn_display_help (GtkWindow *parent,
void mn_thread_create (GThreadFunc func,
gpointer data);
-GtkTooltips *mn_gtk_tooltips_new (void);
-void mn_gtk_tooltips_set_tips (GtkTooltips *tooltips,
- ...);
-
-#define mn_gtk_tooltips_set_tip(tooltips, widget, tip) \
- gtk_tooltips_set_tip((tooltips), (widget), (tip), NULL)
-
GtkWidget *mn_menu_shell_append (GtkMenuShell *shell,
const char *stock_id,
const char *mnemonic);
@@ -98,30 +94,10 @@ void mn_error_dialog (GtkWindow *parent,
...) G_GNUC_PRINTF(5, 6);
void mn_fatal_error_dialog (GtkWindow *parent,
const char *format,
- ...) G_GNUC_PRINTF(2, 3);
+ ...) G_GNUC_PRINTF(2, 3) G_GNUC_NORETURN;
time_t mn_time (void);
-typedef enum
-{
- MN_POSITION_TOP_LEFT,
- MN_POSITION_TOP_RIGHT,
- MN_POSITION_BOTTOM_LEFT,
- MN_POSITION_BOTTOM_RIGHT
-} MNPosition;
-
-GType mn_position_get_type (void);
-#define MN_TYPE_POSITION (mn_position_get_type())
-
-typedef enum
-{
- MN_ACTION_DISPLAY_MAIL_SUMMARY,
- MN_ACTION_LAUNCH_MAIL_READER
-} MNAction;
-
-GType mn_action_get_type (void);
-#define MN_TYPE_ACTION (mn_action_get_type())
-
gpointer mn_g_object_connect (gpointer object,
gpointer instance,
const char *signal_spec,
@@ -129,7 +105,23 @@ gpointer mn_g_object_connect (gpointer object,
void mn_execute_command (const char *conf_key);
-#define MN_STRING_TO_POINTER(str) ((*str) ? (str) : NULL)
-#define MN_POINTER_TO_STRING(ptr) ((ptr) ? (ptr) : "")
+void mn_gtk_object_ref_and_sink (GtkObject *object);
+
+int mn_utf8_strcasecoll (const char *s1,
+ const char *s2);
+
+int mn_dialog_run_nonmodal (GtkDialog *dialog);
+
+gboolean mn_ascii_validate (const char *str);
+
+void mn_source_remove (unsigned int *tag);
+
+unsigned int mn_timeout_add (const char *minutes_key,
+ const char *seconds_key,
+ GSourceFunc function,
+ gpointer data);
+
+gboolean mn_ascii_str_case_has_prefix (const char *str,
+ const char *prefix);
#endif /* _MN_UTIL_H */
diff --git a/src/mn-vfs.c b/src/mn-vfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/src/mn-vfs.h b/src/mn-vfs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/tests/Makefile.am b/tests/Makefile.am
@@ -1,4 +1,5 @@
tests = \
+ test-sgml-ref.stamp \
test-uri.stamp \
test-vfs-read-line1-smallblock.output \
test-vfs-read-line1-largeblock.output \
@@ -6,11 +7,16 @@ tests = \
test-vfs-read-line2-largeblock.output
noinst_PROGRAMS = \
+ test-sgml-ref \
test-uri \
test-vfs-read-line-smallblock \
test-vfs-read-line-largeblock
noinst_DATA = $(tests)
+test_sgml_ref_SOURCES = \
+ $(top_srcdir)/src/mn-sgml-ref.c \
+ test-sgml-ref.c
+
test_uri_SOURCES = \
$(top_srcdir)/src/mn-uri.c \
test-uri.c
@@ -34,6 +40,10 @@ AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GNOME_CFLAGS) \
-I$(top_srcdir)/src \
-DMN_REGRESSION_TEST
+test-sgml-ref.stamp: test-sgml-ref
+ ./test-sgml-ref
+ @touch test-sgml-ref.stamp
+
test-uri.stamp: test-uri
./test-uri
@touch test-uri.stamp
diff --git a/tests/Makefile.in b/tests/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,7 +15,7 @@
@SET_MAKE@
-SOURCES = $(test_uri_SOURCES) $(test_vfs_read_line_largeblock_SOURCES) $(test_vfs_read_line_smallblock_SOURCES)
+SOURCES = $(test_sgml_ref_SOURCES) $(test_uri_SOURCES) $(test_vfs_read_line_largeblock_SOURCES) $(test_vfs_read_line_smallblock_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -37,21 +37,25 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-noinst_PROGRAMS = test-uri$(EXEEXT) \
+noinst_PROGRAMS = test-sgml-ref$(EXEEXT) test-uri$(EXEEXT) \
test-vfs-read-line-smallblock$(EXEEXT) \
test-vfs-read-line-largeblock$(EXEEXT)
subdir = tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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 =
PROGRAMS = $(noinst_PROGRAMS)
+am_test_sgml_ref_OBJECTS = mn-sgml-ref.$(OBJEXT) \
+ test-sgml-ref.$(OBJEXT)
+test_sgml_ref_OBJECTS = $(am_test_sgml_ref_OBJECTS)
+test_sgml_ref_LDADD = $(LDADD)
am_test_uri_OBJECTS = mn-uri.$(OBJEXT) test-uri.$(OBJEXT)
test_uri_OBJECTS = $(am_test_uri_OBJECTS)
test_uri_LDADD = $(LDADD)
@@ -74,9 +78,10 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(test_uri_SOURCES) $(test_vfs_read_line_largeblock_SOURCES) \
+SOURCES = $(test_sgml_ref_SOURCES) $(test_uri_SOURCES) \
+ $(test_vfs_read_line_largeblock_SOURCES) \
$(test_vfs_read_line_smallblock_SOURCES)
-DIST_SOURCES = $(test_uri_SOURCES) \
+DIST_SOURCES = $(test_sgml_ref_SOURCES) $(test_uri_SOURCES) \
$(test_vfs_read_line_largeblock_SOURCES) \
$(test_vfs_read_line_smallblock_SOURCES)
DATA = $(noinst_DATA)
@@ -114,6 +119,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -124,6 +130,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -190,6 +199,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
@@ -246,6 +257,7 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
tests = \
+ test-sgml-ref.stamp \
test-uri.stamp \
test-vfs-read-line1-smallblock.output \
test-vfs-read-line1-largeblock.output \
@@ -253,6 +265,10 @@ tests = \
test-vfs-read-line2-largeblock.output
noinst_DATA = $(tests)
+test_sgml_ref_SOURCES = \
+ $(top_srcdir)/src/mn-sgml-ref.c \
+ test-sgml-ref.c
+
test_uri_SOURCES = \
$(top_srcdir)/src/mn-uri.c \
test-uri.c
@@ -319,6 +335,9 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+test-sgml-ref$(EXEEXT): $(test_sgml_ref_OBJECTS) $(test_sgml_ref_DEPENDENCIES)
+ @rm -f test-sgml-ref$(EXEEXT)
+ $(LINK) $(test_sgml_ref_LDFLAGS) $(test_sgml_ref_OBJECTS) $(test_sgml_ref_LDADD) $(LIBS)
test-uri$(EXEEXT): $(test_uri_OBJECTS) $(test_uri_DEPENDENCIES)
@rm -f test-uri$(EXEEXT)
$(LINK) $(test_uri_LDFLAGS) $(test_uri_OBJECTS) $(test_uri_LDADD) $(LIBS)
@@ -335,7 +354,9 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-sgml-ref.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-uri.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sgml-ref.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-uri.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_vfs_read_line_largeblock-mn-vfs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_vfs_read_line_largeblock-test-vfs-read-line.Po@am__quote@
@@ -356,6 +377,20 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+mn-sgml-ref.o: $(top_srcdir)/src/mn-sgml-ref.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mn-sgml-ref.o -MD -MP -MF "$(DEPDIR)/mn-sgml-ref.Tpo" -c -o mn-sgml-ref.o `test -f '$(top_srcdir)/src/mn-sgml-ref.c' || echo '$(srcdir)/'`$(top_srcdir)/src/mn-sgml-ref.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mn-sgml-ref.Tpo" "$(DEPDIR)/mn-sgml-ref.Po"; else rm -f "$(DEPDIR)/mn-sgml-ref.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/mn-sgml-ref.c' object='mn-sgml-ref.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mn-sgml-ref.o `test -f '$(top_srcdir)/src/mn-sgml-ref.c' || echo '$(srcdir)/'`$(top_srcdir)/src/mn-sgml-ref.c
+
+mn-sgml-ref.obj: $(top_srcdir)/src/mn-sgml-ref.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mn-sgml-ref.obj -MD -MP -MF "$(DEPDIR)/mn-sgml-ref.Tpo" -c -o mn-sgml-ref.obj `if test -f '$(top_srcdir)/src/mn-sgml-ref.c'; then $(CYGPATH_W) '$(top_srcdir)/src/mn-sgml-ref.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/mn-sgml-ref.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mn-sgml-ref.Tpo" "$(DEPDIR)/mn-sgml-ref.Po"; else rm -f "$(DEPDIR)/mn-sgml-ref.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/mn-sgml-ref.c' object='mn-sgml-ref.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mn-sgml-ref.obj `if test -f '$(top_srcdir)/src/mn-sgml-ref.c'; then $(CYGPATH_W) '$(top_srcdir)/src/mn-sgml-ref.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/mn-sgml-ref.c'; fi`
+
mn-uri.o: $(top_srcdir)/src/mn-uri.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mn-uri.o -MD -MP -MF "$(DEPDIR)/mn-uri.Tpo" -c -o mn-uri.o `test -f '$(top_srcdir)/src/mn-uri.c' || echo '$(srcdir)/'`$(top_srcdir)/src/mn-uri.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mn-uri.Tpo" "$(DEPDIR)/mn-uri.Po"; else rm -f "$(DEPDIR)/mn-uri.Tpo"; exit 1; fi
@@ -592,6 +627,10 @@ uninstall-am: uninstall-info-am
uninstall-am uninstall-info-am
+test-sgml-ref.stamp: test-sgml-ref
+ ./test-sgml-ref
+ @touch test-sgml-ref.stamp
+
test-uri.stamp: test-uri
./test-uri
@touch test-uri.stamp
diff --git a/tests/test-sgml-ref.c b/tests/test-sgml-ref.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2005 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 <string.h>
+#include <stdlib.h>
+#include <glib.h>
+#include "mn-sgml-ref.h"
+
+#define FAIL \
+ { \
+ g_printerr("failure at %s\n", G_STRLOC); \
+ exit(1); \
+ }
+
+int
+main (int argc, char **argv)
+{
+ if (strcmp(mn_sgml_ref_expand("<tag>"), "<tag>") != 0)
+ FAIL;
+ if (strcmp(mn_sgml_ref_expand("ABC"), "ABC") != 0)
+ FAIL;
+ if (strcmp(mn_sgml_ref_expand("ABC"), "ABC") != 0)
+ FAIL;
+ if (strcmp(mn_sgml_ref_expand("ABC"), "ABC") != 0)
+ FAIL;
+ if (strcmp(mn_sgml_ref_expand("ABC"), "ABC") != 0)
+ FAIL;
+ if (strcmp(mn_sgml_ref_expand("<tag> &unknown;"), "<tag> &unknown;") != 0)
+ FAIL;
+ if (strcmp(mn_sgml_ref_expand("<tag> &unknown end"), "<tag> &unknown end") != 0)
+ FAIL;
+
+ g_print("+++ SGML-REF TEST PASSED\n");
+
+ return 0;
+}
diff --git a/tests/test-uri.c b/tests/test-uri.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/tests/test-vfs-read-line.c b/tests/test-vfs-read-line.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ * 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
diff --git a/ui/Makefile.am b/ui/Makefile.am
@@ -1,26 +1,26 @@
uidir = $(pkgdatadir)/ui
if WITH_POP3_OR_IMAP_OR_GMAIL
-authentication_interfaces = authentication.glade
-authentication_projects = authentication.gladep
+authentication_interface = authentication.glade
+authentication_project = authentication.gladep
endif
-interfaces = \
- $(authentication_interfaces) \
+dist_ui_DATA = \
+ $(authentication_interface) \
+ edit-toolbars.glade \
mailbox-properties.glade \
+ main.glade \
+ menus.xml \
properties.glade \
- summary-dialog.glade \
summary-popup.glade \
+ toolbars.xml \
welcome.glade
-projects = \
- $(authentication_projects) \
+EXTRA_DIST = \
+ $(authentication_project) \
+ edit-toolbars.gladep \
mailbox-properties.gladep \
+ main.gladep \
properties.gladep \
- summary-dialog.gladep \
summary-popup.gladep \
welcome.gladep
-
-dist_ui_DATA = $(interfaces)
-
-EXTRA_DIST = $(projects)
diff --git a/ui/Makefile.in b/ui/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.2 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -38,9 +38,9 @@ subdir = ui
DIST_COMMON = $(am__dist_ui_DATA_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/icu.m4 \
+ $(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/sasl2.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
@@ -48,9 +48,9 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
-am__dist_ui_DATA_DIST = authentication.glade mailbox-properties.glade \
- properties.glade summary-dialog.glade summary-popup.glade \
- welcome.glade
+am__dist_ui_DATA_DIST = authentication.glade edit-toolbars.glade \
+ mailbox-properties.glade main.glade menus.xml properties.glade \
+ summary-popup.glade toolbars.xml welcome.glade
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -92,6 +92,7 @@ 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@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GMIME_CFLAGS = @GMIME_CFLAGS@
GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
@@ -102,6 +103,9 @@ GOB2 = @GOB2@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
ICONV = @ICONV@
+ICU_CFLAGS = @ICU_CFLAGS@
+ICU_CONFIG = @ICU_CONFIG@
+ICU_LIBS = @ICU_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -168,6 +172,8 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
+WITH_GMAIL_TIMESTAMPS_FALSE = @WITH_GMAIL_TIMESTAMPS_FALSE@
+WITH_GMAIL_TIMESTAMPS_TRUE = @WITH_GMAIL_TIMESTAMPS_TRUE@
WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
@@ -224,26 +230,28 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
uidir = $(pkgdatadir)/ui
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@authentication_interfaces = authentication.glade
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@authentication_projects = authentication.gladep
-interfaces = \
- $(authentication_interfaces) \
+@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@authentication_interface = authentication.glade
+@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@authentication_project = authentication.gladep
+dist_ui_DATA = \
+ $(authentication_interface) \
+ edit-toolbars.glade \
mailbox-properties.glade \
+ main.glade \
+ menus.xml \
properties.glade \
- summary-dialog.glade \
summary-popup.glade \
+ toolbars.xml \
welcome.glade
-projects = \
- $(authentication_projects) \
+EXTRA_DIST = \
+ $(authentication_project) \
+ edit-toolbars.gladep \
mailbox-properties.gladep \
+ main.gladep \
properties.gladep \
- summary-dialog.gladep \
summary-popup.gladep \
welcome.gladep
-dist_ui_DATA = $(interfaces)
-EXTRA_DIST = $(projects)
all: all-am
.SUFFIXES:
diff --git a/ui/authentication.glade b/ui/authentication.glade
@@ -8,11 +8,10 @@
<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_CENTER</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
- <property name="icon">mail-notification.png</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@@ -162,7 +161,7 @@
<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="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
@@ -216,7 +215,7 @@
<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="invisible_char">*</property>
<property name="activates_default">True</property>
<signal name="changed" handler="mn_authenticated_mailbox_password_prompt_changed_h" object="dialog" last_modification_time="Sun, 10 Oct 2004 21:53:42 GMT"/>
</widget>
diff --git a/ui/edit-toolbars.glade b/ui/edit-toolbars.glade
@@ -0,0 +1,159 @@
+<?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">Edit Toolbars</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">True</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="response" handler="mn_main_window_edit_toolbars_response_h" last_modification_time="Thu, 10 Feb 2005 14:42:36 GMT"/>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</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>
+
+ <child>
+ <widget class="GtkButton" id="helpbutton1">
+ <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="button1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">1</property>
+
+ <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>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <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-undo</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="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Use Default</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>
+ </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" translatable="yes">_Add a New Toolbar</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">2</property>
+ </widget>
+ </child>
+
+ <child>
+ <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-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>
+ </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>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/ui/edit-toolbars.gladep b/ui/edit-toolbars.gladep
@@ -0,0 +1,14 @@
+<?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 Edit Toolbars</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>
+ <translatable_strings_file>../</translatable_strings_file>
+</glade-project>
diff --git a/ui/main.glade b/ui/main.glade
@@ -0,0 +1,93 @@
+<?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="GtkWindow" id="window">
+ <property name="title" translatable="yes">Mail Notification</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_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <signal name="window_state_event" handler="mn_main_window_window_state_event_h" last_modification_time="Sun, 13 Feb 2005 02:14:14 GMT"/>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="Custom" id="menubar">
+ <property name="visible">True</property>
+ <property name="creation_function">mn_main_window_get_widget_cb</property>
+ <property name="string1">/menubar</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Thu, 10 Feb 2005 11:52:55 GMT</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="Custom" id="toolbar">
+ <property name="visible">True</property>
+ <property name="creation_function">mn_main_window_toolbar_new_cb</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Thu, 10 Feb 2005 11:53:22 GMT</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <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_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkStatusbar" id="statusbar">
+ <property name="visible">True</property>
+ <property name="has_resize_grip">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/ui/main.gladep b/ui/main.gladep
@@ -0,0 +1,14 @@
+<?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</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>
+ <translatable_strings_file>../</translatable_strings_file>
+</glade-project>
diff --git a/ui/menus.xml b/ui/menus.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<ui>
+ <menubar>
+ <menu action="Mail">
+ <menuitem action="MailMailReader"/>
+ <menuitem action="MailUpdate"/>
+ <separator name="MailSep1"/>
+ <menuitem action="MailClose"/>
+ <menuitem action="MailQuit"/>
+ </menu>
+
+ <menu action="Edit">
+ <menuitem action="EditToolbars"/>
+ <menuitem action="EditPreferences"/>
+ </menu>
+
+ <menu action="View">
+ <menuitem action="ViewToolbars"/>
+ <menuitem action="ViewStatusbar"/>
+ <separator name="ViewSep1"/>
+ <menu action="ViewToolbarsStyle">
+ <menuitem action="ViewToolbarsStyleDesktopDefault"/>
+ <separator name="ViewToolbarsStyleSep1"/>
+ <menuitem action="ViewToolbarsStyleIconsOnly"/>
+ <menuitem action="ViewToolbarsStyleTextOnly"/>
+ <menuitem action="ViewToolbarsStyleTextBelowIcons"/>
+ <menuitem action="ViewToolbarsStyleTextBesideIcons"/>
+ </menu>
+ </menu>
+
+ <menu action="Help">
+ <menuitem action="HelpContents"/>
+ <menuitem action="HelpAbout"/>
+ </menu>
+ </menubar>
+</ui>
diff --git a/ui/properties.glade b/ui/properties.glade
@@ -8,18 +8,17 @@
<property name="border_width">6</property>
<property name="title" translatable="yes">Mail Notification Properties</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</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="icon">mail-notification.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="response" handler="mn_properties_response_h" last_modification_time="Sat, 02 Oct 2004 18:23:37 GMT"/>
+ <signal name="response" handler="mn_properties_dialog_response_h" last_modification_time="Sat, 02 Oct 2004 18:23:37 GMT"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
@@ -112,31 +111,16 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox27">
+ <widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label37">
- <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>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox23">
@@ -156,7 +140,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="mn_properties_autostart_toggled_h" last_modification_time="Mon, 23 Aug 2004 01:36:43 GMT"/>
+ <signal name="toggled" handler="mn_properties_dialog_autostart_toggled_h" last_modification_time="Mon, 23 Aug 2004 01:36:43 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -205,11 +189,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
@@ -254,31 +233,16 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox28">
+ <widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label39">
- <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>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox25">
@@ -304,7 +268,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="mn_properties_toggled_h" last_modification_time="Fri, 29 Oct 2004 16:42:45 GMT"/>
+ <signal name="toggled" handler="mn_properties_dialog_toggled_h" last_modification_time="Fri, 29 Oct 2004 16:42:45 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -325,7 +289,6 @@
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
- <signal name="changed" handler="mn_properties_mail_reader_entry_changed_h" after="yes" last_modification_time="Fri, 29 Oct 2004 16:48:44 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -359,7 +322,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="mn_properties_toggled_h" last_modification_time="Sun, 27 Jul 2003 08:45:08 GMT"/>
+ <signal name="toggled" handler="mn_properties_dialog_toggled_h" last_modification_time="Sun, 27 Jul 2003 08:45:08 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -413,7 +376,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="mn_properties_toggled_h" last_modification_time="Sat, 09 Oct 2004 17:36:36 GMT"/>
+ <signal name="toggled" handler="mn_properties_dialog_toggled_h" last_modification_time="Sat, 09 Oct 2004 17:36:36 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -449,11 +412,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
@@ -498,31 +456,16 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox31">
+ <widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label41">
- <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>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox27">
@@ -531,17 +474,17 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkRadioButton" id="action_summary_radio">
+ <widget class="GtkRadioButton" id="action_main_window_radio">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Display the mail summary dialog</property>
+ <property name="label" translatable="yes">_Display the main window</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_properties_toggled_h" last_modification_time="Tue, 26 Oct 2004 11:27:38 GMT"/>
+ <signal name="toggled" handler="mn_properties_dialog_toggled_h" last_modification_time="Tue, 26 Oct 2004 11:27:38 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -561,7 +504,27 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <property name="group">action_summary_radio</property>
+ <property name="group">action_main_window_radio</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="action_update_radio">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Update the mail status</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">action_main_window_radio</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -570,11 +533,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
@@ -651,31 +609,16 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox25">
+ <widget class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label33">
- <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>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox11">
@@ -732,7 +675,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label16">
+ <widget class="GtkLabel" id="minutes_label">
<property name="visible">True</property>
<property name="label" translatable="yes">minutes</property>
<property name="use_underline">False</property>
@@ -773,7 +716,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label17">
+ <widget class="GtkLabel" id="seconds_label">
<property name="visible">True</property>
<property name="label" translatable="yes">seconds</property>
<property name="use_underline">False</property>
@@ -800,11 +743,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
@@ -849,31 +787,16 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox26">
+ <widget class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <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>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox21">
@@ -936,7 +859,7 @@
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <signal name="clicked" handler="mn_properties_add_clicked_h" last_modification_time="Thu, 27 May 2004 20:34:29 GMT"/>
+ <signal name="clicked" handler="mn_properties_dialog_add_clicked_h" last_modification_time="Thu, 27 May 2004 20:34:29 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -953,7 +876,7 @@
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <signal name="clicked" handler="mn_properties_remove_clicked_h" last_modification_time="Sat, 06 Dec 2003 14:00:02 GMT"/>
+ <signal name="clicked" handler="mn_properties_dialog_remove_clicked_h" last_modification_time="Sat, 06 Dec 2003 14:00:02 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -970,7 +893,7 @@
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <signal name="clicked" handler="mn_properties_properties_clicked_h" last_modification_time="Sat, 05 Jun 2004 20:07:54 GMT"/>
+ <signal name="clicked" handler="mn_properties_dialog_properties_clicked_h" last_modification_time="Sat, 05 Jun 2004 20:07:54 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -986,11 +909,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
@@ -1067,31 +985,16 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox23">
+ <widget class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label29">
- <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>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox16">
@@ -1111,7 +1014,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="mn_properties_toggled_h" last_modification_time="Wed, 15 Sep 2004 19:20:43 GMT"/>
+ <signal name="toggled" handler="mn_properties_dialog_toggled_h" last_modification_time="Wed, 15 Sep 2004 19:20:43 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -1138,7 +1041,7 @@
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="mn_properties_toggled_h" last_modification_time="Wed, 15 Sep 2004 19:20:52 GMT"/>
+ <signal name="toggled" handler="mn_properties_dialog_toggled_h" last_modification_time="Wed, 15 Sep 2004 19:20:52 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -1269,11 +1172,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
@@ -1318,31 +1216,16 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox24">
+ <widget class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <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>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox18">
@@ -1574,11 +1457,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
@@ -1623,31 +1501,16 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox34">
+ <widget class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label43">
- <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>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox29">
@@ -1656,24 +1519,79 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox35">
+ <widget class="GtkRadioButton" id="summary_fonts_from_theme_radio">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Use fonts from theme</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_properties_dialog_toggled_h" last_modification_time="Thu, 03 Feb 2005 20:37:10 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="summary_custom_fonts_radio">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Use these _fonts:</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">summary_fonts_from_theme_radio</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="hbox39">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child>
- <widget class="GtkCheckButton" id="summary_title_font_check">
+ <widget class="GtkAlignment" id="summary_title_font_alignment">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Whether to use a custom font for the title of the mail summary popup or not</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Title font:</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_properties_toggled_h" last_modification_time="Wed, 03 Nov 2004 14:44:43 GMT"/>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">30</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="summary_title_font_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Title:</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">summary_title_font_button</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -1707,24 +1625,39 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox36">
+ <widget class="GtkHBox" id="hbox40">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">12</property>
<child>
- <widget class="GtkCheckButton" id="summary_contents_font_check">
+ <widget class="GtkAlignment" id="summary_contents_font_alignment">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Whether to use a custom font for the contents of the mail summary popup or not</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Contents font:</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_properties_toggled_h" last_modification_time="Wed, 03 Nov 2004 14:44:53 GMT"/>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">30</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="summary_contents_font_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Co_ntents:</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">summary_contents_font_button</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -1757,11 +1690,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
diff --git a/ui/summary-dialog.glade b/ui/summary-dialog.glade
@@ -1,247 +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="title" translatable="yes">Mail Summary</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="icon">mail-notification.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="response" handler="mn_summary_dialog_response_h" last_modification_time="Wed, 15 Sep 2004 22:12:21 GMT"/>
-
- <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>
-
- <child>
- <widget class="GtkButton" id="helpbutton1">
- <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="mail_reader_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">1</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <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>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-execute</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="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Launch Mail Reader</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>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="update_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">2</property>
-
- <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>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <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-refresh</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="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Update</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>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button5">
- <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>
- </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="GtkScrolledWindow" id="scrolledwindow1">
- <property name="border_width">5</property>
- <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_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkViewport" id="viewport1">
- <property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- </widget>
- </child>
- </widget>
- </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/summary-dialog.gladep b/ui/summary-dialog.gladep
@@ -1,14 +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 Summary Dialog</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>
- <translatable_strings_file>../</translatable_strings_file>
-</glade-project>
diff --git a/ui/summary-popup.glade b/ui/summary-popup.glade
@@ -92,10 +92,13 @@
</child>
<child>
- <widget class="GtkVBox" id="vbox">
+ <widget class="Custom" id="mn-message-view">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="creation_function">mn_summary_popup_message_view_new_cb</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Sat, 12 Feb 2005 15:59:50 GMT</property>
+ <signal name="button_press_event" handler="mn_summary_popup_button_press_event_h" last_modification_time="Sat, 12 Feb 2005 17:30:20 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
diff --git a/ui/toolbars.xml b/ui/toolbars.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<toolbars version="1.0">
+ <available>
+ <toolitem name="MailMailReader"/>
+ <toolitem name="MailUpdate"/>
+
+ <toolitem name="EditPreferences"/>
+ </available>
+
+ <toolbar name="DefaultToolbar">
+ <toolitem name="MailMailReader"/>
+ <toolitem name="MailUpdate"/>
+ <separator/>
+ <toolitem name="EditPreferences"/>
+ </toolbar>
+</toolbars>
diff --git a/ui/welcome.glade b/ui/welcome.glade
@@ -8,11 +8,10 @@
<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_CENTER</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
- <property name="icon">mail-notification.png</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@@ -212,7 +211,7 @@
Mail Notification has been loaded successfully.
-Since this is the first time you run Mail Notification, you might want to configure it.
+Since this is the first time you run Mail Notification, you need to configure it.
Note: this message will not be shown anymore. To configure Mail Notification again, choose <span weight="bold">Applications</span> → <span weight="bold">Desktop Preferences</span> → <span weight="bold">Mail Notification</span> (or on some systems <span weight="bold">Applications → Preferences → More Preferences → Mail Notification</span>).</property>
<property name="use_underline">False</property>