Calendar month fix; reattach expand bug gadget title save bug

svn: r9629
This commit is contained in:
Doug Blank 2007-12-29 17:56:23 +00:00
parent 2c2266446e
commit e8ed1b1b0e
2 changed files with 6 additions and 3 deletions

View File

@ -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", [])

View File

@ -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()