[passepartout] added a private memory structure for the window
- From: Sven Herzberg <herzi src gnome org>
- To: svn-commits-list gnome org
- Subject: [passepartout] added a private memory structure for the window
- Date: Sat, 2 May 2009 09:32:17 -0400 (EDT)
commit 31b062204875278e36866abf2ac5577c2a4f7821
Author: Sven Herzberg <herzi lanedo com>
Date: Fri May 1 18:33:25 2009 +0200
added a private memory structure for the window
* src/pptout/window.cc,
* src/pptout/window.h: added a private memory structure to hide implementation
details of the window
---
src/pptout/window.cc | 12 +++++++++++-
src/pptout/window.h | 2 ++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/pptout/window.cc b/src/pptout/window.cc
index 8e55283..c71f49f 100644
--- a/src/pptout/window.cc
+++ b/src/pptout/window.cc
@@ -31,6 +31,10 @@ namespace{
Windows windows; // a list of all windows
}
+class FrameWindow::Private
+{
+};
+
FrameWindow *FrameWindow::active_window(0);
FrameWindow::FrameWindow(const FrameWindow &original)
@@ -82,7 +86,11 @@ void FrameWindow::on_recent_file (const Glib::RefPtr<Gtk::RecentAction>& recent)
}
}
-void FrameWindow::constructor_common() {
+void
+FrameWindow::constructor_common (void)
+{
+ p = new Private ();
+
open_dialog.reset(new Filesel(*this, _("Open")));
save_dialog.reset(new Filesel(*this, _("Save As"),
Gtk::FILE_CHOOSER_ACTION_SAVE));
@@ -209,6 +217,8 @@ FrameWindow::~FrameWindow() {
Gtk::Main::quit();
else
debug << "window count = " << windows.size() << std::endl;
+
+ delete p;
}
void FrameWindow::set_filename(const Glib::ustring &filename) {
diff --git a/src/pptout/window.h b/src/pptout/window.h
index 036e27a..8c41909 100644
--- a/src/pptout/window.h
+++ b/src/pptout/window.h
@@ -33,6 +33,8 @@ public:
~FrameWindow();
private:
+ class Private;
+ Private* p;
static FrameWindow *active_window; // pointer to the currently active window
Gtk::Widget *toolbar;
Gtk::ScrolledWindow *scroller;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]