def __init__(self, bus): VBox.__init__(self) self.bus = bus logger.debug('Running...') self.label = Label('Looking for Presence Service...') self.errors = ListStore(str) errors_tree = TreeView(model=self.errors) errors_tree.insert_column_with_attributes(0, 'Log', CellRendererText(), text=0) scroller = ScrolledWindow() scroller.add(errors_tree) self.paned = VPaned() self.paned.pack1(scroller) self.pack_start(self.label, False, False) self.pack_end(self.paned) bus.watch_name_owner(PS_NAME, self.on_name_owner_change) self.ps_watcher = Label('-') self.paned.pack2(self.ps_watcher) self.show_all()
def __init__(self, vdict): VBox.__init__(self) self.vdict = {} for name, value in vdict.items(): self.vdict[name] = _FieldEntry(name, default=value) self.add(self.vdict[name]) self.vdict[name].show() self.show()
def __init__(self, name='CommandBox'): VBox.__init__(self) self.set_name(name) self.tbar = HandleToolbar() self.menubar = SimpleMenuBar() self.pack_start(self.menubar, FALSE, FALSE, 0) self.pack_end(self.tbar, FALSE, FALSE, 0) self.show()
def __init__(self, name='CommandBox'): VBox.__init__(self) self.set_name(name) self.tbar = HandleToolbar() self.menubar = SimpleMenuBar() self.pack_start(self.menubar, False, False, 0) self.pack_end(self.tbar, False, False, 0) self.show()
def __init__(self): VBox.__init__(self) self.status_label = Label('blank') self.source_label = Label('blank') self.pack_start(self.status_label, FALSE, FALSE, 0) self.pack_end(self.source_label, FALSE, FALSE, 0) self.status_label.show() self.source_label.show() self.show()
def __init__(self): VBox.__init__(self) self.mainMenu = MainMenu() self.mainNotebook = MainNotebook() self.pack_start(self.mainMenu, False, False, 2) self.pack_start(self.mainNotebook, True, True, 2) self.pack_start(Statusbar(), False, False, 2)
def __init__(self, maxthreads=3): VBox.__init__(self) self.threads = [] self.queue = DownloadQueue() self.show() for i in range(maxthreads): thread = _DownloadStatus(self.queue) thread.start() self.threads.append(thread) self.pack_end(thread, FALSE, FALSE, 0)
def __init__(self, vdict, name='ItemButtonBox'): VBox.__init__(self) self.set_name(name) self.vdict = {} for item in vdict.items(): sname = item[0] self.vdict[sname] = ItemButton(item, name='_'.join([name, sname])) self.add(self.vdict[sname]) self.vdict[sname].show() self.show()
def __init__(self): VBox.__init__(self) self.form = GeoForm() self.result = GeoResult() self.pack_start(self.form, False) self.pack_start(self.result) self.login = GeoCaching() self.search = None self.form.connect('search', self.do_search)
def __init__(self, conn, name='BaseDiffer'): VBox.__init__(self) self.set_name(name) self.conn = conn self.view = TwinScrollCList(name=name) self.cursor = StatementCursor(self.conn) suites = [r.suite for r in self.cursor.select(table='suites', order='suite')] self.suite_bar = SuiteBar(suites, name=name) self.trait_bar = TraitBar(name=name) self.pack_end(self.suite_bar, 0, 0, 0) self.pack_end(self.trait_bar, 0, 0, 0) self.add(self.view) self.suite_bar.show() self.show()
def __init__(self, conn, name='FamilyDiffer'): VBox.__init__(self) self.set_name(name) self.conn = conn self.view = TwinScrollCList(name=name) self.cursor = StatementCursor(self.conn) self.lfamily = Family(self.conn) self.rfamily = Family(self.conn) self.add(self.view) self.udbar = UDBar() self.pack_end(self.udbar, 0, 0, 0) self.show() self.udbar.ubutton.connect('clicked', self.update_pressed) self.udbar.dbutton.connect('clicked', self.diff_selection)
def __init__(self, url, path): VBox.__init__(self) self.label = Label(path) self.label.show() self.pack_start(self.label, FALSE, FALSE, 0) self.pbar = ProgressBar() self.pack_end(self.pbar, FALSE, FALSE, 0) self.pbar.show() self.show() self._done = 0 # self.thread = DownloadThread(url, path, self.progress) self.thread = DownloadThread(url, path, self.progress) # self.button = Button('start') # self.button.connect('clicked', self.start) # self.button.show() # self.pack_end(self.button, FALSE, FALSE, 0) self._started = False
def __init__(self, url, path): VBox.__init__(self) self.label = Label(path) self.label.show() self.pack_start(self.label, FALSE, FALSE, 0) self.pbar = ProgressBar() self.pack_end(self.pbar, FALSE, FALSE, 0) self.pbar.show() self.show() self._done = 0 #self.thread = DownloadThread(url, path, self.progress) self.thread = DownloadThread(url, path, self.progress) #self.button = Button('start') #self.button.connect('clicked', self.start) #self.button.show() #self.pack_end(self.button, FALSE, FALSE, 0) self._started = False
def __init__(self, bus, unique_name, log): VBox.__init__(self) self.bus = bus self.unique_name = unique_name self.proxy = bus.get_object(unique_name, PS_PATH) self.iface = dbus.Interface(self.proxy, PS_IFACE) self.log = log self.activities = None self.iface.connect_to_signal('ActivityAppeared', self._on_activity_appeared) self.iface.connect_to_signal('ActivityDisappeared', self._on_activity_disappeared) self.iface.GetActivities(reply_handler=self._on_get_activities_success, error_handler=self._on_get_activities_failure) self.buddies = None self.iface.connect_to_signal('BuddyAppeared', self._on_buddy_appeared) self.iface.connect_to_signal('BuddyDisappeared', self._on_buddy_disappeared) self.iface.GetBuddies(reply_handler=self._on_get_buddies_success, error_handler=self._on_get_buddies_failure) # keep this in sync with the ACT_COL_ constants self.activities_list_store = ListStore( str, # object path int, # weight (bold if new) bool, # strikethrough (dead) str, # ID str, # color str, # type str, # name str, # conn str, # channels str, # buddies ) self.pack_start(Label('Activities:'), False, False) self.activities_list = TreeView(self.activities_list_store) c = self.activities_list.insert_column_with_attributes( 0, 'Object path', CellRendererText(), text=ACT_COL_PATH, weight=ACT_COL_WEIGHT, strikethrough=ACT_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(ACT_COL_PATH) c = self.activities_list.insert_column_with_attributes( 1, 'ID', CellRendererText(), text=ACT_COL_ID, weight=ACT_COL_WEIGHT, strikethrough=ACT_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(ACT_COL_ID) c = self.activities_list.insert_column_with_attributes( 2, 'Color', CellRendererText(), text=ACT_COL_COLOR, weight=ACT_COL_WEIGHT, strikethrough=ACT_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(ACT_COL_COLOR) c = self.activities_list.insert_column_with_attributes( 3, 'Type', CellRendererText(), text=ACT_COL_TYPE, weight=ACT_COL_WEIGHT, strikethrough=ACT_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(ACT_COL_TYPE) c = self.activities_list.insert_column_with_attributes( 4, 'Name', CellRendererText(), text=ACT_COL_NAME, weight=ACT_COL_WEIGHT, strikethrough=ACT_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(ACT_COL_NAME) c = self.activities_list.insert_column_with_attributes( 5, 'Connection', CellRendererText(), text=ACT_COL_CONN, weight=ACT_COL_WEIGHT, strikethrough=ACT_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(ACT_COL_CONN) c = self.activities_list.insert_column_with_attributes( 6, 'Channels', CellRendererText(), text=ACT_COL_CHANNELS, weight=ACT_COL_WEIGHT, strikethrough=ACT_COL_STRIKE) c.set_resizable(True) c = self.activities_list.insert_column_with_attributes( 7, 'Buddies', CellRendererText(), text=ACT_COL_BUDDIES, weight=ACT_COL_WEIGHT, strikethrough=ACT_COL_STRIKE) c.set_resizable(True) scroller = ScrolledWindow() scroller.add(self.activities_list) self.pack_start(scroller) # keep this in sync with the BUDDY_COL_ constants self.buddies_list_store = ListStore(str, int, bool, str, bool, str, str, str, str, str, str) self.pack_start(Label('Buddies:'), False, False) self.buddies_list = TreeView(self.buddies_list_store) c = self.buddies_list.insert_column_with_attributes( 0, 'Object path', CellRendererText(), text=BUDDY_COL_PATH, weight=BUDDY_COL_WEIGHT, strikethrough=BUDDY_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(BUDDY_COL_PATH) c = self.buddies_list.insert_column_with_attributes( 1, 'Pubkey', CellRendererText(), text=BUDDY_COL_KEY_ID, weight=BUDDY_COL_WEIGHT, strikethrough=BUDDY_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(BUDDY_COL_KEY_ID) c = self.buddies_list.insert_column_with_attributes( 2, 'Nick', CellRendererText(), text=BUDDY_COL_NICK, weight=BUDDY_COL_WEIGHT, strikethrough=BUDDY_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(BUDDY_COL_NICK) c = self.buddies_list.insert_column_with_attributes( 3, 'Owner', CellRendererToggle(), active=BUDDY_COL_OWNER) c = self.buddies_list.insert_column_with_attributes( 4, 'Color', CellRendererText(), text=BUDDY_COL_COLOR, weight=BUDDY_COL_WEIGHT, strikethrough=BUDDY_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(BUDDY_COL_OWNER) c = self.buddies_list.insert_column_with_attributes( 5, 'IPv4', CellRendererText(), text=BUDDY_COL_IP4, weight=BUDDY_COL_WEIGHT, strikethrough=BUDDY_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(BUDDY_COL_IP4) c = self.buddies_list.insert_column_with_attributes( 6, 'CurAct', CellRendererText(), text=BUDDY_COL_CUR_ACT, weight=BUDDY_COL_WEIGHT, strikethrough=BUDDY_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(BUDDY_COL_CUR_ACT) c = self.buddies_list.insert_column_with_attributes( 7, 'Activities', CellRendererText(), text=BUDDY_COL_ACTIVITIES, weight=BUDDY_COL_WEIGHT, strikethrough=BUDDY_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(BUDDY_COL_ACTIVITIES) c = self.buddies_list.insert_column_with_attributes( 8, 'Handles', CellRendererText(), text=BUDDY_COL_HANDLES, weight=BUDDY_COL_WEIGHT, strikethrough=BUDDY_COL_STRIKE) c.set_resizable(True) c.set_sort_column_id(BUDDY_COL_HANDLES) scroller = ScrolledWindow() scroller.add(self.buddies_list) self.pack_start(scroller) self.iface.connect_to_signal('ActivityInvitation', self._on_activity_invitation) self.iface.connect_to_signal('PrivateInvitation', self._on_private_invitation)