GType window_type,
gboolean show_toolbars,
gboolean fullscreen);
-static ModestWindow* modest_hildon2_window_mgr_get_main_window (ModestWindowMgr *self, gboolean show);
static GtkWindow *modest_hildon2_window_mgr_get_modal (ModestWindowMgr *self);
static void modest_hildon2_window_mgr_set_modal (ModestWindowMgr *self,
GtkWindow *window,
mgr_class->set_fullscreen_mode = modest_hildon2_window_mgr_set_fullscreen_mode;
mgr_class->get_fullscreen_mode = modest_hildon2_window_mgr_get_fullscreen_mode;
mgr_class->show_toolbars = modest_hildon2_window_mgr_show_toolbars;
- mgr_class->get_main_window = modest_hildon2_window_mgr_get_main_window;
mgr_class->get_modal = modest_hildon2_window_mgr_get_modal;
mgr_class->set_modal = modest_hildon2_window_mgr_set_modal;
mgr_class->find_registered_header = modest_hildon2_window_mgr_find_registered_header;
}
g_mutex_free (priv->queue_lock);
- /* Do not unref priv->main_window because it does not hold a
- new reference */
-
G_OBJECT_CLASS(parent_class)->finalize (obj);
}
return;
}
-static ModestWindow*
-modest_hildon2_window_mgr_get_main_window (ModestWindowMgr *self, gboolean show)
-{
- ModestHildon2WindowMgrPrivate *priv;
- ModestWindow *result;
-
- g_return_val_if_fail (MODEST_IS_HILDON2_WINDOW_MGR (self), NULL);
- priv = MODEST_HILDON2_WINDOW_MGR_GET_PRIVATE (self);
-
- /* TODO: make this return NULL always */
-
- result = MODEST_WINDOW_MGR_CLASS (parent_class)->get_main_window (self, FALSE);
- /* create the main window, if it hasn't been created yet */
- if (!result && show) {
- /* modest_window_mgr_register_window will set priv->main_window */
- result = modest_main_window_new ();
- /* We have to remove all other windows */
- if (!modest_window_mgr_close_all_windows (self)) {
- gtk_widget_destroy (GTK_WIDGET (result));
- return NULL;
- }
- if (!modest_window_mgr_register_window (self, result, NULL)) {
- gtk_widget_destroy (GTK_WIDGET (result));
- return NULL;
- }
- MODEST_DEBUG_BLOCK(
- g_debug ("%s: created main window: %p\n", __FUNCTION__, result);
- );
- }
- if (show) {
- gtk_widget_show_all (GTK_WIDGET (result));
- gtk_window_present (GTK_WINDOW (result));
- }
-
- return result;
-}
-
static gint
look_for_transient (gconstpointer a,
gconstpointer b)