[chronojump] better cancel sensitiveness, and new finish cancel button images
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] better cancel sensitiveness, and new finish cancel button images
- Date: Sun, 20 Nov 2016 04:52:13 +0000 (UTC)
commit bcd98eaee83bad1bfd542cf2a0bfccb4fd233d27
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Nov 20 05:51:23 2016 +0100
better cancel sensitiveness, and new finish cancel button images
glade/app1.glade | 32 ++++++++++++++++++--------------
images/finish.png | Bin 0 -> 1207 bytes
images/gtk-cancel.png | Bin 0 -> 303 bytes
src/Makefile.am | 2 ++
src/gui/chronojump.cs | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
src/gui/eventExecute.cs | 2 --
6 files changed, 66 insertions(+), 17 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index a2ce3bb..b16f8be 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1564,12 +1564,12 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_carles">
- <property name="label">Button
-Carles</property>
+ <widget class="GtkButton" id="button_crash">
+ <property name="label">CRASH_ME
+(debug purposes)</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="on_button_carles_clicked" swapped="no"/>
+ <signal name="clicked" handler="on_debug_crash_activate" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
@@ -1578,12 +1578,12 @@ Carles</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_crash">
- <property name="label">CRASH_ME
-(debug purposes)</property>
+ <widget class="GtkButton" id="button_carles">
+ <property name="label">Button
+Carles</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="on_debug_crash_activate" swapped="no"/>
+ <signal name="clicked" handler="on_button_carles_clicked" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
@@ -6544,7 +6544,7 @@ after time</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkImage" id="image17">
+ <widget class="GtkImage"
id="image_button_execute">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-apply</property>
@@ -6592,7 +6592,7 @@ after time</property>
<property name="use_underline">True</property>
<signal name="clicked"
handler="on_event_execute_finish_clicked" swapped="no"/>
<child>
- <widget class="GtkImage" id="image29">
+ <widget class="GtkImage"
id="image_button_finish">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-goto-last</property>
@@ -6609,6 +6609,7 @@ after time</property>
<child>
<widget class="GtkButton"
id="event_execute_button_cancel">
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
@@ -6616,7 +6617,7 @@ after time</property>
<property name="tooltip"
translatable="yes">Cancel test</property>
<signal name="clicked"
handler="on_event_execute_button_cancel_clicked" swapped="no"/>
<child>
- <widget class="GtkImage" id="image30">
+ <widget class="GtkImage"
id="image_button_cancel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-cancel</property>
@@ -14819,7 +14820,7 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkImage" id="image10">
+ <widget class="GtkImage"
id="image_encoder_capture_execute">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-apply</property>
@@ -15000,7 +15001,7 @@ Concentric</property>
<property name="use_underline">True</property>
<signal name="clicked"
handler="on_button_encoder_capture_finish_clicked" swapped="no"/>
<child>
- <widget class="GtkImage" id="image13">
+ <widget class="GtkImage"
id="image_encoder_capture_finish">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-goto-last</property>
@@ -15027,7 +15028,7 @@ Concentric</property>
<property name="use_underline">True</property>
<signal name="clicked"
handler="on_button_encoder_cancel_clicked" swapped="no"/>
<child>
- <widget class="GtkImage" id="image8">
+ <widget class="GtkImage"
id="image_encoder_capture_cancel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-cancel</property>
@@ -18532,6 +18533,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/images/finish.png b/images/finish.png
new file mode 100644
index 0000000..2d603cd
Binary files /dev/null and b/images/finish.png differ
diff --git a/images/gtk-cancel.png b/images/gtk-cancel.png
new file mode 100644
index 0000000..ae46e39
Binary files /dev/null and b/images/gtk-cancel.png differ
diff --git a/src/Makefile.am b/src/Makefile.am
index d689e33..5282505 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -355,6 +355,8 @@ RESOURCES = \
../images/reaction_time_menu.png,reaction_time_menu.png \
../images/pulse_menu.png,pulse_menu.png \
../images/multichronopic_menu.png,multichronopic_menu.png \
+ ../images/finish.png,finish.png \
+ ../images/gtk-cancel.png,gtk-cancel.png \
../images/gtk-zoom-fit.png,gtk-zoom-fit.png \
../images/gtk-zoom-in.png,gtk-zoom-in.png \
../images/gtk-zoom-in-with-text.png,gtk-zoom-in-with-text.png \
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 280fad1..a5acc11 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -109,6 +109,15 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_persons_open_1;
[Widget] Gtk.Image image_persons_open_plus;
+ //contact tests execute buttons
+ //[Widget] Gtk.Image image_button_execute;
+ [Widget] Gtk.Image image_button_finish;
+ [Widget] Gtk.Image image_button_cancel; //needed this specially because theme cancel sometimes seems
"record"
+ //encoder tests execute buttons
+ //[Widget] Gtk.Image image_encoder_capture_execute;
+ [Widget] Gtk.Image image_encoder_capture_finish;
+ [Widget] Gtk.Image image_encoder_capture_cancel;
+
[Widget] Gtk.Notebook notebook_session_person;
//[Widget] Gtk.Box vbox_persons;
@@ -867,6 +876,23 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "jumps-profile-pie.png");
image_tab_jumps_profile.Pixbuf = pixbuf;
+ // execute tests --->
+ /*
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "gtk-apply.png"); //trying high
contrast (black)
+ image_button_execute.Pixbuf = pixbuf;
+ image_encoder_capture_execute.Pixbuf = pixbuf;
+ */
+
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "finish.png"); //gnome (white)
+ image_button_finish.Pixbuf = pixbuf;
+ image_encoder_capture_finish.Pixbuf = pixbuf;
+
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "gtk-cancel.png"); //high contrast
(black)
+ image_button_cancel.Pixbuf = pixbuf;
+ image_encoder_capture_cancel.Pixbuf = pixbuf;
+ // <--- end of execute tests
+
+
pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameEncoderAnalyzeIndividualCurrentSetIcon);
image_encoder_analyze_individual_current_set.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameEncoderAnalyzeIndividualCurrentSessionIcon);
@@ -3971,6 +3997,8 @@ public partial class ChronoJumpWindow
Constants.JumpTable, //tableName
currentJumpType.Name
);
+ event_execute_button_cancel.Sensitive = true;
+
ExecutingGraphData egd = event_execute_prepareForTest ();
event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked);
@@ -4081,8 +4109,13 @@ public partial class ChronoJumpWindow
sensitiveGuiEventDone();
LogB.Information(" cantouch3 ");
- if ( ! currentEventExecute.Cancel )
+ if (currentEventExecute.Cancel)
{
+ event_execute_progressbar_event.Fraction = 0;
+ event_execute_progressbar_time.Fraction = 0;
+ event_execute_label_event_value.Text = "";
+ event_execute_label_time_value.Text = "";
+ } else {
event_execute_progressbar_time.Fraction = 1;
restTime.AddOrModify(currentPerson.UniqueID, true);
@@ -4179,6 +4212,8 @@ public partial class ChronoJumpWindow
Constants.JumpRjTable, //tableName
currentJumpRjType.Name
);
+ event_execute_button_cancel.Sensitive = true;
+
ExecutingGraphData egd = event_execute_prepareForTest ();
event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked);
@@ -4308,6 +4343,8 @@ public partial class ChronoJumpWindow
Constants.RunTable, //tableName
currentRunType.Name
);
+ event_execute_button_cancel.Sensitive = true;
+
ExecutingGraphData egd = event_execute_prepareForTest ();
event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked);
@@ -4434,6 +4471,8 @@ public partial class ChronoJumpWindow
Constants.RunIntervalTable, //tableName
currentRunIntervalType.Name
);
+ event_execute_button_cancel.Sensitive = true;
+
ExecutingGraphData egd = event_execute_prepareForTest ();
event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked);
@@ -4554,6 +4593,8 @@ public partial class ChronoJumpWindow
Constants.ReactionTimeTable, //tableName
""
);
+ event_execute_button_cancel.Sensitive = true;
+
ExecutingGraphData egd = event_execute_prepareForTest ();
event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked);
@@ -4732,6 +4773,8 @@ public partial class ChronoJumpWindow
Constants.PulseTable, //tableName
currentPulseType.Name
);
+ event_execute_button_cancel.Sensitive = true;
+
ExecutingGraphData egd = event_execute_prepareForTest ();
event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked);
@@ -5009,6 +5052,8 @@ public partial class ChronoJumpWindow
Constants.MultiChronopicTable, //tableName
currentMultiChronopicType.Name
);
+ event_execute_button_cancel.Sensitive = true;
+
ExecutingGraphData egd = event_execute_prepareForTest ();
event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_multi_clicked);
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index ade0a59..83fd81e 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -217,8 +217,6 @@ public partial class ChronoJumpWindow
showPulseLabels();
}
- event_execute_button_cancel.Sensitive = true;
-
UtilGtk.ClearDrawingArea(event_execute_drawingarea, event_execute_pixmap);
clearProgressBars();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]