From a7488f38fef1960086af860063f1958fb75d58f3 Mon Sep 17 00:00:00 2001 From: nirav Date: Sun, 14 Oct 2018 18:30:40 +0530 Subject: Added info panel to show current file name, resolution and list index --- src/image.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/image.c') diff --git a/src/image.c b/src/image.c index 3daf00e..052f1b3 100644 --- a/src/image.c +++ b/src/image.c @@ -40,6 +40,9 @@ void pixbuf_load_callback(GObject *source_object, GAsyncResult *res, gdk_pixbuf_get_height(GDK_PIXBUF(pixbuf)); aspect_ratio = (double)pixbuf_width / (double)pixbuf_height; fit_image(); + set_window_title(g_file_get_basename(file), pixbuf_width, pixbuf_height); + if (file != NULL) + g_object_unref(file); loading = 0; } @@ -64,10 +67,7 @@ int load_image(char *file_name) file = g_file_new_for_path(file_name); g_file_read_async(file, G_PRIORITY_DEFAULT, NULL, &file_read_callback, NULL); - if (file != NULL) - g_object_unref(file); curr_zoom = 1.0; - set_window_title(g_path_get_basename(file_name)); return 0; } -- cgit v1.2.3