From e8ed1b1b0e78592cd5bb93027bd761c7e44f9a24 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 29 Dec 2007 17:56:23 +0000 Subject: [PATCH] Calendar month fix; reattach expand bug gadget title save bug svn: r9629 --- src/DataViews/MyGrampsView.py | 5 ++++- src/plugins/DefaultGadgets.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/DataViews/MyGrampsView.py b/src/DataViews/MyGrampsView.py index 1d4c58bc3..3ba59d9c6 100644 --- a/src/DataViews/MyGrampsView.py +++ b/src/DataViews/MyGrampsView.py @@ -143,6 +143,8 @@ class GadgetWindow(ManagedWindow.ManagedWindow): self.gadget.state = "maximized" self.gadget.mainframe.reparent(self.gadget.parent) # FIXME: need to pack as it was, not just stick it in + expand,fill,padding,pack = self.gadget.parent.query_child_packing(self.gadget.mainframe) + self.gadget.parent.set_child_packing(self.gadget.mainframe,self.gadget.expand,fill,padding,pack) ManagedWindow.ManagedWindow.close(self, *args) #------------------------------------------------------------------------ @@ -595,6 +597,7 @@ class MyGrampsView(PageView.PageView): # Can't minimize here, because GRAMPS calls show_all later: #if gadget.state == "minimized": # starts max, change to min it # gadget.set_state("minimized") # minimize it + # set minimized is called in page subclass hack (above) if gadget.state == "windowed": gadget.detach() elif gadget.state == "closed": @@ -613,7 +616,7 @@ class MyGrampsView(PageView.PageView): if "column_count" in cp.options(sec): self.column_count = int(cp.get(sec, "column_count")) else: - data = {} + data = {"title": sec} for opt in cp.options(sec): if opt.startswith("data["): temp = data.get("data", []) diff --git a/src/plugins/DefaultGadgets.py b/src/plugins/DefaultGadgets.py index 1df1b66a6..4918cf44f 100644 --- a/src/plugins/DefaultGadgets.py +++ b/src/plugins/DefaultGadgets.py @@ -66,7 +66,7 @@ class CalendarGadget(Gadget): self.update() def run_update(self, signal, *args): - #print "signal:", signal + print "signal:", signal self.update() def refresh(self, *obj): @@ -74,7 +74,7 @@ class CalendarGadget(Gadget): self.gui.calendar.clear_marks() year, month, day = self.gui.calendar.get_date() for date in self.dates: - if date[1] == month - 1: + if date[1] != 0 and date[1] == month + 1: if date[2] > 0 and date[2] <= day: self.gui.calendar.mark_day(date[2]) self.gui.calendar.thaw()