def __init__( self, window, notebook_parent, workspaces_enabled, terminal_spawned_cb, page_deleted_cb, ): GObject.Object.__init__(self) if not GObject.signal_lookup("notebook-created", self): GObject.signal_new( "notebook-created", self, GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (GObject.TYPE_PYOBJECT, GObject.TYPE_INT), ) self.current_notebook = 0 self.notebooks = {} self.window = window self.notebook_parent = notebook_parent self.terminal_spawned_cb = terminal_spawned_cb self.page_deleted_cb = page_deleted_cb if workspaces_enabled and gdk_is_x11_display(Gdk.Display.get_default()): # NOTE: Wnck didn't support non-X11 display backend, so we need to check if the display # is X11 or not, if not, it will not able to enable workspace-specific-tab-sets # # TODO: Is there anyway to support this in non-X11 display backend? self.screen = Wnck.Screen.get_default() self.screen.connect("active-workspace-changed", self.__workspace_changed_cb)
def __init__( self, window, notebook_parent, workspaces_enabled, terminal_spawned_cb, page_deleted_cb ): GObject.Object.__init__(self) if not GObject.signal_lookup('notebook-created', self): GObject.signal_new( 'notebook-created', self, GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (GObject.TYPE_PYOBJECT, GObject.TYPE_INT) ) self.current_notebook = 0 self.notebooks = {} self.window = window self.notebook_parent = notebook_parent self.terminal_spawned_cb = terminal_spawned_cb self.page_deleted_cb = page_deleted_cb if workspaces_enabled and gdk_is_x11_display(Gdk.Display.get_default()): # NOTE: Wnck didn't support non-X11 display backend, so we need to check if the display # is X11 or not, if not, it will not able to enable workspace-specific-tab-sets # # TODO: Is there anyway to support this in non-X11 display backend? self.screen = Wnck.Screen.get_default() self.screen.connect("active-workspace-changed", self.__workspace_changed_cb)