* compile fixes
[modest] / src / gtk / modest-ui-main-view.c
index 68d9119..b6c21c7 100644 (file)
@@ -49,9 +49,9 @@
 #include "../modest-identity-mgr.h"
 
 #include "../modest-tny-account-store.h"
-#include "../modest-tny-folder-tree-view.h"
-#include "../modest-tny-header-tree-view.h"
-#include "../modest-tny-msg-view.h"
+#include "../widgets/modest-folder-view.h"
+#include "../widgets/modest-header-view.h"
+#include "../widgets/modest-msg-view.h"
 #include "../modest-tny-transport-actions.h"
 #include "../modest-tny-store-actions.h"
 
@@ -74,11 +74,11 @@ static GtkWidget* modest_main_window_folder_tree (ModestAccountMgr *modest_acc_m
 
 static GtkWidget* modest_main_window_header_tree (TnyMsgFolderIface *folder);
 
-static void on_folder_clicked (ModestTnyFolderTreeView *folder_tree,
+static void on_folder_clicked (ModestFolderView *folder_tree,
                               TnyMsgFolderIface *folder,
                               gpointer data);
 
-static void on_message_clicked (ModestTnyFolderTreeView *folder_tree,
+static void on_message_clicked (ModestFolderView *folder_tree,
                                TnyMsgIface *message,
                                gpointer data);
 
@@ -94,8 +94,6 @@ static void on_forward_attached_activated (GtkWidget *widget, gpointer user_data
 
 static void on_headers_status_update (GtkWidget *header_view, const gchar *msg, gint status,
                          gpointer user_data);
-static void on_status_cleanup (gpointer user_data);
-
 static void register_toolbar_callbacks (ModestUI *modest_ui);
 
 
@@ -136,9 +134,9 @@ modest_ui_show_main_window (ModestUI *modest_ui)
        priv = MODEST_UI_GET_PRIVATE(modest_ui);
        
        height = modest_conf_get_int (priv->modest_conf,
-                                     MODEST_CONF_MAIN_WINDOW_HEIGHT,NULL);
+                                     MODEST_MAIN_WINDOW_HEIGHT,NULL);
        width  = modest_conf_get_int (priv->modest_conf,
-                                     MODEST_CONF_MAIN_WINDOW_WIDTH,NULL);
+                                     MODEST_MAIN_WINDOW_WIDTH,NULL);
 
        win = glade_xml_get_widget (priv->glade_xml, "main");
        if (!win) {
@@ -168,7 +166,7 @@ modest_ui_show_main_window (ModestUI *modest_ui)
        g_signal_connect (G_OBJECT(folder_view), "folder_selected",
                          G_CALLBACK(on_folder_clicked), modest_ui);
        
-       message_view  = GTK_WIDGET(modest_tny_msg_view_new (NULL));
+       message_view  = GTK_WIDGET(modest_msg_view_new (NULL));
        priv->message_view = message_view;
        if (!message_view) {
                g_warning ("failed to create message view");
@@ -315,14 +313,14 @@ register_toolbar_callbacks (ModestUI *modest_ui)
 
 
 static void
-on_folder_clicked (ModestTnyFolderTreeView *folder_tree,
+on_folder_clicked (ModestFolderView *folder_tree,
                   TnyMsgFolderIface *folder,
                   gpointer data)
 {
        GtkWidget *win;
        GtkWidget *button;
-       ModestTnyHeaderTreeView *tree_view;
-       ModestTnyMsgView *msg_view;
+       ModestHeaderView *tree_view;
+       ModestMsgView *msg_view;
        ModestUIPrivate *priv;
        GtkWidget *scrollview;
 
@@ -332,13 +330,13 @@ on_folder_clicked (ModestTnyFolderTreeView *folder_tree,
        priv = MODEST_UI_GET_PRIVATE(data);
        scrollview = glade_xml_get_widget (priv->glade_xml,"mail_list");
 
-       tree_view = MODEST_TNY_HEADER_TREE_VIEW (priv->header_view);
+       tree_view = MODEST_HEADER_VIEW (priv->header_view);
 
        win = glade_xml_get_widget (priv->glade_xml, "main");
        gtk_window_set_title (GTK_WINDOW(win),
                              tny_msg_folder_iface_get_name(folder));
 
-       modest_tny_header_tree_view_set_folder (tree_view, folder);
+       modest_header_view_set_folder (tree_view, folder);
        priv->current_folder = folder;
 
        button = glade_xml_get_widget (priv->glade_xml, "toolb_reply");
@@ -356,28 +354,28 @@ on_folder_clicked (ModestTnyFolderTreeView *folder_tree,
                gtk_widget_set_sensitive(button, FALSE);
        }
 
-       msg_view = MODEST_TNY_MSG_VIEW (priv->message_view);
+       msg_view = MODEST_MSG_VIEW (priv->message_view);
        g_return_if_fail (msg_view);
 
-       modest_tny_msg_view_set_message  (msg_view, NULL);
+       modest_msg_view_set_message  (msg_view, NULL);
 }
 
 
 static void
-on_message_clicked (ModestTnyFolderTreeView *folder_tree,
-                               TnyMsgIface *message,
-                               gpointer data)
+on_message_clicked (ModestFolderView *folder_tree,
+                   TnyMsgIface *message,
+                   gpointer data)
 {
        GtkWidget *button;
-       ModestTnyMsgView *msg_view;
+       ModestMsgView *msg_view;
        ModestUIPrivate *priv;
 
        g_return_if_fail (data);
 
        priv = MODEST_UI_GET_PRIVATE (data);
-       msg_view = MODEST_TNY_MSG_VIEW (priv->message_view);
+       msg_view = MODEST_MSG_VIEW (priv->message_view);
 
-       modest_tny_msg_view_set_message (msg_view, message);
+       modest_msg_view_set_message (msg_view, message);
        
        button = glade_xml_get_widget (priv->glade_xml, "toolb_reply");
        if (button) {
@@ -400,19 +398,19 @@ modest_main_window_header_tree (TnyMsgFolderIface *folder)
        int i;
        GSList *columns = NULL;
        GtkWidget *header_tree;
-       ModestTnyHeaderTreeViewColumn cols[] = {
-               MODEST_TNY_HEADER_TREE_VIEW_COLUMN_MSGTYPE,
-               MODEST_TNY_HEADER_TREE_VIEW_COLUMN_ATTACH,
-               MODEST_TNY_HEADER_TREE_VIEW_COLUMN_FROM,
-               MODEST_TNY_HEADER_TREE_VIEW_COLUMN_SUBJECT,
-               MODEST_TNY_HEADER_TREE_VIEW_COLUMN_RECEIVED_DATE
+       ModestHeaderViewColumn cols[] = {
+               MODEST_HEADER_VIEW_COLUMN_MSGTYPE,
+               MODEST_HEADER_VIEW_COLUMN_ATTACH,
+               MODEST_HEADER_VIEW_COLUMN_FROM,
+               MODEST_HEADER_VIEW_COLUMN_SUBJECT,
+               MODEST_HEADER_VIEW_COLUMN_RECEIVED_DATE
        };
 
-       for (i = 0 ; i != sizeof(cols) / sizeof(ModestTnyHeaderTreeViewColumn); ++i)
+       for (i = 0 ; i != sizeof(cols) / sizeof(ModestHeaderViewColumn); ++i)
                columns = g_slist_append (columns, GINT_TO_POINTER(cols[i]));
 
-       header_tree = GTK_WIDGET(modest_tny_header_tree_view_new(folder, columns,
-                                                                MODEST_TNY_HEADER_TREE_VIEW_STYLE_NORMAL));
+       header_tree = GTK_WIDGET(modest_header_view_new(folder, columns,
+                                                       MODEST_HEADER_VIEW_STYLE_NORMAL));
        g_slist_free (columns);
 
        if (!header_tree) {
@@ -430,7 +428,7 @@ modest_main_window_folder_tree (ModestAccountMgr *modest_acc_mgr,
 {
        GtkWidget *folder_tree;
 
-       folder_tree = GTK_WIDGET (modest_tny_folder_tree_view_new (account_store));
+       folder_tree = GTK_WIDGET (modest_folder_view_new (account_store));
        if (!folder_tree) {
                g_warning ("could not create folder list");
                return NULL;
@@ -467,18 +465,18 @@ on_delete_clicked (GtkWidget *widget, gpointer user_data)
        GtkTreeIter iter;
        GtkTreeModel *mymodel;
 
-       ModestTnyHeaderTreeView *header_view;
-       ModestTnyMsgView *msg_view;
+       ModestHeaderView *header_view;
+       ModestMsgView *msg_view;
        ModestUIPrivate *priv;
 
        g_return_if_fail (modest_ui);
 
        priv = MODEST_UI_GET_PRIVATE(modest_ui);
 
-       msg_view = MODEST_TNY_MSG_VIEW(priv->message_view);
+       msg_view = MODEST_MSG_VIEW(priv->message_view);
        g_return_if_fail (msg_view);
 
-       header_view = MODEST_TNY_HEADER_TREE_VIEW(priv->header_view);
+       header_view = MODEST_HEADER_VIEW(priv->header_view);
        g_return_if_fail (header_view);
 
        sel = gtk_tree_view_get_selection (GTK_TREE_VIEW(header_view));
@@ -550,8 +548,8 @@ on_sendreceive_button_clicked (GtkWidget *widget, gpointer user_data)
                
        if (priv->header_view && priv->current_folder) {
                
-               modest_tny_header_tree_view_set_folder (MODEST_TNY_HEADER_TREE_VIEW(priv->header_view),
-                                                       priv->current_folder);
+               modest_header_view_set_folder (MODEST_HEADER_VIEW(priv->header_view),
+                                              priv->current_folder);
                gtk_widget_queue_draw (priv->header_view);
        }
 }