summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid E. Narvaez <[email protected]>2015-06-06 03:03:01 -0400
committerDavid E. Narvaez <[email protected]>2015-06-06 04:10:38 -0400
commita344e65304c5fe903159646fdd9b636b4965ef76 (patch)
tree75ef9e56bfe41c6cbf59f6744eca6df407e26084
parentafcca29b19f15e5b99992c848681bfc6073e3aba (diff)
Explicitly Set the Default Save Path for Exportersv15.04.3
Judging by the type of exporter, one can guess what standard path to start with when openin the file dialog.
-rw-r--r--filters/asyexporter.cc4
-rw-r--r--filters/exporter.cc2
-rw-r--r--filters/latexexporter.cc2
-rw-r--r--filters/svgexporter.cc2
-rw-r--r--filters/xfigexporter.cc2
5 files changed, 7 insertions, 5 deletions
diff --git a/filters/asyexporter.cc b/filters/asyexporter.cc
index 4423986..69ae574 100644
--- a/filters/asyexporter.cc
+++ b/filters/asyexporter.cc
@@ -23,6 +23,8 @@
#include <qfile.h>
#include <qtextstream.h>
+#include <QStandardPaths>
+
#include <kmessagebox.h>
#ifdef HAVE_TRUNC
@@ -53,7 +55,7 @@ QString AsyExporter::menuIcon() const
void AsyExporter::run( const KigPart& doc, KigWidget& w )
{
KigFileDialog* kfd = new KigFileDialog(
- QString(), i18n( "*.asy|Asymptote Documents (*.asy)" ),
+ QStandardPaths::writableLocation( QStandardPaths::DocumentsLocation ), i18n( "*.asy|Asymptote Documents (*.asy)" ),
i18n( "Export as Asymptote script" ), &w );
kfd->setOptionCaption( i18n( "Asymptote Options" ) );
AsyExporterOptions* opts = new AsyExporterOptions( 0L );
diff --git a/filters/exporter.cc b/filters/exporter.cc
index 498e37e..cf76633 100644
--- a/filters/exporter.cc
+++ b/filters/exporter.cc
@@ -85,7 +85,7 @@ QString ImageExporter::menuIcon() const
void ImageExporter::run( const KigPart& doc, KigWidget& w )
{
KigFileDialog* kfd = new KigFileDialog(
- QString(), KImageIO::pattern( KImageIO::Writing ),
+ QStandardPaths::writableLocation( QStandardPaths::PicturesLocation ), KImageIO::pattern( KImageIO::Writing ),
i18n( "Export as Image" ), &w );
kfd->setOptionCaption( i18n( "Image Options" ) );
ImageExporterOptions* opts = new ImageExporterOptions( 0L );
diff --git a/filters/latexexporter.cc b/filters/latexexporter.cc
index 93890bc..9119fcf 100644
--- a/filters/latexexporter.cc
+++ b/filters/latexexporter.cc
@@ -537,7 +537,7 @@ void PSTricksExportImpVisitor::visit(const RationalBezierImp* imp)
void LatexExporter::run( const KigPart& doc, KigWidget& w )
{
KigFileDialog* kfd = new KigFileDialog(
- QString(), i18n( "*.tex|Latex Documents (*.tex)" ),
+ QStandardPaths::writableLocation( QStandardPaths::DocumentsLocation ), i18n( "*.tex|Latex Documents (*.tex)" ),
i18n( "Export as Latex" ), &w );
kfd->setOptionCaption( i18n( "Latex Options" ) );
LatexExporterOptions* opts = new LatexExporterOptions( 0L );
diff --git a/filters/svgexporter.cc b/filters/svgexporter.cc
index 3d43aa4..11f7a23 100644
--- a/filters/svgexporter.cc
+++ b/filters/svgexporter.cc
@@ -58,7 +58,7 @@ QString SVGExporter::menuIcon() const
void SVGExporter::run( const KigPart& part, KigWidget& w )
{
KigFileDialog* kfd = new KigFileDialog(
- QString(), i18n( "*.svg|Scalable Vector Graphics (*.svg)" ),
+ QStandardPaths::writableLocation( QStandardPaths::PicturesLocation ), i18n( "*.svg|Scalable Vector Graphics (*.svg)" ),
i18n( "Export as SVG" ), &w );
kfd->setOptionCaption( i18n( "SVG Options" ) );
SVGExporterOptions* opts = new SVGExporterOptions( 0L );
diff --git a/filters/xfigexporter.cc b/filters/xfigexporter.cc
index b25100d..90a1f6b 100644
--- a/filters/xfigexporter.cc
+++ b/filters/xfigexporter.cc
@@ -575,7 +575,7 @@ void XFigExportImpVisitor::visit(const OpenPolygonalImp* imp)
void XFigExporter::run( const KigPart& doc, KigWidget& w )
{
KigFileDialog* kfd = new KigFileDialog(
- ":document", i18n( "*.fig|XFig Documents (*.fig)" ),
+ QStandardPaths::writableLocation( QStandardPaths::PicturesLocation ), i18n( "*.fig|XFig Documents (*.fig)" ),
i18n( "Export as XFig File" ), &w );
if ( !kfd->exec() )
return;