+
+gboolean
+modest_window_mgr_get_fullscreen_mode (ModestWindowMgr *self)
+{
+ ModestWindowMgrPrivate *priv;
+
+ g_return_val_if_fail (MODEST_IS_WINDOW_MGR (self), FALSE);
+
+ priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
+
+ return priv->fullscreen_mode;
+}
+
+void
+modest_window_mgr_show_toolbars (ModestWindowMgr *self,
+ gboolean show_toolbars,
+ gboolean fullscreen)
+{
+ ModestWindowMgrPrivate *priv;
+
+ g_return_if_fail (MODEST_IS_WINDOW_MGR (self));
+
+ priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
+
+ /* If nothing changes then return. Otherwise cache it, do not
+ save to GConf for the moment, it will be done when all
+ windows become unregistered in order to avoid unnecessary
+ ModestConf calls */
+ if (fullscreen) {
+ if (priv->show_toolbars_fullscreen == show_toolbars)
+ return;
+ else
+ priv->show_toolbars_fullscreen = show_toolbars;
+ } else {
+ if (priv->show_toolbars == show_toolbars)
+ return;
+ else
+ priv->show_toolbars = show_toolbars;
+ }
+
+ /* Apply now if the view mode is the right one */
+ if ((fullscreen && priv->fullscreen_mode) ||
+ (!fullscreen && !priv->fullscreen_mode)) {
+
+ GList *win = priv->window_list;
+
+ while (win) {
+ modest_window_show_toolbar (MODEST_WINDOW (win->data),
+ show_toolbars);
+ win = g_list_next (win);
+ }
+ }
+}