def __init__(self,sid,parent = None): GObject.__init__(self) self.service_id = sid self.commands = {} self.parent = parent if self.parent!=None: self.server = self.parent.parent
def __init__(self): '''Initializes and adds the indicator''' GObject.__init__(self) config = get_config() self.inhibited = False self.appname = 'sleep-inhibit' self.icon_on = util.app_icon('indicator_no_sleep', False, config.icon_theme) self.icon_off = util.app_icon('indicator_sleep', False, config.icon_theme) self.inhibit_proc = None SleepInhibitGUI.instance = self self.preferences_dialog = None self._add_indicator() win = Gtk.Window() win.set_default_icon(util.app_icon('window_icon'))
def __init__(self, headMode=8, serverIP="127.0.0.1", serverPort=4829, sleepInterval=0.1, parent=None): NetStream.__init__(self, headMode) GObject.__init__(self) print("client init: %s %s" % (serverIP, serverPort)) self.InitData(serverIP, serverPort, sleepInterval, parent) self.setup() # define a signal and its handler, then each time this # siganl isa emitted, handler function will be called # self.parent.parent.connect(self, QtCore.SIGNAL('serverCrashedAlert()', self.parent.parent.serverCrashedAlert)) __gsignals__ = {"serverCrashedAlert": (GObject.SIGNAL_RUN_FIRST, None, (int,))} def do_serverCrashedAlert(self, arg): print("class method for `serverCrashedAlert` called with argument", arg) print("server is crashed")
def __init__(self, sid, parent = None): GObject.__init__(self, None) self.service_id = sid self.commands = {} self.parent = parent
def __init__(self): GObject.__init__(self) self.InitData()
def __init__(self): """""" GObject.__init__(self)
def __init__(self, *args, **kwargs): self.dict = {} GObject.__init__(self, *args, **kwargs)