def connect_ui( self ): self.username = '' self.password = '' glade = gtk.glade.XML( Resources.get_plugin_asset( "./GmailCheckUI.glade" ) ) self.txtUsername = glade.get_widget( "txtUsername" ) self.txtPassword = glade.get_widget( "txtPassword" ) self.txtUsername.set_text( self.username ) self.txtPassword.set_text( self.password ) self.window = glade.get_widget( "mainWindow" ) glade.signal_autoconnect( self )
def connect_ui( self ): self.username = '' self.password = '' self.update = '5 Minutes' glade = gtk.glade.XML( Resources.get_plugin_asset( "./TwitterCheckUI.glade" ) ) self.txtUsername = glade.get_widget( "txtUsername" ) self.txtPassword = glade.get_widget( "txtPassword" ) self.txtUpdate = glade.get_widget("txtTimeLimit") self.txtUsername.set_text( self.username ) self.txtPassword.set_text( self.password ) self.txtUpdate.set_active( 1 ) self.window = glade.get_widget( "mainWindow" ) glade.signal_autoconnect( self )
def connect_ui(self): glade = gtk.glade.XML(Resources.get_ui_asset("MainUI.glade")) menu = gtk.Menu() menuItem = gtk.ImageMenuItem(gtk.STOCK_CONNECT) menuItem.connect('activate', self.check) menu.append(menuItem) menuItem = gtk.ImageMenuItem(gtk.STOCK_QUIT) menuItem.connect('activate', self.destroy) menu.append(menuItem) self.statusicon = gtk.status_icon_new_from_file("ui/Pew_Checker_Icon.svg") self.statusicon.connect("activate", self.toggle_window) self.statusicon.connect("popup-menu", self.popup_menu_cb, menu) self.statusicon.set_visible(True) self.cmdConfigure = glade.get_widget("cmdConfigure") self.cmdCheck = glade.get_widget("cmdCheck") self.listVbox = glade.get_widget("listVbox") self.window = glade.get_widget("mainWindow") self.store = self.make_model(self.plugin_db.fetch_available_plugins()) self.mdl = self.get_model() self.view = self.make_view(self.mdl) self.tree_select = self.view.get_selection() self.tree_select.set_mode(gtk.SELECTION_SINGLE) self.tree_select.connect("changed", self.on_plugin_select) self.listVbox.pack_start(self.view) self.window.connect("delete_event", self.delete_event) glade.signal_autoconnect(self) external.init() self.window.show_all()