From d56c8b43724dc5e00a823764bf43e3bf78fc4632 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Tue, 10 Oct 2023 17:43:31 -0600 Subject: [PATCH] Renamed showUserProfile to user_details to keep compatibility with invisible interface and naming pattern of functions --- src/controller/mainController.py | 8 ++++---- src/controller/mastodon/handler.py | 2 +- src/keymaps/Chicken Nugget.keymap | 3 ++- src/keymaps/Qwitter.keymap | 3 ++- src/keymaps/Windows 10.keymap | 1 + src/keymaps/Windows11.keymap | 1 + src/keymaps/default.keymap | 3 ++- src/keystrokeEditor/actions/mastodon.py | 2 +- 8 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 8f3dd64d..f1fc0d14 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -140,7 +140,7 @@ class Controller(object): widgetUtils.connect_event(self.view, widgetUtils.MENU, self.delete, self.view.delete) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.follow, menuitem=self.view.follow) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.send_dm, self.view.dm) - widgetUtils.connect_event(self.view, widgetUtils.MENU, self.showUserProfile, self.view.details) + widgetUtils.connect_event(self.view, widgetUtils.MENU, self.user_details, self.view.details) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.get_more_items, menuitem=self.view.load_previous_items) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.clear_buffer, menuitem=self.view.clear) widgetUtils.connect_event(self.view, widgetUtils.MENU, self.remove_buffer, self.view.deleteTl) @@ -1101,13 +1101,13 @@ class Controller(object): if handler: handler.update_profile(buffer.session) - def showUserProfile(self, *args): + def user_details(self, *args): """Displays a user's profile.""" log.debug("Showing user profile...") buffer = self.get_best_buffer() handler = self.get_handler(type=buffer.session.type) - if handler and hasattr(handler, 'showUserProfile'): - handler.showUserProfile(buffer) + if handler and hasattr(handler, 'user_details'): + handler.user_details(buffer) def openPostTimeline(self, *args, user=None): """Opens selected user's posts timeline diff --git a/src/controller/mastodon/handler.py b/src/controller/mastodon/handler.py index 6da135e2..9b2e2116 100644 --- a/src/controller/mastodon/handler.py +++ b/src/controller/mastodon/handler.py @@ -304,7 +304,7 @@ class Handler(object): log.debug(f"Updating users profile with: {updated_data}") call_threaded(session.api_call, "account_update_credentials", _("Update profile"), report_success=True, **updated_data) - def showUserProfile(self, buffer): + def user_details(self, buffer): """Displays user profile in a dialog. This works as long as the focused item hass a 'account' key.""" if not hasattr(buffer, 'get_item'): diff --git a/src/keymaps/Chicken Nugget.keymap b/src/keymaps/Chicken Nugget.keymap index 2f1888b0..aad998a9 100644 --- a/src/keymaps/Chicken Nugget.keymap +++ b/src/keymaps/Chicken Nugget.keymap @@ -35,4 +35,5 @@ accountConfiguration = string(default="control+win+shift+o") update_buffer = string(default="control+win+shift+u") ocr_image = string(default="win+alt+o") open_in_browser = string(default="alt+control+win+return") -add_alias=string(default="") \ No newline at end of file +add_alias=string(default="") +vote=string(default="alt+win+shift+v") \ No newline at end of file diff --git a/src/keymaps/Qwitter.keymap b/src/keymaps/Qwitter.keymap index e9736a5b..3a73baea 100644 --- a/src/keymaps/Qwitter.keymap +++ b/src/keymaps/Qwitter.keymap @@ -54,4 +54,5 @@ accountConfiguration = string(default="control+win+shift+o") update_buffer = string(default="control+win+shift+u") ocr_image = string(default="win+alt+o") open_in_browser = string(default="alt+control+win+return") -add_alias=string(default="") \ No newline at end of file +add_alias=string(default="") +vote=string(default="alt+win+shift+v") \ No newline at end of file diff --git a/src/keymaps/Windows 10.keymap b/src/keymaps/Windows 10.keymap index 2dea36c9..3e21c51b 100644 --- a/src/keymaps/Windows 10.keymap +++ b/src/keymaps/Windows 10.keymap @@ -57,3 +57,4 @@ ocr_image = string(default="win+alt+o") open_in_browser = string(default="alt+control+win+return") add_alias=string(default="") find = string(default="control+win+{") +vote=string(default="alt+win+shift+v") \ No newline at end of file diff --git a/src/keymaps/Windows11.keymap b/src/keymaps/Windows11.keymap index 6962bb50..518118f8 100644 --- a/src/keymaps/Windows11.keymap +++ b/src/keymaps/Windows11.keymap @@ -57,3 +57,4 @@ ocr_image = string(default="win+alt+o") open_in_browser = string(default="alt+control+win+return") add_alias=string(default="") find = string(default="control+win+{") +vote=string(default="alt+win+shift+v") \ No newline at end of file diff --git a/src/keymaps/default.keymap b/src/keymaps/default.keymap index fa5157e0..19d9ebc0 100644 --- a/src/keymaps/default.keymap +++ b/src/keymaps/default.keymap @@ -57,4 +57,5 @@ accountConfiguration = string(default="control+win+shift+o") update_buffer = string(default="control+win+shift+u") ocr_image = string(default="win+alt+o") open_in_browser = string(default="alt+control+win+return") -add_alias=string(default="") \ No newline at end of file +add_alias=string(default="") +vote=string(default="alt+win+shift+v") \ No newline at end of file diff --git a/src/keystrokeEditor/actions/mastodon.py b/src/keystrokeEditor/actions/mastodon.py index a52e172f..2dea1a9e 100644 --- a/src/keystrokeEditor/actions/mastodon.py +++ b/src/keystrokeEditor/actions/mastodon.py @@ -15,7 +15,7 @@ actions = { "remove_from_favourites": _(u"Remove post from favorites"), "toggle_like": _("Add/remove post from favorites"), "follow": _(u"Open the user actions dialogue"), -# "user_details": _(u"See user details"), + "user_details": _(u"See user details"), "view_item": _(u"Show post"), "exit": _(u"Quit"), "open_timeline": _(u"Open user timeline"),