diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-03-19 03:13:23 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-03-19 03:13:23 +0800 |
commit | d012141a9d6dc6e0b374b4e992e18239b21501dd (patch) | |
tree | 430ad3fc3ab6fdda82d91afe2acaadc081ac8c1a /src/ephy-window.c | |
parent | d248386941ce108b1e99d1a553682d5af791a628 (diff) | |
download | gsoc2013-epiphany-d012141a9d6dc6e0b374b4e992e18239b21501dd.tar gsoc2013-epiphany-d012141a9d6dc6e0b374b4e992e18239b21501dd.tar.gz gsoc2013-epiphany-d012141a9d6dc6e0b374b4e992e18239b21501dd.tar.bz2 gsoc2013-epiphany-d012141a9d6dc6e0b374b4e992e18239b21501dd.tar.lz gsoc2013-epiphany-d012141a9d6dc6e0b374b4e992e18239b21501dd.tar.xz gsoc2013-epiphany-d012141a9d6dc6e0b374b4e992e18239b21501dd.tar.zst gsoc2013-epiphany-d012141a9d6dc6e0b374b4e992e18239b21501dd.zip |
Reimplement ephystate using xml and make it easier to use. -> remove some
2003-03-18 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/ephy-dialog.c: (setup_default_size):
* lib/ephy-state.c: (ephy_states_load), (ephy_states_save),
(find_by_name), (ensure_states), (ephy_state_window_set_size),
(ephy_state_window_save_size), (window_configure_event_cb),
(window_state_event_cb), (ephy_state_add_window),
(ephy_state_save):
* lib/ephy-state.h:
* lib/ephy-types.h:
* src/ephy-shell.c: (ephy_shell_finalize):
* src/ephy-window.c: (setup_window), (ephy_window_init),
(ephy_window_show):
* src/prefs-dialog.c: (prefs_dialog_init):
Reimplement ephystate using xml and make it easier to use.
-> remove some duplicate code
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index c0df5980f..5355d75f9 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -268,7 +268,6 @@ struct EphyWindowPrivate EphyDialog *history_dialog; EphyDialog *history_sidebar; EmbedChromeMask chrome_mask; - gboolean has_default_size; gboolean closing; }; @@ -378,36 +377,6 @@ ephy_window_selection_received_cb (GtkWidget *widget, } static void -save_window_state (GtkWidget *win) -{ - EphyWindow *window = EPHY_WINDOW (win); - - if (!(window->priv->chrome_mask & EMBED_CHROME_OPENASPOPUP) && - !(window->priv->chrome_mask & EMBED_CHROME_OPENASFULLSCREEN)) - { - ephy_state_save_window (win, "main_window"); - } -} - -static gboolean -ephy_window_configure_event_cb (GtkWidget *widget, - GdkEventConfigure *event, - gpointer data) -{ - save_window_state (widget); - return FALSE; -} - -static gboolean -ephy_window_state_event_cb (GtkWidget *widget, - GdkEventWindowState *event, - gpointer data) -{ - save_window_state (widget); - return FALSE; -} - -static void add_widget (EggMenuMerge *merge, GtkWidget *widget, EphyWindow *window) { if (GTK_IS_MENU_SHELL (widget)) @@ -478,10 +447,6 @@ setup_window (EphyWindow *window) "key-press-event", G_CALLBACK(ephy_window_key_press_event_cb), window); - g_signal_connect (window, "configure_event", - G_CALLBACK (ephy_window_configure_event_cb), NULL); - g_signal_connect (window, "window_state_event", - G_CALLBACK (ephy_window_state_event_cb), NULL); g_signal_connect (window, "selection-received", G_CALLBACK (ephy_window_selection_received_cb), @@ -530,7 +495,6 @@ ephy_window_init (EphyWindow *window) window->priv->active_tab = NULL; window->priv->chrome_mask = 0; window->priv->closing = FALSE; - window->priv->has_default_size = FALSE; window->priv->ppview_toolbar = NULL; window->priv->toolbars = NULL; @@ -973,12 +937,13 @@ ephy_window_show (GtkWidget *widget) tab = ephy_window_get_active_tab (window); if (tab) ephy_tab_get_size (tab, &w, &h); - if (!window->priv->has_default_size && w == -1 && h == -1) + if (!(window->priv->chrome_mask & EMBED_CHROME_OPENASPOPUP) && + !(window->priv->chrome_mask & EMBED_CHROME_OPENASFULLSCREEN) && + !GTK_WIDGET_VISIBLE (widget)) { - ephy_state_load_window (GTK_WIDGET(window), + ephy_state_add_window (GTK_WIDGET(window), "main_window", - 600, 500, TRUE); - window->priv->has_default_size = TRUE; + 600, 500); } GTK_WIDGET_CLASS (parent_class)->show (widget); |