[passepartout] don't use exposed knowledge in the windowmenus code



commit eabfaf654a15e3077980d21976a2be664f16a23b
Author: Sven Herzberg <herzi lanedo com>
Date:   Fri May 1 19:01:37 2009 +0200

    don't use exposed knowledge in the windowmenus code
    
    * src/pptout/window.cc,
    * src/pptout/window.h,
    * src/pptout/windowmenus.cc: don't operate on the open dialog directly
---
 src/pptout/window.cc      |    6 ++++++
 src/pptout/window.h       |    2 ++
 src/pptout/windowmenus.cc |    2 +-
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/pptout/window.cc b/src/pptout/window.cc
index 58c966e..14fb2c0 100644
--- a/src/pptout/window.cc
+++ b/src/pptout/window.cc
@@ -316,6 +316,12 @@ void FrameWindow::close() {
   }
 }
 
+void
+FrameWindow::open_file (void)
+{
+  open_dialog->show_all ();
+}
+
 void FrameWindow::save() {
   DocRef document = document_view.get_document();
   if(!document)
diff --git a/src/pptout/window.h b/src/pptout/window.h
index 8c41909..8e847e0 100644
--- a/src/pptout/window.h
+++ b/src/pptout/window.h
@@ -66,6 +66,8 @@ private:
 
   void zoom_factor_changed_action(float factor);
 
+  void open_file (void);
+
   void create_menus();
   void open_dialog_done();
   void save_dialog_done();
diff --git a/src/pptout/windowmenus.cc b/src/pptout/windowmenus.cc
index efc702f..2171e47 100644
--- a/src/pptout/windowmenus.cc
+++ b/src/pptout/windowmenus.cc
@@ -153,7 +153,7 @@ void FrameWindow::create_menus() {
   
   main_group->add(Action::create("FileOpen", Stock::OPEN, _("_Open ..."),
                                  _("Open a document")),
-                  mem_fun(*open_dialog, &Filesel::show_all));
+                  mem_fun(*this, &FrameWindow::open_file));
 
   Glib::RefPtr<RecentAction> action = RecentAction::create ("FileOpenRecent",
 					 _("Open _recent file"),



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