all repos — tint2 @ 784edaccd2ac5f6ebb0f83db7b2d805062d0f095

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Expand leading tilde in icon paths (fixes #743)
Chris Lee @klee93
commit

784edaccd2ac5f6ebb0f83db7b2d805062d0f095

parent

b9c313cd18a640c82eac0731a8caa625fceb9ebf

4 files changed, 8 insertions(+), 3 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,4 +1,5 @@

-2019-03-03 master +2019-06-02 master +- Expand leading ~ in icon paths - Fix spacing around icons in executor without text in vertical panels (issue #716) - Fix Bug: Clock Only Updates Every Minute With Format %s (issue #724) - Fix markup drawing when font shadow enabled (issue #709)
M src/config.csrc/config.c

@@ -794,7 +794,7 @@ panel_config.button_list = g_list_append(panel_config.button_list, create_button());

} else if (strcmp(key, "button_icon") == 0) { if (strlen(value)) { Button *button = get_or_create_last_button(); - button->backend->icon_name = strdup(value); + button->backend->icon_name = expand_tilde(value); } } else if (strcmp(key, "button_text") == 0) { if (strlen(value)) {
M src/execplugin/execplugin.csrc/execplugin/execplugin.c

@@ -891,7 +891,7 @@ execp->backend->text = strdup(text);

} else { execp->backend->text = strdup(""); } - execp->backend->icon_path = strdup(execp->backend->buf_stdout); + execp->backend->icon_path = expand_tilde(execp->backend->buf_stdout); } size_t len = strlen(execp->backend->text); if (len > 0 && execp->backend->text[len - 1] == '\n')
M src/launcher/icon-theme-common.csrc/launcher/icon-theme-common.c

@@ -566,6 +566,10 @@ char *icon_path_from_full_path(const char *s)

{ if (is_full_path(s) && file_exists(s)) return strdup(s); + char *expanded = expand_tilde(s); + if (is_full_path(expanded) && file_exists(expanded)) + return expanded; + free(expanded); return NULL; }