[frogr] Remove picture from model after a successful upload
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Remove picture from model after a successful upload
- Date: Tue, 18 Jan 2011 22:06:25 +0000 (UTC)
commit 011c448a544229272e19b3ad5566c25d2a688040
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Tue Jan 18 23:02:05 2011 +0100
Remove picture from model after a successful upload
src/frogr-controller.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 2b92bf9..5ab043b 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -830,6 +830,14 @@ _complete_picture_upload_on_idle (gpointer data)
if (callback)
callback (source_object, picture, error);
+ /* Remove it from the model if no error happened */
+ if (!error)
+ {
+ FrogrMainViewModel *mainview_model = NULL;
+ mainview_model = frogr_main_view_get_model (priv->mainview);
+ frogr_main_view_model_remove_picture (mainview_model, picture);
+ }
+
g_object_unref (picture);
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]