Fixed about and help.
authorv13 <v13>
Sat, 20 Mar 2010 11:28:29 +0000 (11:28 +0000)
committerv13 <v13>
Sat, 20 Mar 2010 11:28:29 +0000 (11:28 +0000)
Added girl name to window title.
Increased PMS length to 7.

trunk/src/algo.py
trunk/src/config.py
trunk/src/win.py

index 2a867cc..32c64bd 100755 (executable)
@@ -72,11 +72,11 @@ class Algo(object):
                'day':      d,
                'len':      5,
                }
-       elif d>=self.cycle-6:
+       elif d>=self.cycle-7:
            ret={
                'status':   'blue',
-               'day':      6+d-self.cycle,
-               'len':      6,
+               'day':      7+d-self.cycle,
+               'len':      7,
                }
        elif d>self.cycle-ovbefore-4 and d<=self.cycle-ovbefore:
            ret={
index af11dad..2c90879 100755 (executable)
@@ -28,7 +28,7 @@ import pickle
 import time
 import algo
 
-version="0.1.1"
+version="0.1.3"
 
 try:
     home=os.environ['HOME']
index 8c78300..41bbe58 100755 (executable)
@@ -136,20 +136,39 @@ class AboutDialog(MyMsgDialog):
        MyMsgDialog.__init__(self, *args, **kwargs)
 
        txt=self.tr("""
+<html><style>
+div.title {
+    text-decoration:   underline;
+}
+</style>
+<body>
 <p> A program to monitor the women's cycle.  Good for planning (or acting ;-).
 Inspired by "MyGirls" app which is (was?) available for Java ME capable phones.
 
 <p style="color: orange;">
-WARNING!!! This is not accurate nor correct! You cannot trust
-this program (or any other program) for accurate predictions!
-(after all, this is about women... how can one be sure :-).
+WARNING!!! This app is not guaranteed to be accurate or correct!  You cannot 
+trust this program, or any program, to give accurate predictions!
+The whole women-cycle-thing highly depends on a number of factors that
+only a doctor can tell.
 
+<div class="title">Copyright</div>
 <p> Copyright &copy; 2010, Stefanos Harhalakis &lt;v13@v13.gr&gt;
 
 <p> Send comments and bug reports to the above address.
 
-<p> This program can be distributed under the terms of the GNU public
-license, version 3 or any later.
+<div class="title">License</div>
+<p> This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+<p> This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+<p> You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+</body>
+</html>
        """)
 
        self.setWindowTitle(self.tr("About MaeGirls"))
@@ -180,24 +199,27 @@ class HelpDialog(MyMsgDialog):
 
        txt=self.tr("""
 <p> MaeGirls shows information about women's cycle using some generic
-guidelines.  It assumes that the ovulation happens 14 days before the start
+guidelines:  It assumes that the ovulation happens 14 days before the start
 of the next period and that the period cycle is constant. Also, it assumes
 that sperm can live for 4 days, while an egg can live for 2 days.
 
 <p style="color: orange;">
 WARNING!!! This is not always correct. There are FAR TOO MANY exceptions
-to the above rules!!!
+to the above rules!!! You MUST consult a doctor in order to get accurate
+predictions!!!
 
-<p> Assuming that you understand the risk of being wrong, you become
-entitled to read the graph as follows:
+<p> Assuming that you understand the risks of blindly trusting this program,
+you become entitled to read the graph as follows:
 <p> <span style="color: red">In red:</span> The days that menstruation
-happens.
-<p> <span style="color: green">In green:</span> The fertile days.
+happens, assumed to last 5 days.
+<p> <span style="color: green">In green:</span> The fertile days as described above.
 <p> <span style="color: blue">In blue:</span> The days of PMS
-(Premenstrual Syndrome).
+(Premenstrual Syndrome), assumed to last 7 days.
 
 <p> Navigation is easy: Use left-right finger movement to move the calendar
 view. Use up-down finger movement to zoom in/out.
+
+<p> This program allows for "monitoring" the cycle of multiple girls.
        """)
 
        self.setWindowTitle(self.tr("Help"))
@@ -340,7 +362,9 @@ class MaeGirls(QMainWindow):
        m.addAction(self.menuhelp)
        m.addAction(self.menuabout)
 
-       self.setWindowTitle("MaeGirls")
+    def updateTitle(self):
+       txt="MaeGirls - %s" % (self.girl, )
+       self.setWindowTitle(txt)
 
     def setAlgo(self, algo):
        self.dg.setAlgo(algo)
@@ -350,6 +374,7 @@ class MaeGirls(QMainWindow):
        self.girl=name
        self.algo.setReference(cfg['day0'], cfg['cycle'])
        self.update()
+       self.updateTitle()
 
     def menuConfig(self):
        if self.dlgConfig==None:
@@ -452,8 +477,6 @@ def init(algo):
 
     loc=locale.setlocale(locale.LC_MESSAGES, '')
 
-    print "loc:", loc
-
     # Load translations
     qttr=QTranslator()
     qttr.load("qt_" + loc,