* src/ViewManager.py (vb_clicked): Put back the code that used to

enforce the current view button;
	(switch_page_on_dnd): block and unblock button clicking during DnD.


svn: r7962
This commit is contained in:
Alex Roitman 2007-01-23 05:17:12 +00:00
parent f5b1a61668
commit 4cfb4ab42b
2 changed files with 12 additions and 9 deletions

View File

@ -1,6 +1,7 @@
2007-01-22 Alex Roitman <shura@gramps-project.org> 2007-01-22 Alex Roitman <shura@gramps-project.org>
* src/ViewManager.py (vb_clicked): Add the code that used to * src/ViewManager.py (vb_clicked): Put back the code that used to
enforce the current view button (commented out). enforce the current view button;
(switch_page_on_dnd): block and unblock button clicking during DnD.
2007-01-22 Don Allingham <don@gramps-project.org> 2007-01-22 Don Allingham <don@gramps-project.org>
* src/DisplayModels/_BaseModel.py: avoid rebuild on delete * src/DisplayModels/_BaseModel.py: avoid rebuild on delete

View File

@ -698,8 +698,10 @@ class ViewManager:
self.views.append(view) self.views.append(view)
def switch_page_on_dnd(self, widget, context, x, y, time, page_no): def switch_page_on_dnd(self, widget, context, x, y, time, page_no):
self.vb_handlers_block()
if self.notebook.get_current_page() != page_no: if self.notebook.get_current_page() != page_no:
self.notebook.set_current_page(page_no) self.notebook.set_current_page(page_no)
self.vb_handlers_unblock()
def create_pages(self): def create_pages(self):
self.pages = [] self.pages = []
@ -783,13 +785,13 @@ class ViewManager:
if Config.get(Config.VIEW): if Config.get(Config.VIEW):
self.vb_handlers_block() self.vb_handlers_block()
self.notebook.set_current_page(index) self.notebook.set_current_page(index)
## # FIXME: This used to work, but now DnD switches views # FIXME: This used to work, but now DnD switches views
## # and messes this up # and messes this up
##
## # If the click is on the same view we're in, # If the click is on the same view we're in,
## # restore the button state to active # restore the button state to active
## if not button.get_active(): if not button.get_active():
## button.set_active(True) button.set_active(True)
self.vb_handlers_unblock() self.vb_handlers_unblock()
def vb_handlers_block(self): def vb_handlers_block(self):