* main-window menu->open now opens selected message in new message viewer window
authorNils Faerber <nils@kernelconcepts.de>
Mon, 12 Jun 2006 19:00:04 +0000 (19:00 +0000)
committerNils Faerber <nils@kernelconcepts.de>
Mon, 12 Jun 2006 19:00:04 +0000 (19:00 +0000)
* message viewer window displays header correctly, message body still missing
* modest window manager now also recognises MODEST_VIEW_WINDOW
* small change to glade file, removed scrolled window from paned child2

pmo-trunk-r242

src/gtk-glade/modest-ui-main-view.c
src/gtk-glade/modest-ui-message-editor.c
src/gtk-glade/modest-ui-message-viewer.c
src/gtk-glade/modest-ui-message-viewer.h
src/gtk-glade/modest.glade
src/modest-viewer-window.h
src/modest-window-mgr.c

index 2fb04bf..c981f90 100644 (file)
@@ -89,6 +89,7 @@ modest_ui_show_main_window (ModestUI *modest_ui)
        GtkWidget     *message_view;
        GtkWidget     *account_settings_item;
        GtkWidget     *delete_item;
+       GtkWidget     *open_item;
        GtkWidget     *view_attachments_item;
        GtkWidget     *new_account_item;
 
@@ -168,12 +169,19 @@ modest_ui_show_main_window (ModestUI *modest_ui)
        g_signal_connect (new_account_item, "activate",
                G_CALLBACK(new_wizard_account), modest_ui);
 
+       open_item = glade_xml_get_widget (priv->glade_xml, "open1");
+       if (!open_item) {
+               g_warning ("The open item isn't available!\n");
+               return FALSE;
+       }
+       g_signal_connect (open_item, "activate", G_CALLBACK(on_open_message_clicked),
+                         modest_ui);
+
        delete_item = glade_xml_get_widget (priv->glade_xml, "delete1");
        if (!delete_item) {
                g_warning ("The delete item isn't available!\n");
                return FALSE;
        }
-
        g_signal_connect (delete_item, "activate", G_CALLBACK(on_delete_clicked),
                          modest_ui);
 
index a4e9591..08c4631 100644 (file)
@@ -290,7 +290,7 @@ new_editor_with_presets (ModestUI *modest_ui, const gchar *to_header,
        g_signal_connect (edit_win, "delete-event", G_CALLBACK(close_edit_window),
                          edit_win);
 
-       priv = MODEST_UI_GET_PRIVATE(windata->modest_ui);
+       priv = MODEST_UI_GET_PRIVATE(modest_ui);
        height = modest_conf_get_int (priv->modest_conf,
                                          MODEST_CONF_EDIT_WINDOW_HEIGHT, NULL);
        width  = modest_conf_get_int (priv->modest_conf,
index 0dc358b..bc557a8 100644 (file)
@@ -30,7 +30,8 @@
 #include "../modest-viewer-window.h"
 
 #include "modest-ui-glade.h"
-#include "modest-ui-wizard.h"
+#include "modest-ui-message-viewer.h"
+
 
 
 typedef struct {
@@ -46,6 +47,7 @@ GtkContainer
        GtkWidget       *top_container;
        GladeXML        *glade_xml;
        ViewerWinData   *win_data;
+       GtkWidget       *paned;
 
        glade_xml = glade_xml_new(MODEST_GLADE, "viewer_top_container", NULL);
        if (!glade_xml)
@@ -63,6 +65,128 @@ GtkContainer
                return NULL;
        }
 
+       if (!GTK_IS_WIDGET(msg_view))
+               return NULL;
+       paned = glade_xml_get_widget(glade_xml, "vpaned3");
+       gtk_paned_add2(GTK_PANED(paned), msg_view);
+       gtk_widget_show(msg_view);
+
        return GTK_CONTAINER(top_container);
 }
 
+
+static void
+close_viewer_window(GtkWidget *win, GdkEvent *event, gpointer data)
+{
+       ModestViewerWindow *viewer_win;
+       ModestUIPrivate *priv;
+       ViewerWinData *win_data;
+
+       viewer_win = (ModestViewerWindow *)data;
+       win_data = modest_viewer_window_get_data(viewer_win);
+       priv = MODEST_UI_GET_PRIVATE(win_data->modest_ui);
+
+       modest_window_mgr_unregister(priv->modest_window_mgr, G_OBJECT(viewer_win));
+       gtk_widget_hide (GTK_WIDGET(viewer_win));
+       gtk_widget_destroy(GTK_WIDGET(viewer_win));
+}
+
+
+static void
+open_message_viewer_window(ModestUI *modest_ui)
+{
+       GtkWidget *viewer_win;
+       ModestUIPrivate *priv;
+       gint width, height;
+       ViewerWinData *windata;
+       GtkWidget *paned;
+       GtkTreeSelection *sel;
+       GtkTreeModel *model;
+       GtkTreeIter iter;
+       GtkScrolledWindow *scroll;
+       ModestTnyHeaderTreeView *header_view;
+       TnyMsgHeaderIface *header;
+       const TnyMsgFolderIface *folder;
+       const TnyMsgIface *msg;
+       const gchar *subject, *to, *from;
+       time_t sent_date;
+       gchar date_str[101];
+       GtkWidget *w;
+
+       priv = MODEST_UI_GET_PRIVATE(modest_ui);
+       /* FIXME: maybe use seperate viewer defaults? */
+       height = modest_conf_get_int (priv->modest_conf, MODEST_CONF_EDIT_WINDOW_HEIGHT, NULL);
+       width  = modest_conf_get_int (priv->modest_conf, MODEST_CONF_EDIT_WINDOW_WIDTH, NULL);
+
+       paned = glade_xml_get_widget (priv->glade_xml,"mail_paned");
+       g_return_if_fail (paned);
+
+       scroll = GTK_SCROLLED_WINDOW(gtk_paned_get_child1 (GTK_PANED(paned)));
+        g_return_if_fail (scroll);
+
+       header_view = MODEST_TNY_HEADER_TREE_VIEW(gtk_bin_get_child (GTK_BIN(scroll)));
+       g_return_if_fail (header_view);
+
+       sel = gtk_tree_view_get_selection (GTK_TREE_VIEW(header_view));
+       g_return_if_fail (sel);
+
+       if (!gtk_tree_selection_get_selected (sel, &model, &iter)) {
+               g_warning("nothing to display");
+               return;
+       }
+
+       gtk_tree_model_get (model, &iter,
+               TNY_MSG_HEADER_LIST_MODEL_INSTANCE_COLUMN, &header, -1);
+
+       if (!header) {
+               g_warning("no header");
+               return;
+       }
+
+       folder = tny_msg_header_iface_get_folder (TNY_MSG_HEADER_IFACE(header));
+       if (!folder) {
+               g_warning ("cannot find folder");
+               return;
+       }
+
+       msg = tny_msg_folder_iface_get_message (TNY_MSG_FOLDER_IFACE(folder), header);
+       if (!msg) {
+               g_warning ("cannot find msg");
+               return;
+       }
+
+       viewer_win = modest_viewer_window_new(modest_ui, msg);
+       windata = (ViewerWinData *)modest_viewer_window_get_data(MODEST_VIEWER_WINDOW(viewer_win));
+       g_return_if_fail(windata);
+
+       subject = tny_msg_header_iface_get_subject(header);
+       from = tny_msg_header_iface_get_from(header);
+       to = tny_msg_header_iface_get_to(header);
+       sent_date = tny_msg_header_iface_get_date_sent(header);
+       strftime (date_str, 100, "%c", localtime (&sent_date));
+
+       w = glade_xml_get_widget (windata->glade_xml, "from");
+       gtk_label_set_text(GTK_LABEL(w), from);
+       w = glade_xml_get_widget (windata->glade_xml, "to");
+       gtk_label_set_text(GTK_LABEL(w), to);
+       w = glade_xml_get_widget (windata->glade_xml, "subject");
+       gtk_label_set_text(GTK_LABEL(w), subject);
+       w = glade_xml_get_widget (windata->glade_xml, "date");
+       gtk_label_set_text(GTK_LABEL(w), date_str);
+
+       // g_message("new viewer win@%dx%d", width, height);
+       gtk_widget_set_usize (GTK_WIDGET(viewer_win), width, height);
+       gtk_widget_show(viewer_win);
+       modest_window_mgr_register(priv->modest_window_mgr, G_OBJECT(viewer_win), MODEST_VIEW_WINDOW, 0);
+       g_signal_connect (viewer_win, "destroy-event", G_CALLBACK(close_viewer_window), viewer_win);
+       g_signal_connect (viewer_win, "delete-event", G_CALLBACK(close_viewer_window), viewer_win);
+}
+
+
+void
+on_open_message_clicked (GtkWidget *widget, gpointer user_data)
+{
+       ModestUI *modest_ui = (ModestUI *)user_data;
+
+       open_message_viewer_window(modest_ui);
+}
index e69de29..bacabf1 100644 (file)
@@ -0,0 +1,2 @@
+
+void on_open_message_clicked(GtkWidget *widget, gpointer user_data);
index a3ae4e4..0a5ddc7 100644 (file)
          </child>
 
          <child>
-           <widget class="GtkScrolledWindow" id="scrolledwindow10">
-             <property name="visible">True</property>
-             <property name="can_focus">True</property>
-             <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-             <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-             <property name="shadow_type">GTK_SHADOW_IN</property>
-             <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-             <child>
-               <widget class="GtkTextView" id="textview2">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="editable">True</property>
-                 <property name="overwrite">False</property>
-                 <property name="accepts_tab">True</property>
-                 <property name="justification">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap_mode">GTK_WRAP_NONE</property>
-                 <property name="cursor_visible">True</property>
-                 <property name="pixels_above_lines">0</property>
-                 <property name="pixels_below_lines">0</property>
-                 <property name="pixels_inside_wrap">0</property>
-                 <property name="left_margin">0</property>
-                 <property name="right_margin">0</property>
-                 <property name="indent">0</property>
-                 <property name="text" translatable="yes"></property>
-               </widget>
-             </child>
-           </widget>
-           <packing>
-             <property name="shrink">True</property>
-             <property name="resize">True</property>
-           </packing>
+           <placeholder/>
          </child>
        </widget>
        <packing>
 
 <widget class="GtkDialog" id="account_wizard">
   <property name="border_width">10</property>
-  <property name="title" translatable="yes">Account Setup</property>
+  <property name="title" translatable="yes"></property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
          <property name="enable_popup">False</property>
 
          <child>
-           <widget class="GtkVBox" id="PresetPage">
+           <widget class="GtkVBox" id="vbox5">
              <property name="visible">True</property>
              <property name="homogeneous">False</property>
              <property name="spacing">10</property>
                  <property name="fill">True</property>
                </packing>
              </child>
-           </widget>
-           <packing>
-             <property name="tab_expand">False</property>
-             <property name="tab_fill">True</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkLabel" id="label57">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes"></property>
-             <property name="use_underline">False</property>
-             <property name="use_markup">False</property>
-             <property name="justify">GTK_JUSTIFY_LEFT</property>
-             <property name="wrap">False</property>
-             <property name="selectable">False</property>
-             <property name="xalign">0.5</property>
-             <property name="yalign">0.5</property>
-             <property name="xpad">0</property>
-             <property name="ypad">0</property>
-             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-             <property name="width_chars">-1</property>
-             <property name="single_line_mode">False</property>
-             <property name="angle">0</property>
-           </widget>
-           <packing>
-             <property name="type">tab</property>
-           </packing>
-         </child>
-
-         <child>
-           <widget class="GtkTable" id="EMailAdressPage">
-             <property name="visible">True</property>
-             <property name="n_rows">2</property>
-             <property name="n_columns">2</property>
-             <property name="homogeneous">False</property>
-             <property name="row_spacing">10</property>
-             <property name="column_spacing">10</property>
 
              <child>
-               <widget class="GtkLabel" id="AWEMailAddressLabel">
+               <widget class="GtkTable" id="table3">
                  <property name="visible">True</property>
-                 <property name="label" translatable="yes" context="yes">E-mail address:</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">0</property>
-                 <property name="bottom_attach">1</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
+                 <property name="n_rows">1</property>
+                 <property name="n_columns">2</property>
+                 <property name="homogeneous">False</property>
+                 <property name="row_spacing">10</property>
+                 <property name="column_spacing">10</property>
 
-             <child>
-               <widget class="GtkEntry" id="AWEMailAddressEntry">
-                 <property name="visible">True</property>
-                 <property name="editable">True</property>
-                 <property name="visibility">True</property>
-                 <property name="max_length">0</property>
-                 <property name="text" translatable="yes"></property>
-                 <property name="has_frame">True</property>
-                 <property name="invisible_char">*</property>
-                 <property name="activates_default">False</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">2</property>
-                 <property name="top_attach">0</property>
-                 <property name="bottom_attach">1</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
+                 <child>
+                   <widget class="GtkLabel" id="label15">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes" context="yes">Mailbox type:</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                   </packing>
+                 </child>
 
-             <child>
-               <widget class="GtkLabel" id="AWRealNameLabel">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes" context="yes">Your name:</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
+                 <child>
+                   <widget class="GtkComboBox" id="AWMailboxtypeComboBox">
+                     <property name="visible">True</property>
+                     <property name="items" translatable="yes" context="yes">IMAP
+POP
+LOCAL</property>
+                     <property name="add_tearoffs">False</property>
+                     <property name="focus_on_click">True</property>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">1</property>
+                     <property name="right_attach">2</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                   </packing>
+                 </child>
                </widget>
                <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">True</property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkEntry" id="AWRealNameEntry">
+               <widget class="GtkHBox" id="hbox18">
                  <property name="visible">True</property>
-                 <property name="editable">True</property>
-                 <property name="visibility">True</property>
-                 <property name="max_length">0</property>
-                 <property name="text" translatable="yes"></property>
-                 <property name="has_frame">True</property>
-                 <property name="invisible_char">*</property>
-                 <property name="activates_default">False</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label13">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes" context="yes">! Note: You cannot edit mailbox type once setup is complete</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">10</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
                </widget>
                <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">2</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="y_options"></property>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
                </packing>
              </child>
            </widget>
          </child>
 
          <child>
-           <widget class="GtkLabel" id="label64">
+           <widget class="GtkLabel" id="label57">
              <property name="visible">True</property>
              <property name="label" translatable="yes"></property>
              <property name="use_underline">False</property>
          </child>
 
          <child>
-           <widget class="GtkTable" id="IncomingPage">
+           <widget class="GtkTable" id="table4">
              <property name="visible">True</property>
-             <property name="n_rows">5</property>
-             <property name="n_columns">3</property>
+             <property name="n_rows">4</property>
+             <property name="n_columns">2</property>
              <property name="homogeneous">False</property>
              <property name="row_spacing">10</property>
-             <property name="column_spacing">10</property>
+             <property name="column_spacing">0</property>
 
              <child>
-               <widget class="GtkLabel" id="AWPasswordLabel">
+               <widget class="GtkLabel" id="AWRealNameLabel">
                  <property name="visible">True</property>
-                 <property name="label" translatable="yes" context="yes">Password:</property>
+                 <property name="label" translatable="yes" context="yes">Name:</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
-                 <property name="top_attach">4</property>
-                 <property name="bottom_attach">5</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
                  <property name="x_options">fill</property>
-                 <property name="y_options"></property>
                </packing>
              </child>
 
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
-                 <property name="top_attach">3</property>
-                 <property name="bottom_attach">4</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
                  <property name="x_options">fill</property>
-                 <property name="y_options"></property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkLabel" id="AWInServerLabel">
+               <widget class="GtkLabel" id="AWPasswordLabel">
                  <property name="visible">True</property>
-                 <property name="label" translatable="yes" context="yes">Incoming server:</property>
+                 <property name="label" translatable="yes" context="yes">Password:</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="top_attach">2</property>
                  <property name="bottom_attach">3</property>
                  <property name="x_options">fill</property>
-                 <property name="y_options"></property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkLabel" id="label15">
+               <widget class="GtkLabel" id="AWEMailAddressLabel">
                  <property name="visible">True</property>
-                 <property name="label" translatable="yes" context="yes">Mailbox type:</property>
+                 <property name="label" translatable="yes" context="yes">E-mail address:</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
-                 <property name="top_attach">0</property>
-                 <property name="bottom_attach">1</property>
+                 <property name="top_attach">3</property>
+                 <property name="bottom_attach">4</property>
                  <property name="x_options">fill</property>
-                 <property name="y_options"></property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkEntry" id="AWInServerComboEntry">
+               <widget class="GtkEntry" id="AWRealNameEntry">
                  <property name="visible">True</property>
                  <property name="editable">True</property>
                  <property name="visibility">True</property>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">2</property>
-                 <property name="top_attach">2</property>
-                 <property name="bottom_attach">3</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkComboBox" id="AWMailboxtypeComboBox">
-                 <property name="visible">True</property>
-                 <property name="items" translatable="yes" context="yes">IMAP
-POP
-LOCAL</property>
-                 <property name="add_tearoffs">False</property>
-                 <property name="focus_on_click">True</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">3</property>
                  <property name="top_attach">0</property>
                  <property name="bottom_attach">1</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options">fill</property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkCheckButton" id="AWInSSLCheckButton">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="label" translatable="yes">Use SSL</property>
-                 <property name="use_underline">True</property>
-                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                 <property name="focus_on_click">True</property>
-                 <property name="active">False</property>
-                 <property name="inconsistent">False</property>
-                 <property name="draw_indicator">True</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">2</property>
-                 <property name="right_attach">3</property>
-                 <property name="top_attach">2</property>
-                 <property name="bottom_attach">3</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkLabel" id="MailboxTypeNoteLabel">
+               <widget class="GtkEntry" id="AWUserNameEntry">
                  <property name="visible">True</property>
-                 <property name="label" translatable="yes" context="yes">Note: You cannot edit mailbox type once setup is complete!</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">1</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">10</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
+                 <property name="editable">True</property>
+                 <property name="visibility">True</property>
+                 <property name="max_length">0</property>
+                 <property name="text" translatable="yes"></property>
+                 <property name="has_frame">True</property>
+                 <property name="invisible_char">*</property>
+                 <property name="activates_default">False</property>
                </widget>
                <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">3</property>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
                  <property name="top_attach">1</property>
                  <property name="bottom_attach">2</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkEntry" id="AWUserNameEntry">
+               <widget class="GtkEntry" id="AWPasswordEntry">
                  <property name="visible">True</property>
                  <property name="editable">True</property>
-                 <property name="visibility">True</property>
+                 <property name="visibility">False</property>
                  <property name="max_length">0</property>
                  <property name="text" translatable="yes"></property>
                  <property name="has_frame">True</property>
@@ -3066,18 +2943,17 @@ LOCAL</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
-                 <property name="right_attach">3</property>
-                 <property name="top_attach">3</property>
-                 <property name="bottom_attach">4</property>
-                 <property name="y_options"></property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">2</property>
+                 <property name="bottom_attach">3</property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkEntry" id="AWPasswordEntry">
+               <widget class="GtkEntry" id="AWEMailAddressEntry">
                  <property name="visible">True</property>
                  <property name="editable">True</property>
-                 <property name="visibility">False</property>
+                 <property name="visibility">True</property>
                  <property name="max_length">0</property>
                  <property name="text" translatable="yes"></property>
                  <property name="has_frame">True</property>
@@ -3086,10 +2962,9 @@ LOCAL</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
-                 <property name="right_attach">3</property>
-                 <property name="top_attach">4</property>
-                 <property name="bottom_attach">5</property>
-                 <property name="y_options"></property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">3</property>
+                 <property name="bottom_attach">4</property>
                </packing>
              </child>
            </widget>
@@ -3100,7 +2975,7 @@ LOCAL</property>
          </child>
 
          <child>
-           <widget class="GtkLabel" id="label65">
+           <widget class="GtkLabel" id="label58">
              <property name="visible">True</property>
              <property name="label" translatable="yes"></property>
              <property name="use_underline">False</property>
@@ -3123,74 +2998,18 @@ LOCAL</property>
          </child>
 
          <child>
-           <widget class="GtkTable" id="OutgoingPage">
+           <widget class="GtkTable" id="table9">
              <property name="visible">True</property>
-             <property name="n_rows">4</property>
-             <property name="n_columns">3</property>
+             <property name="n_rows">2</property>
+             <property name="n_columns">2</property>
              <property name="homogeneous">False</property>
              <property name="row_spacing">10</property>
              <property name="column_spacing">10</property>
 
              <child>
-               <widget class="GtkLabel" id="AWOutPasswordLabel">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes">Password:</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">3</property>
-                 <property name="bottom_attach">4</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkLabel" id="AWOutUserLabel">
-                 <property name="visible">True</property>
-                 <property name="label" translatable="yes">User name:</property>
-                 <property name="use_underline">False</property>
-                 <property name="use_markup">False</property>
-                 <property name="justify">GTK_JUSTIFY_LEFT</property>
-                 <property name="wrap">False</property>
-                 <property name="selectable">False</property>
-                 <property name="xalign">0</property>
-                 <property name="yalign">0.5</property>
-                 <property name="xpad">0</property>
-                 <property name="ypad">0</property>
-                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-                 <property name="width_chars">-1</property>
-                 <property name="single_line_mode">False</property>
-                 <property name="angle">0</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">0</property>
-                 <property name="right_attach">1</property>
-                 <property name="top_attach">2</property>
-                 <property name="bottom_attach">3</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkLabel" id="label70">
+               <widget class="GtkLabel" id="AWInServerLabel">
                  <property name="visible">True</property>
-                 <property name="label" translatable="yes"></property>
+                 <property name="label" translatable="yes" context="yes">Incoming server:</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3208,8 +3027,8 @@ LOCAL</property>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
@@ -3236,15 +3055,15 @@ LOCAL</property>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
-                 <property name="top_attach">0</property>
-                 <property name="bottom_attach">1</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkEntry" id="AWOutServerComboEntry">
+               <widget class="GtkEntry" id="AWInServerComboEntry">
                  <property name="visible">True</property>
                  <property name="editable">True</property>
                  <property name="visibility">True</property>
@@ -3259,81 +3078,12 @@ LOCAL</property>
                  <property name="right_attach">2</property>
                  <property name="top_attach">0</property>
                  <property name="bottom_attach">1</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkCheckButton" id="AWOutSSLCheckButton">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="label" translatable="yes">Use SSL</property>
-                 <property name="use_underline">True</property>
-                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                 <property name="focus_on_click">True</property>
-                 <property name="active">False</property>
-                 <property name="inconsistent">False</property>
-                 <property name="draw_indicator">True</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">2</property>
-                 <property name="right_attach">3</property>
-                 <property name="top_attach">0</property>
-                 <property name="bottom_attach">1</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
                </packing>
              </child>
 
              <child>
-               <widget class="GtkCheckButton" id="AWUseIncomingCheckButton">
-                 <property name="visible">True</property>
-                 <property name="can_focus">True</property>
-                 <property name="label" translatable="yes">Use incoming settings</property>
-                 <property name="use_underline">True</property>
-                 <property name="relief">GTK_RELIEF_NORMAL</property>
-                 <property name="focus_on_click">True</property>
-                 <property name="active">True</property>
-                 <property name="inconsistent">False</property>
-                 <property name="draw_indicator">True</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">3</property>
-                 <property name="top_attach">1</property>
-                 <property name="bottom_attach">2</property>
-                 <property name="x_options">fill</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkEntry" id="AWOutUserNameEntry">
-                 <property name="visible">True</property>
-                 <property name="sensitive">False</property>
-                 <property name="can_focus">True</property>
-                 <property name="editable">True</property>
-                 <property name="visibility">True</property>
-                 <property name="max_length">0</property>
-                 <property name="text" translatable="yes"></property>
-                 <property name="has_frame">True</property>
-                 <property name="invisible_char">*</property>
-                 <property name="activates_default">False</property>
-               </widget>
-               <packing>
-                 <property name="left_attach">1</property>
-                 <property name="right_attach">3</property>
-                 <property name="top_attach">2</property>
-                 <property name="bottom_attach">3</property>
-                 <property name="y_options"></property>
-               </packing>
-             </child>
-
-             <child>
-               <widget class="GtkEntry" id="AWOutPasswordEntry">
+               <widget class="GtkEntry" id="AWOutServerComboEntry">
                  <property name="visible">True</property>
-                 <property name="sensitive">False</property>
-                 <property name="can_focus">True</property>
                  <property name="editable">True</property>
                  <property name="visibility">True</property>
                  <property name="max_length">0</property>
@@ -3344,10 +3094,9 @@ LOCAL</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
-                 <property name="right_attach">3</property>
-                 <property name="top_attach">3</property>
-                 <property name="bottom_attach">4</property>
-                 <property name="y_options"></property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
                </packing>
              </child>
            </widget>
@@ -3358,7 +3107,7 @@ LOCAL</property>
          </child>
 
          <child>
-           <widget class="GtkLabel" id="label58">
+           <widget class="GtkLabel" id="label59">
              <property name="visible">True</property>
              <property name="label" translatable="yes"></property>
              <property name="use_underline">False</property>
@@ -3381,7 +3130,7 @@ LOCAL</property>
          </child>
 
          <child>
-           <widget class="GtkHBox" id="FinishPage">
+           <widget class="GtkHBox" id="hbox19">
              <property name="visible">True</property>
              <property name="homogeneous">False</property>
              <property name="spacing">0</property>
index 92d6cdc..eda73f5 100644 (file)
@@ -39,6 +39,8 @@ GType        modest_viewer_window_get_type    (void) G_GNUC_CONST;
 /*    otherwise probably a GObject*. */
 GtkWidget*   modest_viewer_window_new (ModestUI *ui, TnyMsgIface *msg);
 
+gpointer modest_viewer_window_get_data(ModestViewerWindow *viewer_win);
+
 
 /* fill in other public functions, eg.: */
 /*     void       modest_viewer_window_do_something (ModestViewerWindow *self, const gchar* param); */
index f06d081..ba065bf 100644 (file)
@@ -108,8 +108,8 @@ modest_window_mgr_register (ModestWindowMgr *self, GObject *win,
        ModestWindowMgrPrivate *priv;
 
        g_return_val_if_fail (self, FALSE);
-       g_return_val_if_fail (type==MODEST_MAIN_WINDOW||type==MODEST_EDIT_WINDOW,
-                             FALSE);
+       g_return_val_if_fail (type==MODEST_MAIN_WINDOW || type==MODEST_EDIT_WINDOW
+                               || type == MODEST_VIEW_WINDOW, FALSE);
 
        priv = MODEST_WINDOW_MGR_GET_PRIVATE(self);