summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp9
-rw-r--r--core/apps/textedit/textedit.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index f56d5d3..1a1b186 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -370,13 +370,12 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
a = new QAction( tr( "Delete" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) );
a->addTo( edit );
searchBar->hide();
-
editor = new QpeEditor( this );
setCentralWidget( editor );
editor->setFrameStyle( QFrame::Panel | QFrame::Sunken );
connect( editor, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) );
resize( 200, 300 );
@@ -518,16 +517,21 @@ void TextEdit::fileOpen()
delete browseForFiles;
editor->setEdited( FALSE);
edited1=FALSE;
edited=FALSE;
if(caption().left(1)=="*")
setCaption(caption().right(caption().length()-1));
+ doSearchBar();
+}
+
+void TextEdit::doSearchBar()
+{
Config cfg("TextEdit");
cfg.setGroup("View");
if(cfg.readEntry("SearchBar","Closed") != "Opened")
- searchBar->hide();
+ searchBar->hide();
}
#if 0
void TextEdit::slotFind()
{
FindDialog frmFind( "Text Editor", this );
@@ -846,12 +850,13 @@ void TextEdit::setDocument(const QString& fileref)
} else {
openFile(DocLnk(fileref));
}
editor->setEdited(TRUE);
edited1=FALSE;
edited=TRUE;
+ doSearchBar();
}
void TextEdit::closeEvent( QCloseEvent *e )
{
bFromDocView = FALSE;
e->accept();
diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h
index a70b581..70cf068 100644
--- a/core/apps/textedit/textedit.h
+++ b/core/apps/textedit/textedit.h
@@ -58,13 +58,13 @@ public:
void openFile( const QString & );
public slots:
void editorChanged();
protected:
void closeEvent( QCloseEvent *e );
-
+ void doSearchBar();
private slots:
void setDocument(const QString&);
void changeFont();
void fileNew();
void fileRevert();
void fileOpen();