From f4aaa4442027d3078cc2809a0c9db2d5b4e48d85 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 17 Apr 2003 18:34:38 +0000 Subject: New history dialog implementation. More similar to bookmarks. Yeah it 2003-04-17 Marco Pesenti Gritti * 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. --- embed/ephy-history.c | 20 ++++++++++++++++++++ embed/ephy-history.h | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'embed') diff --git a/embed/ephy-history.c b/embed/ephy-history.c index c1f7e2aa4..056d04c13 100644 --- a/embed/ephy-history.c +++ b/embed/ephy-history.c @@ -21,6 +21,7 @@ #include "ephy-file-helpers.h" #include "ephy-autocompletion-source.h" #include "ephy-debug.h" +#include "ephy-node-view.h" #include #include @@ -372,6 +373,8 @@ periodic_save_cb (EphyHistory *eh) static void ephy_history_init (EphyHistory *eb) { + GValue value = { 0, }; + eb->priv = g_new0 (EphyHistoryPrivate, 1); eb->priv->xml_file = g_build_filename (ephy_dot_dir (), @@ -391,6 +394,21 @@ ephy_history_init (EphyHistory *eb) /* Pages */ eb->priv->pages = ephy_node_new_with_id (PAGES_NODE_ID); ephy_node_ref (eb->priv->pages); + g_value_init (&value, G_TYPE_STRING); + g_value_set_string (&value, _("All")); + ephy_node_set_property (eb->priv->pages, + EPHY_NODE_PAGE_PROP_LOCATION, + &value); + ephy_node_set_property (eb->priv->pages, + EPHY_NODE_PAGE_PROP_TITLE, + &value); + g_value_unset (&value); + g_value_init (&value, G_TYPE_INT); + g_value_set_int (&value, EPHY_NODE_VIEW_ALL_PRIORITY); + ephy_node_set_property (eb->priv->pages, + EPHY_NODE_PAGE_PROP_PRIORITY, + &value); + g_value_unset (&value); g_signal_connect_object (G_OBJECT (eb->priv->pages), "child_added", G_CALLBACK (pages_added_cb), @@ -416,6 +434,8 @@ ephy_history_init (EphyHistory *eb) G_OBJECT (eb), 0); + ephy_node_add_child (eb->priv->hosts, eb->priv->pages); + ephy_history_load (eb); ephy_history_emit_data_changed (eb); diff --git a/embed/ephy-history.h b/embed/ephy-history.h index 4bb9c14b1..ccddbec67 100644 --- a/embed/ephy-history.h +++ b/embed/ephy-history.h @@ -43,7 +43,8 @@ enum EPHY_NODE_PAGE_PROP_VISITS = 4, EPHY_NODE_PAGE_PROP_LAST_VISIT = 5, EPHY_NODE_PAGE_PROP_FIRST_VISIT = 6, - EPHY_NODE_PAGE_PROP_HOST_ID = 7 + EPHY_NODE_PAGE_PROP_HOST_ID = 7, + EPHY_NODE_PAGE_PROP_PRIORITY = 8 }; struct EphyHistory -- cgit v1.2.3