Change window title to filename

This commit is contained in:
Moritz Lipp 2010-06-12 09:47:07 +02:00
parent 40c47db14d
commit c441af5ed5

View File

@ -1068,6 +1068,9 @@ open_file(char* path, char* password)
} }
} }
/* set window title */
gtk_window_set_title(Zathura.UI.window, basename(file));
/* show document */ /* show document */
set_page(start_page); set_page(start_page);
update_status(); update_status();
@ -2324,6 +2327,7 @@ cmd_close(int argc, char** argv)
free(Zathura.PDF.pages); free(Zathura.PDF.pages);
g_object_unref(Zathura.PDF.document); g_object_unref(Zathura.PDF.document);
g_free(Zathura.State.pages); g_free(Zathura.State.pages);
gtk_window_set_title(Zathura.UI.window, "zathura");
Zathura.State.pages = g_strdup_printf(""); Zathura.State.pages = g_strdup_printf("");
Zathura.State.filename = (char*) DEFAULT_TEXT; Zathura.State.filename = (char*) DEFAULT_TEXT;