[tryton-debian-vcs] goocalendar branch upstream updated. upstream/0.1-1-gf87e67c

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Apr 30 17:25:31 UTC 2015


The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/goocalendar.git;a=commitdiff;h=upstream/0.1-1-gf87e67c

commit f87e67cd1a2d0b04f0dc50a19e88fbf5a738087a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Apr 30 16:12:32 2015 +0200

    Adding upstream version 0.2.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index 416204d..686d84b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,2 +1,5 @@
+Version 0.2 - 2015-02-11
+* Bug fixes (see mercurial logs for details)
+
 Version 0.1 - 2013-02-18
 * Initial release
diff --git a/COPYRIGHT b/COPYRIGHT
index 2e334b4..42c3bd8 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -2,9 +2,10 @@ Copyright (C) 2012 Antoine Smolders
 Copyright (C) 2012-2013 Cédric Krier
 Copyright (C) 2007 Samuel Abels <http://debain.org>
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2, as
-published by the Free Software Foundation.
+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 2
+of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,4 +14,4 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
diff --git a/GooCalendar.egg-info/PKG-INFO b/GooCalendar.egg-info/PKG-INFO
index c9fd974..6c63d99 100644
--- a/GooCalendar.egg-info/PKG-INFO
+++ b/GooCalendar.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: GooCalendar
-Version: 0.1
+Version: 0.2
 Summary: A calendar widget for GTK using PyGoocanvas
 Home-page: http://code.google.com/p/goocalendar/
 Author: Cédric Krier
@@ -15,7 +15,16 @@ Description: GooCalendar
         Nutshell
         --------
         
-        .. TODO
+        Example usage::
+        
+            >>> import datetime
+            >>> import goocalendar
+            >>> event_store = goocalendar.EventStore()
+            >>> calendar = goocalendar.Calendar(event_store)
+            >>> event = goocalendar.Event('Birthday',
+            ...     datetime.date.today(),
+            ...     bg_color='lightgreen')
+            >>> event_store.add(event)
         
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
diff --git a/PKG-INFO b/PKG-INFO
index c9fd974..6c63d99 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: GooCalendar
-Version: 0.1
+Version: 0.2
 Summary: A calendar widget for GTK using PyGoocanvas
 Home-page: http://code.google.com/p/goocalendar/
 Author: Cédric Krier
@@ -15,7 +15,16 @@ Description: GooCalendar
         Nutshell
         --------
         
-        .. TODO
+        Example usage::
+        
+            >>> import datetime
+            >>> import goocalendar
+            >>> event_store = goocalendar.EventStore()
+            >>> calendar = goocalendar.Calendar(event_store)
+            >>> event = goocalendar.Event('Birthday',
+            ...     datetime.date.today(),
+            ...     bg_color='lightgreen')
+            >>> event_store.add(event)
         
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
diff --git a/README b/README
index 2eb50c8..1f12214 100644
--- a/README
+++ b/README
@@ -6,4 +6,13 @@ A calendar widget for GTK using PyGoocanvas
 Nutshell
 --------
 
-.. TODO
+Example usage::
+
+    >>> import datetime
+    >>> import goocalendar
+    >>> event_store = goocalendar.EventStore()
+    >>> calendar = goocalendar.Calendar(event_store)
+    >>> event = goocalendar.Event('Birthday',
+    ...     datetime.date.today(),
+    ...     bg_color='lightgreen')
+    >>> event_store.add(event)
diff --git a/doc/conf.py b/doc/conf.py
index 4d5ab0e..c84904f 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -46,9 +46,9 @@ copyright = u'2012, Samuel Abels, Cédric Krier, Antoine Smolders'
 # built documents.
 #
 # The short X.Y version.
-version = '0.1'
+version = '0.2'
 # The full version, including alpha/beta/rc tags.
-release = '0.1'
+release = '0.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/goocalendar/__init__.py b/goocalendar/__init__.py
index 615d42f..734f93f 100644
--- a/goocalendar/__init__.py
+++ b/goocalendar/__init__.py
@@ -4,4 +4,4 @@ from ._calendar import Calendar
 from ._event import Event, EventStore
 
 __all__ = ['Calendar', 'EventStore', 'Event']
-__version__ = '0.1'
+__version__ = '0.2'
diff --git a/goocalendar/_calendar.py b/goocalendar/_calendar.py
index 1d2f5b5..ba2c4f8 100644
--- a/goocalendar/_calendar.py
+++ b/goocalendar/_calendar.py
@@ -1129,20 +1129,26 @@ class EventItem(goocanvas.Group):
         if self.event.end:
             enddate = self.event.end.strftime('%x')
             endtime = self.event.end.strftime(self.time_format)
+        caption = self.event.caption
 
         if self.event.all_day:
-            caption = self.event.caption
             if not self.event.end:
                 tooltip = '%s\n%s' % (startdate, caption)
             else:
                 tooltip = '%s - %s\n%s' % (startdate, enddate, caption)
         elif self.event.multidays:
-            caption = '%s %s' % (starttime, self.event.caption)
-            tooltip = '%s %s - %s %s\n%s' % (startdate, starttime, enddate,
-                endtime, self.event.caption)
+            caption = '%s %s' % (starttime, caption)
+            if not self.event.end:
+                tooltip = '%s %s\n%s' % (startdate, starttime, caption)
+            else:
+                tooltip = '%s %s - %s %s\n%s' % (startdate, starttime,
+                    enddate, endtime, caption)
         else:
-            caption = '%s %s' % (starttime, self.event.caption)
-            tooltip = '%s - %s\n%s' % (starttime, endtime, self.event.caption)
+            caption = '%s %s' % (starttime, caption)
+            if not self.event.end:
+                tooltip = '%s\n%s' % (starttime, caption)
+            else:
+                tooltip = '%s - %s\n%s' % (starttime, endtime, caption)
         caption = '' if self.no_caption else caption
         the_event_bg_color = self.event.bg_color
         self.text.set_property('text', caption)
diff --git a/goocalendar/util.py b/goocalendar/util.py
index f332f17..af61ad8 100644
--- a/goocalendar/util.py
+++ b/goocalendar/util.py
@@ -14,10 +14,10 @@ def my_weekdatescalendar(cal, date):
 
 
 def my_monthdatescalendar(cal, date):
-    # Months that have only five weeks are filled with another week from
+    # Months that have less than five weeks are filled with weeks from
     # the following month.
     weeks = cal.monthdatescalendar(date.year, date.month)
-    if len(weeks) < 6:
+    while len(weeks) < 6:
         last_day = weeks[-1][-1]
         offset = datetime.timedelta(1)
         week = []
diff --git a/setup.py b/setup.py
index f51b0f5..21393ff 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ def read(fname):
     return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
 setup(name='GooCalendar',
-    version='0.1',
+    version='0.2',
     author='Cédric Krier',
     author_email='cedric.krier at b2ck.com',
     url='http://code.google.com/p/goocalendar/',
-- 
goocalendar



More information about the tryton-debian-vcs mailing list