[easytag/wip/musicbrainz-support-merge: 5/55] Set Album of selected file
- From: Abhinav Jangda <abhijangda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/musicbrainz-support-merge: 5/55] Set Album of selected file
- Date: Sat, 16 Aug 2014 06:16:39 +0000 (UTC)
commit 8be57c186c5ff6d0bee5b60a4339666036e324f1
Author: Abhinav <abhijangda hotmail com>
Date: Thu Jun 26 00:05:34 2014 +0530
Set Album of selected file
Added get_first_selected_file to get first selected ET_File
Use above ET_File to set the album name to Search ComboBoxText
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]