2007-06-08 Murray Cumming <murrayc@murrayc.com>
[modest] / src / modest-ui-actions.c
index 959cc97..a7b20ad 100644 (file)
@@ -485,7 +485,7 @@ modest_ui_actions_on_new_msg (GtkAction *action, ModestWindow *win)
                goto cleanup;
        }
        
-       account = modest_tny_account_store_get_tny_account_by_account (modest_runtime_get_account_store(),
+       account = modest_tny_account_store_get_server_account (modest_runtime_get_account_store(),
                                                                       account_name,
                                                                       TNY_ACCOUNT_TYPE_STORE);
        if (!account) {
@@ -795,7 +795,7 @@ reply_forward_cb (ModestMailOperation *mail_op,
                goto cleanup;
        }
 
-       account = modest_tny_account_store_get_tny_account_by_account (modest_runtime_get_account_store(),
+       account = modest_tny_account_store_get_server_account (modest_runtime_get_account_store(),
                                                                       rf_helper->account_name,
                                                                       TNY_ACCOUNT_TYPE_STORE);
        if (!account) {
@@ -1399,12 +1399,12 @@ modest_ui_actions_on_save_to_drafts (GtkWidget *widget, ModestMsgEditWindow *edi
                return;
        }
 
-       if (!strcmp (account_name, MODEST_ACTUAL_LOCAL_FOLDERS_ACCOUNT_ID)) {
+       if (!strcmp (account_name, MODEST_LOCAL_FOLDERS_ACCOUNT_ID)) {
                account_name = g_strdup (data->account_name);
        }
 
        transport_account =
-               TNY_TRANSPORT_ACCOUNT(modest_tny_account_store_get_tny_account_by_account
+               TNY_TRANSPORT_ACCOUNT(modest_tny_account_store_get_server_account
                                      (modest_runtime_get_account_store(),
                                       account_name,
                                       TNY_ACCOUNT_TYPE_TRANSPORT));
@@ -1467,7 +1467,7 @@ modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window)
        }
        MsgData *data = modest_msg_edit_window_get_msg_data (edit_window);
 
-       if (!strcmp (account_name, MODEST_ACTUAL_LOCAL_FOLDERS_ACCOUNT_ID)) {
+       if (!strcmp (account_name, MODEST_LOCAL_FOLDERS_ACCOUNT_ID)) {
                account_name = g_strdup (data->account_name);
        }
        
@@ -2656,6 +2656,7 @@ modest_ui_actions_on_main_window_move_to (GtkAction *action,
 
        /* Create and run the dialog */
        dialog = create_move_to_dialog (MODEST_WINDOW (win), folder_view, &tree_view);
+       modest_folder_view_select_first_inbox_or_local (MODEST_FOLDER_VIEW (tree_view));
        result = gtk_dialog_run (GTK_DIALOG(dialog));
        g_object_ref (tree_view);
 
@@ -3039,6 +3040,22 @@ modest_ui_actions_on_search_messages (GtkAction *action, ModestWindow *window)
        modest_platform_show_search_messages (GTK_WINDOW (window));
 }
 
+void     
+modest_ui_actions_on_open_addressbook (GtkAction *action, ModestWindow *win)
+{
+       g_return_if_fail (MODEST_IS_WINDOW (win));
+       modest_platform_show_addressbook (GTK_WINDOW (win));
+}
+
+
+void
+modest_ui_actions_on_toggle_find_in_page (GtkToggleAction *action,
+                                         ModestWindow *window)
+{
+       g_return_if_fail (MODEST_IS_MSG_EDIT_WINDOW (window));
+
+       modest_msg_edit_window_toggle_find_toolbar (MODEST_MSG_EDIT_WINDOW (window), gtk_toggle_action_get_active (action));
+}
 
 static void 
 _on_send_receive_progress_changed (ModestMailOperation  *mail_op,