[gtk+/wip/matthiasc/kill-event-signals: 9/58] file chooser button: Stop connecting to ::delete-event
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/kill-event-signals: 9/58] file chooser button: Stop connecting to ::delete-event
- Date: Wed, 3 Jan 2018 03:02:42 +0000 (UTC)
commit bcc4080466b2aaac345c086d439df207c2cbc7d4
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 31 11:41:59 2017 -0500
file chooser button: Stop connecting to ::delete-event
We can just use GtkWindow::hide-on-close.
gtk/gtkfilechooserbutton.c | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 5168d40..ce499a5 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -323,9 +323,6 @@ static void chooser_update_preview_cb (GtkFileChooser *dialog,
static void chooser_notify_cb (GObject *dialog,
GParamSpec *pspec,
gpointer user_data);
-static gboolean dialog_delete_event_cb (GtkWidget *dialog,
- GdkEvent *event,
- gpointer user_data);
static void dialog_response_cb (GtkDialog *dialog,
gint response,
gpointer user_data);
@@ -837,12 +834,11 @@ gtk_file_chooser_button_constructed (GObject *object)
else /* dialog set */
{
priv->chooser = GTK_FILE_CHOOSER (priv->dialog);
+ gtk_window_set_hide_on_close (GTK_WINDOW (priv->chooser), TRUE);
if (!gtk_window_get_title (GTK_WINDOW (priv->dialog)))
gtk_file_chooser_button_set_title (button, _(DEFAULT_TITLE));
- g_signal_connect (priv->dialog, "delete-event",
- G_CALLBACK (dialog_delete_event_cb), object);
g_signal_connect (priv->dialog, "response",
G_CALLBACK (dialog_response_cb), object);
@@ -2874,16 +2870,6 @@ chooser_notify_cb (GObject *dialog,
}
}
-static gboolean
-dialog_delete_event_cb (GtkWidget *dialog,
- GdkEvent *event,
- gpointer user_data)
-{
- g_signal_emit_by_name (dialog, "response", GTK_RESPONSE_DELETE_EVENT);
-
- return TRUE;
-}
-
static void
common_response_cb (GtkFileChooserButton *button,
gint response)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]