[gnome-photos] base-model: Simplify code



commit 53a0babe190dcaa0326ec7a7531ab2614ac63115
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jan 16 10:02:40 2018 +0100

    base-model: Simplify code

 src/photos-base-model.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/photos-base-model.c b/src/photos-base-model.c
index cfcd76bb..119c5b5b 100644
--- a/src/photos-base-model.c
+++ b/src/photos-base-model.c
@@ -97,7 +97,6 @@ photos_base_model_refresh (PhotosBaseModel *self)
     {
       g_autoptr (GMenuItem) menu_item = NULL;
       g_autoptr (GObject) object = NULL;
-      GVariant *target_value;
       const gchar *id;
       g_autofree gchar *name = NULL;
 
@@ -106,8 +105,7 @@ photos_base_model_refresh (PhotosBaseModel *self)
       g_object_get (object, "name", &name, NULL);
 
       menu_item = g_menu_item_new (name, NULL);
-      target_value = g_variant_new ("s", id);
-      g_menu_item_set_action_and_target_value (menu_item, action_id, target_value);
+      g_menu_item_set_action_and_target (menu_item, action_id, "s", id);
       g_menu_append_item (section, menu_item);
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]