[longomatch] Add dialog for new project selection



commit 0966cbe86dc1eb2ff5d88b1f5941c22e15ee8f8d
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Feb 20 19:54:27 2010 +0100

    Add dialog for new project selection

 LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs    |   44 +++++
 LongoMatch/LongoMatch.mdp                          |    2 +
 LongoMatch/Makefile.am                             |    2 +
 ...LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs |  170 ++++++++++++++++++
 LongoMatch/gtk-gui/gui.stetic                      |  183 +++++++++++++++++++-
 5 files changed, 397 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs b/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs
new file mode 100644
index 0000000..e4c5bfa
--- /dev/null
+++ b/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs
@@ -0,0 +1,44 @@
+// 
+//  Copyright (C) 2010 Andoni Morales Alastruey
+// 
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+// 
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//  
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+// 
+
+using System;
+using LongoMatch.Common;
+
+namespace LongoMatch.Gui.Dialog
+{
+	
+	
+	public partial class ProjectSelectionDialog : Gtk.Dialog
+	{
+		
+		public ProjectSelectionDialog()
+		{
+			this.Build();
+		}
+		
+		public ProjectType Type{
+			get{
+				if (fromfileradiobutton.Active)
+					return ProjectType.NewFileProject;
+				else
+					return ProjectType.NewFakeCaptureProject;
+				
+			}
+		}
+	}
+}
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index afcd8b1..4870500 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -177,6 +177,8 @@
     <File name="Gui/Component/TagsTreeWidget.cs" subtype="Code" buildaction="Compile" />
     <File name="gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs" subtype="Code" buildaction="Compile" />
     <File name="Common/Constants.cs" subtype="Code" buildaction="Compile" />
+    <File name="gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs" subtype="Code" buildaction="Compile" />
+    <File name="Gui/Dialog/ProjectSelectionDialog.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
diff --git a/LongoMatch/Makefile.am b/LongoMatch/Makefile.am
index adae39a..f3f87ad 100644
--- a/LongoMatch/Makefile.am
+++ b/LongoMatch/Makefile.am
@@ -130,6 +130,7 @@ FILES = \
 	gtk-gui/LongoMatch.Gui.Dialog.PlayersSelectionDialog.cs \
 	gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs \
 	gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs \
+	gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs \
 	gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs \
 	gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs \
 	gtk-gui/LongoMatch.Gui.Dialog.TeamTemplateEditor.cs \
@@ -171,6 +172,7 @@ FILES = \
 	Gui/Dialog/PlayersSelectionDialog.cs \
 	Gui/Dialog/ProjectsManager.cs \
 	Gui/Dialog/ProjectTemplateEditorDialog.cs \
+	Gui/Dialog/ProjectSelectionDialog.cs \
 	Gui/Dialog/SnapshotsDialog.cs \
 	Gui/Dialog/TaggerDialog.cs \
 	Gui/Dialog/TemplatesEditor.cs \
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs
new file mode 100644
index 0000000..53809f3
--- /dev/null
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs
@@ -0,0 +1,170 @@
+// ------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//      
+// 
+//      Changes to this file may cause incorrect behavior and will be lost if 
+//      the code is regenerated.
+//  </autogenerated>
+// ------------------------------------------------------------------------------
+
+namespace LongoMatch.Gui.Dialog {
+    
+    
+    public partial class ProjectSelectionDialog {
+        
+        private Gtk.VBox vbox2;
+        
+        private Gtk.HBox hbox1;
+        
+        private Gtk.Image image61;
+        
+        private Gtk.Label label1;
+        
+        private Gtk.RadioButton fromfileradiobutton;
+        
+        private Gtk.HBox hbox2;
+        
+        private Gtk.Image image62;
+        
+        private Gtk.Label label2;
+        
+        private Gtk.RadioButton fakeliveradiobutton;
+        
+        private Gtk.Button buttonCancel;
+        
+        private Gtk.Button buttonOk;
+        
+        protected virtual void Build() {
+            Stetic.Gui.Initialize(this);
+            // Widget LongoMatch.Gui.Dialog.ProjectSelectionDialog
+            this.Name = "LongoMatch.Gui.Dialog.ProjectSelectionDialog";
+            this.Title = Mono.Unix.Catalog.GetString("New Project");
+            this.Icon = Stetic.IconLoader.LoadIcon(this, "longomatch", Gtk.IconSize.Menu, 16);
+            this.WindowPosition = ((Gtk.WindowPosition)(4));
+            this.Modal = true;
+            this.HasSeparator = false;
+            // Internal child LongoMatch.Gui.Dialog.ProjectSelectionDialog.VBox
+            Gtk.VBox w1 = this.VBox;
+            w1.Name = "dialog1_VBox";
+            w1.BorderWidth = ((uint)(2));
+            // Container child dialog1_VBox.Gtk.Box+BoxChild
+            this.vbox2 = new Gtk.VBox();
+            this.vbox2.Name = "vbox2";
+            this.vbox2.Spacing = 6;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.hbox1 = new Gtk.HBox();
+            this.hbox1.Name = "hbox1";
+            this.hbox1.Spacing = 6;
+            // Container child hbox1.Gtk.Box+BoxChild
+            this.image61 = new Gtk.Image();
+            this.image61.Name = "image61";
+            this.hbox1.Add(this.image61);
+            Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.image61]));
+            w2.Position = 0;
+            w2.Expand = false;
+            w2.Fill = false;
+            // Container child hbox1.Gtk.Box+BoxChild
+            this.label1 = new Gtk.Label();
+            this.label1.Name = "label1";
+            this.label1.LabelProp = Mono.Unix.Catalog.GetString("New project using a video file");
+            this.hbox1.Add(this.label1);
+            Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
+            w3.Position = 1;
+            // Container child hbox1.Gtk.Box+BoxChild
+            this.fromfileradiobutton = new Gtk.RadioButton("");
+            this.fromfileradiobutton.CanFocus = true;
+            this.fromfileradiobutton.Name = "fromfileradiobutton";
+            this.fromfileradiobutton.Active = true;
+            this.fromfileradiobutton.DrawIndicator = true;
+            this.fromfileradiobutton.UseUnderline = true;
+            this.fromfileradiobutton.Group = new GLib.SList(System.IntPtr.Zero);
+            this.hbox1.Add(this.fromfileradiobutton);
+            Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox1[this.fromfileradiobutton]));
+            w4.Position = 2;
+            w4.Expand = false;
+            w4.Fill = false;
+            this.vbox2.Add(this.hbox1);
+            Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
+            w5.Position = 0;
+            w5.Expand = false;
+            w5.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.hbox2 = new Gtk.HBox();
+            this.hbox2.Name = "hbox2";
+            this.hbox2.Spacing = 6;
+            // Container child hbox2.Gtk.Box+BoxChild
+            this.image62 = new Gtk.Image();
+            this.image62.Name = "image62";
+            this.hbox2.Add(this.image62);
+            Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox2[this.image62]));
+            w6.Position = 0;
+            w6.Expand = false;
+            w6.Fill = false;
+            // Container child hbox2.Gtk.Box+BoxChild
+            this.label2 = new Gtk.Label();
+            this.label2.Name = "label2";
+            this.label2.LabelProp = Mono.Unix.Catalog.GetString("Live project using a fake capture device");
+            this.hbox2.Add(this.label2);
+            Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox2[this.label2]));
+            w7.Position = 1;
+            // Container child hbox2.Gtk.Box+BoxChild
+            this.fakeliveradiobutton = new Gtk.RadioButton("");
+            this.fakeliveradiobutton.CanFocus = true;
+            this.fakeliveradiobutton.Name = "fakeliveradiobutton";
+            this.fakeliveradiobutton.DrawIndicator = true;
+            this.fakeliveradiobutton.UseUnderline = true;
+            this.fakeliveradiobutton.Group = this.fromfileradiobutton.Group;
+            this.hbox2.Add(this.fakeliveradiobutton);
+            Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox2[this.fakeliveradiobutton]));
+            w8.Position = 2;
+            w8.Expand = false;
+            w8.Fill = false;
+            this.vbox2.Add(this.hbox2);
+            Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox2]));
+            w9.Position = 1;
+            w9.Expand = false;
+            w9.Fill = false;
+            w1.Add(this.vbox2);
+            Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
+            w10.Position = 0;
+            // Internal child LongoMatch.Gui.Dialog.ProjectSelectionDialog.ActionArea
+            Gtk.HButtonBox w11 = this.ActionArea;
+            w11.Name = "dialog1_ActionArea";
+            w11.Spacing = 6;
+            w11.BorderWidth = ((uint)(5));
+            w11.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
+            // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+            this.buttonCancel = new Gtk.Button();
+            this.buttonCancel.CanDefault = true;
+            this.buttonCancel.CanFocus = true;
+            this.buttonCancel.Name = "buttonCancel";
+            this.buttonCancel.UseStock = true;
+            this.buttonCancel.UseUnderline = true;
+            this.buttonCancel.Label = "gtk-cancel";
+            this.AddActionWidget(this.buttonCancel, -6);
+            Gtk.ButtonBox.ButtonBoxChild w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w11[this.buttonCancel]));
+            w12.Expand = false;
+            w12.Fill = false;
+            // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+            this.buttonOk = new Gtk.Button();
+            this.buttonOk.CanDefault = true;
+            this.buttonOk.CanFocus = true;
+            this.buttonOk.Name = "buttonOk";
+            this.buttonOk.UseStock = true;
+            this.buttonOk.UseUnderline = true;
+            this.buttonOk.Label = "gtk-ok";
+            this.AddActionWidget(this.buttonOk, -5);
+            Gtk.ButtonBox.ButtonBoxChild w13 = ((Gtk.ButtonBox.ButtonBoxChild)(w11[this.buttonOk]));
+            w13.Position = 1;
+            w13.Expand = false;
+            w13.Fill = false;
+            if ((this.Child != null)) {
+                this.Child.ShowAll();
+            }
+            this.DefaultWidth = 400;
+            this.DefaultHeight = 186;
+            this.Show();
+        }
+    }
+}
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index caa9cc2..93d41f7 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -1319,7 +1319,6 @@
         <child>
           <widget class="Gtk.Label" id="startlabel">
             <property name="MemberName" />
-            <property name="LabelProp" translatable="yes" />
           </widget>
           <packing>
             <property name="LeftAttach">1</property>
@@ -1819,7 +1818,7 @@
                     <property name="MemberName" />
                     <property name="Spacing">6</property>
                     <child>
-                      <widget class="Gtk.HBox" id="hbox1">
+                      <widget class="Gtk.HBox" id="hbox2">
                         <property name="MemberName" />
                         <property name="Spacing">6</property>
                         <child>
@@ -3059,7 +3058,6 @@ Full HD 1080p (16:9 - 1920x1080)</property>
             <child>
               <widget class="Gtk.Label" id="playLabel">
                 <property name="MemberName" />
-                <property name="LabelProp" translatable="yes" />
               </widget>
               <packing>
                 <property name="LeftAttach">1</property>
@@ -5323,4 +5321,181 @@ You can add new tags using the text entry and clicking "Add Tag"</property>
       </widget>
     </child>
   </widget>
-</stetic-interface>
\ No newline at end of file
+  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectSelectionDialog" design-size="400 186">
+    <property name="MemberName" />
+    <property name="Title" translatable="yes">New Project</property>
+    <property name="Icon">stock:longomatch Menu</property>
+    <property name="WindowPosition">CenterOnParent</property>
+    <property name="Modal">True</property>
+    <property name="Buttons">2</property>
+    <property name="HelpButton">False</property>
+    <property name="HasSeparator">False</property>
+    <child internal-child="VBox">
+      <widget class="Gtk.VBox" id="dialog1_VBox">
+        <property name="MemberName" />
+        <property name="BorderWidth">2</property>
+        <child>
+          <widget class="Gtk.VBox" id="vbox2">
+            <property name="MemberName" />
+            <property name="Spacing">6</property>
+            <child>
+              <widget class="Gtk.HBox" id="hbox1">
+                <property name="MemberName" />
+                <property name="Spacing">6</property>
+                <child>
+                  <widget class="Gtk.Image" id="image61">
+                    <property name="MemberName" />
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">True</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.Label" id="label1">
+                    <property name="MemberName" />
+                    <property name="LabelProp" translatable="yes">New project using a video file</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.RadioButton" id="fromfileradiobutton">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="Label" translatable="yes" />
+                    <property name="DrawIndicator">True</property>
+                    <property name="HasLabel">False</property>
+                    <property name="UseUnderline">True</property>
+                    <property name="Group">project</property>
+                    <child>
+                      <placeholder />
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="Position">2</property>
+                    <property name="AutoSize">False</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">0</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.HBox" id="hbox2">
+                <property name="MemberName" />
+                <property name="Spacing">6</property>
+                <child>
+                  <widget class="Gtk.Image" id="image62">
+                    <property name="MemberName" />
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">True</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.Label" id="label2">
+                    <property name="MemberName" />
+                    <property name="LabelProp" translatable="yes">Live project using a fake capture device</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.RadioButton" id="fakeliveradiobutton">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="Label" translatable="yes" />
+                    <property name="DrawIndicator">True</property>
+                    <property name="HasLabel">False</property>
+                    <property name="UseUnderline">True</property>
+                    <property name="Group">project</property>
+                    <child>
+                      <placeholder />
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="Position">2</property>
+                    <property name="AutoSize">False</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder />
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">True</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+    <child internal-child="ActionArea">
+      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+        <property name="MemberName" />
+        <property name="Spacing">6</property>
+        <property name="BorderWidth">5</property>
+        <property name="Size">2</property>
+        <property name="LayoutStyle">End</property>
+        <child>
+          <widget class="Gtk.Button" id="buttonCancel">
+            <property name="MemberName" />
+            <property name="CanDefault">True</property>
+            <property name="CanFocus">True</property>
+            <property name="UseStock">True</property>
+            <property name="Type">StockItem</property>
+            <property name="StockId">gtk-cancel</property>
+            <property name="ResponseId">-6</property>
+            <property name="label">gtk-cancel</property>
+          </widget>
+          <packing>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.Button" id="buttonOk">
+            <property name="MemberName" />
+            <property name="CanDefault">True</property>
+            <property name="CanFocus">True</property>
+            <property name="UseStock">True</property>
+            <property name="Type">StockItem</property>
+            <property name="StockId">gtk-ok</property>
+            <property name="ResponseId">-5</property>
+            <property name="label">gtk-ok</property>
+          </widget>
+          <packing>
+            <property name="Position">1</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</stetic-interface>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]