From c1784bb533050f8d2ac1845a12f1526157e379d7 Mon Sep 17 00:00:00 2001 From: digital dreamer Date: Sun, 28 Dec 2014 11:42:38 +0100 Subject: [PATCH 1/3] Retranslate context menus after language switch --- src/bitmessageqt/__init__.py | 60 +++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index ec4452f8..af595a48 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -233,7 +233,7 @@ class MyForm(QtGui.QMainWindow): QtCore.QObject.connect(self.ui.actionHelp, QtCore.SIGNAL( "triggered()"), self.click_actionHelp) - def init_inbox_popup_menu(self): + def init_inbox_popup_menu(self, connectSignal=True): # Popup menu for the Inbox tab self.ui.inboxContextMenuToolbar = QtGui.QToolBar() # Actions @@ -259,9 +259,10 @@ class MyForm(QtGui.QMainWindow): "MainWindow", "Mark Unread"), self.on_action_InboxMarkUnread) self.ui.tableWidgetInbox.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) - self.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL( - 'customContextMenuRequested(const QPoint&)'), - self.on_context_menuInbox) + if connectSignal: + self.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL( + 'customContextMenuRequested(const QPoint&)'), + self.on_context_menuInbox) self.popMenuInbox = QtGui.QMenu(self) self.popMenuInbox.addAction(self.actionForceHtml) self.popMenuInbox.addAction(self.actionMarkUnread) @@ -272,7 +273,7 @@ class MyForm(QtGui.QMainWindow): self.popMenuInbox.addAction(self.actionSaveMessageAs) self.popMenuInbox.addAction(self.actionTrashInboxMessage) - def init_identities_popup_menu(self): + def init_identities_popup_menu(self, connectSignal=True): # Popup menu for the Your Identities tab self.ui.addressContextMenuToolbar = QtGui.QToolBar() # Actions @@ -298,9 +299,10 @@ class MyForm(QtGui.QMainWindow): self.on_action_SpecialAddressBehaviorDialog) self.ui.tableWidgetYourIdentities.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) - self.connect(self.ui.tableWidgetYourIdentities, QtCore.SIGNAL( - 'customContextMenuRequested(const QPoint&)'), - self.on_context_menuYourIdentities) + if connectSignal: + self.connect(self.ui.tableWidgetYourIdentities, QtCore.SIGNAL( + 'customContextMenuRequested(const QPoint&)'), + self.on_context_menuYourIdentities) self.popMenu = QtGui.QMenu(self) self.popMenu.addAction(self.actionNew) self.popMenu.addSeparator() @@ -311,7 +313,7 @@ class MyForm(QtGui.QMainWindow): self.popMenu.addAction(self.actionSetAvatar) self.popMenu.addAction(self.actionSpecialAddressBehavior) - def init_addressbook_popup_menu(self): + def init_addressbook_popup_menu(self, connectSignal=True): # Popup menu for the Address Book page self.ui.addressBookContextMenuToolbar = QtGui.QToolBar() # Actions @@ -339,9 +341,10 @@ class MyForm(QtGui.QMainWindow): "MainWindow", "Delete"), self.on_action_AddressBookDelete) self.ui.tableWidgetAddressBook.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) - self.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL( - 'customContextMenuRequested(const QPoint&)'), - self.on_context_menuAddressBook) + if connectSignal: + self.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL( + 'customContextMenuRequested(const QPoint&)'), + self.on_context_menuAddressBook) self.popMenuAddressBook = QtGui.QMenu(self) self.popMenuAddressBook.addAction(self.actionAddressBookSend) self.popMenuAddressBook.addAction(self.actionAddressBookClipboard) @@ -351,7 +354,7 @@ class MyForm(QtGui.QMainWindow): self.popMenuAddressBook.addAction(self.actionAddressBookNew) self.popMenuAddressBook.addAction(self.actionAddressBookDelete) - def init_subscriptions_popup_menu(self): + def init_subscriptions_popup_menu(self, connectSignal=True): # Popup menu for the Subscriptions page self.ui.subscriptionsContextMenuToolbar = QtGui.QToolBar() # Actions @@ -374,9 +377,10 @@ class MyForm(QtGui.QMainWindow): self.on_action_SubscriptionsSetAvatar) self.ui.tableWidgetSubscriptions.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) - self.connect(self.ui.tableWidgetSubscriptions, QtCore.SIGNAL( - 'customContextMenuRequested(const QPoint&)'), - self.on_context_menuSubscriptions) + if connectSignal: + self.connect(self.ui.tableWidgetSubscriptions, QtCore.SIGNAL( + 'customContextMenuRequested(const QPoint&)'), + self.on_context_menuSubscriptions) self.popMenuSubscriptions = QtGui.QMenu(self) self.popMenuSubscriptions.addAction(self.actionsubscriptionsNew) self.popMenuSubscriptions.addAction(self.actionsubscriptionsDelete) @@ -387,7 +391,7 @@ class MyForm(QtGui.QMainWindow): self.popMenuSubscriptions.addSeparator() self.popMenuSubscriptions.addAction(self.actionsubscriptionsClipboard) - def init_sent_popup_menu(self): + def init_sent_popup_menu(self, connectSignal=True): # Popup menu for the Sent page self.ui.sentContextMenuToolbar = QtGui.QToolBar() # Actions @@ -403,14 +407,15 @@ class MyForm(QtGui.QMainWindow): "MainWindow", "Force send"), self.on_action_ForceSend) self.ui.tableWidgetSent.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) - self.connect(self.ui.tableWidgetSent, QtCore.SIGNAL( - 'customContextMenuRequested(const QPoint&)'), - self.on_context_menuSent) + if connectSignal: + self.connect(self.ui.tableWidgetSent, QtCore.SIGNAL( + 'customContextMenuRequested(const QPoint&)'), + self.on_context_menuSent) # self.popMenuSent = QtGui.QMenu( self ) # self.popMenuSent.addAction( self.actionSentClipboard ) # self.popMenuSent.addAction( self.actionTrashSentMessage ) - def init_blacklist_popup_menu(self): + def init_blacklist_popup_menu(self, connectSignal=True): # Popup menu for the Blacklist page self.ui.blacklistContextMenuToolbar = QtGui.QToolBar() # Actions @@ -436,9 +441,10 @@ class MyForm(QtGui.QMainWindow): self.on_action_BlacklistSetAvatar) self.ui.tableWidgetBlacklist.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) - self.connect(self.ui.tableWidgetBlacklist, QtCore.SIGNAL( - 'customContextMenuRequested(const QPoint&)'), - self.on_context_menuBlacklist) + if connectSignal: + self.connect(self.ui.tableWidgetBlacklist, QtCore.SIGNAL( + 'customContextMenuRequested(const QPoint&)'), + self.on_context_menuBlacklist) self.popMenuBlacklist = QtGui.QMenu(self) # self.popMenuBlacklist.addAction( self.actionBlacklistNew ) self.popMenuBlacklist.addAction(self.actionBlacklistDelete) @@ -1436,6 +1442,12 @@ class MyForm(QtGui.QMainWindow): def changeEvent(self, event): if event.type() == QtCore.QEvent.LanguageChange: self.ui.retranslateUi(self) + self.init_inbox_popup_menu(False) + self.init_identities_popup_menu(False) + self.init_addressbook_popup_menu(False) + self.init_subscriptions_popup_menu(False) + self.init_sent_popup_menu(False) + self.init_blacklist_popup_menu(False) if event.type() == QtCore.QEvent.WindowStateChange: if self.windowState() & QtCore.Qt.WindowMinimized: self.actionShow.setChecked(False) -- 2.45.1 From c379978f3e59043acbbc1414243b747748c67259 Mon Sep 17 00:00:00 2001 From: themighty1 Date: Wed, 7 Jan 2015 01:55:01 +0300 Subject: [PATCH 2/3] fix minimize-to-tray linux --- src/bitmessageqt/__init__.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index ec4452f8..c45197b6 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1438,18 +1438,16 @@ class MyForm(QtGui.QMainWindow): self.ui.retranslateUi(self) if event.type() == QtCore.QEvent.WindowStateChange: if self.windowState() & QtCore.Qt.WindowMinimized: - self.actionShow.setChecked(False) - if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: - if event.type() == QtCore.QEvent.WindowStateChange: - if self.windowState() & QtCore.Qt.WindowMinimized: + if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: self.appIndicatorHide() if 'win32' in sys.platform or 'win64' in sys.platform: - self.setWindowFlags(Qt.ToolTip) - elif event.oldState() & QtCore.Qt.WindowMinimized: - # The window state has just been changed to - # Normal/Maximised/FullScreen - pass - # QtGui.QWidget.changeEvent(self, event) + self.setWindowFlags(Qt.ToolTip) + elif event.oldState() & QtCore.Qt.WindowMinimized: + # The window state has just been changed to + # Normal/Maximised/FullScreen + pass + # QtGui.QWidget.changeEvent(self, event) + def __icon_activated(self, reason): if reason == QtGui.QSystemTrayIcon.Trigger: @@ -3437,9 +3435,6 @@ class settingsDialog(QtGui.QDialog): self.ui.checkBoxStartOnLogon.setDisabled(True) self.ui.checkBoxStartOnLogon.setText(_translate( "MainWindow", "Start-on-login not yet supported on your OS.")) - self.ui.checkBoxMinimizeToTray.setDisabled(True) - self.ui.checkBoxMinimizeToTray.setText(_translate( - "MainWindow", "Minimize-to-tray not yet supported on your OS.")) # On the Network settings tab: self.ui.lineEditTCPPort.setText(str( shared.config.get('bitmessagesettings', 'port'))) -- 2.45.1 From f645dad56c8361b0c73c12b8663b8938522ddd1c Mon Sep 17 00:00:00 2001 From: Andrew Lott Date: Thu, 8 Jan 2015 00:33:04 +0000 Subject: [PATCH 3/3] Update bitmessage_nl.ts added some unfinished tranlations --- src/translations/bitmessage_nl.ts | 68 +++++++++++++++---------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/translations/bitmessage_nl.ts b/src/translations/bitmessage_nl.ts index 654d993a..54237fdd 100644 --- a/src/translations/bitmessage_nl.ts +++ b/src/translations/bitmessage_nl.ts @@ -44,7 +44,7 @@ View HTML code as formatted text - + Bekijk HTML als geformatteerde tekst @@ -84,7 +84,7 @@ Send message to this address - + Stuur bericht naar dit adres @@ -94,7 +94,7 @@ Add New Address - + Nieuw adres toevoegen @@ -104,7 +104,7 @@ Copy destination address to clipboard - + Kopieer bestemmingsadres naar klembord @@ -139,7 +139,7 @@ Message sent. Waiting for acknowledgement. Sent at %1 - + Bericht verzonden. Wachten op bevestiging. Verzonden op %1 @@ -154,7 +154,7 @@ Acknowledgement of the message received %1 - + Bevestiging van het bericht ontvangen op %1 @@ -184,7 +184,7 @@ Unknown status: %1 %2 - + Status onbekend: %1 %2 @@ -204,7 +204,7 @@ Subscribe - + Abonneer @@ -231,7 +231,7 @@ It is important that you back up this file. Open keys.dat? - + keys.dat openen? @@ -288,7 +288,7 @@ It is important that you back up this file. Would you like to open the file now? Success - + Gelukt @@ -298,7 +298,7 @@ It is important that you back up this file. Would you like to open the file now? Address too new - + Adres te nieuw @@ -313,7 +313,7 @@ It is important that you back up this file. Would you like to open the file now? That Bitmessage address is not valid. - + Dat Bitmessage adres is niet geldig. @@ -333,17 +333,17 @@ It is important that you back up this file. Would you like to open the file now? Processed %1 person-to-person messages. - + Verwerkt %1 peer-to-peer-bericht(en). Processed %1 broadcast messages. - + Verwerkt %1 broadcast-bericht(en). Processed %1 public keys. - + Verwerkt %1 publieke sleutel(s). @@ -408,7 +408,7 @@ It is important that you back up this file. Would you like to open the file now? Address version number - + Adres versienummer @@ -458,7 +458,7 @@ It is important that you back up this file. Would you like to open the file now? From - Van + Van @@ -468,7 +468,7 @@ It is important that you back up this file. Would you like to open the file now? The address you entered was invalid. Ignoring it. - + Het ingevoerd adres is ongeldig. Worden genegeerd. @@ -568,7 +568,7 @@ It is important that you back up this file. Would you like to open the file now? No addresses selected. - Geen adressen geselecteerd + Geen adressen geselecteerd. @@ -733,7 +733,7 @@ It is important that you back up this file. Would you like to open the file now? Your Identities - Je identiteiten + Uw identiteiten @@ -803,22 +803,22 @@ It is important that you back up this file. Would you like to open the file now? Processed 0 person-to-person message. - + Verwerkt 0 peer-to-peer-bericht. Processed 0 public key. - + Verwerkt 0 broadcast-bericht. Processed 0 broadcast. - + Verwerkt 0 publieke sleutel. Network Status - + netwerkstatus @@ -848,7 +848,7 @@ It is important that you back up this file. Would you like to open the file now? Ctrl+Q - Ctrrl+Q + Ctrl+Q @@ -883,7 +883,7 @@ It is important that you back up this file. Would you like to open the file now? Bad address version number - + Slechte adres versienummer @@ -1150,7 +1150,7 @@ The 'Random Number' option is selected by default but deterministic ad About - + Over @@ -1173,7 +1173,7 @@ The 'Random Number' option is selected by default but deterministic ad Bitmessage - + Bitmessage @@ -1528,7 +1528,7 @@ The 'Random Number' option is selected by default but deterministic ad Password: - + Wachtwoord @@ -1563,7 +1563,7 @@ The 'Random Number' option is selected by default but deterministic ad Interface Language - + Interface Taal @@ -1633,22 +1633,22 @@ The 'Random Number' option is selected by default but deterministic ad Give up after - + Opgeven na and - + en days - + dagen months. - + maanden. -- 2.45.1