Beispiel #1
0
    def __init__(self, task_options, parent):
        _TaskNewUI.__init__(self, task_options,
                            expander_label= _('<b>URIs/Torrent/Metalink File</b>')
                           )

        box = self._content_box

        tooltip = _('Enter URIs here or select Torrent/Metalink files'
                    ' by clicking the icon on the right side.')
        secondary_tooltip = _('Select Torrent/Metalink Files')
        entry = FileChooserEntry(secondary_tooltip,
                                 parent,
                                 Gtk.FileChooserAction.OPEN,
                                 update_entry=False,
                                 mime_list=(
                                     (_BT_FILTER_NAME, _BT_MIME_TYPES),
                                     (_ML_FILTER_NAME, _ML_MIME_TYPES),
                                 ),
                                 truncate_multiline=True,
                                 tooltip_text=tooltip,
                                 secondary_icon_tooltip_text=secondary_tooltip,
                                )
        entry.set_size_request(350, -1)
        box.pack_start(entry)
        self._task_options['uris'] = _Option(entry, 'text', _Option.string_mapper)

        self.uri_entry = entry
Beispiel #2
0
    def __init__(self, task_options, parent):
        _TaskNewUI.__init__(
            self,
            task_options,
            expander_label=_('<b>URIs/Torrent/Metalink File</b>'))

        box = self._content_box

        tooltip = _('Enter URIs here or select Torrent/Metalink files'
                    ' by clicking the icon on the right side.')
        secondary_tooltip = _('Select Torrent/Metalink Files')
        entry = FileChooserEntry(
            secondary_tooltip,
            parent,
            Gtk.FileChooserAction.OPEN,
            update_entry=False,
            mime_list=(
                (_BT_FILTER_NAME, _BT_MIME_TYPES),
                (_ML_FILTER_NAME, _ML_MIME_TYPES),
            ),
            truncate_multiline=True,
            tooltip_text=tooltip,
            secondary_icon_tooltip_text=secondary_tooltip,
        )
        entry.set_size_request(350, -1)
        box.pack_start(entry)
        self._task_options['uris'] = _Option(entry, 'text',
                                             _Option.string_mapper)

        self.uri_entry = entry