diff --git a/ChangeLog b/ChangeLog index 3c91ef7dfd..5ee3155c35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-11-25 Matthias Clasen + + * gtk/gtkdialog.c: Move signal and property documentation inline, + fix a problem with the ::response signal docs. (#499133, Josselin + Mouette) + 2007-11-22 15:48:26 Tim Janik * Makefile.decl: initialize automake variables EXTRA_DIST and diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 96978dc952..60d4a913f1 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,7 @@ +2007-11-25 Matthias Clasen + + * gtk/tmpl/gtkdialog.sgml: Move signal docs inline. + 2007-11-19 Matthias Clasen * gtk/tmpl/gtknotebook.sgml: diff --git a/docs/reference/gtk/tmpl/gtkdialog.sgml b/docs/reference/gtk/tmpl/gtkdialog.sgml index d3e2b02e19..0baf505499 100644 --- a/docs/reference/gtk/tmpl/gtkdialog.sgml +++ b/docs/reference/gtk/tmpl/gtkdialog.sgml @@ -190,14 +190,11 @@ as any other #GtkHButtonBox. -Emitted when an action widget is clicked, the dialog receives a delete event, or -the application programmer calls gtk_dialog_response(). On a delete event, the -response ID is #GTK_RESPONSE_NONE. Otherwise, it depends on which action widget -was clicked. + -@dialog: the object which received the signal. -@arg1: the response ID +@dialog: +@arg1: diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 83c771a044..8760c19caf 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -133,6 +133,11 @@ gtk_dialog_class_init (GtkDialogClass *class) g_type_class_add_private (gobject_class, sizeof (GtkDialogPrivate)); + /** + * GtkDialog:has-separator: + * + * When %TRUE, the dialog has a separator bar above its buttons. + */ g_object_class_install_property (gobject_class, PROP_HAS_SEPARATOR, g_param_spec_boolean ("has-separator", @@ -140,7 +145,17 @@ gtk_dialog_class_init (GtkDialogClass *class) P_("The dialog has a separator bar above its buttons"), TRUE, GTK_PARAM_READWRITE)); - + + /** + * GtkDialog::response: + * @dialog: the object on which the signal is emitted + * @response_id: the response ID + * + * Emitted when an action widget is clicked, the dialog receives a + * delete event, or the application programmer calls gtk_dialog_response(). + * On a delete event, the response ID is #GTK_RESPONSE_DELETE_EVENT. + * Otherwise, it depends on which action widget was clicked. + */ dialog_signals[RESPONSE] = g_signal_new (I_("response"), G_OBJECT_CLASS_TYPE (class), @@ -151,6 +166,16 @@ gtk_dialog_class_init (GtkDialogClass *class) G_TYPE_NONE, 1, G_TYPE_INT); + /** + * GtkDialog::close: + * + * The ::close signal is a + * keybinding signal + * which getrs emitted when the user uses a keybinding to close + * the dialog. + * + * The default binding for this signal is the Escape key. + */ dialog_signals[CLOSE] = g_signal_new (I_("close"), G_OBJECT_CLASS_TYPE (class), @@ -188,8 +213,7 @@ gtk_dialog_class_init (GtkDialogClass *class) binding_set = gtk_binding_set_by_class (class); - gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, - "close", 0); + gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "close", 0); } static void