# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-SUBDIRS= src libmodest-dbus-client man po
+SUBDIRS= src man po
+
+if MODEST_HAVE_DBUS_API
+SUBDIRS += libmodest-dbus-client
+endif
if BUILD_TESTS
SUBDIRS += tests
if test "x$with_platform" == "xgnome"; then
PKG_CHECK_MODULES(MODEST_PLATFORM,libtinymail-gnome-desktop-1.0 libnm_glib glib-2.0 >= 2.8 gtk+-2.0 >= 2.10 libnotify)
AC_DEFINE_UNQUOTED(MODEST_PLATFORM_GNOME, 1, ["Whether modest is being built for the GNOME platform."])
- AC_MSG_ERROR([The GNOME Build is currently broken; please try the Maemo build instead])
+dnl AC_MSG_ERROR([The GNOME Build is currently broken; please try the Maemo build instead])
else
have_easysetup=true
+ have_dbusapi=true
PKG_CHECK_MODULES(MODEST_PLATFORM,libosso conic libtinymail-maemo-1.0 libebook-1.2 microb-engine-nss)
AC_DEFINE_UNQUOTED(MODEST_PLATFORM_MAEMO, 1, ["Whether modest is being built for the MAEMO platform."])
AC_DEFINE_UNQUOTED(MODEST_HAVE_EASYSETUP, 1, ["Whether we have the easysetup feature"])
fi
AM_CONDITIONAL(MODEST_HAVE_EASYSETUP,test "x$have_easysetup" == "xtrue")
+AM_CONDITIONAL(MODEST_HAVE_DBUS_API,test "x$have_dbusapi" == "xtrue")
AC_SUBST(MODEST_PLATFORM)
$(MODEST_OGS_LIBS) \
${easysetupmaybe} \
$(MODEST_PLATFORM)/libmodest-ui.la \
- widgets/libmodest-widgets.la \
- dbus_api/libmodest-dbus-api.la
+ widgets/libmodest-widgets.la
+
+
+if MODEST_HAVE_DBUS_API
+modest_LDADD += dbus_api/libmodest-dbus-api.la
+endif
EXTRA_DIST=modest-marshal.list
for (hit_iter = hits; hit_iter; hit_iter = hit_iter->next) {
DBusMessageIter struct_iter;
- ModestSearchHit *hit;
+ ModestSearchResultHit *hit;
char *msg_url;
const char *subject;
const char *folder;
gboolean is_unread;
gint64 ts;
- hit = (ModestSearchHit *) hit_iter->data;
+ hit = (ModestSearchResultHit *) hit_iter->data;
msg_url = hit->msgid;
subject = hit->subject;
g_free (hit->folder);
g_free (hit->sender);
- g_slice_free (ModestSearchHit, hit);
+ g_slice_free (ModestSearchResultHit, hit);
}
dbus_message_iter_close_container (&iter, &array_iter);
/* FIXME: regexp check for email address */
txt = gtk_entry_get_text (GTK_ENTRY(priv->email));
- if (!modest_text_utils_validate_email_address (txt))
+ if (!modest_text_utils_validate_email_address (txt, NULL))
set_current_page_complete (self, FALSE);
else
set_current_page_complete (self, TRUE);
account_name = get_account_name (self);
modest_account_mgr_add_account (priv->account_mgr,
account_name,
+ account_name,
+ get_fullname (self),
+ get_email (self),
+ MODEST_ACCOUNT_RETRIEVE_VALUE_HEADERS_ONLY,
store_name,
transport_name, TRUE);
- modest_account_mgr_set_server_account_user_fullname (priv->account_mgr, account_name,
- get_fullname (self));
- modest_account_mgr_set_server_account_user_email (priv->account_mgr, account_name,
- get_email (self));
-
/* Frees */
g_free (store_name);
g_free (transport_name);
/* Remove account. If succeeded it removes also
the account from the ModestAccountView */
removed = modest_account_mgr_remove_account (account_mgr,
- account_name,
- FALSE);
+ account_name);
if (removed) {
/* Show confirmation dialog ??? */
} else {
}
gboolean
-modest_address_book_check_names (ModestRecptEditor *editor)
+modest_address_book_check_names (ModestRecptEditor *editor, gboolean update_addressbook)
{
g_message (__FUNCTION__);
return TRUE;
/* Note: This ModestPairList* must exist for as long as the combo
* that uses it, because the ModestComboBox uses the ID opaquely,
* so it can't know how to manage its memory. */
- ppriv->connected_via_list = _modest_global_settings_dialog_get_connected_via ();
- combo = modest_combo_box_new (ppriv->connected_via_list, g_int_equal);
+ ppriv->connect_via_list = _modest_global_settings_dialog_get_connected_via ();
+ combo = modest_combo_box_new (ppriv->connect_via_list, g_int_equal);
add_to_table (GTK_TABLE (table_update), label, combo);
/* Note: This ModestPairList* must exist for as long as the combo
* that uses it, because the ModestComboBox uses the ID opaquely,
* so it can't know how to manage its memory. */
- ppriv->combo_msg_formats_list = _modest_global_settings_dialog_get_msg_formats ();
- combo = modest_combo_box_new (ppriv->cmsg_formats_list, g_int_equal);
+ ppriv->msg_format_list = _modest_global_settings_dialog_get_msg_formats ();
+ combo = modest_combo_box_new (ppriv->msg_format_list, g_int_equal);
add_to_table (GTK_TABLE (table), label, combo);
ModestMailOperation *mail_op);
static void on_progress_changed (ModestMailOperation *mail_op,
+ ModestMailOperationState *state,
ModestGnomeInfoBar *self);
static gboolean progressbar_clean (GtkProgressBar *bar);
static void
on_progress_changed (ModestMailOperation *mail_op,
+ ModestMailOperationState *state,
ModestGnomeInfoBar *self)
{
ModestGnomeInfoBarPrivate *priv;
#define MODEST_HEADER_ICON_HIGH_PRIORITY PIXMAP_PREFIX"modest_high_no_attachment.png"
#define MODEST_HEADER_ICON_LOW_PRIORITY PIXMAP_PREFIX"modest_low_no_attachment.png"
#define MODEST_HEADER_ICON_NORM_PRIORITY PIXMAP_PREFIX"modest_normal_no_attachment.png"
+#define MODEST_HEADER_ICON_HIGH PIXMAP_PREFIX"modest_high_no_attachment.png"
+#define MODEST_HEADER_ICON_LOW PIXMAP_PREFIX"modest_low_no_attachment.png"
/*
*
*/
/* #define MODEST_TOOLBAR_ICON_PREV PIXMAP_PREFIX "back.png" */
#define MODEST_TOOLBAR_ICON_STOP PIXMAP_PREFIX "stock-stop.png"
#define MODEST_TOOLBAR_ICON_FORMAT_BULLETS PIXMAP_PREFIX "qgn_list_gene_bullets"
+#define MODEST_TOOLBAR_ICON_BOLD GTK_STOCK_BOLD
+#define MODEST_TOOLBAR_ICON_ITALIC GTK_STOCK_ITALIC
/* Stock icon names */
#define MODEST_STOCK_MAIL_SEND "modest-stock-mail-send"
{ "ActionsForward", MODEST_STOCK_FORWARD, N_("_Forward"), NULL, N_("Forward a message"), G_CALLBACK (modest_ui_actions_on_forward) },
{ "ActionsBounce", NULL, N_("_Bounce"), NULL, N_("Bounce a message"), NULL },
{ "ActionsSendReceive", GTK_STOCK_REFRESH, N_("Send/Receive"), NULL, N_("Send and receive messages"), G_CALLBACK (modest_ui_actions_on_send_receive) },
- { "ActionsDelete", GTK_STOCK_DELETE, N_("Delete message"), NULL, N_("Delete messages"), G_CALLBACK (modest_ui_actions_on_delete) },
+ { "ActionsDelete", GTK_STOCK_DELETE, N_("Delete message"), NULL, N_("Delete messages"), G_CALLBACK (modest_ui_actions_on_delete_message) },
{ "ActionsFolderNew", NULL, N_("New Folder"), NULL, N_("Create a new folder"), G_CALLBACK (modest_ui_actions_on_new_folder) },
{ "ActionsFolderDelete", NULL, N_("Delete Folder"), NULL, N_("Delete the folder"), G_CALLBACK (modest_ui_actions_on_delete_folder) },
{ "ActionsFolderRename", NULL, N_("Rename Folder"), NULL, N_("Rename the folder"), G_CALLBACK (modest_ui_actions_on_rename_folder) },
priv->main_bar);
/* msg preview */
- priv->msg_preview = MODEST_MSG_VIEW(modest_msg_view_new (NULL));
+ priv->msg_preview = MODEST_MSG_VIEW(tny_platform_factory_new_msg_view
+ (modest_tny_platform_factory_get_instance ()));
if (!priv->msg_preview)
g_printerr ("modest: cannot instantiate msgpreiew\n");
const gchar *icon_name;
ModestMainWindowPrivate *priv;
- g_return_if_fail (device);
g_return_if_fail (self);
priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
parent_priv = MODEST_WINDOW_GET_PRIVATE(self);
+
parent_priv->ui_manager = gtk_ui_manager_new();
+ parent_priv->ui_dimming_manager = modest_ui_dimming_manager_new ();
action_group = gtk_action_group_new ("ModestMainWindowActions");
/* Add common actions */
GError **err,
gpointer user_data)
{
- if (!(*err)) {
+ if (!err ||!(*err)) {
ModestMsgView *msg_preview;
msg_preview = MODEST_MSG_VIEW (user_data);
- modest_msg_view_set_message (msg_preview, msg);
+ tny_msg_view_set_msg (TNY_MSG_VIEW (msg_preview), msg);
}
/* Frees */
instead in order to get progress info */
tny_folder_get_msg_async (folder,
header,
- get_msg_callback,
+ (TnyGetMsgCallback) get_msg_callback,
NULL,
priv->msg_preview);
}
+
+void
+modest_main_window_notify_send_receive_initied (ModestMainWindow *self)
+{
+ g_message("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+void
+modest_main_window_notify_send_receive_completed (ModestMainWindow *self)
+{
+ g_message("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+gboolean
+modest_main_window_transfer_mode_enabled (ModestMainWindow *self)
+{
+ g_message("NOT IMPLEMENTED %s", __FUNCTION__);
+ return FALSE;
+}
+
+gboolean
+modest_main_window_on_msg_view_window_msg_changed (ModestMsgViewWindow *view_window,
+ GtkTreeModel *model,
+ GtkTreeRowReference *row_reference,
+ ModestMainWindow *self)
+{
+ g_message("NOT IMPLEMENTED %s", __FUNCTION__);
+ return FALSE;
+}
GtkWidget *msg_body;
- ModestProtoList *from_field_protos;
+ ModestPairList *from_field_protos;
GtkWidget *from_field;
GtkWidget *to_field;
ModestWindow *
-modest_msg_edit_window_new (TnyMsg *msg, const gchar *account)
+modest_msg_edit_window_new (TnyMsg *msg, const gchar *account,
+ gboolean preserve_is_rich)
{
ModestMsgEditWindow *self;
ModestMsgEditWindowPrivate *priv;
data->cc = g_strdup ( gtk_entry_get_text (GTK_ENTRY(priv->cc_field)));
data->bcc = g_strdup ( gtk_entry_get_text (GTK_ENTRY(priv->bcc_field)));
data->subject = g_strdup ( gtk_entry_get_text (GTK_ENTRY(priv->subject_field)));
- data->msg_id = NULL;
GtkTextBuffer *buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->msg_body));
GtkTextIter b, e;
}
gboolean
-modest_msg_edit_window_check_names (ModestMsgEditWindow *window)
+modest_msg_edit_window_check_names (ModestMsgEditWindow *window, gboolean add_to_addressbook)
{
g_return_val_if_fail (MODEST_IS_MSG_EDIT_WINDOW (window), FALSE);
priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE(window);
priv->sent = sent;
}
+
+GtkWidget *
+modest_msg_edit_window_get_child_widget (ModestMsgEditWindow *win,
+ ModestMsgEditWindowWidgetType widget_type)
+{
+ ModestMsgEditWindowPrivate *priv;
+
+ g_return_val_if_fail (MODEST_IS_MSG_EDIT_WINDOW (win), NULL);
+ priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (win);
+
+ switch (widget_type) {
+ case MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_BODY:
+ return priv->msg_body;
+ break;
+ case MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_TO:
+ return priv->to_field;
+ break;
+ case MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_CC:
+ return priv->cc_field;
+ break;
+ case MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_BCC:
+ return priv->bcc_field;
+ break;
+ case MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_SUBJECT:
+ return priv->subject_field;
+ break;
+ case MODEST_MSG_EDIT_WINDOW_WIDGET_TYPE_ATTACHMENTS:
+ return NULL;
+ break;
+ default:
+ return NULL;
+ }
+ return NULL;
+}
+
+/* FUNCTIONS NOT IMPLEMENTED YET */
+
+void
+modest_msg_edit_window_reset_modified (ModestMsgEditWindow *window)
+{
+ g_message (__FUNCTION__);
+}
+
+void
+modest_msg_edit_window_toggle_find_toolbar (ModestMsgEditWindow *window,
+ gboolean show)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+void
+modest_msg_edit_window_add_part (ModestMsgEditWindow *window,
+ TnyMimePart *part)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+void
+modest_msg_edit_window_redo (ModestMsgEditWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+void
+modest_msg_edit_window_offer_attach_file (ModestMsgEditWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+void
+modest_msg_edit_window_attach_file_one (ModestMsgEditWindow *window, const gchar *file_uri)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+void
+modest_msg_edit_window_set_draft (ModestMsgEditWindow *window,
+ TnyMsg *draft)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+gboolean
+modest_msg_edit_window_is_modified (ModestMsgEditWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return TRUE;
+}
+
+const gchar *
+modest_msg_edit_window_get_clipboard_text (ModestMsgEditWindow *win)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return NULL;
+}
+
+gboolean
+modest_msg_edit_window_can_redo (ModestMsgEditWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return FALSE;
+}
+gboolean
+modest_msg_edit_window_can_undo (ModestMsgEditWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return FALSE;
+}
+
+const gchar*
+modest_msg_edit_window_get_message_uid (ModestMsgEditWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return NULL;
+}
{ "ActionsForward", MODEST_STOCK_FORWARD, N_("_Forward"), NULL, N_("Forward a message"), G_CALLBACK (modest_ui_actions_on_forward) },
{ "ActionsBounce", NULL, N_("_Bounce"), NULL, N_("Bounce a message"), NULL },
{ "ActionsSendReceive", GTK_STOCK_REFRESH, N_("Send/Receive"), NULL, N_("Send and receive messages"), NULL },
- { "ActionsDelete", MODEST_STOCK_DELETE, N_("Delete message"), NULL, N_("Delete messages"), G_CALLBACK (modest_ui_actions_on_delete) },
+ { "ActionsDelete", MODEST_STOCK_DELETE, N_("Delete message"), NULL, N_("Delete messages"), G_CALLBACK (modest_ui_actions_on_delete_message) },
/* HELP */
{ "HelpAbout", GTK_STOCK_ABOUT, N_("About"), NULL, N_("About Modest"), G_CALLBACK (modest_ui_actions_on_about) },
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE(obj);
parent_priv = MODEST_WINDOW_GET_PRIVATE(obj);
- priv->msg_view = modest_msg_view_new (msg);
+ priv->msg_view = GTK_WIDGET (tny_platform_factory_new_msg_view (modest_tny_platform_factory_get_instance ()));
+ tny_msg_view_set_msg (TNY_MSG_VIEW (priv->msg_view), msg);
main_vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX(main_vbox), priv->menubar, FALSE, FALSE, 0);
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE(obj);
- if (priv->msg_uid) {
- g_free (priv->msg_uid);
- msg_uid = NULL;
- }
-
G_OBJECT_CLASS(parent_class)->finalize (obj);
}
priv->msg_uid = g_strdup (msg_uid);
- modest_window_set_active_account (MODEST_WINDOW(obj), account);
+ modest_window_set_active_account (MODEST_WINDOW(obj), modest_account_name);
parent_priv->ui_manager = gtk_ui_manager_new();
action_group = gtk_action_group_new ("ModestMsgViewWindowActions");
msg_view = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE(self)->msg_view;
- return modest_msg_view_get_message (MODEST_MSG_VIEW(msg_view));
+ return tny_msg_view_get_msg (TNY_MSG_VIEW(msg_view));
}
const gchar*
modest_msg_view_window_get_message_uid (ModestMsgViewWindow *self)
{
+ ModestMsgViewWindowPrivate *priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (self);
TnyMsg *msg;
TnyHeader *header;
const gchar *retval = NULL;
+ msg = tny_msg_view_get_msg (TNY_MSG_VIEW (priv->msg_view));
msg = modest_msg_view_window_get_message (self);
if (!msg)
actions */
g_message ("partially implemented %s", __FUNCTION__);
- return modest_msg_view_window_new_for_attachment (msg, account);
+ return modest_msg_view_window_new_for_attachment (msg, modest_account_name, msg_uid);
}
g_message ("not implemented %s", __FUNCTION__);
}
void
-modest_msg_view_window_remove_attachments (ModestMsgViewWindow *window, GList *mime_parts)
+modest_msg_view_window_remove_attachments (ModestMsgViewWindow *window, gboolean get_all)
{
g_message ("not implemented %s", __FUNCTION__);
}
+
+TnyHeader *
+modest_msg_view_window_get_header (ModestMsgViewWindow *self)
+{
+ TnyMsg *msg;
+ TnyHeader *header = NULL;
+
+ msg = modest_msg_view_window_get_message (self);
+ if (msg) {
+ header = tny_msg_get_header (msg);
+ g_object_unref (msg);
+ }
+ return header;
+}
+
+TnyFolderType
+modest_msg_view_window_get_folder_type (ModestMsgViewWindow *window)
+{
+ ModestMsgViewWindowPrivate *priv;
+ TnyMsg *msg;
+ TnyFolderType folder_type;
+
+ priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
+
+ folder_type = TNY_FOLDER_TYPE_UNKNOWN;
+
+ msg = tny_msg_view_get_msg (TNY_MSG_VIEW (priv->msg_view));
+ if (msg) {
+ TnyFolder *folder;
+
+ folder = tny_msg_get_folder (msg);
+ if (folder) {
+ folder_type = tny_folder_get_folder_type (folder);
+ g_object_unref (folder);
+ }
+ g_object_unref (msg);
+ }
+
+ return folder_type;
+}
+
+/* NOT IMPLEMENTED METHODS */
+
+gboolean
+modest_msg_view_window_last_message_selected (ModestMsgViewWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return TRUE;
+}
+
+gboolean
+modest_msg_view_window_first_message_selected (ModestMsgViewWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return TRUE;
+}
+
+gboolean
+modest_msg_view_window_transfer_mode_enabled (ModestMsgViewWindow *self)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return FALSE;
+}
+
+gboolean
+modest_msg_view_window_toolbar_on_transfer_mode (ModestMsgViewWindow *self)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return FALSE;
+}
+
+
+GList *
+modest_msg_view_window_get_attachments (ModestMsgViewWindow *win)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return NULL;
+}
+
+gboolean
+modest_msg_view_window_is_search_result (ModestMsgViewWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return FALSE;
+}
+
+gboolean
+modest_msg_view_window_has_headers_model (ModestMsgViewWindow *window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return FALSE;
+}
gboolean
modest_platform_activate_uri (const gchar *uri)
{
- modest_runtime_not_implemented (NULL);
+ g_message ("NOT IMPLEMENTED");;
return FALSE;
}
gboolean
modest_platform_activate_file (const gchar *path, const gchar *mime_type)
{
- modest_runtime_not_implemented (NULL);
+ g_message ("NOT IMPLEMENTED");;
return FALSE;
}
gboolean
modest_platform_show_uri_popup (const gchar *uri)
{
- modest_runtime_not_implemented (NULL);
+ g_message ("NOT IMPLEMENTED");;
return FALSE;
}
-gboolean
-modest_platform_show_help (GtkWidget *widget, const gchar *help_id)
+void
+modest_platform_show_help (GtkWindow *parent_window, const gchar *help_id)
+{
+ return; /* TODO */
+}
+
+void
+modest_platform_information_banner (GtkWidget *widget,
+ const gchar *icon_name,
+ const gchar *text)
{
- return TRUE; /* TODO */
+ g_message ("NOT IMPLEMENTED");;
}
+GtkWidget *
+modest_platform_animation_banner (GtkWidget *widget,
+ const gchar *icon_name,
+ const gchar *text)
+{
+ g_message ("NOT IMPLEMENTED");
+ return NULL;
+}
+
+
void
modest_platform_show_search_messages (GtkWindow *parent_window)
{
- modest_runtime_not_implemented (NULL);
+ g_message ("NOT IMPLEMENTED");;
}
GtkWidget *
/* TODO */
return TRUE;
}
+
+void
+modest_platform_connect_and_perform (GtkWindow *parent_window,
+ TnyAccount *account,
+ ModestConnectedPerformer callback,
+ gpointer user_data)
+{
+ if (callback)
+ callback (FALSE, NULL, parent_window, account, user_data);
+}
+
+void
+modest_platform_connect_and_perform_if_network_account (GtkWindow *parent_window,
+ TnyAccount *account,
+ ModestConnectedPerformer callback,
+ gpointer user_data)
+{
+ if (callback)
+ callback (FALSE, NULL, parent_window, account, user_data);
+}
+
+void
+modest_platform_connect_and_perform_if_network_folderstore (GtkWindow *parent_window,
+ TnyFolderStore *folder_store,
+ ModestConnectedPerformer callback,
+ gpointer user_data)
+{
+ if (callback)
+ callback (FALSE, NULL, parent_window, NULL, user_data);
+}
+
+
+void
+modest_platform_remove_new_mail_notifications (void)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
+gboolean
+modest_platform_check_and_wait_for_account_is_online(TnyAccount *account)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return TRUE;
+}
+
+gboolean
+modest_platform_run_certificate_confirmation_dialog (const gchar* server_name,
+ const gchar *certificate)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return TRUE;
+}
+
+gint
+modest_platform_run_rename_folder_dialog (GtkWindow *parent_window,
+ TnyFolderStore *parent_folder,
+ const gchar *suggested_name,
+ gchar **folder_name)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+ return GTK_RESPONSE_CANCEL;
+}
+
+void
+modest_platform_show_addressbook (GtkWindow *parent_window)
+{
+ g_message ("NOT IMPLEMENTED %s", __FUNCTION__);
+}
+
GtkWidget *servername;
GtkWidget *username;
- ModestProtoList *security_protos;
+ ModestPairList *security_protos;
GtkWidget *security;
- ModestProtoList *auth_protos;
+ ModestPairList *auth_protos;
GtkWidget *auth;
GtkWidget *chooser;
/* Note: This ModestPairList* must exist for as long as the combo
* that uses it, because the ModestComboBox uses the ID opaquely,
* so it can't know how to manage its memory. */
- priv->auth_protos = modest_protocol_info_get_auth_protocol_pair_list (;
+ priv->auth_protos = modest_protocol_info_get_auth_protocol_pair_list ();
priv->auth = modest_combo_box_new (priv->auth_protos, g_str_equal);
gtk_box_pack_start (GTK_BOX(hbox), priv->auth, FALSE, FALSE, 0);
const gchar* modest_store_widget_get_servername (ModestStoreWidget *self);
ModestTransportStoreProtocol modest_store_widget_get_proto (ModestStoreWidget *self);
gchar * modest_store_widget_get_path (ModestStoreWidget *self);
-ModestConnectionProtocol modest_store_widget_get_auth (ModestStoreWidget *self);
-ModestAuthProtocol modest_store_widget_get_security (ModestStoreWidget *self);
+ModestAuthProtocol modest_store_widget_get_auth (ModestStoreWidget *self);
+ModestConnectionProtocol modest_store_widget_get_security (ModestStoreWidget *self);
G_END_DECLS
GtkWidget *remember_pwd;
ModestPairList *transport_store_protos;
+ ModestPairList *auth_protos;
};
#define MODEST_TRANSPORT_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \
MODEST_TYPE_TRANSPORT_WIDGET, \
return result;
}
-gboolean
-modest_platform_is_network_folderstore (TnyFolderStore *folder_store)
-{
- TnyAccount *account = NULL;
- gboolean result = TRUE;
-
- g_return_val_if_fail(TNY_IS_FOLDER_STORE(folder_store), FALSE);
-
- if (TNY_IS_FOLDER (folder_store)) {
- /* Get the folder's parent account: */
- account = tny_folder_get_account(TNY_FOLDER(folder_store));
- } else if (TNY_IS_ACCOUNT (folder_store)) {
- account = TNY_ACCOUNT(folder_store);
- g_object_ref(account);
- }
-
- if (account != NULL) {
- if (tny_account_get_account_type (account) == TNY_ACCOUNT_TYPE_STORE) {
- if (!TNY_IS_CAMEL_POP_STORE_ACCOUNT (account) &&
- !TNY_IS_CAMEL_IMAP_STORE_ACCOUNT (account)) {
- /* This must be a maildir account, which does
- * not require a connection: */
- result = FALSE;
- }
- }
- g_object_unref (account);
- } else {
- result = FALSE;
- }
-
- return result;
-}
-
void
modest_platform_run_sort_dialog (GtkWindow *parent_window,
ModestSortDialogType type)
G_CALLBACK (g_free), sc);
gtk_widget_show_all (sw);
+
+ gtk_widget_set_redraw_on_allocate (GTK_WIDGET(sc->fixed), FALSE);
+ gtk_widget_set_redraw_on_allocate (GTK_WIDGET(sw), FALSE);
+ gtk_widget_set_redraw_on_allocate (GTK_WIDGET(child), FALSE);
return fixed;
}
#include <modest-icon-names.h>
#include "widgets/modest-global-settings-dialog.h"
#include "modest-tny-msg.h"
+#include <libgnomevfs/gnome-vfs.h>
#ifdef MODEST_PLATFORM_MAEMO
#include "modest-hildon-includes.h"
#endif
{ MODEST_STOCK_NEW_MAIL, "new mail", 0, 0, NULL },
/* { MODEST_STOCK_SEND_RECEIVE, "send receive", 0, 0, NULL }, */
{ MODEST_STOCK_REPLY, "reply", 0, 0, NULL },
-/* { MODEST_STOCK_REPLY_ALL, "reply all", 0, 0, NULL }, */
-/* { MODEST_STOCK_FORWARD, "forward", 0, 0, NULL }, */
+ { MODEST_STOCK_REPLY_ALL, "reply all", 0, 0, NULL },
+ { MODEST_STOCK_FORWARD, "forward", 0, 0, NULL },
{ MODEST_STOCK_DELETE, "delete", 0, 0, NULL },
/* { MODEST_STOCK_NEXT, "next", 0, 0, NULL }, */
/* { MODEST_STOCK_PREV, "prev", 0, 0, NULL }, */
MODEST_TOOLBAR_ICON_NEW_MAIL,
/* MODEST_TOOLBAR_ICON_SEND_RECEIVE, */
MODEST_TOOLBAR_ICON_REPLY,
-/* MODEST_TOOLBAR_ICON_REPLY_ALL, */
-/* MODEST_TOOLBAR_ICON_FORWARD, */
+ MODEST_TOOLBAR_ICON_REPLY_ALL,
+ MODEST_TOOLBAR_ICON_FORWARD,
MODEST_TOOLBAR_ICON_DELETE,
/* MODEST_TOOLBAR_ICON_NEXT, */
/* MODEST_TOOLBAR_ICON_PREV, */
/* MODEST_TOOLBAR_ICON_STOP */
- MODEST_TOOLBAR_ICON_FORMAT_BULLETS,
+/* MODEST_TOOLBAR_ICON_FORMAT_BULLETS, */
};
registered = TRUE;
gboolean modest_platform_connect_and_wait_if_network_folderstore (GtkWindow *parent_window, TnyFolderStore *folder_store);
/**
- * modest_platform_is_network_folderstore:
- * @folder_store: The folder store (folder or account) that needs to
- * decide if need a connection in subsequent operations.
- * @return value: Whether a connection is necessary for this folder_store.
- */
-gboolean modest_platform_is_network_folderstore (TnyFolderStore *folder_store);
-
-/**
* modest_platform_set_update_interval:
* @minutes: The number of minutes between updates, or 0 for no updates.
*
#include <tny-camel-imap-store-account.h>
#include <tny-camel-pop-store-account.h>
-#include <libmodest-dbus-client/libmodest-dbus-client.h>
-
#include "modest-text-utils.h"
#include "modest-account-mgr.h"
#include "modest-tny-account-store.h"
static GList*
add_hit (GList *list, TnyHeader *header, TnyFolder *folder)
{
- ModestSearchHit *hit;
+ ModestSearchResultHit *hit;
TnyHeaderFlags flags;
char *furl;
char *msg_url;
const char *subject;
const char *sender;
- hit = g_slice_new0 (ModestSearchHit);
+ hit = g_slice_new0 (ModestSearchResultHit);
furl = tny_folder_get_url_string (folder);
printf ("DEBUG: %s: folder URL=%s\n", __FUNCTION__, furl);
} ModestSearchFlags;
typedef struct {
+ gchar *msgid; /* E.g. the URI of the message. */
+ gchar *subject;
+ gchar *folder; /* The name, not the URI. */
+ gchar *sender;
+ guint64 msize;
+ gboolean has_attachment;
+ gboolean is_unread;
+ gint64 timestamp;
+} ModestSearchResultHit;
+
+typedef struct {
const gchar *folder; /* The folder to search in */
/* Text to search for in various parts: */
#include <modest-account-mgr.h>
#include <modest-account-mgr-helpers.h>
#include <widgets/modest-window-mgr.h>
-#include <modest-account-settings-dialog.h>
-#include <maemo/modest-maemo-utils.h>
#include <modest-signal-mgr.h>
#include <modest-debug.h>
#ifdef MODEST_PLATFORM_MAEMO
#include <tny-maemo-conic-device.h>
+#include <maemo/modest-maemo-utils.h>
+#include <maemo/modest-account-settings-dialog.h>
#endif
#include <libgnomevfs/gnome-vfs-volume-monitor.h>
struct _ModestTnyAccountStorePrivate {
gchar *cache_dir;
GHashTable *password_hash;
+#ifdef MODEST_PLATFORM_MAEMO
GHashTable *account_settings_dialog_hash;
+#endif
ModestAccountMgr *account_mgr;
TnySessionCamel *session;
TnyDevice *device;
*/
priv->password_hash = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_free);
-
+
+#ifdef MODEST_PLATFORM_MAEMO
/* A hash-map of modest account names to dialog pointers,
* so we can avoid showing the account settings twice for the same modest account: */
priv->account_settings_dialog_hash = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL);
+#endif
/* Respond to volume mounts and unmounts, such
* as the insertion/removal of the memory card: */
g_object_unref (iter);
}
+#ifdef MODEST_PLATFORM_MAEMO
static void
on_account_settings_hide (GtkWidget *widget, gpointer user_data)
{
if (modest_account_name)
g_hash_table_remove (priv->account_settings_dialog_hash, modest_account_name);
}
+#endif
static void
show_password_warning_only ()
g_warning ("%s: %s", __FUNCTION__, _("mcen_ib_username_pw_incorrect"));
}
-
+#ifdef MODEST_PLATFORM_MAEMO
static void
show_wrong_password_dialog (TnyAccount *account)
{
gtk_window_present (GTK_WINDOW (dialog));
}
}
-
+#endif
static void
);
if (settings_have_password) {
/* The password must be wrong, so show the account settings dialog so it can be corrected: */
+#ifdef MODEST_PLATFORM_MAEMO
show_wrong_password_dialog (account);
+#endif
if (cancel)
*cancel = TRUE;
priv->password_hash = NULL;
}
+#ifdef MODEST_PLATFORM_MAEMO
if (priv->account_settings_dialog_hash) {
g_hash_table_destroy (priv->account_settings_dialog_hash);
priv->account_settings_dialog_hash = NULL;
}
+#endif
if (priv->outbox_of_transport) {
g_hash_table_destroy (priv->outbox_of_transport);
#include <tny-folder-stats.h>
#include <modest-debug.h>
#include <string.h>
+#ifdef MODEST_PLATFORM_MAEMO
#ifdef MODEST_HAVE_HILDON0_WIDGETS
#include <hildon-widgets/hildon-file-system-info.h>
#else
#include <hildon/hildon-file-system-info.h>
#endif
+#endif
/* we need these dummy functions, or tinymail will complain */
static gchar * get_pass_dummy (TnyAccount *account, const gchar *prompt, gboolean *cancel);
-
+#ifdef MODEST_PLATFORM_MAEMO
/* Gets the memory card name: */
static void
on_modest_file_system_info (HildonFileSystemInfoHandle *handle,
g_object_unref (callback_data->account);
g_slice_free (GetMmcAccountNameData, callback_data);
}
+#endif
void modest_tny_account_get_mmc_account_name (TnyStoreAccount* self, ModestTnyAccountGetMmcAccountNameCallback callback, gpointer user_data)
{
+#ifdef MODEST_PLATFORM_MAEMO
/* Just use the hard-coded path for the single memory card,
* rather than try to figure out the path to the specific card by
* looking at the maildir URI:
}
/* g_free (uri); */
+#endif
}
else
return (strcmp (account_id, MODEST_MMC_ACCOUNT_ID) == 0);
}
+
+gboolean
+modest_tny_folder_store_is_remote (TnyFolderStore *folder_store)
+{
+ TnyAccount *account = NULL;
+ gboolean result = TRUE;
+
+ g_return_val_if_fail(TNY_IS_FOLDER_STORE(folder_store), FALSE);
+
+ if (TNY_IS_FOLDER (folder_store)) {
+ /* Get the folder's parent account: */
+ account = tny_folder_get_account(TNY_FOLDER(folder_store));
+ } else if (TNY_IS_ACCOUNT (folder_store)) {
+ account = TNY_ACCOUNT(folder_store);
+ g_object_ref(account);
+ }
+
+ if (account != NULL) {
+ if (tny_account_get_account_type (account) == TNY_ACCOUNT_TYPE_STORE) {
+ if (!TNY_IS_CAMEL_POP_STORE_ACCOUNT (account) &&
+ !TNY_IS_CAMEL_IMAP_STORE_ACCOUNT (account)) {
+ /* This must be a maildir account, which does
+ * not require a connection: */
+ result = FALSE;
+ }
+ }
+ g_object_unref (account);
+ } else {
+ result = FALSE;
+ }
+
+ return result;
+}
+
**/
gint modest_tny_folder_store_get_local_size (TnyFolderStore *self);
+/**
+ * modest_tny_folder_store_is_remote:
+ * @folder_store: The folder store (folder or account) that needs to
+ * decide if need a connection in subsequent operations.
+ * @return value: Whether a connection is necessary for this folder_store.
+ */
+gboolean modest_tny_folder_store_is_remote (TnyFolderStore *self);
+
/** modest_tny_account_get_parent_modest_account_name_for_server_account:
* Get the name of the parent modest account of which the server account is a part.
*/
LAST_SIGNAL
};
-typedef struct _ModestTnyPlatformFactoryPrivate ModestTnyPlatformFactoryPrivate;
-struct _ModestTnyPlatformFactoryPrivate {};
+/* PRIVATE area commented as it's empty now. If you enable this again remember to enable also
+ * private area registration in class init */
+
+/* typedef struct _ModestTnyPlatformFactoryPrivate ModestTnyPlatformFactoryPrivate; */
+/* struct _ModestTnyPlatformFactoryPrivate {}; */
+
+/* #define MODEST_TNY_PLATFORM_FACTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \ */
+/* MODEST_TYPE_TNY_PLATFORM_FACTORY, \ */
+/* ModestTnyPlatformFactoryPrivate)) */
-#define MODEST_TNY_PLATFORM_FACTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \
- MODEST_TYPE_TNY_PLATFORM_FACTORY, \
- ModestTnyPlatformFactoryPrivate))
/* globals */
static GObjectClass *parent_class = NULL;
static ModestTnyPlatformFactory *singleton = NULL;
gobject_class->finalize = modest_tny_platform_factory_finalize;
gobject_class->constructor = modest_tny_platform_factory_constructor;
- g_type_class_add_private (gobject_class, sizeof(ModestTnyPlatformFactoryPrivate));
+/* g_type_class_add_private (gobject_class, sizeof(ModestTnyPlatformFactoryPrivate)); */
}
static void
#include "maemo/modest-osso-state-saving.h"
#include "maemo/modest-maemo-utils.h"
#include "maemo/modest-hildon-includes.h"
+#include "maemo/modest-connection-specific-smtp-window.h"
#endif /* MODEST_PLATFORM_MAEMO */
#include "widgets/modest-ui-constants.h"
#include <widgets/modest-attachments-view.h>
#include "widgets/modest-folder-view.h"
#include "widgets/modest-global-settings-dialog.h"
-#include "modest-connection-specific-smtp-window.h"
#include "modest-account-mgr-helpers.h"
#include "modest-mail-operation.h"
#include "modest-text-utils.h"
modest_ui_actions_run_account_setup_wizard (ModestWindow *win)
{
gboolean result = FALSE;
+#ifdef MODEST_PLATFORM_MAEMO
GtkWindow *dialog, *wizard;
gint dialog_response;
/* Check whether an account was created: */
result = modest_account_mgr_has_accounts(modest_runtime_get_account_mgr(), TRUE);
}
-
+#endif
return result;
}
#endif /* MODEST_PLATFORM_MAEMO */
}
+#ifdef MODEST_PLATFORM_MAEMO
static void
on_smtp_servers_window_hide (GtkWindow* window, gpointer user_data)
{
MODEST_CONNECTION_SPECIFIC_SMTP_WINDOW (window));
gtk_widget_destroy (GTK_WIDGET (window));
}
-
+#endif
void
return;
if (modest_header_view_count_selected_headers (header_view) > 1) {
- hildon_banner_show_information (NULL, NULL, _("mcen_ib_select_one_message"));
+ modest_platform_information_banner (NULL, NULL, _("mcen_ib_select_one_message"));
return;
}
if (proto_str && modest_protocol_info_get_transport_store_protocol (proto_str) ==
MODEST_PROTOCOL_STORE_POP) {
finished = TRUE;
- hildon_banner_show_information (NULL, NULL, _("mail_in_ui_folder_create_error"));
+ modest_platform_information_banner (NULL, NULL, _("mail_in_ui_folder_create_error"));
}
g_object_unref (account);
if (response != GTK_RESPONSE_ACCEPT || strlen (folder_name) == 0) {
do_rename = FALSE;
- } else if (modest_platform_is_network_folderstore(folder) &&
+ } else if (modest_tny_folder_store_is_remote(folder) &&
!tny_device_is_online (modest_runtime_get_device())) {
TnyAccount *account = tny_folder_get_account(TNY_FOLDER(folder));
do_rename = modest_platform_connect_and_wait(GTK_WINDOW(main_window), account);
if (response != GTK_RESPONSE_OK) {
do_delete = FALSE;
- } else if (modest_platform_is_network_folderstore(folder) &&
+ } else if (modest_tny_folder_store_is_remote(folder) &&
!tny_device_is_online (modest_runtime_get_device())) {
TnyAccount *account = tny_folder_get_account(TNY_FOLDER(folder));
do_delete = modest_platform_connect_and_wait(GTK_WINDOW(main_window), account);
static void
show_error (GtkWidget *parent_widget, const gchar* text)
{
- hildon_banner_show_information(parent_widget, NULL, text);
+ modest_platform_information_banner(parent_widget, NULL, text);
#if 0
GtkDialog *dialog = GTK_DIALOG (hildon_note_new_information (parent_window, text)); */
} else if (!TNY_IS_FOLDER (src_folder)) {
g_warning ("%s: src_folder is not a TnyFolder.\n", __FUNCTION__);
do_xfer = FALSE;
- } else if (!online && modest_platform_is_network_folderstore(src_folder)) {
+ } else if (!online && modest_tny_folder_store_is_remote(src_folder)) {
guint num_headers = tny_folder_get_all_count(TNY_FOLDER (src_folder));
TnyAccount *account = tny_folder_get_account (TNY_FOLDER (src_folder));
if (!connect_to_get_msg(MODEST_WINDOW (win), num_headers, account))
} else if (gtk_widget_is_focus (GTK_WIDGET(header_view))) {
gboolean do_xfer = TRUE;
/* Ask for confirmation if the source folder is remote and we're not connected */
- if (!online && modest_platform_is_network_folderstore(src_folder)) {
+ if (!online && modest_tny_folder_store_is_remote(src_folder)) {
TnyList *headers = modest_header_view_get_selected_headers(header_view);
if (!msgs_already_deleted_from_server(headers, src_folder)) {
guint num_headers = tny_list_get_length(headers);
g_object_unref (header);
account = tny_folder_get_account (src_folder);
- if (!modest_platform_is_network_folderstore(TNY_FOLDER_STORE(src_folder))) {
+ if (!modest_tny_folder_store_is_remote(TNY_FOLDER_STORE(src_folder))) {
/* Transfer if the source folder is local */
do_xfer = TRUE;
} else if (remote_folder_is_pop(TNY_FOLDER_STORE(src_folder))) {
modest_attachments_view_new (TnyMsg *msg)
{
ModestAttachmentsView *self = g_object_new (MODEST_TYPE_ATTACHMENTS_VIEW,
- "resize-mode", GTK_RESIZE_PARENT,
+ "resize-mode", GTK_RESIZE_QUEUE,
NULL);
modest_attachments_view_set_message (self, msg);
priv->text_view = gtk_text_view_new ();
/* Auto-capitalization is the default, so let's turn it off: */
+#ifdef MAEMO_CHANGES
hildon_gtk_text_view_set_input_mode (GTK_TEXT_VIEW (priv->text_view),
HILDON_GTK_INPUT_MODE_FULL);
+#endif
priv->recipients = NULL;
#include "modest-runtime.h"
#include "modest-window-mgr.h"
#include <string.h> /* for strcmp */
+#include <gdk/gdkkeysyms.h>
/* 'private'/'protected' functions */
static void modest_window_class_init (ModestWindowClass *klass);