[gnome-photos/wip/rishi/issues-77-create-collection-icon-delete-item-dropdown: 3/3] dropdown: Use g_auto*
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/issues-77-create-collection-icon-delete-item-dropdown: 3/3] dropdown: Use g_auto*
- Date: Fri, 19 Oct 2018 06:21:39 +0000 (UTC)
commit 26af524a77ba7dbb3c026eb80f07f0263fb3b7c8
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Oct 18 21:31:55 2018 +0200
dropdown: Use g_auto*
https://gitlab.gnome.org/GNOME/gnome-photos/issues/77
src/photos-dropdown.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-dropdown.c b/src/photos-dropdown.c
index 34e2ce0c..e4759d18 100644
--- a/src/photos-dropdown.c
+++ b/src/photos-dropdown.c
@@ -1,7 +1,7 @@
/*
* Photos - access, organize and share your photos on GNOME
* Copyright © 2015 – 2017 Alessandro Bono
- * Copyright © 2014 – 2017 Red Hat, Inc.
+ * Copyright © 2014 – 2018 Red Hat, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -55,8 +55,8 @@ photos_dropdown_add_manager (PhotosDropdown *self, PhotosBaseManager *mngr)
{
GMenu *menu;
GtkWidget *popover;
- GtkWidget *w;
- PhotosBaseModel *model;
+ g_autoptr (GtkWidget) w = NULL;
+ g_autoptr (PhotosBaseModel) model = NULL;
model = photos_base_model_new (mngr);
self->models = g_list_prepend (self->models, g_object_ref (model));
@@ -68,12 +68,9 @@ photos_dropdown_add_manager (PhotosDropdown *self, PhotosBaseManager *mngr)
w = g_object_ref (gtk_bin_get_child (GTK_BIN (popover)));
gtk_container_remove (GTK_CONTAINER (popover), w);
gtk_container_add (GTK_CONTAINER (self->grid), w);
- g_object_unref (w);
gtk_widget_set_valign (w, GTK_ALIGN_START);
gtk_widget_set_vexpand (w, TRUE);
gtk_widget_destroy (popover);
-
- g_object_unref (model);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]