Merge branch 'master' into 'master'

notify-send: Support commas in icon filenames

See merge request 
This commit is contained in:
Alberts Muktupāvels 2021-03-26 15:57:33 +00:00
commit 39575f7c6f
2 changed files with 3 additions and 14 deletions

View File

@ -73,7 +73,7 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>-i</option>, <option>--icon</option>=<replaceable>ICON</replaceable>[,<replaceable>ICON</replaceable>…] <term><option>-i</option>, <option>--icon</option>=<replaceable>ICON</replaceable>
</term> </term>
<listitem> <listitem>
<para>Specifies an icon filename or stock icon to display.</para> <para>Specifies an icon filename or stock icon to display.</para>

View File

@ -128,7 +128,6 @@ main (int argc, char *argv[])
static const char *type = NULL; static const char *type = NULL;
static char *app_name = NULL; static char *app_name = NULL;
static char *icon_str = NULL; static char *icon_str = NULL;
static char *icons = NULL;
static char **n_text = NULL; static char **n_text = NULL;
static char **hints = NULL; static char **hints = NULL;
static gboolean do_version = FALSE; static gboolean do_version = FALSE;
@ -150,9 +149,9 @@ main (int argc, char *argv[])
"notification."), N_("TIME")}, "notification."), N_("TIME")},
{"app-name", 'a', 0, G_OPTION_ARG_STRING, &app_name, {"app-name", 'a', 0, G_OPTION_ARG_STRING, &app_name,
N_("Specifies the app name for the icon"), N_("APP_NAME")}, N_("Specifies the app name for the icon"), N_("APP_NAME")},
{"icon", 'i', 0, G_OPTION_ARG_FILENAME, &icons, {"icon", 'i', 0, G_OPTION_ARG_FILENAME, &icon_str,
N_("Specifies an icon filename or stock icon to display."), N_("Specifies an icon filename or stock icon to display."),
N_("ICON[,ICON...]")}, N_("ICON")},
{"category", 'c', 0, G_OPTION_ARG_FILENAME, &type, {"category", 'c', 0, G_OPTION_ARG_FILENAME, &type,
N_("Specifies the notification category."), N_("Specifies the notification category."),
N_("TYPE[,TYPE...]")}, N_("TYPE[,TYPE...]")},
@ -215,16 +214,6 @@ main (int argc, char *argv[])
} }
} }
if (icons != NULL) {
char *c;
/* XXX */
if ((c = strchr (icons, ',')) != NULL)
*c = '\0';
icon_str = icons;
}
if (!notify_init ("notify-send")) if (!notify_init ("notify-send"))
exit (1); exit (1);