From 3f7deb35938a8993ee835e05de9bc2cddfe05744 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sat, 30 Jan 2021 21:51:14 +0200 Subject: SigTool: Replaced TQLabel with TQTextBrowser for the instructions area. This gives us a scrollable widget better suited for long text. Signed-off-by: Mavridis Philippe --- src/sigtool.cpp | 15 ++++++++------- src/sigtool.h | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/sigtool.cpp b/src/sigtool.cpp index 5c93a7e..3568503 100644 --- a/src/sigtool.cpp +++ b/src/sigtool.cpp @@ -14,6 +14,7 @@ #include #include #include +#include const char *mail_clients[] = { "KMail", @@ -98,10 +99,10 @@ Sigtool::Sigtool(TQWidget *parent, const char *name) notes_layout->addMultiCellWidget(notes_hlp, 1,1, 0,1); TQHBoxLayout *notes_box = new TQHBoxLayout(notes_hlp, KDialog::spacingHint() ); - notes_label = new TQLabel(text, notes_hlp); - notes_label->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); - //notes_label->setFixedSize(notes_label->sizeHint()); - notes_box->addWidget(notes_label); + notes_browser = new TQTextBrowser(notes_hlp); + notes_browser->setText(text); + notes_browser->setAlignment( TQt::AlignCenter ); + notes_box->addWidget(notes_browser); @@ -205,7 +206,7 @@ void Sigtool::manualKMail(){ const TQString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in KMail to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." ); - notes_label->setText( text ); + notes_browser->setText( text ); } @@ -214,8 +215,8 @@ void Sigtool::manualEvolution(){ const TQString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in Evolution to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." ); - notes_label->setText( text ); - notes_label->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); + notes_browser->setText( text ); + notes_browser->setAlignment( TQt::AlignCenter ); } diff --git a/src/sigtool.h b/src/sigtool.h index d76cf50..f1a6696 100644 --- a/src/sigtool.h +++ b/src/sigtool.h @@ -23,6 +23,7 @@ class TQCheckBox; class TQListBox; class TQPushButton; class TQLabel; +class TQTextBrowser; class TDEProcess; class TDEConfig; class KURLRequester; @@ -131,7 +132,7 @@ private: TQStringList lastSearchItems; TQStringList lastSearchPaths; TQComboBox *check_combo; - TQLabel *notes_label; + TQTextBrowser *notes_browser; }; #endif // _Sigtool_H_ -- cgit v1.2.1