deskbar-applet r2298 - in trunk: . deskbar/ui
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2298 - in trunk: . deskbar/ui
- Date: Wed, 6 Aug 2008 17:10:40 +0000 (UTC)
Author: sebp
Date: Wed Aug 6 17:10:40 2008
New Revision: 2298
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2298&view=rev
Log:
Set entry width to 10 when the value is smaller than 10
Modified:
trunk/ChangeLog
trunk/deskbar/ui/CuemiacAlignedView.py
Modified: trunk/deskbar/ui/CuemiacAlignedView.py
==============================================================================
--- trunk/deskbar/ui/CuemiacAlignedView.py (original)
+++ trunk/deskbar/ui/CuemiacAlignedView.py Wed Aug 6 17:10:40 2008
@@ -22,7 +22,8 @@
self._controller.register_view(self)
self.applet = applet
- GconfStore.get_instance().connect("entry-width-changed", self._on_entry_width_changed)
+ GconfStore.get_instance().connect("entry-width-changed",
+ lambda s, w: self._change_entry_width(w))
self.set_type_hint (gtk.gdk.WINDOW_TYPE_HINT_MENU)
self.applet.set_applet_flags(gnomeapplet.EXPAND_MINOR)
@@ -43,7 +44,8 @@
self.set_role("deskbar-search-window")
- self.get_entry().set_width_chars(self._model.get_entry_width())
+ entry_width = self._model.get_entry_width()
+ self._change_entry_width(entry_width)
# VBox
self.add(self.vbox_main)
@@ -138,7 +140,9 @@
else:
self.vbox_main.reorder_child(self.results_box, 0)
self.vbox_main.reorder_child(self.header, 2)
-
- def _on_entry_width_changed(self, store, width):
- self.get_entry().set_width_chars(width)
+
+ def _change_entry_width(self, entry_width):
+ if entry_width < 10:
+ entry_width = 10
+ self.get_entry().set_width_chars(entry_width)
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]