After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 107633 - gimp_coordinate does not emit value-changed signal
gimp_coordinate does not emit value-changed signal
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: libgimp
git master
Other All
: Normal minor
: 2.0
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2003-03-05 11:04 UTC by Ernst Lippe
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ernst Lippe 2003-03-05 11:04:09 UTC
When both coordinates are "chained" the gimp_coordinate 
widget does not emit a "value-changed" signal, even 
though this signal is emitted when the coordinates 
are not "chained". 
This is apparently caused by the call to g_signal_stop_emission_by_name  
in the function gimp_coordinates_callback. 
The purpose of this call is not clear. 
When there is another signal that is emitted on a change 
(I could not find one) this should be documented.
Comment 1 Sven Neumann 2003-03-05 11:25:54 UTC
gimp_coordinates_new() is just a convenience function to create a
GimpSizeEntry and it is documented as such. You usually don't connect
to the "value-changed" signal of a GimpSizeEntry since the whole point
is to hide the ugly details of value changes. If you use a
GimpSizeEntry you are interested in changes of the reference value and
thus use the "refval-changed" signal as documented here:
http://developer.gimp.org/api/1.3/libgimpwidgets/GimpSizeEntry.html

However you are probably right that we should emit a value-changed
signal from the gimp_coordinates_callback() even if it is solely for
correctness.
Comment 2 Ernst Lippe 2003-03-05 12:26:58 UTC
The "refval-changed" signal does not seem to work in 
my code. 
It is only emitted in gimp_size_entry_refval_callback, 
that is a signal handler for the "value-changed" signals 
from the underlying adjustments. This signal 
handler is never connected when show_refval is FALSE. 
gimp_coordinates_new creates new GimpSizeEntry's with 
show_refval set to FALSE. 
I may have overlooked something, but it appears that 
gimp coordinates will never emit a "refvalue-changed" 
signal. 
Comment 3 Alan Horkan 2003-07-23 18:38:15 UTC
Changes at the request of Dave Neary on the developer mailing list.  
I am changing many of the bugzilla reports that have not specified a target
milestone to Future milestone.  Hope that is acceptable.  
Comment 4 Dave Neary 2003-07-26 20:10:50 UTC
Changing milestone on a bunch of bugs to 2.0 - none of these could be considered
a blocker for a pre-release, IMHO. Many of these have patches or someone working
on them, but they're not urgent.

Dave.
Comment 5 Henrik Brix Andersen 2003-08-16 16:06:01 UTC
I have investigated this a bit and it doesn't seem that neither the
"refval-changed" or the "value-changed" signal is emitted when the
chaining is active.

When the chaining is inactive the signal "value-changed" is emitted
correctly, but "refval-changed" will never be emitted since
gimp_coordinates_new() calls gimp_size_entry_new() with
show_refval=FALSE. The "unit-changed" signal is emitted correctly.

The "value-changed" signal is blocked by the call to
g_signal_stop_emission_by_name() in gimp_coordinates_callback().
Removing the call to g_signal_stop_emission_by_name() would allow
connecting to the "value-changed" signal - and since none of the
plug-ins using gimp_coordinates_new() connects to the signals - won't
break anything.

Perhaps yosh can tell us why the call to
g_signal_stop_emission_by_name() was added?
Comment 6 Michael Natterer 2003-08-16 19:47:32 UTC
Fixed in CVS.

2003-08-16  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback): moved
	the g_signal_stop_emission_by_name() right before the calls to
	gimp_size_entrs_set_refval() so we only block the duplicate
	"value_changed" signal, not all of them. Fixes bug #107633.