signals returning boolean but not using accumulators

RESOLVED WONTFIX

Status

--
major
RESOLVED WONTFIX
14 years ago
a day ago

People

(Reporter: chpe, Assigned: mpgritti)

Tracking

Trunk
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

The "open_uri" and "dom_*" signals have return type boolean. Returning TRUE for
open_uri cancels the load, and returning TRUE for dom_* marks the event as
consumed. But the signals are created with gtk_signal_new, which makes it
impossible to specify a signal accumulator. This means that if you have more
than one signal handler connected, the signal emission does NOT stop on the
first TRUE return, but instead continues; and the signal return value is the
return value of the last handler.

The only way to fix this is to use g_signal_new instead of gtk_signal_new; that
means we will need to #ifdef MOZ_WIDGET_GTK2 a whole load of code.
(In reply to comment #0)
> The "open_uri" and "dom_*" signals have return type boolean. Returning TRUE for
> open_uri cancels the load, and returning TRUE for dom_* marks the event as
> consumed. But the signals are created with gtk_signal_new, which makes it
> impossible to specify a signal accumulator. This means that if you have more
> than one signal handler connected, the signal emission does NOT stop on the
> first TRUE return, but instead continues; and the signal return value is the
> return value of the last handler.
> 
> The only way to fix this is to use g_signal_new instead of gtk_signal_new; that
> means we will need to #ifdef MOZ_WIDGET_GTK2 a whole load of code.

Any patches from anybody for fixing this problem?
QA Contact: pavlov → gtk-widget
Component: Embedding: GTK Widget → Embedding: GTK Widget
Product: Core → Core Graveyard
Embedding: GTK Widget isn't a thing, closing.
Status: NEW → RESOLVED
Last Resolved: 2 days ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.