Fix the imports to support Python3 style absolute imports.
This commit is contained in:
parent
1f27a20e9e
commit
0ee7d2e92f
@ -21,9 +21,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
from pkg_resources import resource_filename
|
from pkg_resources import resource_filename
|
||||||
from chat import ChatTextEdit
|
from qweechat.chat import ChatTextEdit
|
||||||
from input import InputLineEdit
|
from qweechat.input import InputLineEdit
|
||||||
import weechat.color as color
|
import qweechat.weechat.color as color
|
||||||
|
|
||||||
from PySide6 import QtCore
|
from PySide6 import QtCore
|
||||||
from PySide6 import QtWidgets
|
from PySide6 import QtWidgets
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import config
|
from qweechat import config
|
||||||
import weechat.color as color
|
from qweechat.weechat import color
|
||||||
|
|
||||||
from PySide6 import QtCore
|
from PySide6 import QtCore
|
||||||
from PySide6 import QtWidgets, QtGui
|
from PySide6 import QtWidgets, QtGui
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
# along with QWeeChat. If not, see <http://www.gnu.org/licenses/>.
|
# along with QWeeChat. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
from chat import ChatTextEdit
|
from qweechat.chat import ChatTextEdit
|
||||||
from input import InputLineEdit
|
from qweechat.input import InputLineEdit
|
||||||
|
|
||||||
from PySide6 import QtWidgets as QtGui
|
from PySide6 import QtWidgets as QtGui
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import struct
|
import struct
|
||||||
import config
|
from qweechat import config
|
||||||
from PySide6 import QtCore, QtNetwork
|
from PySide6 import QtCore, QtNetwork
|
||||||
from PySide6.QtCore import QObject, Signal
|
from PySide6.QtCore import QObject, Signal
|
||||||
|
|
||||||
|
@ -37,14 +37,14 @@ import sys
|
|||||||
import traceback
|
import traceback
|
||||||
from pkg_resources import resource_filename
|
from pkg_resources import resource_filename
|
||||||
# import qt_compat
|
# import qt_compat
|
||||||
import config
|
from qweechat import config
|
||||||
import weechat.protocol as protocol
|
from qweechat.weechat import protocol
|
||||||
from network import Network
|
from qweechat.network import Network
|
||||||
from connection import ConnectionDialog
|
from qweechat.connection import ConnectionDialog
|
||||||
from buffer import BufferListWidget, Buffer
|
from qweechat.buffer import BufferListWidget, Buffer
|
||||||
from debug import DebugDialog
|
from qweechat.debug import DebugDialog
|
||||||
from about import AboutDialog
|
from qweechat.about import AboutDialog
|
||||||
from version import qweechat_version
|
from qweechat.version import qweechat_version
|
||||||
|
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QApplication, QLabel, QPushButton, QVBoxLayout, QWidget)
|
QApplication, QLabel, QPushButton, QVBoxLayout, QWidget)
|
||||||
@ -345,7 +345,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
for obj in message.objects:
|
for obj in message.objects:
|
||||||
if obj.objtype != 'hda' or obj.value['path'][-1] != 'buffer':
|
if obj.objtype != 'hda' or obj.value['path'][-1] != 'buffer':
|
||||||
continue
|
continue
|
||||||
print('listbuffers object', obj.objtype, obj.value['path'])
|
|
||||||
self.list_buffers.clear()
|
self.list_buffers.clear()
|
||||||
while self.stacked_buffers.count() > 0:
|
while self.stacked_buffers.count() > 0:
|
||||||
buf = self.stacked_buffers.widget(0)
|
buf = self.stacked_buffers.widget(0)
|
||||||
@ -353,7 +352,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
self.buffers = []
|
self.buffers = []
|
||||||
for item in obj.value['items']:
|
for item in obj.value['items']:
|
||||||
buf = self.create_buffer(item)
|
buf = self.create_buffer(item)
|
||||||
print(f'Creating buffer for {item}')
|
|
||||||
self.insert_buffer(len(self.buffers), buf)
|
self.insert_buffer(len(self.buffers), buf)
|
||||||
self.list_buffers.setCurrentRow(0)
|
self.list_buffers.setCurrentRow(0)
|
||||||
self.buffers[0].widget.input.setFocus()
|
self.buffers[0].widget.input.setFocus()
|
||||||
@ -485,7 +483,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
|
|
||||||
def parse_message(self, message):
|
def parse_message(self, message):
|
||||||
"""Parse a WeeChat message."""
|
"""Parse a WeeChat message."""
|
||||||
print(f'message.msgid = {message.msgid}')
|
|
||||||
if message.msgid.startswith('debug'):
|
if message.msgid.startswith('debug'):
|
||||||
self.debug_display(0, '', '(debug message, ignored)')
|
self.debug_display(0, '', '(debug message, ignored)')
|
||||||
elif message.msgid == 'listbuffers':
|
elif message.msgid == 'listbuffers':
|
||||||
|
Loading…
Reference in New Issue
Block a user