diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..7553718 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "framework-python"] + path = framework-python + url = git@gitea.azcona-becker.net:beckermj/framework-python +[submodule "editor-python"] + path = editor-python + url = git@gitea.azcona-becker.net:universaleditor/editor-python diff --git a/editor-python b/editor-python new file mode 160000 index 0000000..b3489ab --- /dev/null +++ b/editor-python @@ -0,0 +1 @@ +Subproject commit b3489ab03418fbb39cce2d95dd85045e0ab5e1e3 diff --git a/framework-python b/framework-python new file mode 160000 index 0000000..b42d45a --- /dev/null +++ b/framework-python @@ -0,0 +1 @@ +Subproject commit b42d45a5b8725849e968d69379fa10c641a819f1 diff --git a/mocha-python/src/mocha-python/barista/BaristaEditor.py b/mocha-python/src/mocha-python/barista/BaristaEditor.py index 55dcd48..38ea70c 100644 --- a/mocha-python/src/mocha-python/barista/BaristaEditor.py +++ b/mocha-python/src/mocha-python/barista/BaristaEditor.py @@ -340,10 +340,21 @@ class BaristaEditor(Gtk.Box): sc = Gtk.Paned() + stack = Gtk.Stack() + + button_box = Gtk.StackSidebar() + button_box.set_stack(stack) + + sc.add1(button_box) + + button_box.show() + + content_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + self.txtSearch = Gtk.SearchEntry() self.txtSearch.connect("search-changed", self.on_search) self.txtSearch.show() - self.pack_start(self.txtSearch, False, False, 0) + content_box.pack_start(self.txtSearch, False, False, 0) self.ts = Gtk.TreeStore(bool, Pango.Weight, str, str, str, str) self.om = om @@ -378,8 +389,20 @@ class BaristaEditor(Gtk.Box): tv_wrapper.add(self.tv) tv_wrapper.show() - sc.add1(tv_wrapper) + content_box.pack_start(tv_wrapper, True, True, 0) + content_box.show() + + stack.add_titled(content_box, "Instances", "Instances") + sc.add2(stack) + + stack.add_titled(Gtk.Label(label="Hello World"), "Attributes", "Attributes") + + stack.add_titled(Gtk.Label(label="Hello World"), "Relationships", "Relationships") + + stack.add_titled(Gtk.Label(label="Hello World"), "Elements", "Elements") + sc.show() + sc.show_all() self.treeview_filter.settings = self.settings self.treeview_filter.update("") diff --git a/mocha-python/src/mocha-python/barista/MainWindow.py b/mocha-python/src/mocha-python/barista/MainWindow.py index 9e4ba9f..1f351d6 100644 --- a/mocha-python/src/mocha-python/barista/MainWindow.py +++ b/mocha-python/src/mocha-python/barista/MainWindow.py @@ -168,6 +168,50 @@ class MainWindow (Gtk.ApplicationWindow): mnuView.get_submenu().add(mnuViewEntities) menu.add(mnuView) + + mnuProject = Gtk.MenuItem() + mnuProject.set_label("_Project") + mnuProject.set_use_underline(True) + mnuProject.set_submenu(Gtk.Menu()) + + mnuProjectAdd = Gtk.MenuItem() + mnuProjectAdd.set_submenu(Gtk.Menu()) + mnuProjectAdd.set_label("A_dd") + mnuProjectAdd.set_use_underline(True) + + mnuProjectAddClass = Gtk.MenuItem() + mnuProjectAddClass.set_label("New _Class") + mnuProjectAddClass.connect("activate", self.mnuProjectAdd_activate) + mnuProjectAddClass.set_use_underline(True) + + mnuProjectAdd.get_submenu().add(mnuProjectAddClass) + + mnuProjectAddAttribute = Gtk.MenuItem() + mnuProjectAddAttribute.set_label("New _Attribute") + mnuProjectAddAttribute.connect("activate", self.mnuProjectAdd_activate) + mnuProjectAddAttribute.set_use_underline(True) + + mnuProjectAdd.get_submenu().add(mnuProjectAddAttribute) + + mnuProjectAddRelationship = Gtk.MenuItem() + mnuProjectAddRelationship.set_label("New _Relationship") + mnuProjectAddRelationship.connect("activate", self.mnuProjectAdd_activate) + mnuProjectAddRelationship.set_use_underline(True) + + mnuProjectAdd.get_submenu().add(mnuProjectAddRelationship) + + mnuProjectAdd.get_submenu().add(Gtk.SeparatorMenuItem()) + + mnuProjectAddOtherInstance = Gtk.MenuItem() + mnuProjectAddOtherInstance.set_label("Other _Instance...") + mnuProjectAddOtherInstance.connect("activate", self.mnuProjectAdd_activate) + mnuProjectAddOtherInstance.set_use_underline(True) + + mnuProjectAdd.get_submenu().add(mnuProjectAddOtherInstance) + + mnuProject.get_submenu().add(mnuProjectAdd) + + menu.add(mnuProject) mnuHelp = Gtk.MenuItem() mnuHelp.set_submenu(Gtk.Menu()) @@ -194,6 +238,8 @@ class MainWindow (Gtk.ApplicationWindow): filtr.set_name("Mocha library or executable") dlg.add_filter(filtr) + dlg.set_current_folder("/home/beckermj/Documents/Projects/mochapowered/mocha-dotnet/mocha-common/mocha-common/output") + ret = dlg.run() filenames = dlg.get_filenames() @@ -221,6 +267,9 @@ class MainWindow (Gtk.ApplicationWindow): if not self.current_editor is None: self.current_editor.update() + def mnuProjectAdd_activate(self, args): + pass + def mnuHelpAbout_activate(self, args): dlg = Gtk.AboutDialog() diff --git a/mocha-python/src/mocha-python/barista/editor b/mocha-python/src/mocha-python/barista/editor new file mode 120000 index 0000000..9c1f362 --- /dev/null +++ b/mocha-python/src/mocha-python/barista/editor @@ -0,0 +1 @@ +../../../../editor-python/editor-python/src/editor \ No newline at end of file diff --git a/mocha-python/src/mocha-python/barista/framework b/mocha-python/src/mocha-python/barista/framework new file mode 120000 index 0000000..9fbeae2 --- /dev/null +++ b/mocha-python/src/mocha-python/barista/framework @@ -0,0 +1 @@ +../../../../framework-python/lib/mbs/framework \ No newline at end of file