def __init__(self, parent): # title = gettext("About {name}").format(name="FS-UAE Launcher") title = "{} - FS-UAE Launcher".format(gettext("About")) super().__init__(parent, title, minimizable=False, maximizable=False) # buttons, layout = fsui.DialogButtons.create_with_layout(self) # buttons.create_close_button() self.layout = fsui.VerticalLayout() self.layout.set_padding(20) layout = self.layout self.icon_header = IconHeader( self, fsui.Icon("fs-uae-launcher", "pkg:launcher"), "{name} {version}".format(name="FS-UAE Launcher", version=app.version), "Copyright © 2012-2015 Frode Solheim") layout.add(self.icon_header, fill=True, margin_bottom=20) self.text_area = fsui.TextArea(self, about_message, read_only=True, font_family="monospace") self.text_area.scroll_to_start() self.text_area.set_min_width(760) self.text_area.set_min_height(340) layout.add(self.text_area, fill=True, expand=True)
def __init__(self, parent): app_name = "{} Launcher".format(Product.base_name) title = "{} - {}".format(gettext("About"), app_name) super().__init__(parent, title, minimizable=False, maximizable=False) self.theme = LauncherTheme.get() self.layout = VerticalLayout() self.layout.set_padding(20) self.icon_header = IconHeader( self, Icon("fs-uae-launcher", "pkg:launcher"), "{name} {version}".format(name=app_name, version=app.version), "Copyright © 2012-2020 Frode Solheim", ) self.layout.add(self.icon_header, fill=True, margin_bottom=20) # FIXME: Python version # FIXME: Qt version # FIXME: PyQt5 version # (FIXME: Linux distribution?) self.text_area = TextArea(self, about_message, read_only=True, font_family="monospace") self.text_area.scroll_to_start() self.text_area.set_min_width(760) self.text_area.set_min_height(340) self.layout.add(self.text_area, fill=True, expand=True) CloseButton.add_to_layout(self, self.layout, margin_top=20)
def __init__(self, parent, task): fsui.Window.__init__(self, parent, task.get_task_name()) self.set_icon(fsui.Icon("tools", "pkg:workspace")) self.layout = fsui.VerticalLayout() self.layout.min_width = 500 self.layout.set_padding(20, 20, 20, 20) self.icon_header = IconHeader(self, fsui.Icon("tools", "pkg:workspace"), task.get_task_name(), "") self.layout.add(self.icon_header, fill=True, margin_bottom=20) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True) self.created_label = fsui.Label(self, "") hori_layout.add(self.created_label, expand=True) hori_layout.add_spacer(20) self.abort_button = fsui.Button(self, gettext("Stop")) self.abort_button.activated.connect(self.on_abort_activated) hori_layout.add(self.abort_button) self.set_size(self.layout.get_min_size()) self.center_on_parent() self.task = task self.task.progressed.connect(self.on_progress) self.task.failed.connect(self.on_failure) self.task.succeeded.connect(self.close) self.task.stopped.connect(self.close) self.task.start()
def __init__(self, parent): if fsgs.product == "OpenRetro": app_name = "OpenRetro Launcher" else: app_name = "FS-UAE Launcher" title = "{} - {}".format(gettext("About"), app_name) super().__init__(parent, title, minimizable=False, maximizable=False) self.theme = LauncherTheme.get() self.layout = fsui.VerticalLayout() self.layout.set_padding(20) self.icon_header = IconHeader( self, fsui.Icon("fs-uae-launcher", "pkg:launcher"), "{name} {version}".format(name=app_name, version=app.version), "Copyright © 2012-2017 Frode Solheim", ) self.layout.add(self.icon_header, fill=True, margin_bottom=20) self.text_area = fsui.TextArea(self, about_message, read_only=True, font_family="monospace") self.text_area.scroll_to_start() self.text_area.set_min_width(760) self.text_area.set_min_height(340) self.layout.add(self.text_area, fill=True, expand=True) CloseButton.add_to_layout(self, self.layout, margin_top=20)
def __init__(self, parent, fsgs): fsui.LegacyDialog.__init__(self, parent, gettext("Terms of Download")) self.fsgs = fsgs self.download_file = fsgs.config.get("download_file") self.download_terms = fsgs.config.get("download_terms") self.task = None self.layout = fsui.VerticalLayout() self.layout.set_padding(20, 20, 20, 20) self.icon_header = IconHeader( self, fsui.Icon("web-browser", "pkg:workspace"), gettext("Terms of Download"), gettext( "This game can be automatically downloaded if you " "accept the terms" ), ) self.layout.add(self.icon_header, fill=True, margin_bottom=20) self.label = fsui.MultiLineLabel(self, gettext("Loading...")) self.label.set_min_width(600) self.label.set_min_height(100) self.layout.add(self.label) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True, margin_top=20) hori_layout.add_spacer(0, expand=True) self.reject_button = fsui.Button(self, gettext("Reject")) self.reject_button.activated.connect(self.on_reject_button) hori_layout.add(self.reject_button, margin_left=10) self.accept_button = fsui.Button(self, gettext("Accept")) self.accept_button.activated.connect(self.on_accept_button) hori_layout.add(self.accept_button, margin_left=10) self.accept_button.disable() self.reject_button.disable() self.task = DownloadTermsTask(self.download_terms) # self.task.progressed.connect(self.on_progress) self.task.failed.connect(self.on_failure) self.task.succeeded.connect(self.on_success) self.task.start() self.set_size(self.layout.get_min_size()) self.center_on_parent()
def __init__(self, parent=None): print("RefreshWindow parent =", parent) title = gettext("Updating Database") super().__init__(parent, title, maximizable=False) self.set_icon(fsui.Icon("refresh", "pkg:workspace")) self.theme = WorkspaceTheme.instance() self.layout = fsui.VerticalLayout() self.layout.min_width = 500 self.layout.set_padding(20, 20, 20, 20) self.icon_header = IconHeader( self, fsui.Icon("refresh", "pkg:workspace"), gettext("Updating Database"), "", ) self.layout.add(self.icon_header, fill=True, margin_bottom=20) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True) self.created_label = fsui.Label(self, "") hori_layout.add(self.created_label, expand=True) hori_layout.add_spacer(20) self.stop_button = fsui.Button(self, gettext("Stop")) self.stop_button.activated.connect(self.on_abort_activated) hori_layout.add(self.stop_button) if self.window.theme.has_close_buttons: self.close_button = CloseButton(self) hori_layout.add(self.close_button, fill=True, margin_left=10) self.set_size(self.layout.get_min_size()) self.center_on_parent() self.task = DatabaseRefreshTask() self.task.progressed.connect(self.on_progress) self.task.failed.connect(self.on_failure) self.task.succeeded.connect(self.close) self.task.stopped.connect(self.close) self.task.start()
def __init__(self, parent=None): title = gettext("OpenRetro Locker Uploader") super().__init__(parent, title) self.theme = WorkspaceTheme.instance() self.layout = fsui.VerticalLayout() self.set_icon(fsui.Icon("refresh", "pkg:workspace")) self.layout.min_width = 600 self.layout.set_padding(20, 20, 20, 20) self.icon_header = IconHeader( self, fsui.Icon("refresh", "pkg:workspace"), gettext("OpenRetro Locker Uploader"), gettext("Upload recognized Amiga files to your OpenRetro locker"), ) self.layout.add(self.icon_header, fill=True, margin_bottom=20) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True) self.created_label = fsui.Label(self, "") hori_layout.add(self.created_label, expand=True) self.upload_button = fsui.Button(self, gettext("Upload")) self.upload_button.activated.connect(self.on_upload_activated) hori_layout.add(self.upload_button, margin_left=10) self.stop_button = fsui.Button(self, gettext("Stop")) self.stop_button.activated.connect(self.on_stop_activated) self.stop_button.disable() hori_layout.add(self.stop_button, margin_left=10) if self.window.theme.has_close_buttons: self.close_button = CloseButton(self) hori_layout.add(self.close_button, margin_left=10) else: self.close_button = None self.set_size(self.layout.get_min_size()) self.center_on_parent() self.task = None
def __init__(self, parent=None): title = gettext("OAGD.net Locker Uploader") super().__init__(parent, title, maximizable=False) self.set_icon(fsui.Icon("refresh", "pkg:workspace")) self.layout = fsui.VerticalLayout() self.layout.min_width = 600 self.layout.set_padding(20, 20, 20, 20) self.icon_header = IconHeader( self, fsui.Icon("refresh", "pkg:workspace"), gettext("OAGD.net Locker Uploader"), gettext("Upload recognized Amiga files to your OAGD.net locker")) self.layout.add(self.icon_header, fill=True, margin_bottom=20) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True) self.created_label = fsui.Label(self, "") hori_layout.add(self.created_label, expand=True) self.upload_button = fsui.Button(self, gettext("Upload")) self.upload_button.activated.connect(self.on_upload_activated) hori_layout.add(self.upload_button, margin_left=10) self.stop_button = fsui.Button(self, gettext("Stop")) self.stop_button.activated.connect(self.on_stop_activated) self.stop_button.disable() hori_layout.add(self.stop_button, margin_left=10) # self.close_button = fsui.Button(self, gettext("Close")) # self.close_button.activated.connect(self.on_close_activated) # hori_layout.add(self.close_button, margin_left=10) self.set_size(self.layout.get_min_size()) self.center_on_parent() self.task = None
def __init__(self, parent=None): title = gettext("HDF Disk Image Creator") super().__init__(parent, title=title) self.theme = WorkspaceTheme.instance() buttons, layout = fsui.DialogButtons.create_with_layout(self) if self.window.theme.has_close_buttons: buttons.create_close_button() self.dialog = None self.path = "" self.set_icon(fsui.Icon("hd-volume", "pkg:workspace")) layout.min_width = 500 self.icon_header = IconHeader( self, fsui.Icon("hd-volume", "pkg:workspace"), gettext("HDF Disk Image Creator"), gettext("Create a single-partition or partitionable hard " "drive image")) layout.add(self.icon_header, fill=True, margin_bottom=20) label = fsui.Label(self, gettext("Create disk image of type:")) layout.add(label) layout.add_spacer(6) self.list_view = fsui.ListView(self) self.list_view.set_min_width(560) self.list_view.set_min_height(60) icon = fsui.Image("workspace:res/16x16/hd-volume.png") self.list_view.add_item( gettext("HDF - Single Partition Hard Disk File"), icon) self.list_view.add_item( gettext("HDF - Partitionable Hard Drive Image (RDB)"), icon) layout.add(self.list_view, expand=True, fill=True) self.list_view.item_selected.connect(self.on_item_selected) layout.add_spacer(20) label = fsui.Label(self, gettext("Filename for the new disk image:")) layout.add(label) layout.add_spacer(6) hori_layout = fsui.HorizontalLayout() layout.add(hori_layout, fill=True) self.name_field = fsui.TextField( self, "", read_only=False) hori_layout.add(self.name_field, expand=True) text = gettext("Size:") label = fsui.Label(self, text) hori_layout.add(label, margin_left=20) self.size_field = fsui.TextField(self, "") self.size_field.set_min_width(60) hori_layout.add(self.size_field, expand=False, margin_left=10) text = gettext("MB") label = fsui.Label(self, text) hori_layout.add(label, margin_left=10) layout.add_spacer(20) label = fsui.Label(self, gettext("Save to directory:")) layout.add(label) layout.add_spacer(6) hori_layout = fsui.HorizontalLayout() layout.add(hori_layout, fill=True) self.dir_field = fsui.TextField(self, "", read_only=True) hori_layout.add(self.dir_field, expand=True) self.browse_button = fsui.Button(self, gettext("Browse")) self.browse_button.clicked.connect(self.on_browse_clicked) hori_layout.add(self.browse_button, margin_left=10) self.created_label = fsui.Label(self, "") layout.add(self.created_label, fill=True) # layout.add_spacer(20) # layout.add_spacer(20) # hori_layout = fsui.HorizontalLayout() # layout.add(hori_layout, fill=True) # self.created_label = fsui.Label(self, "") # hori_layout.add(self.created_label, expand=True) # hori_layout.add_spacer(20) self.create_button = fsui.Button(buttons, gettext("Create")) # self.create_button.activated.connect(self.on_create_clicked) self.create_button.clicked.connect(self.on_create_clicked) # hori_layout.add(self.create_button) buttons.add_button(self.create_button) self.list_view.select_item(0) self.update_name_suggestion()
def __init__(self, parent, fsgs): fsui.Window.__init__(self, parent, gettext("Download Game Manually")) self.fsgs = fsgs self.download_page = fsgs.config.get("download_page") self.download_notice = fsgs.config.get("download_notice") self.task = None self.layout = fsui.VerticalLayout() self.layout.set_padding(20, 20, 20, 20) self.icon_header = IconHeader( self, fsui.Icon("web-browser", "pkg:workspace"), gettext("Download Game Manually"), gettext("This game must be downloaded before you can play it")) self.layout.add(self.icon_header, fill=True, margin_bottom=20) label = fsui.HeadingLabel( self, gettext("Please open the following web page and download the " "game from there:")) label.set_min_width(500) self.layout.add(label) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True, margin_top=10) hori_layout.add( fsui.ImageView(self, fsui.Image("launcher:res/16x16/world_link.png"))) label = fsui.URLLabel(self, self.download_page, self.download_page) hori_layout.add(label, margin_left=6) if self.download_notice: label = fsui.MultiLineLabel(self, self.download_notice) label.set_min_width(500) self.layout.add(label, margin_top=20) label = fsui.HeadingLabel( self, gettext("Download to the following directory, and then " "click '{0}':".format(gettext("Scan Downloads")))) label.set_min_width(500) self.layout.add(label, margin_top=20) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True, margin_top=10) hori_layout.add( fsui.ImageView(self, fsui.Image("launcher:res/16x16/folder.png"))) label = fsui.Label(self, FSGSDirectories.ensure_downloads_dir()) hori_layout.add(label, margin_left=6) hori_layout = fsui.HorizontalLayout() self.layout.add(hori_layout, fill=True, margin_top=20) self.status_label = fsui.Label(self, "") hori_layout.add(self.status_label, expand=True) self.scan_button = fsui.Button(self, gettext("Scan Downloads")) self.scan_button.activated.connect(self.on_scan_files) hori_layout.add(self.scan_button, margin_left=20) self.close_button = fsui.Button(self, gettext("Close")) self.close_button.activated.connect(self.on_close) hori_layout.add(self.close_button, margin_left=10) self.set_size(self.layout.get_min_size()) self.center_on_parent()
def __init__(self, parent=None): title = gettext("ADF Disk Image Creator") super().__init__(parent, title=title, maximizable=False) buttons, layout = fsui.DialogButtons.create_with_layout(self) # buttons.create_close_button() self.dialog = None self.path = "" self.set_icon(fsui.Icon("floppy", "pkg:workspace")) layout.min_width = 500 self.icon_header = IconHeader( self, fsui.Icon("floppy", "pkg:workspace"), gettext("ADF Disk Image Creator"), gettext("Create a blank or formatted ADF floppy disk image")) layout.add(self.icon_header, fill=True, margin_bottom=20) label = fsui.Label(self, gettext("Create disk image of type:")) layout.add(label) layout.add_spacer(6) self.list_view = fsui.ListView(self) self.list_view.set_min_width(560) self.list_view.set_min_height(60) icon = fsui.Image("workspace:res/16/floppy.png") self.list_view.add_item(gettext("ADF - Standard Floppy Disk Image"), icon) self.list_view.add_item( gettext("ADF - Extended Floppy Disk Image (MFM Encoded)"), icon) layout.add(self.list_view, expand=True, fill=True) # self.list_view.on_select_item = self.on_select_item self.list_view.item_selected.connect(self.on_item_selected) layout.add_spacer(20) label = fsui.Label(self, gettext("Filename for the new disk image:")) layout.add(label) layout.add_spacer(6) hori_layout = fsui.HorizontalLayout() layout.add(hori_layout, fill=True) self.name_field = fsui.TextField(self, "", read_only=False) hori_layout.add(self.name_field, expand=True) text = gettext("Size:") label = fsui.Label(self, text) hori_layout.add(label, margin_left=20) self.size_field = fsui.TextField(self, "") self.size_field.set_min_width(60) hori_layout.add(self.size_field, expand=False, margin_left=10) text = gettext("MB") label = fsui.Label(self, text) hori_layout.add(label, margin_left=10) layout.add_spacer(20) label = fsui.Label(self, gettext("Save to directory:")) layout.add(label) layout.add_spacer(6) hori_layout = fsui.HorizontalLayout() layout.add(hori_layout, fill=True) self.dir_field = fsui.TextField(self, "", read_only=True) hori_layout.add(self.dir_field, expand=True) self.browse_button = fsui.Button(self, gettext("Browse")) self.browse_button.clicked.connect(self.on_browse_clicked) hori_layout.add(self.browse_button, margin_left=10) self.created_label = fsui.Label(self, "") layout.add(self.created_label, fill=True) # layout.add_spacer(20) # layout.add_spacer(20) # hori_layout = fsui.HorizontalLayout() # layout.add(hori_layout, fill=True) # self.created_label = fsui.Label(self, "") # hori_layout.add(self.created_label, expand=True) # hori_layout.add_spacer(20) self.create_button = fsui.Button(buttons, gettext("Create")) # self.create_button.activated.connect(self.on_create_clicked) self.create_button.clicked.connect(self.on_create_clicked) # hori_layout.add(self.create_button) buttons.add_button(self.create_button) self.list_view.select_item(0) self.update_name_suggestion()