# Time-stamp: <2006-04-22 16:29:00 (djcb)>
#
-SUBDIRS=\
- src\
- docs
+SUBDIRS= docs src po
-EXTRA_DIST=\
- autogen.sh TODO COPYING
+EXTRA_DIST= config.rpath config.rpath mkinstalldirs m4/ChangeLog \
+ autogen.sh TODO COPYING intltool-extract.in intltool-merge.in \
+ intltool-update.in
CFLAGS=\
-Wall
+
+ACLOCAL_AMFLAGS = -I m4
AC_CONFIG_SRCDIR(src/modest-main.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION)
+# Check for gettext support
+GETTEXT_PACKAGE=modest
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", ["Description"])
+
+ALL_LINGUAS="en_GB gl"
+#AM_GLIB_DEFINE_LOCALEDIR([MODEST_LOCALE_DIR])
+AM_GLIB_GNU_GETTEXT
+
+modestlocaledir='$prefix/${DATADIRNAME}/locale'
+AC_SUBST(modestlocaledir)
+
if test x$prefix = xNONE; then
prefix=/usr/local
fi
fi
AC_OUTPUT([
+po/Makefile.in
Makefile
src/Makefile
src/gtk/Makefile
--- /dev/null
+2006-11-08 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: New file, from gettext-0.14.5.
+
+2006-11-08 gettextize <bug-gnu-gettext@gnu.org>
+
+ * Makefile.in.in: New file, from gettext-0.14.5.
+ * Rules-quot: New file, from gettext-0.14.5.
+ * boldquot.sed: New file, from gettext-0.14.5.
+ * en@boldquot.header: New file, from gettext-0.14.5.
+ * en@quot.header: New file, from gettext-0.14.5.
+ * insert-header.sin: New file, from gettext-0.14.5.
+ * quot.sed: New file, from gettext-0.14.5.
+ * remove-potcdate.sin: New file, from gettext-0.14.5.
+ * POTFILES.in: New file.
+
--- /dev/null
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+#
+# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob@ximian.com> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+libdir = @libdir@
+localedir = $(libdir)/locale
+gnulocaledir = $(datadir)/locale
+gettextsrcdir = $(datadir)/glib-2.0/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+MSGMERGE = msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES =
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
+$(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -c -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
+ --add-comments --keyword=_ --keyword=N_ \
+ --flag=g_strdup_printf:1:c-format \
+ --flag=g_string_printf:2:c-format \
+ --flag=g_string_append_printf:2:c-format \
+ --flag=g_error_new:3:c-format \
+ --flag=g_set_error:4:c-format \
+ --flag=g_markup_printf_escaped:1:c-format \
+ --flag=g_log:3:c-format \
+ --flag=g_print:1:c-format \
+ --flag=g_printerr:1:c-format \
+ --flag=g_printf:1:c-format \
+ --flag=g_fprintf:2:c-format \
+ --flag=g_sprintf:2:c-format \
+ --flag=g_snprintf:3:c-format \
+ --flag=g_scanner_error:2:c-format \
+ --flag=g_scanner_warn:2:c-format \
+ --files-from=$(srcdir)/POTFILES.in \
+ && test ! -f $(GETTEXT_PACKAGE).po \
+ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
+ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $$dir; \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
+ fi; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "glib"; then \
+ if test -r "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ done
+ if test "$(PACKAGE)" = "glib"; then \
+ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ fi
+
+check: all
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: update-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+# POTFILES is created from POTFILES.in by stripping comments, empty lines
+# and Intltool tags (enclosed in square brackets), and appending a full
+# relative path to them
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' \
+ -e "s/^\[.*\] +//" \
+ -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+Makefile: Makefile.in.in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
--- /dev/null
+# List of source files which contain translatable strings.
+src/modest-mail-operation.c
+src/modest-protocol-mgr.c
+src/modest-text-utils.c
+src/modest-widget-factory.c
+src/gtk/modest-account-view-window.c
+src/gtk/modest-account-assistant.c
+src/gtk/modest-edit-msg-window.c
+src/gtk/modest-transport-widget.c
+src/gtk/modest-store-widget.c
+src/widgets/modest-account-view.c
+src/widgets/modest-folder-view.c
+src/widgets/modest-header-view.c
+src/widgets/modest-msg-view.c
+src/widgets/modest-toolbar.c
--- /dev/null
+# English translations for modest package.
+# Copyright (C) 2006 THE modest'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the modest package.
+# <svillar@igalia.com>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: modest 0.0.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-11-10 11:37+0100\n"
+"PO-Revision-Date: 2006-11-09 20:16+0100\n"
+"Last-Translator: <svillar@igalia.com>\n"
+"Language-Team: English <en_gb@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ASCII\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../src/modest-mail-operation.c:188 ../src/modest-mail-operation.c:232
+msgid "Error trying to send a mail. Use a transport account"
+msgstr "Error trying to send a mail. Use a transport account"
+
+#: ../src/modest-mail-operation.c:223
+msgid "Error trying to send a mail. You need to set almost one a recipient"
+msgstr "Error trying to send a mail. You need to set almost one a recipient"
+
+#: ../src/modest-mail-operation.c:523
+#, fuzzy
+msgid "Error trying to update an account. Use a store account"
+msgstr "Error trying to send a mail. Use a transport account"
+
+#: ../src/modest-protocol-mgr.c:137
+msgid "Sendmail"
+msgstr "Sendmail"
+
+#: ../src/modest-protocol-mgr.c:142
+msgid "SMTP-server"
+msgstr "SMTP-server"
+
+#: ../src/modest-protocol-mgr.c:162
+msgid "POP3"
+msgstr "POP3"
+
+#: ../src/modest-protocol-mgr.c:167
+msgid "IMAP v4"
+msgstr "IMAP v4"
+
+#: ../src/modest-protocol-mgr.c:172
+msgid "Mbox"
+msgstr "Mbox"
+
+#: ../src/modest-protocol-mgr.c:177
+msgid "Maildir"
+msgstr "Maildir"
+
+#: ../src/modest-protocol-mgr.c:196 ../src/modest-protocol-mgr.c:227
+msgid "None"
+msgstr "None"
+
+#: ../src/modest-protocol-mgr.c:201
+msgid "TLS"
+msgstr "TLS"
+
+#: ../src/modest-protocol-mgr.c:206
+msgid "SSL"
+msgstr "SSL"
+
+#: ../src/modest-protocol-mgr.c:232
+msgid "Password"
+msgstr "Password"
+
+#: ../src/modest-text-utils.c:225
+#, c-format
+msgid "On %s, %s wrote:\n"
+msgstr "On %s, %s wrote:\n"
+
+#: ../src/modest-text-utils.c:302
+msgid "Re:"
+msgstr "Re:"
+
+#: ../src/modest-text-utils.c:316
+msgid "Fw:"
+msgstr "Fw:"
+
+#: ../src/modest-text-utils.c:340
+msgid "-----Original message-----"
+msgstr "-----Original message-----"
+
+#: ../src/modest-text-utils.c:341 ../src/gtk/modest-edit-msg-window.c:384
+msgid "From:"
+msgstr "From:"
+
+#: ../src/modest-text-utils.c:342
+msgid "Sent:"
+msgstr "Sent:"
+
+#: ../src/modest-text-utils.c:343
+msgid "To:"
+msgstr "To:"
+
+#: ../src/modest-text-utils.c:344 ../src/gtk/modest-edit-msg-window.c:389
+msgid "Subject:"
+msgstr "Subject:"
+
+#: ../src/modest-widget-factory.c:480
+#, c-format
+msgid "%d %s, %d unread"
+msgstr "%d %s, %d unread"
+
+#: ../src/modest-widget-factory.c:481
+msgid "item"
+msgstr "item"
+
+#: ../src/modest-widget-factory.c:481
+msgid "items"
+msgstr "items"
+
+#: ../src/modest-widget-factory.c:582
+#, c-format
+msgid "Opening %s..."
+msgstr "Opening %s..."
+
+#: ../src/modest-widget-factory.c:593
+#, c-format
+msgid "Opening attachment %d..."
+msgstr "Opening attachment %d..."
+
+#: ../src/modest-widget-factory.c:610
+msgid "Online"
+msgstr "Online"
+
+#: ../src/modest-widget-factory.c:610
+msgid "Offline"
+msgstr "Offline"
+
+#: ../src/modest-widget-factory.c:612
+msgid "Modest went online"
+msgstr "Modest went online"
+
+#: ../src/modest-widget-factory.c:612
+msgid "Modest went offline"
+msgstr "Modest went offline"
+
+#: ../src/modest-widget-factory.c:657
+#, c-format
+msgid "The %s you selected cannot be found"
+msgstr "The %s you selected cannot be found"
+
+#: ../src/modest-widget-factory.c:662
+msgid "Connection requested"
+msgstr "Connection requested"
+
+#: ../src/modest-widget-factory.c:671
+#, c-format
+msgid ""
+"This %s is not available in offline mode.\n"
+"Do you want to get online?"
+msgstr ""
+"This %s is not available in offline mode.\n"
+"Do you want to get online?"
+
+#: ../src/modest-widget-factory.c:694
+msgid "Password requested"
+msgstr "Password requested"
+
+#: ../src/modest-widget-factory.c:703
+#, c-format
+msgid "Please enter your password for %s"
+msgstr "Please enter your password for %s"
+
+#: ../src/gtk/modest-account-view-window.c:294
+msgid "Accounts"
+msgstr "Accounts"
+
+#: ../src/gtk/modest-account-assistant.c:128
+msgid ""
+"Welcome to the account assistant\n"
+"\n"
+"It will help to set up a new e-mail account\n"
+msgstr ""
+"Welcome to the account assistant\n"
+"\n"
+"It will help to set up a new e-mail account\n"
+
+#: ../src/gtk/modest-account-assistant.c:136
+msgid "Modest Account Assistant"
+msgstr "Modest Account Assistant"
+
+#: ../src/gtk/modest-account-assistant.c:196
+msgid ""
+"Please enter your name and your e-mail address below.\n"
+"\n"
+msgstr ""
+"Please enter your name and your e-mail address below.\n"
+"\n"
+
+#: ../src/gtk/modest-account-assistant.c:200
+msgid "Full name"
+msgstr "Full name"
+
+#: ../src/gtk/modest-account-assistant.c:202
+msgid "E-mail address"
+msgstr "E-mail address"
+
+#: ../src/gtk/modest-account-assistant.c:222
+msgid "Identity"
+msgstr "Identity"
+
+#: ../src/gtk/modest-account-assistant.c:264
+#: ../src/gtk/modest-account-assistant.c:336
+msgid "Please select among the following options"
+msgstr "Please select among the following options"
+
+#: ../src/gtk/modest-account-assistant.c:268
+#: ../src/gtk/modest-account-assistant.c:340
+msgid "Server type"
+msgstr "Server type"
+
+#: ../src/gtk/modest-account-assistant.c:288
+msgid "Receiving mail"
+msgstr "Receiving mail"
+
+#: ../src/gtk/modest-account-assistant.c:360
+msgid "Sending mail"
+msgstr "Sending mail"
+
+#: ../src/gtk/modest-account-assistant.c:381
+msgid "We're almost done. Press 'Apply' to store this new account"
+msgstr "We're almost done. Press 'Apply' to store this new account"
+
+#: ../src/gtk/modest-account-assistant.c:388
+msgid "Account name:"
+msgstr "Account name:"
+
+#: ../src/gtk/modest-account-assistant.c:397
+msgid "Account Management"
+msgstr "Account Management"
+
+#: ../src/gtk/modest-account-assistant.c:451
+msgid ""
+"Are you sure you want to cancel\n"
+"setting up a new account?"
+msgstr ""
+"Are you sure you want to cancel\n"
+"setting up a new account?"
+
+#: ../src/gtk/modest-account-assistant.c:454
+msgid "Cancel"
+msgstr "Cancel"
+
+#: ../src/gtk/modest-account-assistant.c:590
+msgid "Modest Account Wizard"
+msgstr "Modest Account Wizard"
+
+#: ../src/gtk/modest-edit-msg-window.c:371
+msgid "To..."
+msgstr "To..."
+
+#: ../src/gtk/modest-edit-msg-window.c:372
+msgid "Cc..."
+msgstr "Cc..."
+
+#: ../src/gtk/modest-edit-msg-window.c:373
+msgid "Bcc..."
+msgstr "Bcc..."
+
+#: ../src/gtk/modest-transport-widget.c:124
+msgid "<b>SMTP configuration</b>"
+msgstr "<b>SMTP configuration</b>"
+
+#: ../src/gtk/modest-transport-widget.c:130
+msgid "Servername: "
+msgstr "Servername: "
+
+#: ../src/gtk/modest-transport-widget.c:136
+msgid "Requires authentication"
+msgstr "Requires authentication"
+
+#: ../src/gtk/modest-transport-widget.c:140
+#: ../src/gtk/modest-store-widget.c:220
+msgid "<b>Security</b>"
+msgstr "<b>Security</b>"
+
+#: ../src/gtk/modest-transport-widget.c:145
+#: ../src/gtk/modest-store-widget.c:225
+msgid "Connection type:"
+msgstr "Connection type:"
+
+#: ../src/gtk/modest-transport-widget.c:155
+#: ../src/gtk/modest-store-widget.c:235
+msgid "Authentication:"
+msgstr "Authentication:"
+
+#: ../src/gtk/modest-transport-widget.c:161
+#: ../src/gtk/modest-store-widget.c:242
+msgid "Remember password"
+msgstr "Remember password"
+
+#: ../src/gtk/modest-store-widget.c:134
+msgid "<b>Maildir configuration</b>"
+msgstr "<b>Maildir configuration</b>"
+
+#: ../src/gtk/modest-store-widget.c:138
+msgid "Please select the path to your Maildir below"
+msgstr "Please select the path to your Maildir below"
+
+#: ../src/gtk/modest-store-widget.c:141
+msgid "Path:"
+msgstr "Path:"
+
+#: ../src/gtk/modest-store-widget.c:144 ../src/gtk/modest-store-widget.c:178
+msgid "(none)"
+msgstr "(none)"
+
+#: ../src/gtk/modest-store-widget.c:168
+msgid "<b>Mbox configuration</b>"
+msgstr "<b>Mbox configuration</b>"
+
+#: ../src/gtk/modest-store-widget.c:172
+msgid "Please select your mbox file below"
+msgstr "Please select your mbox file below"
+
+#: ../src/gtk/modest-store-widget.c:175
+msgid "mbox:"
+msgstr "mbox:"
+
+#: ../src/gtk/modest-store-widget.c:200
+msgid "<b>Server configuration</b>"
+msgstr "<b>Server configuration</b>"
+
+#: ../src/gtk/modest-store-widget.c:204
+msgid "Username:"
+msgstr "Username:"
+
+#: ../src/gtk/modest-store-widget.c:212
+msgid "Server:"
+msgstr "Server:"
+
+#: ../src/widgets/modest-account-view.c:269
+msgid "Enabled"
+msgstr "Enabled"
+
+#: ../src/widgets/modest-account-view.c:273
+msgid "Account"
+msgstr "Account"
+
+#: ../src/widgets/modest-account-view.c:278
+msgid "Type"
+msgstr "Type"
+
+#: ../src/widgets/modest-folder-view.c:178
+msgid "inbox"
+msgstr "inbox"
+
+#: ../src/widgets/modest-folder-view.c:181
+msgid "outbox"
+msgstr "outbox"
+
+#: ../src/widgets/modest-folder-view.c:184
+msgid "junk"
+msgstr "junk"
+
+#: ../src/widgets/modest-folder-view.c:187
+msgid "trash"
+msgstr "trash"
+
+#: ../src/widgets/modest-folder-view.c:190
+msgid "sent"
+msgstr "sent"
+
+#: ../src/widgets/modest-folder-view.c:195
+msgid "draft"
+msgstr "draft"
+
+#: ../src/widgets/modest-folder-view.c:198
+msgid "notes"
+msgstr "notes"
+
+#: ../src/widgets/modest-folder-view.c:201
+msgid "contacts"
+msgstr "contacts"
+
+#: ../src/widgets/modest-folder-view.c:204
+msgid "calendar"
+msgstr "calendar"
+
+#: ../src/widgets/modest-folder-view.c:293
+msgid "All Mail Folders"
+msgstr "All Mail Folders"
+
+#: ../src/widgets/modest-folder-view.c:405
+msgid "(empty)"
+msgstr "(empty)"
+
+#: ../src/widgets/modest-header-view.c:286
+#, c-format
+msgid "%X"
+msgstr "%X"
+
+#: ../src/widgets/modest-header-view.c:400
+msgid "M"
+msgstr "M"
+
+#: ../src/widgets/modest-header-view.c:408
+msgid "A"
+msgstr "A"
+
+#: ../src/widgets/modest-header-view.c:415
+msgid "Received"
+msgstr "Received"
+
+#: ../src/widgets/modest-header-view.c:422
+msgid "From"
+msgstr "From"
+
+#: ../src/widgets/modest-header-view.c:429
+msgid "To"
+msgstr "To"
+
+#: ../src/widgets/modest-header-view.c:436
+msgid "Header"
+msgstr "Header"
+
+#: ../src/widgets/modest-header-view.c:443
+msgid "Subject"
+msgstr "Subject"
+
+#: ../src/widgets/modest-header-view.c:451
+msgid "Sent"
+msgstr "Sent"
+
+#: ../src/widgets/modest-msg-view.c:398
+msgid "attachment"
+msgstr "attachment"
+
+#: ../src/widgets/modest-msg-view.c:411
+msgid "Attachments"
+msgstr "Attachments"
+
+#: ../src/widgets/modest-toolbar.c:124
+msgid "Send"
+msgstr "Send"
+
+#: ../src/widgets/modest-toolbar.c:125
+msgid "Send the current email message"
+msgstr "Send the current email message"
+
+#: ../src/widgets/modest-toolbar.c:129
+msgid "New mail"
+msgstr "New mail"
+
+#: ../src/widgets/modest-toolbar.c:130
+msgid "Compose a new email message"
+msgstr "Compose a new email message"
+
+#: ../src/widgets/modest-toolbar.c:134
+msgid "Send/Receive"
+msgstr "Send/Receive"
+
+#: ../src/widgets/modest-toolbar.c:135
+msgid "Send and receive messages"
+msgstr "Send and receive messages"
+
+#: ../src/widgets/modest-toolbar.c:139
+msgid "Reply"
+msgstr "Reply"
+
+#: ../src/widgets/modest-toolbar.c:140
+msgid "Reply to the selected email message"
+msgstr "Reply to the selected email message"
+
+#: ../src/widgets/modest-toolbar.c:144
+msgid "Reply all"
+msgstr "Reply all"
+
+#: ../src/widgets/modest-toolbar.c:145
+msgid "Reply to all people the selected email was sent to"
+msgstr "Reply to all people the selected email was sent to"
+
+#: ../src/widgets/modest-toolbar.c:149
+msgid "Forward"
+msgstr "Forward"
+
+#: ../src/widgets/modest-toolbar.c:150
+msgid "Forward the selected email"
+msgstr "Forward the selected email"
+
+#: ../src/widgets/modest-toolbar.c:154
+msgid "Delete"
+msgstr "Delete"
+
+#: ../src/widgets/modest-toolbar.c:155
+msgid "Delete the selected email message(s)"
+msgstr "Delete the selected email message(s)"
+
+#: ../src/widgets/modest-toolbar.c:159
+msgid "Next"
+msgstr "Next"
+
+#: ../src/widgets/modest-toolbar.c:160
+msgid "Move to the next message"
+msgstr "Move to the next message"
+
+#: ../src/widgets/modest-toolbar.c:164
+msgid "Previous"
+msgstr "Previous"
+
+#: ../src/widgets/modest-toolbar.c:165
+msgid "Move to the previous message"
+msgstr "Move to the previous message"
+
+#: ../src/widgets/modest-toolbar.c:169
+msgid "Stop"
+msgstr "Stop"
+
+#: ../src/widgets/modest-toolbar.c:170
+msgid "Stop whatever"
+msgstr "Stop whatever"
--- /dev/null
+# Galician translations for modest package.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# This file is distributed under the same license as the modest package.
+# <svillar@igalia.com>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: modest 0.0.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-11-10 11:37+0100\n"
+"PO-Revision-Date: 2006-11-08 18:32+0100\n"
+"Last-Translator: <svillar@igalia.com>\n"
+"Language-Team: Galician <gpul-traduccion@ceu.fi.udc.es>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ASCII\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/modest-mail-operation.c:188 ../src/modest-mail-operation.c:232
+msgid "Error trying to send a mail. Use a transport account"
+msgstr ""
+
+#: ../src/modest-mail-operation.c:223
+msgid "Error trying to send a mail. You need to set almost one a recipient"
+msgstr ""
+
+#: ../src/modest-mail-operation.c:523
+msgid "Error trying to update an account. Use a store account"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:137
+msgid "Sendmail"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:142
+msgid "SMTP-server"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:162
+msgid "POP3"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:167
+msgid "IMAP v4"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:172
+msgid "Mbox"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:177
+msgid "Maildir"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:196 ../src/modest-protocol-mgr.c:227
+msgid "None"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:201
+msgid "TLS"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:206
+msgid "SSL"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:232
+msgid "Password"
+msgstr ""
+
+#: ../src/modest-text-utils.c:225
+#, c-format
+msgid "On %s, %s wrote:\n"
+msgstr ""
+
+#: ../src/modest-text-utils.c:302
+msgid "Re:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:316
+msgid "Fw:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:340
+msgid "-----Original message-----"
+msgstr "-----Mensaxe orixinal-----"
+
+#: ../src/modest-text-utils.c:341 ../src/gtk/modest-edit-msg-window.c:384
+msgid "From:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:342
+msgid "Sent:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:343
+msgid "To:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:344 ../src/gtk/modest-edit-msg-window.c:389
+msgid "Subject:"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:480
+#, c-format
+msgid "%d %s, %d unread"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:481
+msgid "item"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:481
+msgid "items"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:582
+#, c-format
+msgid "Opening %s..."
+msgstr ""
+
+#: ../src/modest-widget-factory.c:593
+#, c-format
+msgid "Opening attachment %d..."
+msgstr ""
+
+#: ../src/modest-widget-factory.c:610
+msgid "Online"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:610
+msgid "Offline"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:612
+msgid "Modest went online"
+msgstr "Modest esta online"
+
+#: ../src/modest-widget-factory.c:612
+msgid "Modest went offline"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:657
+#, c-format
+msgid "The %s you selected cannot be found"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:662
+msgid "Connection requested"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:671
+#, c-format
+msgid ""
+"This %s is not available in offline mode.\n"
+"Do you want to get online?"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:694
+msgid "Password requested"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:703
+#, c-format
+msgid "Please enter your password for %s"
+msgstr ""
+
+#: ../src/gtk/modest-account-view-window.c:294
+msgid "Accounts"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:128
+msgid ""
+"Welcome to the account assistant\n"
+"\n"
+"It will help to set up a new e-mail account\n"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:136
+msgid "Modest Account Assistant"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:196
+msgid ""
+"Please enter your name and your e-mail address below.\n"
+"\n"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:200
+msgid "Full name"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:202
+msgid "E-mail address"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:222
+msgid "Identity"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:264
+#: ../src/gtk/modest-account-assistant.c:336
+msgid "Please select among the following options"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:268
+#: ../src/gtk/modest-account-assistant.c:340
+msgid "Server type"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:288
+msgid "Receiving mail"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:360
+msgid "Sending mail"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:381
+msgid "We're almost done. Press 'Apply' to store this new account"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:388
+msgid "Account name:"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:397
+msgid "Account Management"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:451
+msgid ""
+"Are you sure you want to cancel\n"
+"setting up a new account?"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:454
+msgid "Cancel"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:590
+msgid "Modest Account Wizard"
+msgstr ""
+
+#: ../src/gtk/modest-edit-msg-window.c:371
+msgid "To..."
+msgstr ""
+
+#: ../src/gtk/modest-edit-msg-window.c:372
+msgid "Cc..."
+msgstr ""
+
+#: ../src/gtk/modest-edit-msg-window.c:373
+msgid "Bcc..."
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:124
+msgid "<b>SMTP configuration</b>"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:130
+msgid "Servername: "
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:136
+msgid "Requires authentication"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:140
+#: ../src/gtk/modest-store-widget.c:220
+msgid "<b>Security</b>"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:145
+#: ../src/gtk/modest-store-widget.c:225
+msgid "Connection type:"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:155
+#: ../src/gtk/modest-store-widget.c:235
+msgid "Authentication:"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:161
+#: ../src/gtk/modest-store-widget.c:242
+msgid "Remember password"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:134
+msgid "<b>Maildir configuration</b>"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:138
+msgid "Please select the path to your Maildir below"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:141
+msgid "Path:"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:144 ../src/gtk/modest-store-widget.c:178
+msgid "(none)"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:168
+msgid "<b>Mbox configuration</b>"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:172
+msgid "Please select your mbox file below"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:175
+msgid "mbox:"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:200
+msgid "<b>Server configuration</b>"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:204
+msgid "Username:"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:212
+msgid "Server:"
+msgstr ""
+
+#: ../src/widgets/modest-account-view.c:269
+msgid "Enabled"
+msgstr ""
+
+#: ../src/widgets/modest-account-view.c:273
+msgid "Account"
+msgstr ""
+
+#: ../src/widgets/modest-account-view.c:278
+msgid "Type"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:178
+msgid "inbox"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:181
+msgid "outbox"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:184
+msgid "junk"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:187
+msgid "trash"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:190
+msgid "sent"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:195
+msgid "draft"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:198
+msgid "notes"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:201
+msgid "contacts"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:204
+msgid "calendar"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:293
+msgid "All Mail Folders"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:405
+msgid "(empty)"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:286
+#, c-format
+msgid "%X"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:400
+msgid "M"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:408
+msgid "A"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:415
+msgid "Received"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:422
+msgid "From"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:429
+msgid "To"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:436
+msgid "Header"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:443
+msgid "Subject"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:451
+msgid "Sent"
+msgstr ""
+
+#: ../src/widgets/modest-msg-view.c:398
+msgid "attachment"
+msgstr ""
+
+#: ../src/widgets/modest-msg-view.c:411
+msgid "Attachments"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:124
+msgid "Send"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:125
+msgid "Send the current email message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:129
+msgid "New mail"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:130
+msgid "Compose a new email message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:134
+msgid "Send/Receive"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:135
+msgid "Send and receive messages"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:139
+msgid "Reply"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:140
+msgid "Reply to the selected email message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:144
+msgid "Reply all"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:145
+msgid "Reply to all people the selected email was sent to"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:149
+msgid "Forward"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:150
+msgid "Forward the selected email"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:154
+msgid "Delete"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:155
+msgid "Delete the selected email message(s)"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:159
+msgid "Next"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:160
+msgid "Move to the next message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:164
+msgid "Previous"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:165
+msgid "Move to the previous message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:169
+msgid "Stop"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:170
+msgid "Stop whatever"
+msgstr ""
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-11-10 11:37+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"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/modest-mail-operation.c:188 ../src/modest-mail-operation.c:232
+msgid "Error trying to send a mail. Use a transport account"
+msgstr ""
+
+#: ../src/modest-mail-operation.c:223
+msgid "Error trying to send a mail. You need to set almost one a recipient"
+msgstr ""
+
+#: ../src/modest-mail-operation.c:523
+msgid "Error trying to update an account. Use a store account"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:137
+msgid "Sendmail"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:142
+msgid "SMTP-server"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:162
+msgid "POP3"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:167
+msgid "IMAP v4"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:172
+msgid "Mbox"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:177
+msgid "Maildir"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:196 ../src/modest-protocol-mgr.c:227
+msgid "None"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:201
+msgid "TLS"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:206
+msgid "SSL"
+msgstr ""
+
+#: ../src/modest-protocol-mgr.c:232
+msgid "Password"
+msgstr ""
+
+#: ../src/modest-text-utils.c:225
+#, c-format
+msgid "On %s, %s wrote:\n"
+msgstr ""
+
+#: ../src/modest-text-utils.c:302
+msgid "Re:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:316
+msgid "Fw:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:340
+msgid "-----Original message-----"
+msgstr ""
+
+#: ../src/modest-text-utils.c:341 ../src/gtk/modest-edit-msg-window.c:384
+msgid "From:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:342
+msgid "Sent:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:343
+msgid "To:"
+msgstr ""
+
+#: ../src/modest-text-utils.c:344 ../src/gtk/modest-edit-msg-window.c:389
+msgid "Subject:"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:480
+#, c-format
+msgid "%d %s, %d unread"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:481
+msgid "item"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:481
+msgid "items"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:582
+#, c-format
+msgid "Opening %s..."
+msgstr ""
+
+#: ../src/modest-widget-factory.c:593
+#, c-format
+msgid "Opening attachment %d..."
+msgstr ""
+
+#: ../src/modest-widget-factory.c:610
+msgid "Online"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:610
+msgid "Offline"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:612
+msgid "Modest went online"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:612
+msgid "Modest went offline"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:657
+#, c-format
+msgid "The %s you selected cannot be found"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:662
+msgid "Connection requested"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:671
+#, c-format
+msgid ""
+"This %s is not available in offline mode.\n"
+"Do you want to get online?"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:694
+msgid "Password requested"
+msgstr ""
+
+#: ../src/modest-widget-factory.c:703
+#, c-format
+msgid "Please enter your password for %s"
+msgstr ""
+
+#: ../src/gtk/modest-account-view-window.c:294
+msgid "Accounts"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:128
+msgid ""
+"Welcome to the account assistant\n"
+"\n"
+"It will help to set up a new e-mail account\n"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:136
+msgid "Modest Account Assistant"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:196
+msgid ""
+"Please enter your name and your e-mail address below.\n"
+"\n"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:200
+msgid "Full name"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:202
+msgid "E-mail address"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:222
+msgid "Identity"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:264
+#: ../src/gtk/modest-account-assistant.c:336
+msgid "Please select among the following options"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:268
+#: ../src/gtk/modest-account-assistant.c:340
+msgid "Server type"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:288
+msgid "Receiving mail"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:360
+msgid "Sending mail"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:381
+msgid "We're almost done. Press 'Apply' to store this new account"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:388
+msgid "Account name:"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:397
+msgid "Account Management"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:451
+msgid ""
+"Are you sure you want to cancel\n"
+"setting up a new account?"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:454
+msgid "Cancel"
+msgstr ""
+
+#: ../src/gtk/modest-account-assistant.c:590
+msgid "Modest Account Wizard"
+msgstr ""
+
+#: ../src/gtk/modest-edit-msg-window.c:371
+msgid "To..."
+msgstr ""
+
+#: ../src/gtk/modest-edit-msg-window.c:372
+msgid "Cc..."
+msgstr ""
+
+#: ../src/gtk/modest-edit-msg-window.c:373
+msgid "Bcc..."
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:124
+msgid "<b>SMTP configuration</b>"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:130
+msgid "Servername: "
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:136
+msgid "Requires authentication"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:140
+#: ../src/gtk/modest-store-widget.c:220
+msgid "<b>Security</b>"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:145
+#: ../src/gtk/modest-store-widget.c:225
+msgid "Connection type:"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:155
+#: ../src/gtk/modest-store-widget.c:235
+msgid "Authentication:"
+msgstr ""
+
+#: ../src/gtk/modest-transport-widget.c:161
+#: ../src/gtk/modest-store-widget.c:242
+msgid "Remember password"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:134
+msgid "<b>Maildir configuration</b>"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:138
+msgid "Please select the path to your Maildir below"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:141
+msgid "Path:"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:144 ../src/gtk/modest-store-widget.c:178
+msgid "(none)"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:168
+msgid "<b>Mbox configuration</b>"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:172
+msgid "Please select your mbox file below"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:175
+msgid "mbox:"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:200
+msgid "<b>Server configuration</b>"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:204
+msgid "Username:"
+msgstr ""
+
+#: ../src/gtk/modest-store-widget.c:212
+msgid "Server:"
+msgstr ""
+
+#: ../src/widgets/modest-account-view.c:269
+msgid "Enabled"
+msgstr ""
+
+#: ../src/widgets/modest-account-view.c:273
+msgid "Account"
+msgstr ""
+
+#: ../src/widgets/modest-account-view.c:278
+msgid "Type"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:178
+msgid "inbox"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:181
+msgid "outbox"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:184
+msgid "junk"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:187
+msgid "trash"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:190
+msgid "sent"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:195
+msgid "draft"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:198
+msgid "notes"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:201
+msgid "contacts"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:204
+msgid "calendar"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:293
+msgid "All Mail Folders"
+msgstr ""
+
+#: ../src/widgets/modest-folder-view.c:405
+msgid "(empty)"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:286
+#, c-format
+msgid "%X"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:400
+msgid "M"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:408
+msgid "A"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:415
+msgid "Received"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:422
+msgid "From"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:429
+msgid "To"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:436
+msgid "Header"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:443
+msgid "Subject"
+msgstr ""
+
+#: ../src/widgets/modest-header-view.c:451
+msgid "Sent"
+msgstr ""
+
+#: ../src/widgets/modest-msg-view.c:398
+msgid "attachment"
+msgstr ""
+
+#: ../src/widgets/modest-msg-view.c:411
+msgid "Attachments"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:124
+msgid "Send"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:125
+msgid "Send the current email message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:129
+msgid "New mail"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:130
+msgid "Compose a new email message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:134
+msgid "Send/Receive"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:135
+msgid "Send and receive messages"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:139
+msgid "Reply"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:140
+msgid "Reply to the selected email message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:144
+msgid "Reply all"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:145
+msgid "Reply to all people the selected email was sent to"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:149
+msgid "Forward"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:150
+msgid "Forward the selected email"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:154
+msgid "Delete"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:155
+msgid "Delete the selected email message(s)"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:159
+msgid "Next"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:160
+msgid "Move to the next message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:164
+msgid "Previous"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:165
+msgid "Move to the previous message"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:169
+msgid "Stop"
+msgstr ""
+
+#: ../src/widgets/modest-toolbar.c:170
+msgid "Stop whatever"
+msgstr ""
$(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
$(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
-I$(MODEST_PLATFORM_DIR) \
- -DPREFIX=\"@prefix@\"
+ -DPREFIX=\"@prefix@\" \
+ -DMODESTLOCALEDIR=\""$(modestlocaledir)"\"
BUILT_SOURCES = modest-marshal.c modest-marshal.h
modest-tny-stream-gtkhtml.c\
modest-tny-attachment.h\
modest-tny-attachment.c\
- modest-tny-store-actions.c\
- modest-tny-store-actions.h\
modest-ui.h \
modest-marshal.c \
modest-marshal.h \
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <glib/gi18n.h>
#include "modest-account-assistant.h"
#include "modest-store-widget.h"
#include "modest-transport-widget.h"
#define __MODEST_ACCOUNT_ASSISTANT_H__
#include <gtk/gtk.h>
-#include <glib/gi18n.h>
#include <modest-widget-factory.h>
#include <modest-account-mgr.h>
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <glib/gi18n.h>
#include "modest-account-view-window.h"
#include "modest-account-assistant.h"
#include "modest-tny-platform-factory.h"
#define __MODEST_ACCOUNT_VIEW_WINDOW_H__
#include <gtk/gtk.h>
-#include <glib/gi18n.h>
#include <modest-widget-factory.h>
G_BEGIN_DECLS
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
+#include <glib/gi18n.h>
+#include <tny-account-store.h>
#include "modest-edit-msg-window.h"
-#include <widgets/modest-msg-view.h>
-#include <modest-widget-memory.h>
-#include <modest-widget-factory.h>
-#include "modest-icon-names.h"
+#include "modest-widget-memory.h"
#include "modest-mail-operation.h"
#include "modest-tny-platform-factory.h"
+#include "modest-tny-msg-actions.h"
#include <tny-simple-list.h>
static void modest_edit_msg_window_class_init (ModestEditMsgWindowClass *klass);
gchar *body;
ModestEditMsgWindowPrivate *priv;
TnyTransportAccount *transport_account;
+ ModestMailOperation *mail_operation;
GtkTextBuffer *buf;
GtkTextIter b, e;
iter = tny_list_create_iterator(accounts);
tny_iterator_first (iter);
if (tny_iterator_is_done (iter)) {
+ /* FIXME: Add error handling through mail operation */
g_printerr("modest: no transport accounts defined\n");
- goto cleanup;
+ g_free (body);
+ return;
}
-
transport_account = TNY_TRANSPORT_ACCOUNT (tny_iterator_get_current(iter));
-
}
- /*****/
- modest_mail_operation_send_mail (transport_account,
- from, to, cc, bcc,
- subject, body, NULL);
-
- cleanup:
+ mail_operation = modest_mail_operation_new (TNY_ACCOUNT (transport_account));
+
+ modest_mail_operation_send_new_mail (mail_operation,
+ from, to, cc, bcc,
+ subject, body, NULL);
+ /* Clean up */
+ g_object_unref (mail_operation);
g_free (body);
}
GtkWidget*
modest_edit_msg_window_new (ModestWidgetFactory *factory,
- ModestEditType type, TnyMsgIface *msg)
+ ModestEditType type, TnyMsg *msg)
{
GObject *obj;
ModestEditMsgWindowPrivate *priv;
g_signal_connect (G_OBJECT(obj), "delete-event",
G_CALLBACK(on_delete_event), obj);
+ if (msg) {
+ /* Testing code. Should be into a set_msg method */
+ TnyHeader *header;
+ GtkTextBuffer *buf;
+
+ header = tny_msg_get_header (msg);
+ gtk_entry_set_text (GTK_ENTRY(priv->to_field),
+ tny_header_get_to (header));
+ gtk_entry_set_text (GTK_ENTRY(priv->cc_field),
+ tny_header_get_cc (header));
+ gtk_entry_set_text (GTK_ENTRY(priv->bcc_field),
+ tny_header_get_bcc (header));
+ gtk_entry_set_text (GTK_ENTRY(priv->subject_field),
+ tny_header_get_subject (header));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW(priv->msg_body));
+ gtk_text_buffer_set_text (buf,
+ (const gchar *) modest_tny_msg_actions_find_body (msg, FALSE),
+ -1);
+ }
+
return GTK_WIDGET (obj);
}
#include <gtk/gtk.h>
#include <tny-msg.h>
-#include <modest-conf.h>
-#include <modest-widget-factory.h>
-#include <glib/gi18n.h>
-
+#include "modest-conf.h"
+#include "modest-widget-factory.h"
G_BEGIN_DECLS
GtkWidget* modest_edit_msg_window_new (ModestWidgetFactory *factory,
ModestEditType type,
- TnyMsgIface *msg);
+ TnyMsg *msg);
G_END_DECLS
#endif /* __MODEST_EDIT_MSG_WINDOW_H__ */
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <glib/gi18n.h>
+#include <gtk/gtkaboutdialog.h>
+#include <gtk/gtktreeviewcolumn.h>
+
#include <modest-widget-memory.h>
#include <modest-icon-factory.h>
#include "modest-edit-msg-window.h"
#include "modest-icon-names.h"
#include "modest-tny-platform-factory.h"
+#include "modest-mail-operation.h"
/* 'private'/'protected' functions */
static void modest_main_window_class_init (ModestMainWindowClass *klass);
{
GtkWidget *msg_win;
ModestMainWindowPrivate *priv;
- ModestConf *conf;
- TnyAccountStore *account_store;
priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
- conf = modest_tny_platform_factory_get_modest_conf_instance (priv->factory);
- account_store = tny_platform_factory_new_account_store (priv->factory);
msg_win = modest_edit_msg_window_new (priv->widget_factory,
MODEST_EDIT_TYPE_NEW,
}
static void
+on_menu_reply_forward (ModestMainWindow *self, guint action, GtkWidget *widget)
+{
+ GtkWidget *msg_win;
+ ModestMainWindowPrivate *priv;
+ ModestHeaderView *header_view;
+ TnyList *header_list;
+ TnyIterator *iter;
+
+ priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
+
+ header_view = modest_widget_factory_get_header_view (priv->widget_factory);
+ header_list = modest_header_view_get_selected_headers (header_view);
+
+ if (header_list) {
+ iter = tny_list_create_iterator (header_list);
+ do {
+ TnyHeader *header;
+ TnyFolder *folder;
+ TnyMsg *msg, *new_msg;
+ ModestEditType edit_type;
+
+ /* Get msg from header */
+ header = TNY_HEADER (tny_iterator_get_current (iter));
+ folder = tny_header_get_folder (header);
+ msg = tny_folder_get_msg (folder, header);
+
+ /* FIXME: select proper action */
+ switch (action) {
+ case 1:
+ /* TODO: get reply type from config */
+ new_msg =
+ modest_mail_operation_create_reply_mail (msg,
+ MODEST_MAIL_OPERATION_REPLY_TYPE_CITE,
+ MODEST_MAIL_OPERATION_REPLY_MODE_SENDER);
+ edit_type = MODEST_EDIT_TYPE_REPLY;
+ break;
+ case 2:
+ /* TODO: get reply type from config */
+ new_msg =
+ modest_mail_operation_create_reply_mail (msg,
+ MODEST_MAIL_OPERATION_REPLY_TYPE_QUOTE,
+ MODEST_MAIL_OPERATION_REPLY_MODE_ALL);
+ edit_type = MODEST_EDIT_TYPE_REPLY;
+ break;
+ case 3:
+ /* TODO: get forward type from config */
+ new_msg =
+ modest_mail_operation_create_forward_mail (msg,
+ MODEST_MAIL_OPERATION_FORWARD_TYPE_INLINE);
+ edit_type = MODEST_EDIT_TYPE_FORWARD;
+ break;
+ }
+ /* Show edit window */
+ msg_win = modest_edit_msg_window_new (priv->widget_factory,
+ edit_type,
+ new_msg);
+ gtk_widget_show (msg_win);
+
+ /* Clean and go on */
+ g_object_unref (new_msg);
+ tny_iterator_next (iter);
+
+ } while (!tny_iterator_is_done (iter));
+ }
+}
+
+static void
on_menu_quit (ModestMainWindow *self, guint action, GtkWidget *widget)
{
save_sizes (self);
ModestHeaderViewColumn cols[] = {
MODEST_HEADER_VIEW_COLUMN_MSGTYPE,
MODEST_HEADER_VIEW_COLUMN_ATTACH,
- MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER
-/* MODEST_HEADER_VIEW_COLUMN_FROM, */
-/* MODEST_HEADER_VIEW_COLUMN_SUBJECT, */
-/* MODEST_HEADER_VIEW_COLUMN_RECEIVED_DATE */
+/* MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER, */
+ MODEST_HEADER_VIEW_COLUMN_FROM,
+ MODEST_HEADER_VIEW_COLUMN_SUBJECT,
+ MODEST_HEADER_VIEW_COLUMN_RECEIVED_DATE
};
priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
on_menu_new_message (self, 0, NULL);
break;
case MODEST_TOOLBAR_BUTTON_REPLY:
+ on_menu_reply_forward (self, 1, NULL);
break;
case MODEST_TOOLBAR_BUTTON_REPLY_ALL:
+ on_menu_reply_forward (self, 2, NULL);
break;
case MODEST_TOOLBAR_BUTTON_FORWARD:
+ on_menu_reply_forward (self, 3, NULL);
break;
case MODEST_TOOLBAR_BUTTON_SEND_RECEIVE:
#define __MODEST_MAIN_WINDOW_H__
#include <gtk/gtkwindow.h>
-#include <glib/gi18n.h>
#include <modest-widget-factory.h>
#ifdef HAVE_CONFIG_H
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <glib/gi18n.h>
#include "modest-store-widget.h"
#include <string.h>
#define __MODEST_STORE_WIDGET_H__
#include <gtk/gtk.h>
-#include <glib/gi18n.h>
#include <modest-widget-factory.h>
G_BEGIN_DECLS
/* insert (c)/licensing information) */
+#include <glib/gi18n.h>
#include "modest-transport-widget.h"
#include <string.h>
#include "modest-mail-operation.h"
/* include other impl specific header files */
#include <string.h>
+#include <stdarg.h>
#include <tny-mime-part.h>
+#include <tny-store-account.h>
+#include <tny-folder-store.h>
+#include <tny-folder-store-query.h>
+#include <glib/gi18n.h>
/* 'private'/'protected' functions */
static void modest_mail_operation_class_init (ModestMailOperationClass *klass);
static void modest_mail_operation_init (ModestMailOperation *obj);
static void modest_mail_operation_finalize (GObject *obj);
+
+#define MODEST_ERROR modest_error_quark ()
+
+typedef enum _ModestMailOperationErrorCode ModestMailOperationErrorCode;
+enum _ModestMailOperationErrorCode {
+ MODEST_MAIL_OPERATION_ERROR_BAD_ACCOUNT,
+ MODEST_MAIL_OPERATION_ERROR_MISSING_PARAMETER,
+
+ MODEST_MAIL_OPERATION_NUM_ERROR_CODES
+};
+
+static void set_error (ModestMailOperation *mail_operation,
+ ModestMailOperationErrorCode error_code,
+ const gchar *fmt, ...);
+static void status_update_cb (TnyFolder *folder, const gchar *what,
+ gint status, gpointer user_data);
+static void folder_refresh_cb (TnyFolder *folder, gboolean cancelled,
+ gpointer user_data);
+
/* list my signals */
enum {
/* MY_SIGNAL_1, */
typedef struct _ModestMailOperationPrivate ModestMailOperationPrivate;
struct _ModestMailOperationPrivate {
+ TnyAccount *account;
+ ModestMailOperationStatus status;
+ GError *error;
};
#define MODEST_MAIL_OPERATION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \
MODEST_TYPE_MAIL_OPERATION, \
ModestMailOperationPrivate))
+
+/* some utility functions */
+static char * get_content_type(const gchar *s);
+static gboolean is_ascii(const gchar *s);
+
/* globals */
static GObjectClass *parent_class = NULL;
static void
modest_mail_operation_init (ModestMailOperation *obj)
{
-/* initialize this object, eg.: */
-/* priv->frobnicate_mode = FALSE; */
+ ModestMailOperationPrivate *priv;
+
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE(obj);
+
+ priv->account = NULL;
+ priv->status = MODEST_MAIL_OPERATION_STATUS_INVALID;
+ priv->error = NULL;
}
static void
modest_mail_operation_finalize (GObject *obj)
{
-/* free/unref instance resources here */
+ ModestMailOperationPrivate *priv;
+
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE(obj);
+
+ if (priv->account) {
+ g_object_unref (priv->account);
+ priv->account = NULL;
+ }
+ if (priv->error) {
+ g_object_unref (priv->error);
+ priv->error = NULL;
+ }
+
G_OBJECT_CLASS(parent_class)->finalize (obj);
}
ModestMailOperation*
-modest_mail_operation_new (void)
+modest_mail_operation_new (TnyAccount *account)
{
- return MODEST_MAIL_OPERATION(g_object_new(MODEST_TYPE_MAIL_OPERATION, NULL));
-}
+ ModestMailOperation *mail_operation;
+ ModestMailOperationPrivate *priv;
+ mail_operation =
+ MODEST_MAIL_OPERATION(g_object_new(MODEST_TYPE_MAIL_OPERATION, NULL));
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE(mail_operation);
-static gboolean
-is_ascii(const gchar *s)
-{
- while (s[0]) {
- if (s[0] & 128 || s[0] < 32)
- return FALSE;
- s++;
- }
- return TRUE;
+ priv->account = g_object_ref (account);
+
+ return mail_operation;
}
-static char *
-get_content_type(const gchar *s)
+
+void
+modest_mail_operation_send_mail (ModestMailOperation *mail_operation,
+ TnyMsg* msg)
{
- GString *type;
-
- type = g_string_new("text/plain");
- if (!is_ascii(s)) {
- if (g_utf8_validate(s, -1, NULL)) {
- g_string_append(type, "; charset=\"utf-8\"");
- } else {
- /* it should be impossible to reach this, but better safe than sorry */
- g_warning("invalid utf8 in message");
- g_string_append(type, "; charset=\"latin1\"");
- }
+ ModestMailOperationPrivate *priv;
+ TnyTransportAccount *transport_account;
+
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE(mail_operation);
+
+ if (!TNY_IS_TRANSPORT_ACCOUNT (priv->account)) {
+ set_error (mail_operation,
+ MODEST_MAIL_OPERATION_ERROR_BAD_ACCOUNT,
+ _("Error trying to send a mail. Use a transport account"));
}
- return g_string_free(type, FALSE);
+
+ transport_account = TNY_TRANSPORT_ACCOUNT (priv->account);
+
+ mail_operation = modest_mail_operation_new (NULL);
+ tny_transport_account_send (transport_account, msg);
}
-ModestMailOperation*
-modest_mail_operation_send_mail (TnyTransportAccount *transport_account,
- const gchar *from,
- const gchar *to,
- const gchar *cc,
- const gchar *bcc,
- const gchar *subject,
- const gchar *body,
- const GList *attachments_list)
+void
+modest_mail_operation_send_new_mail (ModestMailOperation *mail_operation,
+ const gchar *from,
+ const gchar *to,
+ const gchar *cc,
+ const gchar *bcc,
+ const gchar *subject,
+ const gchar *body,
+ const GList *attachments_list)
{
- ModestMailOperation *mail_operation;
TnyMsg *new_msg;
TnyHeader *headers;
TnyStream *text_body_stream, *attachment_stream;
+ TnyTransportAccount *transport_account;
+ ModestMailOperationPrivate *priv;
ModestTnyAttachment *attachment;
GList *pos;
gchar *content_type;
const gchar *attachment_content_type;
const gchar *attachment_filename;
- /* TODO: better error handling management. Do it inside the
- ModestMailOperation, for example set operation state to
- failed or something like this and fill a GError with a
- short description */
- if (to == NULL || body == NULL)
- return NULL;
+ g_return_if_fail (mail_operation);
+
+ if (to == NULL) {
+ set_error (mail_operation,
+ MODEST_MAIL_OPERATION_ERROR_MISSING_PARAMETER,
+ _("Error trying to send a mail. You need to set almost one a recipient"));
+ return;
+ }
+
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE(mail_operation);
+
+ if (!TNY_IS_TRANSPORT_ACCOUNT (priv->account)) {
+ set_error (mail_operation,
+ MODEST_MAIL_OPERATION_ERROR_BAD_ACCOUNT,
+ _("Error trying to send a mail. Use a transport account"));
+ return;
+ }
+
+ transport_account = TNY_TRANSPORT_ACCOUNT (priv->account);
- mail_operation = modest_mail_operation_new ();
new_msg = TNY_MSG (tny_camel_msg_new ());
headers = TNY_HEADER (tny_camel_header_new ());
text_body_stream = TNY_STREAM (tny_camel_stream_new
tny_transport_account_send (transport_account, new_msg);
+ /* Clean */
g_object_unref (G_OBJECT(text_body_stream));
g_object_unref (G_OBJECT(headers));
g_object_unref (G_OBJECT(new_msg));
g_free(content_type);
+}
- return mail_operation;
+/**
+ * modest_mail_operation_create_forward_mail:
+ * @msg: a valid #TnyMsg instance
+ * @forward_type: the type of forwarded message
+ *
+ * creates a forwarded message from an existing one
+ *
+ * Returns: a new #TnyMsg, or NULL in case of error
+ **/
+TnyMsg*
+modest_mail_operation_create_forward_mail (TnyMsg *msg,
+ ModestMailOperationForwardType forward_type)
+{
+ TnyMsg *new_msg;
+ TnyHeader *new_header, *header;
+ TnyStream *attachment_stream;
+ gchar *new_subject, *new_body, *content_type, *quoted;
+ TnyList *parts;
+ TnyMimePart *text_body_part = NULL;
+ TnyStream *text_body_stream = NULL;
+
+ /* Create new objects */
+ new_msg = TNY_MSG (tny_camel_msg_new ());
+ new_header = TNY_HEADER (tny_camel_header_new ());
+
+ header = tny_msg_get_header (msg);
+
+ /* Fill the header */
+ tny_msg_set_header (new_msg, new_header);
+ /* FIXME: set it from default account, current account ... */
+ tny_header_set_from (new_header, "<me@home.org>");
+
+ /* Change the subject */
+ new_subject = (gchar *) modest_text_utils_create_forward_subject (tny_header_get_subject(header));
+ tny_header_set_subject (new_header, (const gchar *) new_subject);
+ g_free (new_subject);
+
+ /* Get body from original msg */
+ new_body = (gchar *) modest_tny_msg_actions_find_body (msg, FALSE);
+ if (!new_body) {
+ g_object_unref (new_msg);
+ return NULL;
+ }
+ content_type = get_content_type(new_body);
+
+ switch (forward_type) {
+ TnyMimePart *attachment_part;
+ gchar *inlined_text;
+
+ case MODEST_MAIL_OPERATION_FORWARD_TYPE_INLINE:
+ /* Prepend "Original message" text */
+ inlined_text = (gchar *)
+ modest_text_utils_create_inlined_text (tny_header_get_from (header),
+ tny_header_get_date_sent (header),
+ tny_header_get_to (header),
+ tny_header_get_subject (header),
+ (const gchar*) new_body);
+ g_free (new_body);
+ new_body = inlined_text;
+
+ /* Create the body */
+ text_body_stream = TNY_STREAM (tny_camel_stream_new
+ (camel_stream_mem_new_with_buffer
+ (new_body, strlen(new_body))));
+
+ text_body_part =
+ TNY_MIME_PART (tny_camel_mime_part_new (camel_mime_part_new()));
+ tny_stream_reset (text_body_stream);
+ tny_mime_part_construct_from_stream (text_body_part,
+ text_body_stream,
+ content_type);
+ tny_stream_reset (text_body_stream);
+
+ /* Add body part to msg */
+ tny_msg_add_part (new_msg, text_body_part);
+ break;
+ case MODEST_MAIL_OPERATION_FORWARD_TYPE_ATTACHMENT:
+ attachment_part = TNY_MIME_PART (tny_camel_mime_part_new (camel_mime_part_new()));
+
+ text_body_stream = TNY_STREAM (tny_camel_stream_new
+ (camel_stream_mem_new_with_buffer
+ (new_body, strlen(new_body))));
+
+ tny_mime_part_construct_from_stream (attachment_part,
+ text_body_stream,
+ content_type);
+ tny_stream_reset (attachment_stream);
+
+ /* Set the subject as the name of the attachment */
+ tny_mime_part_set_filename (attachment_part, tny_header_get_subject (header));
+
+ tny_msg_add_part (new_msg, attachment_part);
+ g_object_unref (G_OBJECT (attachment_part));
+ break;
+ }
+ /* TODO: attachments? */
+
+ /* Clean */
+ if (text_body_part) g_object_unref (G_OBJECT(text_body_part));
+ if (text_body_stream) g_object_unref (G_OBJECT(text_body_stream));
+ g_free (content_type);
+ g_free (new_body);
+
+ return new_msg;
+}
+
+/**
+ * modest_mail_operation_create_reply_mail:
+ * @msg: a valid #TnyMsg instance
+ * @reply_type: the format of the new message
+ * @reply_mode: the mode of reply, to the sender only, to a mail list or to all
+ *
+ * creates a new message to reply to an existing one
+ *
+ * Returns: Returns: a new #TnyMsg, or NULL in case of error
+ **/
+TnyMsg*
+modest_mail_operation_create_reply_mail (TnyMsg *msg,
+ ModestMailOperationReplyType reply_type,
+ ModestMailOperationReplyMode reply_mode)
+{
+ TnyMsg *new_msg;
+ TnyHeader *new_header, *header;
+ TnyStream *attachment_stream;
+ gchar *new_subject, *new_body, *content_type, *quoted;
+ TnyList *parts;
+ TnyMimePart *text_body_part;
+ TnyStream *text_body_stream;
+ gchar *my_email = NULL;
+
+ /* Create new objects */
+ new_msg = TNY_MSG (tny_camel_msg_new ());
+ new_header = TNY_HEADER (tny_camel_header_new ());
+
+ header = tny_msg_get_header (msg);
+
+ /* Fill the header */
+ tny_msg_set_header (new_msg, new_header);
+ tny_header_set_to (new_header, tny_header_get_from (header));
+ /* TODO: set "From:" from my current account */
+/* current_account = modest_account_mgr_get_current_account (account_mgr); */
+/* my_email = modest_account_mgr_get_string (account_mgr, */
+/* current_account, */
+/* MODEST_ACCOUNT_EMAIL, */
+/* FALSE, */
+/* NULL); */
+/* tny_header_set_from (new_header, email); */
+ my_email = g_strdup ("svillarsenin@terra.es");
+
+ switch (reply_mode) {
+ gchar *new_cc = NULL;
+ const gchar *cc = NULL, *bcc = NULL;
+ GString *tmp = NULL;
+
+ case MODEST_MAIL_OPERATION_REPLY_MODE_SENDER:
+ /* Do not fill neither cc nor bcc */
+ break;
+ case MODEST_MAIL_OPERATION_REPLY_MODE_LIST:
+ /* TODO */
+ break;
+ case MODEST_MAIL_OPERATION_REPLY_MODE_ALL:
+ /* Concatenate to, cc and bcc */
+ cc = tny_header_get_cc (header);
+ bcc = tny_header_get_bcc (header);
+
+ tmp = g_string_new (tny_header_get_to (header));
+ if (cc) g_string_append_printf (tmp, ",%s",cc);
+ if (bcc) g_string_append_printf (tmp, ",%s",bcc);
+
+ /* Remove my own address from the cc list */
+ new_cc = modest_text_utils_remove_mail_from_mail_list ((const gchar *) tmp->str,
+ (const gchar *) my_email);
+ /* FIXME: remove also the mails from the new To: */
+ tny_header_set_cc (new_header, new_cc);
+
+ /* Clean */
+ g_string_free (tmp, TRUE);
+ g_free (new_cc);
+ break;
+ }
+ g_free (my_email);
+
+ /* Change the subject */
+ new_subject = (gchar*) modest_text_utils_create_reply_subject (tny_header_get_subject(header));
+ tny_header_set_subject (new_header, (const gchar *) new_subject);
+ g_free (new_subject);
+
+ /* Get body from original msg */
+ new_body = (gchar*) modest_tny_msg_actions_find_body (msg, FALSE);
+ if (!new_body) {
+ g_object_unref (new_msg);
+ return NULL;
+ }
+ content_type = get_content_type(new_body);
+
+ switch (reply_type) {
+ gchar *cited_text;
+
+ case MODEST_MAIL_OPERATION_REPLY_TYPE_CITE:
+ /* Prepend "Original message" text */
+ cited_text = (gchar *) modest_text_utils_create_cited_text (tny_header_get_from (header),
+ tny_header_get_date_sent (header),
+ (const gchar*) new_body);
+ g_free (new_body);
+ new_body = cited_text;
+ break;
+ case MODEST_MAIL_OPERATION_REPLY_TYPE_QUOTE:
+ /* FIXME: replace 80 with a value from ModestConf */
+ quoted = (gchar*) modest_text_utils_quote (new_body,
+ tny_header_get_from (header),
+ tny_header_get_date_sent (header),
+ 80);
+ g_free (new_body);
+ new_body = quoted;
+ break;
+ }
+ /* Create the MIME part for the body */
+ text_body_stream = TNY_STREAM (tny_camel_stream_new
+ (camel_stream_mem_new_with_buffer
+ (new_body, strlen(new_body))));
+
+ text_body_part =
+ TNY_MIME_PART (tny_camel_mime_part_new (camel_mime_part_new()));
+ tny_stream_reset (text_body_stream);
+ tny_mime_part_construct_from_stream (text_body_part,
+ text_body_stream,
+ content_type);
+ tny_stream_reset (text_body_stream);
+
+ /* Add body part to msg */
+ tny_msg_add_part (new_msg, text_body_part);
+
+ /* TODO: attachments? */
+
+ /* Clean */
+ g_object_unref (G_OBJECT(text_body_part));
+ g_object_unref (G_OBJECT(text_body_stream));
+ g_free (content_type);
+ g_free (new_body);
+
+ return new_msg;
+}
+
+void
+modest_mail_operation_update_account (ModestMailOperation *mail_operation)
+{
+ TnyStoreAccount *storage_account;
+ ModestMailOperationPrivate *priv;
+ TnyList *folders;
+ TnyIterator *ifolders;
+ TnyFolder *cur_folder;
+ TnyFolderStoreQuery *query;
+
+ g_return_if_fail (mail_operation);
+ g_return_if_fail (MODEST_IS_MAIL_OPERATION (mail_operation));
+
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE(mail_operation);
+
+ /* Check that it is a store account */
+ if (!TNY_IS_STORE_ACCOUNT (priv->account)) {
+ set_error (mail_operation,
+ MODEST_MAIL_OPERATION_ERROR_BAD_ACCOUNT,
+ _("Error trying to update an account. Use a store account"));
+ return;
+ }
+ storage_account = TNY_STORE_ACCOUNT (priv->account);
+
+ /* Get subscribed folders */
+ folders = TNY_LIST (tny_simple_list_new ());
+ query = tny_folder_store_query_new ();
+ tny_folder_store_query_add_item (query, NULL, TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED);
+ tny_folder_store_get_folders (TNY_FOLDER_STORE (storage_account),
+ folders, NULL);
+ g_object_unref (query);
+
+ ifolders = tny_list_create_iterator (folders);
+
+ for (tny_iterator_first (ifolders);
+ !tny_iterator_is_done (ifolders);
+ tny_iterator_next (ifolders)) {
+
+ cur_folder = TNY_FOLDER (tny_iterator_get_current (ifolders));
+ tny_folder_refresh_async (cur_folder, folder_refresh_cb,
+ status_update_cb, mail_operation);
+ }
+
+ g_object_unref (ifolders);
+}
+
+ModestMailOperationStatus
+modest_mail_operation_get_status (ModestMailOperation *mail_operation)
+{
+ ModestMailOperationPrivate *priv;
+
+/* g_return_val_if_fail (mail_operation, MODEST_MAIL_OPERATION_STATUS_INVALID); */
+/* g_return_val_if_fail (MODEST_IS_MAIL_OPERATION (mail_operation), */
+/* MODEST_MAIL_OPERATION_STATUS_INVALID); */
+
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE (mail_operation);
+ return priv->status;
+}
+
+const GError *
+modest_mail_operation_get_error (ModestMailOperation *mail_operation)
+{
+ ModestMailOperationPrivate *priv;
+
+/* g_return_val_if_fail (mail_operation, NULL); */
+/* g_return_val_if_fail (MODEST_IS_MAIL_OPERATION (mail_operation), NULL); */
+
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE (mail_operation);
+ return priv->error;
+}
+
+void
+modest_mail_operation_cancel (ModestMailOperation *mail_operation)
+{
+ /* TODO */
+}
+
+static gboolean
+is_ascii(const gchar *s)
+{
+ while (s[0]) {
+ if (s[0] & 128 || s[0] < 32)
+ return FALSE;
+ s++;
+ }
+ return TRUE;
+}
+
+static char *
+get_content_type(const gchar *s)
+{
+ GString *type;
+
+ type = g_string_new("text/plain");
+ if (!is_ascii(s)) {
+ if (g_utf8_validate(s, -1, NULL)) {
+ g_string_append(type, "; charset=\"utf-8\"");
+ } else {
+ /* it should be impossible to reach this, but better safe than sorry */
+ g_warning("invalid utf8 in message");
+ g_string_append(type, "; charset=\"latin1\"");
+ }
+ }
+ return g_string_free(type, FALSE);
+}
+
+static GQuark
+modest_error_quark (void)
+{
+ static GQuark err_q = 0;
+
+ if (err_q == 0)
+ err_q = g_quark_from_static_string ("modest-error-quark");
+
+ return err_q;
+}
+
+
+static void
+set_error (ModestMailOperation *mail_operation,
+ ModestMailOperationErrorCode error_code,
+ const gchar *fmt, ...)
+{
+ ModestMailOperationPrivate *priv;
+ GError* error;
+ va_list args;
+ gchar* orig;
+
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE(mail_operation);
+
+ va_start (args, fmt);
+
+ orig = g_strdup_vprintf(fmt, args);
+ error = g_error_new (MODEST_ERROR, error_code, orig);
+
+ va_end (args);
+
+ if (priv->error)
+ g_object_unref (priv->error);
+
+ priv->error = error;
+ priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
+}
+
+static void
+status_update_cb (TnyFolder *folder, const gchar *what, gint status, gpointer user_data)
+{
+ /* TODO: update main window progress bar */
+}
+
+static void
+folder_refresh_cb (TnyFolder *folder, gboolean cancelled, gpointer user_data)
+{
+ if (cancelled) {
+ ModestMailOperation *mail_operation;
+ ModestMailOperationPrivate *priv;
+
+ mail_operation = MODEST_MAIL_OPERATION (user_data);
+ priv = MODEST_MAIL_OPERATION_GET_PRIVATE(mail_operation);
+
+ priv->status = MODEST_MAIL_OPERATION_STATUS_CANCELLED;
+ }
}
#ifndef __MODEST_MAIL_OPERATION_H__
#define __MODEST_MAIL_OPERATION_H__
-#include <glib-object.h>
#include <tny-transport-account.h>
-#include <modest-tny-attachment.h>
+#include "modest-tny-attachment.h"
/* other include files */
G_BEGIN_DECLS
typedef struct _ModestMailOperation ModestMailOperation;
typedef struct _ModestMailOperationClass ModestMailOperationClass;
+typedef enum _ModestMailOperationForwardType ModestMailOperationForwardType;
+typedef enum _ModestMailOperationReplyType ModestMailOperationReplyType;
+typedef enum _ModestMailOperationReplyMode ModestMailOperationReplyMode;
+typedef enum _ModestMailOperationStatus ModestMailOperationStatus;
+
+enum _ModestMailOperationForwardType {
+ MODEST_MAIL_OPERATION_FORWARD_TYPE_INLINE,
+ MODEST_MAIL_OPERATION_FORWARD_TYPE_ATTACHMENT
+};
+
+enum _ModestMailOperationReplyType {
+ MODEST_MAIL_OPERATION_REPLY_TYPE_CITE,
+ MODEST_MAIL_OPERATION_REPLY_TYPE_QUOTE
+};
+
+enum _ModestMailOperationReplyMode {
+ MODEST_MAIL_OPERATION_REPLY_MODE_SENDER,
+ MODEST_MAIL_OPERATION_REPLY_MODE_LIST,
+ MODEST_MAIL_OPERATION_REPLY_MODE_ALL
+};
+
+enum _ModestMailOperationStatus {
+ MODEST_MAIL_OPERATION_STATUS_INVALID,
+ MODEST_MAIL_OPERATION_STATUS_SUCCESS,
+ MODEST_MAIL_OPERATION_STATUS_FAILED,
+ MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS,
+ MODEST_MAIL_OPERATION_STATUS_CANCELLED
+};
+
struct _ModestMailOperation {
GObject parent;
/* insert public members, if any */
GType modest_mail_operation_get_type (void) G_GNUC_CONST;
/* typical parameter-less _new function */
-ModestMailOperation* modest_mail_operation_new (void);
+ModestMailOperation* modest_mail_operation_new (TnyAccount *account);
/* fill in other public functions, eg.: */
-ModestMailOperation* modest_mail_operation_send_mail (TnyTransportAccount *transport_account,
- const gchar *from,
- const gchar *to,
- const gchar *cc,
- const gchar *bcc,
- const gchar *subject,
- const gchar *body,
- const GList *attachments_list);
+void modest_mail_operation_send_mail (ModestMailOperation *mail_operation,
+ TnyMsg* msg);
+
+void modest_mail_operation_send_new_mail (ModestMailOperation *mail_operation,
+ const gchar *from,
+ const gchar *to,
+ const gchar *cc,
+ const gchar *bcc,
+ const gchar *subject,
+ const gchar *body,
+ const GList *attachments_list);
+
+TnyMsg* modest_mail_operation_create_forward_mail (TnyMsg *msg,
+ ModestMailOperationForwardType forward_type);
+
+TnyMsg* modest_mail_operation_create_reply_mail (TnyMsg *msg,
+ ModestMailOperationReplyType reply_type,
+ ModestMailOperationReplyMode reply_mode);
+
+void modest_mail_operation_update_account (ModestMailOperation *mail_operation);
+
+/* Functions to control mail operations */
+ModestMailOperationStatus modest_mail_operation_get_status (ModestMailOperation *mail_operation);
+
+const GError* modest_mail_operation_get_error (ModestMailOperation *mail_operation);
+
+void modest_mail_operation_cancel (ModestMailOperation *mail_operation);
G_END_DECLS
#include <tny-list.h>
#include <tny-simple-list.h>
+#include "config.h"
#include "modest-conf.h"
#include "modest-account-mgr.h"
#include "modest-ui.h"
#include "modest-icon-factory.h"
#include "modest-tny-account-store.h"
#include "modest-tny-platform-factory.h"
+#include "modest-mail-operation.h"
#ifdef MODEST_ENABLE_HILDON /* Hildon includes */
{ NULL, 0, 0, 0, NULL, NULL, NULL }
};
+ bindtextdomain (GETTEXT_PACKAGE, MODESTLOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
g_type_init ();
context = g_option_context_new (NULL);
ModestAccountMgr *acc_mgr = NULL;
TnyPlatformFactory *fact = NULL;
TnyAccountStore *acc_store = NULL;
+ ModestMailOperation *mail_operation;
TnyList *accounts = NULL;
TnyIterator *iter = NULL;
account = TNY_TRANSPORT_ACCOUNT (tny_iterator_get_current(iter));
- if (!modest_mail_operation_send_mail (account,
- "djcb@djcbsoftware.nl", mailto, cc, bcc, subject, body,
- NULL)) {
+ mail_operation = modest_mail_operation_new (TNY_ACCOUNT (account));
+
+ modest_mail_operation_send_new_mail (mail_operation,
+ "djcb@djcbsoftware.nl", mailto, cc, bcc,
+ subject, body, NULL);
+
+
+ if (modest_mail_operation_get_status (mail_operation) ==
+ MODEST_MAIL_OPERATION_STATUS_FAILED) {
retval = MODEST_ERR_SEND;
goto cleanup;
} else
retval = MODEST_ERR_NONE; /* hurray! */
cleanup:
- if (iter)
- g_object_unref (G_OBJECT(iter));
- if (accounts)
- g_object_unref (G_OBJECT(accounts));
-
+ if (iter) g_object_unref (G_OBJECT (iter));
+ if (accounts) g_object_unref (G_OBJECT (accounts));
+ if (mail_operation) g_object_unref (G_OBJECT (mail_operation));
+
return retval;
}
/* insert (c)/licensing information) */
-#include "modest-protocol-mgr.h"
+#include <glib/gi18n.h>
#include <string.h> /* strcmp */
+#include "modest-protocol-mgr.h"
#include <modest-pair.h>
/* include other impl specific header files */
#define __MODEST_PROTOCOL_MGR_H__
#include <glib-object.h>
-#include <glib/gi18n.h>
#include <modest-pair.h>
G_BEGIN_DECLS
#include <gtk/gtk.h>
#include <string.h>
#include <stdlib.h>
-
+#include <glib/gi18n.h>
#include "modest-text-utils.h"
return strftime(s, max, fmt, tm);
}
+static gchar *
+cite (const time_t sent_date, const gchar *from) {
+ gchar *str;
+ gchar sent_str[101];
+
+ /* format sent_date */
+ my_strftime (sent_str, 100, "%c", localtime (&sent_date));
+ return g_strdup_printf (N_("On %s, %s wrote:\n"), sent_str, from);
+}
+
gchar *
modest_text_utils_quote (const gchar * to_quote, const gchar * from,
{
const gchar *iter;
gint indent, breakpoint, rem_indent = 0;
- gchar sent_str[101];
GString *q, *l, *remaining;
gsize len;
+ gchar *tmp;
/* format sent_date */
- my_strftime (sent_str, 100, "%c", localtime (&sent_date));
- q = g_string_new ("");
- g_string_printf (q, "On %s, %s wrote:\n", sent_str, from);
+ tmp = cite (sent_date, from);
+ q = g_string_new (tmp);
+ g_free (tmp);
/* remaining will store the rest of the line if we have to break it */
remaining = g_string_new ("");
return g_string_free (q, FALSE);
}
+
+static gchar *
+create_derivated_subject (const gchar *subject, const gchar *prefix)
+{
+ gchar *tmp, *buffer;
+
+ if (!subject)
+ return g_strdup_printf ("%s ", prefix);
+
+ tmp = g_strchug (g_strdup (subject));
+
+ if (!strncmp (tmp, prefix, strlen (prefix))) {
+ return tmp;
+ } else {
+ g_free (tmp);
+ return g_strdup_printf ("%s %s", prefix, subject);
+ }
+}
+
+/**
+ * modest_text_utils_create_reply_subject:
+ * @subject:
+ *
+ * creates a new subject with a reply prefix if not present before
+ *
+ * Returns: a new subject with the reply prefix
+ **/
+gchar *
+modest_text_utils_create_reply_subject (const gchar *subject)
+{
+ return create_derivated_subject (subject, _("Re:"));
+}
+
+/**
+ * modest_text_utils_create_forward_subject:
+ * @subject:
+ *
+ * creates a new subject with a forward prefix if not present before
+ *
+ * Returns: a new subject with the forward prefix
+ **/
+gchar *
+modest_text_utils_create_forward_subject (const gchar *subject)
+{
+ return create_derivated_subject (subject, _("Fw:"));
+}
+
+gchar *
+modest_text_utils_create_cited_text (const gchar *from,
+ time_t sent_date,
+ const gchar *text)
+{
+ gchar *tmp, *retval;
+
+ tmp = cite (sent_date, from);
+ retval = g_strdup_printf ("%s%s\n", tmp, text);
+ g_free (tmp);
+
+ return retval;
+}
+
+/**
+ * modest_text_utils_create_inlined_text:
+ * @text: the original text
+ *
+ * creates a new string with the "Original message" text prepended to
+ * the text passed as argument and some data of the header
+ *
+ * Returns: a newly allocated text
+ **/
+gchar *
+modest_text_utils_create_inlined_text (const gchar *from,
+ time_t sent_date,
+ const gchar *to,
+ const gchar *subject,
+ const gchar *text)
+{
+ gchar sent_str[101];
+
+ my_strftime (sent_str, 100, "%c", localtime (&sent_date));
+
+ return g_strdup_printf ("%s\n%s %s\n%s %s\n%s %s\n%s %s\n\n%s",
+ _("-----Forwarded Message-----"),
+ _("From:"), from,
+ _("Sent:"), sent_str,
+ _("To:"), to,
+ _("Subject:"), subject,
+ text);
+}
+
+gchar *
+modest_text_utils_remove_mail_from_mail_list (const gchar *emails,
+ const gchar *email)
+{
+ char *dup, *token, *ptr, *result;
+ GString *filtered_emails;
+
+ if (!emails)
+ return NULL;
+
+ /* Search for substring */
+ if (!strstr ((const char *) emails, (const char *) email))
+ return g_strdup (emails);
+
+ dup = g_strdup (emails);
+ filtered_emails = g_string_new (NULL);
+
+ token = strtok_r (dup, ",", &ptr);
+
+ while (token != NULL) {
+ /* Add to list if not found */
+ if (!strstr ((const char *) token, (const char *) email)) {
+ if (G_UNLIKELY (filtered_emails->len) == 0)
+ g_string_append_printf (filtered_emails, "%s", token);
+ else
+ g_string_append_printf (filtered_emails, ",%s", token);
+ }
+ token = strtok_r (NULL, ",", &ptr);
+ }
+ result = filtered_emails->str;
+
+ /* Clean */
+ g_free (dup);
+ g_string_free (filtered_emails, FALSE);
+
+ return result;
+}
*
* Returns: a string containing the quoted message
*/
-gchar *
-modest_text_utils_quote(const gchar *buf,
+gchar* modest_text_utils_quote(const gchar *buf,
const gchar *from,
const time_t sent_date,
const int limit);
+gchar* modest_text_utils_create_reply_subject (const gchar *subject);
+
+gchar* modest_text_utils_create_forward_subject (const gchar *subject);
+
+gchar* modest_text_utils_create_cited_text (const gchar *from,
+ time_t sent_date,
+ const gchar *text);
+
+gchar* modest_text_utils_create_inlined_text (const gchar *from,
+ time_t sent_date,
+ const gchar *to,
+ const gchar *subject,
+ const gchar *text);
+
+gchar* modest_text_utils_remove_mail_from_mail_list (const gchar *emails,
+ const gchar *email);
#endif /* __MODEST_TEXT_UTILS_H__ */
#include <tny-store-account.h>
#include <tny-transport-account.h>
#include <tny-device.h>
-#include <tny-gnome-device.h>
#include <tny-account-store.h>
#include <tny-camel-transport-account.h>
#include <tny-camel-store-account.h>
priv->store_lock = g_mutex_new ();
- /* FIXME: don't use GNOME */
pfact = TNY_PLATFORM_FACTORY (modest_tny_platform_factory_get_instance());
if (!pfact) {
g_printerr ("modest: cannot create platform factory\n");
gchar *mime_type;
gchar *disposition;
gchar *content_id;
- TnyStreamIface *stream;
+ TnyStream *stream;
};
#define MODEST_TNY_ATTACHMENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \
MODEST_TYPE_TNY_ATTACHMENT, \
priv->mime_type = NULL;
}
-static TnyStreamIface *
+static TnyStream *
make_stream_from_file(const gchar * filename)
{
return NULL;
}
void
-modest_tny_attachment_set_stream(ModestTnyAttachment *self, TnyStreamIface *thing)
+modest_tny_attachment_set_stream(ModestTnyAttachment *self, TnyStream *thing)
{
ModestTnyAttachmentPrivate *priv;
ModestTnyAttachment *
-modest_tny_attachment_new_from_mime_part(TnyMimePartIface *part)
+modest_tny_attachment_new_from_mime_part(TnyMimePart *part)
{
return NULL;
}
ModestTnyAttachment *
-modest_tny_attachment_new_from_message(const TnyMsgIface *msg)
+modest_tny_attachment_new_from_message(const TnyMsg *msg)
{
return NULL;
}
#include "modest-tny-msg-actions.h"
#include "modest-text-utils.h"
-static gchar *
-quote_msg (TnyMsg* src, const gchar * from, time_t sent_date, gint limit)
+static const gchar *
+get_body_text (TnyMsg *msg, gboolean want_html)
{
TnyStream *stream;
TnyMimePart *body;
const gchar *to_quote;
gchar *quoted;
- body = modest_tny_msg_actions_find_body_part(src, FALSE);
+ body = modest_tny_msg_actions_find_body_part(msg, want_html);
if (!body)
return NULL;
gtk_text_buffer_get_bounds (buf, &start, &end);
to_quote = gtk_text_buffer_get_text (buf, &start, &end, FALSE);
- quoted = modest_text_utils_quote (to_quote, from, sent_date, limit);
g_object_unref (buf);
- return quoted;
+ return to_quote;
}
-
gchar*
modest_tny_msg_actions_quote (TnyMsg * self, const gchar * from,
time_t sent_date, gint limit,
const gchar * to_quote)
{
+ gchar *quoted_msg = NULL;
+ const gchar *body;
+
/* 2 cases: */
/* a) quote text from selection */
limit);
/* b) try to find a text/plain part in the msg and quote it */
- return quote_msg (self, from, sent_date, limit);
+ body = get_body_text (self, FALSE);
+ if (body)
+ quoted_msg = modest_text_utils_quote (body, from, sent_date, limit);
+
+ return quoted_msg;
}
return part;
}
+
+gchar *
+modest_tny_msg_actions_find_body (TnyMsg *msg, gboolean want_html)
+{
+ const gchar *body;
+
+ body = get_body_text (msg, want_html);
+
+ if (body)
+ return g_strdup (body);
+ else
+ return NULL;
+}
*
* Returns: the TnyMsgMimePart for the found part, or NULL if no matching part is foundi; must be unref'd
*/
-TnyMimePart * modest_tny_msg_actions_find_nth_part (TnyMsg *msg, gint index);
+TnyMimePart* modest_tny_msg_actions_find_nth_part (TnyMsg *msg, gint index);
+gchar* modest_tny_msg_actions_find_body (TnyMsg *self, gboolean want_html);
+
#endif /* __MODEST_TNY_MSG_ACTIONS_H__ */
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <glib/gi18n.h>
#include "modest-widget-factory.h"
#include <modest-protocol-mgr.h>
#include <tny-account-store.h>
/* folder view */
if (!(priv->folder_view =
- MODEST_FOLDER_VIEW(modest_folder_view_new (priv->account_store)))) {
+ MODEST_FOLDER_VIEW(modest_folder_view_new (MODEST_TNY_ACCOUNT_STORE (priv->account_store))))) {
g_printerr ("modest: cannot instantiate folder view\n");
return FALSE;
}
#ifndef __MODEST_WIDGET_FACTORY_H__
#define __MODEST_WIDGET_FACTORY_H__
-#include <glib-object.h>
-#include <glib/gi18n.h>
-#include <modest-account-mgr.h>
-#include <modest-tny-account-store.h>
-
-#include <widgets/modest-header-view.h>
-#include <widgets/modest-folder-view.h>
-#include <widgets/modest-msg-view.h>
-#include <widgets/modest-account-view.h>
-#include <widgets/modest-toolbar.h>
-#include <widgets/modest-combo-box.h>
+#include "modest-account-mgr.h"
+#include "modest-tny-account-store.h"
+#include "widgets/modest-header-view.h"
+#include "widgets/modest-folder-view.h"
+#include "widgets/modest-msg-view.h"
+#include "widgets/modest-account-view.h"
+#include "widgets/modest-toolbar.h"
+#include "widgets/modest-combo-box.h"
G_BEGIN_DECLS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <glib/gi18n.h>
#include "modest-account-view.h"
/* include other impl specific header files */
#define __MODEST_ACCOUNT_VIEW_H__
#include <gtk/gtk.h>
-#include <glib/gi18n.h>
#include <modest-account-mgr.h>
G_BEGIN_DECLS
TnyList *account_list;
GtkTreeModel *model, *sortable;
-
+
g_return_val_if_fail (account_store, FALSE);
priv = MODEST_FOLDER_VIEW_GET_PRIVATE(self);
priv->view_is_empty = TRUE;
tny_account_store_get_accounts (TNY_ACCOUNT_STORE(account_store),
- account_list,
- TNY_ACCOUNT_STORE_STORE_ACCOUNTS);
- if (account_list) { /* no store accounts found */
+ account_list,
+ TNY_ACCOUNT_STORE_STORE_ACCOUNTS);
+
+ if (account_list) {
sortable = gtk_tree_model_sort_new_with_model (model);
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sortable),
+ TNY_GTK_ACCOUNT_TREE_MODEL_NAME_COLUMN,
+ GTK_SORT_ASCENDING);
+
gtk_tree_view_set_model (GTK_TREE_VIEW(self), sortable);
- priv->view_is_empty = FALSE;
+ priv->view_is_empty = FALSE;
g_object_unref (model);
}
return TRUE;
-}
+}
static void
GtkTreeIter iter;
ModestFolderView *tree_view;
ModestFolderViewPrivate *priv;
+ gint type;
g_return_if_fail (sel);
g_return_if_fail (user_data);
tree_view = MODEST_FOLDER_VIEW (user_data);
- gtk_tree_model_get (model, &iter,
- TNY_GTK_ACCOUNT_TREE_MODEL_INSTANCE_COLUMN,
- &folder, -1);
-
- if (priv->cur_folder)
- tny_folder_expunge (priv->cur_folder);
- priv->cur_folder = folder;
-
- /* folder will not be defined if you click eg. on the root node */
- if (folder)
- g_signal_emit (G_OBJECT(tree_view), signals[FOLDER_SELECTED_SIGNAL], 0,
- folder);
+ gtk_tree_model_get (model, &iter,
+ TNY_GTK_ACCOUNT_TREE_MODEL_TYPE_COLUMN,
+ &type, -1);
+
+ if (type == TNY_FOLDER_TYPE_ROOT) {
+ g_message ("FOLDER ROOT");
+ } else {
+ gtk_tree_model_get (model, &iter,
+ TNY_GTK_ACCOUNT_TREE_MODEL_INSTANCE_COLUMN,
+ &folder, -1);
+
+ if (TNY_IS_FOLDER (folder)) {
+
+ if (priv->cur_folder)
+ tny_folder_expunge (priv->cur_folder);
+ priv->cur_folder = folder;
+
+
+ g_signal_emit (G_OBJECT(tree_view), signals[FOLDER_SELECTED_SIGNAL], 0,
+ folder);
+ }
+ }
}
*/
#include <glib/gi18n.h>
-#include "modest-header-view.h"
#include <tny-list.h>
+#include <tny-simple-list.h>
#include <string.h>
-#include <modest-marshal.h>
-#include <modest-icon-names.h>
+#include "modest-header-view.h"
+#include "modest-marshal.h"
+#include "modest-icon-names.h"
#include "modest-icon-factory.h"
static void modest_header_view_class_init (ModestHeaderViewClass *klass);
}
+TnyList *
+modest_header_view_get_selected_headers (ModestHeaderView *self)
+{
+ GtkTreeSelection *sel;
+ ModestHeaderViewPrivate *priv;
+ TnyList *header_list = NULL;
+ TnyHeader *header;
+ GList *list, *tmp = NULL;
+ GtkTreeModel *tree_model = NULL;
+ GtkTreeIter iter;
+
+ priv = MODEST_HEADER_VIEW_GET_PRIVATE(self);
+
+ /* Get selected rows */
+ sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
+ list = gtk_tree_selection_get_selected_rows (sel, &tree_model);
+
+ if (list) {
+ header_list = tny_simple_list_new();
+
+ list = g_list_reverse (list);
+ tmp = list;
+ while (tmp) {
+ /* Get Header from selection */
+ gtk_tree_model_get_iter (tree_model,
+ &iter,
+ (GtkTreePath *) (tmp->data));
+
+ gtk_tree_model_get (tree_model, &iter,
+ TNY_GTK_HEADER_LIST_MODEL_INSTANCE_COLUMN,
+ &header, -1);
+
+ /* Prepend to list */
+ tny_list_prepend (header_list, G_OBJECT (header));
+ tmp = g_list_next (tmp);
+ }
+ /* Clean up*/
+ g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
+ g_list_free (list);
+ }
+ return header_list;
+}
const GSList*
modest_header_view_get_columns (ModestHeaderView *self)
{
GtkTreeModel *model;
TnyHeader *header;
+ TnyHeaderFlags header_flags;
GtkTreeIter iter;
ModestHeaderView *self;
ModestHeaderViewPrivate *priv;
return;
}
- msg = tny_folder_get_message (TNY_FOLDER(folder),
- header);
+ msg = tny_folder_get_msg (TNY_FOLDER(folder),
+ header);
if (!msg) {
g_signal_emit (G_OBJECT(self), signals[ITEM_NOT_FOUND_SIGNAL], 0,
MODEST_ITEM_TYPE_MESSAGE);
msg);
/* mark message as seen; _set_flags crashes, bug in tinymail? */
- //flags = tny_header_get_flags (TNY_HEADER(header));
- //tny_header_set_flags (header, TNY_HEADER_FLAG_SEEN);
+ header_flags = tny_header_get_flags (TNY_HEADER(header));
+ tny_header_set_flags (header, header_flags | TNY_HEADER_FLAG_SEEN);
}
*/
ModestHeaderViewStyle modest_header_view_get_style (ModestHeaderView *self);
+TnyList* modest_header_view_get_selected_headers (ModestHeaderView *self);
+
G_END_DECLS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <glib/gi18n.h>
#include "modest-toolbar.h"
/* 'private'/'protected' functions */
g_printerr ("modest: error getting data for toolbar button %d\n",
button_id);
else {
- GtkWidget *icon;
- GtkToolItem *button;
- GdkPixbuf *pixbuf;
+ GtkWidget *icon = NULL;
+ GtkToolItem *button = NULL;
+ GdkPixbuf *pixbuf = NULL;
pixbuf = modest_icon_factory_get_icon_at_size (icon_name, 24, 24);
- icon = gtk_image_new_from_pixbuf ((GdkPixbuf*)pixbuf);
+ if (pixbuf)
+ icon = gtk_image_new_from_pixbuf ((GdkPixbuf*)pixbuf);
button = gtk_tool_button_new (icon, label);
g_object_set_data (G_OBJECT(button), "button_id",
GINT_TO_POINTER(button_id));
#define __MODEST_TOOLBAR_H__
#include <gtk/gtk.h>
-#include <glib/gi18n.h>
#include <modest-icon-factory.h>
#include <modest-icon-names.h>