Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
briar
Briar GTK
Commits
a47cd11d
Commit
a47cd11d
authored
Mar 23, 2020
by
Nico Alt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Abstract resources directory path in containers
parent
8a7c30b6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
16 deletions
+22
-16
briar-gtk/briar_gtk/container.py
briar-gtk/briar_gtk/container.py
+5
-0
briar-gtk/briar_gtk/containers/add_contact.py
briar-gtk/briar_gtk/containers/add_contact.py
+2
-2
briar-gtk/briar_gtk/containers/login.py
briar-gtk/briar_gtk/containers/login.py
+2
-2
briar-gtk/briar_gtk/containers/main_window.py
briar-gtk/briar_gtk/containers/main_window.py
+6
-6
briar-gtk/briar_gtk/containers/private_chat.py
briar-gtk/briar_gtk/containers/private_chat.py
+2
-2
briar-gtk/briar_gtk/containers/registration.py
briar-gtk/briar_gtk/containers/registration.py
+3
-3
briar-gtk/briar_gtk/define.py
briar-gtk/briar_gtk/define.py
+2
-1
No files found.
briar-gtk/briar_gtk/container.py
View file @
a47cd11d
...
...
@@ -4,9 +4,14 @@
from
gi.repository.Gtk
import
Builder
,
Overlay
from
briar_gtk.define
import
RESOURCES_DIR
class
Container
(
Overlay
):
def
__init__
(
self
):
super
().
__init__
()
self
.
builder
=
Builder
()
def
_add_from_resource
(
self
,
ui_filename
):
self
.
builder
.
add_from_resource
(
RESOURCES_DIR
+
ui_filename
)
briar-gtk/briar_gtk/containers/add_contact.py
View file @
a47cd11d
...
...
@@ -14,7 +14,7 @@ from briar_gtk.define import APP
class
AddContactContainer
(
Container
):
ADD_CONTACT_UI
=
"
/app/briar/gtk/
add_contact.ui"
ADD_CONTACT_UI
=
"add_contact.ui"
STACK_NAME
=
"add_contact_flow_stack"
HEADERS_NAME
=
"add_contact_flow_headers"
...
...
@@ -24,7 +24,7 @@ class AddContactContainer(Container):
self
.
_load_content
()
def
_setup_view
(
self
):
self
.
builder
.
add_from_resource
(
self
.
ADD_CONTACT_UI
)
self
.
_
add_from_resource
(
self
.
ADD_CONTACT_UI
)
self
.
builder
.
connect_signals
(
self
)
self
.
_setup_add_contact_flow_stack
()
...
...
briar-gtk/briar_gtk/containers/login.py
View file @
a47cd11d
...
...
@@ -10,7 +10,7 @@ from briar_gtk.define import APP
class
LoginContainer
(
Container
):
LOGIN_UI
=
"
/app/briar/gtk/
login.ui"
LOGIN_UI
=
"login.ui"
STACK_NAME
=
"login_flow_stack"
HEADERS_NAME
=
"login_flow_headers"
...
...
@@ -20,7 +20,7 @@ class LoginContainer(Container):
self
.
_setup_view
()
def
_setup_view
(
self
,
):
self
.
builder
.
add_from_resource
(
self
.
LOGIN_UI
)
self
.
_
add_from_resource
(
self
.
LOGIN_UI
)
self
.
builder
.
connect_signals
(
self
)
self
.
_setup_login_flow_stack
()
...
...
briar-gtk/briar_gtk/containers/main_window.py
View file @
a47cd11d
...
...
@@ -19,9 +19,9 @@ from briar_gtk.define import APP
class
MainWindowContainer
(
Container
):
CONTAINER_UI
=
"
/app/briar/gtk/
main_window.ui"
MENU_UI
=
"
/app/briar/gtk/
main_menu.ui"
ABOUT_UI
=
"
/app/briar/gtk/
about_dialog.ui"
CONTAINER_UI
=
"main_window.ui"
MENU_UI
=
"main_menu.ui"
ABOUT_UI
=
"about_dialog.ui"
def
__init__
(
self
):
super
().
__init__
()
...
...
@@ -66,7 +66,7 @@ class MainWindowContainer(Container):
# pylint: disable=line-too-long
def
open_about_page
(
self
):
self
.
builder
.
add_from_resource
(
self
.
ABOUT_UI
)
self
.
_
add_from_resource
(
self
.
ABOUT_UI
)
about_dialog
=
self
.
builder
.
get_object
(
"about_dialog"
)
about_dialog
.
set_transient_for
(
APP
().
window
)
...
...
@@ -137,8 +137,8 @@ class MainWindowContainer(Container):
self
.
history_container
.
remove
(
child
)
def
_setup_view
(
self
):
self
.
builder
.
add_from_resource
(
self
.
MENU_UI
)
self
.
builder
.
add_from_resource
(
self
.
CONTAINER_UI
)
self
.
_
add_from_resource
(
self
.
MENU_UI
)
self
.
_
add_from_resource
(
self
.
CONTAINER_UI
)
self
.
builder
.
connect_signals
(
self
)
self
.
_setup_main_window_stack
()
...
...
briar-gtk/briar_gtk/containers/private_chat.py
View file @
a47cd11d
...
...
@@ -19,7 +19,7 @@ from briar_gtk.widgets.private_message import PrivateMessageWidget
# pylint: disable=too-few-public-methods
class
PrivateChatContainer
(
Container
):
CONTAINER_UI
=
"
/app/briar/gtk/
private_chat.ui"
CONTAINER_UI
=
"private_chat.ui"
def
__init__
(
self
,
contact_name
,
contact_id
):
super
().
__init__
()
...
...
@@ -31,7 +31,7 @@ class PrivateChatContainer(Container):
self
.
_load_content
()
def
_setup_view
(
self
):
self
.
builder
.
add_from_resource
(
self
.
CONTAINER_UI
)
self
.
_
add_from_resource
(
self
.
CONTAINER_UI
)
self
.
_messages_box
=
Gtk
.
ListBox
()
self
.
_messages_box
.
get_style_context
().
add_class
(
"messages-history"
)
...
...
briar-gtk/briar_gtk/containers/registration.py
View file @
a47cd11d
...
...
@@ -12,7 +12,7 @@ from briar_gtk.define import APP
class
RegistrationContainer
(
Container
):
REGISTRATION_UI
=
"
/app/briar/gtk/
registration.ui"
REGISTRATION_UI
=
"registration.ui"
STACK_NAME
=
"registration_flow_stack"
HEADERS_NAME
=
"registration_flow_headers"
...
...
@@ -21,8 +21,8 @@ class RegistrationContainer(Container):
self
.
_window
=
window
self
.
_setup_view
()
def
_setup_view
(
self
,
):
self
.
builder
.
add_from_resource
(
self
.
REGISTRATION_UI
)
def
_setup_view
(
self
):
self
.
_
add_from_resource
(
self
.
REGISTRATION_UI
)
self
.
builder
.
connect_signals
(
self
)
self
.
_setup_registration_flow_stack
()
...
...
briar-gtk/briar_gtk/define.py
View file @
a47cd11d
...
...
@@ -10,7 +10,8 @@ from gi.repository import Gio
APPLICATION_ID
=
"app.briar.gtk"
APPLICATION_NAME
=
"Briar"
APPLICATION_STYLING_PATH
=
"resource:///app/briar/gtk/application.css"
RESOURCES_DIR
=
"/app/briar/gtk/"
APPLICATION_STYLING_PATH
=
"resource://"
+
RESOURCES_DIR
+
"application.css"
BRIAR_HEADLESS_JAR
=
"/app/briar/briar-headless.jar"
APP
=
Gio
.
Application
.
get_default
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment