2006-10-03 Don Allingham <don@gramps-project.org>

* src/GrampsLogger/_ErrorReportAssistant.py: capitalize "GRAMPS"
	* src/ViewManager.py: display buttons on first open
	* src/Editors/_EditSourceRef.py: fix cancelling of text (bug #450)
	* src/DisplayTabs/_NoteTab.py: fix cancelling of text
	* src/DisplayTabs/_TextTab.py: fix cancelling of text 




svn: r7345
This commit is contained in:
Don Allingham 2006-10-03 16:59:51 +00:00
parent 3e01d90d89
commit ecf3f03e8b
6 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2006-10-03 Don Allingham <don@gramps-project.org>
* src/GrampsLogger/_ErrorReportAssistant.py: capitalize "GRAMPS"
* src/ViewManager.py: display buttons on first open
* src/Editors/_EditSourceRef.py: fix cancelling of text (bug #450)
* src/DisplayTabs/_NoteTab.py: fix cancelling of text
* src/DisplayTabs/_TextTab.py: fix cancelling of text
2006-10-02 Don Allingham <don@gramps-project.org> 2006-10-02 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_ReadXML.py: save description properly on read * src/GrampsDb/_ReadXML.py: save description properly on read
* src/RelLib/_Location.py: call parent class properly * src/RelLib/_Location.py: call parent class properly

View File

@ -51,6 +51,8 @@ class NoteTab(GrampsTab):
def __init__(self, dbstate, uistate, track, note_obj, title=_('Note')): def __init__(self, dbstate, uistate, track, note_obj, title=_('Note')):
self.note_obj = note_obj self.note_obj = note_obj
self.original = note_obj.serialize()
GrampsTab.__init__(self, dbstate, uistate, track, title) GrampsTab.__init__(self, dbstate, uistate, track, title)
self.show_all() self.show_all()
@ -141,3 +143,6 @@ class NoteTab(GrampsTab):
def rebuild(self): def rebuild(self):
self._set_label() self._set_label()
def cancel(self):
self.note_obj.unserialize(self.original)

View File

@ -51,6 +51,7 @@ class TextTab(GrampsTab):
def __init__(self, dbstate, uistate, track, obj, title=_('Text')): def __init__(self, dbstate, uistate, track, obj, title=_('Text')):
self.obj = obj self.obj = obj
self.original = obj.serialize()
GrampsTab.__init__(self, dbstate, uistate, track, title) GrampsTab.__init__(self, dbstate, uistate, track, title)
self.show_all() self.show_all()
@ -106,3 +107,6 @@ class TextTab(GrampsTab):
def rebuild(self): def rebuild(self):
self._set_label() self._set_label()
def cancel(self):
self.obj.unserialize(self.original)

View File

@ -72,6 +72,12 @@ class EditSourceRef(EditReference):
def _connect_signals(self): def _connect_signals(self):
self.define_ok_button(self.top.get_widget('ok'),self.ok_clicked) self.define_ok_button(self.top.get_widget('ok'),self.ok_clicked)
self.define_cancel_button(self.top.get_widget('cancel')) self.define_cancel_button(self.top.get_widget('cancel'))
def close(self, *obj):
self.note_tab.cancel()
self.text_tab.cancel()
self.comment_tab.cancel()
EditReference.close(self,obj)
def _setup_fields(self): def _setup_fields(self):
self.ref_privacy = PrivacyButton( self.ref_privacy = PrivacyButton(

View File

@ -383,7 +383,7 @@ class ErrorReportAssistant:
label = gtk.Label( label = gtk.Label(
"%s <i>%s</i>" % "%s <i>%s</i>" %
(_("Use one of the two methods below to send the "\ (_("Use one of the two methods below to send the "\
"bug report to the Gramps bug reporting mailing "\ "bug report to the GRAMPS bug reporting mailing "\
"list at "), "list at "),
"gramps-bugs@lists.sourceforge.net.")) "gramps-bugs@lists.sourceforge.net."))
label.set_alignment(0.01,0.5) label.set_alignment(0.01,0.5)

View File

@ -716,7 +716,7 @@ class ViewManager:
if grp in self.uimanager.get_action_groups(): if grp in self.uimanager.get_action_groups():
self.uimanager.remove_action_group(grp) self.uimanager.remove_action_group(grp)
if len(self.pages) > 0 and self.active_page != self.pages[num]: if len(self.pages) > 0:
self.active_page = self.pages[num] self.active_page = self.pages[num]
self.active_page.set_active() self.active_page.set_active()
Config.set(Config.LAST_VIEW,num) Config.set(Config.LAST_VIEW,num)