Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-04 10:49:21 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-04 10:49:21 (GMT)
commit49b94a7f28ec699ee8664f02b0824fbe9edc3323 (patch)
treecb484e0ee862e0a9ec5a3419fa12eb0780b16647
parent70e6d08f8d0fc385b8e7c539b09fced609b9c5a4 (diff)
Revert "Hide active palette if zoom level changes."
Pushed by mistake. This reverts commit 70e6d08f8d0fc385b8e7c539b09fced609b9c5a4.
-rw-r--r--shell/shellservice.py11
-rw-r--r--sugar/graphics/palette.py15
2 files changed, 1 insertions, 25 deletions
diff --git a/shell/shellservice.py b/shell/shellservice.py
index dd5e224..b4c96ff 100644
--- a/shell/shellservice.py
+++ b/shell/shellservice.py
@@ -56,13 +56,11 @@ class ShellService(dbus.service.Object):
self._home_model.connect('active-activity-changed',
self._cur_activity_changed_cb)
- self._shell_model.connect('notify::zoom-level',
- self._shell_model_notify_zoom_level_cb)
-
bus = dbus.SessionBus()
bus_name = dbus.service.BusName(_DBUS_SERVICE, bus=bus)
dbus.service.Object.__init__(self, bus_name, _DBUS_PATH)
+
@dbus.service.method(_DBUS_SHELL_IFACE,
in_signature="ss", out_signature="")
def NotifyLaunch(self, bundle_id, activity_id):
@@ -148,10 +146,6 @@ class ShellService(dbus.service.Object):
def CurrentActivityChanged(self, activity_id):
pass
- @dbus.service.signal(_DBUS_SHELL_IFACE, signature="i")
- def ZoomLevelChanged(self, new_level):
- pass
-
def _cur_activity_changed_cb(self, owner, new_activity):
new_id = ""
if new_activity:
@@ -159,9 +153,6 @@ class ShellService(dbus.service.Object):
if new_id:
self.CurrentActivityChanged(new_id)
- def _shell_model_notify_zoom_level_cb(self, shell_model, pspec):
- self.ZoomLevelChanged(shell_model.props.zoom_level)
-
def _bundle_to_dict(self, bundle):
return {'name': bundle.get_name(),
'icon': bundle.get_icon(),
diff --git a/sugar/graphics/palette.py b/sugar/graphics/palette.py
index 9c23c2f..ef1a61c 100644
--- a/sugar/graphics/palette.py
+++ b/sugar/graphics/palette.py
@@ -21,7 +21,6 @@ import gtk
import gobject
import time
import hippo
-import dbus
from sugar.graphics import animator
from sugar.graphics import units
@@ -88,15 +87,6 @@ class Palette(gobject.GObject):
self._menu.connect('button-press-event',
self._button_press_event_cb)
- gobject.idle_add(self._listen_for_zoom_level_change)
-
- def _listen_for_zoom_level_change(self):
- bus = dbus.Bus()
- proxy = bus.get_object('org.laptop.Shell', '/org/laptop/Shell')
- shell_service = dbus.Interface(proxy, 'org.laptop.Shell')
- shell_service.connect_to_signal('ZoomLevelChanged',
- self._zoom_level_changed_cb)
-
def set_primary_text(self, label, accel_path=None):
self._primary.set_label(label, accel_path)
@@ -244,9 +234,6 @@ class Palette(gobject.GObject):
def _button_press_event_cb(self, widget, event):
pass
- def _zoom_level_changed_cb(self, zoom_level):
- self._hide()
-
class _PrimaryMenuItem(gtk.MenuItem):
def __init__(self, label, accel_path):
gtk.MenuItem.__init__(self)
@@ -391,8 +378,6 @@ class CanvasInvoker(Invoker):
context = self._item.get_context()
if context:
x, y = context.translate_to_screen(self._item)
- else:
- x, y = 0, 0
width, height = self._item.get_allocation()