summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/file-manager/fm-directory-view.c87
-rw-r--r--src/file-manager/fm-error-reporting.c8
-rw-r--r--src/file-manager/fm-list-view.c19
-rw-r--r--src/file-manager/fm-tree-view.c16
-rw-r--r--src/nautilus-application.c13
-rw-r--r--src/nautilus-main.c142
-rw-r--r--src/nautilus-places-sidebar.c12
-rw-r--r--src/nautilus-window-manage-views.c26
8 files changed, 316 insertions, 7 deletions
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 934d51a2e..262271487 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -80,6 +80,7 @@
#include <libnautilus-private/nautilus-recent.h>
#include <libnautilus-extension/nautilus-menu-provider.h>
#include <libnautilus-private/nautilus-clipboard-monitor.h>
+#include <libnautilus-private/nautilus-debug-log.h>
#include <libnautilus-private/nautilus-desktop-icon-file.h>
#include <libnautilus-private/nautilus-desktop-directory.h>
#include <libnautilus-private/nautilus-search-directory.h>
@@ -770,14 +771,18 @@ fm_directory_view_launch_application (GnomeVFSMimeApplication *application,
{
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 *directory_view,
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 *directory_view,
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 *action,
{
char *parent_uri;
FMDirectoryView *view;
+ GtkWindow *window;
g_assert (FM_IS_DIRECTORY_VIEW (callback_data));
@@ -1419,6 +1429,9 @@ action_new_launcher_callback (GtkAction *action,
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 *directory,
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 (NautilusDirectory *directory,
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, gpointer callback_data)
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, gpointer callback_data)
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_changed (FMDirectoryView *view)
{
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_changed (FMDirectoryView *view)
/* 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_changed (FMDirectoryView *view)
NULL,
NULL);
}
-
- nautilus_file_list_free (selection);
}
+
+ nautilus_file_list_free (selection);
}
static gboolean
@@ -8293,6 +8338,7 @@ activate_callback (GList *files, gpointer callback_data)
char *old_working_dir;
ActivationAction action;
GdkScreen *screen;
+ GtkWindow *window;
parameters = callback_data;
@@ -8353,12 +8399,18 @@ activate_callback (GList *files, gpointer callback_data)
}
}
+ 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, gpointer callback_data)
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, gpointer callback_data)
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, gpointer callback_data)
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,6 +8752,7 @@ fm_directory_view_activate_files (FMDirectoryView *view,
char *file_name;
char *timed_wait_prompt;
int file_count;
+ GtkWindow *window;
g_return_if_fail (FM_IS_DIRECTORY_VIEW (view));
@@ -8692,6 +8760,11 @@ fm_directory_view_activate_files (FMDirectoryView *view,
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);
/* link target info might be stale, re-read it */
diff --git a/src/file-manager/fm-error-reporting.c b/src/file-manager/fm-error-reporting.c
index ec7760bd8..ab8051f8f 100644
--- a/src/file-manager/fm-error-reporting.c
+++ b/src/file-manager/fm-error-reporting.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <glib/gi18n.h>
#include <libgnomevfs/gnome-vfs-result.h>
+#include <libnautilus-private/nautilus-debug-log.h>
#include <libnautilus-private/nautilus-file.h>
#include <eel/eel-string.h>
#include <eel/eel-stock-dialogs.h>
@@ -319,6 +320,7 @@ fm_rename_file (NautilusFile *file,
{
char *old_name, *wait_message;
FMRenameData *data;
+ char *uri;
g_return_if_fail (NAUTILUS_IS_FILE (file));
g_return_if_fail (new_name != NULL);
@@ -346,6 +348,12 @@ fm_rename_file (NautilusFile *file,
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,
rename_callback, NULL);
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index dcd4d67cf..518260bc9 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -54,6 +54,7 @@
#include <libnautilus-extension/nautilus-column-provider.h>
#include <libnautilus-private/nautilus-column-chooser.h>
#include <libnautilus-private/nautilus-column-utilities.h>
+#include <libnautilus-private/nautilus-debug-log.h>
#include <libnautilus-private/nautilus-directory-background.h>
#include <libnautilus-private/nautilus-dnd.h>
#include <libnautilus-private/nautilus-file-dnd.h>
@@ -785,6 +786,15 @@ row_expanded_callback (GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *pa
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 @@ row_collapsed_callback (GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *p
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 @@ row_collapsed_callback (GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *p
-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;
diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c
index 09f25cc16..560373a03 100644
--- a/src/file-manager/fm-tree-view.c
+++ b/src/file-manager/fm-tree-view.c
@@ -61,6 +61,7 @@
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-volume-monitor.h>
#include <libnautilus-private/nautilus-clipboard-monitor.h>
+#include <libnautilus-private/nautilus-debug-log.h>
#include <libnautilus-private/nautilus-file-attributes.h>
#include <libnautilus-private/nautilus-file-operations.h>
#include <libnautilus-private/nautilus-global-preferences.h>
@@ -344,12 +345,18 @@ got_activation_uri_callback (NautilusFile *file, gpointer callback_data)
&& 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 @@ got_activation_uri_callback (NautilusFile *file, gpointer callback_data)
/* 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 @@ got_activation_uri_callback (NautilusFile *file, gpointer callback_data)
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 @@ got_activation_uri_callback (NautilusFile *file, gpointer callback_data)
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/src/nautilus-application.c b/src/nautilus-application.c
index b879c3e44..fc8bdf532 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -76,6 +76,7 @@
#include <libgnomevfs/gnome-vfs-ops.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-volume-monitor.h>
+#include <libnautilus-private/nautilus-debug-log.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-icon-factory.h>
@@ -1140,6 +1141,10 @@ nautilus_application_present_spatial_window_with_selection (NautilusApplication
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;
}
}
@@ -1177,6 +1182,10 @@ nautilus_application_present_spatial_window_with_selection (NautilusApplication
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;
}
@@ -1239,6 +1248,10 @@ nautilus_application_create_navigation_window (NautilusApplication *application,
}
g_free (geometry_string);
+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER,
+ "create new navigation window=%p",
+ window);
+
return window;
}
diff --git a/src/nautilus-main.c b/src/nautilus-main.c
index 99ae0207b..25d51f99d 100644
--- a/src/nautilus-main.c
+++ b/src/nautilus-main.c
@@ -37,6 +37,7 @@
#include <bonobo-activation/bonobo-activation.h>
#include <bonobo/bonobo-main.h>
#include <dlfcn.h>
+#include <signal.h>
#include <eel/eel-debug.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-self-checks.h>
@@ -50,6 +51,7 @@
#include <libgnomeui/gnome-ui-init.h>
#include <libgnomeui/gnome-client.h>
#include <libgnomevfs/gnome-vfs-init.h>
+#include <libnautilus-private/nautilus-debug-log.h>
#include <libnautilus-private/nautilus-directory-metafile.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-lib-self-check-functions.h>
@@ -198,6 +200,140 @@ slowly_and_stupidly_obtain_timestamp (Display *xdisplay)
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[])
{
@@ -287,6 +423,12 @@ main (int argc, char *argv[])
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;
}
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 902d52dca..987d8b175 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -45,6 +45,7 @@
#include <libgnome/gnome-macros.h>
#include <glib/gi18n.h>
#include <libgnomeui/gnome-popup-menu.h>
+#include <libnautilus-private/nautilus-debug-log.h>
#include <libnautilus-private/nautilus-dnd.h>
#include <libnautilus-private/nautilus-bookmark.h>
#include <libnautilus-private/nautilus-global-preferences.h>
@@ -474,6 +475,9 @@ row_activated_callback (GtkTreeView *tree_view,
(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 @@ row_activated_callback (GtkTreeView *tree_view,
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);
}
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 6f206281b..6a46d938e 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -54,6 +54,7 @@
#include <libgnomevfs/gnome-vfs-uri.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libnautilus-extension/nautilus-location-widget-provider.h>
+#include <libnautilus-private/nautilus-debug-log.h>
#include <libnautilus-private/nautilus-file-attributes.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-file.h>
@@ -473,9 +474,18 @@ nautilus_window_open_location_full (NautilusWindow *window,
{
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 @@ nautilus_window_report_load_complete (NautilusWindow *window,
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,11 +1551,18 @@ nautilus_window_set_content_view (NautilusWindow *window,
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;
}