summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2004-11-05 11:21:53 +0000
committerAlexander Larsson <alexl@src.gnome.org>2004-11-05 11:21:53 +0000
commitca4e49eb4b08f298ff532f2e8f6c2afabd3887e5 (patch)
tree5f092fbbb541d9b9c6a400f218ae43df0d41e5f3
parent9180188aa849d8875bf0a3875352e1cba9ac9148 (diff)
downloadnautilus-ca4e49eb4b08f298ff532f2e8f6c2afabd3887e5.tar.gz
Remove stuff that are now replaced or not needed anymore.
2004-11-05 Alexander Larsson <alexl@redhat.com> * components/Makefile.am: Remove stuff that are now replaced or not needed anymore. * libnautilus-private/nautilus-window-info.[ch]: * src/nautilus-window.c: Add nautilus_window_info_get_history. * src/Makefile.am: * src/nautilus-history-sidebar.[ch]: * src/nautilus-application.c: (nautilus_application_instance_init): Add history sidebar widget, based on old component. * src/nautilus-information-panel.[ch]: Some fixes
-rw-r--r--ChangeLog17
-rw-r--r--components/Makefile.am8
-rw-r--r--libnautilus-private/nautilus-window-info.c8
-rw-r--r--libnautilus-private/nautilus-window-info.h2
-rw-r--r--src/Makefile.am72
-rw-r--r--src/nautilus-application.c2
-rw-r--r--src/nautilus-history-sidebar.c319
-rw-r--r--src/nautilus-history-sidebar.h49
-rw-r--r--src/nautilus-information-panel.c5
-rw-r--r--src/nautilus-information-panel.h2
-rw-r--r--src/nautilus-window.c8
11 files changed, 445 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d37f144d..dcec5e5c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2004-11-05 Alexander Larsson <alexl@redhat.com>
+ * components/Makefile.am:
+ Remove stuff that are now replaced or not needed anymore.
+
+ * libnautilus-private/nautilus-window-info.[ch]:
+ * src/nautilus-window.c:
+ Add nautilus_window_info_get_history.
+
+ * src/Makefile.am:
+ * src/nautilus-history-sidebar.[ch]:
+ * src/nautilus-application.c: (nautilus_application_instance_init):
+ Add history sidebar widget, based on old component.
+
+ * src/nautilus-information-panel.[ch]:
+ Some fixes
+
+2004-11-05 Alexander Larsson <alexl@redhat.com>
+
* libnautilus-private/nautilus-directory-background.c:
Fix spew
diff --git a/components/Makefile.am b/components/Makefile.am
index 01670366f..6106a59f3 100644
--- a/components/Makefile.am
+++ b/components/Makefile.am
@@ -1,19 +1,11 @@
NULL=
SUBDIRS = \
- adapter \
- history \
notes \
- text \
throbber \
emblem \
image_properties \
$(NULL)
-# loser \
# sample \
# These should only be built by people that know what they do
-
-# news \
-# Disable the news-sidebar for now, It has lots of bugs and doesn't
-# really fit into a file manager.
diff --git a/libnautilus-private/nautilus-window-info.c b/libnautilus-private/nautilus-window-info.c
index ed2c83bb8..d227e1f3f 100644
--- a/libnautilus-private/nautilus-window-info.c
+++ b/libnautilus-private/nautilus-window-info.c
@@ -191,6 +191,14 @@ nautilus_window_info_get_title (NautilusWindowInfo *window)
return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_title) (window);
}
+GList *
+nautilus_window_info_get_history (NautilusWindowInfo *window)
+{
+ g_return_val_if_fail (NAUTILUS_IS_WINDOW_INFO (window), NULL);
+
+ return (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->get_history) (window);
+}
+
char *
nautilus_window_info_get_current_location (NautilusWindowInfo *window)
{
diff --git a/libnautilus-private/nautilus-window-info.h b/libnautilus-private/nautilus-window-info.h
index 8fc8db90c..7d2241294 100644
--- a/libnautilus-private/nautilus-window-info.h
+++ b/libnautilus-private/nautilus-window-info.h
@@ -113,6 +113,7 @@ struct _NautilusWindowInfoIface
void (* set_status) (NautilusWindowInfo *window,
const char *status);
char * (* get_title) (NautilusWindowInfo *window);
+ GList *(* get_history) (NautilusWindowInfo *window);
NautilusWindowType
(* get_window_type) (NautilusWindowInfo *window);
NautilusWindowShowHiddenFilesMode
@@ -149,6 +150,7 @@ void nautilus_window_info_set_status
const char *status);
NautilusWindowType nautilus_window_info_get_window_type (NautilusWindowInfo *window);
char * nautilus_window_info_get_title (NautilusWindowInfo *window);
+GList * nautilus_window_info_get_history (NautilusWindowInfo *window);
char * nautilus_window_info_get_current_location (NautilusWindowInfo *window);
int nautilus_window_info_get_selection_count (NautilusWindowInfo *window);
GList * nautilus_window_info_get_selection (NautilusWindowInfo *window);
diff --git a/src/Makefile.am b/src/Makefile.am
index ecbe48385..b2c0b14a3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -51,75 +51,77 @@ nautilus_shell_interface_idl_sources = \
nautilus_SOURCES = \
$(nautilus_shell_interface_idl_sources) \
nautilus-application.c \
- nautilus-bookmark-list.c \
- nautilus-bookmark-parsing.c \
- nautilus-bookmarks-window.c \
- nautilus-complex-search-bar.c \
- nautilus-connect-server-dialog.c \
- nautilus-desktop-window.c \
- nautilus-first-time-druid.c \
- nautilus-information-panel.c \
- nautilus-location-bar.c \
- nautilus-location-dialog.c \
- nautilus-location-entry.c \
- nautilus-main.c \
- nautilus-navigation-bar.c \
- nautilus-navigation-window.c \
- nautilus-navigation-window-menus.c \
- nautilus-profiler.c \
- nautilus-property-browser.c \
- nautilus-search-bar-criterion.c \
- nautilus-search-bar.c \
- nautilus-self-check-functions.c \
- nautilus-shell.c \
- nautilus-side-pane.c \
- nautilus-sidebar-title.c \
- nautilus-signaller.c \
- nautilus-simple-search-bar.c \
- nautilus-spatial-window.c \
- nautilus-switchable-navigation-bar.c \
- nautilus-switchable-search-bar.c \
- nautilus-window-toolbars.c \
- nautilus-window-manage-views.c \
- nautilus-window-menus.c \
- nautilus-window.c \
- nautilus-zoom-control.c \
nautilus-application.h \
+ nautilus-bookmark-list.c \
nautilus-bookmark-list.h \
+ nautilus-bookmark-parsing.c \
nautilus-bookmark-parsing.h \
+ nautilus-bookmarks-window.c \
nautilus-bookmarks-window.h \
+ nautilus-complex-search-bar.c \
nautilus-complex-search-bar.h \
+ nautilus-connect-server-dialog.c \
nautilus-connect-server-dialog.h \
+ nautilus-desktop-window.c \
nautilus-desktop-window.h \
+ nautilus-file-management-properties.c \
+ nautilus-file-management-properties.h \
+ nautilus-first-time-druid.c \
nautilus-first-time-druid.h \
+ nautilus-history-sidebar.c \
+ nautilus-history-sidebar.h \
+ nautilus-information-panel.c \
nautilus-information-panel.h \
+ nautilus-location-bar.c \
nautilus-location-bar.h \
+ nautilus-location-dialog.c \
nautilus-location-dialog.h \
+ nautilus-location-entry.c \
nautilus-location-entry.h \
+ nautilus-main.c \
nautilus-main.h \
+ nautilus-navigation-bar.c \
nautilus-navigation-bar.h \
+ nautilus-navigation-window-menus.c \
+ nautilus-navigation-window.c \
nautilus-navigation-window.h \
+ nautilus-profiler.c \
nautilus-profiler.h \
+ nautilus-property-browser.c \
nautilus-property-browser.h \
nautilus-search-bar-criterion-private.h \
+ nautilus-search-bar-criterion.c \
nautilus-search-bar-criterion.h \
nautilus-search-bar-private.h \
+ nautilus-search-bar.c \
nautilus-search-bar.h \
+ nautilus-self-check-functions.c \
nautilus-self-check-functions.h \
+ nautilus-shell.c \
nautilus-shell.h \
+ nautilus-side-pane.c \
nautilus-side-pane.h \
+ nautilus-sidebar-title.c \
nautilus-sidebar-title.h \
+ nautilus-signaller.c \
nautilus-signaller.h \
+ nautilus-simple-search-bar.c \
nautilus-simple-search-bar.h \
+ nautilus-spatial-window.c \
nautilus-spatial-window.h \
+ nautilus-switchable-navigation-bar.c \
nautilus-switchable-navigation-bar.h \
+ nautilus-switchable-search-bar.c \
nautilus-switchable-search-bar.h \
+ nautilus-window-manage-views.c \
nautilus-window-manage-views.h \
+ nautilus-window-menus.c \
nautilus-window-private.h \
+ nautilus-window-toolbars.c \
+ nautilus-window.c \
nautilus-window.h \
+ nautilus-zoom-control.c \
nautilus-zoom-control.h \
- nautilus-file-management-properties.c \
- nautilus-file-management-properties.h \
$(NULL)
nautilus_file_management_properties_SOURCES= \
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index f0e2916d5..9c89cedae 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -36,6 +36,7 @@
#include "file-manager/fm-search-list-view.h"
#include "file-manager/fm-tree-view.h"
#include "nautilus-information-panel.h"
+#include "nautilus-history-sidebar.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -173,6 +174,7 @@ nautilus_application_instance_init (NautilusApplication *application)
/* register sidebars */
nautilus_information_panel_register ();
+ nautilus_history_sidebar_register ();
}
NautilusApplication *
diff --git a/src/nautilus-history-sidebar.c b/src/nautilus-history-sidebar.c
new file mode 100644
index 000000000..eaba273f3
--- /dev/null
+++ b/src/nautilus-history-sidebar.c
@@ -0,0 +1,319 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/*
+ * Nautilus
+ *
+ * Copyright (C) 1999, 2000 Red Hat, Inc.
+ * Copyright (C) 2000, 2001 Eazel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this library; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Authors: Elliot Lee <sopwith@redhat.com>
+ * Darin Adler <darin@bentspoon.com>
+ *
+ */
+
+#include <config.h>
+
+#include <bonobo/bonobo-ui-util.h>
+#include <eel/eel-debug.h>
+#include <eel/eel-gtk-extensions.h>
+#include <eel/eel-glib-extensions.h>
+#include <eel/eel-preferences.h>
+#include <gtk/gtkcellrendererpixbuf.h>
+#include <gtk/gtkcellrenderertext.h>
+#include <gtk/gtkliststore.h>
+#include <gtk/gtktreemodel.h>
+#include <gtk/gtktreeselection.h>
+#include <libgnome/gnome-macros.h>
+#include <libgnome/gnome-i18n.h>
+#include <libnautilus-private/nautilus-bookmark.h>
+#include <libnautilus-private/nautilus-global-preferences.h>
+#include <libnautilus-private/nautilus-sidebar-factory.h>
+
+#include "nautilus-signaller.h"
+#include "nautilus-history-sidebar.h"
+
+#define NAUTILUS_HISTORY_SIDEBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_HISTORY_SIDEBAR, NautilusHistorySidebarClass))
+#define NAUTILUS_IS_HISTORY_SIDEBAR(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_HISTORY_SIDEBAR))
+#define NAUTILUS_IS_HISTORY_SIDEBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_HISTORY_SIDEBAR))
+
+typedef struct {
+ GtkScrolledWindowClass parent;
+} NautilusHistorySidebarClass;
+
+enum {
+ HISTORY_SIDEBAR_COLUMN_ICON,
+ HISTORY_SIDEBAR_COLUMN_NAME,
+ HISTORY_SIDEBAR_COLUMN_BOOKMARK,
+ HISTORY_SIDEBAR_COLUMN_COUNT
+};
+
+static void nautilus_history_sidebar_iface_init (NautilusSidebarIface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (NautilusHistorySidebar, nautilus_history_sidebar, GTK_TYPE_SCROLLED_WINDOW,
+ G_IMPLEMENT_INTERFACE (NAUTILUS_TYPE_SIDEBAR,
+ nautilus_history_sidebar_iface_init));
+
+static void
+update_history (NautilusHistorySidebar *view)
+{
+ GtkListStore *store;
+ GtkTreeSelection *selection;
+ NautilusBookmark *bookmark;
+ GdkPixbuf *pixbuf;
+ GtkTreeIter iter;
+ char *name;
+ GList *l, *history;
+
+ store = GTK_LIST_STORE (gtk_tree_view_get_model (view->tree_view));
+
+ gtk_list_store_clear (store);
+
+ history = nautilus_window_info_get_history (view->window);
+ for (l = history; l != NULL; l = l->next) {
+ bookmark = nautilus_bookmark_copy (l->data);
+
+ pixbuf = nautilus_bookmark_get_pixbuf (bookmark, NAUTILUS_ICON_SIZE_FOR_MENUS, FALSE);
+ name = nautilus_bookmark_get_name (bookmark);
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ HISTORY_SIDEBAR_COLUMN_ICON, pixbuf,
+ HISTORY_SIDEBAR_COLUMN_NAME, name,
+ HISTORY_SIDEBAR_COLUMN_BOOKMARK, bookmark,
+ -1);
+
+ if (pixbuf != NULL) {
+ g_object_unref (pixbuf);
+ }
+ g_free (name);
+ }
+ eel_g_object_list_free (history);
+
+ selection = GTK_TREE_SELECTION (gtk_tree_view_get_selection (view->tree_view));
+
+ if (gtk_tree_model_get_iter_root (GTK_TREE_MODEL (store), &iter)) {
+ gtk_tree_selection_select_iter (selection, &iter);
+ }
+}
+
+static void
+history_changed_callback (GObject *signaller,
+ NautilusHistorySidebar *view)
+{
+ update_history (view);
+}
+
+static void
+row_activated_callback (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer user_data)
+{
+ NautilusHistorySidebar *view;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ NautilusBookmark *bookmark;
+ char *uri;
+
+ view = NAUTILUS_HISTORY_SIDEBAR (user_data);
+ model = gtk_tree_view_get_model (tree_view);
+
+ if (!gtk_tree_model_get_iter (model, &iter, path)) {
+ return;
+ }
+
+ gtk_tree_model_get
+ (model, &iter, HISTORY_SIDEBAR_COLUMN_BOOKMARK, &bookmark, -1);
+
+ /* Navigate to the clicked location. */
+ uri = nautilus_bookmark_get_uri (NAUTILUS_BOOKMARK (bookmark));
+ nautilus_window_info_open_location
+ (view->window,
+ uri, NAUTILUS_WINDOW_OPEN_ACCORDING_TO_MODE, 0, NULL);
+ g_free (uri);
+}
+
+static void
+update_click_policy (NautilusHistorySidebar *view)
+{
+ int policy;
+
+ policy = eel_preferences_get_enum (NAUTILUS_PREFERENCES_CLICK_POLICY);
+
+ eel_gtk_tree_view_set_activate_on_single_click
+ (view->tree_view, policy == NAUTILUS_CLICK_POLICY_SINGLE);
+}
+
+static void
+click_policy_changed_callback (gpointer user_data)
+{
+ NautilusHistorySidebar *view;
+
+ view = NAUTILUS_HISTORY_SIDEBAR (user_data);
+
+ update_click_policy (view);
+}
+
+static void
+nautilus_history_sidebar_init (NautilusHistorySidebar *view)
+{
+ GtkTreeView *tree_view;
+ GtkTreeViewColumn *col;
+ GtkCellRenderer *cell;
+ GtkListStore *store;
+ GtkTreeSelection *selection;
+
+ tree_view = GTK_TREE_VIEW (gtk_tree_view_new ());
+ gtk_tree_view_set_headers_visible (tree_view, FALSE);
+ gtk_widget_show (GTK_WIDGET (tree_view));
+
+ col = GTK_TREE_VIEW_COLUMN (gtk_tree_view_column_new ());
+
+ cell = gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_column_pack_start (col, cell, FALSE);
+ gtk_tree_view_column_set_attributes (col, cell,
+ "pixbuf", HISTORY_SIDEBAR_COLUMN_ICON,
+ NULL);
+
+ cell = gtk_cell_renderer_text_new ();
+ gtk_tree_view_column_pack_start (col, cell, TRUE);
+ gtk_tree_view_column_set_attributes (col, cell,
+ "text", HISTORY_SIDEBAR_COLUMN_NAME,
+ NULL);
+
+ gtk_tree_view_column_set_fixed_width (col, NAUTILUS_ICON_SIZE_SMALLER);
+ gtk_tree_view_append_column (tree_view, col);
+
+ store = gtk_list_store_new (HISTORY_SIDEBAR_COLUMN_COUNT,
+ GDK_TYPE_PIXBUF,
+ G_TYPE_STRING,
+ NAUTILUS_TYPE_BOOKMARK);
+
+ gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (store));
+
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (view),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW (view), NULL);
+ gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (view), NULL);
+ gtk_container_add (GTK_CONTAINER (view), GTK_WIDGET (tree_view));
+ gtk_widget_show (GTK_WIDGET (view));
+
+ view->tree_view = tree_view;
+
+ selection = gtk_tree_view_get_selection (tree_view);
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+
+ g_signal_connect_object
+ (tree_view, "row_activated",
+ G_CALLBACK (row_activated_callback), view, 0);
+
+ g_signal_connect_object (nautilus_signaller_get_current (),
+ "history_list_changed",
+ G_CALLBACK (history_changed_callback), view, 0);
+
+ eel_preferences_add_callback (NAUTILUS_PREFERENCES_CLICK_POLICY,
+ click_policy_changed_callback,
+ view);
+ update_click_policy (view);
+}
+
+static void
+nautilus_history_sidebar_finalize (GObject *object)
+{
+ NautilusHistorySidebar *view;
+
+ view = NAUTILUS_HISTORY_SIDEBAR (object);
+
+ eel_preferences_remove_callback (NAUTILUS_PREFERENCES_CLICK_POLICY,
+ click_policy_changed_callback,
+ view);
+
+ G_OBJECT_CLASS (nautilus_history_sidebar_parent_class)->finalize (object);
+}
+
+static void
+nautilus_history_sidebar_class_init (NautilusHistorySidebarClass *class)
+{
+ G_OBJECT_CLASS (class)->finalize = nautilus_history_sidebar_finalize;
+}
+
+static const char *
+nautilus_history_sidebar_get_sidebar_id (NautilusSidebar *sidebar)
+{
+ return NAUTILUS_HISTORY_SIDEBAR_ID;
+}
+
+static char *
+nautilus_history_sidebar_get_tab_label (NautilusSidebar *sidebar)
+{
+ return g_strdup (_("History"));
+}
+
+static GdkPixbuf *
+nautilus_history_sidebar_get_tab_icon (NautilusSidebar *sidebar)
+{
+ return NULL;
+}
+
+static void
+nautilus_history_sidebar_is_visible_changed (NautilusSidebar *sidebar,
+ gboolean is_visible)
+{
+ /* Do nothing */
+}
+
+static void
+nautilus_history_sidebar_iface_init (NautilusSidebarIface *iface)
+{
+ iface->get_sidebar_id = nautilus_history_sidebar_get_sidebar_id;
+ iface->get_tab_label = nautilus_history_sidebar_get_tab_label;
+ iface->get_tab_icon = nautilus_history_sidebar_get_tab_icon;
+ iface->is_visible_changed = nautilus_history_sidebar_is_visible_changed;
+}
+
+static void
+nautilus_history_sidebar_set_parent_window (NautilusHistorySidebar *view,
+ NautilusWindowInfo *window)
+{
+ view->window = window;
+ update_history (view);
+}
+
+static NautilusSidebar *
+nautilus_history_sidebar_create (NautilusWindowInfo *window)
+{
+ NautilusHistorySidebar *view;
+
+ view = g_object_new (nautilus_history_sidebar_get_type (), NULL);
+ nautilus_history_sidebar_set_parent_window (view, window);
+ g_object_ref (view);
+ gtk_object_sink (GTK_OBJECT (view));
+
+ return NAUTILUS_SIDEBAR (view);
+}
+
+static NautilusSidebarInfo history_sidebar = {
+ NAUTILUS_HISTORY_SIDEBAR_ID,
+ nautilus_history_sidebar_create,
+};
+
+void
+nautilus_history_sidebar_register (void)
+{
+ nautilus_sidebar_factory_register (&history_sidebar);
+}
+
diff --git a/src/nautilus-history-sidebar.h b/src/nautilus-history-sidebar.h
new file mode 100644
index 000000000..dc4ef7955
--- /dev/null
+++ b/src/nautilus-history-sidebar.h
@@ -0,0 +1,49 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+/*
+ * Nautilus
+ *
+ * Copyright (C) 1999, 2000 Red Hat, Inc.
+ * Copyright (C) 2000, 2001 Eazel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this library; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Authors: Elliot Lee <sopwith@redhat.com>
+ * Darin Adler <darin@bentspoon.com>
+ *
+ */
+#ifndef _NAUTILUS_HISTORY_SIDEBAR_H
+#define _NAUTILUS_HISTORY_SIDEBAR_H
+
+#include <gtk/gtktreeview.h>
+#include <libnautilus-private/nautilus-view.h>
+#include <libnautilus-private/nautilus-window-info.h>
+#include <gtk/gtkscrolledwindow.h>
+
+#define NAUTILUS_HISTORY_SIDEBAR_ID "NautilusHistorySidebar"
+
+#define NAUTILUS_TYPE_HISTORY_SIDEBAR (nautilus_history_sidebar_get_type ())
+#define NAUTILUS_HISTORY_SIDEBAR(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_HISTORY_SIDEBAR, NautilusHistorySidebar))
+
+typedef struct {
+ GtkScrolledWindow parent;
+ GtkTreeView *tree_view;
+ NautilusWindowInfo *window;
+} NautilusHistorySidebar;
+
+GType nautilus_history_sidebar_get_type (void);
+void nautilus_history_sidebar_register (void);
+
+#endif
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
index c206ab287..cae5fa7b2 100644
--- a/src/nautilus-information-panel.c
+++ b/src/nautilus-information-panel.c
@@ -163,7 +163,7 @@ nautilus_information_panel_get_sidebar_id (NautilusSidebar *sidebar)
static char *
nautilus_information_panel_get_tab_label (NautilusSidebar *sidebar)
{
- return _("Information");
+ return g_strdup (_("Information"));
}
static GdkPixbuf *
@@ -1278,9 +1278,10 @@ static void
nautilus_information_panel_set_parent_window (NautilusInformationPanel *panel,
NautilusWindowInfo *window)
{
- panel->details->window = window;
char *title, *location;
+ panel->details->window = window;
+
g_signal_connect_object (window, "loading_uri",
G_CALLBACK (loading_uri_callback), panel, 0);
g_signal_connect_object (window, "title_changed",
diff --git a/src/nautilus-information-panel.h b/src/nautilus-information-panel.h
index 1cdf47feb..d3385fb83 100644
--- a/src/nautilus-information-panel.h
+++ b/src/nautilus-information-panel.h
@@ -59,7 +59,5 @@ typedef struct {
GType nautilus_information_panel_get_type (void);
void nautilus_information_panel_register (void);
-/* BONOBOTODO: needed? */
-void nautilus_information_panel_setup_width (NautilusInformationPanel *information_panel);
#endif /* NAUTILUS_INFORMATION_PANEL_H */
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 0daabb72f..4b3143256 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1605,6 +1605,13 @@ nautilus_get_history_list (void)
return history_list;
}
+static GList *
+nautilus_window_get_history (NautilusWindow *window)
+{
+ return eel_g_object_list_copy (history_list);
+}
+
+
static NautilusWindowType
nautilus_window_get_window_type (NautilusWindow *window)
{
@@ -1654,6 +1661,7 @@ nautilus_window_info_iface_init (NautilusWindowInfoIface *iface)
iface->set_status = nautilus_window_set_status;
iface->get_window_type = nautilus_window_get_window_type;
iface->get_title = nautilus_window_get_cached_title;
+ iface->get_history = nautilus_window_get_history;
iface->get_current_location = nautilus_window_get_location;
iface->get_ui_container = nautilus_window_get_ui_container;
iface->get_selection_count = nautilus_window_get_selection_count;