Commit 24bfdd95 authored by Maciej Stachowiak's avatar Maciej Stachowiak
Browse files

constness fixes (nautilus_tree_view_initialize, tree_select_row_callback):

	* components/tree/nautilus-tree-view.c:
	(tree_expand_callback): constness fixes
	(nautilus_tree_view_initialize, tree_select_row_callback):
	Navigate to selected location on row selection.
parent c8f6f960
2000-07-03 Maciej Stachowiak <mjs@eazel.com>
* components/tree/nautilus-tree-view.c:
(tree_expand_callback): constness fixes
(nautilus_tree_view_initialize, tree_select_row_callback):
Navigate to selected location on row selection.
2000-07-03 Andy Hertzfeld <andy@eazel.com>
* src/nautilus-sidebar-tabs.c: (draw_or_hit_test_all_tabs):
......
......@@ -87,6 +87,11 @@ static void tree_expand_callback (NautilusView *nautilus
GtkCTreeNode *node,
NautilusTreeView *view);
static void tree_select_row_callback (GtkCTree *tree,
GtkCTreeNode *node,
gint column,
NautilusTreeView *view);
static void nautilus_tree_view_load_uri (NautilusTreeView *view,
const char *uri);
......@@ -710,6 +715,11 @@ nautilus_tree_view_initialize (NautilusTreeView *view)
GTK_SIGNAL_FUNC (tree_expand_callback),
view);
gtk_signal_connect (GTK_OBJECT (view->details->tree),
"tree_select_row",
GTK_SIGNAL_FUNC (tree_select_row_callback),
view);
view->details->nautilus_view = nautilus_view_new (GTK_WIDGET (view));
gtk_signal_connect (GTK_OBJECT (view->details->nautilus_view),
......@@ -845,9 +855,9 @@ tree_expand_callback (NautilusView *nautilus_view,
GtkCTreeNode *node,
NautilusTreeView *view)
{
char *uri;
const char *uri;
uri = (char *) gtk_ctree_node_get_row_data (GTK_CTREE (view->details->tree),
uri = (const char *) gtk_ctree_node_get_row_data (GTK_CTREE (view->details->tree),
node);
nautilus_tree_expand_uri (view, uri);
......@@ -855,3 +865,19 @@ tree_expand_callback (NautilusView *nautilus_view,
static void tree_select_row_callback (GtkCTree *tree,
GtkCTreeNode *node,
gint column,
NautilusTreeView *view)
{
const char *uri;
uri = (const char *) gtk_ctree_node_get_row_data (GTK_CTREE (view->details->tree),
node);
if (uri != NULL) {
nautilus_view_open_location (NAUTILUS_VIEW (view->details->nautilus_view), uri);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment