Git Product home page Git Product logo

Comments (6)

berryzplus avatar berryzplus commented on June 10, 2024 1

なんというか、既知のバグを報告しておきます。

既存のファイルダイアログには、上書き確認メッセージを表示するカスタムが施されているのですが、アイテムダイアログにはこれが移植されてないっぽいです。

if( IDYES != ::MessageBox( pData->m_hwndOpenDlg, szText, LS(STR_DLGOPNFL3), MB_YESNO | MB_ICONEXCLAMATION) ){

文字列リソース STR_DLGOPNFL3の定義が(おそらく)誤っており、新旧比較すると差になります。

誤: "名前を付けて保存"
正: "名前を付けて保存の確認"

これ直しても誰も嬉しくなさそうなので黙ってました。
アイテムダイアログに関しての説明では、「既存機能の一部が移植されていないかも」という話になると思います。

from sakura.

berryzplus avatar berryzplus commented on June 10, 2024

以下がcppで定義されているために、単体テストが記述不能である点が気になっています。

  • struct CDlgOpenFile_CommonFileDialog 旧来のOFNダイアログ実装。
  • struct CDlgOpenFile_CommonItemDialog Vista以降のアイテムダイアログ実装。

このプロジェクトで「エンジニアリングしたい民」はどうも自分だけのようなので、他の人が気にならないなら放置で良いと思っています。

from sakura.

beru avatar beru commented on June 10, 2024

以下がcppで定義されているために、単体テストが記述不能である点が気になっています。

  • struct CDlgOpenFile_CommonFileDialog 旧来のOFNダイアログ実装。
  • struct CDlgOpenFile_CommonItemDialog Vista以降のアイテムダイアログ実装。

tests/unittests/test-cdlgopenfile.cpp のテストを増やしたいという事でしょうか?

Interface関数以外の内部実装の単体テストを細かく書いてしまうと、内部実装を調整した際に単体テストの保守も行う必要が出てくるので大変な気が個人的にします。ただ他の人が何かの理由でやりたいのであればあえて止めはしません。

struct CDlgOpenFile_CommonFileDialogstruct CDlgOpenFile_CommonItemDialog の定義をヘッダファイル (例えば sakura_core/dlg/CDlgOpenFile.h とか?)に引っ越しするとかですかね。

このプロジェクトで「エンジニアリングしたい民」はどうも自分だけのようなので、他の人が気にならないなら放置で良いと思っています。

テストも自動化しないとですね。https://github.com/appium/appium-windows-driver を今度使ってみます。

from sakura.

beru avatar beru commented on June 10, 2024
FOS_CREATEPROMPT
Value: 0x2000
Prompt for creation if the item returned in the open dialog does not exist. Note that this does not actually create the item.

この値が CDlgOpenFile_CommonItemDialog::DoModalOpenDlgImpl1 で使われているのが、ファイルの作成確認が余計に行われる原因である事を確認しました。

from sakura.

beru avatar beru commented on June 10, 2024

なんというか、既知のバグを報告しておきます。

既存のファイルダイアログには、上書き確認メッセージを表示するカスタムが施されているのですが、アイテムダイアログにはこれが移植されてないっぽいです。

把握していなかったので、上書き確認メッセージがどう異なるかを動作確認してみました。

既存のファイルダイアログ (実装 CDlgOpenFile_CommonItemDialog) の上書き確認メッセージ

image

Vistaスタイルのファイルダイアログ (実装 CDlgOpenFile_CommonItemDialog) の上書き確認メッセージ

image


メッセージボックスのタイトルが異なりますね。berryzplusさんが書いたように "名前を付けて保存の確認" が正しいと思います。

他に気づいた点として、ファイルパスが既存のファイルダイアログはフルパスで表示されていますが、Vistaスタイルのファイルダイアログではファイル名だけが表示されています。

どちらも些細な点だと思うので更新しなくても良いと思いますが、仮に変更するとしたら CDlgOpenFile_CommonItemDialog::OnOverwrite に実装を追加すれば良さそうです。

HRESULT STDMETHODCALLTYPE OnOverwrite(
/* [in] */ __RPC__in_opt IFileDialog *pfd,
/* [in] */ __RPC__in_opt IShellItem *psi,
/* [out] */ __RPC__out FDE_OVERWRITE_RESPONSE *pResponse) override {
return E_NOTIMPL;
}

https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifiledialogevents-onoverwrite

from sakura.

beru avatar beru commented on June 10, 2024

#1932 がmergeされてこのissueの問題は解消されたと思うのでcloseします。

from sakura.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.