Skip to content

Commit

Permalink
0.4.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2k3 committed Feb 4, 2020
1 parent 2c8396e commit 2a7b05d
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 148 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.4.3.2
- Drop support for `Windows XP`/`Windows Vista`. `Windows 7` is the new minimum requirement.
- The main tagger dialog now prevents editing of items that are disabled in the `Preferences`.
- Revert all `ORIGINAL RELEASE DATE` `Preference` changes that were made in `0.4.3` and `0.4.3.1`. It now gets written exactly as it did before - only when it differs from `DATE`.

## 0.4.2
- Ensure `Custom server` is respected everywhere, not just for the main lookup.
- Improve error message display when server is unavailable.
Expand Down
42 changes: 0 additions & 42 deletions ORIGINAL README.md

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## foo_musicbrainz

[![Build Status](https://dev.azure.com/marc2k3/fb2k/_apis/build/status/marc2k3.foo_musicbrainz?branchName=master)](https://dev.azure.com/marc2k3/fb2k/_build/latest?definitionId=6&branchName=master) [![Licenses](https://img.shields.io/badge/license-MIT-brightgreen)](component/licenses)

https://marc2k3.github.io/foo_musicbrainz.html
30 changes: 19 additions & 11 deletions src/dialog_tagger.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ namespace mb
{ IDC_EDIT_ALBUM, 1, 0, 1, 0 },
{ IDC_LABEL_DATE, 1, 0, 1, 0 },
{ IDC_EDIT_DATE, 1, 0, 1, 0 },
{ IDC_LABEL_FIRST_RELEASE_DATE, 1, 0, 1, 0 },
{ IDC_EDIT_FIRST_RELEASE_DATE, 1, 0, 1, 0 },
{ IDC_LABEL_ORIGINAL_RELEASE_DATE, 1, 0, 1, 0 },
{ IDC_EDIT_ORIGINAL_RELEASE_DATE, 1, 0, 1, 0 },
{ IDC_LABEL_LABEL, 1, 0, 1, 0 },
{ IDC_EDIT_LABEL, 1, 0, 1, 0 },
{ IDC_LABEL_CATALOG, 1, 0, 1, 0 },
Expand Down Expand Up @@ -64,7 +64,7 @@ namespace mb
COMMAND_HANDLER_EX(IDC_EDIT_ARTIST, EN_UPDATE, OnArtistUpdate)
COMMAND_HANDLER_EX(IDC_EDIT_ALBUM, EN_UPDATE, OnAlbumUpdate)
COMMAND_HANDLER_EX(IDC_EDIT_DATE, EN_UPDATE, OnDateUpdate)
COMMAND_HANDLER_EX(IDC_EDIT_FIRST_RELEASE_DATE, EN_UPDATE, OnFirstDateUpdate)
COMMAND_HANDLER_EX(IDC_EDIT_ORIGINAL_RELEASE_DATE, EN_UPDATE, OnOriginalDateUpdate)
COMMAND_HANDLER_EX(IDC_EDIT_LABEL, EN_UPDATE, OnLabelUpdate)
COMMAND_HANDLER_EX(IDC_EDIT_CATALOG, EN_UPDATE, OnCatalogUpdate)
COMMAND_HANDLER_EX(IDC_EDIT_BARCODE, EN_UPDATE, OnBarcodeUpdate)
Expand All @@ -78,7 +78,7 @@ namespace mb
release_column,
date_column,
label_column,
format_column,
media_column,
discs_column
};

Expand Down Expand Up @@ -107,7 +107,7 @@ namespace mb
album_artist_edit = GetDlgItem(IDC_EDIT_ARTIST);
album_edit = GetDlgItem(IDC_EDIT_ALBUM);
date_edit = GetDlgItem(IDC_EDIT_DATE);
first_release_date_edit = GetDlgItem(IDC_EDIT_FIRST_RELEASE_DATE);
original_release_date_edit = GetDlgItem(IDC_EDIT_ORIGINAL_RELEASE_DATE);
label_edit = GetDlgItem(IDC_EDIT_LABEL);
catalog_edit = GetDlgItem(IDC_EDIT_CATALOG);
barcode_edit = GetDlgItem(IDC_EDIT_BARCODE);
Expand All @@ -121,7 +121,7 @@ namespace mb
release_list.AddColumnAutoWidth("Release");
release_list.AddColumn("Date/Country", MulDiv(100, DPI.cx, 96));
release_list.AddColumnAutoWidth("Label/Cat#");
release_list.AddColumn("Format", MulDiv(120, DPI.cx, 96));
release_list.AddColumn("Media", MulDiv(120, DPI.cx, 96));
release_list.AddColumn("Discs", MulDiv(40, DPI.cx, 96));

// Add release list rows
Expand All @@ -132,7 +132,7 @@ namespace mb
release_list.SetItemText(i, release_column, m_release_list[i].title);
release_list.SetItemText(i, date_column, slasher(m_release_list[i].date, m_release_list[i].country));
release_list.SetItemText(i, label_column, slasher(m_release_list[i].label, m_release_list[i].catalog));
release_list.SetItemText(i, format_column, format_thingy(m_release_list[i].tracks));
release_list.SetItemText(i, media_column, media_thingy(m_release_list[i].tracks));
release_list.SetItemText(i, discs_column, std::to_string(m_release_list[i].tracks[0].totaldiscs).c_str());
}

Expand All @@ -155,6 +155,14 @@ namespace mb

UpdateRelease();

// Don't allow editing if disabled in Preferences
const bool label_enabled = prefs::check::write_label_info.get_value();
label_edit.EnableWindow(label_enabled);
catalog_edit.EnableWindow(label_enabled);
barcode_edit.EnableWindow(label_enabled);
type_combo.EnableWindow(prefs::check::write_albumtype.get_value());
status_combo.EnableWindow(prefs::check::write_albumstatus.get_value());

ShowWindow(SW_SHOW);
return TRUE;
}
Expand Down Expand Up @@ -210,9 +218,9 @@ namespace mb
UpdateDisc();
}

void OnFirstDateUpdate(UINT, int, CWindow)
void OnOriginalDateUpdate(UINT, int, CWindow)
{
uGetWindowText(first_release_date_edit, m_release_list[current_release].first_release_date);
uGetWindowText(original_release_date_edit, m_release_list[current_release].original_release_date);
}

void OnLabelUpdate(UINT, int, CWindow)
Expand Down Expand Up @@ -251,7 +259,7 @@ namespace mb
uSetWindowText(album_artist_edit, m_release_list[current_release].album_artist);
uSetWindowText(album_edit, m_release_list[current_release].title);
uSetWindowText(date_edit, m_release_list[current_release].date);
uSetWindowText(first_release_date_edit, m_release_list[current_release].first_release_date);
uSetWindowText(original_release_date_edit, m_release_list[current_release].original_release_date);
uSetWindowText(label_edit, m_release_list[current_release].label);
uSetWindowText(catalog_edit, m_release_list[current_release].catalog);
uSetWindowText(barcode_edit, m_release_list[current_release].barcode);
Expand Down Expand Up @@ -378,7 +386,7 @@ namespace mb
CEdit album_artist_edit;
CEdit album_edit;
CEdit date_edit;
CEdit first_release_date_edit;
CEdit original_release_date_edit;
CEdit label_edit;
CEdit catalog_edit;
CEdit barcode_edit;
Expand Down
2 changes: 1 addition & 1 deletion src/foo_musicbrainz.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ namespace mb
{
static constexpr const char* component_title = "MusicBrainz Tagger";
static constexpr const char* component_dll_name = "foo_musicbrainz.dll";
static constexpr const char* component_version = "0.4.2";
static constexpr const char* component_version = "0.4.3.2";
static constexpr const char* component_info = "Copyright (C) 2009-2012 Dremora\nCopyright (C) 2015-2020 marc2003\n\nBuild: " __TIME__ ", " __DATE__;
}
88 changes: 44 additions & 44 deletions src/foo_musicbrainz.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "windows.h"
#include <windows.h>

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
Expand All @@ -32,7 +32,7 @@ END

2 TEXTINCLUDE
BEGIN
"#include ""windows.h""\r\n"
"#include <windows.h>\r\n"
"\0"
END

Expand All @@ -49,31 +49,31 @@ END
// Dialog
//

IDD_PREFERENCES DIALOGEX 0, 0, 274, 183
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x0
IDD_PREFERENCES DIALOGEX 0, 0, 332, 288
STYLE DS_SETFONT | WS_CHILD
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
AUTOCHECKBOX "Custom server:", IDC_CHECK_SERVER, 7, 7, 85, 10
EDITTEXT IDC_EDIT_SERVER, 122, 5, 133, 14, ES_AUTOHSCROLL | WS_DISABLED
AUTOCHECKBOX "Use year instead of full date", IDC_CHECK_SHORT_DATE, 7, 22, 107, 10
AUTOCHECKBOX "Convert Unicode punctuation characters to ASCII", IDC_CHECK_ASCII_PUNCTUATION, 7, 37, 175, 10
AUTOCHECKBOX "Write MusicBrainz IDs", IDC_CHECK_WRITE_IDS, 7, 52, 85, 10
AUTOCHECKBOX "Write Album Type, use field:", IDC_CHECK_ALBUMTYPE, 7, 67, 107, 10
EDITTEXT IDC_EDIT_ALBUMTYPE, 122, 65, 133, 14, ES_UPPERCASE | ES_AUTOHSCROLL | WS_DISABLED
AUTOCHECKBOX "Write Album Status, use field:", IDC_CHECK_ALBUMSTATUS, 7, 83, 111, 10
EDITTEXT IDC_EDIT_ALBUMSTATUS, 122, 81, 133, 14, ES_UPPERCASE | ES_AUTOHSCROLL | WS_DISABLED
AUTOCHECKBOX "Write label, catalog number and barcode", IDC_CHECK_WRITE_LABEL_INFO, 7, 99, 146, 10
AUTOCHECKBOX "Write release country", IDC_CHECK_WRITE_COUNTRY, 7, 115, 146, 10
AUTOCHECKBOX "Write format", IDC_CHECK_WRITE_FORMAT, 7, 131, 146, 10
AUTOCHECKBOX "Write ASIN", IDC_CHECK_WRITE_ASIN, 7, 147, 146, 10
AUTOCHECKBOX "Write ISRC", IDC_CHECK_WRITE_ISRC, 7, 163, 146, 10
AUTOCHECKBOX "Always write 'Album Artist'", IDC_CHECK_WRITE_ALBUMARTIST, 7, 179, 146, 10
AUTOCHECKBOX "Custom server:", IDC_CHECK_SERVER, 7, 7, 120, 10
EDITTEXT IDC_EDIT_SERVER, 130, 5, 133, 14, ES_AUTOHSCROLL | WS_DISABLED
AUTOCHECKBOX "Use year instead of full date (applies to DATE only, not ORIGINAL RELEASE DATE)", IDC_CHECK_SHORT_DATE, 7, 22, 290, 10
AUTOCHECKBOX "Convert Unicode punctuation characters to ASCII", IDC_CHECK_ASCII_PUNCTUATION, 7, 37, 200, 10
AUTOCHECKBOX "Write MusicBrainz IDs", IDC_CHECK_WRITE_IDS, 7, 52, 200, 10
AUTOCHECKBOX "Write Album Type, use field:", IDC_CHECK_WRITE_ALBUMTYPE, 7, 67, 120, 10
EDITTEXT IDC_EDIT_ALBUMTYPE, 130, 65, 133, 14, ES_UPPERCASE | ES_AUTOHSCROLL | WS_DISABLED
AUTOCHECKBOX "Write Album Status, use field:", IDC_CHECK_WRITE_ALBUMSTATUS, 7, 83, 120, 10
EDITTEXT IDC_EDIT_ALBUMSTATUS, 130, 81, 133, 14, ES_UPPERCASE | ES_AUTOHSCROLL | WS_DISABLED
AUTOCHECKBOX "Write LABEL, CATALOGNUMBER and BARCODE", IDC_CHECK_WRITE_LABEL_INFO, 7, 99, 200, 10
AUTOCHECKBOX "Write RELEASECOUNTRY", IDC_CHECK_WRITE_COUNTRY, 7, 115, 200, 10
AUTOCHECKBOX "Write MEDIA", IDC_CHECK_WRITE_MEDIA, 7, 131, 200, 10
AUTOCHECKBOX "Write ASIN", IDC_CHECK_WRITE_ASIN, 7, 147, 200, 10
AUTOCHECKBOX "Write ISRC", IDC_CHECK_WRITE_ISRC, 7, 163, 200, 10
AUTOCHECKBOX "Always write ALBUM ARTIST", IDC_CHECK_WRITE_ALBUMARTIST, 7, 179, 200, 10
END

IDD_SEARCH DIALOGEX 0, 0, 185, 65
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Query MusicBrainz by Artist/Album"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
LTEXT "Artist", IDC_STATIC, 12, 10, 18, 8
EDITTEXT IDC_EDIT_ARTIST, 35, 7, 143, 14, ES_AUTOHSCROLL
Expand All @@ -86,7 +86,7 @@ END
IDD_ALBUMID DIALOGEX 0, 0, 185, 68
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Query MusicBrainz by MBID"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
GROUPBOX "MusicBrainz Album ID", IDC_STATIC, 7, 7, 171, 34
EDITTEXT IDC_EDIT_MBID, 14, 19, 156, 14, ES_AUTOHSCROLL
Expand All @@ -95,33 +95,33 @@ BEGIN
END

IDD_TAGGER DIALOGEX 0, 0, 660, 425
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
STYLE DS_SETFONT | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "MusicBrainz Tagger"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
CONTROL "", IDC_LIST_RELEASE, "SysListView32", LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP, 14, 20, 413, 136
CONTROL "", IDC_LIST_TRACK, "SysListView32", LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP, 14, 195, 632, 202

LTEXT "Artist", IDC_LABEL_ARTIST, 450, 22, 65, 8
LTEXT "Album", IDC_LABEL_ALBUM, 450, 37, 65, 8
LTEXT "Date", IDC_LABEL_DATE, 450, 52, 65, 8
LTEXT "First release date", IDC_LABEL_FIRST_RELEASE_DATE, 450, 67, 65, 8
LTEXT "Label", IDC_LABEL_LABEL, 450, 82, 65, 8
LTEXT "Catalog", IDC_LABEL_CATALOG, 450, 97, 65, 8
LTEXT "Barcode", IDC_LABEL_BARCODE, 450, 112, 65, 8
LTEXT "Type", IDC_LABEL_TYPE, 450, 127, 65, 8
LTEXT "Status", IDC_LABEL_STATUS, 450, 142, 65, 8

EDITTEXT IDC_EDIT_ARTIST, 520, 21, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_ALBUM, 520, 36, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_DATE, 520, 51, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FIRST_RELEASE_DATE, 520, 66, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_LABEL, 520, 81, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_CATALOG, 520, 96, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_BARCODE, 520, 111, 120, 12, ES_AUTOHSCROLL

COMBOBOX IDC_COMBO_TYPE, 520 126, 120, 12, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO_STATUS, 520, 141, 120, 12, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Artist", IDC_LABEL_ARTIST, 450, 22, 75, 8
LTEXT "Album", IDC_LABEL_ALBUM, 450, 37, 75, 8
LTEXT "Date", IDC_LABEL_DATE, 450, 52, 75, 8
LTEXT "Original release date", IDC_LABEL_ORIGINAL_RELEASE_DATE, 450, 67, 75, 8
LTEXT "Label", IDC_LABEL_LABEL, 450, 82, 75, 8
LTEXT "Catalog", IDC_LABEL_CATALOG, 450, 97, 75, 8
LTEXT "Barcode", IDC_LABEL_BARCODE, 450, 112, 75, 8
LTEXT "Type", IDC_LABEL_TYPE, 450, 127, 75, 8
LTEXT "Status", IDC_LABEL_STATUS, 450, 142, 75, 8

EDITTEXT IDC_EDIT_ARTIST, 525, 21, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_ALBUM, 525, 36, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_DATE, 525, 51, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_ORIGINAL_RELEASE_DATE, 525, 66, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_LABEL, 525, 81, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_CATALOG, 525, 96, 120, 12, ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_BARCODE, 525, 111, 120, 12, ES_AUTOHSCROLL

COMBOBOX IDC_COMBO_TYPE, 525 126, 120, 12, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO_STATUS, 525, 141, 120, 12, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO_DISC, 14, 176, 120, 12, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP

CONTROL "Link", IDC_LINK_URL, "SysLink", WS_TABSTOP, 14, 407, 171, 8
Expand Down
Loading

0 comments on commit 2a7b05d

Please sign in to comment.