[sound-juicer] sj-main: Fix use of unset variable



commit da990f52ee21d7aa8af8169103d8616bfbcb8f0b
Author: Bastien Nocera <hadess hadess net>
Date:   Mon May 23 13:49:37 2011 +0100

    sj-main: Fix use of unset variable
    
    And fix a possible crasher by the same token.

 src/sj-main.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/sj-main.c b/src/sj-main.c
index f9d3d71..d8f6c8d 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -410,9 +410,11 @@ musicbrainz_submit_info_bar_new (char *title, char *artist)
   g_return_val_if_fail (title != NULL, NULL);
   g_return_val_if_fail (artist != NULL, NULL);
 
-  infobar = gtk_info_bar_new_with_buttons (_("S_ubmit Album"), GTK_RESPONSE_OK,
-                                           GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                           NULL);
+  infobar = gtk_info_bar_new ();
+  button = gtk_info_bar_add_button (GTK_INFO_BAR (infobar),
+                                    _("S_ubmit Album"), GTK_RESPONSE_OK);
+  gtk_info_bar_add_button (GTK_INFO_BAR (infobar),
+                           GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
 
   /* Translators: title, artist */
   primary_text = g_strdup_printf (_("Could not find %s by %s on MusicBrainz."), title, artist);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]