[frogr] Fixed bug adding pictures to groups
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Fixed bug adding pictures to groups
- Date: Sat, 5 Feb 2011 16:18:36 +0000 (UTC)
commit 63f469000ec1e61adb6fe7cf4de4f2e1df0102be
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Sat Feb 5 16:49:54 2011 +0100
Fixed bug adding pictures to groups
src/frogr-controller.c | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index addd8ae..56843a2 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -766,6 +766,7 @@ _add_to_group_cb (GObject *object, GAsyncResult *res, gpointer data)
if (g_slist_length (groups) > 0)
{
group = FROGR_GROUP (groups->data);
+ up_st->groups = groups;
_notify_adding_to_group (controller, picture, group);
fsp_session_add_to_group_async (session,
@@ -819,18 +820,22 @@ _add_picture_to_groups_on_idle (gpointer data)
if (priv->adding_to_set)
return TRUE;
- /* Mark the start of the process */
- priv->adding_to_group = TRUE;
+ /* Add pictures to groups, if any */
+ if (g_slist_length (groups) > 0)
+ {
+ /* Mark the start of the process */
+ priv->adding_to_group = TRUE;
- group = FROGR_GROUP (groups->data);
- _notify_adding_to_group (controller, picture, group);
+ group = FROGR_GROUP (groups->data);
+ _notify_adding_to_group (controller, picture, group);
- fsp_session_add_to_group_async (session,
- frogr_picture_get_id (picture),
- frogr_group_get_id (group),
- priv->cancellable,
- _add_to_group_cb,
- up_st);
+ fsp_session_add_to_group_async (session,
+ frogr_picture_get_id (picture),
+ frogr_group_get_id (group),
+ priv->cancellable,
+ _add_to_group_cb,
+ up_st);
+ }
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]