[cheese] ui: handle "delete-event" signal at Preferences dialog, fixes bug #647229
- From: Luciana Fujii Pontello <lufujii src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] ui: handle "delete-event" signal at Preferences dialog, fixes bug #647229
- Date: Sat, 16 Apr 2011 01:30:35 +0000 (UTC)
commit 9c27753176e931908b894b6b3707a8588f9c1de5
Author: Rodrigo Duarte Sousa <rodrigodsousa gmail com>
Date: Sun Apr 10 14:17:04 2011 -0300
ui: handle "delete-event" signal at Preferences dialog, fixes bug #647229
the "close" event triggered by the escape key was destroyng the dialog, so
when the user tried to open the Preferences dialog again what appeared was
an empty/tiny window. Handle the "delete-event" connecting it with hide_on_delete()
solved the problem.
data/cheese-prefs.ui | 1 +
src/cheese-preferences.vala | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/data/cheese-prefs.ui b/data/cheese-prefs.ui
index 7b68831..90e43f6 100644
--- a/data/cheese-prefs.ui
+++ b/data/cheese-prefs.ui
@@ -49,6 +49,7 @@
<property name="title" translatable="yes">Preferences</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
+ <signal name="delete-event" handler="cheese_preferences_dialog_on_delete" swapped="no"/>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
diff --git a/src/cheese-preferences.vala b/src/cheese-preferences.vala
index eb0a925..3c18f41 100644
--- a/src/cheese-preferences.vala
+++ b/src/cheese-preferences.vala
@@ -256,6 +256,12 @@ public class Cheese.PreferencesDialog : GLib.Object
}
[CCode (instance_pos = -1)]
+ public void on_delete (Gtk.Dialog dialog)
+ {
+ dialog.hide_on_delete ();
+ }
+
+ [CCode (instance_pos = -1)]
public void on_dialog_close (Gtk.Button button)
{
this.dialog.hide ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]