[nautilus/gnome-2-32: 25/283] Make sure NautilusFiles are ready.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-2-32: 25/283] Make sure NautilusFiles are ready.
- Date: Thu, 12 Aug 2010 11:06:07 +0000 (UTC)
commit 7e733bc1934c24ae3ec6fa7e0749c402a11c8778
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Apr 8 18:24:26 2010 +0200
Make sure NautilusFiles are ready.
.../nautilus-file-conflict-dialog.c | 35 ++++++++++++++++---
1 files changed, 29 insertions(+), 6 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-conflict-dialog.c b/libnautilus-private/nautilus-file-conflict-dialog.c
index e64ebc6..6c56811 100644
--- a/libnautilus-private/nautilus-file-conflict-dialog.c
+++ b/libnautilus-private/nautilus-file-conflict-dialog.c
@@ -60,8 +60,11 @@ G_DEFINE_TYPE (NautilusFileConflictDialog,
NautilusFileConflictDialogDetails))
static void
-build_dialog_appearance (NautilusFileConflictDialog *fcd)
+file_list_ready_cb (GList *files,
+ gpointer user_data)
{
+ NautilusFileConflictDialog *fcd = user_data;
+ NautilusFile *src, *dest, *dest_dir;
GtkDialog *dialog;
gboolean source_is_dir, dest_is_dir, should_show_type;
NautilusFileConflictDialogDetails *details;
@@ -71,15 +74,14 @@ build_dialog_appearance (NautilusFileConflictDialog *fcd)
char *size, *date, *type = NULL;
GdkPixbuf *pixbuf;
GtkWidget *image, *label, *button;
- NautilusFile *src, *dest, *dest_dir;
GString *str;
dialog = GTK_DIALOG (fcd);
details = fcd->details;
-
- src = nautilus_file_get (details->source);
- dest = nautilus_file_get (details->destination);
- dest_dir = nautilus_file_get (details->dest_dir);
+
+ dest_dir = g_list_nth_data (files, 0);
+ dest = g_list_nth_data (files, 1);
+ src = g_list_nth_data (files, 2);
src_name = nautilus_file_get_display_name (src);
dest_name = nautilus_file_get_display_name (dest);
@@ -248,6 +250,27 @@ build_dialog_appearance (NautilusFileConflictDialog *fcd)
}
static void
+build_dialog_appearance (NautilusFileConflictDialog *fcd)
+{
+ GList *files = NULL;
+ NautilusFile *src, *dest, *dest_dir;
+
+ src = nautilus_file_get (fcd->details->source);
+ dest = nautilus_file_get (fcd->details->destination);
+ dest_dir = nautilus_file_get (fcd->details->dest_dir);
+
+ files = g_list_prepend (files, src);
+ files = g_list_prepend (files, dest);
+ files = g_list_prepend (files, dest_dir);
+
+ nautilus_file_list_call_when_ready (files,
+ NAUTILUS_FILE_ATTRIBUTE_INFO |
+ NAUTILUS_FILE_ATTRIBUTE_LINK_INFO |
+ NAUTILUS_FILE_ATTRIBUTE_THUMBNAIL,
+ NULL, file_list_ready_cb, fcd);
+}
+
+static void
set_source_and_destination (GtkWidget *w,
GFile *source,
GFile *destination,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]