diff options
author | akshay-c | 2019-01-18 16:25:30 +0530 |
---|---|---|
committer | akshay-c | 2019-01-18 16:25:30 +0530 |
commit | c41c6cc508d94d97eed40ad8efd4b8dfd4a105f6 (patch) | |
tree | a098e5fe96b68a705b1602413f56a3e05f732acd /ldmicro/simpledialog.cpp | |
parent | 252f21ab1f1639a1e936fe0e7b77975b40a0df7a (diff) | |
download | LDMicroGtk-c41c6cc508d94d97eed40ad8efd4b8dfd4a105f6.tar.gz LDMicroGtk-c41c6cc508d94d97eed40ad8efd4b8dfd4a105f6.tar.bz2 LDMicroGtk-c41c6cc508d94d97eed40ad8efd4b8dfd4a105f6.zip |
Refined close for timers, close defined for other dialogs
Diffstat (limited to 'ldmicro/simpledialog.cpp')
-rw-r--r-- | ldmicro/simpledialog.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ldmicro/simpledialog.cpp b/ldmicro/simpledialog.cpp index 65a5c43..601e7f8 100644 --- a/ldmicro/simpledialog.cpp +++ b/ldmicro/simpledialog.cpp @@ -98,7 +98,18 @@ static void MyAlnumOnlyProc (GtkEditable *editable, gchar *NewText, gint length, gboolean SimpleDialogClosing(GtkWidget *widget, GdkEvent *event, gpointer user_data) { + DestroyWindow(SimpleDialog); + ProgramChanged(); + SIMPLE_DIALOG_ACTIVE = FALSE; + gtk_widget_set_sensitive (MainWindow, TRUE); +} + +gboolean SimpleDialogDestroyed(GtkWidget *widget, GdkEvent *event, gpointer user_data) +{ + DestroyWindow(SimpleDialog); + ProgramChanged(); SIMPLE_DIALOG_ACTIVE = FALSE; + gtk_widget_set_sensitive (MainWindow, TRUE); } //----------------------------------------------------------------------------- @@ -387,6 +398,7 @@ void ShowSimpleDialog(char *title, int boxes, char **labels, DWORD numOnlyMask, 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); + g_signal_connect (SimpleDialog, "delete_event", G_CALLBACK (SimpleDialogDestroyed), NULL); // EnableWindow(MainWindow, FALSE); // ShowWindow(SimpleDialog, TRUE); |