~depict/d-pict/trunk

« back to all changes in this revision

Viewing changes to ui_editor.vala

  • Committer: Linus Seelinger
  • Date: 2012-07-07 18:23:59 UTC
  • Revision ID: s.linus@quantentunnel.de-20120707182359-0s5wgyu4ohphbpu1
Can save projects now

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
            var toolbarEditor = new Toolbar();
47
47
            ToolButton tb_editor_save = new ToolButton.from_stock(Stock.SAVE);
 
48
            tb_editor_save.clicked.connect(()=>{
 
49
                FileChooserDialog dlg = new FileChooserDialog("Save project", main_window, FileChooserAction.SAVE,
 
50
                    Stock.CANCEL, ResponseType.CANCEL, Stock.SAVE, ResponseType.ACCEPT);
 
51
                
 
52
                ResponseType res = (ResponseType)dlg.run();
 
53
                if (res == ResponseType.ACCEPT){
 
54
                    io.write(dlg.get_filename(), presentation);
 
55
                }
 
56
                dlg.destroy();
 
57
            });
48
58
            toolbarEditor.add(tb_editor_save);
49
59
            
50
60
            ToolButton tb_editor_open = new ToolButton.from_stock(Stock.OPEN);