[kupfer] browser: Don't show and unshow the third pane



commit 2fddd2930e08ce24692588afc4921ce3366065b8
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Dec 10 00:01:53 2009 +0100

    browser: Don't show and unshow the third pane
    
    If we use WIN_POS_CENTER to only influence the *very first* placement
    of the window, then reset it to WIN_POS_NONE, then the window won't be
    recentering like before. Thus we don't need to do the hide/reshow
    dance with the third ("indirect object") pane for Kupfer (when it's
    visible).
    
    This means Kupfer's window finally behaves like we always wanted --
    center on first appearance, and simply stay put (wherever the user
    moved it) after that.
    
    This may potentially fix Launchpad bug
    https://bugs.launchpad.net/kupfer/+bug/494237
    
    With luck it may even fix another bug,
    https://bugs.launchpad.net/kupfer/+bug/417278

 kupfer/browser.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/browser.py b/kupfer/browser.py
index b484994..4c40d52 100644
--- a/kupfer/browser.py
+++ b/kupfer/browser.py
@@ -1118,11 +1118,9 @@ class Interface (gobject.GObject):
 			self.switch_to_source()
 		# Check that items are still valid when "coming back"
 		self.data_controller.validate()
-		self._show_third_pane(self._pane_three_is_visible)
 
 	def put_away(self):
 		"""Called when the interface is hidden"""
-		self._show_third_pane(False)
 		self._relax_search_terms()
 		self._reset_to_toplevel = True
 
@@ -1394,6 +1392,8 @@ class WindowController (pretty.OutputMixin):
 		self.window.present_with_time(time)
 		self.window.window.focus(timestamp=evttime)
 		self.interface.focus()
+		# this is really only needed first time after window is shown
+		self.window.set_position(gtk.WIN_POS_NONE)
 	
 	def put_away(self):
 		self.interface.put_away()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]