start basic menu
This commit is contained in:
+36
-1
@@ -522,6 +522,7 @@ class AnonGui(wx.App):
|
|||||||
|
|
||||||
if self.instance.IsAnotherRunning():
|
if self.instance.IsAnotherRunning():
|
||||||
logger.debug("Another instance detected")
|
logger.debug("Another instance detected")
|
||||||
|
wx.adv.NotificationMessage("Another instance detected", "Trigger refresh").Show()
|
||||||
context = zmq.Context()
|
context = zmq.Context()
|
||||||
socket = context.socket(zmq.PUSH)
|
socket = context.socket(zmq.PUSH)
|
||||||
socket.connect("tcp://127.0.0.1:5556")
|
socket.connect("tcp://127.0.0.1:5556")
|
||||||
@@ -596,6 +597,40 @@ class AnonGui(wx.App):
|
|||||||
URL=f"{self.base_site_url}/atlas/case/create/",
|
URL=f"{self.base_site_url}/atlas/case/create/",
|
||||||
)
|
)
|
||||||
# self.panel.sizer.Add(self.link_long_upload, 0, wx.ALL, 10)
|
# self.panel.sizer.Add(self.link_long_upload, 0, wx.ALL, 10)
|
||||||
|
|
||||||
|
# Create menu bar
|
||||||
|
self.menu_bar = wx.MenuBar()
|
||||||
|
|
||||||
|
|
||||||
|
# Create File menu
|
||||||
|
file_menu = wx.Menu()
|
||||||
|
file_menu.Append(wx.ID_OPEN, "&Open")
|
||||||
|
file_menu.Append(wx.ID_SAVE, "&Save")
|
||||||
|
file_menu.AppendSeparator()
|
||||||
|
file_menu.Append(wx.ID_EXIT, "&Exit")
|
||||||
|
self.menu_bar.Append(file_menu, "&File")
|
||||||
|
|
||||||
|
|
||||||
|
# Create Edit menu
|
||||||
|
edit_menu = wx.Menu()
|
||||||
|
edit_menu.Append(wx.ID_UNDO, "&Undo")
|
||||||
|
edit_menu.Append(wx.ID_REDO, "&Redo")
|
||||||
|
edit_menu.AppendSeparator()
|
||||||
|
edit_menu.Append(wx.ID_CUT, "Cu&t")
|
||||||
|
edit_menu.Append(wx.ID_COPY, "&Copy")
|
||||||
|
edit_menu.Append(wx.ID_PASTE, "&Paste")
|
||||||
|
self.menu_bar.Append(edit_menu, "&Edit")
|
||||||
|
|
||||||
|
|
||||||
|
# Create Help menu
|
||||||
|
help_menu = wx.Menu()
|
||||||
|
help_menu.Append(wx.ID_HELP, "&Help")
|
||||||
|
help_menu.Append(wx.ID_ABOUT, "&About")
|
||||||
|
self.menu_bar.Append(help_menu, "&Help")
|
||||||
|
|
||||||
|
# Set menu bar
|
||||||
|
self.frame.SetMenuBar(self.menu_bar)
|
||||||
|
|
||||||
hoz_links = wx.BoxSizer(wx.HORIZONTAL)
|
hoz_links = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
hoz_links.Add(self.link_rapid_upload, 1, wx.EXPAND)
|
hoz_links.Add(self.link_rapid_upload, 1, wx.EXPAND)
|
||||||
hoz_links.Add(self.link_long_upload, 1, wx.EXPAND)
|
hoz_links.Add(self.link_long_upload, 1, wx.EXPAND)
|
||||||
@@ -747,7 +782,7 @@ class AnonGui(wx.App):
|
|||||||
def import_from_dir(self, event):
|
def import_from_dir(self, event):
|
||||||
default_path = str(self.input_dir.resolve())
|
default_path = str(self.input_dir.resolve())
|
||||||
with wx.DirDialog(
|
with wx.DirDialog(
|
||||||
self.frame, "Choose a directory", style=wx.DD_DEFAULT_STYLE, defaultPath=default_path
|
self.frame, "Choose a directory", style=wx.DD_DIR_MUST_EXIST, defaultPath=default_path
|
||||||
) as dlg:
|
) as dlg:
|
||||||
if dlg.ShowModal() == wx.ID_OK:
|
if dlg.ShowModal() == wx.ID_OK:
|
||||||
load_path = Path(dlg.GetPath())
|
load_path = Path(dlg.GetPath())
|
||||||
|
|||||||
Reference in New Issue
Block a user