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 118459 - TextBuffer::get_selection_bounds() should return bool value.
TextBuffer::get_selection_bounds() should return bool value.
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.4
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2003-07-28 06:11 UTC by huzheng
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description huzheng 2003-07-28 06:11:21 UTC
now TextBuffer::get_selection_bounds() return void, i think it is better
return bool just like gtk+ do.
Comment 1 Murray Cumming 2003-07-28 07:34:18 UTC
I think you are probably correct.

The bool says whether the selection is greater than 0 characters:
http://developer.gnome.org/doc/API/2.0/gtk/GtkTextBuffer.html#gtk-text-buffer-get-selection-bounds

We probably thought that the iters would be equal to end() if
something failed, but I think the iters could have valid equal values
even if the selection is 0.

It looks like we also need to add a
bool get_selection_bounds() overload, with no parameters, using NULL
values to GTK+.

Thank you.
Comment 2 Murray Cumming 2003-08-05 08:06:59 UTC
By the way, you can check whether the iters are equal. It should give
the same information.
Comment 3 Murray Cumming 2003-09-30 13:23:12 UTC
Fixed in cvs for gtkmm 2.4, though it is not really necessary. Thanks.