summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b84674f)
raw | patch | inline | side by side (parent: b84674f)
author | joelholdsworth <joelholdsworth@users.sourceforge.net> | |
Sat, 22 Dec 2007 21:06:55 +0000 (21:06 +0000) | ||
committer | joelholdsworth <joelholdsworth@users.sourceforge.net> | |
Sat, 22 Dec 2007 21:06:55 +0000 (21:06 +0000) |
src/file.cpp | patch | blob | history | |
src/file.h | patch | blob | history | |
src/print.cpp | patch | blob | history | |
src/print.h | patch | blob | history | |
src/ui/dialog/print.cpp | patch | blob | history | |
src/ui/dialog/print.h | patch | blob | history | |
src/verbs.cpp | patch | blob | history |
diff --git a/src/file.cpp b/src/file.cpp
index 904ff93231b39eeffd74576a307c4095caa5ef39..9b5f393122908c4254e1f6f2268a9121f35b141a 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
* Print the current document, if any.
*/
void
-sp_file_print()
+sp_file_print(Gtk::Window& parentWindow)
{
SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (doc)
- sp_print_document(doc, FALSE);
+ sp_print_document(parentWindow, doc, FALSE);
}
* the machine's print drivers.
*/
void
-sp_file_print_direct()
+sp_file_print_direct(Gtk::Window& parentWindow)
{
SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (doc)
- sp_print_document(doc, TRUE);
+ sp_print_document(parentWindow, doc, TRUE);
}
diff --git a/src/file.h b/src/file.h
index 7f960ab651410bcb5a7c129a601d1872c4227ac9..f3ba1576b26190ccdef965b154d27a20dfb48a35 100644 (file)
--- a/src/file.h
+++ b/src/file.h
/**
*
*/
-void sp_file_print (void);
+void sp_file_print (Gtk::Window& parentWindow);
/**
*
*/
-void sp_file_print_direct (void);
+void sp_file_print_direct (Gtk::Window& parentWindow);
/**
*
diff --git a/src/print.cpp b/src/print.cpp
index 0dfb8ab5a211ab5711589814fa2997754488fdb1..a24a01ff750f1e922308524a7e72f84780d01afa 100644 (file)
--- a/src/print.cpp
+++ b/src/print.cpp
}
void
-sp_print_document(SPDocument *doc, unsigned int /*direct*/)
+sp_print_document(Gtk::Window& parentWindow, SPDocument *doc, unsigned int /*direct*/)
{
sp_document_ensure_up_to_date(doc);
// Run print dialog
Inkscape::UI::Dialog::Print printop(doc,base);
- Gtk::PrintOperationResult res = printop.run(Gtk::PRINT_OPERATION_ACTION_PRINT_DIALOG);
+ Gtk::PrintOperationResult res = printop.run(Gtk::PRINT_OPERATION_ACTION_PRINT_DIALOG, parentWindow);
(void)res; // TODO handle this
// Release arena
diff --git a/src/print.h b/src/print.h
index 0ec3fb321fd9313f95788915d7640d849604db4e..69d4f836953aceaed8c3b25681279e18a215dc59 100644 (file)
--- a/src/print.h
+++ b/src/print.h
* This code is in public domain
*/
+#include <gtkmm.h>
#include <libnr/nr-path.h>
#include "forward.h"
#include "extension/extension-forward.h"
/* UI */
void sp_print_preview_document(SPDocument *doc);
-void sp_print_document(SPDocument *doc, unsigned int direct);
+void sp_print_document(Gtk::Window& parentWindow, SPDocument *doc, unsigned int direct);
void sp_print_document_to_file(SPDocument *doc, gchar const *filename);
index 9165167f430cdbf17b19795249390ceb63bdd64c..6740247cd57697fcb13d20d6b4d75c8602593041 100644 (file)
--- a/src/ui/dialog/print.cpp
+++ b/src/ui/dialog/print.cpp
}
Gtk::PrintOperationResult
-Print::run(Gtk::PrintOperationAction action)
+Print::run(Gtk::PrintOperationAction action, Gtk::Window& parent)
{
Gtk::PrintOperationResult res;
- res = _printop->run (action);
+ res = _printop->run (action, parent);
return res;
}
diff --git a/src/ui/dialog/print.h b/src/ui/dialog/print.h
index d893efbf1c8d3026947a3b7f9e02c3aa63b21e81..721c910ffd77f1c5f4d3ed452922a2e894a95b81 100644 (file)
--- a/src/ui/dialog/print.h
+++ b/src/ui/dialog/print.h
public:
Print(SPDocument *doc, SPItem *base);
- Gtk::PrintOperationResult run(Gtk::PrintOperationAction action);
+ Gtk::PrintOperationResult run(Gtk::PrintOperationAction action, Gtk::Window& parentWindow);
//GtkPrintOperationResult run(GtkPrintOperationAction action);
protected:
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 78dd8bee85570c33a0d8c9077ab41fec89efd40a..e96eca2cece341929122c91e670c60356ed9b7f4 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
sp_file_save_a_copy(*parent, NULL, NULL);
break;
case SP_VERB_FILE_PRINT:
- sp_file_print();
+ sp_file_print(*parent);
break;
case SP_VERB_FILE_VACUUM:
sp_file_vacuum();
break;
case SP_VERB_FILE_PRINT_DIRECT:
- sp_file_print_direct();
+ sp_file_print_direct(*parent);
break;
case SP_VERB_FILE_PRINT_PREVIEW:
sp_file_print_preview(NULL, NULL);