mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-30 09:24:56 +01:00
Some clean up
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
013ac1f4b4
commit
ce7f53e5e9
1 changed files with 5 additions and 6 deletions
|
@ -550,14 +550,13 @@ static char*
|
|||
get_formatted_filename(zathura_t* zathura, const char* file_path, bool statusbar)
|
||||
{
|
||||
bool basename_only = false;
|
||||
if (statusbar) {
|
||||
if (statusbar == true) {
|
||||
girara_setting_get(zathura->ui.session, "window-title-basename", &basename_only);
|
||||
} else {
|
||||
girara_setting_get(zathura->ui.session, "statusbar-basename", &basename_only);
|
||||
}
|
||||
|
||||
if (basename_only == false) {
|
||||
|
||||
bool home_tilde = false;
|
||||
if (statusbar) {
|
||||
girara_setting_get(zathura->ui.session, "statusbar-home-tilde", &home_tilde);
|
||||
|
@ -565,11 +564,11 @@ get_formatted_filename(zathura_t* zathura, const char* file_path, bool statusbar
|
|||
girara_setting_get(zathura->ui.session, "window-title-home-tilde", &home_tilde);
|
||||
}
|
||||
|
||||
size_t file_path_len = file_path ? strlen(file_path) : 0;
|
||||
const size_t file_path_len = file_path ? strlen(file_path) : 0;
|
||||
|
||||
if (home_tilde) {
|
||||
char *home = girara_get_home_directory(NULL);
|
||||
size_t home_len = home ? strlen(home) : 0;
|
||||
if (home_tilde == true) {
|
||||
char* home = girara_get_home_directory(NULL);
|
||||
const size_t home_len = home ? strlen(home) : 0;
|
||||
|
||||
if (home_len > 1
|
||||
&& file_path_len >= home_len
|
||||
|
|
Loading…
Reference in a new issue