Fixed small typo

This commit is contained in:
Manuel Cortez 2022-08-03 10:36:54 -05:00
parent 769436abf7
commit 015cf9eca3
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790

View File

@ -29,8 +29,8 @@ class autocompletionUsers(object):
:param mode: this controls how the dialog will behave. Possible values are 'tweet' and 'dm'. In tweet mode, the matching pattern will be @user (@ is required), while in 'dm' mode the matching pattern will be anything written in the text control. :param mode: this controls how the dialog will behave. Possible values are 'tweet' and 'dm'. In tweet mode, the matching pattern will be @user (@ is required), while in 'dm' mode the matching pattern will be anything written in the text control.
:type mode: str :type mode: str
""" """
position = self.window.text.GetInsertionPoint()
if mode == "tweet": if mode == "tweet":
position = self.window.text.GetInsertionPoint()
text = self.window.text.GetValue() text = self.window.text.GetValue()
text = text[:position] text = text[:position]
try: try:
@ -60,7 +60,7 @@ class autocompletionUsers(object):
users = self.db.get_users(pattern) users = self.db.get_users(pattern)
if len(users) > 0: if len(users) > 0:
menu.append_options(users) menu.append_options(users)
self.window.PopupMenu(menu, self.window.text.GetPosition()) self.window.PopupMenu(menu, self.window.cb.GetPosition())
menu.destroy() menu.destroy()
else: else:
output.speak(_(u"There are no results in your users database")) output.speak(_(u"There are no results in your users database"))