- minor fixes + renamed audio alarms + increased version to 0.1.12
This commit is contained in:
parent
6af94a3a6f
commit
6200504627
@ -4,7 +4,7 @@
|
||||
// App version
|
||||
#define QBREAK_VERSION_MAJOR 0
|
||||
#define QBREAK_VERSION_MINOR 1
|
||||
#define QBREAK_VERSION_SUFFIX 11
|
||||
#define QBREAK_VERSION_SUFFIX 12
|
||||
|
||||
// How often UI is updated - interval in seconds
|
||||
#define INTERVAL_UPDATE_UI (60)
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
RunGuard guard("adjfaifaif");
|
||||
RunGuard guard("QBreak app - runguard");
|
||||
if ( !guard.tryToRun() )
|
||||
return 0;
|
||||
|
||||
|
||||
@ -454,7 +454,7 @@ void MainWindow::onLongBreakEnd()
|
||||
}
|
||||
|
||||
// Play selected audio. When break is postponed - audio is not played
|
||||
if (!mPostponeCount)
|
||||
if (0 == mPostponeCount)
|
||||
play_audio(mAppConfig.play_audio);
|
||||
|
||||
// Run script
|
||||
|
||||
@ -53,12 +53,12 @@ private:
|
||||
std::optional<int> mRemainingWorkInterval;
|
||||
|
||||
app_settings::config mAppConfig;
|
||||
int mPostponeCount;
|
||||
int mPostponeCount = 0;
|
||||
|
||||
// Time when idle was started
|
||||
std::optional<std::chrono::steady_clock::time_point> mIdleStart;
|
||||
|
||||
int mLastIdleMilliseconds;
|
||||
int mLastIdleMilliseconds = 0;
|
||||
|
||||
AppState mState = AppState::None;
|
||||
|
||||
|
||||
@ -27,8 +27,8 @@ const QString Primary_Monitor = "[Primary]";
|
||||
|
||||
// Default behavior is not play any audio on break end.
|
||||
const QString Audio_Empty = "None";
|
||||
const QString Audio_Default_1 = "Default 1";
|
||||
const QString Audio_Default_2 = "Default 2";
|
||||
const QString Audio_Retro = "Retro";
|
||||
const QString Audio_Gagarin = "Gagarin";
|
||||
const QString Audio_Custom = "Custom...";
|
||||
|
||||
struct audio_item
|
||||
@ -38,8 +38,8 @@ struct audio_item
|
||||
};
|
||||
|
||||
const std::map<QString, QString> AudioMap {
|
||||
{Audio_Default_1, ":/assets/sound/alarm-retro.wav"},
|
||||
{Audio_Default_2, ":/assets/sound/alarm-poehali.wav"},
|
||||
{Audio_Retro, ":/assets/sound/alarm-retro.wav"},
|
||||
{Audio_Gagarin, ":/assets/sound/alarm-poehali.wav"},
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ void SettingsDialog::init()
|
||||
ui->mPreferredMonitorCombobox->setCurrentIndex(found_idx);
|
||||
|
||||
// Fill audio combo box
|
||||
auto audios = {Audio_Empty, Audio_Default_1, Audio_Default_2, Audio_Custom};
|
||||
auto audios = {Audio_Empty, Audio_Retro, Audio_Gagarin, Audio_Custom};
|
||||
ui->mAudioComboBox->addItems(audios);
|
||||
mCustomAudioIdx = audios.size() - 1;
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Command to run when break finish</string>
|
||||
<string>Shell command to run when break finish</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user