PrEditor 0.3.0__py2.py3-none-any.whl → 0.5.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of PrEditor might be problematic. Click here for more details.
- {PrEditor-0.3.0.dist-info → PrEditor-0.5.0.dist-info}/METADATA +17 -17
- {PrEditor-0.3.0.dist-info → PrEditor-0.5.0.dist-info}/RECORD +23 -20
- {PrEditor-0.3.0.dist-info → PrEditor-0.5.0.dist-info}/WHEEL +1 -1
- preditor/gui/console.py +103 -6
- preditor/gui/editor_chooser.py +1 -1
- preditor/gui/find_files.py +9 -4
- preditor/gui/group_tab_widget/__init__.py +1 -1
- preditor/gui/group_tab_widget/grouped_tab_widget.py +3 -0
- preditor/gui/loggerwindow.py +158 -72
- preditor/gui/set_text_editor_path_dialog.py +4 -4
- preditor/gui/status_label.py +90 -0
- preditor/gui/suggest_path_quotes_dialog.py +50 -0
- preditor/gui/ui/loggerwindow.ui +82 -34
- preditor/gui/ui/set_text_editor_path_dialog.ui +48 -8
- preditor/gui/ui/suggest_path_quotes_dialog.ui +225 -0
- preditor/gui/workbox_mixin.py +50 -18
- preditor/gui/workbox_text_edit.py +24 -4
- preditor/gui/workboxwidget.py +24 -2
- preditor/scintilla/documenteditor.py +3 -3
- preditor/version.py +2 -2
- {PrEditor-0.3.0.dist-info → PrEditor-0.5.0.dist-info}/LICENSE +0 -0
- {PrEditor-0.3.0.dist-info → PrEditor-0.5.0.dist-info}/entry_points.txt +0 -0
- {PrEditor-0.3.0.dist-info → PrEditor-0.5.0.dist-info}/top_level.txt +0 -0
preditor/gui/ui/loggerwindow.ui
CHANGED
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
<x>0</x>
|
|
93
93
|
<y>0</y>
|
|
94
94
|
<width>796</width>
|
|
95
|
-
<height>
|
|
95
|
+
<height>29</height>
|
|
96
96
|
</rect>
|
|
97
97
|
</property>
|
|
98
98
|
<widget class="QMenu" name="uiDebugMENU">
|
|
@@ -137,10 +137,12 @@
|
|
|
137
137
|
<string>Run</string>
|
|
138
138
|
</property>
|
|
139
139
|
<addaction name="uiRunSelectedACT"/>
|
|
140
|
+
<addaction name="uiRunSelectedDontTruncateACT"/>
|
|
140
141
|
<addaction name="uiRunAllACT"/>
|
|
141
142
|
<addaction name="separator"/>
|
|
142
143
|
<addaction name="uiClearBeforeRunningACT"/>
|
|
143
144
|
<addaction name="uiClearToLastPromptACT"/>
|
|
145
|
+
<addaction name="uiSelectTextACT"/>
|
|
144
146
|
</widget>
|
|
145
147
|
<widget class="QMenu" name="uiFileMENU">
|
|
146
148
|
<property name="title">
|
|
@@ -160,34 +162,25 @@
|
|
|
160
162
|
</property>
|
|
161
163
|
<addaction name="separator"/>
|
|
162
164
|
</widget>
|
|
163
|
-
<widget class="QMenu" name="
|
|
165
|
+
<widget class="QMenu" name="uiSelectFontsMENU">
|
|
164
166
|
<property name="title">
|
|
165
|
-
<string>Font</string>
|
|
167
|
+
<string>Select Font</string>
|
|
166
168
|
</property>
|
|
167
|
-
<
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
</property>
|
|
171
|
-
<addaction name="uiFontMENU"/>
|
|
172
|
-
</widget>
|
|
173
|
-
<widget class="QMenu" name="uiProportionalFontMENU">
|
|
174
|
-
<property name="title">
|
|
175
|
-
<string>Proportional</string>
|
|
176
|
-
</property>
|
|
177
|
-
<addaction name="actionPlaceHolderProportionalFont"/>
|
|
178
|
-
</widget>
|
|
179
|
-
<addaction name="uiMonospaceFontMENU"/>
|
|
180
|
-
<addaction name="uiProportionalFontMENU"/>
|
|
169
|
+
<addaction name="uiSelectMonospaceFontACT"/>
|
|
170
|
+
<addaction name="uiSelectProportionalFontACT"/>
|
|
171
|
+
<addaction name="uiSelectAllFontACT"/>
|
|
181
172
|
</widget>
|
|
182
|
-
<addaction name="
|
|
173
|
+
<addaction name="uiConsoleAutoCompleteEnabledACT"/>
|
|
174
|
+
<addaction name="uiWorkboxAutoCompleteEnabledACT"/>
|
|
183
175
|
<addaction name="uiSpellCheckEnabledACT"/>
|
|
184
176
|
<addaction name="uiAutoCompleteCaseSensitiveACT"/>
|
|
185
177
|
<addaction name="uiCompleterModeMENU"/>
|
|
178
|
+
<addaction name="uiHighlightExactCompletionACT"/>
|
|
186
179
|
<addaction name="separator"/>
|
|
187
180
|
<addaction name="uiClearLogACT"/>
|
|
188
181
|
<addaction name="uiClearLogOnRefreshACT"/>
|
|
189
182
|
<addaction name="separator"/>
|
|
190
|
-
<addaction name="
|
|
183
|
+
<addaction name="uiSelectFontsMENU"/>
|
|
191
184
|
<addaction name="uiStyleMENU"/>
|
|
192
185
|
<addaction name="separator"/>
|
|
193
186
|
<addaction name="uiIndentationsTabsACT"/>
|
|
@@ -399,15 +392,21 @@
|
|
|
399
392
|
<string>Ctrl+Alt+Shift+D</string>
|
|
400
393
|
</property>
|
|
401
394
|
</action>
|
|
402
|
-
<action name="
|
|
395
|
+
<action name="uiConsoleAutoCompleteEnabledACT">
|
|
403
396
|
<property name="checkable">
|
|
404
397
|
<bool>true</bool>
|
|
405
398
|
</property>
|
|
406
399
|
<property name="checked">
|
|
407
|
-
<bool>
|
|
400
|
+
<bool>false</bool>
|
|
408
401
|
</property>
|
|
409
402
|
<property name="text">
|
|
410
|
-
<string>Use
|
|
403
|
+
<string>Use Auto-Complete in console</string>
|
|
404
|
+
</property>
|
|
405
|
+
<property name="iconText">
|
|
406
|
+
<string>Use Auto-Complete in console</string>
|
|
407
|
+
</property>
|
|
408
|
+
<property name="toolTip">
|
|
409
|
+
<string>Use Auto-Complete in console</string>
|
|
411
410
|
</property>
|
|
412
411
|
</action>
|
|
413
412
|
<action name="uiRunLineACT">
|
|
@@ -420,7 +419,7 @@
|
|
|
420
419
|
</action>
|
|
421
420
|
<action name="uiRunAllACT">
|
|
422
421
|
<property name="text">
|
|
423
|
-
<string>Run All
|
|
422
|
+
<string>Run All</string>
|
|
424
423
|
</property>
|
|
425
424
|
<property name="toolTip">
|
|
426
425
|
<string>Run all code from the current workbox</string>
|
|
@@ -436,7 +435,7 @@
|
|
|
436
435
|
</action>
|
|
437
436
|
<action name="uiRunSelectedACT">
|
|
438
437
|
<property name="text">
|
|
439
|
-
<string>Run Selected
|
|
438
|
+
<string>Run Selected - truncate return value</string>
|
|
440
439
|
</property>
|
|
441
440
|
<property name="toolTip">
|
|
442
441
|
<string><html><head/><body><p>Run some code from the current workbox. If you have text selected, only the selected text is run. With no text selected, the current line is run. You can also use the Number Pad Enter key to activate this.</p></body></html></string>
|
|
@@ -648,16 +647,6 @@
|
|
|
648
647
|
<string>FullFuzzy</string>
|
|
649
648
|
</property>
|
|
650
649
|
</action>
|
|
651
|
-
<action name="uiFontMENU">
|
|
652
|
-
<property name="text">
|
|
653
|
-
<string>PlaceHolderMonospaceFont</string>
|
|
654
|
-
</property>
|
|
655
|
-
</action>
|
|
656
|
-
<action name="actionPlaceHolderProportionalFont">
|
|
657
|
-
<property name="text">
|
|
658
|
-
<string>PlaceHolderProportionalFont</string>
|
|
659
|
-
</property>
|
|
660
|
-
</action>
|
|
661
650
|
<action name="uiCycleCompleterModeACT">
|
|
662
651
|
<property name="text">
|
|
663
652
|
<string>Cycle Completer Modes</string>
|
|
@@ -964,6 +953,65 @@ at the indicated line in the specified text editor.
|
|
|
964
953
|
<string>Ctrl+Shift+F</string>
|
|
965
954
|
</property>
|
|
966
955
|
</action>
|
|
956
|
+
<action name="uiSelectTextACT">
|
|
957
|
+
<property name="checkable">
|
|
958
|
+
<bool>true</bool>
|
|
959
|
+
</property>
|
|
960
|
+
<property name="checked">
|
|
961
|
+
<bool>true</bool>
|
|
962
|
+
</property>
|
|
963
|
+
<property name="text">
|
|
964
|
+
<string>Select text when Run Selected w/o selection</string>
|
|
965
|
+
</property>
|
|
966
|
+
</action>
|
|
967
|
+
<action name="uiWorkboxAutoCompleteEnabledACT">
|
|
968
|
+
<property name="checkable">
|
|
969
|
+
<bool>true</bool>
|
|
970
|
+
</property>
|
|
971
|
+
<property name="text">
|
|
972
|
+
<string>Use Auto-Complete in workbox</string>
|
|
973
|
+
</property>
|
|
974
|
+
</action>
|
|
975
|
+
<action name="uiSelectMonospaceFontACT">
|
|
976
|
+
<property name="text">
|
|
977
|
+
<string>Choose from monospace fonts</string>
|
|
978
|
+
</property>
|
|
979
|
+
<property name="toolTip">
|
|
980
|
+
<string>Choose from monospace fonts</string>
|
|
981
|
+
</property>
|
|
982
|
+
</action>
|
|
983
|
+
<action name="uiSelectProportionalFontACT">
|
|
984
|
+
<property name="text">
|
|
985
|
+
<string>Choose from proportional fonts</string>
|
|
986
|
+
</property>
|
|
987
|
+
<property name="toolTip">
|
|
988
|
+
<string>Choose from proportional fonts</string>
|
|
989
|
+
</property>
|
|
990
|
+
</action>
|
|
991
|
+
<action name="uiSelectAllFontACT">
|
|
992
|
+
<property name="text">
|
|
993
|
+
<string>Choose from all fonts</string>
|
|
994
|
+
</property>
|
|
995
|
+
<property name="toolTip">
|
|
996
|
+
<string>Choose from all fonts</string>
|
|
997
|
+
</property>
|
|
998
|
+
</action>
|
|
999
|
+
<action name="uiRunSelectedDontTruncateACT">
|
|
1000
|
+
<property name="text">
|
|
1001
|
+
<string>Run Selected - don't truncate return value</string>
|
|
1002
|
+
</property>
|
|
1003
|
+
<property name="shortcut">
|
|
1004
|
+
<string>Ctrl+Shift+Return</string>
|
|
1005
|
+
</property>
|
|
1006
|
+
</action>
|
|
1007
|
+
<action name="uiHighlightExactCompletionACT">
|
|
1008
|
+
<property name="checkable">
|
|
1009
|
+
<bool>true</bool>
|
|
1010
|
+
</property>
|
|
1011
|
+
<property name="text">
|
|
1012
|
+
<string>Highlight Exact Completion</string>
|
|
1013
|
+
</property>
|
|
1014
|
+
</action>
|
|
967
1015
|
</widget>
|
|
968
1016
|
<customwidgets>
|
|
969
1017
|
<customwidget>
|
|
@@ -6,21 +6,33 @@
|
|
|
6
6
|
<rect>
|
|
7
7
|
<x>0</x>
|
|
8
8
|
<y>0</y>
|
|
9
|
-
<width>
|
|
10
|
-
<height>
|
|
9
|
+
<width>1064</width>
|
|
10
|
+
<height>325</height>
|
|
11
11
|
</rect>
|
|
12
12
|
</property>
|
|
13
13
|
<property name="windowTitle">
|
|
14
14
|
<string>Set Text Editor Executable Path</string>
|
|
15
15
|
</property>
|
|
16
16
|
<layout class="QVBoxLayout" name="verticalLayout">
|
|
17
|
+
<property name="spacing">
|
|
18
|
+
<number>15</number>
|
|
19
|
+
</property>
|
|
17
20
|
<item>
|
|
18
21
|
<widget class="QWidget" name="widget" native="true">
|
|
19
22
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
20
23
|
<property name="spacing">
|
|
24
|
+
<number>3</number>
|
|
25
|
+
</property>
|
|
26
|
+
<property name="leftMargin">
|
|
27
|
+
<number>0</number>
|
|
28
|
+
</property>
|
|
29
|
+
<property name="topMargin">
|
|
21
30
|
<number>0</number>
|
|
22
31
|
</property>
|
|
23
|
-
<property name="
|
|
32
|
+
<property name="rightMargin">
|
|
33
|
+
<number>0</number>
|
|
34
|
+
</property>
|
|
35
|
+
<property name="bottomMargin">
|
|
24
36
|
<number>0</number>
|
|
25
37
|
</property>
|
|
26
38
|
<item>
|
|
@@ -31,6 +43,11 @@
|
|
|
31
43
|
<verstretch>0</verstretch>
|
|
32
44
|
</sizepolicy>
|
|
33
45
|
</property>
|
|
46
|
+
<property name="font">
|
|
47
|
+
<font>
|
|
48
|
+
<pointsize>10</pointsize>
|
|
49
|
+
</font>
|
|
50
|
+
</property>
|
|
34
51
|
<property name="text">
|
|
35
52
|
<string>Path to the executable of your preferred text editor</string>
|
|
36
53
|
</property>
|
|
@@ -38,6 +55,11 @@
|
|
|
38
55
|
</item>
|
|
39
56
|
<item>
|
|
40
57
|
<widget class="QLineEdit" name="uiTextEditorExecutablePathLE">
|
|
58
|
+
<property name="font">
|
|
59
|
+
<font>
|
|
60
|
+
<pointsize>10</pointsize>
|
|
61
|
+
</font>
|
|
62
|
+
</property>
|
|
41
63
|
<property name="text">
|
|
42
64
|
<string>C:\Program Files\Sublime Text 3\sublime_text.exe</string>
|
|
43
65
|
</property>
|
|
@@ -50,9 +72,18 @@
|
|
|
50
72
|
<widget class="QWidget" name="widget_2" native="true">
|
|
51
73
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
52
74
|
<property name="spacing">
|
|
75
|
+
<number>3</number>
|
|
76
|
+
</property>
|
|
77
|
+
<property name="leftMargin">
|
|
78
|
+
<number>0</number>
|
|
79
|
+
</property>
|
|
80
|
+
<property name="topMargin">
|
|
53
81
|
<number>0</number>
|
|
54
82
|
</property>
|
|
55
|
-
<property name="
|
|
83
|
+
<property name="rightMargin">
|
|
84
|
+
<number>0</number>
|
|
85
|
+
</property>
|
|
86
|
+
<property name="bottomMargin">
|
|
56
87
|
<number>0</number>
|
|
57
88
|
</property>
|
|
58
89
|
<item>
|
|
@@ -63,10 +94,14 @@
|
|
|
63
94
|
<verstretch>0</verstretch>
|
|
64
95
|
</sizepolicy>
|
|
65
96
|
</property>
|
|
97
|
+
<property name="font">
|
|
98
|
+
<font>
|
|
99
|
+
<pointsize>10</pointsize>
|
|
100
|
+
</font>
|
|
101
|
+
</property>
|
|
66
102
|
<property name="text">
|
|
67
|
-
<string>Command Prompt template (template of
|
|
68
|
-
Use these template strings: {exePath}
|
|
69
|
-
</string>
|
|
103
|
+
<string>Command Prompt template (template of the Command Prompt command to launch your text editor, including how it may implement specifying line numbers).
|
|
104
|
+
Use these template strings: "{exePath}", "{modulePath}", {lineNum}. Include quotes around exePath and modulePath to handle filepaths which contain spaces.</string>
|
|
70
105
|
</property>
|
|
71
106
|
<property name="wordWrap">
|
|
72
107
|
<bool>true</bool>
|
|
@@ -75,11 +110,16 @@ Use these template strings: {exePath}, {modulePath}, {lineNum}
|
|
|
75
110
|
</item>
|
|
76
111
|
<item>
|
|
77
112
|
<widget class="QLineEdit" name="uiTextEditorCommandPatternLE">
|
|
113
|
+
<property name="font">
|
|
114
|
+
<font>
|
|
115
|
+
<pointsize>10</pointsize>
|
|
116
|
+
</font>
|
|
117
|
+
</property>
|
|
78
118
|
<property name="toolTip">
|
|
79
119
|
<string/>
|
|
80
120
|
</property>
|
|
81
121
|
<property name="text">
|
|
82
|
-
<string
|
|
122
|
+
<string>"{exePath}" "{modulePath}":{lineNum}</string>
|
|
83
123
|
</property>
|
|
84
124
|
</widget>
|
|
85
125
|
</item>
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<ui version="4.0">
|
|
3
|
+
<class>uiSuggestPathQuotesDLG</class>
|
|
4
|
+
<widget class="QDialog" name="uiSuggestPathQuotesDLG">
|
|
5
|
+
<property name="geometry">
|
|
6
|
+
<rect>
|
|
7
|
+
<x>0</x>
|
|
8
|
+
<y>0</y>
|
|
9
|
+
<width>716</width>
|
|
10
|
+
<height>342</height>
|
|
11
|
+
</rect>
|
|
12
|
+
</property>
|
|
13
|
+
<property name="windowTitle">
|
|
14
|
+
<string>Set Text Editor Executable Path</string>
|
|
15
|
+
</property>
|
|
16
|
+
<layout class="QVBoxLayout" name="verticalLayout">
|
|
17
|
+
<property name="spacing">
|
|
18
|
+
<number>15</number>
|
|
19
|
+
</property>
|
|
20
|
+
<item>
|
|
21
|
+
<widget class="QWidget" name="widget" native="true">
|
|
22
|
+
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
23
|
+
<property name="spacing">
|
|
24
|
+
<number>3</number>
|
|
25
|
+
</property>
|
|
26
|
+
<property name="leftMargin">
|
|
27
|
+
<number>0</number>
|
|
28
|
+
</property>
|
|
29
|
+
<property name="topMargin">
|
|
30
|
+
<number>0</number>
|
|
31
|
+
</property>
|
|
32
|
+
<property name="rightMargin">
|
|
33
|
+
<number>0</number>
|
|
34
|
+
</property>
|
|
35
|
+
<property name="bottomMargin">
|
|
36
|
+
<number>0</number>
|
|
37
|
+
</property>
|
|
38
|
+
<item>
|
|
39
|
+
<widget class="QLabel" name="label">
|
|
40
|
+
<property name="sizePolicy">
|
|
41
|
+
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
42
|
+
<horstretch>0</horstretch>
|
|
43
|
+
<verstretch>0</verstretch>
|
|
44
|
+
</sizepolicy>
|
|
45
|
+
</property>
|
|
46
|
+
<property name="font">
|
|
47
|
+
<font>
|
|
48
|
+
<pointsize>10</pointsize>
|
|
49
|
+
</font>
|
|
50
|
+
</property>
|
|
51
|
+
<property name="text">
|
|
52
|
+
<string>It is recommended to wrap filepaths in double-quotes in case of spaces in the paths. Would you like to update the command template from:</string>
|
|
53
|
+
</property>
|
|
54
|
+
<property name="wordWrap">
|
|
55
|
+
<bool>true</bool>
|
|
56
|
+
</property>
|
|
57
|
+
</widget>
|
|
58
|
+
</item>
|
|
59
|
+
<item>
|
|
60
|
+
<widget class="QLineEdit" name="uiTextEditorOldCommandPatternLE">
|
|
61
|
+
<property name="enabled">
|
|
62
|
+
<bool>false</bool>
|
|
63
|
+
</property>
|
|
64
|
+
<property name="font">
|
|
65
|
+
<font>
|
|
66
|
+
<pointsize>10</pointsize>
|
|
67
|
+
</font>
|
|
68
|
+
</property>
|
|
69
|
+
<property name="toolTip">
|
|
70
|
+
<string/>
|
|
71
|
+
</property>
|
|
72
|
+
<property name="text">
|
|
73
|
+
<string>uiTextEditorOldCommandPatternLE</string>
|
|
74
|
+
</property>
|
|
75
|
+
</widget>
|
|
76
|
+
</item>
|
|
77
|
+
</layout>
|
|
78
|
+
</widget>
|
|
79
|
+
</item>
|
|
80
|
+
<item>
|
|
81
|
+
<widget class="QWidget" name="widget_3" native="true">
|
|
82
|
+
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
83
|
+
<property name="spacing">
|
|
84
|
+
<number>3</number>
|
|
85
|
+
</property>
|
|
86
|
+
<property name="leftMargin">
|
|
87
|
+
<number>0</number>
|
|
88
|
+
</property>
|
|
89
|
+
<property name="topMargin">
|
|
90
|
+
<number>0</number>
|
|
91
|
+
</property>
|
|
92
|
+
<property name="rightMargin">
|
|
93
|
+
<number>0</number>
|
|
94
|
+
</property>
|
|
95
|
+
<property name="bottomMargin">
|
|
96
|
+
<number>0</number>
|
|
97
|
+
</property>
|
|
98
|
+
<item>
|
|
99
|
+
<widget class="QLabel" name="label_2">
|
|
100
|
+
<property name="sizePolicy">
|
|
101
|
+
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
102
|
+
<horstretch>0</horstretch>
|
|
103
|
+
<verstretch>0</verstretch>
|
|
104
|
+
</sizepolicy>
|
|
105
|
+
</property>
|
|
106
|
+
<property name="font">
|
|
107
|
+
<font>
|
|
108
|
+
<pointsize>10</pointsize>
|
|
109
|
+
</font>
|
|
110
|
+
</property>
|
|
111
|
+
<property name="text">
|
|
112
|
+
<string>to:</string>
|
|
113
|
+
</property>
|
|
114
|
+
<property name="wordWrap">
|
|
115
|
+
<bool>true</bool>
|
|
116
|
+
</property>
|
|
117
|
+
</widget>
|
|
118
|
+
</item>
|
|
119
|
+
<item>
|
|
120
|
+
<widget class="QLineEdit" name="uiTextEditorNewCommandPatternLE">
|
|
121
|
+
<property name="font">
|
|
122
|
+
<font>
|
|
123
|
+
<pointsize>10</pointsize>
|
|
124
|
+
</font>
|
|
125
|
+
</property>
|
|
126
|
+
<property name="toolTip">
|
|
127
|
+
<string/>
|
|
128
|
+
</property>
|
|
129
|
+
<property name="text">
|
|
130
|
+
<string/>
|
|
131
|
+
</property>
|
|
132
|
+
</widget>
|
|
133
|
+
</item>
|
|
134
|
+
</layout>
|
|
135
|
+
</widget>
|
|
136
|
+
</item>
|
|
137
|
+
<item>
|
|
138
|
+
<widget class="QWidget" name="widget_4" native="true">
|
|
139
|
+
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
140
|
+
<property name="spacing">
|
|
141
|
+
<number>3</number>
|
|
142
|
+
</property>
|
|
143
|
+
<property name="leftMargin">
|
|
144
|
+
<number>0</number>
|
|
145
|
+
</property>
|
|
146
|
+
<property name="topMargin">
|
|
147
|
+
<number>0</number>
|
|
148
|
+
</property>
|
|
149
|
+
<property name="rightMargin">
|
|
150
|
+
<number>0</number>
|
|
151
|
+
</property>
|
|
152
|
+
<property name="bottomMargin">
|
|
153
|
+
<number>0</number>
|
|
154
|
+
</property>
|
|
155
|
+
</layout>
|
|
156
|
+
</widget>
|
|
157
|
+
</item>
|
|
158
|
+
<item>
|
|
159
|
+
<spacer name="verticalSpacer">
|
|
160
|
+
<property name="orientation">
|
|
161
|
+
<enum>Qt::Vertical</enum>
|
|
162
|
+
</property>
|
|
163
|
+
<property name="sizeHint" stdset="0">
|
|
164
|
+
<size>
|
|
165
|
+
<width>20</width>
|
|
166
|
+
<height>40</height>
|
|
167
|
+
</size>
|
|
168
|
+
</property>
|
|
169
|
+
</spacer>
|
|
170
|
+
</item>
|
|
171
|
+
<item>
|
|
172
|
+
<widget class="QCheckBox" name="uiDontAskAgainCHK">
|
|
173
|
+
<property name="text">
|
|
174
|
+
<string>Don't Ask Again</string>
|
|
175
|
+
</property>
|
|
176
|
+
</widget>
|
|
177
|
+
</item>
|
|
178
|
+
<item>
|
|
179
|
+
<widget class="QDialogButtonBox" name="uiDialogButtonBox">
|
|
180
|
+
<property name="orientation">
|
|
181
|
+
<enum>Qt::Horizontal</enum>
|
|
182
|
+
</property>
|
|
183
|
+
<property name="standardButtons">
|
|
184
|
+
<set>QDialogButtonBox::No|QDialogButtonBox::Yes</set>
|
|
185
|
+
</property>
|
|
186
|
+
</widget>
|
|
187
|
+
</item>
|
|
188
|
+
</layout>
|
|
189
|
+
</widget>
|
|
190
|
+
<resources/>
|
|
191
|
+
<connections>
|
|
192
|
+
<connection>
|
|
193
|
+
<sender>uiDialogButtonBox</sender>
|
|
194
|
+
<signal>accepted()</signal>
|
|
195
|
+
<receiver>uiSuggestPathQuotesDLG</receiver>
|
|
196
|
+
<slot>accept()</slot>
|
|
197
|
+
<hints>
|
|
198
|
+
<hint type="sourcelabel">
|
|
199
|
+
<x>248</x>
|
|
200
|
+
<y>254</y>
|
|
201
|
+
</hint>
|
|
202
|
+
<hint type="destinationlabel">
|
|
203
|
+
<x>157</x>
|
|
204
|
+
<y>274</y>
|
|
205
|
+
</hint>
|
|
206
|
+
</hints>
|
|
207
|
+
</connection>
|
|
208
|
+
<connection>
|
|
209
|
+
<sender>uiDialogButtonBox</sender>
|
|
210
|
+
<signal>rejected()</signal>
|
|
211
|
+
<receiver>uiSuggestPathQuotesDLG</receiver>
|
|
212
|
+
<slot>reject()</slot>
|
|
213
|
+
<hints>
|
|
214
|
+
<hint type="sourcelabel">
|
|
215
|
+
<x>316</x>
|
|
216
|
+
<y>260</y>
|
|
217
|
+
</hint>
|
|
218
|
+
<hint type="destinationlabel">
|
|
219
|
+
<x>286</x>
|
|
220
|
+
<y>274</y>
|
|
221
|
+
</hint>
|
|
222
|
+
</hints>
|
|
223
|
+
</connection>
|
|
224
|
+
</connections>
|
|
225
|
+
</ui>
|
preditor/gui/workbox_mixin.py
CHANGED
|
@@ -67,8 +67,8 @@ class WorkboxMixin(object):
|
|
|
67
67
|
def __exec_all__(self):
|
|
68
68
|
raise NotImplementedError("Mixin method not overridden.")
|
|
69
69
|
|
|
70
|
-
def __exec_selected__(self):
|
|
71
|
-
txt = self.__selected_text__()
|
|
70
|
+
def __exec_selected__(self, truncate=True):
|
|
71
|
+
txt, line = self.__selected_text__()
|
|
72
72
|
|
|
73
73
|
# Remove any leading white space shared across all lines
|
|
74
74
|
txt = textwrap.dedent(txt)
|
|
@@ -76,8 +76,9 @@ class WorkboxMixin(object):
|
|
|
76
76
|
# Get rid of pesky \r's
|
|
77
77
|
txt = self.__unix_end_lines__(txt)
|
|
78
78
|
|
|
79
|
-
# Make workbox line numbers match the workbox line numbers
|
|
80
|
-
|
|
79
|
+
# Make workbox line numbers match the workbox line numbers, by adding
|
|
80
|
+
# the appropriate number of newlines to mimic it's original position in
|
|
81
|
+
# the workbox.
|
|
81
82
|
txt = '\n' * line + txt
|
|
82
83
|
|
|
83
84
|
# execute the code
|
|
@@ -87,7 +88,10 @@ class WorkboxMixin(object):
|
|
|
87
88
|
# If the selected code was a statement print the result of the statement.
|
|
88
89
|
ret = repr(ret)
|
|
89
90
|
self.__console__().startOutputLine()
|
|
90
|
-
|
|
91
|
+
if truncate:
|
|
92
|
+
print(self.truncate_middle(ret, 100))
|
|
93
|
+
else:
|
|
94
|
+
print(ret)
|
|
91
95
|
|
|
92
96
|
def __file_monitoring_enabled__(self):
|
|
93
97
|
"""Returns True if this workbox supports file monitoring.
|
|
@@ -183,8 +187,9 @@ class WorkboxMixin(object):
|
|
|
183
187
|
def __save__(self):
|
|
184
188
|
raise NotImplementedError("Mixin method not overridden.")
|
|
185
189
|
|
|
186
|
-
def __selected_text__(self, start_of_line=False):
|
|
187
|
-
"""Returns selected text or the current line of text
|
|
190
|
+
def __selected_text__(self, start_of_line=False, selectText=False):
|
|
191
|
+
"""Returns selected text or the current line of text, plus the line
|
|
192
|
+
number of the begining of selection / cursor position.
|
|
188
193
|
|
|
189
194
|
If text is selected, it is returned. If nothing is selected, returns the
|
|
190
195
|
entire line of text the cursor is currently on.
|
|
@@ -192,6 +197,13 @@ class WorkboxMixin(object):
|
|
|
192
197
|
Args:
|
|
193
198
|
start_of_line (bool, optional): If text is selected, include any
|
|
194
199
|
leading text from the first line of the selection.
|
|
200
|
+
selectText (bool): If expanding to the entire line from the cursor,
|
|
201
|
+
indicates whether to select that line of text
|
|
202
|
+
|
|
203
|
+
Returns:
|
|
204
|
+
str: The requested text
|
|
205
|
+
line (int): plus the line number of the beginning of selection / cursor
|
|
206
|
+
position.
|
|
195
207
|
"""
|
|
196
208
|
raise NotImplementedError("Mixin method not overridden.")
|
|
197
209
|
|
|
@@ -343,15 +355,35 @@ class WorkboxMixin(object):
|
|
|
343
355
|
__exec_selected__: If the user pressed Shift + Return or pressed the
|
|
344
356
|
number pad enter key calling `__exec_selected__`.
|
|
345
357
|
"""
|
|
346
|
-
if event.key() == Qt.Key_Enter or (
|
|
347
|
-
event.key() == Qt.Key_Return and event.modifiers() == Qt.ShiftModifier
|
|
348
|
-
):
|
|
349
|
-
# Number pad enter, or Shift + Return pressed, execute selected
|
|
350
|
-
if run:
|
|
351
|
-
self.__exec_selected__()
|
|
352
|
-
|
|
353
|
-
if self.window().uiAutoPromptACT.isChecked():
|
|
354
|
-
self.__console__().startInputLine()
|
|
355
|
-
return '__exec_selected__'
|
|
356
358
|
|
|
357
|
-
|
|
359
|
+
# Number pad enter, or Shift + Return pressed, execute selected
|
|
360
|
+
# Ctrl+ Shift+Return pressed, execute selected without truncating output
|
|
361
|
+
if run:
|
|
362
|
+
# self.__exec_selected__()
|
|
363
|
+
# Collect what was pressed
|
|
364
|
+
key = event.key()
|
|
365
|
+
modifiers = event.modifiers()
|
|
366
|
+
|
|
367
|
+
# Determine which relevant combos are pressed
|
|
368
|
+
ret = key == Qt.Key_Return
|
|
369
|
+
enter = key == Qt.Key_Enter
|
|
370
|
+
shift = modifiers == Qt.ShiftModifier
|
|
371
|
+
ctrlShift = modifiers == Qt.ControlModifier | Qt.ShiftModifier
|
|
372
|
+
|
|
373
|
+
# Determine which actions to take
|
|
374
|
+
evalTrunc = enter or (ret and shift)
|
|
375
|
+
evalNoTrunc = ret and ctrlShift
|
|
376
|
+
|
|
377
|
+
if evalTrunc:
|
|
378
|
+
# Execute with truncation
|
|
379
|
+
self.window().execSelected()
|
|
380
|
+
elif evalNoTrunc:
|
|
381
|
+
# Execute without truncation
|
|
382
|
+
self.window().execSelected(truncate=False)
|
|
383
|
+
|
|
384
|
+
if evalTrunc or evalNoTrunc:
|
|
385
|
+
if self.window().uiAutoPromptACT.isChecked():
|
|
386
|
+
self.__console__().startInputLine()
|
|
387
|
+
return '__exec_selected__'
|
|
388
|
+
else:
|
|
389
|
+
return False
|