diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-03-06 15:51:10 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-03-06 15:51:10 +0000 |
commit | 71aa1161b309ea0ad4e9776ebb554b920071c298 (patch) | |
tree | 7ab66033bd99fdab00cd955a50b3127090ed30fd /gtk/gtkdialog.c | |
parent | 96f9c875ee1445c2e4a2b62ec98b76505adc2728 (diff) | |
download | gdk-pixbuf-71aa1161b309ea0ad4e9776ebb554b920071c298.tar.gz |
Add animation of activation by, on activate, pressing the button, and
Tue Mar 6 10:45:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbutton.c: Add animation of activation by, on
activate, pressing the button, and adding a timeout that
releases the button after 250ms or on key release and
emits ::clicked. (#51501)
* gtk/gtkdialog.c: Bit of a hack - for buttons in the
action area, we connect to ::clicked instead of ::activate
so the dialog stays up through the animation.
Mon Mar 5 16:38:15 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): Only
check the ignore_enter flag for the menu shell that
the item is actually a child of, not for attached
submenus. (#51536)
Diffstat (limited to 'gtk/gtkdialog.c')
-rw-r--r-- | gtk/gtkdialog.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 85c3432bc..1742f5678 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -340,6 +340,7 @@ gtk_dialog_add_action_widget (GtkDialog *dialog, gint response_id) { ResponseData *ad; + gint signal_id = 0; g_return_if_fail (GTK_IS_DIALOG (dialog)); g_return_if_fail (GTK_IS_WIDGET (child)); @@ -348,10 +349,16 @@ gtk_dialog_add_action_widget (GtkDialog *dialog, ad->response_id = response_id; - if (GTK_WIDGET_GET_CLASS (child)->activate_signal != 0) + if (GTK_IS_BUTTON (child)) { - const gchar* name = - gtk_signal_name (GTK_WIDGET_GET_CLASS (child)->activate_signal); + signal_id = g_signal_lookup ("clicked", GTK_TYPE_BUTTON); + } + else + signal_id = GTK_WIDGET_GET_CLASS (child)->activate_signal != 0; + + if (signal_id) + { + const gchar* name = gtk_signal_name (signal_id); gtk_signal_connect_while_alive (GTK_OBJECT (child), name, |