diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-04-18 18:19:22 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-04-18 18:19:22 +0800 |
commit | 26d1ed1f62e1c3229729bb79673f1b424a4dd8d9 (patch) | |
tree | 9ba8e9dec6fa731d89980ae62ce615e1630cab6e /src/ephy-history-window.c | |
parent | 6e4b4bb1ec37e4afb9a8b52bb81d4d82ce20b136 (diff) | |
download | gsoc2013-epiphany-26d1ed1f62e1c3229729bb79673f1b424a4dd8d9.tar gsoc2013-epiphany-26d1ed1f62e1c3229729bb79673f1b424a4dd8d9.tar.gz gsoc2013-epiphany-26d1ed1f62e1c3229729bb79673f1b424a4dd8d9.tar.bz2 gsoc2013-epiphany-26d1ed1f62e1c3229729bb79673f1b424a4dd8d9.tar.lz gsoc2013-epiphany-26d1ed1f62e1c3229729bb79673f1b424a4dd8d9.tar.xz gsoc2013-epiphany-26d1ed1f62e1c3229729bb79673f1b424a4dd8d9.tar.zst gsoc2013-epiphany-26d1ed1f62e1c3229729bb79673f1b424a4dd8d9.zip |
Do not install two copies of epiphany.png
2003-04-18 Marco Pesenti Gritti <marco@it.gnome.org>
* data/art/Makefile.am:
Do not install two copies of epiphany.png
* embed/ephy-history.c: (ephy_history_save),
(ephy_history_set_page_title):
Use host name as title for sites, not the real
title.
* lib/ephy-state.c: (ephy_state_add_window),
(paned_size_allocate_cb), (ephy_state_add_paned):
* lib/ephy-state.h:
Add a way to persist paned.
* lib/widgets/ephy-node-view.h:
* lib/widgets/ephy-node-view.c: (ephy_node_view_sort_func),
(provide_text_weight), (ephy_node_view_add_column),
(ephy_node_view_has_selection):
Improve add_column api a bit to support both auto sorting
and user sorting.
* src/bookmarks/ephy-bookmarks-editor.c:
(ephy_bookmarks_editor_construct):
Updates for changed api.
* src/ephy-history-window.c: (ephy_history_window_construct):
Set a max size for title/location. Not very good, but the
best we can do with current treeview api prolly.
Persist the paned size.
Make columns user sortable.
Diffstat (limited to 'src/ephy-history-window.c')
-rw-r--r-- | src/ephy-history-window.c | 35 |
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 |