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 618271 - Add gtk_window_has_group()
Add gtk_window_has_group()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.21.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 593601 597610 605776
 
 
Reported: 2010-05-10 13:29 UTC by Carlos Garcia Campos
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Add gtk_window_get_has_group() (1.95 KB, patch)
2010-05-10 13:29 UTC, Carlos Garcia Campos
none Details | Review
window: Add gtk_window_has_group() (1.94 KB, patch)
2010-05-10 16:43 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2010-05-10 13:29:45 UTC
Created attachment 160718 [details] [review]
window: Add gtk_window_get_has_group()

Since gtk_window_get_group() always returns a valid pointer there's no way to check whether the window has an explicit group or not. In order to build with GSEAL most of the modules using direct access to GtkWindow::group are using gtk_window_get_group() now. See comment 36 on bug #593601. I think there should be an accessor for such cases.
Comment 1 Christian Dywan 2010-05-10 16:18:48 UTC
It might be good to document the use case. Why would you need to check if there is a non-default group? Wouldn't you *know* if you created a group yourself?
Comment 2 Carlos Garcia Campos 2010-05-10 16:43:57 UTC
Created attachment 160739 [details] [review]
window: Add gtk_window_has_group()

Updated patch, use gtk_window_has_group() instead of gtk_window_get_has_group() as suggested on IRC
Comment 3 Carlos Garcia Campos 2010-05-10 16:47:36 UTC
(In reply to comment #1)
> It might be good to document the use case. Why would you need to check if there
> is a non-default group? Wouldn't you *know* if you created a group yourself?

Well, the use cases I've seen are code copy-pated from GtkTreeView interactive search stuff.
Comment 4 Javier Jardón (IRC: jjardon) 2010-05-26 14:58:10 UTC
Comment on attachment 160739 [details] [review]
window: Add gtk_window_has_group()

commit 6bac9dfd28524775deb7d6f5485efb4604221103
Comment 5 Javier Jardón (IRC: jjardon) 2010-05-26 14:58:32 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 6 Javier Jardón (IRC: jjardon) 2010-05-26 15:02:23 UTC
Also, committed in gtk-2-22 in commit 4acc2716cb7e900245a54392db44927ed84a7eee