Make testsplitheaders more robust
Same empty string issue that I fixed in GtkHeaderBar a few days ago.
This commit is contained in:
parent
41d59985d7
commit
0f9f3e8fa2
@ -16,8 +16,12 @@ split_decorations (GtkSettings *settings,
|
|||||||
|
|
||||||
p = g_strsplit (layout, ":", -1);
|
p = g_strsplit (layout, ":", -1);
|
||||||
|
|
||||||
p1 = g_strconcat (p[0], ":", NULL);
|
p1 = g_strconcat ("", p[0], ":", NULL);
|
||||||
p2 = g_strconcat (":", p[1], NULL);
|
|
||||||
|
if (g_strv_length (p) >= 2)
|
||||||
|
p2 = g_strconcat (":", p[1], NULL);
|
||||||
|
else
|
||||||
|
p2 = g_strdup ("");
|
||||||
|
|
||||||
gtk_header_bar_set_decoration_layout (GTK_HEADER_BAR (sheader), p1);
|
gtk_header_bar_set_decoration_layout (GTK_HEADER_BAR (sheader), p1);
|
||||||
gtk_header_bar_set_decoration_layout (GTK_HEADER_BAR (mheader), p2);
|
gtk_header_bar_set_decoration_layout (GTK_HEADER_BAR (mheader), p2);
|
||||||
|
Loading…
Reference in New Issue
Block a user