[passepartout] skip the initial creation of the properties dialog



commit 92fbafb75fee3119ef79aee5a72e910c72ebef32
Author: Sven Herzberg <herzi lanedo com>
Date:   Sat May 2 10:46:10 2009 +0200

    skip the initial creation of the properties dialog
    
    * src/pptout/window.cc,
    * src/pptout/window.h,
    * src/pptout/windowmenus.cc: create the properties window when we need it, not
      when the user waits for an application window
---
 src/pptout/window.cc      |    9 +++++++++
 src/pptout/window.h       |    1 +
 src/pptout/windowmenus.cc |    3 +--
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/pptout/window.cc b/src/pptout/window.cc
index 96ebaee..1cb3b21 100644
--- a/src/pptout/window.cc
+++ b/src/pptout/window.cc
@@ -365,6 +365,15 @@ FrameWindow::show_preferences ()
   config.dialog_show (this);
 }
 
+void
+FrameWindow::show_properties (void)
+{
+  PropertiesDialog& dialog = PropertiesDialog::instance();
+  dialog.set_transient_for (*this);
+  dialog.set_modal (false);
+  dialog.show_raise ();
+}
+
 bool FrameWindow::on_delete_event(GdkEventAny *event) {
   close();
   return true;
diff --git a/src/pptout/window.h b/src/pptout/window.h
index 3c09630..4814ecf 100644
--- a/src/pptout/window.h
+++ b/src/pptout/window.h
@@ -71,6 +71,7 @@ private:
   void save_as (void);
 
   void show_about (void);
+  void show_properties (void);
 
   void create_menus (Gtk::RecentFilter& filter);
   void show_preferences ();
diff --git a/src/pptout/windowmenus.cc b/src/pptout/windowmenus.cc
index c19094a..b0447d3 100644
--- a/src/pptout/windowmenus.cc
+++ b/src/pptout/windowmenus.cc
@@ -320,8 +320,7 @@ FrameWindow::create_menus (Gtk::RecentFilter& f)
   
   doc_group->add(Action::create("ViewProps", Stock::PROPERTIES,
                                 _("Show Properties window")),
-                 mem_fun(PropertiesDialog::instance(),
-                         &PropertiesDialog::show_raise));
+                 mem_fun(*this, &FrameWindow::show_properties));
   
   doc_group->add(Action::create("ViewStreams", StockID("streams"),
                                 _("_Streams"), _("Show Streams window")),



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