summaryrefslogtreecommitdiff
path: root/ldmicro/resetdialog.cpp
diff options
context:
space:
mode:
authorakshay-c2019-01-18 16:25:30 +0530
committerakshay-c2019-01-18 16:25:30 +0530
commitc41c6cc508d94d97eed40ad8efd4b8dfd4a105f6 (patch)
treea098e5fe96b68a705b1602413f56a3e05f732acd /ldmicro/resetdialog.cpp
parent252f21ab1f1639a1e936fe0e7b77975b40a0df7a (diff)
downloadLDMicroGtk-c41c6cc508d94d97eed40ad8efd4b8dfd4a105f6.tar.gz
LDMicroGtk-c41c6cc508d94d97eed40ad8efd4b8dfd4a105f6.tar.bz2
LDMicroGtk-c41c6cc508d94d97eed40ad8efd4b8dfd4a105f6.zip
Refined close for timers, close defined for other dialogs
Diffstat (limited to 'ldmicro/resetdialog.cpp')
-rw-r--r--ldmicro/resetdialog.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/ldmicro/resetdialog.cpp b/ldmicro/resetdialog.cpp
index ff250df..8288eab 100644
--- a/ldmicro/resetdialog.cpp
+++ b/ldmicro/resetdialog.cpp
@@ -57,6 +57,20 @@ void ResetDialogMyNameProc (GtkEditable *editable, gchar *NewText, gint length,
}
}
+gboolean ResetDialogClosing(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ DestroyWindow (ResetDialog);
+ ProgramChanged();
+ gtk_widget_set_sensitive (MainWindow, TRUE);
+}
+
+gboolean ResetDialogDestroyed(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ DestroyWindow (ResetDialog);
+ ProgramChanged();
+ gtk_widget_set_sensitive (MainWindow, TRUE);
+}
+
static void MakeControls(void)
{
TypeTimerRadio = gtk_radio_button_new_with_label (NULL, "Timer");
@@ -156,4 +170,6 @@ void ShowResetDialog(char *name)
G_CALLBACK(ResetDialogMouseClick), (gpointer)name);
g_signal_connect (G_OBJECT (CancelButton), "clicked",
G_CALLBACK(ResetCallDestroyWindow), NULL);
+ g_signal_connect (ResetDialog, "destroy_event", G_CALLBACK (ResetDialogClosing), NULL);
+ g_signal_connect (ResetDialog, "delete_event", G_CALLBACK (ResetDialogDestroyed), NULL);
}