* Added code to handle fullscreen mode for the whole application
authorSergio Villar Senin <svillar@igalia.com>
Wed, 11 Apr 2007 17:30:15 +0000 (17:30 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Wed, 11 Apr 2007 17:30:15 +0000 (17:30 +0000)
* Added ModestWindowMgr code
* Added automatic mail operation canceling when closing
* Added closing dialog MSG-NOT308

pmo-trunk-r1547

13 files changed:
src/gnome/modest-main-window.c
src/gnome/modest-msg-view-window.c
src/maemo/modest-main-window-ui.h
src/maemo/modest-main-window.c
src/maemo/modest-msg-view-window.c
src/modest-mail-operation-queue.c
src/modest-singletons.c
src/modest-ui-actions.c
src/modest-ui-actions.h
src/widgets/modest-main-window.h
src/widgets/modest-msg-view-window.h
src/widgets/modest-window-mgr.c
src/widgets/modest-window-mgr.h

index fde4d4c..9248664 100644 (file)
@@ -368,14 +368,6 @@ on_delete_event (GtkWidget *widget, GdkEvent  *event, ModestMainWindow *self)
 }
 
 static void
-on_destroy (GtkWidget *widget, GdkEvent  *event, ModestMainWindow *self)
-{
-       gtk_main_quit();
-}
-
-
-
-static void
 connect_signals (ModestMainWindow *self)
 {      
        ModestWindowPrivate *parent_priv;
@@ -436,7 +428,6 @@ connect_signals (ModestMainWindow *self)
                          self);
        
        /* window */
-       g_signal_connect (G_OBJECT(self), "destroy", G_CALLBACK(on_destroy), NULL);
        g_signal_connect (G_OBJECT(self), "delete-event", G_CALLBACK(on_delete_event), self);
 }
 
@@ -691,3 +682,11 @@ on_header_status_update (ModestHeaderView *header_view,
        /* Set status message */
        modest_gnome_info_bar_set_message (MODEST_GNOME_INFO_BAR (priv->main_bar), msg);
 }
+
+gboolean 
+modest_main_window_close_all (ModestMainWindow *self)
+{
+       /* TODO: show a dialog to ask the user for permission to close
+          all */
+       return TRUE;
+}
index 2b5c155..73593e7 100644 (file)
@@ -291,6 +291,26 @@ modest_msg_view_window_get_message (ModestMsgViewWindow *self)
        return modest_msg_view_get_message (MODEST_MSG_VIEW(msg_view));
 }
 
+const gchar*
+modest_msg_view_window_get_message_uid (ModestMsgViewWindow *self)
+{
+       TnyMsg *msg;
+       TnyHeader *header;
+       const gchar *retval = NULL;
+
+       msg = modest_msg_view_window_get_message (self);
+
+       if (!msg)
+               return NULL;
+
+       header = tny_msg_get_header (msg);
+       if (header) {
+               retval = tny_header_get_uid (header);
+               g_object_unref (header);
+       }
+       return retval;
+}
+
 ModestWindow*   
 modest_msg_view_window_new_with_header_model (TnyMsg *msg, 
                                              const gchar *account, 
index 0d28812..969fec9 100644 (file)
@@ -79,8 +79,8 @@ static const GtkActionEntry modest_action_entries [] = {
        
        /* View */
        { "ViewSort",            NULL,        N_("mcen_me_inbox_sort"),     NULL,      NULL,  NULL },
-       { "ViewFolders",         NULL,        N_("mcen_me_inbox_hidefolders"),     NULL,     NULL,  NULL },
-       { "ViewFullscreen",      NULL,        N_("mcen_me_inbox_fullscreen"),  NULL,     NULL,  NULL },
+/*     { "ViewFolders",         NULL,        N_("mcen_me_inbox_hidefolders"),     NULL,     NULL,  NULL }, */
+/*     { "ViewFullscreen",      NULL,        N_("mcen_me_inbox_fullscreen"),  NULL,     NULL,  G_CALLBACK (modest_ui_actions_on_toggle_fullscreen) }, */
        { "ViewShowToolbar", NULL, N_("mcen_me_inbox_toolbar") }, /* submenu */
        { "ViewShowToolbarNormalScreen",         NULL,        N_("mcen_me_inbox_normalview"),     NULL,     NULL,  NULL },
        { "ViewShowToolbarFullScreen",      NULL,        N_("mcen_me_inbox_optimizedview"),  NULL,     NULL,  NULL },
@@ -126,6 +126,5 @@ static const GtkToggleActionEntry modest_toggle_action_entries [] = {
        { "ShowToggleFullscreen",     GTK_STOCK_FULLSCREEN, N_("Full screen"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_toggle_fullscreen), FALSE },
 };
 
-
 G_END_DECLS
 #endif /* __MODEST_MAIN_WINDOW_UI_PRIV_H__ */
index 9cbab26..728dea5 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include <hildon-widgets/hildon-window.h>
+#include <hildon-widgets/hildon-note.h>
 
 #include <glib/gi18n.h>
 #include <gtk/gtktreeviewcolumn.h>
@@ -77,8 +78,6 @@ struct _ModestMainWindowPrivate {
        ModestFolderView *folder_view;
 
 };
-
-
 #define MODEST_MAIN_WINDOW_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
                                                 MODEST_TYPE_MAIN_WINDOW, \
                                                 ModestMainWindowPrivate))
@@ -92,6 +91,14 @@ typedef struct _GetMsgAsyncHelper {
        TnyIterator *iter;
 } GetMsgAsyncHelper;
 
+
+/* FIXME use an enum not values, UI actions must know them. Create a
+   modest-window-mgr-ui.h and include it here?  */
+static const GtkRadioActionEntry main_window_radio_action_entries [] = {
+       { "ViewFolders", NULL, N_("mcen_me_inbox_hidefolders"), NULL, NULL, 0 },
+       { "ViewFullscreen", NULL, N_("mcen_me_inbox_fullscreen"), NULL, NULL, 1 },
+};
+
 /* globals */
 static GtkWindowClass *parent_class = NULL;
 
@@ -307,13 +314,6 @@ get_toolbar (ModestMainWindow *self)
        return toolbar;
 }
 
-
-static void
-on_destroy (GtkWidget *widget, GdkEvent  *event, ModestMainWindow *self)
-{
-       gtk_main_quit();
-}
-
 static void
 connect_signals (ModestMainWindow *self)
 {      
@@ -342,7 +342,6 @@ connect_signals (ModestMainWindow *self)
                          G_CALLBACK(modest_ui_actions_on_item_not_found), self);
 
        /* window */
-       g_signal_connect (G_OBJECT(self), "destroy", G_CALLBACK(on_destroy), NULL);
        g_signal_connect (G_OBJECT(self), "delete-event", G_CALLBACK(on_delete_event), self);
 
        
@@ -390,6 +389,13 @@ modest_main_window_new (void)
                                      modest_action_entries,
                                      G_N_ELEMENTS (modest_action_entries),
                                      self);
+
+       gtk_action_group_add_radio_actions (action_group,
+                                           main_window_radio_action_entries,
+                                           G_N_ELEMENTS (main_window_radio_action_entries),
+                                           0,
+                                           G_CALLBACK (modest_ui_actions_on_change_fullscreen),
+                                           self);
        
        gtk_ui_manager_insert_action_group (parent_priv->ui_manager, action_group, 0);
        g_object_unref (action_group);
@@ -474,3 +480,25 @@ modest_main_window_new (void)
                
        return MODEST_WINDOW(self);
 }
+
+gboolean 
+modest_main_window_close_all (ModestMainWindow *self)
+{
+       GtkWidget *note;
+       GtkResponseType response;
+
+       /* Create the confirmation dialog MSG-NOT308 */
+       note = hildon_note_new_confirmation_add_buttons (GTK_WINDOW (self),
+                                                        _("emev_nc_close_windows"),
+                                                        _("mcen_db_yes"), GTK_RESPONSE_YES,
+                                                        _("mcen_db_no"), GTK_RESPONSE_NO,
+                                                        NULL);
+
+       response = gtk_dialog_run (GTK_DIALOG (note));
+       gtk_widget_destroy (GTK_WIDGET (note));
+
+       if (response == GTK_RESPONSE_YES)
+               return TRUE;
+       else
+               return FALSE;
+}
index b25498e..15547aa 100644 (file)
@@ -466,6 +466,26 @@ modest_msg_view_window_get_message (ModestMsgViewWindow *self)
        return modest_msg_view_get_message (msg_view);
 }
 
+const gchar*
+modest_msg_view_window_get_message_uid (ModestMsgViewWindow *self)
+{
+       TnyMsg *msg;
+       TnyHeader *header;
+       const gchar *retval = NULL;
+
+       msg = modest_msg_view_window_get_message (self);
+
+       if (!msg)
+               return NULL;
+
+       header = tny_msg_get_header (msg);
+       if (header) {
+               retval = tny_header_get_uid (header);
+               g_object_unref (header);
+       }
+       return retval;
+}
+
 static void 
 modest_msg_view_window_toggle_find_toolbar (GtkToggleAction *toggle,
                                            gpointer data)
index cf536b9..6f46a4e 100644 (file)
@@ -139,8 +139,9 @@ modest_mail_operation_queue_finalize (GObject *obj)
        g_mutex_lock (priv->queue_lock);
 
        if (priv->op_queue) {
+               /* Cancel all */
                if (!g_queue_is_empty (priv->op_queue))
-                       g_queue_foreach (priv->op_queue, (GFunc) g_object_unref, NULL);
+                       modest_mail_operation_queue_cancel_all (MODEST_MAIL_OPERATION_QUEUE (obj));
                g_queue_free (priv->op_queue);
        }
 
index a8cd130..11fb9e0 100644 (file)
@@ -195,8 +195,18 @@ modest_singletons_finalize (GObject *obj)
                priv->platform_fact = NULL;
        }
 
-
+       if (priv->mail_op_queue) {
+               g_object_unref (G_OBJECT(priv->mail_op_queue));
+               modest_runtime_verify_object_death(priv->mail_op_queue,"");
+               priv->mail_op_queue = NULL;
+       }
        
+       if (priv->window_mgr) {
+               g_object_unref (G_OBJECT(priv->window_mgr));
+               modest_runtime_verify_object_death(priv->window_mgr,"");
+               priv->window_mgr = NULL;
+       }
+
        G_OBJECT_CLASS(parent_class)->finalize (obj);
 }
 
index f3a7176..0909b13 100644 (file)
@@ -821,10 +821,6 @@ modest_ui_actions_on_header_activated (ModestHeaderView *folder_view, TnyHeader
        ModestWindow *win;
        TnyFolder *folder = NULL;
        TnyMsg    *msg    = NULL;
-       gchar *account    = NULL;
-       GtkTreeModel *model = NULL;
-       GtkTreeSelection *sel = NULL;
-       GtkTreeIter iter;
        ModestWindowMgr *mgr;
        
        g_return_if_fail (MODEST_IS_MAIN_WINDOW(main_window));
@@ -845,28 +841,30 @@ modest_ui_actions_on_header_activated (ModestHeaderView *folder_view, TnyHeader
                goto cleanup;
        }
 
-       account =  g_strdup(modest_window_get_active_account(MODEST_WINDOW(main_window)));
-       if (!account)
-               account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
+       /* Look if we already have a message view for that header */    
+       mgr = modest_runtime_get_window_mgr ();
+       win = modest_window_mgr_find_window_by_msguid (mgr, tny_header_get_uid (header));
+
+       /* If not, create a new window */
+       if (!win) {
+               gchar *account;
+
+               account =  g_strdup(modest_window_get_active_account(MODEST_WINDOW(main_window)));
+               if (!account)
+                       account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
 
-       /* Create and register message view window */   
-       sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_view));
-       if (gtk_tree_selection_get_selected (sel, &model, &iter)) {
-               win = modest_msg_view_window_new_with_header_model (msg, account, model, iter);
-       } else {
                win = modest_msg_view_window_new (msg, account);
-       }
-       mgr = modest_runtime_get_window_mgr ();
-       modest_window_mgr_register_window (mgr, win);
+               modest_window_mgr_register_window (mgr, win);
+
+               gtk_window_set_transient_for (GTK_WINDOW (win),
+                                             GTK_WINDOW (main_window));
 
-       gtk_window_set_transient_for (GTK_WINDOW (win),
-                                     GTK_WINDOW (main_window));
+               g_free (account);
+       }
 
        gtk_widget_show_all (GTK_WIDGET(win));
        
 cleanup:
-       g_free (account);
-       
        if (folder)
                g_object_unref (G_OBJECT (folder));
        if (msg)
@@ -1495,6 +1493,25 @@ modest_ui_actions_on_select_all (GtkAction *action,
        }
 }
 
+void 
+modest_ui_actions_on_toggle_fullscreen (GtkAction *action,
+                                       ModestWindow *window)
+{
+       ModestWindowMgr *mgr;
+       gboolean active;
+
+       mgr = modest_runtime_get_window_mgr ();
+       /* set/unset the application fullscreen mode */
+       active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+       modest_window_mgr_set_fullscreen_mode (mgr, active);
+
+       /* Bring the current window to the front. The above call will
+          put all the windows in fullscreen mode, so we can not be
+          sure that the last fullscreen-ed window is the current
+          one */
+       gtk_window_present (GTK_WINDOW (window));
+}
+
 void
 modest_ui_actions_on_change_zoom (GtkRadioAction *action,
                                  GtkRadioAction *selected,
@@ -1508,19 +1525,6 @@ modest_ui_actions_on_change_zoom (GtkRadioAction *action,
        }
 }
 
-void     
-modest_ui_actions_on_toggle_fullscreen    (GtkToggleAction *toggle,
-                                          ModestWindow *window)
-{
-       g_return_if_fail (MODEST_IS_WINDOW (window));
-
-       if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (toggle))) {
-               gtk_window_fullscreen (GTK_WINDOW (window));
-       } else {
-               gtk_window_unfullscreen (GTK_WINDOW (window));
-       }
-}
-
 static void
 modest_ui_actions_message_details_cb (gpointer msg_data, 
                                      gpointer helper_data)
@@ -1573,3 +1577,22 @@ modest_ui_actions_on_message_details (GtkAction *action,
                g_return_if_reached ();
        }
 }
+
+void 
+modest_ui_actions_on_change_fullscreen (GtkRadioAction *action,
+                                       GtkRadioAction *selected,
+                                       ModestWindow *window)
+{
+       gint value;
+       ModestWindowMgr *mgr;
+
+       value = gtk_radio_action_get_current_value (selected);
+       mgr = modest_runtime_get_window_mgr ();
+
+       if (value == 0)
+               modest_window_mgr_set_fullscreen_mode (mgr, FALSE);
+       else
+               modest_window_mgr_set_fullscreen_mode (mgr, TRUE);
+
+       gtk_window_present (GTK_WINDOW (window));
+}
index 4756fe0..d043027 100644 (file)
@@ -151,22 +151,35 @@ void     modest_ui_actions_on_password_requested (TnyAccountStore *account_store
                                                  gchar **password,  gboolean *cancel, 
                                                  gboolean *remember, ModestMainWindow *main_window);
 
-void     modest_ui_actions_on_cut (GtkAction *action,
-                                  ModestWindow *window);
-void     modest_ui_actions_on_copy (GtkAction *action,
-                                   ModestWindow *window);
-void     modest_ui_actions_on_paste (GtkAction *action,
-                                    ModestWindow *window);
-void     modest_ui_actions_on_select_all (GtkAction *action,
-                                         ModestWindow *window);
-
-void     modest_ui_actions_on_change_zoom (GtkRadioAction *action,
-                                          GtkRadioAction *selected,
-                                          ModestWindow *window);
-
-void     modest_ui_actions_on_toggle_fullscreen    (GtkToggleAction *toggle,
-                                                   ModestWindow *window);
-
+void     modest_ui_actions_on_cut                      (GtkAction *action,
+                                                       ModestWindow *window);
+
+void     modest_ui_actions_on_copy                     (GtkAction *action,
+                                                       ModestWindow *window);
+
+void     modest_ui_actions_on_paste                    (GtkAction *action,
+                                                       ModestWindow *window);
+
+void     modest_ui_actions_on_select_all               (GtkAction *action,
+                                                       ModestWindow *window);
+
+/**
+ * modest_ui_actions_on_toggle_fullscreen:
+ * @action: the #GtkAction
+ * @window: the window that will be shown in fullscreen mode
+ * 
+ * puts a window in fullscreen mode
+ **/
+void     modest_ui_actions_on_toggle_fullscreen        (GtkAction *action,
+                                                       ModestWindow *window);
+
+void     modest_ui_actions_on_change_zoom              (GtkRadioAction *action,
+                                                       GtkRadioAction *selected,
+                                                       ModestWindow *window);
+
+void     modest_ui_actions_on_change_fullscreen        (GtkRadioAction *action,
+                                                       GtkRadioAction *selected,
+                                                       ModestWindow *window);
 
 G_END_DECLS
 #endif /* __MODEST_UI_ACTIONS_H__ */
index 79993f7..412d603 100644 (file)
@@ -92,6 +92,7 @@ typedef enum {
        MODEST_WIDGET_TYPE_NUM,
 } ModestWidgetType;
 
+
 /**
  * modest_main_window_get_child_widget
  * 
@@ -102,6 +103,17 @@ typedef enum {
 GtkWidget* modest_main_window_get_child_widget (ModestMainWindow *self,
                                                ModestWidgetType widget_type);
 
+/**
+ * modest_main_window_close_all:
+ * @self: 
+ * 
+ * this function will ask the user about if the user wants to close
+ * all the windows or just the main one
+ * 
+ * Returns: TRUE if the user selected to close all the windows, otherwise FALSE
+ **/
+gboolean   modest_main_window_close_all        (ModestMainWindow *self);
+
 G_END_DECLS
 
 #endif /* __MODEST_MAIN_WINDOW_H__ */
index 8a8877a..b75155a 100644 (file)
@@ -102,7 +102,18 @@ ModestWindow*   modest_msg_view_window_new_with_header_model (TnyMsg *msg, const
  * 
  * Returns: a new #TnyMsg instance, or NULL in case of error
  */
-TnyMsg*         modest_msg_view_window_get_message (ModestMsgViewWindow *window);
+TnyMsg*         modest_msg_view_window_get_message     (ModestMsgViewWindow *window);
+
+/**
+ * modest_msg_view_window_get_message_uid:
+ * @msg: an #ModestMsgViewWindow instance
+ * 
+ * gets the unique identifier for the message in this msg view. The
+ * returned value *must* not be freed
+ * 
+ * Returns: the id of the #TnyMsg being shown, or NULL in case of error
+ */
+const gchar*    modest_msg_view_window_get_message_uid (ModestMsgViewWindow *window);
 
 /**
  * modest_msg_view_window_select_next_message:
index 64a2dcb..8ebfe55 100644 (file)
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <string.h>
 #include "modest-window-mgr.h"
+#include "widgets/modest-main-window.h"
+#include "widgets/modest-msg-edit-window.h"
+#include "widgets/modest-msg-view-window.h"
 /* include other impl specific header files */
 
 /* 'private'/'protected' functions */
@@ -48,6 +52,7 @@ enum {
 typedef struct _ModestWindowMgrPrivate ModestWindowMgrPrivate;
 struct _ModestWindowMgrPrivate {
        GList *window_list;
+       gboolean fullscreen_mode;
 };
 #define MODEST_WINDOW_MGR_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
                                                MODEST_TYPE_WINDOW_MGR, \
@@ -100,6 +105,7 @@ modest_window_mgr_init (ModestWindowMgr *obj)
        ModestWindowMgrPrivate *priv = MODEST_WINDOW_MGR_GET_PRIVATE(obj);
 
        priv->window_list = NULL;
+       priv->fullscreen_mode = FALSE;
 }
 
 static void
@@ -152,11 +158,46 @@ modest_window_mgr_register_window (ModestWindowMgr *self,
 
        /* Listen to object destruction */
        g_signal_connect (window, "destroy", G_CALLBACK (on_window_destroy), self);
+
+       /* Put into fullscreen if needed */
+       if (priv->fullscreen_mode)
+               gtk_window_fullscreen (GTK_WINDOW (window));
 }
 
 static void
 on_window_destroy (ModestWindow *window, ModestWindowMgr *self)
 {
+       /* Specific stuff first */
+       if (MODEST_IS_MAIN_WINDOW (window)) {
+               ModestWindowMgrPrivate *priv;
+               priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
+
+               /* If more than one window already opened */
+               if (g_list_length (priv->window_list) > 1) {
+
+                       /* If the user wants to close all the windows */
+                       if (modest_main_window_close_all (MODEST_MAIN_WINDOW (window))) {
+                               GList *iter = priv->window_list;
+                               do {
+                                       if (iter->data != window) {
+                                               GList *tmp = iter->next;
+                                               on_window_destroy (MODEST_WINDOW (iter->data),
+                                                                  self);
+                                               iter = tmp;
+                                       } else {
+                                               iter = g_list_next (iter);
+                                       }
+                               } while (iter);
+                       }
+               }
+       } else {
+               if (MODEST_IS_MSG_EDIT_WINDOW (window)) {
+                       /* TODO: Save currently edited message to Drafts
+                          folder */
+               }
+       }
+
+       /* Unregister window */
        modest_window_mgr_unregister_window (self, window);
 }
 
@@ -181,14 +222,77 @@ modest_window_mgr_unregister_window (ModestWindowMgr *self,
        /* Remove from list. Remove the reference to the window */
        g_object_unref (win->data);
        priv->window_list = g_list_remove_link (priv->window_list, win);
+
+       /* If there are no more windows registered then exit program */
+       if (priv->window_list == NULL)
+               gtk_main_quit ();
 }
 
-ModestWindow * 
-modest_window_mgr_find_window_for_msgid (ModestWindowMgr *self, 
-                                        gchar *msgid, 
-                                        GType modest_window_type)
+static gint
+compare_msguids (ModestWindow *win,
+                const gchar *uid)
 {
-       /* TODO */
+       const gchar *msg_uid;
 
-       return NULL;
+       if (!MODEST_IS_MSG_VIEW_WINDOW (win))
+               return 1;
+
+       /* Get message uid from msg window */
+       msg_uid = modest_msg_view_window_get_message_uid (MODEST_MSG_VIEW_WINDOW (win));
+       if (msg_uid && !strcmp (msg_uid, uid))
+               return 0;
+       else
+               return 1;
+}
+
+ModestWindow*  
+modest_window_mgr_find_window_by_msguid (ModestWindowMgr *self, 
+                                        const gchar *msguid)
+{
+       ModestWindowMgrPrivate *priv;
+       GList *win = NULL;
+
+       g_return_val_if_fail (MODEST_IS_WINDOW_MGR (self), NULL);
+       g_return_val_if_fail (msguid != NULL, NULL);
+
+       priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
+
+       /* Look for the window */
+       if (priv->window_list)
+               win = g_list_find_custom (priv->window_list, 
+                                         msguid, 
+                                         (GCompareFunc) compare_msguids);
+
+       if (win)
+               return win->data;
+       else 
+               return NULL;
+}
+
+void
+modest_window_mgr_set_fullscreen_mode (ModestWindowMgr *self,
+                                      gboolean on)
+{
+       ModestWindowMgrPrivate *priv;
+       GList *win = NULL;
+
+       g_return_if_fail (MODEST_IS_WINDOW_MGR (self));
+
+       priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
+
+       /* If there is no change do nothing */
+       if (priv->fullscreen_mode == on)
+               return;
+
+       priv->fullscreen_mode = on;
+
+       /* Update windows */
+       win = priv->window_list;
+       while (win) {
+               if (on)
+                       gtk_window_fullscreen (GTK_WINDOW (win->data));
+               else
+                       gtk_window_unfullscreen (GTK_WINDOW (win->data));
+               win = g_list_next (win);
+       }
 }
index 1453d86..5a19ede 100644 (file)
@@ -31,7 +31,7 @@
 #define __MODEST_WINDOW_MGR_H__
 
 #include <glib-object.h>
-#include "widgets/modest-window.h"
+#include "widgets/modest-msg-view-window.h"
 
 G_BEGIN_DECLS
 
@@ -88,20 +88,27 @@ void           modest_window_mgr_unregister_window     (ModestWindowMgr *self,
 
 
 /**
- * modest_window_mgr_find_window_for_msgid:
+ * modest_window_mgr_find_window_by_msguid:
  * @self: the #ModestWindowMgr
- * @msgid: the message id
- * @modest_window_type: the type of the #ModestWindow we're looking for
+ * @msgid: the message uid
  * 
- * Looks for a window of a given type that have a relationship with
- * the message specified by the message id passed as argument
+ * Looks for a #ModestWindow that shows the message specified by the
+ * message uid passed as argument
  *
  * Return value: the #ModestWindow if found, else NULL
  **/
-ModestWindow*  modest_window_mgr_find_window_for_msgid (ModestWindowMgr *self, 
-                                                       gchar *msgid, 
-                                                       GType modest_window_type);
+ModestWindow*  modest_window_mgr_find_window_by_msguid (ModestWindowMgr *self, 
+                                                       const gchar *msguid);
+
+/**
+ * modest_window_mgr_set_fullscreen_mode:
+ * @self: 
+ * @on: 
+ * 
+ * sets/unsets the application windows in fullscreen mode
+ **/
+void           modest_window_mgr_set_fullscreen_mode   (ModestWindowMgr *self,
+                                                       gboolean on);
 G_END_DECLS
 
 #endif /* __MODEST_WINDOW_MGR_H__ */