[kupfer] browser: Set window to non-resizable



commit fce5d7005f600806a2c8b2a0a628d170dce8759c
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Wed Dec 23 22:42:52 2009 +0100

    browser: Set window to non-resizable
    
    Let the window automatically take "optimal" size at any point. This
    fixes most of https://bugs.launchpad.net/kupfer/+bug/494237
    
    Setting .set_resizable(True) will (on metacity) undo the utility
    window setting. At this point I must give up the utility window;
    making it automatically sized removes the need for manual resize and
    most of the last ways to reproduce the window blanking bug that I have
    found.

 kupfer/browser.py |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/kupfer/browser.py b/kupfer/browser.py
index 4df0755..b759980 100644
--- a/kupfer/browser.py
+++ b/kupfer/browser.py
@@ -1099,7 +1099,6 @@ class Interface (gobject.GObject):
 			self.entry.modify_text(gtk.STATE_NORMAL, theme_entry_bg)
 			self.entry.modify_base(gtk.STATE_NORMAL, theme_entry_bg)
 			self.current.set_state(gtk.STATE_SELECTED)
-		self._size_window_optimally()
 
 	def switch_to_source(self):
 		if self.current is not self.search:
@@ -1181,15 +1180,7 @@ class Interface (gobject.GObject):
 	def _show_third_pane(self, show):
 		self._ui_transition_timer.invalidate()
 		self.third.set_property("visible", show)
-		self._size_window_optimally()
-
-	def _size_window_optimally(self):
-		"""Try to resize the window to its normal size"""
-		if self.search.get_property("window"):
-			win = self.search.get_toplevel()
-			# size to minimum size
-			win.resize(100, 50)
-	
+
 	def _update_active(self):
 		self.action.set_active(self.action is self.current)
 		self.search.set_active(self.search is self.current)
@@ -1378,8 +1369,9 @@ class WindowController (pretty.OutputMixin):
 		self.window.set_position(gtk.WIN_POS_CENTER)
 		if not text_direction_is_ltr():
 			self.window.set_gravity(gtk.gdk.GRAVITY_NORTH_EAST)
-		# This will change from utility window
-		#self.window.set_resizable(False)
+		# Setting not resizable changes from utility window
+		# on metacity
+		self.window.set_resizable(False)
 
 	def _popup_menu(self, status_icon, button, activate_time, menu):
 		"""



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