[gnome-commander/gcmd-1-3] advrename profiles: ref template_entry to keep it alive longer



commit 731ce6ba176d546b2048748bce68d776077e4881
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Jun 15 00:01:21 2009 +0200

    advrename profiles: ref template_entry to keep it alive longer

 ChangeLog                          |    5 +++++
 src/gnome-cmd-profile-component.cc |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 76be6b7..58b7a64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-15  Piotr Eljasiak  <epiotr use pl>
+
+	* src/gnome-cmd-profile-component.cc:
+	advrename profiles: ref template_entry to keep it alive longer
+
 2009-06-14  Piotr Eljasiak  <epiotr use pl>
 
 	* src/gnome-cmd-data.cc:
diff --git a/src/gnome-cmd-profile-component.cc b/src/gnome-cmd-profile-component.cc
index e380f5d..ee95374 100644
--- a/src/gnome-cmd-profile-component.cc
+++ b/src/gnome-cmd-profile-component.cc
@@ -370,6 +370,8 @@ inline GnomeCmdProfileComponent::Private::Private()
 
 inline GnomeCmdProfileComponent::Private::~Private()
 {
+    g_object_unref (template_entry);
+
     clear_regex_model(regex_model);
 
     if (regex_model)  g_object_unref (regex_model);
@@ -764,6 +766,7 @@ static void gnome_cmd_profile_component_init (GnomeCmdProfileComponent *componen
             gtk_entry_set_activates_default (GTK_ENTRY (component->priv->template_entry), TRUE);
             gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
             gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
+            g_object_ref (component->priv->template_entry);
 
             GtkWidget *bbox = gtk_hbutton_box_new ();
             gtk_box_pack_start (GTK_BOX (vbox), bbox, TRUE, FALSE, 0);



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