Increased timeouts when executing commands before the "Cancel" dialog is

shown; this helps with constant focus stealing from other windows when
smartctl is too slow (usually under Windows).
This commit is contained in:
Alexander Shaduri
2013-02-25 20:27:18 +00:00
parent 7e3db9ec30
commit a0b235dd8a
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -30,7 +30,12 @@ TODO:
Increase "executing command" dialog timeout.
Perhaps make it somehow not steal the focus (some window hint?)
Test it by replacing smartctl with "sleep 2; smartctl"
Test Areca windows detection by installing CLI, then replacing it with a dummy
program that prints something (with enclosures and without).
Fix not being able to quit while executing commands.
Areca detection
+3 -3
View File
@@ -31,7 +31,7 @@ bool CmdexSyncGui::execute()
#if APP_GTKMM_CHECK_VERSION(2, 10, 0)
// these are available since gtkmm 2.10
#define CMDEX_DIALOG_MESSAGE_TYPE Gtk::MESSAGE_OTHER
// not present in Gdk:: in 2.10 (it's in 2.12), use we have to use GDK_
// not present in Gdk:: in 2.10 (it's in 2.12), we have to use GDK_
#define CMDEX_DIALOG_HINT_TYPE GDK_WINDOW_TYPE_HINT_NOTIFICATION
#else
#define CMDEX_DIALOG_MESSAGE_TYPE Gtk::MESSAGE_INFO
@@ -97,9 +97,9 @@ void CmdexSyncGui::show_hide_dialog(bool show)
void CmdexSyncGui::update_dialog_show_timer()
{
double timeout = 1.; // 1 sec for normal dialogs
double timeout = 2.; // 2 sec for normal dialogs
if (running_dialog_abort_mode_)
timeout = 0.2; // 0.2 sec for aborting... dialogs
timeout = 0.4; // 0.4 sec for aborting... dialogs
if (!running_dialog_shown_ && running_dialog_timer_.elapsed() > timeout) {