Button for logs directory
This commit is contained in:
parent
e420d4e97d
commit
e580fc4b11
2 changed files with 13 additions and 0 deletions
|
@ -58,6 +58,7 @@ CHANGELOG
|
||||||
* Display channel mode change message - Kiooeht [evacipatedBox]
|
* Display channel mode change message - Kiooeht [evacipatedBox]
|
||||||
* Disable quirks in +c memos - Lexi [lexicalNuance]
|
* Disable quirks in +c memos - Lexi [lexicalNuance]
|
||||||
* Founder, admin, and halfop support - Kiooeht [evacipatedBox]
|
* Founder, admin, and halfop support - Kiooeht [evacipatedBox]
|
||||||
|
* Button for direct access to logs directory - Kiooeht [evacipatedBox]
|
||||||
* Bug fixes
|
* Bug fixes
|
||||||
* Logviewer updates - Kiooeht [evacipatedBox]
|
* Logviewer updates - Kiooeht [evacipatedBox]
|
||||||
* Memo scrollbar thing - Kiooeht [evacipatedBox]
|
* Memo scrollbar thing - Kiooeht [evacipatedBox]
|
||||||
|
|
12
logviewer.py
12
logviewer.py
|
@ -83,12 +83,16 @@ class PesterLogUserSelect(QtGui.QDialog):
|
||||||
layout_ok = QtGui.QHBoxLayout()
|
layout_ok = QtGui.QHBoxLayout()
|
||||||
layout_ok.addWidget(self.cancel)
|
layout_ok.addWidget(self.cancel)
|
||||||
layout_ok.addWidget(self.ok)
|
layout_ok.addWidget(self.ok)
|
||||||
|
self.directory = QtGui.QPushButton("LOG DIRECTORY", self)
|
||||||
|
self.connect(self.directory, QtCore.SIGNAL('clicked()'),
|
||||||
|
self, QtCore.SLOT('openDir()'))
|
||||||
|
|
||||||
layout_0 = QtGui.QVBoxLayout()
|
layout_0 = QtGui.QVBoxLayout()
|
||||||
layout_0.addWidget(instructions)
|
layout_0.addWidget(instructions)
|
||||||
layout_0.addWidget(self.chumsBox)
|
layout_0.addWidget(self.chumsBox)
|
||||||
layout_0.addWidget(self.search)
|
layout_0.addWidget(self.search)
|
||||||
layout_0.addLayout(layout_ok)
|
layout_0.addLayout(layout_ok)
|
||||||
|
layout_0.addWidget(self.directory)
|
||||||
|
|
||||||
self.setLayout(layout_0)
|
self.setLayout(layout_0)
|
||||||
|
|
||||||
|
@ -119,6 +123,14 @@ class PesterLogUserSelect(QtGui.QDialog):
|
||||||
self.pesterlogviewer.close()
|
self.pesterlogviewer.close()
|
||||||
self.pesterlogviewer = None
|
self.pesterlogviewer = None
|
||||||
|
|
||||||
|
@QtCore.pyqtSlot()
|
||||||
|
def openDir(self):
|
||||||
|
if sys.platform == "darwin":
|
||||||
|
_datadir = os.path.join(str(QtGui.QDesktopServices.storageLocation(QtGui.QDesktopServices.DataLocation)),"Pesterchum/")
|
||||||
|
QtGui.QDesktopServices.openUrl(QtCore.QUrl("file:///" + os.path.join(_datadir, "logs"), QtCore.QUrl.TolerantMode))
|
||||||
|
else:
|
||||||
|
QtGui.QDesktopServices.openUrl(QtCore.QUrl("file:///" + os.path.join(os.getcwd(), "logs"), QtCore.QUrl.TolerantMode))
|
||||||
|
|
||||||
class PesterLogViewer(QtGui.QDialog):
|
class PesterLogViewer(QtGui.QDialog):
|
||||||
def __init__(self, chum, config, theme, parent):
|
def __init__(self, chum, config, theme, parent):
|
||||||
QtGui.QDialog.__init__(self, parent)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
|
|
Loading…
Reference in a new issue