Commit a344e653 authored by David Narváez's avatar David Narváez

Explicitly Set the Default Save Path for Exporters

Judging by the type of exporter, one can guess what standard path to
start with when openin the file dialog.
parent afcca29b
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment