~ubuntu-branches/ubuntu/vivid/gpodder/vivid-proposed

« back to all changes in this revision

Viewing changes to src/gpodder/gtkui/frmntl/podcastdirectory.py

  • Committer: Bazaar Package Importer
  • Author(s): tony mancill
  • Date: 2010-12-05 17:08:02 UTC
  • mfrom: (5.3.2 experimental) (5.2.10 sid)
  • Revision ID: james.westby@ubuntu.com-20101205170802-qbsq7r331j21np1i
Tags: 2.10-1
* New upstream release
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import pango
22
22
import threading
23
23
import hildon
 
24
import urllib
24
25
import gobject
25
26
 
26
27
import gpodder
108
109
                    _('URL:'), is_url=True, affirmative_text=_('Load'))
109
110
            load_opml_from_url(url)
110
111
 
 
112
        def choice_search_mygpo(widget):
 
113
            dialog.destroy()
 
114
            search_term = show_text_edit_dialog(\
 
115
                    _('Search on gpodder.net'), \
 
116
                    _('Search for:'), affirmative_text=_('Search'))
 
117
            if search_term is not None:
 
118
                url = 'http://gpodder.net/search.opml?q=%s' % (urllib.quote(search_term),)
 
119
                load_opml_from_url(url)
 
120
 
111
121
        def choice_load_opml_from_file(widget):
112
122
            dialog.destroy()
113
123
            dlg = gobject.new(hildon.FileChooserDialog, \
144
154
        choices = (
145
155
                (_('Podcast feed/website URL'), choice_enter_feed_url),
146
156
                (_('OPML file from the web'), choice_load_opml_from_url),
 
157
                (_('Search on gpodder.net'), choice_search_mygpo),
147
158
                (_('Open OPML file'), choice_load_opml_from_file),
148
159
                (_('Example podcasts'), choice_load_examples),
149
160
                (_('Podcast Top 50'), choice_load_toplist),
247
258
        title = [self.main_window.get_title()]
248
259
        if selection:
249
260
            count = selection.count_selected_rows()
250
 
            text = N_('%d podcast selected', '%d podcasts selected', count)
 
261
            text = N_('%(count)d podcast selected', '%(count)d podcasts selected', {'count':count})
251
262
            title.append(text % count)
252
263
        else:
253
264
            count = 0