MCPcopy Create free account
hub / github.com/ashaduri/gsmartcontrol / update_dialog_show_timer

Method update_dialog_show_timer

src/applib/command_executor_gui.cpp:92–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92void CommandExecutorGui::update_dialog_show_timer()
93{
94 double timeout = 2.; // 2 sec for normal dialogs
95 if (running_dialog_abort_mode_)
96 timeout = 0.4; // 0.4 sec for aborting... dialogs
97
98 if (!running_dialog_shown_ && running_dialog_timer_.elapsed() > timeout) {
99
100 // without first making it sensitive, the "whole label selected" problem may occur.
101 running_dialog_->set_response_sensitive(Gtk::RESPONSE_CANCEL, true);
102 running_dialog_->show();
103
104 // enable / disable the button. do this after show(), or else the label gets selected or the cursor gets visible.
105 running_dialog_->set_response_sensitive(Gtk::RESPONSE_CANCEL, !running_dialog_abort_mode_);
106
107 running_dialog_shown_ = true;
108 }
109}
110
111
112

Callers 1

execute_tick_funcMethod · 0.95

Calls 1

elapsedMethod · 0.80

Tested by

no test coverage detected