mirror of
https://github.com/aclist/dztui.git
synced 2026-08-26 17:57:06 +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
|
||||
- Use concurrency when checking stale mods (performance uplift)
|
||||
- Copy version by clicking label
|
||||
- Add server name to server mod dialogs
|
||||
|
||||
## Changed
|
||||
- Reduce padding on keys button
|
||||
@ -37,6 +38,7 @@
|
||||
|
||||
## Fixed
|
||||
- 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)
|
||||
- Moved dialogs out of threads
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
- Atomic map filters per server context
|
||||
- Use concurrency when checking stale mods (performance uplift)
|
||||
- Copy version by clicking label
|
||||
- Add server name to server mod dialogs
|
||||
|
||||
## Changed
|
||||
- Reduce padding on keys button
|
||||
@ -37,6 +38,7 @@
|
||||
|
||||
## Fixed
|
||||
- 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)
|
||||
- Moved dialogs out of threads
|
||||
|
||||
|
||||
@ -33,7 +33,12 @@ class ContextMenuManager:
|
||||
match action:
|
||||
# UNTHREADED
|
||||
case ContextMenu.ADD_NOTE:
|
||||
from dzgui.views.dialogs.note import NoteDialog
|
||||
|
||||
dialog = NoteDialog(self.controller)
|
||||
dialog.run()
|
||||
print("DEBUG: unimplemented")
|
||||
# dialog = NoteDialog()
|
||||
# spawn edit dialog and update cache, notes file
|
||||
pass
|
||||
case ContextMenu.COPY_LOG_CLIPBOARD:
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
from typing import Literal, Self, TYPE_CHECKING
|
||||
|
||||
from dzgui.const.constants import NO_EXPAND, NO_FILL, EXPAND, FILL
|
||||
from dzgui.const.enum import Popup, ButtonType, NotebookPage
|
||||
from dzgui.const.constants import NO_EXPAND, NO_FILL, NO_PADDING, EXPAND, FILL
|
||||
from dzgui.util import strings
|
||||
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_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):
|
||||
def __init__(self, controller: "Controller", secondary: str):
|
||||
|
||||
@ -44,8 +44,8 @@ class ServerDialog(GenericDialog):
|
||||
self.content = self.get_content_area()
|
||||
self.content.pack_start(self.scrollable_tree, EXPAND, FILL, 0)
|
||||
|
||||
def pack(self, widget: Gtk.Widget) -> None:
|
||||
self.content.pack_start(widget, EXPAND, FILL, NO_PADDING)
|
||||
# def pack(self, widget: Gtk.Widget) -> None:
|
||||
# self.content.pack_start(widget, EXPAND, FILL, NO_PADDING)
|
||||
|
||||
def _on_keypress(self, view: Gtk.TreeView, event: Gdk.EventKey) -> None:
|
||||
# NOTE: ESC normally unfocuses treeview instead of destroying dialog
|
||||
|
||||
Loading…
Reference in New Issue
Block a user