[chronojump] Generic window can have a boolean: CHECK1
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Generic window can have a boolean: CHECK1
- Date: Fri, 6 Sep 2019 13:06:17 +0000 (UTC)
commit e93275aa0600a857a68d18b4214b6c5612352d22
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Sep 5 15:35:29 2019 +0200
Generic window can have a boolean: CHECK1
glade/generic_window.glade | 32 ++++++++++++++++++++++----------
src/constants.cs | 2 +-
src/gui/genericWindow.cs | 18 +++++++++++++++++-
3 files changed, 40 insertions(+), 12 deletions(-)
---
diff --git a/glade/generic_window.glade b/glade/generic_window.glade
index 20209575..ccb7a272 100644
--- a/glade/generic_window.glade
+++ b/glade/generic_window.glade
@@ -248,6 +248,18 @@
<property name="position">3</property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton" id="check1">
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
<child>
<widget class="GtkHBox" id="hbox_entry2">
<property name="visible">True</property>
@@ -286,7 +298,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -327,7 +339,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">5</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
@@ -370,7 +382,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -413,7 +425,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -461,7 +473,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
<child>
@@ -499,7 +511,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">9</property>
+ <property name="position">10</property>
</packing>
</child>
<child>
@@ -524,7 +536,7 @@
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">8</property>
- <property name="position">10</property>
+ <property name="position">11</property>
</packing>
</child>
<child>
@@ -544,7 +556,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">11</property>
+ <property name="position">12</property>
</packing>
</child>
<child>
@@ -564,7 +576,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">12</property>
+ <property name="position">13</property>
</packing>
</child>
<child>
@@ -660,7 +672,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">13</property>
+ <property name="position">14</property>
</packing>
</child>
</widget>
diff --git a/src/constants.cs b/src/constants.cs
index eac40a4f..4c088644 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -911,7 +911,7 @@ public class Constants
//heightmetric contains 2 spins
public enum GenericWindowShow {
ENTRY, ENTRY2, ENTRY3, SPININT, SPININT2, SPININT3, SPINDOUBLE, HBOXSPINDOUBLE2,
- HEIGHTMETRIC, COMBO, COMBOALLNONESELECTED, BUTTONMIDDLE, TEXTVIEW, TREEVIEW
+ HEIGHTMETRIC, CHECK1, COMBO, COMBOALLNONESELECTED, BUTTONMIDDLE, TEXTVIEW, TREEVIEW
}
diff --git a/src/gui/genericWindow.cs b/src/gui/genericWindow.cs
index 96bb39f6..f1dcb537 100644
--- a/src/gui/genericWindow.cs
+++ b/src/gui/genericWindow.cs
@@ -49,7 +49,9 @@ public class GenericWindow
[Widget] Gtk.SpinButton spin_double;
[Widget] Gtk.Box hbox_height_metric;
-
+
+ [Widget] Gtk.CheckButton check1;
+
[Widget] Gtk.HButtonBox hbuttonbox_middle;
[Widget] Gtk.Button button_middle;
@@ -206,6 +208,7 @@ public class GenericWindow
spin_double.Hide();
hbox_spin_double2.Hide();
hbox_height_metric.Hide();
+ check1.Hide();
hbox_edit_row.Hide();
hbox_all_none_selected.Hide();
hbox_combo_all_none_selected.Hide();
@@ -262,6 +265,10 @@ public class GenericWindow
else if(stuff == Constants.GenericWindowShow.HEIGHTMETRIC) {
hbox_height_metric.Show();
}
+ else if(stuff == Constants.GenericWindowShow.CHECK1) {
+ check1.Active = (text == "TRUE");
+ check1.Show();
+ }
else if(stuff == Constants.GenericWindowShow.COMBO) {
/*
hbox_combo.Show();
@@ -302,6 +309,8 @@ public class GenericWindow
hbox_spin_double2.Show();
else if(stuff == Constants.GenericWindowShow.HEIGHTMETRIC)
hbox_height_metric.Show();
+ else if(stuff == Constants.GenericWindowShow.CHECK1)
+ check1.Show();
else if(stuff == Constants.GenericWindowShow.SPININT2)
hbox_spin_int2.Show();
else if(stuff == Constants.GenericWindowShow.SPININT3)
@@ -398,6 +407,9 @@ public class GenericWindow
hbox_edit_row.Visible = show;
}
+ public void SetCheck1Label(string s) {
+ check1.Label = s;
+ }
private static string [] comboCheckBoxesOptionsDefault = {
Catalog.GetString("All"),
@@ -1031,6 +1043,10 @@ public class GenericWindow
get { return UtilGtk.ComboGetActive(combo); }
}
+ public bool GetCheck1 {
+ get { return check1.Active; }
+ }
+
~GenericWindow() {}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]