1543 "PDF Files (*.pdf);;" |
1544 "PDF Files (*.pdf);;" |
1544 "CHM Files (*.chm);;" |
1545 "CHM Files (*.chm);;" |
1545 "All Files (*)" |
1546 "All Files (*)" |
1546 )) |
1547 )) |
1547 if fn: |
1548 if fn: |
1548 self.currentBrowser().setSource(QUrl("file://" + fn)) |
1549 if Utilities.isWindowsPlatform(): |
|
1550 url = "file:///" + Utilities.fromNativeSeparators(fn) |
|
1551 else: |
|
1552 url = "file://" + fn |
|
1553 self.currentBrowser().setSource(QUrl(url)) |
1549 |
1554 |
1550 def __openFileNewTab(self): |
1555 def __openFileNewTab(self): |
1551 """ |
1556 """ |
1552 Private slot called to open a file in a new tab. |
1557 Private slot called to open a file in a new tab. |
1553 """ |
1558 """ |
1559 "PDF Files (*.pdf);;" |
1564 "PDF Files (*.pdf);;" |
1560 "CHM Files (*.chm);;" |
1565 "CHM Files (*.chm);;" |
1561 "All Files (*)" |
1566 "All Files (*)" |
1562 )) |
1567 )) |
1563 if fn: |
1568 if fn: |
1564 self.newTab("file://" + fn) |
1569 if Utilities.isWindowsPlatform(): |
|
1570 url = "file:///" + Utilities.fromNativeSeparators(fn) |
|
1571 else: |
|
1572 url = "file://" + fn |
|
1573 self.newTab(url) |
1565 |
1574 |
1566 def __savePageAs(self): |
1575 def __savePageAs(self): |
1567 """ |
1576 """ |
1568 Private slot to save the current page. |
1577 Private slot to save the current page. |
1569 """ |
1578 """ |