Separate convo and memo tabbed/untabbed
This commit is contained in:
parent
6dacc4c4de
commit
d525790897
5 changed files with 45 additions and 12 deletions
|
@ -38,6 +38,7 @@ CHANGELOG
|
||||||
* Low-bandwidth mode - Kiooeht [evacipatedBox] (Idea: [canLover])
|
* Low-bandwidth mode - Kiooeht [evacipatedBox] (Idea: [canLover])
|
||||||
* New smilies - Kiooeht [evacipatedBox]
|
* New smilies - Kiooeht [evacipatedBox]
|
||||||
* Refresh theme in options - Kiooeht [evacipatedBox]
|
* Refresh theme in options - Kiooeht [evacipatedBox]
|
||||||
|
* Separate tabbed/untabbed windows for conversaions and memos - Kiooeht [evacipatedBox]
|
||||||
* Bug fixes
|
* Bug fixes
|
||||||
* Don't delete random chum when blocking someone not on chumroll - Kiooeht [evacipatedBox]
|
* Don't delete random chum when blocking someone not on chumroll - Kiooeht [evacipatedBox]
|
||||||
* Openning global userlist doesn't reset OP status of memo users - Kiooeht [evacipatedBox]
|
* Openning global userlist doesn't reset OP status of memo users - Kiooeht [evacipatedBox]
|
||||||
|
|
|
@ -24,7 +24,6 @@ Features
|
||||||
* "Pester" menu option to just pester a handle
|
* "Pester" menu option to just pester a handle
|
||||||
* Auto-login Nickserv
|
* Auto-login Nickserv
|
||||||
* Make toast notifications only on certain chums
|
* Make toast notifications only on certain chums
|
||||||
* Separate tabbed/untabbed memos and convos
|
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
----
|
----
|
||||||
|
|
4
menus.py
4
menus.py
|
@ -1021,6 +1021,9 @@ class PesterOptions(QtGui.QDialog):
|
||||||
self.tabcheck = QtGui.QCheckBox("Tabbed Conversations", self)
|
self.tabcheck = QtGui.QCheckBox("Tabbed Conversations", self)
|
||||||
if self.config.tabs():
|
if self.config.tabs():
|
||||||
self.tabcheck.setChecked(True)
|
self.tabcheck.setChecked(True)
|
||||||
|
self.tabmemocheck = QtGui.QCheckBox("Tabbed Memos", self)
|
||||||
|
if self.config.tabMemos():
|
||||||
|
self.tabmemocheck.setChecked(True)
|
||||||
self.hideOffline = QtGui.QCheckBox("Hide Offline Chums", self)
|
self.hideOffline = QtGui.QCheckBox("Hide Offline Chums", self)
|
||||||
if self.config.hideOfflineChums():
|
if self.config.hideOfflineChums():
|
||||||
self.hideOffline.setChecked(True)
|
self.hideOffline.setChecked(True)
|
||||||
|
@ -1278,6 +1281,7 @@ class PesterOptions(QtGui.QDialog):
|
||||||
layout_interface = QtGui.QVBoxLayout(widget)
|
layout_interface = QtGui.QVBoxLayout(widget)
|
||||||
layout_interface.setAlignment(QtCore.Qt.AlignTop)
|
layout_interface.setAlignment(QtCore.Qt.AlignTop)
|
||||||
layout_interface.addWidget(self.tabcheck)
|
layout_interface.addWidget(self.tabcheck)
|
||||||
|
layout_interface.addWidget(self.tabmemocheck)
|
||||||
layout_interface.addLayout(layout_mini)
|
layout_interface.addLayout(layout_mini)
|
||||||
layout_interface.addLayout(layout_close)
|
layout_interface.addLayout(layout_close)
|
||||||
layout_interface.addWidget(self.pesterBlink)
|
layout_interface.addWidget(self.pesterBlink)
|
||||||
|
|
|
@ -1349,7 +1349,7 @@ class PesterWindow(MovingWindow):
|
||||||
self.memos[channel].showChat()
|
self.memos[channel].showChat()
|
||||||
return
|
return
|
||||||
# do slider dialog then set
|
# do slider dialog then set
|
||||||
if self.config.tabs():
|
if self.config.tabMemos():
|
||||||
if not self.tabmemo:
|
if not self.tabmemo:
|
||||||
self.createMemoTabWindow()
|
self.createMemoTabWindow()
|
||||||
memoWindow = PesterMemo(channel, timestr, self, self.tabmemo)
|
memoWindow = PesterMemo(channel, timestr, self, self.tabmemo)
|
||||||
|
@ -1388,7 +1388,6 @@ class PesterWindow(MovingWindow):
|
||||||
self.moodRequest.emit(chum)
|
self.moodRequest.emit(chum)
|
||||||
|
|
||||||
def addGroup(self, gname):
|
def addGroup(self, gname):
|
||||||
print gname
|
|
||||||
self.config.addGroup(gname)
|
self.config.addGroup(gname)
|
||||||
gTemp = self.config.getGroups()
|
gTemp = self.config.getGroups()
|
||||||
self.chumList.groups = [g[0] for g in gTemp]
|
self.chumList.groups = [g[0] for g in gTemp]
|
||||||
|
@ -1638,8 +1637,14 @@ class PesterWindow(MovingWindow):
|
||||||
@QtCore.pyqtSlot(QtCore.QString)
|
@QtCore.pyqtSlot(QtCore.QString)
|
||||||
def closeConvo(self, handle):
|
def closeConvo(self, handle):
|
||||||
h = unicode(handle)
|
h = unicode(handle)
|
||||||
chum = self.convos[h].chum
|
try:
|
||||||
chumopen = self.convos[h].chumopen
|
chum = self.convos[h].chum
|
||||||
|
except KeyError:
|
||||||
|
chum = self.convos[h.lower()].chum
|
||||||
|
try:
|
||||||
|
chumopen = self.convos[h].chumopen
|
||||||
|
except KeyError:
|
||||||
|
chumopen = self.convos[h.lower()].chumopen
|
||||||
if chumopen:
|
if chumopen:
|
||||||
self.chatlog.log(chum.handle, self.profile().pestermsg(chum, QtGui.QColor(self.theme["convo/systemMsgColor"]), self.theme["convo/text/ceasepester"]))
|
self.chatlog.log(chum.handle, self.profile().pestermsg(chum, QtGui.QColor(self.theme["convo/systemMsgColor"]), self.theme["convo/text/ceasepester"]))
|
||||||
self.convoClosed.emit(handle)
|
self.convoClosed.emit(handle)
|
||||||
|
@ -1650,7 +1655,10 @@ class PesterWindow(MovingWindow):
|
||||||
c = unicode(channel)
|
c = unicode(channel)
|
||||||
self.chatlog.finish(c)
|
self.chatlog.finish(c)
|
||||||
self.leftChannel.emit(channel)
|
self.leftChannel.emit(channel)
|
||||||
del self.memos[c]
|
try:
|
||||||
|
del self.memos[c]
|
||||||
|
except KeyError:
|
||||||
|
del self.memos[c.lower()]
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
def tabsClosed(self):
|
def tabsClosed(self):
|
||||||
del self.tabconvo
|
del self.tabconvo
|
||||||
|
@ -1792,7 +1800,6 @@ class PesterWindow(MovingWindow):
|
||||||
group = newgroup if newgroup else selectedGroup
|
group = newgroup if newgroup else selectedGroup
|
||||||
if ok:
|
if ok:
|
||||||
handle = unicode(handle)
|
handle = unicode(handle)
|
||||||
print self.chumList.chums
|
|
||||||
if handle in [h.handle for h in self.chumList.chums]:
|
if handle in [h.handle for h in self.chumList.chums]:
|
||||||
return
|
return
|
||||||
if not (PesterProfile.checkLength(handle) and
|
if not (PesterProfile.checkLength(handle) and
|
||||||
|
@ -2093,8 +2100,6 @@ class PesterWindow(MovingWindow):
|
||||||
windows = []
|
windows = []
|
||||||
if self.tabconvo:
|
if self.tabconvo:
|
||||||
windows = list(self.tabconvo.convos.values())
|
windows = list(self.tabconvo.convos.values())
|
||||||
if self.tabmemo:
|
|
||||||
windows += list(self.tabmemo.convos.values())
|
|
||||||
|
|
||||||
for w in windows:
|
for w in windows:
|
||||||
w.setParent(None)
|
w.setParent(None)
|
||||||
|
@ -2102,8 +2107,6 @@ class PesterWindow(MovingWindow):
|
||||||
w.raiseChat()
|
w.raiseChat()
|
||||||
if self.tabconvo:
|
if self.tabconvo:
|
||||||
self.tabconvo.closeSoft()
|
self.tabconvo.closeSoft()
|
||||||
if self.tabmemo:
|
|
||||||
self.tabmemo.closeSoft()
|
|
||||||
# save options
|
# save options
|
||||||
self.config.set("tabs", tabsetting)
|
self.config.set("tabs", tabsetting)
|
||||||
elif tabsetting and not curtab:
|
elif tabsetting and not curtab:
|
||||||
|
@ -2116,6 +2119,28 @@ class PesterWindow(MovingWindow):
|
||||||
self.tabconvo.show()
|
self.tabconvo.show()
|
||||||
newconvos[h] = c
|
newconvos[h] = c
|
||||||
self.convos = newconvos
|
self.convos = newconvos
|
||||||
|
# save options
|
||||||
|
self.config.set("tabs", tabsetting)
|
||||||
|
|
||||||
|
# tabs memos
|
||||||
|
curtabmemo = self.config.tabMemos()
|
||||||
|
tabmemosetting = self.optionmenu.tabmemocheck.isChecked()
|
||||||
|
if curtabmemo and not tabmemosetting:
|
||||||
|
# split tabs into windows
|
||||||
|
windows = []
|
||||||
|
if self.tabmemo:
|
||||||
|
windows = list(self.tabmemo.convos.values())
|
||||||
|
|
||||||
|
for w in windows:
|
||||||
|
w.setParent(None)
|
||||||
|
w.show()
|
||||||
|
w.raiseChat()
|
||||||
|
if self.tabmemo:
|
||||||
|
self.tabmemo.closeSoft()
|
||||||
|
# save options
|
||||||
|
self.config.set("tabmemos", tabmemosetting)
|
||||||
|
elif tabmemosetting and not curtabmemo:
|
||||||
|
# combine
|
||||||
newmemos = {}
|
newmemos = {}
|
||||||
self.createMemoTabWindow()
|
self.createMemoTabWindow()
|
||||||
for (h,m) in self.memos.iteritems():
|
for (h,m) in self.memos.iteritems():
|
||||||
|
@ -2125,7 +2150,7 @@ class PesterWindow(MovingWindow):
|
||||||
newmemos[h] = m
|
newmemos[h] = m
|
||||||
self.memos = newmemos
|
self.memos = newmemos
|
||||||
# save options
|
# save options
|
||||||
self.config.set("tabs", tabsetting)
|
self.config.set("tabmemos", tabmemosetting)
|
||||||
# hidden chums
|
# hidden chums
|
||||||
chumsetting = self.optionmenu.hideOffline.isChecked()
|
chumsetting = self.optionmenu.hideOffline.isChecked()
|
||||||
curchum = self.config.hideOfflineChums()
|
curchum = self.config.hideOfflineChums()
|
||||||
|
|
|
@ -130,6 +130,10 @@ class userConfig(object):
|
||||||
return None
|
return None
|
||||||
def tabs(self):
|
def tabs(self):
|
||||||
return self.config.get("tabs", True)
|
return self.config.get("tabs", True)
|
||||||
|
def tabMemos(self):
|
||||||
|
if not self.config.has_key('tabmemos'):
|
||||||
|
self.set("tabmemos", self.tabs())
|
||||||
|
return self.config.get("tabmemos", True)
|
||||||
def showTimeStamps(self):
|
def showTimeStamps(self):
|
||||||
if not self.config.has_key('showTimeStamps'):
|
if not self.config.has_key('showTimeStamps'):
|
||||||
self.set("showTimeStamps", True)
|
self.set("showTimeStamps", True)
|
||||||
|
|
Loading…
Reference in a new issue