Commit c9ebbd57 authored by Marek Kašík's avatar Marek Kašík

printers: Unescape spaces in names of printer supplies

Don't place new line at the end of supply names.
parent ae50e7ce
......@@ -1146,7 +1146,7 @@ supply_levels_draw_cb (GtkWidget *widget,
for (i = 0; i < priv->dests[priv->current_dest].num_options; i++)
{
if (g_strcmp0 (priv->dests[priv->current_dest].options[i].name, "marker-names") == 0)
marker_names = priv->dests[priv->current_dest].options[i].value;
marker_names = g_strcompress (priv->dests[priv->current_dest].options[i].value);
else if (g_strcmp0 (priv->dests[priv->current_dest].options[i].name, "marker-levels") == 0)
marker_levels = priv->dests[priv->current_dest].options[i].value;
else if (g_strcmp0 (priv->dests[priv->current_dest].options[i].name, "marker-colors") == 0)
......@@ -1221,13 +1221,13 @@ supply_levels_draw_cb (GtkWidget *widget,
if (tooltip_text)
{
tmp = g_strdup_printf ("%s%s\n", tooltip_text, marker_namesv[i]);
tmp = g_strdup_printf ("%s\n%s", tooltip_text, marker_namesv[i]);
g_free (tooltip_text);
tooltip_text = tmp;
tmp = NULL;
}
else
tooltip_text = g_strdup_printf ("%s\n", marker_namesv[i]);
tooltip_text = g_strdup_printf ("%s", marker_namesv[i]);
}
g_strfreev (marker_levelsv);
......@@ -1235,6 +1235,8 @@ supply_levels_draw_cb (GtkWidget *widget,
g_strfreev (marker_namesv);
}
g_free (marker_names);
if (tooltip_text)
{
gtk_widget_set_tooltip_text (widget, tooltip_text);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment