X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=gtk-gui.c;h=dce537232fdbd9ba81ca5dfb69b332f28d269228;hb=f078bc04e1f55ad9ecd0632fcfa5753440ba2267;hp=6df8f419b13acad02fb3f3cb7b36f17c0fdeafc7;hpb=50d026230fa7303b33821da1346875b30f5ab00d;p=ext%2Fsubsurface.git diff --git a/gtk-gui.c b/gtk-gui.c index 6df8f41..dce5372 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -202,17 +202,25 @@ static void quit(GtkWidget *w, gpointer data) } GtkTreeViewColumn *tree_view_column(GtkWidget *tree_view, int index, const char *title, - data_func_t data_func, PangoAlignment align, gboolean visible) + data_func_t data_func, unsigned int flags) { GtkCellRenderer *renderer; GtkTreeViewColumn *col; double xalign = 0.0; /* left as default */ + PangoAlignment align; + gboolean visible; + + align = (flags & ALIGN_LEFT) ? PANGO_ALIGN_LEFT : + (flags & ALIGN_RIGHT) ? PANGO_ALIGN_RIGHT : + PANGO_ALIGN_CENTER; + visible = !(flags & INVISIBLE); renderer = gtk_cell_renderer_text_new(); col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, title); - gtk_tree_view_column_set_sort_column_id(col, index); + if (!(flags & UNSORTABLE)) + gtk_tree_view_column_set_sort_column_id(col, index); gtk_tree_view_column_set_resizable(col, TRUE); gtk_tree_view_column_pack_start(col, renderer, TRUE); if (data_func)