Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Okular
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Andi Sardina Ramos
Okular
Commits
5c58b576
Commit
5c58b576
authored
Sep 14, 2003
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add my name
Fix readSettings svn path=/trunk/kdegraphics/kpdf/; revision=251067
parent
e4241f84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
kpdf/kpdf_shell.cpp
kpdf/kpdf_shell.cpp
+12
-4
kpdf/kpdf_shell.h
kpdf/kpdf_shell.h
+1
-0
kpdf/main.cpp
kpdf/main.cpp
+2
-2
No files found.
kpdf/kpdf_shell.cpp
View file @
5c58b576
...
...
@@ -16,6 +16,7 @@
#include <kstatusbar.h>
#include <kstdaction.h>
#include <kurl.h>
#include <kdebug.h>
using
namespace
KPDF
;
...
...
@@ -92,7 +93,7 @@ Shell::setupActions()
recent
=
KStdAction
::
openRecent
(
this
,
SLOT
(
openURL
(
const
KURL
&
)
),
actionCollection
()
);
KStdAction
::
saveAs
(
this
,
SLOT
(
fileSaveAs
()),
actionCollection
());
KStdAction
::
quit
(
kapp
,
SLOT
(
q
uit
()),
actionCollection
());
KStdAction
::
quit
(
this
,
SLOT
(
slotQ
uit
()),
actionCollection
());
//createStandardStatusBarAction();
setStandardToolBarMenuEnabled
(
true
);
...
...
@@ -102,20 +103,23 @@ 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
// config file. this function is automatically called whenever
// the app is being restored. read in here whatever you wrote
// in 'saveProperties'
KURL
url
=
config
->
readPathEntry
(
"URL"
);
if
(
url
.
isValid
()
)
openURL
(
url
);
}
void
...
...
@@ -165,4 +169,8 @@ Shell::applyNewToolbarConfig()
applyMainWindowSettings
(
KGlobal
::
config
(),
"MainWindow"
);
}
void
Shell
::
slotQuit
()
{
kapp
->
closeAllWindows
();
}
// vim:ts=2:sw=2:tw=78:et
kpdf/kpdf_shell.h
View file @
5c58b576
...
...
@@ -56,6 +56,7 @@ namespace KPDF
void
optionsConfigureKeys
();
void
optionsConfigureToolbars
();
void
slotQuit
();
void
applyNewToolbarConfig
();
public
slots
:
...
...
kpdf/main.cpp
View file @
5c58b576
...
...
@@ -12,7 +12,7 @@ static const char* version = "v0.3";
static
KCmdLineOptions
options
[]
=
{
{
"+[URL]"
,
I18N_NOOP
(
"Document to open."
),
0
},
{
0
,
0
,
0
}
KCmdLineLastOption
};
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -30,7 +30,7 @@ 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
);
KCmdLineArgs
::
addCmdLineOptions
(
options
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment