[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegraphics/kpdf/kpdf
From: Laurent Montel <montel () kde ! org>
Date: 2003-09-14 19:04:36
[Download RAW message or body]
CVS commit by mlaurent:
Add my name
Fix readSettings
M +12 -4 kpdf_shell.cpp 1.7
M +1 -0 kpdf_shell.h 1.5
M +2 -2 main.cpp 1.5
--- kdegraphics/kpdf/kpdf/kpdf_shell.cpp #1.6:1.7
@@ -17,4 +17,5 @@
#include <kstdaction.h>
#include <kurl.h>
+#include <kdebug.h>
using namespace KPDF;
@@ -93,5 +94,5 @@ Shell::setupActions()
actionCollection() );
KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::quit( this, SLOT(slotQuit()), actionCollection());
//createStandardStatusBarAction();
@@ -103,13 +104,13 @@ Shell::setupActions()
void
-Shell::saveProperties(KConfig* /*config*/)
+Shell::saveProperties(KConfig* config)
{
// the 'config' object points to the session managed
// config file. anything you write here will be available
// later when this app is restored
+ config->writePathEntry( "URL", m_part->url().prettyURL() );
}
- void
-Shell::readProperties(KConfig* /*config*/)
+void Shell::readProperties(KConfig* config)
{
// the 'config' object points to the session managed
@@ -117,4 +118,7 @@ Shell::readProperties(KConfig* /*config*
// the app is being restored. read in here whatever you wrote
// in 'saveProperties'
+ KURL url = config->readPathEntry( "URL" );
+ if ( url.isValid() )
+ openURL( url );
}
@@ -166,3 +170,7 @@ Shell::applyNewToolbarConfig()
}
+void Shell::slotQuit()
+{
+ kapp->closeAllWindows();
+}
// vim:ts=2:sw=2:tw=78:et
--- kdegraphics/kpdf/kpdf/kpdf_shell.h #1.4:1.5
@@ -57,4 +57,5 @@ namespace KPDF
void optionsConfigureKeys();
void optionsConfigureToolbars();
+ void slotQuit();
void applyNewToolbarConfig();
--- kdegraphics/kpdf/kpdf/main.cpp #1.4:1.5
@@ -13,5 +13,5 @@ static KCmdLineOptions options[] =
{
{ "+[URL]", I18N_NOOP("Document to open."), 0 },
- { 0, 0, 0 }
+ KCmdLineLastOption
};
@@ -31,5 +31,5 @@ int main(int argc, char** argv)
about.addAuthor("Wilco Greven", 0, "greven@kde.org");
about.addAuthor("Christophe Devriese", 0, "oelewapperke@oelewapperke.org");
-
+ about.addAuthor("Laurent Montel", 0, "montel@kde.org");
KCmdLineArgs::init(argc, argv, &about);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic