[chronojump] Comments on encoder sets done!
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Comments on encoder sets done!
- Date: Fri, 6 Mar 2015 16:08:42 +0000 (UTC)
commit 823dd99602c8070f1315d5ab2d84a4a3ddb20923
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Mar 6 17:07:39 2015 +0100
Comments on encoder sets done!
glade/chronojump.glade | 180 +++++++++++++++++++++++++++++++++++-------------
src/gui/encoder.cs | 22 +++++--
2 files changed, 149 insertions(+), 53 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 6207e8a..d7818e8 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -6592,6 +6592,12 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -7433,6 +7439,12 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
<child>
@@ -8526,6 +8538,12 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">2</property>
@@ -9260,6 +9278,12 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -14133,77 +14157,47 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkFrame"
id="frame_encoder_signal_comment">
+ <widget class="GtkVBox"
id="vbox_encoder_signal_comment">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="spacing">4</property>
<child>
- <widget class="GtkHBox" id="hbox75">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkTextView"
id="textview_encoder_signal_comment">
- <property name="width_request">150</property>
+ <widget class="GtkTextView"
id="textview_encoder_signal_comment">
+ <property name="width_request">175</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox96">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox79">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <placeholder/>
- </child>
<child>
- <widget class="GtkButton"
id="button_encoder_signal_comment_apply">
+ <widget class="GtkButton"
id="button_encoder_signal_save_comment">
+ <property name="label" translatable="yes">Save
comment</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked"
handler="on_button_encoder_signal_comment_apply_clicked" swapped="no"/>
- <child>
- <widget class="GtkImage"
id="image_encoder_signal_delete1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-apply</property>
- <property name="icon-size">2</property>
- </widget>
- </child>
+ <signal name="clicked"
handler="on_button_encoder_signal_save_comment_clicked" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</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>
+ <property name="position">0</property>
</packing>
</child>
</widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label124">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Commentary</property>
- <property name="use_markup">True</property>
- </widget>
<packing>
- <property name="type">label_item</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -19741,6 +19735,12 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -20383,6 +20383,12 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -21517,6 +21523,12 @@ by you</property>
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkButton" id="button_video_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -21708,6 +21720,12 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -31456,6 +31474,42 @@ options</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -33478,6 +33532,12 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -34158,6 +34218,12 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -36804,6 +36870,12 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -37110,6 +37182,12 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -37431,6 +37509,12 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 1edb644..5013389 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -67,8 +67,9 @@ public partial class ChronoJumpWindow
//[Widget] Gtk.Entry entry_encoder_signal_comment;
//[Widget] Gtk.Entry entry_encoder_curve_comment;
//[Widget] Gtk.Button button_encoder_save_curve;
- [Widget] Gtk.Frame frame_encoder_signal_comment;
+ [Widget] Gtk.Box vbox_encoder_signal_comment;
[Widget] Gtk.TextView textview_encoder_signal_comment;
+ [Widget] Gtk.Button button_encoder_signal_save_comment;
[Widget] Gtk.Button button_encoder_export_all_curves;
[Widget] Gtk.Label label_encoder_curve_action;
[Widget] Gtk.Button button_encoder_delete_signal;
@@ -326,6 +327,9 @@ public partial class ChronoJumpWindow
//it crashes on Raspberry, Banana
}
+ //done here because in Glade we cannot use the TextBuffer.Changed
+ textview_encoder_signal_comment.Buffer.Changed += new
EventHandler(on_textview_encoder_signal_comment_key_press_event);
+
networksInit();
}
@@ -670,13 +674,18 @@ public partial class ChronoJumpWindow
encoderCalculeCurves(encoderActions.CURVES);
}
- void on_button_encoder_signal_comment_apply_clicked (object o, EventArgs args) {
+ void on_textview_encoder_signal_comment_key_press_event (object o, EventArgs args) {
+ button_encoder_signal_save_comment.Label = Catalog.GetString("Save comment");
+ button_encoder_signal_save_comment.Sensitive = true;
+ }
+ void on_button_encoder_signal_save_comment_clicked (object o, EventArgs args) {
LogB.Debug(encoderSignalUniqueID);
if(encoderSignalUniqueID != null && Convert.ToInt32(encoderSignalUniqueID) > 0) {
Sqlite.Update(false, Constants.EncoderTable, "description", "",
Util.RemoveTildeAndColonAndDot(textview_encoder_signal_comment.Buffer.Text),
"uniqueID", encoderSignalUniqueID);
- new DialogMessage(Constants.MessageTypes.INFO, Catalog.GetString("Saved."));
+ button_encoder_signal_save_comment.Label = Catalog.GetString("Saved comment.");
+ button_encoder_signal_save_comment.Sensitive = false;
}
}
@@ -3728,7 +3737,7 @@ public partial class ChronoJumpWindow
//c1 button_encoder_recalculate
//c2 button_encoder_load_signal
//c3 hbox_encoder_capture_curves_save_all_none, button_encoder_export_all_curves,
- // button_encoder_delete_signal, frame_encoder_signal_comment,
+ // button_encoder_delete_signal, vbox_encoder_signal_comment,
// and images: image_encoder_capture , image_encoder_analyze.Sensitive. Update: both NOT
managed here
//UNUSED c4 button_encoder_save_curve, entry_encoder_curve_comment
//c5 button_encoder_analyze
@@ -3795,7 +3804,7 @@ public partial class ChronoJumpWindow
hbox_encoder_capture_curves_save_all_none.Sensitive = Util.IntToBool(table[3]);
button_encoder_export_all_curves.Sensitive = Util.IntToBool(table[3]);
button_encoder_delete_signal.Sensitive = Util.IntToBool(table[3]);
- frame_encoder_signal_comment.Sensitive = Util.IntToBool(table[3]);
+ vbox_encoder_signal_comment.Sensitive = Util.IntToBool(table[3]);
//image_encoder_capture.Sensitive = Util.IntToBool(table[3]);
//image_encoder_analyze.Sensitive = Util.IntToBool(table[3]);
@@ -5416,6 +5425,9 @@ LogB.Debug("D");
plotCurvesGraphDoPlot(mainVariable, mainVariableHigher, mainVariableLower,
captureCurvesBarsData,
false); //not capturing
+ button_encoder_signal_save_comment.Label = Catalog.GetString("Save comment");
+ button_encoder_signal_save_comment.Sensitive = false;
+
//autosave signal (but not in load)
if(action == encoderActions.CURVES)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]