Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Briar GTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
Briar GTK
Commits
53735119
Commit
53735119
authored
5 years ago
by
Nico
Browse files
Options
Downloads
Patches
Plain Diff
Try to make first files in src/ easier to understand
parent
81042aac
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/briar-gtk.in
+29
-10
29 additions, 10 deletions
src/briar-gtk.in
src/meson.build
+6
-6
6 additions, 6 deletions
src/meson.build
with
35 additions
and
16 deletions
src/briar-gtk.in
+
29
−
10
View file @
53735119
...
...
@@ -15,24 +15,43 @@ import sys
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gio
pkgdatadir = '@pkgdatadir
@'
localedir = '@localedir
@'
PACKAGE_DATA_DIR = '@PACKAGE_DATA_DIR
@'
LOCALE_DIR = '@LOCALE_DIR
@'
sys
.
path
.insert(1, pkgdatadir)
signal.signal(signal.SIGINT, signal.SIG_DFL
)
def add_package_to_
sys
_
path
():
sys.path.insert(1, PACKAGE_DATA_DIR
)
if __name__ == '__main__':
locale.bindtextdomain('briar-gtk', localedir)
def handle_sigint_default_way():
signal.signal(signal.SIGINT, signal.SIG_DFL)
def prepare_locale():
locale.bindtextdomain('briar-gtk', LOCALE_DIR)
locale.textdomain('briar-gtk')
gettext.bindtextdomain('briar-gtk', localedir)
def prepare_gettext():
gettext.bindtextdomain('briar-gtk', LOCALE_DIR)
gettext.textdomain('briar-gtk')
import gi
def prepare_localization():
prepare_locale()
prepare_gettext()
from gi.repository import Gio
resource = Gio.Resource.load(os.path.join(
pkgdatadir
, 'briar-gtk.gresource'))
def prepare_resource():
resource = Gio.Resource.load(os.path.join(
PACKAGE_DATA_DIR
, 'briar-gtk.gresource'))
resource._register()
def prepare():
add_package_to_sys_path()
handle_sigint_default_way()
prepare_localization()
prepare_resource()
def start_application():
from briar.gtk.application import Application
sys.exit(Application("@VERSION@").run(sys.argv))
if __name__ == '__main__':
prepare()
start_application()
This diff is collapsed.
Click to expand it.
src/meson.build
+
6
−
6
View file @
53735119
...
...
@@ -2,16 +2,16 @@
# SPDX-License-Identifier: AGPL-3.0-only
# License-Filename: LICENSE.md
pkgdatadir
=
join_paths
(
get_option
(
'prefix'
),
get_option
(
'datadir'
),
meson
.
project_name
())
moduledir
=
join_paths
(
pkgdatadir
,
'briar'
)
PACKAGE_DATA_DIR
=
join_paths
(
get_option
(
'prefix'
),
get_option
(
'datadir'
),
meson
.
project_name
())
MODULE_DIR
=
join_paths
(
PACKAGE_DATA_DIR
,
'briar'
)
python3
=
import
(
'python3'
)
conf
=
configuration_data
()
conf
.
set
(
'PYTHON'
,
python3
.
find_python
().
path
())
conf
.
set
(
'VERSION'
,
meson
.
project_version
())
conf
.
set
(
'
localedir
'
,
join_paths
(
get_option
(
'prefix'
),
get_option
(
'localedir'
)))
conf
.
set
(
'
pkgdatadir'
,
pkgdatadir
)
conf
.
set
(
'
LOCALE_DIR
'
,
join_paths
(
get_option
(
'prefix'
),
get_option
(
'localedir'
)))
conf
.
set
(
'
PACKAGE_DATA_DIR'
,
PACKAGE_DATA_DIR
)
configure_file
(
input
:
'briar-gtk.in'
,
...
...
@@ -21,5 +21,5 @@ configure_file(
install_dir
:
get_option
(
'bindir'
)
)
install_subdir
(
'briar/api'
,
install_dir
:
moduledir
)
install_subdir
(
'briar/gtk'
,
install_dir
:
moduledir
)
install_subdir
(
'briar/api'
,
install_dir
:
MODULE_DIR
)
install_subdir
(
'briar/gtk'
,
install_dir
:
MODULE_DIR
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment