[chronojump] On compujump show version on preferences/advanced
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] On compujump show version on preferences/advanced
- Date: Thu, 1 Mar 2018 18:32:09 +0000 (UTC)
commit 6457cd2fbbd7f15255b1c3e8a21aafef778775ef
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Mar 1 19:30:44 2018 +0100
On compujump show version on preferences/advanced
glade/preferences_win.glade | 221 ++++++++++++++++++++++++++-----------------
src/gui/chronojump.cs | 2 +-
src/gui/preferences.cs | 11 ++-
3 files changed, 145 insertions(+), 89 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index fe9a4ec..56cf5d5 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -5319,53 +5319,64 @@ sensor</property>
<property name="border_width">8</property>
<property name="spacing">20</property>
<child>
- <widget class="GtkVBox" id="vbox19">
+ <widget class="GtkHBox" id="hbox20">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkCheckButton" id="checkbutton_ask_deletion">
- <property name="label" translatable="yes">Ask for confirm test deletion</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Ask user if really wants to delete a
test</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
- <widget class="GtkHBox" id="hbox87">
+ <widget class="GtkVBox" id="vbox19">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">10</property>
<child>
- <widget class="GtkLabel" id="label38">
+ <widget class="GtkCheckButton" id="checkbutton_ask_deletion">
+ <property name="label" translatable="yes">Ask for confirm test
deletion</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Decimal number</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Ask user if really wants to delete a
test</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="combo_decimals">
+ <widget class="GtkHBox" id="hbox87">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="items">1
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label38">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Decimal number</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="combo_decimals">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="items">1
2
3</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -5373,50 +5384,26 @@ sensor</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="checkbutton_mute_logs">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Do not write debug messages</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
<child>
- <widget class="GtkHBox" id="hbox34">
+ <widget class="GtkCheckButton" id="checkbutton_mute_logs">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label96">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Mute logs</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Do not write debug
messages</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
<child>
- <widget class="GtkHBox" id="hbox35">
+ <widget class="GtkHBox" id="hbox34">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">2</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkLabel" id="label106">
+ <widget class="GtkLabel" id="label96">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">(</property>
+ <property name="label" translatable="yes">Mute logs</property>
</widget>
<packing>
<property name="expand">True</property>
@@ -5425,43 +5412,103 @@ sensor</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label100">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">default: False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label107">
+ <widget class="GtkHBox" id="hbox35">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">)</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkLabel" id="label106">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">(</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label100">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">default: False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label107">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">)</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
</child>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox_version">
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label56">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">Chronojump
+version:</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_progVersion">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 41bd2a4..d0890cd 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2909,7 +2909,7 @@ public partial class ChronoJumpWindow
private void on_preferences_activate (object o, EventArgs args)
{
- preferencesWin = PreferencesWindow.Show(preferences, rfdList, impulse, current_menuitem_mode,
configChronojump.Compujump);
+ preferencesWin = PreferencesWindow.Show(preferences, rfdList, impulse, current_menuitem_mode,
configChronojump.Compujump, progVersion);
preferencesWin.FakeButtonImported.Clicked += new
EventHandler(on_preferences_import_configuration);
preferencesWin.FakeButtonDebugModeStart.Clicked += new
EventHandler(on_preferences_debug_mode_start);
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index fbeb9c3..43016b2 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -220,6 +220,8 @@ public class PreferencesWindow
[Widget] Gtk.Label label_advanced_feedback;
[Widget] Gtk.ToggleButton toggle_gc_collect_on_close;
[Widget] Gtk.ToggleButton toggle_never_close;
+ [Widget] Gtk.VBox vbox_version;
+ [Widget] Gtk.Label label_progVersion;
[Widget] Gtk.Button button_accept;
@@ -263,15 +265,22 @@ public class PreferencesWindow
}
static public PreferencesWindow Show (Preferences preferences, List <ForceSensorRFD> rfdList,
ForceSensorImpulse impulse,
- Constants.Menuitem_modes menu_mode, bool compujump)
+ Constants.Menuitem_modes menu_mode, bool compujump, string progVersion)
{
if (PreferencesWindowBox == null) {
PreferencesWindowBox = new PreferencesWindow ();
}
if(compujump)
+ {
PreferencesWindowBox.check_appearance_person_win_hide.Sensitive = false;
+ //show version
+ PreferencesWindowBox.vbox_version.Visible = true;
+ PreferencesWindowBox.label_progVersion.Text = "<b>" + progVersion + "</b>";
+ PreferencesWindowBox.label_progVersion.UseMarkup = true;
+ }
+
if(menu_mode != Constants.Menuitem_modes.JUMPSSIMPLE && menu_mode !=
Constants.Menuitem_modes.JUMPSREACTIVE)
PreferencesWindowBox.notebook.GetNthPage(JUMPSPAGE).Hide();
if(menu_mode != Constants.Menuitem_modes.RUNSSIMPLE && menu_mode !=
Constants.Menuitem_modes.RUNSINTERVALLIC)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]