r6962 - in bigboard/trunk: . bigboard bigboard/stocks/people
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r6962 - in bigboard/trunk: . bigboard bigboard/stocks/people
- Date: Tue, 4 Dec 2007 17:09:27 -0600 (CST)
Author: hp
Date: 2007-12-04 17:09:26 -0600 (Tue, 04 Dec 2007)
New Revision: 6962
Modified:
bigboard/trunk/bigboard/stock.py
bigboard/trunk/bigboard/stocks/people/PeopleStock.py
bigboard/trunk/main.py
Log:
add a hook so stocks know if the sidebar is showing, and use it to avoid stranded person profile slideouts
Modified: bigboard/trunk/bigboard/stock.py
===================================================================
--- bigboard/trunk/bigboard/stock.py 2007-12-04 22:48:59 UTC (rev 6961)
+++ bigboard/trunk/bigboard/stock.py 2007-12-04 23:09:26 UTC (rev 6962)
@@ -67,6 +67,10 @@
def _on_delisted(self):
"""The most-derived concrete stock object can override this instead of on_delisted, then not chain up"""
pass
+
+ def on_popped_out_changed(self, popped_out):
+ """Called when the sidebar is shown or hidden"""
+ pass
def get_id(self):
return self._id
Modified: bigboard/trunk/bigboard/stocks/people/PeopleStock.py
===================================================================
--- bigboard/trunk/bigboard/stocks/people/PeopleStock.py 2007-12-04 22:48:59 UTC (rev 6961)
+++ bigboard/trunk/bigboard/stocks/people/PeopleStock.py 2007-12-04 23:09:26 UTC (rev 6962)
@@ -165,6 +165,9 @@
else:
self.__people_browser.present()
+ def on_popped_out_changed(self, popped_out):
+ if not popped_out:
+ self.__close_slideout()
class PeopleSearchResult(search.SearchResult):
def __init__(self, provider, person):
Modified: bigboard/trunk/main.py
===================================================================
--- bigboard/trunk/main.py 2007-12-04 22:48:59 UTC (rev 6961)
+++ bigboard/trunk/main.py 2007-12-04 23:09:26 UTC (rev 6962)
@@ -319,6 +319,9 @@
def on_delisted(self):
_logger.debug("on_delisted exchange %s" % (str(self)))
self.__unrender_pymodule()
+
+ def on_popped_out_changed(self, popped_out):
+ self.__pymodule.on_popped_out_changed(popped_out)
def __toggle_expanded(self):
self.__expanded = not self.__expanded
@@ -566,6 +569,10 @@
## the sidebar is currently popped out. If visible=True, the sidebar
## is always popped out, i.e. self.__popped_out should be True always.
+ def __notify_stocks_of_popped_out(self):
+ for e in self._exchanges.values():
+ e.on_popped_out_changed(self.__popped_out)
+
## Shows the sidebar
def __enter_popped_out_state(self):
if not self.__popped_out:
@@ -576,6 +583,9 @@
#self._dw.deiconify()
self.__queue_strut()
self.__popped_out = True
+
+ self.__notify_stocks_of_popped_out()
+
self.EmitPoppedOutChanged()
## Hides the sidebar, possibly after a delay, only if visible mode is False
@@ -603,6 +613,9 @@
#self._dw.iconify()
self._dw.hide()
self.__queue_strut()
+
+ self.__notify_stocks_of_popped_out()
+
self.EmitPoppedOutChanged()
## syncs our current state to a change in the gconf setting for visible mode
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]