File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 1
1
import sys
2
2
from PyQt5 import QtWidgets , QtCore , QtGui
3
+ import ctypes
3
4
4
5
5
6
class TardisDiff (QtWidgets .QMainWindow ):
6
7
7
8
def __init__ (self ):
8
9
super (TardisDiff , self ).__init__ ()
9
10
self .diff = 0
10
-
11
11
self .clipboard = QtWidgets .QApplication .clipboard ()
12
12
QtWidgets .QShortcut (QtGui .QKeySequence ("Ctrl+Shift+C" ), self ,
13
13
self .setClipboard )
14
+ # Google for a fancy tardis icon until I've made one
15
+ self .setWindowIcon (QtGui .QIcon ('tardis.ico' ))
14
16
self .initUI ()
15
17
16
18
def initUI (self ):
@@ -95,4 +97,15 @@ def main():
95
97
96
98
97
99
if __name__ == '__main__' :
100
+ myappid = 'net.xerael.tardisdiff'
101
+ if sys .platform == "win32" :
102
+ """
103
+ This is for collapsing on the task bar on windows 7/8 and using
104
+ the application icon on the task bar instead of the python icon
105
+ if running using a python executable.
106
+
107
+ See:
108
+ http://stackoverflow.com/questions/1551605/how-to-set-applications-taskbar-icon-in-windows-7
109
+ """
110
+ ctypes .windll .shell32 .SetCurrentProcessExplicitAppUserModelID (myappid )
98
111
main ()
Original file line number Diff line number Diff line change 4
4
# Dependencies are automatically detected, but it might need
5
5
# fine tuning.
6
6
copyfiles = [
7
- ('C:\Python34\Lib\site-packages\PyQt5\libEGL.dll' , 'libEGL.dll' )]
7
+ ('C:\Python34\Lib\site-packages\PyQt5\libEGL.dll' , 'libEGL.dll' ),
8
+ 'tardis.ico' # Google for a fancy tardis icon until I've made one
9
+ ]
8
10
buildOptions = dict (packages = [], excludes = [], include_files = copyfiles )
9
11
10
12
# GUI applications require a different base on Windows (the default is for a
19
21
base = base ,
20
22
shortcutName = "TardisDiff" ,
21
23
shortcutDir = "DesktopFolder" ,
22
- # icon="tardis.ico" Google for a fancy tardis icon until I've made one.
24
+ icon = "tardis.ico" # Google for a fancy tardis icon until I've made one
23
25
)
24
26
]
25
27
You can’t perform that action at this time.
0 commit comments