Mercurial > audlegacy
comparison audacious/mainwin.c @ 813:c8cf439179b8 trunk
[svn] - Fix a ton and a half of memory leaks, via the wonderful Leonardo Boshell <leonardop -at- gentoo.org>.
author | nenolod |
---|---|
date | Fri, 10 Mar 2006 08:20:15 -0800 |
parents | fbbd15125774 |
children | 1125fdc111c2 |
comparison
equal
deleted
inserted
replaced
812:f9a1ddb72432 | 813:c8cf439179b8 |
---|---|
159 gint n_channels; | 159 gint n_channels; |
160 }; | 160 }; |
161 | 161 |
162 | 162 |
163 GtkWidget *mainwin = NULL; | 163 GtkWidget *mainwin = NULL; |
164 GtkMessageDialog *err = NULL; /* an error dialog for miscellaneous error messages */ | 164 GtkWidget *err = NULL; /* an error dialog for miscellaneous error messages */ |
165 | 165 |
166 static GdkBitmap *nullmask; | 166 static GdkBitmap *nullmask; |
167 static gint balance; | 167 static gint balance; |
168 | 168 |
169 GtkWidget *mainwin_jtf = NULL; | 169 GtkWidget *mainwin_jtf = NULL; |
1388 if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) | 1388 if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) |
1389 return; | 1389 return; |
1390 | 1390 |
1391 gtk_tree_model_get(model, &iter, 0, &pos_str, -1); | 1391 gtk_tree_model_get(model, &iter, 0, &pos_str, -1); |
1392 pos = g_ascii_strtoull(pos_str, NULL, 10) - 1; | 1392 pos = g_ascii_strtoull(pos_str, NULL, 10) - 1; |
1393 g_free(pos_str); | |
1393 | 1394 |
1394 change_song(pos); | 1395 change_song(pos); |
1395 | 1396 |
1396 /* FIXME: should only hide window */ | 1397 /* FIXME: should only hide window */ |
1397 gtk_widget_destroy(mainwin_jtf); | 1398 gtk_widget_destroy(mainwin_jtf); |
1459 if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) | 1460 if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) |
1460 return; | 1461 return; |
1461 | 1462 |
1462 gtk_tree_model_get(model, &iter, 0, &pos_str, -1); | 1463 gtk_tree_model_get(model, &iter, 0, &pos_str, -1); |
1463 pos = g_ascii_strtoull(pos_str, NULL, 10) - 1; | 1464 pos = g_ascii_strtoull(pos_str, NULL, 10) - 1; |
1465 g_free(pos_str); | |
1464 | 1466 |
1465 mainwin_jump_to_file_set_queue_button_label(GTK_BUTTON(data), pos); | 1467 mainwin_jump_to_file_set_queue_button_label(GTK_BUTTON(data), pos); |
1466 } | 1468 } |
1467 | 1469 |
1468 static gboolean | 1470 static gboolean |
3150 err = gtk_message_dialog_new(GTK_WINDOW(mainwin), GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL, | 3152 err = gtk_message_dialog_new(GTK_WINDOW(mainwin), GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL, |
3151 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,"Error in Audacious."); | 3153 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,"Error in Audacious."); |
3152 | 3154 |
3153 | 3155 |
3154 gtk_window_set_position(GTK_WINDOW(err), GTK_WIN_POS_CENTER); | 3156 gtk_window_set_position(GTK_WINDOW(err), GTK_WIN_POS_CENTER); |
3155 gtk_label_set_line_wrap(GTK_LABEL(err->label), TRUE); | |
3156 /* Dang well better set an error message or you'll see this */ | 3157 /* Dang well better set an error message or you'll see this */ |
3157 gtk_message_dialog_format_secondary_text(err,"Boo! Bad stuff! Booga Booga!"); | 3158 gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(err), |
3159 "Boo! Bad stuff! Booga Booga!"); | |
3158 | 3160 |
3159 } | 3161 } |
3160 | 3162 |
3161 static void | 3163 static void |
3162 mainwin_create_window(void) | 3164 mainwin_create_window(void) |