Merge with Marco
This commit is contained in:
parent
2aaefdd52b
commit
f234ebfff0
8
README
8
README
@ -35,3 +35,11 @@ For example:
|
|||||||
sugar/sugar --test my_nick_name1
|
sugar/sugar --test my_nick_name1
|
||||||
sugar/sugar --test my_nick_name2
|
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
|
||||||
|
@ -22,7 +22,7 @@ class Chat(gtk.Window):
|
|||||||
SERVICE_PORT = 6100
|
SERVICE_PORT = 6100
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
gtk.Window.__init__(self)
|
gtk.Window.__init__(self, gtk.WINDOW_POPUP)
|
||||||
|
|
||||||
self._stream_writer = None
|
self._stream_writer = None
|
||||||
|
|
||||||
|
@ -11,10 +11,7 @@ class PresenceWindow(gtk.Window):
|
|||||||
_MODEL_COL_BUDDY = 2
|
_MODEL_COL_BUDDY = 2
|
||||||
|
|
||||||
def __init__(self, activity_container):
|
def __init__(self, activity_container):
|
||||||
gtk.Window.__init__(self)
|
gtk.Window.__init__(self, gtk.WINDOW_POPUP)
|
||||||
|
|
||||||
self.set_decorated(False)
|
|
||||||
self.set_skip_taskbar_hint(True)
|
|
||||||
|
|
||||||
self._activity_container = activity_container
|
self._activity_container = activity_container
|
||||||
|
|
||||||
|
@ -215,7 +215,6 @@ class ActivityHost(dbus.service.Object):
|
|||||||
class ActivityContainer(dbus.service.Object):
|
class ActivityContainer(dbus.service.Object):
|
||||||
|
|
||||||
def __init__(self, service, bus):
|
def __init__(self, service, bus):
|
||||||
|
|
||||||
self.activities = []
|
self.activities = []
|
||||||
|
|
||||||
self.bus = bus
|
self.bus = bus
|
||||||
@ -225,7 +224,11 @@ class ActivityContainer(dbus.service.Object):
|
|||||||
bus.add_signal_receiver(self.name_owner_changed, dbus_interface = "org.freedesktop.DBus", signal_name = "NameOwnerChanged")
|
bus.add_signal_receiver(self.name_owner_changed, dbus_interface = "org.freedesktop.DBus", signal_name = "NameOwnerChanged")
|
||||||
|
|
||||||
self.window = gtk.Window()
|
self.window = gtk.Window()
|
||||||
|
self.window.connect("key-press-event", self.__key_press_event_cb)
|
||||||
self.window.set_title("OLPC Sugar")
|
self.window.set_title("OLPC Sugar")
|
||||||
|
|
||||||
|
self._fullscreen = False
|
||||||
|
|
||||||
self.notebook = gtk.Notebook()
|
self.notebook = gtk.Notebook()
|
||||||
|
|
||||||
tab_label = gtk.Label("Everyone")
|
tab_label = gtk.Label("Everyone")
|
||||||
@ -308,6 +311,15 @@ class ActivityContainer(dbus.service.Object):
|
|||||||
for owner, activity in self.activities:
|
for owner, activity in self.activities:
|
||||||
print " %d: owner=%s activity_object_name=%s" % (i, owner, activity.dbus_object_name)
|
print " %d: owner=%s activity_object_name=%s" % (i, owner, activity.dbus_object_name)
|
||||||
i += 1
|
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):
|
class ConsoleLogger(dbus.service.Object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -383,6 +395,7 @@ def main():
|
|||||||
wm.manage()
|
wm.manage()
|
||||||
|
|
||||||
presence_window = PresenceWindow(activity_container)
|
presence_window = PresenceWindow(activity_container)
|
||||||
|
presence_window.set_transient_for(activity_container.window)
|
||||||
|
|
||||||
wm = WindowManager(presence_window)
|
wm = WindowManager(presence_window)
|
||||||
|
|
||||||
@ -392,6 +405,7 @@ def main():
|
|||||||
wm.manage()
|
wm.manage()
|
||||||
|
|
||||||
group_chat = GroupChat()
|
group_chat = GroupChat()
|
||||||
|
group_chat.set_transient_for(activity_container.window)
|
||||||
group_chat.set_decorated(False)
|
group_chat.set_decorated(False)
|
||||||
group_chat.set_skip_taskbar_hint(True)
|
group_chat.set_skip_taskbar_hint(True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user