diff --git a/meson.build b/meson.build index 72c2e22..da9989a 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('tuhigui', +project('tuhi', version: '0.1', license: 'GPLv2', meson_version: '>= 0.48.0') @@ -27,14 +27,14 @@ metainfodir = join_paths(datadir, 'metainfo') i18n = import('i18n') -subdir('data') subdir('po') +subdir('tuhigui/data') # Find the directory to install our Python code pymod = import('python') py3 = pymod.find_installation() python_dir = py3.get_install_dir() -install_subdir('tuhigui', install_dir: python_dir, exclude_directories: '__pycache__') +install_subdir('tuhigui/tuhigui', install_dir: python_dir, exclude_directories: '__pycache__') config_tuhigui = configuration_data() config_tuhigui.set('pkgdatadir', pkgdatadir) @@ -44,7 +44,7 @@ config_tuhigui.set('gtk_minor_version', gtk_minor_version) config_tuhigui.set('devel', '') config_tuhigui_devel = config_tuhigui -config_tuhigui_devel.set('pkgdatadir', join_paths(meson.build_root(), 'data')) +config_tuhigui_devel.set('pkgdatadir', join_paths(meson.build_root(), 'tuhigui', 'data')) config_tuhigui_devel.set('localedir', join_paths(meson.build_root(), 'po')) config_tuhigui_devel.set('devel', ''' sys.path.insert(1, '@0@') @@ -52,18 +52,18 @@ print('Running from source tree, using local files') '''.format(meson.source_root())) configure_file(input: 'tuhigui.in', - output: 'tuhigui', + output: 'tuhi.gui', configuration: config_tuhigui, install_dir: bindir) configure_file(input: 'tuhigui.in', - output: 'tuhigui.devel', + output: 'tuhi.gui.devel', configuration: config_tuhigui_devel) meson.add_install_script('meson_install.sh') -desktop_file = i18n.merge_file(input: 'data/org.freedesktop.TuhiGui.desktop.in', - output: 'org.freedesktop.TuhiGui.desktop', +desktop_file = i18n.merge_file(input: 'tuhigui/data/org.freedesktop.Tuhi.desktop.in', + output: 'org.freedesktop.Tuhi.desktop', type: 'desktop', po_dir: podir, install: true, @@ -71,21 +71,21 @@ desktop_file = i18n.merge_file(input: 'data/org.freedesktop.TuhiGui.desktop.in', conf = configuration_data() conf.set('version', meson.project_version()) -conf.set('url', 'https://github.com/tuhiproject/tuhigui') +conf.set('url', 'https://github.com/tuhiproject/tuhi') conf.set('version_date', version_date) -appdata_intl = configure_file(input: 'data/org.freedesktop.TuhiGui.appdata.xml.in.in', - output: 'org.freedesktop.TuhiGui.appdata.xml.in', +appdata_intl = configure_file(input: 'tuhigui/data/org.freedesktop.Tuhi.appdata.xml.in.in', + output: 'org.freedesktop.Tuhi.appdata.xml.in', configuration: conf) appdata = i18n.merge_file(input: appdata_intl, - output: 'org.freedesktop.TuhiGui.appdata.xml', + output: 'org.freedesktop.Tuhi.appdata.xml', type: 'xml', po_dir: podir, install: true, install_dir: metainfodir) -install_data('data/org.freedesktop.TuhiGui.svg', install_dir: icondir) +install_data('tuhigui/data/org.freedesktop.Tuhi.svg', install_dir: icondir) flake8 = find_program('flake8-3', required: false) if flake8.found() diff --git a/tuhigui/po/LINGUAS b/po/LINGUAS similarity index 100% rename from tuhigui/po/LINGUAS rename to po/LINGUAS diff --git a/tuhigui/po/POTFILES b/po/POTFILES similarity index 77% rename from tuhigui/po/POTFILES rename to po/POTFILES index 8e149a5..d2c921d 100644 --- a/tuhigui/po/POTFILES +++ b/po/POTFILES @@ -1,5 +1,5 @@ -data/org.freedesktop.TuhiGui.appdata.xml.in.in -data/org.freedesktop.TuhiGui.desktop.in +data/org.freedesktop.Tuhi.appdata.xml.in.in +data/org.freedesktop.Tuhi.desktop.in data/ui/AboutDialog.ui.in data/ui/Drawing.ui diff --git a/tuhigui/po/README.md b/po/README.md similarity index 79% rename from tuhigui/po/README.md rename to po/README.md index f49bfc0..e811a03 100644 --- a/tuhigui/po/README.md +++ b/po/README.md @@ -1,7 +1,7 @@ i18n ==== -This directory contains the translations of TuhiGui. +This directory contains the translations of Tuhi For errors in translations, please [file an issue](https://github.com/tuhiproject/tuhi/issues/new). @@ -9,14 +9,14 @@ issue](https://github.com/tuhiproject/tuhi/issues/new). New or updated translations are always welcome. To start a new translation, run: $ meson translation-build - $ ninja -C translation-build tuhigui-pot + $ ninja -C translation-build tuhi-pot # Now you can optionally remove the build directory $ rm -rf translation-build - $ cp po/tuhigui.pot po/$lang.po + $ cp po/tuhi.pot po/$lang.po where `$lang` is the language code of your target language, e.g. `nl` for Dutch or `en_GB` for British English. Edit the -[LINGUAS](https://github.com/tuhiproject/tuhigui/blob/master/po/LINGUAS) file and +[LINGUAS](https://github.com/tuhiproject/tuhi/blob/master/tuhigui/po/LINGUAS) file and add your language code, keeping the list sorted alphabetically. Finally, open the `.po` file you just created and translate all the strings. Don't forget to fill in the information in the header! @@ -24,7 +24,7 @@ fill in the information in the header! To update an existing translation, run: $ meson translation-build - $ ninja -C translation-build tuhigui-update-po + $ ninja -C translation-build tuhi-update-po # Now you can optionally remove the build directory $ rm -rf translation-build diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..e9b77d7 --- /dev/null +++ b/po/meson.build @@ -0,0 +1 @@ +i18n.gettext(meson.project_name(), preset: 'glib') diff --git a/tuhigui.in b/tuhigui.in index 53fe9bd..76a6351 100755 --- a/tuhigui.in +++ b/tuhigui.in @@ -9,7 +9,7 @@ gi.require_version("Gtk", "3.0") from gi.repository import Gio, Gtk, Gdk @devel@ -resource = Gio.resource_load(os.path.join('@pkgdatadir@', 'tuhigui.gresource')) +resource = Gio.resource_load(os.path.join('@pkgdatadir@', 'tuhi.gresource')) Gio.Resource._register(resource) def install_excepthook(): @@ -45,11 +45,10 @@ if __name__ == "__main__": install_excepthook() gtk_style() - locale.bindtextdomain('tuhigui', '@localedir@') - locale.textdomain('tuhigui') - gettext.bindtextdomain('tuhigui', '@localedir@') - gettext.textdomain('tuhigui') - + locale.bindtextdomain('tuhi', '@localedir@') + locale.textdomain('tuhi') + gettext.bindtextdomain('tuhi', '@localedir@') + gettext.textdomain('tuhi') signal.signal(signal.SIGINT, signal.SIG_DFL) exit_status = Application().run(sys.argv) sys.exit(exit_status) diff --git a/tuhigui/application.py b/tuhigui/application.py index 702bdc7..6207474 100644 --- a/tuhigui/application.py +++ b/tuhigui/application.py @@ -21,9 +21,9 @@ gi.require_version("Gtk", "3.0") class Application(Gtk.Application): def __init__(self): - super().__init__(application_id='org.freedesktop.TuhiGui', + super().__init__(application_id='org.freedesktop.Tuhi', flags=Gio.ApplicationFlags.FLAGS_NONE) - GLib.set_application_name('TuhiGui') + GLib.set_application_name('Tuhi') self._tuhi = None def do_startup(self): @@ -44,7 +44,7 @@ class Application(Gtk.Application): self.add_action(action) def _about(self, action, param): - builder = Gtk.Builder().new_from_resource('/org/freedesktop/TuhiGui/AboutDialog.ui') + builder = Gtk.Builder().new_from_resource('/org/freedesktop/Tuhi/AboutDialog.ui') about = builder.get_object('about_dialog') about.set_transient_for(self.get_active_window()) about.connect('response', lambda about, param: about.destroy()) diff --git a/tuhigui/data/meson.build b/tuhigui/data/meson.build index 981220d..7aac228 100644 --- a/tuhigui/data/meson.build +++ b/tuhigui/data/meson.build @@ -6,35 +6,35 @@ metainfodir = join_paths(datadir, 'metainfo') conf = configuration_data() conf.set('version', meson.project_version()) -conf.set('url', 'https://github.com/tuhiproject/tuhigui') +conf.set('url', 'https://github.com/tuhiproject/tuhi') conf.set('version_date', version_date) about_dialog = configure_file(input: 'ui/AboutDialog.ui.in', output: 'AboutDialog.ui', configuration: conf) -install_data('org.freedesktop.TuhiGui.svg', install_dir: icondir) +install_data('org.freedesktop.Tuhi.svg', install_dir: icondir) -i18n.merge_file(input: 'org.freedesktop.TuhiGui.desktop.in', - output: 'org.freedesktop.TuhiGui.desktop', +i18n.merge_file(input: 'org.freedesktop.Tuhi.desktop.in', + output: 'org.freedesktop.Tuhi.desktop', type: 'desktop', po_dir: podir, install: true, install_dir: desktopdir) -appdata = configure_file(input: 'org.freedesktop.TuhiGui.appdata.xml.in.in', - output: 'org.freedesktop.TuhiGui.appdata.xml.in', +appdata = configure_file(input: 'org.freedesktop.Tuhi.appdata.xml.in.in', + output: 'org.freedesktop.Tuhi.appdata.xml.in', configuration: conf) i18n.merge_file(input: appdata, - output: 'org.freedesktop.TuhiGui.appdata.xml', + output: 'org.freedesktop.Tuhi.appdata.xml', type: 'xml', po_dir: podir, install: true, install_dir: metainfodir) -gnome.compile_resources('tuhigui', 'tuhigui.gresource.xml', +gnome.compile_resources('tuhi', 'tuhi.gresource.xml', source_dir: '.', dependencies: [about_dialog], gresource_bundle: true, diff --git a/tuhigui/data/org.freedesktop.TuhiGui.appdata.xml.in.in b/tuhigui/data/org.freedesktop.Tuhi.appdata.xml.in.in similarity index 69% rename from tuhigui/data/org.freedesktop.TuhiGui.appdata.xml.in.in rename to tuhigui/data/org.freedesktop.Tuhi.appdata.xml.in.in index 63d8ea1..13c6871 100644 --- a/tuhigui/data/org.freedesktop.TuhiGui.appdata.xml.in.in +++ b/tuhigui/data/org.freedesktop.Tuhi.appdata.xml.in.in @@ -1,21 +1,21 @@ - org.freedesktop.TuhiGui + org.freedesktop.Tuhi FSFAP GPL-2.0+ - TuhiGui + Tuhi Utility to download drawings from the Wacom Ink range of devices

- TuhiGui is a graphical user interface to download drawings stored on + Tuhi is a graphical user interface to download drawings stored on tablet devices from the Wacom Ink range, e.g. Intuos Pro Paper or Bamboo Slate.

- TuhiGui requires Tuhi, the daemon to actually communicate with the + Tuhi requires Tuhi, the daemon to actually communicate with the devices. ThiGui is merely a front end to Tuhi, Tuhi must be - installed and running when TuhiGui is launched. + installed and running when Tuhi is launched.

@@ -25,7 +25,7 @@ ModernToolkit - org.freedesktop.TuhiGui.desktop + org.freedesktop.Tuhi.desktop @@ -42,15 +42,15 @@ - https://github.com/tuhiproject/tuhigui/ - https://github.com/tuhiproject/tuhigui/issues - https://github.com/tuhiproject/tuhigui/wiki + https://github.com/tuhiproject/tuhi/ + https://github.com/tuhiproject/tuhi/issues + https://github.com/tuhiproject/tuhi/wiki GNOME - tuhigui + tuhi - tuhigui + tuhi diff --git a/tuhigui/data/org.freedesktop.TuhiGui.desktop.in b/tuhigui/data/org.freedesktop.Tuhi.desktop.in similarity index 88% rename from tuhigui/data/org.freedesktop.TuhiGui.desktop.in rename to tuhigui/data/org.freedesktop.Tuhi.desktop.in index 286fed6..d955e63 100644 --- a/tuhigui/data/org.freedesktop.TuhiGui.desktop.in +++ b/tuhigui/data/org.freedesktop.Tuhi.desktop.in @@ -1,9 +1,9 @@ [Desktop Entry] -Name=TuhiGui +Name=Tuhi Comment=Utility to download drawings from the Wacom Ink range of devices -Exec=tuhigui +Exec=tuhi # Translators: Do NOT translate or transliterate this text (this is an icon file name)! -Icon=org.freedesktop.TuhiGui +Icon=org.freedesktop.Tuhi Type=Application StartupNotify=true Categories=GTK;GNOME;Utility; diff --git a/tuhigui/data/org.freedesktop.TuhiGui.svg b/tuhigui/data/org.freedesktop.Tuhi.svg similarity index 99% rename from tuhigui/data/org.freedesktop.TuhiGui.svg rename to tuhigui/data/org.freedesktop.Tuhi.svg index 5c1e883..9fe6a50 100644 --- a/tuhigui/data/org.freedesktop.TuhiGui.svg +++ b/tuhigui/data/org.freedesktop.Tuhi.svg @@ -15,7 +15,7 @@ version="1.1" id="svg8" inkscape:version="0.92.3 (2405546, 2018-03-11)" - sodipodi:docname="org.freedesktop.TuhiGui.svg"> + sodipodi:docname="org.freedesktop.Tuhi.svg"> - + AboutDialog.ui ui/Drawing.ui ui/DrawingPerspective.ui diff --git a/tuhigui/data/ui/AboutDialog.ui.in b/tuhigui/data/ui/AboutDialog.ui.in index eef6e43..e56c67c 100644 --- a/tuhigui/data/ui/AboutDialog.ui.in +++ b/tuhigui/data/ui/AboutDialog.ui.in @@ -1,6 +1,6 @@ - + False diff --git a/tuhigui/drawing.py b/tuhigui/drawing.py index 2fbe4b1..827a627 100644 --- a/tuhigui/drawing.py +++ b/tuhigui/drawing.py @@ -38,7 +38,7 @@ def relative_date(timestamp): return t.strftime('%x') -@Gtk.Template(resource_path='/org/freedesktop/TuhiGui/ui/Drawing.ui') +@Gtk.Template(resource_path='/org/freedesktop/Tuhi/ui/Drawing.ui') class Drawing(Gtk.Box): __gtype_name__ = "Drawing" diff --git a/tuhigui/drawingperspective.py b/tuhigui/drawingperspective.py index bf9d923..1778499 100644 --- a/tuhigui/drawingperspective.py +++ b/tuhigui/drawingperspective.py @@ -51,7 +51,7 @@ def relative_time(seconds): return _('a long time ago') -@Gtk.Template(resource_path="/org/freedesktop/TuhiGui/ui/DrawingPerspective.ui") +@Gtk.Template(resource_path="/org/freedesktop/Tuhi/ui/DrawingPerspective.ui") class DrawingPerspective(Gtk.Stack): __gtype_name__ = "DrawingPerspective" diff --git a/tuhigui/po/meson.build b/tuhigui/po/meson.build deleted file mode 100644 index a177335..0000000 --- a/tuhigui/po/meson.build +++ /dev/null @@ -1 +0,0 @@ -i18n.gettext('tuhigui', preset: 'glib') diff --git a/tuhigui/window.py b/tuhigui/window.py index 475b418..463376d 100644 --- a/tuhigui/window.py +++ b/tuhigui/window.py @@ -56,7 +56,7 @@ MENU_XML = """ """ -@Gtk.Template(resource_path="/org/freedesktop/TuhiGui/ui/ErrorPerspective.ui") +@Gtk.Template(resource_path="/org/freedesktop/Tuhi/ui/ErrorPerspective.ui") class ErrorPerspective(Gtk.Box): ''' The page loaded when we cannot connect to the Tuhi DBus server. @@ -71,7 +71,7 @@ class ErrorPerspective(Gtk.Box): return "error_perspective" -@Gtk.Template(resource_path="/org/freedesktop/TuhiGui/ui/SetupPerspective.ui") +@Gtk.Template(resource_path="/org/freedesktop/Tuhi/ui/SetupPerspective.ui") class SetupDialog(Gtk.Dialog): ''' The setup dialog when we don't yet have a registered device with Tuhi. @@ -117,7 +117,7 @@ class SetupDialog(Gtk.Dialog): return "setup_dialog" -@Gtk.Template(resource_path='/org/freedesktop/TuhiGui/ui/MainWindow.ui') +@Gtk.Template(resource_path='/org/freedesktop/Tuhi/ui/MainWindow.ui') class MainWindow(Gtk.ApplicationWindow): __gtype_name__ = 'MainWindow'