diff options
author | nirav <nirav@teisuu.com> | 2018-09-07 22:01:28 +0530 |
---|---|---|
committer | Dandelion <nirav@teisuu.com> | 2018-09-07 22:01:28 +0530 |
commit | b4a6aa115dfd2bbef29af2439661999f8b827fba (patch) | |
tree | 20d39f9e22ed1f51198a5d36a84fcebb290b504d | |
parent | 7722e6d67a8e6e6a1cb73115ee3abe4380e29e2a (diff) | |
download | im-b4a6aa115dfd2bbef29af2439661999f8b827fba.tar.gz im-b4a6aa115dfd2bbef29af2439661999f8b827fba.zip |
Set window title to filename
-rw-r--r-- | image.c | 1 | ||||
-rw-r--r-- | window.c | 5 | ||||
-rw-r--r-- | window.h | 1 |
3 files changed, 7 insertions, 0 deletions
@@ -22,6 +22,7 @@ int load_image(char *file_name) aspect_ratio = (double)pixbuf_width / (double)pixbuf_height; curr_zoom = 1.0; fit_image(); + set_window_title(g_path_get_basename(file_name)); return 1; } @@ -87,6 +87,11 @@ void scroll_window(gdouble x, gdouble y) v_adj); } +void set_window_title(const char *title) +{ + gtk_window_set_title(GTK_WINDOW(window), title); +} + void get_curr_win_size(gint *width, gint *height) { gtk_window_get_size(GTK_WINDOW(window), width, height); @@ -6,6 +6,7 @@ void create_main_window(GApplication *app); void get_curr_win_size(gint *width, gint *height); void scroll_window(gdouble x, gdouble y); +void set_window_title(const char *title); void quit(); #endif |