Code

Merge and cleanup of GSoC C++-ification project.
[inkscape.git] / src / extension / internal / pdfinput / pdf-input.cpp
index b507118035e053acac0efe1be82e0bf688f2faaf..ae3e473a5d72d3dd187adb56505ecbe5d29b0c47 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Authors:
  *   miklos erdelyi
+ *   Abhishek Sharma
  *
  * Copyright (C) 2007 Authors
  *
@@ -36,7 +37,7 @@
 #include "pdf-parser.h"
 
 #include "document-private.h"
-#include "application/application.h"
+#include "inkscape.h"
 
 #include "dialogs/dialog-events.h"
 #include <gtk/gtkdialog.h>
@@ -390,12 +391,10 @@ void PdfImportDialog::getImportSettings(Inkscape::XML::Node *prefs) {
 void PdfImportDialog::_onPrecisionChanged() {
 
     static Glib::ustring precision_comments[] = {
-        Glib::ustring(_("rough")),
-        //TRANSLATORS: only translate "string" in "context|string".
-        // For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS
-        Glib::ustring(Q_("pdfinput|medium")),
-        Glib::ustring(_("fine")),
-        Glib::ustring(_("very fine"))
+        Glib::ustring(C_("PDF input precision", "rough")),
+        Glib::ustring(C_("PDF input precision", "medium")),
+        Glib::ustring(C_("PDF input precision", "fine")),
+        Glib::ustring(C_("PDF input precision", "very fine"))
     };
 
     double min = _fallbackPrecisionSlider_adj->get_lower();
@@ -643,7 +642,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
     }
 
     PdfImportDialog *dlg = NULL;
-    if (Inkscape::NSApplication::Application::getUseGui()) {
+    if (inkscape_use_gui()) {
         dlg = new PdfImportDialog(pdf_doc, uri);
         if (!dlg->showDialog()) {
             delete dlg;
@@ -662,8 +661,8 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
     Page *page = catalog->getPage(page_num);
 
     SPDocument *doc = SPDocument::createNewDoc(NULL, TRUE, TRUE);
-    bool saved = SPDocumentUndo::get_undo_sensitive(doc);
-       SPDocumentUndo::set_undo_sensitive(doc, false); // No need to undo in this temporary document
+    bool saved = DocumentUndo::getUndoSensitive(doc);
+    DocumentUndo::setUndoSensitive(doc, false); // No need to undo in this temporary document
 
     // Create builder
     gchar *docname = g_path_get_basename(uri);
@@ -737,7 +736,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
     delete dlg;
 
     // Restore undo
-       SPDocumentUndo::set_undo_sensitive(doc, saved);
+    DocumentUndo::setUndoSensitive(doc, saved);
 
     return doc;
 }