Fixed an issue in the IRC widget opening hyperlinks.

Sat, 02 Mar 2013 15:45:29 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 02 Mar 2013 15:45:29 +0100
changeset 2442
1dcfd570fa12
parent 2440
9a2d05a2f6d2
child 2444
0fdd7f9ebd0b

Fixed an issue in the IRC widget opening hyperlinks.

Network/IRC/IrcChannelWidget.py file | annotate | diff | comparison | revisions
Network/IRC/IrcChannelWidget.ui file | annotate | diff | comparison | revisions
Network/IRC/IrcNetworkWidget.py file | annotate | diff | comparison | revisions
Network/IRC/IrcNetworkWidget.ui file | annotate | diff | comparison | revisions
--- a/Network/IRC/IrcChannelWidget.py	Sat Mar 02 15:11:29 2013 +0100
+++ b/Network/IRC/IrcChannelWidget.py	Sat Mar 02 15:45:29 2013 +0100
@@ -9,9 +9,9 @@
 
 import re
 
-from PyQt4.QtCore import pyqtSlot, pyqtSignal, QDateTime, QPoint, QFileInfo, QTimer
+from PyQt4.QtCore import pyqtSlot, pyqtSignal, QDateTime, QPoint, QFileInfo, QTimer, QUrl
 from PyQt4.QtGui import QWidget, QListWidgetItem, QIcon, QPainter, QMenu, QApplication, \
-    QInputDialog, QLineEdit, QTextCursor
+    QInputDialog, QLineEdit, QTextCursor, QDesktopServices
 
 from E5Gui import E5MessageBox, E5FileDialog
 from E5Gui.E5Application import e5App
@@ -1673,3 +1673,10 @@
         if ok and topic != "":
             self.sendData.emit("TOPIC {0} :{1}".format(
                 self.__name, topic))
+    
+    @pyqtSlot(QUrl)
+    def on_messages_anchorClicked(self, url):
+        """
+        Private slot to open links in the default browser.
+        """
+        QDesktopServices.openUrl(url)
--- a/Network/IRC/IrcChannelWidget.ui	Sat Mar 02 15:11:29 2013 +0100
+++ b/Network/IRC/IrcChannelWidget.ui	Sat Mar 02 15:45:29 2013 +0100
@@ -82,8 +82,8 @@
       <property name="tabChangesFocus">
        <bool>true</bool>
       </property>
-      <property name="openExternalLinks">
-       <bool>true</bool>
+      <property name="openLinks">
+       <bool>false</bool>
       </property>
      </widget>
     </widget>
--- a/Network/IRC/IrcNetworkWidget.py	Sat Mar 02 15:11:29 2013 +0100
+++ b/Network/IRC/IrcNetworkWidget.py	Sat Mar 02 15:45:29 2013 +0100
@@ -7,8 +7,8 @@
 Module implementing the network part of the IRC widget.
 """
 
-from PyQt4.QtCore import pyqtSlot, pyqtSignal, QPoint, QFileInfo
-from PyQt4.QtGui import QWidget, QApplication, QMenu
+from PyQt4.QtCore import pyqtSlot, pyqtSignal, QPoint, QFileInfo, QUrl
+from PyQt4.QtGui import QWidget, QApplication, QMenu, QDesktopServices
 
 from E5Gui import E5MessageBox, E5FileDialog
 
@@ -444,3 +444,10 @@
         self.__copyAllMessagesAct.setEnabled(enable)
         self.__saveMessagesAct.setEnabled(enable)
         self.__messagesMenu.popup(self.messages.mapToGlobal(pos))
+    
+    @pyqtSlot(QUrl)
+    def on_messages_anchorClicked(self, url):
+        """
+        Private slot to open links in the default browser.
+        """
+        QDesktopServices.openUrl(url)
--- a/Network/IRC/IrcNetworkWidget.ui	Sat Mar 02 15:11:29 2013 +0100
+++ b/Network/IRC/IrcNetworkWidget.ui	Sat Mar 02 15:45:29 2013 +0100
@@ -31,8 +31,8 @@
      <property name="tabChangesFocus">
       <bool>true</bool>
      </property>
-     <property name="openExternalLinks">
-      <bool>true</bool>
+     <property name="openLinks">
+      <bool>false</bool>
      </property>
     </widget>
    </item>

eric ide

mercurial