mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Under Linux, don't show the "Check for Update" action and correctly open the help file.
This commit is contained in:
@@ -183,7 +183,8 @@ class DupeGuru(DupeGuruBase, QObject):
|
||||
self.directories_dialog.show()
|
||||
|
||||
def show_help(self):
|
||||
url = QUrl.fromLocalFile(op.abspath('help/intro.htm'))
|
||||
base_path = platform.HELP_PATH.format(self.EDITION)
|
||||
url = QUrl.fromLocalFile(op.abspath(op.join(base_path, 'intro.htm')))
|
||||
QDesktopServices.openUrl(url)
|
||||
|
||||
def show_preferences(self):
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
import sys
|
||||
|
||||
from PyQt4.QtCore import Qt, QCoreApplication, QProcess, SIGNAL, QUrl
|
||||
from PyQt4.QtGui import (QMainWindow, QMenu, QPixmap, QIcon, QToolButton, QLabel, QHeaderView,
|
||||
QMessageBox, QInputDialog, QLineEdit, QDesktopServices)
|
||||
@@ -85,6 +87,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
|
||||
self.statusLabel = QLabel(self)
|
||||
self.statusbar.addPermanentWidget(self.statusLabel, 1)
|
||||
|
||||
# Linux setup
|
||||
if sys.platform == 'linux2':
|
||||
self.actionCheckForUpdate.setVisible(False) # This only works on Windows
|
||||
|
||||
#--- Private
|
||||
def _confirm(self, title, msg, default_button=QMessageBox.Yes):
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
INITIAL_FOLDER_IN_DIALOGS = u'/'
|
||||
INITIAL_FOLDER_IN_DIALOGS = u'/'
|
||||
HELP_PATH = '/usr/local/share/dupeguru_{0}/help'
|
||||
|
||||
@@ -9,4 +9,5 @@
|
||||
|
||||
# dummy unit to allow the app to run under OSX during development
|
||||
|
||||
INITIAL_FOLDER_IN_DIALOGS = u'/'
|
||||
INITIAL_FOLDER_IN_DIALOGS = u'/'
|
||||
HELP_PATH = ''
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.hardcoded.net/licenses/hs_license
|
||||
|
||||
INITIAL_FOLDER_IN_DIALOGS = u'C:\\'
|
||||
INITIAL_FOLDER_IN_DIALOGS = u'C:\\'
|
||||
HELP_PATH = 'help'
|
||||
|
||||
Reference in New Issue
Block a user