Drop TuhiGui, make it into Tuhi

Drop the user-visible separation, make everything just Tuhi. Directory
structure remains largely separate (tuhi vs tuhigui) except for the po files
which are in the top-level directory because convention.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
pull/145/head
Peter Hutterer 2019-07-17 21:10:36 +10:00
parent bc7c55f281
commit 16cd17b2d1
17 changed files with 59 additions and 60 deletions

View File

@ -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()

View File

@ -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

View File

@ -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

1
po/meson.build Normal file
View File

@ -0,0 +1 @@
i18n.gettext(meson.project_name(), preset: 'glib')

View File

@ -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)

View File

@ -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())

View File

@ -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,

View File

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.freedesktop.TuhiGui</id>
<id>org.freedesktop.Tuhi</id>
<metadata_license>FSFAP</metadata_license>
<project_license>GPL-2.0+</project_license>
<content_rating type="oars-1.0" />
<name>TuhiGui</name>
<name>Tuhi</name>
<summary>Utility to download drawings from the Wacom Ink range of devices</summary>
<description>
<p>
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.
</p>
<p>
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.
</p>
</description>
@ -25,7 +25,7 @@
<kudo>ModernToolkit</kudo>
</kudos>
<launchable type="desktop-id">org.freedesktop.TuhiGui.desktop</launchable>
<launchable type="desktop-id">org.freedesktop.Tuhi.desktop</launchable>
<screenshots>
<screenshot type="default">
@ -42,15 +42,15 @@
</screenshot>
</screenshots>
<url type="homepage">https://github.com/tuhiproject/tuhigui/</url>
<url type="bugtracker">https://github.com/tuhiproject/tuhigui/issues</url>
<url type="help">https://github.com/tuhiproject/tuhigui/wiki</url>
<url type="homepage">https://github.com/tuhiproject/tuhi/</url>
<url type="bugtracker">https://github.com/tuhiproject/tuhi/issues</url>
<url type="help">https://github.com/tuhiproject/tuhi/wiki</url>
<project_group>GNOME</project_group>
<translation type="gettext">tuhigui</translation>
<translation type="gettext">tuhi</translation>
<provides>
<binary>tuhigui</binary>
<binary>tuhi</binary>
</provides>
<releases>

View File

@ -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;

View File

@ -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">
<defs
id="defs2" />
<sodipodi:namedview

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/freedesktop/TuhiGui">
<gresource prefix="/org/freedesktop/Tuhi">
<file preprocess="xml-stripblanks">AboutDialog.ui</file>
<file preprocess="xml-stripblanks">ui/Drawing.ui</file>
<file preprocess="xml-stripblanks">ui/DrawingPerspective.ui</file>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface domain="tuhigui">
<interface domain="tuhi">
<requires lib="gtk+" version="3.4"/>
<object class="GtkAboutDialog" id="about_dialog">
<property name="can_focus">False</property>

View File

@ -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"

View File

@ -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"

View File

@ -1 +0,0 @@
i18n.gettext('tuhigui', preset: 'glib')

View File

@ -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'