Revert "Hide active palette if zoom level changes."
Pushed by mistake.
This reverts commit 70e6d08f8d
.
This commit is contained in:
parent
70e6d08f8d
commit
49b94a7f28
@ -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(),
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user