GNOME Bugzilla – Bug 300065
[PATCH] replace gtkcombobox instead of deprecated gtkoptionmenu
Last modified: 2005-07-19 18:32:37 UTC
this little patch use gtk_combo_box instead of deprecated gtk_option_menu
Created attachment 45100 [details] [review] bug-buddy.glade, bug-buddy.c, bugzilla.c, united-states-of-bug-buddy.c patch
Comment on attachment 45100 [details] [review] bug-buddy.glade, bug-buddy.c, bugzilla.c, united-states-of-bug-buddy.c patch Thank you very much for the patch. I'm building my gnome 2.12 env right now for testing it. After I first read I think there is a mem leak associated to gtk_combo_box_get_active_text, because it returns a new allocated string. so for example: >- druid_data.severity = (char *)data; >+ druid_data.severity = gtk_combo_box_get_active_text (GTK_COMBO_BOX (w)); should be: - druid_data.severity = (char *)data; + if (druid_data.severity) { + g_free (druid_data.severity) + } + druid_data.severity = gtk_combo_box_get_active_text (GTK_COMBO_BOX (w)); with a proper initialization of druid_data.severity = NULL at the beggining.
Created attachment 45120 [details] [review] new patch configure.in change check to gtk+ 2.6 bugzilla.c :remove unused variables, work on memory leak I don't write if (druid_data.severity) { g_free (druid_data.severity) } but g_free (druid_data.severity) because g_free just return if called with NULL. right ?
this patch fix bug #130288
Committed, thank you very much for your love to bug-buddy :) 2005-07-19 Fernando Herrera <fherrera@onirica.com> * configure.in: * src/bug-buddy.c: (update_crash_type), (init_ui), (delete_me), (main): * src/bug-buddy.glade: * src/bugzilla.c: (update_severity), (update_version), (add_severity), (update_version_menu), (bugzilla_product_add_components_to_clist), (bugzilla_add_mostfreq): * src/united-states-of-bug-buddy.c: (select_version), (select_severity): Port to GtkComboBox. Patch by Michael Gossard. Fixes #300065 and #130288