Work around non-gnu basename implementations
Redo #354, as it got pushed out in #365
This commit is contained in:
parent
82d544e95e
commit
9aba546258
@ -326,6 +326,7 @@ int notification_init(notification *n, int id)
|
|||||||
substr = strchr(substr, '%')){
|
substr = strchr(substr, '%')){
|
||||||
|
|
||||||
char pg[16];
|
char pg[16];
|
||||||
|
char *icon_tmp;
|
||||||
|
|
||||||
switch(substr[1]){
|
switch(substr[1]){
|
||||||
case 'a':
|
case 'a':
|
||||||
@ -350,11 +351,13 @@ int notification_init(notification *n, int id)
|
|||||||
n->markup);
|
n->markup);
|
||||||
break;
|
break;
|
||||||
case 'I':
|
case 'I':
|
||||||
|
icon_tmp = g_strdup(n->icon);
|
||||||
notification_replace_single_field(
|
notification_replace_single_field(
|
||||||
&n->msg,
|
&n->msg,
|
||||||
&substr,
|
&substr,
|
||||||
n->icon ? basename(n->icon) : "",
|
icon_tmp ? basename(icon_tmp) : "",
|
||||||
MARKUP_NO);
|
MARKUP_NO);
|
||||||
|
g_free(icon_tmp);
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
notification_replace_single_field(
|
notification_replace_single_field(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user