Beispiel #1
0
 def __init__(self):
     self._notebook = None
     self.action_group = build_action_group(self)
     self.action_group.get_action("diagram-drawing-style").set_active(
         self.properties("diagram.sloppiness", 0) != 0
     )
     self._page_ui_settings = None
Beispiel #2
0
 def __init__(self, diagram):
     self.diagram = diagram
     self.view = None
     self.widget = None
     self.action_group = build_action_group(self)
     self.toolbox = None
     self.component_registry.register_handler(self._on_element_delete)
Beispiel #3
0
 def __init__(self, diagram):
     self.diagram = diagram
     self.view = None
     self.widget = None
     self.action_group = build_action_group(self)
     self.toolbox = None
     self.component_registry.register_handler(self._on_element_delete)
Beispiel #4
0
 def __init__(self, diagram):
     self.diagram = diagram
     self.view = None
     self.widget = None
     self.action_group = build_action_group(self)
     self.toolbox = None
     self.event_manager.subscribe(self._on_element_delete)
Beispiel #5
0
 def __init__(self, diagram):
     self.diagram = diagram
     self.view = None
     #self.owning_window = owning_window
     self.action_group = build_action_group(self)
     self.toolbox = None
     self.component_registry.register_handler(self._on_element_change)
     self.component_registry.register_handler(self._on_element_delete)
Beispiel #6
0
    def __init__(self):
        """Constructor.  Build the action group for the element editor window.
        This will place a button for opening the window in the toolbar.
        The widget attribute is a PropertyEditor."""

        self.action_group = build_action_group(self)
        self.property_editor = PropertyEditor()
        self.widget = self.property_editor.construct()
Beispiel #7
0
 def __init__(self, toolbox_actions=TOOLBOX_ACTIONS):
     self._toolbox = None
     self._toolbox_actions = toolbox_actions
     self.action_group = build_action_group(self)
     self.action_group.get_action("reset-tool-after-create").set_active(
         self.properties.get("reset-tool-after-create", True))
     self.buttons = []
     self.shortcuts = {}
Beispiel #8
0
 def __init__(self, diagram, view, element_factory, event_manager,
              properties):
     self.diagram = diagram
     self.view = view
     self.element_factory = element_factory
     self.event_manager = event_manager
     self.properties = properties
     self.action_group = build_action_group(self)
Beispiel #9
0
 def __init__(self, event_manager, element_factory, action_manager):
     self.event_manager = event_manager
     self.element_factory = element_factory
     self.action_manager = action_manager
     self._namespace = None
     self.action_group = build_action_group(self)
     self.model = Gtk.TreeStore.new([object])
     self.filter = _default_filter_list
Beispiel #10
0
 def __init__(self):
     """Constructor.  Build the action group for the element editor window.
     This will place a button for opening the window in the toolbar.
     The widget attribute is a PropertyEditor."""
     
     self.action_group = build_action_group(self)
     self.property_editor = PropertyEditor()
     self.widget = self.property_editor.construct()
Beispiel #11
0
 def __init__(self, diagram):
     self.diagram = diagram
     self.view = None
     #self.owning_window = owning_window
     self.action_group = build_action_group(self)
     self.toolbox = None
     self.component_registry.register_handler(self._on_element_change)
     self.component_registry.register_handler(self._on_element_delete)
Beispiel #12
0
 def __init__(self, toolbox_actions=TOOLBOX_ACTIONS):
     self._toolbox = None
     self._toolbox_actions = toolbox_actions
     self.action_group = build_action_group(self)
     self.action_group.get_action("reset-tool-after-create").set_active(
         self.properties.get("reset-tool-after-create", True)
     )
     self.buttons = []
     self.shortcuts = {}
Beispiel #13
0
 def __init__(self, diagram, event_manager, element_factory, properties):
     self.event_manager = event_manager
     self.element_factory = element_factory
     self.properties = properties
     self.diagram = diagram
     self.view = None
     self.widget = None
     self.action_group = build_action_group(self)
     self.toolbox = None
     self.event_manager.subscribe(self._on_element_delete)
Beispiel #14
0
    def __init__(self):
        """Constructor. Build the action group for the element editor window.
        This will place a button for opening the window in the toolbar.
        The widget attribute is a PropertyEditor."""

        self.action_group = build_action_group(self)
        self.window = None
        self.vbox = None
        self._current_item = None
        self._expanded_pages = {_("Properties"): True}
Beispiel #15
0
    def __init__(self):
        """Constructor. Build the action group for the element editor window.
        This will place a button for opening the window in the toolbar.
        The widget attribute is a PropertyEditor."""

        self.action_group = build_action_group(self)
        self.window = None
        self.vbox = None
        self._current_item = None
        self._expanded_pages = {_("Properties"): True}
Beispiel #16
0
    def __init__(self, event_manager, element_factory, main_window):
        self.event_manager = event_manager
        self.element_factory = element_factory
        self.main_window = main_window
        self.copy_buffer = set()
        self.action_group = build_action_group(self)

        self.action_group.get_action("edit-copy").props.sensitive = False
        self.action_group.get_action("edit-paste").props.sensitive = False

        event_manager.subscribe(self._update)
Beispiel #17
0
 def __init__(self, event_manager, element_factory, action_manager,
              properties):
     self.event_manager = event_manager
     self.element_factory = element_factory
     self.action_manager = action_manager
     self.properties = properties
     self._notebook = None
     self.action_group = build_action_group(self)
     self.action_group.get_action("diagram-drawing-style").set_active(
         self.properties("diagram.sloppiness", 0) != 0)
     self._page_ui_settings = None
Beispiel #18
0
    def init_action_group(self):
        self.action_group = build_action_group(self)
        for name, label in (('file', '_File'), ('file-export', '_Export'),
                            ('file-import', '_Import'), ('edit', '_Edit'),
                            ('diagram', '_Diagram'), ('tools', '_Tools'),
                            ('window', '_Window'), ('help', '_Help')):
            a = gtk.Action(name, label, None, None)
            a.set_property('hide-if-empty', False)
            self.action_group.add_action(a)
        self._tab_ui_settings = None
        self.action_group.get_action('diagram-drawing-style').set_active(
            self.properties('diagram.sloppiness', 0) != 0)

        self.action_manager.register_action_provider(self)
Beispiel #19
0
 def __init__(
     self, event_manager, main_window, properties, toolbox_actions=TOOLBOX_ACTIONS
 ):
     self.event_manager = event_manager
     self.main_window = main_window
     self.properties = properties
     self._toolbox = None
     self._toolbox_actions = toolbox_actions
     self.action_group = build_action_group(self)
     self.action_group.get_action("reset-tool-after-create").set_active(
         self.properties.get("reset-tool-after-create", True)
     )
     self.buttons: List[Gtk.Button] = []
     self.shortcuts: Dict[str, str] = {}
Beispiel #20
0
    def init_action_group(self):
        self.action_group = build_action_group(self)
        for name, label in (
            ("file", "_File"),
            ("file-export", "_Export"),
            ("file-import", "_Import"),
            ("edit", "_Edit"),
            ("diagram", "_Diagram"),
            ("tools", "_Tools"),
            ("help", "_Help"),
        ):
            a = Gtk.Action.new(name, label, None, None)
            a.set_property("hide-if-empty", False)
            self.action_group.add_action(a)

        self.action_manager.register_action_provider(self)
Beispiel #21
0
    def init_action_group(self):
        self.action_group = build_action_group(self)
        for name, label in (
            ("file", "_File"),
            ("file-export", "_Export"),
            ("file-import", "_Import"),
            ("edit", "_Edit"),
            ("diagram", "_Diagram"),
            ("tools", "_Tools"),
            ("help", "_Help"),
        ):
            a = Gtk.Action.new(name, label, None, None)
            a.set_property("hide-if-empty", False)
            self.action_group.add_action(a)

        self.action_manager.register_action_provider(self)
Beispiel #22
0
    def init_action_group(self):
        self.action_group = build_action_group(self)
        for name, label in (('file', '_File'),
                            ('file-export', '_Export'),
                            ('file-import', '_Import'),
                            ('edit', '_Edit'),
                            ('diagram', '_Diagram'),
                            ('tools', '_Tools'),
                            ('window', '_Window'),
                            ('help', '_Help')):
            a = gtk.Action(name, label, None, None)
            a.set_property('hide-if-empty', False)
            self.action_group.add_action(a)
        self._tab_ui_settings = None
        self.action_group.get_action('diagram-drawing-style').set_active(self.properties('diagram.sloppiness', 0) != 0)

        self.action_manager.register_action_provider(self)
Beispiel #23
0
    def init(self, app):
        """File manager service initialization.  The app parameter
        is the main application object.  This method builds the
        action group in the file menu.  The list of recent
        Gaphor files is then updated in the file menu."""
    
        self.action_group = build_action_group(self)

        for name, label in (('file-recent-files', '_Recent files'),):
            action = gtk.Action(name, label, None, None)
            action.set_property('hide-if-empty', False)
            self.action_group.add_action(action)

        for i in range(0, (MAX_RECENT-1)):
            action = gtk.Action('file-recent-%d' % i, None, None, None)
            action.set_property('visible', False)
            self.action_group.add_action(action)
            action.connect('activate', self.load_recent, i)
            
        self.update_recent_files()
Beispiel #24
0
    def init(self, app):
        """File manager service initialization.  The app parameter
        is the main application object.  This method builds the
        action group in the file menu.  The list of recent
        Gaphor files is then updated in the file menu."""

        self.action_group = build_action_group(self)

        for name, label in (("file-recent-files", "_Recent files"),):
            action = Gtk.Action.new(name, label, None, None)
            action.set_property("hide-if-empty", False)
            self.action_group.add_action(action)

        for i in range(0, (MAX_RECENT - 1)):
            action = Gtk.Action.new("file-recent-%d" % i, None, None, None)
            action.set_property("visible", False)
            self.action_group.add_action(action)
            action.connect("activate", self.load_recent, i)

        self.update_recent_files()
Beispiel #25
0
    def __init__(self, event_manager, element_factory, main_window, properties):
        """File manager constructor.  There is no current filename yet."""
        self.event_manager = event_manager
        self.element_factory = element_factory
        self.main_window = main_window
        self.properties = properties
        self._filename = None
        self.action_group = build_action_group(self)

        for name, label in (("file-recent-files", "_Recent files"),):
            action = Gtk.Action.new(name, label, None, None)
            action.set_property("hide-if-empty", False)
            self.action_group.add_action(action)

        for i in range(0, (MAX_RECENT - 1)):
            action = Gtk.Action.new("file-recent-%d" % i, None, None, None)
            action.set_property("visible", False)
            self.action_group.add_action(action)
            action.connect("activate", self.load_recent, i)

        self.update_recent_files()

        event_manager.subscribe(self._on_window_close)
Beispiel #26
0
 def init(self, app):
     self.logger.info('Starting')
     self.action_group = build_action_group(self)
Beispiel #27
0
 def __init__(self, diagram, view):
     self.view = view
     self.diagram = diagram
     self.action_group = build_action_group(self)
Beispiel #28
0
 def __init__(self, diagram, view):
     self.view = view
     self.diagram = diagram
     self.action_group = build_action_group(self)
Beispiel #29
0
 def init(self, app):
     self.action_group = build_action_group(self)
Beispiel #30
0
 def __init__(self):
     self.action_group = build_action_group(self)
     self._last_update = None
Beispiel #31
0
 def __init__(self):
     self.copy_buffer = set()
     self.action_group = build_action_group(self)
Beispiel #32
0
 def __init__(self, component_registry):
     self.component_registry = component_registry
     self.action_group = build_action_group(self)
Beispiel #33
0
 def __init__(self):
     self.copy_buffer = set()
     self.action_group = build_action_group(self)
Beispiel #34
0
 def __init__(self):
     # Override the report method
     checkmodel.report = self.on_report
     self.action_group = build_action_group(self)
Beispiel #35
0
 def __init__(self):
     self._namespace = None
     self._ui_id = None
     self.action_group = build_action_group(self)
Beispiel #36
0
 def __init__(self, event_manager):
     self.event_manager = event_manager
     self.action_group = build_action_group(self)
     self._last_update = None
     self.event_manager.subscribe(self.update)
     self.update()
Beispiel #37
0
 def __init__(self):
     self._toolbox = None
     self.action_group = build_action_group(self)
     self.action_group.get_action('reset-tool-after-create').set_active(self.properties.get('reset-tool-after-create', True))
Beispiel #38
0
 def __init__(self):
     self._namespace = None
     self.action_group = build_action_group(self)
     self.model = Gtk.TreeStore.new([object])
     self.filter = _default_filter_list
Beispiel #39
0
 def __init__(self):
     self._notebook = None
     self.action_group = build_action_group(self)
     self.action_group.get_action("diagram-drawing-style").set_active(
         self.properties("diagram.sloppiness", 0) != 0)
     self._page_ui_settings = None
Beispiel #40
0
 def __init__(self):
     self.action_group = build_action_group(self)
Beispiel #41
0
 def __init__(self, main_window):
     self.main_window = main_window
     self.action_group = build_action_group(self)
Beispiel #42
0
 def __init__(self, component_registry, properties):
     self.component_registry = component_registry
     self.properties = properties
     self.action_group = build_action_group(self)
Beispiel #43
0
 def __init__(self, element_factory, diagram_layout, main_window):
     self.element_factory = element_factory
     self.diagram_layout = diagram_layout
     self.main_window = main_window
     self.win = None
     self.action_group = build_action_group(self)
Beispiel #44
0
 def __init__(self):
     self.action_group = build_action_group(self)
Beispiel #45
0
 def __init__(self):
     # Override the report method
     checkmodel.report = self.on_report
     self.action_group = build_action_group(self)
Beispiel #46
0
 def init(self, app):
     self.action_group = build_action_group(self)
Beispiel #47
0
 def __init__(self):
     self.action_group = build_action_group(self)
     self._last_update = None