[PATCH] rename looses focus after directory change
- From: Nelson Benítez <gnel cenobioracing com>
- To: nautilus-list gnome org
- Subject: [PATCH] rename looses focus after directory change
- Date: Tue, 28 Nov 2006 22:32:38 +0000
Hi, I've put a patch for http://bugs.gnome.org/318373 , which is just
extending for icon view what was done for list view in
http://bugs.gnome.org/87701 , because icon view suffers the same problem
when you're renaming and files are added/removed in that directory...
Patch attached.
--- libnautilus-private/nautilus-icon-container.c 2006-11-26 15:33:53.000000000 +0000
+++ libnautilus-private/nautilus-icon-container.c 2006-11-26 15:39:55.000000000 +0000
@@ -34,6 +34,7 @@
#include "nautilus-icon-private.h"
#include "nautilus-lib-self-check-functions.h"
#include "nautilus-marshal.h"
+#include "../src/file-manager/fm-icon-container.h"
#include <atk/atkaction.h>
#include <eel/eel-accessibility.h>
#include <eel/eel-background.h>
@@ -6791,6 +6792,7 @@ nautilus_icon_container_start_renaming_s
const char *editable_text;
int x, y, width;
int start_offset, end_offset;
+ FMIconView *icon_view;
/* Check if it already in renaming mode. */
details = container->details;
@@ -6823,6 +6825,10 @@ nautilus_icon_container_start_renaming_s
}
details->original_text = g_strdup (editable_text);
+
+ /* Freeze updates so files added while renaming don't cause rename to loose focus, bug #318373 */
+ icon_view = ((FMIconContainer *)container)->view;
+ fm_directory_view_freeze_updates (FM_DIRECTORY_VIEW (icon_view));
/* Create text renaming widget, if it hasn't been created already.
* We deal with the broken icon text item widget by keeping it around
@@ -6908,6 +6914,7 @@ end_renaming_mode (NautilusIconContainer
{
NautilusIcon *icon;
const char *changed_text;
+ FMIconView *icon_view;
set_pending_icon_to_rename (container, NULL);
@@ -6919,6 +6926,9 @@ end_renaming_mode (NautilusIconContainer
/* We are not in renaming mode */
container->details->renaming = FALSE;
nautilus_icon_canvas_item_set_renaming (icon->item, FALSE);
+
+ icon_view = ((FMIconContainer *)container)->view;
+ fm_directory_view_unfreeze_updates (FM_DIRECTORY_VIEW(icon_view));
if (commit) {
set_pending_icon_to_reveal (container, icon);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]