summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c03b88c)
raw | patch | inline | side by side (parent: c03b88c)
author | Aurélio A. Heckert (a) <auriumgmaildotcom> | |
Wed, 3 Nov 2010 03:06:36 +0000 (00:06 -0300) | ||
committer | Aurélio A. Heckert (a) <auriumgmaildotcom> | |
Wed, 3 Nov 2010 03:06:36 +0000 (00:06 -0300) |
It includes the patch code by Craig Marshall, posted on bug492173
This commit changes the default inx year value and its description to stop misunderstands about how it works.
This commit changes the default inx year value and its description to stop misunderstands about how it works.
share/extensions/svgcalendar.inx | patch | blob | history | |
share/extensions/svgcalendar.py | patch | blob | history |
index dee9da0c694f3759103cc3e4d4090dd440f3bfa5..56f5f62ab1b2dea5b13aa2d77a29bb9af1fe2f66 100644 (file)
<dependency type="executable" location="extensions">inkex.py</dependency>
<param name="tab" type="notebook">
<page name="config" _gui-text="Configuration">
+ <param name="year" type="int" min="0" max="3000" _gui-text="Year (4 digits):">2011</param>
<param name="month" type="int" min="0" max="12" _gui-text="Month (0 for all):">0</param>
- <param name="year" type="int" min="0" max="3000" _gui-text="Year (0 for current):">0</param>
<param name="fill-empty-day-boxes" type="boolean" _gui-text="Fill empty day boxes with next month's days">true</param>
<param name="start-day" type="enum" _gui-text="Week start day">
<_item value="sun">Sunday</_item>
<_param name="encoding-help" type="description">Select your system encoding. More information at http://docs.python.org/library/codecs.html#standard-encodings.</_param>
</page>
</param>
- <effect>
+ <effect needs-live-preview="false">
<object-type>all</object-type>
<effects-menu>
<submenu _name="Render"/>
index b62863927fee3b29653952512b993aca06935b7d..8390c33f732aa1ab8ff01461b3fd943eb2484996 100755 (executable)
self.options.day_names = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
# Convert year 0 to current year:
if self.options.year == 0: self.options.year = datetime.today().year
+ # Year 1 starts it's week at monday, obligatorily
+ if self.options.year == 1: self.options.start_day = 'mon'
# Set the calendar start day:
if self.options.start_day=='sun':
calendar.setfirstweekday(6)
gdays = inkex.etree.SubElement(g, 'g')
cal = calendar.monthcalendar(self.options.year,m)
if m == 1:
- before_month = \
- self.in_line_month( calendar.monthcalendar(self.options.year-1, 12) )
+ if self.options.year > 1:
+ before_month = \
+ self.in_line_month( calendar.monthcalendar(self.options.year-1, 12) )
else:
before_month = \
self.in_line_month( calendar.monthcalendar(self.options.year, m-1) )
'x': str( self.day_w * week_x ),
'y': str( self.day_h * (week_y+2) ) }
if day==0 and not self.options.fill_edb:
- pass # draw nothing
- elif day==0:
+ pass # draw nothing
+ elif day==0:
if before:
inkex.etree.SubElement(gdays, 'text', txt_atts).text = str( before_month[-bmd] )
bmd -= 1