mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 15:12:48 +01:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebffbe39f2 | ||
|
|
191776ce74 | ||
|
|
7ae34747e9 | ||
|
|
1555ba2d64 | ||
|
|
4bac804fd7 |
No files matched your search
+1
-8
@@ -1,6 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
import signal
|
import signal
|
||||||
import warnings
|
|
||||||
|
|
||||||
from typing import TYPE_CHECKING, Literal, Self
|
from typing import TYPE_CHECKING, Literal, Self
|
||||||
|
|
||||||
@@ -47,10 +46,6 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
logger = logging.getLogger(APP_NAME)
|
logger = logging.getLogger(APP_NAME)
|
||||||
|
|
||||||
# TODO: drop
|
|
||||||
# https://bugzilla.gnome.org/show_bug.cgi?id=708676
|
|
||||||
warnings.filterwarnings("ignore", ".*g_value_get_int", Warning)
|
|
||||||
|
|
||||||
|
|
||||||
class OuterWindow(Gtk.ApplicationWindow):
|
class OuterWindow(Gtk.ApplicationWindow):
|
||||||
def __init__(self, app: Gtk.Application) -> None:
|
def __init__(self, app: Gtk.Application) -> None:
|
||||||
@@ -344,8 +339,6 @@ try:
|
|||||||
theme = Gtk.IconTheme.get_default()
|
theme = Gtk.IconTheme.get_default()
|
||||||
icons = theme.list_icons(None)
|
icons = theme.list_icons(None)
|
||||||
if STEAM_ICON not in icons:
|
if STEAM_ICON not in icons:
|
||||||
logger.warn(strings.steam_icon_missing)
|
logger.warning(strings.steam_icon_missing)
|
||||||
warnings.warn(strings.steam_icon_missing, stacklevel=2)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(e)
|
logger.warning(e)
|
||||||
warnings.warn(strings.gtk_theme_missing, stacklevel=2)
|
|
||||||
@@ -76,7 +76,7 @@ class SubmitField(Gtk.Box):
|
|||||||
self.button = Gtk.Button(label=options.save_button)
|
self.button = Gtk.Button(label=options.save_button)
|
||||||
|
|
||||||
self.button.connect("clicked", self._on_save_clicked)
|
self.button.connect("clicked", self._on_save_clicked)
|
||||||
self.entry.connect("insert-text", self._on_text_typed)
|
self.entry.connect("changed", self._on_text_typed)
|
||||||
self.entry.connect("activate", self._on_field_activated)
|
self.entry.connect("activate", self._on_field_activated)
|
||||||
self.entry.get_property("buffer").connect("deleted-text", self._on_text_deleted)
|
self.entry.get_property("buffer").connect("deleted-text", self._on_text_deleted)
|
||||||
|
|
||||||
@@ -113,13 +113,9 @@ class SubmitField(Gtk.Box):
|
|||||||
def _on_text_typed(
|
def _on_text_typed(
|
||||||
self,
|
self,
|
||||||
entry: Gtk.Entry,
|
entry: Gtk.Entry,
|
||||||
text: str,
|
|
||||||
length: int,
|
|
||||||
pos: int,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
buffer = entry.get_property("buffer")
|
text = entry.get_text()
|
||||||
text = buffer.get_text() + text
|
|
||||||
state = self._is_valid_text(text)
|
state = self._is_valid_text(text)
|
||||||
self.button.set_sensitive(state)
|
self.button.set_sensitive(state)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ description = "DayZ server browser and mod manager for Linux"
|
|||||||
authors = [
|
authors = [
|
||||||
{name = "aclist"}
|
{name = "aclist"}
|
||||||
]
|
]
|
||||||
version = "7.0.0b25"
|
version = "7.0.0b26"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
license-files = ["LICENSE"]
|
license-files = ["LICENSE"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -14,7 +14,11 @@ from dzgui.views.dialogs.calc import (
|
|||||||
|
|
||||||
|
|
||||||
class DummyEmitter:
|
class DummyEmitter:
|
||||||
pass
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def connect(self, _, __) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(params=[("05:00", 10.0), ("15:30", 5.0)])
|
@pytest.fixture(params=[("05:00", 10.0), ("15:30", 5.0)])
|
||||||
|
|||||||
Reference in new issue
Block a user