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