Access pesterlogs from memos. Fix forgotten theme changing texts
This commit is contained in:
parent
63fe5fc612
commit
34cce3a80e
2 changed files with 22 additions and 4 deletions
1
convo.py
1
convo.py
|
@ -595,6 +595,7 @@ class PesterConvo(QtGui.QFrame):
|
||||||
self.addChumAction.setText(self.mainwindow.theme["main/menus/rclickchumlist/addchum"])
|
self.addChumAction.setText(self.mainwindow.theme["main/menus/rclickchumlist/addchum"])
|
||||||
self.blockAction.setText(self.mainwindow.theme["main/menus/rclickchumlist/blockchum"])
|
self.blockAction.setText(self.mainwindow.theme["main/menus/rclickchumlist/blockchum"])
|
||||||
self.unblockchum.setText(self.mainwindow.theme["main/menus/rclickchumlist/unblockchum"])
|
self.unblockchum.setText(self.mainwindow.theme["main/menus/rclickchumlist/unblockchum"])
|
||||||
|
self.logchum.setText(self.mainwindow.theme["main/menus/rclickchumlist/viewlog"])
|
||||||
|
|
||||||
self.textArea.changeTheme(theme)
|
self.textArea.changeTheme(theme)
|
||||||
self.textInput.changeTheme(theme)
|
self.textInput.changeTheme(theme)
|
||||||
|
|
17
memos.py
17
memos.py
|
@ -9,6 +9,7 @@ from generic import PesterIcon, RightClickList, mysteryTime
|
||||||
from convo import PesterConvo, PesterInput, PesterText, PesterTabWindow
|
from convo import PesterConvo, PesterInput, PesterText, PesterTabWindow
|
||||||
from parsetools import convertTags, addTimeInitial, timeProtocol, \
|
from parsetools import convertTags, addTimeInitial, timeProtocol, \
|
||||||
lexMessage, colorBegin, colorEnd, mecmd
|
lexMessage, colorBegin, colorEnd, mecmd
|
||||||
|
from logviewer import PesterLogViewer
|
||||||
|
|
||||||
|
|
||||||
def delta2txt(d, format="pc"):
|
def delta2txt(d, format="pc"):
|
||||||
|
@ -350,7 +351,11 @@ class PesterMemo(PesterConvo):
|
||||||
self.quirksOff.setCheckable(True)
|
self.quirksOff.setCheckable(True)
|
||||||
self.connect(self.quirksOff, QtCore.SIGNAL('toggled(bool)'),
|
self.connect(self.quirksOff, QtCore.SIGNAL('toggled(bool)'),
|
||||||
self, QtCore.SLOT('toggleQuirks(bool)'))
|
self, QtCore.SLOT('toggleQuirks(bool)'))
|
||||||
|
self.logchum = QtGui.QAction(self.mainwindow.theme["main/menus/rclickchumlist/viewlog"], self)
|
||||||
|
self.connect(self.logchum, QtCore.SIGNAL('triggered()'),
|
||||||
|
self, QtCore.SLOT('openChumLogs()'))
|
||||||
self.optionsMenu.addAction(self.quirksOff)
|
self.optionsMenu.addAction(self.quirksOff)
|
||||||
|
self.optionsMenu.addAction(self.logchum)
|
||||||
|
|
||||||
self.timeslider = TimeSlider(QtCore.Qt.Horizontal, self)
|
self.timeslider = TimeSlider(QtCore.Qt.Horizontal, self)
|
||||||
self.timeinput = TimeInput(self.timeslider, self)
|
self.timeinput = TimeInput(self.timeslider, self)
|
||||||
|
@ -471,6 +476,8 @@ class PesterMemo(PesterConvo):
|
||||||
self.addchumAction.setText(theme["main/menus/rclickchumlist/addchum"])
|
self.addchumAction.setText(theme["main/menus/rclickchumlist/addchum"])
|
||||||
self.banuserAction.setText(theme["main/menus/rclickchumlist/banuser"])
|
self.banuserAction.setText(theme["main/menus/rclickchumlist/banuser"])
|
||||||
self.opAction.setText(theme["main/menus/rclickchumlist/opuser"])
|
self.opAction.setText(theme["main/menus/rclickchumlist/opuser"])
|
||||||
|
self.quirksOff.setText(theme["main/menus/rclickchumlist/quirksoff"])
|
||||||
|
self.logchum.setText(theme["main/menus/rclickchumlist/viewlog"])
|
||||||
|
|
||||||
self.timeinput.setFixedWidth(theme["memos/time/text/width"])
|
self.timeinput.setFixedWidth(theme["memos/time/text/width"])
|
||||||
self.timeinput.setStyleSheet(theme["memos/time/text/style"])
|
self.timeinput.setStyleSheet(theme["memos/time/text/style"])
|
||||||
|
@ -730,6 +737,16 @@ class PesterMemo(PesterConvo):
|
||||||
if send:
|
if send:
|
||||||
self.sendtime()
|
self.sendtime()
|
||||||
|
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
|
def openChumLogs(self):
|
||||||
|
currentChum = self.channel
|
||||||
|
self.mainwindow.chumList.pesterlogviewer = PesterLogViewer(currentChum, self.mainwindow.config, self.mainwindow.theme, self.mainwindow)
|
||||||
|
self.connect(self.mainwindow.chumList.pesterlogviewer, QtCore.SIGNAL('rejected()'),
|
||||||
|
self.mainwindow.chumList, QtCore.SLOT('closeActiveLog()'))
|
||||||
|
self.mainwindow.chumList.pesterlogviewer.show()
|
||||||
|
self.mainwindow.chumList.pesterlogviewer.raise_()
|
||||||
|
self.mainwindow.chumList.pesterlogviewer.activateWindow()
|
||||||
|
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
def sendtime(self):
|
def sendtime(self):
|
||||||
me = self.mainwindow.profile()
|
me = self.mainwindow.profile()
|
||||||
|
|
Loading…
Reference in a new issue