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 300065 - [PATCH] replace gtkcombobox instead of deprecated gtkoptionmenu
[PATCH] replace gtkcombobox instead of deprecated gtkoptionmenu
Status: RESOLVED FIXED
Product: bug-buddy
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Bug-buddy Maintainers
Bug-buddy Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-10 08:38 UTC by Michael Gossard
Modified: 2005-07-19 18:32 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
bug-buddy.glade, bug-buddy.c, bugzilla.c, united-states-of-bug-buddy.c patch (10.78 KB, patch)
2005-04-10 08:43 UTC, Michael Gossard
needs-work Details | Review
new patch (12.24 KB, patch)
2005-04-11 04:14 UTC, Michael Gossard
none Details | Review

Description Michael Gossard 2005-04-10 08:38:36 UTC
this little patch use gtk_combo_box instead of deprecated
gtk_option_menu
Comment 1 Michael Gossard 2005-04-10 08:43:11 UTC
Created attachment 45100 [details] [review]
bug-buddy.glade, bug-buddy.c, bugzilla.c, united-states-of-bug-buddy.c patch
Comment 2 Fernando Herrera 2005-04-10 10:59:45 UTC
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.
Comment 3 Michael Gossard 2005-04-11 04:14:21 UTC
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 ?
Comment 4 Michael Gossard 2005-04-17 08:45:24 UTC
this patch fix bug #130288
Comment 5 Fernando Herrera 2005-07-19 18:32:37 UTC
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