Commit c1758967 authored by Anders Carlsson's avatar Anders Carlsson Committed by Anders Carlsson

Port to GtkTreeView, lots of work still remains though.

2002-02-05  Anders Carlsson  <andersca@gnu.org>

	* components/tree/Makefile.am:
	* components/tree/nautilus-tree-model.c:
	(nautilus_tree_node_set_parent), (nautilus_tree_node_new),
	(nautilus_dummy_tree_node_new), (nautilus_tree_node_update_icons),
	(nautilus_tree_model_get_type), (nautilus_tree_model_init),
	(nautilus_tree_model_class_init), (uri_get_parent_text),
	(nautilus_tree_model_get_node_from_file),
	(nautilus_tree_model_get_node), (report_node_changed),
	(report_root_node_if_possible), (process_file_change),
	(nautilus_tree_model_directory_files_changed_callback),
	(nautilus_tree_model_directory_done_loading_callback),
	(nautilus_tree_model_begin_monitoring_directory),
	(nautilus_tree_model_get_n_columns),
	(nautilus_tree_model_get_column_type),
	(nautilus_tree_model_get_iter), (nautilus_tree_model_get_path),
	(nautilus_tree_model_get_value), (nautilus_tree_model_iter_next),
	(nautilus_tree_model_iter_children),
	(nautilus_tree_model_iter_parent),
	(nautilus_tree_model_iter_has_child),
	(nautilus_tree_model_iter_nth_child),
	(nautilus_tree_model_tree_model_init),
	(nautilus_tree_model_root_node_file_monitor),
	(nautilus_tree_model_set_root_uri), (nautilus_tree_model_new),
	(nautilus_tree_model_dump_helper), (nautilus_tree_model_dump):
	* components/tree/nautilus-tree-model.h:
	* components/tree/nautilus-tree-view.c: (create_tree),
	(tree_activate_callback), (dump_tree), (nautilus_tree_view_init),
	(nautilus_tree_view_class_init):
	* components/tree/nautilus-tree-view.h:
	Port to GtkTreeView, lots of work still remains though.

	* src/nautilus-application.c: (finish_startup):
	Remove GMC trash migration.
parent 3ad55ff4
2002-02-05 Anders Carlsson <andersca@gnu.org>
* components/tree/Makefile.am:
* components/tree/nautilus-tree-model.c:
(nautilus_tree_node_set_parent), (nautilus_tree_node_new),
(nautilus_dummy_tree_node_new), (nautilus_tree_node_update_icons),
(nautilus_tree_model_get_type), (nautilus_tree_model_init),
(nautilus_tree_model_class_init), (uri_get_parent_text),
(nautilus_tree_model_get_node_from_file),
(nautilus_tree_model_get_node), (report_node_changed),
(report_root_node_if_possible), (process_file_change),
(nautilus_tree_model_directory_files_changed_callback),
(nautilus_tree_model_directory_done_loading_callback),
(nautilus_tree_model_begin_monitoring_directory),
(nautilus_tree_model_get_n_columns),
(nautilus_tree_model_get_column_type),
(nautilus_tree_model_get_iter), (nautilus_tree_model_get_path),
(nautilus_tree_model_get_value), (nautilus_tree_model_iter_next),
(nautilus_tree_model_iter_children),
(nautilus_tree_model_iter_parent),
(nautilus_tree_model_iter_has_child),
(nautilus_tree_model_iter_nth_child),
(nautilus_tree_model_tree_model_init),
(nautilus_tree_model_root_node_file_monitor),
(nautilus_tree_model_set_root_uri), (nautilus_tree_model_new),
(nautilus_tree_model_dump_helper), (nautilus_tree_model_dump):
* components/tree/nautilus-tree-model.h:
* components/tree/nautilus-tree-view.c: (create_tree),
(tree_activate_callback), (dump_tree), (nautilus_tree_view_init),
(nautilus_tree_view_class_init):
* components/tree/nautilus-tree-view.h:
Port to GtkTreeView, lots of work still remains though.
* src/nautilus-application.c: (finish_startup):
Remove GMC trash migration.
2002-02-04 Michael Meeks <michael@ximian.com>
* src/file-manager/fm-icon-view.c
......
......@@ -8,21 +8,11 @@ INCLUDES = \
$(NULL)
TREE_VIEW_COMMON_SOURCES = \
nautilus-tree-change-queue.c \
nautilus-tree-change-queue.h \
nautilus-tree-expansion-state.c \
nautilus-tree-expansion-state.h \
nautilus-tree-model.c \
nautilus-tree-model.h \
nautilus-tree-node-private.h \
nautilus-tree-node.c \
nautilus-tree-node.h \
nautilus-tree-view-iids.h \
nautilus-tree-view.c \
nautilus-tree-view.h \
nautilus-tree-view-private.h \
nautilus-tree-view-dnd.c \
nautilus-tree-view-dnd.h \
nautilus-tree-view-iids.h \
$(NULL)
lib_LTLIBRARIES = \
......
This diff is collapsed.
......@@ -27,7 +27,6 @@
#define NAUTILUS_TREE_MODEL_H
#include <gtk/gtkobject.h>
#include "nautilus-tree-node.h"
typedef struct NautilusTreeModel NautilusTreeModel;
typedef struct NautilusTreeModelClass NautilusTreeModelClass;
......@@ -38,83 +37,29 @@ typedef struct NautilusTreeModelClass NautilusTreeModelClass;
#define NAUTILUS_IS_TREE_MODEL(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_TREE_MODEL))
#define NAUTILUS_IS_TREE_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_TREE_MODEL))
enum {
NAUTILUS_TREE_MODEL_DISPLAY_NAME_COLUMN,
NAUTILUS_TREE_MODEL_CLOSED_PIXBUF_COLUMN,
NAUTILUS_TREE_MODEL_NUM_COLUMNS,
};
typedef struct NautilusTreeModelDetails NautilusTreeModelDetails;
struct NautilusTreeModel {
GtkObject parent;
GObject parent;
NautilusTreeModelDetails *details;
};
struct NautilusTreeModelClass {
GtkObjectClass parent_class;
void (*node_changed) (NautilusTreeModel *model,
NautilusTreeNode *node);
void (*node_removed) (NautilusTreeModel *model,
NautilusTreeNode *node);
void (*node_being_renamed) (NautilusTreeModel *model,
const char *old_uri,
const char *new_uri);
void (*done_loading_children) (NautilusTreeModel *model,
NautilusTreeNode *node);
GObjectClass parent_class;
};
typedef void (*NautilusTreeModelCallback) (NautilusTreeModel *model,
NautilusTreeNode *node,
gpointer callback_data);
GtkType nautilus_tree_model_get_type (void);
NautilusTreeModel *nautilus_tree_model_new (const char *root_uri);
void nautilus_tree_model_monitor_add (NautilusTreeModel *model,
gconstpointer client,
NautilusTreeModelCallback initial_nodes_callback,
gpointer callback_data);
void nautilus_tree_model_monitor_remove (NautilusTreeModel *model,
gconstpointer client);
GType nautilus_tree_model_get_type (void);
void nautilus_tree_model_monitor_node (NautilusTreeModel *model,
NautilusTreeNode *node,
gconstpointer client,
gboolean force_reload);
void nautilus_tree_model_stop_monitoring_node (NautilusTreeModel *model,
NautilusTreeNode *node,
gconstpointer client);
void nautilus_tree_model_stop_monitoring_node_recursive (NautilusTreeModel *model,
NautilusTreeNode *node,
gconstpointer client);
NautilusTreeNode *nautilus_tree_model_get_node (NautilusTreeModel *model,
const char *uri);
NautilusTreeNode *nautilus_tree_model_get_node_from_file (NautilusTreeModel *model,
NautilusFile *file);
#if 0
NautilusTreeNode *nautilus_tree_model_get_nearest_parent_node (NautilusTreeModel *model,
NautilusFile *file);
NautilusTreeNode *nautilus_tree_model_get_root_node (NautilusTreeModel *model);
#endif
void nautilus_tree_model_set_defer_notifications (NautilusTreeModel *model,
gboolean defer);
NautilusTreeModel *nautilus_tree_model_new (const char *root_uri);
/* Debugging */
void nautilus_tree_model_dump_files (NautilusTreeModel *model);
void nautilus_tree_model_dump (NautilusTreeModel *model);
#endif /* NAUTILUS_TREE_MODEL_H */
This diff is collapsed.
......@@ -2,6 +2,7 @@
/*
* Copyright (C) 2000, 2001 Eazel, Inc
* Copyright (C) 2002 Anders Carlsson
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
......@@ -18,7 +19,8 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: Maciej Stachowiak <mjs@eazel.com>
* Authors: Maciej Stachowiak <mjs@eazel.com>
* Anders Carlsson <andersca@gnu.org>
*/
/* nautilus-tree-view.h - tree view. */
......
......@@ -277,31 +277,6 @@ nautilus_make_uri_list_from_shell_strv (const char * const *strv)
return uri_list;
}
/* Find ~/.gnome-desktop/Trash and rename it to ~/.gnome-desktop/Trash.gmc
* Only if it is a directory
*/
static void
migrate_gmc_trash (void)
{
char *dp, *trash_dir, *dest;
struct stat buf;
dp = nautilus_get_desktop_directory ();
trash_dir = g_strconcat (dp, "/", "Trash", NULL);
dest = g_strconcat (dp, "/", "Trash.gmc", NULL);
if (stat (trash_dir, &buf) == 0 && S_ISDIR (buf.st_mode)) {
rename (trash_dir, dest);
#if GNOME2_CONVERSION_COMPLETE
gnome_metadata_rename (trash_dir, dest);
#endif
}
g_free (dp);
g_free (trash_dir);
g_free (dest);
}
static void
migrate_old_nautilus_files (void)
{
......@@ -395,8 +370,7 @@ finish_startup (NautilusApplication *application)
/* initialize URI authentication manager */
nautilus_authentication_manager_init ();
/* Make the desktop work with gmc and old Nautilus. */
migrate_gmc_trash ();
/* Make the desktop work with old Nautilus. */
migrate_old_nautilus_files ();
}
......
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