1
0
kopia lustrzana https://github.com/arsenetar/dupeguru.git synced 2025-09-11 17:58:17 +00:00

Under Linux, don't show the "Check for Update" action and correctly open the help file.

This commit is contained in:
Virgil Dupras 2010-04-07 09:04:58 -07:00
rodzic 7af3bb7226
commit 87e0011525
8 zmienionych plików z 17 dodań i 4 usunięć

Wyświetl plik

@ -183,7 +183,8 @@ class DupeGuru(DupeGuruBase, QObject):
self.directories_dialog.show() self.directories_dialog.show()
def show_help(self): 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) QDesktopServices.openUrl(url)
def show_preferences(self): def show_preferences(self):

Wyświetl plik

@ -6,6 +6,8 @@
# which should be included with this package. The terms are also available at # which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/hs_license # http://www.hardcoded.net/licenses/hs_license
import sys
from PyQt4.QtCore import Qt, QCoreApplication, QProcess, SIGNAL, QUrl from PyQt4.QtCore import Qt, QCoreApplication, QProcess, SIGNAL, QUrl
from PyQt4.QtGui import (QMainWindow, QMenu, QPixmap, QIcon, QToolButton, QLabel, QHeaderView, from PyQt4.QtGui import (QMainWindow, QMenu, QPixmap, QIcon, QToolButton, QLabel, QHeaderView,
QMessageBox, QInputDialog, QLineEdit, QDesktopServices) QMessageBox, QInputDialog, QLineEdit, QDesktopServices)
@ -86,6 +88,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.statusLabel = QLabel(self) self.statusLabel = QLabel(self)
self.statusbar.addPermanentWidget(self.statusLabel, 1) self.statusbar.addPermanentWidget(self.statusLabel, 1)
# Linux setup
if sys.platform == 'linux2':
self.actionCheckForUpdate.setVisible(False) # This only works on Windows
#--- Private #--- Private
def _confirm(self, title, msg, default_button=QMessageBox.Yes): def _confirm(self, title, msg, default_button=QMessageBox.Yes):
buttons = QMessageBox.Yes | QMessageBox.No buttons = QMessageBox.Yes | QMessageBox.No

Wyświetl plik

@ -8,3 +8,4 @@
# http://www.hardcoded.net/licenses/hs_license # 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'

Wyświetl plik

@ -10,3 +10,4 @@
# dummy unit to allow the app to run under OSX during development # dummy unit to allow the app to run under OSX during development
INITIAL_FOLDER_IN_DIALOGS = u'/' INITIAL_FOLDER_IN_DIALOGS = u'/'
HELP_PATH = ''

Wyświetl plik

@ -8,3 +8,4 @@
# http://www.hardcoded.net/licenses/hs_license # http://www.hardcoded.net/licenses/hs_license
INITIAL_FOLDER_IN_DIALOGS = u'C:\\' INITIAL_FOLDER_IN_DIALOGS = u'C:\\'
HELP_PATH = 'help'

Wyświetl plik

@ -14,6 +14,7 @@ from preferences import Preferences
from preferences_dialog import PreferencesDialog from preferences_dialog import PreferencesDialog
class DupeGuru(DupeGuruBase): class DupeGuru(DupeGuruBase):
EDITION = 'me'
LOGO_NAME = 'logo_me' LOGO_NAME = 'logo_me'
NAME = 'dupeGuru Music Edition' NAME = 'dupeGuru Music Edition'
VERSION = '5.7.2' VERSION = '5.7.2'

Wyświetl plik

@ -54,6 +54,7 @@ class File(fs.File):
class DupeGuru(DupeGuruBase): class DupeGuru(DupeGuruBase):
EDITION = 'pe'
LOGO_NAME = 'logo_pe' LOGO_NAME = 'logo_pe'
NAME = 'dupeGuru Picture Edition' NAME = 'dupeGuru Picture Edition'
VERSION = '1.8.6' VERSION = '1.8.6'

Wyświetl plik

@ -24,6 +24,7 @@ class Directories(DirectoriesBase):
return STATE_EXCLUDED return STATE_EXCLUDED
class DupeGuru(DupeGuruBase): class DupeGuru(DupeGuruBase):
EDITION = 'se'
LOGO_NAME = 'logo_se' LOGO_NAME = 'logo_se'
NAME = 'dupeGuru' NAME = 'dupeGuru'
VERSION = '2.9.2' VERSION = '2.9.2'