[passepartout] dropped the knowledge about the window's internals from the actions
- From: Sven Herzberg <herzi src gnome org>
- To: svn-commits-list gnome org
- Subject: [passepartout] dropped the knowledge about the window's internals from the actions
- Date: Sat, 2 May 2009 09:33:08 -0400 (EDT)
commit f07cfb827a1b02ea5a0625e47b8cdb88ae22e28a
Author: Sven Herzberg <herzi lanedo com>
Date: Sat May 2 00:31:34 2009 +0200
dropped the knowledge about the window's internals from the actions
* src/pptout/window.cc,
* src/pptout/window.h: added a save_as() handler
* src/pptout/windowmenus.cc: use the new handler, no window internals
---
src/pptout/window.cc | 6 ++++++
src/pptout/window.h | 1 +
src/pptout/windowmenus.cc | 2 +-
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/pptout/window.cc b/src/pptout/window.cc
index 1fd3e56..e7af99d 100644
--- a/src/pptout/window.cc
+++ b/src/pptout/window.cc
@@ -319,6 +319,12 @@ FrameWindow::open_file (void)
}
}
+void
+FrameWindow::save_as (void)
+{
+ save_dialog->show ();
+}
+
void FrameWindow::save() {
DocRef document = document_view.get_document();
if(!document)
diff --git a/src/pptout/window.h b/src/pptout/window.h
index cf55163..b18caa0 100644
--- a/src/pptout/window.h
+++ b/src/pptout/window.h
@@ -67,6 +67,7 @@ private:
void zoom_factor_changed_action(float factor);
void open_file (void);
+ void save_as (void);
void create_menus (Gtk::RecentFilter& filter);
void save_dialog_done();
diff --git a/src/pptout/windowmenus.cc b/src/pptout/windowmenus.cc
index 6ba1f1f..85f7b11 100644
--- a/src/pptout/windowmenus.cc
+++ b/src/pptout/windowmenus.cc
@@ -174,7 +174,7 @@ FrameWindow::create_menus (Gtk::RecentFilter& f)
doc_group->add(Action::create("FileSaveAs", Stock::SAVE_AS),
AccelKey("<shift><control>S"),
- mem_fun(*save_dialog, &Filesel::show_all));
+ mem_fun(*this, &FrameWindow::save_as));
page_group->add(Action::create("FilePrint", Stock::PRINT, _("_Print ..."),
_("Print document")),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]