author | llornkcor <llornkcor> | 2002-03-19 13:29:51 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-19 13:29:51 (UTC) |
commit | f6b540e14072d9cfcd5f4a787dcd9039fae7011b (patch) (side-by-side diff) | |
tree | d0505f71c851a7156862c0fb67c8c640f8c49205 | |
parent | 3ed6f60e2eb329edda0d3786c58009d06c7e5b18 (diff) | |
download | opie-f6b540e14072d9cfcd5f4a787dcd9039fae7011b.zip opie-f6b540e14072d9cfcd5f4a787dcd9039fae7011b.tar.gz opie-f6b540e14072d9cfcd5f4a787dcd9039fae7011b.tar.bz2 |
searchbar was being shown when text opened from setDocument
-rw-r--r-- | core/apps/textedit/textedit.cpp | 9 | ||||
-rw-r--r-- | core/apps/textedit/textedit.h | 2 |
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 @@ -372,9 +372,8 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) a->addTo( edit ); searchBar->hide(); - editor = new QpeEditor( this ); setCentralWidget( editor ); editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); connect( editor, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) ); @@ -520,12 +519,17 @@ void TextEdit::fileOpen() 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() @@ -848,8 +852,9 @@ void TextEdit::setDocument(const QString& fileref) } editor->setEdited(TRUE); edited1=FALSE; edited=TRUE; + doSearchBar(); } void TextEdit::closeEvent( QCloseEvent *e ) { 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 @@ -60,9 +60,9 @@ public slots: void editorChanged(); protected: void closeEvent( QCloseEvent *e ); - + void doSearchBar(); private slots: void setDocument(const QString&); void changeFont(); void fileNew(); |