updating dialog based classes to have dialog in name
This commit is contained in:
parent
1114e4b975
commit
05d3b58c5f
11 changed files with 25 additions and 25 deletions
|
@ -12,7 +12,7 @@ from core.gui.themes import PADX, PADY
|
|||
from core.gui.widgets import image_chooser
|
||||
|
||||
|
||||
class CanvasBackgroundDialog(Dialog):
|
||||
class CanvasWallpaperDialog(Dialog):
|
||||
def __init__(self, master, app):
|
||||
"""
|
||||
create an instance of CanvasWallpaper object
|
||||
|
|
|
@ -8,7 +8,7 @@ from tkinter import ttk
|
|||
from core.gui.dialogs.dialog import Dialog
|
||||
|
||||
|
||||
class ColorPicker(Dialog):
|
||||
class ColorPickerDialog(Dialog):
|
||||
def __init__(self, master, app, initcolor="#000000"):
|
||||
super().__init__(master, app, "color picker", modal=True)
|
||||
self.red_entry = None
|
||||
|
|
|
@ -6,7 +6,7 @@ import tkinter as tk
|
|||
from tkinter import ttk
|
||||
|
||||
from core.api.grpc import core_pb2
|
||||
from core.gui.dialogs.colorpicker import ColorPicker
|
||||
from core.gui.dialogs.colorpicker import ColorPickerDialog
|
||||
from core.gui.dialogs.dialog import Dialog
|
||||
from core.gui.themes import PADX, PADY
|
||||
|
||||
|
@ -27,7 +27,7 @@ def get_float(var):
|
|||
return None
|
||||
|
||||
|
||||
class LinkConfiguration(Dialog):
|
||||
class LinkConfigurationDialog(Dialog):
|
||||
def __init__(self, master, app, edge):
|
||||
super().__init__(master, app, "Link Configuration", modal=True)
|
||||
self.app = app
|
||||
|
@ -237,7 +237,7 @@ class LinkConfiguration(Dialog):
|
|||
return frame
|
||||
|
||||
def click_color(self):
|
||||
dialog = ColorPicker(self, self.app, self.color.get())
|
||||
dialog = ColorPickerDialog(self, self.app, self.color.get())
|
||||
color = dialog.askcolor()
|
||||
self.color.set(color)
|
||||
self.color_button.config(background=color)
|
||||
|
|
|
@ -6,13 +6,13 @@ import logging
|
|||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
|
||||
from core.gui.dialogs.colorpicker import ColorPicker
|
||||
from core.gui.dialogs.colorpicker import ColorPickerDialog
|
||||
from core.gui.dialogs.dialog import Dialog
|
||||
|
||||
MARKER_THICKNESS = [3, 5, 8, 10]
|
||||
|
||||
|
||||
class Marker(Dialog):
|
||||
class MarkerDialog(Dialog):
|
||||
def __init__(self, master, app, initcolor="#000000"):
|
||||
super().__init__(master, app, "marker tool", modal=False)
|
||||
self.app = app
|
||||
|
@ -56,7 +56,7 @@ class Marker(Dialog):
|
|||
canvas.delete(i)
|
||||
|
||||
def change_color(self, event):
|
||||
color_picker = ColorPicker(self, self.app, self.color)
|
||||
color_picker = ColorPickerDialog(self, self.app, self.color)
|
||||
color = color_picker.askcolor()
|
||||
event.widget.configure(background=color)
|
||||
self.color = color
|
||||
|
|
|
@ -5,12 +5,12 @@ import tkinter as tk
|
|||
from tkinter import messagebox, ttk
|
||||
|
||||
from core.gui.dialogs.dialog import Dialog
|
||||
from core.gui.dialogs.serviceconfiguration import ServiceConfiguration
|
||||
from core.gui.dialogs.serviceconfig import ServiceConfigDialog
|
||||
from core.gui.themes import FRAME_PAD, PADX, PADY
|
||||
from core.gui.widgets import CheckboxList, ListboxScroll
|
||||
|
||||
|
||||
class NodeService(Dialog):
|
||||
class NodeServiceDialog(Dialog):
|
||||
def __init__(self, master, app, canvas_node, services=None):
|
||||
title = f"{canvas_node.core_node.name} Services"
|
||||
super().__init__(master, app, title, modal=True)
|
||||
|
@ -106,7 +106,7 @@ class NodeService(Dialog):
|
|||
def click_configure(self):
|
||||
current_selection = self.current.listbox.curselection()
|
||||
if len(current_selection):
|
||||
dialog = ServiceConfiguration(
|
||||
dialog = ServiceConfigDialog(
|
||||
master=self,
|
||||
app=self.app,
|
||||
service_name=self.current.listbox.get(current_selection[0]),
|
||||
|
|
|
@ -13,7 +13,7 @@ from core.gui.themes import FRAME_PAD, PADX, PADY
|
|||
from core.gui.widgets import CodeText, ListboxScroll
|
||||
|
||||
|
||||
class ServiceConfiguration(Dialog):
|
||||
class ServiceConfigDialog(Dialog):
|
||||
def __init__(self, master, app, service_name, node_id):
|
||||
title = f"{service_name} Service"
|
||||
super().__init__(master, app, title, modal=True)
|
|
@ -4,7 +4,7 @@ shape input dialog
|
|||
import tkinter as tk
|
||||
from tkinter import font, ttk
|
||||
|
||||
from core.gui.dialogs.colorpicker import ColorPicker
|
||||
from core.gui.dialogs.colorpicker import ColorPickerDialog
|
||||
from core.gui.dialogs.dialog import Dialog
|
||||
from core.gui.graph import tags
|
||||
from core.gui.graph.shapeutils import is_draw_shape, is_shape_text
|
||||
|
@ -135,18 +135,18 @@ class ShapeDialog(Dialog):
|
|||
button.grid(row=0, column=1, sticky="ew")
|
||||
|
||||
def choose_text_color(self):
|
||||
color_picker = ColorPicker(self, self.app, "#000000")
|
||||
color_picker = ColorPickerDialog(self, self.app, "#000000")
|
||||
color = color_picker.askcolor()
|
||||
self.text_color = color
|
||||
|
||||
def choose_fill_color(self):
|
||||
color_picker = ColorPicker(self, self.app, self.fill_color)
|
||||
color_picker = ColorPickerDialog(self, self.app, self.fill_color)
|
||||
color = color_picker.askcolor()
|
||||
self.fill_color = color
|
||||
self.fill.config(background=color, text=color)
|
||||
|
||||
def choose_border_color(self):
|
||||
color_picker = ColorPicker(self, self.app, self.border_color)
|
||||
color_picker = ColorPickerDialog(self, self.app, self.border_color)
|
||||
color = color_picker.askcolor()
|
||||
self.border_color = color
|
||||
self.border.config(background=color, text=color)
|
||||
|
|
|
@ -3,7 +3,7 @@ import tkinter as tk
|
|||
from tkinter.font import Font
|
||||
|
||||
from core.gui import themes
|
||||
from core.gui.dialogs.linkconfig import LinkConfiguration
|
||||
from core.gui.dialogs.linkconfig import LinkConfigurationDialog
|
||||
from core.gui.graph import tags
|
||||
from core.gui.nodeutils import NodeUtils
|
||||
|
||||
|
@ -177,5 +177,5 @@ class CanvasEdge:
|
|||
|
||||
def configure(self):
|
||||
logging.debug("link configuration")
|
||||
dialog = LinkConfiguration(self.canvas, self.canvas.app, self)
|
||||
dialog = LinkConfigurationDialog(self.canvas, self.canvas.app, self)
|
||||
dialog.show()
|
||||
|
|
|
@ -9,7 +9,7 @@ from core.gui import themes
|
|||
from core.gui.dialogs.emaneconfig import EmaneConfigDialog
|
||||
from core.gui.dialogs.mobilityconfig import MobilityConfigDialog
|
||||
from core.gui.dialogs.nodeconfig import NodeConfigDialog
|
||||
from core.gui.dialogs.nodeservice import NodeService
|
||||
from core.gui.dialogs.nodeservice import NodeServiceDialog
|
||||
from core.gui.dialogs.wlanconfig import WlanConfigDialog
|
||||
from core.gui.errors import show_grpc_error
|
||||
from core.gui.graph import tags
|
||||
|
@ -243,7 +243,7 @@ class CanvasNode:
|
|||
|
||||
def show_services(self):
|
||||
self.canvas.context = None
|
||||
dialog = NodeService(self.app.master, self.app, self)
|
||||
dialog = NodeServiceDialog(self.app.master, self.app, self)
|
||||
dialog.show()
|
||||
|
||||
def has_emane_link(self, interface_id):
|
||||
|
|
|
@ -13,7 +13,7 @@ import grpc
|
|||
from core.gui.appconfig import XMLS_PATH
|
||||
from core.gui.dialogs.about import AboutDialog
|
||||
from core.gui.dialogs.canvassizeandscale import SizeAndScaleDialog
|
||||
from core.gui.dialogs.canvaswallpaper import CanvasBackgroundDialog
|
||||
from core.gui.dialogs.canvaswallpaper import CanvasWallpaperDialog
|
||||
from core.gui.dialogs.hooks import HooksDialog
|
||||
from core.gui.dialogs.observers import ObserverDialog
|
||||
from core.gui.dialogs.preferences import PreferencesDialog
|
||||
|
@ -113,7 +113,7 @@ class MenuAction:
|
|||
dialog.show()
|
||||
|
||||
def canvas_set_wallpaper(self):
|
||||
dialog = CanvasBackgroundDialog(self.app, self.app)
|
||||
dialog = CanvasWallpaperDialog(self.app, self.app)
|
||||
dialog.show()
|
||||
|
||||
def help_core_github(self):
|
||||
|
|
|
@ -6,7 +6,7 @@ from tkinter import ttk
|
|||
from tkinter.font import Font
|
||||
|
||||
from core.gui.dialogs.customnodes import CustomNodesDialog
|
||||
from core.gui.dialogs.marker import Marker
|
||||
from core.gui.dialogs.marker import MarkerDialog
|
||||
from core.gui.graph import tags
|
||||
from core.gui.graph.enums import GraphMode
|
||||
from core.gui.graph.shapeutils import ShapeType, is_marker
|
||||
|
@ -407,7 +407,7 @@ class Toolbar(ttk.Frame):
|
|||
self.app.canvas.annotation_type = shape_type
|
||||
if is_marker(shape_type):
|
||||
if not self.marker_tool:
|
||||
self.marker_tool = Marker(self.master, self.app)
|
||||
self.marker_tool = MarkerDialog(self.master, self.app)
|
||||
self.marker_tool.show()
|
||||
|
||||
def click_run_button(self):
|
||||
|
@ -418,7 +418,7 @@ class Toolbar(ttk.Frame):
|
|||
|
||||
def click_marker_button(self):
|
||||
logging.debug("Click on marker button")
|
||||
dialog = Marker(self.master, self.app)
|
||||
dialog = MarkerDialog(self.master, self.app)
|
||||
dialog.show()
|
||||
# dialog.position()
|
||||
|
||||
|
|
Loading…
Reference in a new issue