/**
* @file
* Implementation of the file dialog interfaces defined in filedialog.h.
*/
/* Authors:
* Bob Jamison
* Joel Holdsworth
* Other dudes from The Inkscape Organization
*
* Copyright (C) 2004-2007 Bob Jamison
* Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
* Copyright (C) 2007-2008 Joel Holdsworth
* Copyright (C) 2004-2008 The Inkscape Organization
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "filedialogimpl-win32.h"
#include "filedialogimpl-gtkmm.h"
#include "filedialog.h"
#include "ui/dialog-events.h"
#include "preferences.h"
namespace Inkscape
{
namespace UI
{
namespace Dialog
{
/*#########################################################################
### U T I L I T Y
#########################################################################*/
{
return false;
{
{
if ( ((ch & 0xff80) != 0) ||
static_cast<Glib::ustring::value_type>( g_ascii_tolower( static_cast<gchar>(0x07f & ch) ) ) != ext[extpos] )
{
return false;
}
}
}
return true;
}
{
{
for (unsigned int j=0; j<extensions.size(); j++)
{
return true;
}
}
return false;
}
/*#########################################################################
### F I L E O P E N
#########################################################################*/
/**
* Public factory. Called by file.cpp, among others.
*/
const char *title)
{
#ifdef WIN32
} else {
}
#else
#endif
return dialog;
}
{
return myFilename;
}
//########################################################################
//# F I L E S A V E
//########################################################################
/**
* Public factory method. Used in file.cpp
*/
const char *title,
{
#ifdef WIN32
dialog = new FileSaveDialogImplWin32(parentWindow, path, fileTypes, title, default_key, docTitle, save_method);
} else {
dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key, docTitle, save_method);
}
#else
FileSaveDialog *dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key, docTitle, save_method);
#endif
return dialog;
}
{
return myFilename;
}
{
return myDocTitle;
}
//void FileSaveDialog::change_path(const Glib::ustring& path)
//{
// myFilename = path;
//}
void FileSaveDialog::appendExtension(Glib::ustring& path, Inkscape::Extension::Output* outputExtension)
{
if (!outputExtension)
return;
try {
bool appendExtension = true;
if ( (trail == ".")
} else {
appendExtension = false;
}
}
if (appendExtension) {
}
} catch ( Glib::ConvertError& e ) {
// ignore
}
}
//########################################################################
//# F I L E E X P O R T
//########################################################################
#ifdef NEW_EXPORT_DIALOG
/**
* Public factory method. Used in file.cpp
*/
const char *title,
{
FileExportDialog *dialog = new FileExportDialogImpl(parentWindow, path, fileTypes, title, default_key);
return dialog;
}
#endif // NEW_EXPORT_DIALOG
} //namespace Dialog
} //namespace UI
} //namespace Inkscape
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :