Use absolute imports
This commit is contained in:
parent
10f8fe2bb5
commit
efec098aef
|
@ -29,12 +29,12 @@ from gi.repository import GLib
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import dataforms_widget
|
from gajim import dataforms_widget
|
||||||
|
|
||||||
class CommandWindow:
|
class CommandWindow:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -26,11 +26,11 @@
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
|
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
class Column(IntEnum):
|
class Column(IntEnum):
|
||||||
|
|
|
@ -18,21 +18,22 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
from common import helpers
|
from gajim.common import gajim as c_gajim
|
||||||
from common import gajim
|
from gajim.common import helpers
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.gajim import interface
|
||||||
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import config
|
from gajim import config
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import features_window
|
from gajim import features_window
|
||||||
import shortcuts_window
|
from gajim import shortcuts_window
|
||||||
import plugins.gui
|
import gajim.plugins.gui
|
||||||
import history_window
|
from gajim import history_window
|
||||||
import disco
|
from gajim import disco
|
||||||
from history_sync import HistorySyncAssistant
|
from gajim.history_sync import HistorySyncAssistant
|
||||||
from server_info import ServerInfoDialog
|
from gajim.server_info import ServerInfoDialog
|
||||||
|
|
||||||
|
|
||||||
class AppActions():
|
class AppActions():
|
||||||
|
@ -43,23 +44,23 @@ class AppActions():
|
||||||
# Application Menu Actions
|
# Application Menu Actions
|
||||||
|
|
||||||
def on_preferences(self, action, param):
|
def on_preferences(self, action, param):
|
||||||
if 'preferences' in gajim.interface.instances:
|
if 'preferences' in interface.instances:
|
||||||
gajim.interface.instances['preferences'].window.present()
|
interface.instances['preferences'].window.present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances['preferences'] = \
|
interface.instances['preferences'] = \
|
||||||
config.PreferencesWindow()
|
config.PreferencesWindow()
|
||||||
|
|
||||||
def on_plugins(self, action, param):
|
def on_plugins(self, action, param):
|
||||||
if 'plugins' in gajim.interface.instances:
|
if 'plugins' in interface.instances:
|
||||||
gajim.interface.instances['plugins'].window.present()
|
interface.instances['plugins'].window.present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances['plugins'] = plugins.gui.PluginsWindow()
|
interface.instances['plugins'] = gajim.plugins.gui.PluginsWindow()
|
||||||
|
|
||||||
def on_accounts(self, action, param):
|
def on_accounts(self, action, param):
|
||||||
if 'accounts' in gajim.interface.instances:
|
if 'accounts' in interface.instances:
|
||||||
gajim.interface.instances['accounts'].window.present()
|
interface.instances['accounts'].window.present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances['accounts'] = config.AccountsWindow()
|
interface.instances['accounts'] = config.AccountsWindow()
|
||||||
|
|
||||||
def on_history_manager(self, action, param):
|
def on_history_manager(self, action, param):
|
||||||
config_path = '-c %s' % gajim.gajimpaths.data_root
|
config_path = '-c %s' % gajim.gajimpaths.data_root
|
||||||
|
@ -76,12 +77,12 @@ class AppActions():
|
||||||
config.ManageBookmarksWindow()
|
config.ManageBookmarksWindow()
|
||||||
|
|
||||||
def on_quit(self, action, param):
|
def on_quit(self, action, param):
|
||||||
gajim.interface.roster.on_quit_request()
|
interface.roster.on_quit_request()
|
||||||
|
|
||||||
# Accounts Actions
|
# Accounts Actions
|
||||||
|
|
||||||
def on_profile(self, action, param):
|
def on_profile(self, action, param):
|
||||||
gajim.interface.edit_own_details(param.get_string())
|
interface.edit_own_details(param.get_string())
|
||||||
|
|
||||||
def on_activate_bookmark(self, action, param):
|
def on_activate_bookmark(self, action, param):
|
||||||
dict_ = param.unpack()
|
dict_ = param.unpack()
|
||||||
|
@ -91,19 +92,19 @@ class AppActions():
|
||||||
nick = dict_['nick']
|
nick = dict_['nick']
|
||||||
if 'password' in dict_:
|
if 'password' in dict_:
|
||||||
password = dict_['password']
|
password = dict_['password']
|
||||||
gajim.interface.join_gc_room(account, jid, nick, password)
|
interface.join_gc_room(account, jid, nick, password)
|
||||||
|
|
||||||
def on_send_server_message(self, action, param):
|
def on_send_server_message(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
server = gajim.config.get_per('accounts', account, 'hostname')
|
server = c_gajim.config.get_per('accounts', account, 'hostname')
|
||||||
server += '/announce/online'
|
server += '/announce/online'
|
||||||
dialogs.SingleMessageWindow(account, server, 'send')
|
dialogs.SingleMessageWindow(account, server, 'send')
|
||||||
|
|
||||||
def on_service_disco(self, action, param):
|
def on_service_disco(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
server_jid = gajim.config.get_per('accounts', account, 'hostname')
|
server_jid = c_gajim.config.get_per('accounts', account, 'hostname')
|
||||||
if server_jid in gajim.interface.instances[account]['disco']:
|
if server_jid in interface.instances[account]['disco']:
|
||||||
gajim.interface.instances[account]['disco'][server_jid].\
|
interface.instances[account]['disco'][server_jid].\
|
||||||
window.present()
|
window.present()
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
@ -114,16 +115,16 @@ class AppActions():
|
||||||
|
|
||||||
def on_join_gc(self, action, param):
|
def on_join_gc(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
invisible_show = gajim.SHOW_LIST.index('invisible')
|
invisible_show = c_gajim.SHOW_LIST.index('invisible')
|
||||||
if gajim.connections[account].connected == invisible_show:
|
if c_gajim.connections[account].connected == invisible_show:
|
||||||
dialogs.ErrorDialog(_(
|
dialogs.ErrorDialog(_(
|
||||||
'You cannot join a group chat while you are invisible'))
|
'You cannot join a group chat while you are invisible'))
|
||||||
return
|
return
|
||||||
if 'join_gc' in gajim.interface.instances[account]:
|
if 'join_gc' in interface.instances[account]:
|
||||||
gajim.interface.instances[account]['join_gc'].window.present()
|
interface.instances[account]['join_gc'].window.present()
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
gajim.interface.instances[account]['join_gc'] = \
|
interface.instances[account]['join_gc'] = \
|
||||||
dialogs.JoinGroupchatWindow(account)
|
dialogs.JoinGroupchatWindow(account)
|
||||||
except GajimGeneralException:
|
except GajimGeneralException:
|
||||||
pass
|
pass
|
||||||
|
@ -141,64 +142,64 @@ class AppActions():
|
||||||
|
|
||||||
def on_archiving_preferences(self, action, param):
|
def on_archiving_preferences(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
if 'archiving_preferences' in gajim.interface.instances[account]:
|
if 'archiving_preferences' in interface.instances[account]:
|
||||||
gajim.interface.instances[account]['archiving_preferences'].window.\
|
interface.instances[account]['archiving_preferences'].window.\
|
||||||
present()
|
present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances[account]['archiving_preferences'] = \
|
interface.instances[account]['archiving_preferences'] = \
|
||||||
dialogs.Archiving313PreferencesWindow(account)
|
dialogs.Archiving313PreferencesWindow(account)
|
||||||
|
|
||||||
def on_history_sync(self, action, param):
|
def on_history_sync(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
if 'history_sync' in gajim.interface.instances[account]:
|
if 'history_sync' in interface.instances[account]:
|
||||||
gajim.interface.instances[account]['history_sync'].present()
|
interface.instances[account]['history_sync'].present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances[account]['history_sync'] = \
|
interface.instances[account]['history_sync'] = \
|
||||||
HistorySyncAssistant(account, gajim.interface.roster.window)
|
HistorySyncAssistant(account, interface.roster.window)
|
||||||
|
|
||||||
def on_privacy_lists(self, action, param):
|
def on_privacy_lists(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
if 'privacy_lists' in gajim.interface.instances[account]:
|
if 'privacy_lists' in interface.instances[account]:
|
||||||
gajim.interface.instances[account]['privacy_lists'].window.present()
|
interface.instances[account]['privacy_lists'].window.present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances[account]['privacy_lists'] = \
|
interface.instances[account]['privacy_lists'] = \
|
||||||
dialogs.PrivacyListsWindow(account)
|
dialogs.PrivacyListsWindow(account)
|
||||||
|
|
||||||
def on_server_info(self, action, param):
|
def on_server_info(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
if 'server_info' in gajim.interface.instances[account]:
|
if 'server_info' in interface.instances[account]:
|
||||||
gajim.interface.instances[account]['server_info'].present()
|
interface.instances[account]['server_info'].present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances[account]['server_info'] = \
|
interface.instances[account]['server_info'] = \
|
||||||
ServerInfoDialog(account)
|
ServerInfoDialog(account)
|
||||||
|
|
||||||
def on_xml_console(self, action, param):
|
def on_xml_console(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
if 'xml_console' in gajim.interface.instances[account]:
|
if 'xml_console' in interface.instances[account]:
|
||||||
gajim.interface.instances[account]['xml_console'].present()
|
interface.instances[account]['xml_console'].present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances[account]['xml_console'] = \
|
interface.instances[account]['xml_console'] = \
|
||||||
dialogs.XMLConsoleWindow(account)
|
dialogs.XMLConsoleWindow(account)
|
||||||
|
|
||||||
# Admin Actions
|
# Admin Actions
|
||||||
|
|
||||||
def on_set_motd(self, action, param):
|
def on_set_motd(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
server = gajim.config.get_per('accounts', account, 'hostname')
|
server = c_gajim.config.get_per('accounts', account, 'hostname')
|
||||||
server += '/announce/motd'
|
server += '/announce/motd'
|
||||||
dialogs.SingleMessageWindow(account, server, 'send')
|
dialogs.SingleMessageWindow(account, server, 'send')
|
||||||
|
|
||||||
def on_update_motd(self, action, param):
|
def on_update_motd(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
server = gajim.config.get_per('accounts', account, 'hostname')
|
server = c_gajim.config.get_per('accounts', account, 'hostname')
|
||||||
server += '/announce/motd/update'
|
server += '/announce/motd/update'
|
||||||
dialogs.SingleMessageWindow(account, server, 'send')
|
dialogs.SingleMessageWindow(account, server, 'send')
|
||||||
|
|
||||||
def on_delete_motd(self, action, param):
|
def on_delete_motd(self, action, param):
|
||||||
account = param.get_string()
|
account = param.get_string()
|
||||||
server = gajim.config.get_per('accounts', account, 'hostname')
|
server = c_gajim.config.get_per('accounts', account, 'hostname')
|
||||||
server += '/announce/motd/delete'
|
server += '/announce/motd/delete'
|
||||||
gajim.connections[account].send_motd(server)
|
c_gajim.connections[account].send_motd(server)
|
||||||
|
|
||||||
# Help Actions
|
# Help Actions
|
||||||
|
|
||||||
|
@ -222,15 +223,15 @@ class AppActions():
|
||||||
# View Actions
|
# View Actions
|
||||||
|
|
||||||
def on_file_transfers(self, action, param):
|
def on_file_transfers(self, action, param):
|
||||||
if gajim.interface.instances['file_transfers']. \
|
if interface.instances['file_transfers']. \
|
||||||
window.get_property('visible'):
|
window.get_property('visible'):
|
||||||
gajim.interface.instances['file_transfers'].window.present()
|
interface.instances['file_transfers'].window.present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances['file_transfers'].window.show_all()
|
interface.instances['file_transfers'].window.show_all()
|
||||||
|
|
||||||
def on_history(self, action, param):
|
def on_history(self, action, param):
|
||||||
if 'logs' in gajim.interface.instances:
|
if 'logs' in interface.instances:
|
||||||
gajim.interface.instances['logs'].window.present()
|
interface.instances['logs'].window.present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances['logs'] = history_window.\
|
interface.instances['logs'] = history_window.\
|
||||||
HistoryWindow()
|
HistoryWindow()
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
from gi.repository import Gdk
|
from gi.repository import Gdk
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
|
|
||||||
class AtomWindow:
|
class AtomWindow:
|
||||||
window = None
|
window = None
|
||||||
|
|
|
@ -34,29 +34,29 @@ from gi.repository import Gdk
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import gui_menu_builder
|
from gajim import gui_menu_builder
|
||||||
import message_control
|
from gajim import message_control
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
|
|
||||||
from common import logger
|
from gajim.common import logger
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from common.stanza_session import EncryptedStanzaSession, ArchivingStanzaSession
|
from gajim.common.stanza_session import EncryptedStanzaSession, ArchivingStanzaSession
|
||||||
from common.contacts import GC_Contact
|
from gajim.common.contacts import GC_Contact
|
||||||
from common.logger import KindConstant
|
from gajim.common.logger import KindConstant
|
||||||
from nbxmpp.protocol import NS_XHTML, NS_XHTML_IM, NS_FILE, NS_MUC
|
from nbxmpp.protocol import NS_XHTML, NS_XHTML_IM, NS_FILE, NS_MUC
|
||||||
from nbxmpp.protocol import NS_ESESSION
|
from nbxmpp.protocol import NS_ESESSION
|
||||||
from nbxmpp.protocol import NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO
|
from nbxmpp.protocol import NS_JINGLE_RTP_AUDIO, NS_JINGLE_RTP_VIDEO
|
||||||
from nbxmpp.protocol import NS_JINGLE_ICE_UDP, NS_JINGLE_FILE_TRANSFER_5
|
from nbxmpp.protocol import NS_JINGLE_ICE_UDP, NS_JINGLE_FILE_TRANSFER_5
|
||||||
from nbxmpp.protocol import NS_CHATSTATES
|
from nbxmpp.protocol import NS_CHATSTATES
|
||||||
from common.connection_handlers_events import MessageOutgoingEvent
|
from gajim.common.connection_handlers_events import MessageOutgoingEvent
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
|
|
||||||
from command_system.implementation.hosts import ChatCommands
|
from gajim.command_system.implementation.hosts import ChatCommands
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import gtkspell
|
import gtkspell
|
||||||
|
@ -64,7 +64,7 @@ try:
|
||||||
except (ImportError, ValueError):
|
except (ImportError, ValueError):
|
||||||
HAS_GTK_SPELL = False
|
HAS_GTK_SPELL = False
|
||||||
|
|
||||||
from chat_control_base import ChatControlBase
|
from gajim.chat_control_base import ChatControlBase
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
class ChatControl(ChatControlBase):
|
class ChatControl(ChatControlBase):
|
||||||
|
@ -1033,7 +1033,7 @@ class ChatControl(ChatControlBase):
|
||||||
name = self.get_our_nick()
|
name = self.get_our_nick()
|
||||||
if not xhtml and not encrypted and \
|
if not xhtml and not encrypted and \
|
||||||
gajim.config.get('rst_formatting_outgoing_messages'):
|
gajim.config.get('rst_formatting_outgoing_messages'):
|
||||||
from common.rst_xhtml_generator import create_xhtml
|
from gajim.common.rst_xhtml_generator import create_xhtml
|
||||||
xhtml = create_xhtml(text)
|
xhtml = create_xhtml(text)
|
||||||
if xhtml:
|
if xhtml:
|
||||||
xhtml = '<body xmlns="%s">%s</body>' % (NS_XHTML, xhtml)
|
xhtml = '<body xmlns="%s">%s</body>' % (NS_XHTML, xhtml)
|
||||||
|
|
|
@ -35,35 +35,35 @@ from gi.repository import Pango
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
from gi.repository import Gio
|
from gi.repository import Gio
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
from gtkgui_helpers import Color
|
from gajim.gtkgui_helpers import Color
|
||||||
import message_control
|
from gajim import message_control
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import history_window
|
from gajim import history_window
|
||||||
import notify
|
from gajim import notify
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import emoticons
|
from gajim import emoticons
|
||||||
from scrolled_window import ScrolledWindow
|
from gajim.scrolled_window import ScrolledWindow
|
||||||
from common import events
|
from gajim.common import events
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from message_control import MessageControl
|
from gajim.message_control import MessageControl
|
||||||
from conversation_textview import ConversationTextview
|
from gajim.conversation_textview import ConversationTextview
|
||||||
from message_textview import MessageTextView
|
from gajim.message_textview import MessageTextView
|
||||||
from common.contacts import GC_Contact
|
from gajim.common.contacts import GC_Contact
|
||||||
from common.connection_handlers_events import MessageOutgoingEvent
|
from gajim.common.connection_handlers_events import MessageOutgoingEvent
|
||||||
|
|
||||||
from command_system.implementation.middleware import ChatCommandProcessor
|
from gajim.command_system.implementation.middleware import ChatCommandProcessor
|
||||||
from command_system.implementation.middleware import CommandTools
|
from gajim.command_system.implementation.middleware import CommandTools
|
||||||
|
|
||||||
# The members of these modules are not referenced directly anywhere in this
|
# The members of these modules are not referenced directly anywhere in this
|
||||||
# module, but still they need to be kept around. Importing them automatically
|
# module, but still they need to be kept around. Importing them automatically
|
||||||
# registers the contained CommandContainers with the command system, thereby
|
# registers the contained CommandContainers with the command system, thereby
|
||||||
# populating the list of available commands.
|
# populating the list of available commands.
|
||||||
import command_system.implementation.standard
|
from gajim.command_system.implementation import standard
|
||||||
import command_system.implementation.execute
|
from gajim.command_system.implementation import execute
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import gtkspell
|
import gtkspell
|
||||||
|
|
|
@ -31,7 +31,7 @@ to automatic discovery and dispatching, also features manual control
|
||||||
over the process.
|
over the process.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from .tools import remove
|
from gajim.command_system.tools import remove
|
||||||
|
|
||||||
COMMANDS = {}
|
COMMANDS = {}
|
||||||
CONTAINERS = {}
|
CONTAINERS = {}
|
||||||
|
@ -66,7 +66,7 @@ def traverse_commands(container):
|
||||||
yield attribute
|
yield attribute
|
||||||
|
|
||||||
def is_command(attribute):
|
def is_command(attribute):
|
||||||
from .framework import Command
|
from gajim.command_system.framework import Command
|
||||||
return isinstance(attribute, Command)
|
return isinstance(attribute, Command)
|
||||||
|
|
||||||
def is_root(namespace):
|
def is_root(namespace):
|
||||||
|
@ -115,4 +115,4 @@ class Container(Dispatchable):
|
||||||
|
|
||||||
def disable(self):
|
def disable(self):
|
||||||
remove_commands(self)
|
remove_commands(self)
|
||||||
remove_container(self)
|
remove_container(self)
|
||||||
|
|
|
@ -22,10 +22,10 @@ declarative way.
|
||||||
from types import FunctionType
|
from types import FunctionType
|
||||||
from inspect import getargspec, getdoc
|
from inspect import getargspec, getdoc
|
||||||
|
|
||||||
from .dispatcher import Host, Container
|
from gajim.command_system.dispatcher import Host, Container
|
||||||
from .dispatcher import get_command, list_commands
|
from gajim.command_system.dispatcher import get_command, list_commands
|
||||||
from .mapping import parse_arguments, adapt_arguments
|
from gajim.command_system.mapping import parse_arguments, adapt_arguments
|
||||||
from .errors import DefinitionError, CommandError, NoCommandError
|
from gajim.command_system.errors import DefinitionError, CommandError, NoCommandError
|
||||||
|
|
||||||
class CommandHost(metaclass=Host):
|
class CommandHost(metaclass=Host):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -34,8 +34,8 @@ code in here will not be executed and commands defined here will not be
|
||||||
detected.
|
detected.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ..framework import CommandContainer, command, doc
|
from gajim.command_system.framework import CommandContainer, command, doc
|
||||||
from .hosts import ChatCommands, PrivateChatCommands, GroupChatCommands
|
from gajim.command_system.implementation.hosts import ChatCommands, PrivateChatCommands, GroupChatCommands
|
||||||
|
|
||||||
class CustomCommonCommands(CommandContainer):
|
class CustomCommonCommands(CommandContainer):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -37,8 +37,8 @@ from os.path import expanduser
|
||||||
|
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
|
|
||||||
from ..framework import CommandContainer, command, doc
|
from gajim.command_system.framework import CommandContainer, command, doc
|
||||||
from .hosts import ChatCommands, PrivateChatCommands, GroupChatCommands
|
from gajim.command_system.implementation.hosts import ChatCommands, PrivateChatCommands, GroupChatCommands
|
||||||
|
|
||||||
class Execute(CommandContainer):
|
class Execute(CommandContainer):
|
||||||
AUTOMATIC = True
|
AUTOMATIC = True
|
||||||
|
|
|
@ -18,7 +18,7 @@ The module defines a set of command hosts, which are bound to a
|
||||||
different command processors, which are the source of commands.
|
different command processors, which are the source of commands.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ..framework import CommandHost
|
from gajim.command_system.framework import CommandHost
|
||||||
|
|
||||||
class ChatCommands(CommandHost):
|
class ChatCommands(CommandHost):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -34,10 +34,10 @@ don't need to dig up the code itself to write basic commands.
|
||||||
from traceback import print_exc
|
from traceback import print_exc
|
||||||
|
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
from ..framework import CommandProcessor
|
from gajim.command_system.framework import CommandProcessor
|
||||||
from ..errors import CommandError, NoCommandError
|
from gajim.command_system.errors import CommandError, NoCommandError
|
||||||
|
|
||||||
class ChatCommandProcessor(CommandProcessor):
|
class ChatCommandProcessor(CommandProcessor):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -20,17 +20,17 @@ Provides an actual implementation for the standard commands.
|
||||||
from time import localtime, strftime
|
from time import localtime, strftime
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
from common.logger import KindConstant
|
from gajim.common.logger import KindConstant
|
||||||
|
|
||||||
from ..errors import CommandError
|
from gajim.command_system.errors import CommandError
|
||||||
from ..framework import CommandContainer, command, doc
|
from gajim.command_system.framework import CommandContainer, command, doc
|
||||||
from ..mapping import generate_usage
|
from gajim.command_system.mapping import generate_usage
|
||||||
|
|
||||||
from .hosts import ChatCommands, PrivateChatCommands, GroupChatCommands
|
from gajim.command_system.implementation.hosts import ChatCommands, PrivateChatCommands, GroupChatCommands
|
||||||
|
|
||||||
class StandardCommonCommands(CommandContainer):
|
class StandardCommonCommands(CommandContainer):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -25,7 +25,7 @@ according to the command properties.
|
||||||
import re
|
import re
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
from .errors import DefinitionError, CommandError
|
from gajim.command_system.errors import DefinitionError, CommandError
|
||||||
|
|
||||||
# Quite complex piece of regular expression logic to parse options and
|
# Quite complex piece of regular expression logic to parse options and
|
||||||
# arguments. Might need some tweaking along the way.
|
# arguments. Might need some tweaking along the way.
|
||||||
|
|
|
@ -9,7 +9,7 @@ try:
|
||||||
raise ImportError
|
raise ImportError
|
||||||
from pyasn1.type import univ, constraint, char, namedtype, tag
|
from pyasn1.type import univ, constraint, char, namedtype, tag
|
||||||
from pyasn1.codec.der.decoder import decode
|
from pyasn1.codec.der.decoder import decode
|
||||||
from common.helpers import prep, InvalidFormat
|
from gajim.common.helpers import prep, InvalidFormat
|
||||||
|
|
||||||
MAX = 64
|
MAX = 64
|
||||||
oid_xmppaddr = '1.3.6.1.5.5.7.8.5'
|
oid_xmppaddr = '1.3.6.1.5.5.7.8.5'
|
||||||
|
|
|
@ -27,8 +27,8 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import logger
|
from gajim.common import logger
|
||||||
|
|
||||||
# DO NOT MOVE ABOVE OF import gajim
|
# DO NOT MOVE ABOVE OF import gajim
|
||||||
import sqlite3 as sqlite
|
import sqlite3 as sqlite
|
||||||
|
@ -179,7 +179,7 @@ def check_and_possibly_move_config():
|
||||||
vars['MY_ICONSETS_PATH'] = gajim.MY_ICONSETS_PATH
|
vars['MY_ICONSETS_PATH'] = gajim.MY_ICONSETS_PATH
|
||||||
vars['MY_MOOD_ICONSETS_PATH'] = gajim.MY_MOOD_ICONSETS_PATH
|
vars['MY_MOOD_ICONSETS_PATH'] = gajim.MY_MOOD_ICONSETS_PATH
|
||||||
vars['MY_ACTIVITY_ICONSETS_PATH'] = gajim.MY_ACTIVITY_ICONSETS_PATH
|
vars['MY_ACTIVITY_ICONSETS_PATH'] = gajim.MY_ACTIVITY_ICONSETS_PATH
|
||||||
from common import configpaths
|
from gajim.common import configpaths
|
||||||
MY_DATA = configpaths.gajimpaths['MY_DATA']
|
MY_DATA = configpaths.gajimpaths['MY_DATA']
|
||||||
MY_CONFIG = configpaths.gajimpaths['MY_CONFIG']
|
MY_CONFIG = configpaths.gajimpaths['MY_CONFIG']
|
||||||
MY_CACHE = configpaths.gajimpaths['MY_CACHE']
|
MY_CACHE = configpaths.gajimpaths['MY_CACHE']
|
||||||
|
@ -264,7 +264,7 @@ def check_and_possibly_create_paths():
|
||||||
|
|
||||||
VCARD_PATH = gajim.VCARD_PATH
|
VCARD_PATH = gajim.VCARD_PATH
|
||||||
AVATAR_PATH = gajim.AVATAR_PATH
|
AVATAR_PATH = gajim.AVATAR_PATH
|
||||||
from common import configpaths
|
from gajim.common import configpaths
|
||||||
MY_DATA = configpaths.gajimpaths['MY_DATA']
|
MY_DATA = configpaths.gajimpaths['MY_DATA']
|
||||||
MY_CONFIG = configpaths.gajimpaths['MY_CONFIG']
|
MY_CONFIG = configpaths.gajimpaths['MY_CONFIG']
|
||||||
MY_CACHE = configpaths.gajimpaths['MY_CACHE']
|
MY_CACHE = configpaths.gajimpaths['MY_CACHE']
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common.connection_handlers_events import MessageOutgoingEvent
|
from gajim.common.connection_handlers_events import MessageOutgoingEvent
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.commands')
|
log = logging.getLogger('gajim.c.commands')
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from common import defs
|
from gajim.common import defs
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
|
|
||||||
|
@ -795,7 +795,7 @@ class Config:
|
||||||
self.__options[1][opt] = self.__options[0][opt][Option.VAL]
|
self.__options[1][opt] = self.__options[0][opt][Option.VAL]
|
||||||
|
|
||||||
def _really_save(self):
|
def _really_save(self):
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
if gajim.interface:
|
if gajim.interface:
|
||||||
gajim.interface.save_config()
|
gajim.interface.save_config()
|
||||||
self.save_timeout_id = None
|
self.save_timeout_id = None
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
from common import defs
|
from gajim.common import defs
|
||||||
from enum import Enum, unique
|
from enum import Enum, unique
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
|
|
|
@ -54,15 +54,16 @@ if os.name != 'nt':
|
||||||
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import helpers
|
from gajim import common
|
||||||
from common import gajim
|
from gajim.common import helpers
|
||||||
from common import gpg
|
from gajim.common import gajim
|
||||||
from common import passwords
|
from gajim.common import gpg
|
||||||
from common import exceptions
|
from gajim.common import passwords
|
||||||
from common import check_X509
|
from gajim.common import exceptions
|
||||||
from common.connection_handlers import *
|
from gajim.common import check_X509
|
||||||
|
from gajim.common.connection_handlers import *
|
||||||
|
|
||||||
from gtkgui_helpers import get_action
|
from gajim.gtkgui_helpers import get_action
|
||||||
|
|
||||||
if gajim.HAVE_PYOPENSSL:
|
if gajim.HAVE_PYOPENSSL:
|
||||||
import OpenSSL.crypto
|
import OpenSSL.crypto
|
||||||
|
@ -289,7 +290,7 @@ class CommonConnection:
|
||||||
|
|
||||||
if obj.message and not obj.xhtml and gajim.config.get(
|
if obj.message and not obj.xhtml and gajim.config.get(
|
||||||
'rst_formatting_outgoing_messages'):
|
'rst_formatting_outgoing_messages'):
|
||||||
from common.rst_xhtml_generator import create_xhtml
|
from gajim.common.rst_xhtml_generator import create_xhtml
|
||||||
obj.xhtml = create_xhtml(obj.message)
|
obj.xhtml = create_xhtml(obj.message)
|
||||||
if not obj.message and obj.chatstate is None and obj.form_node is None:
|
if not obj.message and obj.chatstate is None and obj.form_node is None:
|
||||||
return
|
return
|
||||||
|
@ -2613,7 +2614,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
return
|
return
|
||||||
|
|
||||||
if not obj.xhtml and gajim.config.get('rst_formatting_outgoing_messages'):
|
if not obj.xhtml and gajim.config.get('rst_formatting_outgoing_messages'):
|
||||||
from common.rst_xhtml_generator import create_xhtml
|
from gajim.common.rst_xhtml_generator import create_xhtml
|
||||||
obj.xhtml = create_xhtml(obj.message)
|
obj.xhtml = create_xhtml(obj.message)
|
||||||
|
|
||||||
msg_iq = nbxmpp.Message(obj.jid, obj.message, typ='groupchat',
|
msg_iq = nbxmpp.Message(obj.jid, obj.message, typ='groupchat',
|
||||||
|
|
|
@ -39,27 +39,27 @@ from time import (altzone, daylight, gmtime, localtime, strftime,
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import caps_cache as capscache
|
from gajim.common import caps_cache as capscache
|
||||||
|
|
||||||
from common.pep import LOCATION_DATA
|
from gajim.common.pep import LOCATION_DATA
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
from common import jingle_xtls
|
from gajim.common import jingle_xtls
|
||||||
from common.commands import ConnectionCommands
|
from gajim.common.commands import ConnectionCommands
|
||||||
from common.pubsub import ConnectionPubSub
|
from gajim.common.pubsub import ConnectionPubSub
|
||||||
from common.protocol.caps import ConnectionCaps
|
from gajim.common.protocol.caps import ConnectionCaps
|
||||||
from common.protocol.bytestream import ConnectionSocks5Bytestream
|
from gajim.common.protocol.bytestream import ConnectionSocks5Bytestream
|
||||||
from common.protocol.bytestream import ConnectionIBBytestream
|
from gajim.common.protocol.bytestream import ConnectionIBBytestream
|
||||||
from common.message_archiving import ConnectionArchive313
|
from gajim.common.message_archiving import ConnectionArchive313
|
||||||
from common.connection_handlers_events import *
|
from gajim.common.connection_handlers_events import *
|
||||||
|
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common import nec
|
from gajim.common import nec
|
||||||
from common.nec import NetworkEvent
|
from gajim.common.nec import NetworkEvent
|
||||||
|
|
||||||
from common.jingle import ConnectionJingle
|
from gajim.common.jingle import ConnectionJingle
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.connection_handlers')
|
log = logging.getLogger('gajim.c.connection_handlers')
|
||||||
|
@ -77,7 +77,7 @@ PEP_CONFIG = 'pep_config'
|
||||||
HAS_IDLE = True
|
HAS_IDLE = True
|
||||||
try:
|
try:
|
||||||
# import idle
|
# import idle
|
||||||
import common.sleepy
|
from gajim.common import sleepy
|
||||||
except Exception:
|
except Exception:
|
||||||
log.debug(_('Unable to load idle module'))
|
log.debug(_('Unable to load idle module'))
|
||||||
HAS_IDLE = False
|
HAS_IDLE = False
|
||||||
|
|
|
@ -32,19 +32,19 @@ from time import time as time_time
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from nbxmpp.protocol import NS_CHATSTATES
|
from nbxmpp.protocol import NS_CHATSTATES
|
||||||
from common import atom
|
from gajim.common import atom
|
||||||
from common import nec
|
from gajim.common import nec
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
from common.zeroconf.zeroconf import Constant
|
from gajim.common.zeroconf.zeroconf import Constant
|
||||||
from common.logger import LOG_DB_PATH, KindConstant
|
from gajim.common.logger import LOG_DB_PATH, KindConstant
|
||||||
from common.pep import SUPPORTED_PERSONAL_USER_EVENTS
|
from gajim.common.pep import SUPPORTED_PERSONAL_USER_EVENTS
|
||||||
from common.jingle_transport import JingleTransportSocks5
|
from gajim.common.jingle_transport import JingleTransportSocks5
|
||||||
from common.file_props import FilesProp
|
from gajim.common.file_props import FilesProp
|
||||||
from common.nec import NetworkEvent
|
from gajim.common.nec import NetworkEvent
|
||||||
|
|
||||||
if gajim.HAVE_PYOPENSSL:
|
if gajim.HAVE_PYOPENSSL:
|
||||||
import OpenSSL.crypto
|
import OpenSSL.crypto
|
||||||
|
@ -1831,7 +1831,7 @@ class NewAccountConnectedEvent(nec.NetworkIncomingEvent):
|
||||||
self.errnum = 0 # we don't have an errnum
|
self.errnum = 0 # we don't have an errnum
|
||||||
self.ssl_msg = ''
|
self.ssl_msg = ''
|
||||||
if self.errnum > 0:
|
if self.errnum > 0:
|
||||||
from common.connection import ssl_error
|
from gajim.common.connection import ssl_error
|
||||||
self.ssl_msg = ssl_error.get(self.errnum,
|
self.ssl_msg = ssl_error.get(self.errnum,
|
||||||
_('Unknown SSL error: %d') % self.errnum)
|
_('Unknown SSL error: %d') % self.errnum)
|
||||||
self.ssl_cert = ''
|
self.ssl_cert = ''
|
||||||
|
|
|
@ -31,9 +31,9 @@
|
||||||
from functools import cmp_to_key
|
from functools import cmp_to_key
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from common import caps_cache
|
from gajim.common import caps_cache
|
||||||
from common.account import Account
|
from gajim.common.account import Account
|
||||||
import common.gajim
|
from gajim import common
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
if __name__ != "__main__":
|
if __name__ != "__main__":
|
||||||
raise ImportError(str(e))
|
raise ImportError(str(e))
|
||||||
|
|
|
@ -27,7 +27,7 @@ information how to use them, read documentation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
|
|
||||||
# exceptions used in this module
|
# exceptions used in this module
|
||||||
# base class
|
# base class
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
|
|
||||||
_GAJIM_ERROR_IFACE = 'org.gajim.dbus.Error'
|
_GAJIM_ERROR_IFACE = 'org.gajim.dbus.Error'
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import sys
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
docdir = '../'
|
docdir = '../'
|
||||||
basedir = '../'
|
basedir = './'
|
||||||
localedir = '../po'
|
localedir = '../po'
|
||||||
version = '0.16.10.5'
|
version = '0.16.10.5'
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@ import gi
|
||||||
import uuid
|
import uuid
|
||||||
from distutils.version import LooseVersion as V
|
from distutils.version import LooseVersion as V
|
||||||
|
|
||||||
from common import config
|
from gajim.common import config
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import ged as ged_module
|
from gajim.common import ged as ged_module
|
||||||
|
|
||||||
interface = None # The actual interface (the gtk one for the moment)
|
interface = None # The actual interface (the gtk one for the moment)
|
||||||
thread_interface = None # Interface to run a thread and then a callback
|
thread_interface = None # Interface to run a thread and then a callback
|
||||||
|
@ -54,7 +54,7 @@ log = logging.getLogger('gajim')
|
||||||
|
|
||||||
logger = None
|
logger = None
|
||||||
|
|
||||||
from common import configpaths
|
from gajim.common import configpaths
|
||||||
gajimpaths = configpaths.gajimpaths
|
gajimpaths = configpaths.gajimpaths
|
||||||
|
|
||||||
VCARD_PATH = gajimpaths['VCARD']
|
VCARD_PATH = gajimpaths['VCARD']
|
||||||
|
@ -86,8 +86,8 @@ else:
|
||||||
|
|
||||||
os_info = None # used to cache os information
|
os_info = None # used to cache os information
|
||||||
|
|
||||||
from common.contacts import LegacyContactsAPI
|
from gajim.common.contacts import LegacyContactsAPI
|
||||||
from common.events import Events
|
from gajim.common.events import Events
|
||||||
|
|
||||||
gmail_domains = ['gmail.com', 'googlemail.com']
|
gmail_domains = ['gmail.com', 'googlemail.com']
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common.gajim import HAVE_GPG, GPG_BINARY
|
from gajim.common.gajim import HAVE_GPG, GPG_BINARY
|
||||||
|
|
||||||
if HAVE_GPG:
|
if HAVE_GPG:
|
||||||
import gnupg
|
import gnupg
|
||||||
|
|
|
@ -40,7 +40,7 @@ import select
|
||||||
import base64
|
import base64
|
||||||
import hashlib
|
import hashlib
|
||||||
import shlex
|
import shlex
|
||||||
from common import caps_cache
|
from gajim.common import caps_cache
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
from datetime import datetime, timedelta, timezone, tzinfo
|
from datetime import datetime, timedelta, timezone, tzinfo
|
||||||
|
@ -50,8 +50,8 @@ from string import Template
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
|
|
||||||
from common.i18n import Q_
|
from gajim.common.i18n import Q_
|
||||||
from common.i18n import ngettext
|
from gajim.common.i18n import ngettext
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import precis_i18n.codec
|
import precis_i18n.codec
|
||||||
|
@ -750,7 +750,7 @@ def parse_datetime(timestring, check_utc=False, convert='utc', epoch=False):
|
||||||
return date_time
|
return date_time
|
||||||
return None
|
return None
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
if gajim.HAVE_PYCURL:
|
if gajim.HAVE_PYCURL:
|
||||||
import pycurl
|
import pycurl
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
import locale
|
import locale
|
||||||
import gettext
|
import gettext
|
||||||
import os
|
import os
|
||||||
from common import defs
|
from gajim.common import defs
|
||||||
import unicodedata
|
import unicodedata
|
||||||
|
|
||||||
# May be changed after GTK is imported
|
# May be changed after GTK is imported
|
||||||
|
|
|
@ -31,14 +31,14 @@ Handles the jingle signalling protocol
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
from common.jingle_session import JingleSession, JingleStates
|
from gajim.common.jingle_session import JingleSession, JingleStates
|
||||||
from common.jingle_ft import JingleFileTransfer
|
from gajim.common.jingle_ft import JingleFileTransfer
|
||||||
from common.jingle_transport import JingleTransportSocks5, JingleTransportIBB
|
from gajim.common.jingle_transport import JingleTransportSocks5, JingleTransportIBB
|
||||||
if gajim.HAVE_FARSTREAM:
|
if gajim.HAVE_FARSTREAM:
|
||||||
from common.jingle_rtp import JingleAudio, JingleVideo
|
from gajim.common.jingle_rtp import JingleAudio, JingleVideo
|
||||||
|
|
||||||
logger = logging.getLogger('gajim.c.jingle')
|
logger = logging.getLogger('gajim.c.jingle')
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ Handles Jingle contents (XEP 0166)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from .jingle_xtls import SELF_SIGNED_CERTIFICATE
|
from gajim.common.jingle_xtls import SELF_SIGNED_CERTIFICATE
|
||||||
from .jingle_xtls import load_cert_file
|
from gajim.common.jingle_xtls import load_cert_file
|
||||||
|
|
||||||
contents = {}
|
contents = {}
|
||||||
|
|
||||||
|
|
|
@ -25,14 +25,14 @@ import os
|
||||||
import threading
|
import threading
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import configpaths
|
from gajim.common import configpaths
|
||||||
from common import jingle_xtls
|
from gajim.common import jingle_xtls
|
||||||
from common.jingle_content import contents, JingleContent
|
from gajim.common.jingle_content import contents, JingleContent
|
||||||
from common.jingle_transport import JingleTransportSocks5, TransportType
|
from gajim.common.jingle_transport import JingleTransportSocks5, TransportType
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common.connection_handlers_events import FileRequestReceivedEvent
|
from gajim.common.connection_handlers_events import FileRequestReceivedEvent
|
||||||
from common.jingle_ftstates import (
|
from gajim.common.jingle_ftstates import (
|
||||||
StateInitialized, StateCandSent, StateCandReceived, StateTransfering,
|
StateInitialized, StateCandSent, StateCandReceived, StateTransfering,
|
||||||
StateCandSentAndRecv, StateTransportReplace)
|
StateCandSentAndRecv, StateTransportReplace)
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common.jingle_transport import TransportType
|
from gajim.common.jingle_transport import TransportType
|
||||||
from common.socks5 import Socks5ReceiverClient, Socks5SenderClient
|
from gajim.common.socks5 import Socks5ReceiverClient, Socks5SenderClient
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.jingle_ftstates')
|
log = logging.getLogger('gajim.c.jingle_ftstates')
|
||||||
|
|
|
@ -27,12 +27,12 @@ gi.require_version('Gst', '1.0')
|
||||||
from gi.repository import Gst
|
from gi.repository import Gst
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
from common.jingle_transport import JingleTransportICEUDP
|
from gajim.common.jingle_transport import JingleTransportICEUDP
|
||||||
from common.jingle_content import contents, JingleContent, JingleContentSetupException
|
from gajim.common.jingle_content import contents, JingleContent, JingleContentSetupException
|
||||||
from common.connection_handlers_events import InformationEvent
|
from gajim.common.connection_handlers_events import InformationEvent
|
||||||
from common.jingle_session import FailedApplication
|
from gajim.common.jingle_session import FailedApplication
|
||||||
|
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,11 @@ Handles Jingle sessions (XEP 0166)
|
||||||
import logging
|
import logging
|
||||||
from enum import Enum, unique
|
from enum import Enum, unique
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common.jingle_transport import get_jingle_transport, JingleTransportIBB
|
from gajim.common.jingle_transport import get_jingle_transport, JingleTransportIBB
|
||||||
from common.jingle_content import get_jingle_content, JingleContentSetupException, JingleContent
|
from gajim.common.jingle_content import get_jingle_content, JingleContentSetupException, JingleContent
|
||||||
from common.jingle_ft import State
|
from gajim.common.jingle_ft import State
|
||||||
from common.connection_handlers_events import (
|
from gajim.common.connection_handlers_events import (
|
||||||
FilesProp, JingleRequestReceivedEvent, JingleDisconnectedReceivedEvent,
|
FilesProp, JingleRequestReceivedEvent, JingleDisconnectedReceivedEvent,
|
||||||
JingleTransferCancelledEvent, JingleConnectedReceivedEvent,
|
JingleTransferCancelledEvent, JingleConnectedReceivedEvent,
|
||||||
JingleErrorReceivedEvent)
|
JingleErrorReceivedEvent)
|
||||||
|
|
|
@ -21,7 +21,7 @@ import logging
|
||||||
import socket
|
import socket
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
log = logging.getLogger('gajim.c.jingle_transport')
|
log = logging.getLogger('gajim.c.jingle_transport')
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
log = logging.getLogger('gajim.c.jingle_xtls')
|
log = logging.getLogger('gajim.c.jingle_xtls')
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
import dbus
|
import dbus
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,9 @@ from io import BytesIO
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
|
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
import sqlite3 as sqlite
|
import sqlite3 as sqlite
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@ from datetime import datetime, timedelta
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common.logger import KindConstant, JIDConstant
|
from gajim.common.logger import KindConstant, JIDConstant
|
||||||
import common.connection_handlers_events as ev
|
import gajim.common.connection_handlers_events as ev
|
||||||
|
|
||||||
log = logging.getLogger('gajim.c.message_archiving')
|
log = logging.getLogger('gajim.c.message_archiving')
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ Network Events Controller.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
#from plugins.helpers import log
|
#from plugins.helpers import log
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
class NetworkEventsController(object):
|
class NetworkEventsController(object):
|
||||||
|
|
||||||
|
|
|
@ -30,12 +30,12 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
from time import time
|
from time import time
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import caps_cache
|
from gajim.common import caps_cache
|
||||||
|
|
||||||
import sqlite3 as sqlite
|
import sqlite3 as sqlite
|
||||||
from common import logger
|
from gajim.common import logger
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.optparser')
|
log = logging.getLogger('gajim.c.optparser')
|
||||||
|
@ -580,7 +580,7 @@ class OptionsParser:
|
||||||
|
|
||||||
def update_config_to_01121(self):
|
def update_config_to_01121(self):
|
||||||
# remove old unencrypted secrets file
|
# remove old unencrypted secrets file
|
||||||
from common.configpaths import gajimpaths
|
from gajim.common.configpaths import gajimpaths
|
||||||
|
|
||||||
new_file = gajimpaths['SECRETS_FILE']
|
new_file = gajimpaths['SECRETS_FILE']
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import gi
|
import gi
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
__all__ = ['get_password', 'save_password']
|
__all__ = ['get_password', 'save_password']
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ import logging
|
||||||
log = logging.getLogger('gajim.c.pep')
|
log = logging.getLogger('gajim.c.pep')
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
|
|
||||||
class AbstractPEP(object):
|
class AbstractPEP(object):
|
||||||
|
|
|
@ -34,12 +34,12 @@ from gi.repository import GLib
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common import jingle_xtls
|
from gajim.common import jingle_xtls
|
||||||
from common.file_props import FilesProp
|
from gajim.common.file_props import FilesProp
|
||||||
from common.socks5 import Socks5SenderClient
|
from gajim.common.socks5 import Socks5SenderClient
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.p.bytestream')
|
log = logging.getLogger('gajim.c.p.bytestream')
|
||||||
|
@ -256,7 +256,7 @@ class ConnectionBytestream:
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
|
||||||
def _siSetCB(self, con, iq_obj):
|
def _siSetCB(self, con, iq_obj):
|
||||||
from common.connection_handlers_events import FileRequestReceivedEvent
|
from gajim.common.connection_handlers_events import FileRequestReceivedEvent
|
||||||
gajim.nec.push_incoming_event(FileRequestReceivedEvent(None, conn=self,
|
gajim.nec.push_incoming_event(FileRequestReceivedEvent(None, conn=self,
|
||||||
stanza=iq_obj))
|
stanza=iq_obj))
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
@ -274,7 +274,7 @@ class ConnectionBytestream:
|
||||||
return
|
return
|
||||||
jid = self._ft_get_from(iq_obj)
|
jid = self._ft_get_from(iq_obj)
|
||||||
file_props.error = -3
|
file_props.error = -3
|
||||||
from common.connection_handlers_events import FileRequestErrorEvent
|
from gajim.common.connection_handlers_events import FileRequestErrorEvent
|
||||||
gajim.nec.push_incoming_event(FileRequestErrorEvent(None, conn=self,
|
gajim.nec.push_incoming_event(FileRequestErrorEvent(None, conn=self,
|
||||||
jid=jid, file_props=file_props, error_msg=''))
|
jid=jid, file_props=file_props, error_msg=''))
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
@ -308,7 +308,7 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
if contact.get_full_jid() == receiver_jid:
|
if contact.get_full_jid() == receiver_jid:
|
||||||
file_props.error = -5
|
file_props.error = -5
|
||||||
self.remove_transfer(file_props)
|
self.remove_transfer(file_props)
|
||||||
from common.connection_handlers_events import \
|
from gajim.common.connection_handlers_events import \
|
||||||
FileRequestErrorEvent
|
FileRequestErrorEvent
|
||||||
gajim.nec.push_incoming_event(FileRequestErrorEvent(None,
|
gajim.nec.push_incoming_event(FileRequestErrorEvent(None,
|
||||||
conn=self, jid=contact.jid, file_props=file_props,
|
conn=self, jid=contact.jid, file_props=file_props,
|
||||||
|
@ -360,7 +360,7 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
self._result_socks5_sid, file_props)
|
self._result_socks5_sid, file_props)
|
||||||
if not listener:
|
if not listener:
|
||||||
file_props.error = -5
|
file_props.error = -5
|
||||||
from common.connection_handlers_events import FileRequestErrorEvent
|
from gajim.common.connection_handlers_events import FileRequestErrorEvent
|
||||||
gajim.nec.push_incoming_event(FileRequestErrorEvent(None, conn=self,
|
gajim.nec.push_incoming_event(FileRequestErrorEvent(None, conn=self,
|
||||||
jid=receiver, file_props=file_props, error_msg=''))
|
jid=receiver, file_props=file_props, error_msg=''))
|
||||||
self._connect_error(file_props.sid, error='not-acceptable',
|
self._connect_error(file_props.sid, error='not-acceptable',
|
||||||
|
@ -400,7 +400,7 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
port = gajim.config.get('file_transfers_port')
|
port = gajim.config.get('file_transfers_port')
|
||||||
self._add_streamhosts_to_query(query, sender, port, my_ips)
|
self._add_streamhosts_to_query(query, sender, port, my_ips)
|
||||||
except socket.gaierror:
|
except socket.gaierror:
|
||||||
from common.connection_handlers_events import InformationEvent
|
from gajim.common.connection_handlers_events import InformationEvent
|
||||||
gajim.nec.push_incoming_event(InformationEvent(None, conn=self,
|
gajim.nec.push_incoming_event(InformationEvent(None, conn=self,
|
||||||
level='error', pri_txt=_('Wrong host'),
|
level='error', pri_txt=_('Wrong host'),
|
||||||
sec_txt=_('Invalid local address? :-O')))
|
sec_txt=_('Invalid local address? :-O')))
|
||||||
|
@ -582,7 +582,7 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
if msg:
|
if msg:
|
||||||
self.disconnect_transfer(file_props)
|
self.disconnect_transfer(file_props)
|
||||||
file_props.error = -3
|
file_props.error = -3
|
||||||
from common.connection_handlers_events import \
|
from gajim.common.connection_handlers_events import \
|
||||||
FileRequestErrorEvent
|
FileRequestErrorEvent
|
||||||
gajim.nec.push_incoming_event(FileRequestErrorEvent(None,
|
gajim.nec.push_incoming_event(FileRequestErrorEvent(None,
|
||||||
conn=self, jid=to, file_props=file_props, error_msg=msg))
|
conn=self, jid=to, file_props=file_props, error_msg=msg))
|
||||||
|
@ -616,7 +616,7 @@ class ConnectionSocks5Bytestream(ConnectionBytestream):
|
||||||
if not file_props:
|
if not file_props:
|
||||||
return
|
return
|
||||||
file_props.error = -4
|
file_props.error = -4
|
||||||
from common.connection_handlers_events import FileRequestErrorEvent
|
from gajim.common.connection_handlers_events import FileRequestErrorEvent
|
||||||
gajim.nec.push_incoming_event(FileRequestErrorEvent(None, conn=self,
|
gajim.nec.push_incoming_event(FileRequestErrorEvent(None, conn=self,
|
||||||
jid=jid, file_props=file_props, error_msg=''))
|
jid=jid, file_props=file_props, error_msg=''))
|
||||||
raise nbxmpp.NodeProcessed
|
raise nbxmpp.NodeProcessed
|
||||||
|
|
|
@ -25,9 +25,9 @@ Module containing the network portion of XEP-115 (Entity Capabilities)
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.p.caps')
|
log = logging.getLogger('gajim.c.p.caps')
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common.connection_handlers_events import CapsPresenceReceivedEvent, \
|
from gajim.common.connection_handlers_events import CapsPresenceReceivedEvent, \
|
||||||
CapsDiscoReceivedEvent, CapsReceivedEvent
|
CapsDiscoReceivedEvent, CapsReceivedEvent
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,11 @@ import logging
|
||||||
log = logging.getLogger('gajim.c.proxy65_manager')
|
log = logging.getLogger('gajim.c.proxy65_manager')
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common.socks5 import Socks5
|
from gajim.common.socks5 import Socks5
|
||||||
from nbxmpp.idlequeue import IdleObject
|
from nbxmpp.idlequeue import IdleObject
|
||||||
from common.file_props import FilesProp
|
from gajim.common.file_props import FilesProp
|
||||||
|
|
||||||
S_INITIAL = 0
|
S_INITIAL = 0
|
||||||
S_STARTED = 1
|
S_STARTED = 1
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
#TODO: Doesn't work
|
#TODO: Doesn't work
|
||||||
#from common.connection_handlers import PEP_CONFIG
|
#from common.connection_handlers import PEP_CONFIG
|
||||||
PEP_CONFIG = 'pep_config'
|
PEP_CONFIG = 'pep_config'
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common.connection_handlers_events import PubsubReceivedEvent
|
from gajim.common.connection_handlers_events import PubsubReceivedEvent
|
||||||
from common.connection_handlers_events import PubsubBookmarksReceivedEvent
|
from gajim.common.connection_handlers_events import PubsubBookmarksReceivedEvent
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.pubsub')
|
log = logging.getLogger('gajim.c.pubsub')
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,9 @@ log = logging.getLogger('gajim.c.resolver')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.path.append('..')
|
sys.path.append('..')
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
import common.configpaths
|
from gajim.common import configpaths
|
||||||
common.configpaths.gajimpaths.init(None)
|
configpaths.gajimpaths.init(None)
|
||||||
|
|
||||||
from gi.repository import Gio, GLib
|
from gi.repository import Gio, GLib
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ try:
|
||||||
CloseDesktop = ctypes.windll.user32.CloseDesktop
|
CloseDesktop = ctypes.windll.user32.CloseDesktop
|
||||||
SystemParametersInfo = ctypes.windll.user32.SystemParametersInfoW
|
SystemParametersInfo = ctypes.windll.user32.SystemParametersInfoW
|
||||||
else: # unix
|
else: # unix
|
||||||
from common import idle
|
from gajim.common import idle
|
||||||
idle.xss_available
|
idle.xss_available
|
||||||
except Exception:
|
except Exception:
|
||||||
gajim.log.debug('Unable to load idle module')
|
gajim.log.debug('Unable to load idle module')
|
||||||
|
|
|
@ -34,9 +34,9 @@ from errno import EISCONN
|
||||||
from errno import EINPROGRESS
|
from errno import EINPROGRESS
|
||||||
from errno import EAFNOSUPPORT
|
from errno import EAFNOSUPPORT
|
||||||
from nbxmpp.idlequeue import IdleObject
|
from nbxmpp.idlequeue import IdleObject
|
||||||
from common.file_props import FilesProp
|
from gajim.common.file_props import FilesProp
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import jingle_xtls
|
from gajim.common import jingle_xtls
|
||||||
if jingle_xtls.PYOPENSSL_PRESENT:
|
if jingle_xtls.PYOPENSSL_PRESENT:
|
||||||
import OpenSSL
|
import OpenSSL
|
||||||
import logging
|
import logging
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common.exceptions import DecryptionError, NegotiationError
|
from gajim.common.exceptions import DecryptionError, NegotiationError
|
||||||
import nbxmpp.c14n
|
import nbxmpp.c14n
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
@ -35,7 +35,7 @@ import base64
|
||||||
import os
|
import os
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from hmac import HMAC
|
from hmac import HMAC
|
||||||
from common import crypto
|
from gajim.common import crypto
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.stanza_session')
|
log = logging.getLogger('gajim.c.stanza_session')
|
||||||
|
@ -44,8 +44,8 @@ if gajim.HAVE_PYCRYPTO:
|
||||||
from Crypto.Cipher import AES
|
from Crypto.Cipher import AES
|
||||||
from Crypto.PublicKey import RSA
|
from Crypto.PublicKey import RSA
|
||||||
|
|
||||||
from common import dh
|
from gajim.common import dh
|
||||||
import secrets
|
from gajim import secrets
|
||||||
|
|
||||||
XmlDsig = 'http://www.w3.org/2000/09/xmldsig#'
|
XmlDsig = 'http://www.w3.org/2000/09/xmldsig#'
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
## You should have received a copy of the GNU General Public License
|
## You should have received a copy of the GNU General Public License
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from nbxmpp.idlequeue import IdleObject
|
from nbxmpp.idlequeue import IdleObject
|
||||||
from nbxmpp import dispatcher_nb, simplexml
|
from nbxmpp import dispatcher_nb, simplexml
|
||||||
from nbxmpp.plugin import *
|
from nbxmpp.plugin import *
|
||||||
from nbxmpp.transports_nb import DATA_RECEIVED, DATA_SENT, DATA_ERROR
|
from nbxmpp.transports_nb import DATA_RECEIVED, DATA_SENT, DATA_ERROR
|
||||||
from common.zeroconf import zeroconf
|
from gajim.common.zeroconf import zeroconf
|
||||||
|
|
||||||
from nbxmpp.protocol import *
|
from nbxmpp.protocol import *
|
||||||
import socket
|
import socket
|
||||||
|
@ -37,7 +37,7 @@ from random import Random
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.z.client_zeroconf')
|
log = logging.getLogger('gajim.c.z.client_zeroconf')
|
||||||
|
|
||||||
from common.zeroconf import roster_zeroconf
|
from gajim.common.zeroconf import roster_zeroconf
|
||||||
|
|
||||||
MAX_BUFF_LEN = 65536
|
MAX_BUFF_LEN = 65536
|
||||||
TYPE_SERVER, TYPE_CLIENT = range(2)
|
TYPE_SERVER, TYPE_CLIENT = range(2)
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common.commands import ConnectionCommands
|
from gajim.common.commands import ConnectionCommands
|
||||||
from common.protocol.bytestream import ConnectionSocks5BytestreamZeroconf
|
from gajim.common.protocol.bytestream import ConnectionSocks5BytestreamZeroconf
|
||||||
from common.connection_handlers_events import ZeroconfMessageReceivedEvent
|
from gajim.common.connection_handlers_events import ZeroconfMessageReceivedEvent
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.c.z.connection_handlers_zeroconf')
|
log = logging.getLogger('gajim.c.z.connection_handlers_zeroconf')
|
||||||
|
@ -46,7 +46,7 @@ except Exception:
|
||||||
log.debug(_('Unable to load idle module'))
|
log.debug(_('Unable to load idle module'))
|
||||||
HAS_IDLE = False
|
HAS_IDLE = False
|
||||||
|
|
||||||
from common import connection_handlers
|
from gajim.common import connection_handlers
|
||||||
|
|
||||||
class ConnectionVcard(connection_handlers.ConnectionVcard):
|
class ConnectionVcard(connection_handlers.ConnectionVcard):
|
||||||
def add_sha(self, p, send_caps = True):
|
def add_sha(self, p, send_caps = True):
|
||||||
|
|
|
@ -42,13 +42,13 @@ if os.name != 'nt':
|
||||||
import getpass
|
import getpass
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
|
|
||||||
from common.connection import CommonConnection
|
from gajim.common.connection import CommonConnection
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common.zeroconf import client_zeroconf
|
from gajim.common.zeroconf import client_zeroconf
|
||||||
from common.zeroconf import zeroconf
|
from gajim.common.zeroconf import zeroconf
|
||||||
from common.zeroconf.connection_handlers_zeroconf import *
|
from gajim.common.zeroconf.connection_handlers_zeroconf import *
|
||||||
from common.connection_handlers_events import *
|
from gajim.common.connection_handlers_events import *
|
||||||
|
|
||||||
class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
|
class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
|
||||||
def __init__(self, name):
|
def __init__(self, name):
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
|
|
||||||
from common.zeroconf import zeroconf
|
from gajim.common.zeroconf import zeroconf
|
||||||
from common.zeroconf.zeroconf import Constant, ConstantRI
|
from gajim.common.zeroconf.zeroconf import Constant, ConstantRI
|
||||||
|
|
||||||
class Roster:
|
class Roster:
|
||||||
def __init__(self, zeroconf):
|
def __init__(self, zeroconf):
|
||||||
|
|
|
@ -56,8 +56,8 @@ def test_zeroconf():
|
||||||
return test_avahi() or test_bonjour()
|
return test_avahi() or test_bonjour()
|
||||||
|
|
||||||
if test_avahi():
|
if test_avahi():
|
||||||
from common.zeroconf import zeroconf_avahi
|
from gajim.common.zeroconf import zeroconf_avahi
|
||||||
Zeroconf = zeroconf_avahi.Zeroconf
|
Zeroconf = zeroconf_avahi.Zeroconf
|
||||||
elif test_bonjour():
|
elif test_bonjour():
|
||||||
from common.zeroconf import zeroconf_bonjour
|
from gajim.common.zeroconf import zeroconf_bonjour
|
||||||
Zeroconf = zeroconf_bonjour.Zeroconf
|
Zeroconf = zeroconf_bonjour.Zeroconf
|
||||||
|
|
|
@ -25,7 +25,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from common.zeroconf.zeroconf import Constant, ConstantRI
|
from gajim.common.zeroconf.zeroconf import Constant, ConstantRI
|
||||||
|
|
||||||
class Zeroconf:
|
class Zeroconf:
|
||||||
def __init__(self, new_serviceCB, remove_serviceCB, name_conflictCB,
|
def __init__(self, new_serviceCB, remove_serviceCB, name_conflictCB,
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import select
|
import select
|
||||||
import re
|
import re
|
||||||
from common.zeroconf.zeroconf import Constant
|
from gajim.common.zeroconf.zeroconf import Constant
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pybonjour
|
import pybonjour
|
||||||
|
|
|
@ -37,18 +37,18 @@ from gi.repository import Pango
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
import os
|
import os
|
||||||
import common.config
|
from gajim.common import config as c_config
|
||||||
import common.sleepy
|
from gajim.common import sleepy
|
||||||
from common.i18n import Q_
|
from gajim.common.i18n import Q_
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import cell_renderer_image
|
from gajim import cell_renderer_image
|
||||||
import message_control
|
from gajim import message_control
|
||||||
from chat_control_base import ChatControlBase
|
from gajim.chat_control_base import ChatControlBase
|
||||||
import dataforms_widget
|
from gajim import dataforms_widget
|
||||||
import profile_window
|
from gajim import profile_window
|
||||||
import gui_menu_builder
|
from gajim import gui_menu_builder
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import gtkspell
|
import gtkspell
|
||||||
|
@ -56,24 +56,24 @@ try:
|
||||||
except (ImportError, ValueError):
|
except (ImportError, ValueError):
|
||||||
HAS_GTK_SPELL = False
|
HAS_GTK_SPELL = False
|
||||||
|
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import connection
|
from gajim.common import connection
|
||||||
from common import passwords
|
from gajim.common import passwords
|
||||||
from common.zeroconf import connection_zeroconf
|
from gajim.common.zeroconf import connection_zeroconf
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
from common import gpg
|
from gajim.common import gpg
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from common.multimedia_helpers import AudioInputManager, AudioOutputManager
|
from gajim.common.multimedia_helpers import AudioInputManager, AudioOutputManager
|
||||||
from common.multimedia_helpers import VideoInputManager, VideoOutputManager
|
from gajim.common.multimedia_helpers import VideoInputManager, VideoOutputManager
|
||||||
HAS_GST = True
|
HAS_GST = True
|
||||||
except (ImportError, ValueError):
|
except (ImportError, ValueError):
|
||||||
HAS_GST = False
|
HAS_GST = False
|
||||||
|
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
from common.connection_handlers_events import InformationEvent
|
from gajim.common.connection_handlers_events import InformationEvent
|
||||||
|
|
||||||
#---------- PreferencesWindow class -------------#
|
#---------- PreferencesWindow class -------------#
|
||||||
class PreferencesWindow:
|
class PreferencesWindow:
|
||||||
|
@ -175,7 +175,7 @@ class PreferencesWindow:
|
||||||
emoticons_combobox.set_active(0)
|
emoticons_combobox.set_active(0)
|
||||||
|
|
||||||
# Set default for single window type
|
# Set default for single window type
|
||||||
choices = common.config.opt_one_window_types
|
choices = c_config.opt_one_window_types
|
||||||
type_ = gajim.config.get('one_message_window')
|
type_ = gajim.config.get('one_message_window')
|
||||||
if type_ in choices:
|
if type_ in choices:
|
||||||
self.one_window_type_combobox.set_active(choices.index(type_))
|
self.one_window_type_combobox.set_active(choices.index(type_))
|
||||||
|
@ -184,7 +184,7 @@ class PreferencesWindow:
|
||||||
|
|
||||||
# Show roster on startup
|
# Show roster on startup
|
||||||
show_roster_combobox = self.xml.get_object('show_roster_on_startup')
|
show_roster_combobox = self.xml.get_object('show_roster_on_startup')
|
||||||
choices = common.config.opt_show_roster_on_startup
|
choices = c_config.opt_show_roster_on_startup
|
||||||
type_ = gajim.config.get('show_roster_on_startup')
|
type_ = gajim.config.get('show_roster_on_startup')
|
||||||
if type_ in choices:
|
if type_ in choices:
|
||||||
show_roster_combobox.set_active(choices.index(type_))
|
show_roster_combobox.set_active(choices.index(type_))
|
||||||
|
@ -389,7 +389,6 @@ class PreferencesWindow:
|
||||||
self.auto_xa_message_entry.set_text(st)
|
self.auto_xa_message_entry.set_text(st)
|
||||||
self.auto_xa_message_entry.set_sensitive(gajim.config.get('autoxa'))
|
self.auto_xa_message_entry.set_sensitive(gajim.config.get('autoxa'))
|
||||||
|
|
||||||
from common import sleepy
|
|
||||||
if not sleepy.SUPPORTED:
|
if not sleepy.SUPPORTED:
|
||||||
self.xml.get_object('autoaway_table').set_sensitive(False)
|
self.xml.get_object('autoaway_table').set_sensitive(False)
|
||||||
|
|
||||||
|
@ -670,13 +669,13 @@ class PreferencesWindow:
|
||||||
|
|
||||||
def on_one_window_type_combo_changed(self, widget):
|
def on_one_window_type_combo_changed(self, widget):
|
||||||
active = widget.get_active()
|
active = widget.get_active()
|
||||||
config_type = common.config.opt_one_window_types[active]
|
config_type = c_config.opt_one_window_types[active]
|
||||||
gajim.config.set('one_message_window', config_type)
|
gajim.config.set('one_message_window', config_type)
|
||||||
gajim.interface.msg_win_mgr.reconfig()
|
gajim.interface.msg_win_mgr.reconfig()
|
||||||
|
|
||||||
def on_show_roster_on_startup_changed(self, widget):
|
def on_show_roster_on_startup_changed(self, widget):
|
||||||
active = widget.get_active()
|
active = widget.get_active()
|
||||||
config_type = common.config.opt_show_roster_on_startup[active]
|
config_type = c_config.opt_show_roster_on_startup[active]
|
||||||
gajim.config.set('show_roster_on_startup', config_type)
|
gajim.config.set('show_roster_on_startup', config_type)
|
||||||
|
|
||||||
def on_compact_view_checkbutton_toggled(self, widget):
|
def on_compact_view_checkbutton_toggled(self, widget):
|
||||||
|
@ -991,7 +990,7 @@ class PreferencesWindow:
|
||||||
def on_auto_away_time_spinbutton_value_changed(self, widget):
|
def on_auto_away_time_spinbutton_value_changed(self, widget):
|
||||||
aat = widget.get_value_as_int()
|
aat = widget.get_value_as_int()
|
||||||
gajim.config.set('autoawaytime', aat)
|
gajim.config.set('autoawaytime', aat)
|
||||||
gajim.interface.sleeper = common.sleepy.Sleepy(
|
gajim.interface.sleeper = sleepy.Sleepy(
|
||||||
gajim.config.get('autoawaytime') * 60,
|
gajim.config.get('autoawaytime') * 60,
|
||||||
gajim.config.get('autoxatime') * 60)
|
gajim.config.get('autoxatime') * 60)
|
||||||
|
|
||||||
|
@ -1005,7 +1004,7 @@ class PreferencesWindow:
|
||||||
def on_auto_xa_time_spinbutton_value_changed(self, widget):
|
def on_auto_xa_time_spinbutton_value_changed(self, widget):
|
||||||
axt = widget.get_value_as_int()
|
axt = widget.get_value_as_int()
|
||||||
gajim.config.set('autoxatime', axt)
|
gajim.config.set('autoxatime', axt)
|
||||||
gajim.interface.sleeper = common.sleepy.Sleepy(
|
gajim.interface.sleeper = sleepy.Sleepy(
|
||||||
gajim.config.get('autoawaytime') * 60,
|
gajim.config.get('autoawaytime') * 60,
|
||||||
gajim.config.get('autoxatime') * 60)
|
gajim.config.get('autoxatime') * 60)
|
||||||
|
|
||||||
|
|
|
@ -37,21 +37,21 @@ from gi.repository import GObject
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
import tooltips
|
from gajim import tooltips
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import queue
|
import queue
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from calendar import timegm
|
from calendar import timegm
|
||||||
from common.fuzzyclock import FuzzyClock
|
from gajim.common.fuzzyclock import FuzzyClock
|
||||||
import emoticons
|
from gajim import emoticons
|
||||||
|
|
||||||
from htmltextview import HtmlTextView
|
from gajim.htmltextview import HtmlTextView
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
|
|
||||||
NOT_SHOWN = 0
|
NOT_SHOWN = 0
|
||||||
ALREADY_RECEIVED = 1
|
ALREADY_RECEIVED = 1
|
||||||
|
|
|
@ -32,11 +32,11 @@ from gi.repository import GObject
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
|
|
||||||
import common.dataforms as dataforms
|
from gajim.common import dataforms
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
|
|
|
@ -38,15 +38,15 @@ import os
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import vcard
|
from gajim import vcard
|
||||||
import conversation_textview
|
from gajim import conversation_textview
|
||||||
import dataforms_widget
|
from gajim import dataforms_widget
|
||||||
|
|
||||||
from common import defs
|
from gajim.common import defs
|
||||||
from random import randrange
|
from random import randrange
|
||||||
from common import pep
|
from gajim.common import pep
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import gtkspell
|
import gtkspell
|
||||||
|
@ -56,16 +56,16 @@ except (ImportError, ValueError):
|
||||||
|
|
||||||
# those imports are not used in this file, but in files that 'import dialogs'
|
# those imports are not used in this file, but in files that 'import dialogs'
|
||||||
# so they can do dialog.GajimThemesWindow() for example
|
# so they can do dialog.GajimThemesWindow() for example
|
||||||
from filetransfers_window import FileTransfersWindow
|
from gajim.filetransfers_window import FileTransfersWindow
|
||||||
from gajim_themes_window import GajimThemesWindow
|
from gajim.gajim_themes_window import GajimThemesWindow
|
||||||
from advanced_configuration_window import AdvancedConfigurationWindow
|
from gajim.advanced_configuration_window import AdvancedConfigurationWindow
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
from common.connection_handlers_events import MessageOutgoingEvent
|
from gajim.common.connection_handlers_events import MessageOutgoingEvent
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.dialogs')
|
log = logging.getLogger('gajim.dialogs')
|
||||||
|
|
|
@ -52,18 +52,18 @@ from gi.repository import Gdk
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
|
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import groups
|
from gajim import groups
|
||||||
import adhoc_commands
|
from gajim import adhoc_commands
|
||||||
import search_window
|
from gajim import search_window
|
||||||
import gui_menu_builder
|
from gajim import gui_menu_builder
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
LABELS = {
|
LABELS = {
|
||||||
1: _('This service has not yet responded with detailed information'),
|
1: _('This service has not yet responded with detailed information'),
|
||||||
|
|
|
@ -26,10 +26,10 @@
|
||||||
import os
|
import os
|
||||||
import gi
|
import gi
|
||||||
from gi.repository import Gtk, Gdk
|
from gi.repository import Gtk, Gdk
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common.i18n import Q_
|
from gajim.common.i18n import Q_
|
||||||
|
|
||||||
class FeaturesWindow:
|
class FeaturesWindow:
|
||||||
"""
|
"""
|
||||||
|
@ -172,14 +172,14 @@ class FeaturesWindow:
|
||||||
return gajim.HAVE_ZEROCONF
|
return gajim.HAVE_ZEROCONF
|
||||||
|
|
||||||
def dbus_available(self):
|
def dbus_available(self):
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
return dbus_support.supported
|
return dbus_support.supported
|
||||||
|
|
||||||
def gpg_available(self):
|
def gpg_available(self):
|
||||||
return gajim.HAVE_GPG
|
return gajim.HAVE_GPG
|
||||||
|
|
||||||
def network_watcher_available(self):
|
def network_watcher_available(self):
|
||||||
import network_watcher
|
from gajim import network_watcher
|
||||||
return network_watcher.supported
|
return network_watcher.supported
|
||||||
|
|
||||||
def some_keyring_available(self):
|
def some_keyring_available(self):
|
||||||
|
@ -194,7 +194,7 @@ class FeaturesWindow:
|
||||||
|
|
||||||
def speller_available(self):
|
def speller_available(self):
|
||||||
try:
|
try:
|
||||||
__import__('gtkspell')
|
__import__('gajim.gtkspell')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -202,7 +202,7 @@ class FeaturesWindow:
|
||||||
def notification_available(self):
|
def notification_available(self):
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return False
|
return False
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
if self.dbus_available() and dbus_support.get_notifications_interface():
|
if self.dbus_available() and dbus_support.get_notifications_interface():
|
||||||
return True
|
return True
|
||||||
try:
|
try:
|
||||||
|
@ -212,7 +212,7 @@ class FeaturesWindow:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def idle_available(self):
|
def idle_available(self):
|
||||||
from common import sleepy
|
from gajim.common import sleepy
|
||||||
return sleepy.SUPPORTED
|
return sleepy.SUPPORTED
|
||||||
|
|
||||||
def pycrypto_available(self):
|
def pycrypto_available(self):
|
||||||
|
@ -234,5 +234,5 @@ class FeaturesWindow:
|
||||||
def upower_available(self):
|
def upower_available(self):
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return False
|
return False
|
||||||
import upower_listener
|
from gajim import upower_listener
|
||||||
return upower_listener.supported
|
return upower_listener.supported
|
||||||
|
|
|
@ -32,14 +32,14 @@ import time
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import tooltips
|
from gajim import tooltips
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common.file_props import FilesProp
|
from gajim.common.file_props import FilesProp
|
||||||
from common.protocol.bytestream import (is_transfer_active, is_transfer_paused,
|
from gajim.common.protocol.bytestream import (is_transfer_active, is_transfer_paused,
|
||||||
is_transfer_stopped)
|
is_transfer_stopped)
|
||||||
from nbxmpp.protocol import NS_JINGLE_FILE_TRANSFER_5
|
from nbxmpp.protocol import NS_JINGLE_FILE_TRANSFER_5
|
||||||
import logging
|
import logging
|
||||||
|
@ -294,7 +294,7 @@ class FileTransfersWindow:
|
||||||
win.set_shadow_type(Gtk.ShadowType.IN)
|
win.set_shadow_type(Gtk.ShadowType.IN)
|
||||||
win.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
|
win.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER)
|
||||||
|
|
||||||
from message_textview import MessageTextView
|
from gajim.message_textview import MessageTextView
|
||||||
desc_entry = MessageTextView()
|
desc_entry = MessageTextView()
|
||||||
win.add(desc_entry)
|
win.add(desc_entry)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
# -*- coding:utf-8 -*-
|
# -*- coding:utf-8 -*-
|
||||||
## src/gajim-remote.py
|
## src/gajim-remote.py
|
||||||
##
|
##
|
||||||
|
@ -33,9 +34,9 @@ import signal
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application
|
signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application
|
||||||
|
|
||||||
|
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
from common import i18n # This installs _() function
|
from gajim.common import i18n # This installs _() function
|
||||||
from common.i18n import Q_
|
from gajim.common.i18n import Q_
|
||||||
|
|
||||||
try:
|
try:
|
||||||
PREFERRED_ENCODING = locale.getpreferredencoding()
|
PREFERRED_ENCODING = locale.getpreferredencoding()
|
||||||
|
|
|
@ -50,9 +50,9 @@ gi.require_version('Gdk', '3.0')
|
||||||
gi.require_version('GObject', '2.0')
|
gi.require_version('GObject', '2.0')
|
||||||
gi.require_version('Pango', '1.0')
|
gi.require_version('Pango', '1.0')
|
||||||
from gi.repository import GLib, Gio, Gtk
|
from gi.repository import GLib, Gio, Gtk
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from common import logging_helpers
|
from gajim.common import logging_helpers
|
||||||
from common import crypto
|
from gajim.common import crypto
|
||||||
try:
|
try:
|
||||||
PYOPENSSL_PRNG_PRESENT = True
|
PYOPENSSL_PRNG_PRESENT = True
|
||||||
import OpenSSL.rand
|
import OpenSSL.rand
|
||||||
|
@ -114,7 +114,7 @@ class GajimApplication(Gtk.Application):
|
||||||
def do_startup(self):
|
def do_startup(self):
|
||||||
Gtk.Application.do_startup(self)
|
Gtk.Application.do_startup(self)
|
||||||
|
|
||||||
import gtkexcepthook
|
from gajim import gtkexcepthook
|
||||||
gtkexcepthook.init()
|
gtkexcepthook.init()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -130,15 +130,15 @@ class GajimApplication(Gtk.Application):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Create and initialize Application Paths & Databases
|
# Create and initialize Application Paths & Databases
|
||||||
from common import configpaths
|
from gajim.common import configpaths
|
||||||
configpaths.gajimpaths.init(
|
configpaths.gajimpaths.init(
|
||||||
self.config_path, self.profile, self.profile_separation)
|
self.config_path, self.profile, self.profile_separation)
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import check_paths
|
from gajim.common import check_paths
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
from common import logger
|
from gajim.common import logger
|
||||||
from common import caps_cache
|
from gajim.common import caps_cache
|
||||||
try:
|
try:
|
||||||
gajim.logger = logger.Logger()
|
gajim.logger = logger.Logger()
|
||||||
caps_cache.initialize(gajim.logger)
|
caps_cache.initialize(gajim.logger)
|
||||||
|
@ -242,13 +242,13 @@ class GajimApplication(Gtk.Application):
|
||||||
|
|
||||||
def do_activate(self):
|
def do_activate(self):
|
||||||
Gtk.Application.do_activate(self)
|
Gtk.Application.do_activate(self)
|
||||||
from gui_interface import Interface
|
from gajim.gui_interface import Interface
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
self.interface = Interface()
|
self.interface = Interface()
|
||||||
gtkgui_helpers.load_css()
|
gtkgui_helpers.load_css()
|
||||||
self.interface.run(self)
|
self.interface.run(self)
|
||||||
self.add_actions()
|
self.add_actions()
|
||||||
import gui_menu_builder
|
from gajim import gui_menu_builder
|
||||||
gui_menu_builder.build_accounts_menu()
|
gui_menu_builder.build_accounts_menu()
|
||||||
|
|
||||||
def do_shutdown(self, *args):
|
def do_shutdown(self, *args):
|
||||||
|
@ -264,7 +264,7 @@ class GajimApplication(Gtk.Application):
|
||||||
self.interface.roster.prepare_quit()
|
self.interface.roster.prepare_quit()
|
||||||
|
|
||||||
# Commit any outstanding SQL transactions
|
# Commit any outstanding SQL transactions
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
gajim.logger.commit()
|
gajim.logger.commit()
|
||||||
|
|
||||||
def do_handle_local_options(self, options: GLib.VariantDict) -> int:
|
def do_handle_local_options(self, options: GLib.VariantDict) -> int:
|
||||||
|
@ -283,7 +283,7 @@ class GajimApplication(Gtk.Application):
|
||||||
if options.contains('config-path'):
|
if options.contains('config-path'):
|
||||||
self.config_path = options.lookup_value('config-path').get_string()
|
self.config_path = options.lookup_value('config-path').get_string()
|
||||||
if options.contains('version'):
|
if options.contains('version'):
|
||||||
from common.defs import version
|
from gajim.common.defs import version
|
||||||
print(version)
|
print(version)
|
||||||
return 0
|
return 0
|
||||||
if options.contains('quiet'):
|
if options.contains('quiet'):
|
||||||
|
@ -322,7 +322,7 @@ class GajimApplication(Gtk.Application):
|
||||||
|
|
||||||
def add_actions(self):
|
def add_actions(self):
|
||||||
''' Build Application Actions '''
|
''' Build Application Actions '''
|
||||||
from app_actions import AppActions
|
from gajim.app_actions import AppActions
|
||||||
action = AppActions(self)
|
action = AppActions(self)
|
||||||
|
|
||||||
self.account_actions = [
|
self.account_actions = [
|
||||||
|
@ -368,7 +368,7 @@ class GajimApplication(Gtk.Application):
|
||||||
act.connect("activate", func)
|
act.connect("activate", func)
|
||||||
self.add_action(act)
|
self.add_action(act)
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
accounts_list = sorted(gajim.contacts.get_accounts())
|
accounts_list = sorted(gajim.contacts.get_accounts())
|
||||||
if not accounts_list:
|
if not accounts_list:
|
||||||
return
|
return
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import Gdk
|
from gi.repository import Gdk
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
class GajimThemesWindow:
|
class GajimThemesWindow:
|
||||||
|
|
||||||
|
|
|
@ -35,32 +35,32 @@ from gi.repository import Gdk
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import gui_menu_builder
|
from gajim import gui_menu_builder
|
||||||
import message_control
|
from gajim import message_control
|
||||||
import tooltips
|
from gajim import tooltips
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import config
|
from gajim import config
|
||||||
import vcard
|
from gajim import vcard
|
||||||
import cell_renderer_image
|
from gajim import cell_renderer_image
|
||||||
import dataforms_widget
|
from gajim import dataforms_widget
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
|
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
|
|
||||||
from common import events
|
from gajim.common import events
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
|
|
||||||
from chat_control import ChatControl
|
from gajim.chat_control import ChatControl
|
||||||
from chat_control_base import ChatControlBase
|
from gajim.chat_control_base import ChatControlBase
|
||||||
|
|
||||||
from command_system.implementation.hosts import PrivateChatCommands
|
from gajim.command_system.implementation.hosts import PrivateChatCommands
|
||||||
from command_system.implementation.hosts import GroupChatCommands
|
from gajim.command_system.implementation.hosts import GroupChatCommands
|
||||||
from common.connection_handlers_events import GcMessageOutgoingEvent
|
from gajim.common.connection_handlers_events import GcMessageOutgoingEvent
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.groupchat_control')
|
log = logging.getLogger('gajim.groupchat_control')
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
|
|
||||||
'''Window to create new post for discussion groups service.'''
|
'''Window to create new post for discussion groups service.'''
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from nbxmpp import Node
|
from nbxmpp import Node
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
|
|
||||||
class GroupsPostWindow:
|
class GroupsPostWindow:
|
||||||
def __init__(self, account, servicejid, groupid):
|
def __init__(self, account, servicejid, groupid):
|
||||||
|
|
|
@ -31,7 +31,7 @@ import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '3.0')
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from common import configpaths
|
from gajim.common import configpaths
|
||||||
|
|
||||||
glade_file = os.path.join(configpaths.get('GUI'), 'exception_dialog.ui')
|
glade_file = os.path.join(configpaths.get('GUI'), 'exception_dialog.ui')
|
||||||
|
|
||||||
|
|
|
@ -45,10 +45,10 @@ from io import BytesIO
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.gtkgui_helpers')
|
log = logging.getLogger('gajim.gtkgui_helpers')
|
||||||
|
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import pep
|
from gajim.common import pep
|
||||||
from common import configpaths
|
from gajim.common import configpaths
|
||||||
|
|
||||||
gtk_icon_theme = Gtk.IconTheme.get_default()
|
gtk_icon_theme = Gtk.IconTheme.get_default()
|
||||||
gtk_icon_theme.append_search_path(gajim.ICONS_DIR)
|
gtk_icon_theme.append_search_path(gajim.ICONS_DIR)
|
||||||
|
@ -82,8 +82,8 @@ def get_icon_path(icon_name, size=16):
|
||||||
except GLib.GError as e:
|
except GLib.GError as e:
|
||||||
log.error("Unable to find icon %s: %s" % (icon_name, str(e)))
|
log.error("Unable to find icon %s: %s" % (icon_name, str(e)))
|
||||||
|
|
||||||
import vcard
|
from gajim import vcard
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
|
|
||||||
|
|
||||||
HAS_PYWIN32 = True
|
HAS_PYWIN32 = True
|
||||||
|
@ -95,7 +95,7 @@ if os.name == 'nt':
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_PYWIN32 = False
|
HAS_PYWIN32 = False
|
||||||
|
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
|
|
||||||
screen_w = Gdk.Screen.width()
|
screen_w = Gdk.Screen.width()
|
||||||
screen_h = Gdk.Screen.height()
|
screen_h = Gdk.Screen.height()
|
||||||
|
|
|
@ -45,60 +45,60 @@ from gi.repository import Gtk
|
||||||
from gi.repository import GdkPixbuf
|
from gi.repository import GdkPixbuf
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
|
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import events
|
from gajim.common import events
|
||||||
|
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
from music_track_listener import MusicTrackListener
|
from gajim.music_track_listener import MusicTrackListener
|
||||||
from common import location_listener
|
from gajim.common import location_listener
|
||||||
import dbus
|
import dbus
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import gui_menu_builder
|
from gajim import gui_menu_builder
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import notify
|
from gajim import notify
|
||||||
import message_control
|
from gajim import message_control
|
||||||
|
|
||||||
from chat_control_base import ChatControlBase
|
from gajim.chat_control_base import ChatControlBase
|
||||||
from chat_control import ChatControl
|
from gajim.chat_control import ChatControl
|
||||||
from groupchat_control import GroupchatControl
|
from gajim.groupchat_control import GroupchatControl
|
||||||
from groupchat_control import PrivateChatControl
|
from gajim.groupchat_control import PrivateChatControl
|
||||||
from message_window import MessageWindowMgr
|
from gajim.message_window import MessageWindowMgr
|
||||||
|
|
||||||
from atom_window import AtomWindow
|
from gajim.atom_window import AtomWindow
|
||||||
from session import ChatControlSession
|
from gajim.session import ChatControlSession
|
||||||
|
|
||||||
from common import sleepy
|
from gajim.common import sleepy
|
||||||
|
|
||||||
from nbxmpp import idlequeue
|
from nbxmpp import idlequeue
|
||||||
from nbxmpp import Hashes2
|
from nbxmpp import Hashes2
|
||||||
from common.zeroconf import connection_zeroconf
|
from gajim.common.zeroconf import connection_zeroconf
|
||||||
from common import resolver
|
from gajim.common import resolver
|
||||||
from common import caps_cache
|
from gajim.common import caps_cache
|
||||||
from common import proxy65_manager
|
from gajim.common import proxy65_manager
|
||||||
from common import socks5
|
from gajim.common import socks5
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import passwords
|
from gajim.common import passwords
|
||||||
from common import logging_helpers
|
from gajim.common import logging_helpers
|
||||||
from common.connection_handlers_events import OurShowEvent, \
|
from gajim.common.connection_handlers_events import OurShowEvent, \
|
||||||
FileRequestErrorEvent, FileTransferCompletedEvent
|
FileRequestErrorEvent, FileTransferCompletedEvent
|
||||||
from common.connection import Connection
|
from gajim.common.connection import Connection
|
||||||
from common.file_props import FilesProp
|
from gajim.common.file_props import FilesProp
|
||||||
from common import pep
|
from gajim.common import pep
|
||||||
import emoticons
|
from gajim import emoticons
|
||||||
|
|
||||||
import roster_window
|
from gajim import roster_window
|
||||||
import profile_window
|
from gajim import profile_window
|
||||||
import config
|
from gajim import config
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
from common.configpaths import gajimpaths
|
from gajim.common.configpaths import gajimpaths
|
||||||
config_filename = gajimpaths['CONFIG_FILE']
|
config_filename = gajimpaths['CONFIG_FILE']
|
||||||
|
|
||||||
from common import optparser
|
from gajim.common import optparser
|
||||||
parser = optparser.OptionsParser(config_filename)
|
parser = optparser.OptionsParser(config_filename)
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
@ -2595,7 +2595,7 @@ class Interface:
|
||||||
self.msg_win_mgr.create_window(None, None, None)
|
self.msg_win_mgr.create_window(None, None, None)
|
||||||
|
|
||||||
# Creating plugin manager
|
# Creating plugin manager
|
||||||
import plugins
|
from gajim import plugins
|
||||||
gajim.plugin_manager = plugins.PluginManager()
|
gajim.plugin_manager = plugins.PluginManager()
|
||||||
|
|
||||||
self.roster._before_fill()
|
self.roster._before_fill()
|
||||||
|
@ -2618,7 +2618,7 @@ class Interface:
|
||||||
def remote_init():
|
def remote_init():
|
||||||
if gajim.config.get('remote_control'):
|
if gajim.config.get('remote_control'):
|
||||||
try:
|
try:
|
||||||
import remote_control
|
from gajim import remote_control
|
||||||
self.remote_ctrl = remote_control.Remote()
|
self.remote_ctrl = remote_control.Remote()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
@ -2745,7 +2745,7 @@ class Interface:
|
||||||
gajim.default_session_type = ChatControlSession
|
gajim.default_session_type = ChatControlSession
|
||||||
|
|
||||||
# Creating Network Events Controller
|
# Creating Network Events Controller
|
||||||
from common import nec
|
from gajim.common import nec
|
||||||
gajim.nec = nec.NetworkEventsController()
|
gajim.nec = nec.NetworkEventsController()
|
||||||
gajim.notification = notify.Notification()
|
gajim.notification = notify.Notification()
|
||||||
|
|
||||||
|
@ -2801,11 +2801,11 @@ class Interface:
|
||||||
|
|
||||||
self.remote_ctrl = None
|
self.remote_ctrl = None
|
||||||
|
|
||||||
import network_watcher
|
from gajim import network_watcher
|
||||||
|
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
import upower_listener
|
from gajim import upower_listener
|
||||||
import logind_listener
|
from gajim import logind_listener
|
||||||
|
|
||||||
# Handle gnome screensaver
|
# Handle gnome screensaver
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
|
@ -2868,7 +2868,7 @@ class Interface:
|
||||||
|
|
||||||
self.systray_enabled = False
|
self.systray_enabled = False
|
||||||
|
|
||||||
import statusicon
|
from gajim import statusicon
|
||||||
self.systray = statusicon.StatusIcon()
|
self.systray = statusicon.StatusIcon()
|
||||||
|
|
||||||
pixs = []
|
pixs = []
|
||||||
|
@ -2893,7 +2893,7 @@ class Interface:
|
||||||
lang = gajim.LANG
|
lang = gajim.LANG
|
||||||
tv = Gtk.TextView()
|
tv = Gtk.TextView()
|
||||||
try:
|
try:
|
||||||
import gtkspell
|
from gajim import gtkspell
|
||||||
spell = gtkspell.Spell(tv, lang)
|
spell = gtkspell.Spell(tv, lang)
|
||||||
except (ImportError, TypeError, RuntimeError, OSError, ValueError):
|
except (ImportError, TypeError, RuntimeError, OSError, ValueError):
|
||||||
dialogs.AspellDictError(lang)
|
dialogs.AspellDictError(lang)
|
||||||
|
|
|
@ -20,15 +20,15 @@
|
||||||
|
|
||||||
from gi.repository import Gtk, Gio, GLib
|
from gi.repository import Gtk, Gio, GLib
|
||||||
import os
|
import os
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import message_control
|
from gajim import message_control
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from nbxmpp.protocol import NS_COMMANDS, NS_FILE, NS_MUC, NS_ESESSION
|
from nbxmpp.protocol import NS_COMMANDS, NS_FILE, NS_MUC, NS_ESESSION
|
||||||
from nbxmpp.protocol import NS_JINGLE_FILE_TRANSFER_5, NS_CONFERENCE
|
from nbxmpp.protocol import NS_JINGLE_FILE_TRANSFER_5, NS_CONFERENCE
|
||||||
from gtkgui_helpers import get_action
|
from gajim.gtkgui_helpers import get_action
|
||||||
|
|
||||||
def build_resources_submenu(contacts, account, action, room_jid=None,
|
def build_resources_submenu(contacts, account, action, room_jid=None,
|
||||||
room_account=None, cap=None):
|
room_account=None, cap=None):
|
||||||
|
|
|
@ -39,7 +39,7 @@ from gi.repository import GLib
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
|
|
||||||
def parseOpts():
|
def parseOpts():
|
||||||
config_path = None
|
config_path = None
|
||||||
|
@ -68,14 +68,14 @@ def parseOpts():
|
||||||
config_path = parseOpts()
|
config_path = parseOpts()
|
||||||
del parseOpts
|
del parseOpts
|
||||||
|
|
||||||
import common.configpaths
|
import gajim.common.configpaths
|
||||||
common.configpaths.gajimpaths.init(config_path)
|
gajim.common.configpaths.gajimpaths.init(config_path)
|
||||||
del config_path
|
del config_path
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
from common.logger import LOG_DB_PATH, JIDConstant, KindConstant
|
from gajim.common.logger import LOG_DB_PATH, JIDConstant, KindConstant
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
|
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,9 @@ from datetime import datetime, timedelta, timezone
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from gi.repository import Gtk, GLib
|
from gi.repository import Gtk, GLib
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from gtkgui_helpers import get_icon_pixmap
|
from gajim.gtkgui_helpers import get_icon_pixmap
|
||||||
|
|
||||||
log = logging.getLogger('gajim.c.message_archiving')
|
log = logging.getLogger('gajim.c.message_archiving')
|
||||||
|
|
||||||
|
|
|
@ -34,15 +34,15 @@ import datetime
|
||||||
|
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import conversation_textview
|
from gajim import conversation_textview
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
|
|
||||||
from common.logger import ShowConstant, KindConstant
|
from gajim.common.logger import ShowConstant, KindConstant
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
class InfoColumn(IntEnum):
|
class InfoColumn(IntEnum):
|
||||||
|
|
|
@ -48,17 +48,17 @@ from io import StringIO
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
import common.configpaths
|
import gajim.common.configpaths
|
||||||
common.configpaths.gajimpaths.init(None)
|
gajim.common.configpaths.gajimpaths.init(None)
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
from gtkgui_helpers import get_icon_pixmap
|
from gajim.gtkgui_helpers import get_icon_pixmap
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
|
|
||||||
import tooltips
|
from gajim import tooltips
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.htmlview')
|
log = logging.getLogger('gajim.htmlview')
|
||||||
|
|
||||||
|
@ -924,7 +924,7 @@ class HtmlTextView(Gtk.TextView):
|
||||||
dialogs.AddNewContactWindow(self.account, jid)
|
dialogs.AddNewContactWindow(self.account, jid)
|
||||||
|
|
||||||
def make_link_menu(self, event, kind, text):
|
def make_link_menu(self, event, kind, text):
|
||||||
from gtkgui_helpers import get_gtk_builder
|
from gajim.gtkgui_helpers import get_gtk_builder
|
||||||
xml = get_gtk_builder('chat_context_menu.ui')
|
xml = get_gtk_builder('chat_context_menu.ui')
|
||||||
menu = xml.get_object('chat_context_menu')
|
menu = xml.get_object('chat_context_menu')
|
||||||
childs = menu.get_children()
|
childs = menu.get_children()
|
||||||
|
|
|
@ -25,8 +25,8 @@ Documentation: http://www.freedesktop.org/wiki/Software/systemd/inhibit
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
log = logging.getLogger('gajim.logind_listener')
|
log = logging.getLogger('gajim.logind_listener')
|
||||||
supported = False
|
supported = False
|
||||||
|
@ -67,7 +67,7 @@ def on_suspend(active):
|
||||||
def get_inhibitor():
|
def get_inhibitor():
|
||||||
'''Ask for a suspend delay inhibitor'''
|
'''Ask for a suspend delay inhibitor'''
|
||||||
|
|
||||||
from common.dbus_support import system_bus, dbus
|
from gajim.common.dbus_support import system_bus, dbus
|
||||||
bus = system_bus.bus()
|
bus = system_bus.bus()
|
||||||
global fd
|
global fd
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ def set_listener():
|
||||||
|
|
||||||
@return bool whether it succeeded
|
@return bool whether it succeeded
|
||||||
'''
|
'''
|
||||||
from common.dbus_support import system_bus
|
from gajim.common.dbus_support import system_bus
|
||||||
bus = system_bus.bus()
|
bus = system_bus.bus()
|
||||||
|
|
||||||
if not 'org.freedesktop.login1' in bus.list_names():
|
if not 'org.freedesktop.login1' in bus.list_names():
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common.stanza_session import EncryptedStanzaSession, ArchivingStanzaSession
|
from gajim.common.stanza_session import EncryptedStanzaSession, ArchivingStanzaSession
|
||||||
|
|
||||||
# Derived types MUST register their type IDs here if custom behavor is required
|
# Derived types MUST register their type IDs here if custom behavor is required
|
||||||
TYPE_CHAT = 'chat'
|
TYPE_CHAT = 'chat'
|
||||||
|
|
|
@ -28,8 +28,8 @@ from gi.repository import GObject
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
from gi.repository import Pango
|
from gi.repository import Pango
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
|
|
||||||
class MessageTextView(Gtk.TextView):
|
class MessageTextView(Gtk.TextView):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -34,15 +34,15 @@ from gi.repository import GObject
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import common
|
from gajim import common
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import message_control
|
from gajim import message_control
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
from chat_control_base import ChatControlBase
|
from gajim.chat_control_base import ChatControlBase
|
||||||
from chat_control import ChatControl
|
from gajim.chat_control import ChatControl
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from gtkgui_helpers import get_action
|
from gajim.gtkgui_helpers import get_action
|
||||||
|
|
||||||
####################
|
####################
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# install _() func before importing dbus_support
|
# install _() func before importing dbus_support
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
|
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
import dbus
|
import dbus
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import dataforms_widget
|
from gajim import dataforms_widget
|
||||||
|
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
|
|
||||||
def describe_features(features):
|
def describe_features(features):
|
||||||
|
|
|
@ -24,7 +24,7 @@ import logging
|
||||||
|
|
||||||
from gi.repository import Gio, GLib
|
from gi.repository import Gio, GLib
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
log = logging.getLogger('gajim.network_watcher')
|
log = logging.getLogger('gajim.network_watcher')
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,16 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
from dialogs import PopupNotificationWindow
|
from gajim.dialogs import PopupNotificationWindow
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
import dbus
|
import dbus
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ Main file of plugins package.
|
||||||
:license: GPL
|
:license: GPL
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from .pluginmanager import PluginManager
|
from gajim.plugins.pluginmanager import PluginManager
|
||||||
from .gajimplugin import GajimPlugin
|
from gajim.plugins.gajimplugin import GajimPlugin
|
||||||
|
|
||||||
__all__ = ['PluginManager', 'GajimPlugin']
|
__all__ = ['PluginManager', 'GajimPlugin']
|
||||||
|
|
|
@ -27,10 +27,10 @@ Base class for implementing plugin.
|
||||||
import os
|
import os
|
||||||
import locale
|
import locale
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
from plugins.helpers import log_calls, log
|
from gajim.plugins.helpers import log_calls, log
|
||||||
from plugins.gui import GajimPluginConfigDialog
|
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger('gajim.p.plugin')
|
log = logging.getLogger('gajim.p.plugin')
|
||||||
|
|
|
@ -34,14 +34,14 @@ import os
|
||||||
|
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
from dialogs import WarningDialog, YesNoDialog, ArchiveChooserDialog
|
from gajim.dialogs import WarningDialog, YesNoDialog, ArchiveChooserDialog
|
||||||
from htmltextview import HtmlTextView
|
from gajim.htmltextview import HtmlTextView
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from plugins.helpers import log_calls
|
from gajim.plugins.helpers import log_calls
|
||||||
from plugins.helpers import GajimPluginActivateException
|
from gajim.plugins.helpers import GajimPluginActivateException
|
||||||
from plugins.plugins_i18n import _
|
from gajim.plugins.plugins_i18n import _
|
||||||
from common.exceptions import PluginsystemError
|
from gajim.common.exceptions import PluginsystemError
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
class Column(IntEnum):
|
class Column(IntEnum):
|
||||||
|
|
|
@ -34,13 +34,13 @@ from shutil import rmtree
|
||||||
import configparser
|
import configparser
|
||||||
from pkg_resources import parse_version
|
from pkg_resources import parse_version
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import nec
|
from gajim.common import nec
|
||||||
from common.exceptions import PluginsystemError
|
from gajim.common.exceptions import PluginsystemError
|
||||||
|
|
||||||
from plugins.helpers import log, log_calls, Singleton
|
from gajim.plugins.helpers import log, log_calls, Singleton
|
||||||
from plugins.helpers import GajimPluginActivateException
|
from gajim.plugins.helpers import GajimPluginActivateException
|
||||||
from plugins.gajimplugin import GajimPlugin, GajimPluginException
|
from gajim.plugins.gajimplugin import GajimPlugin, GajimPluginException
|
||||||
|
|
||||||
class PluginManager(metaclass=Singleton):
|
class PluginManager(metaclass=Singleton):
|
||||||
'''
|
'''
|
||||||
|
@ -460,7 +460,7 @@ class PluginManager(metaclass=Singleton):
|
||||||
|
|
||||||
:todo: add scanning zipped modules
|
:todo: add scanning zipped modules
|
||||||
'''
|
'''
|
||||||
from plugins.plugins_i18n import _
|
from gajim.plugins.plugins_i18n import _
|
||||||
plugins_found = []
|
plugins_found = []
|
||||||
conf = configparser.ConfigParser()
|
conf = configparser.ConfigParser()
|
||||||
fields = ('name', 'short_name', 'version', 'description', 'authors',
|
fields = ('name', 'short_name', 'version', 'description', 'authors',
|
||||||
|
|
|
@ -22,7 +22,7 @@ import locale
|
||||||
import gettext
|
import gettext
|
||||||
from os import path as os_path
|
from os import path as os_path
|
||||||
import os
|
import os
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
|
|
||||||
APP = 'gajim_plugins'
|
APP = 'gajim_plugins'
|
||||||
plugins_locale_dir = os_path.join(gajim.PLUGINS_DIRS[1], 'locale')
|
plugins_locale_dir = os_path.join(gajim.PLUGINS_DIRS[1], 'locale')
|
||||||
|
@ -36,5 +36,5 @@ try:
|
||||||
t = gettext.translation(APP, plugins_locale_dir)
|
t = gettext.translation(APP, plugins_locale_dir)
|
||||||
_ = t.gettext
|
_ = t.gettext
|
||||||
except IOError:
|
except IOError:
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
_ = gettext.gettext
|
_ = gettext.gettext
|
||||||
|
|
|
@ -32,12 +32,12 @@ import mimetypes
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import vcard
|
from gajim import vcard
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
|
|
||||||
class ProfileWindow:
|
class ProfileWindow:
|
||||||
|
|
|
@ -32,16 +32,16 @@ import os
|
||||||
import base64
|
import base64
|
||||||
import mimetypes
|
import mimetypes
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from time import time
|
from time import time
|
||||||
from dialogs import AddNewContactWindow, NewChatDialog, JoinGroupchatWindow
|
from gajim.dialogs import AddNewContactWindow, NewChatDialog, JoinGroupchatWindow
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common.connection_handlers_events import MessageOutgoingEvent
|
from gajim.common.connection_handlers_events import MessageOutgoingEvent
|
||||||
from common.connection_handlers_events import GcMessageOutgoingEvent
|
from gajim.common.connection_handlers_events import GcMessageOutgoingEvent
|
||||||
|
|
||||||
|
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
import dbus
|
import dbus
|
||||||
if dbus_support:
|
if dbus_support:
|
||||||
|
|
|
@ -45,27 +45,27 @@ import locale
|
||||||
|
|
||||||
from enum import IntEnum, unique
|
from enum import IntEnum, unique
|
||||||
|
|
||||||
import common.sleepy
|
from gajim.common import sleepy
|
||||||
import history_window
|
from gajim import history_window
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import vcard
|
from gajim import vcard
|
||||||
import config
|
from gajim import config
|
||||||
import disco
|
from gajim import disco
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import gui_menu_builder
|
from gajim import gui_menu_builder
|
||||||
import cell_renderer_image
|
from gajim import cell_renderer_image
|
||||||
import tooltips
|
from gajim import tooltips
|
||||||
import message_control
|
from gajim import message_control
|
||||||
import adhoc_commands
|
from gajim import adhoc_commands
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
from common.exceptions import GajimGeneralException
|
from gajim.common.exceptions import GajimGeneralException
|
||||||
from common import i18n
|
from gajim.common import i18n
|
||||||
from common import location_listener
|
from gajim.common import location_listener
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common import dbus_support
|
from gajim.common import dbus_support
|
||||||
from message_window import MessageWindowMgr
|
from gajim.message_window import MessageWindowMgr
|
||||||
from nbxmpp.protocol import NS_FILE, NS_ROSTERX, NS_CONFERENCE
|
from nbxmpp.protocol import NS_FILE, NS_ROSTERX, NS_CONFERENCE
|
||||||
|
|
||||||
|
|
||||||
|
@ -2166,7 +2166,7 @@ class RosterWindow:
|
||||||
def send_status_continue(self, account, status, txt, auto, to):
|
def send_status_continue(self, account, status, txt, auto, to):
|
||||||
if gajim.account_is_connected(account) and not to:
|
if gajim.account_is_connected(account) and not to:
|
||||||
if status == 'online' and gajim.interface.sleeper.getState() != \
|
if status == 'online' and gajim.interface.sleeper.getState() != \
|
||||||
common.sleepy.STATE_UNKNOWN:
|
sleepy.STATE_UNKNOWN:
|
||||||
gajim.sleeper_state[account] = 'online'
|
gajim.sleeper_state[account] = 'online'
|
||||||
elif gajim.sleeper_state[account] not in ('autoaway', 'autoxa') or \
|
elif gajim.sleeper_state[account] not in ('autoaway', 'autoxa') or \
|
||||||
status == 'offline':
|
status == 'offline':
|
||||||
|
@ -2508,7 +2508,7 @@ class RosterWindow:
|
||||||
|
|
||||||
def on_continue2(message, pep_dict):
|
def on_continue2(message, pep_dict):
|
||||||
# check if there is an active file transfer
|
# check if there is an active file transfer
|
||||||
from common.protocol.bytestream import (is_transfer_active)
|
from gajim.common.protocol.bytestream import (is_transfer_active)
|
||||||
files_props = gajim.interface.instances['file_transfers'].\
|
files_props = gajim.interface.instances['file_transfers'].\
|
||||||
files_props
|
files_props
|
||||||
transfer_active = False
|
transfer_active = False
|
||||||
|
@ -2688,7 +2688,7 @@ class RosterWindow:
|
||||||
self.remove_contact(jid, obj.conn.name, backend=True)
|
self.remove_contact(jid, obj.conn.name, backend=True)
|
||||||
|
|
||||||
def _nec_pep_received(self, obj):
|
def _nec_pep_received(self, obj):
|
||||||
if obj.jid == common.gajim.get_jid_from_account(obj.conn.name):
|
if obj.jid == gajim.get_jid_from_account(obj.conn.name):
|
||||||
self.draw_account(obj.conn.name)
|
self.draw_account(obj.conn.name)
|
||||||
|
|
||||||
if obj.pep_type == 'nickname':
|
if obj.pep_type == 'nickname':
|
||||||
|
@ -6030,7 +6030,7 @@ class RosterWindow:
|
||||||
GLib.idle_add(_open_wizard)
|
GLib.idle_add(_open_wizard)
|
||||||
if not gajim.ZEROCONF_ACC_NAME in gajim.config.get_per('accounts'):
|
if not gajim.ZEROCONF_ACC_NAME in gajim.config.get_per('accounts'):
|
||||||
# Create zeroconf in config file
|
# Create zeroconf in config file
|
||||||
from common.zeroconf import connection_zeroconf
|
from gajim.common.zeroconf import connection_zeroconf
|
||||||
connection_zeroconf.ConnectionZeroconf(gajim.ZEROCONF_ACC_NAME)
|
connection_zeroconf.ConnectionZeroconf(gajim.ZEROCONF_ACC_NAME)
|
||||||
|
|
||||||
# Setting CTRL+J to be the shortcut for bringing up the dialog to join a
|
# Setting CTRL+J to be the shortcut for bringing up the dialog to join a
|
||||||
|
|
|
@ -23,15 +23,15 @@ from gi.repository import GLib
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import Gdk
|
from gi.repository import Gdk
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import dataforms
|
from gajim.common import dataforms
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
|
|
||||||
import gtkgui_helpers
|
from gajim import gtkgui_helpers
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import vcard
|
from gajim import vcard
|
||||||
import config
|
from gajim import config
|
||||||
import dataforms_widget
|
from gajim import dataforms_widget
|
||||||
|
|
||||||
class SearchWindow:
|
class SearchWindow:
|
||||||
def __init__(self, account, jid):
|
def __init__(self, account, jid):
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
from common.configpaths import gajimpaths
|
from gajim.common.configpaths import gajimpaths
|
||||||
|
|
||||||
import Crypto
|
import Crypto
|
||||||
from common import crypto
|
from gajim.common import crypto
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pickle
|
import pickle
|
||||||
|
|
|
@ -22,9 +22,9 @@ from collections import namedtuple
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from gtkgui_helpers import get_icon_pixmap, Color
|
from gajim.gtkgui_helpers import get_icon_pixmap, Color
|
||||||
|
|
||||||
class ServerInfoDialog(Gtk.Dialog):
|
class ServerInfoDialog(Gtk.Dialog):
|
||||||
def __init__(self, account):
|
def __init__(self, account):
|
||||||
|
|
|
@ -23,24 +23,24 @@
|
||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
|
|
||||||
from common import helpers
|
from gajim.common import helpers
|
||||||
|
|
||||||
from common import events
|
from gajim.common import events
|
||||||
from common import exceptions
|
from gajim.common import exceptions
|
||||||
from common import gajim
|
from gajim.common import gajim
|
||||||
from common import stanza_session
|
from gajim.common import stanza_session
|
||||||
from common import contacts
|
from gajim.common import contacts
|
||||||
from common import ged
|
from gajim.common import ged
|
||||||
from common.connection_handlers_events import ChatstateReceivedEvent, \
|
from gajim.common.connection_handlers_events import ChatstateReceivedEvent, \
|
||||||
InformationEvent
|
InformationEvent
|
||||||
from common.logger import KindConstant
|
from gajim.common.logger import KindConstant
|
||||||
|
|
||||||
import message_control
|
from gajim import message_control
|
||||||
|
|
||||||
import notify
|
from gajim import notify
|
||||||
|
|
||||||
import dialogs
|
from gajim import dialogs
|
||||||
import negotiation
|
from gajim import negotiation
|
||||||
|
|
||||||
class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
def __init__(self, conn, jid, thread_id, type_='chat'):
|
def __init__(self, conn, jid, thread_id, type_='chat'):
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue