Fix some problematic imports
This commit is contained in:
parent
b54f27599c
commit
6f55cf3dd4
|
@ -48,6 +48,8 @@ from gajim import dialogs
|
|||
from gajim import cell_renderer_image
|
||||
from gajim import message_control
|
||||
from gajim.chat_control_base import ChatControlBase
|
||||
from gajim.gajim_themes_window import GajimThemesWindow
|
||||
from gajim.advanced_configuration_window import AdvancedConfigurationWindow
|
||||
from gajim import dataforms_widget
|
||||
from gajim import gui_menu_builder
|
||||
|
||||
|
@ -696,7 +698,7 @@ class PreferencesWindow:
|
|||
|
||||
def on_manage_theme_button_clicked(self, widget):
|
||||
if self.theme_preferences is None:
|
||||
self.theme_preferences = dialogs.GajimThemesWindow()
|
||||
self.theme_preferences = GajimThemesWindow()
|
||||
else:
|
||||
self.theme_preferences.window.present()
|
||||
self.theme_preferences.select_active_theme()
|
||||
|
@ -1188,7 +1190,7 @@ class PreferencesWindow:
|
|||
app.interface.instances['advanced_config'].window.present()
|
||||
else:
|
||||
app.interface.instances['advanced_config'] = \
|
||||
dialogs.AdvancedConfigurationWindow()
|
||||
AdvancedConfigurationWindow()
|
||||
|
||||
#---------- ManageProxiesWindow class -------------#
|
||||
class ManageProxiesWindow:
|
||||
|
|
|
@ -53,12 +53,6 @@ from gajim.common import const
|
|||
from gajim.options_dialog import OptionsDialog
|
||||
from gajim.common.const import Option, OptionKind, OptionType
|
||||
|
||||
# those imports are not used in this file, but in files that 'import dialogs'
|
||||
# so they can do dialog.GajimThemesWindow() for example
|
||||
from gajim.filetransfers_window import FileTransfersWindow
|
||||
from gajim.gajim_themes_window import GajimThemesWindow
|
||||
from gajim.advanced_configuration_window import AdvancedConfigurationWindow
|
||||
|
||||
from gajim.common import app
|
||||
from gajim.common import helpers
|
||||
from gajim.common import i18n
|
||||
|
|
|
@ -86,9 +86,6 @@ def get_icon_path(icon_name, size=16):
|
|||
log.error("Unable to find icon %s: %s" % (icon_name, str(e)))
|
||||
|
||||
|
||||
from gajim import dialogs
|
||||
|
||||
|
||||
HAS_PYWIN32 = True
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
|
@ -447,6 +444,7 @@ def scale_with_ratio(size, width, height):
|
|||
return size, int(size / ratio)
|
||||
|
||||
def on_avatar_save_as_menuitem_activate(widget, avatar, default_name=''):
|
||||
from gajim import dialogs
|
||||
def on_continue(response, file_path):
|
||||
if response < 0:
|
||||
return
|
||||
|
|
|
@ -73,6 +73,7 @@ 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 gajim.filetransfers_window import FileTransfersWindow
|
||||
|
||||
from gajim.atom_window import AtomWindow
|
||||
from gajim.session import ChatControlSession
|
||||
|
@ -2717,7 +2718,7 @@ class Interface:
|
|||
self.roster._after_fill()
|
||||
|
||||
# get instances for windows/dialogs that will show_all()/hide()
|
||||
self.instances['file_transfers'] = dialogs.FileTransfersWindow()
|
||||
self.instances['file_transfers'] = FileTransfersWindow()
|
||||
|
||||
GLib.timeout_add(100, self.autoconnect)
|
||||
if sys.platform == 'win32':
|
||||
|
|
Loading…
Reference in New Issue