author | zecke <zecke> | 2004-04-19 07:12:16 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-19 07:12:16 (UTC) |
commit | 0b59a16b5a5a179c46ddb3f8c585dbca59b2826e (patch) (unidiff) | |
tree | 3780a3ae09806e781582aefb23ad3040bc15d816 | |
parent | 359b681f32d5c3ac2ea3bfd39a3637d211338bf7 (diff) | |
download | opie-0b59a16b5a5a179c46ddb3f8c585dbca59b2826e.zip opie-0b59a16b5a5a179c46ddb3f8c585dbca59b2826e.tar.gz opie-0b59a16b5a5a179c46ddb3f8c585dbca59b2826e.tar.bz2 |
Small interface update. If we add doctypes disable the viewport() for
updates
-rw-r--r-- | core/launcher/documentlist.cpp | 8 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 10 | ||||
-rw-r--r-- | core/launcher/launcher.h | 2 | ||||
-rw-r--r-- | core/launcher/serverinterface.h | 2 |
4 files changed, 20 insertions, 2 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index 59dd721..19ceb0f 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp | |||
@@ -67,9 +67,9 @@ public: | |||
67 | const DocLnk *iterate(); | 67 | const DocLnk *iterate(); |
68 | bool store( DocLnk* dl ); | 68 | bool store( DocLnk* dl ); |
69 | void estimatedPercentScanned(); | 69 | void estimatedPercentScanned(); |
70 | void appendDocpath(FileSystem*); | 70 | void appendDocpath(FileSystem*); |
71 | 71 | ||
72 | 72 | ||
73 | DocLnkSet dls; | 73 | DocLnkSet dls; |
74 | QDict<void> reference; | 74 | QDict<void> reference; |
75 | QDictIterator<void> *dit; | 75 | QDictIterator<void> *dit; |
@@ -189,8 +189,10 @@ void DocumentList::rescan() | |||
189 | void DocumentList::timerEvent( QTimerEvent *te ) | 189 | void DocumentList::timerEvent( QTimerEvent *te ) |
190 | { | 190 | { |
191 | if ( te->timerId() == d->tid ) { | 191 | if ( te->timerId() == d->tid ) { |
192 | // Do 3 at a time | 192 | // Do 3 at a time |
193 | if ( d->serverGui ) | ||
194 | d->serverGui->aboutToAddBegin(); | ||
193 | for (int i = 0; i < 3; i++ ) { | 195 | for (int i = 0; i < 3; i++ ) { |
194 | const DocLnk *lnk = d->iterate(); | 196 | const DocLnk *lnk = d->iterate(); |
195 | if ( lnk ) { | 197 | if ( lnk ) { |
196 | add( *lnk ); | 198 | add( *lnk ); |
@@ -202,9 +204,11 @@ void DocumentList::timerEvent( QTimerEvent *te ) | |||
202 | if ( d->needToSendAllDocLinks ) | 204 | if ( d->needToSendAllDocLinks ) |
203 | sendAllDocLinks(); | 205 | sendAllDocLinks(); |
204 | break; | 206 | break; |
205 | } | 207 | } |
206 | } | 208 | } |
209 | if ( d->serverGui ) | ||
210 | d->serverGui->aboutToAddEnd(); | ||
207 | } | 211 | } |
208 | } | 212 | } |
209 | 213 | ||
210 | 214 | ||
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index bf2287d..6afbcd8 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -695,8 +695,18 @@ void Launcher::documentAdded( const DocLnk& doc ) | |||
695 | { | 695 | { |
696 | tabs->docView()->addItem( new DocLnk( doc ), FALSE ); | 696 | tabs->docView()->addItem( new DocLnk( doc ), FALSE ); |
697 | } | 697 | } |
698 | 698 | ||
699 | void Launcher::aboutToAddBegin() | ||
700 | { | ||
701 | tabs->docView()->setUpdatesEnabled( false ); | ||
702 | } | ||
703 | |||
704 | void Launcher::aboutToAddEnd() | ||
705 | { | ||
706 | tabs->docView()->setUpdatesEnabled( true ); | ||
707 | } | ||
708 | |||
699 | void Launcher::showLoadingDocs() | 709 | void Launcher::showLoadingDocs() |
700 | { | 710 | { |
701 | tabs->docView()->hide(); | 711 | tabs->docView()->hide(); |
702 | } | 712 | } |
diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h index 4f3ff8c..29bd7db 100644 --- a/core/launcher/launcher.h +++ b/core/launcher/launcher.h | |||
@@ -109,8 +109,10 @@ public: | |||
109 | void allApplicationsRemoved(); | 109 | void allApplicationsRemoved(); |
110 | void applicationStateChanged( const QString& name, ApplicationState state ); | 110 | void applicationStateChanged( const QString& name, ApplicationState state ); |
111 | void documentAdded( const DocLnk& doc ); | 111 | void documentAdded( const DocLnk& doc ); |
112 | void documentRemoved( const DocLnk& doc ); | 112 | void documentRemoved( const DocLnk& doc ); |
113 | void aboutToAddBegin(); | ||
114 | void aboutToAddEnd(); | ||
113 | void allDocumentsRemoved(); | 115 | void allDocumentsRemoved(); |
114 | void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ); | 116 | void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ); |
115 | void storageChanged( const QList<FileSystem> & ); | 117 | void storageChanged( const QList<FileSystem> & ); |
116 | void applicationScanningProgress( int percent ); | 118 | void applicationScanningProgress( int percent ); |
diff --git a/core/launcher/serverinterface.h b/core/launcher/serverinterface.h index e57ea51..132766f 100644 --- a/core/launcher/serverinterface.h +++ b/core/launcher/serverinterface.h | |||
@@ -49,8 +49,10 @@ public: | |||
49 | virtual void applicationStateChanged( const QString& name, ApplicationState state ) = 0; | 49 | virtual void applicationStateChanged( const QString& name, ApplicationState state ) = 0; |
50 | static const AppLnkSet& appLnks(); | 50 | static const AppLnkSet& appLnks(); |
51 | 51 | ||
52 | // These functions notify of adding, removal and changes of document links used in the documents tab for example | 52 | // These functions notify of adding, removal and changes of document links used in the documents tab for example |
53 | virtual void aboutToAddBegin() {} | ||
54 | virtual void aboutToAddEnd() {} | ||
53 | virtual void documentAdded( const DocLnk& doc ) = 0; | 55 | virtual void documentAdded( const DocLnk& doc ) = 0; |
54 | virtual void documentRemoved( const DocLnk& doc ) = 0; | 56 | virtual void documentRemoved( const DocLnk& doc ) = 0; |
55 | virtual void allDocumentsRemoved() = 0; | 57 | virtual void allDocumentsRemoved() = 0; |
56 | virtual void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ) = 0; | 58 | virtual void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ) = 0; |