From 7dc88d798915b86b46bf5b31612bcc176d81155aa942a91ffd227879864e23c1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 16 Mar 2007 09:12:56 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nautilus?expand=0&rev=5 --- nautilus-181941-i18n.patch | 11 +- nautilus-2.16.1.tar.bz2 | 3 - nautilus-2.17.91.tar.bz2 | 3 + nautilus-206369-desktop-icon-overlap.diff | 180 -- nautilus-debug-log.diff | 1592 ----------------- ...zoom-control-and-view-as-option-menu.patch | 14 +- nautilus.changes | 11 + nautilus.spec | 23 +- 8 files changed, 44 insertions(+), 1793 deletions(-) delete mode 100644 nautilus-2.16.1.tar.bz2 create mode 100644 nautilus-2.17.91.tar.bz2 delete mode 100644 nautilus-206369-desktop-icon-overlap.diff delete mode 100644 nautilus-debug-log.diff diff --git a/nautilus-181941-i18n.patch b/nautilus-181941-i18n.patch index e7025e7..3488f5b 100644 --- a/nautilus-181941-i18n.patch +++ b/nautilus-181941-i18n.patch @@ -1,11 +1,12 @@ -diff -ur nautilus-2.16.1/src/nautilus-property-browser.c nautilus-2.16.1.fixed/src/nautilus-property-browser.c ---- nautilus-2.16.1/src/nautilus-property-browser.c 2006-06-16 11:04:09.000000000 -0400 -+++ nautilus-2.16.1.fixed/src/nautilus-property-browser.c 2007-01-08 11:58:42.000000000 -0500 -@@ -1829,7 +1829,7 @@ +Index: nautilus-2.17.91/src/nautilus-property-browser.c +=================================================================== +--- nautilus-2.17.91.orig/src/nautilus-property-browser.c ++++ nautilus-2.17.91/src/nautilus-property-browser.c +@@ -1865,7 +1865,7 @@ add_reset_property (NautilusPropertyBrow g_free (reset_image_file_name); -- reset_image = labeled_image_new ("Reset", reset_chit, RESET_IMAGE_NAME, PANGO_SCALE_MEDIUM); +- reset_image = labeled_image_new (_("Reset"), reset_chit != NULL ? reset_chit : reset_pixbuf, RESET_IMAGE_NAME, PANGO_SCALE_MEDIUM); + reset_image = labeled_image_new (_("Reset"), reset_chit, RESET_IMAGE_NAME, PANGO_SCALE_MEDIUM); gtk_container_add (GTK_CONTAINER (property_browser->details->content_table), reset_image); eel_wrap_table_reorder_child (EEL_WRAP_TABLE (property_browser->details->content_table), diff --git a/nautilus-2.16.1.tar.bz2 b/nautilus-2.16.1.tar.bz2 deleted file mode 100644 index 781d5ed..0000000 --- a/nautilus-2.16.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48818f5e2c9e981a6c75a61e462ac4050f7ffbf1c620a62fd7b3e57669484e37 -size 4258919 diff --git a/nautilus-2.17.91.tar.bz2 b/nautilus-2.17.91.tar.bz2 new file mode 100644 index 0000000..4efced3 --- /dev/null +++ b/nautilus-2.17.91.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:434f6e9c154bfbc7b44d6d79dcda626ed59b17b274aad81c4751678451618503 +size 4305866 diff --git a/nautilus-206369-desktop-icon-overlap.diff b/nautilus-206369-desktop-icon-overlap.diff deleted file mode 100644 index 0dd1af2..0000000 --- a/nautilus-206369-desktop-icon-overlap.diff +++ /dev/null @@ -1,180 +0,0 @@ -2006-10-31 Federico Mena Quintero - - http://bugzilla.gnome.org/show_bug.cgi?id=330298 - - Fix the use of lazy positioning, and the saving of metadata for - lazily-positioned icons. Fixes - https://bugzilla.novell.com/show_bug.cgi?id=155337 and - https://bugzilla.novell.com/show_bug.cgi?id=174766. - - * src/file-manager/fm-icon-view.c (file_has_lazy_position): Only - desktop icon files (not "real" files) have lazy positions. Don't - consider whether the directory is loading; this is not the right - place to check that. - (fm_icon_view_begin_loading): Tell the icon container that we - just started reloading. - (fm_icon_view_end_loading): Tell the icon container that we - finished loading. - - * libnautilus-private/nautilus-icon-private.h - (NautilusIconContainerDetails): New flag "is_reloading". - - * libnautilus-private/nautilus-icon-container.h: New prototype for - nautilus_icon_container_set_is_reloading(). - - * libnautilus-private/nautilus-icon-container.c - (nautilus_icon_container_set_is_reloading): New function; sets an - is_reloading flag in the icon container. - (icon_set_position): Clear icon->has_lazy_position, since the icon - will be well-positioned once this function exits. - (finish_adding_new_icons): Do not ignore already-placed lazy - position icons when filling the placement grid! Save the value of - icon->has_lazy_position before calling assign_icon_position(). - Since that function may call icon_set_position() (which will clear - the flag), we need to keep the original value of the flag. - (finish_adding_new_icons): Don't clear icon->has_lazy_position - here; let icon_set_position() do it. - (finish_adding_new_icons): Emit the icon_position_changed signal - so that the parent knows that we moved an icon under it. This has - the effect of updating/preserving the position metadata for - has_lazy_position icons. - ---- nautilus/src/file-manager/fm-icon-view.c~ 2006-08-29 03:04:42.000000000 -0500 -+++ nautilus/src/file-manager/fm-icon-view.c 2006-10-31 17:46:27.000000000 -0600 -@@ -512,22 +512,12 @@ static gboolean - file_has_lazy_position (FMDirectoryView *view, - NautilusFile *file) - { -- gboolean lazy_position; -- - /* For volumes (i.e. cdrom icon) we use lazy positioning so that when - * an old cdrom gets re-mounted in a place that now has another -- * icon we don't overlap that one. We don't do this in general though, -- * as it can cause icons moving around. -+ * icon we don't overlap that one. - */ -- lazy_position = nautilus_file_has_volume (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 -- * log-off, but it is right for files that were mounted during login. */ -- lazy_position = FALSE; -- } - -- return lazy_position; -+ return NAUTILUS_IS_DESKTOP_ICON_FILE (file); - } - - static void -@@ -1073,6 +1063,8 @@ fm_icon_view_begin_loading (FMDirectoryV - file = fm_directory_view_get_directory_as_file (view); - icon_container = GTK_WIDGET (get_icon_container (icon_view)); - -+ nautilus_icon_container_set_is_reloading (NAUTILUS_ICON_CONTAINER (icon_container), TRUE); -+ - nautilus_icon_container_set_allow_moves (NAUTILUS_ICON_CONTAINER (icon_container), - fm_directory_view_get_allow_moves (view)); - -@@ -1147,6 +1139,7 @@ fm_icon_view_end_loading (FMDirectoryVie - FMIconView *icon_view; - - icon_view = FM_ICON_VIEW (view); -+ nautilus_icon_container_set_is_reloading (get_icon_container (icon_view), FALSE); - } - - static NautilusZoomLevel ---- nautilus-2.15.4/libnautilus-private/nautilus-icon-container.h -+++ nautilus-2.15.4/libnautilus-private/nautilus-icon-container.h -@@ -228,6 +228,8 @@ - NautilusIconData *data); - - /* control the layout */ -+void nautilus_icon_container_set_is_reloading (NautilusIconContainer *container, -+ gboolean is_reloading); - gboolean nautilus_icon_container_is_auto_layout (NautilusIconContainer *container); - void nautilus_icon_container_set_auto_layout (NautilusIconContainer *container, - gboolean auto_layout); ---- nautilus/libnautilus-private/nautilus-icon-container.c.orig 2006-10-31 17:58:43.000000000 -0600 -+++ nautilus/libnautilus-private/nautilus-icon-container.c 2006-10-31 18:00:47.000000000 -0600 -@@ -288,6 +288,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; - } -@@ -348,7 +350,7 @@ icon_set_position (NautilusIcon *icon, - if (icon->y == ICON_UNPOSITIONED_VALUE) { - icon->y = 0; - } -- -+ - eel_canvas_item_move (EEL_CANVAS_ITEM (icon->item), - x - icon->x, - y - icon->y); -@@ -5708,9 +5710,13 @@ finish_adding_new_icons (NautilusIconCon - new_icons = g_list_reverse (new_icons); - no_position_icons = semi_position_icons = NULL; - for (p = new_icons; p != NULL; p = p->next) { -+ gboolean has_lazy_position; -+ - icon = p->data; -+ has_lazy_position = icon->has_lazy_position; -+ - if (assign_icon_position (container, icon)) { -- if (!container->details->auto_layout && icon->has_lazy_position) { -+ if (!container->details->is_reloading && !container->details->auto_layout && has_lazy_position) { - semi_position_icons = g_list_prepend (semi_position_icons, icon); - } - } else { -@@ -5743,6 +5749,7 @@ finish_adding_new_icons (NautilusIconCon - for (p = semi_position_icons; p != NULL; p = p->next) { - NautilusIcon *icon; - int x, y; -+ NautilusIconPosition position; - - icon = p->data; - x = icon->x; -@@ -5755,9 +5762,10 @@ finish_adding_new_icons (NautilusIconCon - - 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); -@@ -6657,6 +6665,15 @@ nautilus_icon_container_sort (NautilusIc - } - } - -+void -+nautilus_icon_container_set_is_reloading (NautilusIconContainer *container, -+ gboolean is_reloading) -+{ -+ g_return_if_fail (NAUTILUS_IS_ICON_CONTAINER (container)); -+ -+ container->details->is_reloading = is_reloading; -+} -+ - gboolean - nautilus_icon_container_is_auto_layout (NautilusIconContainer *container) - { ---- nautilus-2.15.4/libnautilus-private/nautilus-icon-private.h -+++ nautilus-2.15.4/libnautilus-private/nautilus-icon-private.h -@@ -253,6 +253,8 @@ - guint a11y_item_action_idle_handler; - GQueue* a11y_item_action_queue; - -+ eel_boolean_bit is_reloading : 1; -+ - /* interactive search */ - gboolean disable_popdown; - gboolean imcontext_changed; diff --git a/nautilus-debug-log.diff b/nautilus-debug-log.diff deleted file mode 100644 index 7bdf6ee..0000000 --- a/nautilus-debug-log.diff +++ /dev/null @@ -1,1592 +0,0 @@ -2006-10-23 Federico Mena Quintero - - * libnautilus-private/nautilus-debug-log.h - (NAUTILUS_DEBUG_LOG_DOMAIN_GLOG): New domain for GLog messages. - We'll spit the messages that come from GLog as milestone events. - - * src/nautilus-main.c (setup_debug_log): New function; set up - everything here. - (setup_debug_log_glog): New function. Override the default - handler for GLog so that its messages will also appear as - milestone events in our own debug log. - -2006-10-16 Federico Mena Quintero - - * src/file-manager/fm-directory-view.c (files_added_callback): Log - when files are added to the view. - (files_changed_callback): Log when files get changed in the view. - (fm_directory_view_notify_selection_changed): Log when the - selection changes. - - * src/nautilus-main.c (setup_debug_log_domains): Add - NAUTILUS_DEBUG_LOG_DOMAIN_ASYNC to the list of enabled log domains. - - * libnautilus-private/nautilus-debug-log.h: New prototype for - nautilus_debug_log_with_file_list(). - - * libnautilus-private/nautilus-debug-log.c - (nautilus_debug_log_with_file_list): New function; takes a GList - of NautilusFile. - -2006-10-03 Federico Mena Quintero - - * libnautilus-private/nautilus-debug-log.c (nautilus_debug_logv): - Deal with URI lists optionally. - (nautilus_debug_log_with_uri_list): New function. - - * libnautilus-private/nautilus-icon-dnd.c - (receive_dropped_color): Log when a color is dropped. - (receive_dropped_tile_image): Log when a tile image is dropped. - - * libnautilus-private/nautilus-icon-container.c - (motion_notify_event): Log when a drag begins. - (button_release_event): Log when a drag ends. - - * libnautilus-private/nautilus-file-operations.c - (nautilus_file_operations_copy_move): Log move/copy/link actions. - (nautilus_file_operations_new_folder): Log when a folder is created. - (nautilus_file_operations_new_file_from_template): Log when a file - is created from a template. - (nautilus_file_operations_new_file): Log when a file is created. - (nautilus_file_operations_delete): Log when files are deleted. - (do_empty_trash): Log when the trash is emptied. - -2006-09-22 Federico Mena Quintero - - * libnautilus-private/nautilus-debug-log.[ch]: New files with a - simple logging infrastructure based on a ring buffer. - - * libnautilus-private/Makefile.am - (libnautilus_private_la_SOURCES): Added nautilus-debug-log.[ch]. - - * src/nautilus-main.c (main): Make SIGUSR1 dump the debug log to - ~/nautilus-debug-log.txt. - - * src/file-manager/fm-directory-view.c - (fm_directory_view_activate_files): Log the action of activating a - file. - (open_location): Likewise. - (fm_directory_view_launch_application): Likewise, for launching an - application. - (action_new_launcher_callback): Likewise, for creating a launcher. - (activate_callback): Log the various actions that can happen here. - - * src/file-manager/fm-tree-view.c (got_activation_uri_callback): - Log the various activations/launches that can happen. - - * src/nautilus-places-sidebar.c (row_activated_callback): Log the - action of the user activating something in the Places sidebar. - - * src/nautilus-window-manage-views.c - (nautilus_window_open_location_full): Log the action of changing - the location in a window. - (nautilus_window_set_content_view): Log the action of thanging the - view of a window. - (end_location_change): Log when the window finishes loading. - - * src/file-manager/fm-list-view.c (row_expanded_callback): Log the - action of expanding a row to load a subdirectory. - (row_collapsed_callback): Likewise, for collapsing a row. - - * src/file-manager/fm-error-reporting.c (fm_rename_file): Log the - action of renaming a file. - - * src/nautilus-application.c - (nautilus_application_present_spatial_window_with_selection): Log - when new or existing spatial windows get presented. - (nautilus_application_create_navigation_window): Log when a - navigation window gets created. - ---- /dev/null 2006-10-03 05:17:45.000000000 -0500 -+++ libnautilus-private/nautilus-debug-log.h 2006-10-23 18:51:36.000000000 -0500 -@@ -0,0 +1,56 @@ -+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- -+ -+ nautilus-debug-log.h: Ring buffer for logging debug messages -+ -+ Copyright (C) 2006 Novell, Inc. -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of the GNU General Public License as -+ published by the Free Software Foundation; either version 2 of the -+ License, or (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public -+ License along with this program; if not, write to the -+ Free Software Foundation, Inc., 59 Temple Place - Suite 330, -+ Boston, MA 02111-1307, USA. -+ -+ Author: Federico Mena-Quintero -+*/ -+ -+#ifndef NAUTILUS_DEBUG_LOG_H -+#define NAUTILUS_DEBUG_LOG_H -+ -+#include -+ -+#define NAUTILUS_DEBUG_LOG_DOMAIN_USER "USER" /* always enabled */ -+#define NAUTILUS_DEBUG_LOG_DOMAIN_ASYNC "async" /* when asynchronous notifications come in */ -+#define NAUTILUS_DEBUG_LOG_DOMAIN_GLOG "GLog" /* used for GLog messages; don't use it yourself */ -+ -+void nautilus_debug_log (gboolean is_milestone, const char *domain, const char *format, ...); -+ -+void nautilus_debug_log_with_uri_list (gboolean is_milestone, const char *domain, const GList *uris, -+ const char *format, ...); -+void nautilus_debug_log_with_file_list (gboolean is_milestone, const char *domain, GList *files, -+ const char *format, ...); -+ -+void nautilus_debug_logv (gboolean is_milestone, const char *domain, const GList *uris, const char *format, va_list args); -+ -+void nautilus_debug_log_enable_domains (const char **domains, int n_domains); -+void nautilus_debug_log_disable_domains (const char **domains, int n_domains); -+ -+gboolean nautilus_debug_log_is_domain_enabled (const char *domain); -+ -+gboolean nautilus_debug_log_dump (const char *filename, GError **error); -+ -+void nautilus_debug_log_set_max_lines (int num_lines); -+int nautilus_debug_log_get_max_lines (void); -+ -+/* For testing only */ -+void nautilus_debug_log_clear (void); -+ -+#endif /* NAUTILUS_DEBUG_LOG_H */ ---- /dev/null 2006-10-03 05:17:45.000000000 -0500 -+++ libnautilus-private/nautilus-debug-log.c 2006-10-23 14:49:59.000000000 -0500 -@@ -0,0 +1,482 @@ -+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- -+ -+ nautilus-debug-log.c: Ring buffer for logging debug messages -+ -+ Copyright (C) 2006 Novell, Inc. -+ -+ This program is free software; you can redistribute it and/or -+ modify it under the terms of the GNU General Public License as -+ published by the Free Software Foundation; either version 2 of the -+ License, or (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public -+ License along with this program; if not, write to the -+ Free Software Foundation, Inc., 59 Temple Place - Suite 330, -+ Boston, MA 02111-1307, USA. -+ -+ Author: Federico Mena-Quintero -+*/ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include "nautilus-debug-log.h" -+#include "nautilus-file.h" -+ -+#define DEFAULT_RING_BUFFER_NUM_LINES 3000 -+ -+static GStaticMutex log_mutex = G_STATIC_MUTEX_INIT; -+ -+static GHashTable *domains_hash; -+static char **ring_buffer; -+static int ring_buffer_next_index; -+static int ring_buffer_num_lines; -+static int ring_buffer_max_lines = DEFAULT_RING_BUFFER_NUM_LINES; -+ -+static void -+lock (void) -+{ -+ g_static_mutex_lock (&log_mutex); -+} -+ -+static void -+unlock (void) -+{ -+ g_static_mutex_unlock (&log_mutex); -+} -+ -+void -+nautilus_debug_log (gboolean is_milestone, const char *domain, const char *format, ...) -+{ -+ va_list args; -+ -+ va_start (args, format); -+ nautilus_debug_logv (is_milestone, domain, NULL, format, args); -+ va_end (args); -+} -+ -+static gboolean -+is_domain_enabled (const char *domain) -+{ -+ /* User actions are always logged */ -+ if (strcmp (domain, NAUTILUS_DEBUG_LOG_DOMAIN_USER) == 0) -+ return TRUE; -+ -+ if (!domains_hash) -+ return FALSE; -+ -+ return (g_hash_table_lookup (domains_hash, domain) != NULL); -+} -+ -+static void -+ensure_ring (void) -+{ -+ if (ring_buffer) -+ return; -+ -+ ring_buffer = g_new0 (char *, ring_buffer_max_lines); -+ ring_buffer_next_index = 0; -+ ring_buffer_num_lines = 0; -+} -+ -+static void -+add_to_ring (char *str) -+{ -+ ensure_ring (); -+ -+ g_assert (str != NULL); -+ -+ if (ring_buffer_num_lines == ring_buffer_max_lines) { -+ /* We have an overlap, and the ring_buffer_next_index points to -+ * the "first" item. Free it to make room for the new item. -+ */ -+ -+ g_assert (ring_buffer[ring_buffer_next_index] != NULL); -+ g_free (ring_buffer[ring_buffer_next_index]); -+ } else -+ ring_buffer_num_lines++; -+ -+ g_assert (ring_buffer_num_lines <= ring_buffer_max_lines); -+ -+ ring_buffer[ring_buffer_next_index] = str; -+ -+ ring_buffer_next_index++; -+ if (ring_buffer_next_index == ring_buffer_max_lines) { -+ ring_buffer_next_index = 0; -+ g_assert (ring_buffer_num_lines == ring_buffer_max_lines); -+ } -+} -+ -+void -+nautilus_debug_logv (gboolean is_milestone, const char *domain, const GList *uris, const char *format, va_list args) -+{ -+ char *str; -+ char *debug_str; -+ struct timeval tv; -+ struct tm tm; -+ -+ lock (); -+ -+ if (!(is_milestone || is_domain_enabled (domain))) -+ goto out; -+ -+ str = g_strdup_vprintf (format, args); -+ gettimeofday (&tv, NULL); -+ -+ tm = *localtime (&tv.tv_sec); -+ -+ debug_str = g_strdup_printf ("%p %04d/%02d/%02d %02d:%02d:%02d.%04d (%s): %s", -+ g_thread_self (), -+ tm.tm_year + 1900, -+ tm.tm_mon + 1, -+ tm.tm_mday, -+ tm.tm_hour, -+ tm.tm_min, -+ tm.tm_sec, -+ (int) (tv.tv_usec / 100), -+ domain, -+ str); -+ g_free (str); -+ -+ if (uris) { -+ int debug_str_len; -+ int uris_len; -+ const GList *l; -+ char *new_str; -+ char *p; -+ -+ uris_len = 0; -+ -+ for (l = uris; l; l = l->next) { -+ const char *uri; -+ -+ uri = l->data; -+ uris_len += strlen (uri) + 2; /* plus 2 for a tab and the newline */ -+ } -+ -+ debug_str_len = strlen (debug_str); -+ new_str = g_new (char, debug_str_len + 1 + uris_len); /* plus 1 for newline */ -+ -+ p = g_stpcpy (new_str, debug_str); -+ *p++ = '\n'; -+ -+ for (l = uris; l; l = l->next) { -+ const char *uri; -+ -+ uri = l->data; -+ -+ *p++ = '\t'; -+ -+ p = g_stpcpy (p, uri); -+ -+ if (l->next) -+ *p++ = '\n'; -+ } -+ -+ g_free (debug_str); -+ debug_str = new_str; -+ } -+ -+ add_to_ring (debug_str); -+ -+ /* FIXME: deal with milestones */ -+ -+ out: -+ unlock (); -+} -+ -+void -+nautilus_debug_log_with_uri_list (gboolean is_milestone, const char *domain, const GList *uris, -+ const char *format, ...) -+{ -+ va_list args; -+ -+ va_start (args, format); -+ nautilus_debug_logv (is_milestone, domain, uris, format, args); -+ va_end (args); -+} -+ -+void -+nautilus_debug_log_with_file_list (gboolean is_milestone, const char *domain, GList *files, -+ const char *format, ...) -+{ -+ va_list args; -+ GList *uris; -+ GList *l; -+ -+ uris = NULL; -+ -+ for (l = files; l; l = l->next) { -+ NautilusFile *file; -+ char *uri; -+ -+ file = NAUTILUS_FILE (l->data); -+ uri = nautilus_file_get_uri (file); -+ -+ if (nautilus_file_is_gone (file)) { -+ char *new_uri; -+ -+ /* Hack: this will create an invalid URI, but it's for -+ * display purposes only. -+ */ -+ new_uri = g_strconcat (uri ? uri : "", " (gone)", NULL); -+ g_free (uri); -+ uri = new_uri; -+ } -+ uris = g_list_prepend (uris, uri); -+ } -+ -+ uris = g_list_reverse (uris); -+ -+ va_start (args, format); -+ nautilus_debug_logv (is_milestone, domain, uris, format, args); -+ va_end (args); -+ -+ eel_g_list_free_deep (uris); -+} -+ -+void -+nautilus_debug_log_enable_domains (const char **domains, int n_domains) -+{ -+ int i; -+ -+ g_assert (domains != NULL); -+ g_assert (n_domains >= 0); -+ -+ lock (); -+ -+ if (!domains_hash) -+ domains_hash = g_hash_table_new (g_str_hash, g_str_equal); -+ -+ for (i = 0; i < n_domains; i++) { -+ g_assert (domains[i] != NULL); -+ -+ if (strcmp (domains[i], NAUTILUS_DEBUG_LOG_DOMAIN_USER) == 0) -+ continue; /* user actions are always enabled */ -+ -+ if (g_hash_table_lookup (domains_hash, domains[i]) == NULL) { -+ char *domain; -+ -+ domain = g_strdup (domains[i]); -+ g_hash_table_insert (domains_hash, domain, domain); -+ } -+ } -+ -+ unlock (); -+} -+ -+void -+nautilus_debug_log_disable_domains (const char **domains, int n_domains) -+{ -+ int i; -+ -+ g_assert (domains != NULL); -+ g_assert (n_domains >= 0); -+ -+ lock (); -+ -+ if (domains_hash) { -+ for (i = 0; i < n_domains; i++) { -+ char *domain; -+ -+ g_assert (domains[i] != NULL); -+ -+ if (strcmp (domains[i], NAUTILUS_DEBUG_LOG_DOMAIN_USER) == 0) -+ continue; /* user actions are always enabled */ -+ -+ domain = g_hash_table_lookup (domains_hash, domains[i]); -+ if (domain) { -+ g_hash_table_remove (domains_hash, domain); -+ g_free (domain); -+ } -+ } -+ } /* else, there is nothing to disable */ -+ -+ unlock (); -+} -+ -+gboolean -+nautilus_debug_log_is_domain_enabled (const char *domain) -+{ -+ gboolean retval; -+ -+ g_assert (domain != NULL); -+ -+ lock (); -+ retval = is_domain_enabled (domain); -+ unlock (); -+ -+ return retval; -+} -+ -+gboolean -+nautilus_debug_log_dump (const char *filename, GError **error) -+{ -+ FILE *file; -+ gboolean success; -+ int start_index; -+ int i; -+ -+ g_assert (error == NULL || *error == NULL); -+ -+ lock (); -+ -+ success = TRUE; -+ -+ file = fopen (filename, "w"); -+ if (!file) { -+ int saved_errno; -+ -+ saved_errno = errno; -+ g_set_error (error, -+ G_FILE_ERROR, -+ g_file_error_from_errno (saved_errno), -+ "could not open log file %s", filename); -+ success = FALSE; -+ goto out; -+ } -+ -+ if (ring_buffer_num_lines == ring_buffer_max_lines) -+ start_index = ring_buffer_next_index; -+ else -+ start_index = 0; -+ -+ for (i = 0; i < ring_buffer_num_lines; i++) { -+ int idx; -+ -+ idx = (start_index + i) % ring_buffer_max_lines; -+ -+ if (fputs (ring_buffer[idx], file) == EOF -+ || fputc ('\n', file) == EOF) { -+ int saved_errno; -+ -+ saved_errno = errno; -+ g_set_error (error, -+ G_FILE_ERROR, -+ g_file_error_from_errno (saved_errno), -+ "error when writing to log file %s", filename); -+ -+ success = FALSE; -+ goto do_close; -+ } -+ } -+ -+ do_close: -+ -+ if (fclose (file) != 0) { -+ int saved_errno; -+ -+ saved_errno = errno; -+ -+ if (error && *error) { -+ g_error_free (*error); -+ *error = NULL; -+ } -+ -+ g_set_error (error, -+ G_FILE_ERROR, -+ g_file_error_from_errno (saved_errno), -+ "error when closing log file %s", filename); -+ success = FALSE; -+ } -+ -+ out: -+ -+ unlock (); -+ return success; -+} -+ -+void -+nautilus_debug_log_set_max_lines (int num_lines) -+{ -+ char **new_buffer; -+ int lines_to_copy; -+ -+ g_assert (num_lines > 0); -+ -+ lock (); -+ -+ if (num_lines == ring_buffer_max_lines) -+ goto out; -+ -+ new_buffer = g_new0 (char *, num_lines); -+ -+ lines_to_copy = MIN (num_lines, ring_buffer_num_lines); -+ -+ if (ring_buffer) { -+ int start_index; -+ int i; -+ -+ if (ring_buffer_num_lines == ring_buffer_max_lines) -+ start_index = (ring_buffer_next_index + ring_buffer_max_lines - lines_to_copy) % ring_buffer_max_lines; -+ else -+ start_index = ring_buffer_num_lines - lines_to_copy; -+ -+ g_assert (start_index >= 0 && start_index < ring_buffer_max_lines); -+ -+ for (i = 0; i < lines_to_copy; i++) { -+ int idx; -+ -+ idx = (start_index + i) % ring_buffer_max_lines; -+ -+ new_buffer[i] = ring_buffer[idx]; -+ ring_buffer[idx] = NULL; -+ } -+ -+ for (i = 0; i < ring_buffer_max_lines; i++) -+ g_free (ring_buffer[i]); -+ -+ g_free (ring_buffer); -+ } -+ -+ ring_buffer = new_buffer; -+ ring_buffer_next_index = lines_to_copy; -+ ring_buffer_num_lines = lines_to_copy; -+ ring_buffer_max_lines = num_lines; -+ -+ out: -+ -+ unlock (); -+} -+ -+int -+nautilus_debug_log_get_max_lines (void) -+{ -+ int retval; -+ -+ lock (); -+ retval = ring_buffer_max_lines; -+ unlock (); -+ -+ return retval; -+} -+ -+void -+nautilus_debug_log_clear (void) -+{ -+ int i; -+ -+ lock (); -+ -+ if (!ring_buffer) -+ goto out; -+ -+ for (i = 0; i < ring_buffer_max_lines; i++) { -+ g_free (ring_buffer[i]); -+ ring_buffer[i] = NULL; -+ } -+ -+ ring_buffer_next_index = 0; -+ ring_buffer_num_lines = 0; -+ -+ out: -+ unlock (); -+} -Index: libnautilus-private/Makefile.am -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/Makefile.am,v -retrieving revision 1.254 -diff -u -r1.254 Makefile.am ---- libnautilus-private/Makefile.am 25 Jul 2006 14:18:03 -0000 1.254 -+++ libnautilus-private/Makefile.am 23 Oct 2006 20:30:47 -0000 -@@ -67,6 +67,8 @@ - nautilus-column-utilities.h \ - nautilus-customization-data.c \ - nautilus-customization-data.h \ -+ nautilus-debug-log.c \ -+ nautilus-debug-log.h \ - nautilus-default-file-icon.c \ - nautilus-default-file-icon.h \ - nautilus-desktop-directory-file.c \ -Index: libnautilus-private/nautilus-file-operations.c -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations.c,v -retrieving revision 1.214 -diff -u -r1.214 nautilus-file-operations.c ---- libnautilus-private/nautilus-file-operations.c 23 Aug 2006 09:07:15 -0000 1.214 -+++ libnautilus-private/nautilus-file-operations.c 23 Oct 2006 20:30:47 -0000 -@@ -30,6 +30,7 @@ - #include - #include "nautilus-file-operations.h" - -+#include "nautilus-debug-log.h" - #include "nautilus-file-operations-progress.h" - #include "nautilus-lib-self-check-functions.h" - -@@ -1907,6 +1908,33 @@ - - g_assert (item_uris != NULL); - -+ { -+ const char *action_str; -+ -+ switch (copy_action) { -+ case GDK_ACTION_COPY: -+ action_str = "copy"; -+ break; -+ -+ case GDK_ACTION_MOVE: -+ action_str = "move"; -+ break; -+ -+ case GDK_ACTION_LINK: -+ action_str = "link"; -+ break; -+ -+ default: -+ action_str = "[unknown action]"; -+ break; -+ } -+ -+ nautilus_debug_log_with_uri_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, item_uris, -+ "%s the following URIs to \"%s\":", -+ action_str, -+ target_dir ? target_dir : "[empty location]"); -+ } -+ - target_dir_uri = NULL; - trash_dir_uri = NULL; - result = GNOME_VFS_OK; -@@ -2376,6 +2404,9 @@ - - g_assert (parent_dir != NULL); - -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "create an untitled folder in \"%s\"", parent_dir); -+ - /* pass in the target directory and the new folder name as a destination URI */ - if (eel_uri_is_desktop (parent_dir)) { - char *desktop_dir_uri; -@@ -2574,6 +2605,10 @@ - g_assert (parent_dir != NULL); - g_assert (template_uri != NULL); - -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "create new file \"%s\" from template \"%s\" in \"%s\"", -+ target_filename ? target_filename : "(none)", template_uri, parent_dir); -+ - /* pass in the target directory and the new folder name as a destination URI */ - if (eel_uri_is_desktop (parent_dir)) { - tmp = nautilus_get_desktop_directory_uri (); -@@ -2677,6 +2712,10 @@ - char *target_filename; - int fd; - -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "create new file in \"%s\"", -+ parent_dir); -+ - fd = mkstemp (source_file_str); - if (fd == -1) { - (*done_callback) (NULL, data); -@@ -2723,6 +2762,9 @@ - NautilusFile *file; - TransferInfo *transfer_info; - -+ nautilus_debug_log_with_uri_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, item_uris, -+ "delete files:"); -+ - uri_list = NULL; - for (p = item_uris; p != NULL; p = p->next) { - item_uri = (const char *) p->data; -@@ -2786,6 +2828,9 @@ - { - TransferInfo *transfer_info; - GList *trash_dir_list; -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "empty trash"); - - trash_dir_list = nautilus_trash_monitor_get_trash_directories (); - if (trash_dir_list != NULL) { -Index: libnautilus-private/nautilus-icon-container.c -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-container.c,v -retrieving revision 1.419 -diff -u -r1.419 nautilus-icon-container.c ---- libnautilus-private/nautilus-icon-container.c 18 Oct 2006 12:28:35 -0000 1.419 -+++ libnautilus-private/nautilus-icon-container.c 23 Oct 2006 20:30:47 -0000 -@@ -29,6 +29,7 @@ - #include - #include "nautilus-icon-container.h" - -+#include "nautilus-debug-log.h" - #include "nautilus-global-preferences.h" - #include "nautilus-icon-private.h" - #include "nautilus-lib-self-check-functions.h" -@@ -3596,6 +3597,8 @@ - nautilus_icon_container_did_not_drag (container, event); - } else { - nautilus_icon_dnd_end_drag (container); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "end drag from icon container"); - } - break; - case DRAG_STATE_STRETCH: -@@ -3667,6 +3670,8 @@ - event, - canvas_x, - canvas_y); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "begin drag from icon container"); - } - break; - case DRAG_STATE_STRETCH: -Index: libnautilus-private/nautilus-icon-dnd.c -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-dnd.c,v -retrieving revision 1.156 -diff -u -r1.156 nautilus-icon-dnd.c ---- libnautilus-private/nautilus-icon-dnd.c 27 Jul 2006 21:58:41 -0000 1.156 -+++ libnautilus-private/nautilus-icon-dnd.c 23 Oct 2006 20:30:47 -0000 -@@ -31,6 +31,7 @@ - #include - #include "nautilus-icon-dnd.h" - -+#include "nautilus-debug-log.h" - #include "nautilus-file-dnd.h" - #include "nautilus-icon-private.h" - #include "nautilus-link.h" -@@ -559,8 +560,15 @@ - GtkSelectionData *data) - { - action = get_background_drag_action (container, action); -- -+ - if (action > 0) { -+ char *uri; -+ -+ uri = get_container_uri (container); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "dropped color on icon container displaying %s", uri); -+ g_free (uri); -+ - eel_background_receive_dropped_color - (eel_get_widget_background (GTK_WIDGET (container)), - GTK_WIDGET (container), -@@ -577,6 +585,13 @@ - action = get_background_drag_action (container, action); - - if (action > 0) { -+ char *uri; -+ -+ uri = get_container_uri (container); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "dropped tile image on icon container displaying %s", uri); -+ g_free (uri); -+ - eel_background_receive_dropped_background_image - (eel_get_widget_background (GTK_WIDGET (container)), - action, -@@ -611,6 +626,11 @@ - * so we don't have to worry about async. issues here. - */ - uri = nautilus_icon_container_get_icon_uri (container, drop_target_icon); -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "dropped emblem '%s' on icon container URI: %s", -+ keyword, uri); -+ - file = nautilus_file_get (uri); - g_free (uri); - -Index: src/nautilus-application.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-application.c,v -retrieving revision 1.243 -diff -u -r1.243 nautilus-application.c ---- src/nautilus-application.c 21 Jun 2006 16:26:16 -0000 1.243 -+++ src/nautilus-application.c 23 Oct 2006 20:30:48 -0000 -@@ -76,6 +76,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1133,6 +1134,10 @@ - if (new_selection) { - nautilus_view_set_selection (existing_window->content_view, new_selection); - } -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "present EXISTING spatial window=%p: %s", -+ existing_window, location); - return existing_window; - } - } -@@ -1170,6 +1175,10 @@ - spatial_window_destroyed_callback, NULL); - - nautilus_window_go_to_with_selection (window, location, new_selection); -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "present NEW spatial window=%p: %s", -+ window, location); - - return window; - } -@@ -1231,6 +1240,10 @@ - another_navigation_window_already_showing (window)); - } - g_free (geometry_string); -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "create new navigation window=%p", -+ window); - - return window; - } -Index: src/nautilus-main.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-main.c,v -retrieving revision 1.160 -diff -u -p -r1.160 nautilus-main.c ---- src/nautilus-main.c 19 Oct 2006 14:24:28 -0000 1.160 -+++ src/nautilus-main.c 24 Oct 2006 00:04:54 -0000 -@@ -37,6 +37,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -49,6 +50,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -183,6 +185,140 @@ slowly_and_stupidly_obtain_timestamp (Di - return event.xproperty.time; - } - -+static void -+dump_debug_log (void) -+{ -+ char *filename; -+ -+ filename = g_build_filename (g_get_home_dir (), "nautilus-debug-log.txt", NULL); -+ nautilus_debug_log_dump (filename, NULL); /* NULL GError */ -+ g_free (filename); -+} -+ -+static gboolean -+dump_debug_log_idle_cb (gpointer data) -+{ -+ nautilus_debug_log (TRUE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "user requested dump of debug log"); -+ -+ dump_debug_log (); -+ return FALSE; -+} -+ -+/* sigaction structures for the old handlers of these signals */ -+static struct sigaction old_segv_sa; -+static struct sigaction old_abrt_sa; -+static struct sigaction old_trap_sa; -+static struct sigaction old_fpe_sa; -+static struct sigaction old_bus_sa; -+ -+static void -+sigusr1_handler (int sig) -+{ -+ g_idle_add (dump_debug_log_idle_cb, NULL); -+} -+ -+static void -+sigfatal_handler (int sig) -+{ -+ void (* func) (int); -+ -+ /* FIXME: is this totally busted? We do malloc() inside these functions, -+ * and yet we are inside a signal handler... -+ */ -+ nautilus_debug_log (TRUE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "debug log dumped due to signal %d", sig); -+ dump_debug_log (); -+ -+ switch (sig) { -+ case SIGSEGV: -+ func = old_segv_sa.sa_handler; -+ break; -+ -+ case SIGABRT: -+ func = old_abrt_sa.sa_handler; -+ break; -+ -+ case SIGTRAP: -+ func = old_trap_sa.sa_handler; -+ break; -+ -+ case SIGFPE: -+ func = old_fpe_sa.sa_handler; -+ break; -+ -+ case SIGBUS: -+ func = old_bus_sa.sa_handler; -+ break; -+ -+ default: -+ func = NULL; -+ break; -+ } -+ -+ /* this scares me */ -+ if (func != NULL && func != SIG_IGN && func != SIG_DFL) -+ (* func) (sig); -+} -+ -+static void -+setup_debug_log_signals (void) -+{ -+ struct sigaction sa; -+ -+ sa.sa_handler = sigusr1_handler; -+ sigemptyset (&sa.sa_mask); -+ sa.sa_flags = 0; -+ sigaction (SIGUSR1, &sa, NULL); -+ -+ sa.sa_handler = sigfatal_handler; -+ sigemptyset (&sa.sa_mask); -+ sa.sa_flags = 0; -+ -+ sigaction(SIGSEGV, &sa, &old_segv_sa); -+ sigaction(SIGABRT, &sa, &old_abrt_sa); -+ sigaction(SIGTRAP, &sa, &old_trap_sa); -+ sigaction(SIGFPE, &sa, &old_fpe_sa); -+ sigaction(SIGBUS, &sa, &old_bus_sa); -+} -+ -+static void -+setup_debug_log_domains (void) -+{ -+ const char *domains[] = { -+ NAUTILUS_DEBUG_LOG_DOMAIN_ASYNC -+ }; -+ -+ nautilus_debug_log_enable_domains (domains, G_N_ELEMENTS (domains)); -+} -+ -+static GLogFunc default_log_handler; -+ -+static void -+log_override_cb (const gchar *log_domain, -+ GLogLevelFlags log_level, -+ const gchar *message, -+ gpointer user_data) -+{ -+ nautilus_debug_log (TRUE, NAUTILUS_DEBUG_LOG_DOMAIN_GLOG, "%s", message); -+ -+ (* default_log_handler) (log_domain, log_level, message, user_data); -+} -+ -+static void -+setup_debug_log_glog (void) -+{ -+ default_log_handler = g_log_set_default_handler (log_override_cb, NULL); -+} -+ -+static void -+setup_debug_log (void) -+{ -+ setup_debug_log_domains (); -+ setup_debug_log_signals (); -+ setup_debug_log_glog (); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -271,6 +407,12 @@ main (int argc, char *argv[]) - GNOME_PARAM_GOPTION_CONTEXT, context, - GNOME_PARAM_HUMAN_READABLE_NAME, _("Nautilus"), - NULL); -+ -+ /* We do this after gnome_program_init(), since that function sets up -+ * its own handler for SIGSEGV and others --- we want to chain to those -+ * handlers. -+ */ -+ setup_debug_log (); - - if (session_to_load != NULL) { - no_default_window = TRUE; -Index: src/nautilus-places-sidebar.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-places-sidebar.c,v -retrieving revision 1.25 -diff -u -r1.25 nautilus-places-sidebar.c ---- src/nautilus-places-sidebar.c 13 Sep 2006 20:09:19 -0000 1.25 -+++ src/nautilus-places-sidebar.c 23 Oct 2006 20:30:48 -0000 -@@ -45,6 +45,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -474,6 +475,9 @@ - (model, &iter, PLACES_SIDEBAR_COLUMN_URI, &uri, -1); - - if (uri != NULL) { -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "activate from places sidebar window=%p: %s", -+ sidebar->window, uri); - /* Navigate to the clicked location. */ - nautilus_window_info_open_location - (sidebar->window, -@@ -484,6 +488,14 @@ - gtk_tree_model_get - (model, &iter, PLACES_SIDEBAR_COLUMN_DRIVE, &drive, -1); - if (drive != NULL) { -+ char *path; -+ -+ path = gnome_vfs_drive_get_device_path (drive); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "activate drive from places sidebar window=%p: %s", -+ sidebar->window, path); -+ g_free (path); -+ - gnome_vfs_drive_mount (drive, volume_op_callback, sidebar); - gnome_vfs_drive_unref (drive); - } -Index: src/nautilus-window-manage-views.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-window-manage-views.c,v -retrieving revision 1.368 -diff -u -r1.368 nautilus-window-manage-views.c ---- src/nautilus-window-manage-views.c 8 Jul 2006 08:38:17 -0000 1.368 -+++ src/nautilus-window-manage-views.c 23 Oct 2006 20:30:48 -0000 -@@ -54,6 +54,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -473,9 +474,18 @@ - { - NautilusWindow *target_window; - gboolean do_load_location = TRUE; -+ char *old_location; - - target_window = NULL; - -+ old_location = nautilus_window_get_location (window); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "window %p open location: old=\"%s\", new=\"%s\"", -+ window, -+ old_location ? old_location : "(none)", -+ location); -+ g_free (old_location); -+ - switch (mode) { - case NAUTILUS_WINDOW_OPEN_ACCORDING_TO_MODE : - if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER)) { -@@ -1275,6 +1285,15 @@ - static void - end_location_change (NautilusWindow *window) - { -+ char *location; -+ -+ location = nautilus_window_get_location (window); -+ if (location) { -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "finished loading window %p: %s", window, location); -+ g_free (location); -+ } -+ - nautilus_window_allow_stop (window, FALSE); - - /* Now we can free pending_scroll_to, since the load_complete -@@ -1532,10 +1551,17 @@ - const char *id) - { - NautilusFile *file; -+ char *location; - - g_return_if_fail (NAUTILUS_IS_WINDOW (window)); - g_return_if_fail (window->details->location != NULL); - g_return_if_fail (id != NULL); -+ -+ location = nautilus_window_get_location (window); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "change view of window %p: \"%s\" to \"%s\"", -+ window, location, id); -+ g_free (location); - - if (nautilus_window_content_view_matches_iid (window, id)) { - return; -Index: src/file-manager/fm-directory-view.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v -retrieving revision 1.752 -diff -u -p -r1.752 fm-directory-view.c ---- src/file-manager/fm-directory-view.c 19 Oct 2006 14:28:47 -0000 1.752 -+++ src/file-manager/fm-directory-view.c 23 Oct 2006 23:57:23 -0000 -@@ -80,6 +80,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -770,14 +771,18 @@ fm_directory_view_launch_application (Gn - { - NautilusFile *file; - GList *l; -+ GtkWindow *window; - - g_assert (application != NULL); - g_assert (NAUTILUS_IS_FILE (files->data)); - g_assert (FM_IS_DIRECTORY_VIEW (directory_view)); - -- nautilus_launch_application -- (application, files, -- fm_directory_view_get_containing_window (directory_view)); -+ window = fm_directory_view_get_containing_window (directory_view); -+ -+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, files, -+ "fm_directory_view_launch_application window=%p", window); -+ -+ nautilus_launch_application (application, files, window); - - for (l = files; l != NULL; l = l->next) { - file = NAUTILUS_FILE (l->data); -@@ -816,6 +821,7 @@ open_location (FMDirectoryView *director - NautilusWindowOpenFlags flags) - { - NautilusFile *file; -+ GtkWindow *window; - - g_assert (FM_IS_DIRECTORY_VIEW (directory_view)); - g_assert (new_uri != NULL); -@@ -830,7 +836,10 @@ open_location (FMDirectoryView *director - monitor_file_for_open_with (directory_view, NULL); - } - nautilus_file_unref (file); -- -+ -+ window = fm_directory_view_get_containing_window (directory_view); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "directory view open_location window=%p: %s", window, new_uri); - nautilus_window_info_open_location (directory_view->details->window, - new_uri, mode, flags, NULL); - } -@@ -1412,6 +1421,7 @@ action_new_launcher_callback (GtkAction - { - char *parent_uri; - FMDirectoryView *view; -+ GtkWindow *window; - - g_assert (FM_IS_DIRECTORY_VIEW (callback_data)); - -@@ -1419,6 +1429,9 @@ action_new_launcher_callback (GtkAction - - parent_uri = fm_directory_view_get_backing_uri (view); - -+ window = fm_directory_view_get_containing_window (view); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "directory view create new launcher in window=%p: %s", window, parent_uri); - nautilus_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (view)), - "gnome-desktop-item-edit", - "gnome-desktop-item-edit --create-new", -@@ -3097,9 +3110,19 @@ files_added_callback (NautilusDirectory - gpointer callback_data) - { - FMDirectoryView *view; -+ GtkWindow *window; -+ char *uri; - - view = FM_DIRECTORY_VIEW (callback_data); - -+ window = fm_directory_view_get_containing_window (view); -+ uri = fm_directory_view_get_uri (view); -+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_ASYNC, files, -+ "files added in window %p: %s", -+ window, -+ uri ? uri : "(no directory)"); -+ g_free (uri); -+ - schedule_changes (view); - - queue_pending_files (view, directory, files, &view->details->new_added_files); -@@ -3114,9 +3137,19 @@ files_changed_callback (NautilusDirector - gpointer callback_data) - { - FMDirectoryView *view; -+ GtkWindow *window; -+ char *uri; - - view = FM_DIRECTORY_VIEW (callback_data); - -+ window = fm_directory_view_get_containing_window (view); -+ uri = fm_directory_view_get_uri (view); -+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_ASYNC, files, -+ "files changed in window %p: %s", -+ window, -+ uri ? uri : "(no directory)"); -+ g_free (uri); -+ - schedule_changes (view); - - queue_pending_files (view, directory, files, &view->details->new_changed_files); -@@ -5297,6 +5330,7 @@ run_script_callback (GtkAction *action, - char *quoted_path; - char *old_working_dir; - char *parameters, *command, *name; -+ GtkWindow *window; - - launch_parameters = (ScriptLaunchParameters *) callback_data; - -@@ -5333,6 +5367,10 @@ run_script_callback (GtkAction *action, - - name = nautilus_file_get_name (launch_parameters->file); - /* FIXME: handle errors with dialog? Or leave up to each script? */ -+ window = fm_directory_view_get_containing_window (launch_parameters->directory_view); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "directory view run_script_callback, window=%p, name=\"%s\", command=\"%s\"", -+ window, name, command); - nautilus_launch_application_from_command (screen, name, command, NULL, FALSE); - g_free (name); - g_free (command); -@@ -7999,9 +8037,17 @@ fm_directory_view_notify_selection_chang - { - NautilusFile *file; - GList *selection; -+ GtkWindow *window; - - g_return_if_fail (FM_IS_DIRECTORY_VIEW (view)); - -+ selection = fm_directory_view_get_selection (view); -+ -+ window = fm_directory_view_get_containing_window (view); -+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, selection, -+ "selection changed in window %p", -+ window); -+ - view->details->selection_was_removed = FALSE; - - if (!view->details->selection_change_is_due_to_shell) { -@@ -8030,7 +8076,6 @@ fm_directory_view_notify_selection_chang - /* If there's exactly one item selected we sniff the slower attributes needed - * to activate a file ahead of time to improve interactive response. - */ -- selection = fm_directory_view_get_selection (view); - - if (eel_g_list_exactly_one_item (selection)) { - file = NAUTILUS_FILE (selection->data); -@@ -8049,9 +8094,9 @@ fm_directory_view_notify_selection_chang - NULL, - NULL); - } -- -- nautilus_file_list_free (selection); - } -+ -+ nautilus_file_list_free (selection); - } - - static gboolean -@@ -8293,6 +8338,7 @@ activate_callback (GList *files, gpointe - char *old_working_dir; - ActivationAction action; - GdkScreen *screen; -+ GtkWindow *window; - - parameters = callback_data; - -@@ -8353,12 +8399,18 @@ activate_callback (GList *files, gpointe - } - } - -+ window = fm_directory_view_get_containing_window (parameters->view); - - launch_desktop_files = g_list_reverse (launch_desktop_files); - for (l = launch_desktop_files; l != NULL; l = l->next) { - file = NAUTILUS_FILE (l->data); - - uri = nautilus_file_get_uri (file); -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "directory view activate_callback launch_desktop_file window=%p: %s", -+ window, uri); -+ - nautilus_launch_desktop_file ( - screen, uri, NULL, - fm_directory_view_get_containing_window (view)); -@@ -8370,6 +8422,11 @@ activate_callback (GList *files, gpointe - file = NAUTILUS_FILE (l->data); - - uri = nautilus_file_get_activation_uri (file); -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "directory view activate_callback launch_application_from_command window=%p: %s", -+ window, uri); -+ - nautilus_launch_application_from_command ( - screen, NULL, uri + strlen (NAUTILUS_COMMAND_SPECIFIER), - NULL, FALSE); -@@ -8389,6 +8446,11 @@ activate_callback (GList *files, gpointe - executable_path = gnome_vfs_get_local_path_from_uri (uri); - quoted_path = g_shell_quote (executable_path); - name = nautilus_file_get_name (file); -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "directory view activate_callback launch_file window=%p: %s", -+ window, quoted_path); -+ - nautilus_launch_application_from_command (screen, name, quoted_path, NULL, FALSE); - g_free (name); - g_free (quoted_path); -@@ -8405,6 +8467,11 @@ activate_callback (GList *files, gpointe - executable_path = gnome_vfs_get_local_path_from_uri (uri); - quoted_path = g_shell_quote (executable_path); - name = nautilus_file_get_name (file); -+ -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "directory view activate_callback launch_in_terminal window=%p: %s", -+ window, quoted_path); -+ - nautilus_launch_application_from_command (screen, name, quoted_path, NULL, TRUE); - g_free (name); - g_free (quoted_path); -@@ -8685,12 +8752,18 @@ fm_directory_view_activate_files (FMDire - char *file_name; - char *timed_wait_prompt; - int file_count; -+ GtkWindow *window; - - g_return_if_fail (FM_IS_DIRECTORY_VIEW (view)); - - if (files == NULL) { - return; - } -+ -+ window = fm_directory_view_get_containing_window (view); -+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, files, -+ "fm_directory_view_activate_files window=%p", -+ window); - - file_count = g_list_length (files); - -Index: src/file-manager/fm-error-reporting.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/fm-error-reporting.c,v -retrieving revision 1.43 -diff -u -r1.43 fm-error-reporting.c ---- src/file-manager/fm-error-reporting.c 18 Mar 2006 07:27:37 -0000 1.43 -+++ src/file-manager/fm-error-reporting.c 23 Oct 2006 20:30:50 -0000 -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -319,6 +320,7 @@ - { - char *old_name, *wait_message; - FMRenameData *data; -+ char *uri; - - g_return_if_fail (NAUTILUS_IS_FILE (file)); - g_return_if_fail (new_name != NULL); -@@ -345,6 +347,12 @@ - eel_timed_wait_start (cancel_rename_callback, file, wait_message, - NULL); /* FIXME bugzilla.gnome.org 42395: Parent this? */ - g_free (wait_message); -+ -+ uri = nautilus_file_get_uri (file); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "rename file old=\"%s\", new=\"%s\"", -+ uri, new_name); -+ g_free (uri); - - /* Start the rename. */ - nautilus_file_rename (file, new_name, -Index: src/file-manager/fm-list-view.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-view.c,v -retrieving revision 1.274 -diff -u -r1.274 fm-list-view.c ---- src/file-manager/fm-list-view.c 18 Oct 2006 13:20:44 -0000 1.274 -+++ src/file-manager/fm-list-view.c 23 Oct 2006 20:30:51 -0000 -@@ -54,6 +54,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -785,6 +786,15 @@ - view = FM_LIST_VIEW (callback_data); - - if (fm_list_model_load_subdirectory (view->details->model, path, &directory)) { -+ char *uri; -+ -+ uri = nautilus_directory_get_uri (directory); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "list view row expanded window=%p: %s", -+ fm_directory_view_get_containing_window (FM_DIRECTORY_VIEW (view)), -+ uri); -+ g_free (uri); -+ - fm_directory_view_add_subdirectory (FM_DIRECTORY_VIEW (view), directory); - - if (nautilus_directory_are_all_files_seen (directory)) { -@@ -848,6 +858,7 @@ - GtkTreeIter parent; - struct UnloadDelayData *unload_data; - GtkTreeModel *model; -+ char *uri; - - view = FM_LIST_VIEW (callback_data); - model = GTK_TREE_MODEL (view->details->model); -@@ -863,6 +874,14 @@ - -1); - } - -+ -+ uri = nautilus_file_get_uri (file); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "list view row collapsed window=%p: %s", -+ fm_directory_view_get_containing_window (FM_DIRECTORY_VIEW (view)), -+ uri); -+ g_free (uri); -+ - unload_data = g_new (struct UnloadDelayData, 1); - unload_data->view = view; - unload_data->file = file; -Index: src/file-manager/fm-tree-view.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/fm-tree-view.c,v -retrieving revision 1.28 -diff -u -r1.28 fm-tree-view.c ---- src/file-manager/fm-tree-view.c 24 Jul 2006 23:40:48 -0000 1.28 -+++ src/file-manager/fm-tree-view.c 23 Oct 2006 20:30:51 -0000 -@@ -61,6 +61,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -344,12 +345,18 @@ - && eel_str_has_prefix (uri, NAUTILUS_COMMAND_SPECIFIER)) { - - uri += strlen (NAUTILUS_COMMAND_SPECIFIER); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "tree view launch_application_from_command window=%p: %s", -+ view->details->window, uri); - nautilus_launch_application_from_command (screen, NULL, uri, NULL, FALSE); - - } else if (uri != NULL - && eel_str_has_prefix (uri, NAUTILUS_DESKTOP_COMMAND_SPECIFIER)) { - - file_uri = nautilus_file_get_uri (file); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "tree view launch_desktop_file window=%p: %s", -+ view->details->window, file_uri); - nautilus_launch_desktop_file (screen, file_uri, NULL, NULL); - g_free (file_uri); - -@@ -362,6 +369,9 @@ - - /* Non-local executables don't get launched. They act like non-executables. */ - if (file_uri == NULL) { -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "tree view window_info_open_location window=%p: %s", -+ view->details->window, uri); - nautilus_window_info_open_location - (view->details->window, - uri, -@@ -369,6 +379,9 @@ - 0, - NULL); - } else { -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "tree view launch_application_from_command window=%p: %s", -+ view->details->window, file_uri); - nautilus_launch_application_from_command (screen, NULL, file_uri, NULL, FALSE); - g_free (file_uri); - } -@@ -380,6 +393,9 @@ - g_free (view->details->selection_location); - } - view->details->selection_location = g_strdup (uri); -+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER, -+ "tree view window_info_open_location window=%p: %s", -+ view->details->window, uri); - nautilus_window_info_open_location - (view->details->window, - uri, diff --git a/nautilus-disable-zoom-control-and-view-as-option-menu.patch b/nautilus-disable-zoom-control-and-view-as-option-menu.patch index 89cb45a..c33c02b 100644 --- a/nautilus-disable-zoom-control-and-view-as-option-menu.patch +++ b/nautilus-disable-zoom-control-and-view-as-option-menu.patch @@ -5,10 +5,10 @@ ? src/.nautilus-navigation-window.c.swp ? src/nautilus-navigation-window.c.joe Index: src/nautilus-navigation-window.c -================================================================================ ---- src/nautilus-navigation-window.c +=================================================================== +--- src/nautilus-navigation-window.c.orig +++ src/nautilus-navigation-window.c -@@ -145,7 +145,9 @@ +@@ -196,7 +196,9 @@ nautilus_navigation_window_init (Nautilu GtkUIManager *ui_manager; GtkWidget *toolbar; GtkWidget *location_bar; @@ -18,7 +18,7 @@ Index: src/nautilus-navigation-window.c GtkToolItem *item; GtkWidget *hbox, *vbox, *eventbox, *extras_vbox; -@@ -246,6 +248,7 @@ +@@ -305,6 +307,7 @@ nautilus_navigation_window_init (Nautilu window->search_bar, TRUE, TRUE, 0); @@ -26,7 +26,7 @@ Index: src/nautilus-navigation-window.c /* Option menu for content view types; it's empty here, filled in when a uri is set. * Pack it into vbox so it doesn't grow vertically when location bar does. */ -@@ -258,10 +261,13 @@ +@@ -317,12 +320,15 @@ nautilus_navigation_window_init (Nautilu gtk_container_add (GTK_CONTAINER (item), view_as_menu_vbox); gtk_toolbar_insert (GTK_TOOLBAR (location_bar), item, -1); @@ -36,11 +36,13 @@ Index: src/nautilus-navigation-window.c +#if 0 gtk_box_pack_end (GTK_BOX (view_as_menu_vbox), window->view_as_combo_box, TRUE, FALSE, 0); gtk_widget_show (window->view_as_combo_box); + g_signal_connect_object (window->view_as_combo_box, "changed", + G_CALLBACK (view_as_menu_switch_views_callback), window, 0); +#endif /* Allocate the zoom control and place on the right next to the menu. * It gets shown later, if the view-frame contains something zoomable. -@@ -279,13 +285,15 @@ +@@ -340,13 +346,15 @@ nautilus_navigation_window_init (Nautilu g_signal_connect_object (window->zoom_control, "zoom_to_default", G_CALLBACK (nautilus_window_zoom_to_default), window, G_CONNECT_SWAPPED); diff --git a/nautilus.changes b/nautilus.changes index aeeb961..bcf35ff 100644 --- a/nautilus.changes +++ b/nautilus.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Mar 13 13:26:04 CST 2007 - maw@suse.de + +- Update to version 2.17.91 +- Bug fixes, including bugzilla.gnome.org #364466, #403255, + #138058, #340495, #357955, #403565, #357955, #362034, + #385382, #394328, #329920, #320020, #327249, #389467, #376291, + #374623, #382207, #376952, #384078, #383840, #45953, #350579, + #318373, #132326, #372550, #338353, #372471, #330298, #155337, + #174766, #122688, #321175, #349840, #356124, #351713, #348161. + ------------------------------------------------------------------- Tue Feb 27 23:06:27 CET 2007 - dmueller@suse.de diff --git a/nautilus.spec b/nautilus.spec index d44b625..cd31740 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -1,5 +1,5 @@ # -# spec file for package nautilus (Version 2.16.1) +# spec file for package nautilus (Version 2.17.91) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -14,8 +14,8 @@ Name: nautilus BuildRequires: cdparanoia eel-devel gnome-common gnome-icon-theme gnome-patch-translation intltool libbeagle-devel libexif-devel libgnomeui-devel libidl librsvg-devel mDNSResponder-devel perl-XML-Parser update-desktop-files License: GNU General Public License (GPL) Group: Productivity/File utilities -Version: 2.16.1 -Release: 49 +Version: 2.17.91 +Release: 1 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,9 +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 +# Patch14: nautilus-206369-desktop-icon-overlap.diff Patch15: nautilus-drives-and-volumes-on-desktop.diff -Patch16: nautilus-debug-log.diff +# Patch16: nautilus-debug-log.diff Patch17: nautilus-181941-i18n.patch Requires: gnome2-user-docs gnome-icon-theme Provides: nautilus2 @@ -82,9 +82,9 @@ gnome-patch-translation-prepare %patch11 -p1 %patch12 %patch13 -p1 -%patch14 -p1 +# %patch14 -p1 %patch15 -p1 -%patch16 -p0 +# %patch16 -p0 %patch17 -p1 # FIXME: this code updates translation for upstreamed patches. cd po @@ -159,6 +159,7 @@ fi %{_datadir}/nautilus %{_datadir}/pixmaps/nautilus %{_datadir}/pixmaps/*.png +%{_datadir}/icons/hicolor/*/*/*.* %{_libdir}/*.so.* %{_libdir}/bonobo/servers/*.server %dir %{_libdir}/nautilus @@ -172,6 +173,14 @@ fi %{_libdir}/pkgconfig/*.pc %changelog +* Tue Mar 13 2007 - maw@suse.de +- Update to version 2.17.91 +- Bug fixes, including bugzilla.gnome.org #364466, #403255, + [#138058], #340495, #357955, #403565, #357955, #362034, + [#385382], #394328, #329920, #320020, #327249, #389467, #376291, + [#374623], #382207, #376952, #384078, #383840, #45953, #350579, + [#318373], #132326, #372550, #338353, #372471, #330298, #155337, + [#174766], #122688, #321175, #349840, #356124, #351713, #348161. * Tue Feb 27 2007 - dmueller@suse.de - adjust BuildRequires: libexif->libexif-devel * Mon Feb 05 2007 - sbrabec@suse.cz