diff --git a/README b/README index 937f29c5..0407c8fe 100644 --- a/README +++ b/README @@ -35,11 +35,3 @@ For example: sugar/sugar --test my_nick_name1 sugar/sugar --test my_nick_name2 ... - - -Key bindings -============ - -ctrl+Up Toggle chat window visibility -ctrl+Left Toggle presence window visibility -F11 Toggle activities window fullscreen diff --git a/sugar/chat/Chat.py b/sugar/chat/Chat.py index c06bbc17..c0494354 100644 --- a/sugar/chat/Chat.py +++ b/sugar/chat/Chat.py @@ -22,7 +22,7 @@ class Chat(gtk.Window): SERVICE_PORT = 6100 def __init__(self): - gtk.Window.__init__(self, gtk.WINDOW_POPUP) + gtk.Window.__init__(self) self._stream_writer = None diff --git a/sugar/presence/Service.py b/sugar/presence/Service.py index 4e1d72f6..9219b801 100644 --- a/sugar/presence/Service.py +++ b/sugar/presence/Service.py @@ -42,6 +42,10 @@ def _txt_to_dict(txt): return prop_dict def compose_service_type(stype, activity_uid): + if not activity_uid: + return stype + if not stype or (type(stype) != type("") and type(stype) != type(u"")): + raise ValueError("stype must be a valid string.") return "_%s_%s" % (activity_uid, stype) def _decompose_service_type(stype): diff --git a/sugar/shell/PresenceWindow.py b/sugar/shell/PresenceWindow.py index 35f06a3e..75236657 100644 --- a/sugar/shell/PresenceWindow.py +++ b/sugar/shell/PresenceWindow.py @@ -11,7 +11,10 @@ class PresenceWindow(gtk.Window): _MODEL_COL_BUDDY = 2 def __init__(self, activity_container): - gtk.Window.__init__(self, gtk.WINDOW_POPUP) + gtk.Window.__init__(self) + + self.set_decorated(False) + self.set_skip_taskbar_hint(True) self._activity_container = activity_container diff --git a/sugar/shell/shell.py b/sugar/shell/shell.py index cb811540..f7eaa18a 100755 --- a/sugar/shell/shell.py +++ b/sugar/shell/shell.py @@ -215,6 +215,7 @@ class ActivityHost(dbus.service.Object): class ActivityContainer(dbus.service.Object): def __init__(self, service, bus): + self.activities = [] self.bus = bus @@ -224,11 +225,7 @@ class ActivityContainer(dbus.service.Object): bus.add_signal_receiver(self.name_owner_changed, dbus_interface = "org.freedesktop.DBus", signal_name = "NameOwnerChanged") self.window = gtk.Window() - self.window.connect("key-press-event", self.__key_press_event_cb) self.window.set_title("OLPC Sugar") - - self._fullscreen = False - self.notebook = gtk.Notebook() tab_label = gtk.Label("Everyone") @@ -311,15 +308,6 @@ class ActivityContainer(dbus.service.Object): for owner, activity in self.activities: print " %d: owner=%s activity_object_name=%s" % (i, owner, activity.dbus_object_name) i += 1 - - def __key_press_event_cb(self, window, event): - if event.keyval == gtk.keysyms.F11: - if self._fullscreen: - window.unfullscreen() - self._fullscreen = False - else: - window.fullscreen() - self._fullscreen = True class ConsoleLogger(dbus.service.Object): def __init__(self): @@ -395,7 +383,6 @@ def main(): wm.manage() presence_window = PresenceWindow(activity_container) - presence_window.set_transient_for(activity_container.window) wm = WindowManager(presence_window) @@ -405,7 +392,6 @@ def main(): wm.manage() group_chat = GroupChat() - group_chat.set_transient_for(activity_container.window) group_chat.set_decorated(False) group_chat.set_skip_taskbar_hint(True)