Fixes for Windows
This commit is contained in:
parent
b384a661d4
commit
64f7b92679
38
source/app.d
38
source/app.d
@ -13,7 +13,8 @@ import gtk.Label;
|
||||
import gtk.Entry;
|
||||
import gtk.CellRenderer;
|
||||
import gtk.CellRendererText;
|
||||
import gtk.HeaderBar;
|
||||
import gtk.VBox;
|
||||
|
||||
import gtk.Button;
|
||||
|
||||
void[] Serialize(VT...)(VT data){
|
||||
@ -34,14 +35,31 @@ void main(string[] args)
|
||||
//Window
|
||||
auto window = new MainWindow("2DA-Edit");
|
||||
|
||||
//Header bar
|
||||
auto header = new HeaderBar();
|
||||
window.setTitlebar(header);
|
||||
header.setTitle("2DAEdit");
|
||||
header.setSubtitle(args[1]);
|
||||
header.setProperty("show-close-button", true);
|
||||
auto saveButton = new Button(StockID.SAVE);
|
||||
header.packEnd(saveButton);
|
||||
auto cont = new VBox(false, 0);
|
||||
window.add(cont);
|
||||
|
||||
Button saveButton = new Button(StockID.SAVE);
|
||||
version(Windows){
|
||||
//Menu bar
|
||||
import gtk.HBox;
|
||||
|
||||
auto cont2 = new HBox(false, 0);
|
||||
cont.packStart(cont2, false, false, 0);
|
||||
|
||||
cont2.packEnd(saveButton, false, false, 0);
|
||||
}
|
||||
else{
|
||||
//Header bar
|
||||
import gtk.HeaderBar;
|
||||
|
||||
auto header = new HeaderBar();
|
||||
window.setTitlebar(header);
|
||||
header.setTitle("2DAEdit");
|
||||
header.setSubtitle(args[1]);
|
||||
header.setProperty("show-close-button", true);
|
||||
saveButton = new Button(StockID.SAVE);
|
||||
header.packEnd(saveButton);
|
||||
}
|
||||
|
||||
//Database for 2da GTK table
|
||||
GType type[];
|
||||
@ -52,7 +70,7 @@ void main(string[] args)
|
||||
|
||||
//TreeView to display database
|
||||
auto tree = new TreeView(store);
|
||||
window.add(tree);
|
||||
cont.packEnd(tree, true, true, 0);
|
||||
|
||||
tree.setHeadersVisible(true);
|
||||
tree.setEnableSearch(true);
|
||||
|
Loading…
Reference in New Issue
Block a user