• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

L3 Disk Explorer is an application in order to access to files in a floppy disk image for retro computer and operating system.


Commit MetaInfo

Revision0c45a39c48b7baca9d95f2f2a40e53b6d121834d (tree)
Time2022-04-21 19:39:17
AuthorSasaji <sasaji@s-sa...>
CommiterSasaji

Log Message

Version 0.1.1 Release

Change Summary

Incremental Difference

--- a/Makefile.macosx
+++ b/Makefile.macosx
@@ -3,7 +3,7 @@
33 #
44 CC=g++
55
6-APPLICATION_VERSION=0.1.0
6+APPLICATION_VERSION=0.1.1
77
88 CDEFS=
99 DBG_CDEFS=-D_DEBUG -D_DEBUG_LOG
--- a/docs/ChangeLog.txt
+++ b/docs/ChangeLog.txt
@@ -2,6 +2,11 @@
22 更新履歴
33 ==============================================================================
44
5+2016-01-27 Version 0.1.1
6+・単密度のディスクイメージから倍密度へドラッグ&ドロップすると拡張子が不明に
7+ なることがある不具合を修正。
8+・ファイル追加する際、ディレクトリエントリを初期化していなかった不具合を修正。
9+
510 2015-11-21 Version 0.1.0
611 ・新規作成。
712
--- a/docs/Readme.txt
+++ b/docs/Readme.txt
@@ -1,9 +1,9 @@
11 ==============================================================================
22 L3 Disk Explorer
3- Version 0.1
4- 2015/11/21
3+ Version 0.1.1
4+ 2016/01/27
55
6- Copyright(C) Sasaji 2015 All Rights Reserved.
6+ Copyright(C) Sasaji 2015-2016 All Rights Reserved.
77 ==============================================================================
88
99 ● はじめに
--- a/src/basicfmt.cpp
+++ b/src/basicfmt.cpp
@@ -588,6 +588,13 @@ void DiskBasicDirItem::SetFileNameAndAttr(const wxString &filename, int file_typ
588588 }
589589 }
590590
591+void DiskBasicDirItem::ClearFileNameAndAttr()
592+{
593+ if (data) {
594+ memset(data, 0, sizeof(directory_t));
595+ }
596+}
597+
591598 int DiskBasicDirItem::GetFileType()
592599 {
593600 return (data->type <= 2 ? data->type : 0);
@@ -694,7 +701,7 @@ bool DiskBasicDirItem::ConvFromNativeNameWithExtension(int format_type, int file
694701 gCharCodes.ConvToString(src, 8, dst);
695702 dst.Trim(true);
696703 if (format_type != 0) {
697- if (ext && ext[0] != 0x00 && ext[0] != 0x20) {
704+ if (ext && ext[0] != 0x00 && ext[0] != 0x20 && ext[0] != 0xff) {
698705 dst += wxT(".");
699706 gCharCodes.ConvToString(ext, 3, dst);
700707 dst.Trim(true);
@@ -1370,6 +1377,7 @@ bool DiskBasic::SaveFile(DiskBasicDirItem *item, wxInputStream *istream, const w
13701377 }
13711378
13721379 // ファイル名属性を設定
1380+ item->ClearFileNameAndAttr();
13731381 item->SetFileNameAndAttr(filename, file_type, data_type);
13741382
13751383 int sizeremain = (int)istream->GetLength();
--- a/src/basicfmt.h
+++ b/src/basicfmt.h
@@ -245,6 +245,7 @@ public:
245245
246246 void SetFileName(const wxString &filename);
247247 void SetFileNameAndAttr(const wxString &filename, int file_type, int data_type);
248+ void ClearFileNameAndAttr();
248249 int GetFileType();
249250 int GetDataType();
250251 wxString GetFileNameStr();
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -31,8 +31,8 @@ void Params::AddRecentFile(const wxString &val)
3131 // 追加
3232 mRecentFiles.Insert(fpath.GetFullPath(), 0);
3333 // 10を超える分は消す
34- if (mRecentFiles.Count() > 10) {
35- mRecentFiles.RemoveAt(10);
34+ if (mRecentFiles.Count() > MAX_RECENT_FILES) {
35+ mRecentFiles.RemoveAt(MAX_RECENT_FILES);
3636 }
3737 }
3838
@@ -70,7 +70,7 @@ void Config::Load()
7070 ,wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_RELATIVE_PATH | wxCONFIG_USE_NO_ESCAPE_CHARACTERS);
7171
7272 ini->Read(_T("Path"), &mFilePath, mFilePath);
73- for(size_t i=0; i<10; i++) {
73+ for(int i=0; i<MAX_RECENT_FILES; i++) {
7474 wxString sval;
7575 ini->Read(wxString::Format(_T("Recent%d"), i), &sval);
7676 if (!sval.IsEmpty()) {
@@ -95,7 +95,7 @@ void Config::Save()
9595 ,wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_RELATIVE_PATH | wxCONFIG_USE_NO_ESCAPE_CHARACTERS);
9696
9797 ini->Write(_T("Path"), mFilePath);
98- for(size_t i=0,row=0; row<10 && i<mRecentFiles.Count(); i++) {
98+ for(int i=0,row=0; row<MAX_RECENT_FILES && i<(int)mRecentFiles.Count(); i++) {
9999 wxString sval = mRecentFiles.Item(i);
100100 if (sval.IsEmpty()) continue;
101101 ini->Write(wxString::Format(_T("Recent%d"), row), sval);
--- a/src/config.h
+++ b/src/config.h
@@ -8,6 +8,8 @@
88 #include "common.h"
99 #include <wx/wx.h>
1010
11+#define MAX_RECENT_FILES 10
12+
1113 /// 設定ファイルパラメータ
1214 class Params
1315 {
--- a/src/uidisklist.cpp
+++ b/src/uidisklist.cpp
@@ -116,6 +116,9 @@ L3DiskList::L3DiskList(L3DiskFrame *parentframe, wxWindow *parentwindow)
116116 menuPopup->AppendSeparator();
117117 menuPopup->Append(IDM_PROPERTY_DISK, _("Disk &Information"));
118118
119+ // key
120+ Bind(wxEVT_CHAR, &L3DiskList::OnChar, this);
121+
119122 ClearFileName();
120123 }
121124
@@ -231,6 +234,19 @@ void L3DiskList::OnPropertyDisk(wxCommandEvent& event)
231234 ShowDiskAttr();
232235 }
233236
237+/// キー入力
238+void L3DiskList::OnChar(wxKeyEvent& event)
239+{
240+ switch(event.GetKeyCode()) {
241+ case WXK_RETURN:
242+ ShowDiskAttr();
243+ break;
244+ case WXK_DELETE:
245+ DeleteDisk();
246+ break;
247+ }
248+}
249+
234250 /// ポップアップメニュー表示
235251 void L3DiskList::ShowPopupMenu()
236252 {
--- a/src/uidisklist.h
+++ b/src/uidisklist.h
@@ -91,6 +91,8 @@ public:
9191 void OnFormatDisk(wxCommandEvent& event);
9292
9393 void OnPropertyDisk(wxCommandEvent& event);
94+
95+ void OnChar(wxKeyEvent& event);
9496 //@}
9597 /// @name functions
9698 //@{
--- a/src/uifilelist.cpp
+++ b/src/uifilelist.cpp
@@ -75,6 +75,7 @@ wxEND_EVENT_TABLE()
7575 L3DiskFileList::L3DiskFileList(L3DiskFrame *parentframe, wxWindow *parentwindow)
7676 : wxPanel(parentwindow, wxID_ANY, wxDefaultPosition, wxDefaultSize)
7777 {
78+ initialized = false;
7879 parent = parentwindow;
7980 frame = parentframe;
8081
@@ -122,6 +123,9 @@ L3DiskFileList::L3DiskFileList(L3DiskFrame *parentframe, wxWindow *parentwindow)
122123 menuPopup->AppendSeparator();
123124 menuPopup->Append(IDM_PROPERTY, _("&Property"));
124125
126+ // key
127+ list->Bind(wxEVT_CHAR, &L3DiskFileList::OnChar, this);
128+
125129 #if 0
126130 UINT fno = 0;
127131 char fname[257];
@@ -132,6 +136,8 @@ L3DiskFileList::L3DiskFileList(L3DiskFrame *parentframe, wxWindow *parentwindow)
132136 } while(fno != 0);
133137 ::CloseClipboard();
134138 #endif
139+
140+ initialized = true;
135141 }
136142
137143 L3DiskFileList::~L3DiskFileList()
@@ -152,6 +158,8 @@ void L3DiskFileList::OnSize(wxSizeEvent& event)
152158 /// 選択
153159 void L3DiskFileList::OnSelectionChanged(wxDataViewEvent& event)
154160 {
161+ if (!initialized) return;
162+
155163 if (GetSelectedRow() == wxNOT_FOUND) {
156164 // 非選択
157165 UnselectItem();
@@ -236,6 +244,19 @@ void L3DiskFileList::OnProperty(wxCommandEvent& event)
236244 ShowFileAttr();
237245 }
238246
247+/// キー押下
248+void L3DiskFileList::OnChar(wxKeyEvent& event)
249+{
250+ switch(event.GetKeyCode()) {
251+ case WXK_RETURN:
252+ ShowFileAttr();
253+ break;
254+ case WXK_DELETE:
255+ DeleteDataFile();
256+ break;
257+ }
258+}
259+
239260 /// ポップアップメニュー表示
240261 void L3DiskFileList::ShowPopupMenu()
241262 {
@@ -305,7 +326,7 @@ void L3DiskFileList::RefreshFiles()
305326 lval = dir->Item(i).GetGroupSize();
306327 data.push_back( lval >= 0 ? wxNumberFormatter::ToString(lval) : wxT("---") ); // 使用グループ数
307328 lval = dir->Item(i).GetStartGroup();
308- data.push_back( wxString::Format(wxT("%02x"), lval)); // 開始グループ
329+ data.push_back( wxString::Format(wxT("%02x"), (int)lval)); // 開始グループ
309330
310331 int track_num = -1;
311332 int side_num = -1;
--- a/src/uifilelist.h
+++ b/src/uifilelist.h
@@ -57,6 +57,8 @@ private:
5757 // BASICフォーマットの情報
5858 DiskBasic basic;
5959
60+ bool initialized;
61+
6062 int ShowIntNameBoxAndCheckSameFile(IntNameBox &dlg);
6163
6264 public:
@@ -77,6 +79,7 @@ public:
7779 void OnDeleteFile(wxCommandEvent& event);
7880 void OnRenameFile(wxCommandEvent& event);
7981 void OnProperty(wxCommandEvent& event);
82+ void OnChar(wxKeyEvent& event);
8083 //@}
8184
8285 void ShowPopupMenu();
--- a/src/uirawdisk.cpp
+++ b/src/uirawdisk.cpp
@@ -659,6 +659,7 @@ wxEND_EVENT_TABLE()
659659 L3DiskRawSector::L3DiskRawSector(L3DiskFrame *parentframe, L3DiskRawPanel *parentwindow)
660660 : wxDataViewListCtrl(parentwindow, wxID_ANY, wxDefaultPosition, wxDefaultSize)
661661 {
662+ initialized = false;
662663 parent = parentwindow;
663664 frame = parentframe;
664665
@@ -690,6 +691,8 @@ L3DiskRawSector::L3DiskRawSector(L3DiskFrame *parentframe, L3DiskRawPanel *paren
690691 menuPopup->Append(IDM_MODIFY_DENSITY_TRACK, _("Modify All Density On This Track"));
691692 menuPopup->AppendSeparator();
692693 menuPopup->Append(IDM_PROPERTY_SECTOR, _("&Property"));
694+
695+ initialized = true;
693696 }
694697
695698 L3DiskRawSector::~L3DiskRawSector()
@@ -701,6 +704,8 @@ L3DiskRawSector::~L3DiskRawSector()
701704 /// 選択
702705 void L3DiskRawSector::OnSelectionChanged(wxDataViewEvent& event)
703706 {
707+ if (!initialized) return;
708+
704709 if (GetSelectedRow() == wxNOT_FOUND || !track) {
705710 // 非選択
706711 UnselectItem();
--- a/src/uirawdisk.h
+++ b/src/uirawdisk.h
@@ -148,6 +148,8 @@ private:
148148
149149 wxDataViewItem selected_item;
150150
151+ bool initialized;
152+
151153 public:
152154 L3DiskRawSector(L3DiskFrame *parentframe, L3DiskRawPanel *parent);
153155 ~L3DiskRawSector();
--- a/src/version.h
+++ b/src/version.h
@@ -4,12 +4,12 @@
44 #ifndef _VERSION_H_
55 #define _VERSION_H_
66
7-#define APPLICATION_VERSION "0.1.0"
7+#define APPLICATION_VERSION "0.1.1"
88 #define APP_VER_MAJOR 0
99 #define APP_VER_MINOR 1
10-#define APP_VER_REV 0
10+#define APP_VER_REV 1
1111 #define APP_VER_BUILD 0
12-#define APP_COPYRIGHT "Copyright (C) 2015 Sasaji"
12+#define APP_COPYRIGHT "Copyright (C) 2015-2016 Sasaji"
1313
1414 #if defined(__MINGW32__)
1515 #ifdef x86_64