class ArchiveChooserDialog(NativeFileChooserDialog): _title = _('Choose Archive') _filters = [ Filter(_('All files'), '*', False), Filter(_('ZIP files'), '*.zip', True) ]
class BaseAvatarChooserDialog: _title = _('Choose Avatar…') _preivew_size = (100, 100) if _require_native(): _filters = [ Filter(_('PNG files'), '*.png', True), Filter(_('JPEG files'), '*.jp*g', False), Filter(_('SVG files'), '*.svg', False) ] # type: FilterList else: _filters = [ Filter(_('Images'), ['image/png', 'image/jpeg', 'image/svg+xml'], True) ]
class BaseFileOpenDialog: _title = _('Choose File to Send…') _filters = [Filter(_('All files'), '*', True)] # type: FilterList
class FileSaveDialog(NativeFileChooserDialog): _title = _('Save File as…') _filters = [Filter(_('All files'), '*', True)] _action = Gtk.FileChooserAction.SAVE
class AvatarSaveDialog(FileSaveDialog): if sys.platform == 'win32': _filters = [Filter(_('Images'), '*.png;*.jpg;*.jpeg;*.svg', True)]