[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-09-29 19:51:58
Message-ID: 1128023518.778333.21297.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 465441 by aacid:
fix for bug 109764
M +9 -5 part.cpp
M +1 -0 part.h
M +4 -0 ui/pageview.cpp
M +1 -0 ui/thumbnaillist.cpp
--- trunk/KDE/kdegraphics/kpdf/part.cpp #465440:465441
@@ -271,6 +271,7 @@
splitterSizes.push_back( 500 );
}
m_splitter->setSizes( splitterSizes );
+ connect(m_splitter, SIGNAL(splitterMoved(int, int)), this, \
SLOT(saveSplitterSize())); m_watcher = new KDirWatch( this );
connect( m_watcher, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileDirty( \
const QString& ) ) ); m_dirtyHandler = new QTimer( this );
@@ -281,6 +282,7 @@
// [SPEECH] check for KTTSD presence and usability
KTrader::OfferList offers = KTrader::self()->query("DCOP/Text-to-Speech", "Name == \
'KTTSD'"); KpdfSettings::setUseKTTSD( (offers.count() > 0) );
+ KpdfSettings::writeConfig();
// set our XML-UI resource file
setXMLFile("part.rc");
@@ -289,11 +291,6 @@
Part::~Part()
{
- // save internal settings
- KpdfSettings::setSplitterSizes( m_splitter->sizes() );
- // write to disk config file
- KpdfSettings::writeConfig();
-
delete m_document;
if ( --m_count == 0 )
delete globalParams;
@@ -483,6 +480,7 @@
{
bool showLeft = m_showLeftPanel->isChecked();
KpdfSettings::setShowLeftPanel(showLeft);
+ KpdfSettings::writeConfig();
// show/hide left qtoolbox
m_leftPanel->setShown( showLeft );
// this needs to be hidden explicitly to disable thumbnails gen
@@ -576,6 +574,12 @@
KMessageBox::information(widget(), i18n("This link points to a quit application \
action that does not work when using the embedded viewer."), QString::null, \
"warnNoQuitIfNotInKPDF"); }
+void Part::saveSplitterSize()
+{
+ KpdfSettings::setSplitterSizes( m_splitter->sizes() );
+ KpdfSettings::writeConfig();
+}
+
//BEGIN go to page dialog
class KPDFGotoPageDialog : public KDialogBase
{
--- trunk/KDE/kdegraphics/kpdf/part.h #465440:465441
@@ -114,6 +114,7 @@
void enableTOC(bool enable);
void psTransformEnded();
void cannotQuit();
+ void saveSplitterSize();
void setMimeTypes(KIO::Job *job);
public slots:
--- trunk/KDE/kdegraphics/kpdf/ui/pageview.cpp #465440:465441
@@ -1098,6 +1098,7 @@
{
d->messageWindow->display( i18n("Starting KTTSD Failed: \
%1").arg(error) ); KpdfSettings::setUseKTTSD(false);
+ KpdfSettings::writeConfig();
}
}
if ( KpdfSettings::useKTTSD() )
@@ -1450,6 +1451,7 @@
// save selected zoom factor
KpdfSettings::setZoomMode(newZoomMode);
KpdfSettings::setZoomFactor(newFactor);
+ KpdfSettings::writeConfig();
}
}
@@ -1919,6 +1921,7 @@
if ( KpdfSettings::viewColumns() != newColumns )
{
KpdfSettings::setViewColumns( newColumns );
+ KpdfSettings::writeConfig();
if ( d->document->pages() > 0 )
slotRelayoutPages();
}
@@ -1929,6 +1932,7 @@
if ( KpdfSettings::viewContinuous() != on )
{
KpdfSettings::setViewContinuous( on );
+ KpdfSettings::writeConfig();
if ( d->document->pages() > 0 )
slotRelayoutPages();
}
--- trunk/KDE/kdegraphics/kpdf/ui/thumbnaillist.cpp #465440:465441
@@ -248,6 +248,7 @@
{
// save state
KpdfSettings::setFilterBookmarks( filterOn );
+ KpdfSettings::writeConfig();
// ask for the 'notifySetup' with a little trick (on reinsertion the
// document sends the list again)
m_document->removeObserver( this );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic