diff --git a/config.def.h b/config.def.h index 169683f..45d0c19 100644 --- a/config.def.h +++ b/config.def.h @@ -50,6 +50,9 @@ char *dmenu = "/usr/bin/dmenu"; char *browser = "/usr/bin/firefox"; +/* path to default icons */ +char *icon_path = "/usr/share/icons/gnome/32x32/status/"; + /* follow focus to different monitor and display notifications there? * possible values: * FOLLOW_NONE diff --git a/dunstrc b/dunstrc index f50618e..e9f78bf 100644 --- a/dunstrc +++ b/dunstrc @@ -142,7 +142,7 @@ show_icons = no # Path to default icons. - icon_path = /usr/share/icons/gnome/32x32/status/%s.png + icon_path = /usr/share/icons/gnome/32x32/status/ [frame] width = 3 diff --git a/notification.c b/notification.c index 286f407..d806f25 100644 --- a/notification.c +++ b/notification.c @@ -283,7 +283,9 @@ int notification_init(notification * n, int id) /* Add icon path if relative */ if (strlen(n->icon) > 0 && n->icon[0] != '/' && n->icon[0] != '~') { - n->icon = string_replace("%s", n->icon, settings.icon_path); + char *new = g_strconcat(settings.icon_path, n->icon, ".png", NULL); + free(n->icon); + n->icon = new; } n->msg = string_replace("%a", n->appname, g_strdup(n->format)); diff --git a/x.c b/x.c index b3edf93..88c2504 100644 --- a/x.c +++ b/x.c @@ -205,11 +205,6 @@ static dimension_t calculate_dimensions(GSList *layouts) dim.h += (g_slist_length(layouts) - 1) * settings.separator_height; dim.h += g_slist_length(layouts) * settings.padding * 2; - /* text_width: width of the widest content so far - * total_width: width of the widest notification so far, with padding - * dim.w: width of the window, with frame - * Also call r_setup_pango_layout() when changing text_width. - */ int text_width = 0, total_width = 0; for (GSList *iter = layouts; iter; iter = iter->next) { colored_layout *cl = iter->data;