Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/shell/shell.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-06-16 20:29:51 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-06-16 20:29:51 (GMT)
commit0363ed5457e96ef8527a950f2eed95a60d24e13c (patch)
tree6c257b5e0a56f1eef651cbcc6a0574214553d13f /sugar/shell/shell.py
parent99d26223e50a303aa0a44e38a5e758161ac94cbb (diff)
More work on chats
Diffstat (limited to 'sugar/shell/shell.py')
-rwxr-xr-xsugar/shell/shell.py33
1 files changed, 22 insertions, 11 deletions
diff --git a/sugar/shell/shell.py b/sugar/shell/shell.py
index e846cd9..cc484bc 100755
--- a/sugar/shell/shell.py
+++ b/sugar/shell/shell.py
@@ -76,18 +76,12 @@ class ActivityHost(dbus.service.Object):
self._create_chat()
- def _create_chat():
- group_chat = GroupChat()
- group_chat.set_transient_for(self.activity_container.window)
- group_chat.set_decorated(False)
- group_chat.set_skip_taskbar_hint(True)
+ def _create_chat(self):
+ self._group_chat = GroupChat()
+ self._group_chat.ref()
- wm = WindowManager(group_chat)
-
- wm.set_width(0.5, WindowManager.SCREEN_RELATIVE)
- wm.set_height(0.5, WindowManager.SCREEN_RELATIVE)
- wm.set_position(WindowManager.TOP)
- wm.manage()
+ def get_group_chat(self):
+ return self._group_chat
def __close_button_clicked_reply_cb(self):
pass
@@ -274,6 +268,18 @@ class ActivityContainer(dbus.service.Object):
wm.set_height(1.0, WindowManager.SCREEN_RELATIVE)
wm.set_position(WindowManager.LEFT)
wm.manage()
+
+ self._chat_window = gtk.Window(gtk.WINDOW_POPUP)
+ self._chat_window.set_transient_for(self.window)
+ self._chat_window.set_decorated(False)
+ self._chat_window.set_skip_taskbar_hint(True)
+
+ wm = WindowManager(self._chat_window)
+
+ wm.set_width(0.5, WindowManager.SCREEN_RELATIVE)
+ wm.set_height(0.5, WindowManager.SCREEN_RELATIVE)
+ wm.set_position(WindowManager.TOP)
+ wm.manage()
def show(self):
self.window.show()
@@ -287,6 +293,11 @@ class ActivityContainer(dbus.service.Object):
def set_current_activity(self, activity):
self.current_activity = activity
self._presence_window.set_activity(activity)
+ self._chat_window.remove(self._chat_window.get_child())
+
+ host_chat = activity.get_chat()
+ self._chat_window.add()
+ host_chat.show()
def notebook_tab_changed(self, notebook, page, page_number):
#print "in notebook_tab_changed"