Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
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
Evert Mouw
gajim-plugins
Commits
b17e4dcc
Commit
b17e4dcc
authored
7 years ago
by
Dicson
Browse files
Options
Downloads
Patches
Plain Diff
[image] Fix button
parent
be3f2d16
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
image/image.py
+8
-5
8 additions, 5 deletions
image/image.py
image/manifest.ini
+1
-1
1 addition, 1 deletion
image/manifest.ini
with
9 additions
and
6 deletions
image/image.py
+
8
−
5
View file @
b17e4dcc
...
...
@@ -52,7 +52,7 @@ class ImagePlugin(GajimPlugin):
if
base
.
chat_control
==
chat_control
:
is_support_xhtml
=
chat_control
.
contact
.
supports
(
NS_XHTML_IM
)
base
.
button
.
set_sensitive
(
is_support_xhtml
and
not
\
chat_control
.
gpg_is_active
)
chat_control
.
encryption
)
if
not
is_support_xhtml
:
text
=
_
(
'
This contact does not support XHTML_IM
'
)
else
:
...
...
@@ -64,13 +64,16 @@ class Base(object):
def
__init__
(
self
,
plugin
,
chat_control
):
self
.
plugin
=
plugin
self
.
chat_control
=
chat_control
actions_hbox
=
chat_control
.
xml
.
get_object
(
'
actions_
hbox
'
)
actions_hbox
=
chat_control
.
xml
.
get_object
(
'
hbox
'
)
self
.
button
=
Gtk
.
Button
(
label
=
None
,
stock
=
None
,
use_underline
=
True
)
self
.
button
.
get_style_context
().
add_class
(
'
chatcontrol-actionbar-button
'
)
self
.
button
.
set_property
(
'
relief
'
,
Gtk
.
ReliefStyle
.
NONE
)
self
.
button
.
set_property
(
'
can-focus
'
,
False
)
img
=
Gtk
.
Image
()
img
.
set_from_stock
(
'
gtk-orientation-portrait
'
,
Gtk
.
IconSize
.
MENU
)
img
.
set_from_icon_name
(
'
image-x-generic-symbolic.symbolic
'
,
Gtk
.
IconSize
.
MENU
)
self
.
button
.
set_image
(
img
)
self
.
button
.
set_tooltip_text
(
'
Send image (Alt+L)
'
)
ag
=
Gtk
.
accel_groups_from_object
(
self
.
chat_control
.
parent_win
.
window
)[
0
]
...
...
@@ -79,7 +82,7 @@ class Base(object):
actions_hbox
.
pack_start
(
self
.
button
,
False
,
False
,
0
)
actions_hbox
.
reorder_child
(
self
.
button
,
len
(
actions_hbox
.
get_children
())
-
3
)
len
(
actions_hbox
.
get_children
())
-
2
)
id_
=
self
.
button
.
connect
(
'
clicked
'
,
self
.
on_image_button_clicked
)
self
.
button
.
show
()
...
...
@@ -135,5 +138,5 @@ class Base(object):
dlg
=
ImageChooserDialog
(
on_response_ok
=
on_ok
,
on_response_cancel
=
None
)
def
disconnect_from_chat_control
(
self
):
actions_hbox
=
self
.
chat_control
.
xml
.
get_object
(
'
actions_
hbox
'
)
actions_hbox
=
self
.
chat_control
.
xml
.
get_object
(
'
hbox
'
)
actions_hbox
.
remove
(
self
.
button
)
This diff is collapsed.
Click to expand it.
image/manifest.ini
+
1
−
1
View file @
b17e4dcc
[info]
name:
Image
short_name:
image
version:
0.
5.2
version:
0.
6
description:
This
plugin
is
designed
to
send
a
small(0
-
40
kb)
graphic
image
to
your
contact.
Client
on
the
other
side
must
support
XEP-0071:
XHTML-IM
and
maintain
the
scheme
data:
URI.
Psi+
and
Jabbim
supported
this.
...
...
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