Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
197
Issues
197
List
Boards
Labels
Service Desk
Milestones
Merge Requests
20
Merge Requests
20
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim
Commits
ab74eb8d
Commit
ab74eb8d
authored
Jun 21, 2019
by
Daniel Brötzmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused ConfirmationDialogCheck
parent
70ebcb6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
52 deletions
+0
-52
gajim/gtk/dialogs.py
gajim/gtk/dialogs.py
+0
-52
No files found.
gajim/gtk/dialogs.py
View file @
ab74eb8d
...
...
@@ -330,58 +330,6 @@ def is_checked(self):
return
self
.
checkbutton
.
get_active
()
class
ConfirmationDialogCheck
(
ConfirmationDialog
):
"""
HIG compliant confirmation dialog with checkbutton
"""
def
__init__
(
self
,
pritext
,
sectext
=
''
,
checktext
=
''
,
on_response_ok
=
None
,
on_response_cancel
=
None
,
is_modal
=
True
,
transient_for
=
None
):
self
.
user_response_ok
=
on_response_ok
self
.
user_response_cancel
=
on_response_cancel
if
transient_for
is
None
:
transient_for
=
app
.
app
.
get_active_window
()
HigDialog
.
__init__
(
self
,
transient_for
,
Gtk
.
MessageType
.
QUESTION
,
Gtk
.
ButtonsType
.
OK_CANCEL
,
pritext
,
sectext
,
self
.
on_response_ok
,
self
.
on_response_cancel
)
self
.
set_default_response
(
Gtk
.
ResponseType
.
OK
)
ok_button
=
self
.
get_widget_for_response
(
Gtk
.
ResponseType
.
OK
)
ok_button
.
grab_focus
()
self
.
checkbutton
=
Gtk
.
CheckButton
.
new_with_mnemonic
(
checktext
)
self
.
get_content_area
().
pack_start
(
self
.
checkbutton
,
False
,
True
,
0
)
self
.
set_modal
(
is_modal
)
self
.
popup
()
def
on_response_ok
(
self
,
widget
):
if
self
.
user_response_ok
:
if
isinstance
(
self
.
user_response_ok
,
tuple
):
self
.
user_response_ok
[
0
](
self
.
is_checked
(),
*
self
.
user_response_ok
[
1
:])
else
:
self
.
user_response_ok
(
self
.
is_checked
())
self
.
call_cancel_on_destroy
=
False
self
.
destroy
()
def
on_response_cancel
(
self
,
widget
):
if
self
.
user_response_cancel
:
if
isinstance
(
self
.
user_response_cancel
,
tuple
):
self
.
user_response_cancel
[
0
](
self
.
is_checked
(),
*
self
.
user_response_cancel
[
1
:])
else
:
self
.
user_response_cancel
(
self
.
is_checked
())
self
.
call_cancel_on_destroy
=
False
self
.
destroy
()
def
is_checked
(
self
):
"""
Get active state of the checkbutton
"""
return
self
.
checkbutton
.
get_active
()
class
ConfirmationDialogDoubleCheck
(
ConfirmationDialog
):
"""
HIG compliant confirmation dialog with 2 checkbuttons
...
...
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