Skip to content

Commit

Permalink
Merge pull request #170 from maloryware/main
Browse files Browse the repository at this point in the history
Added "Report" option to memo right-click menu, + misc QoL changes
  • Loading branch information
Dpeta authored May 28, 2024
2 parents 295be0a + 9d3d2fb commit 0a8c41e
Show file tree
Hide file tree
Showing 8 changed files with 402 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,4 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

just run the goddamn thing you moron.bat
2 changes: 1 addition & 1 deletion convo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ def changeTheme(self, theme):
self.mainwindow.theme["main/menus/rclickchumlist/report"]
)
except:
pass
self.reportchum.setText("REPORT USER")
self.textArea.changeTheme(theme)
self.textInput.changeTheme(theme)

Expand Down
Binary file added img/pchumbanner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions memos.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,10 @@ def __init__(self, channel, timestr, mainwindow, parent=None):
self.mainwindow.theme["main/menus/rclickchumlist/addchum"], self
)
self.addchumAction.triggered.connect(self.addChumSlot)
self.reportchum = QAction(
self.mainwindow.theme["main/menus/rclickchumlist/report"], self
)
self.reportchum.triggered.connect(self.reportThisChum)
self.banuserAction = QAction(
self.mainwindow.theme["main/menus/rclickchumlist/banuser"], self
)
Expand All @@ -535,6 +539,7 @@ def __init__(self, channel, timestr, mainwindow, parent=None):
self.quirkDisableAction.triggered.connect(self.killQuirkUser)
self.userlist.optionsMenu.addAction(self.pesterChumAction)
self.userlist.optionsMenu.addAction(self.addchumAction)
self.userlist.optionsMenu.addAction(self.reportchum)
# ban & op list added if we are op

self.optionsMenu = QtWidgets.QMenu(self)
Expand Down Expand Up @@ -849,6 +854,7 @@ def initTheme(self, theme):

self.addchumAction.setText(theme["main/menus/rclickchumlist/addchum"])
self.banuserAction.setText(theme["main/menus/rclickchumlist/banuser"])
self.reportchum.setText(theme["main/menus/rclickchumlist/report"])
self.opAction.setText(theme["main/menus/rclickchumlist/opuser"])
self.voiceAction.setText(theme["main/menus/rclickchumlist/voiceuser"])
self.quirkDisableAction.setText(theme["main/menus/rclickchumlist/quirkkill"])
Expand Down Expand Up @@ -1898,6 +1904,15 @@ def addChumSlot(self):
currentChum = PesterProfile((self.userlist.currentItem().text()))
self.mainwindow.addChum(currentChum)

@QtCore.pyqtSlot()
def reportThisChum(self):
if not self.userlist.currentItem():
return
# mal what the fuck were you thinking when you wrote this dawg
# currentChum = PesterProfile((self.userlist.currentItem().text()))
currentChum = self.userlist.currentItem().text()
self.mainwindow.reportChum(currentChum)

@QtCore.pyqtSlot()
def banSelectedUser(self):
if not self.userlist.currentItem():
Expand Down
23 changes: 8 additions & 15 deletions menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,9 @@ def __init__(self, config, theme, parent):
if self.config.logMemos() & self.config.STAMP:
self.stampmemocheck.setChecked(True)

self.updatecheck = QtWidgets.QCheckBox("Check for updates on start-up", self)
self.updatecheck.setChecked(self.config.updatecheck())

self.idleBox = QtWidgets.QSpinBox(self)
self.idleBox.setStyleSheet("background:#FFFFFF")
self.idleBox.setRange(1, 1440)
Expand All @@ -1442,21 +1445,7 @@ def __init__(self, config, theme, parent):
layout_repo_url.addWidget(self.repoUrlBox)
layout_repo_url.addWidget(self.repoUrlResetButton)

# self.updateBox = QtWidgets.QComboBox(self)
# self.updateBox.addItem("Once a Day")
# self.updateBox.addItem("Once a Week")
# self.updateBox.addItem("Only on Start")
# self.updateBox.addItem("Never")
# check = self.config.checkForUpdates()
# if check >= 0 and check < self.updateBox.count():
# self.updateBox.setCurrentIndex(check)
layout_6 = QtWidgets.QHBoxLayout()
# layout_6.addWidget(QtWidgets.QLabel("Check for\nPesterchum Updates:"))
# layout_6.addWidget(self.updateBox)

# if not ostools.isOSXLeopard():
# self.mspaCheck = QtWidgets.QCheckBox("Check for MSPA Updates", self)
# self.mspaCheck.setChecked(self.config.checkMSPA())

self.randomscheck = QtWidgets.QCheckBox("Receive Random Encounters")
self.randomscheck.setChecked(parent.userprofile.randoms)
Expand Down Expand Up @@ -1704,6 +1693,7 @@ def reset_themeBox():
layout_idle.addLayout(layout_5)
layout_idle.addLayout(layout_repo_url)
layout_idle.addLayout(layout_6)
layout_idle.addWidget(self.updatecheck)
# if not ostools.isOSXLeopard():
# layout_idle.addWidget(self.mspaCheck)
self.pages.addWidget(widget)
Expand Down Expand Up @@ -2178,7 +2168,7 @@ def __init__(self, parent=None):
QtWidgets.QDialog.__init__(self, parent)
self.mainwindow = parent
self.setStyleSheet(self.mainwindow.theme["main/defaultwindow/style"])

self.setModal(False)
self.title = QtWidgets.QLabel("P3ST3RCHUM %s" % (_pcVersion))
self.credits = QtWidgets.QLabel(
"Programming by:"
Expand Down Expand Up @@ -2214,6 +2204,9 @@ def __init__(self, parent=None):
self.setLayout(layout_0)


# aha found you, sneaky son of a bitch


class UpdatePesterchum(QtWidgets.QDialog):
def __init__(self, ver, url, parent=None):
QtWidgets.QDialog.__init__(self, parent)
Expand Down
Loading

0 comments on commit 0a8c41e

Please sign in to comment.