[easytag/wip/musicbrainz-support] Set Album of selected file



commit d856885e4b3e55dd48f9e8e13c812976a4b7c286
Author: Abhinav <abhijangda hotmail com>
Date:   Thu Jun 26 00:05:34 2014 +0530

    Set Album of selected file

 src/musicbrainz_dialog.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/musicbrainz_dialog.c b/src/musicbrainz_dialog.c
index ce7dc76..c6a471f 100755
--- a/src/musicbrainz_dialog.c
+++ b/src/musicbrainz_dialog.c
@@ -771,6 +771,7 @@ et_open_musicbrainz_dialog ()
     GtkWidget *cb_manual_search_in;
     GtkWidget *cb_search;
     GError *error;
+    ET_File *et_file;
 
     builder = gtk_builder_new ();
     error = NULL;
@@ -854,6 +855,15 @@ et_open_musicbrainz_dialog ()
 
     gtk_combo_box_set_active (GTK_COMBO_BOX (cb_manual_search_in), 1);
 
+    /* Set the text of cbManualSearch to the album of selected file */
+    get_first_selected_file (&et_file);
+
+    if (et_file && ((File_Tag *)et_file->FileTag->data)->album)
+    {
+        gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (cb_search))),
+                            ((File_Tag *)et_file->FileTag->data)->album);
+    }
+
     gtk_widget_show_all (mbDialog);
     gtk_dialog_run (GTK_DIALOG (mbDialog));
     gtk_widget_destroy (mbDialog);


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