Commit f5099a69 authored by Colomban Wendling's avatar Colomban Wendling

GTK client: do not destroy connection dialog upon window close (oops)

parent c093a5ee
......@@ -65,6 +65,8 @@ static void ovccgtk_connection_dialog_set_propery (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static gboolean ovccgtk_connection_dialog_delete_event (GtkWidget *widget,
GdkEvent *event);
static void ovccgtk_connection_dialog_constructed (GObject *object);
static void ovccgtk_connection_dialog_response (GtkDialog *dialog,
gint response);
......@@ -146,8 +148,9 @@ ovccgtk_connection_dialog_class_init (OVCCGtkConnectionDialogClass *klass)
object_class->set_property = ovccgtk_connection_dialog_set_propery;
object_class->constructed = ovccgtk_connection_dialog_constructed;
widget_class->show_all = gtk_widget_show;
widget_class->hide_all = gtk_widget_hide;
widget_class->show_all = gtk_widget_show;
widget_class->hide_all = gtk_widget_hide;
widget_class->delete_event = ovccgtk_connection_dialog_delete_event;
dialog_class->response = ovccgtk_connection_dialog_response;
......@@ -362,6 +365,15 @@ ovccgtk_connection_dialog_constructed (GObject *object)
ovccgtk_connection_dialog_validate (OVCCGTK_CONNECTION_DIALOG (object));
}
static gboolean
ovccgtk_connection_dialog_delete_event (GtkWidget *widget,
GdkEvent *event)
{
/* never destroy the dialog automatically, just emit let the response be
* emitted and the user do what she wants with it */
return TRUE;
}
static void
ovccgtk_connection_dialog_response (GtkDialog *dialog,
gint response)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment