[libhandy] demo: Merge variable declaration and definition



commit 30e9a244159b2d2279491dbcd2915285f2c8a561
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Dec 15 09:28:58 2020 +0100

    demo: Merge variable declaration and definition

 examples/hdy-demo-window.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/examples/hdy-demo-window.c b/examples/hdy-demo-window.c
index ba907f6f..c8cf6cad 100644
--- a/examples/hdy-demo-window.c
+++ b/examples/hdy-demo-window.c
@@ -356,13 +356,11 @@ file_chooser_response_cb (HdyDemoWindow  *self,
                           GtkFileChooser *chooser)
 {
   if (response_id == GTK_RESPONSE_ACCEPT) {
-    g_autofree gchar *filename = NULL;
-    g_autoptr (GdkPixbuf) pixbuf = NULL;
-
-    filename = gtk_file_chooser_get_filename (chooser);
-    pixbuf = hdy_avatar_draw_to_pixbuf (self->avatar,
-                                        hdy_avatar_get_size (self->avatar),
-                                        gtk_widget_get_scale_factor (GTK_WIDGET (self)));
+    g_autofree gchar *filename = gtk_file_chooser_get_filename (chooser);
+    g_autoptr (GdkPixbuf) pixbuf =
+      hdy_avatar_draw_to_pixbuf (self->avatar,
+                                 hdy_avatar_get_size (self->avatar),
+                                 gtk_widget_get_scale_factor (GTK_WIDGET (self)));
 
     if (pixbuf != NULL)
       gdk_pixbuf_save (pixbuf, filename, "png", NULL, NULL);


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