diff --git a/src/gui/FWBSettings.cpp b/src/gui/FWBSettings.cpp
index 2b20c2dc9..46d5cdced 100644
--- a/src/gui/FWBSettings.cpp
+++ b/src/gui/FWBSettings.cpp
@@ -102,7 +102,7 @@ const char* rulesFont = SETTINGS_PATH_PREFIX "/UI/Fonts/RulesFont";
const char* treeFont = SETTINGS_PATH_PREFIX "/UI/Fonts/TreeFont";
const char* uiFont = SETTINGS_PATH_PREFIX "/UI/Fonts/UiFont";
-const char* showCommentTip = SETTINGS_PATH_PREFIX "/UI/ShowCommentTip";
+const char* clipComment = SETTINGS_PATH_PREFIX "/UI/ClipComment";
FWBSettings::FWBSettings() : QSettings(QSettings::UserScope, "netcitadel.com", "Firewall Builder")
{
@@ -198,8 +198,8 @@ void FWBSettings::init()
ok = contains(uiFont);
if (!ok) setUiFont(QFont("times", 11, QFont::Normal));
- ok = contains(showCommentTip);
- if (!ok) setShowCommentTip(false);
+ ok = contains(clipComment);
+ if (!ok) setClipComment(true);
#ifndef _WIN32
if (getSSHPath().isEmpty()) setSSHPath("ssh");
@@ -619,12 +619,12 @@ QFont FWBSettings::getFontByType(const char *type)
return QFont("times", 11, QFont::Normal);
}
-bool FWBSettings::getShowCommentTip()
+bool FWBSettings::getClipComment()
{
- return value(showCommentTip).toBool();
+ return value(clipComment).toBool();
}
-void FWBSettings::setShowCommentTip(bool showTooltip)
+void FWBSettings::setClipComment(bool clip)
{
- setValue(showCommentTip, showTooltip);
+ setValue(clipComment, clip);
}
\ No newline at end of file
diff --git a/src/gui/FWBSettings.h b/src/gui/FWBSettings.h
index 2fb736973..5d3df62d8 100644
--- a/src/gui/FWBSettings.h
+++ b/src/gui/FWBSettings.h
@@ -152,8 +152,8 @@ class FWBSettings : public QSettings {
QFont getUiFont();
void setUiFont(const QFont &font);
- bool getShowCommentTip();
- void setShowCommentTip(bool);
+ bool getClipComment();
+ void setClipComment(bool);
private:
QFont getFontByType(const char*type);
};
diff --git a/src/gui/PrefsDialog.cpp b/src/gui/PrefsDialog.cpp
index 71ce22d78..6f7efe77b 100644
--- a/src/gui/PrefsDialog.cpp
+++ b/src/gui/PrefsDialog.cpp
@@ -185,7 +185,7 @@ PrefsDialog::PrefsDialog(QWidget *parent) : QDialog(parent)
rulesFont = st->getRulesFont();
treeFont = st->getTreeFont();
uiFont = st->getUiFont();
- m_dialog->chCommentTip->setChecked(st->getShowCommentTip() );
+ m_dialog->chClipComment->setChecked(st->getClipComment() );
}
void PrefsDialog::changeColor(QPushButton *btn,
@@ -444,7 +444,7 @@ void PrefsDialog::accept()
st->setTreeFont(treeFont);
st->setUiFont(uiFont);
- st->setShowCommentTip(m_dialog->chCommentTip->isChecked());
+ st->setClipComment(m_dialog->chClipComment->isChecked());
st->setSSHPath( m_dialog->sshPath->text() );
diff --git a/src/gui/RuleSetView.cpp b/src/gui/RuleSetView.cpp
index 8e7379783..8008998d0 100644
--- a/src/gui/RuleSetView.cpp
+++ b/src/gui/RuleSetView.cpp
@@ -475,9 +475,9 @@ RuleSetView::~RuleSetView()
{
}
-bool RuleSetView::showComment(QPoint pos, QHelpEvent *he)
+bool RuleSetView::showCommentTip(QPoint pos, QHelpEvent *he)
{
- if (!st->getShowCommentTip())
+ if (!st->getClipComment())
return false;
int col = columnAt(pos.x() - verticalHeader()->width());
if((pos.y() >= horizontalHeader()->height()) && RuleSetView::Comment == getColType(col))
@@ -515,7 +515,7 @@ bool RuleSetView::event ( QEvent * event )
{
QHelpEvent *he = (QHelpEvent*) event;
QPoint pos = he->pos();
- if (showComment(pos, he))
+ if (showCommentTip(pos, he))
return true;
if ((st->getObjTooltips()) && (pos.y() >= horizontalHeader()->height()))
{
@@ -531,7 +531,6 @@ bool RuleSetView::event ( QEvent * event )
contentsMouse.setY(contentsMouse.y() + verticalOffset() + 3);//+3 for fitting purposed
cr=ruleDelegate->cellGeometry(row,col);
- qDebug("%d", getColType(col));
if ( RuleSetView::Options == getColType(col) )
{
@@ -974,7 +973,7 @@ QRect RuleSetView::calculateCellSize( int row, int col )
Qt::AlignLeft|Qt::AlignVCenter,
QString::fromUtf8(rule->getComment().c_str()) );
- hc = item_h; // br.height() + RuleElementSpacing; //
+ hc = st->getClipComment() ? item_h : (br.height() + RuleElementSpacing/2);
wc = RuleElementSpacing/2 + br.width();
break;
}
@@ -1333,7 +1332,7 @@ void RuleSetView::drawComment(QPainter &p, int row, int col, const QRect &cr)
QRect br=p.boundingRect(QRect(x, y, 1000, 1000),
Qt::AlignLeft|Qt::AlignVCenter,
comm);
- if (st->getShowCommentTip() && text_h > 0)
+ if (st->getClipComment() && text_h > 0)
{
QStringList strs = comm.split('\n');
diff --git a/src/gui/RuleSetView.h b/src/gui/RuleSetView.h
index 2456b3097..d4dcdd272 100644
--- a/src/gui/RuleSetView.h
+++ b/src/gui/RuleSetView.h
@@ -429,7 +429,7 @@ private:
QSize drawIconInRule(QPainter &p, int x, int y, libfwbuilder::RuleElement *re,
libfwbuilder::FWObject *o1);
QString chooseIcon(QString icn);
- bool showComment(QPoint pos, QHelpEvent *he);
+ bool showCommentTip(QPoint pos, QHelpEvent *he);
void drawComment(QPainter &p, int row, int col, const QRect &cr);
};
diff --git a/src/gui/fwbuilder_ru.qm b/src/gui/fwbuilder_ru.qm
index f18eddda3..f5fa68add 100644
Binary files a/src/gui/fwbuilder_ru.qm and b/src/gui/fwbuilder_ru.qm differ
diff --git a/src/gui/fwbuilder_ru.ts b/src/gui/fwbuilder_ru.ts
index 7f91055df..11314781f 100644
--- a/src/gui/fwbuilder_ru.ts
+++ b/src/gui/fwbuilder_ru.ts
@@ -9227,7 +9227,7 @@ because of incompatible type.
1.2.9 или старше
-
+
Fatal error during initial RCS checkin of file %1 :
%2
Exit status %3
@@ -9236,12 +9236,12 @@ Exit status %3
Код возврата %3
-
+
Fatal error running rlog for %1
Фатальная ошибка при выполнении rlog для %1
-
+
Fatal error running rcsdiff for file %1
Фатальная ошибка при выполнении rcsdiff для файла %1
@@ -10250,34 +10250,34 @@ Builder GUI and save back to file again.
RCS
-
+
Error checking file out: %1
Ошибка при получении файла %1 из системы контроля версий
-
+
&Continue
Продолжить
-
+
Error creating temporary file
Ошибка при создании временного файла
-
+
Error writing to temporary file
Ошибка при записи во временный файл
-
+
File is opened and locked by %1.
You can only open it read-only.
Файл уже открыт и заблокирован %1.
Вы можете открыть его только для чтения.
-
+
Revision %1 of this file has been checked out and locked by you earlier.
The file may be opened in another copy of Firewall Builder or was left opened
after the program crashed.
@@ -10286,17 +10286,17 @@ after the program crashed.
возможно остался открытым после краха предидущей копии программы.
-
+
Open &read-only
Открыть только для чтения
-
+
&Open and continue editing
Открыть и продолжить редактирование
-
+
&Cancel
Отмена
@@ -10968,52 +10968,52 @@ for this rule
Учёт
-
+
Outbound
Исходящее
-
+
Original
Исходный
-
+
Insert Rule
Вставить правило
-
+
Paste Rule
Вставить правило из буфера обмена
-
+
Edit
Редактировать
-
+
Copy
Копировать
-
+
Cut
Вырезать
-
+
Paste
Вставить из буфера обмена
-
+
Delete
Удалить
-
+
Negate
Отрицание
@@ -11033,67 +11033,67 @@ for this rule
Цветовая метка:
-
+
Add Rule Below
Добавить правило ниже
-
+
Remove Rule
Удалить правило
-
+
Remove Rules
Удалить правила
-
+
Move Rule
Переместить правило
-
+
Move Rules
Переместить правила
-
+
Copy Rule
Копировать правило
-
+
Cut Rule
Вырезать правило
-
+
Paste Rule Above
Вставить правило выше
-
+
Paste Rule Below
Вставить правило ниже
-
+
Enable Rule
Включить правило
-
+
Enable Rules
Включить правила
-
+
Disable Rule
Отключить правило
-
+
Disable Rules
Отключить правила
@@ -11103,7 +11103,7 @@ for this rule
Редактор комментариев
-
+
Any
Любой
@@ -11128,112 +11128,112 @@ for this rule
Учитывать
-
+
Inbound
Входящее
-
+
Outbound
Исходящее
-
+
Both
Оба
-
+
Rule Options
Опции правила
-
+
Logging On
Включить протоколирование
-
+
Logging Off
Отключить протоколирование
-
+
Default
По-умолчанию
-
+
All
Все
-
+
Parameters
Параметры
-
+
Reveal in tree
Показывать в дереве
-
+
Where used
Используется
-
+
Rules %1-%2
-
+
Rule %1
-
+
Change color
-
+
No color
-
+
Red
-
+
Orange
-
+
Yellow
-
+
Green
-
+
Blue
-
+
Purple
-
+
Gray
@@ -17195,8 +17195,8 @@ First, create temporary access list to permit connections from the management su
- Show comments in tooltips
- Показывать комментарии во всплывающих подсказках
+ Clip comments in rules
+ Обрезать в правилах комментарии по размеру ячейки
diff --git a/src/gui/prefsdialog_q.ui b/src/gui/prefsdialog_q.ui
index ce1d826ef..113702099 100644
--- a/src/gui/prefsdialog_q.ui
+++ b/src/gui/prefsdialog_q.ui
@@ -209,7 +209,7 @@
- -
+
-
Qt::Horizontal
@@ -455,9 +455,9 @@
-
-
+
- Show comments in tooltips
+ Clip comments in rules
@@ -1248,53 +1248,101 @@
20
-
-
+
+
btRulesFont
clicked()
prefsDialog_q
changeRulesFont()
-
- 20
- 20
-
-
- 20
- 20
-
+
+ 20
+ 20
+
+
+ 20
+ 20
+
-
-
+
+
+ chShowIcons
+ clicked()
+ prefsDialog_q
+ changeShowIcons()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ rb16
+ clicked()
+ prefsDialog_q
+ changeIconSize16()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ rb25
+ clicked()
+ prefsDialog_q
+ changeIconSize25()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
btTreeFont
clicked()
prefsDialog_q
changeTreeFont()
-
- 20
- 20
-
-
- 20
- 20
-
+
+ 20
+ 20
+
+
+ 20
+ 20
+
-
-
+
+
btUiFont
clicked()
prefsDialog_q
changeUiFont()
-
- 20
- 20
-
-
- 20
- 20
-
+
+ 20
+ 20
+
+
+ 20
+ 20
+