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
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
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-plugins
Commits
da0d5f06
Commit
da0d5f06
authored
Aug 18, 2017
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pluginversions' into 'gtk3'
Use absolute imports on all plugins See merge request
!43
parents
507bf9a9
9ce1c5b9
Changes
67
Hide whitespace changes
Inline
Side-by-side
Showing
67 changed files
with
451 additions
and
452 deletions
+451
-452
anti_spam/anti_spam.py
anti_spam/anti_spam.py
+9
-9
anti_spam/manifest.ini
anti_spam/manifest.ini
+2
-2
banner_tweaks/manifest.ini
banner_tweaks/manifest.ini
+2
-2
banner_tweaks/plugin.py
banner_tweaks/plugin.py
+12
-12
birthday_reminder/manifest.ini
birthday_reminder/manifest.ini
+2
-1
birthday_reminder/plugin.py
birthday_reminder/plugin.py
+9
-9
chatstate/chatstate.py
chatstate/chatstate.py
+17
-17
chatstate/manifest.ini
chatstate/manifest.ini
+2
-2
clickable_nicknames/clickable_nicknames.py
clickable_nicknames/clickable_nicknames.py
+9
-9
clickable_nicknames/manifest.ini
clickable_nicknames/manifest.ini
+2
-2
clients_icons/clients_icons.py
clients_icons/clients_icons.py
+20
-20
clients_icons/manifest.ini
clients_icons/manifest.ini
+2
-2
esessions/esessions.py
esessions/esessions.py
+8
-8
esessions/manifest.ini
esessions/manifest.ini
+2
-2
file_sharing/database.py
file_sharing/database.py
+2
-2
flashing_keyboard/flashing_keyboard.py
flashing_keyboard/flashing_keyboard.py
+12
-12
flashing_keyboard/manifest.ini
flashing_keyboard/manifest.ini
+2
-2
gnome_session_manager/plugin.py
gnome_session_manager/plugin.py
+7
-7
google_translation/manifest.ini
google_translation/manifest.ini
+2
-2
google_translation/plugin.py
google_translation/plugin.py
+5
-8
gui_for_me/gui_for_me.py
gui_for_me/gui_for_me.py
+4
-4
gui_for_me/manifest.ini
gui_for_me/manifest.ini
+2
-2
hamster/hamster.py
hamster/hamster.py
+15
-15
hamster/manifest.ini
hamster/manifest.ini
+2
-2
httpupload/httpupload.py
httpupload/httpupload.py
+11
-10
httpupload/manifest.ini
httpupload/manifest.ini
+2
-2
image/image.py
image/image.py
+4
-4
image/manifest.ini
image/manifest.ini
+2
-2
juick/manifest.ini
juick/manifest.ini
+2
-2
juick/plugin.py
juick/plugin.py
+16
-16
latex/latex.py
latex/latex.py
+5
-5
latex/manifest.ini
latex/manifest.ini
+2
-2
length_notifier/length_notifier.py
length_notifier/length_notifier.py
+3
-3
length_notifier/manifest.ini
length_notifier/manifest.ini
+2
-2
message_box_size/manifest.ini
message_box_size/manifest.ini
+2
-2
message_box_size/msg_box_size.py
message_box_size/msg_box_size.py
+4
-4
mpris2_support/manifest.ini
mpris2_support/manifest.ini
+2
-2
mpris2_support/mpris2_support.py
mpris2_support/mpris2_support.py
+4
-4
now_listen/manifest.ini
now_listen/manifest.ini
+2
-2
now_listen/now_listen.py
now_listen/now_listen.py
+6
-6
offline_bookmarks/offline_bookmarks.py
offline_bookmarks/offline_bookmarks.py
+28
-28
omemo/file_decryption.py
omemo/file_decryption.py
+3
-3
omemo/manifest.ini
omemo/manifest.ini
+2
-2
omemo/omemoplugin.py
omemo/omemoplugin.py
+49
-49
omemo/ui.py
omemo/ui.py
+8
-8
omemo/xmpp.py
omemo/xmpp.py
+7
-7
pgp/manifest.ini
pgp/manifest.ini
+2
-2
pgp/pgpplugin.py
pgp/pgpplugin.py
+14
-14
plugins_translations/manifest.ini
plugins_translations/manifest.ini
+2
-2
plugins_translations/plugins_translations.py
plugins_translations/plugins_translations.py
+5
-5
quick_replies/manifest.ini
quick_replies/manifest.ini
+2
-2
quick_replies/plugin.py
quick_replies/plugin.py
+6
-6
regex_filter/manifest.ini
regex_filter/manifest.ini
+2
-2
regex_filter/regex_filter.py
regex_filter/regex_filter.py
+9
-9
roster_tweaks/manifest.ini
roster_tweaks/manifest.ini
+2
-2
roster_tweaks/roster_tweaks.py
roster_tweaks/roster_tweaks.py
+16
-16
server_status_icons/manifest.ini
server_status_icons/manifest.ini
+2
-2
server_status_icons/server_status_icons.py
server_status_icons/server_status_icons.py
+18
-18
set_location/manifest.ini
set_location/manifest.ini
+2
-2
set_location/set_location.py
set_location/set_location.py
+20
-20
url_image_preview/manifest.ini
url_image_preview/manifest.ini
+2
-2
url_image_preview/url_image_preview.py
url_image_preview/url_image_preview.py
+8
-8
url_shortener/url_shortener.py
url_shortener/url_shortener.py
+4
-4
wicd_support/manifest.ini
wicd_support/manifest.ini
+2
-2
wicd_support/wicd_support.py
wicd_support/wicd_support.py
+9
-9
wrong_layout/manifest.ini
wrong_layout/manifest.ini
+2
-2
wrong_layout/plugin.py
wrong_layout/plugin.py
+5
-5
No files found.
anti_spam/anti_spam.py
View file @
da0d5f06
...
...
@@ -26,11 +26,11 @@ Block some incoming messages
from
gi.repository
import
Gtk
import
nbxmpp
from
common
import
gajim
,
ged
from
gajim.common
import
app
,
ged
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log
,
log_calls
from
plugins.gui
import
GajimPluginConfigDialog
from
gajim.
plugins
import
GajimPlugin
from
gajim.
plugins.helpers
import
log
,
log_calls
from
gajim.
plugins.gui
import
GajimPluginConfigDialog
class
AntiSpamPlugin
(
GajimPlugin
):
...
...
@@ -101,7 +101,7 @@ class AntiSpamPlugin(GajimPlugin):
@
log_calls
(
'AntiSpamPlugin'
)
def
_nec_subscribe_presence_received
(
self
,
obj
):
if
self
.
config
[
'block_subscription_requests'
]
and
\
not
gajim
.
contacts
.
get_contacts
(
obj
.
conn
.
name
,
obj
.
jid
):
not
app
.
contacts
.
get_contacts
(
obj
.
conn
.
name
,
obj
.
jid
):
log
.
info
(
'discarding subscription request from %s'
%
obj
.
jid
)
return
True
...
...
@@ -118,7 +118,7 @@ class AntiSpamPlugin(GajimPlugin):
if
len
(
answer
)
==
0
:
return
False
block_conference
=
self
.
config
[
'antispam_for_conference'
]
is_conference
=
gajim
.
contacts
.
is_gc_contact
(
obj
.
conn
.
name
,
obj
.
fjid
)
is_conference
=
app
.
contacts
.
is_gc_contact
(
obj
.
conn
.
name
,
obj
.
fjid
)
if
not
block_conference
and
is_conference
:
return
False
jid
=
obj
.
jid
if
not
is_conference
else
obj
.
fjid
...
...
@@ -127,7 +127,7 @@ class AntiSpamPlugin(GajimPlugin):
# There are two methods to see who wrote you and not passed filter:
# 1. Using XML console
# 2. Running Gajim with log info messages and see logs (probably gajim.log file)
if
is_conference
or
not
gajim
.
contacts
.
get_contacts
(
obj
.
conn
.
name
,
jid
):
if
is_conference
or
not
app
.
contacts
.
get_contacts
(
obj
.
conn
.
name
,
jid
):
if
not
self
.
contain_answer
(
obj
.
msgtxt
,
answer
):
if
is_conference
and
jid
in
self
.
config
[
'conference_white_list'
]:
return
False
...
...
@@ -164,7 +164,7 @@ class AntiSpamPlugin(GajimPlugin):
receipt
.
setTag
(
'received'
,
namespace
=
'urn:xmpp:receipts'
,
attrs
=
{
'id'
:
obj
.
id_
})
if
obj
.
thread_id
:
receipt
.
setThread
(
obj
.
thread_id
)
gajim
.
connections
[
obj
.
conn
.
name
].
connection
.
send
(
receipt
,
now
=
True
)
app
.
connections
[
obj
.
conn
.
name
].
connection
.
send
(
receipt
,
now
=
True
)
question
=
self
.
config
[
'msgtxt_question'
]
log
.
info
(
'Anti_spam enabled for %s, question: %s'
,
jid
,
question
)
message
=
_
(
'Antispam enabled. Please answer the question. The message must only '
+
\
...
...
@@ -176,7 +176,7 @@ class AntiSpamPlugin(GajimPlugin):
else
:
# for 'normal' type
stanza
=
nbxmpp
.
Message
(
to
=
jid
,
body
=
message
,
subject
=
'Antispam enabled'
,
typ
=
obj
.
mtype
)
gajim
.
connections
[
obj
.
conn
.
name
].
connection
.
send
(
stanza
,
now
=
True
)
app
.
connections
[
obj
.
conn
.
name
].
connection
.
send
(
stanza
,
now
=
True
)
def
contain_answer
(
self
,
msg
,
answer
):
return
answer
in
msg
.
split
(
'
\n
'
)
...
...
anti_spam/manifest.ini
View file @
da0d5f06
[info]
name:
Anti
Spam
short_name:
anti_spam
version:
1.4.
3
version:
1.4.
4
description:
Block
some
incoming
messages.
authors
=
Yann Leboulanger <asterix@lagaule.org>
Denis
Fomin
<fominde@gmail.com>
Ilya
Kanyukov
<ilya.kanukov@gmail.com>
homepage
=
https://dev.gajim.org/gajim/gajim-plugins/wikis/AntiSpamPlugin
min_gajim_version:
0.16.1
0
min_gajim_version:
0.16.1
1
banner_tweaks/manifest.ini
View file @
da0d5f06
[info]
name:
Banner
Tweaks
short_name:
banner_tweaks
version:
0.1.
2
version:
0.1.
3
description:
Allows
user
to
tweak
chat
window
banner
appearance
(eg.
make
it
compact).
authors
=
Mateusz Biliński <mateusz@bilinski.it>
homepage
=
http://trac-plugins.gajim.org/wiki/BannerTweaksPlugin
min_gajim_version:
0.16.1
0
min_gajim_version:
0.16.1
1
banner_tweaks/plugin.py
View file @
da0d5f06
...
...
@@ -33,13 +33,13 @@ import sys
from
gi.repository
import
Gtk
from
gi.repository
import
GObject
import
message_control
from
common
import
gajim
from
common
import
helpers
from
gajim
import
message_control
from
gajim.common
import
app
from
gajim.
common
import
helpers
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log
,
log_calls
from
plugins.gui
import
GajimPluginConfigDialog
from
gajim.
plugins
import
GajimPlugin
from
gajim.
plugins.helpers
import
log
,
log_calls
from
gajim.
plugins.gui
import
GajimPluginConfigDialog
class
BannerTweaksPlugin
(
GajimPlugin
):
...
...
@@ -67,13 +67,13 @@ class BannerTweaksPlugin(GajimPlugin):
@
log_calls
(
'BannerTweaksPlugin'
)
def
activate
(
self
):
self
.
config
[
'old_chat_avatar_height'
]
=
gajim
.
config
.
get
(
self
.
config
[
'old_chat_avatar_height'
]
=
app
.
config
.
get
(
'chat_avatar_height'
)
#gajim.config.set('chat_avatar_height', 28)
@
log_calls
(
'BannerTweaksPlugin'
)
def
deactivate
(
self
):
gajim
.
config
.
set
(
'chat_avatar_height'
,
self
.
config
[
app
.
config
.
set
(
'chat_avatar_height'
,
self
.
config
[
'old_chat_avatar_height'
])
@
log_calls
(
'BannerTweaksPlugin'
)
...
...
@@ -122,14 +122,14 @@ class BannerTweaksPlugin(GajimPlugin):
# except if we are talking to two different resources of the same
# contact
acct_info
=
''
for
account
in
gajim
.
contacts
.
get_accounts
():
for
account
in
app
.
contacts
.
get_accounts
():
if
account
==
chat_control
.
account
:
continue
if
acct_info
:
# We already found a contact with same nick
break
for
jid
in
gajim
.
contacts
.
get_jid_list
(
account
):
for
jid
in
app
.
contacts
.
get_jid_list
(
account
):
other_contact_
=
\
gajim
.
contacts
.
get_first_contact_from_jid
(
account
,
jid
)
app
.
contacts
.
get_first_contact_from_jid
(
account
,
jid
)
if
other_contact_
.
get_shown_name
()
==
\
chat_control
.
contact
.
get_shown_name
():
acct_info
=
' (%s)'
%
\
...
...
@@ -140,7 +140,7 @@ class BannerTweaksPlugin(GajimPlugin):
if
self
.
config
[
'banner_small_fonts'
]:
font_attrs
=
font_attrs_small
st
=
gajim
.
config
.
get
(
'displayed_chat_state_notifications'
)
st
=
app
.
config
.
get
(
'displayed_chat_state_notifications'
)
cs
=
contact
.
chatstate
if
cs
and
st
in
(
'composing_only'
,
'all'
):
if
contact
.
show
==
'offline'
:
...
...
birthday_reminder/manifest.ini
View file @
da0d5f06
[info]
name:
Birthday
reminder
short_name:
birthday_reminder
version:
0.0.
3
version:
0.0.
4
description:
Birthday
reminder
plugin.
Reminder
before
5,3,1
and
birthday
days.
authors:
Evgeniy
Popov
<evgeniypopov@gmail.com>
homepage:
http://trac-plugins.gajim.org/wiki/BirthdayReminderPlugin
min_gajim_version:
0.16.11
birthday_reminder/plugin.py
View file @
da0d5f06
...
...
@@ -4,13 +4,13 @@ import datetime
from
xml.dom.minidom
import
*
from
gi.repository
import
GObject
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log_calls
from
notify
import
popup
from
gajim.
plugins
import
GajimPlugin
from
gajim.
plugins.helpers
import
log_calls
from
gajim.
notify
import
popup
from
common
import
configpaths
from
common
import
gajim
from
common
import
ged
from
gajim.
common
import
configpaths
from
gajim.common
import
app
from
gajim.
common
import
ged
class
BirthDayPlugin
(
GajimPlugin
):
...
...
@@ -30,8 +30,8 @@ class BirthDayPlugin(GajimPlugin):
def
check_birthdays
(
self
,
account
=
None
):
def
show_popup
(
account
,
jid
):
contact_instances
=
gajim
.
contacts
.
get_contacts
(
account
,
jid
)
contact
=
gajim
.
contacts
.
get_highest_prio_contact_from_contacts
(
contact_instances
=
app
.
contacts
.
get_contacts
(
account
,
jid
)
contact
=
app
.
contacts
.
get_highest_prio_contact_from_contacts
(
contact_instances
)
if
contact
:
nick
=
GObject
.
markup_escape_text
(
contact
.
get_shown_name
())
...
...
@@ -44,7 +44,7 @@ class BirthDayPlugin(GajimPlugin):
popup
(
'Send message'
,
contact
.
jid
,
account
,
msg_type
=
''
,
\
path_to_image
=
image
,
title
=
title
,
text
=
text
+
' '
+
nick
)
accounts
=
gajim
.
contacts
.
get_accounts
()
accounts
=
app
.
contacts
.
get_accounts
()
vcards
=
[]
date_dict
=
{}
for
jid
in
glob
.
glob
(
self
.
vcard_path
+
'*@*'
):
...
...
chatstate/chatstate.py
View file @
da0d5f06
...
...
@@ -3,12 +3,12 @@
from
gi.repository
import
GObject
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log_calls
from
common
import
ged
from
common
import
gajim
from
common
import
helpers
import
gtkgui_helpers
from
gajim.
plugins
import
GajimPlugin
from
gajim.
plugins.helpers
import
log_calls
from
gajim.
common
import
ged
from
gajim.common
import
app
from
gajim.
common
import
helpers
from
gajim
import
gtkgui_helpers
import
unicodedata
def
paragraph_direction_mark
(
text
):
...
...
@@ -44,7 +44,7 @@ class ChatstatePlugin(GajimPlugin):
if
not
self
.
active
:
return
contact
=
gajim
.
contacts
.
get_contact_from_full_jid
(
obj
.
conn
.
name
,
contact
=
app
.
contacts
.
get_contact_from_full_jid
(
obj
.
conn
.
name
,
obj
.
fjid
)
if
not
contact
:
return
...
...
@@ -53,12 +53,12 @@ class ChatstatePlugin(GajimPlugin):
if
chatstate
not
in
self
.
chatstates
.
keys
():
return
self
.
model
=
gajim
.
interface
.
roster
.
model
child_iters
=
gajim
.
interface
.
roster
.
_get_contact_iter
(
obj
.
jid
,
self
.
model
=
app
.
interface
.
roster
.
model
child_iters
=
app
.
interface
.
roster
.
_get_contact_iter
(
obj
.
jid
,
obj
.
conn
.
name
,
contact
,
self
.
model
)
name
=
GObject
.
markup_escape_text
(
contact
.
get_shown_name
())
contact_instances
=
gajim
.
contacts
.
get_contacts
(
obj
.
conn
.
name
,
contact_instances
=
app
.
contacts
.
get_contacts
(
obj
.
conn
.
name
,
contact
.
jid
)
# Show resource counter
...
...
@@ -74,7 +74,7 @@ class ChatstatePlugin(GajimPlugin):
if
chatstate
!=
'gone'
:
color
=
self
.
chatstates
[
chatstate
]
name
=
'<span foreground="%s">%s</span>'
%
(
color
,
name
)
if
contact
.
status
and
gajim
.
config
.
get
(
if
contact
.
status
and
app
.
config
.
get
(
'show_status_msgs_in_roster'
):
status
=
contact
.
status
.
strip
()
if
status
!=
''
:
...
...
@@ -87,17 +87,17 @@ class ChatstatePlugin(GajimPlugin):
@
log_calls
(
'ChatstatePlugin'
)
def
activate
(
self
):
color
=
gtkgui_helpers
.
get_fade_color
(
gajim
.
interface
.
roster
.
tree
,
color
=
gtkgui_helpers
.
get_fade_color
(
app
.
interface
.
roster
.
tree
,
False
,
False
)
self
.
status_color
=
'#%04x%04x%04x'
%
(
color
.
red
,
color
.
green
,
color
.
blue
)
theme
=
gajim
.
config
.
get
(
'roster_theme'
)
self
.
chatstates
=
{
'active'
:
gajim
.
config
.
get
(
'inmsgcolor'
),
'composing'
:
gajim
.
config
.
get_per
(
'themes'
,
theme
,
theme
=
app
.
config
.
get
(
'roster_theme'
)
self
.
chatstates
=
{
'active'
:
app
.
config
.
get
(
'inmsgcolor'
),
'composing'
:
app
.
config
.
get_per
(
'themes'
,
theme
,
'state_composing_color'
),
'inactive'
:
gajim
.
config
.
get_per
(
'themes'
,
theme
,
'inactive'
:
app
.
config
.
get_per
(
'themes'
,
theme
,
'state_inactive_color'
),
'paused'
:
gajim
.
config
.
get_per
(
'themes'
,
theme
,
'paused'
:
app
.
config
.
get_per
(
'themes'
,
theme
,
'state_paused_color'
),
'gone'
:
None
,
}
self
.
active
=
True
...
...
chatstate/manifest.ini
View file @
da0d5f06
[info]
name:
Chatstate
in
roster
short_name:
chatstate
version:
0.5.
2
version:
0.5.
3
description:
Chat
State
Notifications
in
roster.
Font
color
of
the
contact
varies
depending
on
the
chat
state.
The
plugin
does
not
work
if
you
use
custom
font
color
for
contacts
in
roster.
authors
=
Denis Fomin <fominde@gmail.com>
homepage
=
http://trac-plugins.gajim.org/wiki/ChatstatePlugin
min_gajim_version:
0.16.1
0
min_gajim_version:
0.16.1
1
clickable_nicknames/clickable_nicknames.py
View file @
da0d5f06
...
...
@@ -3,9 +3,9 @@
from
gi.repository
import
Gtk
from
gi.repository
import
Gdk
from
common
import
gajim
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log_calls
from
gajim.common
import
app
from
gajim.
plugins
import
GajimPlugin
from
gajim.
plugins.helpers
import
log_calls
class
ClickableNicknames
(
GajimPlugin
):
...
...
@@ -23,7 +23,7 @@ class ClickableNicknames(GajimPlugin):
self
.
gc_controls
=
{}
self
.
tag_names
=
[]
colors
=
gajim
.
config
.
get
(
'gc_nicknames_colors'
)
colors
=
app
.
config
.
get
(
'gc_nicknames_colors'
)
colors
=
colors
.
split
(
':'
)
for
i
,
color
in
enumerate
(
colors
):
tagname
=
'gc_nickname_color_'
+
str
(
i
)
...
...
@@ -31,7 +31,7 @@ class ClickableNicknames(GajimPlugin):
@
log_calls
(
'ClickableNicknamesPlugin'
)
def
activate
(
self
):
for
gc_control
in
gajim
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
for
gc_control
in
app
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
# TODO support minimized groupchat
if
gc_control
not
in
self
.
gc_controls
.
keys
():
control
=
Base
(
self
,
gc_control
)
...
...
@@ -118,18 +118,18 @@ class Base(object):
end_iter
.
forward_char
()
buffer_
=
self
.
textview
.
tv
.
get_buffer
()
word
=
buffer_
.
get_text
(
begin_iter
,
end_iter
,
True
)
nick
=
word
.
rstrip
().
rstrip
(
gajim
.
config
.
get
(
'after_nickname'
))
nick
=
word
.
rstrip
().
rstrip
(
app
.
config
.
get
(
'after_nickname'
))
if
nick
.
startswith
(
'* '
):
nick
=
nick
.
lstrip
(
'* '
).
split
(
' '
)[
0
]
nick
=
nick
.
lstrip
(
gajim
.
config
.
get
(
'before_nickname'
))
nicks
=
gajim
.
contacts
.
get_nick_list
(
self
.
chat_control
.
account
,
nick
=
nick
.
lstrip
(
app
.
config
.
get
(
'before_nickname'
))
nicks
=
app
.
contacts
.
get_nick_list
(
self
.
chat_control
.
account
,
self
.
chat_control
.
room_jid
)
if
nick
[
1
:]
not
in
nicks
:
return
message_buffer
=
self
.
chat_control
.
msg_textview
.
get_buffer
()
if
message_buffer
.
get_char_count
()
<
1
:
nick
=
nick
+
gajim
.
config
.
get
(
'gc_refer_to_nick_char'
)
nick
=
nick
+
app
.
config
.
get
(
'gc_refer_to_nick_char'
)
else
:
start
,
end
=
message_buffer
.
get_bounds
()
if
message_buffer
.
get_text
(
start
,
end
,
True
)[
-
1
]
!=
' '
:
...
...
clickable_nicknames/manifest.ini
View file @
da0d5f06
[info]
name:
Clickable
Nicknames
short_name:
clickable_nicknames
version:
0.
3
version:
0.
4
description:
Clickable
nicknames
in
the
conversation
textview.
authors:
Andrey
Musikhin
<melomansegfault@gmail.com>
Denis
Fomin
<fominde@gmail.com>
homepage:
http://trac-plugins.gajim.org/wiki/ClickableNicknamesPlugin
min_gajim_version:
0.16.1
0
min_gajim_version:
0.16.1
1
clients_icons/clients_icons.py
View file @
da0d5f06
...
...
@@ -5,12 +5,12 @@ from gi.repository import Gtk
from
gi.repository
import
GdkPixbuf
import
os
from
plugins.gui
import
GajimPluginConfigDialog
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log_calls
from
common
import
ged
from
common
import
gajim
import
cell_renderer_image
from
gajim.
plugins.gui
import
GajimPluginConfigDialog
from
gajim.
plugins
import
GajimPlugin
from
gajim.
plugins.helpers
import
log_calls
from
gajim.
common
import
ged
from
gajim.common
import
app
import
gajim.
cell_renderer_image
clients
=
{
'http://gajim.org'
:
[
'gajim.png'
,
'Gajim'
],
...
...
@@ -230,7 +230,7 @@ class ClientsIconsPlugin(GajimPlugin):
vcard_table
):
if
not
self
.
config
[
'show_in_tooltip'
]:
return
if
len
(
contacts
)
==
1
and
contacts
[
0
].
jid
in
gajim
.
get_our_jids
():
if
len
(
contacts
)
==
1
and
contacts
[
0
].
jid
in
app
.
get_our_jids
():
return
if
contacts
[
0
].
is_groupchat
():
return
...
...
@@ -386,9 +386,9 @@ class ClientsIconsPlugin(GajimPlugin):
chat_control
.
model
.
set_sort_column_id
(
1
,
Gtk
.
SortType
.
ASCENDING
)
chat_control
.
list_treeview
.
set_model
(
chat_control
.
model
)
# draw roster
for
nick
in
gajim
.
contacts
.
get_nick_list
(
chat_control
.
account
,
for
nick
in
app
.
contacts
.
get_nick_list
(
chat_control
.
account
,
chat_control
.
room_jid
):
gc_contact
=
gajim
.
contacts
.
get_gc_contact
(
chat_control
.
account
,
gc_contact
=
app
.
contacts
.
get_gc_contact
(
chat_control
.
account
,
chat_control
.
room_jid
,
nick
)
iter_
=
chat_control
.
add_contact_to_roster
(
nick
,
gc_contact
.
show
,
gc_contact
.
role
,
gc_contact
.
affiliation
,
gc_contact
.
status
,
...
...
@@ -430,7 +430,7 @@ class ClientsIconsPlugin(GajimPlugin):
@
log_calls
(
'ClientsIconsPlugin'
)
def
activate
(
self
):
self
.
active
=
None
roster
=
gajim
.
interface
.
roster
roster
=
app
.
interface
.
roster
col
=
Gtk
.
TreeViewColumn
()
roster
.
nb_ext_renderers
+=
1
self
.
renderer_num
=
10
+
roster
.
nb_ext_renderers
...
...
@@ -459,7 +459,7 @@ class ClientsIconsPlugin(GajimPlugin):
@
log_calls
(
'ClientsIconsPlugin'
)
def
deactivate
(
self
):
self
.
active
=
None
roster
=
gajim
.
interface
.
roster
roster
=
app
.
interface
.
roster
roster
.
nb_ext_renderers
-=
1
col
=
roster
.
tree
.
get_column
(
0
)
roster
.
tree
.
remove_column
(
col
)
...
...
@@ -477,8 +477,8 @@ class ClientsIconsPlugin(GajimPlugin):
def
presence_received
(
self
,
iq_obj
):
if
not
self
.
config
[
'show_in_roster'
]:
return
roster
=
gajim
.
interface
.
roster
contact
=
gajim
.
contacts
.
get_contact_with_highest_priority
(
roster
=
app
.
interface
.
roster
contact
=
app
.
contacts
.
get_contact_with_highest_priority
(
iq_obj
.
conn
.
name
,
iq_obj
.
jid
)
if
not
contact
:
return
...
...
@@ -525,7 +525,7 @@ class ClientsIconsPlugin(GajimPlugin):
def
gc_presence_received
(
self
,
iq_obj
):
if
not
self
.
config
[
'show_in_groupchats'
]:
return
contact
=
gajim
.
contacts
.
get_gc_contact
(
iq_obj
.
conn
.
name
,
contact
=
app
.
contacts
.
get_gc_contact
(
iq_obj
.
conn
.
name
,
iq_obj
.
presence_obj
.
jid
,
iq_obj
.
nick
)
if
not
contact
:
return
...
...
@@ -575,12 +575,12 @@ class ClientsIconsPlugin(GajimPlugin):
elif
model
[
iter_
][
self
.
muc_renderer_num
]:
renderer
.
set_property
(
'visible'
,
True
)
contact
=
gajim
.
contacts
.
get_gc_contact
(
control
.
account
,
contact
=
app
.
contacts
.
get_gc_contact
(
control
.
account
,
control
.
room_jid
,
model
[
iter_
][
1
])
if
not
contact
:
return
bgcolor
=
gajim
.
config
.
get_per
(
'themes'
,
gajim
.
config
.
get
(
bgcolor
=
app
.
config
.
get_per
(
'themes'
,
app
.
config
.
get
(
'roster_theme'
),
'contactbgcolor'
)
if
bgcolor
:
renderer
.
set_property
(
'cell-background'
,
bgcolor
)
...
...
@@ -631,9 +631,9 @@ class ClientsIconsPluginConfigDialog(GajimPluginConfigDialog):
def
redraw_all
(
self
):
self
.
plugin
.
deactivate
()
self
.
plugin
.
activate
()
for
gc_control
in
gajim
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
for
gc_control
in
app
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
self
.
plugin
.
disconnect_from_groupchat_control
(
gc_control
)
for
gc_control
in
gajim
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
for
gc_control
in
app
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
self
.
plugin
.
connect_with_groupchat_control
(
gc_control
)
def
on_show_in_roster_toggled
(
self
,
widget
):
...
...
@@ -646,9 +646,9 @@ class ClientsIconsPluginConfigDialog(GajimPluginConfigDialog):
def
on_show_in_groupchats_toggled
(
self
,
widget
):
self
.
plugin
.
config
[
'show_in_groupchats'
]
=
widget
.
get_active
()
for
gc_control
in
gajim
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
for
gc_control
in
app
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
self
.
plugin
.
disconnect_from_groupchat_control
(
gc_control
)
for
gc_control
in
gajim
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
for
gc_control
in
app
.
interface
.
msg_win_mgr
.
get_controls
(
'gc'
):
self
.
plugin
.
connect_with_groupchat_control
(
gc_control
)
def
on_show_unknown_icon_toggled
(
self
,
widget
):
...
...
clients_icons/manifest.ini
View file @
da0d5f06
[info]
name:
Clients
icons
short_name:
clients_icons
version:
4.
6
version:
4.
7
description:
Shows
the
client
icons
in
the
roster
and
in
groupchats.
For
icons
in
tooltip
support,
you
need
to
install
Gajim
r14117
or
above.
authors:
Denis
Fomin
<fominde@gmail.com>
Artem
Klyop
<art.klyop@gmail.com>
homepage:
http://trac-plugins.gajim.org/wiki/ClientsIconsPlugin
min_gajim_version:
0.16.1
0.0
min_gajim_version:
0.16.1
1
esessions/esessions.py
View file @
da0d5f06
...
...
@@ -26,18 +26,18 @@ import queue
import
nbxmpp
import
dialogs
import
gtkgui_helpers
from
gajim
import
dialogs
from
gajim
import
gtkgui_helpers
from
common
import
gajim
from
common.connection_handlers_events
import
(
from
gajim.common
import
app
from
gajim.
common.connection_handlers_events
import
(
FailedDecryptEvent
,
MamMessageReceivedEvent
)
from
plugins
import
GajimPlugin
from
gajim.
plugins
import
GajimPlugin
log
=
logging
.
getLogger
(
'gajim.plugin_system.esessions'
)
ERROR_MSG
=
''
if
not
gajim
.
HAVE_PYCRYPTO
:
if
not
app
.
HAVE_PYCRYPTO
:
ERROR_MSG
=
'Please install pycrypto'
...
...
@@ -120,7 +120,7 @@ class ESessionsPlugin(GajimPlugin):
# Esessions cant decrypt Carbon Copys
return
if
obj
.
stanza
.
getTag
(
'feature'
,
namespace
=
nbxmpp
.
NS_FEATURE
):
if
gajim
.
HAVE_PYCRYPTO
:
if
app
.
HAVE_PYCRYPTO
:
feature
=
obj
.
stanza
.
getTag
(
name
=
'feature'
,
namespace
=
nbxmpp
.
NS_FEATURE
)
form
=
nbxmpp
.
DataForm
(
node
=
feature
.
getTag
(
'x'
))
...
...
@@ -158,7 +158,7 @@ class ESessionsPlugin(GajimPlugin):
obj
.
encrypted
=
'ESessions'
callback
(
obj
)
except
Exception
:
gajim
.
nec
.
push_incoming_event
(
app
.
nec
.
push_incoming_event
(
FailedDecryptEvent
(
None
,
conn
=
conn
,
msg_obj
=
obj
))
return
...
...
esessions/manifest.ini
View file @
da0d5f06
[info]
name:
ESessions
short_name:
esessions
version:
1.
0
.0
version:
1.
1
.0
description:
Encryption
as
per
XEP-0200
authors:
Philipp
Hörist
<philipp@hoerist.com>
homepage:
https://dev.gajim.org/gajim/gajim-plugins/wikis/esessions
min_gajim_version:
0.16.1
0
min_gajim_version:
0.16.1
1
file_sharing/database.py
View file @
da0d5f06
import
sqlite3
from
common
import
gajim
from
common
import
app
import
sys
import
os
...
...
@@ -115,7 +115,7 @@ class FilesharingDatabase:
>>> _delete_file(1)
"""
self
.
_check_duplicate
(
account
,
requester
,
file_
)
requester
=
gajim
.
get_jid_without_resource
(
requester
)
requester
=
app
.
get_jid_without_resource
(
requester
)
c
=
self
.
conn
.
cursor
()
c
.
execute
(
"INSERT INTO files (file_path, "
+
"relative_path, hash_sha1, size, description, mod_date, "
+
...
...
flashing_keyboard/flashing_keyboard.py
View file @
da0d5f06
...
...
@@ -4,10 +4,10 @@ from gi.repository import Gtk
from
gi.repository
import
GObject
import
subprocess
from
common
import
gajim
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log_calls
,
log
from
plugins.gui
import
GajimPluginConfigDialog
from
gajim.common
import
app
from
gajim.
plugins
import
GajimPlugin
from
gajim.
plugins.helpers
import
log_calls
,
log
from
gajim.
plugins.gui
import
GajimPluginConfigDialog
class
FlashingKeyboard
(
GajimPlugin
):
...
...
@@ -34,7 +34,7 @@ class FlashingKeyboard(GajimPlugin):
self
.
flash_trigger
()
def
flash_trigger
(
self
):
if
gajim
.
events
.
get_nb_systray_events
():
if
app
.
events
.
get_nb_systray_events
():
if
self
.
id_0
:
return
if
self
.
config
[
'flash'
]:
...
...
@@ -60,9 +60,9 @@ class FlashingKeyboard(GajimPlugin):
@
log_calls
(
'FlashingKeyboard'
)
def
activate
(
self
):
gajim
.
events
.
event_added_subscribe
(
self
.
on_event_added
)
gajim
.
events
.
event_removed_subscribe
(
self
.
on_event_removed
)
if
gajim
.
events
.
get_nb_systray_events
():
app
.
events
.
event_added_subscribe
(
self
.
on_event_added
)
app
.
events
.
event_removed_subscribe
(
self
.
on_event_removed
)
if
app
.
events
.
get_nb_systray_events
():
if
self
.
config
[
'flash'
]:
self
.
id_0
=
GObject
.
timeout_add
(
self
.
timeout
,
self
.
led_on
)
else
:
...
...
@@ -71,8 +71,8 @@ class FlashingKeyboard(GajimPlugin):
@
log_calls
(
'FlashingKeyboard'
)
def
deactivate
(
self
):
gajim
.
events
.
event_added_unsubscribe
(
self
.
on_event_added
)
gajim
.
events
.
event_removed_unsubscribe
(
self
.
on_event_removed
)
app
.
events
.
event_added_unsubscribe
(
self
.
on_event_added
)
app
.
events
.
event_removed_unsubscribe
(
self
.
on_event_removed
)
if
self
.
id_0
:
GObject
.
source_remove
(
self
.
id_0
)
self
.
led_off
()
...
...
@@ -93,7 +93,7 @@ class FlashingKeyboardPluginConfigDialog(GajimPluginConfigDialog):
def
on_run
(
self
):
self
.
isactive
=
self
.
plugin
.
active
if
self
.
plugin
.
active
:
gajim
.
plugin_manager
.
deactivate_plugin
(
self
.
plugin
)
app
.
plugin_manager
.
deactivate_plugin
(
self
.
plugin
)
for
name
in
(
'command1'
,
'command2'
):
widget
=
self
.
xml
.
get_object
(
name
)
widget
.
set_text
(
self
.
plugin
.
config
[
name
])
...
...
@@ -108,5 +108,5 @@ class FlashingKeyboardPluginConfigDialog(GajimPluginConfigDialog):
widget
=
self
.
xml
.
get_object
(
'flash_cb'
)
self
.
plugin
.
config
[
'flash'
]
=
not
widget
.
get_active
()
if
self
.
isactive
:
gajim
.
plugin_manager
.
activate_plugin
(
self
.
plugin
)