From f9cc65b4d55b844fbc7a84d1ac642d86bb0a908b Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 23 Jan 2007 05:17:12 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++-- src/ViewManager.py | 16 +++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index d21733147..2c34f3ead 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2007-01-22 Alex Roitman - * src/ViewManager.py (vb_clicked): Add the code that used to - enforce the current view button (commented out). + * 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. 2007-01-22 Don Allingham * src/DisplayModels/_BaseModel.py: avoid rebuild on delete diff --git a/src/ViewManager.py b/src/ViewManager.py index f8a06610f..248e37097 100644 --- a/src/ViewManager.py +++ b/src/ViewManager.py @@ -698,8 +698,10 @@ class ViewManager: self.views.append(view) 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: self.notebook.set_current_page(page_no) + self.vb_handlers_unblock() def create_pages(self): self.pages = [] @@ -783,13 +785,13 @@ class ViewManager: if Config.get(Config.VIEW): self.vb_handlers_block() self.notebook.set_current_page(index) -## # FIXME: This used to work, but now DnD switches views -## # and messes this up -## -## # If the click is on the same view we're in, -## # restore the button state to active -## if not button.get_active(): -## button.set_active(True) + # FIXME: This used to work, but now DnD switches views + # and messes this up + + # If the click is on the same view we're in, + # restore the button state to active + if not button.get_active(): + button.set_active(True) self.vb_handlers_unblock() def vb_handlers_block(self):