Fix stuff regarding icons
- fix icon_path string calculations - add default settings to config.def.h
This commit is contained in:
parent
c2801181f8
commit
d9e68803dc
@ -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
|
||||
|
2
dunstrc
2
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
|
||||
|
@ -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));
|
||||
|
5
x.c
5
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user