This repository has been archived by the owner on Jul 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7de5457
commit a7d568b
Showing
8 changed files
with
111 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"refresh_time": 1.0, "theme": "dark", "version": "3.1.5", "transition_duration": 0.0, "gtr_buffer": false, "last_song": "June.mp3", "continue": false, "fade": false, "mode": "s_p", "debug": true, "path": "C:/Users/Mateusz/Music", "update": true, "fst_buffer": false} | ||
{"refresh_time": 1.0, "theme": "light", "version": "3.1.5", "transition_duration": 0.0, "gtr_buffer": false, "last_song": "Restart.mp3", "continue": false, "fade": false, "mode": "s_p", "debug": true, "path": "C:/Users/Mateusz/Music", "update": false, "fst_buffer": false} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,2 @@ | ||
+Added new updater | ||
+Some code optimizations. | ||
~Changed the way how shuffle play works. | ||
+Added transition timer. | ||
+Added history of shuffle play that can be accessed with the back button when shuffle play is selected. | ||
~Changed the update function. | ||
~Changed the debug menu. | ||
+Added animation for changing the theme. | ||
~Fixed update window not showing up. | ||
~Fixed update window that was causing Sounder to hang up. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
from tkinter import * | ||
|
||
import threading # should use the threading module instead! | ||
import Queue | ||
|
||
import os | ||
|
||
|
||
class ThreadSafeConsole(Text): | ||
def __init__(self, master, **options): | ||
Text.__init__(self, master, **options) | ||
self.queue = Queue.Queue() | ||
self.update_me() | ||
|
||
def write(self, line): | ||
self.queue.put(line) | ||
|
||
def clear(self): | ||
self.queue.put(None) | ||
|
||
def update_me(self): | ||
try: | ||
while 1: | ||
line = self.queue.get_nowait() | ||
if line is None: | ||
self.delete(1.0, END) | ||
else: | ||
self.insert(END, str(line)) | ||
self.see(END) | ||
self.update_idletasks() | ||
except Queue.Empty: | ||
pass | ||
self.after(100, self.update_me) | ||
|
||
|
||
# this function pipes input to an widget | ||
def pipeToWidget(input, widget): | ||
widget.clear() | ||
while 1: | ||
line = input.readline() | ||
if not line: | ||
break | ||
widget.write(line) | ||
|
||
|
||
def funcThread(widget): | ||
input = os.popen('dir', 'r') | ||
pipeToWidget(input, widget) | ||
|
||
|
||
# uber-main | ||
root = Tk() | ||
widget = ThreadSafeConsole(root) | ||
widget.pack(side=TOP, expand=YES, fill=BOTH) | ||
threading.start_new(funcThread, (widget,)) | ||
threading.start_new(funcThread, (widget,)) | ||
threading.start_new(funcThread, (widget,)) | ||
threading.start_new(funcThread, (widget,)) | ||
threading.start_new(funcThread, (widget,)) | ||
root.mainloop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.1.6 | ||
3.1.7 |