Merge branch 'master' of github.com:kiooeht/pesterchum
This commit is contained in:
commit
6ea227b39a
5 changed files with 90 additions and 18 deletions
|
@ -14,6 +14,9 @@ Visit http://nova.xzibition.com/~illuminatedwax/help.html for tutorial.
|
|||
CHANGELOG
|
||||
---------
|
||||
### 3.41.2
|
||||
* Add group option when adding chum - ghostDunk
|
||||
* OOC Mode - ghostDunk
|
||||
* Improve animated gifs - ghostDunk
|
||||
* Set IRC away on idle - Kiooeht [evacipatedBox]
|
||||
* Remote quirk shutoff in memos - Kiooeht [evacipatedBox]
|
||||
* Compress exit dumps into one line - Kiooeht [evacipatedBox] (Idea: Lexi [lexicalNuance])
|
||||
|
|
|
@ -29,7 +29,6 @@ Bugs
|
|||
* Windows doesn't show style sheet sometimes?? Maybe related to themes.
|
||||
* Issues with connecting? Client not closing connection right? People keep getting "nick taken" messages
|
||||
* When using mood sort, scroll position jumps to last selected chum
|
||||
* When left for a really long time, animations slow down pesterchum
|
||||
* Closing a timeclone doesn't actually cease for everyone else
|
||||
* Kill Zalgo
|
||||
* Random invisible, tiny links to last link at end of every message
|
||||
|
|
|
@ -47,7 +47,9 @@ class RightClickList(QtGui.QListWidget):
|
|||
if event.reason() == QtGui.QContextMenuEvent.Mouse:
|
||||
listing = self.itemAt(event.pos())
|
||||
self.setCurrentItem(listing)
|
||||
self.getOptionsMenu().popup(event.globalPos())
|
||||
optionsMenu = self.getOptionsMenu()
|
||||
if optionsMenu:
|
||||
optionsMenu.popup(event.globalPos())
|
||||
def getOptionsMenu(self):
|
||||
return self.optionsMenu
|
||||
|
||||
|
@ -56,7 +58,9 @@ class RightClickTree(QtGui.QTreeWidget):
|
|||
if event.reason() == QtGui.QContextMenuEvent.Mouse:
|
||||
listing = self.itemAt(event.pos())
|
||||
self.setCurrentItem(listing)
|
||||
self.getOptionsMenu().popup(event.globalPos())
|
||||
optionsMenu = self.getOptionsMenu()
|
||||
if optionsMenu:
|
||||
optionsMenu.popup(event.globalPos())
|
||||
def getOptionsMenu(self):
|
||||
return self.optionsMenu
|
||||
|
||||
|
|
42
menus.py
42
menus.py
|
@ -1737,3 +1737,45 @@ class UpdatePesterchum(QtGui.QDialog):
|
|||
layout_0.addLayout(layout_2)
|
||||
|
||||
self.setLayout(layout_0)
|
||||
|
||||
class AddChumDialog(QtGui.QDialog):
|
||||
def __init__(self, avail_groups, parent=None):
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
|
||||
self.mainwindow = parent
|
||||
self.setStyleSheet(self.mainwindow.theme["main/defaultwindow/style"])
|
||||
self.setWindowTitle("Enter Chum Handle")
|
||||
self.setModal(True)
|
||||
|
||||
self.title = QtGui.QLabel("Enter Chum Handle")
|
||||
self.chumBox = QtGui.QLineEdit(self)
|
||||
self.groupBox = QtGui.QComboBox(self)
|
||||
avail_groups.sort()
|
||||
avail_groups.pop(avail_groups.index("Chums"))
|
||||
avail_groups.insert(0, "Chums")
|
||||
for g in avail_groups:
|
||||
self.groupBox.addItem(g)
|
||||
self.newgrouplabel = QtGui.QLabel("Or make a new group:")
|
||||
self.newgroup = QtGui.QLineEdit(self)
|
||||
|
||||
layout_0 = QtGui.QVBoxLayout()
|
||||
layout_0.addWidget(self.title)
|
||||
layout_0.addWidget(self.chumBox)
|
||||
layout_0.addWidget(self.groupBox)
|
||||
layout_0.addWidget(self.newgrouplabel)
|
||||
layout_0.addWidget(self.newgroup)
|
||||
|
||||
self.ok = QtGui.QPushButton("OK", self)
|
||||
self.ok.setDefault(True)
|
||||
self.connect(self.ok, QtCore.SIGNAL('clicked()'),
|
||||
self, QtCore.SLOT('accept()'))
|
||||
self.cancel = QtGui.QPushButton("CANCEL", self)
|
||||
self.connect(self.cancel, QtCore.SIGNAL('clicked()'),
|
||||
self, QtCore.SLOT('reject()'))
|
||||
layout_2 = QtGui.QHBoxLayout()
|
||||
layout_2.addWidget(self.cancel)
|
||||
layout_2.addWidget(self.ok)
|
||||
|
||||
layout_0.addLayout(layout_2)
|
||||
|
||||
self.setLayout(layout_0)
|
||||
|
|
|
@ -58,7 +58,7 @@ if not os.path.exists(_datadir+"logs"):
|
|||
|
||||
from menus import PesterChooseQuirks, PesterChooseTheme, \
|
||||
PesterChooseProfile, PesterOptions, PesterUserlist, PesterMemoList, \
|
||||
LoadingScreen, AboutPesterchum, UpdatePesterchum
|
||||
LoadingScreen, AboutPesterchum, UpdatePesterchum, AddChumDialog
|
||||
from mood import Mood, PesterMoodAction, PesterMoodHandler, PesterMoodButton
|
||||
from dataobjs import PesterProfile, pesterQuirk, pesterQuirks
|
||||
from generic import PesterIcon, RightClickList, RightClickTree, \
|
||||
|
@ -282,6 +282,8 @@ class chumArea(RightClickTree):
|
|||
self.notify = True
|
||||
|
||||
def getOptionsMenu(self):
|
||||
if not self.currentItem():
|
||||
return None
|
||||
text = str(self.currentItem().text(0))
|
||||
if text.rfind(" (") != -1:
|
||||
text = text[0:text.rfind(" (")]
|
||||
|
@ -886,6 +888,7 @@ class TrollSlumWindow(QtGui.QFrame):
|
|||
errormsg.showMessage("THIS IS NOT A VALID CHUMTAG!")
|
||||
self.addchumdialog = None
|
||||
return
|
||||
|
||||
self.blockChumSignal.emit(handle)
|
||||
self.addtrolldialog = None
|
||||
|
||||
|
@ -1384,6 +1387,20 @@ class PesterWindow(MovingWindow):
|
|||
self.config.addChum(chum)
|
||||
self.moodRequest.emit(chum)
|
||||
|
||||
def addGroup(self, gname):
|
||||
print gname
|
||||
self.config.addGroup(gname)
|
||||
gTemp = self.config.getGroups()
|
||||
self.chumList.groups = [g[0] for g in gTemp]
|
||||
self.chumList.openGroups = [g[1] for g in gTemp]
|
||||
self.chumList.moveGroupMenu()
|
||||
self.chumList.showAllGroups()
|
||||
if not self.config.showEmptyGroups():
|
||||
self.chumList.hideEmptyGroups()
|
||||
if self.config.showOnlineNumbers():
|
||||
self.chumList.showOnlineNumbers()
|
||||
|
||||
|
||||
def changeProfile(self, collision=None):
|
||||
if not hasattr(self, 'chooseprofile'):
|
||||
self.chooseprofile = None
|
||||
|
@ -1766,17 +1783,34 @@ class PesterWindow(MovingWindow):
|
|||
if not hasattr(self, 'addchumdialog'):
|
||||
self.addchumdialog = None
|
||||
if not self.addchumdialog:
|
||||
self.addchumdialog = QtGui.QInputDialog(self)
|
||||
(handle, ok) = self.addchumdialog.getText(self, "New Chum", "Enter Chum Handle:")
|
||||
available_groups = [g[0] for g in self.config.getGroups()]
|
||||
self.addchumdialog = AddChumDialog(available_groups, self)
|
||||
ok = self.addchumdialog.exec_()
|
||||
handle = str(self.addchumdialog.chumBox.text()).strip()
|
||||
newgroup = str(self.addchumdialog.newgroup.text()).strip()
|
||||
selectedGroup = self.addchumdialog.groupBox.currentText()
|
||||
group = newgroup if newgroup else selectedGroup
|
||||
if ok:
|
||||
handle = unicode(handle)
|
||||
print self.chumList.chums
|
||||
if handle in [h.handle for h in self.chumList.chums]:
|
||||
return
|
||||
if not (PesterProfile.checkLength(handle) and
|
||||
PesterProfile.checkValid(handle)[0]):
|
||||
errormsg = QtGui.QErrorMessage(self)
|
||||
errormsg.showMessage("THIS IS NOT A VALID CHUMTAG!")
|
||||
self.addchumdialog = None
|
||||
return
|
||||
chum = PesterProfile(handle, chumdb=self.chumdb)
|
||||
if re.search("[^A-Za-z0-9_\s]", group) is not None:
|
||||
errormsg = QtGui.QErrorMessage(self)
|
||||
errormsg.showMessage("THIS IS NOT A VALID CHUMTAG!")
|
||||
self.addchumdialog = None
|
||||
return
|
||||
if newgroup:
|
||||
# make new group
|
||||
self.addGroup(group)
|
||||
chum = PesterProfile(handle, chumdb=self.chumdb, group=group)
|
||||
self.chumdb.setGroup(handle, group)
|
||||
self.addChum(chum)
|
||||
self.addchumdialog = None
|
||||
@QtCore.pyqtSlot(QtCore.QString)
|
||||
|
@ -2028,17 +2062,7 @@ class PesterWindow(MovingWindow):
|
|||
ret = msgbox.exec_()
|
||||
self.addgroupdialog = None
|
||||
return
|
||||
self.config.addGroup(gname)
|
||||
gTemp = self.config.getGroups()
|
||||
self.chumList.groups = [g[0] for g in gTemp]
|
||||
self.chumList.openGroups = [g[1] for g in gTemp]
|
||||
self.chumList.moveGroupMenu()
|
||||
self.chumList.showAllGroups()
|
||||
if not self.config.showEmptyGroups():
|
||||
self.chumList.hideEmptyGroups()
|
||||
if self.config.showOnlineNumbers():
|
||||
self.chumList.showOnlineNumbers()
|
||||
|
||||
self.addGroup(gname)
|
||||
self.addgroupdialog = None
|
||||
|
||||
@QtCore.pyqtSlot()
|
||||
|
|
Loading…
Reference in a new issue