f6c69bdb87bddf2801422bd735f6a0b3488e3f00
1 /**
2 * \brief Print dialog
3 *
4 * Authors:
5 * Kees Cook <kees@outflux.net>
6 *
7 * Copyright (C) 2007 Kees Cook
8 *
9 * Released under GNU GPL. Read the file 'COPYING' for more information.
10 */
12 #ifndef INKSCAPE_UI_DIALOG_PRINT_H
13 #define INKSCAPE_UI_DIALOG_PRINT_H
15 #include <glibmm/i18n.h>
16 #include <gtkmm/printoperation.h> // GtkMM
17 #include <gtk/gtkprintoperation.h> // Gtk
19 #include "desktop.h"
20 #include "sp-item.h"
22 #include "ui/widget/rendering-options.h"
24 /*
25 * gtk 2.12.0 has a bug (http://bugzilla.gnome.org/show_bug.cgi?id=482089)
26 * where it fails to correctly deal with gtkmm signal management. As a result
27 * we have call gtk directly instead of doing a much cleaner version of
28 * this printing dialog, using full gtkmmification. (The bug was fixed
29 * in 2.12.1, so when the Inkscape gtk minimum version is bumped there,
30 * we can revert Inkscape commit 16865.
31 */
32 struct workaround_gtkmm
33 {
34 SPDocument *_doc;
35 SPItem *_base;
36 Inkscape::UI::Widget::RenderingOptions *_tab;
37 };
39 namespace Inkscape {
40 namespace UI {
41 namespace Dialog {
43 class Print {
44 public:
45 Print(SPDocument *doc, SPItem *base);
46 Gtk::PrintOperationResult run(Gtk::PrintOperationAction, Gtk::Window &parent_window);
48 protected:
50 private:
51 GtkPrintOperation *_printop;
52 SPDocument *_doc;
53 SPItem *_base;
54 Inkscape::UI::Widget::RenderingOptions _tab;
56 struct workaround_gtkmm _workaround;
57 };
59 } // namespace Dialog
60 } // namespace UI
61 } // namespace Inkscape
63 #endif // INKSCAPE_UI_DIALOG_PRINT_H
65 /*
66 Local Variables:
67 mode:c++
68 c-file-style:"stroustrup"
69 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
70 indent-tabs-mode:nil
71 fill-column:99
72 End:
73 */
74 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :