Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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 = {}
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 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 = {}
Exemplo n.º 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)
Exemplo n.º 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}
Exemplo n.º 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}
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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] = {}
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 26
0
 def init(self, app):
     self.logger.info('Starting')
     self.action_group = build_action_group(self)
Exemplo n.º 27
0
 def __init__(self, diagram, view):
     self.view = view
     self.diagram = diagram
     self.action_group = build_action_group(self)
Exemplo n.º 28
0
 def __init__(self, diagram, view):
     self.view = view
     self.diagram = diagram
     self.action_group = build_action_group(self)
Exemplo n.º 29
0
 def init(self, app):
     self.action_group = build_action_group(self)
Exemplo n.º 30
0
 def __init__(self):
     self.action_group = build_action_group(self)
     self._last_update = None
Exemplo n.º 31
0
 def __init__(self):
     self.copy_buffer = set()
     self.action_group = build_action_group(self)
Exemplo n.º 32
0
 def __init__(self, component_registry):
     self.component_registry = component_registry
     self.action_group = build_action_group(self)
Exemplo n.º 33
0
 def __init__(self):
     self.copy_buffer = set()
     self.action_group = build_action_group(self)
Exemplo n.º 34
0
 def __init__(self):
     # Override the report method
     checkmodel.report = self.on_report
     self.action_group = build_action_group(self)
Exemplo n.º 35
0
 def __init__(self):
     self._namespace = None
     self._ui_id = None
     self.action_group = build_action_group(self)
Exemplo n.º 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()
Exemplo n.º 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))
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 40
0
 def __init__(self):
     self.action_group = build_action_group(self)
Exemplo n.º 41
0
 def __init__(self, main_window):
     self.main_window = main_window
     self.action_group = build_action_group(self)
Exemplo n.º 42
0
 def __init__(self, component_registry, properties):
     self.component_registry = component_registry
     self.properties = properties
     self.action_group = build_action_group(self)
Exemplo n.º 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)
Exemplo n.º 44
0
 def __init__(self):
     self.action_group = build_action_group(self)
Exemplo n.º 45
0
 def __init__(self):
     # Override the report method
     checkmodel.report = self.on_report
     self.action_group = build_action_group(self)
Exemplo n.º 46
0
 def init(self, app):
     self.action_group = build_action_group(self)
Exemplo n.º 47
0
 def __init__(self):
     self.action_group = build_action_group(self)
     self._last_update = None