Use absolute imports on all plugins
This is necessary because Gajim is with 0.16.11 a python package
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[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.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[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.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[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
|
||||
|
||||
@@ -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 + '*@*'):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[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.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -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] != ' ':
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[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.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
[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.10.0
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[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.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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, " +
|
||||
|
||||
@@ -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)
|
||||
app.plugin_manager.activate_plugin(self.plugin)
|
||||
GajimPluginConfigDialog.on_close_button_clicked(self, widget)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: Flashing Keyboard
|
||||
short_name: flashing_keyboard
|
||||
version: 0.3
|
||||
version: 0.4
|
||||
description: Flashing keyboard led when there are unread messages.
|
||||
authors: Denis Fomin <fominde@gmail.com>
|
||||
homepage: https://dev.gajim.org/gajim/gajim-plugins/wikis/flashingkeyboardplugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
##
|
||||
|
||||
import dbus
|
||||
from common import gajim
|
||||
from common import app
|
||||
from common import ged
|
||||
from common import dbus_support
|
||||
import gui_interface
|
||||
@@ -46,11 +46,11 @@ class GnomeSessionManagerPlugin(GajimPlugin):
|
||||
self.session_presence = self.bus.get_object("org.gnome.SessionManager",
|
||||
"/org/gnome/SessionManager/Presence")
|
||||
except:
|
||||
gajim.log.debug("GNOME SessionManager D-Bus service not found")
|
||||
app.log.debug("GNOME SessionManager D-Bus service not found")
|
||||
return
|
||||
|
||||
self.active = True
|
||||
gajim.ged.register_event_handler('our-show', ged.POSTGUI,
|
||||
app.ged.register_event_handler('our-show', ged.POSTGUI,
|
||||
self.on_our_status)
|
||||
self.bus.add_signal_receiver(self.gnome_presence_changed,
|
||||
"StatusChanged", PRESENCE_INTERFACE)
|
||||
@@ -63,17 +63,17 @@ class GnomeSessionManagerPlugin(GajimPlugin):
|
||||
self.active = False
|
||||
self.bus.remove_signal_receiver(self.gnome_presence_changed, "StatusChanged",
|
||||
dbus_interface=PRESENCE_INTERFACE)
|
||||
gajim.ged.remove_event_handler('our-show', ged.POSTGUI, self.on_our_status)
|
||||
app.ged.remove_event_handler('our-show', ged.POSTGUI, self.on_our_status)
|
||||
|
||||
|
||||
def gnome_presence_changed(self, status, *args, **kw):
|
||||
if not gajim.interface.remote_ctrl:
|
||||
if not app.interface.remote_ctrl:
|
||||
try:
|
||||
import remote_control
|
||||
gajim.interface.remote_ctrl = remote_control.Remote()
|
||||
app.interface.remote_ctrl = remote_control.Remote()
|
||||
except:
|
||||
return
|
||||
remote_gajim = gajim.interface.remote_ctrl.signal_object
|
||||
remote_gajim = app.interface.remote_ctrl.signal_object
|
||||
gajim_status = GNOME_STATUS[status]
|
||||
accounts = remote_gajim.list_accounts()
|
||||
for account in accounts:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[info]
|
||||
name: Google Translation
|
||||
short_name: google_translation
|
||||
version: 0.3.2
|
||||
version: 0.3.3
|
||||
description: Translates (currently only incoming) messages using Google Translate.
|
||||
authors: Mateusz Biliński <mateusz@bilinski.it>
|
||||
mrDoctorWho <mrdoctorwho@gmail.com>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/GoogleTranslationPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -32,15 +32,12 @@ import urllib
|
||||
from gi.repository import Gtk
|
||||
from sys import getfilesystemencoding
|
||||
|
||||
import chat_control
|
||||
import groupchat_control
|
||||
from gajim import chat_control
|
||||
from gajim import groupchat_control
|
||||
|
||||
from common import helpers
|
||||
from common import gajim
|
||||
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from common import ged
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.common import ged
|
||||
|
||||
languages = {
|
||||
_('Afrikaans'): 'af',
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import GdkPixbuf
|
||||
|
||||
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 GuiForMe(GajimPlugin):
|
||||
@@ -43,7 +43,7 @@ class GuiForMe(GajimPlugin):
|
||||
if base.chat_control != chat_control:
|
||||
continue
|
||||
base.button.set_sensitive(chat_control.contact.show != 'offline' \
|
||||
and gajim.connections[chat_control.account].connected > 0)
|
||||
and app.connections[chat_control.account].connected > 0)
|
||||
|
||||
|
||||
class Base(object):
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[info]
|
||||
name: GUI For Me
|
||||
short_name: gui_for_me
|
||||
version: 0.2
|
||||
version: 0.3
|
||||
description: Gui for the '/me' command.
|
||||
authors: BomberMan
|
||||
copper
|
||||
Denis Fomin <fominde@gmail.com>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/GUIForMePlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -5,13 +5,13 @@ import datetime as dt
|
||||
from gi.repository import GObject
|
||||
import os
|
||||
|
||||
from common import gajim
|
||||
from common import ged
|
||||
from common import dbus_support
|
||||
from gajim.common import app
|
||||
from gajim.common import ged
|
||||
from gajim.common import dbus_support
|
||||
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls, log
|
||||
from common.pep import ACTIVITIES
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls, log
|
||||
from gajim.common.pep import ACTIVITIES
|
||||
|
||||
HAMSTAER_INTERFACE = 'org.gnome.Hamster'
|
||||
SUBACTIVITIES = []
|
||||
@@ -45,12 +45,12 @@ class HamsterIntegrationPlugin(GajimPlugin):
|
||||
self.session_presence = self.bus.get_object(HAMSTAER_INTERFACE,
|
||||
'/org/gnome/Hamster')
|
||||
except:
|
||||
gajim.log.debug('Hamster D-Bus service not found')
|
||||
app.log.debug('Hamster D-Bus service not found')
|
||||
return
|
||||
|
||||
self.bus.add_signal_receiver(self.hamster_facts_changed, 'FactsChanged',
|
||||
HAMSTAER_INTERFACE)
|
||||
gajim.ged.register_event_handler('signed-in', ged.POSTGUI,
|
||||
app.ged.register_event_handler('signed-in', ged.POSTGUI,
|
||||
self.on_signed_in)
|
||||
|
||||
@log_calls('HamsterIntegrationPlugin')
|
||||
@@ -60,7 +60,7 @@ class HamsterIntegrationPlugin(GajimPlugin):
|
||||
|
||||
self.bus.remove_signal_receiver(self.hamster_facts_changed,
|
||||
"FactsChanged", dbus_interface=HAMSTAER_INTERFACE)
|
||||
gajim.ged.remove_event_handler('signed-in', ged.POSTGUI,
|
||||
app.ged.remove_event_handler('signed-in', ged.POSTGUI,
|
||||
self.on_signed_in)
|
||||
|
||||
def hamster_facts_changed(self, *args, **kw):
|
||||
@@ -70,10 +70,10 @@ class HamsterIntegrationPlugin(GajimPlugin):
|
||||
if not facts:
|
||||
return
|
||||
if self.from_dbus_fact(facts[-1])['end_time']:
|
||||
accounts = list(gajim.connections.keys())
|
||||
accounts = list(app.connections.keys())
|
||||
for account in accounts:
|
||||
if gajim.account_is_connected(account):
|
||||
connection = gajim.connections[account]
|
||||
if app.account_is_connected(account):
|
||||
connection = app.connections[account]
|
||||
connection.retract_activity()
|
||||
return
|
||||
|
||||
@@ -90,9 +90,9 @@ class HamsterIntegrationPlugin(GajimPlugin):
|
||||
subactivity=list(subactivity_candidates)[0]
|
||||
|
||||
# send activity
|
||||
for account in gajim.connections:
|
||||
if gajim.account_is_connected(account):
|
||||
connection = gajim.connections[account]
|
||||
for account in app.connections:
|
||||
if app.account_is_connected(account):
|
||||
connection = app.connections[account]
|
||||
connection.send_activity(activity, subactivity,
|
||||
last_fact['fact'])
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[info]
|
||||
name: Hamster integration
|
||||
short_name: hamster_integration
|
||||
version: 0.1.3
|
||||
version: 0.1.4
|
||||
description: Integration with project hamster
|
||||
see https://trac.gajim.org/ticket/6993
|
||||
and http://projecthamster.wordpress.com/about/
|
||||
authors: Denis Fomin <fominde@gmail.com>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -29,10 +29,10 @@ if os.name == 'nt':
|
||||
import nbxmpp
|
||||
from gi.repository import Gtk, GLib
|
||||
|
||||
from common import gajim
|
||||
from common import ged
|
||||
from plugins import GajimPlugin
|
||||
from dialogs import FileChooserDialog, ErrorDialog
|
||||
from gajim.common import app
|
||||
from gajim.common import ged
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.dialogs import FileChooserDialog, ErrorDialog
|
||||
|
||||
log = logging.getLogger('gajim.plugin_system.httpupload')
|
||||
|
||||
@@ -73,7 +73,7 @@ class HTTPUploadPlugin(GajimPlugin):
|
||||
|
||||
def handle_agent_info_received(self, event):
|
||||
if (NS_HTTPUPLOAD in event.features and
|
||||
gajim.jid_is_transport(event.jid)):
|
||||
app.jid_is_transport(event.jid)):
|
||||
account = event.conn.name
|
||||
interface = self.get_interface(account)
|
||||
interface.enabled = True
|
||||
@@ -102,7 +102,7 @@ class HTTPUploadPlugin(GajimPlugin):
|
||||
|
||||
def update_chat_control(self, chat_control):
|
||||
account = chat_control.account
|
||||
if gajim.connections[account].connection is None:
|
||||
if app.connections[account].connection is None:
|
||||
self.get_interface(account).update_button_states(False)
|
||||
|
||||
def get_interface(self, account):
|
||||
@@ -223,7 +223,7 @@ class Base(object):
|
||||
def encrypt_file(self, file):
|
||||
GLib.idle_add(file.progress.label.set_text, _('Encrypting file...'))
|
||||
encryption = file.control.encryption
|
||||
plugin = gajim.plugin_manager.encryption_plugins[encryption]
|
||||
plugin = app.plugin_manager.encryption_plugins[encryption]
|
||||
if hasattr(plugin, 'encrypt_file'):
|
||||
plugin.encrypt_file(file, self.account, self.request_slot)
|
||||
else:
|
||||
@@ -237,7 +237,7 @@ class Base(object):
|
||||
GLib.idle_add(file.progress.label.set_text,
|
||||
_('Requesting HTTP Upload Slot...'))
|
||||
iq = nbxmpp.Iq(typ='get', to=self.component)
|
||||
id_ = gajim.get_an_id()
|
||||
id_ = app.get_an_id()
|
||||
iq.setID(id_)
|
||||
request = iq.setTag(name="request", namespace=NS_HTTPUPLOAD)
|
||||
request.addChild('filename', payload=os.path.basename(file.path))
|
||||
@@ -246,7 +246,7 @@ class Base(object):
|
||||
|
||||
log.info("Sending request for slot")
|
||||
IQ_CALLBACK[id_] = lambda stanza: self.received_slot(stanza, file)
|
||||
gajim.connections[self.account].connection.send(iq)
|
||||
app.connections[self.account].connection.send(iq)
|
||||
|
||||
def received_slot(self, stanza, file):
|
||||
log.info("Received slot")
|
||||
@@ -301,9 +301,10 @@ class Base(object):
|
||||
GLib.idle_add(file.progress.label.set_text,
|
||||
_('Uploading file via HTTP...'))
|
||||
try:
|
||||
headers = {'User-Agent': 'Gajim %s' % gajim.version,
|
||||
headers = {'User-Agent': 'Gajim %s' % app.version,
|
||||
'Content-Type': file.mime,
|
||||
'Content-Length': file.size}
|
||||
|
||||
request = Request(
|
||||
file.put, data=file.stream, headers=headers, method='PUT')
|
||||
log.info("Opening Urllib upload request...")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
[info]
|
||||
name: HttpUpload
|
||||
short_name: httpupload
|
||||
version: 0.6.4
|
||||
version: 0.6.5
|
||||
description: This plugin is designed to send a file to a contact or muc by using httpupload.<br/>
|
||||
Your server must support <a href="http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP Upload</a>.<br/>
|
||||
authors: Thilo Molitor <thilo@eightysoft.de>
|
||||
Philipp Hörist <philipp@hoerist.com>
|
||||
Linus Heckemann <linus@sphalerite.org>
|
||||
homepage: https://dev.gajim.org/gajim/gajim-plugins/wikis/HttpUploadPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -7,10 +7,10 @@ import os
|
||||
import base64
|
||||
import urllib
|
||||
|
||||
import chat_control
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from dialogs import ImageChooserDialog, ErrorDialog
|
||||
from gajim import chat_control
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.dialogs import ImageChooserDialog, ErrorDialog
|
||||
|
||||
NS_XHTML_IM = 'http://jabber.org/protocol/xhtml-im' # XEP-0071
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[info]
|
||||
name: Image
|
||||
short_name: image
|
||||
version: 0.5.1
|
||||
version: 0.5.2
|
||||
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.
|
||||
authors: Denis Fomin <fominde@gmail.com>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/ImagePlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[info]
|
||||
name: Juick
|
||||
short_name: Juick
|
||||
version: 0.9.5
|
||||
version: 0.9.6
|
||||
description: Clickable Juick links , Juick nicks, preview Juick picturs.
|
||||
The key combination alt + up in the textbox allow insert the number of last message (comment or topic).
|
||||
authors: Denis Fomin <fominde@gmail.com>
|
||||
evgen <drujebober@gmail.com>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/JuickPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -10,13 +10,13 @@ import time
|
||||
import locale
|
||||
import sqlite3
|
||||
|
||||
from common import helpers
|
||||
from common import gajim
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls, log
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from conversation_textview import TextViewImage
|
||||
import gtkgui_helpers
|
||||
from gajim.common import helpers
|
||||
from gajim.common import app
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls, log
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.conversation_textview import TextViewImage
|
||||
from gajim import gtkgui_helpers
|
||||
|
||||
import nbxmpp
|
||||
|
||||
@@ -58,7 +58,7 @@ class JuickPlugin(GajimPlugin):
|
||||
self.chat_control = None
|
||||
self.controls = []
|
||||
self.conn = None
|
||||
self.cache_path = os.path.join(gajim.AVATAR_PATH, 'juick')
|
||||
self.cache_path = os.path.join(app.AVATAR_PATH, 'juick')
|
||||
if not os.path.isdir(self.cache_path):
|
||||
os.makedirs(self.cache_path)
|
||||
|
||||
@@ -149,7 +149,7 @@ class Base(object):
|
||||
sharp_slash = r'#\d+(\/\d+)?'
|
||||
juick_nick = r'@[a-zA-Z0-9_@:\.-]+'
|
||||
juick_pic = r'http://i\.juick\.com/.+/[0-9-]+\.[JPG|jpg]'
|
||||
interface = gajim.interface
|
||||
interface = app.interface
|
||||
interface.sharp_slash_re = re.compile(sharp_slash)
|
||||
self.juick_nick_re = interface.juick_nick_re = re.compile(juick_nick)
|
||||
self.juick_pic_re = interface.juick_pic_re = re.compile(juick_pic)
|
||||
@@ -282,7 +282,7 @@ class Base(object):
|
||||
return
|
||||
childs = self.juick_link_menu.get_children()
|
||||
if post:
|
||||
self.juick_post_full = gajim.interface.sharp_slash_re\
|
||||
self.juick_post_full = app.interface.sharp_slash_re\
|
||||
.search(word).group(0)
|
||||
self.juick_post_uid = post.group(1)
|
||||
for menuitem in range(7):
|
||||
@@ -315,14 +315,14 @@ class Base(object):
|
||||
self.on_insert(widget, 'PM %s' % word.rstrip(':'))
|
||||
|
||||
def print_special_text(self, special_text, other_tags, graphics=True):
|
||||
if gajim.interface.sharp_slash_re.match(special_text):
|
||||
if app.interface.sharp_slash_re.match(special_text):
|
||||
# insert post num #123456//
|
||||
buffer_, iter_, tag = self.get_iter_and_tag('sharp_slash')
|
||||
buffer_.insert_with_tags(iter_, special_text, tag)
|
||||
self.last_juick_num = special_text
|
||||
self.textview.plugin_modified = True
|
||||
return
|
||||
if gajim.interface.juick_nick_re.match(special_text):
|
||||
if app.interface.juick_nick_re.match(special_text):
|
||||
# insert juick nick @nickname////
|
||||
buffer_, iter_, tag = self.get_iter_and_tag('juick_nick')
|
||||
mark = buffer_.create_mark(None, iter_, True)
|
||||
@@ -342,13 +342,13 @@ class Base(object):
|
||||
if self.plugin.config['ONLY_FIRST_AVATAR']:
|
||||
if b_nick[-9:] not in ('Reply by ', 'message from ', 'ended by ',
|
||||
'Subscribed to '):
|
||||
if b_nick[-2] != gajim.config.get('after_nickname'):
|
||||
if b_nick[-2] != app.config.get('after_nickname'):
|
||||
self.textview.plugin_modified = True
|
||||
return
|
||||
elif b_nick[-1] == '\n':
|
||||
self.textview.plugin_modified = True
|
||||
return
|
||||
conn = gajim.connections[self.chat_control.account]
|
||||
conn = app.connections[self.chat_control.account]
|
||||
if not conn.connected:
|
||||
self.textview.plugin_modified = True
|
||||
return
|
||||
@@ -384,7 +384,7 @@ class Base(object):
|
||||
{'mark': mark, 'special_text': special_text})
|
||||
self.textview.plugin_modified = True
|
||||
return
|
||||
if gajim.interface.juick_pic_re.match(special_text) and \
|
||||
if app.interface.juick_pic_re.match(special_text) and \
|
||||
self.plugin.config['SHOW_PREVIEW']:
|
||||
# show pics preview
|
||||
buffer_, iter_, tag = self.get_iter_and_tag('url')
|
||||
@@ -392,7 +392,7 @@ class Base(object):
|
||||
buffer_.insert_with_tags(iter_, special_text, tag)
|
||||
uid = special_text.split('/')[-1]
|
||||
url = "http://i.juick.com/photos-512/%s" % uid
|
||||
gajim.thread_interface(self.insert_pic_preview, [mark, special_text,
|
||||
app.thread_interface(self.insert_pic_preview, [mark, special_text,
|
||||
url])
|
||||
self.textview.plugin_modified = True
|
||||
return
|
||||
|
||||
@@ -32,10 +32,10 @@ from tempfile import mkstemp, mkdtemp
|
||||
import random
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
from common import gajim
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log, log_calls
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.common import app
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log, log_calls
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
|
||||
Gdk.threads_init()
|
||||
|
||||
@@ -145,7 +145,7 @@ class LatexRenderer(Thread):
|
||||
def fg_str(fmt):
|
||||
try:
|
||||
return [{'hex' : '+level-colors', 'tex' : '-fg'}[fmt],
|
||||
gajim.interface.get_fg_color(fmt)]
|
||||
app.interface.get_fg_color(fmt)]
|
||||
except KeyError:
|
||||
# interface may not be available when we test latex at startup
|
||||
return []
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[info]
|
||||
name: Latex
|
||||
short_name: latex
|
||||
version: 0.3.1
|
||||
version: 0.3.2
|
||||
description: render received latex code
|
||||
authors: Yves Fischer <yvesf@xapek.org>
|
||||
Yann Leboulanger <asterix@lagaule.org>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/LatexPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -29,9 +29,9 @@ import sys
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
|
||||
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 LengthNotifierPlugin(GajimPlugin):
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: Message Length Notifier
|
||||
short_name: length_notifier
|
||||
version: 0.2
|
||||
version: 0.3
|
||||
description: Highlights message entry field in chat window when given length of message is exceeded.
|
||||
authors = Mateusz Biliński <mateusz@bilinski.it>
|
||||
homepage = http://trac-plugins.gajim.org/wiki/LengthNotifierPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: Message Box Size
|
||||
short_name: message_box_size
|
||||
version: 0.3
|
||||
version: 0.4
|
||||
description: Allows you to adjust the height of the new message input field.
|
||||
authors: Denis Fomin <fominde@gmail.com>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/MessageBoxSizePlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
from gi.repository import Gtk
|
||||
|
||||
from common import gajim
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.common import app
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
|
||||
|
||||
class MsgBoxSizePlugin(GajimPlugin):
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: MPRIS2 support
|
||||
short_name: mpris2_support
|
||||
version: 0.3.3
|
||||
version: 0.3.4
|
||||
description: MPRIS2 support. Allows to update status message according to the music you're listening via the MPRIS2 D-Bus API.
|
||||
authors = Denis Fomin <fominde@gmail.com>
|
||||
homepage = https://dev.gajim.org/gajim/gajim-plugins/wikis/mprissupportplugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
import os
|
||||
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from common import dbus_support
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.common import dbus_support
|
||||
|
||||
ERR_MSG = ''
|
||||
|
||||
if dbus_support.supported:
|
||||
from music_track_listener import MusicTrackListener
|
||||
from gajim.music_track_listener import MusicTrackListener
|
||||
else:
|
||||
ERR_MSG = 'D-Bus Python bindings are missing'
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: Now Listen
|
||||
short_name: now-listen
|
||||
version: 0.2.3
|
||||
version: 0.2.4
|
||||
description: Copy tune info to conversation input box (alt + n) at cursor position
|
||||
authors = Denis Fomin <fominde@gmail.com>
|
||||
homepage = https://dev.gajim.org/gajim/gajim-plugins/wikis/NowListenPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -4,14 +4,14 @@ from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
import os
|
||||
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from plugins.gajimplugin import GajimPluginException
|
||||
from common import dbus_support
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.plugins.gajimplugin import GajimPluginException
|
||||
from gajim.common import dbus_support
|
||||
|
||||
if dbus_support.supported:
|
||||
from music_track_listener import MusicTrackListener
|
||||
from gajim.music_track_listener import MusicTrackListener
|
||||
|
||||
class NowListenPlugin(GajimPlugin):
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ from plugins.gui import GajimPluginConfigDialog
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from common import ged
|
||||
from common import gajim
|
||||
from common import app
|
||||
from common.i18n import Q_
|
||||
from config import ManageBookmarksWindow
|
||||
|
||||
@@ -41,7 +41,7 @@ class OfflineBookmarksPlugin(GajimPlugin):
|
||||
pass
|
||||
|
||||
def save_bookmarks(self, account, bookmarks):
|
||||
jid = gajim.get_jid_from_account(account)
|
||||
jid = app.get_jid_from_account(account)
|
||||
if jid not in self.config:
|
||||
self.config[jid] = {}
|
||||
self.config[jid] = bookmarks
|
||||
@@ -51,22 +51,22 @@ class OfflineBookmarksPlugin(GajimPlugin):
|
||||
|
||||
def handle_event_signed_in(self, obj):
|
||||
account = obj.conn.name
|
||||
connection = gajim.connections[account]
|
||||
jid = gajim.get_jid_from_account(obj.conn.name)
|
||||
connection = app.connections[account]
|
||||
jid = app.get_jid_from_account(obj.conn.name)
|
||||
bm_jids = [b['jid'] for b in connection.bookmarks]
|
||||
if jid in self.config:
|
||||
for bm in self.config[jid]:
|
||||
if bm['jid'] not in bm_jids:
|
||||
connection.bookmarks.append(bm)
|
||||
invisible_show = gajim.SHOW_LIST.index('invisible')
|
||||
invisible_show = app.SHOW_LIST.index('invisible')
|
||||
# do not autojoin if we are invisible
|
||||
if connection.connected == invisible_show:
|
||||
return
|
||||
# do not autojoin if bookmarks supported
|
||||
bookmarks_supported = self.is_bookmark_supported(
|
||||
gajim.connections[account])
|
||||
app.connections[account])
|
||||
if not bookmarks_supported:
|
||||
gajim.interface.auto_join_bookmarks(connection.name)
|
||||
app.interface.auto_join_bookmarks(connection.name)
|
||||
|
||||
def connect_with_gc_control(self, gc_control):
|
||||
control = Base(self, gc_control)
|
||||
@@ -111,14 +111,14 @@ class Base(object):
|
||||
self.button.set_no_show_all(True)
|
||||
id_ = self.button.connect('clicked', self.add_bookmark_button_clicked)
|
||||
self.gc_control.handlers[id_] = self.button
|
||||
for bm in gajim.connections[self.gc_control.account].bookmarks:
|
||||
for bm in app.connections[self.gc_control.account].bookmarks:
|
||||
if bm['jid'] == self.gc_control.contact.jid:
|
||||
self.button.hide()
|
||||
break
|
||||
else:
|
||||
account = self.gc_control.account
|
||||
bookmarks_supported = self.plugin.is_bookmark_supported(
|
||||
gajim.connections[account])
|
||||
app.connections[account])
|
||||
self.button.set_sensitive(not bookmarks_supported)
|
||||
self.button.set_visible(not bookmarks_supported)
|
||||
|
||||
@@ -127,7 +127,7 @@ class Base(object):
|
||||
Bookmark the room, without autojoin and not minimized
|
||||
"""
|
||||
from dialogs import ErrorDialog, InformationDialog
|
||||
password = gajim.gc_passwords.get(self.gc_control.room_jid, '')
|
||||
password = app.gc_passwords.get(self.gc_control.room_jid, '')
|
||||
account = self.gc_control.account
|
||||
|
||||
bm = {'name': self.gc_control.name,
|
||||
@@ -140,7 +140,7 @@ class Base(object):
|
||||
place_found = False
|
||||
index = 0
|
||||
# check for duplicate entry and respect alpha order
|
||||
for bookmark in gajim.connections[account].bookmarks:
|
||||
for bookmark in app.connections[account].bookmarks:
|
||||
if bookmark['jid'] == bm['jid']:
|
||||
ErrorDialog(
|
||||
_('Bookmark already set'),
|
||||
@@ -152,11 +152,11 @@ class Base(object):
|
||||
break
|
||||
index += 1
|
||||
if place_found:
|
||||
gajim.connections[account].bookmarks.insert(index, bm)
|
||||
app.connections[account].bookmarks.insert(index, bm)
|
||||
else:
|
||||
gajim.connections[account].bookmarks.append(bm)
|
||||
self.plugin.save_bookmarks(account, gajim.connections[account].bookmarks)
|
||||
gajim.interface.roster.set_actions_menu_needs_rebuild()
|
||||
app.connections[account].bookmarks.append(bm)
|
||||
self.plugin.save_bookmarks(account, app.connections[account].bookmarks)
|
||||
app.interface.roster.set_actions_menu_needs_rebuild()
|
||||
InformationDialog(
|
||||
_('Bookmark has been added successfully'),
|
||||
_('You can manage your bookmarks via Actions menu in your roster.'))
|
||||
@@ -242,18 +242,18 @@ class OfflineBookmarksPluginConfigDialog(GajimPluginConfigDialog,
|
||||
self.jids = []
|
||||
|
||||
# Store bookmarks in treeview.
|
||||
for account in gajim.connections:
|
||||
if gajim.connections[account].connected <= 1:
|
||||
for account in app.connections:
|
||||
if app.connections[account].connected <= 1:
|
||||
continue
|
||||
if gajim.connections[account].is_zeroconf:
|
||||
if app.connections[account].is_zeroconf:
|
||||
continue
|
||||
|
||||
self.accounts.append(account)
|
||||
self.jids.append(gajim.get_jid_from_account(account))
|
||||
self.jids.append(app.get_jid_from_account(account))
|
||||
iter_ = self.treestore.append(None, [None, account, None, None,
|
||||
None, None, None, None])
|
||||
|
||||
for bookmark in gajim.connections[account].bookmarks:
|
||||
for bookmark in app.connections[account].bookmarks:
|
||||
if bookmark['name'] == '':
|
||||
# No name was given for this bookmark.
|
||||
# Use the first part of JID instead...
|
||||
@@ -303,7 +303,7 @@ class OfflineBookmarksPluginConfigDialog(GajimPluginConfigDialog,
|
||||
|
||||
for account in self.treestore:
|
||||
account_unicode = account[1].decode('utf-8')
|
||||
gajim.connections[account_unicode].bookmarks = []
|
||||
app.connections[account_unicode].bookmarks = []
|
||||
|
||||
for bm in account.iterchildren():
|
||||
# Convert True/False/None to '1' or '0'
|
||||
@@ -327,15 +327,15 @@ class OfflineBookmarksPluginConfigDialog(GajimPluginConfigDialog,
|
||||
'minimize': minimize, 'password': pw, 'nick': nick,
|
||||
'print_status': bm[7]}
|
||||
|
||||
gajim.connections[account_unicode].bookmarks.append(bmdict)
|
||||
app.connections[account_unicode].bookmarks.append(bmdict)
|
||||
|
||||
bookmarks_supported = self.plugin.is_bookmark_supported(
|
||||
gajim.connections[account_unicode])
|
||||
app.connections[account_unicode])
|
||||
if bookmarks_supported:
|
||||
gajim.connections[account_unicode].store_bookmarks()
|
||||
app.connections[account_unicode].store_bookmarks()
|
||||
self.plugin.save_bookmarks(account_unicode,
|
||||
gajim.connections[account_unicode].bookmarks)
|
||||
gajim.interface.roster.set_actions_menu_needs_rebuild()
|
||||
app.connections[account_unicode].bookmarks)
|
||||
app.interface.roster.set_actions_menu_needs_rebuild()
|
||||
|
||||
def on_import_to_changed(self, treeview):
|
||||
self.on_import_from_changed(self.import_from_combo)
|
||||
@@ -351,11 +351,11 @@ class OfflineBookmarksPluginConfigDialog(GajimPluginConfigDialog,
|
||||
|
||||
def on_import_button_clicked(self, widget):
|
||||
from_ = self.import_from_combo.get_active_text()
|
||||
to_connection = gajim.connections[self.import_to_combo.get_active_text()]
|
||||
to_connection = app.connections[self.import_to_combo.get_active_text()]
|
||||
to_bookmarks = to_connection.bookmarks
|
||||
|
||||
if from_ in self.accounts:
|
||||
from_bookmarks = gajim.connections[from_].bookmarks
|
||||
from_bookmarks = app.connections[from_].bookmarks
|
||||
else:
|
||||
from_bookmarks = self.plugin.config[from_]
|
||||
for bm in from_bookmarks:
|
||||
|
||||
@@ -31,9 +31,9 @@ from urllib.parse import urlparse, urldefrag
|
||||
from io import BufferedWriter, FileIO, BytesIO
|
||||
|
||||
from gi.repository import GLib
|
||||
import gtkgui_helpers
|
||||
from common import configpaths
|
||||
from dialogs import ErrorDialog, YesNoDialog
|
||||
from gajim import gtkgui_helpers
|
||||
from gajim.common import configpaths
|
||||
from gajim.dialogs import ErrorDialog, YesNoDialog
|
||||
if os.name == 'nt':
|
||||
import certifi
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[info]
|
||||
name: OMEMO
|
||||
short_name: omemo
|
||||
version: 2.3.5
|
||||
version: 2.3.6
|
||||
description: OMEMO is an XMPP Extension Protocol (XEP) for secure multi-client end-to-end encryption based on Axolotl and PEP. You need to install some dependencys, you can find install instructions for your system in the Github Wiki.
|
||||
authors: Bahtiar `kalkin-` Gadimov <bahtiar@gadimov.de>
|
||||
Daniel Gultsch <daniel@gultsch.de>
|
||||
Philipp Hörist <philipp@hoerist.com>
|
||||
homepage: https://dev.gajim.org/gajim/gajim-plugins/wikis/OmemoGajimPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -33,11 +33,11 @@ from gi.repository import GLib
|
||||
from nbxmpp.simplexml import Node
|
||||
from nbxmpp import NS_ADDRESS
|
||||
|
||||
import dialogs
|
||||
from common import caps_cache, gajim, ged, configpaths
|
||||
from common.pep import SUPPORTED_PERSONAL_USER_EVENTS
|
||||
from plugins import GajimPlugin
|
||||
from groupchat_control import GroupchatControl
|
||||
from gajim import dialogs
|
||||
from gajim.common import caps_cache, app, ged, configpaths
|
||||
from gajim.common.pep import SUPPORTED_PERSONAL_USER_EVENTS
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.groupchat_control import GroupchatControl
|
||||
|
||||
from .xmpp import (
|
||||
NS_NOTIFY, NS_OMEMO, NS_EME, BundleInformationAnnouncement,
|
||||
@@ -45,7 +45,7 @@ from .xmpp import (
|
||||
DevicelistPEP, OmemoMessage, successful, unpack_device_bundle,
|
||||
unpack_device_list_update, unpack_encrypted)
|
||||
|
||||
from common.connection_handlers_events import (
|
||||
from gajim.common.connection_handlers_events import (
|
||||
MessageReceivedEvent, MamMessageReceivedEvent, MessageNotSentEvent)
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ PROTOBUF_MISSING = 'OMEMO cant import Google Protobuf, you can find help in ' \
|
||||
ERROR_MSG = ''
|
||||
|
||||
NS_HINTS = 'urn:xmpp:hints'
|
||||
DB_DIR_OLD = gajim.gajimpaths.data_root
|
||||
DB_DIR_OLD = app.gajimpaths.data_root
|
||||
DB_DIR_NEW = configpaths.gajimpaths['MY_DATA']
|
||||
|
||||
ALLOWED_TAGS = [('request', nbxmpp.NS_RECEIPTS),
|
||||
@@ -157,10 +157,10 @@ class OmemoPlugin(GajimPlugin):
|
||||
self.disabled_accounts.append(account)
|
||||
|
||||
# add aesgcm:// uri scheme to config
|
||||
schemes = gajim.config.get('uri_schemes')
|
||||
schemes = app.config.get('uri_schemes')
|
||||
if 'aesgcm://' not in schemes.split():
|
||||
schemes += ' aesgcm://'
|
||||
gajim.config.set('uri_schemes', schemes)
|
||||
app.config.set('uri_schemes', schemes)
|
||||
|
||||
def migrate_dbpath(self, account, my_jid):
|
||||
old_dbpath = os.path.join(DB_DIR_OLD, 'omemo_' + account + '.db')
|
||||
@@ -193,7 +193,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
if account in self.disabled_accounts:
|
||||
return
|
||||
if account not in self.omemo_states:
|
||||
my_jid = gajim.get_jid_from_account(account)
|
||||
my_jid = app.get_jid_from_account(account)
|
||||
db_path = self.migrate_dbpath(account, my_jid)
|
||||
|
||||
conn = sqlite3.connect(db_path, check_same_thread=False)
|
||||
@@ -245,16 +245,16 @@ class OmemoPlugin(GajimPlugin):
|
||||
"""
|
||||
self.query_for_bundles = []
|
||||
# Publish bundle information and Entity Caps
|
||||
for account in gajim.connections:
|
||||
for account in app.connections:
|
||||
if account in self.disabled_accounts:
|
||||
log.debug(account +
|
||||
' => Account is disabled')
|
||||
continue
|
||||
if NS_NOTIFY not in gajim.gajim_optional_features[account]:
|
||||
gajim.gajim_optional_features[account].append(NS_NOTIFY)
|
||||
if NS_NOTIFY not in app.gajim_optional_features[account]:
|
||||
app.gajim_optional_features[account].append(NS_NOTIFY)
|
||||
self._compute_caps_hash(account)
|
||||
if account not in self.announced:
|
||||
if gajim.account_is_connected(account):
|
||||
if app.account_is_connected(account):
|
||||
log.debug(account +
|
||||
' => Announce Support after Plugin Activation')
|
||||
self.announced.append(account)
|
||||
@@ -266,11 +266,11 @@ class OmemoPlugin(GajimPlugin):
|
||||
|
||||
Removes OMEMO from the Entity Capabilities list
|
||||
"""
|
||||
for account in gajim.connections:
|
||||
for account in app.connections:
|
||||
if account in self.disabled_accounts:
|
||||
continue
|
||||
if NS_NOTIFY in gajim.gajim_optional_features[account]:
|
||||
gajim.gajim_optional_features[account].remove(NS_NOTIFY)
|
||||
if NS_NOTIFY in app.gajim_optional_features[account]:
|
||||
app.gajim_optional_features[account].remove(NS_NOTIFY)
|
||||
self._compute_caps_hash(account)
|
||||
|
||||
def activate_encryption(self, chat_control):
|
||||
@@ -298,7 +298,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
if isinstance(chat_control, GroupchatControl):
|
||||
room = chat_control.room_jid
|
||||
missing = True
|
||||
own_jid = gajim.get_jid_from_account(account)
|
||||
own_jid = app.get_jid_from_account(account)
|
||||
for nick in self.groupchat[room]:
|
||||
real_jid = self.groupchat[room][nick]
|
||||
if real_jid == own_jid:
|
||||
@@ -366,15 +366,15 @@ class OmemoPlugin(GajimPlugin):
|
||||
@staticmethod
|
||||
def _compute_caps_hash(account):
|
||||
""" Computes the hash for Entity Capabilities and publishes it """
|
||||
gajim.caps_hash[account] = caps_cache.compute_caps_hash(
|
||||
[gajim.gajim_identity],
|
||||
gajim.gajim_common_features +
|
||||
gajim.gajim_optional_features[account])
|
||||
app.caps_hash[account] = caps_cache.compute_caps_hash(
|
||||
[app.gajim_identity],
|
||||
app.gajim_common_features +
|
||||
app.gajim_optional_features[account])
|
||||
# re-send presence with new hash
|
||||
connected = gajim.connections[account].connected
|
||||
if connected > 1 and gajim.SHOW_LIST[connected] != 'invisible':
|
||||
gajim.connections[account].change_status(
|
||||
gajim.SHOW_LIST[connected], gajim.connections[account].status)
|
||||
connected = app.connections[account].connected
|
||||
if connected > 1 and app.SHOW_LIST[connected] != 'invisible':
|
||||
app.connections[account].change_status(
|
||||
app.SHOW_LIST[connected], app.connections[account].status)
|
||||
|
||||
def message_received(self, conn, obj, callback):
|
||||
if obj.encrypted:
|
||||
@@ -411,7 +411,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
state = self.get_omemo_state(account)
|
||||
|
||||
from_jid = str(msg.msg_.getAttr('from'))
|
||||
from_jid = gajim.get_jid_without_resource(from_jid)
|
||||
from_jid = app.get_jid_without_resource(from_jid)
|
||||
|
||||
msg_dict = unpack_encrypted(omemo_encrypted_tag)
|
||||
|
||||
@@ -496,7 +496,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
msg.encrypted = 'drop'
|
||||
return
|
||||
else:
|
||||
msg_dict['sender_jid'] = gajim. \
|
||||
msg_dict['sender_jid'] = app. \
|
||||
get_jid_without_resource(from_jid)
|
||||
plaintext = state.decrypt_msg(msg_dict)
|
||||
|
||||
@@ -541,7 +541,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
return
|
||||
|
||||
room = event.room_jid
|
||||
jid = gajim.get_jid_without_resource(event.real_jid)
|
||||
jid = app.get_jid_without_resource(event.real_jid)
|
||||
nick = event.nick
|
||||
|
||||
if '303' in event.status_code: # Nick Changed
|
||||
@@ -584,9 +584,9 @@ class OmemoPlugin(GajimPlugin):
|
||||
|
||||
log.debug('OMEMO capable Room found: %s', room)
|
||||
|
||||
gajim.connections[account].get_affiliation_list(room, 'owner')
|
||||
gajim.connections[account].get_affiliation_list(room, 'admin')
|
||||
gajim.connections[account].get_affiliation_list(room, 'member')
|
||||
app.connections[account].get_affiliation_list(room, 'owner')
|
||||
app.connections[account].get_affiliation_list(room, 'admin')
|
||||
app.connections[account].get_affiliation_list(room, 'member')
|
||||
|
||||
def gc_config_changed_received(self, event):
|
||||
account = event.conn.name
|
||||
@@ -626,8 +626,8 @@ class OmemoPlugin(GajimPlugin):
|
||||
return
|
||||
|
||||
state = self.get_omemo_state(account)
|
||||
to_jid = gajim.get_jid_without_resource(event.jid)
|
||||
own_jid = gajim.get_jid_from_account(account)
|
||||
to_jid = app.get_jid_without_resource(event.jid)
|
||||
own_jid = app.get_jid_from_account(account)
|
||||
|
||||
msg_dict = state.create_gc_msg(
|
||||
own_jid, to_jid, event.message.encode('utf8'))
|
||||
@@ -636,7 +636,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
|
||||
except OMEMOError as error:
|
||||
log.error(error)
|
||||
gajim.nec.push_incoming_event(
|
||||
app.nec.push_incoming_event(
|
||||
MessageNotSentEvent(
|
||||
None, conn=conn, jid=event.jid, message=event.message,
|
||||
error=error, time_=time.time(), session=None))
|
||||
@@ -691,8 +691,8 @@ class OmemoPlugin(GajimPlugin):
|
||||
return
|
||||
|
||||
state = self.get_omemo_state(account)
|
||||
to_jid = gajim.get_jid_without_resource(event.jid)
|
||||
own_jid = gajim.get_jid_from_account(account)
|
||||
to_jid = app.get_jid_without_resource(event.jid)
|
||||
own_jid = app.get_jid_from_account(account)
|
||||
|
||||
plaintext = event.message.encode('utf8')
|
||||
msg_dict = state.create_msg(own_jid, to_jid, plaintext)
|
||||
@@ -701,7 +701,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
|
||||
except OMEMOError as error:
|
||||
log.error(error)
|
||||
gajim.nec.push_incoming_event(
|
||||
app.nec.push_incoming_event(
|
||||
MessageNotSentEvent(
|
||||
None, conn=conn, jid=event.jid, message=event.message,
|
||||
error=error, time_=time.time(), session=event.session))
|
||||
@@ -766,7 +766,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
|
||||
devices_list = list(set(unpack_device_list_update(event.stanza,
|
||||
event.conn.name)))
|
||||
contact_jid = gajim.get_jid_without_resource(event.fjid)
|
||||
contact_jid = app.get_jid_without_resource(event.fjid)
|
||||
if not devices_list:
|
||||
log.error(account +
|
||||
' => Received empty or invalid Devicelist from: ' +
|
||||
@@ -774,7 +774,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
return False
|
||||
|
||||
state = self.get_omemo_state(account)
|
||||
my_jid = gajim.get_jid_from_account(account)
|
||||
my_jid = app.get_jid_from_account(account)
|
||||
|
||||
if contact_jid == my_jid:
|
||||
log.info(account + ' => Received own device list:' + str(
|
||||
@@ -831,7 +831,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
log.debug(account + ' => Publishing own Devices: ' + str(
|
||||
devices_list))
|
||||
iq = DeviceListAnnouncement(devices_list)
|
||||
gajim.connections[account].connection.send(iq)
|
||||
app.connections[account].connection.send(iq)
|
||||
id_ = str(iq.getAttr('id'))
|
||||
IQ_CALLBACK[id_] = lambda event: log.debug(event)
|
||||
|
||||
@@ -852,7 +852,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
Returns True if there are no trusted Fingerprints
|
||||
"""
|
||||
state = self.get_omemo_state(account)
|
||||
my_jid = gajim.get_jid_from_account(account)
|
||||
my_jid = app.get_jid_from_account(account)
|
||||
|
||||
# Fetch Bundles of own other Devices
|
||||
if my_jid not in self.query_for_bundles:
|
||||
@@ -922,7 +922,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
lambda stanza: self.session_from_prekey_bundle(account,
|
||||
stanza, jid,
|
||||
device_id)
|
||||
gajim.connections[account].connection.send(iq)
|
||||
app.connections[account].connection.send(iq)
|
||||
|
||||
def session_from_prekey_bundle(self, account, stanza,
|
||||
recipient_id, device_id):
|
||||
@@ -962,7 +962,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
log.info(account + ' => session created for: ' + recipient_id)
|
||||
# Trigger dialog to trust new Fingerprints if
|
||||
# the Chat Window is Open
|
||||
ctrl = gajim.interface.msg_win_mgr.get_control(
|
||||
ctrl = app.interface.msg_win_mgr.get_control(
|
||||
recipient_id, account)
|
||||
if ctrl:
|
||||
self.new_fingerprints_available(ctrl)
|
||||
@@ -975,9 +975,9 @@ class OmemoPlugin(GajimPlugin):
|
||||
account : str
|
||||
the account name
|
||||
"""
|
||||
my_jid = gajim.get_jid_from_account(account)
|
||||
my_jid = app.get_jid_from_account(account)
|
||||
iq = DevicelistQuery(my_jid)
|
||||
gajim.connections[account].connection.send(iq)
|
||||
app.connections[account].connection.send(iq)
|
||||
log.info(account + ' => Querry own devicelist ...')
|
||||
id_ = str(iq.getAttr("id"))
|
||||
IQ_CALLBACK[id_] = lambda stanza: \
|
||||
@@ -998,7 +998,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
"""
|
||||
state = self.get_omemo_state(account)
|
||||
iq = BundleInformationAnnouncement(state.bundle, state.own_device_id)
|
||||
gajim.connections[account].connection.send(iq)
|
||||
app.connections[account].connection.send(iq)
|
||||
id_ = str(iq.getAttr("id"))
|
||||
log.info(account + " => Publishing bundle ...")
|
||||
IQ_CALLBACK[id_] = lambda stanza: \
|
||||
@@ -1031,7 +1031,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
The stanza object received from callback
|
||||
"""
|
||||
|
||||
my_jid = gajim.get_jid_from_account(account)
|
||||
my_jid = app.get_jid_from_account(account)
|
||||
state = self.get_omemo_state(account)
|
||||
|
||||
if successful(stanza):
|
||||
@@ -1069,7 +1069,7 @@ class OmemoPlugin(GajimPlugin):
|
||||
account : str
|
||||
the account name
|
||||
"""
|
||||
connection = gajim.connections[account].connection
|
||||
connection = app.connections[account].connection
|
||||
if not connection:
|
||||
return
|
||||
state = self.get_omemo_state(account)
|
||||
|
||||
16
omemo/ui.py
16
omemo/ui.py
@@ -38,10 +38,10 @@ except ImportError as error:
|
||||
log.debug(error)
|
||||
log.error('python-qrcode or dependencies of it are not available')
|
||||
|
||||
from common import gajim
|
||||
from common import configpaths
|
||||
from dialogs import YesNoDialog
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.common import app
|
||||
from gajim.common import configpaths
|
||||
from gajim.dialogs import YesNoDialog
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
|
||||
|
||||
@unique
|
||||
@@ -88,7 +88,7 @@ class OMEMOConfigDialog(GajimPluginConfigDialog):
|
||||
self.plugin_active = False
|
||||
|
||||
def on_run(self):
|
||||
for plugin in gajim.plugin_manager.active_plugins:
|
||||
for plugin in app.plugin_manager.active_plugins:
|
||||
log.debug(type(plugin))
|
||||
if type(plugin).__name__ == 'OmemoPlugin':
|
||||
self.plugin_active = True
|
||||
@@ -104,7 +104,7 @@ class OMEMOConfigDialog(GajimPluginConfigDialog):
|
||||
return False
|
||||
|
||||
def update_account_store(self):
|
||||
for account in sorted(gajim.contacts.get_accounts()):
|
||||
for account in sorted(app.contacts.get_accounts()):
|
||||
if account not in self.disabled_accounts and \
|
||||
not self.is_in_accountstore(account):
|
||||
self.account_store.append(row=(account,))
|
||||
@@ -358,7 +358,7 @@ class OMEMOConfigDialog(GajimPluginConfigDialog):
|
||||
# Set QR Verification Code
|
||||
if PILLOW:
|
||||
path = self.get_qrcode(
|
||||
gajim.get_jid_from_account(account), deviceid, ownfpr[2:])
|
||||
app.get_jid_from_account(account), deviceid, ownfpr[2:])
|
||||
self.qrcode.set_from_pixbuf(GdkPixbuf.Pixbuf.new_from_file(path))
|
||||
self.qrinfo.hide()
|
||||
else:
|
||||
@@ -374,7 +374,7 @@ class FingerprintWindow(Gtk.Dialog):
|
||||
self.account = self.contact.account.name
|
||||
self.plugin = plugin
|
||||
self.omemostate = self.plugin.get_omemo_state(self.account)
|
||||
self.own_jid = gajim.get_jid_from_account(self.account)
|
||||
self.own_jid = app.get_jid_from_account(self.account)
|
||||
Gtk.Dialog.__init__(self,
|
||||
title=('Fingerprints for %s') % contact.jid,
|
||||
parent=parent,
|
||||
|
||||
@@ -28,9 +28,9 @@ from base64 import b64decode, b64encode
|
||||
from nbxmpp.protocol import NS_PUBSUB, Iq
|
||||
from nbxmpp.simplexml import Node
|
||||
|
||||
from common import gajim # pylint: disable=import-error
|
||||
from common.pep import AbstractPEP # pylint: disable=import-error
|
||||
from plugins.helpers import log_calls # pylint: disable=import-error
|
||||
from gajim.common import app # pylint: disable=import-error
|
||||
from gajim.common.pep import AbstractPEP # pylint: disable=import-error
|
||||
from gajim.plugins.helpers import log_calls # pylint: disable=import-error
|
||||
|
||||
NS_PUBSUB_EVENT = NS_PUBSUB + '#event'
|
||||
|
||||
@@ -60,7 +60,7 @@ class DeviceListAnnouncement(Iq):
|
||||
def __init__(self, device_list):
|
||||
assert isinstance(device_list, list)
|
||||
assert len(device_list) > 0
|
||||
id_ = gajim.get_an_id()
|
||||
id_ = app.get_an_id()
|
||||
attrs = {'id': id_}
|
||||
Iq.__init__(self, typ='set', attrs=attrs)
|
||||
|
||||
@@ -96,7 +96,7 @@ class OmemoMessage(Node):
|
||||
class BundleInformationQuery(Iq):
|
||||
def __init__(self, contact_jid, device_id):
|
||||
assert isinstance(device_id, int)
|
||||
id_ = gajim.get_an_id()
|
||||
id_ = app.get_an_id()
|
||||
attrs = {'id': id_}
|
||||
Iq.__init__(self, typ='get', attrs=attrs, to=contact_jid)
|
||||
items = Node('items', attrs={'node': NS_BUNDLES + str(device_id)})
|
||||
@@ -106,7 +106,7 @@ class BundleInformationQuery(Iq):
|
||||
|
||||
class BundleInformationAnnouncement(Iq):
|
||||
def __init__(self, state_bundle, device_id):
|
||||
id_ = gajim.get_an_id()
|
||||
id_ = app.get_an_id()
|
||||
attrs = {'id': id_}
|
||||
Iq.__init__(self, typ='set', attrs=attrs)
|
||||
bundle_node = self.make_bundle_node(state_bundle)
|
||||
@@ -139,7 +139,7 @@ class BundleInformationAnnouncement(Iq):
|
||||
|
||||
class DevicelistQuery(Iq):
|
||||
def __init__(self, contact_jid,):
|
||||
id_ = gajim.get_an_id()
|
||||
id_ = app.get_an_id()
|
||||
attrs = {'id': id_}
|
||||
Iq.__init__(self, typ='get', attrs=attrs, to=contact_jid)
|
||||
items = Node('items', attrs={'node': NS_DEVICE_LIST})
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: PGP
|
||||
short_name: PGP
|
||||
version: 1.1.1
|
||||
version: 1.2.0
|
||||
description: PGP encryption as per XEP-0027
|
||||
authors: Philipp Hörist <philipp@hoerist.com>
|
||||
homepage: https://dev.gajim.org/gajim/gajim-plugins/wikis/pgpplugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -27,16 +27,16 @@ import queue
|
||||
import nbxmpp
|
||||
from gi.repository import GLib
|
||||
|
||||
import dialogs
|
||||
from common import gajim
|
||||
from common.connection_handlers_events import (
|
||||
from gajim import dialogs
|
||||
from gajim.common import app
|
||||
from gajim.common.connection_handlers_events import (
|
||||
MessageNotSentEvent, MessageReceivedEvent)
|
||||
from plugins import GajimPlugin
|
||||
from gajim.plugins import GajimPlugin
|
||||
|
||||
log = logging.getLogger('gajim.plugin_system.oldpgp')
|
||||
|
||||
ERROR_MSG = ''
|
||||
if not gajim.HAVE_GPG:
|
||||
if not app.HAVE_GPG:
|
||||
ERROR_MSG = 'Please install python-gnupg'
|
||||
|
||||
ALLOWED_TAGS = [('request', nbxmpp.NS_RECEIPTS),
|
||||
@@ -75,7 +75,7 @@ class OldPGPPlugin(GajimPlugin):
|
||||
self.thread = None
|
||||
|
||||
def get_gpg(self, account):
|
||||
return gajim.connections[account].gpg
|
||||
return app.connections[account].gpg
|
||||
|
||||
def activate(self):
|
||||
pass
|
||||
@@ -112,7 +112,7 @@ class OldPGPPlugin(GajimPlugin):
|
||||
_('No OpenPGP key is assigned to this contact. So you cannot '
|
||||
'encrypt messages with OpenPGP.'))
|
||||
chat_control.sendmessage = False
|
||||
elif not gajim.config.get_per('accounts', account, 'keyid'):
|
||||
elif not app.config.get_per('accounts', account, 'keyid'):
|
||||
dialogs.ErrorDialog(
|
||||
_('No OpenPGP key assigned'),
|
||||
_('No OpenPGP key is assigned to your account. So you cannot '
|
||||
@@ -140,7 +140,7 @@ class OldPGPPlugin(GajimPlugin):
|
||||
enc_tag = obj.msg_.getTag('x', namespace=nbxmpp.NS_ENCRYPTED)
|
||||
if enc_tag:
|
||||
encmsg = enc_tag.getData()
|
||||
key_id = gajim.config.get_per('accounts', account, 'keyid')
|
||||
key_id = app.config.get_per('accounts', account, 'keyid')
|
||||
if key_id:
|
||||
obj.encrypted = self.encryption_name
|
||||
self.decrypt_queue.put([encmsg, key_id, obj, conn, callback])
|
||||
@@ -180,7 +180,7 @@ class OldPGPPlugin(GajimPlugin):
|
||||
error = _('The contact\'s key (%s) does not match the key assigned '
|
||||
'in Gajim.' % obj.keyID[:8])
|
||||
else:
|
||||
my_key_id = gajim.config.get_per('accounts', account, 'keyid')
|
||||
my_key_id = app.config.get_per('accounts', account, 'keyid')
|
||||
key_list = [obj.keyID, my_key_id]
|
||||
|
||||
def _on_encrypted(output):
|
||||
@@ -189,7 +189,7 @@ class OldPGPPlugin(GajimPlugin):
|
||||
def on_yes(checked):
|
||||
if checked:
|
||||
obj.conn.gpg.always_trust.append(obj.keyID)
|
||||
gajim.thread_interface(
|
||||
app.thread_interface(
|
||||
self.get_gpg(account).encrypt,
|
||||
[obj.message, key_list, True],
|
||||
_on_encrypted, [])
|
||||
@@ -210,7 +210,7 @@ class OldPGPPlugin(GajimPlugin):
|
||||
self._finished_encrypt(
|
||||
obj, msgenc=msgenc, error=error, conn=conn,
|
||||
callback=callback)
|
||||
gajim.thread_interface(
|
||||
app.thread_interface(
|
||||
self.get_gpg(account).encrypt,
|
||||
[obj.message, key_list, False],
|
||||
_on_encrypted, [])
|
||||
@@ -221,7 +221,7 @@ class OldPGPPlugin(GajimPlugin):
|
||||
conn=None, callback=None):
|
||||
if error:
|
||||
log.error('python-gnupg error: %s', error)
|
||||
gajim.nec.push_incoming_event(
|
||||
app.nec.push_incoming_event(
|
||||
MessageNotSentEvent(
|
||||
None, conn=conn, jid=obj.jid, message=obj.message,
|
||||
error=error, time_=time.time(), session=obj.session))
|
||||
@@ -252,7 +252,7 @@ class OldPGPPlugin(GajimPlugin):
|
||||
thread.start()
|
||||
|
||||
def _encrypt_file_thread(self, file, account, callback):
|
||||
my_key_id = gajim.config.get_per('accounts', account, 'keyid')
|
||||
my_key_id = app.config.get_per('accounts', account, 'keyid')
|
||||
key_list = [file.control.contact.keyID, my_key_id]
|
||||
|
||||
encrypted = self.get_gpg(account).encrypt_file(file.get_data(), key_list)
|
||||
@@ -306,7 +306,7 @@ def check_state(key_id, account):
|
||||
info = _('No OpenPGP key is assigned to this contact. So you cannot'
|
||||
' encrypt messages.')
|
||||
else:
|
||||
error = gajim.connections[account].gpg.encrypt('test', [key_id])[1]
|
||||
error = app.connections[account].gpg.encrypt('test', [key_id])[1]
|
||||
if error:
|
||||
verification_status = _('''Contact's identity NOT verified''')
|
||||
info = _('OpenPGP key is assigned to this contact, but <b>you '
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: Plugins translations
|
||||
short_name: plugins_translations
|
||||
version: 0.6.5
|
||||
version: 0.6.6
|
||||
description: This plugin contains translation files for Gajim plugins
|
||||
authors = Denis Fomin <fominde@gmail.com>
|
||||
homepage = http://trac-plugins.gajim.org/wiki/PluginsTranslationsPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from common import gajim
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from plugins.plugins_i18n import _
|
||||
from gajim.common import app
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.plugins.plugins_i18n import _
|
||||
|
||||
|
||||
class PluginsTranslationsPlugin(GajimPlugin):
|
||||
@@ -17,7 +17,7 @@ class PluginsTranslationsPlugin(GajimPlugin):
|
||||
'for Gajim plugins')
|
||||
self.config_dialog = None
|
||||
self.config_default_values = {'last_version': '0'}
|
||||
self.locale_dir = os.path.join(gajim.PLUGINS_DIRS[1], 'locale')
|
||||
self.locale_dir = os.path.join(app.PLUGINS_DIRS[1], 'locale')
|
||||
|
||||
@log_calls('PluginsTranslationsPlugin')
|
||||
def activate(self):
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: Quick replies
|
||||
short_name: quick_replies
|
||||
version: 0.0.2
|
||||
version: 0.0.3
|
||||
description: Plugin for quick insert template message and add your own template messages
|
||||
authors = Evgeniy Popov <evgeniypopov@gmail.com>
|
||||
homepage = http://trac-plugins.gajim.org/wiki/QuickRepliesPlugin
|
||||
mix_gajim_version: 0.16.10
|
||||
mix_gajim_version: 0.16.11
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import GdkPixbuf
|
||||
|
||||
import gtkgui_helpers
|
||||
from common import gajim
|
||||
from gajim import gtkgui_helpers
|
||||
from gajim.common import app
|
||||
|
||||
from plugins import GajimPlugin
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from plugins.helpers import log_calls
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.plugins.helpers import log_calls
|
||||
|
||||
|
||||
class QuickRepliesPlugin(GajimPlugin):
|
||||
@@ -56,7 +56,7 @@ class QuickRepliesPlugin(GajimPlugin):
|
||||
if base.chat_control != chat_control:
|
||||
continue
|
||||
base.button.set_sensitive(chat_control.contact.show != 'offline' \
|
||||
and gajim.connections[chat_control.account].connected > 0)
|
||||
and app.connections[chat_control.account].connected > 0)
|
||||
|
||||
|
||||
class Base(object):
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: Regex Filter
|
||||
short_name: regex_filter
|
||||
version: 0.3
|
||||
version: 0.4
|
||||
description: Filter incoming messages using regex.
|
||||
authors: Yann Leboulanger <asterix@lagaule.org>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/RegexFilterPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -26,13 +26,13 @@ Regex Filter plugin.
|
||||
|
||||
import re
|
||||
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log, log_calls
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log, log_calls
|
||||
|
||||
from common import gajim
|
||||
from common import ged
|
||||
from command_system.framework import CommandContainer, command, doc
|
||||
from command_system.implementation.hosts import *
|
||||
from gajim.common import app
|
||||
from gajim.common import ged
|
||||
from gajim.command_system.framework import CommandContainer, command, doc
|
||||
from gajim.command_system.implementation.hosts import *
|
||||
|
||||
class RegexFilterPlugin(GajimPlugin):
|
||||
|
||||
@@ -109,7 +109,7 @@ class FilterCommands(CommandContainer):
|
||||
@doc(_("Add an incoming filter. First argument is the search regex, "
|
||||
"second argument is the replace regex."))
|
||||
def add_filter(self, search, replace):
|
||||
plugin = gajim.plugin_manager.get_active_plugin('regex_filter')
|
||||
plugin = app.plugin_manager.get_active_plugin('regex_filter')
|
||||
plugin.add_rule(search, replace)
|
||||
return _('Added rule to replace %s by %s' % (search, replace))
|
||||
|
||||
@@ -117,7 +117,7 @@ class FilterCommands(CommandContainer):
|
||||
@doc(_("Remove an incoming filter. Argument is the rule number. "
|
||||
"See /list_rules command."))
|
||||
def remove_filter(self, num):
|
||||
plugin = gajim.plugin_manager.get_active_plugin('regex_filter')
|
||||
plugin = app.plugin_manager.get_active_plugin('regex_filter')
|
||||
if plugin.remove_rule(num):
|
||||
return _('Rule number %s removed' % num)
|
||||
return _('Rule number %s does not exist' % num)
|
||||
@@ -125,7 +125,7 @@ class FilterCommands(CommandContainer):
|
||||
@command("list_filters")
|
||||
@doc(_("List incoming filters."))
|
||||
def list_filters(self):
|
||||
plugin = gajim.plugin_manager.get_active_plugin('regex_filter')
|
||||
plugin = app.plugin_manager.get_active_plugin('regex_filter')
|
||||
rules = plugin.get_rules()
|
||||
st = ''
|
||||
for num, rule in rules.items():
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[info]
|
||||
name: Roster Tweaks
|
||||
short_name: roster_tweaks
|
||||
version: 0.6.3
|
||||
version: 0.6.4
|
||||
description: Allows user to tweak roster window appearance (eg. make it compact).
|
||||
Added ability to quickly change the status message to all connected accounts.
|
||||
authors = Denis Fomin <fominde@gmail.com>
|
||||
homepage = http://trac-plugins.gajim.org/wiki/RosterTweaksPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -5,12 +5,12 @@ from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import GObject
|
||||
|
||||
from common import gajim, ged, helpers, pep
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from dialogs import ChangeActivityDialog, ChangeMoodDialog
|
||||
import gtkgui_helpers
|
||||
from gajim.common import app, ged, helpers, pep
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.dialogs import ChangeActivityDialog, ChangeMoodDialog
|
||||
from gajim import gtkgui_helpers
|
||||
|
||||
|
||||
class RosterTweaksPlugin(GajimPlugin):
|
||||
@@ -34,7 +34,7 @@ class RosterTweaksPlugin(GajimPlugin):
|
||||
self.gui_extension_points = {
|
||||
'roster_draw_contact': (self.roster_draw_contact,
|
||||
self.disconnect_roster_draw_contact),}
|
||||
self.roster = gajim.interface.roster
|
||||
self.roster = app.interface.roster
|
||||
self.config_dialog = RosterTweaksPluginConfigDialog(self)
|
||||
|
||||
def roster_draw_contact(self, roster,jid, account, contact):
|
||||
@@ -57,10 +57,10 @@ class RosterTweaksPlugin(GajimPlugin):
|
||||
self.connected = False
|
||||
|
||||
def pep_received(self, obj):
|
||||
if obj.jid != gajim.get_jid_from_account(obj.conn.name):
|
||||
if obj.jid != app.get_jid_from_account(obj.conn.name):
|
||||
return
|
||||
|
||||
pep_dict = gajim.connections[obj.conn.name].pep
|
||||
pep_dict = app.connections[obj.conn.name].pep
|
||||
if obj.pep_type == 'mood':
|
||||
img = self.xml.get_object('mood_image')
|
||||
if 'mood' in pep_dict:
|
||||
@@ -78,7 +78,7 @@ class RosterTweaksPlugin(GajimPlugin):
|
||||
|
||||
def our_show(self, obj):
|
||||
if self.active:
|
||||
if helpers.get_global_show() != gajim.SHOW_LIST[0]:
|
||||
if helpers.get_global_show() != app.SHOW_LIST[0]:
|
||||
self.status_widget.set_text(helpers.get_global_status())
|
||||
else:
|
||||
self.status_widget.set_text('')
|
||||
@@ -145,13 +145,13 @@ class RosterTweaksPlugin(GajimPlugin):
|
||||
def status_changed(self, widget, event):
|
||||
if event.keyval == gtk.keysyms.Return or \
|
||||
event.keyval == gtk.keysyms.KP_Enter:
|
||||
accounts = gajim.connections.keys()
|
||||
accounts = app.connections.keys()
|
||||
message = widget.get_text()
|
||||
for account in accounts:
|
||||
if not gajim.account_is_connected(account):
|
||||
if not app.account_is_connected(account):
|
||||
continue
|
||||
current_show = gajim.SHOW_LIST[
|
||||
gajim.connections[account].connected]
|
||||
current_show = app.SHOW_LIST[
|
||||
app.connections[account].connected]
|
||||
self.roster.send_status(account, current_show, message)
|
||||
self.font_desc.set_weight(pango.WEIGHT_BOLD)
|
||||
widget.modify_font(self.font_desc)
|
||||
@@ -177,9 +177,9 @@ class RosterTweaksPlugin(GajimPlugin):
|
||||
self.pep_dict.get('mood_text', None))
|
||||
|
||||
def send_pep(self):
|
||||
accounts = gajim.connections.keys()
|
||||
accounts = app.connections.keys()
|
||||
for account in accounts:
|
||||
if gajim.account_is_connected(account):
|
||||
if app.account_is_connected(account):
|
||||
self.roster.send_pep(account, self.pep_dict)
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[info]
|
||||
name: Server Status Icons
|
||||
short_name: server_status_icons
|
||||
version: 0.1.3
|
||||
version: 0.1.4
|
||||
description: Replace standard Gajim status icons with server
|
||||
specific for known XMPP server accounts (vk.com, ...)
|
||||
authors = Denis Fomin <fominde@gmail.com>
|
||||
Pavel Suslov
|
||||
homepage = http://trac-plugins.gajim.org/wiki/ServerStatusIconsPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
##
|
||||
import os
|
||||
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
import gtkgui_helpers
|
||||
from common import gajim
|
||||
from common import helpers
|
||||
from common import ged
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim import gtkgui_helpers
|
||||
from gajim.common import app
|
||||
from gajim.common import helpers
|
||||
from gajim.common import ged
|
||||
|
||||
|
||||
class ServerStatusIconsPlugin(GajimPlugin):
|
||||
@@ -33,7 +33,7 @@ class ServerStatusIconsPlugin(GajimPlugin):
|
||||
def connect_with_roster_draw_contact(self, roster, jid, account, contact):
|
||||
if not self.active:
|
||||
return
|
||||
if gajim.jid_is_transport(jid):
|
||||
if app.jid_is_transport(jid):
|
||||
return
|
||||
|
||||
child_iters = roster._get_contact_iter(jid, account, contact,
|
||||
@@ -42,7 +42,7 @@ class ServerStatusIconsPlugin(GajimPlugin):
|
||||
return
|
||||
|
||||
icon_name = helpers.get_icon_name_to_show(contact, account)
|
||||
if gajim.events.get_events(account, jid) or icon_name == 'requested':
|
||||
if app.events.get_events(account, jid) or icon_name == 'requested':
|
||||
return
|
||||
|
||||
host = jid.split('@')[1]
|
||||
@@ -79,22 +79,22 @@ class ServerStatusIconsPlugin(GajimPlugin):
|
||||
|
||||
def _nec_our_show(self, obj):
|
||||
account = obj.conn.name
|
||||
roster = gajim.interface.roster
|
||||
status = gajim.connections[account].connected
|
||||
roster = app.interface.roster
|
||||
status = app.connections[account].connected
|
||||
|
||||
if account not in gajim.contacts.get_accounts():
|
||||
if account not in app.contacts.get_accounts():
|
||||
return
|
||||
child_iterA = roster._get_account_iter(account, roster.model)
|
||||
if not child_iterA:
|
||||
return
|
||||
|
||||
hostname = gajim.config.get_per('accounts', account, 'hostname')
|
||||
hostname = app.config.get_per('accounts', account, 'hostname')
|
||||
server = self.known_servers.get(hostname, False)
|
||||
if not server:
|
||||
return
|
||||
|
||||
if not roster.regroup:
|
||||
show = gajim.SHOW_LIST[status]
|
||||
show = app.SHOW_LIST[status]
|
||||
else: # accounts merged
|
||||
show = helpers.get_global_show()
|
||||
|
||||
@@ -114,13 +114,13 @@ class ServerStatusIconsPlugin(GajimPlugin):
|
||||
@log_calls('ServerStatusIconsPlugin')
|
||||
def activate(self):
|
||||
self.active = True
|
||||
gajim.interface.roster.setup_and_draw_roster()
|
||||
gajim.ged.register_event_handler('our-show', ged.GUI2,
|
||||
app.interface.roster.setup_and_draw_roster()
|
||||
app.ged.register_event_handler('our-show', ged.GUI2,
|
||||
self._nec_our_show)
|
||||
|
||||
@log_calls('ServerStatusIconsPlugin')
|
||||
def deactivate(self):
|
||||
self.active = None
|
||||
gajim.ged.remove_event_handler('our-show', ged.GUI2,
|
||||
app.ged.remove_event_handler('our-show', ged.GUI2,
|
||||
self._nec_our_show)
|
||||
gajim.interface.roster.setup_and_draw_roster()
|
||||
app.interface.roster.setup_and_draw_roster()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[info]
|
||||
name: Set Location
|
||||
short_name: set_location
|
||||
version: 0.7.2
|
||||
version: 0.7.3
|
||||
description: Set information about the current geographical or physical location.
|
||||
To be able to specify a location on the built-in card, you must install gir1.2-gtkchamplain
|
||||
authors: Denis Fomin <fominde@gmail.com>
|
||||
homepage: http://trac-plugins.gajim.org/wiki/SetLocalitionPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -7,14 +7,14 @@ from gi.repository import GdkPixbuf
|
||||
import os
|
||||
import time
|
||||
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from common import gajim
|
||||
from common import ged
|
||||
from common import helpers
|
||||
import gtkgui_helpers
|
||||
from dialogs import InputDialog, WarningDialog
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.common import app
|
||||
from gajim.common import ged
|
||||
from gajim.common import helpers
|
||||
from gajim import gtkgui_helpers
|
||||
from gajim.dialogs import InputDialog, WarningDialog
|
||||
|
||||
|
||||
class SetLocationPlugin(GajimPlugin):
|
||||
@@ -46,16 +46,16 @@ class SetLocationPlugin(GajimPlugin):
|
||||
|
||||
@log_calls('SetLocationPlugin')
|
||||
def activate(self):
|
||||
gajim.ged.register_event_handler('signed-in', ged.POSTGUI,
|
||||
app.ged.register_event_handler('signed-in', ged.POSTGUI,
|
||||
self.on_signed_in)
|
||||
self.send_locations()
|
||||
|
||||
@log_calls('SetLocationPlugin')
|
||||
def deactivate(self):
|
||||
self._data = {}
|
||||
for acct in gajim.connections:
|
||||
gajim.connections[acct].send_location(self._data)
|
||||
gajim.ged.remove_event_handler('signed-in', ged.POSTGUI,
|
||||
for acct in app.connections:
|
||||
app.connections[acct].send_location(self._data)
|
||||
app.ged.remove_event_handler('signed-in', ged.POSTGUI,
|
||||
self.on_signed_in)
|
||||
|
||||
def on_signed_in(self, network_event):
|
||||
@@ -72,11 +72,11 @@ class SetLocationPlugin(GajimPlugin):
|
||||
|
||||
if not acct:
|
||||
#set geo for all accounts
|
||||
for acct in gajim.connections:
|
||||
if gajim.config.get_per('accounts', acct, 'publish_location'):
|
||||
gajim.connections[acct].send_location(self._data)
|
||||
elif gajim.config.get_per('accounts', acct, 'publish_location'):
|
||||
gajim.connections[acct].send_location(self._data)
|
||||
for acct in app.connections:
|
||||
if app.config.get_per('accounts', acct, 'publish_location'):
|
||||
app.connections[acct].send_location(self._data)
|
||||
elif app.config.get_per('accounts', acct, 'publish_location'):
|
||||
app.connections[acct].send_location(self._data)
|
||||
|
||||
|
||||
class SetLocationPluginConfigDialog(GajimPluginConfigDialog):
|
||||
@@ -234,9 +234,9 @@ class SetLocationPluginConfigDialog(GajimPluginConfigDialog):
|
||||
def show_contacts(self):
|
||||
from gi.repository import Champlain, Clutter
|
||||
data = {}
|
||||
accounts = gajim.contacts._accounts
|
||||
accounts = app.contacts._accounts
|
||||
for account in accounts:
|
||||
if not gajim.account_is_connected(account):
|
||||
if not app.account_is_connected(account):
|
||||
continue
|
||||
for contact in accounts[account].contacts._contacts:
|
||||
pep = accounts[account].contacts._contacts[contact][0].pep
|
||||
@@ -276,7 +276,7 @@ class SetLocationPluginConfigDialog(GajimPluginConfigDialog):
|
||||
if jid:
|
||||
# we want an avatar
|
||||
puny_jid = helpers.sanitize_filename(jid)
|
||||
path_to_file = os.path.join(gajim.AVATAR_PATH, puny_jid) + suffix
|
||||
path_to_file = os.path.join(app.AVATAR_PATH, puny_jid) + suffix
|
||||
path_to_local_file = path_to_file + '_local'
|
||||
for extension in ('.png', '.jpeg'):
|
||||
path_to_local_file_full = path_to_local_file + extension
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[info]
|
||||
name: Url image preview
|
||||
short_name: url_image_preview
|
||||
version: 0.5.5
|
||||
version: 0.5.6
|
||||
description: Url image preview in chatbox.
|
||||
authors = Denis Fomin <fominde@gmail.com>
|
||||
Yann Leboulanger <asterix@lagaule.org>
|
||||
homepage = http://trac-plugins.gajim.org/wiki/UrlImagePreviewPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -5,12 +5,12 @@ from gi.repository import GdkPixbuf
|
||||
import re
|
||||
import os
|
||||
|
||||
from common import gajim
|
||||
from common import helpers
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
from conversation_textview import TextViewImage
|
||||
from gajim.common import app
|
||||
from gajim.common import helpers
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||
from gajim.conversation_textview import TextViewImage
|
||||
|
||||
EXTENSIONS = ('.png','.jpg','.jpeg','.gif','.raw','.svg')
|
||||
|
||||
@@ -66,7 +66,7 @@ class Base(object):
|
||||
self.textview = self.chat_control.conv_textview
|
||||
|
||||
def print_special_text(self, special_text, other_tags, graphics=True):
|
||||
if not gajim.interface.basic_pattern_re.match(special_text):
|
||||
if not app.interface.basic_pattern_re.match(special_text):
|
||||
return
|
||||
# remove qip bbcode
|
||||
special_text = special_text.rsplit('[/img]')[0]
|
||||
@@ -86,7 +86,7 @@ class Base(object):
|
||||
iter_ = buffer_.get_end_iter()
|
||||
mark = buffer_.create_mark(None, iter_, True)
|
||||
# start downloading image
|
||||
gajim.thread_interface(helpers.download_image, [
|
||||
app.thread_interface(helpers.download_image, [
|
||||
self.textview.account, {'src': special_text}], self._update_img,
|
||||
[mark])
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import gtk
|
||||
import json
|
||||
import urllib
|
||||
import urllib2
|
||||
from common import gajim
|
||||
from common import app
|
||||
from common import ged
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
@@ -49,7 +49,7 @@ class UrlShortenerPlugin(GajimPlugin):
|
||||
if hasattr(event, 'shortened'):
|
||||
return
|
||||
|
||||
iterator = gajim.interface.basic_pattern_re.finditer(event.message)
|
||||
iterator = app.interface.basic_pattern_re.finditer(event.message)
|
||||
for match in iterator:
|
||||
start, end = match.span()
|
||||
link = event.message[start:end]
|
||||
@@ -125,7 +125,7 @@ class Base(object):
|
||||
if is_xhtml_link:
|
||||
break
|
||||
# Check if we accept this as an uri
|
||||
schemes = gajim.config.get('uri_schemes').split()
|
||||
schemes = app.config.get('uri_schemes').split()
|
||||
for scheme in schemes:
|
||||
if special_text.startswith(scheme):
|
||||
text_is_valid_uri = True
|
||||
@@ -135,7 +135,7 @@ class Base(object):
|
||||
return
|
||||
end_iter = buffer_.get_end_iter()
|
||||
mark = buffer_.create_mark(None, end_iter, True)
|
||||
gajim.thread_interface(self.insert_hyperlink, [mark, special_text,
|
||||
app.thread_interface(self.insert_hyperlink, [mark, special_text,
|
||||
ttt])
|
||||
self.textview.plugin_modified = True
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[info]
|
||||
name: Wicd support
|
||||
short_name: wicd_support
|
||||
version: 0.1.2
|
||||
version: 0.1.3
|
||||
description: Support for autodetection of network status for Wicd Network Manager.
|
||||
Requires wicd and python-dbus.
|
||||
authors = Denis Fomin <fominde@gmail.com>
|
||||
homepage = http://trac-plugins.gajim.org/wiki/WicdSupportPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import os
|
||||
|
||||
from common import gajim
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from common import dbus_support
|
||||
from gajim.common import app
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
from gajim.common import dbus_support
|
||||
|
||||
|
||||
class WicdPlugin(GajimPlugin):
|
||||
@@ -31,7 +31,7 @@ class WicdPlugin(GajimPlugin):
|
||||
def activate(self):
|
||||
try:
|
||||
import dbus
|
||||
from common.dbus_support import system_bus
|
||||
from app.common.dbus_support import system_bus
|
||||
|
||||
self.bus = system_bus.bus()
|
||||
|
||||
@@ -59,12 +59,12 @@ class WicdPlugin(GajimPlugin):
|
||||
#WIRED = 3
|
||||
#SUSPENDED = 4
|
||||
if state == 2 or state == 3:
|
||||
for connection in gajim.connections.values():
|
||||
if gajim.config.get_per('accounts', connection.name,
|
||||
for connection in app.connections.values():
|
||||
if app.config.get_per('accounts', connection.name,
|
||||
'listen_to_network_manager') and connection.time_to_reconnect:
|
||||
connection._reconnect()
|
||||
else:
|
||||
for connection in gajim.connections.values():
|
||||
if gajim.config.get_per('accounts', connection.name,
|
||||
for connection in app.connections.values():
|
||||
if app.config.get_per('accounts', connection.name,
|
||||
'listen_to_network_manager') and connection.connected > 1:
|
||||
connection._disconnectedReconnCB()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[info]
|
||||
name: Wrong Layout
|
||||
short_name: Wrong Layout
|
||||
version: 0.1.3
|
||||
version: 0.1.4
|
||||
description: Press alt+r to convert chars typed in wrong layout Rus<>Eng
|
||||
authors: Denis Fomin <fominde@gmail.com>
|
||||
homepage: https://dev.gajim.org/gajim/gajim-plugins/wikis/WrongLayoutPlugin
|
||||
min_gajim_version: 0.16.10
|
||||
min_gajim_version: 0.16.11
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
from common import helpers
|
||||
from common import gajim
|
||||
from gajim.common import helpers
|
||||
from gajim.common import app
|
||||
|
||||
from plugins import GajimPlugin
|
||||
from plugins.helpers import log_calls
|
||||
from gajim.plugins import GajimPlugin
|
||||
from gajim.plugins.helpers import log_calls
|
||||
|
||||
|
||||
class WrongLayoutPlugin(GajimPlugin):
|
||||
@@ -118,7 +118,7 @@ class Base(object):
|
||||
else:
|
||||
start = message_buffer.get_start_iter()
|
||||
end = message_buffer.get_end_iter()
|
||||
stext = gajim.config.get('gc_refer_to_nick_char')
|
||||
stext = app.config.get('gc_refer_to_nick_char')
|
||||
res = start.forward_search(stext, Gtk.TextSearchFlags.TEXT_ONLY, None)
|
||||
if res:
|
||||
first, start = res
|
||||
|
||||
Reference in New Issue
Block a user