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
Merge requests
!61
Warn users of closure
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Warn users of closure
54-warn-closure
into
main
Overview
0
Commits
1
Pipelines
2
Changes
11
Merged
Nico
requested to merge
54-warn-closure
into
main
4 years ago
Overview
0
Commits
1
Pipelines
2
Changes
11
Expand
Closes
#54 (closed)
0
0
Merge request reports
Compare
main
version 1
1158f96c
4 years ago
main (base)
and
latest version
latest version
7e4748e0
1 commit,
4 years ago
version 1
1158f96c
1 commit,
4 years ago
11 files
+
69
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Search (e.g. *.vue) (Ctrl+P)
briar-gtk/briar_gtk/window.py
+
29
−
1
Options
@@ -2,7 +2,8 @@
# SPDX-License-Identifier: AGPL-3.0-only
# License-Filename: LICENSE.md
from
gi.repository
import
Gtk
from
gettext
import
gettext
as
_
from
gi.repository
import
Gio
,
Gtk
from
briar_gtk.actions.window
import
WindowActions
from
briar_gtk.containers.add_contact
import
AddContactContainer
@@ -29,6 +30,33 @@ class Window(Gtk.ApplicationWindow):
self
.
current_container
.
destroy
()
self
.
_setup_add_contact_container
()
# pylint: disable=arguments-differ,unused-argument
def
do_delete_event
(
self
,
event
):
settings
=
Gio
.
Settings
.
new
(
APPLICATION_ID
)
if
settings
.
get_boolean
(
"
quit-dialog-shown
"
):
return
False
# closes the window
settings
.
set_boolean
(
"
quit-dialog-shown
"
,
True
)
confirmation_dialog
=
Gtk
.
MessageDialog
(
transient_for
=
self
,
flags
=
Gtk
.
DialogFlags
.
MODAL
,
message_type
=
Gtk
.
MessageType
.
WARNING
,
buttons
=
Gtk
.
ButtonsType
.
OK_CANCEL
,
text
=
_
(
"
Are you sure you want to exit?
"
)
)
confirmation_dialog
.
format_secondary_text
(
_
(
"
Once you close Briar, you
'
ll no longer receive or send
"
"
pending messages. Keep Briar open to stay connected
"
"
with your contacts.
"
)
)
response
=
confirmation_dialog
.
run
()
confirmation_dialog
.
destroy
()
if
response
==
Gtk
.
ResponseType
.
OK
:
return
False
# closes the window
return
True
# keeps the window open
def
_initialize_gtk_application_window
(
self
):
Gtk
.
ApplicationWindow
.
__init__
(
self
,
application
=
APP
(),
title
=
APPLICATION_NAME
,
Loading