aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-history-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-history-window.c')
-rw-r--r--src/ephy-history-window.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 10e06e592..34d8e19f6 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -512,6 +512,7 @@ menu_activate_cb (EphyNodeView *view,
static void
ephy_history_window_construct (EphyHistoryWindow *editor)
{
+ GtkTreeViewColumn *col;
GtkTreeSelection *selection;
GtkWidget *vbox, *hpaned;
GtkWidget *pages_view, *sites_view;
@@ -523,10 +524,6 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
const char *icon_path;
int i;
- ephy_state_add_window (GTK_WIDGET(editor),
- "history_window",
- 450, 400);
-
gtk_window_set_title (GTK_WINDOW (editor), _("History"));
icon_path = ephy_file ("epiphany-history.png");
@@ -582,6 +579,8 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
gtk_paned_add1 (GTK_PANED (hpaned), scrolled_window);
gtk_widget_show (scrolled_window);
sites_view = ephy_node_view_new (node, NULL);
+ ephy_node_view_select_node (EPHY_NODE_VIEW (sites_view),
+ ephy_history_get_pages (editor->priv->history));
ephy_node_view_enable_drag_source (EPHY_NODE_VIEW (sites_view),
page_drag_types,
n_page_drag_types,
@@ -590,9 +589,9 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
ephy_node_view_add_column (EPHY_NODE_VIEW (sites_view), _("Sites"),
G_TYPE_STRING,
- EPHY_NODE_PAGE_PROP_LOCATION,
+ EPHY_NODE_PAGE_PROP_TITLE,
EPHY_NODE_PAGE_PROP_PRIORITY,
- FALSE, FALSE);
+ EPHY_NODE_VIEW_AUTO_SORT);
gtk_container_add (GTK_CONTAINER (scrolled_window), sites_view);
gtk_widget_show (sites_view);
editor->priv->sites_view = sites_view;
@@ -628,12 +627,17 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
page_drag_types,
n_page_drag_types,
EPHY_NODE_PAGE_PROP_LOCATION);
- ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Title"),
- G_TYPE_STRING, EPHY_NODE_PAGE_PROP_TITLE,
- -1, FALSE, FALSE);
- ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Location"),
- G_TYPE_STRING, EPHY_NODE_PAGE_PROP_LOCATION,
- -1, FALSE, FALSE);
+ col = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Title"),
+ G_TYPE_STRING, EPHY_NODE_PAGE_PROP_TITLE,
+ -1, EPHY_NODE_VIEW_USER_SORT);
+ gtk_tree_view_column_set_max_width (col, 250);
+ col = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Location"),
+ G_TYPE_STRING, EPHY_NODE_PAGE_PROP_LOCATION,
+ -1, EPHY_NODE_VIEW_USER_SORT);
+ gtk_tree_view_column_set_max_width (col, 200);
+/* col = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Last Visit"),
+ G_TYPE_STRING, EPHY_NODE_PAGE_PROP_LAST_VISIT,
+ -1, EPHY_NODE_VIEW_USER_SORT);*/
gtk_container_add (GTK_CONTAINER (scrolled_window), pages_view);
gtk_widget_show (pages_view);
editor->priv->pages_view = pages_view;
@@ -645,6 +649,13 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
"show_popup",
G_CALLBACK (ephy_history_window_show_popup_cb),
editor);
+
+ ephy_state_add_window (GTK_WIDGET (editor),
+ "history_window",
+ 450, 400);
+ ephy_state_add_paned (GTK_WIDGET (hpaned),
+ "history_paned",
+ 130);
}
void