restore check of show ui
This commit is contained in:
parent
d966939524
commit
4ab2323a33
|
@ -828,6 +828,7 @@ int huagao_ds::on_scanner_event(int ev, void* param)
|
|||
|
||||
const Identity& huagao_ds::defaultIdentity() noexcept {
|
||||
// remember, we return a reference, therefore the identity must not be placed on the stack of this method
|
||||
|
||||
return *srcIdent;
|
||||
}
|
||||
Result huagao_ds::selectIdentity(Twpp::Identity& ident) noexcept {
|
||||
|
@ -1019,6 +1020,8 @@ Result huagao_ds::identityOpenDs(const Identity& id)
|
|||
m_fileXfer.setFormat(ImageFileFormat::Bmp);
|
||||
scanner_status_ = SCANNER_STATUS_READY;
|
||||
|
||||
log_mem_info("srcIdent:", srcIdent, sizeof(*srcIdent));
|
||||
|
||||
return success();
|
||||
}
|
||||
Result huagao_ds::identityCloseDs(const Identity&)
|
||||
|
@ -1124,7 +1127,7 @@ Result huagao_ds::userInterfaceEnable(const Identity&, UserInterface& ui)
|
|||
bUiOnly_ = false;
|
||||
show_setting_ = false;
|
||||
scanner_->twain_set_transfer((twain_xfer)m_capXferMech);
|
||||
// if (!ui.showUi())
|
||||
if (!ui.showUi())
|
||||
{
|
||||
scanner_->ui_show_progress((HWND)ui.parent().raw(), m_bIndicator);
|
||||
//if (m_bIndicator && !)
|
||||
|
|
|
@ -291,7 +291,9 @@ namespace callback
|
|||
{
|
||||
#define GET_API(api) \
|
||||
proc = (FARPROC*)&api; \
|
||||
*proc = GetProcAddress(hui, #api);
|
||||
*proc = GetProcAddress(hui, #api); \
|
||||
if(*proc == nullptr) \
|
||||
utils::to_log(LOG_LEVEL_FATAL, "TWAINUI - function '%s' not found!\n", #api);
|
||||
|
||||
FARPROC* proc = nullptr;
|
||||
|
||||
|
@ -2897,6 +2899,7 @@ COM_API_IMPLEMENT(scanner, bool, ui_show_main(HWND parent))
|
|||
}
|
||||
COM_API_IMPLEMENT(scanner, bool, ui_show_setting(HWND parent, bool with_scan, bool indicator))
|
||||
{
|
||||
printf("ui_show_setting(%p, %s, %s), api = %p\n", parent, with_scan ? "with scan" : "only ui", indicator ? "has indicator" : "no indicator", callback::show_setting_ui);
|
||||
is_show_ui_ = with_scan;
|
||||
is_show_setting_ = true;
|
||||
events_.clear();
|
||||
|
|
Loading…
Reference in New Issue