[gnote] * Manage the dialog lifetime manually and not with Gtk::manage()



commit e97c93223ce0d83da38eb3b6f5bdf615a8c979aa
Author: Jonathon Jongsma <jonathon quotidian org>
Date:   Fri May 1 21:24:26 2009 -0400

    * Manage the dialog lifetime manually and not with Gtk::manage()
    
    Signed-off-by: Hubert Figuiere <hub figuiere net>
---
 NEWS                      |    1 +
 src/preferencesdialog.cpp |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 255bf13..2624a40 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Fixes:
   * Missing header in src/addins/inserttimestamp/inserttimestampnoteaddin.cpp
   * Don't crash when deleting a note (Closes #579839)
   * Plugged various memory leaks.
+  * Cleared up a few Gtkmm warnings.
 
 Translations:
 
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index 1c6a257..8ef6ae6 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -768,7 +768,7 @@ namespace gnote {
     std::map<std::string, Gtk::Dialog* >::iterator iter;
     iter = addin_info_dialogs.find(addin->id());
     if (iter == addin_info_dialogs.end()) {
-      dialog = manage(new AddinInfoDialog (addin, *this));
+      dialog = new AddinInfoDialog (addin, *this);
       dialog->signal_delete_event().connect(
         sigc::bind(
           sigc::mem_fun(*this, &PreferencesDialog::addin_info_dialog_deleted), 
@@ -800,6 +800,7 @@ namespace gnote {
 
     AddinInfoDialog *addin_dialog = static_cast<AddinInfoDialog*>(dialog);
     addin_info_dialogs.erase(addin_dialog->get_addin_id());
+    delete dialog;
 
     return false;
   }



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