diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-04-18 02:34:38 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-04-18 02:34:38 +0800 |
commit | f4aaa4442027d3078cc2809a0c9db2d5b4e48d85 (patch) | |
tree | db01f8e47d598f4f971aa0fe6a40d6acacefec09 /src/ephy-shell.c | |
parent | 868e9739e1a2273ebe6f668cd28cc0b9eec50c2d (diff) | |
download | gsoc2013-epiphany-f4aaa4442027d3078cc2809a0c9db2d5b4e48d85.tar.gz gsoc2013-epiphany-f4aaa4442027d3078cc2809a0c9db2d5b4e48d85.tar.zst gsoc2013-epiphany-f4aaa4442027d3078cc2809a0c9db2d5b4e48d85.zip |
New history dialog implementation. More similar to bookmarks. Yeah it
2003-04-17 Marco Pesenti Gritti <marco@it.gnome.org>
* data/ui/Makefile.am:
* embed/ephy-history.c: (ephy_history_init):
* embed/ephy-history.h:
* lib/widgets/ephy-tree-model-node.c:
(ephy_tree_model_node_get_value):
* src/Makefile.am:
* src/ephy-shell.c: (ephy_shell_init), (ephy_shell_finalize),
(ephy_shell_show_bookmarks_editor), (history_window_hide_cb),
(ephy_shell_show_history_window):
* src/ephy-shell.h:
* src/ephy-window.c: (ephy_window_finalize),
(update_embed_dialogs), (ephy_window_get_find_dialog):
* src/ephy-window.h:
* src/window-commands.c: (window_cmd_go_history):
New history dialog implementation. More similar
to bookmarks. Yeah it still sucks ... but the hard
part is done.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r-- | src/ephy-shell.c | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 78506c19e..29069a292 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -32,6 +32,7 @@ #include "ephy-thread-helpers.h" #include "ephy-bookmarks-import.h" #include "ephy-bookmarks-editor.h" +#include "ephy-history-window.h" #include "ephy-debug.h" #include "toolbar.h" @@ -58,6 +59,7 @@ struct EphyShellPrivate EphyAutocompletion *autocompletion; EphyBookmarks *bookmarks; GtkWidget *bme; + GtkWidget *history_window; }; enum @@ -260,6 +262,7 @@ ephy_shell_init (EphyShell *gs) gs->priv->session = NULL; gs->priv->bookmarks = NULL; gs->priv->bme = NULL; + gs->priv->history_window = NULL; ephy_shell = gs; g_object_add_weak_pointer (G_OBJECT(ephy_shell), @@ -324,6 +327,12 @@ ephy_shell_finalize (GObject *object) gtk_widget_destroy (GTK_WIDGET (gs->priv->bme)); } + LOG ("Unref History Window"); + if (gs->priv->history_window) + { + gtk_widget_destroy (GTK_WIDGET (gs->priv->history_window)); + } + LOG ("Unref bookmarks") if (gs->priv->bookmarks) { @@ -636,7 +645,7 @@ void ephy_shell_show_bookmarks_editor (EphyShell *gs) { EphyBookmarks *bookmarks; - + if (gs->priv->bme == NULL) { bookmarks = ephy_shell_get_bookmarks (ephy_shell); @@ -655,3 +664,34 @@ ephy_shell_show_bookmarks_editor (EphyShell *gs) gtk_window_present (GTK_WINDOW (gs->priv->bme)); } +static void +history_window_hide_cb (GtkWidget *widget, gpointer data) +{ + LOG ("Unref shell for history window") + g_object_unref (ephy_shell); +} + +void +ephy_shell_show_history_window (EphyShell *gs) +{ + EphyHistory *history; + + if (gs->priv->history_window == NULL) + { + history = ephy_embed_shell_get_global_history + (EPHY_EMBED_SHELL (ephy_shell)); + g_assert (history != NULL); + gs->priv->history_window = ephy_history_window_new (history); + g_signal_connect (gs->priv->history_window, "hide", + G_CALLBACK (history_window_hide_cb), NULL); + } + + if (!GTK_WIDGET_VISIBLE (gs->priv->history_window)) + { + LOG ("Ref shell for history window") + g_object_ref (ephy_shell); + } + + gtk_window_present (GTK_WINDOW (gs->priv->history_window)); +} + |