Code

Add option to align & distribute dialog to treat the selection as a group (closes...
[inkscape.git] / src / ui / dialog / print.h
index d893efbf1c8d3026947a3b7f9e02c3aa63b21e81..f6c69bdb87bddf2801422bd735f6a0b3488e3f00 100644 (file)
 
 #include "ui/widget/rendering-options.h"
 
+/*
+ * gtk 2.12.0 has a bug (http://bugzilla.gnome.org/show_bug.cgi?id=482089)
+ * where it fails to correctly deal with gtkmm signal management.  As a result
+ * we have call gtk directly instead of doing a much cleaner version of
+ * this printing dialog, using full gtkmmification.  (The bug was fixed
+ * in 2.12.1, so when the Inkscape gtk minimum version is bumped there,
+ * we can revert Inkscape commit 16865.
+ */
+struct workaround_gtkmm
+{
+    SPDocument *_doc;
+    SPItem     *_base;
+    Inkscape::UI::Widget::RenderingOptions *_tab;
+};
 
 namespace Inkscape {
 namespace UI {
@@ -29,23 +43,17 @@ namespace Dialog {
 class Print {
 public:
     Print(SPDocument *doc, SPItem *base);
-
-    Gtk::PrintOperationResult run(Gtk::PrintOperationAction action);
-    //GtkPrintOperationResult run(GtkPrintOperationAction action);
+    Gtk::PrintOperationResult run(Gtk::PrintOperationAction, Gtk::Window &parent_window);
 
 protected:
-    Glib::RefPtr<Gtk::PrintOperation> _printop;
-    //GtkPrintOperation *_printop;
-
-    Gtk::Widget *_create_custom_widget ();
-    void    _custom_widget_apply (Gtk::Widget *widget);
-    void    _draw_page (const Glib::RefPtr<Gtk::PrintContext> &context,
-                          int page_nr);
 
 private:
+    GtkPrintOperation *_printop;
     SPDocument *_doc;
     SPItem     *_base;
     Inkscape::UI::Widget::RenderingOptions _tab;
+
+    struct workaround_gtkmm _workaround;
 };
 
 } // namespace Dialog