(self, app)
| 1182 | |
| 1183 | # create application indicator |
| 1184 | def appIndicatorInit(self, app): |
| 1185 | self.initTrayIcon("can-icon-24px-red.png", app) |
| 1186 | traySignal = "activated(QSystemTrayIcon::ActivationReason)" |
| 1187 | QtCore.QObject.connect(self.tray, QtCore.SIGNAL( |
| 1188 | traySignal), self.__icon_activated) |
| 1189 | |
| 1190 | m = QtGui.QMenu() |
| 1191 | |
| 1192 | self.actionStatus = QtGui.QAction(_translate( |
| 1193 | "MainWindow", "Not Connected"), m, checkable=False) |
| 1194 | m.addAction(self.actionStatus) |
| 1195 | |
| 1196 | # separator |
| 1197 | actionSeparator = QtGui.QAction('', m, checkable=False) |
| 1198 | actionSeparator.setSeparator(True) |
| 1199 | m.addAction(actionSeparator) |
| 1200 | |
| 1201 | # show bitmessage |
| 1202 | self.actionShow = QtGui.QAction(_translate( |
| 1203 | "MainWindow", "Show Bitmessage"), m, checkable=True) |
| 1204 | self.actionShow.setChecked(not BMConfigParser().getboolean( |
| 1205 | 'bitmessagesettings', 'startintray')) |
| 1206 | self.actionShow.triggered.connect(self.appIndicatorShowOrHideWindow) |
| 1207 | if not sys.platform[0:3] == 'win': |
| 1208 | m.addAction(self.actionShow) |
| 1209 | |
| 1210 | # quiet mode |
| 1211 | self.actionQuiet = QtGui.QAction(_translate( |
| 1212 | "MainWindow", "Quiet Mode"), m, checkable=True) |
| 1213 | self.actionQuiet.setChecked(not BMConfigParser().getboolean( |
| 1214 | 'bitmessagesettings', 'showtraynotifications')) |
| 1215 | self.actionQuiet.triggered.connect(self.appIndicatorSwitchQuietMode) |
| 1216 | m.addAction(self.actionQuiet) |
| 1217 | |
| 1218 | # Send |
| 1219 | actionSend = QtGui.QAction(_translate( |
| 1220 | "MainWindow", "Send"), m, checkable=False) |
| 1221 | actionSend.triggered.connect(self.appIndicatorSend) |
| 1222 | m.addAction(actionSend) |
| 1223 | |
| 1224 | # Subscribe |
| 1225 | actionSubscribe = QtGui.QAction(_translate( |
| 1226 | "MainWindow", "Subscribe"), m, checkable=False) |
| 1227 | actionSubscribe.triggered.connect(self.appIndicatorSubscribe) |
| 1228 | m.addAction(actionSubscribe) |
| 1229 | |
| 1230 | # Channels |
| 1231 | actionSubscribe = QtGui.QAction(_translate( |
| 1232 | "MainWindow", "Channel"), m, checkable=False) |
| 1233 | actionSubscribe.triggered.connect(self.appIndicatorChannel) |
| 1234 | m.addAction(actionSubscribe) |
| 1235 | |
| 1236 | # separator |
| 1237 | actionSeparator = QtGui.QAction('', m, checkable=False) |
| 1238 | actionSeparator.setSeparator(True) |
| 1239 | m.addAction(actionSeparator) |
| 1240 | |
| 1241 | # Quit |
no test coverage detected