Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
90a09728
Commit
90a09728
authored
Feb 13, 2013
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EDITOR: Show trailing spaces is an option
parent
b30a833f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
39 deletions
+63
-39
share/kumir2/translations/CoreGUI_ru.ts
share/kumir2/translations/CoreGUI_ru.ts
+22
-22
share/kumir2/translations/Editor_ru.ts
share/kumir2/translations/Editor_ru.ts
+19
-14
src/plugins/editor/editorplane.cpp
src/plugins/editor/editorplane.cpp
+4
-1
src/plugins/editor/settingspage.cpp
src/plugins/editor/settingspage.cpp
+6
-0
src/plugins/editor/settingspage.h
src/plugins/editor/settingspage.h
+3
-0
src/plugins/editor/settingspage.ui
src/plugins/editor/settingspage.ui
+9
-2
No files found.
share/kumir2/translations/CoreGUI_ru.ts
View file @
90a09728
...
...
@@ -346,7 +346,7 @@ p, li { white-space: pre-wrap; }
<
name
>
CoreGUI
::
MainWindow
<
/name
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.ui
"
line
=
"
14
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
261
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
310
"
/>
<
source
>
Kumir
<
/source
>
<
translation
>
Кумир
<
/translation
>
<
/message
>
...
...
@@ -523,7 +523,7 @@ p, li { white-space: pre-wrap; }
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.ui
"
line
=
"
238
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
8
13
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
8
67
"
/>
<
source
>
Restore
previous
session
<
/source
>
<
translation
>
Восстановить
предыдущий
сеанс
<
/translation
>
<
/message
>
...
...
@@ -533,62 +533,62 @@ p, li { white-space: pre-wrap; }
<
translation
>
Для
этой
вкладки
нет
действий
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
184
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
233
"
/>
<
source
>
No
errors
<
/source
>
<
translation
>
Ошибок
нет
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
188
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
237
"
/>
<
source
>
Errors
:
%
1
<
/source
>
<
translation
>
Ошибок
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
391
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
442
"
/>
<
source
>
Kumir
programs
(
*
.
kum
)
<
/source
>
<
translation
>
Программы
Кумир
(
*
.
kum
)
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
394
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
445
"
/>
<
source
>
Pascal
programs
(
*
.
pas
*
.
pp
<
/source
>
<
translation
>
Программы
Паскаль
(
*
.
pas
*
.
pp
)
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
397
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
448
"
/>
<
source
>
Text
files
(
*
.
txt
)
<
/source
>
<
translation
>
Текстовые
файлы
(
*
.
txt
)
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
399
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
450
"
/>
<
source
>
All
files
(
*
)
<
/source
>
<
translation
>
Все
файлы
(
*
)
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
4
00
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
4
51
"
/>
<
source
>
Save
file
<
/source
>
<
translation
>
Сохранить
файл
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
4
30
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
4
81
"
/>
<
source
>
Can
&
apos
;
t
save
file
<
/source
>
<
translation
>
Не
могу
сохранить
файл
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
477
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
531
"
/>
<
source
>
Close
editor
<
/source
>
<
translation
>
Закрытие
текста
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
478
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
532
"
/>
<
source
>
Save
current
text
?
<
/source
>
<
translation
>
Сохранить
текущий
текст
?
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
8
14
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
8
68
"
/>
<
source
>
Are
you
sure
to
restore
previous
session
?
All
unsaved
changes
will
be
lost
.
<
/source
>
<
translation
>
Вы
уверены
,
что
хотите
восстановить
предыдущий
сеанс
?
Все
открытые
файлы
будут
закрыты
без
сохранения
.
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
9
36
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
9
90
"
/>
<
source
>
The
following
files
have
changes
:
%
1
Save
them
?
<
/source
>
...
...
@@ -597,7 +597,7 @@ Save them?</source>
Сохранить
их
?
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
9
37
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
9
91
"
/>
<
source
>
Close
Kumir
<
/source
>
<
translation
>
Выход
из
Кумир
<
/translation
>
<
/message
>
...
...
@@ -622,7 +622,7 @@ Save them?</source>
<
translation
type
=
"
obsolete
"
>
Закрыть
без
сохранения
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
8
36
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
8
90
"
/>
<
source
>
Start
<
/source
>
<
translation
>
Начало
<
/translation
>
<
/message
>
...
...
@@ -637,12 +637,12 @@ Using Qt version %2</source>
Использует
Qt
версии
%
2
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
10
44
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
10
98
"
/>
<
source
>
Load
file
...
<
/source
>
<
translation
>
Загрузить
файл
...
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
1
046
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/mainwindow.cpp
"
line
=
"
1
100
"
/>
<
source
>
Kumir
programs
(
*
.
kum
);;
Pascal
programs
(
*
.
pas
*
.
pp
);;
Web
pages
(
*
.
html
*
.
htm
);;
Text
files
(
*
.
txt
);;
All
files
(
*
)
<
/source
>
<
translation
>
Программы
Кумир
(
*
.
kum
);;
Программы
Pascal
(
*
.
pas
*
.
pp
);;
Web
-
страницы
(
*
.
html
*
.
htm
);;
Текстовые
файлы
(
*
.
txt
);;
Все
файлы
(
*
)
<
/translation
>
<
/message
>
...
...
@@ -684,23 +684,23 @@ Using Qt version %2</source>
<
translation
>
Редактирование
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
27
7
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
27
8
"
/>
<
source
>
Observe
<
/source
>
<
translation
>
Анализ
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
28
2
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
28
4
"
/>
<
source
>
Running
<
/source
>
<
translation
>
Выполнение
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
286
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
289
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
293
"
/>
<
source
>
Pause
<
/source
>
<
translation
>
Пауза
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
3
39
"
/>
<
location
filename
=
"
../../../src/plugins/coregui/plugin.cpp
"
line
=
"
3
44
"
/>
<
source
>
Start
<
/source
>
<
translation
>
Начало
<
/translation
>
<
/message
>
...
...
share/kumir2/translations/Editor_ru.ts
View file @
90a09728
...
...
@@ -24,22 +24,22 @@
<
context
>
<
name
>
Editor
::
EditorPrivate
<
/name
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
15
1
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
15
3
"
/>
<
source
>
Keys
:
%
1
<
/source
>
<
translation
>
Клав
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
17
6
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
17
8
"
/>
<
source
>
Row
:
%
1
,
Col
:
%
2
<
/source
>
<
translation
>
Стр
:
%
1
,
Поз
:
%
2
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
56
0
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
56
6
"
/>
<
source
>
Edit
<
/source
>
<
translation
>
Редактирование
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
77
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
83
"
/>
<
source
>
Insert
<
/source
>
<
translation
>
Вставка
<
/translation
>
<
/message
>
...
...
@@ -242,7 +242,12 @@
<
translation
>
Прижимать
текст
программы
к
левому
краю
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/settingspage.cpp
"
line
=
"
259
"
/>
<
location
filename
=
"
../../../src/plugins/editor/settingspage.ui
"
line
=
"
561
"
/>
<
source
>
Show
trailing
spaces
<
/source
>
<
translation
>
Отображать
пробелы
в
конце
строк
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/settingspage.cpp
"
line
=
"
265
"
/>
<
source
>
Choose
color
<
/source
>
<
translation
>
Выберете
цвет
<
/translation
>
<
/message
>
...
...
@@ -324,47 +329,47 @@
<
context
>
<
name
>
QObject
<
/name
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
495
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
501
"
/>
<
source
>
Select
all
text
in
editor
<
/source
>
<
translation
>
Выбрать
весь
текст
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
50
1
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
50
7
"
/>
<
source
>
Copy
selection
to
clipboard
<
/source
>
<
translation
>
Скопировать
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
07
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
13
"
/>
<
source
>
Cut
selection
to
clipboard
<
/source
>
<
translation
>
Вырезать
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
51
3
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
51
9
"
/>
<
source
>
Paste
from
clipboard
<
/source
>
<
translation
>
Вставить
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
19
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
25
"
/>
<
source
>
Delete
line
under
cursor
<
/source
>
<
translation
>
Удалить
строку
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
25
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
31
"
/>
<
source
>
Delete
text
from
cursor
to
end
of
line
<
/source
>
<
translation
>
Удалить
текст
до
конца
строки
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
53
2
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
53
8
"
/>
<
source
>
Undo
last
action
<
/source
>
<
translation
>
Отменить
последнее
действие
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
54
0
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
54
6
"
/>
<
source
>
Redo
last
undoed
action
<
/source
>
<
translation
>
Повторить
отмененное
действие
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
48
"
/>
<
location
filename
=
"
../../../src/plugins/editor/editor.cpp
"
line
=
"
5
54
"
/>
<
source
>
(
Un
)
Comment
lines
<
/source
>
<
translation
>
(
Раз
)
комменировать
строки
<
/translation
>
<
/message
>
...
...
src/plugins/editor/editorplane.cpp
View file @
90a09728
...
...
@@ -1721,7 +1721,10 @@ void EditorPlane::paintText(QPainter *p, const QRect &rect)
p
->
drawPolyline
(
pp
);
}
}
if
(
trailingSpaces
)
{
if
(
trailingSpaces
&&
m_settings
->
value
(
SettingsPage
::
KeyShowTrailingSpaces
,
SettingsPage
::
DefaultShowTrailingSpaces
).
toBool
())
{
p
->
setPen
(
QColor
(
"lightgray"
));
// Paint trailing spaces
QString
dots
;
...
...
src/plugins/editor/settingspage.cpp
View file @
90a09728
...
...
@@ -51,6 +51,9 @@ QString SettingsPage::DefaultPlayMacroShortcut = "Esc";
QString
SettingsPage
::
KeyForcePressTextToLeft
=
"Other/PressTextToLeft"
;
bool
SettingsPage
::
DefaultForcePressTextToLeft
=
false
;
QString
SettingsPage
::
KeyShowTrailingSpaces
=
"Other/ShowTrailingSpaces"
;
bool
SettingsPage
::
DefaultShowTrailingSpaces
=
false
;
QString
SettingsPage
::
defaultFontFamily
()
{
QString
result
=
"Courier"
;
...
...
@@ -130,12 +133,14 @@ void SettingsPage::accept()
m_settings
->
setValue
(
KeyPlayMacroShortcut
,
play
);
m_settings
->
setValue
(
KeyForcePressTextToLeft
,
ui
->
pressTextLeft
->
isChecked
());
m_settings
->
setValue
(
KeyShowTrailingSpaces
,
ui
->
showTrailingSpaces
->
isChecked
());
m_settings
->
setValue
(
"Settings/FontCollapsed"
,
ui
->
groupFont
->
isCollapsed
());
m_settings
->
setValue
(
"Settings/KeyboardCollapsed"
,
ui
->
groupKeyboard
->
isCollapsed
());
m_settings
->
setValue
(
"Settings/SyntaxCollapsed"
,
ui
->
groupSyntax
->
isCollapsed
());
m_settings
->
setValue
(
"Settings/OtherCollapsed"
,
ui
->
groupOther
->
isCollapsed
());
emit
settingsChanged
();
}
...
...
@@ -202,6 +207,7 @@ void SettingsPage::init()
ui
->
macroPlayKey
->
setCurrentIndex
(
index
);
ui
->
pressTextLeft
->
setChecked
(
m_settings
->
value
(
KeyForcePressTextToLeft
,
DefaultForcePressTextToLeft
).
toBool
());
ui
->
showTrailingSpaces
->
setChecked
(
m_settings
->
value
(
KeyShowTrailingSpaces
,
DefaultShowTrailingSpaces
).
toBool
());
updateFontPreview
();
}
...
...
src/plugins/editor/settingspage.h
View file @
90a09728
...
...
@@ -69,6 +69,9 @@ public:
static
QString
DefaultPlayMacroShortcut
;
static
quint32
DefaultTempSwitchLayoutButton
;
static
QString
KeyShowTrailingSpaces
;
static
bool
DefaultShowTrailingSpaces
;
public
slots
:
void
accept
();
void
init
();
...
...
src/plugins/editor/settingspage.ui
View file @
90a09728
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
3
72
</width>
<height>
699
</height>
<width>
3
90
</width>
<height>
724
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -555,6 +555,13 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"showTrailingSpaces"
>
<property
name=
"text"
>
<string>
Show trailing spaces
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment