* rename gtk2 => gtk
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 8 Aug 2006 09:32:29 +0000 (09:32 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 8 Aug 2006 09:32:29 +0000 (09:32 +0000)
* remove some unneeded code
* update build system

pmo-trunk-r468

148 files changed:
configure.ac
docs/reference/tmpl/modest-main-window.sgml
docs/reference/tmpl/modest-tny-account-store.sgml
src/Makefile.am
src/gtk/Makefile.am [new file with mode: 0644]
src/gtk/modest-account-assistant.c [new file with mode: 0644]
src/gtk/modest-account-assistant.h [new file with mode: 0644]
src/gtk/modest-account-view-window.c [new file with mode: 0644]
src/gtk/modest-account-view-window.h [new file with mode: 0644]
src/gtk/modest-edit-msg-window.c [new file with mode: 0644]
src/gtk/modest-edit-msg-window.h [new file with mode: 0644]
src/gtk/modest-icon-names.h [new file with mode: 0644]
src/gtk/modest-main-window.c [new file with mode: 0644]
src/gtk/modest-main-window.h [new file with mode: 0644]
src/gtk/modest-store-widget.c [new file with mode: 0644]
src/gtk/modest-store-widget.h [new file with mode: 0644]
src/gtk/modest-transport-widget.c [new file with mode: 0644]
src/gtk/modest-transport-widget.h [new file with mode: 0644]
src/gtk/modest-ui.c [new file with mode: 0644]
src/gtk/pixmaps/internet-mail.svg [new file with mode: 0644]
src/gtk/pixmaps/qgn_addr_icon_user_group.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_gene_attacpap.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_gene_fldr_clp.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_gene_fldr_cls.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_gene_fldr_exp.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_gene_fldr_opn.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_drafts.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_editor.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_high_unread.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_low_unread.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_signed.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_signed_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_signed_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_unread.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_inbox.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_deleted.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_high_unread.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_low_unread.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_signed_read.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_signed_read_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_signed_read_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_mail_unread.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_outbox.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_sent.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messagin_viewer.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messaging_high.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_list_messaging_low.png [new file with mode: 0644]
src/gtk/pixmaps/qgn_widg_datedit.png [new file with mode: 0644]
src/gtk2/Makefile.am [deleted file]
src/gtk2/modest-account-assistant.c [deleted file]
src/gtk2/modest-account-assistant.h [deleted file]
src/gtk2/modest-account-view-window.c [deleted file]
src/gtk2/modest-account-view-window.h [deleted file]
src/gtk2/modest-edit-msg-window.c [deleted file]
src/gtk2/modest-edit-msg-window.h [deleted file]
src/gtk2/modest-icon-names.h [deleted file]
src/gtk2/modest-main-window.c [deleted file]
src/gtk2/modest-main-window.h [deleted file]
src/gtk2/modest-store-widget.c [deleted file]
src/gtk2/modest-store-widget.h [deleted file]
src/gtk2/modest-transport-widget.c [deleted file]
src/gtk2/modest-transport-widget.h [deleted file]
src/gtk2/modest-ui.c [deleted file]
src/gtk2/pixmaps/internet-mail.svg [deleted file]
src/gtk2/pixmaps/qgn_addr_icon_user_group.png [deleted file]
src/gtk2/pixmaps/qgn_list_gene_attacpap.png [deleted file]
src/gtk2/pixmaps/qgn_list_gene_fldr_clp.png [deleted file]
src/gtk2/pixmaps/qgn_list_gene_fldr_cls.png [deleted file]
src/gtk2/pixmaps/qgn_list_gene_fldr_exp.png [deleted file]
src/gtk2/pixmaps/qgn_list_gene_fldr_opn.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_drafts.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_editor.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_high_unread.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_low_unread.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_signed.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_signed_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_signed_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_unread.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_inbox.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_deleted.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_high_unread.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_low_unread.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_signed_unread.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_signed_unread_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_signed_unread_low.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_mail_unread.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_outbox.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_sent.png [deleted file]
src/gtk2/pixmaps/qgn_list_messagin_viewer.png [deleted file]
src/gtk2/pixmaps/qgn_list_messaging_high.png [deleted file]
src/gtk2/pixmaps/qgn_list_messaging_low.png [deleted file]
src/gtk2/pixmaps/qgn_widg_datedit.png [deleted file]
src/modest-editor-window.c [deleted file]
src/modest-editor-window.h [deleted file]
src/modest-viewer-window.c [deleted file]
src/modest-viewer-window.h [deleted file]
src/widgets/Makefile.am
src/widgets/modest-msg-view.h

index 2514b8d..3d2e0c5 100644 (file)
@@ -1,5 +1,5 @@
 dnl configure.ac for modest 
-dnl Time-stamp: <2006-07-21 09:30:11 (djcb)>
+dnl Time-stamp: <2006-08-08 12:21:25 (djcb)>
 dnl written by Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
 
 AC_INIT([modest],[0.0.1],[http://maemo.org])
@@ -28,21 +28,26 @@ PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 gobject-2.0 gtk+-2.0 >= 2.6 gcon
 AC_SUBST(MODEST_GSTUFF_CFLAGS)
 AC_SUBST(MODEST_GSTUFF_LIBS)
 
-dnl now, determine what to build
+dnl dnl now, determine what to build
 AC_MSG_NOTICE([Determining what platform to build])
-PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_MAEMO,libosso,[with_platform=hildon],true)
+dnl PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_MAEMO,libosso,[with_platform=hildon],true)
 
 AC_ARG_WITH(platform,
 [--with-platform=gtk           platform to build for [gtk]],
 [case "${with_platform}" in
-      gtk)    MODEST_PLATFORM_DIR=gtk;;
-      gtk2)   MODEST_PLATFORM_DIR=gtk2;;
-      hildon) MODEST_PLATFORM_DIR=hildon;;
-      *)      MODEST_PLATFORM_DIR=${with_platform}
+       gtk)    MODEST_PLATFORM_DIR=gtk;;
+       hildon) MODEST_PLATFORM_DIR=hildon;;
+       *)      MODEST_PLATFORM_DIR=${with_platform}
 esac], [MODEST_PLATFORM_DIR=gtk
-       with_platform=gtk])
+               with_platform=gtk])
 AC_SUBST(MODEST_PLATFORM_DIR)
        
+dnl tempororily change hildon into gtk...
+if test "x$with_platform" = "xhildon"; then
+   AC_MSG_WARN([Hildon frontend is currently disabled])
+   with_platform="gtk"
+fi
+
 if test "x$with_platform" = "xhildon"; then
    PKG_CHECK_MODULES(MODEST_LIBTINYMAIL_MAEMO,libtinymail-maemo-1.0 hildon-libs hildon-lgpl libosso)
    AC_SUBST(MODEST_LIBTINYMAIL_MAEMO_CFLAGS)
@@ -53,16 +58,10 @@ else
    AC_SUBST(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)
 fi
 
-AM_CONDITIONAL(OLD_UI_STUFF, test x$with_platform != xgtk2)
-
 AC_OUTPUT([
 Makefile
 src/Makefile
 src/gtk/Makefile
-src/gtk2/Makefile
-src/hildon/Makefile
-src/hildon/com.nokia.modest.service
-src/hildon/modest.desktop.in
 src/widgets/Makefile
 docs/Makefile
 docs/reference/Makefile
index f3d5f71..b489dec 100644 (file)
@@ -29,8 +29,9 @@ ModestMainWindow
 
 </para>
 
-@factory: 
 @conf: 
+@account_mgr: 
+@factory: 
 @Returns: 
 
 
index a5337b1..940ec09 100644 (file)
@@ -29,7 +29,7 @@ ModestTnyAccountStore
 
 </para>
 
-@modest_acc_mgr: 
+@account_mgr: 
 @Returns: 
 
 
index b76016f..69a8ef5 100644 (file)
@@ -11,11 +11,6 @@ INCLUDES=\
        -I$(MODEST_PLATFORM_DIR) \
        -DPREFIX=\"@prefix@\" 
 
-if OLD_UI_STUFF
-INCLUDES +=\
-       -DOLD_UI_STUFF
-endif
-
 BUILT_SOURCES = modest-marshal.c modest-marshal.h
 
 modest-marshal.c: modest-marshal.list
@@ -40,8 +35,6 @@ modest_SOURCES=\
        modest-account-keys.h\
        modest-account-mgr.h\
        modest-account-mgr.c\
-       modest-window-mgr.h\
-       modest-window-mgr.c\
        modest-icon-factory.c\
        modest-icon-factory.h\
        modest-tny-account-store.h\
@@ -65,16 +58,6 @@ modest_SOURCES=\
        modest-marshal.c \
        modest-marshal.h 
 
-if OLD_UI_STUFF
-modest_SOURCES += \
-       modest-identity-keys.h\
-       modest-identity-mgr.h\
-       modest-identity-mgr.c\
-       modest-editor-window.c\
-       modest-editor-window.h\
-       modest-viewer-window.c\
-       modest-viewer-window.h
-endif
 
 modest_LDADD = \
        $(MODEST_GSTUFF_LIBS) \
diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am
new file mode 100644 (file)
index 0000000..7c914b2
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Makefile.am
+# Time-stamp: <2006-07-29 20:47:31 (djcb)>
+#
+#
+# use Automake 'trick' ==> convenience static libraries, which
+# won't be installed, just for linking
+#
+INCLUDES=\
+       $(MODEST_GSTUFF_CFLAGS) \
+       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
+       -I ${top_srcdir}/src  \
+       -DPREFIX=\"@prefix@\" \
+       -Wall
+
+noinst_LTLIBRARIES=\
+       libmodest-ui.la
+
+PIXMAP_FILES=\
+       pixmaps/*.png \
+       pixmaps/*.svg
+
+libmodest_ui_la_SOURCES=              \
+       modest-ui.c                   \
+       modest-icon-names.h           \
+       modest-main-window.h          \
+       modest-main-window.c          \
+       modest-account-view-window.c  \
+       modest-account-view-window.h  \
+       modest-account-assistant.c    \
+       modest-account-assistant.h    \
+       modest-edit-msg-window.c      \
+       modest-edit-msg-window.h      \
+       modest-transport-widget.c     \
+       modest-transport-widget.h     \
+       modest-store-widget.c         \
+       modest-store-widget.h
+
+LDADD = \
+       $(MODEST_GSTUFF_LIBS) \
+       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)
+
+EXTRA_DIST=pixmaps/*
+
+pixmapdir = $(prefix)/share/modest/pixmaps
+pixmap_DATA = $(PIXMAP_FILES)
diff --git a/src/gtk/modest-account-assistant.c b/src/gtk/modest-account-assistant.c
new file mode 100644 (file)
index 0000000..ddd89c9
--- /dev/null
@@ -0,0 +1,600 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "modest-account-assistant.h"
+#include "modest-store-widget.h"
+#include "modest-transport-widget.h"
+
+#include <string.h>
+
+/* 'private'/'protected' functions */
+static void       modest_account_assistant_class_init    (ModestAccountAssistantClass *klass);
+static void       modest_account_assistant_init          (ModestAccountAssistant *obj);
+static void       modest_account_assistant_finalize      (GObject *obj);
+
+/* list my signals */
+enum {
+       /* MY_SIGNAL_1, */
+       /* MY_SIGNAL_2, */
+       LAST_SIGNAL
+};
+
+typedef struct _ModestAccountAssistantPrivate ModestAccountAssistantPrivate;
+struct _ModestAccountAssistantPrivate {
+
+       ModestWidgetFactory *factory;
+       ModestAccountMgr *account_mgr;
+
+       GtkWidget *account_name;
+       GtkWidget *fullname;
+       GtkWidget *email;
+       
+       GtkWidget *store_widget;
+       GtkWidget *transport_widget;
+
+       GtkWidget *transport_holder;
+       GtkWidget *store_holder;        
+};
+
+#define MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
+                                                      MODEST_TYPE_ACCOUNT_ASSISTANT, \
+                                                      ModestAccountAssistantPrivate))
+/* globals */
+static GtkAssistantClass *parent_class = NULL;
+
+/* uncomment the following if you have defined any signals */
+/* static guint signals[LAST_SIGNAL] = {0}; */
+
+GType
+modest_account_assistant_get_type (void)
+{
+       static GType my_type = 0;
+       if (!my_type) {
+               static const GTypeInfo my_info = {
+                       sizeof(ModestAccountAssistantClass),
+                       NULL,           /* base init */
+                       NULL,           /* base finalize */
+                       (GClassInitFunc) modest_account_assistant_class_init,
+                       NULL,           /* class finalize */
+                       NULL,           /* class data */
+                       sizeof(ModestAccountAssistant),
+                       1,              /* n_preallocs */
+                       (GInstanceInitFunc) modest_account_assistant_init,
+               };
+               my_type = g_type_register_static (GTK_TYPE_ASSISTANT,
+                                                 "ModestAccountAssistant",
+                                                 &my_info, 0);
+       }
+       return my_type;
+}
+
+static void
+modest_account_assistant_class_init (ModestAccountAssistantClass *klass)
+{
+       GObjectClass *gobject_class;
+       gobject_class = (GObjectClass*) klass;
+
+       parent_class            = g_type_class_peek_parent (klass);
+       gobject_class->finalize = modest_account_assistant_finalize;
+
+       g_type_class_add_private (gobject_class, sizeof(ModestAccountAssistantPrivate));
+
+       /* signal definitions go here, e.g.: */
+/*     signals[MY_SIGNAL_1] = */
+/*             g_signal_new ("my_signal_1",....); */
+/*     signals[MY_SIGNAL_2] = */
+/*             g_signal_new ("my_signal_2",....); */
+/*     etc. */
+}
+
+
+
+static void
+add_intro_page (ModestAccountAssistant *assistant)
+{
+       GtkWidget *page, *label;
+       
+       page = gtk_vbox_new (FALSE, 6);
+       
+       label = gtk_label_new (
+               _("Welcome to the account assistant\n\n"
+                 "It will help to set up a new e-mail account\n"));
+       gtk_box_pack_start (GTK_BOX(page), label, FALSE, FALSE, 6);
+       gtk_widget_show_all (page);
+       
+       gtk_assistant_append_page (GTK_ASSISTANT(assistant), page);
+               
+       gtk_assistant_set_page_title (GTK_ASSISTANT(assistant), page,
+                                     _("Modest Account Assistant"));
+       gtk_assistant_set_page_type (GTK_ASSISTANT(assistant), page,
+                                    GTK_ASSISTANT_PAGE_INTRO);
+       gtk_assistant_set_page_complete (GTK_ASSISTANT(assistant),
+                                        page, TRUE);
+}
+
+
+static void
+set_current_page_complete (ModestAccountAssistant *self, gboolean complete)
+{
+       GtkWidget *page;
+       gint pageno;
+
+       pageno = gtk_assistant_get_current_page (GTK_ASSISTANT(self));
+       page   = gtk_assistant_get_nth_page (GTK_ASSISTANT(self), pageno);
+
+       gtk_assistant_set_page_complete (GTK_ASSISTANT(self), page, complete);
+}
+
+
+static void
+identity_page_update_completeness (GtkEditable *editable,
+                                  ModestAccountAssistant *self)
+{
+       ModestAccountAssistantPrivate *priv;
+       const gchar *txt;
+
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+
+       txt = gtk_entry_get_text (GTK_ENTRY(priv->fullname));
+       if (!txt || strlen(txt) == 0) {
+               set_current_page_complete (self, FALSE);
+               return;
+       }
+
+       /* FIXME: regexp check for email address */
+       txt = gtk_entry_get_text (GTK_ENTRY(priv->email));
+       if (!txt || strlen(txt) == 0) {
+               set_current_page_complete (self, FALSE);
+               return;
+       }
+       set_current_page_complete (self, TRUE);
+}
+
+
+static void
+add_identity_page (ModestAccountAssistant *self)
+{
+       GtkWidget *page, *label, *table;
+       ModestAccountAssistantPrivate *priv;
+
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+
+       priv->fullname = gtk_entry_new_with_max_length (40);
+       priv->email    = gtk_entry_new_with_max_length (40);
+       
+       page = gtk_vbox_new (FALSE, 6);
+
+       label = gtk_label_new (
+               _("Please enter your name and your e-mail address below.\n\n"));
+       gtk_box_pack_start (GTK_BOX(page), label, FALSE, FALSE, 6);
+       
+       table = gtk_table_new (2,2, FALSE);
+       gtk_table_attach_defaults (GTK_TABLE(table),gtk_label_new (_("Full name")),
+                                  0,1,0,1);
+       gtk_table_attach_defaults (GTK_TABLE(table),gtk_label_new (_("E-mail address")),
+                                  0,1,1,2);
+       gtk_table_attach_defaults (GTK_TABLE(table),priv->fullname,
+                                  1,2,0,1);
+       gtk_table_attach_defaults (GTK_TABLE(table),priv->email,
+                                  1,2,1,2);
+
+       g_signal_connect (G_OBJECT(priv->fullname), "changed",
+                         G_CALLBACK(identity_page_update_completeness),
+                         self);
+       g_signal_connect (G_OBJECT(priv->email), "changed",
+                         G_CALLBACK(identity_page_update_completeness),
+                         self);
+       
+       gtk_box_pack_start (GTK_BOX(page), table, FALSE, FALSE, 6);
+       gtk_widget_show_all (page);
+       
+       gtk_assistant_append_page (GTK_ASSISTANT(self), page);
+       
+       gtk_assistant_set_page_title (GTK_ASSISTANT(self), page,
+                                     _("Identity"));
+       gtk_assistant_set_page_type (GTK_ASSISTANT(self), page,
+                                    GTK_ASSISTANT_PAGE_INTRO);
+       gtk_assistant_set_page_complete (GTK_ASSISTANT(self),
+                                        page, FALSE);
+}      
+
+
+static void
+on_receiving_combo_box_changed (GtkComboBox *combo, ModestAccountAssistant *self)
+{
+       ModestAccountAssistantPrivate *priv;
+       gchar *chosen;
+       
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+       chosen = gtk_combo_box_get_active_text (GTK_COMBO_BOX(combo));
+
+       if (priv->store_widget)
+               gtk_container_remove (GTK_CONTAINER(priv->store_holder),
+                                     priv->store_widget);
+       
+       priv->store_widget = modest_store_widget_new (priv->factory, chosen);
+
+       gtk_container_add (GTK_CONTAINER(priv->store_holder),
+                          priv->store_widget);
+       
+       gtk_widget_show_all (priv->store_holder);
+       
+}      
+
+static void
+add_receiving_page (ModestAccountAssistant *self)
+{
+       GtkWidget *page, *box, *combo;
+
+       ModestAccountAssistantPrivate *priv;
+
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);      
+       page = gtk_vbox_new (FALSE, 6);
+
+       gtk_box_pack_start (GTK_BOX(page),
+                           gtk_label_new (
+                                   _("Please select among the following options")),
+                           FALSE, FALSE, 6);
+       box = gtk_hbox_new (FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(box),
+                           gtk_label_new(_("Server type")),
+                           FALSE,FALSE,6);
+
+       combo = modest_widget_factory_get_combo_box (priv->factory,
+                                                    MODEST_COMBO_BOX_TYPE_STORE_PROTOS);
+       g_signal_connect (G_OBJECT(combo), "changed",
+                         G_CALLBACK(on_receiving_combo_box_changed), self);
+
+       gtk_box_pack_start (GTK_BOX(box), combo, FALSE,FALSE,6);
+       gtk_box_pack_start (GTK_BOX(page), box, FALSE,FALSE, 6);
+       
+       gtk_box_pack_start (GTK_BOX(page), gtk_hseparator_new(), FALSE, FALSE, 0);
+
+       priv->store_holder = gtk_hbox_new (FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(page), priv->store_holder,
+                           TRUE, TRUE, 0);
+       
+       gtk_assistant_append_page (GTK_ASSISTANT(self), page);
+               
+       gtk_assistant_set_page_title (GTK_ASSISTANT(self), page,
+                                     _("Receiving mail"));
+       gtk_assistant_set_page_type (GTK_ASSISTANT(self), page,
+                                    GTK_ASSISTANT_PAGE_INTRO);
+       gtk_assistant_set_page_complete (GTK_ASSISTANT(self),
+                                        page, TRUE);
+       gtk_widget_show_all (page);
+}
+
+
+
+
+static void
+on_sending_combo_box_changed (GtkComboBox *combo, ModestAccountAssistant *self)
+{
+       ModestAccountAssistantPrivate *priv;
+       gchar *chosen;
+       
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+
+       chosen = gtk_combo_box_get_active_text (GTK_COMBO_BOX(combo));
+
+       if (priv->transport_widget)
+               gtk_container_remove (GTK_CONTAINER(priv->transport_holder),
+                                     priv->transport_widget);
+       
+       priv->transport_widget = modest_transport_widget_new (priv->factory,
+                                                             chosen);
+
+       gtk_container_add (GTK_CONTAINER(priv->transport_holder),
+                          priv->transport_widget);
+
+       gtk_widget_show_all (priv->transport_holder);
+}
+
+
+
+static void
+add_sending_page (ModestAccountAssistant *self)
+{
+       GtkWidget *page, *box, *combo;
+
+       ModestAccountAssistantPrivate *priv;
+
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+       page = gtk_vbox_new (FALSE, 6);
+       
+       gtk_box_pack_start (GTK_BOX(page),
+                           gtk_label_new (
+                                   _("Please select among the following options")),
+                           FALSE, FALSE, 0);
+       box = gtk_hbox_new (FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(box),
+                           gtk_label_new(_("Server type")),
+                           FALSE,FALSE,0);
+
+       combo = modest_widget_factory_get_combo_box (priv->factory,
+                                                    MODEST_COMBO_BOX_TYPE_TRANSPORT_PROTOS);
+       g_signal_connect (G_OBJECT(combo), "changed",
+                         G_CALLBACK(on_sending_combo_box_changed), self);
+
+       gtk_box_pack_start (GTK_BOX(box), combo, FALSE,FALSE,0);
+       gtk_box_pack_start (GTK_BOX(page), box, FALSE,FALSE, 0);
+       
+       gtk_box_pack_start (GTK_BOX(page), gtk_hseparator_new(), FALSE, FALSE, 0);
+
+       priv->transport_holder = gtk_hbox_new (FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(page), priv->transport_holder,
+                           FALSE, FALSE, 0);
+       
+       gtk_assistant_append_page (GTK_ASSISTANT(self), page);
+               
+       gtk_assistant_set_page_title (GTK_ASSISTANT(self), page,
+                                     _("Sending mail"));
+       gtk_assistant_set_page_type (GTK_ASSISTANT(self), page,
+                                    GTK_ASSISTANT_PAGE_INTRO);
+       gtk_assistant_set_page_complete (GTK_ASSISTANT(self),
+                                        page, TRUE);
+       gtk_widget_show_all (page);
+}
+
+
+
+static void
+add_final_page (ModestAccountAssistant *self)
+{
+       GtkWidget *page, *box;
+       ModestAccountAssistantPrivate *priv;
+
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+       page = gtk_vbox_new (FALSE, 6);
+       
+       gtk_box_pack_start (GTK_BOX(page),
+                           gtk_label_new (
+                                   _("We're almost done. Press 'Apply' to store this new account")),
+                           FALSE, FALSE, 6);
+       box = gtk_hbox_new (FALSE, 6);
+       priv->account_name =
+               gtk_entry_new_with_max_length (40);
+       gtk_entry_set_text (GTK_ENTRY(priv->account_name),
+                           gtk_entry_get_text(GTK_ENTRY(priv->email)));
+       gtk_box_pack_start (GTK_BOX(box),gtk_label_new(_("Account name:")),
+                           FALSE,FALSE,6);
+       gtk_box_pack_start (GTK_BOX(box),priv->account_name , FALSE,FALSE,6);
+       
+       gtk_box_pack_start (GTK_BOX(page), box, FALSE, FALSE, 6);
+       
+       gtk_assistant_append_page (GTK_ASSISTANT(self), page);
+               
+       gtk_assistant_set_page_title (GTK_ASSISTANT(self), page,
+                                     _("Account Management"));
+       gtk_assistant_set_page_type (GTK_ASSISTANT(self), page,
+                                    GTK_ASSISTANT_PAGE_CONFIRM);
+
+       gtk_assistant_set_page_complete (GTK_ASSISTANT(self),
+                                        page, TRUE);
+       gtk_widget_show_all (page);
+}
+       
+
+
+
+static void
+modest_account_assistant_init (ModestAccountAssistant *obj)
+{      
+       ModestAccountAssistantPrivate *priv;
+               
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(obj);       
+       priv->factory           = NULL;
+       priv->account_mgr       = NULL;
+
+       priv->store_widget      = NULL;
+       priv->transport_widget  = NULL;
+}
+
+static void
+modest_account_assistant_finalize (GObject *obj)
+{
+       ModestAccountAssistantPrivate *priv;
+               
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(obj);
+
+       if (priv->factory) {
+               g_object_unref (G_OBJECT(priv->factory));
+               priv->factory = NULL;
+       }
+       
+       if (priv->account_mgr) {
+               g_object_unref (G_OBJECT(priv->account_mgr));
+               priv->account_mgr = NULL;
+       }
+
+
+
+       G_OBJECT_CLASS(parent_class)->finalize (obj);
+}
+
+static void
+on_cancel (ModestAccountAssistant *self, gpointer user_data)
+{
+       GtkWidget *label;
+       GtkWidget *dialog;
+       int response;
+       
+       label = gtk_label_new (_("Are you sure you want to cancel\n"
+                                "setting up a new account?"));
+       
+       dialog = gtk_dialog_new_with_buttons (_("Cancel"),
+                                             GTK_WINDOW(self),
+                                             GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
+                                             GTK_STOCK_YES, GTK_RESPONSE_ACCEPT,
+                                             GTK_STOCK_NO,  GTK_RESPONSE_CANCEL,
+                                             NULL);
+       
+       gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                           label, FALSE, FALSE, 6);
+
+       gtk_widget_show_all ((GTK_DIALOG(dialog)->vbox));
+       
+       gtk_window_set_resizable (GTK_WINDOW(dialog), FALSE);
+       
+       response = gtk_dialog_run (GTK_DIALOG(dialog));
+       gtk_widget_destroy (dialog);
+
+       switch (response) {
+       case GTK_RESPONSE_ACCEPT:
+               /* close the assistant */
+               gtk_widget_destroy (GTK_WIDGET(self));
+               break;
+       case GTK_RESPONSE_CANCEL:
+               /* don't do anything */
+               break;
+       default: g_assert_not_reached ();
+
+       };                           
+}
+
+static const gchar*
+get_account_name (ModestAccountAssistant *self)
+{
+       ModestAccountAssistantPrivate *priv;
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+
+       return gtk_entry_get_text (GTK_ENTRY(priv->account_name));
+}
+
+static const gchar*
+get_fullname (ModestAccountAssistant *self)
+{
+       ModestAccountAssistantPrivate *priv;
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+
+       return gtk_entry_get_text (GTK_ENTRY(priv->fullname));
+}
+
+
+
+static const gchar*
+get_email (ModestAccountAssistant *self)
+{
+       ModestAccountAssistantPrivate *priv;
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+
+       return gtk_entry_get_text (GTK_ENTRY(priv->email));
+}
+
+
+
+static void
+on_apply (ModestAccountAssistant *self, gpointer user_data)
+{
+       ModestAccountAssistantPrivate *priv;
+       gchar *store_name;
+       const gchar *account_name;
+       ModestStoreWidget *store;
+
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+
+       /* create account */
+
+       /* create server account -> store */
+       store = MODEST_STORE_WIDGET(priv->store_widget);
+       store_name = g_strdup_printf ("%s:%s@%s",
+                                     modest_store_widget_get_proto (store),
+                                     modest_store_widget_get_username (store),
+                                     modest_store_widget_get_servername (store));
+       
+       modest_account_mgr_add_server_account (priv->account_mgr,
+                                               store_name,
+                                               modest_store_widget_get_servername (store),
+                                               modest_store_widget_get_username (store),
+                                               NULL,
+                                               modest_store_widget_get_proto (store));
+
+       /* create server account -> transport */
+       account_name = get_account_name (self);
+       modest_account_mgr_add_account (priv->account_mgr,
+                                       account_name,
+                                       store_name,
+                                       NULL, NULL);
+       modest_account_mgr_set_string (priv->account_mgr,
+                                      account_name,
+                                      MODEST_ACCOUNT_FULLNAME,
+                                      get_fullname(self), FALSE, NULL);
+       modest_account_mgr_set_string (priv->account_mgr,
+                                      account_name,
+                                      MODEST_ACCOUNT_EMAIL,
+                                      get_email(self), FALSE, NULL);
+       
+       g_free (store_name);
+}
+
+
+
+GtkWidget*
+modest_account_assistant_new (ModestAccountMgr *account_mgr, ModestWidgetFactory *factory)
+{
+       GObject *obj;
+       ModestAccountAssistant *self;
+       ModestAccountAssistantPrivate *priv;
+               
+       g_return_val_if_fail (factory, NULL);
+       g_return_val_if_fail (account_mgr, NULL);
+       
+       obj  = g_object_new(MODEST_TYPE_ACCOUNT_ASSISTANT, NULL);
+       self = MODEST_ACCOUNT_ASSISTANT(obj);
+
+       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
+       
+       g_object_ref (factory);
+       priv->factory = factory;
+       
+       g_object_ref (account_mgr);
+       priv->account_mgr = account_mgr;
+
+       add_intro_page (self);
+       add_identity_page (self); 
+       add_receiving_page (self); 
+       add_sending_page (self);
+       add_final_page (self);
+
+       gtk_assistant_set_current_page (GTK_ASSISTANT(self), 0);
+       gtk_window_set_title (GTK_WINDOW(self),
+                             _("Modest Account Wizard"));
+       gtk_window_set_resizable (GTK_WINDOW(self), TRUE);      
+       gtk_window_set_default_size (GTK_WINDOW(self), 400, 400);
+       
+       gtk_window_set_modal (GTK_WINDOW(self), TRUE);
+
+       g_signal_connect (G_OBJECT(self), "apply",
+                         G_CALLBACK(on_apply), NULL);
+       g_signal_connect (G_OBJECT(self), "cancel",
+                         G_CALLBACK(on_cancel), NULL);
+
+       return GTK_WIDGET(self);
+}
diff --git a/src/gtk/modest-account-assistant.h b/src/gtk/modest-account-assistant.h
new file mode 100644 (file)
index 0000000..9fce688
--- /dev/null
@@ -0,0 +1,72 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __MODEST_ACCOUNT_ASSISTANT_H__
+#define __MODEST_ACCOUNT_ASSISTANT_H__
+
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include <modest-widget-factory.h>
+#include <modest-account-mgr.h>
+
+G_BEGIN_DECLS
+
+/* standard convenience macros */
+#define MODEST_TYPE_ACCOUNT_ASSISTANT             (modest_account_assistant_get_type())
+#define MODEST_ACCOUNT_ASSISTANT(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_ACCOUNT_ASSISTANT,ModestAccountAssistant))
+#define MODEST_ACCOUNT_ASSISTANT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_ACCOUNT_ASSISTANT,ModestAccountAssistantClass))
+#define MODEST_IS_ACCOUNT_ASSISTANT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_ACCOUNT_ASSISTANT))
+#define MODEST_IS_ACCOUNT_ASSISTANT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_ACCOUNT_ASSISTANT))
+#define MODEST_ACCOUNT_ASSISTANT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_ACCOUNT_ASSISTANT,ModestAccountAssistantClass))
+
+typedef struct _ModestAccountAssistant      ModestAccountAssistant;
+typedef struct _ModestAccountAssistantClass ModestAccountAssistantClass;
+
+struct _ModestAccountAssistant {
+        GtkAssistant parent;
+       /* insert public members, if any */
+};
+
+struct _ModestAccountAssistantClass {
+       GtkAssistantClass parent_class;
+       /* insert signal callback declarations, eg. */
+       /* void (* my_event) (ModestAccountAssistant* obj); */
+};
+
+/* member functions */
+GType        modest_account_assistant_get_type    (void) G_GNUC_CONST;
+
+GtkWidget*    modest_account_assistant_new        (ModestAccountMgr* account_mgr,
+                                                  ModestWidgetFactory *factory);
+
+
+G_END_DECLS
+
+#endif /* __MODEST_ACCOUNT_ASSISTANT_H__ */
+
diff --git a/src/gtk/modest-account-view-window.c b/src/gtk/modest-account-view-window.c
new file mode 100644 (file)
index 0000000..0109396
--- /dev/null
@@ -0,0 +1,307 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "modest-account-view-window.h"
+#include "modest-account-assistant.h"
+
+/* 'private'/'protected' functions */
+static void                            modest_account_view_window_class_init   (ModestAccountViewWindowClass *klass);
+static void                            modest_account_view_window_init         (ModestAccountViewWindow *obj);
+static void                            modest_account_view_window_finalize     (GObject *obj);
+
+/* list my signals */
+enum {
+       /* MY_SIGNAL_1, */
+       /* MY_SIGNAL_2, */
+       LAST_SIGNAL
+};
+
+
+typedef struct _ModestAccountViewWindowPrivate ModestAccountViewWindowPrivate;
+struct _ModestAccountViewWindowPrivate {
+       ModestAccountMgr    *account_mgr;
+       ModestWidgetFactory *widget_factory;
+       GtkWidget           *edit_button, *remove_button;
+};
+#define MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
+                                                        MODEST_TYPE_ACCOUNT_VIEW_WINDOW, \
+                                                        ModestAccountViewWindowPrivate))
+/* globals */
+static GtkWindowClass *parent_class = NULL;
+
+/* uncomment the following if you have defined any signals */
+/* static guint signals[LAST_SIGNAL] = {0}; */
+
+GType
+modest_account_view_window_get_type (void)
+{
+       static GType my_type = 0;
+       if (!my_type) {
+               static const GTypeInfo my_info = {
+                       sizeof(ModestAccountViewWindowClass),
+                       NULL,           /* base init */
+                       NULL,           /* base finalize */
+                       (GClassInitFunc) modest_account_view_window_class_init,
+                       NULL,           /* class finalize */
+                       NULL,           /* class data */
+                       sizeof(ModestAccountViewWindow),
+                       1,              /* n_preallocs */
+                       (GInstanceInitFunc) modest_account_view_window_init,
+               };
+               my_type = g_type_register_static (GTK_TYPE_WINDOW,
+                                                 "ModestAccountViewWindow",
+                                                 &my_info, 0);
+       }
+       return my_type;
+}
+
+static void
+modest_account_view_window_class_init (ModestAccountViewWindowClass *klass)
+{
+       GObjectClass *gobject_class;
+       gobject_class = (GObjectClass*) klass;
+
+       parent_class            = g_type_class_peek_parent (klass);
+       gobject_class->finalize = modest_account_view_window_finalize;
+
+       g_type_class_add_private (gobject_class, sizeof(ModestAccountViewWindowPrivate));
+
+       /* signal definitions go here, e.g.: */
+/*     signals[MY_SIGNAL_1] = */
+/*             g_signal_new ("my_signal_1",....); */
+/*     signals[MY_SIGNAL_2] = */
+/*             g_signal_new ("my_signal_2",....); */
+/*     etc. */
+}
+
+static void
+modest_account_view_window_init (ModestAccountViewWindow *obj)
+{
+       ModestAccountViewWindowPrivate *priv;
+               
+       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(obj);
+
+       priv->account_mgr    = NULL;
+       priv->widget_factory = NULL;
+}
+
+static void
+modest_account_view_window_finalize (GObject *obj)
+{
+       ModestAccountViewWindowPrivate *priv;
+               
+       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(obj);
+
+       if (priv->account_mgr) {
+               g_object_unref (G_OBJECT(priv->account_mgr));
+               priv->account_mgr = NULL;
+       }
+       
+       if (priv->widget_factory) {
+               g_object_unref (G_OBJECT(priv->widget_factory));
+               priv->widget_factory = NULL;
+       }
+
+       G_OBJECT_CLASS(parent_class)->finalize (obj);
+}
+
+
+static void
+on_selection_changed (GtkTreeSelection *sel, ModestAccountViewWindow *self)
+{
+       ModestAccountViewWindowPrivate *priv;
+       GtkTreeModel                   *model;
+       GtkTreeIter                    iter;
+       gboolean                       has_selection;
+
+       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
+
+       has_selection =
+               gtk_tree_selection_get_selected (sel, &model, &iter);
+
+       gtk_widget_set_sensitive (priv->edit_button, has_selection);
+       gtk_widget_set_sensitive (priv->remove_button, has_selection);  
+}
+
+
+
+static void
+on_remove_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
+{
+       g_message (__FUNCTION__);
+}
+
+static void
+on_edit_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
+{
+       g_message (__FUNCTION__);
+}
+
+static void
+on_add_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
+{
+       GtkWidget *assistant;
+       ModestAccountViewWindowPrivate *priv;
+       
+       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
+
+       assistant = modest_account_assistant_new (priv->account_mgr,
+                                                 priv->widget_factory);
+       gtk_window_set_transient_for (GTK_WINDOW(assistant),
+                                     GTK_WINDOW(self));
+
+       gtk_widget_show (GTK_WIDGET(assistant));
+}
+
+
+static void
+on_close_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
+{
+       gtk_widget_destroy (GTK_WIDGET(self));
+}
+
+
+
+static GtkWidget*
+button_box_new (ModestAccountViewWindow *self)
+{
+
+       GtkWidget *button_box;
+       GtkWidget *add_button, *remove_button, *edit_button;
+       ModestAccountViewWindowPrivate *priv;
+       
+       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
+       
+       button_box   = gtk_vbutton_box_new ();
+
+       add_button    = gtk_button_new_from_stock(GTK_STOCK_ADD);
+       remove_button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
+       edit_button   = gtk_button_new_from_stock(GTK_STOCK_EDIT);
+
+       g_signal_connect (G_OBJECT(add_button), "clicked",
+                         G_CALLBACK(on_add_button_clicked),
+                         self);
+       g_signal_connect (G_OBJECT(remove_button), "clicked",
+                         G_CALLBACK(on_remove_button_clicked),
+                         self);
+       g_signal_connect (G_OBJECT(edit_button), "clicked",
+                         G_CALLBACK(on_edit_button_clicked),
+                         self);
+
+       gtk_box_pack_start (GTK_BOX(button_box), add_button, FALSE, FALSE,2);
+       gtk_box_pack_start (GTK_BOX(button_box), remove_button, FALSE, FALSE,2);
+       gtk_box_pack_start (GTK_BOX(button_box), edit_button, FALSE, FALSE,2);
+
+       gtk_widget_set_sensitive (edit_button, FALSE);
+       gtk_widget_set_sensitive (remove_button, FALSE);        
+
+       /* remember these, so we can deactivate them when nothing is
+        * selected */
+       priv->remove_button = remove_button;
+       priv->edit_button   = edit_button;
+       
+       return button_box;
+}
+
+
+static GtkWidget*
+window_vbox_new (ModestAccountViewWindow *self)
+{
+       ModestAccountViewWindowPrivate *priv;
+       GtkTreeSelection *sel;
+       GtkWidget *main_hbox, *main_vbox, *button_box;
+       GtkWidget *close_button;
+       GtkWidget *close_hbox;
+       ModestAccountView *account_view;
+
+       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
+
+       main_vbox     = gtk_vbox_new (FALSE, 6);
+       main_hbox     = gtk_hbox_new (FALSE, 6);
+       
+       account_view = modest_widget_factory_get_account_view (priv->widget_factory);
+       gtk_widget_set_size_request (GTK_WIDGET(account_view), 300, 400);
+
+       sel = gtk_tree_view_get_selection (GTK_TREE_VIEW(account_view));
+       g_signal_connect (G_OBJECT(sel), "changed",  G_CALLBACK(on_selection_changed),
+                         self);
+       
+       button_box = button_box_new (self);
+       
+       gtk_box_pack_start (GTK_BOX(main_hbox), GTK_WIDGET(account_view), TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX(main_hbox), button_box, FALSE, FALSE,2);
+
+       gtk_box_pack_start (GTK_BOX(main_vbox), main_hbox, TRUE, TRUE, 2);
+
+
+       close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+       g_signal_connect (G_OBJECT(close_button), "clicked",
+                         G_CALLBACK(on_close_button_clicked),
+                         self);
+       
+       close_hbox = gtk_hbox_new (FALSE, 2);
+       gtk_box_pack_end (GTK_BOX(close_hbox),
+                         close_button, FALSE, FALSE,2);
+       gtk_box_pack_end (GTK_BOX(main_vbox), close_hbox, FALSE, FALSE,2);
+
+       gtk_widget_show_all (main_vbox);
+       return main_vbox;
+}
+
+
+GtkWidget*
+modest_account_view_window_new (ModestAccountMgr *account_mgr, ModestWidgetFactory *factory)
+{
+       GObject *obj;
+       ModestAccountViewWindowPrivate *priv;
+
+       g_return_val_if_fail (account_mgr, NULL);
+       g_return_val_if_fail (factory, NULL);
+       
+       obj  = g_object_new(MODEST_TYPE_ACCOUNT_VIEW_WINDOW, NULL);
+       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(obj);
+
+       g_object_ref (G_OBJECT(account_mgr));
+       priv->account_mgr = account_mgr;
+       
+       g_object_ref (G_OBJECT(factory));
+       priv->widget_factory = factory;
+
+       gtk_window_set_resizable (GTK_WINDOW(obj), FALSE);
+
+       gtk_window_set_title (GTK_WINDOW(obj), _("Accounts"));
+       gtk_window_set_type_hint (GTK_WINDOW(obj), GDK_WINDOW_TYPE_HINT_DIALOG);
+       
+       gtk_window_set_modal (GTK_WINDOW(obj), TRUE);
+               
+       gtk_container_add (GTK_CONTAINER(obj),
+                          window_vbox_new (MODEST_ACCOUNT_VIEW_WINDOW(obj)));
+               
+       return GTK_WIDGET(obj);
+}
diff --git a/src/gtk/modest-account-view-window.h b/src/gtk/modest-account-view-window.h
new file mode 100644 (file)
index 0000000..8db09c4
--- /dev/null
@@ -0,0 +1,44 @@
+/* modest-account-view-window.h */
+/* insert (c)/licensing information) */
+
+#ifndef __MODEST_ACCOUNT_VIEW_WINDOW_H__
+#define __MODEST_ACCOUNT_VIEW_WINDOW_H__
+
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include <modest-widget-factory.h>
+
+G_BEGIN_DECLS
+
+/* convenience macros */
+#define MODEST_TYPE_ACCOUNT_VIEW_WINDOW             (modest_account_view_window_get_type())
+#define MODEST_ACCOUNT_VIEW_WINDOW(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_ACCOUNT_VIEW_WINDOW,ModestAccountViewWindow))
+#define MODEST_ACCOUNT_VIEW_WINDOW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_ACCOUNT_VIEW_WINDOW,GtkWindow))
+#define MODEST_IS_ACCOUNT_VIEW_WINDOW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_ACCOUNT_VIEW_WINDOW))
+#define MODEST_IS_ACCOUNT_VIEW_WINDOW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_ACCOUNT_VIEW_WINDOW))
+#define MODEST_ACCOUNT_VIEW_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_ACCOUNT_VIEW_WINDOW,ModestAccountViewWindowClass))
+
+typedef struct _ModestAccountViewWindow      ModestAccountViewWindow;
+typedef struct _ModestAccountViewWindowClass ModestAccountViewWindowClass;
+
+struct _ModestAccountViewWindow {
+        GtkWindow parent;
+       /* insert public members, if any */
+};
+
+struct _ModestAccountViewWindowClass {
+       GtkWindowClass parent_class;
+       /* insert signal callback declarations, eg. */
+       /* void (* my_event) (ModestAccountViewWindow* obj); */
+};
+
+/* member functions */
+GType        modest_account_view_window_get_type    (void) G_GNUC_CONST;
+
+GtkWidget*   modest_account_view_window_new         (ModestAccountMgr *account_mgr,
+                                                    ModestWidgetFactory *factory);
+
+G_END_DECLS
+
+#endif /* __MODEST_ACCOUNT_VIEW_WINDOW_H__ */
+
diff --git a/src/gtk/modest-edit-msg-window.c b/src/gtk/modest-edit-msg-window.c
new file mode 100644 (file)
index 0000000..468bf94
--- /dev/null
@@ -0,0 +1,376 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#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"
+
+static void  modest_edit_msg_window_class_init   (ModestEditMsgWindowClass *klass);
+static void  modest_edit_msg_window_init         (ModestEditMsgWindow *obj);
+static void  modest_edit_msg_window_finalize     (GObject *obj);
+
+/* list my signals */
+enum {
+       /* MY_SIGNAL_1, */
+       /* MY_SIGNAL_2, */
+       LAST_SIGNAL
+};
+
+typedef struct _ModestEditMsgWindowPrivate ModestEditMsgWindowPrivate;
+struct _ModestEditMsgWindowPrivate {
+
+       ModestConf *conf;
+       ModestWidgetFactory *factory;
+       
+       GtkWidget      *toolbar, *menubar;
+       GtkWidget      *msg_body;
+       GtkWidget      *to_field, *cc_field, *bcc_field,
+                      *subject_field;
+};
+#define MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
+                                                    MODEST_TYPE_EDIT_MSG_WINDOW, \
+                                                    ModestEditMsgWindowPrivate))
+/* globals */
+static GtkWindowClass *parent_class = NULL;
+
+/* uncomment the following if you have defined any signals */
+/* static guint signals[LAST_SIGNAL] = {0}; */
+
+GType
+modest_edit_msg_window_get_type (void)
+{
+       static GType my_type = 0;
+       if (!my_type) {
+               static const GTypeInfo my_info = {
+                       sizeof(ModestEditMsgWindowClass),
+                       NULL,           /* base init */
+                       NULL,           /* base finalize */
+                       (GClassInitFunc) modest_edit_msg_window_class_init,
+                       NULL,           /* class finalize */
+                       NULL,           /* class data */
+                       sizeof(ModestEditMsgWindow),
+                       1,              /* n_preallocs */
+                       (GInstanceInitFunc) modest_edit_msg_window_init,
+                       NULL
+               };
+               my_type = g_type_register_static (GTK_TYPE_WINDOW,
+                                                 "ModestEditMsgWindow",
+                                                 &my_info, 0);
+       }
+       return my_type;
+}
+
+static void
+modest_edit_msg_window_class_init (ModestEditMsgWindowClass *klass)
+{
+       GObjectClass *gobject_class;
+       gobject_class = (GObjectClass*) klass;
+
+       parent_class            = g_type_class_peek_parent (klass);
+       gobject_class->finalize = modest_edit_msg_window_finalize;
+
+       g_type_class_add_private (gobject_class, sizeof(ModestEditMsgWindowPrivate));
+
+       /* signal definitions go here, e.g.: */
+/*     signals[MY_SIGNAL_1] = */
+/*             g_signal_new ("my_signal_1",....); */
+/*     signals[MY_SIGNAL_2] = */
+/*             g_signal_new ("my_signal_2",....); */
+/*     etc. */
+}
+
+static void
+modest_edit_msg_window_init (ModestEditMsgWindow *obj)
+{
+       ModestEditMsgWindowPrivate *priv;
+       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(obj);
+
+       priv->factory = NULL;
+       priv->toolbar = NULL;
+       priv->menubar = NULL;
+               
+}
+
+
+
+
+
+
+/* Our menu, an array of GtkItemFactoryEntry structures that defines each menu item */
+static GtkItemFactoryEntry menu_items[] = {
+       { "/_File",             NULL,                   NULL,           0, "<Branch>" },
+       { "/File/_New",         "<control>N",           NULL,           0, "<StockItem>", GTK_STOCK_NEW },
+       { "/File/_Open",        "<control>O",           NULL,           0, "<StockItem>", GTK_STOCK_OPEN },
+       { "/File/_Save",        "<control>S",           NULL,           0, "<StockItem>", GTK_STOCK_SAVE },
+       { "/File/Save _As",     NULL,                   NULL,           0, "<Item>" },
+       { "/File/Save Draft",   "<control><shift>S",    NULL,           0, "<Item>" },
+
+
+       { "/File/sep1",         NULL,                   NULL,           0, "<Separator>" },
+       { "/File/_Quit",        "<CTRL>Q",              NULL,           0, "<StockItem>", GTK_STOCK_QUIT },
+
+       { "/_Edit",             NULL,                   NULL,           0, "<Branch>" },
+       { "/Edit/_Undo",        "<CTRL>Z",              NULL,           0, "<StockItem>", GTK_STOCK_UNDO },
+       { "/Edit/_Redo",        "<shift><CTRL>Z",       NULL,           0, "<StockItem>", GTK_STOCK_REDO },
+       { "/File/sep1",         NULL,                   NULL,           0, "<Separator>" },
+       { "/Edit/Cut",          "<control>X",           NULL,           0, "<StockItem>", GTK_STOCK_CUT  },
+       { "/Edit/Copy",         "<CTRL>C",              NULL,           0, "<StockItem>", GTK_STOCK_COPY },
+       { "/Edit/Paste",        NULL,                   NULL,           0, "<StockItem>", GTK_STOCK_PASTE},
+       { "/Edit/sep1",         NULL,                   NULL,           0, "<Separator>" },
+       { "/Edit/Delete",       "<CTRL>Q",              NULL,           0, "<Item>" },
+       { "/Edit/Select all",   "<CTRL>A",              NULL,           0, "<Item>" },
+       { "/Edit/Deselect all",  "<Shift><CTRL>A",      NULL,           0, "<Item>" },
+
+       { "/_View",             NULL,           NULL,           0, "<Branch>" },
+       { "/View/To-field",          NULL,              NULL,           0, "<Item>" },
+       
+       { "/View/Cc-field:",          NULL,             NULL,           0, "<Item>" },
+       { "/View/Bcc-field:",          NULL,            NULL,           0, "<Item>" },
+       
+       
+       { "/_Insert",             NULL,         NULL,           0, "<Branch>" },
+/*     { "/Actions/_Reply",    NULL,                   NULL,           0, "<Item>" }, */
+/*     { "/Actions/_Forward",  NULL,                   NULL,           0, "<Item>" }, */
+/*     { "/Actions/_Bounce",   NULL,                   NULL,           0, "<Item>" },   */
+       
+       { "/_Format",            NULL,                  NULL,           0, "<Branch>" }
+/*     { "/Options/_Accounts",  NULL,                  on_menu_accounts,0, "<Item>" }, */
+/*     { "/Options/_Contacts",  NULL,                  NULL,           0, "<Item>" }, */
+
+
+/*     { "/_Help",         NULL,                       NULL,           0, "<Branch>" }, */
+/*     { "/_Help/About",   NULL,                       on_menu_about,  0, "<StockItem>", GTK_STOCK_ABOUT}, */
+};
+
+static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
+
+
+static GtkWidget *
+menubar_new (ModestEditMsgWindow *self)
+{
+       GtkItemFactory *item_factory;
+       GtkAccelGroup *accel_group;
+       
+       /* Make an accelerator group (shortcut keys) */
+       accel_group = gtk_accel_group_new ();
+       
+       /* Make an ItemFactory (that makes a menubar) */
+       item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>",
+                                            accel_group);
+       
+       /* This function generates the menu items. Pass the item factory,
+          the number of items in the array, the array itself, and any
+          callback data for the the menu items. */
+       gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, self);
+       
+       ///* Attach the new accelerator group to the window. */
+       gtk_window_add_accel_group (GTK_WINDOW (self), accel_group);
+       
+       /* Finally, return the actual menu bar created by the item factory. */
+       return gtk_item_factory_get_widget (item_factory, "<main>");
+}
+
+
+
+static void
+on_toolbar_button_clicked (ModestToolbar *toolbar, ModestToolbarButton button_id,
+                          ModestEditMsgWindow *self)
+{
+       switch (button_id) {
+       case MODEST_TOOLBAR_BUTTON_MAIL_SEND:
+               g_warning ("send the mail!");
+               gtk_widget_destroy (GTK_WIDGET(self));
+               break;
+               
+       case MODEST_TOOLBAR_BUTTON_REPLY:
+       case MODEST_TOOLBAR_BUTTON_REPLY_ALL:
+       case MODEST_TOOLBAR_BUTTON_FORWARD:
+       case MODEST_TOOLBAR_BUTTON_SEND_RECEIVE:
+       case MODEST_TOOLBAR_BUTTON_NEXT:
+       case MODEST_TOOLBAR_BUTTON_PREV:
+       case MODEST_TOOLBAR_BUTTON_DELETE:
+
+       default:
+               g_printerr ("modest: key %d pressed\n", button_id);
+       }
+}
+
+
+
+
+static ModestToolbar*
+toolbar_new (ModestEditMsgWindow *self)
+{
+       int i;
+       ModestToolbar *toolbar;
+       GSList *buttons = NULL;
+       ModestEditMsgWindowPrivate *priv;
+
+       ModestToolbarButton button_ids[] = {
+               MODEST_TOOLBAR_BUTTON_MAIL_SEND
+       };              
+       
+       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(self);
+
+       for (i = 0 ; i != sizeof(button_ids) / sizeof(ModestToolbarButton); ++i)
+               buttons = g_slist_append (buttons, GINT_TO_POINTER(button_ids[i]));
+       
+       toolbar = modest_widget_factory_get_edit_toolbar (priv->factory, buttons);
+       g_slist_free (buttons);
+
+       g_signal_connect (G_OBJECT(toolbar), "button_clicked",
+                         G_CALLBACK(on_toolbar_button_clicked), self);
+       
+       return toolbar;
+}
+
+
+static void
+init_window (ModestEditMsgWindow *obj)
+{
+       GtkWidget *to_button, *cc_button, *bcc_button, *subject_label; 
+       GtkWidget *header_table;
+       GtkWidget *main_vbox;
+       
+       ModestEditMsgWindowPrivate *priv;
+       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(obj);
+
+       to_button     = gtk_button_new_with_label (_("To..."));
+       cc_button     = gtk_button_new_with_label (_("Cc..."));
+       bcc_button    = gtk_button_new_with_label (_("Bcc..."));
+       subject_label = gtk_label_new (_("Subject:"));
+       
+       priv->to_field      = gtk_entry_new_with_max_length (40);
+       priv->cc_field      = gtk_entry_new_with_max_length (40);
+       priv->bcc_field     = gtk_entry_new_with_max_length (40);
+       priv->subject_field = gtk_entry_new_with_max_length (40);
+
+       header_table = gtk_table_new (4,2, FALSE);
+       gtk_table_attach (GTK_TABLE(header_table), to_button,     0,1,0,1,
+                         GTK_SHRINK, 0, 0, 0);
+       gtk_table_attach (GTK_TABLE(header_table), cc_button,     0,1,1,2,
+                         GTK_SHRINK, 0, 0, 0);
+       gtk_table_attach (GTK_TABLE(header_table), bcc_button,    0,1,2,3,
+                         GTK_SHRINK, 0, 0, 0);
+       gtk_table_attach (GTK_TABLE(header_table), subject_label, 0,1,3,4,
+                         GTK_SHRINK, 0, 0, 0);
+       gtk_table_attach_defaults (GTK_TABLE(header_table), priv->to_field,     1,2,0,1);
+       gtk_table_attach_defaults (GTK_TABLE(header_table), priv->cc_field,     1,2,1,2);
+       gtk_table_attach_defaults (GTK_TABLE(header_table), priv->bcc_field,    1,2,2,3);
+       gtk_table_attach_defaults (GTK_TABLE(header_table), priv->subject_field,1,2,3,4);
+
+       priv->msg_body = gtk_text_view_new ();
+       
+       main_vbox = gtk_vbox_new  (FALSE, 6);
+
+       priv->menubar = menubar_new (obj);
+       priv->toolbar = GTK_WIDGET(toolbar_new (obj));
+
+       gtk_box_pack_start (GTK_BOX(main_vbox), priv->menubar, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(main_vbox), priv->toolbar, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(main_vbox), header_table, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(main_vbox), priv->msg_body, TRUE, TRUE, 6);
+
+       gtk_widget_show_all (GTK_WIDGET(main_vbox));
+       gtk_container_add (GTK_CONTAINER(obj), main_vbox);
+}
+       
+
+
+static void
+modest_edit_msg_window_finalize (GObject *obj)
+{
+       ModestEditMsgWindowPrivate *priv;
+
+       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(obj);
+
+       g_object_unref (G_OBJECT(priv->conf));
+       priv->conf = NULL;
+
+       g_object_unref (G_OBJECT(priv->factory));
+       priv->factory = NULL;
+       
+       G_OBJECT_CLASS(parent_class)->finalize (obj);
+
+}
+
+
+
+static gboolean
+on_delete_event (GtkWidget *widget, GdkEvent *event, ModestEditMsgWindow *self)
+{
+       ModestEditMsgWindowPrivate *priv;
+       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(self);
+       
+       modest_widget_memory_save_settings (priv->conf,
+                                           GTK_WIDGET(priv->msg_body),
+                                           "modest-edit-msg-body");
+       return FALSE;
+}
+
+
+GtkWidget*
+modest_edit_msg_window_new (ModestConf *conf, ModestWidgetFactory *factory,
+                           ModestEditType type, TnyMsgIface *msg)
+{
+       GObject *obj;
+       ModestEditMsgWindowPrivate *priv;
+
+       g_return_val_if_fail (conf, NULL);
+       g_return_val_if_fail (factory, NULL);
+       g_return_val_if_fail (type >= 0 && type < MODEST_EDIT_TYPE_NUM, NULL);
+       g_return_val_if_fail (!(type==MODEST_EDIT_TYPE_NEW && msg), NULL); 
+       g_return_val_if_fail (!(type!=MODEST_EDIT_TYPE_NEW && !msg), NULL);     
+       
+       obj = g_object_new(MODEST_TYPE_EDIT_MSG_WINDOW, NULL);
+       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(obj);
+
+       g_object_ref (G_OBJECT(conf));
+       priv->conf = conf;
+
+       g_object_ref (factory);
+       priv->factory = factory;
+
+       init_window (MODEST_EDIT_MSG_WINDOW(obj));
+       
+       modest_widget_memory_restore_settings (priv->conf, GTK_WIDGET(obj),
+                                              "modest-edit-msg-body");
+       
+       gtk_window_set_title (GTK_WINDOW(obj), "Modest");
+       gtk_window_set_icon  (GTK_WINDOW(obj),
+                             modest_icon_factory_get_icon (MODEST_APP_ICON));
+
+       g_signal_connect (G_OBJECT(obj), "delete-event",
+                         G_CALLBACK(on_delete_event), obj);
+       
+       return GTK_WIDGET (obj);
+}
diff --git a/src/gtk/modest-edit-msg-window.h b/src/gtk/modest-edit-msg-window.h
new file mode 100644 (file)
index 0000000..422e0d3
--- /dev/null
@@ -0,0 +1,86 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __MODEST_EDIT_MSG_WINDOW_H__
+#define __MODEST_EDIT_MSG_WINDOW_H__
+
+#include <gtk/gtk.h>
+#include <tny-msg-iface.h>
+#include <modest-conf.h>
+#include <modest-widget-factory.h>
+#include <glib/gi18n.h>
+
+
+G_BEGIN_DECLS
+
+/* convenience macros */
+#define MODEST_TYPE_EDIT_MSG_WINDOW             (modest_edit_msg_window_get_type())
+#define MODEST_EDIT_MSG_WINDOW(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_EDIT_MSG_WINDOW,ModestEditMsgWindow))
+#define MODEST_EDIT_MSG_WINDOW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_EDIT_MSG_WINDOW,GtkWindow))
+#define MODEST_IS_EDIT_MSG_WINDOW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_EDIT_MSG_WINDOW))
+#define MODEST_IS_EDIT_MSG_WINDOW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_EDIT_MSG_WINDOW))
+#define MODEST_EDIT_MSG_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_EDIT_MSG_WINDOW,ModestEditMsgWindowClass))
+
+typedef struct _ModestEditMsgWindow      ModestEditMsgWindow;
+typedef struct _ModestEditMsgWindowClass ModestEditMsgWindowClass;
+
+struct _ModestEditMsgWindow {
+        GtkWindow parent;
+       /* insert public members, if any */
+};
+
+struct _ModestEditMsgWindowClass {
+       GtkWindowClass parent_class;
+       /* insert signal callback declarations, eg. */
+       /* void (* my_event) (ModestEditMsgWindow* obj); */
+};
+
+
+enum _ModestEditType {
+       MODEST_EDIT_TYPE_NEW,
+       MODEST_EDIT_TYPE_REPLY,
+       MODEST_EDIT_TYPE_FORWARD,
+       MODEST_EDIT_TYPE_VIEW,
+       
+       MODEST_EDIT_TYPE_NUM
+};
+typedef enum _ModestEditType ModestEditType;
+
+
+/* member functions */
+GType        modest_edit_msg_window_get_type    (void) G_GNUC_CONST;
+
+GtkWidget*   modest_edit_msg_window_new         (ModestConf *conf,
+                                                ModestWidgetFactory *factory,
+                                                ModestEditType type,
+                                                TnyMsgIface *msg);
+G_END_DECLS
+
+#endif /* __MODEST_EDIT_MSG_WINDOW_H__ */
+
diff --git a/src/gtk/modest-icon-names.h b/src/gtk/modest-icon-names.h
new file mode 100644 (file)
index 0000000..fc39ad5
--- /dev/null
@@ -0,0 +1,79 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+/* modest-tny-icon-names.h */
+
+/*
+ * FIXME: this should go the front-end dirs,
+ * with specific icons
+ */
+
+#ifndef __MODEST_TNY_ICON_NAMES_H__
+#define __MODEST_TNY_ICON_NAMES_H__
+
+#define PIXMAP_PREFIX PREFIX "/share/modest/pixmaps/"
+
+/* icons */
+
+#define MODEST_APP_ICON                                PIXMAP_PREFIX "internet-mail.svg"
+
+#define MODEST_HEADER_ICON_READ                        PIXMAP_PREFIX "qgn_list_messagin_mail.png"
+#define MODEST_HEADER_ICON_UNREAD              PIXMAP_PREFIX "qgn_list_messagin_mail_unread.png"
+#define MODEST_HEADER_ICON_DELETED             PIXMAP_PREFIX "qgn_list_messagin_mail_deleted.png"
+#define MODEST_HEADER_ICON_ATTACH              PIXMAP_PREFIX "qgn_list_gene_attacpap.png"
+
+#define MODEST_FOLDER_ICON_OPEN                        PIXMAP_PREFIX "qgn_list_gene_fldr_opn.png"
+#define MODEST_FOLDER_ICON_CLOSED              PIXMAP_PREFIX "qgn_list_gene_fldr_cls.png"
+
+#define MODEST_FOLDER_ICON_INBOX               PIXMAP_PREFIX "qgn_list_messagin_inbox.png"
+#define MODEST_FOLDER_ICON_OUTBOX              PIXMAP_PREFIX "qgn_list_messagin_outbox.png"
+#define MODEST_FOLDER_ICON_SENT                        PIXMAP_PREFIX "qgn_list_messagin_sent.png"
+#define MODEST_FOLDER_ICON_TRASH               PIXMAP_PREFIX "qgn_list_messagin_mail_deleted.png"
+#define MODEST_FOLDER_ICON_JUNK                        PIXMAP_PREFIX "qgn_list_messagin_mail_deleted.png"
+#define MODEST_FOLDER_ICON_DRAFTS              PIXMAP_PREFIX "qgn_list_messagin_drafts.png"
+#define MODEST_FOLDER_ICON_NORMAL              PIXMAP_PREFIX "qgn_list_gene_fldr_cls.png"
+
+#define MODEST_FOLDER_ICON_CONTACTS            PIXMAP_PREFIX "qgn_addr_icon_user_group.png"
+#define MODEST_FOLDER_ICON_NOTES               PIXMAP_PREFIX "qgn_list_messagin_viewer.png"
+#define MODEST_FOLDER_ICON_CALENDAR            PIXMAP_PREFIX "qgn_widg_datedit.png"
+
+/* toolbar */
+#define  MODEST_TOOLBAR_ICON_MAIL_SEND         PIXMAP_PREFIX "gnome-stock-mail-new.svg"
+#define  MODEST_TOOLBAR_ICON_NEW_MAIL          PIXMAP_PREFIX "gnome-stock-mail-new.svg"
+#define  MODEST_TOOLBAR_ICON_SEND_RECEIVE      PIXMAP_PREFIX "gtk-refresh.svg"
+#define  MODEST_TOOLBAR_ICON_REPLY             PIXMAP_PREFIX "gnome-stock-mail-rpl.svg"
+#define  MODEST_TOOLBAR_ICON_REPLY_ALL         PIXMAP_PREFIX "mail-reply-all.svg"
+#define  MODEST_TOOLBAR_ICON_FORWARD           PIXMAP_PREFIX "forward.svg"
+#define  MODEST_TOOLBAR_ICON_DELETE            PIXMAP_PREFIX "edit-delete.svg"
+#define  MODEST_TOOLBAR_ICON_NEXT              PIXMAP_PREFIX "back.svg"
+#define  MODEST_TOOLBAR_ICON_PREV              PIXMAP_PREFIX "forward.svg"
+#define  MODEST_TOOLBAR_ICON_STOP              PIXMAP_PREFIX "stock-stop.svg"
+
+#endif  /*__MODEST_TNY_ICON_NAMES_H__*/
diff --git a/src/gtk/modest-main-window.c b/src/gtk/modest-main-window.c
new file mode 100644 (file)
index 0000000..b863849
--- /dev/null
@@ -0,0 +1,565 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <modest-widget-memory.h>
+#include <modest-icon-factory.h>
+
+#include <widgets/modest-toolbar.h>
+
+#include "modest-main-window.h"
+#include "modest-account-view-window.h"
+#include "modest-edit-msg-window.h"
+#include "modest-icon-names.h"
+
+
+/* 'private'/'protected' functions */
+static void modest_main_window_class_init    (ModestMainWindowClass *klass);
+static void modest_main_window_init          (ModestMainWindow *obj);
+static void modest_main_window_finalize      (GObject *obj);
+
+static void restore_sizes (ModestMainWindow *self);
+static void save_sizes (ModestMainWindow *self);
+
+/* list my signals */
+enum {
+       /* MY_SIGNAL_1, */
+       /* MY_SIGNAL_2, */
+       LAST_SIGNAL
+};
+
+typedef struct _ModestMainWindowPrivate ModestMainWindowPrivate;
+struct _ModestMainWindowPrivate {
+
+       GtkWidget *toolbar;
+       GtkWidget *menubar;
+
+       GtkWidget *folder_paned;
+       GtkWidget *msg_paned;
+       GtkWidget *main_paned;
+       
+       ModestWidgetFactory *factory;
+       ModestConf *conf;
+       ModestAccountMgr *account_mgr;
+       
+       ModestHeaderView *header_view;
+       ModestFolderView *folder_view;
+       ModestMsgView    *msg_preview;
+};
+
+
+#define MODEST_MAIN_WINDOW_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
+                                                MODEST_TYPE_MAIN_WINDOW, \
+                                                ModestMainWindowPrivate))
+/* globals */
+static GtkWindowClass *parent_class = NULL;
+
+/* uncomment the following if you have defined any signals */
+/* static guint signals[LAST_SIGNAL] = {0}; */
+
+GType
+modest_main_window_get_type (void)
+{
+       static GType my_type = 0;
+       if (!my_type) {
+               static const GTypeInfo my_info = {
+                       sizeof(ModestMainWindowClass),
+                       NULL,           /* base init */
+                       NULL,           /* base finalize */
+                       (GClassInitFunc) modest_main_window_class_init,
+                       NULL,           /* class finalize */
+                       NULL,           /* class data */
+                       sizeof(ModestMainWindow),
+                       1,              /* n_preallocs */
+                       (GInstanceInitFunc) modest_main_window_init,
+                       NULL
+               };
+               my_type = g_type_register_static (GTK_TYPE_WINDOW,
+                                                 "ModestMainWindow",
+                                                 &my_info, 0);
+       }
+       return my_type;
+}
+
+static void
+modest_main_window_class_init (ModestMainWindowClass *klass)
+{
+       GObjectClass *gobject_class;
+       gobject_class = (GObjectClass*) klass;
+
+       parent_class            = g_type_class_peek_parent (klass);
+       gobject_class->finalize = modest_main_window_finalize;
+
+       g_type_class_add_private (gobject_class, sizeof(ModestMainWindowPrivate));
+
+       /* signal definitions go here, e.g.: */
+/*     signals[MY_SIGNAL_1] = */
+/*             g_signal_new ("my_signal_1",....); */
+/*     signals[MY_SIGNAL_2] = */
+/*             g_signal_new ("my_signal_2",....); */
+/*     etc. */
+}
+
+static void
+modest_main_window_init (ModestMainWindow *obj)
+{
+       ModestMainWindowPrivate *priv;
+
+       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(obj);
+
+       priv->factory = NULL;
+       priv->conf           = NULL;
+       priv->account_mgr    = NULL;
+}
+
+static void
+modest_main_window_finalize (GObject *obj)
+{
+       ModestMainWindowPrivate *priv;  
+       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(obj);
+       if (priv->factory) {
+               g_object_unref (G_OBJECT(priv->factory));
+               priv->factory = NULL;
+       }
+       if (priv->conf) {
+               g_object_unref (G_OBJECT(priv->conf));
+               priv->conf = NULL;
+       }               
+
+       if (priv->account_mgr) {
+               g_object_unref (G_OBJECT(priv->account_mgr));
+               priv->account_mgr = NULL;
+       }               
+
+       G_OBJECT_CLASS(parent_class)->finalize (obj);
+}
+
+
+static void
+on_menu_about (GtkWidget *widget, gpointer data)
+{
+       GtkWidget *about;
+       const gchar *authors[] = {
+               "Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>",
+               NULL
+       };      
+       about = gtk_about_dialog_new ();
+       gtk_about_dialog_set_name (GTK_ABOUT_DIALOG(about), PACKAGE_NAME);
+       gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(about),PACKAGE_VERSION);
+       gtk_about_dialog_set_copyright (
+               GTK_ABOUT_DIALOG(about),
+               _("Copyright (c) 2006, Nokia Corporation\n"
+                 "All rights reserved."));
+       gtk_about_dialog_set_comments ( GTK_ABOUT_DIALOG(about),
+               _("a modest e-mail client\n\n"
+                 "design and implementation: Dirk-Jan C. Binnema\n"
+                 "contributions from the fine people at KernelConcepts\n\n"
+                 "uses the tinymail email framework written by Philip van Hoof"));
+       gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG(about), authors);
+       gtk_about_dialog_set_website (GTK_ABOUT_DIALOG(about), "http://modest.garage.maemo.org");
+
+       gtk_dialog_run (GTK_DIALOG (about));
+       gtk_widget_destroy(about);
+}
+
+
+static void
+on_menu_accounts (ModestMainWindow *self, guint action, GtkWidget *widget)
+{
+       GtkWidget *account_win;
+       ModestMainWindowPrivate *priv;
+
+       g_return_if_fail (widget);
+       g_return_if_fail (self);
+       
+       priv        = MODEST_MAIN_WINDOW_GET_PRIVATE(self);     
+       account_win = modest_account_view_window_new (priv->account_mgr,
+                                                     priv->factory);
+
+       gtk_window_set_transient_for (GTK_WINDOW(account_win),
+                                     GTK_WINDOW(self));
+                                     
+       gtk_widget_show (account_win);
+}
+
+
+static void
+on_menu_new_message (ModestMainWindow *self, guint action, GtkWidget *widget)
+{
+       GtkWidget *msg_win;
+       ModestMainWindowPrivate *priv;
+
+       priv  = MODEST_MAIN_WINDOW_GET_PRIVATE(self);   
+
+       msg_win = modest_edit_msg_window_new (priv->conf,
+                                             priv->factory,
+                                             MODEST_EDIT_TYPE_NEW,
+                                             NULL);
+       gtk_widget_show (msg_win);
+}
+
+static void
+on_menu_quit (ModestMainWindow *self, guint action, GtkWidget *widget)
+{
+       save_sizes (self);
+       gtk_widget_destroy (GTK_WIDGET(self));
+}
+
+
+/* Our menu, an array of GtkItemFactoryEntry structures that defines each menu item */
+static GtkItemFactoryEntry menu_items[] = {
+       { "/_File",             NULL,                   NULL,           0, "<Branch>" },
+       { "/File/_New",         "<control>N",           NULL,           0, "<StockItem>", GTK_STOCK_NEW },
+       { "/File/_Open",        "<control>O",           NULL,           0, "<StockItem>", GTK_STOCK_OPEN },
+       { "/File/_Save",        "<control>S",           NULL,           0, "<StockItem>", GTK_STOCK_SAVE },
+       { "/File/Save _As",     NULL,                   NULL,           0, "<Item>" },
+       { "/File/sep1",         NULL,                   NULL,           0, "<Separator>" },
+       { "/File/_Quit",        "<CTRL>Q",              on_menu_quit,  0, "<StockItem>", GTK_STOCK_QUIT },
+
+       { "/_Edit",             NULL,                   NULL,           0, "<Branch>" },
+       { "/Edit/_Undo",        "<CTRL>Z",              NULL,           0, "<StockItem>", GTK_STOCK_UNDO },
+       { "/Edit/_Redo",        "<shift><CTRL>Z",       NULL,           0, "<StockItem>", GTK_STOCK_REDO },
+       { "/File/sep1",         NULL,                   NULL,           0, "<Separator>" },
+       { "/Edit/Cut",          "<control>X",           NULL,           0, "<StockItem>", GTK_STOCK_CUT  },
+       { "/Edit/Copy",         "<CTRL>C",              NULL,           0, "<StockItem>", GTK_STOCK_COPY },
+       { "/Edit/Paste",        NULL,                   NULL,           0, "<StockItem>", GTK_STOCK_PASTE},
+       { "/Edit/sep1",         NULL,                   NULL,           0, "<Separator>" },
+       { "/Edit/Delete",       "<CTRL>Q",              NULL,           0, "<Item>" },
+       { "/Edit/Select all",   "<CTRL>A",              NULL,           0, "<Item>" },
+       { "/Edit/Deelect all",  "<Shift><CTRL>A",       NULL,           0, "<Item>" },
+
+       { "/_Actions",                NULL,             NULL,           0, "<Branch>" },
+       { "/Actions/_New Message",    NULL,             on_menu_new_message,            0, "<Item>" },
+       { "/Actions/_Reply",    NULL,                   NULL,           0, "<Item>" },
+       { "/Actions/_Forward",  NULL,                   NULL,           0, "<Item>" },
+       { "/Actions/_Bounce",   NULL,                   NULL,           0, "<Item>" },  
+       
+       { "/_Options",           NULL,                  NULL,           0, "<Branch>" },
+       { "/Options/_Accounts",  NULL,                  on_menu_accounts,0, "<Item>" },
+       { "/Options/_Contacts",  NULL,                  NULL,           0, "<Item>" },
+
+
+       { "/_Help",         NULL,                       NULL,           0, "<Branch>" },
+       { "/_Help/About",   NULL,                       on_menu_about,  0, "<StockItem>", GTK_STOCK_ABOUT},
+};
+
+static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
+
+
+static GtkWidget *
+menubar_new (ModestMainWindow *self)
+{
+       GtkItemFactory *item_factory;
+       GtkAccelGroup *accel_group;
+       
+       /* Make an accelerator group (shortcut keys) */
+       accel_group = gtk_accel_group_new ();
+       
+       /* Make an ItemFactory (that makes a menubar) */
+       item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>",
+                                            accel_group);
+       
+       /* This function generates the menu items. Pass the item factory,
+          the number of items in the array, the array itself, and any
+          callback data for the the menu items. */
+       gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, self);
+       
+       ///* Attach the new accelerator group to the window. */
+       gtk_window_add_accel_group (GTK_WINDOW (self), accel_group);
+       
+       /* Finally, return the actual menu bar created by the item factory. */
+       return gtk_item_factory_get_widget (item_factory, "<main>");
+}
+
+
+
+
+static ModestHeaderView*
+header_view_new (ModestMainWindow *self)
+{
+       int i;
+       GSList *columns = NULL;
+       ModestHeaderView *header_view;
+       ModestMainWindowPrivate *priv;
+       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 */
+       };
+       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
+       
+       for (i = 0 ; i != sizeof(cols) / sizeof(ModestHeaderViewColumn); ++i)
+               columns = g_slist_append (columns, GINT_TO_POINTER(cols[i]));
+
+       header_view = modest_widget_factory_get_header_view (priv->factory);
+       modest_header_view_set_columns (header_view, columns);
+       g_slist_free (columns);
+
+       return header_view;
+}
+
+static void
+on_toolbar_button_clicked (ModestToolbar *toolbar, ModestToolbarButton button_id,
+                          ModestMainWindow *self)
+{
+       switch (button_id) {
+       case MODEST_TOOLBAR_BUTTON_NEW_MAIL:
+               on_menu_new_message (self, 0, NULL);
+               break;
+               
+       case MODEST_TOOLBAR_BUTTON_REPLY:
+       case MODEST_TOOLBAR_BUTTON_REPLY_ALL:
+       case MODEST_TOOLBAR_BUTTON_FORWARD:
+       case MODEST_TOOLBAR_BUTTON_SEND_RECEIVE:
+       case MODEST_TOOLBAR_BUTTON_NEXT:
+       case MODEST_TOOLBAR_BUTTON_PREV:
+       case MODEST_TOOLBAR_BUTTON_DELETE:
+
+       default:
+               g_printerr ("modest: key %d pressed\n", button_id);
+       }
+}
+
+static ModestToolbar*
+toolbar_new (ModestMainWindow *self)
+{
+       int i;
+       ModestToolbar *toolbar;
+       GSList *buttons = NULL;
+       ModestMainWindowPrivate *priv;
+
+       ModestToolbarButton button_ids[] = {
+               MODEST_TOOLBAR_BUTTON_NEW_MAIL,
+               MODEST_TOOLBAR_BUTTON_REPLY,
+               MODEST_TOOLBAR_BUTTON_REPLY_ALL,
+               MODEST_TOOLBAR_BUTTON_FORWARD,
+               MODEST_TOOLBAR_SEPARATOR,
+               MODEST_TOOLBAR_BUTTON_SEND_RECEIVE,
+               MODEST_TOOLBAR_SEPARATOR,
+               MODEST_TOOLBAR_BUTTON_NEXT,
+               MODEST_TOOLBAR_BUTTON_PREV,
+               MODEST_TOOLBAR_SEPARATOR,               
+               MODEST_TOOLBAR_BUTTON_DELETE
+       };              
+       
+       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
+
+       for (i = 0 ; i != sizeof(button_ids) / sizeof(ModestToolbarButton); ++i)
+               buttons = g_slist_append (buttons, GINT_TO_POINTER(button_ids[i]));
+       
+       toolbar = modest_widget_factory_get_main_toolbar (priv->factory, buttons);
+       g_slist_free (buttons);
+       
+       g_signal_connect (G_OBJECT(toolbar), "button_clicked",
+                         G_CALLBACK(on_toolbar_button_clicked), self);
+       
+       return toolbar;
+}
+
+
+
+static void
+restore_sizes (ModestMainWindow *self)
+{
+       ModestMainWindowPrivate *priv;  
+       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
+       
+       modest_widget_memory_restore_settings (priv->conf,GTK_WIDGET(self),
+                                              "modest-main-window");
+       modest_widget_memory_restore_settings (priv->conf, GTK_WIDGET(priv->folder_paned),
+                                              "modest-folder-paned");
+       modest_widget_memory_restore_settings (priv->conf, GTK_WIDGET(priv->msg_paned),
+                                              "modest-msg-paned");
+       modest_widget_memory_restore_settings (priv->conf, GTK_WIDGET(priv->main_paned),
+                                              "modest-main-paned");
+}
+
+
+static void
+save_sizes (ModestMainWindow *self)
+{
+       ModestMainWindowPrivate *priv;
+       
+       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
+       
+       modest_widget_memory_save_settings (priv->conf,GTK_WIDGET(self),
+                                           "modest-main-window");
+       modest_widget_memory_save_settings (priv->conf, GTK_WIDGET(priv->folder_paned),
+                                           "modest-folder-paned");
+       modest_widget_memory_save_settings (priv->conf, GTK_WIDGET(priv->msg_paned),
+                                           "modest-msg-paned");
+       modest_widget_memory_save_settings (priv->conf, GTK_WIDGET(priv->main_paned),
+                                           "modest-main-paned");
+}
+
+static GtkWidget*
+wrapped_in_scrolled_window (GtkWidget *widget, gboolean needs_viewport)
+{
+       GtkWidget *win;
+
+       win = gtk_scrolled_window_new (NULL, NULL);
+       gtk_scrolled_window_set_policy
+               (GTK_SCROLLED_WINDOW (win),GTK_POLICY_NEVER,
+                GTK_POLICY_AUTOMATIC);
+       
+       if (needs_viewport)
+               gtk_scrolled_window_add_with_viewport
+                       (GTK_SCROLLED_WINDOW(win), widget);
+       else
+               gtk_container_add (GTK_CONTAINER(win),
+                                  widget);
+
+       return win;
+}
+
+
+static gboolean
+on_delete_event (GtkWidget *widget, GdkEvent  *event, ModestMainWindow *self)
+{
+       save_sizes (self);
+       return FALSE;
+}
+
+static GtkWidget*
+favorites_view ()
+{
+       GtkWidget *favorites;
+       GtkTreeStore *store;
+       GtkTreeViewColumn *col;
+
+       store = gtk_tree_store_new (1, G_TYPE_STRING);
+       favorites = gtk_tree_view_new_with_model (GTK_TREE_MODEL(store));
+       col = gtk_tree_view_column_new_with_attributes (_("Favorites"),
+                                                       gtk_cell_renderer_text_new(),
+                                                       "text", 0, NULL);
+       
+       gtk_tree_view_append_column (GTK_TREE_VIEW(favorites), col);
+       gtk_widget_show_all (favorites);
+
+       g_object_unref (G_OBJECT(store));
+
+       return favorites;
+}
+
+
+
+GtkWidget*
+modest_main_window_new (ModestConf *conf, ModestAccountMgr *account_mgr,
+                       ModestWidgetFactory *factory)
+{
+       GObject *obj;
+       ModestMainWindowPrivate *priv;
+       
+       GtkWidget *main_vbox;
+       GtkWidget *status_hbox;
+       GtkWidget *header_win, *folder_win, *favorites_win;
+       
+       g_return_val_if_fail (factory, NULL);
+       g_return_val_if_fail (conf, NULL);
+
+       obj  = g_object_new(MODEST_TYPE_MAIN_WINDOW, NULL);
+       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(obj);
+
+       g_object_ref (factory);
+       priv->factory = factory;
+
+       g_object_ref (conf);
+       priv->conf = conf;
+       
+       g_object_ref (account_mgr);
+       priv->account_mgr = account_mgr;
+
+       /* widgets from factory */
+       priv->folder_view = modest_widget_factory_get_folder_view (factory);
+       priv->header_view = header_view_new (MODEST_MAIN_WINDOW(obj));
+       priv->msg_preview = modest_widget_factory_get_msg_preview (factory);
+       
+       folder_win = wrapped_in_scrolled_window (GTK_WIDGET(priv->folder_view),
+                                                FALSE);
+       header_win = wrapped_in_scrolled_window (GTK_WIDGET(priv->header_view),
+                                                FALSE);                           
+       favorites_win = wrapped_in_scrolled_window (favorites_view(),FALSE);                       
+       
+       /* tool/menubar */
+       priv->menubar = menubar_new (MODEST_MAIN_WINDOW(obj));
+       priv->toolbar = GTK_WIDGET(toolbar_new (MODEST_MAIN_WINDOW(obj)));
+
+       /* paned */
+       priv->folder_paned = gtk_vpaned_new ();
+       priv->msg_paned = gtk_vpaned_new ();
+       priv->main_paned = gtk_hpaned_new ();
+       gtk_paned_add1 (GTK_PANED(priv->main_paned), priv->folder_paned);
+       gtk_paned_add2 (GTK_PANED(priv->main_paned), priv->msg_paned);
+       gtk_paned_add1 (GTK_PANED(priv->folder_paned), favorites_win);
+       gtk_paned_add2 (GTK_PANED(priv->folder_paned), folder_win);
+       gtk_paned_add1 (GTK_PANED(priv->msg_paned), header_win);
+       gtk_paned_add2 (GTK_PANED(priv->msg_paned), GTK_WIDGET(priv->msg_preview));
+
+       gtk_widget_show (GTK_WIDGET(priv->header_view));
+       gtk_tree_view_columns_autosize (GTK_TREE_VIEW(priv->header_view));
+
+       
+       /* status bar / progress */
+       status_hbox = gtk_hbox_new (FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(status_hbox),
+                           modest_widget_factory_get_folder_info_label (factory),
+                           FALSE,FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(status_hbox),
+                           modest_widget_factory_get_status_bar(factory),
+                           TRUE, TRUE, 0);
+       gtk_box_pack_start (GTK_BOX(status_hbox),
+                           modest_widget_factory_get_progress_bar(factory),
+                           FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(status_hbox),
+                         modest_widget_factory_get_online_toggle(factory),
+                         FALSE, FALSE, 0);
+
+       /* putting it all together... */
+       main_vbox = gtk_vbox_new (FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(main_vbox), priv->menubar, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(main_vbox), priv->toolbar, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(main_vbox), priv->main_paned, TRUE, TRUE,0);
+       gtk_box_pack_start (GTK_BOX(main_vbox), status_hbox, FALSE, FALSE, 0);
+       
+       gtk_container_add (GTK_CONTAINER(obj), main_vbox);
+       restore_sizes (MODEST_MAIN_WINDOW(obj));        
+
+       gtk_window_set_title (GTK_WINDOW(obj), "Modest");
+       gtk_window_set_icon  (GTK_WINDOW(obj),
+                             modest_icon_factory_get_icon (MODEST_APP_ICON));
+       
+       gtk_widget_show_all (main_vbox);
+
+       g_signal_connect (G_OBJECT(obj), "delete-event",
+                         G_CALLBACK(on_delete_event), obj);
+       
+       return GTK_WIDGET(obj);
+}
diff --git a/src/gtk/modest-main-window.h b/src/gtk/modest-main-window.h
new file mode 100644 (file)
index 0000000..94c02ac
--- /dev/null
@@ -0,0 +1,51 @@
+/* modest-main-window.h */
+/* insert (c)/licensing information) */
+
+#ifndef __MODEST_MAIN_WINDOW_H__
+#define __MODEST_MAIN_WINDOW_H__
+
+#include <gtk/gtkwindow.h>
+#include <glib/gi18n.h>
+#include <modest-widget-factory.h>
+#include <modest-conf.h>
+#include <modest-account-mgr.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /*HAVE_CONFIG_H*/
+
+G_BEGIN_DECLS
+
+/* convenience macros */
+#define MODEST_TYPE_MAIN_WINDOW             (modest_main_window_get_type())
+#define MODEST_MAIN_WINDOW(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_MAIN_WINDOW,ModestMainWindow))
+#define MODEST_MAIN_WINDOW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_MAIN_WINDOW,GtkWindow))
+#define MODEST_IS_MAIN_WINDOW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_MAIN_WINDOW))
+#define MODEST_IS_MAIN_WINDOW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_MAIN_WINDOW))
+#define MODEST_MAIN_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_MAIN_WINDOW,ModestMainWindowClass))
+
+typedef struct _ModestMainWindow      ModestMainWindow;
+typedef struct _ModestMainWindowClass ModestMainWindowClass;
+
+struct _ModestMainWindow {
+        GtkWindow parent;
+       /* insert public members, if any */
+};
+
+struct _ModestMainWindowClass {
+       GtkWindowClass parent_class;
+       /* insert signal callback declarations, eg. */
+       /* void (* my_event) (ModestMainWindow* obj); */
+};
+
+/* member functions */
+GType        modest_main_window_get_type    (void) G_GNUC_CONST;
+
+
+GtkWidget*   modest_main_window_new         (ModestConf *conf, ModestAccountMgr *account_mgr,
+                                            ModestWidgetFactory *factory);
+
+G_END_DECLS
+
+#endif /* __MODEST_MAIN_WINDOW_H__ */
+
diff --git a/src/gtk/modest-store-widget.c b/src/gtk/modest-store-widget.c
new file mode 100644 (file)
index 0000000..a537831
--- /dev/null
@@ -0,0 +1,354 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "modest-store-widget.h"
+#include <string.h>
+
+/* 'private'/'protected' functions */
+static void modest_store_widget_class_init (ModestStoreWidgetClass *klass);
+static void modest_store_widget_init       (ModestStoreWidget *obj);
+static void modest_store_widget_finalize   (GObject *obj);
+/* list my signals  */
+enum {
+       /* MY_SIGNAL_1, */
+       /* MY_SIGNAL_2, */
+       LAST_SIGNAL
+};
+
+typedef struct _ModestStoreWidgetPrivate ModestStoreWidgetPrivate;
+struct _ModestStoreWidgetPrivate {
+       
+       gchar* proto;
+       
+       GtkWidget *servername;
+       GtkWidget *username;
+       GtkWidget *security;
+       GtkWidget *auth;
+       GtkWidget *chooser;
+       GtkWidget *remember_pwd;
+       
+       ModestWidgetFactory *factory;
+};
+#define MODEST_STORE_WIDGET_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
+                                                 MODEST_TYPE_STORE_WIDGET, \
+                                                 ModestStoreWidgetPrivate))
+/* globals */
+static GtkContainerClass *parent_class = NULL;
+
+/* uncomment the following if you have defined any signals */
+/* static guint signals[LAST_SIGNAL] = {0}; */
+
+GType
+modest_store_widget_get_type (void)
+{
+       static GType my_type = 0;
+       if (!my_type) {
+               static const GTypeInfo my_info = {
+                       sizeof(ModestStoreWidgetClass),
+                       NULL,           /* base init */
+                       NULL,           /* base finalize */
+                       (GClassInitFunc) modest_store_widget_class_init,
+                       NULL,           /* class finalize */
+                       NULL,           /* class data */
+                       sizeof(ModestStoreWidget),
+                       1,              /* n_preallocs */
+                       (GInstanceInitFunc) modest_store_widget_init,
+                       NULL
+               };
+               my_type = g_type_register_static (GTK_TYPE_VBOX,
+                                                 "ModestStoreWidget",
+                                                 &my_info, 0);
+       }
+       return my_type;
+}
+
+static void
+modest_store_widget_class_init (ModestStoreWidgetClass *klass)
+{
+       GObjectClass *gobject_class;
+       gobject_class = (GObjectClass*) klass;
+
+       parent_class            = g_type_class_peek_parent (klass);
+       gobject_class->finalize = modest_store_widget_finalize;
+
+       g_type_class_add_private (gobject_class, sizeof(ModestStoreWidgetPrivate));
+
+       /* signal definitions go here, e.g.: */
+/*     signals[MY_SIGNAL_1] = */
+/*             g_signal_new ("my_signal_1",....); */
+/*     signals[MY_SIGNAL_2] = */
+/*             g_signal_new ("my_signal_2",....); */
+/*     etc. */
+}
+
+static void
+modest_store_widget_init (ModestStoreWidget *obj)
+{
+       ModestStoreWidgetPrivate *priv;
+       
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(obj); 
+
+       priv->proto = NULL;
+}
+
+
+
+static GtkWidget *
+maildir_configuration (ModestStoreWidget *self)
+{
+       ModestStoreWidgetPrivate *priv;
+       GtkWidget *label, *box, *hbox;
+       
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
+       box = gtk_vbox_new (FALSE, 6);
+       
+       label = gtk_label_new (NULL);
+       gtk_label_set_markup (GTK_LABEL(label),
+                             _("<b>Maildir configuration</b>"));       
+       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
+       label = gtk_label_new (NULL);
+       gtk_label_set_markup (GTK_LABEL(label),
+                             _("Please select the path to your Maildir below"));       
+       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
+       
+       label = gtk_label_new (_("Path:"));
+
+       priv->chooser = 
+               gtk_file_chooser_button_new (_("(none)"),
+                                            GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+
+       hbox = gtk_hbox_new (FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(hbox), priv->chooser, FALSE, FALSE, 6);
+
+       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 6);       
+
+       return box;
+}
+
+
+static GtkWidget*
+mbox_configuration (ModestStoreWidget *self)
+{
+       ModestStoreWidgetPrivate *priv;
+       GtkWidget *label, *box, *hbox;
+       
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
+       box = gtk_vbox_new (FALSE, 6);
+       
+       label = gtk_label_new (NULL);
+       gtk_label_set_markup (GTK_LABEL(label),
+                             _("<b>Mbox configuration</b>"));  
+       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
+       label = gtk_label_new (NULL);
+       gtk_label_set_markup (GTK_LABEL(label),
+                             _("Please select your mbox file below")); 
+       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
+       
+       label = gtk_label_new (_("mbox:"));
+
+       priv->chooser =
+               gtk_file_chooser_button_new (_("(none)"),
+                                            GTK_FILE_CHOOSER_ACTION_OPEN);
+       hbox = gtk_hbox_new (FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(hbox), priv->chooser, FALSE, FALSE, 6);
+       
+       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 6);       
+
+       return box;
+}
+
+
+static GtkWidget*
+imap_pop_configuration (ModestStoreWidget *self)
+{
+       ModestStoreWidgetPrivate *priv;
+       GtkWidget *label, *box, *hbox;
+
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
+       box = gtk_vbox_new (FALSE, 6);
+       
+       label = gtk_label_new (NULL);
+       gtk_label_set_markup (GTK_LABEL(label),_("<b>Server configuration</b>"));
+       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
+       
+       hbox    = gtk_hbox_new (FALSE, 6);
+       label   = gtk_label_new (_("Username:"));
+       if (!priv->username)
+               priv->username = gtk_entry_new_with_max_length (40);
+       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(hbox), priv->username,FALSE, FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);       
+
+       hbox    = gtk_hbox_new (FALSE, 6);
+       label   = gtk_label_new (_("Server:"));
+       if (!priv->servername)
+               priv->servername = gtk_entry_new_with_max_length (40);
+       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(hbox), priv->servername,FALSE, FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);       
+
+       label = gtk_label_new(NULL);
+       gtk_label_set_markup (GTK_LABEL(label),_("<b>Security</b>"));
+       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 0);
+
+       hbox = gtk_hbox_new (FALSE, 6);
+       label = gtk_label_new(NULL);
+       gtk_label_set_text (GTK_LABEL(label),_("Connection type:"));
+       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(hbox),  modest_widget_factory_get_combo_box
+                           (priv->factory, MODEST_COMBO_BOX_TYPE_SECURITY_PROTOS),
+                           FALSE, FALSE,0);
+       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);
+       
+       hbox = gtk_hbox_new (FALSE, 6);
+       label = gtk_label_new(NULL);
+
+       gtk_label_set_text (GTK_LABEL(label),_("Authentication:"));
+       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(hbox),   modest_widget_factory_get_combo_box
+                           (priv->factory, MODEST_COMBO_BOX_TYPE_AUTH_PROTOS),
+                           FALSE, FALSE, 0);
+
+       priv->remember_pwd =
+               gtk_check_button_new_with_label (_("Remember password"));
+       gtk_box_pack_start (GTK_BOX(hbox),priv->remember_pwd,
+                           FALSE, FALSE, 0);
+       
+       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);
+
+       return box;
+}
+
+
+static void
+modest_store_widget_finalize (GObject *obj)
+{
+       ModestStoreWidgetPrivate *priv;
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(obj);
+       
+       if (priv->factory) {
+               g_object_unref (priv->factory);
+               priv->factory = NULL;
+       }
+
+       if (priv->proto) {
+               g_free (priv->proto);
+               priv->proto = NULL;
+       }
+
+       G_OBJECT_CLASS(parent_class)->finalize (obj);
+}
+
+
+
+GtkWidget*
+modest_store_widget_new (ModestWidgetFactory *factory, const gchar *proto)
+{
+       GObject *obj;
+       GtkWidget *w;
+       ModestStoreWidget *self;
+       ModestStoreWidgetPrivate *priv;
+       
+       g_return_val_if_fail (proto, NULL);
+       g_return_val_if_fail (factory, NULL);
+
+       obj = g_object_new(MODEST_TYPE_STORE_WIDGET, NULL);
+       self = MODEST_STORE_WIDGET(obj);
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
+
+       g_object_ref (factory);
+       priv->factory = factory;
+
+       priv->proto = g_strdup (proto);
+       
+       if (strcmp (proto, MODEST_PROTO_POP) == 0 ||
+           strcmp (proto, MODEST_PROTO_IMAP) == 0) {
+               w = imap_pop_configuration (self);
+       } else if (strcmp (proto, MODEST_PROTO_MAILDIR) == 0) {
+               w = maildir_configuration (self);
+       }  else if (strcmp (proto, MODEST_PROTO_MBOX) == 0) {
+               w = mbox_configuration (self);
+       } else
+               w = gtk_label_new ("");
+       
+       gtk_widget_show_all (w);
+       gtk_box_pack_start (GTK_BOX(self), w, FALSE, FALSE, 2);
+
+       return GTK_WIDGET(self);
+}
+
+
+gboolean
+modest_store_widget_get_remember_password (ModestStoreWidget *self)
+{
+       ModestStoreWidgetPrivate *priv;
+
+       g_return_val_if_fail (self, FALSE);
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
+
+       return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(priv->remember_pwd));
+}
+
+
+const gchar*
+modest_store_widget_get_username (ModestStoreWidget *self)
+{
+       ModestStoreWidgetPrivate *priv;
+
+       g_return_val_if_fail (self, NULL);
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
+       
+       return gtk_entry_get_text (GTK_ENTRY(priv->username));
+}
+
+const gchar*
+modest_store_widget_get_servername (ModestStoreWidget *self)
+{
+       ModestStoreWidgetPrivate *priv;
+
+       g_return_val_if_fail (self, NULL);
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
+       
+       return gtk_entry_get_text (GTK_ENTRY(priv->servername));
+}
+
+
+const gchar*
+modest_store_widget_get_proto (ModestStoreWidget *self)
+{
+       ModestStoreWidgetPrivate *priv;
+
+       g_return_val_if_fail (self, FALSE);
+       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
+
+       return priv->proto;
+}
+
diff --git a/src/gtk/modest-store-widget.h b/src/gtk/modest-store-widget.h
new file mode 100644 (file)
index 0000000..4a3cbb8
--- /dev/null
@@ -0,0 +1,53 @@
+/* modest-store-widget.h */
+/* insert (c)/licensing information) */
+
+#ifndef __MODEST_STORE_WIDGET_H__
+#define __MODEST_STORE_WIDGET_H__
+
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include <modest-widget-factory.h>
+
+G_BEGIN_DECLS
+
+/* convenience macros */
+#define MODEST_TYPE_STORE_WIDGET             (modest_store_widget_get_type())
+#define MODEST_STORE_WIDGET(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_STORE_WIDGET,ModestStoreWidget))
+#define MODEST_STORE_WIDGET_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_STORE_WIDGET,GtkContainer))
+#define MODEST_IS_STORE_WIDGET(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_STORE_WIDGET))
+#define MODEST_IS_STORE_WIDGET_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_STORE_WIDGET))
+#define MODEST_STORE_WIDGET_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_STORE_WIDGET,ModestStoreWidgetClass))
+
+typedef struct _ModestStoreWidget      ModestStoreWidget;
+typedef struct _ModestStoreWidgetClass ModestStoreWidgetClass;
+
+struct _ModestStoreWidget {
+        GtkVBox parent;
+       /* insert public members, if any */
+};
+
+struct _ModestStoreWidgetClass {
+       GtkVBoxClass parent_class;
+       /* insert signal callback declarations, eg. */
+       /* void (* my_event) (ModestStoreWidget* obj); */
+};
+
+/* member functions */
+GType        modest_store_widget_get_type    (void) G_GNUC_CONST;
+
+GtkWidget*   modest_store_widget_new         (ModestWidgetFactory *factory,
+                                             const gchar* proto);
+
+gboolean       modest_store_widget_get_remember_password (ModestStoreWidget *self);
+const gchar*   modest_store_widget_get_username          (ModestStoreWidget *self);
+const gchar*   modest_store_widget_get_servername        (ModestStoreWidget *self);
+const gchar*   modest_store_widget_get_proto             (ModestStoreWidget *self);
+
+
+
+
+
+G_END_DECLS
+
+#endif /* __MODEST_STORE_WIDGET_H__ */
+
diff --git a/src/gtk/modest-transport-widget.c b/src/gtk/modest-transport-widget.c
new file mode 100644 (file)
index 0000000..9aeb080
--- /dev/null
@@ -0,0 +1,245 @@
+/* modest-transport-widget.c */
+
+/* insert (c)/licensing information) */
+
+#include "modest-transport-widget.h"
+#include <string.h>
+
+/* 'private'/'protected' functions */
+static void modest_transport_widget_class_init (ModestTransportWidgetClass *klass);
+static void modest_transport_widget_init       (ModestTransportWidget *obj);
+static void modest_transport_widget_finalize   (GObject *obj);
+/* list my signals  */
+enum {
+       /* MY_SIGNAL_1, */
+       /* MY_SIGNAL_2, */
+       LAST_SIGNAL
+};
+
+typedef struct _ModestTransportWidgetPrivate ModestTransportWidgetPrivate;
+struct _ModestTransportWidgetPrivate {
+
+       gchar *proto;
+       ModestWidgetFactory *factory;
+
+       GtkWidget *servername;
+       GtkWidget *username;
+       GtkWidget *auth;
+       GtkWidget *remember_pwd;
+
+};
+#define MODEST_TRANSPORT_WIDGET_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
+                                                     MODEST_TYPE_TRANSPORT_WIDGET, \
+                                                     ModestTransportWidgetPrivate))
+/* globals */
+static GtkContainerClass *parent_class = NULL;
+
+/* uncomment the following if you have defined any signals */
+/* static guint signals[LAST_SIGNAL] = {0}; */
+
+GType
+modest_transport_widget_get_type (void)
+{
+       static GType my_type = 0;
+       if (!my_type) {
+               static const GTypeInfo my_info = {
+                       sizeof(ModestTransportWidgetClass),
+                       NULL,           /* base init */
+                       NULL,           /* base finalize */
+                       (GClassInitFunc) modest_transport_widget_class_init,
+                       NULL,           /* class finalize */
+                       NULL,           /* class data */
+                       sizeof(ModestTransportWidget),
+                       1,              /* n_preallocs */
+                       (GInstanceInitFunc) modest_transport_widget_init,
+                       NULL
+               };
+               my_type = g_type_register_static (GTK_TYPE_VBOX,
+                                                 "ModestTransportWidget",
+                                                 &my_info, 0);
+       }
+       return my_type;
+}
+
+static void
+modest_transport_widget_class_init (ModestTransportWidgetClass *klass)
+{
+       GObjectClass *gobject_class;
+       gobject_class = (GObjectClass*) klass;
+
+       parent_class            = g_type_class_peek_parent (klass);
+       gobject_class->finalize = modest_transport_widget_finalize;
+
+       g_type_class_add_private (gobject_class, sizeof(ModestTransportWidgetPrivate));
+
+       /* signal definitions go here, e.g.: */
+/*     signals[MY_SIGNAL_1] = */
+/*             g_signal_new ("my_signal_1",....); */
+/*     signals[MY_SIGNAL_2] = */
+/*             g_signal_new ("my_signal_2",....); */
+/*     etc. */
+}
+
+static void
+modest_transport_widget_init (ModestTransportWidget *obj)
+{
+       ModestTransportWidgetPrivate *priv;
+       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(obj); 
+       
+       priv->proto = NULL;
+}
+
+static void
+modest_transport_widget_finalize (GObject *obj)
+{
+       ModestTransportWidgetPrivate *priv;
+       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(obj);
+       
+       if (priv->factory) {
+               g_object_unref (priv->factory);
+               priv->factory = NULL;
+       }
+
+       if (priv->proto) {
+               g_free (priv->proto);
+               priv->proto = NULL;
+       }
+
+       G_OBJECT_CLASS(parent_class)->finalize (obj);
+}
+
+
+static GtkWidget*
+smtp_configuration (ModestTransportWidget *self)
+{
+       ModestTransportWidgetPrivate *priv;
+       GtkWidget *label, *box, *hbox;
+       
+       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
+       box = gtk_vbox_new (FALSE, 6);
+       
+       label = gtk_label_new (NULL);
+       gtk_label_set_markup (GTK_LABEL(label),
+                             _("<b>SMTP configuration</b>"));  
+       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
+
+       priv->servername = gtk_entry_new_with_max_length (40);
+       
+       hbox = gtk_hbox_new (FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(hbox), gtk_label_new (_("Servername: ")),
+                           FALSE, FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(hbox), priv->servername,
+                           TRUE, TRUE, 6);
+       gtk_box_pack_start (GTK_BOX(box), hbox, TRUE, TRUE, 6);
+
+       priv->auth = gtk_check_button_new_with_label (_("Requires authentication"));
+       gtk_box_pack_start (GTK_BOX(box), priv->auth, TRUE, FALSE, 6);
+       
+       label = gtk_label_new(NULL);
+       gtk_label_set_markup (GTK_LABEL(label),_("<b>Security</b>"));
+       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 0);
+
+       hbox = gtk_hbox_new (FALSE, 6);
+       label = gtk_label_new(NULL);
+       gtk_label_set_text (GTK_LABEL(label),_("Connection type:"));
+       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX(hbox),  modest_widget_factory_get_combo_box
+                           (priv->factory, MODEST_COMBO_BOX_TYPE_SECURITY_PROTOS),
+                           FALSE, FALSE,0);
+       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);
+       
+       hbox = gtk_hbox_new (FALSE, 6);
+       label = gtk_label_new(NULL);
+
+       gtk_label_set_text (GTK_LABEL(label),_("Authentication:"));
+       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
+       gtk_box_pack_start (GTK_BOX(hbox),   modest_widget_factory_get_combo_box
+                           (priv->factory, MODEST_COMBO_BOX_TYPE_AUTH_PROTOS),
+                           FALSE, FALSE, 0);
+       priv->remember_pwd =
+               gtk_check_button_new_with_label (_("Remember password"));
+       gtk_box_pack_start (GTK_BOX(hbox),priv->remember_pwd,
+                           FALSE, FALSE, 0);   
+       return box;
+}
+
+
+
+GtkWidget*
+modest_transport_widget_new (ModestWidgetFactory *factory, const gchar* proto)
+{
+       GObject *obj;
+       GtkWidget *w;
+       ModestTransportWidget *self;
+       ModestTransportWidgetPrivate *priv;
+       
+       g_return_val_if_fail (proto, NULL);
+       g_return_val_if_fail (factory, NULL);
+
+       obj = g_object_new(MODEST_TYPE_TRANSPORT_WIDGET, NULL);
+       self = MODEST_TRANSPORT_WIDGET(obj);
+       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
+
+       g_object_ref (factory);
+       priv->factory = factory;
+
+       priv->proto = g_strdup (proto);
+       
+       if (strcmp (proto, MODEST_PROTO_SMTP) == 0) {
+               w = smtp_configuration (self);
+       } else
+               w = gtk_label_new ("");
+       
+       gtk_widget_show_all (w);
+       gtk_box_pack_start (GTK_BOX(self), w, FALSE, FALSE, 2);
+
+       return GTK_WIDGET(self);
+}
+
+
+gboolean
+modest_transport_widget_get_remember_password (ModestTransportWidget *self)
+{
+       ModestTransportWidgetPrivate *priv;
+
+       g_return_val_if_fail (self, FALSE);
+       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
+
+       return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(priv->remember_pwd));
+}
+
+
+const gchar*
+modest_transport_widget_get_username (ModestTransportWidget *self)
+{
+       ModestTransportWidgetPrivate *priv;
+
+       g_return_val_if_fail (self, NULL);
+       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
+       
+       return gtk_entry_get_text (GTK_ENTRY(priv->username));
+}
+
+const gchar*
+modest_transport_widget_get_servername (ModestTransportWidget *self)
+{
+       ModestTransportWidgetPrivate *priv;
+
+       g_return_val_if_fail (self, NULL);
+       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
+       
+       return gtk_entry_get_text (GTK_ENTRY(priv->servername));
+}
+
+
+const gchar*
+modest_transport_widget_get_proto (ModestTransportWidget *self)
+{
+       ModestTransportWidgetPrivate *priv;
+
+       g_return_val_if_fail (self, FALSE);
+       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
+
+       return priv->proto;
+}
+
diff --git a/src/gtk/modest-transport-widget.h b/src/gtk/modest-transport-widget.h
new file mode 100644 (file)
index 0000000..f72e971
--- /dev/null
@@ -0,0 +1,47 @@
+/* modest-transport-widget.h */
+/* insert (c)/licensing information) */
+
+#ifndef __MODEST_TRANSPORT_WIDGET_H__
+#define __MODEST_TRANSPORT_WIDGET_H__
+
+#include <gtk/gtk.h>
+#include <modest-widget-factory.h>
+
+G_BEGIN_DECLS
+
+/* convenience macros */
+#define MODEST_TYPE_TRANSPORT_WIDGET             (modest_transport_widget_get_type())
+#define MODEST_TRANSPORT_WIDGET(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_TRANSPORT_WIDGET,ModestTransportWidget))
+#define MODEST_TRANSPORT_WIDGET_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TRANSPORT_WIDGET,GtkContainer))
+#define MODEST_IS_TRANSPORT_WIDGET(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_TRANSPORT_WIDGET))
+#define MODEST_IS_TRANSPORT_WIDGET_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_TRANSPORT_WIDGET))
+#define MODEST_TRANSPORT_WIDGET_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_TRANSPORT_WIDGET,ModestTransportWidgetClass))
+
+typedef struct _ModestTransportWidget      ModestTransportWidget;
+typedef struct _ModestTransportWidgetClass ModestTransportWidgetClass;
+
+struct _ModestTransportWidget {
+        GtkVBox parent;
+       /* insert public members, if any */
+};
+
+struct _ModestTransportWidgetClass {
+       GtkVBoxClass parent_class;
+       /* insert signal callback declarations, eg. */
+       /* void (* my_event) (ModestTransportWidget* obj); */
+};
+
+/* member functions */
+GType        modest_transport_widget_get_type    (void) G_GNUC_CONST;
+
+GtkWidget*   modest_transport_widget_new         (ModestWidgetFactory *factory, const gchar *proto);
+
+gboolean       modest_transport_widget_get_remember_password (ModestTransportWidget *self);
+const gchar*   modest_transport_widget_get_username          (ModestTransportWidget *self);
+const gchar*   modest_transport_widget_get_servername        (ModestTransportWidget *self);
+const gchar*   modest_transport_widget_get_proto             (ModestTransportWidget *self);
+
+G_END_DECLS
+
+#endif /* __MODEST_TRANSPORT_WIDGET_H__ */
+
diff --git a/src/gtk/modest-ui.c b/src/gtk/modest-ui.c
new file mode 100644 (file)
index 0000000..834b0dc
--- /dev/null
@@ -0,0 +1,228 @@
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived from
+ *   this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <glib/gi18n.h>
+#include <string.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /*HAVE_CONFIG_H*/
+
+#include "../modest-ui.h"
+#include "../modest-account-mgr.h"
+#include "../modest-widget-factory.h"
+#include "modest-main-window.h"
+
+
+/* 'private'/'protected' functions */
+static void   modest_ui_class_init     (ModestUIClass *klass);
+static void   modest_ui_init           (ModestUI *obj);
+static void   modest_ui_finalize       (GObject *obj);
+
+gchar *on_password_requested (TnyAccountIface *, const gchar *, gboolean *);
+
+
+typedef struct _ModestUIPrivate ModestUIPrivate;
+struct _ModestUIPrivate {
+       ModestConf            *conf;
+        ModestAccountMgr      *account_mgr;
+       ModestWidgetFactory   *widget_factory;  
+        ModestTnyAccountStore *account_store;
+
+       GtkWidget              *main_window;
+};
+
+#define MODEST_UI_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
+                                       MODEST_TYPE_UI, \
+                                       ModestUIPrivate))
+
+
+/* list my signals */
+enum {
+       /* MY_SIGNAL_1, */
+       /* MY_SIGNAL_2, */
+       LAST_SIGNAL
+};
+
+/* globals */
+static GObjectClass *parent_class = NULL;
+
+
+GType
+modest_ui_get_type (void)
+{
+       static GType my_type = 0;
+       if (!my_type) {
+               static const GTypeInfo my_info = {
+                       sizeof(ModestUIClass),
+                       NULL,           /* base init */
+                       NULL,           /* base finalize */
+                       (GClassInitFunc) modest_ui_class_init,
+                       NULL,           /* class finalize */
+                       NULL,           /* class data */
+                       sizeof(ModestUI),
+                       1,              /* n_preallocs */
+                       (GInstanceInitFunc) modest_ui_init,
+                       NULL
+               };
+               my_type = g_type_register_static (G_TYPE_OBJECT,
+                                                 "ModestUI",
+                                                 &my_info, 0);
+       }
+       return my_type;
+}
+
+
+static void
+modest_ui_class_init (ModestUIClass *klass)
+{
+       GObjectClass *gobject_class;
+       gobject_class = (GObjectClass*) klass;
+
+       parent_class            = g_type_class_peek_parent (klass);
+       gobject_class->finalize = modest_ui_finalize;
+
+       g_type_class_add_private (gobject_class, sizeof(ModestUIPrivate));
+
+}
+
+
+static void
+modest_ui_init (ModestUI *obj)
+{
+       ModestUIPrivate *priv;
+
+       priv = MODEST_UI_GET_PRIVATE(obj);
+
+       priv->account_store  = NULL;
+       priv->account_mgr    = NULL;
+       priv->conf           = NULL;
+       priv->widget_factory = NULL;
+
+       priv->main_window    = NULL;
+}
+
+
+static void
+modest_ui_finalize (GObject *obj)
+{
+       
+       ModestUIPrivate *priv = MODEST_UI_GET_PRIVATE(obj);
+
+       if (priv->account_store) {
+               g_object_unref (G_OBJECT(priv->account_store));
+               priv->account_store = NULL;
+       }
+               
+       if (priv->account_mgr) {
+               g_object_unref (G_OBJECT(priv->account_mgr));
+               priv->account_mgr = NULL;
+       }
+
+       if (priv->widget_factory) {
+               g_object_unref (G_OBJECT(priv->widget_factory));
+               priv->widget_factory = NULL;
+       }
+
+       if (priv->conf) {
+               g_object_unref (G_OBJECT(priv->conf));
+               priv->conf = NULL;
+       }       
+}
+
+
+ModestUI*
+modest_ui_new (ModestConf *modest_conf)
+{
+       GObject *obj;
+       ModestUIPrivate *priv;
+
+       g_return_val_if_fail (modest_conf, NULL);
+
+       obj  = g_object_new(MODEST_TYPE_UI, NULL);
+       priv = MODEST_UI_GET_PRIVATE(obj);
+
+       g_object_ref (G_OBJECT(modest_conf));
+       priv->conf = modest_conf;
+       
+       priv->account_mgr = MODEST_ACCOUNT_MGR(modest_account_mgr_new (priv->conf));
+       if (!priv->account_mgr) {
+               g_printerr ("modest: could not create ModestAccountMgr instance\n");
+               g_object_unref (obj);
+               return NULL;
+        }
+
+       priv->account_store = modest_tny_account_store_new (priv->account_mgr);
+       if (!priv->account_store) {
+               g_printerr ("modest: could not initialze ModestTnyAccountStore instance\n");
+               return NULL;
+        }
+
+       priv->widget_factory = modest_widget_factory_new (
+               priv->conf, priv->account_store, priv->account_mgr);
+       if (!priv->account_store) {
+               g_printerr ("modest: could not initialize widget factory\n");
+               return NULL;
+       }
+               
+       return MODEST_UI(obj);
+}
+
+static gboolean
+on_main_window_delete_event (GtkWidget *widget, GdkEvent *event, ModestUI *self)
+{
+       g_warning (__FUNCTION__);
+       gtk_main_quit ();
+       return FALSE;
+}
+
+
+GtkWidget*
+modest_ui_main_window (ModestUI *modest_ui)
+{
+       ModestUIPrivate *priv;
+
+       g_return_val_if_fail (modest_ui, NULL);
+       priv = MODEST_UI_GET_PRIVATE(modest_ui);
+
+       if (!priv->main_window) {
+               priv->main_window =
+                       modest_main_window_new (priv->conf, priv->account_mgr,
+                                               priv->widget_factory);
+               g_signal_connect (G_OBJECT(priv->main_window), "delete-event",
+                                 G_CALLBACK(on_main_window_delete_event), modest_ui);
+       }
+               
+       if (!priv->main_window)
+               g_printerr ("modest: could not create main window\n");
+       
+       return priv->main_window;
+}
diff --git a/src/gtk/pixmaps/internet-mail.svg b/src/gtk/pixmaps/internet-mail.svg
new file mode 100644 (file)
index 0000000..cfaed48
--- /dev/null
@@ -0,0 +1,458 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   sodipodi:docname="internet-mail.svg"
+   sodipodi:docbase="/home/jimmac/gfx/ximian/tango-desktop-theme/scalable/apps"
+   inkscape:version="0.41+cvs"
+   sodipodi:version="0.32"
+   id="svg5816"
+   height="48px"
+   width="48px">
+  <defs
+     id="defs3"><linearGradient
+   id="linearGradient28260">
+  <stop
+   style="stop-color:#9aa29a;stop-opacity:1.0000000;"
+   offset="0.0000000"
+   id="stop28262" />
+
+
+  <stop
+   style="stop-color:#ffffff;stop-opacity:1.0000000;"
+   offset="1.0000000"
+   id="stop28264" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient28254">
+  <stop
+   id="stop28256"
+   offset="0.0000000"
+   style="stop-color:#9aa29a;stop-opacity:1.0000000;" />
+
+
+  <stop
+   id="stop28258"
+   offset="1.0000000"
+   style="stop-color:none" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient2274">
+  <stop
+   style="stop-color:#000000;stop-opacity:0.12871288;"
+   offset="0.0000000"
+   id="stop2276" />
+
+
+  <stop
+   style="stop-color:#000000;stop-opacity:0.0000000;"
+   offset="1.0000000"
+   id="stop2278" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient9749">
+  <stop
+   style="stop-color:#ffffff;stop-opacity:1;"
+   offset="0"
+   id="stop9751" />
+
+
+  <stop
+   style="stop-color:#ededed;stop-opacity:1.0000000;"
+   offset="1.0000000"
+   id="stop9753" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient2152">
+  <stop
+   style="stop-color:#9aa29a;stop-opacity:1.0000000;"
+   offset="0.0000000"
+   id="stop2154" />
+
+
+  <stop
+   style="stop-color:#b5beb5;stop-opacity:1.0000000;"
+   offset="1.0000000"
+   id="stop2156" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient2166">
+  <stop
+   style="stop-color:#ffffff;stop-opacity:1;"
+   offset="0"
+   id="stop2168" />
+
+
+  <stop
+   style="stop-color:#dcdcdc;stop-opacity:1.0000000;"
+   offset="1.0000000"
+   id="stop2170" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient18913">
+  <stop
+   style="stop-color:#ededed;stop-opacity:1.0000000;"
+   offset="0.0000000"
+   id="stop18915" />
+
+
+  <stop
+   style="stop-color:#c8c8c8;stop-opacity:1.0000000;"
+   offset="1.0000000"
+   id="stop18917" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient2136">
+  <stop
+   style="stop-color:#989690;stop-opacity:1.0000000;"
+   offset="0.0000000"
+   id="stop2138" />
+
+
+  <stop
+   style="stop-color:#656460;stop-opacity:1.0000000;"
+   offset="1.0000000"
+   id="stop2140" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient15107">
+  <stop
+   style="stop-color:#ffffff;stop-opacity:1.0000000;"
+   offset="0.0000000"
+   id="stop15109" />
+
+
+  <stop
+   style="stop-color:#e2e2e2;stop-opacity:1.0000000;"
+   offset="1.0000000"
+   id="stop15111" />
+
+
+</linearGradient>
+<linearGradient
+   id="linearGradient10691"
+   inkscape:collect="always">
+  <stop
+   id="stop10693"
+   offset="0"
+   style="stop-color:#000000;stop-opacity:1;" />
+
+
+  <stop
+   id="stop10695"
+   offset="1"
+   style="stop-color:#000000;stop-opacity:0;" />
+
+
+</linearGradient>
+<radialGradient
+   r="7.2284161"
+   fy="73.615714"
+   fx="6.7027131"
+   cy="73.615714"
+   cx="6.7027131"
+   gradientTransform="scale(1.902215,0.525703)"
+   gradientUnits="userSpaceOnUse"
+   id="radialGradient11382"
+   xlink:href="#linearGradient10691"
+   inkscape:collect="always" />
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+<linearGradient
+   y2="32.203162"
+   x2="9.7619219"
+   y1="37.784682"
+   x1="8.7803760"
+   gradientTransform="matrix(2.394900,0.000000,0.000000,0.781058,2.879512,0.343005)"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient27463"
+   xlink:href="#linearGradient2274"
+   inkscape:collect="always" />
+<linearGradient
+   y2="24.132717"
+   x2="21.111549"
+   y1="13.686079"
+   x1="11.233107"
+   gradientTransform="matrix(1.370928,0.000000,0.000000,1.443758,2.431133,-0.140786)"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient27468"
+   xlink:href="#linearGradient9749"
+   inkscape:collect="always" />
+<linearGradient
+   y2="52.090678"
+   x2="9.8855033"
+   y1="37.197018"
+   x1="8.9156475"
+   gradientTransform="matrix(2.454781,0.000000,0.000000,0.762004,2.879512,0.343005)"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient27471"
+   xlink:href="#linearGradient2152"
+   inkscape:collect="always" />
+<linearGradient
+   y2="52.090678"
+   x2="9.8855033"
+   y1="37.197018"
+   x1="8.9156475"
+   gradientTransform="matrix(2.454781,0.000000,0.000000,0.762004,2.879512,0.343005)"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient27474"
+   xlink:href="#linearGradient2152"
+   inkscape:collect="always" />
+<linearGradient
+   y2="29.568739"
+   x2="15.310744"
+   y1="15.148383"
+   x1="10.184240"
+   gradientTransform="matrix(1.819266,0.000000,0.000000,1.028193,2.879512,0.343005)"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient27477"
+   xlink:href="#linearGradient2166"
+   inkscape:collect="always" />
+<linearGradient
+   y2="17.876846"
+   x2="13.467486"
+   y1="7.2310905"
+   x1="5.8266134"
+   gradientTransform="matrix(1.570607,0.000000,0.000000,1.190976,2.879512,0.343005)"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient27483"
+   xlink:href="#linearGradient18913"
+   inkscape:collect="always" />
+<linearGradient
+   y2="26.022910"
+   x2="18.475286"
+   y1="4.7461626"
+   x1="11.572842"
+   gradientTransform="matrix(1.343475,0.000000,0.000000,1.417854,2.879511,0.314599)"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient27486"
+   xlink:href="#linearGradient15107"
+   inkscape:collect="always" />
+<linearGradient
+   y2="15.257116"
+   x2="30.599684"
+   y1="15.257116"
+   x1="2.0618774"
+   gradientTransform="matrix(1.343475,0.000000,0.000000,1.417854,2.879511,0.314599)"
+   gradientUnits="userSpaceOnUse"
+   id="linearGradient27488"
+   xlink:href="#linearGradient2136"
+   inkscape:collect="always" />
+</defs>
+  <sodipodi:namedview
+     inkscape:window-y="202"
+     inkscape:window-x="331"
+     inkscape:window-height="743"
+     inkscape:window-width="849"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showgrid="false"
+     inkscape:current-layer="layer1"
+     inkscape:cy="18.816166"
+     inkscape:cx="28.384904"
+     inkscape:zoom="9.8994949"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF
+       id="RDF5">
+      <cc:Work
+         id="Work6"
+         rdf:about="">
+        <dc:format
+           id="format7">image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"
+           id="type9" />
+        <dc:title
+           id="title29050">Mail</dc:title>
+        <dc:creator
+           id="creator29052">
+          <cc:Agent
+             id="Agent29054">
+            <dc:title
+               id="title29056">Jakub Steiner</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:contributor
+           id="contributor29058">
+          <cc:Agent
+             id="Agent29060">
+            <dc:title
+               id="title29062">Andreas Nilsson</dc:title>
+          </cc:Agent>
+        </dc:contributor>
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/"
+           id="license29064" />
+        <dc:subject
+           id="subject29080">
+          <rdf:Bag
+             id="Bag29082">
+            <rdf:li
+               id="li29148">mail</rdf:li>
+            <rdf:li
+               id="li29150">e-mail</rdf:li>
+            <rdf:li
+               id="li29152">MUA</rdf:li>
+          </rdf:Bag>
+        </dc:subject>
+      </cc:Work>
+      <cc:License
+         id="License29066"
+         rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+        <cc:permits
+           id="permits29068"
+           rdf:resource="http://web.resource.org/cc/Reproduction" />
+        <cc:permits
+           id="permits29070"
+           rdf:resource="http://web.resource.org/cc/Distribution" />
+        <cc:requires
+           id="requires29072"
+           rdf:resource="http://web.resource.org/cc/Notice" />
+        <cc:requires
+           id="requires29074"
+           rdf:resource="http://web.resource.org/cc/Attribution" />
+        <cc:permits
+           id="permits29076"
+           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+        <cc:requires
+           id="requires29078"
+           rdf:resource="http://web.resource.org/cc/ShareAlike" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1"
+     id="layer1">
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.45569620;color:#000000;fill:url(#radialGradient11382);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+       id="path10699"
+       sodipodi:cx="12.750000"
+       sodipodi:cy="38.700001"
+       sodipodi:rx="13.750000"
+       sodipodi:ry="3.8000000"
+       d="M 26.500000 38.700001 A 13.750000 3.8000000 0 1 1  -1.0000000,38.700001 A 13.750000 3.8000000 0 1 1  26.500000 38.700001 z"
+       transform="matrix(1.800603,0.000000,0.000000,1.974782,1.083944,-38.01261)" />
+    <path
+       style="fill:url(#linearGradient27486);fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient27488);stroke-width:0.85660440;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 6.3334395,16.972251 L 6.3334395,41.481799 L 43.305555,41.481799 L 43.244499,17.089859 C 43.241050,15.712272 31.395999,2.4121110 29.210877,2.4121110 L 20.659391,2.4121110 C 18.362072,2.4121110 6.3334395,15.673953 6.3334395,16.972251 z "
+       id="path12723"
+       sodipodi:nodetypes="ccczzzz" />
+    <path
+       style="fill:url(#linearGradient27483);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.25000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
+       d="M 6.9230610,16.787103 C 6.5250222,16.356975 18.809966,3.0935378 20.667210,3.0935378 L 29.042965,3.0935378 C 30.790449,3.0935378 43.079567,16.221603 42.470079,16.978956 L 31.608858,30.475150 L 19.295373,30.156846 L 6.9230610,16.787103 z "
+       id="path18153"
+       sodipodi:nodetypes="czzzccz" />
+    <path
+       style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 19.077530,30.017590 L 11.744526,21.271586 L 36.562951,14.335513 L 39.592221,20.551966 L 32.175956,29.992298"
+       id="path2164"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 18.291767,29.836259 L 10.809167,21.026146 L 35.456637,14.132812 L 38.630714,20.403811 L 31.390193,29.810968"
+       id="path2162"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 18.775313,29.957146 L 11.100386,21.296624 L 36.068405,14.232329 L 39.354114,20.824726 L 31.873739,29.931855"
+       id="path2160"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:url(#linearGradient27477);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 18.593984,30.440693 L 11.260975,21.694689 L 35.972554,14.801355 L 39.083369,21.188770 L 31.963198,30.174701"
+       id="path15105"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:url(#linearGradient27474);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 20.488434,29.064331 L 7.0924698,40.036319 L 21.001312,30.432013 L 30.019470,30.432013 L 42.438517,39.914206 L 30.575092,29.064331 L 20.488434,29.064331 z "
+       id="path14245"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       style="color:#000000;fill:url(#linearGradient27471);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+       d="M 6.9634751,16.885144 L 18.479648,31.201334 L 19.548151,30.346532 L 6.9634751,16.885144 z "
+       id="path14339"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:url(#linearGradient27468);stroke-width:0.85660428;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 7.3077115,17.131415 L 7.3388644,40.342421 L 42.283659,40.342421 L 42.221353,17.257512 C 42.219329,16.508413 31.005032,3.4591863 28.837233,3.4591863 L 20.941579,3.4591863 C 18.689313,3.4591863 7.3066655,16.351067 7.3077115,17.131415 z "
+       id="path15103"
+       sodipodi:nodetypes="ccczzzz" />
+    <path
+       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 20.957271,30.452732 L 9.0157722,38.723588 L 11.235205,38.729695 L 21.233330,31.860755 L 30.055238,30.437917 L 20.957271,30.452732 z "
+       id="path17393"
+       sodipodi:nodetypes="cccccc" />
+    <path
+       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
+       d="M 11.427536,21.670296 L 12.752479,23.080719 L 35.543311,16.196529 L 38.458445,21.878896 L 39.072496,21.166981 L 36.003081,14.789145 L 11.427536,21.670296 z "
+       id="path2174"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       style="fill:url(#linearGradient27463);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
+       d="M 13.308098,23.636340 L 19.334450,30.090093 L 20.531174,29.064331 L 30.617831,29.107071 L 31.429893,29.833651 L 35.404721,25.089502 C 34.250740,23.679081 13.308098,23.636340 13.308098,23.636340 z "
+       id="path2272"
+       sodipodi:nodetypes="ccccccc" />
+    <path
+       sodipodi:nodetypes="cccc"
+       id="path27492"
+       d="M 41.812936,17.847945 L 31.861315,30.479232 L 30.792812,29.624431 L 41.812936,17.847945 z "
+       style="color:#000000;fill:#b1b1b1;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+  </g>
+</svg>
diff --git a/src/gtk/pixmaps/qgn_addr_icon_user_group.png b/src/gtk/pixmaps/qgn_addr_icon_user_group.png
new file mode 100644 (file)
index 0000000..c5b9f6c
Binary files /dev/null and b/src/gtk/pixmaps/qgn_addr_icon_user_group.png differ
diff --git a/src/gtk/pixmaps/qgn_list_gene_attacpap.png b/src/gtk/pixmaps/qgn_list_gene_attacpap.png
new file mode 100644 (file)
index 0000000..0448a7d
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_gene_attacpap.png differ
diff --git a/src/gtk/pixmaps/qgn_list_gene_fldr_clp.png b/src/gtk/pixmaps/qgn_list_gene_fldr_clp.png
new file mode 100644 (file)
index 0000000..0034909
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_gene_fldr_clp.png differ
diff --git a/src/gtk/pixmaps/qgn_list_gene_fldr_cls.png b/src/gtk/pixmaps/qgn_list_gene_fldr_cls.png
new file mode 100644 (file)
index 0000000..976155c
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_gene_fldr_cls.png differ
diff --git a/src/gtk/pixmaps/qgn_list_gene_fldr_exp.png b/src/gtk/pixmaps/qgn_list_gene_fldr_exp.png
new file mode 100644 (file)
index 0000000..28a583f
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_gene_fldr_exp.png differ
diff --git a/src/gtk/pixmaps/qgn_list_gene_fldr_opn.png b/src/gtk/pixmaps/qgn_list_gene_fldr_opn.png
new file mode 100644 (file)
index 0000000..2bf04f2
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_gene_fldr_opn.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin.png b/src/gtk/pixmaps/qgn_list_messagin.png
new file mode 100644 (file)
index 0000000..173f657
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_drafts.png b/src/gtk/pixmaps/qgn_list_messagin_drafts.png
new file mode 100644 (file)
index 0000000..c16cdcd
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_drafts.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_editor.png b/src/gtk/pixmaps/qgn_list_messagin_editor.png
new file mode 100644 (file)
index 0000000..c68ef5e
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_editor.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr.png b/src/gtk/pixmaps/qgn_list_messagin_hdr.png
new file mode 100644 (file)
index 0000000..c61cc32
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted.png
new file mode 100644 (file)
index 0000000..9c27686
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted_high.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted_high.png
new file mode 100644 (file)
index 0000000..699a464
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted_low.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted_low.png
new file mode 100644 (file)
index 0000000..10287d5
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_encrypted_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_high.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_high.png
new file mode 100644 (file)
index 0000000..00328bc
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_high_unread.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_high_unread.png
new file mode 100644 (file)
index 0000000..0c1f206
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_high_unread.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_low.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_low.png
new file mode 100644 (file)
index 0000000..7b9493b
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_low_unread.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_low_unread.png
new file mode 100644 (file)
index 0000000..61d8b56
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_low_unread.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_signed.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_signed.png
new file mode 100644 (file)
index 0000000..ff95a21
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_signed.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_signed_high.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_signed_high.png
new file mode 100644 (file)
index 0000000..3071acd
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_signed_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_signed_low.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_signed_low.png
new file mode 100644 (file)
index 0000000..014d02f
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_signed_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_unread.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread.png
new file mode 100644 (file)
index 0000000..1c0c5f9
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted.png
new file mode 100644 (file)
index 0000000..c44ecb5
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted_high.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted_high.png
new file mode 100644 (file)
index 0000000..7fc702d
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted_low.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted_low.png
new file mode 100644 (file)
index 0000000..cc0e90e
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_encrypted_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed.png
new file mode 100644 (file)
index 0000000..ec1cc23
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed_high.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed_high.png
new file mode 100644 (file)
index 0000000..c9c4bbb
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed_low.png b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed_low.png
new file mode 100644 (file)
index 0000000..9e60c21
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_hdr_unread_signed_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_inbox.png b/src/gtk/pixmaps/qgn_list_messagin_inbox.png
new file mode 100644 (file)
index 0000000..eb79b09
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_inbox.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail.png b/src/gtk/pixmaps/qgn_list_messagin_mail.png
new file mode 100644 (file)
index 0000000..4038776
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_deleted.png b/src/gtk/pixmaps/qgn_list_messagin_mail_deleted.png
new file mode 100644 (file)
index 0000000..0e8df2d
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_deleted.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read.png b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read.png
new file mode 100644 (file)
index 0000000..2395b98
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read_high.png b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read_high.png
new file mode 100644 (file)
index 0000000..2ddb3f5
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read_low.png b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read_low.png
new file mode 100644 (file)
index 0000000..6bf9e47
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_read_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread.png b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread.png
new file mode 100644 (file)
index 0000000..e85b88c
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread_high.png b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread_high.png
new file mode 100644 (file)
index 0000000..4a34249
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread_low.png b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread_low.png
new file mode 100644 (file)
index 0000000..76dd826
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_encrypted_unread_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_high.png b/src/gtk/pixmaps/qgn_list_messagin_mail_high.png
new file mode 100644 (file)
index 0000000..92799de
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_high_unread.png b/src/gtk/pixmaps/qgn_list_messagin_mail_high_unread.png
new file mode 100644 (file)
index 0000000..f19237b
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_high_unread.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_low.png b/src/gtk/pixmaps/qgn_list_messagin_mail_low.png
new file mode 100644 (file)
index 0000000..6ee833c
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_low_unread.png b/src/gtk/pixmaps/qgn_list_messagin_mail_low_unread.png
new file mode 100644 (file)
index 0000000..739fc52
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_low_unread.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read.png b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read.png
new file mode 100644 (file)
index 0000000..5f7dd8f
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read_high.png b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read_high.png
new file mode 100644 (file)
index 0000000..8d00684
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read_low.png b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read_low.png
new file mode 100644 (file)
index 0000000..0c6b647
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_read_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread.png b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread.png
new file mode 100644 (file)
index 0000000..7ff25a5
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread_high.png b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread_high.png
new file mode 100644 (file)
index 0000000..c25a609
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread_low.png b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread_low.png
new file mode 100644 (file)
index 0000000..b07cacb
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_signed_unread_low.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_mail_unread.png b/src/gtk/pixmaps/qgn_list_messagin_mail_unread.png
new file mode 100644 (file)
index 0000000..3d15a38
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_mail_unread.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_outbox.png b/src/gtk/pixmaps/qgn_list_messagin_outbox.png
new file mode 100644 (file)
index 0000000..2b5a10a
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_outbox.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_sent.png b/src/gtk/pixmaps/qgn_list_messagin_sent.png
new file mode 100644 (file)
index 0000000..73c8c27
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_sent.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messagin_viewer.png b/src/gtk/pixmaps/qgn_list_messagin_viewer.png
new file mode 100644 (file)
index 0000000..2ee8ca1
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messagin_viewer.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messaging_high.png b/src/gtk/pixmaps/qgn_list_messaging_high.png
new file mode 100644 (file)
index 0000000..ed8cd61
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messaging_high.png differ
diff --git a/src/gtk/pixmaps/qgn_list_messaging_low.png b/src/gtk/pixmaps/qgn_list_messaging_low.png
new file mode 100644 (file)
index 0000000..fe2ff2c
Binary files /dev/null and b/src/gtk/pixmaps/qgn_list_messaging_low.png differ
diff --git a/src/gtk/pixmaps/qgn_widg_datedit.png b/src/gtk/pixmaps/qgn_widg_datedit.png
new file mode 100644 (file)
index 0000000..b942504
Binary files /dev/null and b/src/gtk/pixmaps/qgn_widg_datedit.png differ
diff --git a/src/gtk2/Makefile.am b/src/gtk2/Makefile.am
deleted file mode 100644 (file)
index 7c914b2..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Makefile.am
-# Time-stamp: <2006-07-29 20:47:31 (djcb)>
-#
-#
-# use Automake 'trick' ==> convenience static libraries, which
-# won't be installed, just for linking
-#
-INCLUDES=\
-       $(MODEST_GSTUFF_CFLAGS) \
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
-       -I ${top_srcdir}/src  \
-       -DPREFIX=\"@prefix@\" \
-       -Wall
-
-noinst_LTLIBRARIES=\
-       libmodest-ui.la
-
-PIXMAP_FILES=\
-       pixmaps/*.png \
-       pixmaps/*.svg
-
-libmodest_ui_la_SOURCES=              \
-       modest-ui.c                   \
-       modest-icon-names.h           \
-       modest-main-window.h          \
-       modest-main-window.c          \
-       modest-account-view-window.c  \
-       modest-account-view-window.h  \
-       modest-account-assistant.c    \
-       modest-account-assistant.h    \
-       modest-edit-msg-window.c      \
-       modest-edit-msg-window.h      \
-       modest-transport-widget.c     \
-       modest-transport-widget.h     \
-       modest-store-widget.c         \
-       modest-store-widget.h
-
-LDADD = \
-       $(MODEST_GSTUFF_LIBS) \
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)
-
-EXTRA_DIST=pixmaps/*
-
-pixmapdir = $(prefix)/share/modest/pixmaps
-pixmap_DATA = $(PIXMAP_FILES)
diff --git a/src/gtk2/modest-account-assistant.c b/src/gtk2/modest-account-assistant.c
deleted file mode 100644 (file)
index ddd89c9..0000000
+++ /dev/null
@@ -1,600 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "modest-account-assistant.h"
-#include "modest-store-widget.h"
-#include "modest-transport-widget.h"
-
-#include <string.h>
-
-/* 'private'/'protected' functions */
-static void       modest_account_assistant_class_init    (ModestAccountAssistantClass *klass);
-static void       modest_account_assistant_init          (ModestAccountAssistant *obj);
-static void       modest_account_assistant_finalize      (GObject *obj);
-
-/* list my signals */
-enum {
-       /* MY_SIGNAL_1, */
-       /* MY_SIGNAL_2, */
-       LAST_SIGNAL
-};
-
-typedef struct _ModestAccountAssistantPrivate ModestAccountAssistantPrivate;
-struct _ModestAccountAssistantPrivate {
-
-       ModestWidgetFactory *factory;
-       ModestAccountMgr *account_mgr;
-
-       GtkWidget *account_name;
-       GtkWidget *fullname;
-       GtkWidget *email;
-       
-       GtkWidget *store_widget;
-       GtkWidget *transport_widget;
-
-       GtkWidget *transport_holder;
-       GtkWidget *store_holder;        
-};
-
-#define MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
-                                                      MODEST_TYPE_ACCOUNT_ASSISTANT, \
-                                                      ModestAccountAssistantPrivate))
-/* globals */
-static GtkAssistantClass *parent_class = NULL;
-
-/* uncomment the following if you have defined any signals */
-/* static guint signals[LAST_SIGNAL] = {0}; */
-
-GType
-modest_account_assistant_get_type (void)
-{
-       static GType my_type = 0;
-       if (!my_type) {
-               static const GTypeInfo my_info = {
-                       sizeof(ModestAccountAssistantClass),
-                       NULL,           /* base init */
-                       NULL,           /* base finalize */
-                       (GClassInitFunc) modest_account_assistant_class_init,
-                       NULL,           /* class finalize */
-                       NULL,           /* class data */
-                       sizeof(ModestAccountAssistant),
-                       1,              /* n_preallocs */
-                       (GInstanceInitFunc) modest_account_assistant_init,
-               };
-               my_type = g_type_register_static (GTK_TYPE_ASSISTANT,
-                                                 "ModestAccountAssistant",
-                                                 &my_info, 0);
-       }
-       return my_type;
-}
-
-static void
-modest_account_assistant_class_init (ModestAccountAssistantClass *klass)
-{
-       GObjectClass *gobject_class;
-       gobject_class = (GObjectClass*) klass;
-
-       parent_class            = g_type_class_peek_parent (klass);
-       gobject_class->finalize = modest_account_assistant_finalize;
-
-       g_type_class_add_private (gobject_class, sizeof(ModestAccountAssistantPrivate));
-
-       /* signal definitions go here, e.g.: */
-/*     signals[MY_SIGNAL_1] = */
-/*             g_signal_new ("my_signal_1",....); */
-/*     signals[MY_SIGNAL_2] = */
-/*             g_signal_new ("my_signal_2",....); */
-/*     etc. */
-}
-
-
-
-static void
-add_intro_page (ModestAccountAssistant *assistant)
-{
-       GtkWidget *page, *label;
-       
-       page = gtk_vbox_new (FALSE, 6);
-       
-       label = gtk_label_new (
-               _("Welcome to the account assistant\n\n"
-                 "It will help to set up a new e-mail account\n"));
-       gtk_box_pack_start (GTK_BOX(page), label, FALSE, FALSE, 6);
-       gtk_widget_show_all (page);
-       
-       gtk_assistant_append_page (GTK_ASSISTANT(assistant), page);
-               
-       gtk_assistant_set_page_title (GTK_ASSISTANT(assistant), page,
-                                     _("Modest Account Assistant"));
-       gtk_assistant_set_page_type (GTK_ASSISTANT(assistant), page,
-                                    GTK_ASSISTANT_PAGE_INTRO);
-       gtk_assistant_set_page_complete (GTK_ASSISTANT(assistant),
-                                        page, TRUE);
-}
-
-
-static void
-set_current_page_complete (ModestAccountAssistant *self, gboolean complete)
-{
-       GtkWidget *page;
-       gint pageno;
-
-       pageno = gtk_assistant_get_current_page (GTK_ASSISTANT(self));
-       page   = gtk_assistant_get_nth_page (GTK_ASSISTANT(self), pageno);
-
-       gtk_assistant_set_page_complete (GTK_ASSISTANT(self), page, complete);
-}
-
-
-static void
-identity_page_update_completeness (GtkEditable *editable,
-                                  ModestAccountAssistant *self)
-{
-       ModestAccountAssistantPrivate *priv;
-       const gchar *txt;
-
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-
-       txt = gtk_entry_get_text (GTK_ENTRY(priv->fullname));
-       if (!txt || strlen(txt) == 0) {
-               set_current_page_complete (self, FALSE);
-               return;
-       }
-
-       /* FIXME: regexp check for email address */
-       txt = gtk_entry_get_text (GTK_ENTRY(priv->email));
-       if (!txt || strlen(txt) == 0) {
-               set_current_page_complete (self, FALSE);
-               return;
-       }
-       set_current_page_complete (self, TRUE);
-}
-
-
-static void
-add_identity_page (ModestAccountAssistant *self)
-{
-       GtkWidget *page, *label, *table;
-       ModestAccountAssistantPrivate *priv;
-
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-
-       priv->fullname = gtk_entry_new_with_max_length (40);
-       priv->email    = gtk_entry_new_with_max_length (40);
-       
-       page = gtk_vbox_new (FALSE, 6);
-
-       label = gtk_label_new (
-               _("Please enter your name and your e-mail address below.\n\n"));
-       gtk_box_pack_start (GTK_BOX(page), label, FALSE, FALSE, 6);
-       
-       table = gtk_table_new (2,2, FALSE);
-       gtk_table_attach_defaults (GTK_TABLE(table),gtk_label_new (_("Full name")),
-                                  0,1,0,1);
-       gtk_table_attach_defaults (GTK_TABLE(table),gtk_label_new (_("E-mail address")),
-                                  0,1,1,2);
-       gtk_table_attach_defaults (GTK_TABLE(table),priv->fullname,
-                                  1,2,0,1);
-       gtk_table_attach_defaults (GTK_TABLE(table),priv->email,
-                                  1,2,1,2);
-
-       g_signal_connect (G_OBJECT(priv->fullname), "changed",
-                         G_CALLBACK(identity_page_update_completeness),
-                         self);
-       g_signal_connect (G_OBJECT(priv->email), "changed",
-                         G_CALLBACK(identity_page_update_completeness),
-                         self);
-       
-       gtk_box_pack_start (GTK_BOX(page), table, FALSE, FALSE, 6);
-       gtk_widget_show_all (page);
-       
-       gtk_assistant_append_page (GTK_ASSISTANT(self), page);
-       
-       gtk_assistant_set_page_title (GTK_ASSISTANT(self), page,
-                                     _("Identity"));
-       gtk_assistant_set_page_type (GTK_ASSISTANT(self), page,
-                                    GTK_ASSISTANT_PAGE_INTRO);
-       gtk_assistant_set_page_complete (GTK_ASSISTANT(self),
-                                        page, FALSE);
-}      
-
-
-static void
-on_receiving_combo_box_changed (GtkComboBox *combo, ModestAccountAssistant *self)
-{
-       ModestAccountAssistantPrivate *priv;
-       gchar *chosen;
-       
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-       chosen = gtk_combo_box_get_active_text (GTK_COMBO_BOX(combo));
-
-       if (priv->store_widget)
-               gtk_container_remove (GTK_CONTAINER(priv->store_holder),
-                                     priv->store_widget);
-       
-       priv->store_widget = modest_store_widget_new (priv->factory, chosen);
-
-       gtk_container_add (GTK_CONTAINER(priv->store_holder),
-                          priv->store_widget);
-       
-       gtk_widget_show_all (priv->store_holder);
-       
-}      
-
-static void
-add_receiving_page (ModestAccountAssistant *self)
-{
-       GtkWidget *page, *box, *combo;
-
-       ModestAccountAssistantPrivate *priv;
-
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);      
-       page = gtk_vbox_new (FALSE, 6);
-
-       gtk_box_pack_start (GTK_BOX(page),
-                           gtk_label_new (
-                                   _("Please select among the following options")),
-                           FALSE, FALSE, 6);
-       box = gtk_hbox_new (FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(box),
-                           gtk_label_new(_("Server type")),
-                           FALSE,FALSE,6);
-
-       combo = modest_widget_factory_get_combo_box (priv->factory,
-                                                    MODEST_COMBO_BOX_TYPE_STORE_PROTOS);
-       g_signal_connect (G_OBJECT(combo), "changed",
-                         G_CALLBACK(on_receiving_combo_box_changed), self);
-
-       gtk_box_pack_start (GTK_BOX(box), combo, FALSE,FALSE,6);
-       gtk_box_pack_start (GTK_BOX(page), box, FALSE,FALSE, 6);
-       
-       gtk_box_pack_start (GTK_BOX(page), gtk_hseparator_new(), FALSE, FALSE, 0);
-
-       priv->store_holder = gtk_hbox_new (FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(page), priv->store_holder,
-                           TRUE, TRUE, 0);
-       
-       gtk_assistant_append_page (GTK_ASSISTANT(self), page);
-               
-       gtk_assistant_set_page_title (GTK_ASSISTANT(self), page,
-                                     _("Receiving mail"));
-       gtk_assistant_set_page_type (GTK_ASSISTANT(self), page,
-                                    GTK_ASSISTANT_PAGE_INTRO);
-       gtk_assistant_set_page_complete (GTK_ASSISTANT(self),
-                                        page, TRUE);
-       gtk_widget_show_all (page);
-}
-
-
-
-
-static void
-on_sending_combo_box_changed (GtkComboBox *combo, ModestAccountAssistant *self)
-{
-       ModestAccountAssistantPrivate *priv;
-       gchar *chosen;
-       
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-
-       chosen = gtk_combo_box_get_active_text (GTK_COMBO_BOX(combo));
-
-       if (priv->transport_widget)
-               gtk_container_remove (GTK_CONTAINER(priv->transport_holder),
-                                     priv->transport_widget);
-       
-       priv->transport_widget = modest_transport_widget_new (priv->factory,
-                                                             chosen);
-
-       gtk_container_add (GTK_CONTAINER(priv->transport_holder),
-                          priv->transport_widget);
-
-       gtk_widget_show_all (priv->transport_holder);
-}
-
-
-
-static void
-add_sending_page (ModestAccountAssistant *self)
-{
-       GtkWidget *page, *box, *combo;
-
-       ModestAccountAssistantPrivate *priv;
-
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-       page = gtk_vbox_new (FALSE, 6);
-       
-       gtk_box_pack_start (GTK_BOX(page),
-                           gtk_label_new (
-                                   _("Please select among the following options")),
-                           FALSE, FALSE, 0);
-       box = gtk_hbox_new (FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(box),
-                           gtk_label_new(_("Server type")),
-                           FALSE,FALSE,0);
-
-       combo = modest_widget_factory_get_combo_box (priv->factory,
-                                                    MODEST_COMBO_BOX_TYPE_TRANSPORT_PROTOS);
-       g_signal_connect (G_OBJECT(combo), "changed",
-                         G_CALLBACK(on_sending_combo_box_changed), self);
-
-       gtk_box_pack_start (GTK_BOX(box), combo, FALSE,FALSE,0);
-       gtk_box_pack_start (GTK_BOX(page), box, FALSE,FALSE, 0);
-       
-       gtk_box_pack_start (GTK_BOX(page), gtk_hseparator_new(), FALSE, FALSE, 0);
-
-       priv->transport_holder = gtk_hbox_new (FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(page), priv->transport_holder,
-                           FALSE, FALSE, 0);
-       
-       gtk_assistant_append_page (GTK_ASSISTANT(self), page);
-               
-       gtk_assistant_set_page_title (GTK_ASSISTANT(self), page,
-                                     _("Sending mail"));
-       gtk_assistant_set_page_type (GTK_ASSISTANT(self), page,
-                                    GTK_ASSISTANT_PAGE_INTRO);
-       gtk_assistant_set_page_complete (GTK_ASSISTANT(self),
-                                        page, TRUE);
-       gtk_widget_show_all (page);
-}
-
-
-
-static void
-add_final_page (ModestAccountAssistant *self)
-{
-       GtkWidget *page, *box;
-       ModestAccountAssistantPrivate *priv;
-
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-       page = gtk_vbox_new (FALSE, 6);
-       
-       gtk_box_pack_start (GTK_BOX(page),
-                           gtk_label_new (
-                                   _("We're almost done. Press 'Apply' to store this new account")),
-                           FALSE, FALSE, 6);
-       box = gtk_hbox_new (FALSE, 6);
-       priv->account_name =
-               gtk_entry_new_with_max_length (40);
-       gtk_entry_set_text (GTK_ENTRY(priv->account_name),
-                           gtk_entry_get_text(GTK_ENTRY(priv->email)));
-       gtk_box_pack_start (GTK_BOX(box),gtk_label_new(_("Account name:")),
-                           FALSE,FALSE,6);
-       gtk_box_pack_start (GTK_BOX(box),priv->account_name , FALSE,FALSE,6);
-       
-       gtk_box_pack_start (GTK_BOX(page), box, FALSE, FALSE, 6);
-       
-       gtk_assistant_append_page (GTK_ASSISTANT(self), page);
-               
-       gtk_assistant_set_page_title (GTK_ASSISTANT(self), page,
-                                     _("Account Management"));
-       gtk_assistant_set_page_type (GTK_ASSISTANT(self), page,
-                                    GTK_ASSISTANT_PAGE_CONFIRM);
-
-       gtk_assistant_set_page_complete (GTK_ASSISTANT(self),
-                                        page, TRUE);
-       gtk_widget_show_all (page);
-}
-       
-
-
-
-static void
-modest_account_assistant_init (ModestAccountAssistant *obj)
-{      
-       ModestAccountAssistantPrivate *priv;
-               
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(obj);       
-       priv->factory           = NULL;
-       priv->account_mgr       = NULL;
-
-       priv->store_widget      = NULL;
-       priv->transport_widget  = NULL;
-}
-
-static void
-modest_account_assistant_finalize (GObject *obj)
-{
-       ModestAccountAssistantPrivate *priv;
-               
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(obj);
-
-       if (priv->factory) {
-               g_object_unref (G_OBJECT(priv->factory));
-               priv->factory = NULL;
-       }
-       
-       if (priv->account_mgr) {
-               g_object_unref (G_OBJECT(priv->account_mgr));
-               priv->account_mgr = NULL;
-       }
-
-
-
-       G_OBJECT_CLASS(parent_class)->finalize (obj);
-}
-
-static void
-on_cancel (ModestAccountAssistant *self, gpointer user_data)
-{
-       GtkWidget *label;
-       GtkWidget *dialog;
-       int response;
-       
-       label = gtk_label_new (_("Are you sure you want to cancel\n"
-                                "setting up a new account?"));
-       
-       dialog = gtk_dialog_new_with_buttons (_("Cancel"),
-                                             GTK_WINDOW(self),
-                                             GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
-                                             GTK_STOCK_YES, GTK_RESPONSE_ACCEPT,
-                                             GTK_STOCK_NO,  GTK_RESPONSE_CANCEL,
-                                             NULL);
-       
-       gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox),
-                           label, FALSE, FALSE, 6);
-
-       gtk_widget_show_all ((GTK_DIALOG(dialog)->vbox));
-       
-       gtk_window_set_resizable (GTK_WINDOW(dialog), FALSE);
-       
-       response = gtk_dialog_run (GTK_DIALOG(dialog));
-       gtk_widget_destroy (dialog);
-
-       switch (response) {
-       case GTK_RESPONSE_ACCEPT:
-               /* close the assistant */
-               gtk_widget_destroy (GTK_WIDGET(self));
-               break;
-       case GTK_RESPONSE_CANCEL:
-               /* don't do anything */
-               break;
-       default: g_assert_not_reached ();
-
-       };                           
-}
-
-static const gchar*
-get_account_name (ModestAccountAssistant *self)
-{
-       ModestAccountAssistantPrivate *priv;
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-
-       return gtk_entry_get_text (GTK_ENTRY(priv->account_name));
-}
-
-static const gchar*
-get_fullname (ModestAccountAssistant *self)
-{
-       ModestAccountAssistantPrivate *priv;
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-
-       return gtk_entry_get_text (GTK_ENTRY(priv->fullname));
-}
-
-
-
-static const gchar*
-get_email (ModestAccountAssistant *self)
-{
-       ModestAccountAssistantPrivate *priv;
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-
-       return gtk_entry_get_text (GTK_ENTRY(priv->email));
-}
-
-
-
-static void
-on_apply (ModestAccountAssistant *self, gpointer user_data)
-{
-       ModestAccountAssistantPrivate *priv;
-       gchar *store_name;
-       const gchar *account_name;
-       ModestStoreWidget *store;
-
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-
-       /* create account */
-
-       /* create server account -> store */
-       store = MODEST_STORE_WIDGET(priv->store_widget);
-       store_name = g_strdup_printf ("%s:%s@%s",
-                                     modest_store_widget_get_proto (store),
-                                     modest_store_widget_get_username (store),
-                                     modest_store_widget_get_servername (store));
-       
-       modest_account_mgr_add_server_account (priv->account_mgr,
-                                               store_name,
-                                               modest_store_widget_get_servername (store),
-                                               modest_store_widget_get_username (store),
-                                               NULL,
-                                               modest_store_widget_get_proto (store));
-
-       /* create server account -> transport */
-       account_name = get_account_name (self);
-       modest_account_mgr_add_account (priv->account_mgr,
-                                       account_name,
-                                       store_name,
-                                       NULL, NULL);
-       modest_account_mgr_set_string (priv->account_mgr,
-                                      account_name,
-                                      MODEST_ACCOUNT_FULLNAME,
-                                      get_fullname(self), FALSE, NULL);
-       modest_account_mgr_set_string (priv->account_mgr,
-                                      account_name,
-                                      MODEST_ACCOUNT_EMAIL,
-                                      get_email(self), FALSE, NULL);
-       
-       g_free (store_name);
-}
-
-
-
-GtkWidget*
-modest_account_assistant_new (ModestAccountMgr *account_mgr, ModestWidgetFactory *factory)
-{
-       GObject *obj;
-       ModestAccountAssistant *self;
-       ModestAccountAssistantPrivate *priv;
-               
-       g_return_val_if_fail (factory, NULL);
-       g_return_val_if_fail (account_mgr, NULL);
-       
-       obj  = g_object_new(MODEST_TYPE_ACCOUNT_ASSISTANT, NULL);
-       self = MODEST_ACCOUNT_ASSISTANT(obj);
-
-       priv = MODEST_ACCOUNT_ASSISTANT_GET_PRIVATE(self);
-       
-       g_object_ref (factory);
-       priv->factory = factory;
-       
-       g_object_ref (account_mgr);
-       priv->account_mgr = account_mgr;
-
-       add_intro_page (self);
-       add_identity_page (self); 
-       add_receiving_page (self); 
-       add_sending_page (self);
-       add_final_page (self);
-
-       gtk_assistant_set_current_page (GTK_ASSISTANT(self), 0);
-       gtk_window_set_title (GTK_WINDOW(self),
-                             _("Modest Account Wizard"));
-       gtk_window_set_resizable (GTK_WINDOW(self), TRUE);      
-       gtk_window_set_default_size (GTK_WINDOW(self), 400, 400);
-       
-       gtk_window_set_modal (GTK_WINDOW(self), TRUE);
-
-       g_signal_connect (G_OBJECT(self), "apply",
-                         G_CALLBACK(on_apply), NULL);
-       g_signal_connect (G_OBJECT(self), "cancel",
-                         G_CALLBACK(on_cancel), NULL);
-
-       return GTK_WIDGET(self);
-}
diff --git a/src/gtk2/modest-account-assistant.h b/src/gtk2/modest-account-assistant.h
deleted file mode 100644 (file)
index 9fce688..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __MODEST_ACCOUNT_ASSISTANT_H__
-#define __MODEST_ACCOUNT_ASSISTANT_H__
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <modest-widget-factory.h>
-#include <modest-account-mgr.h>
-
-G_BEGIN_DECLS
-
-/* standard convenience macros */
-#define MODEST_TYPE_ACCOUNT_ASSISTANT             (modest_account_assistant_get_type())
-#define MODEST_ACCOUNT_ASSISTANT(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_ACCOUNT_ASSISTANT,ModestAccountAssistant))
-#define MODEST_ACCOUNT_ASSISTANT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_ACCOUNT_ASSISTANT,ModestAccountAssistantClass))
-#define MODEST_IS_ACCOUNT_ASSISTANT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_ACCOUNT_ASSISTANT))
-#define MODEST_IS_ACCOUNT_ASSISTANT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_ACCOUNT_ASSISTANT))
-#define MODEST_ACCOUNT_ASSISTANT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_ACCOUNT_ASSISTANT,ModestAccountAssistantClass))
-
-typedef struct _ModestAccountAssistant      ModestAccountAssistant;
-typedef struct _ModestAccountAssistantClass ModestAccountAssistantClass;
-
-struct _ModestAccountAssistant {
-        GtkAssistant parent;
-       /* insert public members, if any */
-};
-
-struct _ModestAccountAssistantClass {
-       GtkAssistantClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestAccountAssistant* obj); */
-};
-
-/* member functions */
-GType        modest_account_assistant_get_type    (void) G_GNUC_CONST;
-
-GtkWidget*    modest_account_assistant_new        (ModestAccountMgr* account_mgr,
-                                                  ModestWidgetFactory *factory);
-
-
-G_END_DECLS
-
-#endif /* __MODEST_ACCOUNT_ASSISTANT_H__ */
-
diff --git a/src/gtk2/modest-account-view-window.c b/src/gtk2/modest-account-view-window.c
deleted file mode 100644 (file)
index 0109396..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "modest-account-view-window.h"
-#include "modest-account-assistant.h"
-
-/* 'private'/'protected' functions */
-static void                            modest_account_view_window_class_init   (ModestAccountViewWindowClass *klass);
-static void                            modest_account_view_window_init         (ModestAccountViewWindow *obj);
-static void                            modest_account_view_window_finalize     (GObject *obj);
-
-/* list my signals */
-enum {
-       /* MY_SIGNAL_1, */
-       /* MY_SIGNAL_2, */
-       LAST_SIGNAL
-};
-
-
-typedef struct _ModestAccountViewWindowPrivate ModestAccountViewWindowPrivate;
-struct _ModestAccountViewWindowPrivate {
-       ModestAccountMgr    *account_mgr;
-       ModestWidgetFactory *widget_factory;
-       GtkWidget           *edit_button, *remove_button;
-};
-#define MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
-                                                        MODEST_TYPE_ACCOUNT_VIEW_WINDOW, \
-                                                        ModestAccountViewWindowPrivate))
-/* globals */
-static GtkWindowClass *parent_class = NULL;
-
-/* uncomment the following if you have defined any signals */
-/* static guint signals[LAST_SIGNAL] = {0}; */
-
-GType
-modest_account_view_window_get_type (void)
-{
-       static GType my_type = 0;
-       if (!my_type) {
-               static const GTypeInfo my_info = {
-                       sizeof(ModestAccountViewWindowClass),
-                       NULL,           /* base init */
-                       NULL,           /* base finalize */
-                       (GClassInitFunc) modest_account_view_window_class_init,
-                       NULL,           /* class finalize */
-                       NULL,           /* class data */
-                       sizeof(ModestAccountViewWindow),
-                       1,              /* n_preallocs */
-                       (GInstanceInitFunc) modest_account_view_window_init,
-               };
-               my_type = g_type_register_static (GTK_TYPE_WINDOW,
-                                                 "ModestAccountViewWindow",
-                                                 &my_info, 0);
-       }
-       return my_type;
-}
-
-static void
-modest_account_view_window_class_init (ModestAccountViewWindowClass *klass)
-{
-       GObjectClass *gobject_class;
-       gobject_class = (GObjectClass*) klass;
-
-       parent_class            = g_type_class_peek_parent (klass);
-       gobject_class->finalize = modest_account_view_window_finalize;
-
-       g_type_class_add_private (gobject_class, sizeof(ModestAccountViewWindowPrivate));
-
-       /* signal definitions go here, e.g.: */
-/*     signals[MY_SIGNAL_1] = */
-/*             g_signal_new ("my_signal_1",....); */
-/*     signals[MY_SIGNAL_2] = */
-/*             g_signal_new ("my_signal_2",....); */
-/*     etc. */
-}
-
-static void
-modest_account_view_window_init (ModestAccountViewWindow *obj)
-{
-       ModestAccountViewWindowPrivate *priv;
-               
-       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(obj);
-
-       priv->account_mgr    = NULL;
-       priv->widget_factory = NULL;
-}
-
-static void
-modest_account_view_window_finalize (GObject *obj)
-{
-       ModestAccountViewWindowPrivate *priv;
-               
-       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(obj);
-
-       if (priv->account_mgr) {
-               g_object_unref (G_OBJECT(priv->account_mgr));
-               priv->account_mgr = NULL;
-       }
-       
-       if (priv->widget_factory) {
-               g_object_unref (G_OBJECT(priv->widget_factory));
-               priv->widget_factory = NULL;
-       }
-
-       G_OBJECT_CLASS(parent_class)->finalize (obj);
-}
-
-
-static void
-on_selection_changed (GtkTreeSelection *sel, ModestAccountViewWindow *self)
-{
-       ModestAccountViewWindowPrivate *priv;
-       GtkTreeModel                   *model;
-       GtkTreeIter                    iter;
-       gboolean                       has_selection;
-
-       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
-
-       has_selection =
-               gtk_tree_selection_get_selected (sel, &model, &iter);
-
-       gtk_widget_set_sensitive (priv->edit_button, has_selection);
-       gtk_widget_set_sensitive (priv->remove_button, has_selection);  
-}
-
-
-
-static void
-on_remove_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
-{
-       g_message (__FUNCTION__);
-}
-
-static void
-on_edit_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
-{
-       g_message (__FUNCTION__);
-}
-
-static void
-on_add_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
-{
-       GtkWidget *assistant;
-       ModestAccountViewWindowPrivate *priv;
-       
-       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
-
-       assistant = modest_account_assistant_new (priv->account_mgr,
-                                                 priv->widget_factory);
-       gtk_window_set_transient_for (GTK_WINDOW(assistant),
-                                     GTK_WINDOW(self));
-
-       gtk_widget_show (GTK_WIDGET(assistant));
-}
-
-
-static void
-on_close_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
-{
-       gtk_widget_destroy (GTK_WIDGET(self));
-}
-
-
-
-static GtkWidget*
-button_box_new (ModestAccountViewWindow *self)
-{
-
-       GtkWidget *button_box;
-       GtkWidget *add_button, *remove_button, *edit_button;
-       ModestAccountViewWindowPrivate *priv;
-       
-       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
-       
-       button_box   = gtk_vbutton_box_new ();
-
-       add_button    = gtk_button_new_from_stock(GTK_STOCK_ADD);
-       remove_button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
-       edit_button   = gtk_button_new_from_stock(GTK_STOCK_EDIT);
-
-       g_signal_connect (G_OBJECT(add_button), "clicked",
-                         G_CALLBACK(on_add_button_clicked),
-                         self);
-       g_signal_connect (G_OBJECT(remove_button), "clicked",
-                         G_CALLBACK(on_remove_button_clicked),
-                         self);
-       g_signal_connect (G_OBJECT(edit_button), "clicked",
-                         G_CALLBACK(on_edit_button_clicked),
-                         self);
-
-       gtk_box_pack_start (GTK_BOX(button_box), add_button, FALSE, FALSE,2);
-       gtk_box_pack_start (GTK_BOX(button_box), remove_button, FALSE, FALSE,2);
-       gtk_box_pack_start (GTK_BOX(button_box), edit_button, FALSE, FALSE,2);
-
-       gtk_widget_set_sensitive (edit_button, FALSE);
-       gtk_widget_set_sensitive (remove_button, FALSE);        
-
-       /* remember these, so we can deactivate them when nothing is
-        * selected */
-       priv->remove_button = remove_button;
-       priv->edit_button   = edit_button;
-       
-       return button_box;
-}
-
-
-static GtkWidget*
-window_vbox_new (ModestAccountViewWindow *self)
-{
-       ModestAccountViewWindowPrivate *priv;
-       GtkTreeSelection *sel;
-       GtkWidget *main_hbox, *main_vbox, *button_box;
-       GtkWidget *close_button;
-       GtkWidget *close_hbox;
-       ModestAccountView *account_view;
-
-       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
-
-       main_vbox     = gtk_vbox_new (FALSE, 6);
-       main_hbox     = gtk_hbox_new (FALSE, 6);
-       
-       account_view = modest_widget_factory_get_account_view (priv->widget_factory);
-       gtk_widget_set_size_request (GTK_WIDGET(account_view), 300, 400);
-
-       sel = gtk_tree_view_get_selection (GTK_TREE_VIEW(account_view));
-       g_signal_connect (G_OBJECT(sel), "changed",  G_CALLBACK(on_selection_changed),
-                         self);
-       
-       button_box = button_box_new (self);
-       
-       gtk_box_pack_start (GTK_BOX(main_hbox), GTK_WIDGET(account_view), TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX(main_hbox), button_box, FALSE, FALSE,2);
-
-       gtk_box_pack_start (GTK_BOX(main_vbox), main_hbox, TRUE, TRUE, 2);
-
-
-       close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
-       g_signal_connect (G_OBJECT(close_button), "clicked",
-                         G_CALLBACK(on_close_button_clicked),
-                         self);
-       
-       close_hbox = gtk_hbox_new (FALSE, 2);
-       gtk_box_pack_end (GTK_BOX(close_hbox),
-                         close_button, FALSE, FALSE,2);
-       gtk_box_pack_end (GTK_BOX(main_vbox), close_hbox, FALSE, FALSE,2);
-
-       gtk_widget_show_all (main_vbox);
-       return main_vbox;
-}
-
-
-GtkWidget*
-modest_account_view_window_new (ModestAccountMgr *account_mgr, ModestWidgetFactory *factory)
-{
-       GObject *obj;
-       ModestAccountViewWindowPrivate *priv;
-
-       g_return_val_if_fail (account_mgr, NULL);
-       g_return_val_if_fail (factory, NULL);
-       
-       obj  = g_object_new(MODEST_TYPE_ACCOUNT_VIEW_WINDOW, NULL);
-       priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(obj);
-
-       g_object_ref (G_OBJECT(account_mgr));
-       priv->account_mgr = account_mgr;
-       
-       g_object_ref (G_OBJECT(factory));
-       priv->widget_factory = factory;
-
-       gtk_window_set_resizable (GTK_WINDOW(obj), FALSE);
-
-       gtk_window_set_title (GTK_WINDOW(obj), _("Accounts"));
-       gtk_window_set_type_hint (GTK_WINDOW(obj), GDK_WINDOW_TYPE_HINT_DIALOG);
-       
-       gtk_window_set_modal (GTK_WINDOW(obj), TRUE);
-               
-       gtk_container_add (GTK_CONTAINER(obj),
-                          window_vbox_new (MODEST_ACCOUNT_VIEW_WINDOW(obj)));
-               
-       return GTK_WIDGET(obj);
-}
diff --git a/src/gtk2/modest-account-view-window.h b/src/gtk2/modest-account-view-window.h
deleted file mode 100644 (file)
index 8db09c4..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* modest-account-view-window.h */
-/* insert (c)/licensing information) */
-
-#ifndef __MODEST_ACCOUNT_VIEW_WINDOW_H__
-#define __MODEST_ACCOUNT_VIEW_WINDOW_H__
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <modest-widget-factory.h>
-
-G_BEGIN_DECLS
-
-/* convenience macros */
-#define MODEST_TYPE_ACCOUNT_VIEW_WINDOW             (modest_account_view_window_get_type())
-#define MODEST_ACCOUNT_VIEW_WINDOW(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_ACCOUNT_VIEW_WINDOW,ModestAccountViewWindow))
-#define MODEST_ACCOUNT_VIEW_WINDOW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_ACCOUNT_VIEW_WINDOW,GtkWindow))
-#define MODEST_IS_ACCOUNT_VIEW_WINDOW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_ACCOUNT_VIEW_WINDOW))
-#define MODEST_IS_ACCOUNT_VIEW_WINDOW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_ACCOUNT_VIEW_WINDOW))
-#define MODEST_ACCOUNT_VIEW_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_ACCOUNT_VIEW_WINDOW,ModestAccountViewWindowClass))
-
-typedef struct _ModestAccountViewWindow      ModestAccountViewWindow;
-typedef struct _ModestAccountViewWindowClass ModestAccountViewWindowClass;
-
-struct _ModestAccountViewWindow {
-        GtkWindow parent;
-       /* insert public members, if any */
-};
-
-struct _ModestAccountViewWindowClass {
-       GtkWindowClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestAccountViewWindow* obj); */
-};
-
-/* member functions */
-GType        modest_account_view_window_get_type    (void) G_GNUC_CONST;
-
-GtkWidget*   modest_account_view_window_new         (ModestAccountMgr *account_mgr,
-                                                    ModestWidgetFactory *factory);
-
-G_END_DECLS
-
-#endif /* __MODEST_ACCOUNT_VIEW_WINDOW_H__ */
-
diff --git a/src/gtk2/modest-edit-msg-window.c b/src/gtk2/modest-edit-msg-window.c
deleted file mode 100644 (file)
index 468bf94..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#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"
-
-static void  modest_edit_msg_window_class_init   (ModestEditMsgWindowClass *klass);
-static void  modest_edit_msg_window_init         (ModestEditMsgWindow *obj);
-static void  modest_edit_msg_window_finalize     (GObject *obj);
-
-/* list my signals */
-enum {
-       /* MY_SIGNAL_1, */
-       /* MY_SIGNAL_2, */
-       LAST_SIGNAL
-};
-
-typedef struct _ModestEditMsgWindowPrivate ModestEditMsgWindowPrivate;
-struct _ModestEditMsgWindowPrivate {
-
-       ModestConf *conf;
-       ModestWidgetFactory *factory;
-       
-       GtkWidget      *toolbar, *menubar;
-       GtkWidget      *msg_body;
-       GtkWidget      *to_field, *cc_field, *bcc_field,
-                      *subject_field;
-};
-#define MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
-                                                    MODEST_TYPE_EDIT_MSG_WINDOW, \
-                                                    ModestEditMsgWindowPrivate))
-/* globals */
-static GtkWindowClass *parent_class = NULL;
-
-/* uncomment the following if you have defined any signals */
-/* static guint signals[LAST_SIGNAL] = {0}; */
-
-GType
-modest_edit_msg_window_get_type (void)
-{
-       static GType my_type = 0;
-       if (!my_type) {
-               static const GTypeInfo my_info = {
-                       sizeof(ModestEditMsgWindowClass),
-                       NULL,           /* base init */
-                       NULL,           /* base finalize */
-                       (GClassInitFunc) modest_edit_msg_window_class_init,
-                       NULL,           /* class finalize */
-                       NULL,           /* class data */
-                       sizeof(ModestEditMsgWindow),
-                       1,              /* n_preallocs */
-                       (GInstanceInitFunc) modest_edit_msg_window_init,
-                       NULL
-               };
-               my_type = g_type_register_static (GTK_TYPE_WINDOW,
-                                                 "ModestEditMsgWindow",
-                                                 &my_info, 0);
-       }
-       return my_type;
-}
-
-static void
-modest_edit_msg_window_class_init (ModestEditMsgWindowClass *klass)
-{
-       GObjectClass *gobject_class;
-       gobject_class = (GObjectClass*) klass;
-
-       parent_class            = g_type_class_peek_parent (klass);
-       gobject_class->finalize = modest_edit_msg_window_finalize;
-
-       g_type_class_add_private (gobject_class, sizeof(ModestEditMsgWindowPrivate));
-
-       /* signal definitions go here, e.g.: */
-/*     signals[MY_SIGNAL_1] = */
-/*             g_signal_new ("my_signal_1",....); */
-/*     signals[MY_SIGNAL_2] = */
-/*             g_signal_new ("my_signal_2",....); */
-/*     etc. */
-}
-
-static void
-modest_edit_msg_window_init (ModestEditMsgWindow *obj)
-{
-       ModestEditMsgWindowPrivate *priv;
-       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(obj);
-
-       priv->factory = NULL;
-       priv->toolbar = NULL;
-       priv->menubar = NULL;
-               
-}
-
-
-
-
-
-
-/* Our menu, an array of GtkItemFactoryEntry structures that defines each menu item */
-static GtkItemFactoryEntry menu_items[] = {
-       { "/_File",             NULL,                   NULL,           0, "<Branch>" },
-       { "/File/_New",         "<control>N",           NULL,           0, "<StockItem>", GTK_STOCK_NEW },
-       { "/File/_Open",        "<control>O",           NULL,           0, "<StockItem>", GTK_STOCK_OPEN },
-       { "/File/_Save",        "<control>S",           NULL,           0, "<StockItem>", GTK_STOCK_SAVE },
-       { "/File/Save _As",     NULL,                   NULL,           0, "<Item>" },
-       { "/File/Save Draft",   "<control><shift>S",    NULL,           0, "<Item>" },
-
-
-       { "/File/sep1",         NULL,                   NULL,           0, "<Separator>" },
-       { "/File/_Quit",        "<CTRL>Q",              NULL,           0, "<StockItem>", GTK_STOCK_QUIT },
-
-       { "/_Edit",             NULL,                   NULL,           0, "<Branch>" },
-       { "/Edit/_Undo",        "<CTRL>Z",              NULL,           0, "<StockItem>", GTK_STOCK_UNDO },
-       { "/Edit/_Redo",        "<shift><CTRL>Z",       NULL,           0, "<StockItem>", GTK_STOCK_REDO },
-       { "/File/sep1",         NULL,                   NULL,           0, "<Separator>" },
-       { "/Edit/Cut",          "<control>X",           NULL,           0, "<StockItem>", GTK_STOCK_CUT  },
-       { "/Edit/Copy",         "<CTRL>C",              NULL,           0, "<StockItem>", GTK_STOCK_COPY },
-       { "/Edit/Paste",        NULL,                   NULL,           0, "<StockItem>", GTK_STOCK_PASTE},
-       { "/Edit/sep1",         NULL,                   NULL,           0, "<Separator>" },
-       { "/Edit/Delete",       "<CTRL>Q",              NULL,           0, "<Item>" },
-       { "/Edit/Select all",   "<CTRL>A",              NULL,           0, "<Item>" },
-       { "/Edit/Deselect all",  "<Shift><CTRL>A",      NULL,           0, "<Item>" },
-
-       { "/_View",             NULL,           NULL,           0, "<Branch>" },
-       { "/View/To-field",          NULL,              NULL,           0, "<Item>" },
-       
-       { "/View/Cc-field:",          NULL,             NULL,           0, "<Item>" },
-       { "/View/Bcc-field:",          NULL,            NULL,           0, "<Item>" },
-       
-       
-       { "/_Insert",             NULL,         NULL,           0, "<Branch>" },
-/*     { "/Actions/_Reply",    NULL,                   NULL,           0, "<Item>" }, */
-/*     { "/Actions/_Forward",  NULL,                   NULL,           0, "<Item>" }, */
-/*     { "/Actions/_Bounce",   NULL,                   NULL,           0, "<Item>" },   */
-       
-       { "/_Format",            NULL,                  NULL,           0, "<Branch>" }
-/*     { "/Options/_Accounts",  NULL,                  on_menu_accounts,0, "<Item>" }, */
-/*     { "/Options/_Contacts",  NULL,                  NULL,           0, "<Item>" }, */
-
-
-/*     { "/_Help",         NULL,                       NULL,           0, "<Branch>" }, */
-/*     { "/_Help/About",   NULL,                       on_menu_about,  0, "<StockItem>", GTK_STOCK_ABOUT}, */
-};
-
-static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
-
-
-static GtkWidget *
-menubar_new (ModestEditMsgWindow *self)
-{
-       GtkItemFactory *item_factory;
-       GtkAccelGroup *accel_group;
-       
-       /* Make an accelerator group (shortcut keys) */
-       accel_group = gtk_accel_group_new ();
-       
-       /* Make an ItemFactory (that makes a menubar) */
-       item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>",
-                                            accel_group);
-       
-       /* This function generates the menu items. Pass the item factory,
-          the number of items in the array, the array itself, and any
-          callback data for the the menu items. */
-       gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, self);
-       
-       ///* Attach the new accelerator group to the window. */
-       gtk_window_add_accel_group (GTK_WINDOW (self), accel_group);
-       
-       /* Finally, return the actual menu bar created by the item factory. */
-       return gtk_item_factory_get_widget (item_factory, "<main>");
-}
-
-
-
-static void
-on_toolbar_button_clicked (ModestToolbar *toolbar, ModestToolbarButton button_id,
-                          ModestEditMsgWindow *self)
-{
-       switch (button_id) {
-       case MODEST_TOOLBAR_BUTTON_MAIL_SEND:
-               g_warning ("send the mail!");
-               gtk_widget_destroy (GTK_WIDGET(self));
-               break;
-               
-       case MODEST_TOOLBAR_BUTTON_REPLY:
-       case MODEST_TOOLBAR_BUTTON_REPLY_ALL:
-       case MODEST_TOOLBAR_BUTTON_FORWARD:
-       case MODEST_TOOLBAR_BUTTON_SEND_RECEIVE:
-       case MODEST_TOOLBAR_BUTTON_NEXT:
-       case MODEST_TOOLBAR_BUTTON_PREV:
-       case MODEST_TOOLBAR_BUTTON_DELETE:
-
-       default:
-               g_printerr ("modest: key %d pressed\n", button_id);
-       }
-}
-
-
-
-
-static ModestToolbar*
-toolbar_new (ModestEditMsgWindow *self)
-{
-       int i;
-       ModestToolbar *toolbar;
-       GSList *buttons = NULL;
-       ModestEditMsgWindowPrivate *priv;
-
-       ModestToolbarButton button_ids[] = {
-               MODEST_TOOLBAR_BUTTON_MAIL_SEND
-       };              
-       
-       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(self);
-
-       for (i = 0 ; i != sizeof(button_ids) / sizeof(ModestToolbarButton); ++i)
-               buttons = g_slist_append (buttons, GINT_TO_POINTER(button_ids[i]));
-       
-       toolbar = modest_widget_factory_get_edit_toolbar (priv->factory, buttons);
-       g_slist_free (buttons);
-
-       g_signal_connect (G_OBJECT(toolbar), "button_clicked",
-                         G_CALLBACK(on_toolbar_button_clicked), self);
-       
-       return toolbar;
-}
-
-
-static void
-init_window (ModestEditMsgWindow *obj)
-{
-       GtkWidget *to_button, *cc_button, *bcc_button, *subject_label; 
-       GtkWidget *header_table;
-       GtkWidget *main_vbox;
-       
-       ModestEditMsgWindowPrivate *priv;
-       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(obj);
-
-       to_button     = gtk_button_new_with_label (_("To..."));
-       cc_button     = gtk_button_new_with_label (_("Cc..."));
-       bcc_button    = gtk_button_new_with_label (_("Bcc..."));
-       subject_label = gtk_label_new (_("Subject:"));
-       
-       priv->to_field      = gtk_entry_new_with_max_length (40);
-       priv->cc_field      = gtk_entry_new_with_max_length (40);
-       priv->bcc_field     = gtk_entry_new_with_max_length (40);
-       priv->subject_field = gtk_entry_new_with_max_length (40);
-
-       header_table = gtk_table_new (4,2, FALSE);
-       gtk_table_attach (GTK_TABLE(header_table), to_button,     0,1,0,1,
-                         GTK_SHRINK, 0, 0, 0);
-       gtk_table_attach (GTK_TABLE(header_table), cc_button,     0,1,1,2,
-                         GTK_SHRINK, 0, 0, 0);
-       gtk_table_attach (GTK_TABLE(header_table), bcc_button,    0,1,2,3,
-                         GTK_SHRINK, 0, 0, 0);
-       gtk_table_attach (GTK_TABLE(header_table), subject_label, 0,1,3,4,
-                         GTK_SHRINK, 0, 0, 0);
-       gtk_table_attach_defaults (GTK_TABLE(header_table), priv->to_field,     1,2,0,1);
-       gtk_table_attach_defaults (GTK_TABLE(header_table), priv->cc_field,     1,2,1,2);
-       gtk_table_attach_defaults (GTK_TABLE(header_table), priv->bcc_field,    1,2,2,3);
-       gtk_table_attach_defaults (GTK_TABLE(header_table), priv->subject_field,1,2,3,4);
-
-       priv->msg_body = gtk_text_view_new ();
-       
-       main_vbox = gtk_vbox_new  (FALSE, 6);
-
-       priv->menubar = menubar_new (obj);
-       priv->toolbar = GTK_WIDGET(toolbar_new (obj));
-
-       gtk_box_pack_start (GTK_BOX(main_vbox), priv->menubar, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(main_vbox), priv->toolbar, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(main_vbox), header_table, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(main_vbox), priv->msg_body, TRUE, TRUE, 6);
-
-       gtk_widget_show_all (GTK_WIDGET(main_vbox));
-       gtk_container_add (GTK_CONTAINER(obj), main_vbox);
-}
-       
-
-
-static void
-modest_edit_msg_window_finalize (GObject *obj)
-{
-       ModestEditMsgWindowPrivate *priv;
-
-       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(obj);
-
-       g_object_unref (G_OBJECT(priv->conf));
-       priv->conf = NULL;
-
-       g_object_unref (G_OBJECT(priv->factory));
-       priv->factory = NULL;
-       
-       G_OBJECT_CLASS(parent_class)->finalize (obj);
-
-}
-
-
-
-static gboolean
-on_delete_event (GtkWidget *widget, GdkEvent *event, ModestEditMsgWindow *self)
-{
-       ModestEditMsgWindowPrivate *priv;
-       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(self);
-       
-       modest_widget_memory_save_settings (priv->conf,
-                                           GTK_WIDGET(priv->msg_body),
-                                           "modest-edit-msg-body");
-       return FALSE;
-}
-
-
-GtkWidget*
-modest_edit_msg_window_new (ModestConf *conf, ModestWidgetFactory *factory,
-                           ModestEditType type, TnyMsgIface *msg)
-{
-       GObject *obj;
-       ModestEditMsgWindowPrivate *priv;
-
-       g_return_val_if_fail (conf, NULL);
-       g_return_val_if_fail (factory, NULL);
-       g_return_val_if_fail (type >= 0 && type < MODEST_EDIT_TYPE_NUM, NULL);
-       g_return_val_if_fail (!(type==MODEST_EDIT_TYPE_NEW && msg), NULL); 
-       g_return_val_if_fail (!(type!=MODEST_EDIT_TYPE_NEW && !msg), NULL);     
-       
-       obj = g_object_new(MODEST_TYPE_EDIT_MSG_WINDOW, NULL);
-       priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(obj);
-
-       g_object_ref (G_OBJECT(conf));
-       priv->conf = conf;
-
-       g_object_ref (factory);
-       priv->factory = factory;
-
-       init_window (MODEST_EDIT_MSG_WINDOW(obj));
-       
-       modest_widget_memory_restore_settings (priv->conf, GTK_WIDGET(obj),
-                                              "modest-edit-msg-body");
-       
-       gtk_window_set_title (GTK_WINDOW(obj), "Modest");
-       gtk_window_set_icon  (GTK_WINDOW(obj),
-                             modest_icon_factory_get_icon (MODEST_APP_ICON));
-
-       g_signal_connect (G_OBJECT(obj), "delete-event",
-                         G_CALLBACK(on_delete_event), obj);
-       
-       return GTK_WIDGET (obj);
-}
diff --git a/src/gtk2/modest-edit-msg-window.h b/src/gtk2/modest-edit-msg-window.h
deleted file mode 100644 (file)
index 422e0d3..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __MODEST_EDIT_MSG_WINDOW_H__
-#define __MODEST_EDIT_MSG_WINDOW_H__
-
-#include <gtk/gtk.h>
-#include <tny-msg-iface.h>
-#include <modest-conf.h>
-#include <modest-widget-factory.h>
-#include <glib/gi18n.h>
-
-
-G_BEGIN_DECLS
-
-/* convenience macros */
-#define MODEST_TYPE_EDIT_MSG_WINDOW             (modest_edit_msg_window_get_type())
-#define MODEST_EDIT_MSG_WINDOW(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_EDIT_MSG_WINDOW,ModestEditMsgWindow))
-#define MODEST_EDIT_MSG_WINDOW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_EDIT_MSG_WINDOW,GtkWindow))
-#define MODEST_IS_EDIT_MSG_WINDOW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_EDIT_MSG_WINDOW))
-#define MODEST_IS_EDIT_MSG_WINDOW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_EDIT_MSG_WINDOW))
-#define MODEST_EDIT_MSG_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_EDIT_MSG_WINDOW,ModestEditMsgWindowClass))
-
-typedef struct _ModestEditMsgWindow      ModestEditMsgWindow;
-typedef struct _ModestEditMsgWindowClass ModestEditMsgWindowClass;
-
-struct _ModestEditMsgWindow {
-        GtkWindow parent;
-       /* insert public members, if any */
-};
-
-struct _ModestEditMsgWindowClass {
-       GtkWindowClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestEditMsgWindow* obj); */
-};
-
-
-enum _ModestEditType {
-       MODEST_EDIT_TYPE_NEW,
-       MODEST_EDIT_TYPE_REPLY,
-       MODEST_EDIT_TYPE_FORWARD,
-       MODEST_EDIT_TYPE_VIEW,
-       
-       MODEST_EDIT_TYPE_NUM
-};
-typedef enum _ModestEditType ModestEditType;
-
-
-/* member functions */
-GType        modest_edit_msg_window_get_type    (void) G_GNUC_CONST;
-
-GtkWidget*   modest_edit_msg_window_new         (ModestConf *conf,
-                                                ModestWidgetFactory *factory,
-                                                ModestEditType type,
-                                                TnyMsgIface *msg);
-G_END_DECLS
-
-#endif /* __MODEST_EDIT_MSG_WINDOW_H__ */
-
diff --git a/src/gtk2/modest-icon-names.h b/src/gtk2/modest-icon-names.h
deleted file mode 100644 (file)
index fc39ad5..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-/* modest-tny-icon-names.h */
-
-/*
- * FIXME: this should go the front-end dirs,
- * with specific icons
- */
-
-#ifndef __MODEST_TNY_ICON_NAMES_H__
-#define __MODEST_TNY_ICON_NAMES_H__
-
-#define PIXMAP_PREFIX PREFIX "/share/modest/pixmaps/"
-
-/* icons */
-
-#define MODEST_APP_ICON                                PIXMAP_PREFIX "internet-mail.svg"
-
-#define MODEST_HEADER_ICON_READ                        PIXMAP_PREFIX "qgn_list_messagin_mail.png"
-#define MODEST_HEADER_ICON_UNREAD              PIXMAP_PREFIX "qgn_list_messagin_mail_unread.png"
-#define MODEST_HEADER_ICON_DELETED             PIXMAP_PREFIX "qgn_list_messagin_mail_deleted.png"
-#define MODEST_HEADER_ICON_ATTACH              PIXMAP_PREFIX "qgn_list_gene_attacpap.png"
-
-#define MODEST_FOLDER_ICON_OPEN                        PIXMAP_PREFIX "qgn_list_gene_fldr_opn.png"
-#define MODEST_FOLDER_ICON_CLOSED              PIXMAP_PREFIX "qgn_list_gene_fldr_cls.png"
-
-#define MODEST_FOLDER_ICON_INBOX               PIXMAP_PREFIX "qgn_list_messagin_inbox.png"
-#define MODEST_FOLDER_ICON_OUTBOX              PIXMAP_PREFIX "qgn_list_messagin_outbox.png"
-#define MODEST_FOLDER_ICON_SENT                        PIXMAP_PREFIX "qgn_list_messagin_sent.png"
-#define MODEST_FOLDER_ICON_TRASH               PIXMAP_PREFIX "qgn_list_messagin_mail_deleted.png"
-#define MODEST_FOLDER_ICON_JUNK                        PIXMAP_PREFIX "qgn_list_messagin_mail_deleted.png"
-#define MODEST_FOLDER_ICON_DRAFTS              PIXMAP_PREFIX "qgn_list_messagin_drafts.png"
-#define MODEST_FOLDER_ICON_NORMAL              PIXMAP_PREFIX "qgn_list_gene_fldr_cls.png"
-
-#define MODEST_FOLDER_ICON_CONTACTS            PIXMAP_PREFIX "qgn_addr_icon_user_group.png"
-#define MODEST_FOLDER_ICON_NOTES               PIXMAP_PREFIX "qgn_list_messagin_viewer.png"
-#define MODEST_FOLDER_ICON_CALENDAR            PIXMAP_PREFIX "qgn_widg_datedit.png"
-
-/* toolbar */
-#define  MODEST_TOOLBAR_ICON_MAIL_SEND         PIXMAP_PREFIX "gnome-stock-mail-new.svg"
-#define  MODEST_TOOLBAR_ICON_NEW_MAIL          PIXMAP_PREFIX "gnome-stock-mail-new.svg"
-#define  MODEST_TOOLBAR_ICON_SEND_RECEIVE      PIXMAP_PREFIX "gtk-refresh.svg"
-#define  MODEST_TOOLBAR_ICON_REPLY             PIXMAP_PREFIX "gnome-stock-mail-rpl.svg"
-#define  MODEST_TOOLBAR_ICON_REPLY_ALL         PIXMAP_PREFIX "mail-reply-all.svg"
-#define  MODEST_TOOLBAR_ICON_FORWARD           PIXMAP_PREFIX "forward.svg"
-#define  MODEST_TOOLBAR_ICON_DELETE            PIXMAP_PREFIX "edit-delete.svg"
-#define  MODEST_TOOLBAR_ICON_NEXT              PIXMAP_PREFIX "back.svg"
-#define  MODEST_TOOLBAR_ICON_PREV              PIXMAP_PREFIX "forward.svg"
-#define  MODEST_TOOLBAR_ICON_STOP              PIXMAP_PREFIX "stock-stop.svg"
-
-#endif  /*__MODEST_TNY_ICON_NAMES_H__*/
diff --git a/src/gtk2/modest-main-window.c b/src/gtk2/modest-main-window.c
deleted file mode 100644 (file)
index b863849..0000000
+++ /dev/null
@@ -1,565 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <modest-widget-memory.h>
-#include <modest-icon-factory.h>
-
-#include <widgets/modest-toolbar.h>
-
-#include "modest-main-window.h"
-#include "modest-account-view-window.h"
-#include "modest-edit-msg-window.h"
-#include "modest-icon-names.h"
-
-
-/* 'private'/'protected' functions */
-static void modest_main_window_class_init    (ModestMainWindowClass *klass);
-static void modest_main_window_init          (ModestMainWindow *obj);
-static void modest_main_window_finalize      (GObject *obj);
-
-static void restore_sizes (ModestMainWindow *self);
-static void save_sizes (ModestMainWindow *self);
-
-/* list my signals */
-enum {
-       /* MY_SIGNAL_1, */
-       /* MY_SIGNAL_2, */
-       LAST_SIGNAL
-};
-
-typedef struct _ModestMainWindowPrivate ModestMainWindowPrivate;
-struct _ModestMainWindowPrivate {
-
-       GtkWidget *toolbar;
-       GtkWidget *menubar;
-
-       GtkWidget *folder_paned;
-       GtkWidget *msg_paned;
-       GtkWidget *main_paned;
-       
-       ModestWidgetFactory *factory;
-       ModestConf *conf;
-       ModestAccountMgr *account_mgr;
-       
-       ModestHeaderView *header_view;
-       ModestFolderView *folder_view;
-       ModestMsgView    *msg_preview;
-};
-
-
-#define MODEST_MAIN_WINDOW_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
-                                                MODEST_TYPE_MAIN_WINDOW, \
-                                                ModestMainWindowPrivate))
-/* globals */
-static GtkWindowClass *parent_class = NULL;
-
-/* uncomment the following if you have defined any signals */
-/* static guint signals[LAST_SIGNAL] = {0}; */
-
-GType
-modest_main_window_get_type (void)
-{
-       static GType my_type = 0;
-       if (!my_type) {
-               static const GTypeInfo my_info = {
-                       sizeof(ModestMainWindowClass),
-                       NULL,           /* base init */
-                       NULL,           /* base finalize */
-                       (GClassInitFunc) modest_main_window_class_init,
-                       NULL,           /* class finalize */
-                       NULL,           /* class data */
-                       sizeof(ModestMainWindow),
-                       1,              /* n_preallocs */
-                       (GInstanceInitFunc) modest_main_window_init,
-                       NULL
-               };
-               my_type = g_type_register_static (GTK_TYPE_WINDOW,
-                                                 "ModestMainWindow",
-                                                 &my_info, 0);
-       }
-       return my_type;
-}
-
-static void
-modest_main_window_class_init (ModestMainWindowClass *klass)
-{
-       GObjectClass *gobject_class;
-       gobject_class = (GObjectClass*) klass;
-
-       parent_class            = g_type_class_peek_parent (klass);
-       gobject_class->finalize = modest_main_window_finalize;
-
-       g_type_class_add_private (gobject_class, sizeof(ModestMainWindowPrivate));
-
-       /* signal definitions go here, e.g.: */
-/*     signals[MY_SIGNAL_1] = */
-/*             g_signal_new ("my_signal_1",....); */
-/*     signals[MY_SIGNAL_2] = */
-/*             g_signal_new ("my_signal_2",....); */
-/*     etc. */
-}
-
-static void
-modest_main_window_init (ModestMainWindow *obj)
-{
-       ModestMainWindowPrivate *priv;
-
-       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(obj);
-
-       priv->factory = NULL;
-       priv->conf           = NULL;
-       priv->account_mgr    = NULL;
-}
-
-static void
-modest_main_window_finalize (GObject *obj)
-{
-       ModestMainWindowPrivate *priv;  
-       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(obj);
-       if (priv->factory) {
-               g_object_unref (G_OBJECT(priv->factory));
-               priv->factory = NULL;
-       }
-       if (priv->conf) {
-               g_object_unref (G_OBJECT(priv->conf));
-               priv->conf = NULL;
-       }               
-
-       if (priv->account_mgr) {
-               g_object_unref (G_OBJECT(priv->account_mgr));
-               priv->account_mgr = NULL;
-       }               
-
-       G_OBJECT_CLASS(parent_class)->finalize (obj);
-}
-
-
-static void
-on_menu_about (GtkWidget *widget, gpointer data)
-{
-       GtkWidget *about;
-       const gchar *authors[] = {
-               "Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>",
-               NULL
-       };      
-       about = gtk_about_dialog_new ();
-       gtk_about_dialog_set_name (GTK_ABOUT_DIALOG(about), PACKAGE_NAME);
-       gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(about),PACKAGE_VERSION);
-       gtk_about_dialog_set_copyright (
-               GTK_ABOUT_DIALOG(about),
-               _("Copyright (c) 2006, Nokia Corporation\n"
-                 "All rights reserved."));
-       gtk_about_dialog_set_comments ( GTK_ABOUT_DIALOG(about),
-               _("a modest e-mail client\n\n"
-                 "design and implementation: Dirk-Jan C. Binnema\n"
-                 "contributions from the fine people at KernelConcepts\n\n"
-                 "uses the tinymail email framework written by Philip van Hoof"));
-       gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG(about), authors);
-       gtk_about_dialog_set_website (GTK_ABOUT_DIALOG(about), "http://modest.garage.maemo.org");
-
-       gtk_dialog_run (GTK_DIALOG (about));
-       gtk_widget_destroy(about);
-}
-
-
-static void
-on_menu_accounts (ModestMainWindow *self, guint action, GtkWidget *widget)
-{
-       GtkWidget *account_win;
-       ModestMainWindowPrivate *priv;
-
-       g_return_if_fail (widget);
-       g_return_if_fail (self);
-       
-       priv        = MODEST_MAIN_WINDOW_GET_PRIVATE(self);     
-       account_win = modest_account_view_window_new (priv->account_mgr,
-                                                     priv->factory);
-
-       gtk_window_set_transient_for (GTK_WINDOW(account_win),
-                                     GTK_WINDOW(self));
-                                     
-       gtk_widget_show (account_win);
-}
-
-
-static void
-on_menu_new_message (ModestMainWindow *self, guint action, GtkWidget *widget)
-{
-       GtkWidget *msg_win;
-       ModestMainWindowPrivate *priv;
-
-       priv  = MODEST_MAIN_WINDOW_GET_PRIVATE(self);   
-
-       msg_win = modest_edit_msg_window_new (priv->conf,
-                                             priv->factory,
-                                             MODEST_EDIT_TYPE_NEW,
-                                             NULL);
-       gtk_widget_show (msg_win);
-}
-
-static void
-on_menu_quit (ModestMainWindow *self, guint action, GtkWidget *widget)
-{
-       save_sizes (self);
-       gtk_widget_destroy (GTK_WIDGET(self));
-}
-
-
-/* Our menu, an array of GtkItemFactoryEntry structures that defines each menu item */
-static GtkItemFactoryEntry menu_items[] = {
-       { "/_File",             NULL,                   NULL,           0, "<Branch>" },
-       { "/File/_New",         "<control>N",           NULL,           0, "<StockItem>", GTK_STOCK_NEW },
-       { "/File/_Open",        "<control>O",           NULL,           0, "<StockItem>", GTK_STOCK_OPEN },
-       { "/File/_Save",        "<control>S",           NULL,           0, "<StockItem>", GTK_STOCK_SAVE },
-       { "/File/Save _As",     NULL,                   NULL,           0, "<Item>" },
-       { "/File/sep1",         NULL,                   NULL,           0, "<Separator>" },
-       { "/File/_Quit",        "<CTRL>Q",              on_menu_quit,  0, "<StockItem>", GTK_STOCK_QUIT },
-
-       { "/_Edit",             NULL,                   NULL,           0, "<Branch>" },
-       { "/Edit/_Undo",        "<CTRL>Z",              NULL,           0, "<StockItem>", GTK_STOCK_UNDO },
-       { "/Edit/_Redo",        "<shift><CTRL>Z",       NULL,           0, "<StockItem>", GTK_STOCK_REDO },
-       { "/File/sep1",         NULL,                   NULL,           0, "<Separator>" },
-       { "/Edit/Cut",          "<control>X",           NULL,           0, "<StockItem>", GTK_STOCK_CUT  },
-       { "/Edit/Copy",         "<CTRL>C",              NULL,           0, "<StockItem>", GTK_STOCK_COPY },
-       { "/Edit/Paste",        NULL,                   NULL,           0, "<StockItem>", GTK_STOCK_PASTE},
-       { "/Edit/sep1",         NULL,                   NULL,           0, "<Separator>" },
-       { "/Edit/Delete",       "<CTRL>Q",              NULL,           0, "<Item>" },
-       { "/Edit/Select all",   "<CTRL>A",              NULL,           0, "<Item>" },
-       { "/Edit/Deelect all",  "<Shift><CTRL>A",       NULL,           0, "<Item>" },
-
-       { "/_Actions",                NULL,             NULL,           0, "<Branch>" },
-       { "/Actions/_New Message",    NULL,             on_menu_new_message,            0, "<Item>" },
-       { "/Actions/_Reply",    NULL,                   NULL,           0, "<Item>" },
-       { "/Actions/_Forward",  NULL,                   NULL,           0, "<Item>" },
-       { "/Actions/_Bounce",   NULL,                   NULL,           0, "<Item>" },  
-       
-       { "/_Options",           NULL,                  NULL,           0, "<Branch>" },
-       { "/Options/_Accounts",  NULL,                  on_menu_accounts,0, "<Item>" },
-       { "/Options/_Contacts",  NULL,                  NULL,           0, "<Item>" },
-
-
-       { "/_Help",         NULL,                       NULL,           0, "<Branch>" },
-       { "/_Help/About",   NULL,                       on_menu_about,  0, "<StockItem>", GTK_STOCK_ABOUT},
-};
-
-static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
-
-
-static GtkWidget *
-menubar_new (ModestMainWindow *self)
-{
-       GtkItemFactory *item_factory;
-       GtkAccelGroup *accel_group;
-       
-       /* Make an accelerator group (shortcut keys) */
-       accel_group = gtk_accel_group_new ();
-       
-       /* Make an ItemFactory (that makes a menubar) */
-       item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>",
-                                            accel_group);
-       
-       /* This function generates the menu items. Pass the item factory,
-          the number of items in the array, the array itself, and any
-          callback data for the the menu items. */
-       gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, self);
-       
-       ///* Attach the new accelerator group to the window. */
-       gtk_window_add_accel_group (GTK_WINDOW (self), accel_group);
-       
-       /* Finally, return the actual menu bar created by the item factory. */
-       return gtk_item_factory_get_widget (item_factory, "<main>");
-}
-
-
-
-
-static ModestHeaderView*
-header_view_new (ModestMainWindow *self)
-{
-       int i;
-       GSList *columns = NULL;
-       ModestHeaderView *header_view;
-       ModestMainWindowPrivate *priv;
-       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 */
-       };
-       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
-       
-       for (i = 0 ; i != sizeof(cols) / sizeof(ModestHeaderViewColumn); ++i)
-               columns = g_slist_append (columns, GINT_TO_POINTER(cols[i]));
-
-       header_view = modest_widget_factory_get_header_view (priv->factory);
-       modest_header_view_set_columns (header_view, columns);
-       g_slist_free (columns);
-
-       return header_view;
-}
-
-static void
-on_toolbar_button_clicked (ModestToolbar *toolbar, ModestToolbarButton button_id,
-                          ModestMainWindow *self)
-{
-       switch (button_id) {
-       case MODEST_TOOLBAR_BUTTON_NEW_MAIL:
-               on_menu_new_message (self, 0, NULL);
-               break;
-               
-       case MODEST_TOOLBAR_BUTTON_REPLY:
-       case MODEST_TOOLBAR_BUTTON_REPLY_ALL:
-       case MODEST_TOOLBAR_BUTTON_FORWARD:
-       case MODEST_TOOLBAR_BUTTON_SEND_RECEIVE:
-       case MODEST_TOOLBAR_BUTTON_NEXT:
-       case MODEST_TOOLBAR_BUTTON_PREV:
-       case MODEST_TOOLBAR_BUTTON_DELETE:
-
-       default:
-               g_printerr ("modest: key %d pressed\n", button_id);
-       }
-}
-
-static ModestToolbar*
-toolbar_new (ModestMainWindow *self)
-{
-       int i;
-       ModestToolbar *toolbar;
-       GSList *buttons = NULL;
-       ModestMainWindowPrivate *priv;
-
-       ModestToolbarButton button_ids[] = {
-               MODEST_TOOLBAR_BUTTON_NEW_MAIL,
-               MODEST_TOOLBAR_BUTTON_REPLY,
-               MODEST_TOOLBAR_BUTTON_REPLY_ALL,
-               MODEST_TOOLBAR_BUTTON_FORWARD,
-               MODEST_TOOLBAR_SEPARATOR,
-               MODEST_TOOLBAR_BUTTON_SEND_RECEIVE,
-               MODEST_TOOLBAR_SEPARATOR,
-               MODEST_TOOLBAR_BUTTON_NEXT,
-               MODEST_TOOLBAR_BUTTON_PREV,
-               MODEST_TOOLBAR_SEPARATOR,               
-               MODEST_TOOLBAR_BUTTON_DELETE
-       };              
-       
-       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
-
-       for (i = 0 ; i != sizeof(button_ids) / sizeof(ModestToolbarButton); ++i)
-               buttons = g_slist_append (buttons, GINT_TO_POINTER(button_ids[i]));
-       
-       toolbar = modest_widget_factory_get_main_toolbar (priv->factory, buttons);
-       g_slist_free (buttons);
-       
-       g_signal_connect (G_OBJECT(toolbar), "button_clicked",
-                         G_CALLBACK(on_toolbar_button_clicked), self);
-       
-       return toolbar;
-}
-
-
-
-static void
-restore_sizes (ModestMainWindow *self)
-{
-       ModestMainWindowPrivate *priv;  
-       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
-       
-       modest_widget_memory_restore_settings (priv->conf,GTK_WIDGET(self),
-                                              "modest-main-window");
-       modest_widget_memory_restore_settings (priv->conf, GTK_WIDGET(priv->folder_paned),
-                                              "modest-folder-paned");
-       modest_widget_memory_restore_settings (priv->conf, GTK_WIDGET(priv->msg_paned),
-                                              "modest-msg-paned");
-       modest_widget_memory_restore_settings (priv->conf, GTK_WIDGET(priv->main_paned),
-                                              "modest-main-paned");
-}
-
-
-static void
-save_sizes (ModestMainWindow *self)
-{
-       ModestMainWindowPrivate *priv;
-       
-       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
-       
-       modest_widget_memory_save_settings (priv->conf,GTK_WIDGET(self),
-                                           "modest-main-window");
-       modest_widget_memory_save_settings (priv->conf, GTK_WIDGET(priv->folder_paned),
-                                           "modest-folder-paned");
-       modest_widget_memory_save_settings (priv->conf, GTK_WIDGET(priv->msg_paned),
-                                           "modest-msg-paned");
-       modest_widget_memory_save_settings (priv->conf, GTK_WIDGET(priv->main_paned),
-                                           "modest-main-paned");
-}
-
-static GtkWidget*
-wrapped_in_scrolled_window (GtkWidget *widget, gboolean needs_viewport)
-{
-       GtkWidget *win;
-
-       win = gtk_scrolled_window_new (NULL, NULL);
-       gtk_scrolled_window_set_policy
-               (GTK_SCROLLED_WINDOW (win),GTK_POLICY_NEVER,
-                GTK_POLICY_AUTOMATIC);
-       
-       if (needs_viewport)
-               gtk_scrolled_window_add_with_viewport
-                       (GTK_SCROLLED_WINDOW(win), widget);
-       else
-               gtk_container_add (GTK_CONTAINER(win),
-                                  widget);
-
-       return win;
-}
-
-
-static gboolean
-on_delete_event (GtkWidget *widget, GdkEvent  *event, ModestMainWindow *self)
-{
-       save_sizes (self);
-       return FALSE;
-}
-
-static GtkWidget*
-favorites_view ()
-{
-       GtkWidget *favorites;
-       GtkTreeStore *store;
-       GtkTreeViewColumn *col;
-
-       store = gtk_tree_store_new (1, G_TYPE_STRING);
-       favorites = gtk_tree_view_new_with_model (GTK_TREE_MODEL(store));
-       col = gtk_tree_view_column_new_with_attributes (_("Favorites"),
-                                                       gtk_cell_renderer_text_new(),
-                                                       "text", 0, NULL);
-       
-       gtk_tree_view_append_column (GTK_TREE_VIEW(favorites), col);
-       gtk_widget_show_all (favorites);
-
-       g_object_unref (G_OBJECT(store));
-
-       return favorites;
-}
-
-
-
-GtkWidget*
-modest_main_window_new (ModestConf *conf, ModestAccountMgr *account_mgr,
-                       ModestWidgetFactory *factory)
-{
-       GObject *obj;
-       ModestMainWindowPrivate *priv;
-       
-       GtkWidget *main_vbox;
-       GtkWidget *status_hbox;
-       GtkWidget *header_win, *folder_win, *favorites_win;
-       
-       g_return_val_if_fail (factory, NULL);
-       g_return_val_if_fail (conf, NULL);
-
-       obj  = g_object_new(MODEST_TYPE_MAIN_WINDOW, NULL);
-       priv = MODEST_MAIN_WINDOW_GET_PRIVATE(obj);
-
-       g_object_ref (factory);
-       priv->factory = factory;
-
-       g_object_ref (conf);
-       priv->conf = conf;
-       
-       g_object_ref (account_mgr);
-       priv->account_mgr = account_mgr;
-
-       /* widgets from factory */
-       priv->folder_view = modest_widget_factory_get_folder_view (factory);
-       priv->header_view = header_view_new (MODEST_MAIN_WINDOW(obj));
-       priv->msg_preview = modest_widget_factory_get_msg_preview (factory);
-       
-       folder_win = wrapped_in_scrolled_window (GTK_WIDGET(priv->folder_view),
-                                                FALSE);
-       header_win = wrapped_in_scrolled_window (GTK_WIDGET(priv->header_view),
-                                                FALSE);                           
-       favorites_win = wrapped_in_scrolled_window (favorites_view(),FALSE);                       
-       
-       /* tool/menubar */
-       priv->menubar = menubar_new (MODEST_MAIN_WINDOW(obj));
-       priv->toolbar = GTK_WIDGET(toolbar_new (MODEST_MAIN_WINDOW(obj)));
-
-       /* paned */
-       priv->folder_paned = gtk_vpaned_new ();
-       priv->msg_paned = gtk_vpaned_new ();
-       priv->main_paned = gtk_hpaned_new ();
-       gtk_paned_add1 (GTK_PANED(priv->main_paned), priv->folder_paned);
-       gtk_paned_add2 (GTK_PANED(priv->main_paned), priv->msg_paned);
-       gtk_paned_add1 (GTK_PANED(priv->folder_paned), favorites_win);
-       gtk_paned_add2 (GTK_PANED(priv->folder_paned), folder_win);
-       gtk_paned_add1 (GTK_PANED(priv->msg_paned), header_win);
-       gtk_paned_add2 (GTK_PANED(priv->msg_paned), GTK_WIDGET(priv->msg_preview));
-
-       gtk_widget_show (GTK_WIDGET(priv->header_view));
-       gtk_tree_view_columns_autosize (GTK_TREE_VIEW(priv->header_view));
-
-       
-       /* status bar / progress */
-       status_hbox = gtk_hbox_new (FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(status_hbox),
-                           modest_widget_factory_get_folder_info_label (factory),
-                           FALSE,FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(status_hbox),
-                           modest_widget_factory_get_status_bar(factory),
-                           TRUE, TRUE, 0);
-       gtk_box_pack_start (GTK_BOX(status_hbox),
-                           modest_widget_factory_get_progress_bar(factory),
-                           FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(status_hbox),
-                         modest_widget_factory_get_online_toggle(factory),
-                         FALSE, FALSE, 0);
-
-       /* putting it all together... */
-       main_vbox = gtk_vbox_new (FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(main_vbox), priv->menubar, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(main_vbox), priv->toolbar, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(main_vbox), priv->main_paned, TRUE, TRUE,0);
-       gtk_box_pack_start (GTK_BOX(main_vbox), status_hbox, FALSE, FALSE, 0);
-       
-       gtk_container_add (GTK_CONTAINER(obj), main_vbox);
-       restore_sizes (MODEST_MAIN_WINDOW(obj));        
-
-       gtk_window_set_title (GTK_WINDOW(obj), "Modest");
-       gtk_window_set_icon  (GTK_WINDOW(obj),
-                             modest_icon_factory_get_icon (MODEST_APP_ICON));
-       
-       gtk_widget_show_all (main_vbox);
-
-       g_signal_connect (G_OBJECT(obj), "delete-event",
-                         G_CALLBACK(on_delete_event), obj);
-       
-       return GTK_WIDGET(obj);
-}
diff --git a/src/gtk2/modest-main-window.h b/src/gtk2/modest-main-window.h
deleted file mode 100644 (file)
index 94c02ac..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* modest-main-window.h */
-/* insert (c)/licensing information) */
-
-#ifndef __MODEST_MAIN_WINDOW_H__
-#define __MODEST_MAIN_WINDOW_H__
-
-#include <gtk/gtkwindow.h>
-#include <glib/gi18n.h>
-#include <modest-widget-factory.h>
-#include <modest-conf.h>
-#include <modest-account-mgr.h>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif /*HAVE_CONFIG_H*/
-
-G_BEGIN_DECLS
-
-/* convenience macros */
-#define MODEST_TYPE_MAIN_WINDOW             (modest_main_window_get_type())
-#define MODEST_MAIN_WINDOW(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_MAIN_WINDOW,ModestMainWindow))
-#define MODEST_MAIN_WINDOW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_MAIN_WINDOW,GtkWindow))
-#define MODEST_IS_MAIN_WINDOW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_MAIN_WINDOW))
-#define MODEST_IS_MAIN_WINDOW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_MAIN_WINDOW))
-#define MODEST_MAIN_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_MAIN_WINDOW,ModestMainWindowClass))
-
-typedef struct _ModestMainWindow      ModestMainWindow;
-typedef struct _ModestMainWindowClass ModestMainWindowClass;
-
-struct _ModestMainWindow {
-        GtkWindow parent;
-       /* insert public members, if any */
-};
-
-struct _ModestMainWindowClass {
-       GtkWindowClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestMainWindow* obj); */
-};
-
-/* member functions */
-GType        modest_main_window_get_type    (void) G_GNUC_CONST;
-
-
-GtkWidget*   modest_main_window_new         (ModestConf *conf, ModestAccountMgr *account_mgr,
-                                            ModestWidgetFactory *factory);
-
-G_END_DECLS
-
-#endif /* __MODEST_MAIN_WINDOW_H__ */
-
diff --git a/src/gtk2/modest-store-widget.c b/src/gtk2/modest-store-widget.c
deleted file mode 100644 (file)
index a537831..0000000
+++ /dev/null
@@ -1,354 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "modest-store-widget.h"
-#include <string.h>
-
-/* 'private'/'protected' functions */
-static void modest_store_widget_class_init (ModestStoreWidgetClass *klass);
-static void modest_store_widget_init       (ModestStoreWidget *obj);
-static void modest_store_widget_finalize   (GObject *obj);
-/* list my signals  */
-enum {
-       /* MY_SIGNAL_1, */
-       /* MY_SIGNAL_2, */
-       LAST_SIGNAL
-};
-
-typedef struct _ModestStoreWidgetPrivate ModestStoreWidgetPrivate;
-struct _ModestStoreWidgetPrivate {
-       
-       gchar* proto;
-       
-       GtkWidget *servername;
-       GtkWidget *username;
-       GtkWidget *security;
-       GtkWidget *auth;
-       GtkWidget *chooser;
-       GtkWidget *remember_pwd;
-       
-       ModestWidgetFactory *factory;
-};
-#define MODEST_STORE_WIDGET_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
-                                                 MODEST_TYPE_STORE_WIDGET, \
-                                                 ModestStoreWidgetPrivate))
-/* globals */
-static GtkContainerClass *parent_class = NULL;
-
-/* uncomment the following if you have defined any signals */
-/* static guint signals[LAST_SIGNAL] = {0}; */
-
-GType
-modest_store_widget_get_type (void)
-{
-       static GType my_type = 0;
-       if (!my_type) {
-               static const GTypeInfo my_info = {
-                       sizeof(ModestStoreWidgetClass),
-                       NULL,           /* base init */
-                       NULL,           /* base finalize */
-                       (GClassInitFunc) modest_store_widget_class_init,
-                       NULL,           /* class finalize */
-                       NULL,           /* class data */
-                       sizeof(ModestStoreWidget),
-                       1,              /* n_preallocs */
-                       (GInstanceInitFunc) modest_store_widget_init,
-                       NULL
-               };
-               my_type = g_type_register_static (GTK_TYPE_VBOX,
-                                                 "ModestStoreWidget",
-                                                 &my_info, 0);
-       }
-       return my_type;
-}
-
-static void
-modest_store_widget_class_init (ModestStoreWidgetClass *klass)
-{
-       GObjectClass *gobject_class;
-       gobject_class = (GObjectClass*) klass;
-
-       parent_class            = g_type_class_peek_parent (klass);
-       gobject_class->finalize = modest_store_widget_finalize;
-
-       g_type_class_add_private (gobject_class, sizeof(ModestStoreWidgetPrivate));
-
-       /* signal definitions go here, e.g.: */
-/*     signals[MY_SIGNAL_1] = */
-/*             g_signal_new ("my_signal_1",....); */
-/*     signals[MY_SIGNAL_2] = */
-/*             g_signal_new ("my_signal_2",....); */
-/*     etc. */
-}
-
-static void
-modest_store_widget_init (ModestStoreWidget *obj)
-{
-       ModestStoreWidgetPrivate *priv;
-       
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(obj); 
-
-       priv->proto = NULL;
-}
-
-
-
-static GtkWidget *
-maildir_configuration (ModestStoreWidget *self)
-{
-       ModestStoreWidgetPrivate *priv;
-       GtkWidget *label, *box, *hbox;
-       
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
-       box = gtk_vbox_new (FALSE, 6);
-       
-       label = gtk_label_new (NULL);
-       gtk_label_set_markup (GTK_LABEL(label),
-                             _("<b>Maildir configuration</b>"));       
-       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
-       label = gtk_label_new (NULL);
-       gtk_label_set_markup (GTK_LABEL(label),
-                             _("Please select the path to your Maildir below"));       
-       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
-       
-       label = gtk_label_new (_("Path:"));
-
-       priv->chooser = 
-               gtk_file_chooser_button_new (_("(none)"),
-                                            GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-
-       hbox = gtk_hbox_new (FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(hbox), priv->chooser, FALSE, FALSE, 6);
-
-       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 6);       
-
-       return box;
-}
-
-
-static GtkWidget*
-mbox_configuration (ModestStoreWidget *self)
-{
-       ModestStoreWidgetPrivate *priv;
-       GtkWidget *label, *box, *hbox;
-       
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
-       box = gtk_vbox_new (FALSE, 6);
-       
-       label = gtk_label_new (NULL);
-       gtk_label_set_markup (GTK_LABEL(label),
-                             _("<b>Mbox configuration</b>"));  
-       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
-       label = gtk_label_new (NULL);
-       gtk_label_set_markup (GTK_LABEL(label),
-                             _("Please select your mbox file below")); 
-       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
-       
-       label = gtk_label_new (_("mbox:"));
-
-       priv->chooser =
-               gtk_file_chooser_button_new (_("(none)"),
-                                            GTK_FILE_CHOOSER_ACTION_OPEN);
-       hbox = gtk_hbox_new (FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(hbox), priv->chooser, FALSE, FALSE, 6);
-       
-       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 6);       
-
-       return box;
-}
-
-
-static GtkWidget*
-imap_pop_configuration (ModestStoreWidget *self)
-{
-       ModestStoreWidgetPrivate *priv;
-       GtkWidget *label, *box, *hbox;
-
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
-       box = gtk_vbox_new (FALSE, 6);
-       
-       label = gtk_label_new (NULL);
-       gtk_label_set_markup (GTK_LABEL(label),_("<b>Server configuration</b>"));
-       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
-       
-       hbox    = gtk_hbox_new (FALSE, 6);
-       label   = gtk_label_new (_("Username:"));
-       if (!priv->username)
-               priv->username = gtk_entry_new_with_max_length (40);
-       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(hbox), priv->username,FALSE, FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);       
-
-       hbox    = gtk_hbox_new (FALSE, 6);
-       label   = gtk_label_new (_("Server:"));
-       if (!priv->servername)
-               priv->servername = gtk_entry_new_with_max_length (40);
-       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(hbox), priv->servername,FALSE, FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);       
-
-       label = gtk_label_new(NULL);
-       gtk_label_set_markup (GTK_LABEL(label),_("<b>Security</b>"));
-       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 0);
-
-       hbox = gtk_hbox_new (FALSE, 6);
-       label = gtk_label_new(NULL);
-       gtk_label_set_text (GTK_LABEL(label),_("Connection type:"));
-       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(hbox),  modest_widget_factory_get_combo_box
-                           (priv->factory, MODEST_COMBO_BOX_TYPE_SECURITY_PROTOS),
-                           FALSE, FALSE,0);
-       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);
-       
-       hbox = gtk_hbox_new (FALSE, 6);
-       label = gtk_label_new(NULL);
-
-       gtk_label_set_text (GTK_LABEL(label),_("Authentication:"));
-       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(hbox),   modest_widget_factory_get_combo_box
-                           (priv->factory, MODEST_COMBO_BOX_TYPE_AUTH_PROTOS),
-                           FALSE, FALSE, 0);
-
-       priv->remember_pwd =
-               gtk_check_button_new_with_label (_("Remember password"));
-       gtk_box_pack_start (GTK_BOX(hbox),priv->remember_pwd,
-                           FALSE, FALSE, 0);
-       
-       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);
-
-       return box;
-}
-
-
-static void
-modest_store_widget_finalize (GObject *obj)
-{
-       ModestStoreWidgetPrivate *priv;
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(obj);
-       
-       if (priv->factory) {
-               g_object_unref (priv->factory);
-               priv->factory = NULL;
-       }
-
-       if (priv->proto) {
-               g_free (priv->proto);
-               priv->proto = NULL;
-       }
-
-       G_OBJECT_CLASS(parent_class)->finalize (obj);
-}
-
-
-
-GtkWidget*
-modest_store_widget_new (ModestWidgetFactory *factory, const gchar *proto)
-{
-       GObject *obj;
-       GtkWidget *w;
-       ModestStoreWidget *self;
-       ModestStoreWidgetPrivate *priv;
-       
-       g_return_val_if_fail (proto, NULL);
-       g_return_val_if_fail (factory, NULL);
-
-       obj = g_object_new(MODEST_TYPE_STORE_WIDGET, NULL);
-       self = MODEST_STORE_WIDGET(obj);
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
-
-       g_object_ref (factory);
-       priv->factory = factory;
-
-       priv->proto = g_strdup (proto);
-       
-       if (strcmp (proto, MODEST_PROTO_POP) == 0 ||
-           strcmp (proto, MODEST_PROTO_IMAP) == 0) {
-               w = imap_pop_configuration (self);
-       } else if (strcmp (proto, MODEST_PROTO_MAILDIR) == 0) {
-               w = maildir_configuration (self);
-       }  else if (strcmp (proto, MODEST_PROTO_MBOX) == 0) {
-               w = mbox_configuration (self);
-       } else
-               w = gtk_label_new ("");
-       
-       gtk_widget_show_all (w);
-       gtk_box_pack_start (GTK_BOX(self), w, FALSE, FALSE, 2);
-
-       return GTK_WIDGET(self);
-}
-
-
-gboolean
-modest_store_widget_get_remember_password (ModestStoreWidget *self)
-{
-       ModestStoreWidgetPrivate *priv;
-
-       g_return_val_if_fail (self, FALSE);
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
-
-       return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(priv->remember_pwd));
-}
-
-
-const gchar*
-modest_store_widget_get_username (ModestStoreWidget *self)
-{
-       ModestStoreWidgetPrivate *priv;
-
-       g_return_val_if_fail (self, NULL);
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
-       
-       return gtk_entry_get_text (GTK_ENTRY(priv->username));
-}
-
-const gchar*
-modest_store_widget_get_servername (ModestStoreWidget *self)
-{
-       ModestStoreWidgetPrivate *priv;
-
-       g_return_val_if_fail (self, NULL);
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
-       
-       return gtk_entry_get_text (GTK_ENTRY(priv->servername));
-}
-
-
-const gchar*
-modest_store_widget_get_proto (ModestStoreWidget *self)
-{
-       ModestStoreWidgetPrivate *priv;
-
-       g_return_val_if_fail (self, FALSE);
-       priv = MODEST_STORE_WIDGET_GET_PRIVATE(self);
-
-       return priv->proto;
-}
-
diff --git a/src/gtk2/modest-store-widget.h b/src/gtk2/modest-store-widget.h
deleted file mode 100644 (file)
index 4a3cbb8..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* modest-store-widget.h */
-/* insert (c)/licensing information) */
-
-#ifndef __MODEST_STORE_WIDGET_H__
-#define __MODEST_STORE_WIDGET_H__
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <modest-widget-factory.h>
-
-G_BEGIN_DECLS
-
-/* convenience macros */
-#define MODEST_TYPE_STORE_WIDGET             (modest_store_widget_get_type())
-#define MODEST_STORE_WIDGET(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_STORE_WIDGET,ModestStoreWidget))
-#define MODEST_STORE_WIDGET_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_STORE_WIDGET,GtkContainer))
-#define MODEST_IS_STORE_WIDGET(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_STORE_WIDGET))
-#define MODEST_IS_STORE_WIDGET_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_STORE_WIDGET))
-#define MODEST_STORE_WIDGET_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_STORE_WIDGET,ModestStoreWidgetClass))
-
-typedef struct _ModestStoreWidget      ModestStoreWidget;
-typedef struct _ModestStoreWidgetClass ModestStoreWidgetClass;
-
-struct _ModestStoreWidget {
-        GtkVBox parent;
-       /* insert public members, if any */
-};
-
-struct _ModestStoreWidgetClass {
-       GtkVBoxClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestStoreWidget* obj); */
-};
-
-/* member functions */
-GType        modest_store_widget_get_type    (void) G_GNUC_CONST;
-
-GtkWidget*   modest_store_widget_new         (ModestWidgetFactory *factory,
-                                             const gchar* proto);
-
-gboolean       modest_store_widget_get_remember_password (ModestStoreWidget *self);
-const gchar*   modest_store_widget_get_username          (ModestStoreWidget *self);
-const gchar*   modest_store_widget_get_servername        (ModestStoreWidget *self);
-const gchar*   modest_store_widget_get_proto             (ModestStoreWidget *self);
-
-
-
-
-
-G_END_DECLS
-
-#endif /* __MODEST_STORE_WIDGET_H__ */
-
diff --git a/src/gtk2/modest-transport-widget.c b/src/gtk2/modest-transport-widget.c
deleted file mode 100644 (file)
index 9aeb080..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-/* modest-transport-widget.c */
-
-/* insert (c)/licensing information) */
-
-#include "modest-transport-widget.h"
-#include <string.h>
-
-/* 'private'/'protected' functions */
-static void modest_transport_widget_class_init (ModestTransportWidgetClass *klass);
-static void modest_transport_widget_init       (ModestTransportWidget *obj);
-static void modest_transport_widget_finalize   (GObject *obj);
-/* list my signals  */
-enum {
-       /* MY_SIGNAL_1, */
-       /* MY_SIGNAL_2, */
-       LAST_SIGNAL
-};
-
-typedef struct _ModestTransportWidgetPrivate ModestTransportWidgetPrivate;
-struct _ModestTransportWidgetPrivate {
-
-       gchar *proto;
-       ModestWidgetFactory *factory;
-
-       GtkWidget *servername;
-       GtkWidget *username;
-       GtkWidget *auth;
-       GtkWidget *remember_pwd;
-
-};
-#define MODEST_TRANSPORT_WIDGET_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
-                                                     MODEST_TYPE_TRANSPORT_WIDGET, \
-                                                     ModestTransportWidgetPrivate))
-/* globals */
-static GtkContainerClass *parent_class = NULL;
-
-/* uncomment the following if you have defined any signals */
-/* static guint signals[LAST_SIGNAL] = {0}; */
-
-GType
-modest_transport_widget_get_type (void)
-{
-       static GType my_type = 0;
-       if (!my_type) {
-               static const GTypeInfo my_info = {
-                       sizeof(ModestTransportWidgetClass),
-                       NULL,           /* base init */
-                       NULL,           /* base finalize */
-                       (GClassInitFunc) modest_transport_widget_class_init,
-                       NULL,           /* class finalize */
-                       NULL,           /* class data */
-                       sizeof(ModestTransportWidget),
-                       1,              /* n_preallocs */
-                       (GInstanceInitFunc) modest_transport_widget_init,
-                       NULL
-               };
-               my_type = g_type_register_static (GTK_TYPE_VBOX,
-                                                 "ModestTransportWidget",
-                                                 &my_info, 0);
-       }
-       return my_type;
-}
-
-static void
-modest_transport_widget_class_init (ModestTransportWidgetClass *klass)
-{
-       GObjectClass *gobject_class;
-       gobject_class = (GObjectClass*) klass;
-
-       parent_class            = g_type_class_peek_parent (klass);
-       gobject_class->finalize = modest_transport_widget_finalize;
-
-       g_type_class_add_private (gobject_class, sizeof(ModestTransportWidgetPrivate));
-
-       /* signal definitions go here, e.g.: */
-/*     signals[MY_SIGNAL_1] = */
-/*             g_signal_new ("my_signal_1",....); */
-/*     signals[MY_SIGNAL_2] = */
-/*             g_signal_new ("my_signal_2",....); */
-/*     etc. */
-}
-
-static void
-modest_transport_widget_init (ModestTransportWidget *obj)
-{
-       ModestTransportWidgetPrivate *priv;
-       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(obj); 
-       
-       priv->proto = NULL;
-}
-
-static void
-modest_transport_widget_finalize (GObject *obj)
-{
-       ModestTransportWidgetPrivate *priv;
-       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(obj);
-       
-       if (priv->factory) {
-               g_object_unref (priv->factory);
-               priv->factory = NULL;
-       }
-
-       if (priv->proto) {
-               g_free (priv->proto);
-               priv->proto = NULL;
-       }
-
-       G_OBJECT_CLASS(parent_class)->finalize (obj);
-}
-
-
-static GtkWidget*
-smtp_configuration (ModestTransportWidget *self)
-{
-       ModestTransportWidgetPrivate *priv;
-       GtkWidget *label, *box, *hbox;
-       
-       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
-       box = gtk_vbox_new (FALSE, 6);
-       
-       label = gtk_label_new (NULL);
-       gtk_label_set_markup (GTK_LABEL(label),
-                             _("<b>SMTP configuration</b>"));  
-       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 6);
-
-       priv->servername = gtk_entry_new_with_max_length (40);
-       
-       hbox = gtk_hbox_new (FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(hbox), gtk_label_new (_("Servername: ")),
-                           FALSE, FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(hbox), priv->servername,
-                           TRUE, TRUE, 6);
-       gtk_box_pack_start (GTK_BOX(box), hbox, TRUE, TRUE, 6);
-
-       priv->auth = gtk_check_button_new_with_label (_("Requires authentication"));
-       gtk_box_pack_start (GTK_BOX(box), priv->auth, TRUE, FALSE, 6);
-       
-       label = gtk_label_new(NULL);
-       gtk_label_set_markup (GTK_LABEL(label),_("<b>Security</b>"));
-       gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 0);
-
-       hbox = gtk_hbox_new (FALSE, 6);
-       label = gtk_label_new(NULL);
-       gtk_label_set_text (GTK_LABEL(label),_("Connection type:"));
-       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0);
-       gtk_box_pack_start (GTK_BOX(hbox),  modest_widget_factory_get_combo_box
-                           (priv->factory, MODEST_COMBO_BOX_TYPE_SECURITY_PROTOS),
-                           FALSE, FALSE,0);
-       gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);
-       
-       hbox = gtk_hbox_new (FALSE, 6);
-       label = gtk_label_new(NULL);
-
-       gtk_label_set_text (GTK_LABEL(label),_("Authentication:"));
-       gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
-       gtk_box_pack_start (GTK_BOX(hbox),   modest_widget_factory_get_combo_box
-                           (priv->factory, MODEST_COMBO_BOX_TYPE_AUTH_PROTOS),
-                           FALSE, FALSE, 0);
-       priv->remember_pwd =
-               gtk_check_button_new_with_label (_("Remember password"));
-       gtk_box_pack_start (GTK_BOX(hbox),priv->remember_pwd,
-                           FALSE, FALSE, 0);   
-       return box;
-}
-
-
-
-GtkWidget*
-modest_transport_widget_new (ModestWidgetFactory *factory, const gchar* proto)
-{
-       GObject *obj;
-       GtkWidget *w;
-       ModestTransportWidget *self;
-       ModestTransportWidgetPrivate *priv;
-       
-       g_return_val_if_fail (proto, NULL);
-       g_return_val_if_fail (factory, NULL);
-
-       obj = g_object_new(MODEST_TYPE_TRANSPORT_WIDGET, NULL);
-       self = MODEST_TRANSPORT_WIDGET(obj);
-       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
-
-       g_object_ref (factory);
-       priv->factory = factory;
-
-       priv->proto = g_strdup (proto);
-       
-       if (strcmp (proto, MODEST_PROTO_SMTP) == 0) {
-               w = smtp_configuration (self);
-       } else
-               w = gtk_label_new ("");
-       
-       gtk_widget_show_all (w);
-       gtk_box_pack_start (GTK_BOX(self), w, FALSE, FALSE, 2);
-
-       return GTK_WIDGET(self);
-}
-
-
-gboolean
-modest_transport_widget_get_remember_password (ModestTransportWidget *self)
-{
-       ModestTransportWidgetPrivate *priv;
-
-       g_return_val_if_fail (self, FALSE);
-       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
-
-       return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(priv->remember_pwd));
-}
-
-
-const gchar*
-modest_transport_widget_get_username (ModestTransportWidget *self)
-{
-       ModestTransportWidgetPrivate *priv;
-
-       g_return_val_if_fail (self, NULL);
-       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
-       
-       return gtk_entry_get_text (GTK_ENTRY(priv->username));
-}
-
-const gchar*
-modest_transport_widget_get_servername (ModestTransportWidget *self)
-{
-       ModestTransportWidgetPrivate *priv;
-
-       g_return_val_if_fail (self, NULL);
-       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
-       
-       return gtk_entry_get_text (GTK_ENTRY(priv->servername));
-}
-
-
-const gchar*
-modest_transport_widget_get_proto (ModestTransportWidget *self)
-{
-       ModestTransportWidgetPrivate *priv;
-
-       g_return_val_if_fail (self, FALSE);
-       priv = MODEST_TRANSPORT_WIDGET_GET_PRIVATE(self);
-
-       return priv->proto;
-}
-
diff --git a/src/gtk2/modest-transport-widget.h b/src/gtk2/modest-transport-widget.h
deleted file mode 100644 (file)
index f72e971..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* modest-transport-widget.h */
-/* insert (c)/licensing information) */
-
-#ifndef __MODEST_TRANSPORT_WIDGET_H__
-#define __MODEST_TRANSPORT_WIDGET_H__
-
-#include <gtk/gtk.h>
-#include <modest-widget-factory.h>
-
-G_BEGIN_DECLS
-
-/* convenience macros */
-#define MODEST_TYPE_TRANSPORT_WIDGET             (modest_transport_widget_get_type())
-#define MODEST_TRANSPORT_WIDGET(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_TRANSPORT_WIDGET,ModestTransportWidget))
-#define MODEST_TRANSPORT_WIDGET_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TRANSPORT_WIDGET,GtkContainer))
-#define MODEST_IS_TRANSPORT_WIDGET(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_TRANSPORT_WIDGET))
-#define MODEST_IS_TRANSPORT_WIDGET_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_TRANSPORT_WIDGET))
-#define MODEST_TRANSPORT_WIDGET_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_TRANSPORT_WIDGET,ModestTransportWidgetClass))
-
-typedef struct _ModestTransportWidget      ModestTransportWidget;
-typedef struct _ModestTransportWidgetClass ModestTransportWidgetClass;
-
-struct _ModestTransportWidget {
-        GtkVBox parent;
-       /* insert public members, if any */
-};
-
-struct _ModestTransportWidgetClass {
-       GtkVBoxClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestTransportWidget* obj); */
-};
-
-/* member functions */
-GType        modest_transport_widget_get_type    (void) G_GNUC_CONST;
-
-GtkWidget*   modest_transport_widget_new         (ModestWidgetFactory *factory, const gchar *proto);
-
-gboolean       modest_transport_widget_get_remember_password (ModestTransportWidget *self);
-const gchar*   modest_transport_widget_get_username          (ModestTransportWidget *self);
-const gchar*   modest_transport_widget_get_servername        (ModestTransportWidget *self);
-const gchar*   modest_transport_widget_get_proto             (ModestTransportWidget *self);
-
-G_END_DECLS
-
-#endif /* __MODEST_TRANSPORT_WIDGET_H__ */
-
diff --git a/src/gtk2/modest-ui.c b/src/gtk2/modest-ui.c
deleted file mode 100644 (file)
index 834b0dc..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-#include <glib/gi18n.h>
-#include <string.h>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif /*HAVE_CONFIG_H*/
-
-#include "../modest-ui.h"
-#include "../modest-account-mgr.h"
-#include "../modest-widget-factory.h"
-#include "modest-main-window.h"
-
-
-/* 'private'/'protected' functions */
-static void   modest_ui_class_init     (ModestUIClass *klass);
-static void   modest_ui_init           (ModestUI *obj);
-static void   modest_ui_finalize       (GObject *obj);
-
-gchar *on_password_requested (TnyAccountIface *, const gchar *, gboolean *);
-
-
-typedef struct _ModestUIPrivate ModestUIPrivate;
-struct _ModestUIPrivate {
-       ModestConf            *conf;
-        ModestAccountMgr      *account_mgr;
-       ModestWidgetFactory   *widget_factory;  
-        ModestTnyAccountStore *account_store;
-
-       GtkWidget              *main_window;
-};
-
-#define MODEST_UI_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
-                                       MODEST_TYPE_UI, \
-                                       ModestUIPrivate))
-
-
-/* list my signals */
-enum {
-       /* MY_SIGNAL_1, */
-       /* MY_SIGNAL_2, */
-       LAST_SIGNAL
-};
-
-/* globals */
-static GObjectClass *parent_class = NULL;
-
-
-GType
-modest_ui_get_type (void)
-{
-       static GType my_type = 0;
-       if (!my_type) {
-               static const GTypeInfo my_info = {
-                       sizeof(ModestUIClass),
-                       NULL,           /* base init */
-                       NULL,           /* base finalize */
-                       (GClassInitFunc) modest_ui_class_init,
-                       NULL,           /* class finalize */
-                       NULL,           /* class data */
-                       sizeof(ModestUI),
-                       1,              /* n_preallocs */
-                       (GInstanceInitFunc) modest_ui_init,
-                       NULL
-               };
-               my_type = g_type_register_static (G_TYPE_OBJECT,
-                                                 "ModestUI",
-                                                 &my_info, 0);
-       }
-       return my_type;
-}
-
-
-static void
-modest_ui_class_init (ModestUIClass *klass)
-{
-       GObjectClass *gobject_class;
-       gobject_class = (GObjectClass*) klass;
-
-       parent_class            = g_type_class_peek_parent (klass);
-       gobject_class->finalize = modest_ui_finalize;
-
-       g_type_class_add_private (gobject_class, sizeof(ModestUIPrivate));
-
-}
-
-
-static void
-modest_ui_init (ModestUI *obj)
-{
-       ModestUIPrivate *priv;
-
-       priv = MODEST_UI_GET_PRIVATE(obj);
-
-       priv->account_store  = NULL;
-       priv->account_mgr    = NULL;
-       priv->conf           = NULL;
-       priv->widget_factory = NULL;
-
-       priv->main_window    = NULL;
-}
-
-
-static void
-modest_ui_finalize (GObject *obj)
-{
-       
-       ModestUIPrivate *priv = MODEST_UI_GET_PRIVATE(obj);
-
-       if (priv->account_store) {
-               g_object_unref (G_OBJECT(priv->account_store));
-               priv->account_store = NULL;
-       }
-               
-       if (priv->account_mgr) {
-               g_object_unref (G_OBJECT(priv->account_mgr));
-               priv->account_mgr = NULL;
-       }
-
-       if (priv->widget_factory) {
-               g_object_unref (G_OBJECT(priv->widget_factory));
-               priv->widget_factory = NULL;
-       }
-
-       if (priv->conf) {
-               g_object_unref (G_OBJECT(priv->conf));
-               priv->conf = NULL;
-       }       
-}
-
-
-ModestUI*
-modest_ui_new (ModestConf *modest_conf)
-{
-       GObject *obj;
-       ModestUIPrivate *priv;
-
-       g_return_val_if_fail (modest_conf, NULL);
-
-       obj  = g_object_new(MODEST_TYPE_UI, NULL);
-       priv = MODEST_UI_GET_PRIVATE(obj);
-
-       g_object_ref (G_OBJECT(modest_conf));
-       priv->conf = modest_conf;
-       
-       priv->account_mgr = MODEST_ACCOUNT_MGR(modest_account_mgr_new (priv->conf));
-       if (!priv->account_mgr) {
-               g_printerr ("modest: could not create ModestAccountMgr instance\n");
-               g_object_unref (obj);
-               return NULL;
-        }
-
-       priv->account_store = modest_tny_account_store_new (priv->account_mgr);
-       if (!priv->account_store) {
-               g_printerr ("modest: could not initialze ModestTnyAccountStore instance\n");
-               return NULL;
-        }
-
-       priv->widget_factory = modest_widget_factory_new (
-               priv->conf, priv->account_store, priv->account_mgr);
-       if (!priv->account_store) {
-               g_printerr ("modest: could not initialize widget factory\n");
-               return NULL;
-       }
-               
-       return MODEST_UI(obj);
-}
-
-static gboolean
-on_main_window_delete_event (GtkWidget *widget, GdkEvent *event, ModestUI *self)
-{
-       g_warning (__FUNCTION__);
-       gtk_main_quit ();
-       return FALSE;
-}
-
-
-GtkWidget*
-modest_ui_main_window (ModestUI *modest_ui)
-{
-       ModestUIPrivate *priv;
-
-       g_return_val_if_fail (modest_ui, NULL);
-       priv = MODEST_UI_GET_PRIVATE(modest_ui);
-
-       if (!priv->main_window) {
-               priv->main_window =
-                       modest_main_window_new (priv->conf, priv->account_mgr,
-                                               priv->widget_factory);
-               g_signal_connect (G_OBJECT(priv->main_window), "delete-event",
-                                 G_CALLBACK(on_main_window_delete_event), modest_ui);
-       }
-               
-       if (!priv->main_window)
-               g_printerr ("modest: could not create main window\n");
-       
-       return priv->main_window;
-}
diff --git a/src/gtk2/pixmaps/internet-mail.svg b/src/gtk2/pixmaps/internet-mail.svg
deleted file mode 100644 (file)
index cfaed48..0000000
+++ /dev/null
@@ -1,458 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://web.resource.org/cc/"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   sodipodi:docname="internet-mail.svg"
-   sodipodi:docbase="/home/jimmac/gfx/ximian/tango-desktop-theme/scalable/apps"
-   inkscape:version="0.41+cvs"
-   sodipodi:version="0.32"
-   id="svg5816"
-   height="48px"
-   width="48px">
-  <defs
-     id="defs3"><linearGradient
-   id="linearGradient28260">
-  <stop
-   style="stop-color:#9aa29a;stop-opacity:1.0000000;"
-   offset="0.0000000"
-   id="stop28262" />
-
-
-  <stop
-   style="stop-color:#ffffff;stop-opacity:1.0000000;"
-   offset="1.0000000"
-   id="stop28264" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient28254">
-  <stop
-   id="stop28256"
-   offset="0.0000000"
-   style="stop-color:#9aa29a;stop-opacity:1.0000000;" />
-
-
-  <stop
-   id="stop28258"
-   offset="1.0000000"
-   style="stop-color:none" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient2274">
-  <stop
-   style="stop-color:#000000;stop-opacity:0.12871288;"
-   offset="0.0000000"
-   id="stop2276" />
-
-
-  <stop
-   style="stop-color:#000000;stop-opacity:0.0000000;"
-   offset="1.0000000"
-   id="stop2278" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient9749">
-  <stop
-   style="stop-color:#ffffff;stop-opacity:1;"
-   offset="0"
-   id="stop9751" />
-
-
-  <stop
-   style="stop-color:#ededed;stop-opacity:1.0000000;"
-   offset="1.0000000"
-   id="stop9753" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient2152">
-  <stop
-   style="stop-color:#9aa29a;stop-opacity:1.0000000;"
-   offset="0.0000000"
-   id="stop2154" />
-
-
-  <stop
-   style="stop-color:#b5beb5;stop-opacity:1.0000000;"
-   offset="1.0000000"
-   id="stop2156" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient2166">
-  <stop
-   style="stop-color:#ffffff;stop-opacity:1;"
-   offset="0"
-   id="stop2168" />
-
-
-  <stop
-   style="stop-color:#dcdcdc;stop-opacity:1.0000000;"
-   offset="1.0000000"
-   id="stop2170" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient18913">
-  <stop
-   style="stop-color:#ededed;stop-opacity:1.0000000;"
-   offset="0.0000000"
-   id="stop18915" />
-
-
-  <stop
-   style="stop-color:#c8c8c8;stop-opacity:1.0000000;"
-   offset="1.0000000"
-   id="stop18917" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient2136">
-  <stop
-   style="stop-color:#989690;stop-opacity:1.0000000;"
-   offset="0.0000000"
-   id="stop2138" />
-
-
-  <stop
-   style="stop-color:#656460;stop-opacity:1.0000000;"
-   offset="1.0000000"
-   id="stop2140" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient15107">
-  <stop
-   style="stop-color:#ffffff;stop-opacity:1.0000000;"
-   offset="0.0000000"
-   id="stop15109" />
-
-
-  <stop
-   style="stop-color:#e2e2e2;stop-opacity:1.0000000;"
-   offset="1.0000000"
-   id="stop15111" />
-
-
-</linearGradient>
-<linearGradient
-   id="linearGradient10691"
-   inkscape:collect="always">
-  <stop
-   id="stop10693"
-   offset="0"
-   style="stop-color:#000000;stop-opacity:1;" />
-
-
-  <stop
-   id="stop10695"
-   offset="1"
-   style="stop-color:#000000;stop-opacity:0;" />
-
-
-</linearGradient>
-<radialGradient
-   r="7.2284161"
-   fy="73.615714"
-   fx="6.7027131"
-   cy="73.615714"
-   cx="6.7027131"
-   gradientTransform="scale(1.902215,0.525703)"
-   gradientUnits="userSpaceOnUse"
-   id="radialGradient11382"
-   xlink:href="#linearGradient10691"
-   inkscape:collect="always" />
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-<linearGradient
-   y2="32.203162"
-   x2="9.7619219"
-   y1="37.784682"
-   x1="8.7803760"
-   gradientTransform="matrix(2.394900,0.000000,0.000000,0.781058,2.879512,0.343005)"
-   gradientUnits="userSpaceOnUse"
-   id="linearGradient27463"
-   xlink:href="#linearGradient2274"
-   inkscape:collect="always" />
-<linearGradient
-   y2="24.132717"
-   x2="21.111549"
-   y1="13.686079"
-   x1="11.233107"
-   gradientTransform="matrix(1.370928,0.000000,0.000000,1.443758,2.431133,-0.140786)"
-   gradientUnits="userSpaceOnUse"
-   id="linearGradient27468"
-   xlink:href="#linearGradient9749"
-   inkscape:collect="always" />
-<linearGradient
-   y2="52.090678"
-   x2="9.8855033"
-   y1="37.197018"
-   x1="8.9156475"
-   gradientTransform="matrix(2.454781,0.000000,0.000000,0.762004,2.879512,0.343005)"
-   gradientUnits="userSpaceOnUse"
-   id="linearGradient27471"
-   xlink:href="#linearGradient2152"
-   inkscape:collect="always" />
-<linearGradient
-   y2="52.090678"
-   x2="9.8855033"
-   y1="37.197018"
-   x1="8.9156475"
-   gradientTransform="matrix(2.454781,0.000000,0.000000,0.762004,2.879512,0.343005)"
-   gradientUnits="userSpaceOnUse"
-   id="linearGradient27474"
-   xlink:href="#linearGradient2152"
-   inkscape:collect="always" />
-<linearGradient
-   y2="29.568739"
-   x2="15.310744"
-   y1="15.148383"
-   x1="10.184240"
-   gradientTransform="matrix(1.819266,0.000000,0.000000,1.028193,2.879512,0.343005)"
-   gradientUnits="userSpaceOnUse"
-   id="linearGradient27477"
-   xlink:href="#linearGradient2166"
-   inkscape:collect="always" />
-<linearGradient
-   y2="17.876846"
-   x2="13.467486"
-   y1="7.2310905"
-   x1="5.8266134"
-   gradientTransform="matrix(1.570607,0.000000,0.000000,1.190976,2.879512,0.343005)"
-   gradientUnits="userSpaceOnUse"
-   id="linearGradient27483"
-   xlink:href="#linearGradient18913"
-   inkscape:collect="always" />
-<linearGradient
-   y2="26.022910"
-   x2="18.475286"
-   y1="4.7461626"
-   x1="11.572842"
-   gradientTransform="matrix(1.343475,0.000000,0.000000,1.417854,2.879511,0.314599)"
-   gradientUnits="userSpaceOnUse"
-   id="linearGradient27486"
-   xlink:href="#linearGradient15107"
-   inkscape:collect="always" />
-<linearGradient
-   y2="15.257116"
-   x2="30.599684"
-   y1="15.257116"
-   x1="2.0618774"
-   gradientTransform="matrix(1.343475,0.000000,0.000000,1.417854,2.879511,0.314599)"
-   gradientUnits="userSpaceOnUse"
-   id="linearGradient27488"
-   xlink:href="#linearGradient2136"
-   inkscape:collect="always" />
-</defs>
-  <sodipodi:namedview
-     inkscape:window-y="202"
-     inkscape:window-x="331"
-     inkscape:window-height="743"
-     inkscape:window-width="849"
-     inkscape:document-units="px"
-     inkscape:grid-bbox="true"
-     showgrid="false"
-     inkscape:current-layer="layer1"
-     inkscape:cy="18.816166"
-     inkscape:cx="28.384904"
-     inkscape:zoom="9.8994949"
-     inkscape:pageshadow="2"
-     inkscape:pageopacity="0.0"
-     borderopacity="1.0"
-     bordercolor="#666666"
-     pagecolor="#ffffff"
-     id="base" />
-  <metadata
-     id="metadata4">
-    <rdf:RDF
-       id="RDF5">
-      <cc:Work
-         id="Work6"
-         rdf:about="">
-        <dc:format
-           id="format7">image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage"
-           id="type9" />
-        <dc:title
-           id="title29050">Mail</dc:title>
-        <dc:creator
-           id="creator29052">
-          <cc:Agent
-             id="Agent29054">
-            <dc:title
-               id="title29056">Jakub Steiner</dc:title>
-          </cc:Agent>
-        </dc:creator>
-        <dc:contributor
-           id="contributor29058">
-          <cc:Agent
-             id="Agent29060">
-            <dc:title
-               id="title29062">Andreas Nilsson</dc:title>
-          </cc:Agent>
-        </dc:contributor>
-        <cc:license
-           rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/"
-           id="license29064" />
-        <dc:subject
-           id="subject29080">
-          <rdf:Bag
-             id="Bag29082">
-            <rdf:li
-               id="li29148">mail</rdf:li>
-            <rdf:li
-               id="li29150">e-mail</rdf:li>
-            <rdf:li
-               id="li29152">MUA</rdf:li>
-          </rdf:Bag>
-        </dc:subject>
-      </cc:Work>
-      <cc:License
-         id="License29066"
-         rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
-        <cc:permits
-           id="permits29068"
-           rdf:resource="http://web.resource.org/cc/Reproduction" />
-        <cc:permits
-           id="permits29070"
-           rdf:resource="http://web.resource.org/cc/Distribution" />
-        <cc:requires
-           id="requires29072"
-           rdf:resource="http://web.resource.org/cc/Notice" />
-        <cc:requires
-           id="requires29074"
-           rdf:resource="http://web.resource.org/cc/Attribution" />
-        <cc:permits
-           id="permits29076"
-           rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
-        <cc:requires
-           id="requires29078"
-           rdf:resource="http://web.resource.org/cc/ShareAlike" />
-      </cc:License>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:groupmode="layer"
-     inkscape:label="Layer 1"
-     id="layer1">
-    <path
-       sodipodi:type="arc"
-       style="opacity:0.45569620;color:#000000;fill:url(#radialGradient11382);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
-       id="path10699"
-       sodipodi:cx="12.750000"
-       sodipodi:cy="38.700001"
-       sodipodi:rx="13.750000"
-       sodipodi:ry="3.8000000"
-       d="M 26.500000 38.700001 A 13.750000 3.8000000 0 1 1  -1.0000000,38.700001 A 13.750000 3.8000000 0 1 1  26.500000 38.700001 z"
-       transform="matrix(1.800603,0.000000,0.000000,1.974782,1.083944,-38.01261)" />
-    <path
-       style="fill:url(#linearGradient27486);fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient27488);stroke-width:0.85660440;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-       d="M 6.3334395,16.972251 L 6.3334395,41.481799 L 43.305555,41.481799 L 43.244499,17.089859 C 43.241050,15.712272 31.395999,2.4121110 29.210877,2.4121110 L 20.659391,2.4121110 C 18.362072,2.4121110 6.3334395,15.673953 6.3334395,16.972251 z "
-       id="path12723"
-       sodipodi:nodetypes="ccczzzz" />
-    <path
-       style="fill:url(#linearGradient27483);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.25000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
-       d="M 6.9230610,16.787103 C 6.5250222,16.356975 18.809966,3.0935378 20.667210,3.0935378 L 29.042965,3.0935378 C 30.790449,3.0935378 43.079567,16.221603 42.470079,16.978956 L 31.608858,30.475150 L 19.295373,30.156846 L 6.9230610,16.787103 z "
-       id="path18153"
-       sodipodi:nodetypes="czzzccz" />
-    <path
-       style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-       d="M 19.077530,30.017590 L 11.744526,21.271586 L 36.562951,14.335513 L 39.592221,20.551966 L 32.175956,29.992298"
-       id="path2164"
-       sodipodi:nodetypes="ccccc" />
-    <path
-       style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-       d="M 18.291767,29.836259 L 10.809167,21.026146 L 35.456637,14.132812 L 38.630714,20.403811 L 31.390193,29.810968"
-       id="path2162"
-       sodipodi:nodetypes="ccccc" />
-    <path
-       style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-       d="M 18.775313,29.957146 L 11.100386,21.296624 L 36.068405,14.232329 L 39.354114,20.824726 L 31.873739,29.931855"
-       id="path2160"
-       sodipodi:nodetypes="ccccc" />
-    <path
-       style="fill:url(#linearGradient27477);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-       d="M 18.593984,30.440693 L 11.260975,21.694689 L 35.972554,14.801355 L 39.083369,21.188770 L 31.963198,30.174701"
-       id="path15105"
-       sodipodi:nodetypes="ccccc" />
-    <path
-       style="fill:url(#linearGradient27474);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-       d="M 20.488434,29.064331 L 7.0924698,40.036319 L 21.001312,30.432013 L 30.019470,30.432013 L 42.438517,39.914206 L 30.575092,29.064331 L 20.488434,29.064331 z "
-       id="path14245"
-       sodipodi:nodetypes="ccccccc" />
-    <path
-       style="color:#000000;fill:url(#linearGradient27471);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
-       d="M 6.9634751,16.885144 L 18.479648,31.201334 L 19.548151,30.346532 L 6.9634751,16.885144 z "
-       id="path14339"
-       sodipodi:nodetypes="cccc" />
-    <path
-       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:url(#linearGradient27468);stroke-width:0.85660428;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-       d="M 7.3077115,17.131415 L 7.3388644,40.342421 L 42.283659,40.342421 L 42.221353,17.257512 C 42.219329,16.508413 31.005032,3.4591863 28.837233,3.4591863 L 20.941579,3.4591863 C 18.689313,3.4591863 7.3066655,16.351067 7.3077115,17.131415 z "
-       id="path15103"
-       sodipodi:nodetypes="ccczzzz" />
-    <path
-       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
-       d="M 20.957271,30.452732 L 9.0157722,38.723588 L 11.235205,38.729695 L 21.233330,31.860755 L 30.055238,30.437917 L 20.957271,30.452732 z "
-       id="path17393"
-       sodipodi:nodetypes="cccccc" />
-    <path
-       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
-       d="M 11.427536,21.670296 L 12.752479,23.080719 L 35.543311,16.196529 L 38.458445,21.878896 L 39.072496,21.166981 L 36.003081,14.789145 L 11.427536,21.670296 z "
-       id="path2174"
-       sodipodi:nodetypes="ccccccc" />
-    <path
-       style="fill:url(#linearGradient27463);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
-       d="M 13.308098,23.636340 L 19.334450,30.090093 L 20.531174,29.064331 L 30.617831,29.107071 L 31.429893,29.833651 L 35.404721,25.089502 C 34.250740,23.679081 13.308098,23.636340 13.308098,23.636340 z "
-       id="path2272"
-       sodipodi:nodetypes="ccccccc" />
-    <path
-       sodipodi:nodetypes="cccc"
-       id="path27492"
-       d="M 41.812936,17.847945 L 31.861315,30.479232 L 30.792812,29.624431 L 41.812936,17.847945 z "
-       style="color:#000000;fill:#b1b1b1;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
-  </g>
-</svg>
diff --git a/src/gtk2/pixmaps/qgn_addr_icon_user_group.png b/src/gtk2/pixmaps/qgn_addr_icon_user_group.png
deleted file mode 100644 (file)
index c5b9f6c..0000000
Binary files a/src/gtk2/pixmaps/qgn_addr_icon_user_group.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_gene_attacpap.png b/src/gtk2/pixmaps/qgn_list_gene_attacpap.png
deleted file mode 100644 (file)
index 0448a7d..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_gene_attacpap.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_gene_fldr_clp.png b/src/gtk2/pixmaps/qgn_list_gene_fldr_clp.png
deleted file mode 100644 (file)
index 0034909..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_gene_fldr_clp.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_gene_fldr_cls.png b/src/gtk2/pixmaps/qgn_list_gene_fldr_cls.png
deleted file mode 100644 (file)
index 976155c..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_gene_fldr_cls.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_gene_fldr_exp.png b/src/gtk2/pixmaps/qgn_list_gene_fldr_exp.png
deleted file mode 100644 (file)
index 28a583f..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_gene_fldr_exp.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_gene_fldr_opn.png b/src/gtk2/pixmaps/qgn_list_gene_fldr_opn.png
deleted file mode 100644 (file)
index 2bf04f2..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_gene_fldr_opn.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin.png b/src/gtk2/pixmaps/qgn_list_messagin.png
deleted file mode 100644 (file)
index 173f657..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_drafts.png b/src/gtk2/pixmaps/qgn_list_messagin_drafts.png
deleted file mode 100644 (file)
index c16cdcd..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_drafts.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_editor.png b/src/gtk2/pixmaps/qgn_list_messagin_editor.png
deleted file mode 100644 (file)
index c68ef5e..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_editor.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr.png
deleted file mode 100644 (file)
index c61cc32..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted.png
deleted file mode 100644 (file)
index 9c27686..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted_high.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted_high.png
deleted file mode 100644 (file)
index 699a464..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted_low.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted_low.png
deleted file mode 100644 (file)
index 10287d5..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_encrypted_low.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_high.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_high.png
deleted file mode 100644 (file)
index 00328bc..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_high_unread.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_high_unread.png
deleted file mode 100644 (file)
index 0c1f206..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_high_unread.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_low.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_low.png
deleted file mode 100644 (file)
index 7b9493b..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_low.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_low_unread.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_low_unread.png
deleted file mode 100644 (file)
index 61d8b56..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_low_unread.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed.png
deleted file mode 100644 (file)
index ff95a21..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed_high.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed_high.png
deleted file mode 100644 (file)
index 3071acd..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed_low.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed_low.png
deleted file mode 100644 (file)
index 014d02f..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_signed_low.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread.png
deleted file mode 100644 (file)
index 1c0c5f9..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted.png
deleted file mode 100644 (file)
index c44ecb5..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted_high.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted_high.png
deleted file mode 100644 (file)
index 7fc702d..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted_low.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted_low.png
deleted file mode 100644 (file)
index cc0e90e..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_encrypted_low.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed.png
deleted file mode 100644 (file)
index ec1cc23..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed_high.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed_high.png
deleted file mode 100644 (file)
index c9c4bbb..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed_low.png b/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed_low.png
deleted file mode 100644 (file)
index 9e60c21..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_hdr_unread_signed_low.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_inbox.png b/src/gtk2/pixmaps/qgn_list_messagin_inbox.png
deleted file mode 100644 (file)
index eb79b09..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_inbox.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail.png b/src/gtk2/pixmaps/qgn_list_messagin_mail.png
deleted file mode 100644 (file)
index 4038776..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_deleted.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_deleted.png
deleted file mode 100644 (file)
index 0e8df2d..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_deleted.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read.png
deleted file mode 100644 (file)
index 2395b98..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read_high.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read_high.png
deleted file mode 100644 (file)
index 2ddb3f5..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read_low.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read_low.png
deleted file mode 100644 (file)
index 6bf9e47..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_read_low.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread.png
deleted file mode 100644 (file)
index e85b88c..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread_high.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread_high.png
deleted file mode 100644 (file)
index 4a34249..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread_low.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread_low.png
deleted file mode 100644 (file)
index 76dd826..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_encrypted_unread_low.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_high.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_high.png
deleted file mode 100644 (file)
index 92799de..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_high_unread.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_high_unread.png
deleted file mode 100644 (file)
index f19237b..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_high_unread.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_low.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_low.png
deleted file mode 100644 (file)
index 6ee833c..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_low.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_low_unread.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_low_unread.png
deleted file mode 100644 (file)
index 739fc52..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_low_unread.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read.png
deleted file mode 100644 (file)
index 5f7dd8f..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read_high.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read_high.png
deleted file mode 100644 (file)
index 8d00684..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read_high.png and /dev/null differ
diff --git a/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read_low.png b/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read_low.png
deleted file mode 100644 (file)
index 0c6b647..0000000
Binary files a/src/gtk2/pixmaps/qgn_list_messagin_mail_signed_read_low.png and /dev/null differ
diff --git