diff gtk/dw.c @ 355:3a71623fc219

Changes to implement justification on container columns.
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 18 Apr 2003 09:28:27 +0000
parents 3a51ecc8383a
children 5df54ebc44dd
line wrap: on
line diff
--- a/gtk/dw.c	Thu Apr 17 21:50:51 2003 +0000
+++ b/gtk/dw.c	Fri Apr 18 09:28:27 2003 +0000
@@ -4294,6 +4294,7 @@
 	char numbuf[10];
 	int z, multi;
 	int _locked_by_me = FALSE;
+	GtkJustification justification;
 
 	DW_MUTEX_LOCK;
     clist = gtk_clist_new_with_titles(count, (gchar **)titles);
@@ -4324,6 +4325,13 @@
 			gtk_clist_set_column_width(GTK_CLIST(clist), z, 50);
 		sprintf(numbuf, "%d", z);
 		gtk_object_set_data(GTK_OBJECT(clist), numbuf, (gpointer)flags[z]);
+		if(flags[z]&DW_CFA_RIGHT)
+			justification = GTK_JUSTIFY_RIGHT;
+		else if(flags[z]&DW_CFA_CENTER)
+			justification = GTK_JUSTIFY_CENTER;
+		else
+			justification = GTK_JUSTIFY_LEFT;
+		gtk_clist_set_column_justification(GTK_CLIST(clist),z,justification);
 	}
 
 	DW_MUTEX_UNLOCK;