summaryrefslogtreecommitdiff
path: root/ldmicro
diff options
context:
space:
mode:
authorakshay-c2019-01-18 12:20:34 +0530
committerakshay-c2019-01-18 12:20:34 +0530
commit252f21ab1f1639a1e936fe0e7b77975b40a0df7a (patch)
treee542142c1c702ec15cba2894fd3975c61220575e /ldmicro
parent0fa141944eff9fa6c6e1c321e9b2119f2793de1f (diff)
downloadLDMicroGtk-252f21ab1f1639a1e936fe0e7b77975b40a0df7a.tar.gz
LDMicroGtk-252f21ab1f1639a1e936fe0e7b77975b40a0df7a.tar.bz2
LDMicroGtk-252f21ab1f1639a1e936fe0e7b77975b40a0df7a.zip
Improve timer/counter dialog close events
Diffstat (limited to 'ldmicro')
-rw-r--r--ldmicro/simpledialog.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/ldmicro/simpledialog.cpp b/ldmicro/simpledialog.cpp
index 864189b..65a5c43 100644
--- a/ldmicro/simpledialog.cpp
+++ b/ldmicro/simpledialog.cpp
@@ -93,6 +93,14 @@ static void MyAlnumOnlyProc (GtkEditable *editable, gchar *NewText, gint length,
// oops();
}
+
+//Set the closing parameters
+
+gboolean SimpleDialogClosing(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ SIMPLE_DIALOG_ACTIVE = FALSE;
+}
+
//-----------------------------------------------------------------------------
// Don't allow any characters other than -0-9. in the box.
//-----------------------------------------------------------------------------
@@ -378,6 +386,7 @@ void ShowSimpleDialog(char *title, int boxes, char **labels, DWORD numOnlyMask,
g_signal_connect (CancelButton, "clicked", G_CALLBACK (SimpleDialogCancelProc), NULL);
g_signal_connect (OkButton, "clicked", G_CALLBACK (SimpleDialogWrapUp), NULL);
g_signal_connect (SimpleDialog, "key_press_event", G_CALLBACK (SimpleDialogKeyPressProc), NULL);
+ g_signal_connect (SimpleDialog, "destroy_event", G_CALLBACK (SimpleDialogClosing), NULL);
// EnableWindow(MainWindow, FALSE);
// ShowWindow(SimpleDialog, TRUE);