[passepartout] dropped the print_dialog



commit f063291149b3d58dc6067346c754e5ff21b78df8
Author: Sven Herzberg <herzi lanedo com>
Date:   Sat May 2 01:00:46 2009 +0200

    dropped the print_dialog
    
    * src/pptout/printdialog.cc,
    * src/pptout/window.cc,
    * src/pptout/window.h: use a simpler construct for managing the print dialog
---
 src/pptout/printdialog.cc |    2 ++
 src/pptout/window.cc      |    3 ++-
 src/pptout/window.h       |    1 -
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/pptout/printdialog.cc b/src/pptout/printdialog.cc
index e0b5328..549450c 100644
--- a/src/pptout/printdialog.cc
+++ b/src/pptout/printdialog.cc
@@ -152,6 +152,8 @@ void PrintDialog::show_it() {
   // unless the entry is shown first
   const std::string &filename = 
     document_view.get_document_meta().get_filename();
+
+  // FIXME: add _("Unsaved Layout.pp") to some proper place
   if(filename.empty())     // the document has not been saved 
     file_entry.entry.set_text("pptout.foo");
   else
diff --git a/src/pptout/window.cc b/src/pptout/window.cc
index 8deb62d..1b52d7f 100644
--- a/src/pptout/window.cc
+++ b/src/pptout/window.cc
@@ -104,7 +104,6 @@ FrameWindow::constructor_common (void)
 {
   p = new Private ();
 
-  print_dialog.reset(new PrintDialog(*this, document_view));
   text_frame_dialog.reset(new TextFrameDialog(*this, document_view));
 
   { // get default unit of import image dialog from config file
@@ -299,7 +298,9 @@ FrameWindow::open_file (void)
 void
 FrameWindow::print (void)
 {
+  std::auto_ptr<PrintDialog> print_dialog (new PrintDialog(*this, document_view));
   print_dialog->show_it ();
+  print_dialog->run ();
 }
 
 void
diff --git a/src/pptout/window.h b/src/pptout/window.h
index 291dd7b..0ca402c 100644
--- a/src/pptout/window.h
+++ b/src/pptout/window.h
@@ -42,7 +42,6 @@ private:
   Zoomer zoom_factor;
   DocumentView document_view;
   std::auto_ptr<Filesel> import_dialog;
-  std::auto_ptr<PrintDialog> print_dialog;
   std::auto_ptr<TextFrameDialog> text_frame_dialog;
   Pagesel *pagesel;
   Glib::RefPtr<Gtk::UIManager> uimanager;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]