GNOME Bugzilla – Bug 571868
GNOME Goal: Remove deprecated GTK+ symbols
Last modified: 2009-07-20 11:38:01 UTC
See http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B . ./src/yelp-search-pager.c:1675: gtk_idle_add_priority (G_PRIORITY_LOW, ./src/yelp-settings.c:779: gtk_object_sink (GTK_OBJECT (widget)); ./src/yelp-toc-pager.c:279: gtk_idle_add_priority (G_PRIORITY_LOW, ./src/yelp-toc-pager.c:332: gtk_idle_add_priority (G_PRIORITY_LOW, ./src/yelp-pager.c:291: priv->process_id = gtk_idle_add ((GSourceFunc) process_cb, pager); ./src/yelp-html.h:33:#define YELP_HTML(o) (GTK_CHECK_CAST ((o), YELP_TYPE_HTML, YelpHtml)) ./src/yelp-html.h:35:#define YELP_IS_HTML(o) (GTK_CHECK_TYPE ((o), YELP_TYPE_HTML)) ./src/yelp-html.h:36:#define YELP_IS_HTML_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), YELP_TYPE_HTML)) ./src/yelp-base.c:110: parent_class = gtk_type_class (PARENT_TYPE); ./src/yelp-window.h:34: #define YELP_WINDOW(obj) (GTK_CHECK_CAST ((obj), YELP_TYPE_WINDOW, YelpWindow)) ./src/yelp-window.h:35: #define YELP_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), YELP_TYPE_WINDOW, YelpWindowClass)) ./src/yelp-window.h:36: #define YELP_IS_WINDOW(obj) (GTK_CHECK_TYPE ((obj), YELP_TYPE_WINDOW)) ./src/yelp-window.h:37: #define YELP_IS_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), YELP_TYPE_WINDOW))
Created attachment 129375 [details] [review] Replaces deprecated gtk symbols Patch replaces various deprecated gtk symbols. Things to note: 1) the reference to GTK_CHECK_FOR_CAST in YELP_HTML_CLASS was bogus. I assumed it was meant to be GTK_CHECK_CLASS_CAST. Since it is not used anywhere it makes little difference. 2) Still todo is gtk_action_connect_proxy that was deprecated in gtk 2.16 3) there is still deprecated gtk and glib in unused/dead files: yelp-db-pager.c yelp-db-pager.h yelp-db-print-pager.c yelp-db-print-pager.h yelp-info-pager.c yelp-info-pager.h yelp-man-pager.c yelp-man-pager.h yelp-pager.c yelp-pager.h yelp-search-pager.c yelp-search-pager.h yelp-toc-pager.c yelp-toc-pager.h yelp-xslt-pager.c yelp-xslt-pager.h info2html/ man2html/ Could these be deleted?
phomes: Yupp, it is planned to delete these directories - see bug 560451. CC'ing Shaun as this is another nice cleanup for Yelp.
Thomas: Just go ahead and commit if it's safe (that's what Shaun said on irc)
I personally consider the patch to be pretty safe. My tests did not show any problems either. Should I delete the unused files I listed in the same go?
I committed the patch as r3221: http://svn.gnome.org/viewvc/yelp?view=revision&revision=3221 I'm leaving the bug open for: - gtk_action_connect_proxy - symbols in unused files
Created attachment 132373 [details] [review] Replace deprecated gtk_action_connect_proxy Patch replaces the last use of deprecated gtk symbols. It replaces gtk_action_connect_proxy with gtk_activatable_do_set_related_action. This needs gtk 2.16 so bumping the required gtk in configure.in too. Also ping on deleting those unused/dead files listed earlier. With these changes yelp should be free of both deprecated gtk and glib symbols
I've removed the unused files. Is there anything else other than the use of gtk_action_connect_proxy? I'll have to update my development machine so I can build against GTK+ 2.16 before I commit that.
no, gtk_action_connect_proxy was the only thing I did not fix in the other patch due to the dep on gtk 2.16. With this patch yelp will be done for this goal.
Created attachment 133377 [details] [review] 571868 Same patch but created with git format-patch HEAD^ for convenience
I'm happy for this to be committed, however doing so will block Shaun from dev work (until he updates GTK+). Once he gives the signal (or prior to 2.27.1 release) I'll apply the patch.
Created attachment 133617 [details] [review] same patch but uses #if GTK_CHECK_VERSION (2, 16, 0) Same patch as before but this checks #if GTK_CHECK_VERSION (2, 16, 0) to only use the new api when gtk 2.16 is available. This can be used until Shaun is ready and the #if-stuff can just be removed again when you are ready.
Thomas: Just commit the last (#ifdef'ed patch) to master please. People can still blame me afterwards. :)
I will probably not be able to do this until after June 8th :(
git committed this to the webkit branch: http://git.gnome.org/cgit/yelp/commit/?h=webkit&id=4294bd05a1c8af1ff7c8d9d1fbead86d5d1c4c9a and rejected the commit to master. No idea what is what for here. Is this enough to close this?
So is fixing the webkit branch enough?
<shaunm> andre: master is what I'm working on. I don't believe I've ever made a commit to webkit <shaunm> commits on webkit ought to be only for the purpose of switching to webkit So here you go. :)
Committed to master: http://git.gnome.org/cgit/yelp/commit/?id=796c2bcd915868796736d6ef1049e0f1d95127c4