diff --git a/basilisk/gui/main_frame.py b/basilisk/gui/main_frame.py index 8c5d95e..d853488 100644 --- a/basilisk/gui/main_frame.py +++ b/basilisk/gui/main_frame.py @@ -54,16 +54,6 @@ def update_item_label_suffix(item: wx.MenuItem, suffix: str = "..."): item.SetItemLabel(item.GetItemLabel() + suffix) menu_bar = wx.MenuBar() - self.manage_profile_item = wx.MenuItem( - id=wx.ID_ANY, - # Translators: A label for a menu item to manage conversation profiles - text=_("Manage conversation &profiles") + "...\tCtrl+Shift+P", - ) - self.Bind( - wx.EVT_MENU, - self.on_manage_conversation_profiles, - self.manage_profile_item, - ) conversation_menu = wx.Menu() @@ -160,7 +150,7 @@ def update_item_label_suffix(item: wx.MenuItem, suffix: str = "..."): _("Manage &accounts") + "...\tCtrl+Shift+A", ) self.Bind(wx.EVT_MENU, self.on_manage_accounts, manage_accounts_item) - tool_menu.Append(self.manage_profile_item) + tool_menu.Append(self.build_manage_profile_item()) preferences_item = tool_menu.Append(wx.ID_PREFERENCES) self.Bind(wx.EVT_MENU, self.on_preferences, preferences_item) update_item_label_suffix(preferences_item, "...\tCtrl+,") @@ -631,6 +621,19 @@ def show_dialog(): wx.CallAfter(show_dialog) + def build_manage_profile_item(self) -> wx.MenuItem: + manage_profile_item = wx.MenuItem( + id=wx.ID_ANY, + # Translators: A label for a menu item to manage conversation profiles + text=_("Manage conversation &profiles") + "...\tCtrl+Shift+P", + ) + self.Bind( + wx.EVT_MENU, + self.on_manage_conversation_profiles, + manage_profile_item, + ) + return manage_profile_item + def build_profile_menu(self, event_handler) -> wx.Menu: """ Build the conversation profile menu. @@ -642,7 +645,7 @@ def build_profile_menu(self, event_handler) -> wx.Menu: profile_item = profile_menu.Append(wx.ID_ANY, profile.name) self.Bind(wx.EVT_MENU, event_handler, profile_item) profile_menu.AppendSeparator() - profile_menu.Append(self.manage_profile_item) + profile_menu.Append(self.build_manage_profile_item()) return profile_menu def build_name_conversation_menu(self) -> wx.Menu: