X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-msg-view-window.h;h=a141383144d692854e1f644802419dd0dadb7a86;hb=4847d8f92f276a204862e502316486c4e04a1fca;hp=b703f72ba0bc7c171cf04b1d518d7574a9616386;hpb=87d578230a89243214175a0245da9f73ca93e1a5;p=modest diff --git a/src/widgets/modest-msg-view-window.h b/src/widgets/modest-msg-view-window.h index b703f72..a141383 100644 --- a/src/widgets/modest-msg-view-window.h +++ b/src/widgets/modest-msg-view-window.h @@ -32,8 +32,13 @@ #include #include +#ifdef MODEST_TOOLKIT_HILDON2 +#include +#endif #include +#include #include +#include G_BEGIN_DECLS @@ -47,16 +52,29 @@ G_BEGIN_DECLS typedef struct { - ModestWindow parent; +#ifdef MODEST_TOOLKIT_HILDON2 + ModestHildon2Window parent; +#else + ModestWindow parent; +#endif } ModestMsgViewWindow; typedef struct { +#ifdef MODEST_TOOLKIT_HILDON2 + ModestHildon2WindowClass parent_class; +#else ModestWindowClass parent_class; +#endif void (*msg_changed) (ModestMsgViewWindow *self, GtkTreeModel *model, GtkTreeRowReference *row_reference, gpointer user_data); + + gboolean (*scroll_child) (ModestMsgViewWindow *self, + GtkScrollType scroll_type, + gboolean horizontal, + gpointer userdata); } ModestMsgViewWindowClass; /** @@ -73,6 +91,7 @@ GType modest_msg_view_window_get_type (void) G_GNUC_CONST; * modest_msg_view_window_new_for_attachment: * @msg: an #TnyMsg instance * @modest_account_name: the account name + * @mailbox: the mailbox (if any) * * instantiates a new #ModestMsgViewWindow widget to view a message that is an * attachment in another message. @@ -82,13 +101,15 @@ GType modest_msg_view_window_get_type (void) G_GNUC_CONST; * Returns: a new #ModestMsgViewWindow, or NULL in case of error */ ModestWindow* modest_msg_view_window_new_for_attachment (TnyMsg *msg, - const gchar *modest_account_name, - const gchar *msg_uid); + const gchar *modest_account_name, + const gchar *mailbox, + const gchar *msg_uid); /** * modest_msg_view_window_new_with_header_model: * @msg: an #TnyMsg instance * @modest_account_name: the account name + * @mailbox: the mailbox (if any) * @model: a #GtkTreeModel, with the format used by #ModestHeaderView * @row_reference: a #GtkTreeRowReference, pointing to the position of @msg in @model. * @@ -101,10 +122,32 @@ ModestWindow* modest_msg_view_window_new_for_attachment (TnyMsg *msg, */ ModestWindow* modest_msg_view_window_new_with_header_model (TnyMsg *msg, const gchar *modest_account_name, + const gchar *mailbox, const gchar *msg_uid, GtkTreeModel *model, GtkTreeRowReference *row_reference); +/** + * modest_msg_view_window_new_from_header_view: + * @header_view: an #ModestHeaderView instance + * @modest_account_name: the account name + * @mailbox: the mailbox (if any) + * @msg_uid: the initial uid reserved by this window + * @row_reference: a #GtkTreeRowReference, pointing to the selected position @model. + * + * instantiates a new #ModestMsgViewWindow widget. The account name is used to + * set the proper account when choosing reply/forward from the msg view window. + * It's different from new_with_header_model, as it creates the window and then + * loads the message in that window. + * + * Returns: a new #ModestMsgViewWindow, or NULL in case of error + */ +ModestWindow* modest_msg_view_window_new_from_header_view (ModestHeaderView *header_view, + const gchar *modest_account_name, + const gchar *mailbox, + const gchar *msg_uid, + GtkTreeRowReference *row_reference); + /** * modest_msg_view_window_new_for_search_result: @@ -121,6 +164,7 @@ ModestWindow* modest_msg_view_window_new_with_header_model (TnyMsg *msg, ModestWindow * modest_msg_view_window_new_for_search_result (TnyMsg *msg, const gchar *modest_account_name, + const gchar *mailbox, const gchar *msg_uid); /** @@ -158,17 +202,6 @@ TnyMsg* modest_msg_view_window_get_message (ModestMsgViewWindow *win const gchar* modest_msg_view_window_get_message_uid (ModestMsgViewWindow *window); /** - * modest_msg_view_window_select_first_message: - * @window: a #ModestMsgViewWindow instance - * - * select the first message obtained from the header view this view - * was called from - * - * Returns: %TRUE if a new message is shown. - */ -gboolean modest_msg_view_window_select_first_message (ModestMsgViewWindow *window); - -/** * modest_msg_view_window_select_next_message: * @window: a #ModestMsgViewWindow instance * @@ -208,18 +241,18 @@ void modest_msg_view_window_view_attachment (ModestMsgViewWindow *win * * Get selected attachments from #ModetMsgView private object. */ -GList * modest_msg_view_window_get_attachments (ModestMsgViewWindow *win); +TnyList * modest_msg_view_window_get_attachments (ModestMsgViewWindow *win); /** * modest_msg_view_window_save_attachments: * @window: a #ModestMsgViewWindow - * @mime_parts: a #GList of #TnyMimePart + * @mime_parts: a #TnyList of #TnyMimePart * * Save the #TnyMimePart attachments in @mime_parts, or currently selected attachments * if @mime_parts is %NULL, offering a dialog to the user to choose the location. */ void modest_msg_view_window_save_attachments (ModestMsgViewWindow *window, - GList *mime_parts); + TnyList *mime_parts); /** * modest_msg_view_window_remove_attachments: @@ -297,6 +330,18 @@ modest_msg_view_window_get_folder_type (ModestMsgViewWindow *window); gboolean modest_msg_view_window_transfer_mode_enabled (ModestMsgViewWindow *self); +/** + * modest_msg_view_window_add_to_contacts: + * @self: a #ModestMsgViewWindow + * + * activates the add to contacts use case. In Diablo and gnome it gets the + * clipboard selection current value and tries to add it to the addressbook. + * In fremantle, it shows the add to contacts dialog to select the recipient + * to add. + */ +void +modest_msg_view_window_add_to_contacts (ModestMsgViewWindow *self); + G_END_DECLS #endif /* __MODEST_MSG_VIEW_WINDOW_H__ */