Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Weblate
gajim
Commits
79fb2411
Commit
79fb2411
authored
17 years ago
by
steve-e
Browse files
Options
Downloads
Patches
Plain Diff
Replace the broken gpg-togglebutton by an insensitve status image. See #3196
parent
40af7bfc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
data/glade/message_window.glade
+29
-39
29 additions, 39 deletions
data/glade/message_window.glade
src/chat_control.py
+23
-3
23 additions, 3 deletions
src/chat_control.py
with
52 additions
and
42 deletions
data/glade/message_window.glade
+
29
−
39
View file @
79fb2411
...
...
@@ -108,15 +108,37 @@
</widget>
</child>
<child>
<widget
class=
"Gtk
ScrolledWindow"
id=
"message_scrolledwindow
"
>
<widget
class=
"Gtk
HBox"
id=
"hbox1
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"border_width"
>
3
</property>
<property
name=
"hscrollbar_policy"
>
GTK_POLICY_NEVER
</property>
<property
name=
"vscrollbar_policy"
>
GTK_POLICY_NEVER
</property>
<property
name=
"shadow_type"
>
GTK_SHADOW_IN
</property>
<property
name=
"events"
>
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
</property>
<child>
<placeholder/>
<widget
class=
"GtkImage"
id=
"lock_image"
>
<property
name=
"events"
>
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
</property>
<property
name=
"no_show_all"
>
True
</property>
<property
name=
"has_tooltip"
>
True
</property>
<property
name=
"tooltip_markup"
>
<
b
>
markuptest
<
/b
>
</property>
<property
name=
"tooltip_text"
>
tooltip test
</property>
<property
name=
"stock"
>
gtk-dialog-authentication
</property>
</widget>
<packing>
<property
name=
"expand"
>
False
</property>
</packing>
</child>
<child>
<widget
class=
"GtkScrolledWindow"
id=
"message_scrolledwindow"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"border_width"
>
3
</property>
<property
name=
"hscrollbar_policy"
>
GTK_POLICY_NEVER
</property>
<property
name=
"vscrollbar_policy"
>
GTK_POLICY_NEVER
</property>
<property
name=
"shadow_type"
>
GTK_SHADOW_IN
</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</widget>
<packing>
...
...
@@ -136,38 +158,6 @@
<widget
class=
"GtkHBox"
id=
"hbox3006"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"spacing"
>
1
</property>
<child>
<widget
class=
"GtkEventBox"
id=
"gpg_eventbox"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
OpenPGP Encryption
</property>
<child>
<widget
class=
"GtkToggleButton"
id=
"gpg_togglebutton"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"relief"
>
GTK_RELIEF_NONE
</property>
<property
name=
"focus_on_click"
>
False
</property>
<property
name=
"response_id"
>
0
</property>
<child>
<widget
class=
"GtkImage"
id=
"image1333"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"stock"
>
gtk-dialog-authentication
</property>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property
name=
"expand"
>
False
</property>
</packing>
</child>
<child>
<widget
class=
"GtkVSeparator"
id=
"vseparator4"
>
<property
name=
"visible"
>
True
</property>
</widget>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</widget>
</child>
<child>
...
...
This diff is collapsed.
Click to expand it.
src/chat_control.py
+
23
−
3
View file @
79fb2411
...
...
@@ -1017,7 +1017,11 @@ class ChatControl(ChatControlBase):
self
.
chat_buttons_set_visible
(
compact_view
)
self
.
widget_set_visible
(
self
.
xml
.
get_widget
(
'
banner_eventbox
'
),
gajim
.
config
.
get
(
'
hide_chat_banner
'
))
# Add lock image to show chat encryption
self
.
lock_image
=
self
.
xml
.
get_widget
(
'
lock_image
'
)
self
.
lock_tooltip
=
gtk
.
Tooltips
()
# keep timeout id and window obj for possible big avatar
# it is on enter-notify and leave-notify so no need to be per jid
self
.
show_bigger_avatar_timeout_id
=
None
...
...
@@ -1063,6 +1067,7 @@ class ChatControl(ChatControlBase):
gajim
.
encrypted_chats
[
self
.
account
].
append
(
contact
.
jid
)
msg
=
_
(
'
GPG encryption enabled
'
)
ChatControlBase
.
print_conversation_line
(
self
,
msg
,
'
status
'
,
''
,
None
)
self
.
_show_lock_image
(
self
.
gpg_is_active
,
'
GPG
'
,
self
.
gpg_is_active
,
True
)
self
.
status_tooltip
=
gtk
.
Tooltips
()
self
.
update_ui
()
...
...
@@ -1277,6 +1282,18 @@ class ChatControl(ChatControlBase):
gajim
.
config
.
set_per
(
'
contacts
'
,
self
.
contact
.
jid
,
'
gpg_enabled
'
,
self
.
gpg_is_active
)
ChatControlBase
.
print_conversation_line
(
self
,
msg
,
'
status
'
,
''
,
None
)
self
.
_show_lock_image
(
self
.
gpg_is_active
,
'
GPG
'
,
self
.
gpg_is_active
,
True
)
def
_show_lock_image
(
self
,
visible
,
enc_type
=
''
,
enc_enabled
=
False
,
chat_logged
=
False
):
'''
Set lock icon visibiity and create tooltip
'''
status_string
=
enc_enabled
and
'
is
'
or
'
is NOT
'
logged_string
=
chat_logged
and
'
will
'
or
'
will NOT
'
tooltip
=
'
%s Encryption %s active.
\n
Your chat session %s be logged.
'
%
\
(
enc_type
,
status_string
,
logged_string
)
self
.
lock_tooltip
.
set_tip
(
self
.
lock_image
,
tooltip
)
self
.
widget_set_visible
(
self
.
lock_image
,
not
visible
)
self
.
lock_image
.
set_sensitive
(
enc_enabled
)
def
_process_command
(
self
,
message
):
if
message
[
0
]
!=
'
/
'
:
...
...
@@ -1465,9 +1482,10 @@ class ChatControl(ChatControlBase):
msg
=
_
(
'
Session negotiation cancelled
'
)
ChatControlBase
.
print_conversation_line
(
self
,
msg
,
'
status
'
,
''
,
None
)
# print esession settings to textview
def
print_esession_details
(
self
):
if
self
.
session
and
self
.
session
.
enable_encryption
:
'''
print esession settings to textview
'''
e2e_is_active
=
self
.
session
and
self
.
session
.
enable_encryption
if
e2e_is_active
:
msg
=
_
(
'
E2E encryption enabled
'
)
ChatControlBase
.
print_conversation_line
(
self
,
msg
,
'
status
'
,
''
,
None
)
...
...
@@ -1480,6 +1498,8 @@ class ChatControl(ChatControlBase):
else
:
msg
=
_
(
'
E2E encryption disabled
'
)
ChatControlBase
.
print_conversation_line
(
self
,
msg
,
'
status
'
,
''
,
None
)
self
.
_show_lock_image
(
e2e_is_active
,
'
E2E
'
,
e2e_is_active
,
self
.
session
and
\
self
.
session
.
loggable
)
def
print_conversation
(
self
,
text
,
frm
=
''
,
tim
=
None
,
encrypted
=
False
,
subject
=
None
,
xhtml
=
None
):
...
...
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