Example #1
0
    def __init__(self, icon, parent=None):
        QtGui.QSystemTrayIcon.__init__(self, icon, parent)

        self.icon_on = QtGui.QIcon(get_icon("user-online.png"))
        self.icon_mixed = QtGui.QIcon(get_icon("user-invisible.png"))
        self.icon_off = QtGui.QIcon(get_icon("user-busy.png"))

        self.switches = rfkill.list_switches(IGNORE_LIST)
        self.refreshIconState()
Example #2
0
 def __init__(self):
     self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
     self.window.connect("destroy", self.destroy)
     self.vbox = gtk.VBox(homogeneous=True)
     self.buttons = []
     self.killall_button = gtk.Button("KILL 'EM ALL")
     self.killall_button.connect("clicked", self.toggle_all, None)
     self.vbox.pack_start(self.killall_button)
     for sw in rfkill.list_switches(IGNORE_LIST):
         b = RFKillGTKButton(sw)
         b.connect("clicked", self.toggle_one, None)
         self.buttons.append(b)
         self.vbox.pack_start(b)
     self.window.add(self.vbox)
     self.window.show_all()
     self.killall = 0
Example #3
0
    def __init__(self, app, *args, **kwargs):
        self.app = app
        super(RFKillIcon, self).__init__(*args, **kwargs)
        # setup events
        wx.EVT_TASKBAR_RIGHT_UP(self, self.onPopupMenu)
        wx.EVT_MENU(self, self.TBMENU_KILLALL, self.onKillAll)
        wx.EVT_MENU(self, self.TBMENU_CLOSE, self.onExit)
        
        self.switches = rfkill.list_switches(IGNORE_LIST)
        for n, sw in enumerate(self.switches):
            wx.EVT_MENU(self, self.TBMENU_SWITCHES_START + n, self.onToggleRFKill)

        self.icon_on = wx.Icon("icons/user-online.png", wx.BITMAP_TYPE_PNG)
        self.icon_mixed = wx.Icon("icons/user-invisible.png", wx.BITMAP_TYPE_PNG)
        self.icon_off = wx.Icon("icons/user-busy.png", wx.BITMAP_TYPE_PNG)
        
        self.refreshIconState()