diff -Nru rox-2.3-orig/ROX-Filer/src/collection.c rox-2.3/ROX-Filer/src/collection.c --- rox-2.3-orig/ROX-Filer/src/collection.c 2005-07-31 22:04:53 +0300 +++ rox-2.3/ROX-Filer/src/collection.c 2005-08-13 13:52:25 +0300 @@ -134,6 +134,35 @@ static gint collection_scroll_event(GtkWidget *widget, GdkEventScroll *event); static int collection_get_rows(const Collection *collection); static int collection_get_cols(const Collection *collection); +/* treat items listed in .hidden as dotfiles */ +int hide_item(const FilerWindow *filer_window, const gchar *leafname); + +int hide_item(const FilerWindow *filer_window, const gchar *leafname) +{ +// if (filer_window->show_hidden) +// return(0); + if (leafname[0] == '.') + return(1); + + FILE *f_hidden; + if ((f_hidden = fopen(g_strconcat(filer_window->real_path, "/.hidden", NULL), "r")) ) + { + gchar str_hidden[64]; + while (fgets(str_hidden, 64, f_hidden)) + { + if (strncmp(str_hidden, leafname, strlen(str_hidden)-1) == 0) + { + fclose(f_hidden); + return(1); + } + } + fclose(f_hidden); + } + + return(0); +} + + /* The number of rows, at least 1. */ diff -Nru rox-2.3-orig/ROX-Filer/src/global.h rox-2.3/ROX-Filer/src/global.h --- rox-2.3-orig/ROX-Filer/src/global.h 2005-08-13 12:09:53 +0300 +++ rox-2.3/ROX-Filer/src/global.h 2005-08-13 13:40:33 +0300 @@ -187,6 +187,7 @@ #define ROX_STOCK_SELECT "rox-select" #define ROX_STOCK_MOUNT "rox-mount" #define ROX_STOCK_MOUNTED "rox-mounted" +#define ROX_STOCK_WORKPLACE "rox-workplace" #define ROX_STOCK_BOOKMARKS GTK_STOCK_JUMP_TO #include diff -Nru rox-2.3-orig/ROX-Filer/src/menu.c rox-2.3/ROX-Filer/src/menu.c --- rox-2.3-orig/ROX-Filer/src/menu.c 2005-08-13 12:13:08 +0300 +++ rox-2.3/ROX-Filer/src/menu.c 2005-08-13 13:42:26 +0300 @@ -147,6 +147,7 @@ static void open_parent_same(gpointer data, guint action, GtkWidget *widget); static void open_parent(gpointer data, guint action, GtkWidget *widget); +static void root_directory(gpointer data, guint action, GtkWidget *widget); static void home_directory(gpointer data, guint action, GtkWidget *widget); static void show_bookmarks(gpointer data, guint action, GtkWidget *widget); static void new_window(gpointer data, guint action, GtkWidget *widget); @@ -236,6 +237,7 @@ {">" N_("Parent, New Window"), NULL, open_parent, 0, "", GTK_STOCK_GO_UP}, {">" N_("Parent, Same Window"), NULL, open_parent_same, 0, NULL}, {">" N_("New Window"), NULL, new_window, 0, NULL}, +{">" N_("Dateisystem"), NULL, root_directory, 0, "", ROX_STOCK_WORKPLACE}, {">" N_("Home Directory"), "Home", home_directory, 0, "", GTK_STOCK_HOME}, {">" N_("Show Bookmarks"), "B", show_bookmarks, 0, "", ROX_STOCK_BOOKMARKS}, {">" N_("Follow Symbolic Links"), NULL, follow_symlinks, 0, NULL}, @@ -1725,6 +1727,14 @@ filer_change_to(window_with_focus, home_dir, NULL); } +static void root_directory(gpointer data, guint action, GtkWidget *widget) +{ + g_return_if_fail(window_with_focus != NULL); + + filer_change_to(window_with_focus, "/", NULL); +} + + static void show_bookmarks(gpointer data, guint action, GtkWidget *widget) { g_return_if_fail(window_with_focus != NULL); diff -Nru rox-2.3-orig/ROX-Filer/src/pixmaps.c rox-2.3/ROX-Filer/src/pixmaps.c --- rox-2.3-orig/ROX-Filer/src/pixmaps.c 2005-08-13 12:15:04 +0300 +++ rox-2.3/ROX-Filer/src/pixmaps.c 2005-08-13 13:43:09 +0300 @@ -106,6 +106,7 @@ ROX_STOCK_SELECT, ROX_STOCK_MOUNT, ROX_STOCK_MOUNTED, + ROX_STOCK_WORKPLACE }; static GtkIconSize mount_icon_size = -1; diff -Nru rox-2.3-orig/ROX-Filer/src/toolbar.c rox-2.3/ROX-Filer/src/toolbar.c --- rox-2.3-orig/ROX-Filer/src/toolbar.c 2005-08-01 10:10:20 +0300 +++ rox-2.3/ROX-Filer/src/toolbar.c 2005-08-13 13:45:35 +0300 @@ -46,7 +46,7 @@ typedef struct _Tool Tool; -typedef enum {DROP_NONE, DROP_TO_PARENT, DROP_TO_HOME, DROP_BOOKMARK} DropDest; +typedef enum {DROP_NONE, DROP_TO_PARENT, DROP_TO_WORKPLACE, DROP_TO_HOME, DROP_BOOKMARK} DropDest; struct _Tool { const gchar *label; @@ -74,6 +74,7 @@ /* Static prototypes */ static void toolbar_close_clicked(GtkWidget *widget, FilerWindow *filer_window); static void toolbar_up_clicked(GtkWidget *widget, FilerWindow *filer_window); +static void toolbar_workplace_clicked(GtkWidget *widget, FilerWindow *filer_window); static void toolbar_home_clicked(GtkWidget *widget, FilerWindow *filer_window); static void toolbar_bookmarks_clicked(GtkWidget *widget, FilerWindow *filer_window); @@ -123,6 +124,10 @@ {N_("Home"), GTK_STOCK_HOME, N_("Change to home directory"), toolbar_home_clicked, DROP_TO_HOME, TRUE, FALSE}, + + {N_("Dateisystem"), ROX_STOCK_WORKPLACE, N_("Dateisystem"), + toolbar_workplace_clicked, DROP_TO_WORKPLACE, TRUE, + FALSE}, {N_("Bookmarks"), ROX_STOCK_BOOKMARKS, N_("Bookmarks menu"), toolbar_bookmarks_clicked, DROP_BOOKMARK, FALSE, @@ -316,6 +321,20 @@ gdk_event_free(event); } +static void toolbar_workplace_clicked(GtkWidget *widget, FilerWindow *filer_window) +{ + GdkEvent *event; + + event = gtk_get_current_event(); + if (event->type == GDK_BUTTON_RELEASE && NEW_WIN_BUTTON(event)) + { + filer_opendir("/", filer_window, NULL); + } + else + filer_change_to(filer_window, "/", NULL); +} + + static void toolbar_home_clicked(GtkWidget *widget, FilerWindow *filer_window) { GdkEvent *event; @@ -691,7 +710,10 @@ action = GDK_ACTION_ASK; } - if (dest == DROP_TO_HOME) + if (dest == DROP_TO_WORKPLACE) + g_dataset_set_data(context, "drop_dest_path", + (gchar *) "/"); + else if (dest == DROP_TO_HOME) g_dataset_set_data(context, "drop_dest_path", (gchar *) home_dir); else if (dest == DROP_BOOKMARK)