[longomatch/livecapture2: 10/31] Add option for live project in the project selection dialog



commit bf60afe0207b5afde2f73a73e4d4ebdf8e95dc9e
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Mar 31 08:15:26 2010 +0200

    Add option for live project in the project selection dialog

 LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs    |    2 +
 ...LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs |   94 +++++++++++++------
 LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs    |    2 +-
 LongoMatch/gtk-gui/gui.stetic                      |   43 +++++++++-
 4 files changed, 108 insertions(+), 33 deletions(-)
---
diff --git a/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs b/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs
index 6583c8c..93e7236 100644
--- a/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs
+++ b/LongoMatch/Gui/Dialog/ProjectSelectionDialog.cs
@@ -35,6 +35,8 @@ namespace LongoMatch.Gui.Dialog
 			get{
 				if (fromfileradiobutton.Active)
 					return ProjectType.FileProject;
+				else if (liveradiobutton.Active)
+					return ProjectType.CaptureProject;				
 				else
 					return ProjectType.FakeCaptureProject;
 				
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs
index 4cf48bc..b09c91e 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs
@@ -23,6 +23,12 @@ namespace LongoMatch.Gui.Dialog {
         
         private Gtk.HBox hbox2;
         
+        private Gtk.RadioButton liveradiobutton;
+        
+        private Gtk.Image image63;
+        
+        private Gtk.HBox hbox3;
+        
         private Gtk.RadioButton fakeliveradiobutton;
         
         private Gtk.Image image62;
@@ -85,21 +91,21 @@ namespace LongoMatch.Gui.Dialog {
             this.hbox2.Name = "hbox2";
             this.hbox2.Spacing = 6;
             // Container child hbox2.Gtk.Box+BoxChild
-            this.fakeliveradiobutton = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Live project using a fake capture device"));
-            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 w5 = ((Gtk.Box.BoxChild)(this.hbox2[this.fakeliveradiobutton]));
+            this.liveradiobutton = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Live project using a capture device"));
+            this.liveradiobutton.CanFocus = true;
+            this.liveradiobutton.Name = "liveradiobutton";
+            this.liveradiobutton.DrawIndicator = true;
+            this.liveradiobutton.UseUnderline = true;
+            this.liveradiobutton.Group = this.fromfileradiobutton.Group;
+            this.hbox2.Add(this.liveradiobutton);
+            Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox2[this.liveradiobutton]));
             w5.Position = 0;
             // Container child hbox2.Gtk.Box+BoxChild
-            this.image62 = new Gtk.Image();
-            this.image62.Name = "image62";
-            this.image62.Pixbuf = Gdk.Pixbuf.LoadFromResource("camera-video.png");
-            this.hbox2.Add(this.image62);
-            Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox2[this.image62]));
+            this.image63 = new Gtk.Image();
+            this.image63.Name = "image63";
+            this.image63.Pixbuf = Gdk.Pixbuf.LoadFromResource("camera-video.png");
+            this.hbox2.Add(this.image63);
+            Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox2[this.image63]));
             w6.Position = 1;
             w6.Expand = false;
             w6.Fill = false;
@@ -108,17 +114,45 @@ namespace LongoMatch.Gui.Dialog {
             w7.Position = 1;
             w7.Expand = false;
             w7.Fill = false;
-            w1.Add(this.vbox2);
-            Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.hbox3 = new Gtk.HBox();
+            this.hbox3.Name = "hbox3";
+            this.hbox3.Spacing = 6;
+            // Container child hbox3.Gtk.Box+BoxChild
+            this.fakeliveradiobutton = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Live project using a fake capture device"));
+            this.fakeliveradiobutton.CanFocus = true;
+            this.fakeliveradiobutton.Name = "fakeliveradiobutton";
+            this.fakeliveradiobutton.DrawIndicator = true;
+            this.fakeliveradiobutton.UseUnderline = true;
+            this.fakeliveradiobutton.Group = this.fromfileradiobutton.Group;
+            this.hbox3.Add(this.fakeliveradiobutton);
+            Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox3[this.fakeliveradiobutton]));
             w8.Position = 0;
-            w8.Expand = false;
-            w8.Fill = false;
+            // Container child hbox3.Gtk.Box+BoxChild
+            this.image62 = new Gtk.Image();
+            this.image62.Name = "image62";
+            this.image62.Pixbuf = Gdk.Pixbuf.LoadFromResource("camera-video.png");
+            this.hbox3.Add(this.image62);
+            Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox3[this.image62]));
+            w9.Position = 1;
+            w9.Expand = false;
+            w9.Fill = false;
+            this.vbox2.Add(this.hbox3);
+            Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox3]));
+            w10.Position = 2;
+            w10.Expand = false;
+            w10.Fill = false;
+            w1.Add(this.vbox2);
+            Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
+            w11.Position = 0;
+            w11.Expand = false;
+            w11.Fill = false;
             // Internal child LongoMatch.Gui.Dialog.ProjectSelectionDialog.ActionArea
-            Gtk.HButtonBox w9 = this.ActionArea;
-            w9.Name = "dialog1_ActionArea";
-            w9.Spacing = 6;
-            w9.BorderWidth = ((uint)(5));
-            w9.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
+            Gtk.HButtonBox w12 = this.ActionArea;
+            w12.Name = "dialog1_ActionArea";
+            w12.Spacing = 6;
+            w12.BorderWidth = ((uint)(5));
+            w12.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
             // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
             this.buttonCancel = new Gtk.Button();
             this.buttonCancel.CanDefault = true;
@@ -128,9 +162,9 @@ namespace LongoMatch.Gui.Dialog {
             this.buttonCancel.UseUnderline = true;
             this.buttonCancel.Label = "gtk-cancel";
             this.AddActionWidget(this.buttonCancel, -6);
-            Gtk.ButtonBox.ButtonBoxChild w10 = ((Gtk.ButtonBox.ButtonBoxChild)(w9[this.buttonCancel]));
-            w10.Expand = false;
-            w10.Fill = false;
+            Gtk.ButtonBox.ButtonBoxChild w13 = ((Gtk.ButtonBox.ButtonBoxChild)(w12[this.buttonCancel]));
+            w13.Expand = false;
+            w13.Fill = false;
             // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
             this.buttonOk = new Gtk.Button();
             this.buttonOk.CanDefault = true;
@@ -140,15 +174,15 @@ namespace LongoMatch.Gui.Dialog {
             this.buttonOk.UseUnderline = true;
             this.buttonOk.Label = "gtk-ok";
             this.AddActionWidget(this.buttonOk, -5);
-            Gtk.ButtonBox.ButtonBoxChild w11 = ((Gtk.ButtonBox.ButtonBoxChild)(w9[this.buttonOk]));
-            w11.Position = 1;
-            w11.Expand = false;
-            w11.Fill = false;
+            Gtk.ButtonBox.ButtonBoxChild w14 = ((Gtk.ButtonBox.ButtonBoxChild)(w12[this.buttonOk]));
+            w14.Position = 1;
+            w14.Expand = false;
+            w14.Fill = false;
             if ((this.Child != null)) {
                 this.Child.ShowAll();
             }
             this.DefaultWidth = 298;
-            this.DefaultHeight = 138;
+            this.DefaultHeight = 176;
             this.Show();
         }
     }
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
index e8aeb07..476f8ae 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -193,7 +193,7 @@ namespace LongoMatch.Gui {
             this.ImportProjectAction.ShortLabel = Mono.Unix.Catalog.GetString("_Import Project");
             w1.Add(this.ImportProjectAction, "<Control>i");
             this.FreeCaptureModeAction = new Gtk.RadioAction("FreeCaptureModeAction", Mono.Unix.Catalog.GetString("Free Capture Mode"), null, null, 0);
-            this.FreeCaptureModeAction.Group = this.AnalyzeModeAction.Group;
+            this.FreeCaptureModeAction.Group = this.CaptureModeAction.Group;
             this.FreeCaptureModeAction.Sensitive = false;
             this.FreeCaptureModeAction.ShortLabel = Mono.Unix.Catalog.GetString("Free Capture Mode");
             w1.Add(this.FreeCaptureModeAction, null);
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index 34a7c8e..b1f2a59 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -5377,7 +5377,7 @@ You can add new tags using the text entry and clicking "Add Tag"</property>
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectSelectionDialog" design-size="298 138">
+  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectSelectionDialog" design-size="298 176">
     <property name="MemberName" />
     <property name="Title" translatable="yes">New Project</property>
     <property name="Icon">stock:longomatch Menu</property>
@@ -5443,6 +5443,45 @@ You can add new tags using the text entry and clicking "Add Tag"</property>
                 <property name="MemberName" />
                 <property name="Spacing">6</property>
                 <child>
+                  <widget class="Gtk.RadioButton" id="liveradiobutton">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="Label" translatable="yes">Live project using a capture device</property>
+                    <property name="DrawIndicator">True</property>
+                    <property name="HasLabel">True</property>
+                    <property name="UseUnderline">True</property>
+                    <property name="Group">project</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.Image" id="image63">
+                    <property name="MemberName" />
+                    <property name="Pixbuf">resource:camera-video.png</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">True</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>
+              <widget class="Gtk.HBox" id="hbox3">
+                <property name="MemberName" />
+                <property name="Spacing">6</property>
+                <child>
                   <widget class="Gtk.RadioButton" id="fakeliveradiobutton">
                     <property name="MemberName" />
                     <property name="CanFocus">True</property>
@@ -5471,7 +5510,7 @@ You can add new tags using the text entry and clicking "Add Tag"</property>
                 </child>
               </widget>
               <packing>
-                <property name="Position">1</property>
+                <property name="Position">2</property>
                 <property name="AutoSize">True</property>
                 <property name="Expand">False</property>
                 <property name="Fill">False</property>



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