diff --git a/doc/changelog.md b/doc/changelog.md index 637d5f6d..fc3e6475 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -6,6 +6,7 @@ * TWBlue has been migrated completely to Python 3 (currently, the software builds with Python 3.7). * TWBlue should be restarted gracefully. Before, the application was alerting users of not being closed properly every time the application restarted by itself. * If TWBlue attemps to load an account with invalid tokens (this happens when reactivating a previously deactivated account, or when access to the ap is revoqued), TWBlue will inform the user about this error and will skip the account. Before, the app was unable to start due to a critical error. +* When sending a direct message, the title of the window will change appropiately when the recipient is edited. ((#276,)[https://github.com/manuelcortez/TWBlue/issues/276]) ## Changes in version 0.95 diff --git a/src/controller/messages.py b/src/controller/messages.py index 0567f0c5..295cd939 100644 --- a/src/controller/messages.py +++ b/src/controller/messages.py @@ -194,6 +194,11 @@ class dm(basicTweet): super(dm, self).__init__(session, title, caption, text, messageType="dm", max=10000) widgetUtils.connect_event(self.message.autocompletionButton, widgetUtils.BUTTON_PRESSED, self.autocomplete_users) self.text_processor() + widgetUtils.connect_event(self.message.cb, widgetUtils.ENTERED_TEXT, self.user_changed) + + def user_changed(self, *args, **kwargs): + self.title = _("Direct message to %s") % (self.message.get_user()) + self.text_processor() def autocomplete_users(self, *args, **kwargs): c = autocompletionUsers.completion.autocompletionUsers(self.message, self.session.session_id)