[easytag/wip/musicbrainz-support-merge: 1/48] Added MusicBrainz dialog
- From: Abhinav Jangda <abhijangda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/musicbrainz-support-merge: 1/48] Added MusicBrainz dialog
- Date: Mon, 11 Aug 2014 11:47:48 +0000 (UTC)
commit 7e08db0a3f40e2825d5d4842268c001680dbe64b
Author: Abhinav <abhijangda hotmail com>
Date: Fri May 9 20:55:56 2014 +0530
Added MusicBrainz dialog
Makefile.am | 25 ++-
configure.ac | 2 +
data/musicbrainz_dialog.ui | 759 ++++++++++++++++++++++++++++++++++
data/org.gnome.EasyTAG.gresource.xml | 6 +
po/POTFILES.in | 1 +
src/bar.c | 7 +-
src/bar.h | 4 +-
src/mbentityview.c | 142 +++++++
src/mbentityview.h | 76 ++++
src/musicbrainz_dialog.c | 81 ++++
src/musicbrainz_dialog.h | 31 ++
src/ui_manager.h | 6 +-
12 files changed, 1131 insertions(+), 9 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1f58f47..bed227d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,6 +17,9 @@ SUBDIRS = help po
bin_PROGRAMS = easytag
+BUILT_SOURCES = \
+ $(nodist_easytag_SOURCES)
+
localedir = $(prefix)/$(DATADIRNAME)/locale
easytag_CPPFLAGS = \
-I$(top_srcdir) \
@@ -62,6 +65,8 @@ easytag_SOURCES = \
src/mpeg_header.c \
src/mp4_tag.cc \
src/musepack_header.c \
+ src/musicbrainz_dialog.c \
+ src/mbentityview.c \
src/ogg_header.c \
src/ogg_tag.c \
src/opus_header.c \
@@ -76,6 +81,9 @@ easytag_SOURCES = \
src/wavpack_tag.c \
src/win32/win32dep.c
+nodist_easytag_SOURCES = \
+ src/resource.c
+
easytag_headers = \
src/id3lib/id3_bugfix.h \
src/libapetag/apetaglib.h \
@@ -99,12 +107,14 @@ easytag_headers = \
src/gtk2_compat.h \
src/id3_tag.h \
src/log.h \
+ src/mbentityview.h \
src/misc.h \
src/monkeyaudio_header.h \
src/mpeg_header.h \
src/mp4_header.h \
src/mp4_tag.h \
src/musepack_header.h \
+ src/musicbrainz_dialog.h \
src/ogg_header.h \
src/ogg_tag.h \
src/opus_header.h \
@@ -120,11 +130,20 @@ easytag_headers = \
src/wavpack_tag.h \
src/win32/win32dep.h
+nodist_easytag_headers = \
+ src/resource.h
+
easytag_LDADD = \
$(EASYTAG_LIBS) \
$(ID3LIB_LIBS) \
$(easytag_rc)
+noinst_resource_files = \
+ $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=$(srcdir)/data
$(srcdir)/data/org.gnome.EasyTAG.gresource.xml)
+
+src/resource.c src/resource.h: data/org.gnome.EasyTAG.gresource.xml Makefile $(noinst_resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/data --generate $<
+
if WINDOWS_HOST
ICONDIR = $(srcdir)/data/icons/win32
MANIFESTDIR = $(srcdir)/src/win32
@@ -245,6 +264,8 @@ dist_noinst_DATA = \
$(appdata_in_files) \
$(desktop_in_files) \
$(easytag_headers) \
+ data/org.gnome.EasyTAG.gresource.xml \
+ $(noinst_resource_files) \
src/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff \
src/libapetag/COPYING.LGPL \
src/libapetag/README.apetag \
@@ -344,7 +365,9 @@ CLEANFILES = \
$(nodist_man_MANS) \
*.log \
easytag-$(PACKAGE_VERSION)-setup.exe \
- easytag-win32-installer.nsi
+ easytag-win32-installer.nsi \
+ src/resource.c \
+ src/resource.h
DISTCLEANFILES = \
po/.intltool-merge-cache
diff --git a/configure.ac b/configure.ac
index 535cebf..6e56b29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,8 @@ AC_PROG_CXXCPP
AC_PROG_SED
PKG_PROG_PKG_CONFIG([0.24])
+AC_SUBST([GLIB_COMPILE_RESOURCES], [`$PKG_CONFIG --variable glib_compile_resources gio-2.0`])
+
dnl Man page, generated with xsltproc from DocBook XML.
AC_ARG_ENABLE([man],
[AS_HELP_STRING([--disable-man], [Disable building the man page])])
diff --git a/data/musicbrainz_dialog.ui b/data/musicbrainz_dialog.ui
new file mode 100755
index 0000000..415f3cf
--- /dev/null
+++ b/data/musicbrainz_dialog.ui
@@ -0,0 +1,759 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkImage" id="image12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-find</property>
+ </object>
+ <object class="GtkImage" id="image13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-stop</property>
+ </object>
+ <object class="GtkImage" id="image8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-find</property>
+ </object>
+ <object class="GtkImage" id="image9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-stop</property>
+ </object>
+ <object class="GtkImage" id="findimage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-find</property>
+ </object>
+ <object class="GtkImage" id="image14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon-size">5</property>
+ </object>
+ <object class="GtkImage" id="img_invert_selection">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">easytag-invert-selection</property>
+ </object>
+ <object class="GtkImage" id="img_red_lines">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">easytag-red-lines</property>
+ </object>
+ <object class="GtkImage" id="img_unselect_all">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">easytag-unselect-all</property>
+ </object>
+ <object class="GtkImage" id="image10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-find</property>
+ </object>
+ <object class="GtkImage" id="image11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-stop</property>
+ </object>
+ <object class="GtkDialog" id="mbDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Music Brainz Search</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">1</property>
+ <child>
+ <object class="GtkNotebook" id="notebook1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">2</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Search:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="cbAutomaticSearch">
+ <property name="width_request">240</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">4</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnAutomaticFind">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image8</property>
+ <property name="image_position">top</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnAutomaticStop">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image9</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Automatic Search in MusicBrainz
Database</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Automatic Search</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0.0099999997764825821</property>
+ <property name="label" translatable="yes">Manually Search MusicBrainz
Database</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">3</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Search:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="cbManualSearch">
+ <property name="width_request">240</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">4</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Through:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="cbManualSearchIn">
+ <property name="width_request">120</property>
+ <property name="height_request">26</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnManualFind">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">findimage</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnManualStop">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">stopimage</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Manual Search</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox" id="box6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"> Scan Selected Files from MusicBrainz
Database based on their album:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnSelectedFind">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image10</property>
+ <property name="image_position">right</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnSelectedStop">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image11</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">4</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">1</property>
+ <property name="label" translatable="yes">Scan Selected Files</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">1</property>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">3</property>
+ <child>
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0.019999999552965164</property>
+ <property name="label" translatable="yes"> Insert Disc into Disc Drive to search
into MusicBrainz Data Base with DiscID: </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnDiscFind">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image12</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="btnDiscStop">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image13</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">4</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Disc Lookup</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">1</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="width_request">555</property>
+ <property name="height_request">216</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="width_request">551</property>
+ <property name="height_request">193</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="centralBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">3</property>
+ <child>
+ <object class="GtkToolbar" id="toolbar1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkToolItem" id="toolbutton1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Search:</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolItem" id="toolbutton2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkComboBoxText" id="comboboxtext1">
+ <property name="width_request">131</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="toolbtnUp">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">toolbutton3</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-go-up</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="toolbutton3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">toolbutton3</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-go-down</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparatorToolItem" id="toolbutton4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="toolbutton5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">toolbutton5</property>
+ <property name="use_underline">True</property>
+ <property name="icon_widget">img_invert_selection</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="toolbutton6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">toolbutton6</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-select-all</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="toolbutton7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">toolbutton7</property>
+ <property name="use_underline">True</property>
+ <property name="icon_widget">img_unselect_all</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="toolbutton8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">toolbutton8</property>
+ <property name="use_underline">True</property>
+ <property name="icon_widget">img_red_lines</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="toolbutton9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">toolbutton9</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-refresh</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Results:</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox" id="box10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <object class="GtkButton" id="button9">
+ <property name="label" translatable="yes">Close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button10">
+ <property name="label" translatable="yes">Apply Tag Changes</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkStatusbar" id="statusbar1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkImage" id="stopimage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-stop</property>
+ </object>
+ <object class="GtkTreeStore" id="treestore1">
+ <columns>
+ <!-- column-name Entities -->
+ <column type="guchar"/>
+ </columns>
+ </object>
+</interface>
diff --git a/data/org.gnome.EasyTAG.gresource.xml b/data/org.gnome.EasyTAG.gresource.xml
new file mode 100644
index 0000000..35cc6b2
--- /dev/null
+++ b/data/org.gnome.EasyTAG.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix='/org/gnome/EasyTAG'>
+ <file preprocess='xml-stripblanks'>musicbrainz_dialog.ui</file>
+ </gresource>
+</gresources>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 90110cd..4692f48 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,6 @@
data/easytag.appdata.xml.in
data/easytag.desktop.in
+[type: gettext/glade]data/musicbrainz_dialog.ui
src/about.c
src/ape_tag.c
src/application.c
diff --git a/src/bar.c b/src/bar.c
index 17a6a30..719ba7d 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -36,6 +36,7 @@
#include "charset.h"
#include "ui_manager.h"
#include "gtk2_compat.h"
+#include "musicbrainz_dialog.h"
/***************
* Declaration *
@@ -285,8 +286,8 @@ void Create_UI (GtkWidget **ppmenubar, GtkWidget **pptoolbar)
{ AM_SEARCH_FILE, GTK_STOCK_FIND, _("_Find…"), "<Primary>F",
_("Search filenames and tags"),
G_CALLBACK (Open_Search_File_Window) },
- { AM_CDDB_SEARCH, GTK_STOCK_CDROM, _("CDD_B Search…"), "<Primary>B",
- _("CDDB search"), G_CALLBACK (Open_Cddb_Window) },
+ { AM_MB_SEARCH, GTK_STOCK_CDROM, _("MusicBrainz_ Search…"), "<Primary>B",
+ _("MusicBrainz search"), G_CALLBACK (et_open_musicbrainz_dialog) },
{ AM_FILENAME_FROM_TXT, GTK_STOCK_OPEN,
_("Load Filenames From a Text File…"), "<Primary>T",
_("Load filenames from a text file"),
@@ -328,7 +329,7 @@ void Create_UI (GtkWidget **ppmenubar, GtkWidget **pptoolbar)
{ POPUP_DIR_RUN_AUDIO, GTK_STOCK_MEDIA_PLAY, _("Run Audio Player"), NULL, _("Run
audio player"), G_CALLBACK(Run_Audio_Player_Using_Directory) },
{ AM_ARTIST_RUN_AUDIO_PLAYER, GTK_STOCK_MEDIA_PLAY, _("Run Audio Player"), NULL, _("Run
audio player"), G_CALLBACK(Run_Audio_Player_Using_Browser_Artist_List) },
{ AM_ALBUM_RUN_AUDIO_PLAYER, GTK_STOCK_MEDIA_PLAY, _("Run Audio Player"), NULL, _("Run
audio player"), G_CALLBACK(Run_Audio_Player_Using_Browser_Album_List) },
- { AM_CDDB_SEARCH_FILE, GTK_STOCK_CDROM, _("CDDB Search Files…"), NULL, _("CDDB search
files…"), G_CALLBACK(Cddb_Popup_Menu_Search_Selected_File) },
+ { AM_MB_SEARCH_FILE, GTK_STOCK_CDROM, _("MusicBrainz Search Files…"), NULL,
_("MusicBrainz search files…"), G_CALLBACK(Cddb_Popup_Menu_Search_Selected_File) },
//{ AM_ARTIST_OPEN_FILE_WITH, GTK_STOCK_OPEN, _("Open File(s) with…"), NULL, _("Open
File(s) with…"), G_CALLBACK(Browser_Open_Run_Program_List_Window???
Browser_Open_Run_Program_Tree_Window???) },
//{ AM_ALBUM_OPEN_FILE_WITH, GTK_STOCK_OPEN, _("Open File(s) with…"), NULL, _("Open
File(s) with…"), G_CALLBACK(Browser_Open_Run_Program_List_Window???
Browser_Open_Run_Program_Tree_Window???) },
diff --git a/src/bar.h b/src/bar.h
index 904eded..cbfca35 100644
--- a/src/bar.h
+++ b/src/bar.h
@@ -94,8 +94,8 @@ GtkWidget *CheckMenuItemBrowseHiddenDirMainMenu;
#define AM_SCANNER_PROCESS_FIELDS "ProcessFields"
#define AM_SCANNER_SHOW "ShowScanner"
#define AM_SEARCH_FILE "SearchFile"
-#define AM_CDDB_SEARCH_FILE "CDDBSearchFile"
-#define AM_CDDB_SEARCH "CDDBSearch"
+#define AM_MB_SEARCH_FILE "MBSearchFile"
+#define AM_MB_SEARCH "MBSearch"
#define AM_FILENAME_FROM_TXT "LoadFilenames"
#define AM_WRITE_PLAYLIST "WritePlaylist"
#define AM_RUN_AUDIO_PLAYER "RunAudio"
diff --git a/src/mbentityview.c b/src/mbentityview.c
new file mode 100644
index 0000000..f792a00
--- /dev/null
+++ b/src/mbentityview.c
@@ -0,0 +1,142 @@
+/* mbentityview.c - 2014/05/05 */
+/*
+ * EasyTAG - Tag editor for MP3 and Ogg Vorbis files
+ * Copyright (C) 2000-2014 Abhinav Jangda <abhijangda hotmail com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "mbentityview.h"
+
+#define ET_MB_ENTITY_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+ ET_MB_ENTITY_VIEW_TYPE, \
+ EtMbEntityViewPrivate))
+
+/***************
+ * Declaration *
+ ***************/
+
+/*
+ * EtMbEntityViewPrivate:
+ * @breadCrumbBox: GtkToolbar which represents the BreadCrumbWidget
+ * @treeView: GtkTreeView to display the recieved music brainz data
+ * @listStore: GtkListStore for treeView
+ * @scrolledWindow: GtkScrolledWindow for treeView
+ *
+ * Private data for EtMbEntityView.
+ */
+typedef struct
+{
+ GtkWidget *breadCrumbBox;
+ GtkWidget *treeView;
+ GtkListStore *listStore;
+ GtkWidget *scrolledWindow;
+} EtMbEntityViewPrivate;
+
+/**************
+ * Prototypes *
+ **************/
+
+static void
+et_mb_entity_view_class_init (EtMbEntityViewClass *klass);
+
+static void
+et_mb_entity_view_init (EtMbEntityView *proj_notebook);
+
+/*************
+ * Functions *
+ *************/
+
+/*
+ * et_mb_entity_view_get_type
+ *
+ * Returns: A GType, type of EtMbEntityView.
+ */
+GType
+et_mb_entity_view_get_type (void)
+{
+ static GType et_mb_entity_view_type = 0;
+
+ if (!et_mb_entity_view_type)
+ {
+ static const GTypeInfo et_mb_entity_view_type_info =
+ {
+ sizeof (EtMbEntityViewClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) et_mb_entity_view_class_init,
+ NULL,
+ NULL,
+ sizeof (EtMbEntityView),
+ 0,
+ (GInstanceInitFunc) et_mb_entity_view_init,
+ };
+ et_mb_entity_view_type = g_type_register_static (GTK_TYPE_BOX,
+ "EtMbEntityView",
+ &et_mb_entity_view_type_info,
+ 0);
+ }
+ return et_mb_entity_view_type;
+}
+
+/*
+ * et_mb_entity_view_class_init:
+ * klass: EtMbEntityViewClass to initialize.
+ *
+ * Initializes an EtMbEntityViewClass class.
+ */
+static void
+et_mb_entity_view_class_init (EtMbEntityViewClass *klass)
+{
+ g_type_class_add_private (klass, sizeof (EtMbEntityViewPrivate));
+}
+
+/*
+ * et_mb_entity_view_init:
+ * @entity_view: EtMbEntityView to initialize.
+ *
+ * Initializes an EtMbEntityView.
+ */
+static void
+et_mb_entity_view_init (EtMbEntityView *entity_view)
+{
+ EtMbEntityViewPrivate *priv = ET_MB_ENTITY_VIEW_GET_PRIVATE (entity_view);
+
+ /* Adding child widgets */
+ priv->breadCrumbBox = gtk_toolbar_new ();
+ priv->listStore = gtk_list_store_new (0);
+ priv->treeView = gtk_tree_view_new_with_model (GTK_TREE_MODEL (priv->listStore));
+ priv->scrolledWindow = gtk_scrolled_window_new (NULL, NULL);
+ gtk_container_add (GTK_CONTAINER (priv->scrolledWindow), priv->treeView);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolledWindow),
+ GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
+ gtk_box_pack_start (GTK_BOX (entity_view), priv->breadCrumbBox,
+ FALSE, FALSE, 2);
+ gtk_box_pack_start (GTK_BOX (entity_view), priv->scrolledWindow,
+ TRUE, TRUE, 2);
+}
+
+/*
+ * et_mb_entity_view_new:
+ *
+ * Creates a new EtMbEntityView.
+ *
+ * Returns: GtkWidget, a new EtMbEntityView.
+ */
+GtkWidget *
+et_mb_entity_view_new ()
+{
+ return GTK_WIDGET (g_object_new (et_mb_entity_view_get_type (), NULL));
+}
\ No newline at end of file
diff --git a/src/mbentityview.h b/src/mbentityview.h
new file mode 100644
index 0000000..7eb5f9d
--- /dev/null
+++ b/src/mbentityview.h
@@ -0,0 +1,76 @@
+/* mbentityview.h - 2014/05/05 */
+/*
+ * EasyTAG - Tag editor for MP3 and Ogg Vorbis files
+ * Copyright (C) 2000-2014 Abhinav Jangda <abhijangda hotmail com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __MB_ENTITY_VIEW_H__
+#define __MB_ENTITY_VIEW_H__
+
+#include <gtk/gtk.h>
+
+#define ET_MB_ENTITY_VIEW_TYPE (et_mb_entity_view_get_type ())
+#define ET_MB_ENTITY_VIEW (obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ ET_MB_ENTITY_VIEW_TYPE, \
+ EtMbEntityView))
+
+#define ET_MB_ENTITY_VIEW_CLASS (klass) (G_TYPE_CHECK_INSTANCE_CAST ((klass), \
+ ET_MB_ENTITY_VIEW_TYPE, \
+ EtMbEntityView))
+
+#define IS_ET_MB_ENTITY_VIEW (obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+ ET_MB_ENTITY_VIEW_TYPE))
+
+#define IS_ET_MB_ENTITY_VIEW_CLASS (klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+ ET_MB_ENTITY_VIEW_TYPE))
+
+/***************
+ * Declaration *
+ ***************/
+
+/*
+ * EtMbEntityView:
+ * @vbox: GtkBox, parent class of EtMbEntityView
+ *
+ * This widget is used to show data recieved from music brainz and helps to
+ * navigate in it using breadcrumb widget.
+ */
+typedef struct
+{
+ GtkBox vbox;
+} EtMbEntityView;
+
+/*
+ * EtMbEntityViewClass:
+ * @parent: GtkBoxClass, parent class of EtMbEntityViewClass
+ *
+ * Class of EtMbEntityView.
+ */
+typedef struct
+{
+ GtkBoxClass parent;
+} EtMbEntityViewClass;
+
+/**************
+ * Prototypes *
+ **************/
+
+GType
+et_mb_entity_view_get_type (void) G_GNUC_CONST;
+GtkWidget *
+et_mb_entity_view_new (void);
+#endif /* __MB_ENTITY_VIEW_H__ */
\ No newline at end of file
diff --git a/src/musicbrainz_dialog.c b/src/musicbrainz_dialog.c
new file mode 100644
index 0000000..1667b51
--- /dev/null
+++ b/src/musicbrainz_dialog.c
@@ -0,0 +1,81 @@
+/* musicbrainz_dialog.c - 2014/05/05 */
+/*
+ * EasyTAG - Tag editor for MP3 and Ogg Vorbis files
+ * Copyright (C) 2000-2014 Abhinav Jangda <abhijangda hotmail com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <glib/gi18n.h>
+
+#include "gtk2_compat.h"
+#include "cddb.h"
+#include "easytag.h"
+#include "et_core.h"
+#include "browser.h"
+#include "scan_dialog.h"
+#include "log.h"
+#include "misc.h"
+#include "setting.h"
+#include "id3_tag.h"
+#include "setting.h"
+#include "charset.h"
+#include "musicbrainz_dialog.h"
+#include "mbentityview.h"
+
+/***************
+ * Declaration *
+ ***************/
+
+static GtkBuilder *builder;
+static GtkWidget *mbDialog;
+static GtkWidget *entityView;
+
+/*************
+ * Functions *
+ *************/
+
+/*
+ * et_open_musicbrainz_dialog:
+ *
+ * This function will open the musicbrainz dialog.
+ */
+void
+et_open_musicbrainz_dialog ()
+{
+ entityView = et_mb_entity_view_new ();
+ builder = gtk_builder_new ();
+ /* TODO: Check the error. */
+ gtk_builder_add_from_resource (builder,
+ "/org/gnome/EasyTAG/musicbrainz_dialog.ui",
+ NULL);
+
+ mbDialog = GTK_WIDGET (gtk_builder_get_object (builder, "mbDialog"));
+
+ gtk_box_pack_start (GTK_BOX (gtk_builder_get_object (builder, "centralBox")),
+ entityView, TRUE, TRUE, 2);
+ /* FIXME: This should not be needed. */
+ gtk_box_reorder_child (GTK_BOX (gtk_builder_get_object (builder, "centralBox")),
+ entityView, 0);
+
+ gtk_widget_show_all (mbDialog);
+ gtk_dialog_run (GTK_DIALOG (mbDialog));
+ gtk_widget_destroy (mbDialog);
+ g_object_unref (G_OBJECT (builder));
+}
diff --git a/src/musicbrainz_dialog.h b/src/musicbrainz_dialog.h
new file mode 100644
index 0000000..32e5cad
--- /dev/null
+++ b/src/musicbrainz_dialog.h
@@ -0,0 +1,31 @@
+/* musicbrainz_dialog.h - 2014/05/05 */
+/*
+ * EasyTAG - Tag editor for MP3 and Ogg Vorbis files
+ * Copyright (C) 2000-2014 Abhinav Jangda <abhijangda hotmail com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __MUSICBRAINZ_DIALOG_H__
+#define __MUSICBRAINZ_DIALOG_H__
+
+/**************
+ * Prototypes *
+ **************/
+
+void
+et_open_musicbrainz_dialog (void);
+
+#endif /* __MUSICBRAINZ_DIALOG_H__ */
diff --git a/src/ui_manager.h b/src/ui_manager.h
index c3d5454..a976ffe 100644
--- a/src/ui_manager.h
+++ b/src/ui_manager.h
@@ -153,7 +153,7 @@ static const gchar *ui_xml =
" </menu>"
" <menu action='MiscMenu'>"
-" <menuitem action='CDDBSearch' />"
+" <menuitem action='MBSearch' />"
" <separator />"
" <menuitem action='LoadFilenames' />"
@@ -211,7 +211,7 @@ static const gchar *ui_xml =
" <separator />"
" <toolitem action='SearchFile' />"
-" <toolitem action='CDDBSearch' />"
+" <toolitem action='MBSearch' />"
" <toolitem action='WritePlaylist' />"
" <separator />"
@@ -233,7 +233,7 @@ static const gchar *ui_xml =
" <menu action='ScannerSubpopup'>"
" <menuitem action='ShowScanner' />"
" </menu>"
-" <menuitem action='CDDBSearchFile' />"
+" <menuitem action='MBSearchFile' />"
" <menuitem action='SearchFile' />"
" <menuitem action='DeleteFile' />"
" <menuitem action='ReloadDir' />"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]