[frogr] Avoid unneeded calls to g_object_ref / g_object_unref
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Avoid unneeded calls to g_object_ref / g_object_unref
- Date: Sat, 10 Sep 2011 06:31:12 +0000 (UTC)
commit 1ca67881b8593af5eec1809f5266169b4a5805e9
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Sat Aug 27 21:33:15 2011 +0200
Avoid unneeded calls to g_object_ref / g_object_unref
src/frogr-add-to-group-dialog.c | 7 +------
src/frogr-add-to-set-dialog.c | 7 +------
src/frogr-main-view.c | 3 ---
3 files changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/src/frogr-add-to-group-dialog.c b/src/frogr-add-to-group-dialog.c
index f9c8d32..c1adc8d 100644
--- a/src/frogr-add-to-group-dialog.c
+++ b/src/frogr-add-to-group-dialog.c
@@ -358,10 +358,7 @@ _get_selected_groups (FrogrAddToGroupDialog *self)
GROUP_COL, &group, -1);
if (FROGR_IS_GROUP (group))
- {
- selected_groups = g_slist_append (selected_groups, group);
- g_object_ref (group);
- }
+ selected_groups = g_slist_append (selected_groups, group);
}
while (gtk_tree_model_iter_next (priv->treemodel, &iter));
@@ -384,8 +381,6 @@ _update_pictures (FrogrAddToGroupDialog *self)
picture = FROGR_PICTURE (item->data);
frogr_picture_set_groups (picture, selected_groups);
}
-
- g_slist_foreach (selected_groups, (GFunc)g_object_unref, NULL);
g_slist_free (selected_groups);
}
diff --git a/src/frogr-add-to-set-dialog.c b/src/frogr-add-to-set-dialog.c
index 2c1541e..5e620ad 100644
--- a/src/frogr-add-to-set-dialog.c
+++ b/src/frogr-add-to-set-dialog.c
@@ -358,10 +358,7 @@ _get_selected_photosets (FrogrAddToSetDialog *self)
SET_COL, &set, -1);
if (FROGR_IS_PHOTOSET (set))
- {
- selected_sets = g_slist_append (selected_sets, set);
- g_object_ref (set);
- }
+ selected_sets = g_slist_append (selected_sets, set);
}
while (gtk_tree_model_iter_next (priv->treemodel, &iter));
@@ -384,8 +381,6 @@ _update_pictures (FrogrAddToSetDialog *self)
picture = FROGR_PICTURE (item->data);
frogr_picture_set_photosets (picture, selected_sets);
}
-
- g_slist_foreach (selected_sets, (GFunc)g_object_unref, NULL);
g_slist_free (selected_sets);
}
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 43d3252..8d6fd9c 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -783,8 +783,6 @@ _add_picture_to_ui (FrogrMainView *self, FrogrPicture *picture)
FPICTURE_COL, picture,
-1);
- g_object_ref (picture);
-
/* Reorder if needed */
if (priv->sorting_criteria != SORT_AS_LOADED || priv->sorting_reversed)
frogr_main_view_reorder_pictures (self);
@@ -821,7 +819,6 @@ _remove_picture_from_ui (FrogrMainView *self, FrogrPicture *picture)
{
/* Remove from the GtkIconView and break loop */
gtk_list_store_remove (GTK_LIST_STORE (priv->tree_model), &iter);
- g_object_unref (picture);
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]