#include <modest-runtime.h>
#include <modest-tny-msg.h>
#include <modest-tny-account.h>
+#include <modest-address-book.h>
#include "modest-ui-actions.h"
}
void
+modest_ui_actions_on_add_to_contacts (GtkAction *action, ModestWindow *win)
+{
+ GtkClipboard *clipboard = NULL;
+ gchar *selection = NULL;
+
+ clipboard = gtk_clipboard_get (GDK_SELECTION_PRIMARY);
+ selection = gtk_clipboard_wait_for_text (clipboard);
+
+ modest_address_book_add_address (selection);
+ g_free (selection);
+}
+
+void
modest_ui_actions_on_accounts (GtkAction *action, ModestWindow *win)
{
/* GtkDialog *account_win; */
{
gchar *account_name;
TnyAccount *tny_account;
- //ModestTnySendQueue *send_queue;
+ ModestTnySendQueue *send_queue;
ModestMailOperation *mail_op;
account_name =
g_printerr ("modest: cannot get account\n");
return;
}
- /* FIXME */
-#if 0
+
tny_account =
modest_tny_account_store_get_tny_account_by_account (modest_runtime_get_account_store(),
account_name,
g_printerr ("modest: cannot get tny transport account for %s\n", account_name);
return;
}
-
send_queue = modest_tny_send_queue_new (TNY_CAMEL_TRANSPORT_ACCOUNT(tny_account));
if (!send_queue) {
g_object_unref (G_OBJECT(tny_account));
g_printerr ("modest: cannot get send queue for %s\n", account_name);
return;
}
- modest_tny_send_queue_flush (send_queue);
+ //modest_tny_send_queue_flush (send_queue);
g_object_unref (G_OBJECT(send_queue));
g_object_unref (G_OBJECT(tny_account));
-#endif /* 0 */
+
tny_account =
modest_tny_account_store_get_tny_account_by_account (modest_runtime_get_account_store(),
account_name,
gboolean selected,
ModestMainWindow *main_window)
{
-// GtkLabel *folder_info_label;
- gchar *txt;
+ gchar *txt;
ModestConf *conf;
GtkWidget *header_view;
-/* folder_info_label = */
-/* GTK_LABEL (modest_widget_factory_get_folder_info_label */
-/* (modest_runtime_get_widget_factory())); */
-
-/* if (!folder) { */
-/* gtk_label_set_label (GTK_LABEL(folder_info_label), ""); */
-/* return; */
-/* } */
-
g_return_if_fail (MODEST_IS_MAIN_WINDOW(main_window));
header_view = modest_main_window_get_child_widget(main_window,
}
void
+modest_ui_actions_on_msg_recpt_activated (ModestMsgView *msgview,
+ const gchar *address,
+ ModestWindow *win)
+{
+ g_message ("%s %s", __FUNCTION__, address);
+}
+
+void
modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window)
{
TnyTransportAccount *transport_account;
if (!folder_view)
return;
- folder = modest_folder_view_get_selected (MODEST_FOLDER_VIEW(folder_view));
+ folder = modest_folder_view_get_selected (MODEST_FOLDER_VIEW (folder_view));
mail_op = modest_mail_operation_new ();
modest_mail_operation_remove_folder (mail_op, folder, move_to_trash);
if (error)
g_warning ("%s\n", error->message);
- g_object_unref (mail_op);
+ g_object_unref (G_OBJECT (mail_op));
+ g_object_unref (G_OBJECT (folder));
}
void