mirror of
https://github.com/aclist/dztui.git
synced 2026-08-29 11:17:12 +02:00
feat: reimplement notes dialog (WIP)
This commit is contained in:
parent
55e6af8fe2
commit
560349e16b
@ -26,6 +26,7 @@
|
|||||||
- Atomic map filters per server context
|
- Atomic map filters per server context
|
||||||
- Use concurrency when checking stale mods (performance uplift)
|
- Use concurrency when checking stale mods (performance uplift)
|
||||||
- Copy version by clicking label
|
- Copy version by clicking label
|
||||||
|
- Add server name to server mod dialogs
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
- Reduce padding on keys button
|
- Reduce padding on keys button
|
||||||
@ -37,6 +38,7 @@
|
|||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
- Longstanding issue with left clicks not registering as tree selection changes after spamming keyboard input
|
- Longstanding issue with left clicks not registering as tree selection changes after spamming keyboard input
|
||||||
|
- Center server title text on server dialogs
|
||||||
- Rare segfaults when changing maps (threading)
|
- Rare segfaults when changing maps (threading)
|
||||||
- Moved dialogs out of threads
|
- Moved dialogs out of threads
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
- Atomic map filters per server context
|
- Atomic map filters per server context
|
||||||
- Use concurrency when checking stale mods (performance uplift)
|
- Use concurrency when checking stale mods (performance uplift)
|
||||||
- Copy version by clicking label
|
- Copy version by clicking label
|
||||||
|
- Add server name to server mod dialogs
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
- Reduce padding on keys button
|
- Reduce padding on keys button
|
||||||
@ -37,6 +38,7 @@
|
|||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
- Longstanding issue with left clicks not registering as tree selection changes after spamming keyboard input
|
- Longstanding issue with left clicks not registering as tree selection changes after spamming keyboard input
|
||||||
|
- Center server title text on server dialogs
|
||||||
- Rare segfaults when changing maps (threading)
|
- Rare segfaults when changing maps (threading)
|
||||||
- Moved dialogs out of threads
|
- Moved dialogs out of threads
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,12 @@ class ContextMenuManager:
|
|||||||
match action:
|
match action:
|
||||||
# UNTHREADED
|
# UNTHREADED
|
||||||
case ContextMenu.ADD_NOTE:
|
case ContextMenu.ADD_NOTE:
|
||||||
|
from dzgui.views.dialogs.note import NoteDialog
|
||||||
|
|
||||||
|
dialog = NoteDialog(self.controller)
|
||||||
|
dialog.run()
|
||||||
print("DEBUG: unimplemented")
|
print("DEBUG: unimplemented")
|
||||||
|
# dialog = NoteDialog()
|
||||||
# spawn edit dialog and update cache, notes file
|
# spawn edit dialog and update cache, notes file
|
||||||
pass
|
pass
|
||||||
case ContextMenu.COPY_LOG_CLIPBOARD:
|
case ContextMenu.COPY_LOG_CLIPBOARD:
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
from typing import Literal, Self, TYPE_CHECKING
|
from typing import Literal, Self, TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.const.constants import NO_EXPAND, NO_FILL, EXPAND, FILL
|
from dzgui.const.constants import NO_EXPAND, NO_FILL, NO_PADDING, EXPAND, FILL
|
||||||
from dzgui.const.enum import Popup, ButtonType, NotebookPage
|
|
||||||
from dzgui.util import strings
|
from dzgui.util import strings
|
||||||
from dzgui.views.components.buttons import ClipboardButton
|
from dzgui.views.components.buttons import ClipboardButton
|
||||||
|
|
||||||
@ -51,6 +50,10 @@ class GenericDialog(Gtk.MessageDialog):
|
|||||||
self.outer.set_margin_start(30)
|
self.outer.set_margin_start(30)
|
||||||
self.outer.set_margin_end(30)
|
self.outer.set_margin_end(30)
|
||||||
|
|
||||||
|
def pack(self, widget: Gtk.Widget) -> None:
|
||||||
|
content = self.get_content_area()
|
||||||
|
content.pack_start(widget, EXPAND, FILL, NO_PADDING)
|
||||||
|
|
||||||
|
|
||||||
class ConfirmationDialog(GenericDialog):
|
class ConfirmationDialog(GenericDialog):
|
||||||
def __init__(self, controller: "Controller", secondary: str):
|
def __init__(self, controller: "Controller", secondary: str):
|
||||||
|
|||||||
@ -44,8 +44,8 @@ class ServerDialog(GenericDialog):
|
|||||||
self.content = self.get_content_area()
|
self.content = self.get_content_area()
|
||||||
self.content.pack_start(self.scrollable_tree, EXPAND, FILL, 0)
|
self.content.pack_start(self.scrollable_tree, EXPAND, FILL, 0)
|
||||||
|
|
||||||
def pack(self, widget: Gtk.Widget) -> None:
|
# def pack(self, widget: Gtk.Widget) -> None:
|
||||||
self.content.pack_start(widget, EXPAND, FILL, NO_PADDING)
|
# self.content.pack_start(widget, EXPAND, FILL, NO_PADDING)
|
||||||
|
|
||||||
def _on_keypress(self, view: Gtk.TreeView, event: Gdk.EventKey) -> None:
|
def _on_keypress(self, view: Gtk.TreeView, event: Gdk.EventKey) -> None:
|
||||||
# NOTE: ESC normally unfocuses treeview instead of destroying dialog
|
# NOTE: ESC normally unfocuses treeview instead of destroying dialog
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user