[gnome-photos] zoom-controls: Use g_auto*
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] zoom-controls: Use g_auto*
- Date: Tue, 21 Nov 2017 12:08:38 +0000 (UTC)
commit 28066180546fbc99647599b40623bf3126926852
Author: Ekta Nandwani <mailnandwaniekta gmail com>
Date: Wed Nov 15 07:37:11 2017 +0530
zoom-controls: Use g_auto*
https://bugzilla.gnome.org/show_bug.cgi?id=788174
src/photos-zoom-controls.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-zoom-controls.c b/src/photos-zoom-controls.c
index 726e722..c3d6620 100644
--- a/src/photos-zoom-controls.c
+++ b/src/photos-zoom-controls.c
@@ -151,8 +151,8 @@ static void
photos_zoom_controls_realize (GtkWidget *widget)
{
GdkVisual *visual;
+ g_autoptr (GdkWindow) window = NULL;
GdkWindow *parent_window;
- GdkWindow *window;
GdkWindowAttr attributes;
GtkAllocation allocation;
gint attributes_mask;
@@ -184,8 +184,6 @@ photos_zoom_controls_realize (GtkWidget *widget)
window = gdk_window_new (parent_window, &attributes, attributes_mask);
gtk_widget_set_window (widget, g_object_ref (window));
gtk_widget_register_window (widget, window);
-
- g_object_unref (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]