Windobe fixes

master
Crom (Thibaut CHARLES) 8 years ago
parent 3bdcd54e78
commit e27db91859
  1. 39
      source/app.d

@ -6,6 +6,7 @@ import std.conv : to;
import gtk.Main;
import gtk.MainWindow;
import gtk.Widget;
import gtk.TreeView;
import gtk.ListStore;
import gtk.TreeViewColumn;
@ -75,11 +76,11 @@ void main(string[] args)
import gtk.HBox;
header = new HBox(false, 0);
cont.packStart(header, false, false, 0);
cont.packStart(cast(HBox)header, false, false, 0);
header.packStart(buttonOpen, false, false, 0);
header.packEnd(buttonSaveAs, false, false, 0);
header.packEnd(buttonSave, false, false, 0);
(cast(HBox)header).packStart(buttonOpen, false, false, 0);
(cast(HBox)header).packEnd(buttonSaveAs, false, false, 0);
(cast(HBox)header).packEnd(buttonSave, false, false, 0);
}
else{
//Header bar
@ -274,17 +275,23 @@ void SaySomething(string msg){
lbl.setMarkup("<i>"~msg~"</i>");
statusbar.packEnd(lbl, false, false, 5);
//Wow, much animation, very badass
lbl.setOpacity(0.0);
lbl.show();
foreach(i ; 0..20){
lbl.setOpacity(i/20.0);
Thread.getThis.sleep(dur!"msecs"(10));
version(Windows){
lbl.show();
Thread.getThis.sleep(dur!"msecs"(1500));
}
Thread.getThis.sleep(dur!"msecs"(1500));
foreach(i ; 1..20){
lbl.setOpacity(1.0-i/20.0);
Thread.getThis.sleep(dur!"msecs"(10));
else{
//Wow, much animation, very badass
lbl.setOpacity(0.0);
lbl.show();
foreach(i ; 0..20){
lbl.setOpacity(i/20.0);
Thread.getThis.sleep(dur!"msecs"(10));
}
Thread.getThis.sleep(dur!"msecs"(1500));
foreach(i ; 1..20){
lbl.setOpacity(1.0-i/20.0);
Thread.getThis.sleep(dur!"msecs"(10));
}
}
//Destroy
lbl.destroy();
@ -326,14 +333,14 @@ void Save(ref TreeView tree, string newpath=""){
}
void SetTitle(string title){
version(Windows) (cast(MainWindow)header).setTitle(title);
version(Windows) window.setTitle(title);
else{
import gtk.HeaderBar;
(cast(HeaderBar)header).setSubtitle(title);
}
}
string openedFile;
__gshared string openedFile;
void Open(string file, ref TreeView tree){
auto twoda = new TwoDA(file);

Loading…
Cancel
Save