From 6cd611a5b423b47aa4f091183bcbc1e7e2a24cb7 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Fri, 24 Jun 2022 20:02:09 +0200 Subject: [PATCH] WIP: reboot for an UI --- Makefile | 12 ++++++++++++ data/.gitkeep | 0 gemgraph.py | 47 +++++++++++++++++++++++++++++++++++++++++++++++ po/.gitkeep | 0 ui/gemgraph.cmb | 28 ++++++++++++++++++++++++++++ ui/gemgraph.ui | 44 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 131 insertions(+) create mode 100644 Makefile create mode 100644 data/.gitkeep create mode 100755 gemgraph.py create mode 100644 po/.gitkeep create mode 100644 ui/gemgraph.cmb create mode 100644 ui/gemgraph.ui diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ca1b9f3 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +.PHONY: run install + +sources=gemgraph.py gemgraph/main.py gemgraph/window.py +uis=ui/gemgraph.ui + + + +install: ${sources} ${uis} + : + +run: ${sources} ${uis} + ./gemgraph.py diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/gemgraph.py b/gemgraph.py new file mode 100755 index 0000000..df3dfbc --- /dev/null +++ b/gemgraph.py @@ -0,0 +1,47 @@ +#!/bin/python3 + +# Copyright (C) 2022 Libre en Communs +# Copyright (C) 2022 Adrien Bourmault +# Copyright (C) 2022 Jean Sirmai +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import sys +import signal +import locale +import gettext + +VERSION = '0.0.1' +#pkgdatadir = '@pkgdatadir@' +#localedir = '@localedir@' + +#sys.path.insert(1, pkgdatadir) +signal.signal(signal.SIGINT, signal.SIG_DFL) +#locale.bindtextdomain('gemgraph', localedir) +#locale.textdomain('gemgraph') +#gettext.install('gemgraph', localedir) + +if __name__ == "__main__" and __package__ is None: + __package__ = "gemgraph" + +if __name__ == '__main__': + import gi + + from gi.repository import Gio + #resource = Gio.Resource.load(os.path.join(pkgdatadir, 'gemgraph.gresource')) + #resource._register() + + from gemgraph import main + sys.exit(main.main(VERSION)) diff --git a/po/.gitkeep b/po/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ui/gemgraph.cmb b/ui/gemgraph.cmb new file mode 100644 index 0000000..6890133 --- /dev/null +++ b/ui/gemgraph.cmb @@ -0,0 +1,28 @@ + + + + + (1,1,"gem-graph.ui","gem-graph.ui",None,None,None,None,None,None) + + + (1,1,"GtkApplicationWindow","main",None,None,None,None,None), + (1,2,"AdwHeaderBar","main_titlebar",1,None,"titlebar",None,None), + (1,3,"GtkMenuButton","main_button_menu",2,None,"end",None,None), + (1,6,"GtkToggleButton","main_button_sidebar",2,None,None,None,2), + (1,7,"GtkPaned","main_paned",1,None,None,None,1), + (1,8,"GtkFrame","main_sideframe",7,None,None,None,None), + (1,9,"GtkFrame","main_frame",7,None,None,None,1), + (1,10,"GtkMenuButton","main_button_mode",2,None,"start",None,None) + + + (1,1,"GtkWindow","default-height","720",None,None,None,None,None), + (1,1,"GtkWindow","default-width","1080",None,None,None,None,None), + (1,1,"GtkWindow","icon-name","application-x-executable",None,None,None,None,None), + (1,1,"GtkWindow","title","Gem-graph 0.0.1",None,None,None,None,None), + (1,3,"GtkMenuButton","direction","none",None,None,None,None,None), + (1,6,"GtkButton","icon-name","sidebar-show-symbolic",None,None,None,None,None), + (1,7,"GtkPaned","position","250",None,None,None,None,None), + (1,10,"GtkMenuButton","always-show-arrow","True",None,None,None,None,None), + (1,10,"GtkMenuButton","icon-name","document-edit-symbolic",None,None,None,None,None) + + diff --git a/ui/gemgraph.ui b/ui/gemgraph.ui new file mode 100644 index 0000000..a056142 --- /dev/null +++ b/ui/gemgraph.ui @@ -0,0 +1,44 @@ + + + + + + + +