This commit is contained in:
parent
899d799af9
commit
83c7901dd4
86
nautilus-330298-297983-fix-overlapping-desktop-icons.diff
Normal file
86
nautilus-330298-297983-fix-overlapping-desktop-icons.diff
Normal file
@ -0,0 +1,86 @@
|
||||
2007-08-10 Federico Mena Quintero <federico@novell.com>
|
||||
|
||||
Fix http://bugzilla.gnome.org/show_bug.cgi?id=330298 once again
|
||||
(desktop icons overlap when placing a volume icon, and in various
|
||||
other situations):
|
||||
|
||||
* libnautilus-private/nautilus-icon-container.c (icon_set_position):
|
||||
Clear icon->has_lazy_position, since the icon will be
|
||||
well-positioned once this function exits.
|
||||
(finish_adding_new_icons): Don't clear icon->has_lazy_position
|
||||
here, since it is now done in icon_set_position(). Emit the
|
||||
"icon-position-changed" signal so that the upstream code will save
|
||||
the final position for icons which were semi-positioned.
|
||||
(finish_adding_new_icons): Remember the original
|
||||
icon->has_lazy_position before calling assign_icon_position();
|
||||
later, if the icon was to be lazily positioned, add it to the
|
||||
semi_position_icons list. Previously we were ignoring
|
||||
semi-positioned icons when populating the placement grid; that's
|
||||
why overlaps would happen.
|
||||
|
||||
* src/file-manager/fm-icon-view.c (file_has_lazy_position): Also
|
||||
use lazy positioning for drives, not just volumes.
|
||||
|
||||
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
|
||||
index dbf1da5..7a17479 100644
|
||||
--- a/libnautilus-private/nautilus-icon-container.c
|
||||
+++ b/libnautilus-private/nautilus-icon-container.c
|
||||
@@ -298,6 +298,8 @@ icon_set_position (NautilusIcon *icon,
|
||||
int x1, y1, x2, y2;
|
||||
int container_x, container_y, container_width, container_height;
|
||||
|
||||
+ icon->has_lazy_position = FALSE;
|
||||
+
|
||||
if (icon->x == x && icon->y == y) {
|
||||
return;
|
||||
}
|
||||
@@ -5859,9 +5861,13 @@ finish_adding_new_icons (NautilusIconContainer *container)
|
||||
new_icons = g_list_reverse (new_icons);
|
||||
no_position_icons = semi_position_icons = NULL;
|
||||
for (p = new_icons; p != NULL; p = p->next) {
|
||||
+ gboolean had_lazy_position;
|
||||
+
|
||||
icon = p->data;
|
||||
+ had_lazy_position = icon->has_lazy_position;
|
||||
+
|
||||
if (assign_icon_position (container, icon)) {
|
||||
- if (!container->details->auto_layout && icon->has_lazy_position) {
|
||||
+ if (!container->details->auto_layout && had_lazy_position) {
|
||||
semi_position_icons = g_list_prepend (semi_position_icons, icon);
|
||||
}
|
||||
} else {
|
||||
@@ -5894,6 +5900,7 @@ finish_adding_new_icons (NautilusIconContainer *container)
|
||||
for (p = semi_position_icons; p != NULL; p = p->next) {
|
||||
NautilusIcon *icon;
|
||||
int x, y;
|
||||
+ NautilusIconPosition position;
|
||||
|
||||
icon = p->data;
|
||||
x = icon->x;
|
||||
@@ -5906,9 +5913,10 @@ finish_adding_new_icons (NautilusIconContainer *container)
|
||||
|
||||
placement_grid_mark_icon (grid, icon);
|
||||
|
||||
- /* ensure that next time we run this code, the formerly semi-positioned
|
||||
- * icons are treated as being positioned. */
|
||||
- icon->has_lazy_position = FALSE;
|
||||
+ position.x = icon->x;
|
||||
+ position.y = icon->y;
|
||||
+ g_signal_emit (container, signals[ICON_POSITION_CHANGED], 0,
|
||||
+ icon->data, &position);
|
||||
}
|
||||
|
||||
placement_grid_free (grid);
|
||||
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
|
||||
index 864382e..efff989 100644
|
||||
--- a/src/file-manager/fm-icon-view.c
|
||||
+++ b/src/file-manager/fm-icon-view.c
|
||||
@@ -538,7 +538,7 @@ file_has_lazy_position (FMDirectoryView *view,
|
||||
* icon we don't overlap that one. We don't do this in general though,
|
||||
* as it can cause icons moving around.
|
||||
*/
|
||||
- lazy_position = nautilus_file_has_volume (file);
|
||||
+ lazy_position = nautilus_file_has_volume (file) || nautilus_file_has_drive (file);
|
||||
if (lazy_position && fm_directory_view_get_loading (view)) {
|
||||
/* if volumes are loaded during directory load, don't mark them
|
||||
* as lazy. This is wrong for files that were mounted during user
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 10 23:42:02 CEST 2007 - federico@novell.com
|
||||
|
||||
- Added nautilus-330298-297983-fix-overlapping-desktop-icons.diff to
|
||||
fix https://bugzilla.novell.com/show_bug.cgi?id=297983 - desktop
|
||||
icons would overlap when inserting removable media, if the
|
||||
previously-saved location for the corresponding icon now has a
|
||||
different icon nearby.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 6 20:32:13 CEST 2007 - maw@suse.de
|
||||
|
||||
|
@ -15,7 +15,7 @@ BuildRequires: cdparanoia eel-devel fdupes gnome-common gnome-icon-theme gnome-
|
||||
License: GPL v2 or later
|
||||
Group: Productivity/File utilities
|
||||
Version: 2.19.6
|
||||
Release: 4
|
||||
Release: 6
|
||||
Summary: The GNOME 2.x Desktop File Manager
|
||||
Source: ftp://ftp.gnome.org/pub/gnome/sources/nautilus/2.16/%{name}-%{version}.tar.bz2
|
||||
URL: http://www.gnome.org
|
||||
@ -33,10 +33,9 @@ Patch10: nautilus-mime.patch
|
||||
Patch11: nautilus-158158-ignore-foreign-desktop-files.diff
|
||||
Patch12: nautilus-212649-search-bar-visibility.patch
|
||||
Patch13: nautilus-6014-network-servers-in-places-sidebar.diff
|
||||
# Patch14: nautilus-206369-desktop-icon-overlap.diff
|
||||
Patch15: nautilus-drives-and-volumes-on-desktop.diff
|
||||
# Patch16: nautilus-debug-log.diff
|
||||
Patch17: nautilus-181941-i18n.patch
|
||||
Patch18: nautilus-330298-297983-fix-overlapping-desktop-icons.diff
|
||||
Requires: gnome2-user-docs gnome-icon-theme
|
||||
Requires: %{name}-lang = %{version}
|
||||
Provides: nautilus2
|
||||
@ -84,10 +83,9 @@ gnome-patch-translation-prepare
|
||||
%patch11 -p1
|
||||
%patch12
|
||||
%patch13 -p1
|
||||
# %patch14 -p1
|
||||
%patch15 -p1
|
||||
# %patch16 -p0
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
gnome-patch-translation-update
|
||||
|
||||
%build
|
||||
@ -169,6 +167,12 @@ fi
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%changelog
|
||||
* Fri Aug 10 2007 - federico@novell.com
|
||||
- Added nautilus-330298-297983-fix-overlapping-desktop-icons.diff to
|
||||
fix https://bugzilla.novell.com/show_bug.cgi?id=297983 - desktop
|
||||
icons would overlap when inserting removable media, if the
|
||||
previously-saved location for the corresponding icon now has a
|
||||
different icon nearby.
|
||||
* Mon Aug 06 2007 - maw@suse.de
|
||||
- Split out -lang subpackage
|
||||
- Use %%fdupes.
|
||||
|
Loading…
Reference in New Issue
Block a user