This commit is contained in:
parent
b89ccd6ce5
commit
46f1cfb4f8
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:918fa61a4064306660c63a399124fa74af16c7407a5c64af5193a08c9a714fb0
|
|
||||||
size 5263812
|
|
3
nautilus-2.24.1.tar.bz2
Normal file
3
nautilus-2.24.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:48f1d25af102d216fdc2ebcd6396ffce963558c119b88730dc02fb1c158fcc4c
|
||||||
|
size 5330025
|
@ -24,10 +24,10 @@
|
|||||||
(nautilus_file_should_show): Don't show foreign links in the
|
(nautilus_file_should_show): Don't show foreign links in the
|
||||||
desktop directory.
|
desktop directory.
|
||||||
|
|
||||||
Index: nautilus-2.23.4/libnautilus-private/nautilus-directory-async.c
|
Index: nautilus-2.24.1/libnautilus-private/nautilus-directory-async.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nautilus-2.23.4.orig/libnautilus-private/nautilus-directory-async.c
|
--- nautilus-2.24.1.orig/libnautilus-private/nautilus-directory-async.c
|
||||||
+++ nautilus-2.23.4/libnautilus-private/nautilus-directory-async.c
|
+++ nautilus-2.24.1/libnautilus-private/nautilus-directory-async.c
|
||||||
@@ -199,7 +199,8 @@ static void link_info_done
|
@@ -199,7 +199,8 @@ static void link_info_done
|
||||||
const char *uri,
|
const char *uri,
|
||||||
const char *name,
|
const char *name,
|
||||||
@ -67,13 +67,13 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-directory-async.c
|
|||||||
}
|
}
|
||||||
@@ -3622,6 +3625,7 @@ link_info_got_data (NautilusDirectory *d
|
@@ -3622,6 +3625,7 @@ link_info_got_data (NautilusDirectory *d
|
||||||
{
|
{
|
||||||
char *uri, *name, *icon;
|
char *link_uri, *uri, *name, *icon;
|
||||||
gboolean is_launcher;
|
gboolean is_launcher;
|
||||||
+ gboolean is_foreign;
|
+ gboolean is_foreign;
|
||||||
|
|
||||||
nautilus_directory_ref (directory);
|
nautilus_directory_ref (directory);
|
||||||
|
|
||||||
@@ -3629,17 +3633,18 @@ link_info_got_data (NautilusDirectory *d
|
@@ -3629,19 +3633,20 @@ link_info_got_data (NautilusDirectory *d
|
||||||
name = NULL;
|
name = NULL;
|
||||||
icon = NULL;
|
icon = NULL;
|
||||||
is_launcher = FALSE;
|
is_launcher = FALSE;
|
||||||
@ -81,9 +81,11 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-directory-async.c
|
|||||||
|
|
||||||
/* Handle the case where we read the Nautilus link. */
|
/* Handle the case where we read the Nautilus link. */
|
||||||
if (result) {
|
if (result) {
|
||||||
nautilus_link_get_link_info_given_file_contents (file_contents, bytes_read,
|
link_uri = nautilus_file_get_uri (file);
|
||||||
|
nautilus_link_get_link_info_given_file_contents (file_contents, bytes_read, link_uri,
|
||||||
- &uri, &name, &icon, &is_launcher);
|
- &uri, &name, &icon, &is_launcher);
|
||||||
+ &uri, &name, &icon, &is_launcher, &is_foreign);
|
+ &uri, &name, &icon, &is_launcher, &is_foreign);
|
||||||
|
g_free (link_uri);
|
||||||
} else {
|
} else {
|
||||||
/* FIXME bugzilla.gnome.org 42433: We should report this error to the user. */
|
/* FIXME bugzilla.gnome.org 42433: We should report this error to the user. */
|
||||||
}
|
}
|
||||||
@ -94,7 +96,7 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-directory-async.c
|
|||||||
nautilus_file_changed (file);
|
nautilus_file_changed (file);
|
||||||
nautilus_file_unref (file);
|
nautilus_file_unref (file);
|
||||||
|
|
||||||
@@ -3727,7 +3732,7 @@ link_info_start (NautilusDirectory *dire
|
@@ -3729,7 +3734,7 @@ link_info_start (NautilusDirectory *dire
|
||||||
|
|
||||||
/* If it's not a link we are done. If it is, we need to read it. */
|
/* If it's not a link we are done. If it is, we need to read it. */
|
||||||
if (!nautilus_style_link) {
|
if (!nautilus_style_link) {
|
||||||
@ -103,11 +105,11 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-directory-async.c
|
|||||||
} else if (should_read_link_info_sync (file)) {
|
} else if (should_read_link_info_sync (file)) {
|
||||||
result = g_file_load_contents (location, NULL, &file_contents, &file_size, NULL, NULL);
|
result = g_file_load_contents (location, NULL, &file_contents, &file_size, NULL, NULL);
|
||||||
link_info_got_data (directory, file, result, file_size, file_contents);
|
link_info_got_data (directory, file, result, file_size, file_contents);
|
||||||
Index: nautilus-2.23.4/libnautilus-private/nautilus-file-private.h
|
Index: nautilus-2.24.1/libnautilus-private/nautilus-file-private.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nautilus-2.23.4.orig/libnautilus-private/nautilus-file-private.h
|
--- nautilus-2.24.1.orig/libnautilus-private/nautilus-file-private.h
|
||||||
+++ nautilus-2.23.4/libnautilus-private/nautilus-file-private.h
|
+++ nautilus-2.24.1/libnautilus-private/nautilus-file-private.h
|
||||||
@@ -191,6 +191,7 @@ struct NautilusFileDetails
|
@@ -198,6 +198,7 @@ struct NautilusFileDetails
|
||||||
eel_boolean_bit has_open_window : 1;
|
eel_boolean_bit has_open_window : 1;
|
||||||
|
|
||||||
eel_boolean_bit is_launcher : 1;
|
eel_boolean_bit is_launcher : 1;
|
||||||
@ -115,11 +117,11 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-file-private.h
|
|||||||
eel_boolean_bit is_symlink : 1;
|
eel_boolean_bit is_symlink : 1;
|
||||||
eel_boolean_bit is_mountpoint : 1;
|
eel_boolean_bit is_mountpoint : 1;
|
||||||
eel_boolean_bit is_hidden : 1;
|
eel_boolean_bit is_hidden : 1;
|
||||||
Index: nautilus-2.23.4/libnautilus-private/nautilus-file.c
|
Index: nautilus-2.24.1/libnautilus-private/nautilus-file.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nautilus-2.23.4.orig/libnautilus-private/nautilus-file.c
|
--- nautilus-2.24.1.orig/libnautilus-private/nautilus-file.c
|
||||||
+++ nautilus-2.23.4/libnautilus-private/nautilus-file.c
|
+++ nautilus-2.24.1/libnautilus-private/nautilus-file.c
|
||||||
@@ -323,6 +323,7 @@ nautilus_file_clear_info (NautilusFile *
|
@@ -332,6 +332,7 @@ nautilus_file_clear_info (NautilusFile *
|
||||||
file->details->thumbnailing_failed = FALSE;
|
file->details->thumbnailing_failed = FALSE;
|
||||||
|
|
||||||
file->details->is_launcher = FALSE;
|
file->details->is_launcher = FALSE;
|
||||||
@ -127,7 +129,7 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-file.c
|
|||||||
file->details->is_symlink = FALSE;
|
file->details->is_symlink = FALSE;
|
||||||
file->details->is_hidden = FALSE;
|
file->details->is_hidden = FALSE;
|
||||||
file->details->is_backup = FALSE;
|
file->details->is_backup = FALSE;
|
||||||
@@ -2731,7 +2732,10 @@ nautilus_file_should_show (NautilusFile
|
@@ -2791,7 +2792,10 @@ nautilus_file_should_show (NautilusFile
|
||||||
if (nautilus_file_is_in_trash (file)) {
|
if (nautilus_file_is_in_trash (file)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
@ -139,7 +141,7 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-file.c
|
|||||||
(show_backup || !nautilus_file_is_backup_file (file));
|
(show_backup || !nautilus_file_is_backup_file (file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3080,6 +3084,12 @@ nautilus_file_is_launcher (NautilusFile
|
@@ -3196,6 +3200,12 @@ nautilus_file_is_launcher (NautilusFile
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@ -152,11 +154,11 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-file.c
|
|||||||
nautilus_file_has_activation_uri (NautilusFile *file)
|
nautilus_file_has_activation_uri (NautilusFile *file)
|
||||||
{
|
{
|
||||||
return file->details->activation_location != NULL;
|
return file->details->activation_location != NULL;
|
||||||
Index: nautilus-2.23.4/libnautilus-private/nautilus-file.h
|
Index: nautilus-2.24.1/libnautilus-private/nautilus-file.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nautilus-2.23.4.orig/libnautilus-private/nautilus-file.h
|
--- nautilus-2.24.1.orig/libnautilus-private/nautilus-file.h
|
||||||
+++ nautilus-2.23.4/libnautilus-private/nautilus-file.h
|
+++ nautilus-2.24.1/libnautilus-private/nautilus-file.h
|
||||||
@@ -380,6 +380,7 @@ GList *nautilus_file_li
|
@@ -397,6 +397,7 @@ GList *nautilus_file_li
|
||||||
* Getting this can require reading the contents of the file.
|
* Getting this can require reading the contents of the file.
|
||||||
*/
|
*/
|
||||||
gboolean nautilus_file_is_launcher (NautilusFile *file);
|
gboolean nautilus_file_is_launcher (NautilusFile *file);
|
||||||
@ -164,34 +166,35 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-file.h
|
|||||||
gboolean nautilus_file_has_activation_uri (NautilusFile *file);
|
gboolean nautilus_file_has_activation_uri (NautilusFile *file);
|
||||||
char * nautilus_file_get_activation_uri (NautilusFile *file);
|
char * nautilus_file_get_activation_uri (NautilusFile *file);
|
||||||
GFile * nautilus_file_get_activation_location (NautilusFile *file);
|
GFile * nautilus_file_get_activation_location (NautilusFile *file);
|
||||||
Index: nautilus-2.23.4/libnautilus-private/nautilus-link.c
|
Index: nautilus-2.24.1/libnautilus-private/nautilus-link.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nautilus-2.23.4.orig/libnautilus-private/nautilus-link.c
|
--- nautilus-2.24.1.orig/libnautilus-private/nautilus-link.c
|
||||||
+++ nautilus-2.23.4/libnautilus-private/nautilus-link.c
|
+++ nautilus-2.24.1/libnautilus-private/nautilus-link.c
|
||||||
@@ -406,16 +406,36 @@ nautilus_link_local_get_link_uri (const
|
@@ -430,6 +430,23 @@ nautilus_link_local_get_link_uri (const
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
+static gboolean
|
+static gboolean
|
||||||
+string_array_contains (char **array,
|
+string_array_contains (char **array,
|
||||||
+ const char *str)
|
+ const char *str)
|
||||||
+{
|
+{
|
||||||
+ char **p;
|
+ char **p;
|
||||||
+
|
+
|
||||||
+ if (!array)
|
+ if (!array)
|
||||||
+ return FALSE;
|
+ return FALSE;
|
||||||
+
|
+
|
||||||
+ for (p = array; *p; p++)
|
+ for (p = array; *p; p++)
|
||||||
+ if (g_ascii_strcasecmp (*p, str) == 0) {
|
+ if (g_ascii_strcasecmp (*p, str) == 0) {
|
||||||
+ return TRUE;
|
+ return TRUE;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return FALSE;
|
+ return FALSE;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
void
|
void
|
||||||
nautilus_link_get_link_info_given_file_contents (const char *file_contents,
|
nautilus_link_get_link_info_given_file_contents (const char *file_contents,
|
||||||
int link_file_size,
|
int link_file_size,
|
||||||
|
@@ -437,10 +454,13 @@ nautilus_link_get_link_info_given_file_c
|
||||||
char **uri,
|
char **uri,
|
||||||
char **name,
|
char **name,
|
||||||
char **icon,
|
char **icon,
|
||||||
@ -206,7 +209,7 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-link.c
|
|||||||
|
|
||||||
if (!is_link_data (file_contents, link_file_size)) {
|
if (!is_link_data (file_contents, link_file_size)) {
|
||||||
return;
|
return;
|
||||||
@@ -437,7 +457,20 @@ nautilus_link_get_link_info_given_file_c
|
@@ -464,7 +484,20 @@ nautilus_link_get_link_info_given_file_c
|
||||||
gnome_desktop_item_get_string (desktop_file, "Exec") != NULL) {
|
gnome_desktop_item_get_string (desktop_file, "Exec") != NULL) {
|
||||||
*is_launcher = TRUE;
|
*is_launcher = TRUE;
|
||||||
}
|
}
|
||||||
@ -228,11 +231,11 @@ Index: nautilus-2.23.4/libnautilus-private/nautilus-link.c
|
|||||||
gnome_desktop_item_unref (desktop_file);
|
gnome_desktop_item_unref (desktop_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: nautilus-2.23.4/libnautilus-private/nautilus-link.h
|
Index: nautilus-2.24.1/libnautilus-private/nautilus-link.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- nautilus-2.23.4.orig/libnautilus-private/nautilus-link.h
|
--- nautilus-2.24.1.orig/libnautilus-private/nautilus-link.h
|
||||||
+++ nautilus-2.23.4/libnautilus-private/nautilus-link.h
|
+++ nautilus-2.24.1/libnautilus-private/nautilus-link.h
|
||||||
@@ -46,7 +46,8 @@ void nautilus_link_get_link_
|
@@ -47,7 +47,8 @@ void nautilus_link_get_link_
|
||||||
char **uri,
|
char **uri,
|
||||||
char **name,
|
char **name,
|
||||||
char **icon,
|
char **icon,
|
||||||
|
@ -1,98 +1,6 @@
|
|||||||
diff --git a/ChangeLog b/ChangeLog
|
Sysadmin-defined desktop items for Nautilus
|
||||||
index df1ed2f..cfacd37 100644
|
http://www.gnome.org/~federico/news-2008-08.html#nautilus-predefined-desktop-items
|
||||||
--- a/ChangeLog
|
|
||||||
+++ b/ChangeLog
|
|
||||||
@@ -1,3 +1,90 @@
|
|
||||||
+2008-09-18 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-directory-async.c
|
|
||||||
+ (directory_load_done): Log when we are done a directory, in the
|
|
||||||
+ "async" domain.
|
|
||||||
+
|
|
||||||
+2008-09-18 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-debug-log.c
|
|
||||||
+ (nautilus_debug_log_with_uri_list): Print "[no files]" when no
|
|
||||||
+ URIs are specified, so the debug log makes it clear that we had an
|
|
||||||
+ empty list.
|
|
||||||
+ (nautilus_debug_log_with_file_list): Likewise.
|
|
||||||
+
|
|
||||||
+2008-09-16 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-desktop-directory.c
|
|
||||||
+ (desktop_call_when_ready): Add predefined_items_dir to the
|
|
||||||
+ merged callback.
|
|
||||||
+ (MergedCallback): Removed the merged_file_list field. We'll build
|
|
||||||
+ the final list of combined files once all the directories are done
|
|
||||||
+ loading.
|
|
||||||
+ (merged_callback_check_done): Call the user's callback with the
|
|
||||||
+ final list of combined files.
|
|
||||||
+
|
|
||||||
+2008-09-12 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-desktop-directory.c (struct
|
|
||||||
+ NautilusDesktopDirectoryDetails): New fields, files_hash and
|
|
||||||
+ name_to_file_hash. We store the combined files from the
|
|
||||||
+ real_directory and the predefined_items_dir in these hashes.
|
|
||||||
+ (done_loading_callback): Say that the desktop directory is done
|
|
||||||
+ loading only iff both the real_directory and the
|
|
||||||
+ predefined_items_dir are done loading. Combine both directories
|
|
||||||
+ when we get to that situation, so we'll obtain the final list of
|
|
||||||
+ files that will be shown to the user.
|
|
||||||
+ (desktop_get_file_list): Return the combined file list (real and
|
|
||||||
+ predefined items) and the files from desktop links.
|
|
||||||
+ (desktop_contains_file): Return if the file exists in the list of
|
|
||||||
+ combined files.
|
|
||||||
+ (desktop_is_not_empty): Check the files_hash for combined files
|
|
||||||
+ instead of just the real_directory.
|
|
||||||
+
|
|
||||||
+2008-09-11 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-desktop-directory.c
|
|
||||||
+ (load_error_callback): Proxy the load_error signal from the child
|
|
||||||
+ directories onto the desktop directory.
|
|
||||||
+ (update_desktop_directory): Connect to load_error on the real directory.
|
|
||||||
+ (update_predefined_items_dir): Likewise, on the predefined items directory.
|
|
||||||
+
|
|
||||||
+2008-09-11 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-desktop-directory.c
|
|
||||||
+ (update_predefined_items_dir): New function; analogous to
|
|
||||||
+ update_desktop_directory(). Updates the predefined items
|
|
||||||
+ directory from a real NautilusDirectory.
|
|
||||||
+ (nautilus_desktop_directory_instance_init): Call
|
|
||||||
+ update_predefined_items_dir().
|
|
||||||
+ (desktop_force_reload): Reload the predefined_items_dir as well.
|
|
||||||
+ (desktop_are_all_files_seen): Check the predefined_items_dir.
|
|
||||||
+ (desktop_finalize): Unref the predefined_items_dir.
|
|
||||||
+ (merged_monitor_destroy): Remove the monitor from the predefined_items_dir.
|
|
||||||
+
|
|
||||||
+2008-09-11 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-desktop-directory.c
|
|
||||||
+ (discard_directory): New function; factor out some code from
|
|
||||||
+ update_desktop_directory().
|
|
||||||
+ (update_desktop_directory): Use discard_directory().
|
|
||||||
+
|
|
||||||
+2008-09-11 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-debug-log.h
|
|
||||||
+ (NAUTILUS_DEBUG_LOG_DOMAIN_DESKTOP_ITEMS): New log domain "desktop-items".
|
|
||||||
+
|
|
||||||
+2008-09-11 Federico Mena Quintero <federico@novell.com>
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/apps_nautilus_preferences.schemas.in
|
|
||||||
+ (/schemas/apps/nautilus/desktop/predefined_items_dir): New schema
|
|
||||||
+ for the directory for predefined desktop items. Desktop item
|
|
||||||
+ files in this directory will be shown in the user's desktop.
|
|
||||||
+
|
|
||||||
+ * libnautilus-private/nautilus-global-preferences.h
|
|
||||||
+ (NAUTILUS_PREFERENCES_DESKTOP_PREDEFINED_ITEMS_DIR): New macro for
|
|
||||||
+ the GConf key above.
|
|
||||||
+
|
|
||||||
2008-08-04 Christian Neumair <cneumair@gnome.org>
|
|
||||||
|
|
||||||
* NEWS:
|
|
||||||
diff --git a/libnautilus-private/apps_nautilus_preferences.schemas.in b/libnautilus-private/apps_nautilus_preferences.schemas.in
|
diff --git a/libnautilus-private/apps_nautilus_preferences.schemas.in b/libnautilus-private/apps_nautilus_preferences.schemas.in
|
||||||
index ca45081..c180132 100644
|
index ca45081..c180132 100644
|
||||||
--- a/libnautilus-private/apps_nautilus_preferences.schemas.in
|
--- a/libnautilus-private/apps_nautilus_preferences.schemas.in
|
||||||
@ -190,7 +98,7 @@ index ad0152e..7ed1af1 100644
|
|||||||
void nautilus_debug_log (gboolean is_milestone, const char *domain, const char *format, ...);
|
void nautilus_debug_log (gboolean is_milestone, const char *domain, const char *format, ...);
|
||||||
|
|
||||||
diff --git a/libnautilus-private/nautilus-desktop-directory.c b/libnautilus-private/nautilus-desktop-directory.c
|
diff --git a/libnautilus-private/nautilus-desktop-directory.c b/libnautilus-private/nautilus-desktop-directory.c
|
||||||
index 0c5333e..111d09d 100644
|
index 0c5333e..b08abef 100644
|
||||||
--- a/libnautilus-private/nautilus-desktop-directory.c
|
--- a/libnautilus-private/nautilus-desktop-directory.c
|
||||||
+++ b/libnautilus-private/nautilus-desktop-directory.c
|
+++ b/libnautilus-private/nautilus-desktop-directory.c
|
||||||
@@ -24,34 +24,83 @@
|
@@ -24,34 +24,83 @@
|
||||||
@ -333,7 +241,7 @@ index 0c5333e..111d09d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static guint
|
static guint
|
||||||
@@ -114,15 +187,19 @@ merged_callback_destroy (MergedCallback *merged_callback)
|
@@ -114,15 +187,72 @@ merged_callback_destroy (MergedCallback *merged_callback)
|
||||||
g_assert (NAUTILUS_IS_DESKTOP_DIRECTORY (merged_callback->desktop_dir));
|
g_assert (NAUTILUS_IS_DESKTOP_DIRECTORY (merged_callback->desktop_dir));
|
||||||
|
|
||||||
g_list_free (merged_callback->non_ready_directories);
|
g_list_free (merged_callback->non_ready_directories);
|
||||||
@ -342,6 +250,59 @@ index 0c5333e..111d09d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
+add_file_from_pair_to_list_cb (gpointer key, gpointer value, gpointer data)
|
||||||
|
+{
|
||||||
|
+ FilePair *pair;
|
||||||
|
+ GList **list_ptr;
|
||||||
|
+ NautilusFile *file;
|
||||||
|
+
|
||||||
|
+ pair = value;
|
||||||
|
+ list_ptr = data;
|
||||||
|
+
|
||||||
|
+ file = pair->predefined_overrides_user ? pair->predefined_file : pair->user_file;
|
||||||
|
+ nautilus_file_ref (file);
|
||||||
|
+
|
||||||
|
+ *list_ptr = g_list_prepend (*list_ptr, file);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static GList *
|
||||||
|
+get_combined_files (NautilusDesktopDirectory *desktop)
|
||||||
|
+{
|
||||||
|
+ GList *combined;
|
||||||
|
+
|
||||||
|
+ combined = NULL;
|
||||||
|
+ g_hash_table_foreach (desktop->details->name_to_pairs_hash, add_file_from_pair_to_list_cb, &combined);
|
||||||
|
+ return combined;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static GList *
|
||||||
|
+get_desktop_links (NautilusDesktopDirectory *desktop, gboolean include_tentative_files)
|
||||||
|
+{
|
||||||
|
+ if (include_tentative_files) {
|
||||||
|
+ return nautilus_file_list_copy (NAUTILUS_DIRECTORY (desktop)->details->file_list);
|
||||||
|
+ } else {
|
||||||
|
+ /* This is because nautilus-directory.c:real_get_file_list() stripts out the tentative files */
|
||||||
|
+ return GNOME_CALL_PARENT_WITH_DEFAULT (NAUTILUS_DIRECTORY_CLASS, get_file_list, (NAUTILUS_DIRECTORY (desktop)), NULL);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static GList *
|
||||||
|
+get_file_list (NautilusDesktopDirectory *desktop, gboolean include_tentative_files)
|
||||||
|
+{
|
||||||
|
+ GList *combined_file_list;
|
||||||
|
+ GList *file_list_from_desktop_links;
|
||||||
|
+
|
||||||
|
+ combined_file_list = get_combined_files (desktop);
|
||||||
|
+
|
||||||
|
+ file_list_from_desktop_links = get_desktop_links (desktop, include_tentative_files);
|
||||||
|
+
|
||||||
|
+ combined_file_list = g_list_concat (combined_file_list, file_list_from_desktop_links);
|
||||||
|
+
|
||||||
|
+ return combined_file_list;
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void
|
||||||
merged_callback_check_done (MergedCallback *merged_callback)
|
merged_callback_check_done (MergedCallback *merged_callback)
|
||||||
{
|
{
|
||||||
+ NautilusDesktopDirectory *desktop;
|
+ NautilusDesktopDirectory *desktop;
|
||||||
@ -355,14 +316,14 @@ index 0c5333e..111d09d 100644
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,10 +207,18 @@ merged_callback_check_done (MergedCallback *merged_callback)
|
@@ -130,10 +260,18 @@ merged_callback_check_done (MergedCallback *merged_callback)
|
||||||
g_hash_table_steal (merged_callback->desktop_dir->details->callbacks, merged_callback);
|
g_hash_table_steal (merged_callback->desktop_dir->details->callbacks, merged_callback);
|
||||||
|
|
||||||
/* We are ready, so do the real callback. */
|
/* We are ready, so do the real callback. */
|
||||||
- (* merged_callback->callback) (NAUTILUS_DIRECTORY (merged_callback->desktop_dir),
|
- (* merged_callback->callback) (NAUTILUS_DIRECTORY (merged_callback->desktop_dir),
|
||||||
- merged_callback->merged_file_list,
|
- merged_callback->merged_file_list,
|
||||||
+
|
+
|
||||||
+ files = desktop_get_file_list (NAUTILUS_DIRECTORY (desktop));
|
+ files = get_file_list (NAUTILUS_DIRECTORY (desktop), TRUE);
|
||||||
+
|
+
|
||||||
+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_DEBUG_DESKTOP_ITEMS, files,
|
+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_DEBUG_DESKTOP_ITEMS, files,
|
||||||
+ "merged_callback_check_done: we are done; calling callback with files");
|
+ "merged_callback_check_done: we are done; calling callback with files");
|
||||||
@ -376,7 +337,7 @@ index 0c5333e..111d09d 100644
|
|||||||
/* And we are done. */
|
/* And we are done. */
|
||||||
merged_callback_destroy (merged_callback);
|
merged_callback_destroy (merged_callback);
|
||||||
}
|
}
|
||||||
@@ -144,7 +229,330 @@ merged_callback_remove_directory (MergedCallback *merged_callback,
|
@@ -144,7 +282,330 @@ merged_callback_remove_directory (MergedCallback *merged_callback,
|
||||||
{
|
{
|
||||||
merged_callback->non_ready_directories = g_list_remove
|
merged_callback->non_ready_directories = g_list_remove
|
||||||
(merged_callback->non_ready_directories, directory);
|
(merged_callback->non_ready_directories, directory);
|
||||||
@ -708,7 +669,7 @@ index 0c5333e..111d09d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -153,6 +561,8 @@ directory_ready_callback (NautilusDirectory *directory,
|
@@ -153,6 +614,8 @@ directory_ready_callback (NautilusDirectory *directory,
|
||||||
gpointer callback_data)
|
gpointer callback_data)
|
||||||
{
|
{
|
||||||
MergedCallback *merged_callback;
|
MergedCallback *merged_callback;
|
||||||
@ -717,7 +678,7 @@ index 0c5333e..111d09d 100644
|
|||||||
|
|
||||||
g_assert (NAUTILUS_IS_DIRECTORY (directory));
|
g_assert (NAUTILUS_IS_DIRECTORY (directory));
|
||||||
g_assert (callback_data != NULL);
|
g_assert (callback_data != NULL);
|
||||||
@@ -160,13 +570,13 @@ directory_ready_callback (NautilusDirectory *directory,
|
@@ -160,13 +623,13 @@ directory_ready_callback (NautilusDirectory *directory,
|
||||||
merged_callback = callback_data;
|
merged_callback = callback_data;
|
||||||
g_assert (g_list_find (merged_callback->non_ready_directories, directory) != NULL);
|
g_assert (g_list_find (merged_callback->non_ready_directories, directory) != NULL);
|
||||||
|
|
||||||
@ -735,7 +696,7 @@ index 0c5333e..111d09d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -179,6 +589,12 @@ desktop_call_when_ready (NautilusDirectory *directory,
|
@@ -179,6 +642,12 @@ desktop_call_when_ready (NautilusDirectory *directory,
|
||||||
NautilusDesktopDirectory *desktop;
|
NautilusDesktopDirectory *desktop;
|
||||||
MergedCallback search_key, *merged_callback;
|
MergedCallback search_key, *merged_callback;
|
||||||
|
|
||||||
@ -748,15 +709,17 @@ index 0c5333e..111d09d 100644
|
|||||||
desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
||||||
|
|
||||||
/* Check to be sure we aren't overwriting. */
|
/* Check to be sure we aren't overwriting. */
|
||||||
@@ -194,36 +610,36 @@ desktop_call_when_ready (NautilusDirectory *directory,
|
@@ -194,36 +663,49 @@ desktop_call_when_ready (NautilusDirectory *directory,
|
||||||
merged_callback->desktop_dir = desktop;
|
merged_callback->desktop_dir = desktop;
|
||||||
merged_callback->callback = callback;
|
merged_callback->callback = callback;
|
||||||
merged_callback->callback_data = callback_data;
|
merged_callback->callback_data = callback_data;
|
||||||
- merged_callback->wait_for_attributes = file_attributes;
|
- merged_callback->wait_for_attributes = file_attributes;
|
||||||
- merged_callback->wait_for_file_list = wait_for_file_list;
|
- merged_callback->wait_for_file_list = wait_for_file_list;
|
||||||
- merged_callback->non_ready_directories = g_list_prepend
|
|
||||||
- (merged_callback->non_ready_directories, directory);
|
|
||||||
+
|
+
|
||||||
|
+ /* The three non-ready directories are ourselves, the real_directory and the predefined_items_dir */
|
||||||
|
+
|
||||||
|
merged_callback->non_ready_directories = g_list_prepend
|
||||||
|
(merged_callback->non_ready_directories, directory);
|
||||||
merged_callback->non_ready_directories = g_list_prepend
|
merged_callback->non_ready_directories = g_list_prepend
|
||||||
(merged_callback->non_ready_directories, desktop->details->real_directory);
|
(merged_callback->non_ready_directories, desktop->details->real_directory);
|
||||||
|
|
||||||
@ -784,15 +747,6 @@ index 0c5333e..111d09d 100644
|
|||||||
+ file_attributes,
|
+ file_attributes,
|
||||||
+ TRUE,
|
+ TRUE,
|
||||||
directory_ready_callback, merged_callback);
|
directory_ready_callback, merged_callback);
|
||||||
- nautilus_directory_call_when_ready_internal
|
|
||||||
- (directory,
|
|
||||||
- NULL,
|
|
||||||
- merged_callback->wait_for_attributes,
|
|
||||||
- merged_callback->wait_for_file_list,
|
|
||||||
- directory_ready_callback,
|
|
||||||
- NULL,
|
|
||||||
- merged_callback);
|
|
||||||
-
|
|
||||||
+
|
+
|
||||||
+ if (desktop->details->predefined_items_dir != NULL) {
|
+ if (desktop->details->predefined_items_dir != NULL) {
|
||||||
+ nautilus_directory_call_when_ready
|
+ nautilus_directory_call_when_ready
|
||||||
@ -801,10 +755,22 @@ index 0c5333e..111d09d 100644
|
|||||||
+ TRUE,
|
+ TRUE,
|
||||||
+ directory_ready_callback, merged_callback);
|
+ directory_ready_callback, merged_callback);
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
nautilus_directory_call_when_ready_internal
|
||||||
|
(directory,
|
||||||
|
NULL,
|
||||||
|
- merged_callback->wait_for_attributes,
|
||||||
|
- merged_callback->wait_for_file_list,
|
||||||
|
+ file_attributes,
|
||||||
|
+ FALSE, /* ... but the desktop directory doesn't support wait_for_file_list = TRUE */
|
||||||
|
directory_ready_callback,
|
||||||
|
NULL,
|
||||||
|
merged_callback);
|
||||||
|
-
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -235,6 +651,10 @@ desktop_cancel_callback (NautilusDirectory *directory,
|
@@ -235,6 +717,10 @@ desktop_cancel_callback (NautilusDirectory *directory,
|
||||||
MergedCallback search_key, *merged_callback;
|
MergedCallback search_key, *merged_callback;
|
||||||
GList *node;
|
GList *node;
|
||||||
|
|
||||||
@ -815,7 +781,7 @@ index 0c5333e..111d09d 100644
|
|||||||
desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
||||||
|
|
||||||
/* Find the entry in the table. */
|
/* Find the entry in the table. */
|
||||||
@@ -267,15 +687,19 @@ merged_monitor_destroy (MergedMonitor *monitor)
|
@@ -267,15 +753,19 @@ merged_monitor_destroy (MergedMonitor *monitor)
|
||||||
/* Call through to the real directory remove calls. */
|
/* Call through to the real directory remove calls. */
|
||||||
nautilus_directory_file_monitor_remove (desktop->details->real_directory, monitor);
|
nautilus_directory_file_monitor_remove (desktop->details->real_directory, monitor);
|
||||||
|
|
||||||
@ -838,7 +804,7 @@ index 0c5333e..111d09d 100644
|
|||||||
{
|
{
|
||||||
GList **merged_list;
|
GList **merged_list;
|
||||||
|
|
||||||
@@ -285,6 +709,72 @@ build_merged_callback_list (NautilusDirectory *directory,
|
@@ -285,6 +775,66 @@ build_merged_callback_list (NautilusDirectory *directory,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -901,17 +867,11 @@ index 0c5333e..111d09d 100644
|
|||||||
+
|
+
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static GList *
|
|
||||||
+get_desktop_links (NautilusDesktopDirectory *desktop)
|
|
||||||
+{
|
|
||||||
+ return GNOME_CALL_PARENT_WITH_DEFAULT (NAUTILUS_DIRECTORY_CLASS, get_file_list, (NAUTILUS_DIRECTORY (desktop)), NULL);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
+static void
|
||||||
desktop_monitor_add (NautilusDirectory *directory,
|
desktop_monitor_add (NautilusDirectory *directory,
|
||||||
gconstpointer client,
|
gconstpointer client,
|
||||||
gboolean monitor_hidden_files,
|
gboolean monitor_hidden_files,
|
||||||
@@ -295,7 +785,14 @@ desktop_monitor_add (NautilusDirectory *directory,
|
@@ -295,7 +845,14 @@ desktop_monitor_add (NautilusDirectory *directory,
|
||||||
{
|
{
|
||||||
NautilusDesktopDirectory *desktop;
|
NautilusDesktopDirectory *desktop;
|
||||||
MergedMonitor *monitor;
|
MergedMonitor *monitor;
|
||||||
@ -927,12 +887,23 @@ index 0c5333e..111d09d 100644
|
|||||||
|
|
||||||
desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
||||||
|
|
||||||
@@ -315,25 +812,40 @@ desktop_monitor_add (NautilusDirectory *directory,
|
@@ -315,25 +872,40 @@ desktop_monitor_add (NautilusDirectory *directory,
|
||||||
monitor->monitor_backup_files = monitor_backup_files;
|
monitor->monitor_backup_files = monitor_backup_files;
|
||||||
monitor->monitor_attributes = file_attributes;
|
monitor->monitor_attributes = file_attributes;
|
||||||
|
|
||||||
- /* Call through to the real directory add calls. */
|
- /* Call through to the real directory add calls. */
|
||||||
- merged_callback_list = NULL;
|
- merged_callback_list = NULL;
|
||||||
|
-
|
||||||
|
- /* Call up to real dir */
|
||||||
|
- nautilus_directory_file_monitor_add
|
||||||
|
- (desktop->details->real_directory, monitor,
|
||||||
|
- monitor_hidden_files, monitor_backup_files,
|
||||||
|
- file_attributes,
|
||||||
|
- build_merged_callback_list, &merged_callback_list);
|
||||||
|
-
|
||||||
|
- /* Handle the desktop part */
|
||||||
|
- merged_callback_list = g_list_concat (merged_callback_list,
|
||||||
|
- nautilus_file_list_copy (directory->details->file_list));
|
||||||
+ /* Call through to the real directories' add calls. */
|
+ /* Call through to the real directories' add calls. */
|
||||||
+
|
+
|
||||||
+ add_file_monitor_and_emit_paired_files (desktop,
|
+ add_file_monitor_and_emit_paired_files (desktop,
|
||||||
@ -955,23 +926,12 @@ index 0c5333e..111d09d 100644
|
|||||||
+
|
+
|
||||||
+ /* Call the callback on our desktop links */
|
+ /* Call the callback on our desktop links */
|
||||||
|
|
||||||
- /* Call up to real dir */
|
|
||||||
- nautilus_directory_file_monitor_add
|
|
||||||
- (desktop->details->real_directory, monitor,
|
|
||||||
- monitor_hidden_files, monitor_backup_files,
|
|
||||||
- file_attributes,
|
|
||||||
- build_merged_callback_list, &merged_callback_list);
|
|
||||||
-
|
|
||||||
- /* Handle the desktop part */
|
|
||||||
- merged_callback_list = g_list_concat (merged_callback_list,
|
|
||||||
- nautilus_file_list_copy (directory->details->file_list));
|
|
||||||
-
|
|
||||||
-
|
-
|
||||||
if (callback != NULL) {
|
if (callback != NULL) {
|
||||||
- (* callback) (directory, merged_callback_list, callback_data);
|
- (* callback) (directory, merged_callback_list, callback_data);
|
||||||
+ GList *desktop_link_files;
|
+ GList *desktop_link_files;
|
||||||
+
|
+
|
||||||
+ desktop_link_files = get_desktop_links (desktop);
|
+ desktop_link_files = get_desktop_links (desktop, TRUE);
|
||||||
+
|
+
|
||||||
+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_DEBUG_DESKTOP_ITEMS, desktop_link_files,
|
+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_DEBUG_DESKTOP_ITEMS, desktop_link_files,
|
||||||
+ "desktop_monitor_add: calling callback %p on desktop link files",
|
+ "desktop_monitor_add: calling callback %p on desktop link files",
|
||||||
@ -984,7 +944,7 @@ index 0c5333e..111d09d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -342,6 +854,10 @@ desktop_monitor_remove (NautilusDirectory *directory,
|
@@ -342,6 +914,10 @@ desktop_monitor_remove (NautilusDirectory *directory,
|
||||||
{
|
{
|
||||||
NautilusDesktopDirectory *desktop;
|
NautilusDesktopDirectory *desktop;
|
||||||
MergedMonitor *monitor;
|
MergedMonitor *monitor;
|
||||||
@ -995,7 +955,7 @@ index 0c5333e..111d09d 100644
|
|||||||
|
|
||||||
desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
||||||
|
|
||||||
@@ -354,55 +870,178 @@ desktop_monitor_remove (NautilusDirectory *directory,
|
@@ -354,55 +930,143 @@ desktop_monitor_remove (NautilusDirectory *directory,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1133,32 +1093,6 @@ index 0c5333e..111d09d 100644
|
|||||||
+ result);
|
+ result);
|
||||||
+
|
+
|
||||||
+ return result;
|
+ return result;
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+add_file_from_pair_to_list_cb (gpointer key, gpointer value, gpointer data)
|
|
||||||
+{
|
|
||||||
+ FilePair *pair;
|
|
||||||
+ GList **list_ptr;
|
|
||||||
+ NautilusFile *file;
|
|
||||||
+
|
|
||||||
+ pair = value;
|
|
||||||
+ list_ptr = data;
|
|
||||||
+
|
|
||||||
+ file = pair->predefined_overrides_user ? pair->predefined_file : pair->user_file;
|
|
||||||
+ nautilus_file_ref (file);
|
|
||||||
+
|
|
||||||
+ *list_ptr = g_list_prepend (*list_ptr, file);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static GList *
|
|
||||||
+get_combined_files (NautilusDesktopDirectory *desktop)
|
|
||||||
+{
|
|
||||||
+ GList *combined;
|
|
||||||
+
|
|
||||||
+ combined = NULL;
|
|
||||||
+ g_hash_table_foreach (desktop->details->name_to_pairs_hash, add_file_from_pair_to_list_cb, &combined);
|
|
||||||
+ return combined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GList *
|
static GList *
|
||||||
@ -1170,26 +1104,17 @@ index 0c5333e..111d09d 100644
|
|||||||
- desktop_dir_file_list = GNOME_CALL_PARENT_WITH_DEFAULT
|
- desktop_dir_file_list = GNOME_CALL_PARENT_WITH_DEFAULT
|
||||||
- (NAUTILUS_DIRECTORY_CLASS, get_file_list, (directory), NULL);
|
- (NAUTILUS_DIRECTORY_CLASS, get_file_list, (directory), NULL);
|
||||||
- return g_list_concat (real_dir_file_list, desktop_dir_file_list);
|
- return g_list_concat (real_dir_file_list, desktop_dir_file_list);
|
||||||
+ NautilusDesktopDirectory *desktop;
|
+ GList *result;
|
||||||
+ GList *combined_file_list;
|
|
||||||
+ GList *file_list_from_desktop_links;
|
|
||||||
+
|
+
|
||||||
+ desktop = NAUTILUS_DESKTOP_DIRECTORY (directory);
|
+ result = get_file_list (NAUTILUS_DESKTOP_DIRECTORY (directory), FALSE);
|
||||||
+
|
+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_DEBUG_DESKTOP_ITEMS, result,
|
||||||
+ combined_file_list = get_combined_files (desktop);
|
|
||||||
+
|
|
||||||
+ file_list_from_desktop_links = get_desktop_links (desktop);
|
|
||||||
+
|
|
||||||
+ combined_file_list = g_list_concat (combined_file_list, file_list_from_desktop_links);
|
|
||||||
+
|
|
||||||
+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_DEBUG_DESKTOP_ITEMS, combined_file_list,
|
|
||||||
+ "desktop_get_file_list(): returning list of files");
|
+ "desktop_get_file_list(): returning list of files");
|
||||||
+
|
+
|
||||||
+ return combined_file_list;
|
+ return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
NautilusDirectory *
|
NautilusDirectory *
|
||||||
@@ -412,7 +1051,6 @@ nautilus_desktop_directory_get_real_directory (NautilusDesktopDirectory *desktop
|
@@ -412,7 +1076,6 @@ nautilus_desktop_directory_get_real_directory (NautilusDesktopDirectory *desktop
|
||||||
return desktop->details->real_directory;
|
return desktop->details->real_directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1197,7 +1122,7 @@ index 0c5333e..111d09d 100644
|
|||||||
static void
|
static void
|
||||||
desktop_finalize (GObject *object)
|
desktop_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
@@ -422,39 +1060,431 @@ desktop_finalize (GObject *object)
|
@@ -422,39 +1085,431 @@ desktop_finalize (GObject *object)
|
||||||
|
|
||||||
nautilus_directory_unref (desktop->details->real_directory);
|
nautilus_directory_unref (desktop->details->real_directory);
|
||||||
|
|
||||||
@ -1237,7 +1162,8 @@ index 0c5333e..111d09d 100644
|
|||||||
+
|
+
|
||||||
+static gboolean
|
+static gboolean
|
||||||
+directories_are_done_loading (NautilusDesktopDirectory *desktop)
|
+directories_are_done_loading (NautilusDesktopDirectory *desktop)
|
||||||
+{
|
{
|
||||||
|
- nautilus_directory_emit_done_loading (NAUTILUS_DIRECTORY (desktop));
|
||||||
+ gboolean real_is_done;
|
+ gboolean real_is_done;
|
||||||
+ gboolean predefined_is_done;
|
+ gboolean predefined_is_done;
|
||||||
+
|
+
|
||||||
@ -1246,8 +1172,8 @@ index 0c5333e..111d09d 100644
|
|||||||
+ predefined_is_done = (desktop->details->predefined_items_dir == NULL || !desktop->details->predefined_items_dir_pending);
|
+ predefined_is_done = (desktop->details->predefined_items_dir == NULL || !desktop->details->predefined_items_dir_pending);
|
||||||
+
|
+
|
||||||
+ return real_is_done && predefined_is_done;
|
+ return real_is_done && predefined_is_done;
|
||||||
+}
|
}
|
||||||
+
|
|
||||||
+static void
|
+static void
|
||||||
+emit_pending_callback_cb (gpointer key, gpointer value, gpointer data)
|
+emit_pending_callback_cb (gpointer key, gpointer value, gpointer data)
|
||||||
+{
|
+{
|
||||||
@ -1256,14 +1182,14 @@ index 0c5333e..111d09d 100644
|
|||||||
+ merged_callback = key;
|
+ merged_callback = key;
|
||||||
+ merged_callback_check_done (merged_callback);
|
+ merged_callback_check_done (merged_callback);
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+emit_pending_callbacks (NautilusDesktopDirectory *desktop)
|
|
||||||
{
|
|
||||||
- nautilus_directory_emit_done_loading (NAUTILUS_DIRECTORY (desktop));
|
|
||||||
+ g_hash_table_foreach (desktop->details->callbacks, emit_pending_callback_cb, desktop);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
-forward_files_added_cover (NautilusDirectory *real_directory,
|
||||||
|
+emit_pending_callbacks (NautilusDesktopDirectory *desktop)
|
||||||
|
+{
|
||||||
|
+ g_hash_table_foreach (desktop->details->callbacks, emit_pending_callback_cb, desktop);
|
||||||
|
+}
|
||||||
|
+
|
||||||
+static void
|
+static void
|
||||||
+done_loading_callback (NautilusDirectory *directory,
|
+done_loading_callback (NautilusDirectory *directory,
|
||||||
+ NautilusDesktopDirectory *desktop)
|
+ NautilusDesktopDirectory *desktop)
|
||||||
@ -1290,9 +1216,8 @@ index 0c5333e..111d09d 100644
|
|||||||
+ get_debug_dirname (desktop, directory));
|
+ get_debug_dirname (desktop, directory));
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
|
+
|
||||||
static void
|
+static void
|
||||||
-forward_files_added_cover (NautilusDirectory *real_directory,
|
|
||||||
+forward_files_added_cover (NautilusDirectory *directory,
|
+forward_files_added_cover (NautilusDirectory *directory,
|
||||||
GList *files,
|
GList *files,
|
||||||
gpointer callback_data)
|
gpointer callback_data)
|
||||||
@ -1636,7 +1561,7 @@ index 0c5333e..111d09d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -464,17 +1494,10 @@ update_desktop_directory (NautilusDesktopDirectory *desktop)
|
@@ -464,17 +1519,10 @@ update_desktop_directory (NautilusDesktopDirectory *desktop)
|
||||||
char *desktop_uri;
|
char *desktop_uri;
|
||||||
NautilusDirectory *real_directory;
|
NautilusDirectory *real_directory;
|
||||||
|
|
||||||
@ -1657,7 +1582,7 @@ index 0c5333e..111d09d 100644
|
|||||||
|
|
||||||
desktop_path = nautilus_get_desktop_directory ();
|
desktop_path = nautilus_get_desktop_directory ();
|
||||||
desktop_uri = g_filename_to_uri (desktop_path, NULL, NULL);
|
desktop_uri = g_filename_to_uri (desktop_path, NULL, NULL);
|
||||||
@@ -482,6 +1505,8 @@ update_desktop_directory (NautilusDesktopDirectory *desktop)
|
@@ -482,6 +1530,8 @@ update_desktop_directory (NautilusDesktopDirectory *desktop)
|
||||||
g_free (desktop_uri);
|
g_free (desktop_uri);
|
||||||
g_free (desktop_path);
|
g_free (desktop_path);
|
||||||
|
|
||||||
@ -1666,7 +1591,7 @@ index 0c5333e..111d09d 100644
|
|||||||
g_signal_connect_object (real_directory, "done_loading",
|
g_signal_connect_object (real_directory, "done_loading",
|
||||||
G_CALLBACK (done_loading_callback), desktop, 0);
|
G_CALLBACK (done_loading_callback), desktop, 0);
|
||||||
g_signal_connect_object (real_directory, "files_added",
|
g_signal_connect_object (real_directory, "files_added",
|
||||||
@@ -490,6 +1515,7 @@ update_desktop_directory (NautilusDesktopDirectory *desktop)
|
@@ -490,6 +1540,7 @@ update_desktop_directory (NautilusDesktopDirectory *desktop)
|
||||||
G_CALLBACK (forward_files_changed_cover), desktop, 0);
|
G_CALLBACK (forward_files_changed_cover), desktop, 0);
|
||||||
|
|
||||||
desktop->details->real_directory = real_directory;
|
desktop->details->real_directory = real_directory;
|
||||||
@ -1674,7 +1599,7 @@ index 0c5333e..111d09d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -500,6 +1526,59 @@ desktop_directory_changed_callback (gpointer data)
|
@@ -500,8 +1551,64 @@ desktop_directory_changed_callback (gpointer data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1733,8 +1658,13 @@ index 0c5333e..111d09d 100644
|
|||||||
+static void
|
+static void
|
||||||
nautilus_desktop_directory_instance_init (NautilusDesktopDirectory *desktop)
|
nautilus_desktop_directory_instance_init (NautilusDesktopDirectory *desktop)
|
||||||
{
|
{
|
||||||
|
+ nautilus_debug_log (TRUE, NAUTILUS_DEBUG_LOG_DOMAIN_DESKTOP_ITEMS,
|
||||||
|
+ "Creating the NautilusDesktopDirectory");
|
||||||
|
+
|
||||||
desktop->details = g_new0 (NautilusDesktopDirectoryDetails, 1);
|
desktop->details = g_new0 (NautilusDesktopDirectoryDetails, 1);
|
||||||
@@ -510,11 +1589,19 @@ nautilus_desktop_directory_instance_init (NautilusDesktopDirectory *desktop)
|
|
||||||
|
desktop->details->callbacks = g_hash_table_new_full
|
||||||
|
@@ -510,11 +1617,19 @@ nautilus_desktop_directory_instance_init (NautilusDesktopDirectory *desktop)
|
||||||
desktop->details->monitors = g_hash_table_new_full (NULL, NULL,
|
desktop->details->monitors = g_hash_table_new_full (NULL, NULL,
|
||||||
NULL, (GDestroyNotify)merged_monitor_destroy);
|
NULL, (GDestroyNotify)merged_monitor_destroy);
|
||||||
|
|
||||||
@ -1754,6 +1684,50 @@ index 0c5333e..111d09d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
diff --git a/libnautilus-private/nautilus-desktop-icon-file.c b/libnautilus-private/nautilus-desktop-icon-file.c
|
||||||
|
index 3802dd9..120df10 100644
|
||||||
|
--- a/libnautilus-private/nautilus-desktop-icon-file.c
|
||||||
|
+++ b/libnautilus-private/nautilus-desktop-icon-file.c
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
#include <config.h>
|
||||||
|
#include "nautilus-desktop-icon-file.h"
|
||||||
|
|
||||||
|
+#include "nautilus-debug-log.h"
|
||||||
|
#include "nautilus-directory-notify.h"
|
||||||
|
#include "nautilus-directory-private.h"
|
||||||
|
#include "nautilus-file-attributes.h"
|
||||||
|
@@ -291,6 +292,9 @@ nautilus_desktop_icon_file_new (NautilusDesktopLink *link)
|
||||||
|
list.prev = NULL;
|
||||||
|
nautilus_directory_emit_files_added (directory, &list);
|
||||||
|
|
||||||
|
+ nautilus_debug_log_with_file_list (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_DEBUG_DESKTOP_ITEMS, &list,
|
||||||
|
+ "Created desktop icon file and notified directory:");
|
||||||
|
+
|
||||||
|
return icon_file;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/libnautilus-private/nautilus-desktop-link-monitor.c b/libnautilus-private/nautilus-desktop-link-monitor.c
|
||||||
|
index 9abdd64..976ccd8 100644
|
||||||
|
--- a/libnautilus-private/nautilus-desktop-link-monitor.c
|
||||||
|
+++ b/libnautilus-private/nautilus-desktop-link-monitor.c
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
+#include "nautilus-debug-log.h"
|
||||||
|
#include "nautilus-desktop-link-monitor.h"
|
||||||
|
#include "nautilus-desktop-link.h"
|
||||||
|
#include "nautilus-desktop-icon-file.h"
|
||||||
|
@@ -356,6 +357,9 @@ nautilus_desktop_link_monitor_init (gpointer object, gpointer klass)
|
||||||
|
GList *l, *mounts;
|
||||||
|
GMount *mount;
|
||||||
|
|
||||||
|
+ nautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_DESKTOP_ITEMS,
|
||||||
|
+ "Initializing desktop link monitor with all its links");
|
||||||
|
+
|
||||||
|
monitor = NAUTILUS_DESKTOP_LINK_MONITOR (object);
|
||||||
|
|
||||||
|
the_link_monitor = monitor;
|
||||||
diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c
|
diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c
|
||||||
index cbe0419..ba67a75 100644
|
index cbe0419..ba67a75 100644
|
||||||
--- a/libnautilus-private/nautilus-directory-async.c
|
--- a/libnautilus-private/nautilus-directory-async.c
|
||||||
@ -1794,3 +1768,25 @@ index e3de760..d414bed 100644
|
|||||||
|
|
||||||
void nautilus_global_preferences_init (void);
|
void nautilus_global_preferences_init (void);
|
||||||
char *nautilus_global_preferences_get_default_folder_viewer_preference_as_iid (void);
|
char *nautilus_global_preferences_get_default_folder_viewer_preference_as_iid (void);
|
||||||
|
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
|
||||||
|
index 6871bde..ea0fc61 100644
|
||||||
|
--- a/src/nautilus-desktop-window.c
|
||||||
|
+++ b/src/nautilus-desktop-window.c
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
#include <eel/eel-gtk-macros.h>
|
||||||
|
#include <eel/eel-vfs-extensions.h>
|
||||||
|
#include <libgnome/gnome-macros.h>
|
||||||
|
+#include <libnautilus-private/nautilus-debug-log.h>
|
||||||
|
#include <libnautilus-private/nautilus-file-utilities.h>
|
||||||
|
#include <libnautilus-private/nautilus-icon-names.h>
|
||||||
|
#include <gio/gio.h>
|
||||||
|
@@ -118,6 +119,9 @@ nautilus_desktop_window_new (NautilusApplication *application,
|
||||||
|
width_request = gdk_screen_get_width (screen);
|
||||||
|
height_request = gdk_screen_get_height (screen);
|
||||||
|
|
||||||
|
+ nautilus_debug_log (TRUE, NAUTILUS_DEBUG_LOG_DOMAIN_DESKTOP_ITEMS,
|
||||||
|
+ "Initializing desktop window with size %dx%d", width_request, height_request);
|
||||||
|
+
|
||||||
|
window = NAUTILUS_DESKTOP_WINDOW
|
||||||
|
(gtk_widget_new (nautilus_desktop_window_get_type(),
|
||||||
|
"app", application,
|
||||||
|
@ -1,3 +1,27 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 21 14:15:25 CDT 2008 - maw@suse.de
|
||||||
|
|
||||||
|
- Update to version 2.24.1:
|
||||||
|
+ Fix saving of spatial window geometry on close
|
||||||
|
+ Remove trailing spaces on filenames when copying to FAT file
|
||||||
|
systems
|
||||||
|
+ Allow emblems that don't start with "emblem-"
|
||||||
|
+ On unmount close tabs that show the unmounted location
|
||||||
|
+ Fixed redraw issues with labels on zoom
|
||||||
|
+ Don't toggle sidebar splitter when dragging it
|
||||||
|
+ Fix bookmark issue that sometimes led to locations not loading
|
||||||
|
+ Don't show the "cancel" dialog after a timeout when displaying a dialog
|
||||||
|
+ Fix crashes and leaks
|
||||||
|
- Respin nautilus-bnc366100-bgo338933-ignore-foreign-desktop-files.diff.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 21 11:26:00 CDT 2008 - federico@novell.com
|
||||||
|
|
||||||
|
- Updated nautilus-sysadmin-desktop-items.diff to fix
|
||||||
|
https://bugzilla.novell.com/show_bug.cgi?id=436750 - the built-in
|
||||||
|
desktop links like Home, Trash, and volumes were not being shown at
|
||||||
|
all.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 25 16:51:00 CDT 2008 - federico@novell.com
|
Thu Sep 25 16:51:00 CDT 2008 - federico@novell.com
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package nautilus (Version 2.24.0)
|
# spec file for package nautilus (Version 2.24.1)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -40,7 +40,7 @@ BuildRequires: perl-XML-Parser
|
|||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: Productivity/File utilities
|
Group: Productivity/File utilities
|
||||||
Version: 2.24.0
|
Version: 2.24.1
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: The GNOME 2.x Desktop File Manager
|
Summary: The GNOME 2.x Desktop File Manager
|
||||||
Source: ftp://ftp.gnome.org/pub/gnome/sources/nautilus/2.20/%{name}-%{version}.tar.bz2
|
Source: ftp://ftp.gnome.org/pub/gnome/sources/nautilus/2.20/%{name}-%{version}.tar.bz2
|
||||||
@ -211,6 +211,24 @@ fi
|
|||||||
%{_datadir}/gtk-doc/html/libnautilus-extension
|
%{_datadir}/gtk-doc/html/libnautilus-extension
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 21 2008 maw@suse.de
|
||||||
|
- Update to version 2.24.1:
|
||||||
|
+ Fix saving of spatial window geometry on close
|
||||||
|
+ Remove trailing spaces on filenames when copying to FAT file
|
||||||
|
systems
|
||||||
|
+ Allow emblems that don't start with "emblem-"
|
||||||
|
+ On unmount close tabs that show the unmounted location
|
||||||
|
+ Fixed redraw issues with labels on zoom
|
||||||
|
+ Don't toggle sidebar splitter when dragging it
|
||||||
|
+ Fix bookmark issue that sometimes led to locations not loading
|
||||||
|
+ Don't show the "cancel" dialog after a timeout when displaying a dialog
|
||||||
|
+ Fix crashes and leaks
|
||||||
|
- Respin nautilus-bnc366100-bgo338933-ignore-foreign-desktop-files.diff.
|
||||||
|
* Tue Oct 21 2008 federico@novell.com
|
||||||
|
- Updated nautilus-sysadmin-desktop-items.diff to fix
|
||||||
|
https://bugzilla.novell.com/show_bug.cgi?id=436750 - the built-in
|
||||||
|
desktop links like Home, Trash, and volumes were not being shown at
|
||||||
|
all.
|
||||||
* Thu Sep 25 2008 federico@novell.com
|
* Thu Sep 25 2008 federico@novell.com
|
||||||
- Removed nautilus-bnc368446-network-in-places.patch to fix
|
- Removed nautilus-bnc368446-network-in-places.patch to fix
|
||||||
https://bugzilla.novell.com/show_bug.cgi?id=428968 - the Places
|
https://bugzilla.novell.com/show_bug.cgi?id=428968 - the Places
|
||||||
|
Loading…
Reference in New Issue
Block a user