From ce795861eeb1893e40e4476fea71986450658948 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Tue, 8 Mar 2011 23:28:26 +0000 Subject: some missing files needed for i18n --- src/trg-general-panel.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/trg-general-panel.c') diff --git a/src/trg-general-panel.c b/src/trg-general-panel.c index c89f994..3c3b5a2 100644 --- a/src/trg-general-panel.c +++ b/src/trg-general-panel.c @@ -189,18 +189,18 @@ void trg_general_panel_update(TrgGeneralPanel * panel, JsonObject * t, static GtkLabel *trg_general_panel_add_label_with_width(TrgGeneralPanel *gp, char *key, guint col, guint row, gint width) { - GtkWidget *keyLabel; - GtkWidget *value; - GtkWidget *alignment; - gchar *keyMarkup; + GtkWidget *value, *keyLabel, *alignment; + int startCol = (col == 0) ? 0 : col*2; alignment = gtk_alignment_new(0, 0, 0, 0); keyLabel = gtk_label_new(NULL); - keyMarkup = - g_markup_printf_escaped(strlen(key) > 0 ? "%s:" : "", key); - gtk_label_set_markup(GTK_LABEL(keyLabel), keyMarkup); - g_free(keyMarkup); + if (strlen(key) > 0) { + gchar *keyMarkup = + g_markup_printf_escaped(strlen(key) > 0 ? "%s:" : "", key); + gtk_label_set_markup(GTK_LABEL(keyLabel), keyMarkup); + g_free(keyMarkup); + } gtk_container_add(GTK_CONTAINER(alignment), keyLabel); gtk_table_attach(GTK_TABLE(gp), alignment, startCol, startCol+1, row, row+1, GTK_FILL, 0, TRG_GENERAL_PANEL_SPACING_X, TRG_GENERAL_PANEL_SPACING_Y); -- cgit v1.2.3