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 572348 - Remove deprecated GTK+ symbols
Remove deprecated GTK+ symbols
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.30.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
evolution[cleanup]
Depends on: 569761
Blocks: 585692
 
 
Reported: 2009-02-19 00:12 UTC by André Klapper
Modified: 2010-04-08 14:18 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
proposed evo patch (72.98 KB, application/x-gzip)
2009-03-23 17:09 UTC, Milan Crha
Details

Description André Klapper 2009-02-19 00:12:24 UTC
http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B

For potential patch contributors:
It might make sense to break this into several smaller patches. :-P
Also make sure that the gtk and glib versions in configure.in are high enough
and take a look since which version the new non-deprecated functions are
available. http://library.gnome.org is your friend.


http://library.gnome.org/devel/gtk/stable/GtkCList.html
gtk_clist_freeze, gtk_clist_new, gtk_clist_prepend, gtk_clist_set_selection_mode, gtk_clist_thaw, 

http://library.gnome.org/devel/gtk/stable/GtkOptionMenu.html
gtk_option_menu_get_history, gtk_option_menu_get_menu, gtk_option_menu_new, gtk_option_menu_remove_menu, gtk_option_menu_set_history, gtk_option_menu_set_menu, 

http://library.gnome.org/devel/gtk/stable/GtkCombo.html
gtk_combo_new, gtk_combo_set_case_sensitive, gtk_combo_set_popdown_strings,

http://library.gnome.org/devel/gtk/stable/GtkLabel.html#gtk-label-parse-uline
gtk_label_parse_uline, 

http://library.gnome.org/devel/gtk/stable/GtkOptionMenu.html
gtk_list_clear_items, gtk_list_item_new_with_label, gtk_list_new, gtk_list_select_child, gtk_list_select_item, gtk_list_set_selection_mode, gtk_list_unselect_all, 

http://library.gnome.org/devel/gtk/stable/GtkStyle.html#gtk-style-get-font
gtk_style_get_font, 

http://library.gnome.org/devel/gtk/stable/GtkWidget.html
gtk_widget_draw, gtk_widget_push_visual, gtk_widget_set_uposition,

http://library.gnome.org/devel/gtk/unstable/GtkStatusIcon.html#gtk-status-icon-set-tooltip
gtk_status_icon_set_tooltip
Comment 1 Matthew Barnes 2009-02-19 02:07:57 UTC
Thanks.  I'll update http://www.go-evolution.org/GTK3 based on this.
Comment 2 Matthew Barnes 2009-02-19 03:26:04 UTC
Knocked off the easy ones.  The wiki page is up-to-date.
Comment 3 André Klapper 2009-02-23 23:35:50 UTC
So currently worth to fix are:
    * GtkCList
    * GtkCombo (migrate to GtkComboBoxEntry)
    * GtkOptionMenu (migrate to GtkComboBox)
    * GtkList / GtkListItem
    * gtk_label_parse_uline
    * gtk_widget_set_uposition 
Comment 4 Milan Crha 2009-03-13 14:08:03 UTC
I found GtkCList used in shell/importer/intelligent.c, but I didn't find how is this part of code called. It doesn't seem to be used. The code there also uses gnome_config_* functions, which I suppose are obsolete as well, aren't they?
Am I missing something?
Comment 5 André Klapper 2009-03-13 14:16:43 UTC
yes. For gnome_config_* see bug 570730.
Comment 6 Matthew Barnes 2009-03-13 14:18:55 UTC
AFAICT, everything under shell/importer is dead code.
I've already ripped it out of the kill-bonobo branch.

Looks like a precursor to the EImport framework.
Comment 7 Milan Crha 2009-03-13 19:49:39 UTC
OK, so I take GtkCList as gone from evo (though not from my build).

I removed GtkCombo locally, together with other dead files:
addressbook/gui/contact-editor/e-contact-editor-address.[h|c]
widgets/table/e-table-config-field.[h|c]

I'll look on GtkOptionMenu on Monday or so and upload patch for these two together, maybe I'll wait until I have also those other from comment #3, I do not know yet. I just do not want to upload patch for each of them, as I hope those other will be easy.

Matt, do you have bug for GTK_BIN (...)->child things? Can I do this together with these? It's mostly mechanic replace, but if you've special bug for that then I'm fine.
Comment 8 Matthew Barnes 2009-03-13 19:54:13 UTC
(In reply to comment #7)
> Matt, do you have bug for GTK_BIN (...)->child things? Can I do this together
> with these? It's mostly mechanic replace, but if you've special bug for that
> then I'm fine.

You mean GSEAL compliance?  Think I already fixed what we can with GTK+ 2.14, unless I missed something.  If you find any more, just fix them.
Comment 9 Milan Crha 2009-03-16 21:53:35 UTC
During GtkOptionMenu rewrites:

Removed other files too:
calendar/gui/dialogs/meeting-page.glade
addressbook/printing/e-contact-print-style-editor.[h|c]
addressbook/printing/e-contact-print.glade
addressbook/gui/contact-editor/fulladdr.glade
addressbook/gui/contact-editor/e-contact-editor-im.[h|c]
addressbook/gui/contact-editor/im.glade

skipped, as Matt said he has this done in de-bonobo:
widgets/misc/e-charset-picker.c
widgets/misc/e-search-bar.c
shell/e-shell-importer.c
mail/em-mailer-prefs.[h|c]: those with charset
mail/em-composer-prefs.[h|c]: those with charset
mail/em-folder-view.c

Approximately 6 files left for gtk_option_menu, and some testing, of course. I'm afraid of some regressions, unfortunately, mainly for parts where we had object's user data set for menu items there, like in filter rules. I have it rewritten, just not tested yet.
Comment 10 Milan Crha 2009-03-23 17:09:46 UTC
Created attachment 131199 [details]
proposed evo patch

for evolution;

With some ugly tweaks in the left files, and around too, I was able to compile (didn't try to run) Evolution with these options set:
 -DG_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DLIBSOUP_DISABLE_DEPRECATED -Wall -Wdeclaration-after-statement -Werror-implicit-function-declaration -Werror

Preferably apply and fix regressions than a real review, because it isn't as that small (gzip has a very nice compression ratio here).

Many GSEAL left (I do not have gtk+ new enough, and sub libraries are crazy with that), even EDS/camel deprecated stuff still there. I really do not know why to have convenient functions like camel_folder_set_message_flags deprecated.
Comment 11 André Klapper 2009-03-24 10:25:05 UTC
Commit after branching, and let's see what we can break. :-P
Thanks so much for working on this, Milan.
Comment 12 Milan Crha 2009-04-24 09:52:33 UTC
OK, consider master broken since either
commit 8a072ffc7c0ddcde472877a51ace0bb14f86fb0a
or
f6792a6..8a072ff  master -> master
whatever those numbers mean.

If you notice any regression, please CC me there and I will fix it as soon as I will be able to. Thanks.
Comment 13 Milan Crha 2009-04-24 11:39:39 UTC
eh, forgot to remove dead files from the source tree.
Created commit cd26e8a in master.
Comment 14 Milan Crha 2009-04-28 14:35:15 UTC
Created commit c868ace in master.

Message filter creating/editing didn't work, neither the filter-option selected item restored properly. Fixed now.
Comment 15 André Klapper 2009-09-05 11:11:37 UTC
The remaining (--> REOPENED) deprecated functions that are still used in current master are:


$:andre\> grep -r "GTK_CHECK_CAST" .
./addressbook/conduit/address-conduit.c:#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST
./calendar/conduits/todo/todo-conduit.c:#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST
./calendar/conduits/memo/memo-conduit.c:#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST
./calendar/conduits/calendar/calendar-conduit.c:#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST

These all look like they are required for compatibility until gnome-pilot gets rid of deprecated stuff (bug 594214).
As these are just defines I guess I should whitelist them to not be listed on http://www.gnome.org/~fpeters/299.html ?


$:andre\> grep -r "gtk_combo_new" .
./widgets/table/e-table-config-field.c:	etcf->combo = gtk_combo_new();

$:andre\> grep -r "gtk_combo_set_popdown_strings" .
./widgets/table/e-table-config-field.c:	gtk_combo_set_popdown_strings(GTK_COMBO(etcf->combo), list);


In that file the "GTK_COMBO" code confuses me.
Where the hell is that defined?!

./widgets/table/e-table-config-field.c:
  text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(etcf->combo)->entry));
  gtk_combo_set_popdown_strings(GTK_COMBO(etcf->combo), list);
  gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(etcf->combo)->entry),
                     chosen_column->title_);
  gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(etcf->combo)->entry), "None");
  g_signal_connect(GTK_COMBO(etcf->combo)->entry, "changed",
Comment 16 Matthew Barnes 2009-09-05 15:32:49 UTC
(In reply to comment #15)
> $:andre\> grep -r "GTK_CHECK_CAST" .
> ./addressbook/conduit/address-conduit.c:#define GTK_CHECK_CAST
> G_TYPE_CHECK_INSTANCE_CAST
> ./calendar/conduits/todo/todo-conduit.c:#define GTK_CHECK_CAST
> G_TYPE_CHECK_INSTANCE_CAST
> ./calendar/conduits/memo/memo-conduit.c:#define GTK_CHECK_CAST
> G_TYPE_CHECK_INSTANCE_CAST
> ./calendar/conduits/calendar/calendar-conduit.c:#define GTK_CHECK_CAST
> G_TYPE_CHECK_INSTANCE_CAST
> 
> These all look like they are required for compatibility until gnome-pilot gets
> rid of deprecated stuff (bug 594214).
> As these are just defines I guess I should whitelist them to not be listed on
> http://www.gnome.org/~fpeters/299.html ?

That's a hack I added because gnome-pilot still uses GTK_CHECK_CAST macros in its header files.  It's a conditional define:

  #ifdef GTK_DISABLE_DEPRECATED
  #define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST
  #endif

There's nothing for us to do but wait for gnome-pilot to fix its headers.

 
> In that file the "GTK_COMBO" code confuses me.
> Where the hell is that defined?!

/usr/include/gtk-2.0/gtk/gtkcombo.h

So one last case to fix.
Comment 17 Diego Escalante Urrelo (not reading bugmail) 2009-09-19 02:54:29 UTC
I can't build evo master:
  CC     e-map.lo
e-map.c: In function ‘scroll_to’:
e-map.c:1255: error: implicit declaration of function ‘gdk_event_get_graphics_expose’
e-map.c:1255: warning: nested extern declaration of ‘gdk_event_get_graphics_expose’
e-map.c:1255: warning: assignment makes pointer from integer without a cast

That was deprecated in GTK+ some days ago.
Comment 18 André Klapper 2009-09-19 03:18:36 UTC
Diego: These are just warnings, why can't you build? Flags too strict?
Comment 19 Matthew Barnes 2009-09-19 12:55:26 UTC
It's because we build by default with

    -DGTK_DISABLE_DEPRECATED
    -Werror-implicit-function-declaration

Not sure what to use in place gdk_event_get_graphics_expose(), or why we're using it in the first place.  Commit message and API docs are not helpful.

    commit aa9bb7d8e4cf9ef9d47f6dad6aa9deb2f30723a1
    Author: Matthias Clasen <mclasen@redhat.com>
    Date:   Wed Sep 9 09:00:15 2009 -0400

        Deprecate gdk_event_get_graphics exposes
    
        This function is only used in deprecated, broken widgets. Also,
        fix up some of its implmentation that clang was complaining about.
Comment 20 Matthew Barnes 2009-09-19 20:42:48 UTC
Seems to be just an optimization.  I disabled the call and the map widget still seems to work fine, so we'll see if any problems crop up.

http://git.gnome.org/cgit/evolution/commit/?id=0585b94eb27d02cf5cb0da87ee3bab85e2de6cbc
Comment 21 Matthew Barnes 2009-09-21 17:44:28 UTC
That last GtkCombo is a freebie.  It was in an unused ETable source file which I blew away recently:

http://git.gnome.org/cgit/evolution/commit/?id=8f3e43fb7d94f2b120b3e3e53e0af3dd7c5e248c

So, closing this as FIXED.
Comment 22 André Klapper 2009-10-01 10:47:11 UTC
Reopening.
Current master has the following issues:
./widgets/misc/e-web-view.c:	action = gtk_widget_get_action (widget);
./shell/e-shell-window-private.c:	action = gtk_widget_get_action (widget);
./mail/e-mail-browser.c:	action = gtk_widget_get_action (widget);
Comment 23 Matthew Barnes 2009-10-01 20:34:56 UTC
Fixed -- hopefully for good this time -- in:
http://git.gnome.org/cgit/evolution/commit/?id=656178049b4d1b73d4997aa983b778d4eb4054ae
Comment 24 André Klapper 2010-04-08 10:57:49 UTC
Reopening as capplet/settings/mail-view.c uses the recently deprecated gtk_notebook_set_tab_label_packing() in three places. See
http://library.gnome.org/devel/gtk/unstable/GtkNotebook.html#gtk-notebook-set-tab-label-packing