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 643500 - Use accessor functions instead direct access (use GSEAL GnomeGoal)
Use accessor functions instead direct access (use GSEAL GnomeGoal)
Status: RESOLVED OBSOLETE
Product: dia
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks: 585391
 
 
Reported: 2011-02-28 15:15 UTC by Enikő Nagy
Modified: 2019-03-20 11:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (88.94 KB, patch)
2011-02-28 15:15 UTC, Enikő Nagy
needs-work Details | Review

Description Enikő Nagy 2011-02-28 15:15:20 UTC
Created attachment 182097 [details] [review]
patch

Replaced direct access with accessor functions :
http://live.gnome.org/GnomeGoals/UseGseal
Comment 1 Hans Breuer 2011-03-12 16:01:17 UTC
Comment on attachment 182097 [details] [review]
patch

The next version of Dia is supposed to work with gtk-2-16, current master checks 
for gtk-2-14. But your patch unconditionally uses accessors from later version, e.g.
gtk_widget_get_allocation() from gtk-2-18

Also there a many places replacing the (gdk-)window member of a GtkWidget struct 
with a cast of the widget to GdkWindow*. This can not work and will produce
significat amounts of critical warnings if not crashes, e.g.
-    gdk_pointer_grab (ddisp->canvas->window, FALSE,
+    gdk_pointer_grab (GDK_WINDOW(ddisp->canvas), FALSE,

Although I'm setting the patch to needswork, I doubt a massive patch is the right 
approach. Dia is still using quite some long-time deprecated widgets in it's core
functionality. Without replacement of these and also removable of gdk drawing from
the core there will be no Gtk 3.x version possible. IMO UseGseal is only a small step
after there is solution for the bigger questions.

I'm still applying small patches now and than to keep Dia buildable with 
GTK_DISABLE_DEPRECATED, where it is not explicitely enable in source for the
above mentioned reasons.
Comment 2 Hans Breuer 2011-03-13 13:58:21 UTC
With the above given restrictions of lowest supported Gtk+ version there is still deprecation work ongoing (though a bit meesy with GTK_CHECK_VERSION), like:
http://git.gnome.org./browse/dia/commit/?id=9882262b6e41aa17eaaab01ddb46729b9ecefdf0

Easier to create, review and apply are patches focussing on deprecations of concrete functions with support in the lowest supported version, like:
http://git.gnome.org./browse/dia/commit/?id=e81adadcf00ed1ac7dccd87473eee8ace25f60d2
Comment 3 GNOME Infrastructure Team 2019-03-20 11:50:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/289.