[chronojump] Removed all the devices Discover from gui/chronopicRegister.cs
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Removed all the devices Discover from gui/chronopicRegister.cs
- Date: Thu, 28 Apr 2022 15:40:09 +0000 (UTC)
commit 097754c6b632fb3afb4d2760c3e9d104063b5213
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Apr 28 17:39:39 2022 +0200
Removed all the devices Discover from gui/chronopicRegister.cs
src/gui/chronopicRegister.cs | 49 --------------------------------------------
1 file changed, 49 deletions(-)
---
diff --git a/src/gui/chronopicRegister.cs b/src/gui/chronopicRegister.cs
index f7f520543..f51280c22 100644
--- a/src/gui/chronopicRegister.cs
+++ b/src/gui/chronopicRegister.cs
@@ -216,10 +216,6 @@ public class ChronopicRegisterWindow
private List<Gtk.Button> list_buttons_left;
private List<Gtk.Button> list_buttons_right;
- private List<Gtk.Button> list_discover_buttons;
- private List<Gtk.Label> list_discover_labels;
- private List<string> list_discover_ports;
-
private void createTable ()
{
int rows = listConnected.Count;
@@ -246,10 +242,6 @@ public class ChronopicRegisterWindow
list_labels_type = new List<Gtk.Label>();
list_buttons_right = new List<Gtk.Button>();
- list_discover_buttons = new List<Gtk.Button>();
- list_discover_labels = new List<Gtk.Label>();
- list_discover_ports = new List<string>();
-
for (int count=1; count <= rows; count ++)
{
string deviceStr = listConnected[count -1].SerialNumber + "\n\n" +
listConnected[count -1].Port;
@@ -274,21 +266,9 @@ public class ChronopicRegisterWindow
hbox_type.PackStart(image, false, false, 1);
UtilGtk.ArrowEnum arrowEnum = UtilGtk.ArrowEnum.FORWARD;
- Gtk.Button button_discover = null;
- Gtk.Label label_discovered = null;
if(ChronopicRegisterPort.TypePrint(listConnected[count-1].Type) ==
ChronopicRegisterPort.TypePrint(ChronopicRegisterPort.Types.UNKNOWN))
- {
arrowEnum = UtilGtk.ArrowEnum.FORWARD_EMPHASIS;
- button_discover = new Gtk.Button("Discover"); //TODO: translate Discover.
- button_discover.Clicked += new EventHandler(on_button_discover_clicked);
- label_discovered = new Gtk.Label("");
-
- list_discover_buttons.Add(button_discover);
- list_discover_labels.Add(label_discovered);
- list_discover_ports.Add(listConnected[count -1].Port);
- }
-
Button button_right = UtilGtk.CreateArrowButton(ArrowType.Right, ShadowType.In, 50,
-1, arrowEnum);
button_right.CanFocus = false;
@@ -297,12 +277,6 @@ public class ChronopicRegisterWindow
button_right.Sensitive = (listConnected[count-1].Type !=
TypePixList.l[TypePixList.l.Count -1].Type);
hbox_type.PackStart(button_right, true, false, 1);
- if(button_discover != null)
- {
- hbox_type.PackStart(button_discover, true, false, 1);
- hbox_type.PackStart(label_discovered, true, false, 1);
- }
-
Gtk.VBox vbox = new Gtk.VBox(false, 2);
vbox.Add(hbox_type);
@@ -494,29 +468,6 @@ public class ChronopicRegisterWindow
}
}
- private void on_button_discover_clicked (object o, EventArgs args)
- {
- Button buttonClicked = o as Button;
- if (o == null)
- return;
-
- int count = 0;
- foreach(Gtk.Button button in list_discover_buttons)
- {
- if(button == buttonClicked)
- {
- LogB.Information("Calling discover at port: " + list_discover_ports[count]);
-
- ArduinoDiscover ad = new ArduinoDiscover (list_discover_ports[count]);
- ChronopicRegisterPort.Types crptype = ad.Discover ();
-
- button.Visible = false;
- (list_discover_labels[count]).Text = crptype.ToString();
- }
- count ++;
- }
- }
-
private void buttons_sensitivity(Gtk.Button left, Gtk.Button right, ChronopicRegisterPort.Types type)
{
left.Sensitive = (type != TypePixList.l[0].Type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]