From f5e94866ef5ab9abb372fcc6b8454ac3b1420fb2 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 27 Nov 2020 18:31:20 -0300 Subject: [PATCH] [ui] adding tooltips for the install/uninstall buttons --- bauh/view/qt/apps_table.py | 16 +++++++++++++--- bauh/view/resources/locale/ca | 2 ++ bauh/view/resources/locale/de | 2 ++ bauh/view/resources/locale/en | 2 ++ bauh/view/resources/locale/es | 2 ++ bauh/view/resources/locale/fr | 2 ++ bauh/view/resources/locale/it | 2 ++ bauh/view/resources/locale/pt | 2 ++ bauh/view/resources/locale/ru | 2 ++ bauh/view/resources/locale/tr | 2 ++ 10 files changed, 31 insertions(+), 3 deletions(-) diff --git a/bauh/view/qt/apps_table.py b/bauh/view/qt/apps_table.py index cf46ce4c..44463bb1 100644 --- a/bauh/view/qt/apps_table.py +++ b/bauh/view/qt/apps_table.py @@ -300,13 +300,17 @@ class PackagesTable(QTableWidget): self.setCellWidget(pkg.table_index, 8, col_update) - def _gen_row_button(self, text: str, name: str, callback) -> QToolButton: + def _gen_row_button(self, text: str, name: str, callback, tip: Optional[str] = None) -> QToolButton: col_bt = QToolButton() col_bt.setProperty('text_only', 'true') col_bt.setObjectName(name) col_bt.setCursor(QCursor(Qt.PointingHandCursor)) col_bt.setText(text) col_bt.clicked.connect(callback) + + if tip: + col_bt.setToolTip(tip) + return col_bt def _set_col_installed(self, col: int, pkg: PackageView): @@ -318,7 +322,10 @@ class PackagesTable(QTableWidget): def uninstall(): self._uninstall(pkg) - item = self._gen_row_button(self.i18n['uninstall'].capitalize(), 'bt_uninstall', uninstall) + item = self._gen_row_button(text=self.i18n['uninstall'].capitalize(), + name='bt_uninstall', + callback=uninstall, + tip=self.i18n['manage_window.bt_uninstall.tip']) else: item = None @@ -326,7 +333,10 @@ class PackagesTable(QTableWidget): def install(): self._install_app(pkg) - item = self._gen_row_button(self.i18n['install'].capitalize(), 'bt_install', install) + item = self._gen_row_button(text=self.i18n['install'].capitalize(), + name='bt_install', + callback=install, + tip=self.i18n['manage_window.bt_install.tip']) else: item = None diff --git a/bauh/view/resources/locale/ca b/bauh/view/resources/locale/ca index 473107cb..033dd19b 100644 --- a/bauh/view/resources/locale/ca +++ b/bauh/view/resources/locale/ca @@ -296,11 +296,13 @@ manage_window.apps_table.row.actions.uninstall.popup.title=Desinstal·la manage_window.apps_table.upgrade_toggle.disabled.tooltip=But it is not possible to upgrade it. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Feu clic aquí per a marcar o desmarcar l’actualització. manage_window.apps_table.upgrade_toggle.tooltip=Hi ha una actualització d’aquesta aplicació. +manage_window.bt_install.tip=Click here to add this application to the device manage_window.bt.installed.text=instal·lada manage_window.bt.installed.tooltip=Feu clic aquí per a mostrar les aplicacions instal·lades manage_window.bt.refresh.text=Refresca manage_window.bt.refresh.tooltip=Carrega novament les dades quant a les aplicacions instal·lades manage_window.bt.suggestions.tooltip=Feu clic aquí per a mostrar alguns suggeriments d’aplicacions +manage_window.bt_uninstall.tip=Click here to remove this application from the device manage_window.bt.upgrade.text=Actualitza manage_window.bt.upgrade.tooltip=Actualitza totes les aplicacions marcades manage_window.bt_custom_actions.tip=Click here to show more actions diff --git a/bauh/view/resources/locale/de b/bauh/view/resources/locale/de index 28240714..acce8a67 100644 --- a/bauh/view/resources/locale/de +++ b/bauh/view/resources/locale/de @@ -295,11 +295,13 @@ manage_window.apps_table.row.actions.uninstall.popup.title=Deinstallieren manage_window.apps_table.upgrade_toggle.disabled.tooltip=But it is not possible to upgrade it. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Klicken Sie hier, um das Update zur Auswahl hinzuzufügen oder es zu entfernen. manage_window.apps_table.upgrade_toggle.tooltip=Für diese Anwendung ist ein Update verfügbar. +manage_window.bt_install.tip=Click here to add this application to the device manage_window.bt.installed.text=installiert manage_window.bt.installed.tooltip=Installierte Anwendungen anzeigen manage_window.bt.refresh.text=Aktualisieren manage_window.bt.refresh.tooltip=Informationen über installierte Anwendungen aktualisieren manage_window.bt.suggestions.tooltip=Vorschläge für Apps anzeigen +manage_window.bt_uninstall.tip=Click here to remove this application from the device manage_window.bt.upgrade.text=Upgraden manage_window.bt.upgrade.tooltip=Alle ausgewählten Anwendungen upgraden manage_window.bt_custom_actions.tip=Click here to show more actions diff --git a/bauh/view/resources/locale/en b/bauh/view/resources/locale/en index dfc83250..6022d3f3 100644 --- a/bauh/view/resources/locale/en +++ b/bauh/view/resources/locale/en @@ -296,11 +296,13 @@ manage_window.apps_table.row.actions.uninstall=Uninstall manage_window.apps_table.upgrade_toggle.disabled.tooltip=But it is not possible to upgrade it. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Click here to check or uncheck the update. manage_window.apps_table.upgrade_toggle.tooltip=There is an update for this application. +manage_window.bt_install.tip=Click here to add this application to the device manage_window.bt.installed.text=installed manage_window.bt.installed.tooltip=Click here to show the installed applications manage_window.bt.refresh.text=Refresh manage_window.bt.refresh.tooltip=Reload the data about installed applications manage_window.bt.suggestions.tooltip=Click here to show some applications suggestions +manage_window.bt_uninstall.tip=Click here to remove this application from the device manage_window.bt.upgrade.text=Upgrade manage_window.bt.upgrade.tooltip=Upgrade all checked applications manage_window.bt_custom_actions.tip=Click here to show more actions diff --git a/bauh/view/resources/locale/es b/bauh/view/resources/locale/es index 9d75459a..559709a7 100644 --- a/bauh/view/resources/locale/es +++ b/bauh/view/resources/locale/es @@ -297,11 +297,13 @@ manage_window.apps_table.row.actions.uninstall.popup.title=Desinstalación manage_window.apps_table.upgrade_toggle.disabled.tooltip=Pero no es posible actualizarla. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Pulse aquí para marcar o desmarcar la actualización. manage_window.apps_table.upgrade_toggle.tooltip=Hay una actualización para esta aplicación. +manage_window.bt_install.tip=Pulse aquí para agregar esta aplicación al dispositivo manage_window.bt.installed.text=instaladas manage_window.bt.installed.tooltip=Pulse aquí para mostrar las aplicaciones instaladas manage_window.bt.refresh.text=Recargar manage_window.bt.refresh.tooltip=Recarga los datos sobre las aplicaciones instaladas manage_window.bt.suggestions.tooltip=Pulse aquí para mostrar algunas sugerencias de aplicaciones +manage_window.bt_uninstall.tip=Pulse aquí para eliminar esta aplicación del dispositivo manage_window.bt.upgrade.text=Actualizar manage_window.bt.upgrade.tooltip=Actualiza todas las aplicaciones marcadas manage_window.bt_custom_actions.tip=Pulse aquí para mostrar más acciones diff --git a/bauh/view/resources/locale/fr b/bauh/view/resources/locale/fr index 3c44651a..c61d00e3 100644 --- a/bauh/view/resources/locale/fr +++ b/bauh/view/resources/locale/fr @@ -293,12 +293,14 @@ manage_window.apps_table.row.actions.uninstall=Désinstaller manage_window.apps_table.upgrade_toggle.disabled.tooltip=Mais la mise à jour est impossible. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Cliquez ici pour activer la mise à jour ou non. manage_window.apps_table.upgrade_toggle.tooltip=Cette application peut être mise à jour. +manage_window.bt_install.tip=Click here to add this application to the device manage_window.bt.installed.text=installé manage_window.bt.installed.tooltip=Cliquez ici pour afficher les applications installées manage_window.bt.refresh.text=Actualiser manage_window.bt.refresh.tooltip=Recharger les informations sur les applications installées manage_window.bt.suggestions.text=Suggestions manage_window.bt.suggestions.tooltip=Cliquez ici pour des suggestions d'applications +manage_window.bt_uninstall.tip=Click here to remove this application from the device manage_window.bt.upgrade.text=Mettre à jour manage_window.bt.upgrade.tooltip=Mettre à jour toutes les applications sélectionnées manage_window.bt_custom_actions.tip=Cliquez ici pour plus d'actions diff --git a/bauh/view/resources/locale/it b/bauh/view/resources/locale/it index b833aaba..d826458f 100644 --- a/bauh/view/resources/locale/it +++ b/bauh/view/resources/locale/it @@ -297,11 +297,13 @@ manage_window.apps_table.row.actions.uninstall.popup.title=Disinstalla manage_window.apps_table.upgrade_toggle.disabled.tooltip=But it is not possible to upgrade it. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Fai clic qui per selezionare o deselezionare l'aggiornamento. manage_window.apps_table.upgrade_toggle.tooltip=C'è un aggiornamento per questa applicazione. +manage_window.bt_install.tip=Click here to add this application to the device manage_window.bt.installed.text=installato manage_window.bt.installed.tooltip=Clicca qui per mostrare le applicazioni installate manage_window.bt.refresh.text=Refresh manage_window.bt.refresh.tooltip=Ricarica i dati sulle applicazioni installate manage_window.bt.suggestions.tooltip=Clicca qui per mostrare alcuni suggerimenti sulle applicazioni +manage_window.bt_uninstall.tip=Click here to remove this application from the device manage_window.bt.upgrade.text=Aggiorna manage_window.bt.upgrade.tooltip=Aggiorna tutte le applicazioni controllate manage_window.bt_custom_actions.tip=Click here to show more actions diff --git a/bauh/view/resources/locale/pt b/bauh/view/resources/locale/pt index 71d2f5a1..a4e86aa5 100644 --- a/bauh/view/resources/locale/pt +++ b/bauh/view/resources/locale/pt @@ -296,11 +296,13 @@ manage_window.apps_table.row.actions.uninstall=Desinstalar manage_window.apps_table.upgrade_toggle.disabled.tooltip=Porém não é possível atualiza-lo. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Clique aqui para marcar ou desmarcar a atualização. manage_window.apps_table.upgrade_toggle.tooltip=Existe um atualização para esse aplicativo. +manage_window.bt_install.tip=Clique aqui para adicionar este aplicativo ao dispositivo manage_window.bt.installed.text=instalados manage_window.bt.installed.tooltip=Clique aqui para exibir os aplicativos instalados manage_window.bt.refresh.text=Recarregar manage_window.bt.refresh.tooltip=Recarrega os dados sobre os aplicativos instalados manage_window.bt.suggestions.tooltip=Clique aqui para exibir algumas sugestões de aplicativos +manage_window.bt_uninstall.tip=Clique aqui para remover esse aplicativo do dispositivo manage_window.bt.upgrade.text=Atualizar manage_window.bt.upgrade.tooltip=Atualiza todos os aplicativos marcados manage_window.bt_custom_actions.tip=Clique aqui para exibir mais ações diff --git a/bauh/view/resources/locale/ru b/bauh/view/resources/locale/ru index 85ea3b55..fcdd0df4 100644 --- a/bauh/view/resources/locale/ru +++ b/bauh/view/resources/locale/ru @@ -295,11 +295,13 @@ manage_window.apps_table.row.actions.uninstall.popup.title=Удаление manage_window.apps_table.upgrade_toggle.disabled.tooltip=Но обновить его невозможно. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Нажмите здесь, чтобы поставить или снять флажок обновления. manage_window.apps_table.upgrade_toggle.tooltip=Есть обновление для этого приложения. +manage_window.bt_install.tip=Click here to add this application to the device manage_window.bt.installed.text=Установленные manage_window.bt.installed.tooltip=Нажмите здесь, чтобы показать установленные приложения manage_window.bt.refresh.text=Обновить список manage_window.bt.refresh.tooltip=Перезагрузите данные об установленных приложениях manage_window.bt.suggestions.tooltip=Нажмите здесь, чтобы показать некоторые рекомендаваные приложения +manage_window.bt_uninstall.tip=Click here to remove this application from the device manage_window.bt.upgrade.text=Обновление manage_window.bt.upgrade.tooltip=Обновить все выбранные приложения manage_window.bt_custom_actions.tip=Нажмите здесь, чтобы показать больше действий diff --git a/bauh/view/resources/locale/tr b/bauh/view/resources/locale/tr index adbae589..f20ea155 100644 --- a/bauh/view/resources/locale/tr +++ b/bauh/view/resources/locale/tr @@ -295,11 +295,13 @@ manage_window.apps_table.row.actions.uninstall=Kaldır manage_window.apps_table.upgrade_toggle.disabled.tooltip=Ancak yükseltmek mümkün değildir. manage_window.apps_table.upgrade_toggle.enabled.tooltip=Güncellemeyi kontrol etmek veya etmemek için buraya tıklayın manage_window.apps_table.upgrade_toggle.tooltip=Bu uygulama için bir güncelleme var. +manage_window.bt_install.tip=Click here to add this application to the device manage_window.bt.installed.text=yüklü manage_window.bt.installed.tooltip=Yüklü uygulamaları görmek için burayı tıkla manage_window.bt.refresh.text=Yenile manage_window.bt.refresh.tooltip=Yüklü uygulamalar hakkındaki verileri yeniden yükle manage_window.bt.suggestions.tooltip=Bazı uygulama önerileri için burayı tıkla +manage_window.bt_uninstall.tip=Click here to remove this application from the device manage_window.bt.upgrade.text=Yükselt manage_window.bt.upgrade.tooltip=İşaretli tüm uygulamaları yükseltin manage_window.bt_custom_actions.tip=Daha fazla eylem için burayı tıkla