Add icon to clear URL in the add podcast dialog.
This commit is contained in:
parent
932a8e7069
commit
fc0c1981ed
|
@ -80,6 +80,7 @@
|
|||
<property name="can-focus">True</property>
|
||||
<property name="has-focus">True</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="secondary-icon-name">edit-clear</property>
|
||||
<signal name="changed" handler="on_entry_url_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
|
@ -38,6 +38,7 @@ class gPodderAddPodcast(BuilderWidget):
|
|||
if hasattr(self, 'preset_url'):
|
||||
self.entry_url.set_text(self.preset_url)
|
||||
self.entry_url.connect('activate', self.on_entry_url_activate)
|
||||
self.entry_url.connect('icon-press', self.on_clear_url)
|
||||
self.gPodderAddPodcast.show()
|
||||
|
||||
if not hasattr(self, 'preset_url'):
|
||||
|
@ -64,6 +65,9 @@ class gPodderAddPodcast(BuilderWidget):
|
|||
clipboard.request_text(receive_clipboard_text, True)
|
||||
clipboard.request_text(receive_clipboard_text, False)
|
||||
|
||||
def on_clear_url(self, widget, icon_position, event):
|
||||
self.entry_url.set_text('')
|
||||
|
||||
def on_btn_close_clicked(self, widget):
|
||||
self.gPodderAddPodcast.destroy()
|
||||
|
||||
|
|
Loading…
Reference in New Issue