Mercurial > dwindows
comparison 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 |
comparison
equal
deleted
inserted
replaced
354:3a51ecc8383a | 355:3a71623fc219 |
---|---|
4292 { | 4292 { |
4293 GtkWidget *clist; | 4293 GtkWidget *clist; |
4294 char numbuf[10]; | 4294 char numbuf[10]; |
4295 int z, multi; | 4295 int z, multi; |
4296 int _locked_by_me = FALSE; | 4296 int _locked_by_me = FALSE; |
4297 GtkJustification justification; | |
4297 | 4298 |
4298 DW_MUTEX_LOCK; | 4299 DW_MUTEX_LOCK; |
4299 clist = gtk_clist_new_with_titles(count, (gchar **)titles); | 4300 clist = gtk_clist_new_with_titles(count, (gchar **)titles); |
4300 if(!clist) | 4301 if(!clist) |
4301 { | 4302 { |
4322 { | 4323 { |
4323 if(!extra || z > 1) | 4324 if(!extra || z > 1) |
4324 gtk_clist_set_column_width(GTK_CLIST(clist), z, 50); | 4325 gtk_clist_set_column_width(GTK_CLIST(clist), z, 50); |
4325 sprintf(numbuf, "%d", z); | 4326 sprintf(numbuf, "%d", z); |
4326 gtk_object_set_data(GTK_OBJECT(clist), numbuf, (gpointer)flags[z]); | 4327 gtk_object_set_data(GTK_OBJECT(clist), numbuf, (gpointer)flags[z]); |
4328 if(flags[z]&DW_CFA_RIGHT) | |
4329 justification = GTK_JUSTIFY_RIGHT; | |
4330 else if(flags[z]&DW_CFA_CENTER) | |
4331 justification = GTK_JUSTIFY_CENTER; | |
4332 else | |
4333 justification = GTK_JUSTIFY_LEFT; | |
4334 gtk_clist_set_column_justification(GTK_CLIST(clist),z,justification); | |
4327 } | 4335 } |
4328 | 4336 |
4329 DW_MUTEX_UNLOCK; | 4337 DW_MUTEX_UNLOCK; |
4330 return TRUE; | 4338 return TRUE; |
4331 } | 4339 } |