10 from PyQt6.QtCore import pyqtSlot, pyqtSignal, QPoint, QFileInfo, QUrl, QThread |
10 from PyQt6.QtCore import pyqtSlot, pyqtSignal, QPoint, QFileInfo, QUrl, QThread |
11 from PyQt6.QtGui import QDesktopServices |
11 from PyQt6.QtGui import QDesktopServices |
12 from PyQt6.QtWidgets import QWidget, QApplication, QMenu |
12 from PyQt6.QtWidgets import QWidget, QApplication, QMenu |
13 |
13 |
14 from EricWidgets import EricMessageBox, EricFileDialog |
14 from EricWidgets import EricMessageBox, EricFileDialog |
|
15 from EricWidgets.EricApplication import ericApp |
15 |
16 |
16 from .Ui_IrcNetworkWidget import Ui_IrcNetworkWidget |
17 from .Ui_IrcNetworkWidget import Ui_IrcNetworkWidget |
17 |
18 |
18 from .IrcUtilities import ircFilter, ircTimestamp |
19 from .IrcUtilities import ircFilter, ircTimestamp |
19 |
20 |
90 |
91 |
91 def autoConnect(self): |
92 def autoConnect(self): |
92 """ |
93 """ |
93 Public method to perform the IRC auto connection. |
94 Public method to perform the IRC auto connection. |
94 """ |
95 """ |
95 self.__autoConnect() |
96 userInterface = ericApp().getObject("UserInterface") |
|
97 online = userInterface.isOnline() |
|
98 self.connectButton.setEnabled(online) |
|
99 userInterface.onlineStateChanged.connect(self.__onlineStateChanged) |
|
100 if online: |
|
101 self.__autoConnect() |
96 |
102 |
97 def __autoConnect(self): |
103 def __autoConnect(self): |
98 """ |
104 """ |
99 Private method to perform the IRC auto connection. |
105 Private method to perform the IRC auto connection. |
100 """ |
106 """ |