* part 2 of workaround around bug

http://bugzilla.gnome.org/show_bug.cgi?id=56070, make forward
		button accept click after it becomes sensitive.

2008-01-21 Benny Malengier <benny.malengier@gramps-project.org>


svn: r9903
This commit is contained in:
Benny Malengier 2008-01-21 12:21:57 +00:00
parent 8137680dcc
commit cf7e05dffa
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2008-01-21 Benny Malengier <benny.malengier@gramps-project.org>
* part 2 of workaround around bug
http://bugzilla.gnome.org/show_bug.cgi?id=56070, make forward
button accept click after it becomes sensitive.
2008-01-21 Benny Malengier <benny.malengier@gramps-project.org> 2008-01-21 Benny Malengier <benny.malengier@gramps-project.org>
* src/plugins/Check.py: bug (buglist) wrong method call * src/plugins/Check.py: bug (buglist) wrong method call

View File

@ -303,11 +303,12 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
self.check_fileselect(page) self.check_fileselect(page)
self.set_page_type(page, gtk.ASSISTANT_PAGE_CONTENT) self.set_page_type(page, gtk.ASSISTANT_PAGE_CONTENT)
def check_fileselect(self, filechooser, event=None): def check_fileselect(self, filechooser, event=None, show=True):
"""Given a filechooser, determine if it can be marked complete in """Given a filechooser, determine if it can be marked complete in
the Assistant. the Assistant.
Used as normal callback and event callback. Used as normal callback and event callback. For callback, we will have
show=True
""" """
filename = filechooser.get_filename() filename = filechooser.get_filename()
folder = filechooser.get_current_folder() folder = filechooser.get_current_folder()
@ -316,6 +317,11 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
and folder and Utils.find_folder(folder): and folder and Utils.find_folder(folder):
#this page of the assistant is complete #this page of the assistant is complete
self.set_page_complete(filechooser, True) self.set_page_complete(filechooser, True)
##workaround around bug http://bugzilla.gnome.org/show_bug.cgi?id=56070
if self.forward_button and show:
self.forward_button.hide()
self.forward_button.show()
## end
else : else :
self.set_page_complete(filechooser, False) self.set_page_complete(filechooser, False)
@ -418,7 +424,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
page.set_current_folder(folder) page.set_current_folder(folder)
self.folder_is_set = True self.folder_is_set = True
# see if page is complete with above # see if page is complete with above
self.check_fileselect(page) self.check_fileselect(page, show=True)
elif self.get_page_type(page) == gtk.ASSISTANT_PAGE_CONFIRM : elif self.get_page_type(page) == gtk.ASSISTANT_PAGE_CONFIRM :
# The confirm page with apply button # The confirm page with apply button
@ -427,7 +433,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
format = self.exportformats[ix][1].replace('_','') format = self.exportformats[ix][1].replace('_','')
#Allow for exotic error: file is still not correct #Allow for exotic error: file is still not correct
self.check_fileselect(self.chooser) self.check_fileselect(self.chooser, show=False)
if self.get_page_complete(self.chooser) : if self.get_page_complete(self.chooser) :
filename = unicode(self.chooser.get_filename(), filename = unicode(self.chooser.get_filename(),
sys.getfilesystemencoding()) sys.getfilesystemencoding())