mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Added user autocompletion functionality to some dialogs. Closes #466
This commit is contained in:
parent
aab8aafefc
commit
76a5c960e5
@ -18,6 +18,7 @@ if system == "Windows":
|
|||||||
from . import user
|
from . import user
|
||||||
from . import listsController
|
from . import listsController
|
||||||
from . import filterController
|
from . import filterController
|
||||||
|
from . import userSelector
|
||||||
elif system == "Linux":
|
elif system == "Linux":
|
||||||
from gtkUI import (view, commonMessageDialogs)
|
from gtkUI import (view, commonMessageDialogs)
|
||||||
from sessions.twitter import utils, compose
|
from sessions.twitter import utils, compose
|
||||||
@ -518,10 +519,9 @@ class Controller(object):
|
|||||||
users = [buff.session.get_user(tweet.message_create["sender_id"]).screen_name]
|
users = [buff.session.get_user(tweet.message_create["sender_id"]).screen_name]
|
||||||
else:
|
else:
|
||||||
users = utils.get_all_users(tweet, buff.session)
|
users = utils.get_all_users(tweet, buff.session)
|
||||||
dlg = dialogs.utils.selectUserDialog(_(u"Select the user"), users)
|
selector = userSelector.userSelector(users=users, session_id=buff.session.session_id)
|
||||||
if dlg.get_response() == widgetUtils.OK:
|
user = selector.get_user()
|
||||||
user = dlg.get_user()
|
if user == None:
|
||||||
else:
|
|
||||||
return
|
return
|
||||||
l = listsController.listsController(buff.session, user=user)
|
l = listsController.listsController(buff.session, user=user)
|
||||||
|
|
||||||
@ -535,10 +535,9 @@ class Controller(object):
|
|||||||
users = [buff.session.get_user(tweet.message_create["sender_id"]).screen_name]
|
users = [buff.session.get_user(tweet.message_create["sender_id"]).screen_name]
|
||||||
else:
|
else:
|
||||||
users = utils.get_all_users(tweet, buff.session)
|
users = utils.get_all_users(tweet, buff.session)
|
||||||
dlg = dialogs.utils.selectUserDialog(_(u"Select the user"), users)
|
selector = userSelector.userSelector(users=users, session_id=buff.session.session_id)
|
||||||
if dlg.get_response() == widgetUtils.OK:
|
user = selector.get_user()
|
||||||
user = dlg.get_user()
|
if user == None:
|
||||||
else:
|
|
||||||
return
|
return
|
||||||
dlg = dialogs.lists.addUserListDialog()
|
dlg = dialogs.lists.addUserListDialog()
|
||||||
dlg.populate_list([compose.compose_list(item) for item in buff.session.db["lists"]])
|
dlg.populate_list([compose.compose_list(item) for item in buff.session.db["lists"]])
|
||||||
@ -564,10 +563,9 @@ class Controller(object):
|
|||||||
users = [buff.session.get_user(tweet.message_create["sender_id"]).screen_name]
|
users = [buff.session.get_user(tweet.message_create["sender_id"]).screen_name]
|
||||||
else:
|
else:
|
||||||
users = utils.get_all_users(tweet, buff.session)
|
users = utils.get_all_users(tweet, buff.session)
|
||||||
dlg = dialogs.utils.selectUserDialog(_(u"Select the user"), users)
|
selector = userSelector.userSelector(users=users, session_id=buff.session.session_id)
|
||||||
if dlg.get_response() == widgetUtils.OK:
|
user = selector.get_user()
|
||||||
user = dlg.get_user()
|
if user == None:
|
||||||
else:
|
|
||||||
return
|
return
|
||||||
dlg = dialogs.lists.removeUserListDialog()
|
dlg = dialogs.lists.removeUserListDialog()
|
||||||
dlg.populate_list([compose.compose_list(item) for item in buff.session.db["lists"]])
|
dlg.populate_list([compose.compose_list(item) for item in buff.session.db["lists"]])
|
||||||
|
Loading…
Reference in New Issue
Block a user