Exemplo n.º 1
0
        void OpenFile(object obj, EventArgs e)
        {
            FileChooserDialog dialog =
                new FileChooserDialog(Catalog.GetString(Catalog.GetString("Open Stetic File")), null, FileChooserAction.Open,
                                      Gtk.Stock.Cancel, Gtk.ResponseType.Cancel,
                                      Gtk.Stock.Open, Gtk.ResponseType.Ok);
            int response = dialog.Run();

            if (response == (int)Gtk.ResponseType.Ok)
            {
                SteticMain.LoadProject(dialog.Filename);
                AddRecentFile(dialog.Filename);
            }
            dialog.Hide();
        }
Exemplo n.º 2
0
        void BuildRecentMenu()
        {
            foreach (Gtk.Widget w in recentFilesMenu)
            {
                recentFilesMenu.Remove(w);
            }

            int n = 0;

            foreach (string f in recentFiles.Files)
            {
                MenuItem m     = new MenuItem("_" + n + " " + Path.GetFileName(f));
                string   fname = f;
                m.Activated += delegate {
                    SteticMain.LoadProject(fname);
                    AddRecentFile(fname);
                };
                recentFilesMenu.Append(m);
                n++;
            }
            recentFilesMenu.ShowAll();
        }
Exemplo n.º 3
0
 protected void OnClose(object s, EventArgs args)
 {
     SteticMain.SteticApp.UpdateWidgetLibraries(false);
     SteticMain.SaveConfiguration();
 }
Exemplo n.º 4
0
 void Close(object obj, EventArgs e)
 {
     SteticMain.CloseProject();
 }
Exemplo n.º 5
0
 void Quit(object obj, EventArgs e)
 {
     SteticMain.Quit();
 }
Exemplo n.º 6
0
 void ShowLibraryManager(object obj, EventArgs e)
 {
     SteticMain.ShowLibraryManager();
 }
Exemplo n.º 7
0
 void Redo(object obj, EventArgs e)
 {
     SteticMain.GetUndoQueue().Redo();
 }
Exemplo n.º 8
0
 void SaveFileAs(object obj, EventArgs e)
 {
     SteticMain.SaveProjectAs();
 }