Ignore:
Timestamp:
Oct 30, 2008, 2:02:36 AM (14 years ago)
Author:
Sam Hocevar
Message:

ThePimp?: make file dialogs singletons so that they retain their properties
and do not take ages to build.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/ThePimp/src/MainWindow.cs

    r3144 r3145  
    3838        protected virtual void OnOpenActionActivated (object sender, System.EventArgs e)
    3939        {
    40             OpenFile dialog = new OpenFile();
    41 
    42             string s = dialog.GetChoice();
    43             dialog.Destroy();
     40            string s = OpenFile.GetChoice();
    4441            if(s == null)
    4542                return;
     
    9188            if(notebook1.NPages <= 0)
    9289                return;
    93             SaveFile save = new SaveFile();
     90
    9491            PictureView view = notebook1.CurrentPageWidget as PictureView;
    95             save.Save(view.Picture);
    96             save.Destroy();
     92
     93            string s = OpenFile.GetChoice();
     94            if(s == null)
     95                return;
     96
     97            view.Picture.Save(s);
    9798        }
    9899
Note: See TracChangeset for help on using the changeset viewer.