summaryrefslogtreecommitdiff
path: root/ldmicro/commentdialog.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/commentdialog.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/commentdialog.cpp')
-rw-r--r--ldmicro/commentdialog.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/ldmicro/commentdialog.cpp b/ldmicro/commentdialog.cpp
index 4ceb107..d0a6028 100644
--- a/ldmicro/commentdialog.cpp
+++ b/ldmicro/commentdialog.cpp
@@ -36,6 +36,20 @@ static HWID CommentPackingBox;
static HWID OkButton;
static HWID CancelButton;
+gboolean CommentDialogClosing(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ DestroyWindow (CommentDialog);
+ ProgramChanged();
+ gtk_widget_set_sensitive (MainWindow, TRUE);
+}
+
+gboolean CommentDialogDestroyed(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ DestroyWindow (CommentDialog);
+ ProgramChanged();
+ gtk_widget_set_sensitive (MainWindow, TRUE);
+}
+
static void MakeControls(void)
{
CommentTextbox = gtk_entry_new();
@@ -111,6 +125,8 @@ void ShowCommentDialog(char *comment)
G_CALLBACK(CommentDialogMouseClick), (gpointer)comment);
g_signal_connect (G_OBJECT (CancelButton), "clicked",
G_CALLBACK(CommentCallDestroyWindow), NULL);
+ g_signal_connect (CommentDialog, "destroy_event", G_CALLBACK (CommentDialogClosing), NULL);
+ g_signal_connect (CommentDialog, "delete_event", G_CALLBACK (CommentDialogDestroyed), NULL);
return;
}