[gnome-color-manager/gnome-2-32] Ensure we disconnect the VTE signals when done with GcmCalibrateArgyll
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager/gnome-2-32] Ensure we disconnect the VTE signals when done with GcmCalibrateArgyll
- Date: Wed, 8 Sep 2010 09:07:17 +0000 (UTC)
commit 7258b2f5f9bb5f1e313b265d2f51e2fd263a5e60
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 8 09:49:36 2010 +0100
Ensure we disconnect the VTE signals when done with GcmCalibrateArgyll
src/gcm-calibrate-argyll.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index d002e2a..fc51203 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -80,6 +80,8 @@ struct _GcmCalibrateArgyllPrivate
GcmCalibrateArgyllState state;
GcmPrint *print;
const gchar *argyllcms_ok;
+ guint terminal_child_exited_id;
+ guint terminal_cursor_moved_id;
};
enum {
@@ -2723,10 +2725,12 @@ gcm_calibrate_argyll_init (GcmCalibrateArgyll *calibrate_argyll)
/* add vte widget */
calibrate_argyll->priv->terminal = vte_terminal_new ();
vte_terminal_set_size (VTE_TERMINAL(calibrate_argyll->priv->terminal), 80, 10);
- g_signal_connect (calibrate_argyll->priv->terminal, "child-exited",
- G_CALLBACK (gcm_calibrate_argyll_exit_cb), calibrate_argyll);
- g_signal_connect (calibrate_argyll->priv->terminal, "cursor-moved",
- G_CALLBACK (gcm_calibrate_argyll_cursor_moved_cb), calibrate_argyll);
+ calibrate_argyll->priv->terminal_child_exited_id =
+ g_signal_connect (calibrate_argyll->priv->terminal, "child-exited",
+ G_CALLBACK (gcm_calibrate_argyll_exit_cb), calibrate_argyll);
+ calibrate_argyll->priv->terminal_cursor_moved_id =
+ g_signal_connect (calibrate_argyll->priv->terminal, "cursor-moved",
+ G_CALLBACK (gcm_calibrate_argyll_cursor_moved_cb), calibrate_argyll);
gcm_calibrate_dialog_pack_details (calibrate_argyll->priv->calibrate_dialog,
calibrate_argyll->priv->terminal);
}
@@ -2749,6 +2753,10 @@ gcm_calibrate_argyll_finalize (GObject *object)
g_main_loop_run (priv->loop);
}
+ /* disconnect */
+ g_signal_handler_disconnect (priv->terminal, priv->terminal_child_exited_id);
+ g_signal_handler_disconnect (priv->terminal, priv->terminal_cursor_moved_id);
+
/* hide */
gcm_calibrate_dialog_hide (priv->calibrate_dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]