Permalink
Browse files

userconf

make it possible to hide tooltip informing user about not viewing last
revision of page
  • Loading branch information...
benapetr committed Apr 24, 2018
1 parent 39be809 commit e2c17d67e15956db0f77c831f007edbc195437c1
@@ -195,6 +195,7 @@ QString UserConfiguration::MakeLocalUserConfig(ProjectConfiguration *Project)
configuration_ += "AutomaticRefresh:" + Bool2String(this->AutomaticRefresh) + "\n";
configuration_ += "AutomaticallyWatchlistWarnedUsers:" + Bool2String(this->AutomaticallyWatchlistWarnedUsers) + "\n";
configuration_ += "ShortcutHash:" + this->ShortcutHash + "\n";
configuration_ += "ShowWarningIfNotOnLastRevision:" + Bool2String(this->ShowWarningIfNotOnLastRevision) + "\n";
// shortcuts
QStringList shortcuts = Configuration::HuggleConfiguration->Shortcuts.keys();
// we need to do this otherwise huggle may sort the items differently every time and spam wiki
@@ -385,6 +386,7 @@ bool UserConfiguration::ParseUserConfig(QString config, ProjectConfiguration *Pr
this->EnableMinScore = SafeBool(ConfigurationParse("EnableMinScore", config));
this->AutomaticRefresh = SafeBool(ConfigurationParse("AutomaticRefresh", config), this->AutomaticRefresh);
this->ShortcutHash = ConfigurationParse("ShortcutHash", config, "null");
this->ShowWarningIfNotOnLastRevision = SafeBool(ConfigurationParse("ShowWarningIfNotOnLastRevision", config), this->ShowWarningIfNotOnLastRevision);
// for now we do this only for home wiki but later we need to make it for every wiki
if (IsHome)
{
@@ -94,6 +94,7 @@ namespace Huggle
bool EnforceManualSRT = false;
int PreferredProvider = 2;
unsigned int TalkPageFreshness = 20;
bool ShowWarningIfNotOnLastRevision = true;
//! Huggle will auto revert all edits that were made by same user on auto conflict resolution
bool RevertOnMultipleEdits = true;
//! Whether a founder of every page should be retrieved or not
@@ -768,6 +768,7 @@
<string name="cr-message-same">There are multiple edits to $1 by the same user, are you sure you want to revert them?</string>
<string name="cr-message-new">There are newer edits to $1. Are you sure you really want to revert them?</string>
<string name="cr-message-not-same">There are newer edits made to $1 by a different user. Are you sure you want to revert them all? (It will likely fail anyway because it will have an old token.)</string>
<string name="preferences-show-warning-if-not-last-revision">Show warning if you are not on last revision of page</string>
<string name="preferences-delete-using-filter">You can&apos;t delete a filter that is currently being used</string>
<string name="preferences-extension-disabled">This extension is already scheduled for disabling on the next startup of Huggle</string>
<string name="preferences-extension-disabled-restart">Extension was set to be disabled on the next startup of Huggle</string>
@@ -278,8 +278,8 @@ void HistoryForm::onTick01()
else
pntr.setX(this->pos().x() + 100);
// display a tip
QToolTip::showText(pntr, "<b><big>" + _l("historyform-not-latest-tip") + "</big></b>", this);
if (hcfg->UserConfig->ShowWarningIfNotOnLastRevision)
QToolTip::showText(pntr, "<b><big>" + _l("historyform-not-latest-tip") + "</big></b>", this);
}
}
if (hcfg->UserConfig->AutomaticallyGroup)
@@ -203,6 +203,7 @@ Preferences::Preferences(QWidget *parent) : HW("preferences", this, parent), ui(
this->ui->cbKeystrokeFix->setText(_l("preferences-keystroke-rate-limit"));
this->ui->l_QueueSize->setText(_l("preferences-queue-size"));
this->ui->l_EmptyQueuePage->setText(_l("preferences-empty-queue-page"));
this->ui->cbShowWarningIfNotOnLastRevision->setText(_l("preferences-show-warning-if-not-last-revision"));
#ifndef HUGGLE_NOAUDIO
this->ui->label_NoAudio->setVisible(false);
@@ -354,6 +355,7 @@ void Huggle::Preferences::on_pushButton_2_clicked()
hcfg->SystemConfig_PlaySoundQueueScore = this->ui->ln_QueueSoundMinScore->text().toLong();
hcfg->SystemConfig_PlaySoundOnQueue = this->ui->cbPlayOnNewItem->isChecked();
hcfg->SystemConfig_CatScansAndWatched = this->ui->cbCatScansAndWatched->isChecked();
hcfg->UserConfig->ShowWarningIfNotOnLastRevision = this->ui->cbShowWarningIfNotOnLastRevision->isChecked();
if (this->ui->checkBox_7->isChecked())
hcfg->UserConfig->SummaryMode = 1;
else
@@ -812,6 +814,7 @@ void Preferences::ResetItems()
this->ui->cbPlayOnNewItem->setChecked(hcfg->SystemConfig_PlaySoundOnQueue);
this->ui->cbPlayOnIRCMsg->setChecked(hcfg->SystemConfig_PlaySoundOnIRCUserMsg);
this->ui->cbCatScansAndWatched->setChecked(hcfg->SystemConfig_CatScansAndWatched);
this->ui->cbShowWarningIfNotOnLastRevision->setChecked(hcfg->UserConfig->ShowWarningIfNotOnLastRevision);
this->ui->cb_AutoRefresh->setChecked(hcfg->UserConfig->AutomaticRefresh);
this->ui->cb_WatchWarn->setChecked(hcfg->UserConfig->AutomaticallyWatchlistWarnedUsers);
this->ui->le_KeystrokeRate->setText(QString::number(hcfg->SystemConfig_KeystrokeMultiPressRate));
@@ -1011,6 +1011,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbShowWarningIfNotOnLastRevision">
<property name="text">
<string>ShowWarningIfNotOnLastRevision</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbKeystrokeFix">
<property name="text">

0 comments on commit e2c17d6

Please sign in to comment.