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 624087 - Missing accessor for GdkCursor.type
Missing accessor for GdkCursor.type
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.21.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 597610
 
 
Reported: 2010-07-11 07:53 UTC by John Stowers
Modified: 2010-07-25 10:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add gdk_cursor_get_cursor_type (1.88 KB, patch)
2010-07-17 00:17 UTC, John Stowers
needs-work Details | Review
Add gdk_cursor_get_cursor_type (1.90 KB, patch)
2010-07-22 04:48 UTC, John Stowers
accepted-commit_now Details | Review

Description John Stowers 2010-07-11 07:53:38 UTC
For building PyGtk against Gtk-3.0 [1]

Probably should be gdk_cursor_get_cursor_type

[1] http://mail.gnome.org/archives/gtk-devel-list/2010-July/msg00005.html
Comment 1 Matthias Clasen 2010-07-12 13:20:08 UTC
Explain how pygtk needs the cursor type ?
Comment 2 John Stowers 2010-07-13 00:55:03 UTC
1) PyGtk wrapped GdkCursor.type. To maintain compatibility when built against 3.0, I delegate access where possible to either accessor functions or GObject properties. This works in many many cases because where GSEALED members have been removed other ways to access the data have been added. E.g. in python, GdkWidget.window now calls gtk_widget_get_window / g_object_get(w, "window" &window, NULL).

2) When doing str() or repr() on a GdkCursor we print the enum value of the type field, i.e. using g_enum_get_value.
Comment 3 John Stowers 2010-07-17 00:17:00 UTC
Created attachment 166048 [details] [review]
Add gdk_cursor_get_cursor_type
Comment 4 Emmanuele Bassi (:ebassi) 2010-07-19 21:36:46 UTC
Review of attachment 166048 [details] [review]:

::: gdk/gdkcursor.c
@@ +105,3 @@
+ * @cursor:  a #GdkCursor
+ * gdk_cursor_get_cursor_type:
+/**

missing Since: annotation.
Comment 5 John Stowers 2010-07-22 04:48:40 UTC
Created attachment 166355 [details] [review]
Add gdk_cursor_get_cursor_type

Adds Since: annotation
Comment 6 Emmanuele Bassi (:ebassi) 2010-07-22 09:15:33 UTC
Review of attachment 166355 [details] [review]:

looks good. please, commit after adding the new symbol to the sections.txt file for gdk
Comment 7 John Stowers 2010-07-25 00:37:37 UTC
Comitted to 2.22, should I commit to master too?
Comment 8 Emmanuele Bassi (:ebassi) 2010-07-25 09:40:08 UTC
(In reply to comment #7)
> Comitted to 2.22, should I commit to master too?

yes.
Comment 9 John Stowers 2010-07-25 10:48:46 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.