Listen for map in Window instead of in Canvas (alsroot) #428
This commit is contained in:
parent
7c0efa11c0
commit
eaf7afcd91
@ -560,6 +560,8 @@ class Activity(Window, gtk.Container):
|
|||||||
# https://dev.laptop.org/ticket/3071
|
# https://dev.laptop.org/ticket/3071
|
||||||
datastore.write(self._jobject)
|
datastore.write(self._jobject)
|
||||||
|
|
||||||
|
self.connect('map', self.__map_cb)
|
||||||
|
|
||||||
def get_active(self):
|
def get_active(self):
|
||||||
return self._active
|
return self._active
|
||||||
|
|
||||||
@ -603,7 +605,6 @@ class Activity(Window, gtk.Container):
|
|||||||
One commonly used canvas is gtk.ScrolledWindow
|
One commonly used canvas is gtk.ScrolledWindow
|
||||||
"""
|
"""
|
||||||
Window.set_canvas(self, canvas)
|
Window.set_canvas(self, canvas)
|
||||||
canvas.connect('map', self.__canvas_map_cb)
|
|
||||||
|
|
||||||
def __session_quit_requested_cb(self, session):
|
def __session_quit_requested_cb(self, session):
|
||||||
self._quit_requested = True
|
self._quit_requested = True
|
||||||
@ -616,7 +617,7 @@ class Activity(Window, gtk.Container):
|
|||||||
def __session_quit_cb(self, client):
|
def __session_quit_cb(self, client):
|
||||||
self._complete_close()
|
self._complete_close()
|
||||||
|
|
||||||
def __canvas_map_cb(self, canvas):
|
def __map_cb(self, canvas):
|
||||||
if self._jobject and self._jobject.file_path:
|
if self._jobject and self._jobject.file_path:
|
||||||
self.read_file(self._jobject.file_path)
|
self.read_file(self._jobject.file_path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user