Commit ef217f20 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Make imports GUI agnostic

parent 4899b78c
Pipeline #6822 failed with stages
in 16 minutes and 22 seconds
......@@ -23,13 +23,13 @@
from gajim.common.exceptions import GajimGeneralException
from gajim import dialogs
from gajim.gtk.dialogs import ShortcutsWindow
from gajim.gtk.single_message import SingleMessageWindow
from gajim.gtk.about import AboutDialog
from gajim.gtk.history import HistoryWindow
from gajim.gtk.discovery import ServiceDiscoveryWindow
from gajim.gtk.util import open_window
from gajim.gtk.util import get_app_window
from gajim.gui.dialogs import ShortcutsWindow
from gajim.gui.single_message import SingleMessageWindow
from gajim.gui.about import AboutDialog
from gajim.gui.history import HistoryWindow
from gajim.gui.discovery import ServiceDiscoveryWindow
from gajim.gui.util import open_window
from gajim.gui.util import get_app_window
# General Actions
......
......@@ -208,7 +208,7 @@ def _startup(self, _application):
dlg.destroy()
sys.exit()
from gajim.gtk.util import load_user_iconsets
from gajim.gui.util import load_user_iconsets
load_user_iconsets()
from gajim.common.cert_store import CertificateStore
......@@ -217,7 +217,7 @@ def _startup(self, _application):
# Set Application Menu
app.app = self
from gajim.gtk.util import get_builder
from gajim.gui.util import get_builder
builder = get_builder('application_menu.ui')
menubar = builder.get_object("menubar")
self.set_menubar(menubar)
......
......@@ -59,18 +59,18 @@
from gajim import gui_menu_builder
from gajim import dialogs
from gajim.gtk.gstreamer import create_gtk_widget
from gajim.gtk.dialogs import DialogButton
from gajim.gtk.dialogs import ConfirmationDialog
from gajim.gtk.add_contact import AddNewContactWindow
from gajim.gtk.util import get_cursor
from gajim.gtk.util import format_mood
from gajim.gtk.util import format_activity
from gajim.gtk.util import format_tune
from gajim.gtk.util import format_location
from gajim.gtk.util import get_activity_icon_name
from gajim.gtk.util import make_href_markup
from gajim.gtk.const import ControlType
from gajim.gui.gstreamer import create_gtk_widget
from gajim.gui.dialogs import DialogButton
from gajim.gui.dialogs import ConfirmationDialog
from gajim.gui.add_contact import AddNewContactWindow
from gajim.gui.util import get_cursor
from gajim.gui.util import format_mood
from gajim.gui.util import format_activity
from gajim.gui.util import format_tune
from gajim.gui.util import format_location
from gajim.gui.util import get_activity_icon_name
from gajim.gui.util import make_href_markup
from gajim.gui.const import ControlType
from gajim.command_system.implementation.hosts import ChatCommands
from gajim.command_system.framework import CommandHost # pylint: disable=unused-import
......
......@@ -51,18 +51,18 @@
from gajim.conversation_textview import ConversationTextview
from gajim.gtk.dialogs import DialogButton
from gajim.gtk.dialogs import ConfirmationDialog
from gajim.gtk.dialogs import PastePreviewDialog
from gajim.gtk.message_input import MessageInputTextView
from gajim.gtk.util import at_the_end
from gajim.gtk.util import get_show_in_roster
from gajim.gtk.util import get_show_in_systray
from gajim.gtk.util import get_hardware_key_codes
from gajim.gtk.util import get_builder
from gajim.gtk.util import generate_account_badge
from gajim.gtk.const import ControlType # pylint: disable=unused-import
from gajim.gtk.emoji_chooser import emoji_chooser
from gajim.gui.dialogs import DialogButton
from gajim.gui.dialogs import ConfirmationDialog
from gajim.gui.dialogs import PastePreviewDialog
from gajim.gui.message_input import MessageInputTextView
from gajim.gui.util import at_the_end
from gajim.gui.util import get_show_in_roster
from gajim.gui.util import get_show_in_systray
from gajim.gui.util import get_hardware_key_codes
from gajim.gui.util import get_builder
from gajim.gui.util import generate_account_badge
from gajim.gui.const import ControlType # pylint: disable=unused-import
from gajim.gui.emoji_chooser import emoji_chooser
from gajim.command_system.implementation.middleware import ChatCommandProcessor
from gajim.command_system.implementation.middleware import CommandTools
......
......@@ -626,7 +626,7 @@ def prefers_app_menu():
def load_css_config():
global css_config
from gajim.gtk.css_config import CSSConfig
from gajim.gui.css_config import CSSConfig
css_config = CSSConfig()
def set_debug_mode(enable: bool) -> None:
......
......@@ -39,7 +39,7 @@
from gajim.common.connection_handlers import ConnectionHandlers
from gajim.common.connection_handlers_events import MessageSentEvent
from gajim.gtk.util import open_window
from gajim.gui.util import open_window
log = logging.getLogger('gajim.client')
......
......@@ -45,14 +45,14 @@
from gajim.common.const import URI_SCHEMES
from gajim.common.helpers import to_user_string
from gajim.gtk import util
from gajim.gtk.util import get_cursor
from gajim.gtk.util import format_fingerprint
from gajim.gtk.util import text_to_color
from gajim.gtk.emoji_data import emoji_pixbufs
from gajim.gtk.emoji_data import is_emoji
from gajim.gtk.emoji_data import get_emoji_pixbuf
from gajim.gtk.htmltextview import HtmlTextView
from gajim.gui import util
from gajim.gui.util import get_cursor
from gajim.gui.util import format_fingerprint
from gajim.gui.util import text_to_color
from gajim.gui.emoji_data import emoji_pixbufs
from gajim.gui.emoji_data import is_emoji
from gajim.gui.emoji_data import get_emoji_pixbuf
from gajim.gui.htmltextview import HtmlTextView
NOT_SHOWN = 0
ALREADY_RECEIVED = 1
......
......@@ -21,8 +21,8 @@
from gajim.common.app import app
from gajim.common.i18n import _
from gajim.gtk.dialogs import ErrorDialog
from gajim.gtk.dialogs import InformationDialog
from gajim.gui.dialogs import ErrorDialog
from gajim.gui.dialogs import InformationDialog
Message = namedtuple('Message', ['title', 'text', 'dialog'])
......
......@@ -41,10 +41,10 @@
from gajim.common import helpers
from gajim.common.exceptions import GajimGeneralException
from gajim.gtk.dialogs import ErrorDialog
from gajim.gtk.util import get_icon_name
from gajim.gtk.util import get_builder
from gajim.gtk.util import get_app_window
from gajim.gui.dialogs import ErrorDialog
from gajim.gui.util import get_icon_name
from gajim.gui.util import get_builder
from gajim.gui.util import get_app_window
log = logging.getLogger('gajim.dialogs')
......
......@@ -63,20 +63,20 @@
from gajim.command_system.implementation.hosts import GroupChatCommands
from gajim.gtk.dialogs import DialogButton
from gajim.gtk.dialogs import ConfirmationCheckDialog
from gajim.gtk.dialogs import ConfirmationDialog
from gajim.gtk.filechoosers import AvatarChooserDialog
from gajim.gtk.groupchat_config import GroupchatConfig
from gajim.gtk.adhoc import AdHocCommand
from gajim.gtk.dataform import DataFormWidget
from gajim.gtk.groupchat_info import GroupChatInfoScrolled
from gajim.gtk.groupchat_invite import GroupChatInvite
from gajim.gtk.groupchat_settings import GroupChatSettings
from gajim.gtk.groupchat_roster import GroupchatRoster
from gajim.gtk.util import NickCompletionGenerator
from gajim.gtk.util import get_app_window
from gajim.gtk.const import ControlType
from gajim.gui.dialogs import DialogButton
from gajim.gui.dialogs import ConfirmationCheckDialog
from gajim.gui.dialogs import ConfirmationDialog
from gajim.gui.filechoosers import AvatarChooserDialog
from gajim.gui.groupchat_config import GroupchatConfig
from gajim.gui.adhoc import AdHocCommand
from gajim.gui.dataform import DataFormWidget
from gajim.gui.groupchat_info import GroupChatInfoScrolled
from gajim.gui.groupchat_invite import GroupChatInvite
from gajim.gui.groupchat_settings import GroupChatSettings
from gajim.gui.groupchat_roster import GroupchatRoster
from gajim.gui.util import NickCompletionGenerator
from gajim.gui.util import get_app_window
from gajim.gui.const import ControlType
log = logging.getLogger('gajim.groupchat_control')
......
......@@ -41,15 +41,15 @@
from gajim.common.const import SASL_ERRORS
from gajim.common.const import GIO_TLS_ERRORS
from gajim.gtk.assistant import Assistant
from gajim.gtk.assistant import Page
from gajim.gtk.assistant import SuccessPage
from gajim.gtk.dataform import DataFormWidget
from gajim.gtk.util import get_builder
from gajim.gtk.util import open_window
from .assistant import Assistant
from .assistant import Page
from .assistant import SuccessPage
from .dataform import DataFormWidget
from .util import get_builder
from .util import open_window
log = logging.getLogger('gajim.gtk.account_wizard')
log = logging.getLogger('gajim.gui.account_wizard')
class AccountWizard(Assistant):
......
......@@ -26,17 +26,17 @@
from gajim.common import passwords
from gajim.common.i18n import _
from gajim.gtk.dialogs import DialogButton
from gajim.gtk.dialogs import ConfirmationDialog
from gajim.gtk.const import Setting
from gajim.gtk.const import SettingKind
from gajim.gtk.const import SettingType
from gajim.gtk.settings import SettingsDialog
from gajim.gtk.settings import SettingsBox
from gajim.gtk.util import open_window
from .dialogs import DialogButton
from .dialogs import ConfirmationDialog
from .const import Setting
from .const import SettingKind
from .const import SettingType
from .settings import SettingsDialog
from .settings import SettingsBox
from .util import open_window
log = logging.getLogger('gajim.gtk.accounts')
log = logging.getLogger('gajim.gui.accounts')
class AccountsWindow(Gtk.ApplicationWindow):
......
......@@ -21,9 +21,9 @@
from gajim.common import helpers
from gajim.common.i18n import _
from gajim.gtk.dialogs import ErrorDialog
from gajim.gtk.util import get_builder
from gajim.gtk.util import EventHelper
from .dialogs import ErrorDialog
from .util import get_builder
from .util import EventHelper
class AddNewContactWindow(Gtk.ApplicationWindow, EventHelper):
......@@ -233,7 +233,7 @@ def on_register_button_clicked(self, widget):
model = self.protocol_jid_combobox.get_model()
row = self.protocol_jid_combobox.get_active()
jid = model[row][0]
from gajim.gtk.service_registration import ServiceRegistration
from .service_registration import ServiceRegistration
ServiceRegistration(self.account, jid)
def _on_key_press(self, widget, event):
......
......@@ -26,11 +26,11 @@
from gajim.common.i18n import _
from gajim.common.helpers import to_user_string
from gajim.gtk.dataform import DataFormWidget
from gajim.gtk.util import find_widget
from gajim.gtk.util import MultiLineLabel
from .dataform import DataFormWidget
from .util import find_widget
from .util import MultiLineLabel
log = logging.getLogger('gajim.gtk.adhoc')
log = logging.getLogger('gajim.gui.adhoc')
class Page(IntEnum):
......
......@@ -32,7 +32,7 @@
from gajim.common.setting_values import ADVANCED_SETTINGS
from gajim.common.setting_values import APP_SETTINGS
from gajim.gtk.util import get_builder
from .util import get_builder
@unique
......
......@@ -17,8 +17,8 @@
from gi.repository import Gio
from gi.repository import GObject
from gajim.gtk.util import get_builder
from gajim.gtk.util import EventHelper
from .util import get_builder
from .util import EventHelper
class Assistant(Gtk.ApplicationWindow, EventHelper):
......
......@@ -29,13 +29,13 @@
from gajim.common.const import AvatarSize
from gajim.common.const import StyleAttr
from gajim.gtk.util import load_pixbuf
from gajim.gtk.util import text_to_color
from gajim.gtk.util import scale_with_ratio
from gajim.gtk.util import get_css_show_class
from gajim.gtk.util import convert_rgb_string_to_float
from .util import load_pixbuf
from .util import text_to_color
from .util import scale_with_ratio
from .util import get_css_show_class
from .util import convert_rgb_string_to_float
log = logging.getLogger('gajim.gtk.avatar')
log = logging.getLogger('gajim.gui.avatar')
def generate_avatar(letters, color, size, scale):
......
......@@ -30,9 +30,9 @@
from gajim.common.i18n import _
from gajim.common.helpers import get_file_path_from_dnd_dropped_uri
from gajim.gtk.util import scale_with_ratio
from .util import scale_with_ratio
log = logging.getLogger('gajim.gtk.avatar_selector')
log = logging.getLogger('gajim.gui.avatar_selector')
@unique
......
......@@ -23,10 +23,10 @@
from gajim.common.i18n import _
from gajim.common.helpers import to_user_string
from gajim.gtk.util import get_builder
from gajim.gtk.dialogs import HigDialog
from .util import get_builder
from .dialogs import HigDialog
log = logging.getLogger('gajim.gtk.blocking_list')
log = logging.getLogger('gajim.gui.blocking_list')
class BlockingList(Gtk.ApplicationWindow):
......
......@@ -25,10 +25,10 @@
from gajim.common.helpers import validate_jid
from gajim.common.i18n import _
from gajim.gtk.util import get_builder
from .util import get_builder
log = logging.getLogger('gajim.gtk.bookmarks')
log = logging.getLogger('gajim.gui.bookmarks')
class Column(IntEnum):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment