[gthumb] call the import dialog in a idle callback
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb] call the import dialog in a idle callback
- Date: Thu, 7 Jan 2010 15:55:38 +0000 (UTC)
commit a5309a932c6257c3771ddef7a8c8511fef5040e2
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Jan 7 16:43:36 2010 +0100
call the import dialog in a idle callback
extensions/photo_importer/callbacks.c | 39 +++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/extensions/photo_importer/callbacks.c b/extensions/photo_importer/callbacks.c
index b8dc23e..d1883ac 100644
--- a/extensions/photo_importer/callbacks.c
+++ b/extensions/photo_importer/callbacks.c
@@ -93,9 +93,48 @@ pi__gth_browser_construct_cb (GthBrowser *browser)
}
+/* -- pi__import_photos_cb -- */
+
+
+typedef struct {
+ GthBrowser *browser;
+ GFile *source;
+} ImportData;
+
+
+static void
+import_data_unref (gpointer user_data)
+{
+ ImportData *data = user_data;
+
+ g_object_unref (data->browser);
+ g_object_unref (data->source);
+ g_free (data);
+}
+
+
+static gboolean
+import_photos_idle_cb (gpointer user_data)
+{
+ ImportData *data = user_data;
+
+ dlg_photo_importer (data->browser, data->source);
+ return FALSE;
+}
+
+
void
pi__import_photos_cb (GthBrowser *browser,
GFile *source)
{
+ ImportData *data;
+
+ data = g_new0 (ImportData, 1);
+ data->browser = g_object_ref (browser);
+ data->source = g_object_ref (source);
+ g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
+ import_photos_idle_cb,
+ data,
+ import_data_unref);
dlg_photo_importer (browser, source);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]