Просмотр исходного кода

hide unavailable platforms from starter

mikymod 11 лет назад
Родитель
Сommit
699a895a3e

+ 23 - 0
tools/gui/starter/MainWindow.cs

@@ -29,6 +29,29 @@ public partial class MainWindow: Gtk.Window
 	public MainWindow () : base (Gtk.WindowType.Toplevel)
 	{
 		Build ();
+
+		// Fill platform combobox
+		PlatformID p_id = Environment.OSVersion.Platform;
+		switch (p_id)
+		{
+		case PlatformID.Unix:
+			platform_combobox.AppendText ("Linux32");
+			platform_combobox.AppendText ("Linux64");
+			break;
+		case PlatformID.Win32NT:
+		case PlatformID.Win32S:
+		case PlatformID.Win32Windows:
+		case PlatformID.WinCE:
+			platform_combobox.AppendText ("Windows32");
+			platform_combobox.AppendText ("Windows64");
+			break;
+		}
+		platform_combobox.AppendText ("Android");
+
+		// Fill debug combobox
+		build_combobox.AppendText ("Debug");
+		build_combobox.AppendText ("Development");
+		build_combobox.AppendText ("Release");
 	}
 
 	//--------------------------------------------------------------------------------

+ 2 - 30
tools/gui/starter/gtk-gui/MainWindow.cs

@@ -1,42 +1,24 @@
 
 // This file has been generated by the GUI designer. Do not modify.
-
 public partial class MainWindow
 {
 	private global::Gtk.VBox vbox4;
-	
 	private global::Gtk.HBox hbox9;
-	
 	private global::Gtk.VBox labels_vbox;
-	
 	private global::Gtk.Label project_label;
-	
 	private global::Gtk.Label plarform_label;
-	
 	private global::Gtk.Label build_label;
-	
 	private global::Gtk.Label host_label;
-	
 	private global::Gtk.VBox vbox7;
-	
 	private global::Gtk.HBox hbox10;
-	
 	private global::Gtk.Entry project_entry;
-	
 	private global::Gtk.Button project_button;
-	
 	private global::Gtk.ComboBox platform_combobox;
-	
 	private global::Gtk.ComboBox build_combobox;
-	
 	private global::Gtk.HBox hbox11;
-	
 	private global::Gtk.Entry host_entry;
-	
 	private global::Gtk.Button button6;
-	
 	private global::Gtk.Button run_button;
-	
 	private global::Gtk.Statusbar statusbar1;
 
 	protected virtual void Build ()
@@ -137,13 +119,7 @@ public partial class MainWindow
 		w8.Fill = false;
 		// Container child vbox7.Gtk.Box+BoxChild
 		this.platform_combobox = global::Gtk.ComboBox.NewText ();
-		this.platform_combobox.AppendText (global::Mono.Unix.Catalog.GetString ("Linux32"));
-		this.platform_combobox.AppendText (global::Mono.Unix.Catalog.GetString ("Linux64"));
-		this.platform_combobox.AppendText (global::Mono.Unix.Catalog.GetString ("Windows32"));
-		this.platform_combobox.AppendText (global::Mono.Unix.Catalog.GetString ("Windows64"));
-		this.platform_combobox.AppendText (global::Mono.Unix.Catalog.GetString ("Android"));
 		this.platform_combobox.Name = "platform_combobox";
-		this.platform_combobox.Active = 0;
 		this.vbox7.Add (this.platform_combobox);
 		global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox7 [this.platform_combobox]));
 		w9.Position = 1;
@@ -151,11 +127,7 @@ public partial class MainWindow
 		w9.Fill = false;
 		// Container child vbox7.Gtk.Box+BoxChild
 		this.build_combobox = global::Gtk.ComboBox.NewText ();
-		this.build_combobox.AppendText (global::Mono.Unix.Catalog.GetString ("Debug"));
-		this.build_combobox.AppendText (global::Mono.Unix.Catalog.GetString ("Development"));
-		this.build_combobox.AppendText (global::Mono.Unix.Catalog.GetString ("Release"));
 		this.build_combobox.Name = "build_combobox";
-		this.build_combobox.Active = 0;
 		this.vbox7.Add (this.build_combobox);
 		global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox7 [this.build_combobox]));
 		w10.Position = 2;
@@ -227,8 +199,8 @@ public partial class MainWindow
 		if ((this.Child != null)) {
 			this.Child.ShowAll ();
 		}
-		this.DefaultWidth = 291;
-		this.DefaultHeight = 236;
+		this.DefaultWidth = 301;
+		this.DefaultHeight = 250;
 		this.Show ();
 		this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
 		this.project_button.Clicked += new global::System.EventHandler (this.OnProjectButtonClicked);

+ 3 - 11
tools/gui/starter/gtk-gui/gui.stetic

@@ -7,7 +7,7 @@
     <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <widget-library name="../bin/Debug/starter.exe" internal="true" />
   </import>
-  <widget class="Gtk.Window" id="MainWindow" design-size="291 236">
+  <widget class="Gtk.Window" id="MainWindow" design-size="301 250">
     <property name="MemberName" />
     <property name="Title" translatable="yes">Starter</property>
     <property name="WindowPosition">CenterOnParent</property>
@@ -131,12 +131,7 @@
                   <widget class="Gtk.ComboBox" id="platform_combobox">
                     <property name="MemberName" />
                     <property name="IsTextCombo">True</property>
-                    <property name="Items" translatable="yes">Linux32
-Linux64
-Windows32
-Windows64
-Android</property>
-                    <property name="Active">0</property>
+                    <property name="Items" translatable="yes" />
                   </widget>
                   <packing>
                     <property name="Position">1</property>
@@ -149,10 +144,7 @@ Android</property>
                   <widget class="Gtk.ComboBox" id="build_combobox">
                     <property name="MemberName" />
                     <property name="IsTextCombo">True</property>
-                    <property name="Items" translatable="yes">Debug
-Development
-Release</property>
-                    <property name="Active">0</property>
+                    <property name="Items" translatable="yes" />
                   </widget>
                   <packing>
                     <property name="Position">2</property>

+ 0 - 14
tools/gui/starter/gtk-gui/starter.ProjectDialog.cs

@@ -5,33 +5,19 @@ namespace starter
 	public partial class ProjectDialog
 	{
 		private global::Gtk.HBox hbox4;
-		
 		private global::Gtk.VBox vbox3;
-		
 		private global::Gtk.Label name_label;
-		
 		private global::Gtk.Label source_label;
-		
 		private global::Gtk.Label bundle_label;
-		
 		private global::Gtk.VBox vbox4;
-		
 		private global::Gtk.Entry name_entry;
-		
 		private global::Gtk.HBox hbox5;
-		
 		private global::Gtk.Entry source_entry;
-		
 		private global::Gtk.Button source_button;
-		
 		private global::Gtk.HBox hbox6;
-		
 		private global::Gtk.Entry destination_entry;
-		
 		private global::Gtk.Button destination_button;
-		
 		private global::Gtk.Button buttonCancel;
-		
 		private global::Gtk.Button buttonOk;
 
 		protected virtual void Build ()