No capitalization and word completion for URLs (Maemo bug 5184)
Thanks to Daniel Martin Yerga for reporting this bug.
This commit is contained in:
parent
6d3a100b0e
commit
18572b4cc3
|
@ -122,7 +122,8 @@ class gPodderPodcastDirectory(BuilderWidget):
|
|||
OpmlListModel.C_URL) for path in paths]
|
||||
|
||||
def on_load_opml_button_clicked(self, widget):
|
||||
url = self.show_text_edit_dialog(_('Load OPML file from the web'), _('URL:'))
|
||||
url = self.show_text_edit_dialog(_('Load OPML file from the web'), \
|
||||
_('URL:'), is_url=True)
|
||||
if url is not None:
|
||||
self.download_opml_file(url)
|
||||
|
||||
|
|
|
@ -44,6 +44,9 @@ class gPodderAddPodcast(BuilderWidget):
|
|||
self.entry_url.connect('activate', self.on_entry_url_activate)
|
||||
if gpodder.ui.fremantle:
|
||||
self.btn_add.set_name('HildonButton-finger')
|
||||
# Deactivate capitalization and word completion (Maemo bug 5184)
|
||||
self.entry_url.set_property('hildon-input-mode', \
|
||||
gtk.HILDON_GTK_INPUT_MODE_FULL)
|
||||
self.gPodderAddPodcast.show()
|
||||
|
||||
def on_btn_close_clicked(self, widget):
|
||||
|
|
|
@ -290,7 +290,8 @@ class BuilderWidget(GtkBuilderWidget):
|
|||
else:
|
||||
raise Exception('Unknown interface type')
|
||||
|
||||
def show_text_edit_dialog(self, title, prompt, text=None, empty=False):
|
||||
def show_text_edit_dialog(self, title, prompt, text=None, empty=False, \
|
||||
is_url=False):
|
||||
dialog = gtk.Dialog(title, self.main_window, \
|
||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
|
||||
|
||||
|
@ -312,6 +313,11 @@ class BuilderWidget(GtkBuilderWidget):
|
|||
if gpodder.ui.fremantle:
|
||||
import hildon
|
||||
text_entry = hildon.Entry(gtk.HILDON_SIZE_AUTO)
|
||||
if is_url:
|
||||
# Disable word capitalization and word completion when
|
||||
# requesting an URL to be entered (see Maemo bug 5184)
|
||||
text_entry.set_property('hildon-input-mode', \
|
||||
gtk.HILDON_GTK_INPUT_MODE_FULL)
|
||||
else:
|
||||
text_entry = gtk.Entry()
|
||||
text_entry.set_activates_default(True)
|
||||
|
|
Loading…
Reference in a new issue