Merge pull request #72 from Oliver2213/next-gen-fork

Fix an error where the geolocate dialog wasn't loading properly
This commit is contained in:
Manuel Cortez 2016-03-23 23:44:01 -06:00
commit f466516289
2 changed files with 5 additions and 1 deletions

View File

@ -923,7 +923,7 @@ class Controller(object):
x = tweet["coordinates"]["coordinates"][0] x = tweet["coordinates"]["coordinates"][0]
y = tweet["coordinates"]["coordinates"][1] y = tweet["coordinates"]["coordinates"][1]
address = geocoder.reverse_geocode(y, x) address = geocoder.reverse_geocode(y, x)
dlg = messages.viewTweet(address[0].__str__(), False) dlg = commonMessageDialogs.view_geodata(address[0].__str__())
else: else:
output.speak(_(u"There are no coordinates in this tweet")) output.speak(_(u"There are no coordinates in this tweet"))
except GeocoderError: except GeocoderError:

View File

@ -64,3 +64,7 @@ def no_followers():
def no_friends(): def no_friends():
return wx.MessageDialog(None, _(u"This user has no friends. {0} can't create a timeline.").format(application.name), _(u"Error"), wx.ICON_ERROR).ShowModal() return wx.MessageDialog(None, _(u"This user has no friends. {0} can't create a timeline.").format(application.name), _(u"Error"), wx.ICON_ERROR).ShowModal()
def view_geodata(geotext):
"""Specific message dialog to display geolocation data"""
return wx.MessageDialog(None, _(u"Geolocation data: {0}").format(geotext), _(u"Geo data for this tweet")).ShowModal()