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.Entry;
|
||||||
import gtk.CellRenderer;
|
import gtk.CellRenderer;
|
||||||
import gtk.CellRendererText;
|
import gtk.CellRendererText;
|
||||||
import gtk.HeaderBar;
|
import gtk.VBox;
|
||||||
|
|
||||||
import gtk.Button;
|
import gtk.Button;
|
||||||
|
|
||||||
void[] Serialize(VT...)(VT data){
|
void[] Serialize(VT...)(VT data){
|
||||||
@ -34,14 +35,31 @@ void main(string[] args)
|
|||||||
//Window
|
//Window
|
||||||
auto window = new MainWindow("2DA-Edit");
|
auto window = new MainWindow("2DA-Edit");
|
||||||
|
|
||||||
//Header bar
|
auto cont = new VBox(false, 0);
|
||||||
auto header = new HeaderBar();
|
window.add(cont);
|
||||||
window.setTitlebar(header);
|
|
||||||
header.setTitle("2DAEdit");
|
Button saveButton = new Button(StockID.SAVE);
|
||||||
header.setSubtitle(args[1]);
|
version(Windows){
|
||||||
header.setProperty("show-close-button", true);
|
//Menu bar
|
||||||
auto saveButton = new Button(StockID.SAVE);
|
import gtk.HBox;
|
||||||
header.packEnd(saveButton);
|
|
||||||
|
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
|
//Database for 2da GTK table
|
||||||
GType type[];
|
GType type[];
|
||||||
@ -52,7 +70,7 @@ void main(string[] args)
|
|||||||
|
|
||||||
//TreeView to display database
|
//TreeView to display database
|
||||||
auto tree = new TreeView(store);
|
auto tree = new TreeView(store);
|
||||||
window.add(tree);
|
cont.packEnd(tree, true, true, 0);
|
||||||
|
|
||||||
tree.setHeadersVisible(true);
|
tree.setHeadersVisible(true);
|
||||||
tree.setEnableSearch(true);
|
tree.setEnableSearch(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user