improvements to Assistant and ErrorReportAssistant.

svn: r5695
This commit is contained in:
Richard Taylor 2006-01-08 15:19:46 +00:00
parent b9b276742a
commit b39afbb8f9
3 changed files with 60 additions and 28 deletions

View File

@ -1,3 +1,7 @@
2006-01-08 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
* src/Assistant.py: changed button handling to improve usability
* src/GrampsLogger/_ErrorReportAssistant.py: rewording and some frames.
2006-01-07 Don Allingham <don@gramps-project.org>
* src/FamilyList.py: new family list view
* src/DisplayModels.py: model for family list

View File

@ -93,10 +93,14 @@ class Assistant(gtk.Object):
self.back.connect('clicked',self.back_clicked)
self.next = gtk.Button(stock=gtk.STOCK_GO_FORWARD)
self.next.connect('clicked',self.next_clicked)
self.ok = gtk.Button(stock=gtk.STOCK_OK)
self.ok.connect('clicked',self.next_clicked)
self.ok.set_sensitive(False)
hbox.add(self.cancel)
hbox.add(self.back)
hbox.add(self.next)
hbox.add(self.ok)
vbox.pack_start(titlebox,False)
vbox.pack_start(self.notebook,True)
@ -116,19 +120,40 @@ class Assistant(gtk.Object):
def update_title(self):
self.title.set_label(self.title_text[self.current_page])
self.title.set_use_markup(True)
def set_buttons(self):
print "current_page = ", self.current_page
if self.current_page == self.max_page-1:
self.next.show()
self.back.show()
self.cancel.show()
self.ok.set_sensitive(True)
self.next.set_sensitive(False)
elif self.current_page == self.max_page:
self.next.hide()
self.back.hide()
self.cancel.hide()
elif self.current_page == 0:
self.next.show()
self.back.show()
self.cancel.show()
self.back.set_sensitive(False)
self.next.set_sensitive(True)
self.ok.set_sensitive(False)
else:
self.next.show()
self.back.show()
self.back.set_sensitive(True)
self.next.set_sensitive(True)
self.ok.set_sensitive(False)
self.cancel.show()
def back_clicked(self,obj):
self.emit('before-page-back',self.notebook.get_current_page())
if self.current_page == 1:
self.back.show()
self.back.set_sensitive(False)
self.cancel.show()
self.current_page -= 1
self.notebook.set_current_page(self.current_page)
self.update_title()
self.next.set_label(gtk.STOCK_GO_FORWARD)
self.next.set_use_stock(True)
self.cancel.show()
self.set_buttons()
self.emit('after-page-back',self.notebook.get_current_page())
self.emit('page-changed',self.notebook.get_current_page())
@ -143,17 +168,7 @@ class Assistant(gtk.Object):
self.current_page += 1
self.notebook.set_current_page(self.current_page)
self.update_title()
if self.current_page == self.max_page:
self.next.set_label(gtk.STOCK_OK)
self.next.set_use_stock(True)
self.back.hide()
self.cancel.hide()
else:
self.next.set_label(gtk.STOCK_GO_FORWARD)
self.next.set_use_stock(True)
self.back.show()
self.back.set_sensitive(True)
self.cancel.show()
self.set_buttons()
self.emit('after-page-next',self.notebook.get_current_page())
self.emit('page-changed',self.notebook.get_current_page())

View File

@ -21,13 +21,13 @@ class ErrorReportAssistant:
self.w.set_intro(_("This is the Bug Reporting Assistant. It will "\
"help you to make a bug report to the Gramps "\
"developers that will be as detailed as possible.\n"\
"developers that will be as detailed as possible.\n\n"\
"The assistant will ask you a few questions and will "\
"gather some information about the error that has "\
"occured and the operating environment. "\
"At then end of the assistent you will be asked to "\
"send an email to the Gramps bug reporting mailing list "\
"and the bug report will be placed on the clip board so "\
"At the end of the assistent you will be asked to "\
"send an email to the Gramps bug reporting mailing list. "\
"The assistant will place the bug report on the clip board so "\
"that you can paste it into your email programme and review "\
"exactly what information is being sent."))
@ -83,9 +83,9 @@ class ErrorReportAssistant:
box = gtk.VBox()
label = gtk.Label(_("This is the detail Gramps error information, don't worry if you "\
label = gtk.Label(_("This is the detailed Gramps error information, don't worry if you "\
"do not understand it. If you can see that there is any personal "\
"informatin included in the error details please remove it, you "\
"information included in the error please remove it. You "\
"will have the opportunity to add further detail about the error "\
"in the following pages of the assistant."))
@ -95,6 +95,7 @@ class ErrorReportAssistant:
sw = gtk.ScrolledWindow()
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
textview = gtk.TextView()
self._error_details_text_buffer = textview.get_buffer()
@ -105,8 +106,11 @@ class ErrorReportAssistant:
sw.add(textview)
sw.show()
textview.show()
frm = gtk.Frame()
frm.add(sw)
box.pack_start(sw)
box.pack_start(frm)
box.show_all()
return box
@ -135,7 +139,10 @@ class ErrorReportAssistant:
sw.show()
textview.show()
box.pack_start(sw)
frm = gtk.Frame()
frm.add(sw)
box.pack_start(frm)
box.show_all()
return box
@ -161,7 +168,10 @@ class ErrorReportAssistant:
sw.show()
textview.show()
box.pack_start(sw)
frm = gtk.Frame()
frm.add(sw)
box.pack_start(frm)
box.show_all()
return box
@ -194,7 +204,10 @@ class ErrorReportAssistant:
sw.show()
textview.show()
box.pack_start(sw)
frm = gtk.Frame()
frm.add(sw)
box.pack_start(frm)
box.show_all()
return box