Refresh theme button

This commit is contained in:
Kiooeht 2011-11-07 18:07:06 -08:00
parent 06be7ae422
commit 6dacc4c4de
4 changed files with 17 additions and 3 deletions

View file

@ -36,6 +36,8 @@ CHANGELOG
* Disable randomEncounter options when it's offline - Kiooeht [evacipatedBox] (Idea: Lexi [lexicalNuance]) * Disable randomEncounter options when it's offline - Kiooeht [evacipatedBox] (Idea: Lexi [lexicalNuance])
* Sort list of memos alphabetically or by number of users - Kiooeht [evacipatedBox] (Idea: [lostGash]) * Sort list of memos alphabetically or by number of users - Kiooeht [evacipatedBox] (Idea: [lostGash])
* Low-bandwidth mode - Kiooeht [evacipatedBox] (Idea: [canLover]) * Low-bandwidth mode - Kiooeht [evacipatedBox] (Idea: [canLover])
* New smilies - Kiooeht [evacipatedBox]
* Refresh theme in options - 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]

View file

@ -24,6 +24,7 @@ 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
---- ----

View file

@ -1165,6 +1165,9 @@ class PesterOptions(QtGui.QDialog):
self.themeBox.addItem(t) self.themeBox.addItem(t)
if (not notheme and t == theme.name) or (notheme and t == "pesterchum"): if (not notheme and t == theme.name) or (notheme and t == "pesterchum"):
self.themeBox.setCurrentIndex(i) self.themeBox.setCurrentIndex(i)
self.refreshtheme = QtGui.QPushButton("Refresh current theme", self)
self.connect(self.refreshtheme, QtCore.SIGNAL('clicked()'),
parent, QtCore.SLOT('themeSelectOverride()'))
self.buttonOptions = ["Minimize to Taskbar", "Minimize to Tray", "Quit"] self.buttonOptions = ["Minimize to Taskbar", "Minimize to Tray", "Quit"]
self.miniBox = QtGui.QComboBox(self) self.miniBox = QtGui.QComboBox(self)
@ -1349,6 +1352,7 @@ class PesterOptions(QtGui.QDialog):
layout_theme.setAlignment(QtCore.Qt.AlignTop) layout_theme.setAlignment(QtCore.Qt.AlignTop)
layout_theme.addWidget(QtGui.QLabel("Pick a Theme:")) layout_theme.addWidget(QtGui.QLabel("Pick a Theme:"))
layout_theme.addWidget(self.themeBox) layout_theme.addWidget(self.themeBox)
layout_theme.addWidget(self.refreshtheme)
self.pages.addWidget(widget) self.pages.addWidget(widget)
# Advanced # Advanced

View file

@ -2331,9 +2331,16 @@ class PesterWindow(MovingWindow):
self, QtCore.SLOT('close()')); self, QtCore.SLOT('close()'));
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def themeSelected(self): def themeSelectOverride(self):
themename = unicode(self.optionmenu.themeBox.currentText()) self.themeSelected(self.theme.name)
if themename != self.theme.name:
@QtCore.pyqtSlot()
def themeSelected(self, override=False):
if not override:
themename = unicode(self.optionmenu.themeBox.currentText())
else:
themename = override
if override or themename != self.theme.name:
try: try:
self.changeTheme(pesterTheme(themename)) self.changeTheme(pesterTheme(themename))
except ValueError, e: except ValueError, e: