summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: baef789)
raw | patch | inline | side by side (parent: baef789)
author | joncruz <joncruz@users.sourceforge.net> | |
Fri, 6 Apr 2007 22:27:16 +0000 (22:27 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Fri, 6 Apr 2007 22:27:16 +0000 (22:27 +0000) |
src/ui/dialog/filedialog.cpp | patch | blob | history |
index 1ab500863250a2267019703959448a3521db4df9..b6c35140e5d0eaadfec4f17cd6e9686ffc218190 100644 (file)
void FileSaveDialogImpl::setSelectionType( Inkscape::Extension::Extension * key )
{
- extension = key;
-
// If no pointer to extension is passed in, look up based on filename extension.
- if ( !extension ) {
+ if ( !key ) {
// Not quite UTF-8 here.
gchar *filenameLower = g_ascii_strdown(myFilename.c_str(), -1);
- for ( int i = 0; !extension && (i < (int)fileTypes.size()); i++ ) {
+ for ( int i = 0; !key && (i < (int)fileTypes.size()); i++ ) {
Inkscape::Extension::Output *ext = dynamic_cast<Inkscape::Extension::Output*>(fileTypes[i].extension);
if ( ext && ext->get_extension() ) {
gchar *extensionLower = g_ascii_strdown( ext->get_extension(), -1 );
if ( g_str_has_suffix(filenameLower, extensionLower) ) {
- extension = fileTypes[i].extension;
+ key = fileTypes[i].extension;
}
g_free(extensionLower);
}
@@ -1484,7 +1482,8 @@ void FileSaveDialogImpl::setSelectionType( Inkscape::Extension::Extension * key
}
// Ensure the proper entry in the combo box is selected.
- if ( extension ) {
+ if ( key ) {
+ extension = key;
gchar const * extensionID = extension->get_id();
if ( extensionID ) {
for ( int i = 0; i < (int)fileTypes.size(); i++ ) {