fix buddy checkbox bug (#2434)

This commit is contained in:
Zach H 2017-03-04 00:48:16 -05:00 committed by GitHub
parent b8334d0cd5
commit 6619612c30
3 changed files with 4 additions and 2 deletions

View file

@ -152,7 +152,7 @@ QVariant GamesModel::data(const QModelIndex &index, int role) const
{
result.append(" (").append(tr("can see hands")).append(")");
}
return result;
}
return QVariant(tr("not allowed"));
@ -228,6 +228,7 @@ void GamesModel::updateGameList(const ServerInfo_Game &game)
GamesProxyModel::GamesProxyModel(QObject *parent, ServerInfo_User *_ownUser)
: QSortFilterProxyModel(parent),
ownUser(_ownUser),
showBuddiesOnlyGames(false),
unavailableGamesVisible(false),
showPasswordProtectedGames(true),
maxPlayersFilterMin(-1),

View file

@ -97,6 +97,7 @@ void SettingsCache::translateLegacySettings()
gameFilters().setUnavailableGamesVisible(legacySetting.value("unavailable_games_visible").toBool());
gameFilters().setShowPasswordProtectedGames(legacySetting.value("show_password_protected_games").toBool());
gameFilters().setGameNameFilter(legacySetting.value("game_name_filter").toString());
gameFilters().setShowBuddiesOnlyGames(legacySetting.value("show_buddies_only_games").toBool());
gameFilters().setMinPlayers(legacySetting.value("min_players").toInt());
if (legacySetting.value("max_players").toInt() > 1)

View file

@ -301,7 +301,7 @@ void UserContextMenu::showContextMenu(const QPoint &pos, const QString &userName
bool anotherUser = userName != QString::fromStdString(tabSupervisor->getUserInfo()->name());
aDetails->setEnabled(true);
aChat->setEnabled(anotherUser && online);
aShowGames->setEnabled(anotherUser);
aShowGames->setEnabled(online);
aAddToBuddyList->setEnabled(anotherUser);
aRemoveFromBuddyList->setEnabled(anotherUser);
aAddToIgnoreList->setEnabled(anotherUser);