summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-04 15:30:56 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-11-04 15:30:56 (EDT)
commitc1694f37f26ab46f4bad394424f0394be11936cd (patch)
treebf09b76912e6c52d65ecabd7a8041c16c41a94bc /src/utils
parentd7c7eefd5c17da24ac19e37689bfa609ca69fef6 (diff)
downloadmarquee-c1694f37f26ab46f4bad394424f0394be11936cd.zip
marquee-c1694f37f26ab46f4bad394424f0394be11936cd.tar.gz
marquee-c1694f37f26ab46f4bad394424f0394be11936cd.tar.bz2
mq_html_input_radio(): Add value parameter
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/html.c13
-rw-r--r--src/utils/html.h4
2 files changed, 9 insertions, 8 deletions
diff --git a/src/utils/html.c b/src/utils/html.c
index 4c22221..0549457 100644
--- a/src/utils/html.c
+++ b/src/utils/html.c
@@ -842,21 +842,22 @@ mq_html_input_number_d(const gchar *name, const gchar *label,
}
gchar *
-mq_html_input_radio(const gchar *name, const gchar *id, const gchar *label,
- gboolean checked)
+mq_html_input_radio(const gchar *name, const gchar *id, const gchar *value,
+ const gchar *label, gboolean checked)
{
if (label && label[0]) {
return g_strdup_printf(
"<label for=\"%s\">\n<span>%s:</span>\n"
"<input type=\"radio\" name=\"%s\" "
- "id=\"%s\"%s>\n"
+ "id=\"%s\" value=\"%s\"%s>\n"
"</label>\n",
- id, label, name, id,
+ id, label, name, id, value,
checked ? " checked=\"checked\"" : "");
} else {
return g_strdup_printf(
- "<input type=\"radio\" name=\"%s\" id=\"%s\"%s>\n",
- name, id,
+ "<input type=\"radio\" name=\"%s\" "
+ "id=\"%s\" value=\"%s\"%s>\n",
+ name, id, value,
checked ? " checked=\"checked\"" : "");
}
}
diff --git a/src/utils/html.h b/src/utils/html.h
index 86067a9..53d4216 100644
--- a/src/utils/html.h
+++ b/src/utils/html.h
@@ -85,8 +85,8 @@ mq_html_input_number_d(const gchar *name, const gchar *label,
gdouble min, gdouble step, gdouble max, gdouble value);
gchar *
-mq_html_input_radio(const gchar *name, const gchar *id, const gchar *label,
- gboolean checked);
+mq_html_input_radio(const gchar *name, const gchar *id, const gchar *value,
+ const gchar *label, gboolean checked);
gchar *
mq_html_input_checkbox(const gchar *name, const gchar *label, gboolean checked);