Reimplement the wm module in C
The wm module in sugar-toolkit-gtk3 has been reimplemented in C and made available through introspection. The same was hard to achieve directly using the Gdk API. We can drop wm.py and the wrapper around gdk_property_change. Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com> Acked-by: Simon Schampijer <simon@laptop.org>
This commit is contained in:
committed by
Simon Schampijer
parent
a14574c666
commit
4cc6967c8d
@@ -82,8 +82,7 @@ from sugar3.graphics.alert import Alert
|
||||
from sugar3.graphics.icon import Icon
|
||||
from sugar3.datastore import datastore
|
||||
from sugar3.session import XSMPClient
|
||||
from sugar3 import wm
|
||||
|
||||
from gi.repository import SugarExt
|
||||
|
||||
_ = lambda msg: gettext.dgettext('sugar-toolkit', msg)
|
||||
|
||||
@@ -940,8 +939,9 @@ class Activity(Window, Gtk.Container):
|
||||
self._complete_close()
|
||||
|
||||
def __realize_cb(self, window):
|
||||
wm.set_bundle_id(window.get_window(), self.get_bundle_id())
|
||||
wm.set_activity_id(window.get_window(), str(self._activity_id))
|
||||
xid = window.get_window().get_xid()
|
||||
SugarExt.wm_set_bundle_id(xid, self.get_bundle_id())
|
||||
SugarExt.wm_set_activity_id(xid, str(self._activity_id))
|
||||
|
||||
def __delete_event_cb(self, widget, event):
|
||||
self.close()
|
||||
|
||||
Reference in New Issue
Block a user