From 6d6d3a59b88c31fefae4a7de5bc190e056c5417e Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 13 Dec 1998 00:13:39 +0000 Subject: [PATCH] made GtkMenuItem::activate a GTK_RUN_ACTION signal. Sat Dec 12 19:11:35 1998 Tim Janik * gtk/gtkmenuitem.c: made GtkMenuItem::activate a GTK_RUN_ACTION signal. * gtk/gtkbutton.c: made GtkButton::clicked a GTK_RUN_ACTION signal. * gtk/gtkfeatures.h.in: define GTK_HAVE_FEATURES_1_1_8. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkbutton.c | 17 ++++++++++++++++- gtk/gtkfeatures.h.in | 4 ++++ gtk/gtkmenuitem.c | 11 ++++++++++- 10 files changed, 86 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a5638aaa9..a66b6d7b50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sat Dec 12 19:11:35 1998 Tim Janik + + * gtk/gtkmenuitem.c: made GtkMenuItem::activate a GTK_RUN_ACTION signal. + + * gtk/gtkbutton.c: made GtkButton::clicked a GTK_RUN_ACTION signal. + + * gtk/gtkfeatures.h.in: define GTK_HAVE_FEATURES_1_1_8. + Sat Dec 12 17:46:55 1998 Owen Taylor * gtk/gtklayout.c (gtk_layout_unrealize): Mark diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 0a5638aaa9..a66b6d7b50 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Sat Dec 12 19:11:35 1998 Tim Janik + + * gtk/gtkmenuitem.c: made GtkMenuItem::activate a GTK_RUN_ACTION signal. + + * gtk/gtkbutton.c: made GtkButton::clicked a GTK_RUN_ACTION signal. + + * gtk/gtkfeatures.h.in: define GTK_HAVE_FEATURES_1_1_8. + Sat Dec 12 17:46:55 1998 Owen Taylor * gtk/gtklayout.c (gtk_layout_unrealize): Mark diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0a5638aaa9..a66b6d7b50 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Sat Dec 12 19:11:35 1998 Tim Janik + + * gtk/gtkmenuitem.c: made GtkMenuItem::activate a GTK_RUN_ACTION signal. + + * gtk/gtkbutton.c: made GtkButton::clicked a GTK_RUN_ACTION signal. + + * gtk/gtkfeatures.h.in: define GTK_HAVE_FEATURES_1_1_8. + Sat Dec 12 17:46:55 1998 Owen Taylor * gtk/gtklayout.c (gtk_layout_unrealize): Mark diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 0a5638aaa9..a66b6d7b50 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Sat Dec 12 19:11:35 1998 Tim Janik + + * gtk/gtkmenuitem.c: made GtkMenuItem::activate a GTK_RUN_ACTION signal. + + * gtk/gtkbutton.c: made GtkButton::clicked a GTK_RUN_ACTION signal. + + * gtk/gtkfeatures.h.in: define GTK_HAVE_FEATURES_1_1_8. + Sat Dec 12 17:46:55 1998 Owen Taylor * gtk/gtklayout.c (gtk_layout_unrealize): Mark diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0a5638aaa9..a66b6d7b50 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Sat Dec 12 19:11:35 1998 Tim Janik + + * gtk/gtkmenuitem.c: made GtkMenuItem::activate a GTK_RUN_ACTION signal. + + * gtk/gtkbutton.c: made GtkButton::clicked a GTK_RUN_ACTION signal. + + * gtk/gtkfeatures.h.in: define GTK_HAVE_FEATURES_1_1_8. + Sat Dec 12 17:46:55 1998 Owen Taylor * gtk/gtklayout.c (gtk_layout_unrealize): Mark diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0a5638aaa9..a66b6d7b50 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Sat Dec 12 19:11:35 1998 Tim Janik + + * gtk/gtkmenuitem.c: made GtkMenuItem::activate a GTK_RUN_ACTION signal. + + * gtk/gtkbutton.c: made GtkButton::clicked a GTK_RUN_ACTION signal. + + * gtk/gtkfeatures.h.in: define GTK_HAVE_FEATURES_1_1_8. + Sat Dec 12 17:46:55 1998 Owen Taylor * gtk/gtklayout.c (gtk_layout_unrealize): Mark diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0a5638aaa9..a66b6d7b50 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Sat Dec 12 19:11:35 1998 Tim Janik + + * gtk/gtkmenuitem.c: made GtkMenuItem::activate a GTK_RUN_ACTION signal. + + * gtk/gtkbutton.c: made GtkButton::clicked a GTK_RUN_ACTION signal. + + * gtk/gtkfeatures.h.in: define GTK_HAVE_FEATURES_1_1_8. + Sat Dec 12 17:46:55 1998 Owen Taylor * gtk/gtklayout.c (gtk_layout_unrealize): Mark diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index fcc6cca46a..69da1044ac 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -151,7 +151,7 @@ gtk_button_class_init (GtkButtonClass *klass) GTK_TYPE_NONE, 0); button_signals[CLICKED] = gtk_signal_new ("clicked", - GTK_RUN_FIRST, + GTK_RUN_FIRST | GTK_RUN_ACTION, object_class->type, GTK_SIGNAL_OFFSET (GtkButtonClass, clicked), gtk_marshal_NONE__NONE, @@ -306,30 +306,45 @@ gtk_button_new_with_label (const gchar *label) void gtk_button_pressed (GtkButton *button) { + g_return_if_fail (button != NULL); + g_return_if_fail (GTK_IS_BUTTON (button)); + gtk_signal_emit (GTK_OBJECT (button), button_signals[PRESSED]); } void gtk_button_released (GtkButton *button) { + g_return_if_fail (button != NULL); + g_return_if_fail (GTK_IS_BUTTON (button)); + gtk_signal_emit (GTK_OBJECT (button), button_signals[RELEASED]); } void gtk_button_clicked (GtkButton *button) { + g_return_if_fail (button != NULL); + g_return_if_fail (GTK_IS_BUTTON (button)); + gtk_signal_emit (GTK_OBJECT (button), button_signals[CLICKED]); } void gtk_button_enter (GtkButton *button) { + g_return_if_fail (button != NULL); + g_return_if_fail (GTK_IS_BUTTON (button)); + gtk_signal_emit (GTK_OBJECT (button), button_signals[ENTER]); } void gtk_button_leave (GtkButton *button) { + g_return_if_fail (button != NULL); + g_return_if_fail (GTK_IS_BUTTON (button)); + gtk_signal_emit (GTK_OBJECT (button), button_signals[LEAVE]); } diff --git a/gtk/gtkfeatures.h.in b/gtk/gtkfeatures.h.in index 632bec90d3..f1d56e9b5e 100644 --- a/gtk/gtkfeatures.h.in +++ b/gtk/gtkfeatures.h.in @@ -79,6 +79,10 @@ extern "C" { */ #define GTK_HAVE_FEATURES_1_1_7 1-1-7 +/* Gtk+ 1.1.8 version tag + */ +#define GTK_HAVE_FEATURES_1_1_8 1-1-8 + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index cec8e3f147..1b9765c9dd 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -113,7 +113,7 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass) menu_item_signals[ACTIVATE] = gtk_signal_new ("activate", - GTK_RUN_FIRST, + GTK_RUN_FIRST | GTK_RUN_ACTION, object_class->type, GTK_SIGNAL_OFFSET (GtkMenuItemClass, activate), gtk_marshal_NONE__NONE, @@ -278,18 +278,27 @@ gtk_menu_item_configure (GtkMenuItem *menu_item, void gtk_menu_item_select (GtkMenuItem *menu_item) { + g_return_if_fail (menu_item != NULL); + g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); + gtk_item_select (GTK_ITEM (menu_item)); } void gtk_menu_item_deselect (GtkMenuItem *menu_item) { + g_return_if_fail (menu_item != NULL); + g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); + gtk_item_deselect (GTK_ITEM (menu_item)); } void gtk_menu_item_activate (GtkMenuItem *menu_item) { + g_return_if_fail (menu_item != NULL); + g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); + gtk_signal_emit (GTK_OBJECT (menu_item), menu_item_signals[ACTIVATE]); }