don't go before 1/1/1900 in history window. Fixes #5684
This commit is contained in:
parent
1d6378e5c1
commit
87d430d726
1 changed files with 6 additions and 1 deletions
|
@ -337,6 +337,11 @@ class HistoryWindow:
|
||||||
if not self.jid:
|
if not self.jid:
|
||||||
return
|
return
|
||||||
year, month, day = widget.get_date() # integers
|
year, month, day = widget.get_date() # integers
|
||||||
|
if year < 1900:
|
||||||
|
widget.select_month(0, 1900)
|
||||||
|
widget.select_day(1)
|
||||||
|
return
|
||||||
|
|
||||||
# in gtk January is 1, in python January is 0,
|
# in gtk January is 1, in python January is 0,
|
||||||
# I want the second
|
# I want the second
|
||||||
# first day of month is 1 not 0
|
# first day of month is 1 not 0
|
||||||
|
@ -345,7 +350,7 @@ class HistoryWindow:
|
||||||
days_in_this_month = calendar.monthrange(year, month)[1]
|
days_in_this_month = calendar.monthrange(year, month)[1]
|
||||||
try:
|
try:
|
||||||
log_days = gajim.logger.get_days_with_logs(self.jid, year, month,
|
log_days = gajim.logger.get_days_with_logs(self.jid, year, month,
|
||||||
days_in_this_month, self.account)
|
days_in_this_month, self.account)
|
||||||
except exceptions.PysqliteOperationalError, e:
|
except exceptions.PysqliteOperationalError, e:
|
||||||
dialogs.ErrorDialog(_('Disk Error'), str(e))
|
dialogs.ErrorDialog(_('Disk Error'), str(e))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue