Change inventory filters to show all campaigns when all of them are selected

This commit is contained in:
DevilXD
2023-10-29 22:36:12 +01:00
parent bdf53fb33d
commit deee8abf61
15 changed files with 20 additions and 20 deletions

10
gui.py
View File

@@ -1147,7 +1147,7 @@ class InventoryOverview:
self._cache: ImageCache = manager._cache
self._settings: Settings = manager._twitch.settings
self._filters = {
"linked": IntVar(master, 1),
"not_linked": IntVar(master, 1),
"upcoming": IntVar(master, 1),
"expired": IntVar(master, 0),
"excluded": IntVar(master, 0),
@@ -1165,11 +1165,11 @@ class InventoryOverview:
).grid(column=0, row=0)
icolumn = 0
ttk.Checkbutton(
filter_frame, variable=self._filters["linked"]
filter_frame, variable=self._filters["not_linked"]
).grid(column=(icolumn := icolumn + 1), row=0)
ttk.Label(
filter_frame,
text=_("gui", "inventory", "filter", "linked"),
text=_("gui", "inventory", "filter", "not_linked"),
padding=(0, 0, LABEL_SPACING, 0),
).grid(column=(icolumn := icolumn + 1), row=0)
ttk.Checkbutton(
@@ -1230,14 +1230,14 @@ class InventoryOverview:
def _update_visibility(self, campaign: DropsCampaign):
# True if the campaign is supposed to show, False makes it hidden.
frame = self._campaigns[campaign]["frame"]
linked = bool(self._filters["linked"].get())
not_linked = bool(self._filters["not_linked"].get())
expired = bool(self._filters["expired"].get())
excluded = bool(self._filters["excluded"].get())
upcoming = bool(self._filters["upcoming"].get())
finished = bool(self._filters["finished"].get())
priority_only = self._settings.priority_only
if (
(not linked or campaign.linked)
(not_linked or campaign.linked)
and (campaign.active or upcoming and campaign.upcoming or expired and campaign.expired)
and (
excluded or (

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Filter",
"show": "Anzeigen:",
"linked": "Nur verknüpfte",
"not_linked": "Nicht verbunden",
"upcoming": "Zukünftig",
"expired": "Abgelaufen",
"excluded": "Ausgeschlossen",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Filtro de campañas",
"show": "Mostrar:",
"linked": "Vinculadas",
"not_linked": "No enlazado",
"upcoming": "Próximas",
"expired": "Expiradas",
"excluded": "Excluidas",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Filtre",
"show": "Afficher :",
"linked": "Liés uniquement",
"not_linked": "Non lié",
"upcoming": "À venir",
"expired": "Expiré",
"excluded": "Exclu",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Filtro",
"show": "Mostra:",
"linked": "Solo collegati",
"not_linked": "Non collegato",
"upcoming": "In arrivo",
"expired": "Scaduti",
"excluded": "Esclusi",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Filtr",
"show": "Pokaż:",
"linked": "Tylko połączone",
"not_linked": "Nie połączone",
"upcoming": "Nadchodzące",
"expired": "Wygasłe",
"excluded": "Wykluczone",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Filtro",
"show": "Mostrar:",
"linked": "Conectado apenas",
"not_linked": "Não ligado",
"upcoming": "Se Aproximando",
"expired": "Expirado",
"excluded": "Excluido",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Filtre",
"show": "Dava etmek:",
"linked": "Yalnızca bağlantılı",
"not_linked": "Bağlantılı değil",
"upcoming": "Gelecek",
"expired": "Süresi doldu",
"excluded": "Hariç tutuldu",

View File

@@ -100,7 +100,7 @@
"filter": {
"name": "Filtr",
"show": "Drop:",
"linked": "Pouze živě",
"not_linked": "Nepropojeno",
"expired": "Ukončeno",
"excluded": "Vynecháno",
"upcoming": "Nadcházející",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Фильтр",
"show": "Показать:",
"linked": "Только связанные",
"not_linked": "Не связано",
"upcoming": "Будущие",
"expired": "Прошедшие",
"excluded": "Исключенные",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "Фільтри",
"show": "Показати тільки:",
"linked": "Зв'язані",
"not_linked": "Не пов'язано",
"upcoming": "Наближаються",
"expired": "Прострочені",
"excluded": "Виключені",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "تصفية",
"show": "عرض \u279C",
"linked": "المرتبطة فقط",
"not_linked": "غير مرتبط",
"upcoming": "القادمة",
"expired": "المنتهية",
"excluded": "المستبعدة",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "筛选",
"show": "掉宝活动:",
"linked": "仅已关联账户的游戏掉宝",
"not_linked": "未链接",
"expired": "已结束",
"excluded": "未添加的掉宝活动",
"upcoming": "即将上线",

View File

@@ -107,7 +107,7 @@
"filter": {
"name": "篩選",
"show": "掉寶活動:",
"linked": "僅顯示關聯帳號的遊戲掉寶",
"not_linked": "未連結",
"expired": "已結束",
"excluded": "未添加的掉寶活動",
"upcoming": "即將開啟",

View File

@@ -130,7 +130,7 @@ class GUIChannels(TypedDict):
class GUIInvFilter(TypedDict):
name: str
show: str
linked: str
not_linked: str
upcoming: str
expired: str
excluded: str
@@ -330,7 +330,7 @@ default_translation: Translation = {
"filter": {
"name": "Filter",
"show": "Show:",
"linked": "Linked only",
"not_linked": "Not linked",
"upcoming": "Upcoming",
"expired": "Expired",
"excluded": "Excluded",