|
26 | 26 | KEY_C0 = KEY_C % r"Python.%sFile\shell" |
27 | 27 | KEY_C1 = KEY_C % r"Python.%sFile\shell\%s" |
28 | 28 | KEY_C2 = KEY_C1 + r"\command" |
| 29 | +KEY_DROP0 = KEY_C % r"Python.%sFile\shellex" |
| 30 | +KEY_DROP1 = KEY_C % r"Python.%sFile\shellex\DropHandler" |
29 | 31 | KEY_I = KEY_C % r"Python.%sFile\DefaultIcon" |
30 | 32 | KEY_D = KEY_C % r"Python.%sFile" |
31 | 33 | EWI = "Edit with IDLE" |
@@ -92,6 +94,12 @@ def register(target, current=True): |
92 | 94 | winreg.SetValueEx(winreg.CreateKey(root, KEY_C2 % ("NoCon", EWS)), |
93 | 95 | "", 0, winreg.REG_SZ, |
94 | 96 | '"%s" "%s\Scripts\spyder" "%%1"' % (pythonw, target)) |
| 97 | + |
| 98 | + # Drop support |
| 99 | + handler = "{60254CA5-953B-11CF-8C96-00AA00B8708C}" |
| 100 | + for ftype in ("", "NoCon", "Compiled"): |
| 101 | + winreg.SetValueEx(winreg.CreateKey(root, KEY_DROP1 % ftype), |
| 102 | + "", 0, winreg.REG_SZ, handler) |
95 | 103 |
|
96 | 104 | # Icons |
97 | 105 | dlls = osp.join(target, 'DLLs') |
@@ -150,6 +158,9 @@ def unregister(target, current=True): |
150 | 158 | short_version = utils.get_python_infos(target)[0] |
151 | 159 | key_core = (KEY_S1 % short_version) + r'\%s' |
152 | 160 | for key in ( |
| 161 | + # Drop support |
| 162 | + KEY_DROP1 % "", KEY_DROP1 % "NoCon", KEY_DROP1 % "Compiled", |
| 163 | + KEY_DROP0 % "", KEY_DROP0 % "NoCon", KEY_DROP0 % "Compiled", |
153 | 164 | # Icons |
154 | 165 | KEY_I % "NoCon", KEY_I % "Compiled", KEY_I % "", |
155 | 166 | # Edit with IDLE |
|
0 commit comments