summaryrefslogtreecommitdiff
path: root/ldmicro/contactsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ldmicro/contactsdialog.cpp')
-rw-r--r--ldmicro/contactsdialog.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/ldmicro/contactsdialog.cpp b/ldmicro/contactsdialog.cpp
index 38750c8..7d13ff1 100644
--- a/ldmicro/contactsdialog.cpp
+++ b/ldmicro/contactsdialog.cpp
@@ -71,6 +71,22 @@ void ContactsDialogMyNameProc (GtkEditable *editable, gchar *NewText, gint lengt
}
}
+//Set the closing parameters
+
+gboolean ContactsDialogClosing(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ DestroyWindow (ContactsDialog);
+ ProgramChanged();
+ gtk_widget_set_sensitive (MainWindow, TRUE);
+}
+
+gboolean ContactsDialogDestroyed(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ DestroyWindow (ContactsDialog);
+ ProgramChanged();
+ gtk_widget_set_sensitive (MainWindow, TRUE);
+}
+
static void MakeControls(void)
{
SourceInternalRelayRadio = gtk_radio_button_new_with_label (NULL, "Internal Relay");
@@ -199,5 +215,7 @@ void ShowContactsDialog(BOOL *negated, char *name)
G_CALLBACK(ContactsDialogMouseClick), NULL);
g_signal_connect (G_OBJECT (CancelButton), "clicked",
G_CALLBACK(ContactsCallDestroyWindow), NULL);
+ g_signal_connect (ContactsDialog, "destroy_event", G_CALLBACK (ContactsDialogClosing), NULL);
+ g_signal_connect (ContactsDialog, "delete_event", G_CALLBACK (ContactsDialogDestroyed), NULL);
}