def __init__(self, frame, room): self.frame = frame self.room = room load_ui_elements( self, os.path.join(self.frame.gui_dir, "ui", "dialogs", "roomwall.ui")) self.dialog = generic_dialog(parent=frame.MainWindow, content_box=self.Main, quit_callback=self.hide, title=_("Room Wall"), width=800, height=600)
def __init__(self, frame): super().__init__("ui/dialogs/statistics.ui") self.frame = frame self.dialog = generic_dialog( parent=frame.MainWindow, content_box=self.Main, quit_callback=self.hide, title=_("Transfer Statistics"), width=450 ) # Initialize stats for stat_id in config.defaults["statistics"]: self.update_stat_value(stat_id, 0)
def __init__(self, frame, properties): self.frame = frame self.properties = properties load_ui_elements( self, os.path.join(self.frame.gui_dir, "ui", "dialogs", "fileproperties.ui")) self.dialog = generic_dialog(parent=frame.MainWindow, content_box=self.Main, title=_("File Properties"), width=600, height=0) self.current_index = 0
def __init__(self, frame): self.frame = frame load_ui_elements( self, os.path.join(self.frame.gui_dir, "ui", "dialogs", "statistics.ui")) self.dialog = generic_dialog(parent=frame.MainWindow, content_box=self.Main, quit_callback=self.hide, title=_("Transfer Statistics"), width=450) # Initialize stats for stat_id in config.defaults["statistics"]: self.update_stat_value(stat_id, 0)
def __init__(self, frame, properties, total_size=0, total_length=0, download_button=True): super().__init__("ui/dialogs/fileproperties.ui") self.frame = frame self.properties = properties self.total_size = total_size self.total_length = total_length self.dialog = generic_dialog( parent=frame.MainWindow, content_box=self.Main, title=_("File Properties"), width=600, height=0 ) self.download.set_visible(download_button) self.current_index = 0
def __init__(self, frame, searches): self.disconnected = False self.frame = frame self.interval = 0 self.searches = searches self.timer = None self.wishes = {} load_ui_elements( self, os.path.join(self.frame.gui_dir, "ui", "dialogs", "wishlist.ui")) self.dialog = generic_dialog(parent=frame.MainWindow, content_box=self.Main, quit_callback=self.hide, title=_("Search Wishlist"), width=600, height=600) self.store = Gtk.ListStore(str) self.column_numbers = list(range(self.store.get_n_columns())) cols = initialise_columns( None, self.WishlistView, ["wishes", _("Wishes"), -1, "text", None]) self.WishlistView.set_model(self.store) self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) for wish in config.sections["server"]["autosearch"]: wish = str(wish) self.wishes[wish] = self.store.insert_with_valuesv( -1, self.column_numbers, [wish]) renderers = cols["wishes"].get_cells() for render in renderers: render.set_property('editable', True) render.connect('edited', self.cell_edited_callback, self.WishlistView, 0) frame.WishList.connect("clicked", self.show)
def __init__(self, frame, searches): super().__init__("ui/dialogs/wishlist.ui") self.dialog = generic_dialog(parent=frame.MainWindow, modal=False, content_box=self.main, quit_callback=self.hide, title=_("Wishlist"), width=600, height=600) self.frame = frame self.searches = searches self.timer = None self.wishes = {} self.store = Gtk.ListStore(str) self.column_numbers = list(range(self.store.get_n_columns())) cols = initialise_columns(frame, None, self.list_view, ["wish", _("Wish"), -1, "text", None]) cols["wish"].set_sort_column_id(0) self.store.set_sort_column_id(0, Gtk.SortType.ASCENDING) self.list_view.set_model(self.store) for wish in config.sections["server"]["autosearch"]: wish = str(wish) self.wishes[wish] = self.store.insert_with_valuesv( -1, self.column_numbers, [wish]) CompletionEntry(self.wish_entry, self.store) Accelerator("Delete", self.list_view, self.on_remove_wish) Accelerator("<Shift>Tab", self.list_view, self.on_list_focus_entry_accelerator) # skip column header