Closed Bug 297303 Opened 20 years ago Closed 6 years ago

signals returning boolean but not using accumulators

Categories

(Core Graveyard :: Embedding: GTK Widget, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: chpe, Assigned: mpgritti)

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
Product: Core → Core Graveyard
Embedding: GTK Widget isn't a thing, closing.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.