Hi, Am Mittwoch, den 06.10.2004, 15:48 +0200 schrieb Alexander Larsson: > [...] > * history dropdown in Open Location dialog > Add a history of recent locations to the Nautilus Ctrl-L Open Location > dialog. A good place for this is in nautilus-location-entry.c, which > is also used on the toolbar in browser mode and for entering raw uris > in the connect to server dialog Where to save the history items, where to get them from, will they be shared with other components ? Is using gtk_entry_completion ok ? > > * DnD drop on window should be more obvious > When you drag and drop a file to a Nautilus window the only way you > can see if the drop will succeed is by looking at the cursor. We > should be highlighting the frame around the directory view when you > hover over the view and the drop will be accepted. Tried that but seems the entire file for drag&drop window special actions is there and has been disabled. Maybe there was a reason :) libnautilus-private/nautilus-drag-window.c: nautilus_drag_window_register: 'return' statement at the beginning Please confirm :) > > [...] > * tree sidebar timeout before load-uri when keynav:ing > If you navigate the tree sidebar with cursor keys, it will immediately > start loading the folders as you move over them. This makes keynav > painful. We should have a delay here before we load the folder. did that, are 300 ms ok ? (attached, fm-tree-view.diff) > > [...] > * context menu poped up by keyboard appear at mouse pointer > If you select a file and bring up the context menu (using ctrl-F10) > the menu pops up at the current mouse position, not the location of > the icon. This is distracting when you're using keyboard navigation, > and the mouse cursor could be anywhere. Yes, but it is hard to fix. I tried it in one of my other apps and what I did was basically, my_popup(): if fromKeyboard == True: path, column = self.tree.get_cursor() if path != None: rect = self.tree.get_cell_area(path, self.tree.get_columns()[0]) self.popupRect = rect menu.popup(...menu_position_callback) menu_position_callback(): x = self.popupRect.x y = self.popupRect.y # + self.popupRect.height #if y> self.tree.allocation.height: # y = 0 visible = self.tree.get_visible_rect() if x > visible.width: x = visible.width if y + self.popupRect.height > visible.height: y = visible.height ox,oy=self.tree.window.get_origin() oy = oy + 32 # FIXME dify = self.tree.allocation.height - visible.height #print dify oy = oy + dify x = x + ox y = y + oy return (x,y, True) Really ugly. I hesitate to clobber nautilus up with that ;) >[...] > * .hidden reading follows symlinks/nodes etc > When reading .hidden files we should only read it if the file is a > regular file. We shouldn't follow symlinks, hang if someone puts a > ..hidden pipe there, or whatever unregular. did that, attached nautilus-directory-async.diff > [...] > * size of home on desktop wrong > If you select properties on the home icon on the desktop, the size > won't be calculated. Selecting it on the real folder in /home works > though. We probably just have to follow the link when calculating the > size. Where is that icon handler code ? found nautilus-desktop-window.c, but its not in there ;) > [...] cheers, Danny -- www.keyserver.net key id A334AEA6
Index: fm-tree-view.c =================================================================== RCS file: /cvs/gnome/nautilus/src/file-manager/fm-tree-view.c,v retrieving revision 1.6 diff -u -p -r1.6 fm-tree-view.c --- fm-tree-view.c 21 Jun 2004 18:33:43 -0000 1.6 +++ fm-tree-view.c 9 Oct 2004 10:14:10 -0000 @@ -92,6 +92,8 @@ struct FMTreeViewDetails { GtkWidget *popup_trash; GtkWidget *popup_properties; NautilusFile *popup_file; + + guint selection_changed_timer; }; typedef struct { @@ -378,34 +380,48 @@ row_activated_callback (GtkTreeView *tre } } - -static void -selection_changed_callback (GtkTreeSelection *selection, - FMTreeView *view) +static gboolean +selection_changed_timer_callback(FMTreeView *view) { NautilusFileAttributes attributes; GtkTreeIter iter; + GtkTreeSelection *selection; + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view->details->tree_widget)); /* no activation if popup menu is open */ if (view->details->popup_file != NULL) { - return; + return FALSE; } cancel_activation (view); if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { - return; + return FALSE; } view->details->activation_file = sort_model_iter_to_file (view, &iter); if (view->details->activation_file == NULL) { - return; + return FALSE; } view->details->activation_in_new_window = FALSE; attributes = NAUTILUS_FILE_ATTRIBUTE_ACTIVATION_URI; nautilus_file_call_when_ready (view->details->activation_file, attributes, got_activation_uri_callback, view); + return FALSE; /* remove timeout */ +} + +static void +selection_changed_callback (GtkTreeSelection *selection, + FMTreeView *view) +{ + if (view->details->selection_changed_timer) { + g_source_remove (view->details->selection_changed_timer); + view->details->selection_changed_timer = 0; + } + + view->details->selection_changed_timer = g_timeout_add (300, (GSourceFunc) selection_changed_timer_callback, view); } static int @@ -1279,6 +1295,11 @@ fm_tree_view_dispose (GObject *object) view = FM_TREE_VIEW (object); + if (view->details->selection_changed_timer) { + g_source_remove (view->details->selection_changed_timer); + view->details->selection_changed_timer = 0; + } + if (view->details->drag_dest) { g_object_unref (view->details->drag_dest); view->details->drag_dest = NULL;
Index: nautilus-directory-async.c =================================================================== RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-directory-async.c,v retrieving revision 1.210 diff -u -p -r1.210 nautilus-directory-async.c --- nautilus-directory-async.c 6 Oct 2004 12:12:17 -0000 1.210 +++ nautilus-directory-async.c 9 Oct 2004 10:16:00 -0000 @@ -2018,6 +2018,8 @@ read_dot_hidden_file (NautilusDirectory GnomeVFSResult result; int i, file_size; char *file_contents; + GnomeVFSFileInfo *file_info; + gboolean file_ok; /* FIXME: We only support .hidden on file: uri's for the moment. @@ -2032,6 +2034,36 @@ read_dot_hidden_file (NautilusDirectory * that works on strings, so we can avoid the VFS parsing step. */ dot_hidden_vfs_uri = gnome_vfs_uri_append_file_name (directory->details->vfs_uri, ".hidden"); + + file_info = gnome_vfs_file_info_new (); + if (!file_info) + return; + + if (gnome_vfs_get_file_info_uri ( + dot_hidden_vfs_uri, + file_info, + GNOME_VFS_FILE_INFO_DEFAULT) + != GNOME_VFS_OK) { + gnome_vfs_file_info_unref (file_info); + return; + } + + /* FIXME check flags for GNOME_VFS_FILE_FLAGS_SYMLINK too ? */ + /* or GNOME_VFS_FILE_FLAGS_LOCAL */ + + file_ok = ( + (file_info->valid_fields + & (GNOME_VFS_FILE_INFO_FIELDS_TYPE | GNOME_VFS_FILE_INFO_FIELDS_SIZE)) + == (GNOME_VFS_FILE_INFO_FIELDS_TYPE | GNOME_VFS_FILE_INFO_FIELDS_SIZE) + ) + && (file_info->type == GNOME_VFS_FILE_TYPE_REGULAR) + && (file_info->size > 0); + + gnome_vfs_file_info_unref (file_info); + + if (!file_ok) + return; + dot_hidden_uri = gnome_vfs_uri_to_string (dot_hidden_vfs_uri, GNOME_VFS_URI_HIDE_NONE); gnome_vfs_uri_unref (dot_hidden_vfs_uri);
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil