Commit 0aef43bc authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Applied patch from Ron Steinke to add signal accumulators so that signals

Mon Apr  2 16:41:08 2001  Owen Taylor  <otaylor@redhat.com>

	* Applied patch from Ron Steinke to add signal accumulators
	so that signals with the convention 'TRUE return means
	handled' stop emission on a TRUE return.

	* gtk/gtkmain.[ch]: Add private accumulator
	_gtk_boolean_handled_accumulator, used throughout GTK+.

	* gtk/gtkspinbutton.c: Add accumulator for ::output.

	* gtk/gtktipsquery.c: Add accumulator for ::widget_selected

	* gtk/gtkwidget.c: Add accumulators for event signals,
	::drag_motion, ::drag_drop. Use _gtk_boolean_handled_accumator
	for ::mnemonic-activate.

	* gtk/gtkwindow.c: Add accumulator for ::frame_event

Mon Apr  2 16:24:21 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c: Add missing include.
parent 29985af0
Mon Apr 2 16:41:08 2001 Owen Taylor <otaylor@redhat.com>
* Applied patch from Ron Steinke to add signal accumulators
so that signals with the convention 'TRUE return means
handled' stop emission on a TRUE return.
* gtk/gtkmain.[ch]: Add private accumulator
_gtk_boolean_handled_accumulator, used throughout GTK+.
* gtk/gtkspinbutton.c: Add accumulator for ::output.
* gtk/gtktipsquery.c: Add accumulator for ::widget_selected
* gtk/gtkwidget.c: Add accumulators for event signals,
::drag_motion, ::drag_drop. Use _gtk_boolean_handled_accumator
for ::mnemonic-activate.
* gtk/gtkwindow.c: Add accumulator for ::frame_event
Mon Apr 2 16:24:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add missing include.
Mon Apr 2 16:56:15 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
......
Mon Apr 2 16:41:08 2001 Owen Taylor <otaylor@redhat.com>
* Applied patch from Ron Steinke to add signal accumulators
so that signals with the convention 'TRUE return means
handled' stop emission on a TRUE return.
* gtk/gtkmain.[ch]: Add private accumulator
_gtk_boolean_handled_accumulator, used throughout GTK+.
* gtk/gtkspinbutton.c: Add accumulator for ::output.
* gtk/gtktipsquery.c: Add accumulator for ::widget_selected
* gtk/gtkwidget.c: Add accumulators for event signals,
::drag_motion, ::drag_drop. Use _gtk_boolean_handled_accumator
for ::mnemonic-activate.
* gtk/gtkwindow.c: Add accumulator for ::frame_event
Mon Apr 2 16:24:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add missing include.
Mon Apr 2 16:56:15 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
......
Mon Apr 2 16:41:08 2001 Owen Taylor <otaylor@redhat.com>
* Applied patch from Ron Steinke to add signal accumulators
so that signals with the convention 'TRUE return means
handled' stop emission on a TRUE return.
* gtk/gtkmain.[ch]: Add private accumulator
_gtk_boolean_handled_accumulator, used throughout GTK+.
* gtk/gtkspinbutton.c: Add accumulator for ::output.
* gtk/gtktipsquery.c: Add accumulator for ::widget_selected
* gtk/gtkwidget.c: Add accumulators for event signals,
::drag_motion, ::drag_drop. Use _gtk_boolean_handled_accumator
for ::mnemonic-activate.
* gtk/gtkwindow.c: Add accumulator for ::frame_event
Mon Apr 2 16:24:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add missing include.
Mon Apr 2 16:56:15 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
......
Mon Apr 2 16:41:08 2001 Owen Taylor <otaylor@redhat.com>
* Applied patch from Ron Steinke to add signal accumulators
so that signals with the convention 'TRUE return means
handled' stop emission on a TRUE return.
* gtk/gtkmain.[ch]: Add private accumulator
_gtk_boolean_handled_accumulator, used throughout GTK+.
* gtk/gtkspinbutton.c: Add accumulator for ::output.
* gtk/gtktipsquery.c: Add accumulator for ::widget_selected
* gtk/gtkwidget.c: Add accumulators for event signals,
::drag_motion, ::drag_drop. Use _gtk_boolean_handled_accumator
for ::mnemonic-activate.
* gtk/gtkwindow.c: Add accumulator for ::frame_event
Mon Apr 2 16:24:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add missing include.
Mon Apr 2 16:56:15 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
......
Mon Apr 2 16:41:08 2001 Owen Taylor <otaylor@redhat.com>
* Applied patch from Ron Steinke to add signal accumulators
so that signals with the convention 'TRUE return means
handled' stop emission on a TRUE return.
* gtk/gtkmain.[ch]: Add private accumulator
_gtk_boolean_handled_accumulator, used throughout GTK+.
* gtk/gtkspinbutton.c: Add accumulator for ::output.
* gtk/gtktipsquery.c: Add accumulator for ::widget_selected
* gtk/gtkwidget.c: Add accumulators for event signals,
::drag_motion, ::drag_drop. Use _gtk_boolean_handled_accumator
for ::mnemonic-activate.
* gtk/gtkwindow.c: Add accumulator for ::frame_event
Mon Apr 2 16:24:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add missing include.
Mon Apr 2 16:56:15 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
......
Mon Apr 2 16:41:08 2001 Owen Taylor <otaylor@redhat.com>
* Applied patch from Ron Steinke to add signal accumulators
so that signals with the convention 'TRUE return means
handled' stop emission on a TRUE return.
* gtk/gtkmain.[ch]: Add private accumulator
_gtk_boolean_handled_accumulator, used throughout GTK+.
* gtk/gtkspinbutton.c: Add accumulator for ::output.
* gtk/gtktipsquery.c: Add accumulator for ::widget_selected
* gtk/gtkwidget.c: Add accumulators for event signals,
::drag_motion, ::drag_drop. Use _gtk_boolean_handled_accumator
for ::mnemonic-activate.
* gtk/gtkwindow.c: Add accumulator for ::frame_event
Mon Apr 2 16:24:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add missing include.
Mon Apr 2 16:56:15 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
......
Mon Apr 2 16:41:08 2001 Owen Taylor <otaylor@redhat.com>
* Applied patch from Ron Steinke to add signal accumulators
so that signals with the convention 'TRUE return means
handled' stop emission on a TRUE return.
* gtk/gtkmain.[ch]: Add private accumulator
_gtk_boolean_handled_accumulator, used throughout GTK+.
* gtk/gtkspinbutton.c: Add accumulator for ::output.
* gtk/gtktipsquery.c: Add accumulator for ::widget_selected
* gtk/gtkwidget.c: Add accumulators for event signals,
::drag_motion, ::drag_drop. Use _gtk_boolean_handled_accumator
for ::mnemonic-activate.
* gtk/gtkwindow.c: Add accumulator for ::frame_event
Mon Apr 2 16:24:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add missing include.
Mon Apr 2 16:56:15 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
......
......@@ -1683,3 +1683,17 @@ gtk_print (gchar *str)
gtk_widget_show (window);
}
#endif
gboolean
_gtk_boolean_handled_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,
const GValue *handler_return,
gpointer dummy)
{
gboolean val;
val = g_value_get_boolean (handler_return);
g_value_set_boolean (return_accu, val);
return !val;
}
......@@ -193,6 +193,12 @@ GtkWidget* gtk_get_event_widget (GdkEvent *event);
void gtk_propagate_event (GtkWidget *widget,
GdkEvent *event);
gboolean _gtk_boolean_handled_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,
const GValue *handler_return,
gpointer dummy);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -243,12 +243,13 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
GTK_TYPE_INT, 1, GTK_TYPE_POINTER);
spinbutton_signals[OUTPUT] =
gtk_signal_new ("output",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkSpinButtonClass, output),
gtk_marshal_BOOLEAN__VOID,
GTK_TYPE_BOOL, 0);
g_signal_newc("output",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkSpinButtonClass, output),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__VOID,
G_TYPE_BOOLEAN, 0);
spinbutton_signals[VALUE_CHANGED] =
gtk_signal_new ("value_changed",
......
......@@ -159,16 +159,17 @@ gtk_tips_query_class_init (GtkTipsQueryClass *class)
GTK_TYPE_STRING,
GTK_TYPE_STRING);
tips_query_signals[SIGNAL_WIDGET_SELECTED] =
gtk_signal_new ("widget_selected",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkTipsQueryClass, widget_selected),
gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED,
GTK_TYPE_BOOL, 4,
GTK_TYPE_WIDGET,
GTK_TYPE_STRING,
GTK_TYPE_STRING,
GTK_TYPE_GDK_EVENT);
g_signal_newc("widget_selected",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkTipsQueryClass, widget_selected),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED,
G_TYPE_BOOLEAN, 4,
GTK_TYPE_WIDGET,
G_TYPE_STRING,
G_TYPE_STRING,
GTK_TYPE_GDK_EVENT);
}
static void
......
This diff is collapsed.
......@@ -401,14 +401,14 @@ gtk_window_class_init (GtkWindowClass *klass)
GTK_TYPE_WIDGET);
window_signals[FRAME_EVENT] =
gtk_signal_new ("frame_event",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkWindowClass, frame_event),
gtk_marshal_BOOLEAN__BOXED,
GTK_TYPE_BOOL, 1,
GTK_TYPE_GDK_EVENT);
g_signal_newc("frame_event",
G_TYPE_FROM_CLASS(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(GtkWindowClass, frame_event),
_gtk_boolean_handled_accumulator, NULL,
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
GTK_TYPE_GDK_EVENT);
if (!mnemonic_hash_table)
mnemonic_hash_table = g_hash_table_new (mnemonic_hash,
......
......@@ -32,6 +32,7 @@ style "global-style-properties"
{
# xthickness = 20
GtkSpinButton::shadow_type = etched-out
GtkEntry::cursor_color = { 1.0, 0.0, 0.0 }
}
class "GtkWidget" style "global-style-properties"
......
......@@ -32,6 +32,7 @@ style "global-style-properties"
{
# xthickness = 20
GtkSpinButton::shadow_type = etched-out
GtkEntry::cursor_color = { 1.0, 0.0, 0.0 }
}
class "GtkWidget" style "global-style-properties"
......
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