[Nautilus-list] More merge
- From: Alex Larsson <alexl redhat com>
- To: <nautilus-list lists eazel com>, <darin bentspoon com>
- Subject: [Nautilus-list] More merge
- Date: Wed, 5 Sep 2001 17:51:11 -0400 (EDT)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.4751
diff -u -p -r1.4751 ChangeLog
--- ChangeLog 2001/09/05 17:12:10 1.4751
+++ ChangeLog 2001/09/05 21:50:06
@@ -1,3 +1,42 @@
+2001-09-05 Alex Larsson <alexl redhat com>
+
+ Merge some stuff from the redhat-outstanding-patches branch
+
+ * eazel-logos/default.xml:
+ * icons/default.xml:
+ don't hardcode the title, title info, and
+ shadow colors; this prevented the auto-color-selection stuff
+ in nautilus-sidebar-title.c from working properly.
+ And the hardcoded values were the same thing the autoselector
+ would have chosen anyhow.
+
+ * libnautilus-private/nautilus-monitor.c:
+ Don't monitor files on read only volumes, they never change, and
+ will keep cdroms from being unmounted because fam has open file
+ descriptors on them.
+
+ * libnautilus-private/nautilus-thumbnails.c:
+ Always look for local thumbnails first.
+
+ * libnautilus-private/nautilus-volume-monitor.[ch]:
+ Add nautilus_volume_is_read_only() and
+ nautilus_volume_monitor_get_volume_for_path()
+
+ * src/nautilus-desktop-window.c:
+ (set_wmspec_desktop_hint): function to set _NET_WM_WINDOW_TYPE, to
+ avoid confusing kwin so badly, and also to go ahead and support
+ the Window Manager Hints Of The Future.
+ (set_gdk_window_background): only set root background to a pixel
+ if we retrieved a pixel property
+ (map): Set background of our child widgets in addition to our
+ own background. This gets rid of the last of the ugliness during
+ Nautilus startup, I believe.
+
+ * src/file-manager/fm-icon-view.c:
+ Don't read GMC position meta data -- it is never right for nautilus,
+ due to different size icons, additional icons, different placement
+ policies, so falling back to normal automatic placement works better.
+
2001-09-04 Alex Larsson <alexl redhat com>
Merge some stuff from the redhat-outstanding-patches branch
Index: eazel-logos/default.xml
===================================================================
RCS file: /cvs/gnome/nautilus/eazel-logos/default.xml,v
retrieving revision 1.1
diff -u -p -r1.1 default.xml
--- eazel-logos/default.xml 2001/02/27 18:47:13 1.1
+++ eazel-logos/default.xml 2001/09/05 21:50:07
@@ -4,9 +4,6 @@
<sidebar sidebar_background_tile_image="./side_bar_image.png"
sidebar_background_color="rgb:4747/4A4A/7C7C-rgb:2222/2323/3A3A:h"
- title_color="rgb:FFFF/FFFF/FFFF"
- title_info_color="rgb:FFFF/FFFF/FFFF"
- title_shadow_color="rgb:0000/0000/0000"
tab_piece_images="sidebar_tab_pieces" combine="true"
left_offset="0" shadow_offset="1" text_h_offset="-4" label_color="rgb:FFFF/FFFF/FFFF"
tab_font="-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*" />
Index: icons/default.xml
===================================================================
RCS file: /cvs/gnome/nautilus/icons/default.xml,v
retrieving revision 1.22
diff -u -p -r1.22 default.xml
--- icons/default.xml 2001/02/28 06:08:56 1.22
+++ icons/default.xml 2001/09/05 21:50:07
@@ -4,9 +4,6 @@
<sidebar sidebar_background_tile_image="./side_bar_image.png"
sidebar_background_color="rgb:4747/4A4A/7C7C-rgb:2222/2323/3A3A:h"
- title_color="rgb:FFFF/FFFF/FFFF"
- title_info_color="rgb:FFFF/FFFF/FFFF"
- title_shadow_color="rgb:0000/0000/0000"
tab_piece_images="sidebar_tab_pieces" combine="true"
left_offset="0" shadow_offset="1" text_h_offset="-4" label_color="rgb:FFFF/FFFF/FFFF"
tab_font="-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*" />
Index: libnautilus-private/nautilus-monitor.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-monitor.c,v
retrieving revision 1.13
diff -u -p -r1.13 nautilus-monitor.c
--- libnautilus-private/nautilus-monitor.c 2001/07/12 16:07:45 1.13
+++ libnautilus-private/nautilus-monitor.c 2001/09/05 21:50:07
@@ -31,6 +31,7 @@
#ifdef HAVE_LIBFAM
#include "nautilus-file-changes-queue.h"
+#include "nautilus-volume-monitor.h"
#include <fam.h>
#include <gdk/gdk.h>
#include <gmodule.h>
@@ -232,6 +233,17 @@ nautilus_monitor_active (void)
#endif
}
+static gboolean
+path_is_on_readonly_volume (const char *path)
+{
+ NautilusVolumeMonitor *volume_monitor;
+ NautilusVolume *volume;
+
+ volume_monitor = nautilus_volume_monitor_get ();
+ volume = nautilus_volume_monitor_get_volume_for_path (volume_monitor, path);
+ return volume && nautilus_volume_is_read_only (volume);
+}
+
NautilusMonitor *
nautilus_monitor_file (const char *uri)
{
@@ -251,7 +263,16 @@ nautilus_monitor_file (const char *uri)
if (path == NULL) {
return NULL;
}
-
+
+ /* Check to see if the file system is readonly. If so, don't monitor --
+ * there is no point, and we'll just keep the file system busy for
+ * no reason, preventing unmounting
+ */
+ if (path_is_on_readonly_volume (path)) {
+ g_free (path);
+ return NULL;
+ }
+
monitor = g_new0 (NautilusMonitor, 1);
FAMMonitorFile (connection, path, &monitor->request, NULL);
@@ -283,6 +304,15 @@ nautilus_monitor_directory (const char *
return NULL;
}
+ /* Check to see if the file system is readonly. If so, don't monitor --
+ * there is no point, and we'll just keep the file system busy for
+ * no reason, preventing unmounting
+ */
+ if (path_is_on_readonly_volume (path)) {
+ g_free (path);
+ return NULL;
+ }
+
monitor = g_new0 (NautilusMonitor, 1);
FAMMonitorDirectory (connection, path, &monitor->request, NULL);
Index: libnautilus-private/nautilus-thumbnails.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-thumbnails.c,v
retrieving revision 1.28
diff -u -p -r1.28 nautilus-thumbnails.c
--- libnautilus-private/nautilus-thumbnails.c 2001/08/06 17:36:34 1.28
+++ libnautilus-private/nautilus-thumbnails.c 2001/09/05 21:50:07
@@ -94,7 +94,7 @@ uri_is_local (const char *uri)
is_local = gnome_vfs_uri_is_local (vfs_uri);
gnome_vfs_uri_unref (vfs_uri);
- return is_local;
+ return is_local;
}
static gboolean
@@ -327,7 +327,7 @@ nautilus_get_thumbnail_uri (NautilusFile
file_uri = nautilus_file_get_uri (file);
- thumbnail_uri = make_thumbnail_uri (file_uri, FALSE, uri_is_local (file_uri), TRUE);
+ thumbnail_uri = make_thumbnail_uri (file_uri, FALSE, TRUE, TRUE);
/* if the thumbnail file already exists locally, simply return the uri */
Index: libnautilus-private/nautilus-volume-monitor.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-volume-monitor.c,v
retrieving revision 1.98
diff -u -p -r1.98 nautilus-volume-monitor.c
--- libnautilus-private/nautilus-volume-monitor.c 2001/08/16 22:46:04 1.98
+++ libnautilus-private/nautilus-volume-monitor.c 2001/09/05 21:50:07
@@ -157,7 +157,9 @@ struct NautilusVolume {
char *device_path;
char *mount_path;
char *volume_name;
-
+ dev_t device;
+
+ gboolean is_read_only;
gboolean is_removable;
gboolean is_audio_cd;
};
@@ -419,6 +421,13 @@ nautilus_volume_is_removable (const Naut
return volume->is_removable;
}
+gboolean
+nautilus_volume_is_read_only (const NautilusVolume *volume)
+{
+ return volume->is_read_only;
+}
+
+
/* nautilus_volume_monitor_get_removable_volumes
*
* Accessor. List and internal data is not to be freed.
@@ -430,7 +439,40 @@ nautilus_volume_monitor_get_removable_vo
return monitor->details->removable_volumes;
}
+/**
+ * nautilus_volume_monitor_get_volume_for_path:
+ * @path: a local filesystem path
+ *
+ * Find the volume in which @path resides.
+ *
+ * Return value: a NautilusVolume for @path, or %NULL if the operation
+ * fails, probably because stat() fails on @path.
+ *
+ **/
+NautilusVolume *
+nautilus_volume_monitor_get_volume_for_path (NautilusVolumeMonitor *monitor,
+ const char *path)
+{
+ struct stat statbuf;
+ dev_t device;
+ GList *p;
+ NautilusVolume *volume;
+
+ if (stat (path, &statbuf) != 0)
+ return NULL;
+
+ device = statbuf.st_dev;
+
+ for (p = monitor->details->mounts; p != NULL; p = p->next) {
+ volume = (NautilusVolume *) p->data;
+ if (volume->device == device)
+ return volume;
+ }
+
+ return NULL;
+}
+
#if defined (HAVE_GETMNTINFO) || defined (HAVE_MNTENT_H) || defined (SOLARIS_MNT)
static gboolean
@@ -876,11 +918,34 @@ get_mount_list (NautilusVolumeMonitor *m
#else /* !SOLARIS_MNT */
+static gboolean
+option_list_has_option (const char *optlist,
+ const char *option)
+{
+ gboolean retval = FALSE;
+ char **options;
+ int i;
+
+ options = g_strsplit (optlist, ",", -1);
+
+ for (i = 0; options[i]; i++) {
+ if (!strcmp (options[i], option)) {
+ retval = TRUE;
+ break;
+ }
+ }
+
+ g_strfreev (options);
+
+ return retval;
+}
+
static GList *
get_mount_list (NautilusVolumeMonitor *monitor)
{
GList *volumes;
NautilusVolume *volume;
+ static time_t last_mtime = 0;
static FILE *fh = NULL;
const char *file_name;
const char *separator;
@@ -888,6 +953,7 @@ get_mount_list (NautilusVolumeMonitor *m
char device_name[sizeof (line)];
EelStringList *list;
char *device_path, *mount_path, *file_system_type_name;
+ struct stat sb;
volumes = NULL;
@@ -898,6 +964,26 @@ get_mount_list (NautilusVolumeMonitor *m
file_name = "/proc/mounts";
separator = " ";
}
+
+ /* Returning NULL from this function oddly enough keeps the current
+ * mount list. Go figure.
+ */
+
+
+ /* /proc/mounts mtime never changes, so stat /etc/mtab.
+ * Isn't this lame?
+ */
+ if (stat ("/etc/mtab", &sb) < 0) {
+ g_warning ("Unable to stat %s: %s", file_name,
+ g_strerror (errno));
+ return NULL;
+ }
+
+ if (sb.st_mtime <= last_mtime) {
+ return NULL;
+ }
+
+ last_mtime = sb.st_mtime;
if (fh == NULL) {
fh = fopen (file_name, "r");
@@ -905,7 +991,7 @@ get_mount_list (NautilusVolumeMonitor *m
g_warning ("Unable to open %s: %s", file_name, strerror (errno));
return NULL;
}
- } else {
+ } else {
rewind (fh);
}
@@ -927,8 +1013,12 @@ get_mount_list (NautilusVolumeMonitor *m
mount_path = eel_string_list_nth (list, 1);
file_system_type_name = eel_string_list_nth (list, 2);
volume = create_volume (device_path, mount_path);
+ if (eel_string_list_get_length (list) >= 4 &&
+ option_list_has_option (eel_string_list_nth (list, 3), MNTOPT_RO))
+ volume->is_read_only = TRUE;
volumes = finish_creating_volume_and_prepend
(monitor, volume, file_system_type_name, volumes);
+
g_free (device_path);
g_free (mount_path);
g_free (file_system_type_name);
@@ -1540,7 +1630,8 @@ copy_volume (const NautilusVolume *volum
new_volume->device_path = g_strdup (volume->device_path);
new_volume->mount_path = g_strdup (volume->mount_path);
new_volume->volume_name = g_strdup (volume->volume_name);
-
+ new_volume->device = volume->device;
+
new_volume->is_removable = volume->is_removable;
new_volume->is_audio_cd = volume->is_audio_cd;
@@ -1595,6 +1686,7 @@ finish_creating_volume (NautilusVolumeMo
{
gboolean ok;
const char *name;
+ struct stat statbuf;
volume->file_system_type = g_hash_table_lookup
(monitor->details->file_system_table, file_system_type_name);
@@ -1614,6 +1706,9 @@ finish_creating_volume (NautilusVolumeMo
if (!ok) {
return FALSE;
}
+
+ if (stat (volume->mount_path, &statbuf) == 0)
+ volume->device = statbuf.st_dev;
/* Identify device type */
if (eel_str_has_prefix (volume->mount_path, "/mnt/")) {
Index: libnautilus-private/nautilus-volume-monitor.h
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-volume-monitor.h,v
retrieving revision 1.34
diff -u -p -r1.34 nautilus-volume-monitor.h
--- libnautilus-private/nautilus-volume-monitor.h 2001/08/15 21:03:59 1.34
+++ libnautilus-private/nautilus-volume-monitor.h 2001/09/05 21:50:07
@@ -87,11 +87,14 @@ char * nautilus_volume
void nautilus_volume_monitor_set_volume_name (NautilusVolumeMonitor *monitor,
const NautilusVolume *volume,
const char *volume_name);
+NautilusVolume *nautilus_volume_monitor_get_volume_for_path (NautilusVolumeMonitor *monitor,
+ const char *path);
/* Volume operations. */
char * nautilus_volume_get_name (const NautilusVolume *volume);
NautilusDeviceType nautilus_volume_get_device_type (const NautilusVolume *volume);
gboolean nautilus_volume_is_removable (const NautilusVolume *volume);
+gboolean nautilus_volume_is_read_only (const NautilusVolume *volume);
gboolean nautilus_volume_should_integrate_trash (const NautilusVolume *volume);
const char * nautilus_volume_get_mount_path (const NautilusVolume *volume);
char * nautilus_volume_get_target_uri (const NautilusVolume *volume);
Index: src/nautilus-desktop-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-desktop-window.c,v
retrieving revision 1.38
diff -u -p -r1.38 nautilus-desktop-window.c
--- src/nautilus-desktop-window.c 2001/07/10 23:55:17 1.38
+++ src/nautilus-desktop-window.c 2001/09/05 21:50:07
@@ -39,6 +39,7 @@
#include <libnautilus-private/nautilus-link.h>
#include <X11/Xatom.h>
#include <gdk/gdkx.h>
+#include <gtk/gtklayout.h>
struct NautilusDesktopWindowDetails {
GList *unref_list;
@@ -48,8 +49,12 @@ static void nautilus_desktop_window_init
static void nautilus_desktop_window_initialize (NautilusDesktopWindow *window);
static void destroy (GtkObject *object);
static void realize (GtkWidget *widget);
+static void map (GtkWidget *widget);
static void real_add_current_location_to_history_list (NautilusWindow *window);
+
+static void set_wmspec_desktop_hint (GdkWindow *window);
+
EEL_DEFINE_CLASS_BOILERPLATE (NautilusDesktopWindow, nautilus_desktop_window, NAUTILUS_TYPE_WINDOW)
static void
@@ -57,6 +62,7 @@ nautilus_desktop_window_initialize_class
{
GTK_OBJECT_CLASS (klass)->destroy = destroy;
GTK_WIDGET_CLASS (klass)->realize = realize;
+ GTK_WIDGET_CLASS (klass)->map = map;
NAUTILUS_WINDOW_CLASS (klass)->add_current_location_to_history_list
= real_add_current_location_to_history_list;
}
@@ -170,15 +176,114 @@ destroy (GtkObject *object)
}
static void
-realize (GtkWidget *widget)
+set_gdk_window_background (GdkWindow *window,
+ gboolean have_pixel,
+ Pixmap pixmap,
+ gulong pixel)
{
- NautilusDesktopWindow *window;
+ Window w;
+
+ w = GDK_WINDOW_XWINDOW (window);
+
+ if (pixmap != None)
+ XSetWindowBackgroundPixmap (GDK_DISPLAY (), w,
+ pixmap);
+ else if (have_pixel)
+ XSetWindowBackground (GDK_DISPLAY (), w,
+ pixel);
+ else
+ XSetWindowBackgroundPixmap (GDK_DISPLAY (), w,
+ None);
+}
+
+static void
+set_window_background (GtkWidget *widget,
+ gboolean already_have_root_bg,
+ gboolean have_pixel,
+ Pixmap pixmap,
+ gulong pixel)
+{
GdkAtom type;
gulong nitems, bytes_after;
gint format;
guchar *data;
- gboolean have_set_background;
- Window w;
+
+ /* Set the background to show the root window to avoid a flash that
+ * would otherwise occur.
+ */
+
+ if (GTK_IS_WINDOW (widget))
+ gtk_widget_set_app_paintable (widget, TRUE);
+
+ if (!already_have_root_bg) {
+ have_pixel = FALSE;
+ already_have_root_bg = TRUE;
+
+ /* We want to do this round-trip-to-server work only
+ * for the first invocation, not on recursions
+ */
+
+ XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
+ gdk_atom_intern ("_XROOTPMAP_ID", FALSE),
+ 0L, 1L, False, XA_PIXMAP,
+ &type, &format, &nitems, &bytes_after,
+ &data);
+
+ if (type == XA_PIXMAP) {
+ if (format == 32 && nitems == 1 && bytes_after == 0) {
+ pixmap = *(Pixmap *) data;
+ }
+
+ XFree (data);
+ }
+
+ if (pixmap == None) {
+ XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
+ gdk_atom_intern ("_XROOTCOLOR_PIXEL", FALSE),
+ 0L, 1L, False, AnyPropertyType,
+ &type, &format, &nitems, &bytes_after,
+ &data);
+
+ if (type != None) {
+ if (format == 32 && nitems == 1 && bytes_after == 0) {
+ pixel = *(gulong *) data;
+ have_pixel = TRUE;
+ }
+
+ XFree (data);
+ }
+ }
+ }
+
+ set_gdk_window_background (widget->window,
+ have_pixel, pixmap, pixel);
+
+ /* Recurse to child widget (assumes we already chained up and
+ * realized child widget)
+ */
+ if (GTK_IS_BIN (widget) &&
+ GTK_BIN (widget)->child) {
+ /* Ensure we're realized */
+ gtk_widget_realize (GTK_BIN (widget)->child);
+
+ set_window_background (GTK_BIN (widget)->child,
+ already_have_root_bg, have_pixel,
+ pixmap, pixel);
+ }
+
+ /* For both parent and child, if it's a layout then set on the
+ * bin window as well.
+ */
+ if (GTK_IS_LAYOUT (widget))
+ set_gdk_window_background (GTK_LAYOUT (widget)->bin_window,
+ have_pixel,
+ pixmap, pixel);
+}
+
+static void
+realize (GtkWidget *widget)
+{
+ NautilusDesktopWindow *window;
window = NAUTILUS_DESKTOP_WINDOW (widget);
@@ -189,6 +294,12 @@ realize (GtkWidget *widget)
/* Do the work of realizing. */
EEL_CALL_PARENT (GTK_WIDGET_CLASS, realize, (widget));
+ /* This is the new way to set up the desktop window */
+ set_wmspec_desktop_hint (widget->window);
+
+ /* FIXME all this gnome_win_hints stuff is legacy cruft */
+
+ /* FIXME the following FIXME is bogus, we aren't mapped yet. */
/* FIXME bugzilla.eazel.com 1253:
* Looking at the gnome_win_hints implementation,
* it looks like you can call these with an unmapped window,
@@ -199,7 +310,7 @@ realize (GtkWidget *widget)
/* Put this window behind all the others. */
gnome_win_hints_set_layer (widget, WIN_LAYER_DESKTOP);
-
+
/* Make things like the task list ignore this window and make
* it clear that it it's at its full size.
*
@@ -232,56 +343,6 @@ realize (GtkWidget *widget)
gdk_screen_width (),
gdk_screen_height ());
- /* Set the background to show the root window to avoid a flash that
- * would otherwise occur.
- */
- have_set_background = FALSE;
-
- gtk_widget_set_app_paintable (widget, TRUE);
- w = GDK_WINDOW_XWINDOW (widget->window);
- XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
- gdk_atom_intern ("_XROOTPMAP_ID", FALSE),
- 0L, 1L, False, XA_PIXMAP,
- &type, &format, &nitems, &bytes_after,
- &data);
-
- if (type == XA_PIXMAP) {
- if (format == 32 && nitems == 1 && bytes_after == 0) {
- gdk_error_trap_push ();
- XSetWindowBackgroundPixmap (GDK_DISPLAY (), w,
- *(Pixmap *)data);
- gdk_flush ();
- if (!gdk_error_trap_pop ())
- have_set_background = TRUE;
- }
-
- XFree (data);
- }
-
- if (!have_set_background) {
- XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
- gdk_atom_intern ("_XROOTCOLOR_PIXEL", FALSE),
- 0L, 1L, False, AnyPropertyType,
- &type, &format, &nitems, &bytes_after,
- &data);
-
- if (type != None) {
- if (format == 32 && nitems == 1 && bytes_after == 0) {
- XSetWindowBackground (GDK_DISPLAY (), w,
- *(gulong *)data);
- have_set_background = TRUE;
- }
-
- XFree (data);
- }
- }
-
- if (!have_set_background) {
- XSetWindowBackgroundPixmap (GDK_DISPLAY (), w,
- None);
- }
-
-
/* Get rid of the things that window managers add to resize
* and otherwise manipulate the window.
*/
@@ -290,9 +351,40 @@ realize (GtkWidget *widget)
}
static void
+map (GtkWidget *widget)
+{
+ NautilusDesktopWindow *window;
+
+ window = NAUTILUS_DESKTOP_WINDOW (widget);
+
+ set_window_background (widget, FALSE, FALSE, None, 0);
+
+ /* Chain up to realize our children */
+ EEL_CALL_PARENT (GTK_WIDGET_CLASS, map, (widget));
+}
+
+static void
real_add_current_location_to_history_list (NautilusWindow *window)
{
/* Do nothing. The desktop window's location should not
* show up in the history list.
*/
+}
+
+static void
+set_wmspec_desktop_hint (GdkWindow *window)
+{
+ Atom atom;
+
+ atom = XInternAtom (gdk_display,
+ "_NET_WM_WINDOW_TYPE_DESKTOP",
+ False);
+
+ XChangeProperty (GDK_WINDOW_XDISPLAY (window),
+ GDK_WINDOW_XWINDOW (window),
+ XInternAtom (gdk_display,
+ "_NET_WM_WINDOW_TYPE",
+ False),
+ XA_ATOM, 32, PropModeReplace,
+ (guchar *)&atom, 1);
}
Index: src/file-manager/fm-icon-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-icon-view.c,v
retrieving revision 1.210
diff -u -p -r1.210 fm-icon-view.c
--- src/file-manager/fm-icon-view.c 2001/09/04 21:16:09 1.210
+++ src/file-manager/fm-icon-view.c 2001/09/05 21:50:07
@@ -283,9 +283,6 @@ get_stored_icon_position_callback (Nauti
char *position_string, *scale_string;
gboolean position_good, scale_good;
char *locale;
- char *path, *uri;
- int res, size;
- char *buf;
g_assert (NAUTILUS_IS_ICON_CONTAINER (container));
g_assert (NAUTILUS_IS_FILE (file));
@@ -310,25 +307,6 @@ get_stored_icon_position_callback (Nauti
/* If it is the desktop directory, maybe the gnome-libs metadata has information about it */
- if (!position_good) {
- if (nautilus_file_is_local (file) && nautilus_file_is_in_desktop (file)) {
- uri = nautilus_file_get_uri (file);
- path = gnome_vfs_get_local_path_from_uri (uri);
-
- if (path != NULL) {
- res = gnome_metadata_get (path, "icon-position", &size, &buf);
- if (res == 0) {
- if (sscanf (buf, "%d%d", &position->x, &position->y) == 2) {
- position_good = TRUE;
- }
- g_free (buf);
- }
- }
- g_free (path);
- g_free (uri);
- }
- }
-
/* Get the scale of the icon from the metadata. */
scale_string = nautilus_file_get_metadata
(file, NAUTILUS_METADATA_KEY_ICON_SCALE, "1");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]