Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit b6452be

Browse files
committed
Added update supression confirmation dialog
1 parent e1aca8e commit b6452be

File tree

3 files changed

+89
-67
lines changed

3 files changed

+89
-67
lines changed

components/shellbridge.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def checkApplied():
100100
return True
101101
else:
102102
return False
103+
103104
#Checks if spicetify is running using a tasksearch
104105
def checkSpotifyRunning():
105106
for process in psutil.process_iter(attrs=['pid', 'name']):

manager_window.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def installProgress(self, action):
120120

121121
# Launch uninstaller task
122122
def startRemoval(self):
123-
reply = QMessageBox.question(None, 'Confirmation', 'Are you sure you want to uninstall Spicetify?', QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
123+
reply = QMessageBox.question(None, 'Uninstall', 'Are you sure you want to uninstall Spicetify and remove all installed mods/themes ?', QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
124124
if reply == QMessageBox.StandardButton.Yes:
125125
self.setCursor(Qt.CursorShape.WaitCursor)
126126
self.bt_uninstall.setEnabled(False)
@@ -144,10 +144,21 @@ def Custom(self):
144144

145145
# Disables Spotify self update function using permissions
146146
def DisableUpdate(self):
147-
if (blockSpotifyUpdate(self.check_noupdate.isChecked())):
148-
windowsNotification("Spicetify Manager", "Update supression change failed!")
147+
if self.check_noupdate.isChecked():
148+
reply = QMessageBox.question(None, 'Deactivate Updates', 'This function will try to disable all automatic updates for Spotify! Are you sure you want to do this?', QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
149+
if reply == QMessageBox.StandardButton.Yes:
150+
if (blockSpotifyUpdate(self.check_noupdate.isChecked())):
151+
windowsNotification("Spicetify Manager", "Update supression change failed!")
152+
else:
153+
windowsNotification("Spicetify Manager", "Update supression updated")
154+
else:
155+
self.check_noupdate.setChecked(not self.check_noupdate.isChecked())
149156
else:
150-
windowsNotification("Spicetify Manager", "Update supression updated")
157+
if (blockSpotifyUpdate(self.check_noupdate.isChecked())):
158+
windowsNotification("Spicetify Manager", "Update supression change failed!")
159+
else:
160+
windowsNotification("Spicetify Manager", "Update supression updated")
161+
151162

152163

153164
#Called when spicetify is installed or not?
@@ -204,6 +215,7 @@ def SystemSoftStatusCheck(self):
204215

205216
def installerUiUpdate(self):
206217
self.setCursor(Qt.CursorShape.ArrowCursor)
218+
207219
self.bt_refresh.setEnabled(True)
208220
self.bt_uninstall.setEnabled(True)
209221
self.bt_master.setEnabled(True)

res/manager.ui

Lines changed: 72 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ QPushButton:pressed
312312
<property name="cursor">
313313
<cursorShape>PointingHandCursor</cursorShape>
314314
</property>
315+
<property name="toolTip">
316+
<string>Install Spicetify and Spicetify marketplace</string>
317+
</property>
315318
<property name="styleSheet">
316319
<string notr="true">QPushButton:!enabled{
317320
background-color: rgba(220, 20, 60, 150);
@@ -324,69 +327,6 @@ QPushButton{
324327
<string>Install</string>
325328
</property>
326329
</widget>
327-
<widget class="QWidget" name="horizontalLayoutWidget">
328-
<property name="geometry">
329-
<rect>
330-
<x>250</x>
331-
<y>250</y>
332-
<width>281</width>
333-
<height>71</height>
334-
</rect>
335-
</property>
336-
<layout class="QHBoxLayout" name="advanced">
337-
<item>
338-
<widget class="QPushButton" name="bt_refresh">
339-
<property name="font">
340-
<font>
341-
<pointsize>-1</pointsize>
342-
</font>
343-
</property>
344-
<property name="cursor">
345-
<cursorShape>PointingHandCursor</cursorShape>
346-
</property>
347-
<property name="styleSheet">
348-
<string notr="true">QPushButton:!enabled{
349-
background-color: rgba(220, 20, 60, 150);
350-
}</string>
351-
</property>
352-
<property name="text">
353-
<string>Refresh</string>
354-
</property>
355-
<property name="icon">
356-
<iconset>
357-
<normaloff>ic_update.png</normaloff>ic_update.png</iconset>
358-
</property>
359-
</widget>
360-
</item>
361-
<item>
362-
<widget class="QPushButton" name="bt_uninstall">
363-
<property name="enabled">
364-
<bool>true</bool>
365-
</property>
366-
<property name="font">
367-
<font>
368-
<pointsize>-1</pointsize>
369-
</font>
370-
</property>
371-
<property name="cursor">
372-
<cursorShape>PointingHandCursor</cursorShape>
373-
</property>
374-
<property name="styleSheet">
375-
<string notr="true">QPushButton:!enabled{
376-
background-color: rgba(220, 20, 60, 150);
377-
}</string>
378-
</property>
379-
<property name="text">
380-
<string>Uninstall</string>
381-
</property>
382-
<property name="icon">
383-
<iconset>
384-
<normaloff>ic_delete.png</normaloff>ic_delete.png</iconset>
385-
</property>
386-
</widget>
387-
</item>
388-
</layout>
389-
</widget>
390330
<widget class="QFrame" name="infoFrame">
391331
<property name="geometry">
392332
<rect>
@@ -460,6 +400,75 @@ QPushButton{
460400
</property>
461401
</widget>
462402
</widget>
403+
<widget class="QPushButton" name="bt_refresh">
404+
<property name="geometry">
405+
<rect>
406+
<x>320</x>
407+
<y>260</y>
408+
<width>61</width>
409+
<height>41</height>
410+
</rect>
411+
</property>
412+
<property name="font">
413+
<font>
414+
<pointsize>-1</pointsize>
415+
</font>
416+
</property>
417+
<property name="cursor">
418+
<cursorShape>PointingHandCursor</cursorShape>
419+
</property>
420+
<property name="toolTip">
421+
<string>Refresh the manager status</string>
422+
</property>
423+
<property name="styleSheet">
424+
<string notr="true">QPushButton:!enabled{
425+
background-color: rgba(220, 20, 60, 150);
426+
}</string>
427+
</property>
428+
<property name="text">
429+
<string/>
430+
</property>
431+
<property name="icon">
432+
<iconset>
433+
<normaloff>ic_update.png</normaloff>ic_update.png</iconset>
434+
</property>
435+
</widget>
436+
<widget class="QPushButton" name="bt_uninstall">
437+
<property name="enabled">
438+
<bool>true</bool>
439+
</property>
440+
<property name="geometry">
441+
<rect>
442+
<x>390</x>
443+
<y>260</y>
444+
<width>61</width>
445+
<height>41</height>
446+
</rect>
447+
</property>
448+
<property name="font">
449+
<font>
450+
<pointsize>-1</pointsize>
451+
</font>
452+
</property>
453+
<property name="cursor">
454+
<cursorShape>PointingHandCursor</cursorShape>
455+
</property>
456+
<property name="toolTip">
457+
<string>Removes Spicetify and all of its components</string>
458+
</property>
459+
<property name="styleSheet">
460+
<string notr="true">QPushButton:!enabled{
461+
background-color: rgba(220, 20, 60, 150);
462+
}</string>
463+
</property>
464+
<property name="text">
465+
<string/>
466+
</property>
467+
<property name="icon">
468+
<iconset>
469+
<normaloff>ic_delete.png</normaloff>ic_delete.png</iconset>
470+
</property>
471+
</widget>
463472
</widget>
464473
<widget class="QWidget" name="tab_2">
465474
<attribute name="icon">

0 commit comments

Comments
 (0)