aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/callbacks.c7
-rw-r--r--src/callbacks.h2
-rw-r--r--src/camorama-window.c3
3 files changed, 12 insertions, 0 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index 501ea2e..1e81fba 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -340,6 +340,13 @@ void prefs_func(GtkWidget *okbutton, cam_t *cam)
gtk_widget_hide(prefswindow);
}
+gboolean delete_event_prefs_window(GtkWidget *widget, GdkEvent *event,
+ cam_t *cam)
+{
+ prefs_func(widget, cam);
+ return TRUE;
+}
+
void on_quit_activate(GtkMenuItem *menuitem, cam_t *cam)
{
#if GTK_MAJOR_VERSION >= 3
diff --git a/src/callbacks.h b/src/callbacks.h
index a768f7f..1b55606 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -42,6 +42,8 @@ void on_about_activate(GtkMenuItem *menuitem, cam_t *cam);
void on_show_adjustments_activate(GtkToggleButton *button, cam_t *);
void on_show_effects_activate(GtkMenuItem *menuitem, cam_t *);
void prefs_func(GtkWidget *, cam_t *);
+gboolean delete_event_prefs_window(GtkWidget *widget, GdkEvent *event,
+ cam_t *cam);
void capture_func2(GtkWidget *, cam_t *);
void capture_func(GtkWidget *, cam_t *);
gint timeout_capture_func(cam_t *);
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 3108660..862f869 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -254,6 +254,9 @@ void load_interface(cam_t *cam)
gtk_window_set_icon(GTK_WINDOW(window), logo);
gtk_window_set_icon(GTK_WINDOW(prefswindow), logo);
+ g_signal_connect(G_OBJECT(prefswindow), "delete-event",
+ G_CALLBACK(delete_event_prefs_window), cam);
+
g_signal_connect(gtk_builder_get_object(cam->xml, "show_effects"),
"activate", G_CALLBACK(on_show_effects_activate),
cam);

Privacy Policy