Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
comparison gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs @ 23:d661cb257511
Re #86: Initial GTK# GUI (because of Re #53)
* Refactor file saving in to a common method
* Replace fixed location with dialog
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 17 Aug 2009 19:49:05 +0000 |
parents | 685532d43a96 |
children | 105c68bb759c |
comparison
equal
deleted
inserted
replaced
22:40485c6e5cb0 | 23:d661cb257511 |
---|---|
79 this.UIManager = new Gtk.UIManager(); | 79 this.UIManager = new Gtk.UIManager(); |
80 Gtk.ActionGroup w1 = new Gtk.ActionGroup("Default"); | 80 Gtk.ActionGroup w1 = new Gtk.ActionGroup("Default"); |
81 this.menuFile = new Gtk.Action("menuFile", Mono.Unix.Catalog.GetString("File"), null, null); | 81 this.menuFile = new Gtk.Action("menuFile", Mono.Unix.Catalog.GetString("File"), null, null); |
82 this.menuFile.ShortLabel = Mono.Unix.Catalog.GetString("File"); | 82 this.menuFile.ShortLabel = Mono.Unix.Catalog.GetString("File"); |
83 w1.Add(this.menuFile, null); | 83 w1.Add(this.menuFile, null); |
84 this.miCreateArmy = new Gtk.Action("miCreateArmy", Mono.Unix.Catalog.GetString("Create army"), null, null); | 84 this.miCreateArmy = new Gtk.Action("miCreateArmy", Mono.Unix.Catalog.GetString("Create army"), null, "gtk-new"); |
85 this.miCreateArmy.Sensitive = false; | 85 this.miCreateArmy.Sensitive = false; |
86 this.miCreateArmy.ShortLabel = Mono.Unix.Catalog.GetString("Create army"); | 86 this.miCreateArmy.ShortLabel = Mono.Unix.Catalog.GetString("Create army"); |
87 w1.Add(this.miCreateArmy, null); | 87 w1.Add(this.miCreateArmy, null); |
88 this.miOpenArmy = new Gtk.Action("miOpenArmy", Mono.Unix.Catalog.GetString("Open army"), null, null); | 88 this.miOpenArmy = new Gtk.Action("miOpenArmy", Mono.Unix.Catalog.GetString("Open army"), null, "gtk-open"); |
89 this.miOpenArmy.Sensitive = false; | 89 this.miOpenArmy.Sensitive = false; |
90 this.miOpenArmy.ShortLabel = Mono.Unix.Catalog.GetString("Open army"); | 90 this.miOpenArmy.ShortLabel = Mono.Unix.Catalog.GetString("Open army"); |
91 w1.Add(this.miOpenArmy, null); | 91 w1.Add(this.miOpenArmy, null); |
92 this.miSaveArmy = new Gtk.Action("miSaveArmy", Mono.Unix.Catalog.GetString("Save army"), null, null); | 92 this.miSaveArmy = new Gtk.Action("miSaveArmy", Mono.Unix.Catalog.GetString("Save army"), null, "gtk-save"); |
93 this.miSaveArmy.Sensitive = false; | 93 this.miSaveArmy.Sensitive = false; |
94 this.miSaveArmy.ShortLabel = Mono.Unix.Catalog.GetString("Save army"); | 94 this.miSaveArmy.ShortLabel = Mono.Unix.Catalog.GetString("Save army"); |
95 w1.Add(this.miSaveArmy, null); | 95 w1.Add(this.miSaveArmy, null); |
96 this.miSaveArmyAs = new Gtk.Action("miSaveArmyAs", Mono.Unix.Catalog.GetString("Save army as"), null, null); | 96 this.miSaveArmyAs = new Gtk.Action("miSaveArmyAs", Mono.Unix.Catalog.GetString("Save army as"), null, "gtk-save-as"); |
97 this.miSaveArmyAs.Sensitive = false; | 97 this.miSaveArmyAs.Sensitive = false; |
98 this.miSaveArmyAs.ShortLabel = Mono.Unix.Catalog.GetString("Save army as"); | 98 this.miSaveArmyAs.ShortLabel = Mono.Unix.Catalog.GetString("Save army as"); |
99 w1.Add(this.miSaveArmyAs, null); | 99 w1.Add(this.miSaveArmyAs, null); |
100 this.miCloseArmy = new Gtk.Action("miCloseArmy", Mono.Unix.Catalog.GetString("Close army"), null, null); | 100 this.miCloseArmy = new Gtk.Action("miCloseArmy", Mono.Unix.Catalog.GetString("Close army"), null, "gtk-close"); |
101 this.miCloseArmy.Sensitive = false; | 101 this.miCloseArmy.Sensitive = false; |
102 this.miCloseArmy.ShortLabel = Mono.Unix.Catalog.GetString("Close army"); | 102 this.miCloseArmy.ShortLabel = Mono.Unix.Catalog.GetString("Close army"); |
103 w1.Add(this.miCloseArmy, null); | 103 w1.Add(this.miCloseArmy, null); |
104 this.miChangeGameSystem = new Gtk.Action("miChangeGameSystem", Mono.Unix.Catalog.GetString("Change game system"), null, null); | 104 this.miChangeGameSystem = new Gtk.Action("miChangeGameSystem", Mono.Unix.Catalog.GetString("Change game system"), null, null); |
105 this.miChangeGameSystem.ShortLabel = Mono.Unix.Catalog.GetString("Change game system"); | 105 this.miChangeGameSystem.ShortLabel = Mono.Unix.Catalog.GetString("Change game system"); |
106 w1.Add(this.miChangeGameSystem, null); | 106 w1.Add(this.miChangeGameSystem, null); |
107 this.miReloadFiles = new Gtk.Action("miReloadFiles", Mono.Unix.Catalog.GetString("Reload files"), null, null); | 107 this.miReloadFiles = new Gtk.Action("miReloadFiles", Mono.Unix.Catalog.GetString("Reload files"), null, "gtk-refresh"); |
108 this.miReloadFiles.Sensitive = false; | 108 this.miReloadFiles.Sensitive = false; |
109 this.miReloadFiles.ShortLabel = Mono.Unix.Catalog.GetString("Reload files"); | 109 this.miReloadFiles.ShortLabel = Mono.Unix.Catalog.GetString("Reload files"); |
110 w1.Add(this.miReloadFiles, null); | 110 w1.Add(this.miReloadFiles, null); |
111 this.miExit = new Gtk.Action("miExit", Mono.Unix.Catalog.GetString("Exit"), null, null); | 111 this.miExit = new Gtk.Action("miExit", Mono.Unix.Catalog.GetString("Exit"), null, "gtk-quit"); |
112 this.miExit.ShortLabel = Mono.Unix.Catalog.GetString("Exit"); | 112 this.miExit.ShortLabel = Mono.Unix.Catalog.GetString("Exit"); |
113 w1.Add(this.miExit, null); | 113 w1.Add(this.miExit, null); |
114 this.menuEdit = new Gtk.Action("menuEdit", Mono.Unix.Catalog.GetString("Edit"), null, null); | 114 this.menuEdit = new Gtk.Action("menuEdit", Mono.Unix.Catalog.GetString("Edit"), null, null); |
115 this.menuEdit.ShortLabel = Mono.Unix.Catalog.GetString("Edit"); | 115 this.menuEdit.ShortLabel = Mono.Unix.Catalog.GetString("Edit"); |
116 w1.Add(this.menuEdit, null); | 116 w1.Add(this.menuEdit, null); |
117 this.miUndo = new Gtk.Action("miUndo", Mono.Unix.Catalog.GetString("Undo"), null, null); | 117 this.miUndo = new Gtk.Action("miUndo", Mono.Unix.Catalog.GetString("Undo"), null, "gtk-undo"); |
118 this.miUndo.Sensitive = false; | 118 this.miUndo.Sensitive = false; |
119 this.miUndo.ShortLabel = Mono.Unix.Catalog.GetString("Undo"); | 119 this.miUndo.ShortLabel = Mono.Unix.Catalog.GetString("Undo"); |
120 w1.Add(this.miUndo, null); | 120 w1.Add(this.miUndo, null); |
121 this.miRedo = new Gtk.Action("miRedo", Mono.Unix.Catalog.GetString("Redo"), null, null); | 121 this.miRedo = new Gtk.Action("miRedo", Mono.Unix.Catalog.GetString("Redo"), null, "gtk-redo"); |
122 this.miRedo.Sensitive = false; | 122 this.miRedo.Sensitive = false; |
123 this.miRedo.ShortLabel = Mono.Unix.Catalog.GetString("Redo"); | 123 this.miRedo.ShortLabel = Mono.Unix.Catalog.GetString("Redo"); |
124 w1.Add(this.miRedo, null); | 124 w1.Add(this.miRedo, null); |
125 this.menuHelp = new Gtk.Action("menuHelp", Mono.Unix.Catalog.GetString("Help"), null, null); | 125 this.menuHelp = new Gtk.Action("menuHelp", Mono.Unix.Catalog.GetString("Help"), null, null); |
126 this.menuHelp.ShortLabel = Mono.Unix.Catalog.GetString("Help"); | 126 this.menuHelp.ShortLabel = Mono.Unix.Catalog.GetString("Help"); |
127 w1.Add(this.menuHelp, null); | 127 w1.Add(this.menuHelp, null); |
128 this.miAbout = new Gtk.Action("miAbout", Mono.Unix.Catalog.GetString("About"), null, null); | 128 this.miAbout = new Gtk.Action("miAbout", Mono.Unix.Catalog.GetString("About"), null, "gtk-about"); |
129 this.miAbout.ShortLabel = Mono.Unix.Catalog.GetString("About"); | 129 this.miAbout.ShortLabel = Mono.Unix.Catalog.GetString("About"); |
130 w1.Add(this.miAbout, null); | 130 w1.Add(this.miAbout, null); |
131 this.miDebugInformation = new Gtk.Action("miDebugInformation", Mono.Unix.Catalog.GetString("Debug Information"), null, null); | 131 this.miDebugInformation = new Gtk.Action("miDebugInformation", Mono.Unix.Catalog.GetString("Debug Information"), null, null); |
132 this.miDebugInformation.ShortLabel = Mono.Unix.Catalog.GetString("Debug Information"); | 132 this.miDebugInformation.ShortLabel = Mono.Unix.Catalog.GetString("Debug Information"); |
133 w1.Add(this.miDebugInformation, null); | 133 w1.Add(this.miDebugInformation, null); |
134 this.newArmyButton = new Gtk.Action("newArmyButton", null, null, "gtk-new"); | 134 this.newArmyButton = new Gtk.Action("newArmyButton", null, null, "gtk-new"); |
135 this.newArmyButton.Sensitive = false; | 135 this.newArmyButton.Sensitive = false; |
136 this.newArmyButton.ShortLabel = ""; | |
136 w1.Add(this.newArmyButton, null); | 137 w1.Add(this.newArmyButton, null); |
137 this.openArmyButton = new Gtk.Action("openArmyButton", null, null, "gtk-open"); | 138 this.openArmyButton = new Gtk.Action("openArmyButton", null, null, "gtk-open"); |
138 this.openArmyButton.Sensitive = false; | 139 this.openArmyButton.Sensitive = false; |
140 this.openArmyButton.ShortLabel = ""; | |
139 w1.Add(this.openArmyButton, null); | 141 w1.Add(this.openArmyButton, null); |
140 this.saveArmyButton = new Gtk.Action("saveArmyButton", null, null, "gtk-save"); | 142 this.saveArmyButton = new Gtk.Action("saveArmyButton", null, null, "gtk-save"); |
141 this.saveArmyButton.Sensitive = false; | 143 this.saveArmyButton.Sensitive = false; |
144 this.saveArmyButton.ShortLabel = ""; | |
142 w1.Add(this.saveArmyButton, null); | 145 w1.Add(this.saveArmyButton, null); |
143 this.undoActionButton = new Gtk.Action("undoActionButton", null, null, "gtk-undo"); | 146 this.undoActionButton = new Gtk.Action("undoActionButton", null, null, "gtk-undo"); |
144 this.undoActionButton.Sensitive = false; | 147 this.undoActionButton.Sensitive = false; |
148 this.undoActionButton.ShortLabel = ""; | |
145 w1.Add(this.undoActionButton, null); | 149 w1.Add(this.undoActionButton, null); |
146 this.redoActionButton = new Gtk.Action("redoActionButton", null, null, "gtk-redo"); | 150 this.redoActionButton = new Gtk.Action("redoActionButton", null, null, "gtk-redo"); |
147 this.redoActionButton.Sensitive = false; | 151 this.redoActionButton.Sensitive = false; |
152 this.redoActionButton.ShortLabel = ""; | |
148 w1.Add(this.redoActionButton, null); | 153 w1.Add(this.redoActionButton, null); |
149 this.goDown = new Gtk.Action("goDown", null, null, null); | 154 this.goDown = new Gtk.Action("goDown", null, null, null); |
155 this.goDown.ShortLabel = ""; | |
150 w1.Add(this.goDown, null); | 156 w1.Add(this.goDown, null); |
151 this.add = new Gtk.Action("add", null, null, "gtk-add"); | 157 this.add = new Gtk.Action("add", null, null, "gtk-add"); |
158 this.add.ShortLabel = ""; | |
152 w1.Add(this.add, null); | 159 w1.Add(this.add, null); |
153 this.UIManager.InsertActionGroup(w1, 0); | 160 this.UIManager.InsertActionGroup(w1, 0); |
154 this.AddAccelGroup(this.UIManager.AccelGroup); | 161 this.AddAccelGroup(this.UIManager.AccelGroup); |
155 this.Name = "IBBoard.WarFoundry.GTK.FrmMainWindow"; | 162 this.Name = "IBBoard.WarFoundry.GTK.FrmMainWindow"; |
156 this.Title = Mono.Unix.Catalog.GetString("MainWindow"); | 163 this.Title = Mono.Unix.Catalog.GetString("MainWindow"); |