Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
218
Issues
218
List
Boards
Labels
Milestones
Merge Requests
25
Merge Requests
25
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim
Commits
d47bee03
Commit
d47bee03
authored
Sep 06, 2019
by
Daniel Brötzmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Accept default button, adapt some text strings
parent
a27a4003
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
50 deletions
+51
-50
gajim/chat_control.py
gajim/chat_control.py
+1
-1
gajim/chat_control_base.py
gajim/chat_control_base.py
+3
-3
gajim/dialogs.py
gajim/dialogs.py
+11
-10
gajim/groupchat_control.py
gajim/groupchat_control.py
+4
-5
gajim/gtk/accounts.py
gajim/gtk/accounts.py
+8
-10
gajim/gtk/filetransfer.py
gajim/gtk/filetransfer.py
+8
-8
gajim/gui_interface.py
gajim/gui_interface.py
+6
-6
gajim/history_manager.py
gajim/history_manager.py
+3
-3
gajim/message_window.py
gajim/message_window.py
+5
-3
gajim/roster_window.py
gajim/roster_window.py
+2
-1
No files found.
gajim/chat_control.py
View file @
d47bee03
...
@@ -1152,7 +1152,7 @@ class ChatControl(ChatControlBase):
...
@@ -1152,7 +1152,7 @@ class ChatControl(ChatControlBase):
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
callback
=
lambda
:
on_no
(
self
)),
callback
=
lambda
:
on_no
(
self
)),
DialogButton
.
make
(
'Remove'
,
DialogButton
.
make
(
'Remove'
,
text
=
_
(
'Close'
),
text
=
_
(
'
_
Close'
),
callback
=
lambda
:
on_yes
(
self
))],
callback
=
lambda
:
on_yes
(
self
))],
transient_for
=
self
.
parent_win
.
window
)
.
show
()
transient_for
=
self
.
parent_win
.
window
)
.
show
()
return
return
...
...
gajim/chat_control_base.py
View file @
d47bee03
...
@@ -1168,12 +1168,12 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
...
@@ -1168,12 +1168,12 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
NewConfirmationDialog
(
NewConfirmationDialog
(
_
(
'Privacy'
),
_
(
'Privacy'
),
_
(
'Warning'
),
_
(
'Warning'
),
_
(
'If you send a file to <b>
%
s</b>, '
_
(
'If you send a file to <b>
%
s</b>,
your real XMPP
'
'
your real JID
will be revealed.'
%
gc_contact
.
name
),
'
address
will be revealed.'
%
gc_contact
.
name
),
[
DialogButton
.
make
(
'Cancel'
),
[
DialogButton
.
make
(
'Cancel'
),
DialogButton
.
make
(
DialogButton
.
make
(
'OK'
,
'OK'
,
text
=
_
(
'Continue'
),
text
=
_
(
'
_
Continue'
),
callback
=
lambda
:
_on_ok
(
gc_contact
))])
.
show
()
callback
=
lambda
:
_on_ok
(
gc_contact
))])
.
show
()
return
return
_on_ok
(
gc_contact
)
_on_ok
(
gc_contact
)
...
...
gajim/dialogs.py
View file @
d47bee03
...
@@ -667,11 +667,12 @@ class ChangeStatusMessageDialog(TimeoutDialog):
...
@@ -667,11 +667,12 @@ class ChangeStatusMessageDialog(TimeoutDialog):
self
.
countdown_enabled
=
False
self
.
countdown_enabled
=
False
start_iter
,
finish_iter
=
self
.
message_buffer
.
get_bounds
()
start_iter
,
finish_iter
=
self
.
message_buffer
.
get_bounds
()
status_message_to_save_as_preset
=
self
.
message_buffer
.
get_text
(
status_message_to_save_as_preset
=
self
.
message_buffer
.
get_text
(
start_iter
,
finish_iter
,
True
)
start_iter
,
finish_iter
,
True
)
def
on_ok
(
msg_name
):
def
on_ok
(
msg_name
):
msg_text
=
status_message_to_save_as_preset
msg_text
=
status_message_to_save_as_preset
msg_text_1l
=
helpers
.
to_one_line
(
msg_text
)
msg_text_1l
=
helpers
.
to_one_line
(
msg_text
)
if
not
msg_name
:
# msg_name was ''
if
not
msg_name
:
# msg_name was ''
msg_name
=
msg_text_1l
msg_name
=
msg_text_1l
def
_on_ok2
():
def
_on_ok2
():
...
@@ -681,23 +682,23 @@ class ChangeStatusMessageDialog(TimeoutDialog):
...
@@ -681,23 +682,23 @@ class ChangeStatusMessageDialog(TimeoutDialog):
self
.
pep_dict
.
get
(
'activity_text'
),
self
.
pep_dict
.
get
(
'activity_text'
),
self
.
pep_dict
.
get
(
'mood'
),
self
.
pep_dict
.
get
(
'mood_text'
)]
self
.
pep_dict
.
get
(
'mood'
),
self
.
pep_dict
.
get
(
'mood_text'
)]
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'message'
,
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'message'
,
msg_text_1l
)
msg_text_1l
)
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'activity'
,
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'activity'
,
self
.
pep_dict
.
get
(
'activity'
))
self
.
pep_dict
.
get
(
'activity'
))
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'subactivity'
,
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'subactivity'
,
self
.
pep_dict
.
get
(
'subactivity'
))
self
.
pep_dict
.
get
(
'subactivity'
))
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'activity_text'
,
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'activity_text'
,
self
.
pep_dict
.
get
(
'activity_text'
))
self
.
pep_dict
.
get
(
'activity_text'
))
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'mood'
,
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'mood'
,
self
.
pep_dict
.
get
(
'mood'
))
self
.
pep_dict
.
get
(
'mood'
))
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'mood_text'
,
app
.
config
.
set_per
(
'statusmsg'
,
msg_name
,
'mood_text'
,
self
.
pep_dict
.
get
(
'mood_text'
))
self
.
pep_dict
.
get
(
'mood_text'
))
if
msg_name
in
self
.
preset_messages_dict
:
if
msg_name
in
self
.
preset_messages_dict
:
NewConfirmationDialog
(
NewConfirmationDialog
(
_
(
'Overwrite'
),
_
(
'Overwrite'
),
_
(
'Overwrite Status Message?'
),
_
(
'Overwrite Status Message?'
),
_
(
'
Preset name is already in use.
'
_
(
'
This name is already in use. Do you want to
'
'
Do you want to
overwrite this preset?'
),
'overwrite this preset?'
),
[
DialogButton
.
make
(
'Cancel'
),
[
DialogButton
.
make
(
'Cancel'
),
DialogButton
.
make
(
'Remove'
,
DialogButton
.
make
(
'Remove'
,
text
=
_
(
'_Overwrite'
),
text
=
_
(
'_Overwrite'
),
...
...
gajim/groupchat_control.py
View file @
d47bee03
...
@@ -64,7 +64,6 @@ from gajim.common import contacts
...
@@ -64,7 +64,6 @@ from gajim.common import contacts
from
gajim.common.const
import
StyleAttr
from
gajim.common.const
import
StyleAttr
from
gajim.common.const
import
Chatstate
from
gajim.common.const
import
Chatstate
from
gajim.common.const
import
MUCJoinedState
from
gajim.common.const
import
MUCJoinedState
from
gajim.common.const
import
ButtonAction
from
gajim.chat_control_base
import
ChatControlBase
from
gajim.chat_control_base
import
ChatControlBase
...
@@ -1174,9 +1173,8 @@ class GroupchatControl(ChatControlBase):
...
@@ -1174,9 +1173,8 @@ class GroupchatControl(ChatControlBase):
_
(
'<b>
%
s</b> from <b>
%
s</b> requests voice'
)
%
(
_
(
'<b>
%
s</b> from <b>
%
s</b> requests voice'
)
%
(
event
.
voice_request
.
nick
,
self
.
room_name
),
event
.
voice_request
.
nick
,
self
.
room_name
),
[
DialogButton
.
make
(
'Cancel'
),
[
DialogButton
.
make
(
'Cancel'
),
DialogButton
.
make
(
'OK'
,
DialogButton
.
make
(
'Accept'
,
text
=
_
(
'Approve'
),
text
=
_
(
'_Approve'
),
action
=
ButtonAction
.
SUGGESTED
,
callback
=
on_approve
)],
callback
=
on_approve
)],
modal
=
False
)
.
show
()
modal
=
False
)
.
show
()
...
@@ -2278,8 +2276,9 @@ class GroupchatControl(ChatControlBase):
...
@@ -2278,8 +2276,9 @@ class GroupchatControl(ChatControlBase):
_
(
'_Do not ask me again'
),
_
(
'_Do not ask me again'
),
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
callback
=
on_cancel
),
callback
=
on_cancel
),
DialogButton
.
make
(
'
OK
'
,
DialogButton
.
make
(
'
Accept
'
,
text
=
_
(
'_Leave'
),
text
=
_
(
'_Leave'
),
is_default
=
True
,
callback
=
on_ok
)],
callback
=
on_ok
)],
transient_for
=
self
.
parent_win
.
window
)
.
show
()
transient_for
=
self
.
parent_win
.
window
)
.
show
()
return
return
...
...
gajim/gtk/accounts.py
View file @
d47bee03
...
@@ -139,7 +139,7 @@ class AccountsWindow(Gtk.ApplicationWindow):
...
@@ -139,7 +139,7 @@ class AccountsWindow(Gtk.ApplicationWindow):
_
(
'To apply all changes instantly, you have to re-login.'
),
_
(
'To apply all changes instantly, you have to re-login.'
),
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
text
=
_
(
'_Later'
)),
text
=
_
(
'_Later'
)),
DialogButton
.
make
(
'
OK
'
,
DialogButton
.
make
(
'
Accept
'
,
text
=
_
(
'_Re-Login'
),
text
=
_
(
'_Re-Login'
),
callback
=
lambda
*
args
:
relog
(
account
))],
callback
=
lambda
*
args
:
relog
(
account
))],
transient_for
=
self
)
.
show
()
transient_for
=
self
)
.
show
()
...
@@ -193,8 +193,7 @@ class AccountsWindow(Gtk.ApplicationWindow):
...
@@ -193,8 +193,7 @@ class AccountsWindow(Gtk.ApplicationWindow):
NewConfirmationDialog
(
NewConfirmationDialog
(
_
(
'Remove Account'
),
_
(
'Remove Account'
),
_
(
'You still have open chats in your account
%
s'
)
%
account
,
_
(
'You still have open chats in your account
%
s'
)
%
account
,
_
(
'All chat and group chat windows will be closed.
\n
'
_
(
'All chat and group chat windows will be closed.'
),
'Do you want to continue?'
),
[
DialogButton
.
make
(
'Cancel'
),
[
DialogButton
.
make
(
'Cancel'
),
DialogButton
.
make
(
'Remove'
,
DialogButton
.
make
(
'Remove'
,
callback
=
remove
)],
callback
=
remove
)],
...
@@ -571,8 +570,7 @@ class AccountRow(Gtk.ListBoxRow):
...
@@ -571,8 +570,7 @@ class AccountRow(Gtk.ListBoxRow):
NewConfirmationDialog
(
NewConfirmationDialog
(
_
(
'Disable Account'
),
_
(
'Disable Account'
),
_
(
'Account
%
s is still connected'
)
%
account
,
_
(
'Account
%
s is still connected'
)
%
account
,
_
(
'All chat and group chat windows will be closed. '
_
(
'All chat and group chat windows will be closed.'
),
'Do you want to continue?'
),
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
callback
=
lambda
:
switch
.
set_active
(
True
)),
callback
=
lambda
:
switch
.
set_active
(
True
)),
DialogButton
.
make
(
'Remove'
,
DialogButton
.
make
(
'Remove'
,
...
@@ -972,13 +970,13 @@ class RemoveAccountWindow:
...
@@ -972,13 +970,13 @@ class RemoveAccountWindow:
else
:
else
:
self
.
_on_remove_success
(
True
)
self
.
_on_remove_success
(
True
)
if
self
.
account
in
app
.
connections
and
\
if
(
self
.
account
in
app
.
connections
and
app
.
connections
[
self
.
account
]
.
connected
:
app
.
connections
[
self
.
account
]
.
connected
)
:
NewConfirmationDialog
(
NewConfirmationDialog
(
_
(
'Remove Account'
),
_
(
'Remove Account'
),
_
(
'
Account
\'
%
s
\'
is still connected to the '
_
(
'
Still connected to the server'
),
'server'
)
%
self
.
account
,
_
(
'Account
\'
%
s
\'
is still connected to the server. If you '
_
(
'If you remove it, the connection will be lost.'
)
,
'remove it, the connection will be lost.'
)
%
self
.
account
,
[
DialogButton
.
make
(
'Cancel'
),
[
DialogButton
.
make
(
'Cancel'
),
DialogButton
.
make
(
'Remove'
,
DialogButton
.
make
(
'Remove'
,
callback
=
remove
)],
callback
=
remove
)],
...
...
gajim/gtk/filetransfer.py
View file @
d47bee03
...
@@ -336,7 +336,7 @@ class FileTransfersWindow:
...
@@ -336,7 +336,7 @@ class FileTransfersWindow:
'Do you want to download it again?'
)
%
file_name
,
'Do you want to download it again?'
)
%
file_name
,
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
text
=
_
(
'_No'
)),
text
=
_
(
'_No'
)),
DialogButton
.
make
(
'
OK
'
,
DialogButton
.
make
(
'
Accept
'
,
text
=
_
(
'_Download Again'
),
text
=
_
(
'_Download Again'
),
callback
=
on_yes
,
callback
=
on_yes
,
args
=
[
jid
,
args
=
[
jid
,
...
@@ -421,16 +421,17 @@ class FileTransfersWindow:
...
@@ -421,16 +421,17 @@ class FileTransfersWindow:
NewConfirmationDialog
(
NewConfirmationDialog
(
_
(
'File Transfer Conflict'
),
_
(
'File Transfer Conflict'
),
_
(
'
This f
ile already exists'
),
_
(
'
F
ile already exists'
),
_
(
'Resume download or replace file?'
),
_
(
'Resume download or replace file?'
),
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
callback
=
_on_cancel
),
callback
=
_on_cancel
),
DialogButton
.
make
(
'OK'
,
text
=
_
(
'Replace _File'
),
callback
=
_on_replace
),
DialogButton
.
make
(
'OK'
,
DialogButton
.
make
(
'OK'
,
text
=
_
(
'Resume _Download'
),
text
=
_
(
'Resume _Download'
),
callback
=
_on_resume
)])
.
show
()
callback
=
_on_resume
),
DialogButton
.
make
(
'Accept'
,
text
=
_
(
'Replace _File'
),
is_default
=
True
,
callback
=
_on_replace
)])
.
show
()
# File does not exist yet
# File does not exist yet
dirname
=
os
.
path
.
dirname
(
file_path
)
dirname
=
os
.
path
.
dirname
(
file_path
)
...
@@ -486,8 +487,7 @@ class FileTransfersWindow:
...
@@ -486,8 +487,7 @@ class FileTransfersWindow:
sectext
,
sectext
,
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
callback
=
_on_cancel
),
callback
=
_on_cancel
),
DialogButton
.
make
(
'OK'
,
DialogButton
.
make
(
'Accept'
,
text
=
_
(
'_Accept'
),
callback
=
_on_ok
)])
.
show
()
callback
=
_on_ok
)])
.
show
()
def
set_status
(
self
,
file_props
,
status
):
def
set_status
(
self
,
file_props
,
status
):
...
...
gajim/gui_interface.py
View file @
d47bee03
...
@@ -167,7 +167,7 @@ class Interface:
...
@@ -167,7 +167,7 @@ class Interface:
obj
.
stanza
,
answer
)
obj
.
stanza
,
answer
)
account
=
obj
.
conn
.
name
account
=
obj
.
conn
.
name
pri_msg
=
_
(
'HTTP (
%(method)
s) Authorization '
message
=
_
(
'HTTP (
%(method)
s) Authorization '
'for
%(url)
s (ID:
%(id)
s)'
)
%
{
'for
%(url)
s (ID:
%(id)
s)'
)
%
{
'method'
:
obj
.
method
,
'method'
:
obj
.
method
,
'url'
:
obj
.
url
,
'url'
:
obj
.
url
,
...
@@ -177,17 +177,17 @@ class Interface:
...
@@ -177,17 +177,17 @@ class Interface:
sec_msg
=
_
(
'Do you accept this request (account:
%
s)?'
)
%
account
sec_msg
=
_
(
'Do you accept this request (account:
%
s)?'
)
%
account
if
obj
.
msg
:
if
obj
.
msg
:
sec_msg
=
obj
.
msg
+
'
\n
'
+
sec_msg
sec_msg
=
obj
.
msg
+
'
\n
'
+
sec_msg
message
=
message
+
'
\n
'
+
sec_msg
NewConfirmationDialog
(
NewConfirmationDialog
(
_
(
'Authorization'
),
_
(
'Authorization
Request
'
),
pri_msg
,
_
(
'HTTP Authorization Request'
)
,
sec_msg
,
message
,
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
text
=
_
(
'_No'
),
text
=
_
(
'_No'
),
callback
=
_response
,
callback
=
_response
,
args
=
[
obj
,
'yes'
]),
args
=
[
obj
,
'yes'
]),
DialogButton
.
make
(
'OK'
,
DialogButton
.
make
(
'Accept'
,
text
=
_
(
'_Accept'
),
callback
=
_response
,
callback
=
_response
,
args
=
[
obj
,
'no'
])])
.
show
()
args
=
[
obj
,
'no'
])])
.
show
()
...
...
gajim/history_manager.py
View file @
d47bee03
...
@@ -245,9 +245,9 @@ class HistoryManager:
...
@@ -245,9 +245,9 @@ class HistoryManager:
NewConfirmationDialog
(
NewConfirmationDialog
(
_
(
'Database Cleanup'
),
_
(
'Database Cleanup'
),
_
(
'
Do you want to clean up the database? '
_
(
'
Clean up the database?'
),
'(STRONGLY NOT RECOMMENDED IF GAJIM IS RUNNING)'
),
_
(
'This is STRONGLY NOT RECOMMENDED IF GAJIM IS RUNNING.
\n
'
_
(
'Normally, the allocated database size will not be freed, it '
'Normally, the allocated database size will not be freed, it '
'will just become reusable. This operation may take a while.'
),
'will just become reusable. This operation may take a while.'
),
[
DialogButton
.
make
(
'Cancel'
,
[
DialogButton
.
make
(
'Cancel'
,
callback
=
_on_no
),
callback
=
_on_no
),
...
...
gajim/message_window.py
View file @
d47bee03
...
@@ -358,11 +358,13 @@ class MessageWindow:
...
@@ -358,11 +358,13 @@ class MessageWindow:
NewConfirmationCheckDialog
(
NewConfirmationCheckDialog
(
_
(
'Close Tabs'
),
_
(
'Close Tabs'
),
_
(
'You are
going
to close several tabs'
),
_
(
'You are
about
to close several tabs'
),
_
(
'Do you really want to close
them all
?'
),
_
(
'Do you really want to close
all of them
?'
),
_
(
'_Do not ask me again'
),
_
(
'_Do not ask me again'
),
[
DialogButton
.
make
(
'Cancel'
),
[
DialogButton
.
make
(
'Cancel'
),
DialogButton
.
make
(
'OK'
,
DialogButton
.
make
(
'Accept'
,
text
=
_
(
'_Close'
),
is_default
=
True
,
callback
=
_on_yes1
)],
callback
=
_on_yes1
)],
transient_for
=
self
.
window
)
.
show
()
transient_for
=
self
.
window
)
.
show
()
return
True
return
True
...
...
gajim/roster_window.py
View file @
d47bee03
...
@@ -4125,8 +4125,9 @@ class RosterWindow:
...
@@ -4125,8 +4125,9 @@ class RosterWindow:
sectext
,
sectext
,
_
(
'_Do not ask me again'
),
_
(
'_Do not ask me again'
),
[
DialogButton
.
make
(
'Cancel'
),
[
DialogButton
.
make
(
'Cancel'
),
DialogButton
.
make
(
'
OK
'
,
DialogButton
.
make
(
'
Accept
'
,
text
=
_
(
'_Create'
),
text
=
_
(
'_Create'
),
is_default
=
True
,
callback
=
merge_contacts
)])
.
show
()
callback
=
merge_contacts
)])
.
show
()
def
on_drop_in_group
(
self
,
widget
,
account
,
c_source
,
grp_dest
,
def
on_drop_in_group
(
self
,
widget
,
account
,
c_source
,
grp_dest
,
...
...
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