Ejemplo n.º 1
0
class ArchiveChooserDialog(NativeFileChooserDialog):

    _title = _('Choose Archive')
    _filters = [
        Filter(_('All files'), '*', False),
        Filter(_('ZIP files'), '*.zip', True)
    ]
Ejemplo n.º 2
0
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)
        ]
Ejemplo n.º 3
0
class BaseFileOpenDialog:

    _title = _('Choose File to Send…')
    _filters = [Filter(_('All files'), '*', True)]  # type: FilterList
Ejemplo n.º 4
0
class FileSaveDialog(NativeFileChooserDialog):

    _title = _('Save File as…')
    _filters = [Filter(_('All files'), '*', True)]
    _action = Gtk.FileChooserAction.SAVE
Ejemplo n.º 5
0
class AvatarSaveDialog(FileSaveDialog):

    if sys.platform == 'win32':
        _filters = [Filter(_('Images'), '*.png;*.jpg;*.jpeg;*.svg', True)]