From 977c9d8013b1c6556acc24db073d24f319a80d80 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Tue, 19 Feb 2008 22:16:13 +0000 Subject: [PATCH] * src/ViewManager.py: #1559, CTRL+N/P also if no sidebar 2008-02-19 Benny Malengier svn: r10072 --- ChangeLog | 3 +++ src/ViewManager.py | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b9abab09..4d3c570db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2008-02-19 Benny Malengier + * src/ViewManager.py: #1559, CTRL+N/P also if no sidebar + 2008-02-19 Benny Malengier * src/DbManager.py: #1725, ENTER should behave like double click diff --git a/src/ViewManager.py b/src/ViewManager.py index cf2c19394..2d955f021 100644 --- a/src/ViewManager.py +++ b/src/ViewManager.py @@ -511,7 +511,11 @@ class ViewManager: new_page = 0 else: new_page = current_page + 1 - self.buttons[new_page].set_active(True) + if self.show_sidebar: + #cause a click signal + self.buttons[new_page].set_active(True) + else: + self.notebook.set_current_page(new_page) def __prev_view(self, action): """ @@ -524,7 +528,11 @@ class ViewManager: new_page = len(self.pages)-1 else: new_page = current_page - 1 - self.buttons[new_page].set_active(True) + if self.show_sidebar: + #cause a click signal + self.buttons[new_page].set_active(True) + else: + self.notebook.set_current_page(new_page) def init_interface(self): """ @@ -748,10 +756,12 @@ class ViewManager: self.ebox.show() self.notebook.set_show_tabs(False) Config.set(Config.VIEW, True) + self.show_sidebar = True else: self.ebox.hide() self.notebook.set_show_tabs(True) Config.set(Config.VIEW, False) + self.show_sidebar = False Config.sync() def toolbar_toggle(self, obj):