[med-svn] [Git][med-team/cycle][master] 2 commits: More fixes
Andreas Tille
gitlab at salsa.debian.org
Thu Sep 12 14:53:46 BST 2019
Andreas Tille pushed to branch master at Debian Med / cycle
Commits:
13e3a473 by Andreas Tille at 2019-09-12T13:46:46Z
More fixes
- - - - -
3daaebaa by Andreas Tille at 2019-09-12T13:49:00Z
Fix interpreter
- - - - -
1 changed file:
- debian/patches/2to3.patch
Changes:
=====================================
debian/patches/2to3.patch
=====================================
@@ -280,7 +280,7 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
-# self.Draw_Mark()
+ wx.ScrolledWindow.__init__(self, parent,-1)
+# self.SetScrollbars(20, 20, 39, 40)
-+ self.SetBackgroundColour(wx.NamedColour('LIGHT BLUE'))
++ self.SetBackgroundColour(wx.Colour('LIGHT BLUE'))
+
+ dt=wx.DateTime.Today()
+ self.year=dt.GetYear()
@@ -475,9 +475,9 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
+ calc_fert(self.year)
+ calc_tablet(self.year)
+ k=1
-+ for m in range(1,13):
++ for m in range(12):
+ sel_hide=True# need hide selection
-+ for d in range(1,calendar.monthrange(self.year,m)[1]+1):
++ for d in range(1,calendar.monthrange(self.year,m+1)[1]+1):
+ can_hide=True
+ lab=cycle.mark.get(k,0)
+ at=wx.adv.CalendarDateAttr(wx.BLACK)
@@ -486,7 +486,7 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
+
+ dt=wx.DateTime.FromDMY(d, m, self.year)
+ if not dt.IsWorkDay(): # mark weekend
-+ at.SetTextColour(wx.NamedColour('firebrick'))
++ at.SetTextColour(wx.Colour('firebrick'))
+
+ if lab & MARK_BEGIN:
+ at.SetBackgroundColour(cycle.colour_set['begin'])
@@ -506,7 +506,7 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
+ at.SetBackgroundColour(cycle.colour_set['ovule'])
+
+ if lab & MARK_TODAY :
-+ at.SetBorderColour(wx.NamedColour('NAVY'))
++ at.SetBorderColour(wx.Colour('NAVY'))
+ at.SetBorder(wx.adv.CAL_BORDER_SQUARE)
+ can_hide=False
+
@@ -546,25 +546,28 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
#-------------------- work with cycle -------------------
-@@ -313,36 +315,36 @@ class cycle:
+@@ -312,37 +314,37 @@ class cycle:
+ first_week_day=0
note={}
colour_set={}
- # colour_set={'begin':wx.NamedColour('red'),
+-# colour_set={'begin':wx.NamedColour('red'),
-# 'prog begin':wx.NamedColour('pink'),
-+# 'prog begin':wx.NamedColour('pink'),
- # 'conception':wx.NamedColour('MAGENTA'),
+-# 'conception':wx.NamedColour('MAGENTA'),
-# 'safe sex':wx.NamedColour('wheat'),
-# 'fertile':wx.NamedColour('green yellow'),
-# 'ovule':wx.NamedColour('SPRING GREEN'),
-# '1-st tablet':wx.NamedColour('gold'),
-# 'pause':wx.NamedColour('light blue'),
-# 'next 1-st tablet':wx.NamedColour('pink')}
-+# 'safe sex':wx.NamedColour('wheat'),
-+# 'fertile':wx.NamedColour('green yellow'),
-+# 'ovule':wx.NamedColour('SPRING GREEN'),
-+# '1-st tablet':wx.NamedColour('gold'),
-+# 'pause':wx.NamedColour('light blue'),
-+# 'next 1-st tablet':wx.NamedColour('pink')}
++# colour_set={'begin':wx.Colour('red'),
++# 'prog begin':wx.Colour('pink'),
++# 'conception':wx.Colour('MAGENTA'),
++# 'safe sex':wx.Colour('wheat'),
++# 'fertile':wx.Colour('green yellow'),
++# 'ovule':wx.Colour('SPRING GREEN'),
++# '1-st tablet':wx.Colour('gold'),
++# 'pause':wx.Colour('light blue'),
++# 'next 1-st tablet':wx.Colour('pink')}
def min_max(i):
"""Return length max and min of 6 last cycles
@@ -1060,7 +1063,8 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
--- a/cycle.py
+++ b/cycle.py
@@ -1,16 +1,14 @@
- #!/usr/bin/env python
+-#!/usr/bin/env python
++#!/usr/bin/python3
# coding: koi8-r
#====================================================
-# Cycle - calendar for women
@@ -2278,15 +2282,15 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
- 'next 1-st tablet':wx.NamedColour('PINK')}
- for item in self.col_id:
- self.buttons[self.col_id.index(item)].SetBackgroundColour(self.col_set[item])
-+ self.col_set = {'begin':wx.NamedColour('RED'),
-+ 'prog begin':wx.NamedColour('PINK'),
-+ 'conception':wx.NamedColour('MAGENTA'),
-+ 'safe sex':wx.NamedColour('WHEAT'),
-+ 'fertile':wx.NamedColour('GREEN YELLOW'),
-+ 'ovule':wx.NamedColour('SPRING GREEN'),
-+ '1-st tablet':wx.NamedColour('GOLD'),
-+ 'pause':wx.NamedColour('LIGHT BLUE'),
-+ 'next 1-st tablet':wx.NamedColour('PINK')}
++ self.col_set = {'begin':wx.Colour('RED'),
++ 'prog begin':wx.Colour('PINK'),
++ 'conception':wx.Colour('MAGENTA'),
++ 'safe sex':wx.Colour('WHEAT'),
++ 'fertile':wx.Colour('GREEN YELLOW'),
++ 'ovule':wx.Colour('SPRING GREEN'),
++ '1-st tablet':wx.Colour('GOLD'),
++ 'pause':wx.Colour('LIGHT BLUE'),
++ 'next 1-st tablet':wx.Colour('PINK')}
+ for item in self.col_id:
+ self.buttons[self.col_id.index(item)].SetBackgroundColour(self.col_set[item])
@@ -2666,7 +2670,7 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
f=open(f_name,"wb")
f.write(tmp)
f.close()
-@@ -56,63 +56,63 @@ def Save_Cycle(name='cycle', passwd='123
+@@ -56,77 +56,77 @@ def Save_Cycle(name='cycle', passwd='123
def Load_Cycle(name='cycle', passwd='123', file='cycle'):
@@ -2779,24 +2783,26 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
f_name=os.path.join(p,name)
return p, f_name
-@@ -120,13 +120,13 @@ def get_f_name(name=""):
+
#-------------------------------------------------------
def set_color_default():
- cal_year.cycle.colour_set={'begin':wx.NamedColour('RED'),
+- cal_year.cycle.colour_set={'begin':wx.NamedColour('RED'),
- 'prog begin':wx.NamedColour('PINK'),
-+ 'prog begin':wx.NamedColour('PINK'),
- 'conception':wx.NamedColour('MAGENTA'),
+- 'conception':wx.NamedColour('MAGENTA'),
- 'safe sex':wx.NamedColour('WHEAT'),
- 'fertile':wx.NamedColour('GREEN YELLOW'),
- 'ovule':wx.NamedColour('SPRING GREEN'),
- '1-st tablet':wx.NamedColour('GOLD'),
- 'pause':wx.NamedColour('LIGHT BLUE'),
- 'next 1-st tablet':wx.NamedColour('PINK')}
-+ 'safe sex':wx.NamedColour('WHEAT'),
-+ 'fertile':wx.NamedColour('GREEN YELLOW'),
-+ 'ovule':wx.NamedColour('SPRING GREEN'),
-+ '1-st tablet':wx.NamedColour('GOLD'),
-+ 'pause':wx.NamedColour('LIGHT BLUE'),
-+ 'next 1-st tablet':wx.NamedColour('PINK')}
++ cal_year.cycle.colour_set={'begin':wx.Colour('RED'),
++ 'prog begin':wx.Colour('PINK'),
++ 'conception':wx.Colour('MAGENTA'),
++ 'safe sex':wx.Colour('WHEAT'),
++ 'fertile':wx.Colour('GREEN YELLOW'),
++ 'ovule':wx.Colour('SPRING GREEN'),
++ '1-st tablet':wx.Colour('GOLD'),
++ 'pause':wx.Colour('LIGHT BLUE'),
++ 'next 1-st tablet':wx.Colour('PINK')}
View it on GitLab: https://salsa.debian.org/med-team/cycle/compare/35db30f58721f1a6cb60466a59ba5cced426c4ce...3daaebaa5a71cc0130e842d1dfa968348108d924
--
View it on GitLab: https://salsa.debian.org/med-team/cycle/compare/35db30f58721f1a6cb60466a59ba5cced426c4ce...3daaebaa5a71cc0130e842d1dfa968348108d924
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190912/26170249/attachment-0001.html>
More information about the debian-med-commit
mailing list