[gnome-commander] GnomeCmdAdvrenameProfileComponent: do not copy component to associated profile on component finalize
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] GnomeCmdAdvrenameProfileComponent: do not copy component to associated profile on component finalize
- Date: Sun, 19 Jun 2011 16:37:54 +0000 (UTC)
commit 80478251e8c51f2700391d465b67da810d0410a8
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Jun 19 18:35:25 2011 +0200
GnomeCmdAdvrenameProfileComponent: do not copy component to associated profile on component finalize
src/dialogs/gnome-cmd-advrename-dialog.cc | 8 ++++++++
src/gnome-cmd-advrename-profile-component.cc | 2 --
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-advrename-dialog.cc b/src/dialogs/gnome-cmd-advrename-dialog.cc
index 146ae15..18923b4 100644
--- a/src/dialogs/gnome-cmd-advrename-dialog.cc
+++ b/src/dialogs/gnome-cmd-advrename-dialog.cc
@@ -86,6 +86,7 @@ struct GnomeCmdAdvrenameDialog::Private
static gboolean on_dialog_delete (GtkWidget *widget, GdkEvent *event, GnomeCmdAdvrenameDialog *dialog);
static void on_dialog_size_allocate (GtkWidget *widget, GtkAllocation *allocation, GnomeCmdAdvrenameDialog *dialog);
static void on_dialog_response (GnomeCmdAdvrenameDialog *dialog, int response_id, gpointer data);
+ static void on_dialog_destroy (GnomeCmdAdvrenameDialog *dialog, gpointer data);
};
@@ -493,6 +494,12 @@ void GnomeCmdAdvrenameDialog::Private::on_dialog_response (GnomeCmdAdvrenameDial
}
+void GnomeCmdAdvrenameDialog::Private::on_dialog_destroy (GnomeCmdAdvrenameDialog *dialog, gpointer)
+{
+ dialog->priv->profile_component->copy();
+}
+
+
static void gnome_cmd_advrename_dialog_init (GnomeCmdAdvrenameDialog *dialog)
{
dialog->priv = new GnomeCmdAdvrenameDialog::Private;
@@ -703,6 +710,7 @@ GnomeCmdAdvrenameDialog::GnomeCmdAdvrenameDialog(GnomeCmdData::AdvrenameConfig &
g_signal_connect (this, "delete-event", G_CALLBACK (Private::on_dialog_delete), this);
g_signal_connect (this, "size-allocate", G_CALLBACK (Private::on_dialog_size_allocate), this);
g_signal_connect (this, "response", G_CALLBACK (Private::on_dialog_response), this);
+ g_signal_connect (this, "destroy", G_CALLBACK (Private::on_dialog_destroy), this);
gnome_cmd_advrename_parse_template (priv->profile_component->get_template_entry(), priv->template_has_counters);
}
diff --git a/src/gnome-cmd-advrename-profile-component.cc b/src/gnome-cmd-advrename-profile-component.cc
index 366063d..a16dc94 100644
--- a/src/gnome-cmd-advrename-profile-component.cc
+++ b/src/gnome-cmd-advrename-profile-component.cc
@@ -1077,8 +1077,6 @@ static void gnome_cmd_advrename_profile_component_finalize (GObject *object)
{
GnomeCmdAdvrenameProfileComponent *component = GNOME_CMD_ADVRENAME_PROFILE_COMPONENT (object);
- component->copy();
-
delete component->priv;
G_OBJECT_CLASS (gnome_cmd_advrename_profile_component_parent_class)->finalize (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]