[chronojump] Ensure app1 will not be hiding other windows at start
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Ensure app1 will not be hiding other windows at start
- Date: Wed, 9 Aug 2017 17:34:13 +0000 (UTC)
commit a12d5627276e991a3b5b53505a7d38eab966b7fd
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Aug 9 19:33:32 2017 +0200
Ensure app1 will not be hiding other windows at start
src/gui/chronojump.cs | 30 +++++++++++++++++++++++-------
src/gui/chronopicRegister.cs | 3 +++
2 files changed, 26 insertions(+), 7 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 0734ae8..8b68d1f 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -414,6 +414,7 @@ public partial class ChronoJumpWindow
private static Report report;
//windows needed
+ ChronopicRegisterWindow chronopicRegisterWin;
PreferencesWindow preferencesWin;
SessionAddEditWindow sessionAddEditWin;
SessionLoadWindow sessionLoadWin;
@@ -507,8 +508,10 @@ public partial class ChronoJumpWindow
else
new DialogImageTest(myType);
}
-
-
+
+ bool app1Shown = false;
+ bool needToShowChronopicRegisterWindow;
+
public ChronoJumpWindow(string progVersion, string progName, string runningFileName, SplashWindow
splashWin,
bool showSendLog, string sendLogMessage)
{
@@ -522,7 +525,11 @@ public partial class ChronoJumpWindow
//put an icon to window
UtilGtk.IconWindow(app1);
-
+
+ //manage app1 will not be hiding other windows at start
+ app1Shown = false;
+ needToShowChronopicRegisterWindow = false;
+
//show chronojump logo on down-left area
changeTestImage("", "", "LOGO");
@@ -678,6 +685,11 @@ public partial class ChronoJumpWindow
SplashWindow.Hide();
app1.Show();
+
+ //ensure chronopicRegisterWindow is shown after (on top of) app1
+ app1Shown = true;
+ if(needToShowChronopicRegisterWindow)
+ chronopicRegisterWin.Show();
}
private void testNewStuff()
@@ -7053,11 +7065,15 @@ LogB.Debug("X");
if(! cp2016.WindowOpened && chronopicRegister.UnknownFound())
openWindow = true;
- if(openWindow) {
- //ChronopicRegisterWindow crWin = new ChronopicRegisterWindow(app1,
chronopicRegister.Crpl.L);
- //crWin.FakeButtonCloseSerialPort.Clicked += new EventHandler(closeSerialPort);
- new ChronopicRegisterWindow(app1, chronopicRegister.Crpl.L);
+ if(openWindow)
+ {
+ chronopicRegisterWin = new ChronopicRegisterWindow(app1, chronopicRegister.Crpl.L);
cp2016.WindowOpened = true;
+
+ if(app1Shown)
+ chronopicRegisterWin.Show();
+ else
+ needToShowChronopicRegisterWindow = true;
}
}
diff --git a/src/gui/chronopicRegister.cs b/src/gui/chronopicRegister.cs
index 1d54b71..d8a68a9 100644
--- a/src/gui/chronopicRegister.cs
+++ b/src/gui/chronopicRegister.cs
@@ -127,7 +127,10 @@ public class ChronopicRegisterWindow
createVBoxMain();
createContent(connectedCount, unknownCount);
createButtons();
+ }
+ public void Show()
+ {
chronopic_register_win.ShowAll();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]