[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegraphics/kpdf
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2005-12-04 13:16:26
Message-ID: 1133702186.187487.9918.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 485452 by aacid:
similar patch to fix 117658
M +8 -1 part.cpp
M +7 -1 part.h
--- trunk/KDE/kdegraphics/kpdf/part.cpp #485451:485452
@@ -276,6 +276,8 @@
connect( m_watcher, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileDirty( const QString& ) ) );
m_dirtyHandler = new QTimer( this );
connect( m_dirtyHandler, SIGNAL( timeout() ),this, SLOT( slotDoFileDirty() ) );
+ m_saveSplitterSizeTimer = new QTimer( this );
+ connect( m_saveSplitterSizeTimer, SIGNAL( timeout() ),this, SLOT( reallySaveSplitterSize() ) );
slotNewConfig();
@@ -576,9 +578,14 @@
void Part::saveSplitterSize()
{
+ m_saveSplitterSizeTimer->start(500, true);
+}
+
+void Part::reallySaveSplitterSize()
+{
KpdfSettings::setSplitterSizes( m_splitter->sizes() );
KpdfSettings::writeConfig();
-}
+}
//BEGIN go to page dialog
class KPDFGotoPageDialog : public KDialogBase
--- trunk/KDE/kdegraphics/kpdf/part.h #485451:485452
@@ -114,7 +114,8 @@
void enableTOC(bool enable);
void psTransformEnded();
void cannotQuit();
- void saveSplitterSize();
+ void saveSplitterSize();
+ void reallySaveSplitterSize();
void setMimeTypes(KIO::Job *job);
public slots:
@@ -143,6 +144,11 @@
// static instances counter
static unsigned int m_count;
+
+ // this is a hack because we can not use writeConfig on part destructor
+ // and we don't want to writeconfig every time someone moves the splitter
+ // so we use a QTimer each 500 ms
+ QTimer *m_saveSplitterSizeTimer;
KDirWatch *m_watcher;
QTimer *m_dirtyHandler;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic