[chronojump] color on confirm_window



commit e0583e646f179eadd60bdd6ca260a8ab917e8638
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Aug 20 04:33:25 2020 +0100

    color on confirm_window

 src/execute/event.cs                |  3 ++-
 src/execute/jump.cs                 | 13 ++++++++-----
 src/execute/multiChronopic.cs       |  6 ++++--
 src/execute/pulse.cs                |  5 +++--
 src/execute/reactionTime.cs         |  5 +++--
 src/exportSession.cs                |  3 ++-
 src/gui/app1/chronojump.cs          | 33 ++++++++++++++++++++-------------
 src/gui/app1/chronojumpPersons.cs   |  2 +-
 src/gui/app1/encoder.cs             | 13 +++++++------
 src/gui/app1/forceSensor.cs         |  4 ++--
 src/gui/app1/runEncoder.cs          |  4 ++--
 src/gui/app1/session/backup.cs      |  3 ++-
 src/gui/app1/session/export.cs      |  3 ++-
 src/gui/confirm.cs                  | 20 ++++++++++++++------
 src/gui/encoderConfiguration.cs     |  6 ++++--
 src/gui/encoderSelectRepetitions.cs |  7 +++++--
 src/gui/event.cs                    |  9 +++++++--
 17 files changed, 88 insertions(+), 51 deletions(-)
---
diff --git a/src/execute/event.cs b/src/execute/event.cs
index 74fece7f..c186ae46 100644
--- a/src/execute/event.cs
+++ b/src/execute/event.cs
@@ -86,7 +86,8 @@ public class EventExecute
        protected RepetitiveConditionsWindow repetitiveConditionsWin;
 
        protected ExecutingGraphData egd;
-       
+       protected Gdk.Color colorBackground;
+
        //for runs
        public RunPhaseTimeList runPTL;
 
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index bedf21bb..b6792ebd 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -60,7 +60,7 @@ public class JumpExecute : EventExecute
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
                        double progressbarLimit, ExecutingGraphData egd, string description,
                        bool avoidGraph, //on configChronojump.Exhibition do not show graph because it gets 
too slow with big database
-                       bool heightPreferred, int graphLimit, bool graphAllTypes, bool graphAllPersons
+                       bool heightPreferred, int graphLimit, bool graphAllTypes, bool graphAllPersons, 
Gdk.Color colorBackground
                        )
        {
                this.personID = personID;
@@ -84,6 +84,7 @@ public class JumpExecute : EventExecute
                this.graphLimit = graphLimit;
                this.graphAllTypes = graphAllTypes;
                this.graphAllPersons = graphAllPersons;
+               this.colorBackground = colorBackground;
        
                if(TypeHasFall) {
                        hasFall = true;
@@ -165,7 +166,8 @@ public class JumpExecute : EventExecute
                else if (platformState==Chronopic.Plataforma.OFF) {
                        ConfirmWindow confirmWin;               
                        confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "You are OUT, please enter the platform, prepare for jump and 
press the 'accept' button"), "", "");
+                                               "You are OUT, please enter the platform, prepare for jump and 
press the 'accept' button"),
+                                       "", "", colorBackground);
 
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
@@ -254,7 +256,7 @@ public class JumpExecute : EventExecute
                        if(fall == -1)
                                message = Catalog.GetString("You are OUT, please enter the platform, prepare 
for jump and press the 'accept' button");
 
-                       confirmWin = ConfirmWindow.Show(message, "", "");
+                       confirmWin = ConfirmWindow.Show(message, "", "", colorBackground);
 
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
@@ -564,7 +566,7 @@ public class JumpRjExecute : JumpExecute
                        Chronopic cp, Gtk.Window app, int pDN, bool allowFinishAfterTime,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
                        RepetitiveConditionsWindow repetitiveConditionsWin,
-                       double progressbarLimit, ExecutingGraphData egd
+                       double progressbarLimit, ExecutingGraphData egd, Gdk.Color colorBackground
                        )
        {
                this.personID = personID;
@@ -592,6 +594,7 @@ public class JumpRjExecute : JumpExecute
                this.repetitiveConditionsWin = repetitiveConditionsWin;
                this.progressbarLimit = progressbarLimit;
                this.egd = egd;
+               this.colorBackground = colorBackground;
        
                if(TypeHasFall) { hasFall = true; } 
                else { hasFall = false; }
@@ -651,7 +654,7 @@ public class JumpRjExecute : JumpExecute
                                myMessage = Catalog.GetString("You are OUT, please enter the platform, 
prepare for jump and press the 'accept' button");
                        }
                        ConfirmWindow confirmWin;               
-                       confirmWin = ConfirmWindow.Show(myMessage, "","");
+                       confirmWin = ConfirmWindow.Show(myMessage, "","", colorBackground);
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
                        //we call again this function
diff --git a/src/execute/multiChronopic.cs b/src/execute/multiChronopic.cs
index 78e64a82..8155129e 100644
--- a/src/execute/multiChronopic.cs
+++ b/src/execute/multiChronopic.cs
@@ -76,7 +76,7 @@ public class MultiChronopicExecute : EventExecute
        public MultiChronopicExecute(int personID, string personName, int sessionID, string type, 
                        Chronopic cp, bool syncFirst, bool deleteFirst, string vars, Gtk.Window app,
                        //double progressbarLimit, 
-                       ExecutingGraphData egd
+                       ExecutingGraphData egd, Gdk.Color colorBackground
                        ) {
                this.personID = personID;
                this.personName = personName;
@@ -91,6 +91,7 @@ public class MultiChronopicExecute : EventExecute
                this.app = app;
 //             this.progressbarLimit = progressbarLimit;
                this.egd = egd;
+               this.colorBackground = colorBackground;
        
                chronopics = 1; 
                initValues();   
@@ -300,7 +301,8 @@ public class MultiChronopicExecute : EventExecute
                if(platformsProblems.Length > 0) {
                        ConfirmWindow confirmWin;               
                        confirmWin = ConfirmWindow.Show( 
-                                       string.Format(Catalog.GetString("There's contact in {0}. Please 
leave."), platformsProblems), "", "");
+                                       string.Format(Catalog.GetString("There's contact in {0}. Please 
leave."), platformsProblems),
+                                       "", "", colorBackground);
 
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
diff --git a/src/execute/pulse.cs b/src/execute/pulse.cs
index 1d368491..2e0311f3 100644
--- a/src/execute/pulse.cs
+++ b/src/execute/pulse.cs
@@ -57,7 +57,7 @@ public class PulseExecute : EventExecute
                        Chronopic cp, Gtk.Window app, int pDN,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
                        //double progressbarLimit, 
-                       ExecutingGraphData egd
+                       ExecutingGraphData egd, Gdk.Color colorBackground
                        )
        {
                this.personID = personID;
@@ -66,6 +66,7 @@ public class PulseExecute : EventExecute
                this.type = type;
                this.fixedPulse = fixedPulse;
                this.totalPulsesNum = totalPulsesNum;
+               this.colorBackground = colorBackground;
                
        
                this.cp = cp;
@@ -128,7 +129,7 @@ public class PulseExecute : EventExecute
                        string myMessage = Catalog.GetString("You are IN, please leave the platform, prepare 
for start, and press the 'accept' button!");
 
                        ConfirmWindow confirmWin;               
-                       confirmWin = ConfirmWindow.Show(myMessage, "", "");
+                       confirmWin = ConfirmWindow.Show(myMessage, "", "", colorBackground);
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
                        //we call again this function
diff --git a/src/execute/reactionTime.cs b/src/execute/reactionTime.cs
index fb921005..97950c05 100644
--- a/src/execute/reactionTime.cs
+++ b/src/execute/reactionTime.cs
@@ -41,7 +41,7 @@ public class ReactionTimeExecute : EventExecute
        public ReactionTimeExecute(int personID, string personName, int sessionID, string type,
                        Chronopic cp, Gtk.Window app, int pDN,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
-                       double progressbarLimit, ExecutingGraphData egd, string description
+                       double progressbarLimit, ExecutingGraphData egd, string description, Gdk.Color 
colorBackground
                        )
        {
                this.personID = personID;
@@ -58,6 +58,7 @@ public class ReactionTimeExecute : EventExecute
                this.progressbarLimit = progressbarLimit;
                this.egd = egd;
                this.description = description;
+               this.colorBackground = colorBackground;
        
                fakeButtonUpdateGraph = new Gtk.Button();
                fakeButtonThreadDyed = new Gtk.Button();
@@ -144,7 +145,7 @@ public class ReactionTimeExecute : EventExecute
                {
                        ConfirmWindow confirmWin;               
                        confirmWin = ConfirmWindow.Show( 
-                                       Catalog.GetString("You are OUT, come inside and press the 'accept' 
button"), "", ""); //TODO:change this
+                                       Catalog.GetString("You are OUT, come inside and press the 'accept' 
button"), "", "", colorBackground); //TODO:change this
                        //System.Media.SystemSounds.Beep.Play();
                        Util.PlaySound(Constants.SoundTypes.BAD, volumeOn, gstreamer);
 
diff --git a/src/exportSession.cs b/src/exportSession.cs
index 1bb96973..3ef5e9aa 100644
--- a/src/exportSession.cs
+++ b/src/exportSession.cs
@@ -103,7 +103,8 @@ public class ExportSession
                                LogB.Warning(string.Format("File {0} exists with attributes {1}, created at 
{2}",
                                                        fileName, File.GetAttributes(fileName), 
File.GetCreationTime(fileName)));
                                LogB.Information("Overwrite...");
-                               ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite file: "), "", fileName);
+                               ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite file: "),
+                                               "", fileName, preferences.colorBackground);
                                confirmWin.Button_accept.Clicked += new 
EventHandler(on_overwrite_file_accepted);
                        } else {
                                writeFile();
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 7aef465d..c78280b4 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -4125,7 +4125,8 @@ public partial class ChronoJumpWindow
                                progressbarLimit, egd, description, configChronojump.Exhibition,
                                preferences.heightPreferred,
                                Convert.ToInt32(spin_contacts_graph_last_limit.Value),
-                               radio_contacts_graph_allTests.Active, radio_contacts_graph_allPersons.Active);
+                               radio_contacts_graph_allTests.Active, radio_contacts_graph_allPersons.Active,
+                               preferences.colorBackground);
 
 
                //UtilGtk.ChronopicColors(viewport_chronopics, label_chronopics, label_connected_chronopics, 
chronopicWin.Connected);
@@ -4439,8 +4440,8 @@ public partial class ChronoJumpWindow
                                cp2016.CP, app1, preferences.digitsNumber,
                                checkbutton_allow_finish_rj_after_time.Active,
                                preferences.volumeOn, preferences.gstreamer,
-                               repetitiveConditionsWin, progressbarLimit, egd
-                               );
+                               repetitiveConditionsWin, progressbarLimit, egd,
+                               preferences.colorBackground);
                
                //suitable for limited by jump and time
                //simulated always simulate limited by jumps
@@ -4960,7 +4961,7 @@ public partial class ChronoJumpWindow
                                currentSession.UniqueID, currentReactionTimeType.Name, 
                                cp2016.CP, app1, preferences.digitsNumber,
                                preferences.volumeOn, preferences.gstreamer,
-                               progressbarLimit, egd, description
+                               progressbarLimit, egd, description, preferences.colorBackground
                                );
 
                if (! canCaptureC)
@@ -5121,7 +5122,7 @@ public partial class ChronoJumpWindow
                                currentSession.UniqueID, currentPulseType.Name, pulseStep, totalPulses, 
                                cp2016.CP,
                                app1, preferences.digitsNumber,
-                               preferences.volumeOn, preferences.gstreamer, egd
+                               preferences.volumeOn, preferences.gstreamer, egd, preferences.colorBackground
                                );
                
                if(! canCaptureC)
@@ -5916,7 +5917,8 @@ LogB.Debug("mc finished 5");
                if (myTreeViewJumps.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this jump?"), "");
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this jump?"),
+                                               "", preferences.colorBackground);
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_jump_accepted);
                        } else {
                                on_delete_selected_jump_accepted(o, args);
@@ -5932,7 +5934,8 @@ LogB.Debug("mc finished 5");
                if (myTreeViewJumpsRj.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want 
to delete this jump?"), "");
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want 
to delete this jump?"),
+                                               "", preferences.colorBackground);
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_jump_rj_accepted);
                        } else {
                                on_delete_selected_jump_rj_accepted(o, args);
@@ -6006,7 +6009,8 @@ LogB.Debug("mc finished 5");
                if (myTreeViewRuns.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this race?"), "");
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this race?"),
+                                               "", preferences.colorBackground);
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_run_accepted);
                        } else {
                                on_delete_selected_run_accepted(o, args);
@@ -6023,7 +6027,8 @@ LogB.Debug("mc finished 5");
                if (myTreeViewRunsInterval.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(Catalog.GetString("Do you want 
to delete this race?"), "");
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show(
+                                               Catalog.GetString("Do you want to delete this race?"), "", 
preferences.colorBackground);
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_run_interval_accepted);
                        } else {
                                on_delete_selected_run_interval_accepted(o, args);
@@ -6087,7 +6092,7 @@ LogB.Debug("mc finished 5");
                if (myTreeViewReactionTimes.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete this 
test?", "");
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete this 
test?", "", preferences.colorBackground);
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_reaction_time_accepted);
                        } else {
                                on_delete_selected_reaction_time_accepted(o, args);
@@ -6126,7 +6131,7 @@ LogB.Debug("mc finished 5");
                if (myTreeViewPulses.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete this 
test?", "");
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show("Do you want to delete this 
test?", "", preferences.colorBackground);
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_pulse_accepted);
                        } else {
                                on_delete_selected_pulse_accepted(o, args);
@@ -6161,7 +6166,8 @@ LogB.Debug("mc finished 5");
                if (myTreeViewMultiChronopic.EventSelectedID > 0) {
                        //3.- display confirmwindow of deletion 
                        if (preferences.askDeletion) {
-                               confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want 
to delete this test?"), "");
+                               confirmWinJumpRun = ConfirmWindowJumpRun.Show( Catalog.GetString("Do you want 
to delete this test?"),
+                                               "", preferences.colorBackground);
                                confirmWinJumpRun.Button_accept.Clicked += new 
EventHandler(on_delete_selected_multi_chronopic_accepted);
                        } else {
                                on_delete_selected_multi_chronopic_accepted(o, args);
@@ -7615,7 +7621,8 @@ LogB.Debug("mc finished 5");
        private void on_debug_crash_activate (object o, EventArgs args) {
                bool voluntaryCrashAllowed = true;
                if(voluntaryCrashAllowed) {
-                       ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Done for testing 
purposes. Chronojump will exit badly"), "", "Are you sure you want to crash application?");
+                       ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Done for testing 
purposes. Chronojump will exit badly"),
+                                       "", "Are you sure you want to crash application?", 
preferences.colorBackground);
                        confirmWin.Button_accept.Clicked += new EventHandler(crashing);
                } else {
                        new DialogMessage(Constants.MessageTypes.INFO, "Currently disabled.");
diff --git a/src/gui/app1/chronojumpPersons.cs b/src/gui/app1/chronojumpPersons.cs
index b6075cc2..a98d91b1 100644
--- a/src/gui/app1/chronojumpPersons.cs
+++ b/src/gui/app1/chronojumpPersons.cs
@@ -368,7 +368,7 @@ public partial class ChronoJumpWindow
                LogB.Information("delete current person from this session");
                ConfirmWindow confirmWin = ConfirmWindow.Show(
                                Catalog.GetString("Are you sure you want to delete the current person and all 
his/her tests (jumps, races, pulses, ...) from this session?\n(His/her personal data and tests in other 
sessions will remain intact.)"), "",
-                               Catalog.GetString("Current Person: ") + "<b>" + currentPerson.Name + "</b>");
+                               Catalog.GetString("Current Person: ") + "<b>" + currentPerson.Name + "</b>", 
preferences.colorBackground);
 
                confirmWin.Button_accept.Clicked += new 
EventHandler(on_delete_current_person_from_session_accepted);
        }
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index c14546d2..9e21f1e5 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -515,7 +515,8 @@ public partial class ChronoJumpWindow
        {
                encoder_configuration_win = EncoderConfigurationWindow.View(
                                currentEncoderGI, SqliteEncoderConfiguration.SelectActive(currentEncoderGI),
-                               UtilGtk.ComboGetActive(combo_encoder_anchorage), (int) 
spin_encoder_im_weights_n.Value); //used on inertial
+                               UtilGtk.ComboGetActive(combo_encoder_anchorage), (int) 
spin_encoder_im_weights_n.Value, //used on inertial
+                               preferences.colorBackground);
 
                encoder_configuration_win.Button_close.Clicked += new 
EventHandler(on_encoder_configuration_win_closed);
 
@@ -1276,7 +1277,7 @@ public partial class ChronoJumpWindow
                {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(
                                        Catalog.GetString("Recalculate this set will remove existing 
triggers."),
-                                       Catalog.GetString("Are you sure!"), "");
+                                       Catalog.GetString("Are you sure!"), "", preferences.colorBackground);
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_button_encoder_recalculate_clicked_do);
                }
                else
@@ -1522,7 +1523,7 @@ public partial class ChronoJumpWindow
                if(radio_encoder_analyze_individual_current_session.Active) 
                {
                        if(encSelReps == null || encSelReps.Type != 
EncoderSelectRepetitions.Types.INDIVIDUAL_CURRENT_SESSION)
-                               encSelReps = new EncoderSelectRepetitionsIndividualCurrentSession();
+                               encSelReps = new 
EncoderSelectRepetitionsIndividualCurrentSession(preferences.colorBackground);
 
                        encSelReps.FakeButtonDeleteCurve.Clicked -= new EventHandler(on_delete_encoder_curve);
                        encSelReps.FakeButtonDeleteCurve.Clicked += new EventHandler(on_delete_encoder_curve);
@@ -1875,7 +1876,7 @@ public partial class ChronoJumpWindow
        {
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), 
Catalog.GetString("Saved repetitions related to this set will also be deleted."), "");
+                                               "Are you sure you want to delete this set?"), 
Catalog.GetString("Saved repetitions related to this set will also be deleted."), "", 
preferences.colorBackground);
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_encoder_load_signal_row_delete);
                } else
                        on_encoder_load_signal_row_delete (o, args);
@@ -2186,7 +2187,7 @@ public partial class ChronoJumpWindow
                                        LogB.Information("Overwrite...");
                                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
                                                                "Are you sure you want to overwrite file: "), 
"", 
-                                                       exportFileName);
+                                                       exportFileName, preferences.colorBackground);
 
                                        if(checkFileOp == Constants.CheckFileOp.JUMPS_PROFILE_SAVE_IMAGE)
                                                confirmWin.Button_accept.Clicked +=
@@ -2337,7 +2338,7 @@ public partial class ChronoJumpWindow
        {
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), 
Catalog.GetString("Saved repetitions related to this set will also be deleted."), "");
+                                               "Are you sure you want to delete this set?"), 
Catalog.GetString("Saved repetitions related to this set will also be deleted."), "", 
preferences.colorBackground);
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_button_encoder_delete_signal_accepted);
                } else
                        on_button_encoder_delete_signal_accepted (o, args);
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index c069caf1..dc66608b 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -1877,7 +1877,7 @@ LogB.Information(" fs R ");
        {
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), "", "");
+                                               "Are you sure you want to delete this set?"), "", "", 
preferences.colorBackground);
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_force_sensor_load_signal_row_delete);
                } else
                        on_force_sensor_load_signal_row_delete (o, args);
@@ -1913,7 +1913,7 @@ LogB.Information(" fs R ");
 
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), "", "");
+                                               "Are you sure you want to delete this set?"), "", "", 
preferences.colorBackground);
                        confirmWin.Button_accept.Clicked += new 
EventHandler(force_sensor_delete_current_test_accepted);
                } else
                        force_sensor_delete_current_test_accepted(new object(), new EventArgs());
diff --git a/src/gui/app1/runEncoder.cs b/src/gui/app1/runEncoder.cs
index 4cb00a5a..e0cbd393 100644
--- a/src/gui/app1/runEncoder.cs
+++ b/src/gui/app1/runEncoder.cs
@@ -841,7 +841,7 @@ public partial class ChronoJumpWindow
        {
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), "", "");
+                                               "Are you sure you want to delete this set?"), "", "", 
preferences.colorBackground);
                        confirmWin.Button_accept.Clicked += new 
EventHandler(on_run_encoder_load_signal_row_delete);
                } else
                        on_run_encoder_load_signal_row_delete (o, args);
@@ -878,7 +878,7 @@ public partial class ChronoJumpWindow
 
                if(preferences.askDeletion) {
                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this set?"), "", "");
+                                               "Are you sure you want to delete this set?"), "", "", 
preferences.colorBackground);
                        confirmWin.Button_accept.Clicked += new 
EventHandler(run_encoder_delete_current_test_accepted);
                } else
                        run_encoder_delete_current_test_accepted(new object(), new EventArgs());
diff --git a/src/gui/app1/session/backup.cs b/src/gui/app1/session/backup.cs
index 16526f4f..9f17ff05 100644
--- a/src/gui/app1/session/backup.cs
+++ b/src/gui/app1/session/backup.cs
@@ -128,7 +128,8 @@ public partial class ChronoJumpWindow
 
                        if(exists) {
                                LogB.Information("Overwrite...");
-                               ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite: "), "", app1s_fileCopy);
+                               ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite: "),
+                                               "", app1s_fileCopy, preferences.colorBackground);
                                confirmWin.Button_accept.Clicked += new 
EventHandler(app1s_backup_on_overwrite_file_accepted);
                        } else {
                                //if multimedia_and_encoder, then copy the folder. If not checked, then copy 
only the db file
diff --git a/src/gui/app1/session/export.cs b/src/gui/app1/session/export.cs
index a865e801..29bf3d1b 100644
--- a/src/gui/app1/session/export.cs
+++ b/src/gui/app1/session/export.cs
@@ -87,7 +87,8 @@ public partial class ChronoJumpWindow
 
                        if(exists) {
                                LogB.Information("Overwrite...");
-                               ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite: "), "", app1s_fileCopy);
+                               ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure 
you want to overwrite: "),
+                                               "", app1s_fileCopy, preferences.colorBackground);
                                confirmWin.Button_accept.Clicked += new 
EventHandler(app1s_export_on_overwrite_file_accepted);
                        } else {
                                app1s_pulsebarExportActivity.Visible = true;
diff --git a/src/gui/confirm.cs b/src/gui/confirm.cs
index 14b5c1ce..d22f82af 100644
--- a/src/gui/confirm.cs
+++ b/src/gui/confirm.cs
@@ -37,7 +37,7 @@ public class ConfirmWindowJumpRun
 
        static ConfirmWindowJumpRun ConfirmWindowJumpRunBox;
        
-       public ConfirmWindowJumpRun (string text1, string question)
+       public ConfirmWindowJumpRun (string text1, string question, Gdk.Color colorBackground)
        {
                //Setup (text, table, uniqueID);
                Glade.XML gladeXML;
@@ -47,6 +47,9 @@ public class ConfirmWindowJumpRun
                confirm_window.Title = "Chronojump - " + Catalog.GetString("Confirm");
                //put an icon to window
                UtilGtk.IconWindow(confirm_window);
+               UtilGtk.WindowColor(confirm_window, colorBackground);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label1);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_question);
                
                label1.Text = text1;
                if(question == "")
@@ -55,10 +58,10 @@ public class ConfirmWindowJumpRun
                        label_question.Text = question;
        }
 
-       static public ConfirmWindowJumpRun Show (string text1, string question)
+       static public ConfirmWindowJumpRun Show (string text1, string question, Gdk.Color colorBackground)
        {
                if (ConfirmWindowJumpRunBox == null) {
-                       ConfirmWindowJumpRunBox = new ConfirmWindowJumpRun(text1, question);
+                       ConfirmWindowJumpRunBox = new ConfirmWindowJumpRun(text1, question, colorBackground);
                }
                ConfirmWindowJumpRunBox.confirm_window.Show ();
                
@@ -105,15 +108,20 @@ public class ConfirmWindow
 
        static ConfirmWindow ConfirmWindowBox;
        
-       public ConfirmWindow (string text1, string link, string question)
+       public ConfirmWindow (string text1, string link, string question, Gdk.Color colorBackground)
        {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "confirm_window.glade", 
"confirm_window", null);
                gladeXML.Autoconnect(this);
                
                confirm_window.Title = "Chronojump - " + Catalog.GetString("Confirm");
+
                //put an icon to window
                UtilGtk.IconWindow(confirm_window);
+               UtilGtk.WindowColor(confirm_window, colorBackground);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label1);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_link);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_question);
                
                label1.Text = text1;
                label1.UseMarkup = true;
@@ -132,10 +140,10 @@ public class ConfirmWindow
 
        }
 
-       static public ConfirmWindow Show (string text1, string link, string question)
+       static public ConfirmWindow Show (string text1, string link, string question, Gdk.Color 
colorBackground)
        {
                if (ConfirmWindowBox == null) {
-                       ConfirmWindowBox = new ConfirmWindow(text1, link, question);
+                       ConfirmWindowBox = new ConfirmWindow(text1, link, question, colorBackground);
                }
                ConfirmWindowBox.confirm_window.Show ();
                
diff --git a/src/gui/encoderConfiguration.cs b/src/gui/encoderConfiguration.cs
index aac766a9..652a3866 100644
--- a/src/gui/encoderConfiguration.cs
+++ b/src/gui/encoderConfiguration.cs
@@ -121,6 +121,7 @@ public class EncoderConfigurationWindow
        Pixbuf pixbuf;
 
        Constants.EncoderGI encoderGI;
+       Gdk.Color colorBackground;
 
        /*
         * this params are used on inertial
@@ -157,7 +158,7 @@ public class EncoderConfigurationWindow
 
        static public EncoderConfigurationWindow View (
                        Constants.EncoderGI encoderGI, EncoderConfigurationSQLObject econfSO,
-                       string anchorage_str, int extraWeightN)
+                       string anchorage_str, int extraWeightN, Gdk.Color colorBackground)
        {
                if (EncoderConfigurationWindowBox == null) {
                        EncoderConfigurationWindowBox = new EncoderConfigurationWindow ();
@@ -167,6 +168,7 @@ public class EncoderConfigurationWindow
                EncoderConfigurationWindowBox.updateGUIFromEncoderConfiguration(econfSO.encoderConfiguration);
                EncoderConfigurationWindowBox.main_gui_anchorage_str = anchorage_str;
                EncoderConfigurationWindowBox.main_gui_extraWeightN = extraWeightN;
+               EncoderConfigurationWindowBox.colorBackground = colorBackground;
 
                EncoderConfigurationWindowBox.createTreeView();
                EncoderConfigurationWindowBox.fillTreeView(
@@ -730,7 +732,7 @@ public class EncoderConfigurationWindow
                                        LogB.Information("Overwrite...");
                                        ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString(
                                                                "Are you sure you want to overwrite file: "), 
"",
-                                                       exportFileName);
+                                                       exportFileName, colorBackground);
 
                                        confirmWin.Button_accept.Clicked +=
                                                new EventHandler(on_overwrite_file_export_accepted);
diff --git a/src/gui/encoderSelectRepetitions.cs b/src/gui/encoderSelectRepetitions.cs
index 17ad6394..d1efc527 100644
--- a/src/gui/encoderSelectRepetitions.cs
+++ b/src/gui/encoderSelectRepetitions.cs
@@ -178,9 +178,12 @@ public class EncoderSelectRepetitions
 public class EncoderSelectRepetitionsIndividualCurrentSession : EncoderSelectRepetitions
 {
        ArrayList dataPrint;
+       Gdk.Color colorBackground;
 
-       public EncoderSelectRepetitionsIndividualCurrentSession() {
+       public EncoderSelectRepetitionsIndividualCurrentSession(Gdk.Color colorBackground)
+       {
                Type = Types.INDIVIDUAL_CURRENT_SESSION;
+               this.colorBackground = colorBackground;
 
                FakeButtonDeleteCurve = new Gtk.Button();
        }
@@ -385,7 +388,7 @@ public class EncoderSelectRepetitionsIndividualCurrentSession : EncoderSelectRep
        {
                if(askDeletion) {
                        confirmWin = ConfirmWindow.Show(Catalog.GetString(
-                                               "Are you sure you want to delete this repetition?"), "", "");
+                                               "Are you sure you want to delete this repetition?"), "", "", 
colorBackground);
                        confirmWin.Button_accept.Clicked -= new EventHandler(on_show_repetitions_row_delete);
                        confirmWin.Button_accept.Clicked += new EventHandler(on_show_repetitions_row_delete);
                } else
diff --git a/src/gui/event.cs b/src/gui/event.cs
index 1ca48159..8b2edfd4 100644
--- a/src/gui/event.cs
+++ b/src/gui/event.cs
@@ -608,16 +608,20 @@ public class EventMoreWindow
        protected bool testOrDelete; //are we going to do a test or to delete a test type (test is true)
        protected string [] typesTranslated;
 
+       private Gdk.Color colorBackground;
+
        public EventMoreWindow () {
        }
 
-       public EventMoreWindow (Gtk.Window parent, bool testOrDelete) {
+       public EventMoreWindow (Gtk.Window parent, bool testOrDelete, Gdk.Color colorBackground) {
                /*
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "jumps_runs_more.glade", 
"jumps_runs_more", "chronojump");
                gladeXML.Autoconnect(this);
                */
 
+               this.colorBackground = colorBackground;
+
                //name, startIn, weight, description
                store = new TreeStore(typeof (string), typeof (string), typeof (string), typeof (string));
 
@@ -696,7 +700,8 @@ public class EventMoreWindow
                                        Util.ArrayListToSingleString(sessionValues, ", ") + "\n\n" +
                                        Catalog.GetString("please first edit or delete them."));
                else {
-                       ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you 
want to delete this test type?"), "", selectedEventName);
+                       ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you 
want to delete this test type?"), "",
+                                       selectedEventName, colorBackground);
                        confirmWin.Button_accept.Clicked += new EventHandler(on_button_delete_type_accepted);
                }
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]