diff --git a/python/plugins/plugin_installer/__init__.py b/python/plugins/plugin_installer/__init__.py index 845c9ef4841..e6685931365 100644 --- a/python/plugins/plugin_installer/__init__.py +++ b/python/plugins/plugin_installer/__init__.py @@ -14,7 +14,7 @@ def name(): return "Plugin Installer" def version(): - return "Version 0.9.8" + return "Version 0.9.11" def description(): return "Downloads and installs QGIS python plugins" @@ -23,7 +23,7 @@ def qgisMinimumVersion(): return "0.9" def authorName(): - return "perrygeo, borysiasty" + return "Matthew Perry, Borys Jurgiel" def homepage(): return "http://bwj.aster.net.pl/qgis/" diff --git a/python/plugins/plugin_installer/installer_data.py b/python/plugins/plugin_installer/installer_data.py index a21b42e027f..d8c11482262 100644 --- a/python/plugins/plugin_installer/installer_data.py +++ b/python/plugins/plugin_installer/installer_data.py @@ -43,6 +43,7 @@ mPlugins = dict of dicts {id : {"name" QString, "error_details" QString, "homepage" QString, "url" QString, + "experimental" bool "filename" QString, "repository" QString, "localdir" QString, @@ -79,9 +80,11 @@ officialRepo = ("QGIS Official Repository", "http://pyqgis.org/repo/official" contribRepo = ("QGIS Contributed Repository", "http://pyqgis.org/repo/contributed","") authorRepos = [("Carson Farmer's Repository", "http://www.ftools.ca/cfarmerQgisRepo.xml", "http://www.ftools.ca/cfarmerQgisRepo_0.xx.xml"), ("Borys Jurgiel's Repository", "http://bwj.aster.net.pl/qgis/plugins.xml", "http://bwj.aster.net.pl/qgis-oldapi/plugins.xml"), - ("Faunalia Repository", "http://faunalia.it/qgis/plugins.xml", "http://faunalia.it/qgis/1.x/plugins.xml")] - - + ("Faunalia Repository", "http://www.faunalia.it/qgis/plugins.xml", "http://faunalia.it/qgis/plugins.xml"), + ("Martin Dobias' Sandbox", "http://mapserver.sk/~wonder/qgis/plugins-sandbox.xml", ""), + ("Aaron Racicot's Repository", "http://qgisplugins.z-pulley.com", ""), + ("Barry Rowlingson's Repository", "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml", ""), + ("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml", "")] # --- class QPHttp ----------------------------------------------------------------------- # @@ -94,6 +97,8 @@ class QPHttp(QHttp): if settings.value("/proxyEnabled").toBool(): self.proxy=QNetworkProxy() proxyType = settings.value( "/proxyType", QVariant(0)).toString() + if len(args)>0 and settings.value("/proxyExcludedUrls").toString().contains(args[0]): + proxyType = "NoProxy" if proxyType in ["1","Socks5Proxy"]: self.proxy.setType(QNetworkProxy.Socks5Proxy) elif proxyType in ["2","NoProxy"]: self.proxy.setType(QNetworkProxy.NoProxy) elif proxyType in ["3","HttpProxy"]: self.proxy.setType(QNetworkProxy.HttpProxy) @@ -233,6 +238,48 @@ class Repositories(QObject): settings.setValue(settingsGroup+"/checkOnStart", QVariant(state)) + # ----------------------------------------- # + def checkingOnStartInterval(self): + """ return checking for news and updates interval """ + settings = QSettings() + (i, ok) = settings.value(settingsGroup+"/checkOnStartInterval").toInt() + if i < 0 or not ok: + i = 1 + # allowed values: 0,1,3,7,14,30 days + interval = 0 + for j in [1,3,7,14,30]: + if i >= j: + interval = j + return interval + + + # ----------------------------------------- # + def setCheckingOnStartInterval(self, interval): + """ set checking for news and updates interval """ + settings = QSettings() + settings.setValue(settingsGroup+"/checkOnStartInterval", QVariant(interval)) + + + # ----------------------------------------- # + def saveCheckingOnStartLastDate(self): + """ set today's date as the day of last checking """ + settings = QSettings() + settings.setValue(settingsGroup+"/checkOnStartLastDate", QVariant(QDate.currentDate())) + + + # ----------------------------------------- # + def timeForChecking(self): + """ determine whether it's the time for checking for news and updates now """ + if self.checkingOnStartInterval() == 0: + return True + settings = QSettings() + interval = settings.value(settingsGroup+"/checkOnStartLastDate").toDate().daysTo(QDate.currentDate()) + if interval >= self.checkingOnStartInterval(): + return True + else: + return False + + # ----------------------------------------- # def load(self): """ populate the mRepositories dict""" @@ -329,15 +376,19 @@ class Repositories(QObject): fileName = QFileInfo(pluginNodes.item(i).firstChildElement("download_url").text().trimmed()).fileName() name = fileName.section(".", 0, 0) name = str(name) + experimental = False + if pluginNodes.item(i).firstChildElement("experimental").text().simplified().toUpper() in ["TRUE","YES"]: + experimental = True plugin = {} plugin[name] = { "name" : pluginNodes.item(i).toElement().attribute("name"), "version_avail" : pluginNodes.item(i).toElement().attribute("version"), - "desc_repo" : pluginNodes.item(i).firstChildElement("description").text().trimmed(), + "desc_repo" : pluginNodes.item(i).firstChildElement("description").text().simplified(), "desc_local" : "", - "author" : pluginNodes.item(i).firstChildElement("author_name").text().trimmed(), - "homepage" : pluginNodes.item(i).firstChildElement("homepage").text().trimmed(), - "url" : pluginNodes.item(i).firstChildElement("download_url").text().trimmed(), + "author" : pluginNodes.item(i).firstChildElement("author_name").text().simplified(), + "homepage" : pluginNodes.item(i).firstChildElement("homepage").text().simplified(), + "url" : pluginNodes.item(i).firstChildElement("download_url").text().simplified(), + "experimental" : experimental, "filename" : fileName, "status" : "not installed", "error" : "", @@ -346,14 +397,14 @@ class Repositories(QObject): "repository" : reposName, "localdir" : name, "read-only" : False} - qgisMinimumVersion = pluginNodes.item(i).firstChildElement("qgis_minimum_version").text().trimmed() + qgisMinimumVersion = pluginNodes.item(i).firstChildElement("qgis_minimum_version").text().simplified() if not qgisMinimumVersion: qgisMinimumVersion = "0" # please use the tag below only if really needed! (for example if plugin development is abandoned) - qgisMaximumVersion = pluginNodes.item(i).firstChildElement("qgis_maximum_version").text().trimmed() + qgisMaximumVersion = pluginNodes.item(i).firstChildElement("qgis_maximum_version").text().simplified() if not qgisMaximumVersion: qgisMaximumVersion = "2" #if compatible, add the plugin to the list if compareVersions(QGIS_VER, qgisMinimumVersion) < 2 and compareVersions(qgisMaximumVersion, QGIS_VER) < 2: - if QGIS_VER[0]=="0" or qgisMinimumVersion[0]=="1" or name=="plugin_installer": + if QGIS_VER[0]==qgisMinimumVersion[0] or name=="plugin_installer" or (qgisMinimumVersion!="0" and qgisMaximumVersion!="2"): plugins.addPlugin(plugin) plugins.workarounds() self.mRepositories[reposName]["state"] = 2 @@ -367,6 +418,7 @@ class Repositories(QObject): # is the checking done? if not self.fetchingInProgress(): plugins.getAllInstalled() + self.saveCheckingOnStartLastDate() self.emit(SIGNAL("checkingDone()")) # --- /class Repositories ---------------------------------------------------------------- # @@ -500,6 +552,7 @@ class Plugins(QObject): "author" : auth, "homepage" : homepage, "url" : path, + "experimental" : False, "filename" : "", "status" : "", "error" : error, @@ -519,6 +572,7 @@ class Plugins(QObject): self.mPlugins[key]["name"] = plugin["name"] # local name has higher priority self.mPlugins[key]["version_inst"] = plugin["version_inst"] self.mPlugins[key]["desc_local"] = plugin["desc_local"] + self.mPlugins[key]["experimental"] = False # set status # # installed available status diff --git a/python/plugins/plugin_installer/installer_gui.py b/python/plugins/plugin_installer/installer_gui.py index 890a5d28644..89277f128fb 100644 --- a/python/plugins/plugin_installer/installer_gui.py +++ b/python/plugins/plugin_installer/installer_gui.py @@ -262,15 +262,27 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase): self.connect(self.buttonAddRep, SIGNAL("clicked()"), self.addRepository) self.connect(self.buttonEditRep, SIGNAL("clicked()"), self.editRepository) self.connect(self.buttonDeleteRep, SIGNAL("clicked()"), self.deleteRepository) - # checkingOnStart checkbox - self.connect(self.checkUpdates, SIGNAL("stateChanged (int)"), self.ChangeCheckingPolicy) - if repositories.checkingOnStart(): - self.checkUpdates.setCheckState(Qt.Checked) - else: - self.checkUpdates.setCheckState(Qt.Unchecked) self.buttonEditRep.setEnabled(False) self.buttonDeleteRep.setEnabled(False) - + # configuration widgets + self.connect(self.checkUpdates, SIGNAL("toggled (bool)"), self.changeCheckingPolicy) + self.connect(self.comboInterval, SIGNAL("currentIndexChanged (int)"), self.changeCheckingInterval) + self.connect(self.radioPluginType0, SIGNAL("toggled (bool)"), self.changePluginPolicy) + self.connect(self.radioPluginType1, SIGNAL("toggled (bool)"), self.changePluginPolicy) + self.connect(self.radioPluginType2, SIGNAL("toggled (bool)"), self.changePluginPolicy) + if repositories.checkingOnStart(): + self.checkUpdates.setChecked(Qt.Checked) + else: + self.checkUpdates.setChecked(Qt.Unchecked) + interval = repositories.checkingOnStartInterval() + intervals = [0,1,3,7,14,30] # days + if intervals.count(interval): + index = intervals.index(interval) + else: + index = 1 + if QGIS_VER[0] == "0": + self.label_2.setText("Note: This functionality requires QGIS 1.0") + self.comboInterval.setCurrentIndex(index) self.populateMostWidgets() @@ -328,13 +340,32 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase): for i in [0,1,2]: self.treeRepositories.resizeColumnToContents(i) self.comboFilter1.addItem(self.tr("orphans")) - # filling the status filter comboBox + # fill the status filter comboBox self.comboFilter2.clear() self.comboFilter2.addItem(self.tr("any status")) self.comboFilter2.addItem(self.tr("not installed", "plural")) self.comboFilter2.addItem(self.tr("installed", "plural")) if plugins.isThereAnythingNew(): self.comboFilter2.addItem(self.tr("upgradeable and news")) + #set configuration widgets (dependent on the repository list) + if len(repositories.all()) == 1 or QGIS_VER[0] == "0": + self.radioPluginType0.setEnabled(False) + self.radioPluginType1.setEnabled(False) + self.radioPluginType2.setEnabled(False) + else: + self.radioPluginType0.setEnabled(True) + self.radioPluginType1.setEnabled(True) + self.radioPluginType2.setEnabled(True) + settings = QSettings() + (i, ok) = settings.value(settingsGroup+"/allowedPluginType", QVariant(2)).toInt() + if QGIS_VER[0] == "0": + self.radioPluginType1.setChecked(Qt.Checked) + elif i == 1 or len(repositories.all()) == 1: + self.radioPluginType0.setChecked(Qt.Checked) + elif i == 3: + self.radioPluginType2.setChecked(Qt.Checked) + else: + self.radioPluginType1.setChecked(Qt.Checked) # ----------------------------------------- # @@ -358,6 +389,10 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase): return False if self.comboFilter2.currentIndex() == 3 and not plugin["status"] in ["upgradeable","new"]: return False + if self.radioPluginType0.isChecked() and plugin["repository"] != officialRepo[0] and plugin["status"] in ["not installed","new"]: + return False + if self.radioPluginType1.isChecked() and plugin["experimental"] and plugin["status"] in ["not installed","new"]: + return False if self.lineFilter.text() == "": return True else: @@ -365,7 +400,6 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase): item = QString(plugin[i]) #.toUpper() if item != None: if item.contains(self.lineFilter.text(), Qt.CaseInsensitive): - #if item.find(self.lineFilter.text().toUpper()) > -1: return True return False @@ -658,17 +692,41 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase): # ----------------------------------------- # - def ChangeCheckingPolicy(self,policy): - if policy == Qt.Checked: + def changeCheckingPolicy(self,policy): + """ the Checking On Start checkbox has been clicked """ + if policy: repositories.setCheckingOnStart(True) else: repositories.setCheckingOnStart(False) + # ----------------------------------------- # + def changeCheckingInterval(self,interval): + """ the Checking on start interval combobox has been clicked """ + intervals = [0,1,3,7,14,30] + repositories.setCheckingOnStartInterval(intervals[interval]) + + + # ----------------------------------------- # + def changePluginPolicy(self, state): + """ one of the plugin type radiobuttons has been clicked """ + if not state: # radio button released + return + if self.radioPluginType0.isChecked(): + i = 1 + elif self.radioPluginType1.isChecked(): + i = 2 + else: + i = 3 + settings = QSettings() + settings.setValue(settingsGroup+"/allowedPluginType", QVariant(i)) + self.populatePluginTree() + + # ----------------------------------------- # def addKnownRepositories(self): """ update list of known repositories - in the future it will be replaced with an online fetching """ - message = self.tr("You are going to add some plugin repositories neither authorized nor supported by the Quantum GIS team, however provided by folks associated with us. Plugin authors generally make efforts to make their works useful and safe, but we can't assume any responsibility for them. FEEL WARNED!") + message = self.tr("You are about to add several plugin repositories that are neither authorized nor supported by the Quantum GIS team. Plugin authors generally make efforts to ensure that their work is useful and safe, however, we can assume no responsibility for them.") if QMessageBox.question(self, self.tr("QGIS Python Plugin Installer"), message, QMessageBox.Ok, QMessageBox.Abort) == QMessageBox.Ok: repositories.addKnownRepos() # refresh lists and populate widgets @@ -687,13 +745,13 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase): if not dlg.exec_(): return for i in repositories.all().values(): - if dlg.editURL.text() == i["url"]: + if dlg.editURL.text().trimmed() == i["url"]: QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Unable to add another repository with the same URL!")) return settings = QSettings() settings.beginGroup(self.reposGroup) reposName = dlg.editName.text() - reposURL = dlg.editURL.text() + reposURL = dlg.editURL.text().trimmed() if repositories.all().has_key(reposName): reposName = reposName + "(2)" # add to settings @@ -729,7 +787,7 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase): if not dlg.exec_(): return # nothing to do if cancelled for i in repositories.all().values(): - if dlg.editURL.text() == i["url"] and dlg.editURL.text() != repositories.all()[reposName]["url"]: + if dlg.editURL.text().trimmed() == i["url"] and dlg.editURL.text().trimmed() != repositories.all()[reposName]["url"]: QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Unable to add another repository with the same URL!")) return # delete old repo from QSettings and create new one @@ -739,9 +797,9 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase): newName = dlg.editName.text() if repositories.all().has_key(newName) and newName != reposName: newName = newName + "(2)" - settings.setValue(newName+"/url", QVariant(dlg.editURL.text())) + settings.setValue(newName+"/url", QVariant(dlg.editURL.text().trimmed())) settings.setValue(newName+"/enabled", QVariant(bool(dlg.checkBoxEnabled.checkState()))) - if dlg.editURL.text() == repositories.all()[reposName]["url"] and dlg.checkBoxEnabled.checkState() == checkState[repositories.all()[reposName]["enabled"]]: + if dlg.editURL.text().trimmed() == repositories.all()[reposName]["url"] and dlg.checkBoxEnabled.checkState() == checkState[repositories.all()[reposName]["enabled"]]: repositories.rename(reposName, newName) self.populateMostWidgets() return # nothing else to do if only repository name was changed diff --git a/python/plugins/plugin_installer/installer_plugin.py b/python/plugins/plugin_installer/installer_plugin.py index 387cc3623ba..68cb1a5bd78 100644 --- a/python/plugins/plugin_installer/installer_plugin.py +++ b/python/plugins/plugin_installer/installer_plugin.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Copyright (C) 2007-2008 Matthew Perry Copyright (C) 2008 Borys Jurgiel @@ -32,10 +31,26 @@ class InstallerPlugin(): else: # old plugin API self.mainWindow = self.iface.getMainWindow + + # ----------------------------------------- # + def getThemeIcon(self, theName): + myCurThemePath = QgsApplication.activeThemePath() + "/plugins/" + theName; + myDefThemePath = QgsApplication.defaultThemePath() + "/plugins/" + theName; + myQrcPath = ":/plugins/installer/" + theName; + if QFile.exists(myCurThemePath): + return QIcon(myCurThemePath) + elif QFile.exists(myDefThemePath): + return QIcon(myDefThemePath) + elif QFile.exists(myQrcPath): + return QIcon(myQrcPath) + else: + return QIcon() + + # ----------------------------------------- # def initGui(self): """ create action that will start plugin window and then add it to menu """ - self.action = QAction(QIcon(":/plugins/installer/plugin_installer.png"), QCoreApplication.translate("QgsPluginInstaller","Fetch Python Plugins..."), self.mainWindow()) + self.action = QAction(self.getThemeIcon("plugin_installer.png"), QCoreApplication.translate("QgsPluginInstaller","Fetch Python Plugins..."), self.mainWindow()) self.action.setWhatsThis(QCoreApplication.translate("QgsPluginInstaller","Install more plugins from remote repositories")) self.action.setStatusTip(QCoreApplication.translate("QgsPluginInstaller","Install more plugins from remote repositories")) if QGIS_MAJOR_VER: # new plugin API @@ -50,10 +65,12 @@ class InstallerPlugin(): repositories.load() plugins.clear() - if repositories.checkingOnStart() and repositories.allEnabled(): + if repositories.checkingOnStart() and repositories.timeForChecking() and repositories.allEnabled(): self.statusLabel = QLabel(QCoreApplication.translate("QgsPluginInstaller","Looking for new plugins..."), self.mainWindow().statusBar()) self.mainWindow().statusBar().insertPermanentWidget(0,self.statusLabel) - QObject.connect(self.statusLabel, SIGNAL("linkActivated (QString)"), self.run) + QObject.connect(self.statusLabel, SIGNAL("linkActivated (QString)"), self.preRun) + + QObject.connect(repositories, SIGNAL("checkingDone()"), self.checkingDone) for key in repositories.allEnabled(): repositories.requestFetching(key) @@ -89,25 +106,37 @@ class InstallerPlugin(): # ----------------------------------------- # def unload(self): """ remove the menu item and notify label """ - self.mainWindow().menuBar().actions()[4].menu().removeAction(self.action) + if QGIS_MAJOR_VER: # new plugin API + self.iface.pluginMenu().removeAction(self.action) + else: # old plugin API + self.mainWindow().menuBar().actions()[4].menu().removeAction(self.action) if self.statusLabel: self.mainWindow().statusBar().removeWidget(self.statusLabel) # ----------------------------------------- # - def run(self, * params): + def preRun(self, * params): + """ stupid method to get rid of the string value """ + self.run() + + + # ----------------------------------------- # + def run(self, parent = None): """ create and show a configuration dialog """ QApplication.setOverrideCursor(Qt.WaitCursor) if self.statusLabel: self.mainWindow().statusBar().removeWidget(self.statusLabel) self.statusLabel = None + if not parent: + parent = self.mainWindow() + for key in repositories.all(): if repositories.all()[key]["state"] == 3: # if state = 3 (error), try to fetch once again repositories.requestFetching(key) if repositories.fetchingInProgress(): - self.fetchDlg = QgsPluginInstallerFetchingDialog(self.mainWindow()) + self.fetchDlg = QgsPluginInstallerFetchingDialog(parent) self.fetchDlg.exec_() del self.fetchDlg for key in repositories.all(): @@ -118,10 +147,10 @@ class InstallerPlugin(): # display an error message for every unavailable reposioty, except the case if all repositories are unavailable! if repositories.allUnavailable() and repositories.allUnavailable() != repositories.allEnabled(): for key in repositories.allUnavailable(): - QMessageBox.warning(self.mainWindow(), QCoreApplication.translate("QgsPluginInstaller","QGIS Python Plugin Installer"), QCoreApplication.translate("QgsPluginInstaller","Error reading repository:") + u' %s\n%s' % (key,repositories.all()[key]["error"])) + QMessageBox.warning(parent, QCoreApplication.translate("QgsPluginInstaller","QGIS Python Plugin Installer"), QCoreApplication.translate("QgsPluginInstaller","Error reading repository:") + u' %s\n%s' % (key,repositories.all()[key]["error"])) plugins.getAllInstalled() flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint - self.guiDlg = QgsPluginInstallerDialog(self.mainWindow(),flags) + self.guiDlg = QgsPluginInstallerDialog(parent,flags) self.guiDlg.show() diff --git a/python/plugins/plugin_installer/qgsplugininstallerbase.py b/python/plugins/plugin_installer/qgsplugininstallerbase.py index 0632dabbeaf..47bc2f71dff 100644 --- a/python/plugins/plugin_installer/qgsplugininstallerbase.py +++ b/python/plugins/plugin_installer/qgsplugininstallerbase.py @@ -2,8 +2,8 @@ # Form implementation generated from reading ui file 'qgsplugininstallerbase.ui' # -# Created: Wed Nov 12 23:21:49 2008 -# by: PyQt4 UI code generator 4.3.3 +# Created: Thu Mar 12 17:09:35 2009 +# by: PyQt4 UI code generator 4.4.4 # # WARNING! All changes made in this file will be lost! @@ -12,184 +12,235 @@ from PyQt4 import QtCore, QtGui class Ui_QgsPluginInstallerDialogBase(object): def setupUi(self, QgsPluginInstallerDialogBase): QgsPluginInstallerDialogBase.setObjectName("QgsPluginInstallerDialogBase") - QgsPluginInstallerDialogBase.resize(QtCore.QSize(QtCore.QRect(0,0,769,395).size()).expandedTo(QgsPluginInstallerDialogBase.minimumSizeHint())) - QgsPluginInstallerDialogBase.setWindowIcon(QtGui.QIcon(":/plugins/installer/qgis-icon.png")) - + QgsPluginInstallerDialogBase.resize(799, 382) + icon = QtGui.QIcon() + icon.addPixmap(QtGui.QPixmap(":/plugins/installer/qgis-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + QgsPluginInstallerDialogBase.setWindowIcon(icon) self.gridlayout = QtGui.QGridLayout(QgsPluginInstallerDialogBase) self.gridlayout.setObjectName("gridlayout") - - self.tabWidget = QtGui.QTabWidget(QgsPluginInstallerDialogBase) - self.tabWidget.setObjectName("tabWidget") - - self.tab = QtGui.QWidget() - self.tab.setObjectName("tab") - - self.vboxlayout = QtGui.QVBoxLayout(self.tab) - self.vboxlayout.setObjectName("vboxlayout") - self.hboxlayout = QtGui.QHBoxLayout() self.hboxlayout.setObjectName("hboxlayout") - - self.label_5 = QtGui.QLabel(self.tab) - self.label_5.setEnabled(True) - self.label_5.setObjectName("label_5") - self.hboxlayout.addWidget(self.label_5) - - self.lineFilter = QtGui.QLineEdit(self.tab) - self.lineFilter.setEnabled(True) - self.lineFilter.setObjectName("lineFilter") - self.hboxlayout.addWidget(self.lineFilter) - - self.comboFilter1 = QtGui.QComboBox(self.tab) - self.comboFilter1.setEnabled(True) - - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboFilter1.sizePolicy().hasHeightForWidth()) - self.comboFilter1.setSizePolicy(sizePolicy) - self.comboFilter1.setObjectName("comboFilter1") - self.hboxlayout.addWidget(self.comboFilter1) - - self.comboFilter2 = QtGui.QComboBox(self.tab) - self.comboFilter2.setEnabled(True) - - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,QtGui.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.comboFilter2.sizePolicy().hasHeightForWidth()) - self.comboFilter2.setSizePolicy(sizePolicy) - self.comboFilter2.setObjectName("comboFilter2") - self.hboxlayout.addWidget(self.comboFilter2) - self.vboxlayout.addLayout(self.hboxlayout) - - self.treePlugins = QtGui.QTreeWidget(self.tab) - self.treePlugins.setAlternatingRowColors(True) - self.treePlugins.setRootIsDecorated(False) - self.treePlugins.setItemsExpandable(False) - self.treePlugins.setSortingEnabled(True) - self.treePlugins.setAllColumnsShowFocus(True) - self.treePlugins.setObjectName("treePlugins") - self.vboxlayout.addWidget(self.treePlugins) - - self.hboxlayout1 = QtGui.QHBoxLayout() - self.hboxlayout1.setObjectName("hboxlayout1") - - spacerItem = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) - self.hboxlayout1.addItem(spacerItem) - - self.buttonInstall = QtGui.QPushButton(self.tab) - - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.buttonInstall.sizePolicy().hasHeightForWidth()) - self.buttonInstall.setSizePolicy(sizePolicy) - self.buttonInstall.setMinimumSize(QtCore.QSize(160,0)) - self.buttonInstall.setObjectName("buttonInstall") - self.hboxlayout1.addWidget(self.buttonInstall) - - self.buttonUninstall = QtGui.QPushButton(self.tab) - self.buttonUninstall.setEnabled(True) - self.buttonUninstall.setObjectName("buttonUninstall") - self.hboxlayout1.addWidget(self.buttonUninstall) - self.vboxlayout.addLayout(self.hboxlayout1) - self.tabWidget.addTab(self.tab,"") - - self.tab_2 = QtGui.QWidget() - self.tab_2.setObjectName("tab_2") - - self.gridlayout1 = QtGui.QGridLayout(self.tab_2) - self.gridlayout1.setObjectName("gridlayout1") - - self.treeRepositories = QtGui.QTreeWidget(self.tab_2) - self.treeRepositories.setRootIsDecorated(False) - self.treeRepositories.setItemsExpandable(False) - self.treeRepositories.setObjectName("treeRepositories") - self.gridlayout1.addWidget(self.treeRepositories,0,0,1,7) - - self.checkUpdates = QtGui.QCheckBox(self.tab_2) - self.checkUpdates.setObjectName("checkUpdates") - self.gridlayout1.addWidget(self.checkUpdates,1,0,1,1) - - spacerItem1 = QtGui.QSpacerItem(30,20,QtGui.QSizePolicy.Preferred,QtGui.QSizePolicy.Minimum) - self.gridlayout1.addItem(spacerItem1,1,1,1,1) - - self.buttonFetchRepositories = QtGui.QPushButton(self.tab_2) - self.buttonFetchRepositories.setEnabled(True) - self.buttonFetchRepositories.setObjectName("buttonFetchRepositories") - self.gridlayout1.addWidget(self.buttonFetchRepositories,1,2,1,1) - - spacerItem2 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) - self.gridlayout1.addItem(spacerItem2,1,3,1,1) - - self.buttonAddRep = QtGui.QPushButton(self.tab_2) - self.buttonAddRep.setObjectName("buttonAddRep") - self.gridlayout1.addWidget(self.buttonAddRep,1,4,1,1) - - self.buttonEditRep = QtGui.QPushButton(self.tab_2) - self.buttonEditRep.setObjectName("buttonEditRep") - self.gridlayout1.addWidget(self.buttonEditRep,1,5,1,1) - - self.buttonDeleteRep = QtGui.QPushButton(self.tab_2) - self.buttonDeleteRep.setObjectName("buttonDeleteRep") - self.gridlayout1.addWidget(self.buttonDeleteRep,1,6,1,1) - self.tabWidget.addTab(self.tab_2,"") - self.gridlayout.addWidget(self.tabWidget,0,0,1,1) - - self.hboxlayout2 = QtGui.QHBoxLayout() - self.hboxlayout2.setObjectName("hboxlayout2") - self.label_3 = QtGui.QLabel(QgsPluginInstallerDialogBase) self.label_3.setObjectName("label_3") - self.hboxlayout2.addWidget(self.label_3) - + self.hboxlayout.addWidget(self.label_3) self.buttonClose = QtGui.QPushButton(QgsPluginInstallerDialogBase) - - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.buttonClose.sizePolicy().hasHeightForWidth()) self.buttonClose.setSizePolicy(sizePolicy) self.buttonClose.setObjectName("buttonClose") - self.hboxlayout2.addWidget(self.buttonClose) - self.gridlayout.addLayout(self.hboxlayout2,1,0,1,1) + self.hboxlayout.addWidget(self.buttonClose) + self.gridlayout.addLayout(self.hboxlayout, 1, 0, 1, 1) + self.tabWidget = QtGui.QTabWidget(QgsPluginInstallerDialogBase) + self.tabWidget.setObjectName("tabWidget") + self.tab = QtGui.QWidget() + self.tab.setObjectName("tab") + self.vboxlayout = QtGui.QVBoxLayout(self.tab) + self.vboxlayout.setObjectName("vboxlayout") + self.hboxlayout1 = QtGui.QHBoxLayout() + self.hboxlayout1.setObjectName("hboxlayout1") + self.label_5 = QtGui.QLabel(self.tab) + self.label_5.setEnabled(True) + self.label_5.setObjectName("label_5") + self.hboxlayout1.addWidget(self.label_5) + self.lineFilter = QtGui.QLineEdit(self.tab) + self.lineFilter.setEnabled(True) + self.lineFilter.setObjectName("lineFilter") + self.hboxlayout1.addWidget(self.lineFilter) + self.comboFilter1 = QtGui.QComboBox(self.tab) + self.comboFilter1.setEnabled(True) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboFilter1.sizePolicy().hasHeightForWidth()) + self.comboFilter1.setSizePolicy(sizePolicy) + self.comboFilter1.setObjectName("comboFilter1") + self.comboFilter1.addItem(QtCore.QString()) + self.hboxlayout1.addWidget(self.comboFilter1) + self.comboFilter2 = QtGui.QComboBox(self.tab) + self.comboFilter2.setEnabled(True) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.comboFilter2.sizePolicy().hasHeightForWidth()) + self.comboFilter2.setSizePolicy(sizePolicy) + self.comboFilter2.setObjectName("comboFilter2") + self.hboxlayout1.addWidget(self.comboFilter2) + self.vboxlayout.addLayout(self.hboxlayout1) + self.treePlugins = QtGui.QTreeWidget(self.tab) + self.treePlugins.setAlternatingRowColors(True) + self.treePlugins.setRootIsDecorated(False) + self.treePlugins.setItemsExpandable(False) + self.treePlugins.setAllColumnsShowFocus(True) + self.treePlugins.setObjectName("treePlugins") + self.vboxlayout.addWidget(self.treePlugins) + self.hboxlayout2 = QtGui.QHBoxLayout() + self.hboxlayout2.setObjectName("hboxlayout2") + spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.hboxlayout2.addItem(spacerItem) + self.buttonInstall = QtGui.QPushButton(self.tab) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.buttonInstall.sizePolicy().hasHeightForWidth()) + self.buttonInstall.setSizePolicy(sizePolicy) + self.buttonInstall.setMinimumSize(QtCore.QSize(160, 0)) + self.buttonInstall.setObjectName("buttonInstall") + self.hboxlayout2.addWidget(self.buttonInstall) + self.buttonUninstall = QtGui.QPushButton(self.tab) + self.buttonUninstall.setEnabled(True) + self.buttonUninstall.setObjectName("buttonUninstall") + self.hboxlayout2.addWidget(self.buttonUninstall) + self.vboxlayout.addLayout(self.hboxlayout2) + self.tabWidget.addTab(self.tab, "") + self.tab_2 = QtGui.QWidget() + self.tab_2.setObjectName("tab_2") + self.gridlayout1 = QtGui.QGridLayout(self.tab_2) + self.gridlayout1.setObjectName("gridlayout1") + self.treeRepositories = QtGui.QTreeWidget(self.tab_2) + self.treeRepositories.setRootIsDecorated(False) + self.treeRepositories.setItemsExpandable(False) + self.treeRepositories.setObjectName("treeRepositories") + self.gridlayout1.addWidget(self.treeRepositories, 0, 0, 1, 7) + spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) + self.gridlayout1.addItem(spacerItem1, 1, 1, 1, 1) + self.buttonFetchRepositories = QtGui.QPushButton(self.tab_2) + self.buttonFetchRepositories.setEnabled(True) + self.buttonFetchRepositories.setObjectName("buttonFetchRepositories") + self.gridlayout1.addWidget(self.buttonFetchRepositories, 1, 2, 1, 1) + spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridlayout1.addItem(spacerItem2, 1, 3, 1, 1) + self.buttonAddRep = QtGui.QPushButton(self.tab_2) + self.buttonAddRep.setObjectName("buttonAddRep") + self.gridlayout1.addWidget(self.buttonAddRep, 1, 4, 1, 1) + self.buttonEditRep = QtGui.QPushButton(self.tab_2) + self.buttonEditRep.setObjectName("buttonEditRep") + self.gridlayout1.addWidget(self.buttonEditRep, 1, 5, 1, 1) + self.buttonDeleteRep = QtGui.QPushButton(self.tab_2) + self.buttonDeleteRep.setObjectName("buttonDeleteRep") + self.gridlayout1.addWidget(self.buttonDeleteRep, 1, 6, 1, 1) + self.tabWidget.addTab(self.tab_2, "") + self.tab_3 = QtGui.QWidget() + self.tab_3.setObjectName("tab_3") + self.verticalLayout = QtGui.QVBoxLayout(self.tab_3) + self.verticalLayout.setObjectName("verticalLayout") + self.checkUpdates = QtGui.QGroupBox(self.tab_3) + self.checkUpdates.setEnabled(True) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.checkUpdates.sizePolicy().hasHeightForWidth()) + self.checkUpdates.setSizePolicy(sizePolicy) + self.checkUpdates.setCheckable(True) + self.checkUpdates.setChecked(False) + self.checkUpdates.setObjectName("checkUpdates") + self.gridLayout = QtGui.QGridLayout(self.checkUpdates) + self.gridLayout.setObjectName("gridLayout") + self.comboInterval = QtGui.QComboBox(self.checkUpdates) + self.comboInterval.setObjectName("comboInterval") + self.comboInterval.addItem(QtCore.QString()) + self.comboInterval.addItem(QtCore.QString()) + self.comboInterval.addItem(QtCore.QString()) + self.comboInterval.addItem(QtCore.QString()) + self.comboInterval.addItem(QtCore.QString()) + self.comboInterval.addItem(QtCore.QString()) + self.gridLayout.addWidget(self.comboInterval, 0, 0, 1, 1) + spacerItem3 = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + self.gridLayout.addItem(spacerItem3, 2, 0, 1, 1) + self.label = QtGui.QLabel(self.checkUpdates) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) + self.label.setSizePolicy(sizePolicy) + self.label.setWordWrap(True) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 1, 0, 1, 1) + self.verticalLayout.addWidget(self.checkUpdates) + self.groupBox_2 = QtGui.QGroupBox(self.tab_3) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth()) + self.groupBox_2.setSizePolicy(sizePolicy) + self.groupBox_2.setObjectName("groupBox_2") + self.gridLayout_2 = QtGui.QGridLayout(self.groupBox_2) + self.gridLayout_2.setObjectName("gridLayout_2") + self.radioPluginType0 = QtGui.QRadioButton(self.groupBox_2) + self.radioPluginType0.setEnabled(False) + self.radioPluginType0.setChecked(True) + self.radioPluginType0.setObjectName("radioPluginType0") + self.gridLayout_2.addWidget(self.radioPluginType0, 0, 0, 1, 1) + self.radioPluginType1 = QtGui.QRadioButton(self.groupBox_2) + self.radioPluginType1.setEnabled(False) + self.radioPluginType1.setChecked(False) + self.radioPluginType1.setObjectName("radioPluginType1") + self.gridLayout_2.addWidget(self.radioPluginType1, 1, 0, 1, 1) + self.radioPluginType2 = QtGui.QRadioButton(self.groupBox_2) + self.radioPluginType2.setEnabled(False) + self.radioPluginType2.setObjectName("radioPluginType2") + self.gridLayout_2.addWidget(self.radioPluginType2, 2, 0, 1, 1) + self.label_2 = QtGui.QLabel(self.groupBox_2) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) + self.label_2.setSizePolicy(sizePolicy) + self.label_2.setMinimumSize(QtCore.QSize(0, 75)) + self.label_2.setTextFormat(QtCore.Qt.RichText) + self.label_2.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) + self.label_2.setWordWrap(True) + self.label_2.setObjectName("label_2") + self.gridLayout_2.addWidget(self.label_2, 3, 0, 1, 1) + self.verticalLayout.addWidget(self.groupBox_2) + self.tabWidget.addTab(self.tab_3, "") + self.gridlayout.addWidget(self.tabWidget, 0, 0, 1, 1) self.retranslateUi(QgsPluginInstallerDialogBase) self.tabWidget.setCurrentIndex(0) - QtCore.QObject.connect(self.buttonClose,QtCore.SIGNAL("released()"),QgsPluginInstallerDialogBase.close) + QtCore.QObject.connect(self.buttonClose, QtCore.SIGNAL("released()"), QgsPluginInstallerDialogBase.close) QtCore.QMetaObject.connectSlotsByName(QgsPluginInstallerDialogBase) - QgsPluginInstallerDialogBase.setTabOrder(self.tabWidget,self.lineFilter) - QgsPluginInstallerDialogBase.setTabOrder(self.lineFilter,self.comboFilter1) - QgsPluginInstallerDialogBase.setTabOrder(self.comboFilter1,self.comboFilter2) - QgsPluginInstallerDialogBase.setTabOrder(self.comboFilter2,self.treePlugins) - QgsPluginInstallerDialogBase.setTabOrder(self.treePlugins,self.buttonInstall) - QgsPluginInstallerDialogBase.setTabOrder(self.buttonInstall,self.buttonUninstall) - QgsPluginInstallerDialogBase.setTabOrder(self.buttonUninstall,self.buttonClose) - QgsPluginInstallerDialogBase.setTabOrder(self.buttonClose,self.treeRepositories) - QgsPluginInstallerDialogBase.setTabOrder(self.treeRepositories,self.buttonFetchRepositories) - QgsPluginInstallerDialogBase.setTabOrder(self.buttonFetchRepositories,self.checkUpdates) - QgsPluginInstallerDialogBase.setTabOrder(self.checkUpdates,self.buttonAddRep) - QgsPluginInstallerDialogBase.setTabOrder(self.buttonAddRep,self.buttonEditRep) - QgsPluginInstallerDialogBase.setTabOrder(self.buttonEditRep,self.buttonDeleteRep) + QgsPluginInstallerDialogBase.setTabOrder(self.tabWidget, self.lineFilter) + QgsPluginInstallerDialogBase.setTabOrder(self.lineFilter, self.comboFilter1) + QgsPluginInstallerDialogBase.setTabOrder(self.comboFilter1, self.comboFilter2) + QgsPluginInstallerDialogBase.setTabOrder(self.comboFilter2, self.treePlugins) + QgsPluginInstallerDialogBase.setTabOrder(self.treePlugins, self.buttonInstall) + QgsPluginInstallerDialogBase.setTabOrder(self.buttonInstall, self.buttonUninstall) + QgsPluginInstallerDialogBase.setTabOrder(self.buttonUninstall, self.buttonClose) + QgsPluginInstallerDialogBase.setTabOrder(self.buttonClose, self.treeRepositories) + QgsPluginInstallerDialogBase.setTabOrder(self.treeRepositories, self.buttonFetchRepositories) + QgsPluginInstallerDialogBase.setTabOrder(self.buttonFetchRepositories, self.buttonAddRep) + QgsPluginInstallerDialogBase.setTabOrder(self.buttonAddRep, self.buttonEditRep) + QgsPluginInstallerDialogBase.setTabOrder(self.buttonEditRep, self.buttonDeleteRep) + QgsPluginInstallerDialogBase.setTabOrder(self.buttonDeleteRep, self.checkUpdates) + QgsPluginInstallerDialogBase.setTabOrder(self.checkUpdates, self.comboInterval) + QgsPluginInstallerDialogBase.setTabOrder(self.comboInterval, self.radioPluginType0) + QgsPluginInstallerDialogBase.setTabOrder(self.radioPluginType0, self.radioPluginType1) + QgsPluginInstallerDialogBase.setTabOrder(self.radioPluginType1, self.radioPluginType2) def retranslateUi(self, QgsPluginInstallerDialogBase): QgsPluginInstallerDialogBase.setWindowTitle(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "QGIS Python Plugin Installer", None, QtGui.QApplication.UnicodeUTF8)) QgsPluginInstallerDialogBase.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "QGIS Python Plugin Installer", None, QtGui.QApplication.UnicodeUTF8)) + self.label_3.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "The plugins will be installed to ~/.qgis/python/plugins", None, QtGui.QApplication.UnicodeUTF8)) + self.buttonClose.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close the Installer window", None, QtGui.QApplication.UnicodeUTF8)) + self.buttonClose.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close the Installer window", None, QtGui.QApplication.UnicodeUTF8)) + self.buttonClose.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Filter:", None, QtGui.QApplication.UnicodeUTF8)) self.lineFilter.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins containing this word in their metadata", None, QtGui.QApplication.UnicodeUTF8)) self.lineFilter.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins containing this word in their metadata", None, QtGui.QApplication.UnicodeUTF8)) self.comboFilter1.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins from given repository", None, QtGui.QApplication.UnicodeUTF8)) self.comboFilter1.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins from given repository", None, QtGui.QApplication.UnicodeUTF8)) - self.comboFilter1.addItem(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "all repositories", None, QtGui.QApplication.UnicodeUTF8)) + self.comboFilter1.setItemText(0, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "all repositories", None, QtGui.QApplication.UnicodeUTF8)) self.comboFilter2.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins with matching status", None, QtGui.QApplication.UnicodeUTF8)) self.comboFilter2.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Display only plugins with matching status", None, QtGui.QApplication.UnicodeUTF8)) - self.treePlugins.headerItem().setText(0,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Status", None, QtGui.QApplication.UnicodeUTF8)) - self.treePlugins.headerItem().setText(1,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Name", None, QtGui.QApplication.UnicodeUTF8)) - self.treePlugins.headerItem().setText(2,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Version", None, QtGui.QApplication.UnicodeUTF8)) - self.treePlugins.headerItem().setText(3,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Description", None, QtGui.QApplication.UnicodeUTF8)) - self.treePlugins.headerItem().setText(4,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Author", None, QtGui.QApplication.UnicodeUTF8)) - self.treePlugins.headerItem().setText(5,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Repository", None, QtGui.QApplication.UnicodeUTF8)) + self.treePlugins.setSortingEnabled(True) + self.treePlugins.headerItem().setText(0, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Status", None, QtGui.QApplication.UnicodeUTF8)) + self.treePlugins.headerItem().setText(1, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Name", None, QtGui.QApplication.UnicodeUTF8)) + self.treePlugins.headerItem().setText(2, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Version", None, QtGui.QApplication.UnicodeUTF8)) + self.treePlugins.headerItem().setText(3, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Description", None, QtGui.QApplication.UnicodeUTF8)) + self.treePlugins.headerItem().setText(4, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Author", None, QtGui.QApplication.UnicodeUTF8)) + self.treePlugins.headerItem().setText(5, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Repository", None, QtGui.QApplication.UnicodeUTF8)) self.buttonInstall.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Install, reinstall or upgrade the selected plugin", None, QtGui.QApplication.UnicodeUTF8)) self.buttonInstall.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Install, reinstall or upgrade the selected plugin", None, QtGui.QApplication.UnicodeUTF8)) self.buttonInstall.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Install/upgrade plugin", None, QtGui.QApplication.UnicodeUTF8)) @@ -197,13 +248,10 @@ class Ui_QgsPluginInstallerDialogBase(object): self.buttonUninstall.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Uninstall the selected plugin", None, QtGui.QApplication.UnicodeUTF8)) self.buttonUninstall.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Uninstall plugin", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Plugins", None, QtGui.QApplication.UnicodeUTF8)) - self.tabWidget.setTabToolTip(self.tabWidget.indexOf(self.tab),QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "List of available and installed plugins", None, QtGui.QApplication.UnicodeUTF8)) - self.treeRepositories.headerItem().setText(0,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Status", None, QtGui.QApplication.UnicodeUTF8)) - self.treeRepositories.headerItem().setText(1,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Name", None, QtGui.QApplication.UnicodeUTF8)) - self.treeRepositories.headerItem().setText(2,QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "URL", None, QtGui.QApplication.UnicodeUTF8)) - self.checkUpdates.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Allow the Installer to look for updates and news in enabled repositories on QGIS startup", None, QtGui.QApplication.UnicodeUTF8)) - self.checkUpdates.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Allow the Installer to look for updates and news in enabled repositories on QGIS startup", None, QtGui.QApplication.UnicodeUTF8)) - self.checkUpdates.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Check for updates on startup", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidget.setTabToolTip(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "List of available and installed plugins", None, QtGui.QApplication.UnicodeUTF8)) + self.treeRepositories.headerItem().setText(0, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Status", None, QtGui.QApplication.UnicodeUTF8)) + self.treeRepositories.headerItem().setText(1, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Name", None, QtGui.QApplication.UnicodeUTF8)) + self.treeRepositories.headerItem().setText(2, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "URL", None, QtGui.QApplication.UnicodeUTF8)) self.buttonFetchRepositories.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add third party plugin repositories to the list", None, QtGui.QApplication.UnicodeUTF8)) self.buttonFetchRepositories.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add third party plugin repositories to the list", None, QtGui.QApplication.UnicodeUTF8)) self.buttonFetchRepositories.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Add 3rd party repositories", None, QtGui.QApplication.UnicodeUTF8)) @@ -217,10 +265,29 @@ class Ui_QgsPluginInstallerDialogBase(object): self.buttonDeleteRep.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Remove the selected repository", None, QtGui.QApplication.UnicodeUTF8)) self.buttonDeleteRep.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Delete", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Repositories", None, QtGui.QApplication.UnicodeUTF8)) - self.tabWidget.setTabToolTip(self.tabWidget.indexOf(self.tab_2),QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "List of plugin repositories", None, QtGui.QApplication.UnicodeUTF8)) - self.label_3.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "The plugins will be installed to ~/.qgis/python/plugins", None, QtGui.QApplication.UnicodeUTF8)) - self.buttonClose.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close the Installer window", None, QtGui.QApplication.UnicodeUTF8)) - self.buttonClose.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close the Installer window", None, QtGui.QApplication.UnicodeUTF8)) - self.buttonClose.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Close", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidget.setTabToolTip(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "List of plugin repositories", None, QtGui.QApplication.UnicodeUTF8)) + self.checkUpdates.setTitle(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Check for updates on startup", None, QtGui.QApplication.UnicodeUTF8)) + self.comboInterval.setItemText(0, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "every time QGIS starts", None, QtGui.QApplication.UnicodeUTF8)) + self.comboInterval.setItemText(1, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "once a day", None, QtGui.QApplication.UnicodeUTF8)) + self.comboInterval.setItemText(2, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "every 3 days", None, QtGui.QApplication.UnicodeUTF8)) + self.comboInterval.setItemText(3, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "every week", None, QtGui.QApplication.UnicodeUTF8)) + self.comboInterval.setItemText(4, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "every 2 weeks", None, QtGui.QApplication.UnicodeUTF8)) + self.comboInterval.setItemText(5, QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "every month", None, QtGui.QApplication.UnicodeUTF8)) + self.label.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "\n" +"
\n" +"Note: If this function is enabled, Quantum GIS will inform you whenever a new plugin or plugin update is available. Otherwise, fetching repositories will be performed during opening of the Plugin Installer window.
", None, QtGui.QApplication.UnicodeUTF8)) + self.groupBox_2.setTitle(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Allowed plugins", None, QtGui.QApplication.UnicodeUTF8)) + self.radioPluginType0.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Only show plugins from the official repository", None, QtGui.QApplication.UnicodeUTF8)) + self.radioPluginType1.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Show all plugins except those marked as experimental", None, QtGui.QApplication.UnicodeUTF8)) + self.radioPluginType2.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Show all plugins, even those marked as experimental", None, QtGui.QApplication.UnicodeUTF8)) + self.label_2.setText(QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "\n" +"\n" +"Note: Experimental plugins are generally unsuitable for production use. These plugins are in early stages of development, and should be considered \'incomplete\' or \'proof of concept\' tools. QGIS does not recommend installing these plugins unless you intend to use them for testing purposes.
", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Options", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidget.setTabToolTip(self.tabWidget.indexOf(self.tab_3), QtGui.QApplication.translate("QgsPluginInstallerDialogBase", "Configuration of the plugin installer", None, QtGui.QApplication.UnicodeUTF8)) import resources_rc diff --git a/python/plugins/plugin_installer/qgsplugininstallerbase.ui b/python/plugins/plugin_installer/qgsplugininstallerbase.ui index 5bcb8573f80..a8ec044b8c7 100644 --- a/python/plugins/plugin_installer/qgsplugininstallerbase.ui +++ b/python/plugins/plugin_installer/qgsplugininstallerbase.ui @@ -6,20 +6,54 @@