diff --git a/source/app.d b/source/app.d index 850d9e7..e9d45e4 100644 --- a/source/app.d +++ b/source/app.d @@ -236,7 +236,8 @@ void Save(ref TreeView tree){ do{ file.write(store.getValueInt(it, 0)); foreach(i ; 1..store.getNColumns()){ - file.write("\t\"",store.getValueString(it, i),"\""); + int storecol = cast(int)(tree.getColumn(i).getData("colnumber")); + file.write("\t\"", store.getValueString(it, storecol), "\""); } file.write("\n"); }while(store.iterNext(it)); @@ -349,9 +350,11 @@ auto ref SetupColumn(TreeView tree, string sName, size_t index){ auto col = new TreeViewColumn(sName, cr, "text", cast(int)index); + col.setData("colnumber", cast(void*)cast(int)index); col.setResizable(true); col.setMinWidth(10); col.setClickable(true); + col.setReorderable(true); col.addOnClicked((TreeViewColumn col){ import gtk.Dialog; auto dlg = new Dialog("Rename column", window, GtkDialogFlags.MODAL, ["Cancel","Rename"], [ResponseType.CANCEL, ResponseType.OK]);