Code

family name field on svgfonts dialog now properly saves attribute. Should do the...
[inkscape.git] / src / ui / dialog / ocaldialogs.cpp
index 09eb96191bf91a9292fab7045a8d2c4e48b26b3d..729d09511c064357bb40ca01394c53e871f55fb1 100644 (file)
@@ -24,6 +24,7 @@
 #include "interface.h"
 #include "gc-core.h"
 #include <dialogs/dialog-events.h>
+#include "io/sys.h"
 
 namespace Inkscape
 {
@@ -72,7 +73,7 @@ FileExportToOCALDialog::FileExportToOCALDialog(Gtk::Window &parentWindow,
     /* Set our dialog type (save, export, etc...)*/
     dialogType = fileTypes;
     Gtk::VBox *vbox = get_vbox();
-    
+
     Gtk::Label *fileLabel = new Gtk::Label(_("File"));
 
     fileNameEntry = new Gtk::Entry();
@@ -192,7 +193,7 @@ FileExportToOCALPasswordDialog::FileExportToOCALPasswordDialog(Gtk::Window &pare
     passBox.pack_start(*passLabel);
     passBox.pack_start(*passwordEntry, Gtk::PACK_EXPAND_WIDGET, 3);
     vbox->pack_start(passBox);
-    
+
     add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
     set_default(*add_button(Gtk::Stock::OK,   Gtk::RESPONSE_OK));
 
@@ -285,7 +286,7 @@ void FileListViewText::on_cursor_changed()
     // create file path
     const std::string tmptemplate = "ocal-";
     std::string tmpname;
-    int fd = Glib::file_open_tmp(tmpname, tmptemplate);
+    int fd = Inkscape::IO::file_open_tmp(tmpname, tmptemplate);
     if (fd<0) {
         g_warning("Error creating temp file");
         return;
@@ -367,7 +368,7 @@ failquit:
 /*
  * Callback for row activated
  */
-void FileListViewText::on_row_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column)
+void FileListViewText::on_row_activated(const Gtk::TreeModel::Path& /*path*/, Gtk::TreeViewColumn* /*column*/)
 {
     this->on_cursor_changed();
     myButton->activate();
@@ -382,6 +383,8 @@ Glib::ustring FileListViewText::getFilename()
     return myFilename;
 }
 
+
+#ifdef WITH_GNOME_VFS
 /**
  * Read callback for xmlReadIO(), used below
  */
@@ -402,6 +405,8 @@ static int vfs_read_callback (GnomeVFSHandle *handle, char* buf, int nb)
         return -1;
     }
 }
+#endif
+
 
 /**
  * Callback for user input into searchTagEntry
@@ -432,13 +437,13 @@ void FileImportFromOCALDialog::searchTagEntryChangedCallback()
 
     result = gnome_vfs_open (&from_handle, uri.c_str(), GNOME_VFS_OPEN_READ);
     if (result != GNOME_VFS_OK) {
-        sp_ui_error_dialog(_("Failed to receive the Open Clip Art Library RSS feed. Verify if the server name is correct in Configuration->Misc (e.g.: openclipart.org)"));
+        sp_ui_error_dialog(_("Failed to receive the Open Clip Art Library RSS feed. Verify if the server name is correct in Configuration->Import/Export (e.g.: openclipart.org)"));
         return;
     }
 
     // create the resulting xml document tree
     // this initialize the library and test mistakes between compiled and shared library used
-    LIBXML_TEST_VERSION 
+    LIBXML_TEST_VERSION
     xmlDoc *doc = NULL;
     xmlNode *root_element = NULL;
 
@@ -450,7 +455,7 @@ void FileImportFromOCALDialog::searchTagEntryChangedCallback()
         g_warning("Failed to parse %s\n", uri.c_str());
         return;
     }
-    
+
     // get the root element node
     root_element = xmlDocGetRootElement(doc);
 
@@ -474,11 +479,12 @@ void FileImportFromOCALDialog::searchTagEntryChangedCallback()
     // free the global variables that may have been allocated by the parser
     xmlCleanupParser();
     return;
-#endif    
+#endif
 }
 
+
 /**
- * Prints the names of the all the xml elements 
+ * Prints the names of the all the xml elements
  * that are siblings or children of a given xml node
  */
 void FileImportFromOCALDialog::print_xml_element_names(xmlNode * a_node)
@@ -523,11 +529,11 @@ void FileImportFromOCALDialog::print_xml_element_names(xmlNode * a_node)
 /**
  * Constructor.  Not called directly.  Use the factory.
  */
-FileImportFromOCALDialog::FileImportFromOCALDialog(Gtk::Window& parentWindow, 
-                                      const Glib::ustring &dir,
-                                       FileDialogType fileTypes,
-                                       const Glib::ustring &title) :
-     FileDialogOCALBase(title, parentWindow)
+FileImportFromOCALDialog::FileImportFromOCALDialog(Gtk::Window& parentWindow,
+                                                   const Glib::ustring &/*dir*/,
+                                                   FileDialogType fileTypes,
+                                                   const Glib::ustring &title) :
+    FileDialogOCALBase(title, parentWindow)
 {
     // Initalize to Autodetect
     extension = NULL;