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 357216 - Don't use deprecated GdkFont
Don't use deprecated GdkFont
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Srinivasa Ragavan
Evolution QA team
evolution[codecleanup]
Depends on:
Blocks:
 
 
Reported: 2006-09-22 16:26 UTC by Matthew Barnes
Modified: 2013-09-10 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (13.36 KB, patch)
2006-09-22 17:41 UTC, Matthew Barnes
accepted-commit_now Details | Review

Description Matthew Barnes 2006-09-22 16:26:40 UTC
When I was fixing bug #352450, I shied away from fixing some widgets that are still using GdkFont because it would involve changing some of their GObject properties.

I had a second look at this and realized that these properties are unused, and some of them are obsolete.  So here's what I did:

ETableFieldChooserItem
   - Replaced "GdkFont *font" with "PangoFontDescription *font_desc".

ETableGroupContainer
   - Replaced "GdkFont *font" with "PangoFontDescription *font_desc".

ETableHeaderItem
   - Replaced "GdkFont *font" with "PangoFontDescription *font_desc".
   - Renamed the "fontset" property to "font-desc", and changed the type
     from a string to a PangoFontDescription object.
   - Removed the now unused ethi_font_load() function.

EEntry
   - There are three font properties: "font", "fontset", and "font_gdk"
   - All of the get and set handlers for these properties simply forward to
     equivalent properties in entry->item (an EText object), but there are
     no (longer?) such properties in EText.  So I removed them from EEntry.

Again, the properties I changed are not currently used in Evolution.

These changes allow Evolution to build with deprecated GDK symbols disabled:

   $ export CFLAGS="-DGDK_DISABLE_DEPRECATED=1"
   $ ./configure
   $ make

---

As an aside, the GObject properties in the Evolution widgets I looked at appear to be in a state of disrepair.  For example, I saw several properties being registered as G_PARAM_READWRITE but lacking either a read or write handler.  In other cases such as EEntry, read and write handlers are forwarding requests to non-existant properties in other objects.

Evolution's widgets should be audited to make sure the properties and signals they define are still relevant.  I'll add this to my list of "housekeeping" chores and file a separate bug report when I get to it.
Comment 1 Matthew Barnes 2006-09-22 17:41:55 UTC
Created attachment 73231 [details] [review]
Proposed patch
Comment 2 André Klapper 2006-09-24 16:51:03 UTC
great stuff like always, thanks!
Comment 3 Harish Krishnaswamy 2006-09-25 10:52:26 UTC
This patch is really awesome :-). 
Srag : Can you pl. look into this and approve the patch for absorption ?
Comment 4 Matthew Barnes 2007-02-08 15:27:56 UTC
Ping: any progress on reviewing this?
Comment 5 Srinivasa Ragavan 2007-02-08 16:56:37 UTC
Hey Matthew, looks find to me. Please commit.
Comment 6 Matthew Barnes 2007-02-08 19:36:31 UTC
Committed to HEAD.