Example #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();
        }
Example #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();
        }
Example #3
0
 protected void OnClose(object s, EventArgs args)
 {
     SteticMain.SteticApp.UpdateWidgetLibraries(false);
     SteticMain.SaveConfiguration();
 }
Example #4
0
 void Close(object obj, EventArgs e)
 {
     SteticMain.CloseProject();
 }
Example #5
0
 void Quit(object obj, EventArgs e)
 {
     SteticMain.Quit();
 }
Example #6
0
 void ShowLibraryManager(object obj, EventArgs e)
 {
     SteticMain.ShowLibraryManager();
 }
Example #7
0
 void Redo(object obj, EventArgs e)
 {
     SteticMain.GetUndoQueue().Redo();
 }
Example #8
0
 void SaveFileAs(object obj, EventArgs e)
 {
     SteticMain.SaveProjectAs();
 }