Skip to content

Commit 059cbee

Browse files
author
timlinux
committedOct 31, 2008
Plugin installer updates from Borys
git-svn-id: http://svn.osgeo.org/qgis/trunk@9558 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 31725ec commit 059cbee

File tree

12 files changed

+281
-177
lines changed

12 files changed

+281
-177
lines changed
 
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
#TODO: Need to configure cmake to run pyrcc4 and pyuic4 as required when the resource
22
# file or the ui change
33
SET(INSTALLER_FILES
4-
fetchingbase.py
4+
fetchingbase.py
55
fetchingbase.ui
6-
guibase.py
7-
guibase.ui
6+
guibase.py
7+
guibase.ui
88
__init__.py
9-
installer_data.py
10-
installer_gui.py
9+
installer_data.py
10+
installer_gui.py
1111
installer_plugin.py
12-
installingbase.py
13-
installingbase.ui
14-
pluginerrorbase.py
15-
pluginerrorbase.ui
16-
plugin_installer.png
17-
PluginInstaller.png
18-
qgis-icon.png
19-
repoConnected.png
12+
installingbase.py
13+
installingbase.ui
14+
pluginerrorbase.py
15+
pluginerrorbase.ui
16+
plugin_installer.png
17+
qgis-icon.png
18+
repoConnected.png
2019
repoDisabled.png
21-
repositorybase.py
22-
repositorybase.ui
20+
repositorybase.py
21+
repositorybase.ui
2322
repoUnavailable.png
24-
resources_rc.py
25-
unzip.py
23+
resources.qrc
24+
resources_rc.py
25+
unzip.py
2626
)
2727
INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/plugin_installer)

‎python/plugins/plugin_installer/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (C) 2008 Matthew Perry
2+
Copyright (C) 2007-2008 Matthew Perry
33
Copyright (C) 2008 Borys Jurgiel
44
/***************************************************************************
55
* *
@@ -20,7 +20,7 @@ def author_name():
2020
return "perrygeo, borysiasty"
2121

2222
def version():
23-
return "Version 0.06.2"
23+
return "Version 0.07.2"
2424

2525
def classFactory(iface):
2626
from installer_plugin import InstallerPlugin

‎python/plugins/plugin_installer/guibase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def setupUi(self, QgsPluginInstallerDialog):
175175

176176
def retranslateUi(self, QgsPluginInstallerDialog):
177177
QgsPluginInstallerDialog.setWindowTitle(QtGui.QApplication.translate("QgsPluginInstallerDialog", "QGIS Python Plugin Installer", None, QtGui.QApplication.UnicodeUTF8))
178-
QgsPluginInstallerDialog.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialog", "QGIS Plugin Installer", None, QtGui.QApplication.UnicodeUTF8))
178+
QgsPluginInstallerDialog.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialog", "QGIS Python Plugin Installer", None, QtGui.QApplication.UnicodeUTF8))
179179
self.label_5.setText(QtGui.QApplication.translate("QgsPluginInstallerDialog", "Filter:", None, QtGui.QApplication.UnicodeUTF8))
180180
self.lineFilter.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerDialog", "Display only plugins containing this word in their metadata", None, QtGui.QApplication.UnicodeUTF8))
181181
self.lineFilter.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerDialog", "Display only plugins containing this word in their metadata", None, QtGui.QApplication.UnicodeUTF8))

‎python/plugins/plugin_installer/guibase.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
1818
</property>
1919
<property name="whatsThis" >
20-
<string>QGIS Plugin Installer</string>
20+
<string>QGIS Python Plugin Installer</string>
2121
</property>
2222
<layout class="QGridLayout" >
2323
<item row="0" column="0" >

‎python/plugins/plugin_installer/installer_data.py

Lines changed: 111 additions & 47 deletions
Large diffs are not rendered by default.

‎python/plugins/plugin_installer/installer_gui.py

Lines changed: 61 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
"""
3-
Copyright (C) 2008 Matthew Perry
2+
""" "
3+
Copyright (C) 2007-2008 Matthew Perry
44
Copyright (C) 2008 Borys Jurgiel
55
66
/***************************************************************************
@@ -11,7 +11,15 @@
1111
* (at your option) any later version. *
1212
* *
1313
***************************************************************************/
14-
"""
14+
15+
This file contains some additional quote marks (for example in the lines 2 and 20), they are
16+
for compatibility with lupdate, which doesn't properly recognize the comments in Python.
17+
The use of lupdate instead of pylupdate is forced by integration with rest of QGIS files,
18+
which are written mainly in C++. After editing this file make sure that lupdate and pylupdate
19+
find the same number of strings and balance the quotemarks if doesn't.
20+
" """
21+
22+
1523
from PyQt4.QtCore import *
1624
from PyQt4.QtGui import *
1725
from qgis.core import QgsApplication, QgsContextHelp
@@ -30,7 +38,7 @@ def removeDir(path):
3038
result = QString()
3139
if not QFile(path).exists():
3240
result = QCoreApplication.translate("QgsPluginInstaller","Plugin directory doesn't exist: ") + path
33-
elif QFile(path).remove(): # if it's only link, just remove it without resolving.
41+
elif QFile(path).remove(): # if it is only link, just remove it without resolving.
3442
#print " Link removing successfull: %s" % path
3543
pass
3644
else:
@@ -62,6 +70,9 @@ def removeDir(path):
6270

6371

6472
# --- class QgsPluginInstallerFetchingDialog --------------------------------------------------------------- #
73+
""" " C++ style header for compability with lupdate
74+
QgsPluginInstallerFetchingDialog::foo(){
75+
" """
6576
class QgsPluginInstallerFetchingDialog(QDialog, Ui_QgsPluginInstallerFetchingDialog):
6677
# ----------------------------------------- #
6778
def __init__(self, parent):
@@ -86,7 +97,7 @@ def __init__(self, parent):
8697

8798
# ----------------------------------------- #
8899
def displayState(self,key,state,state2=None):
89-
messages=[self.tr("Done"),self.tr("Resolving host name..."),self.tr("Connecting..."),self.tr("Host connected. Sending request..."),self.tr("Downloading data..."),self.tr("Idle"),self.tr("Closing connection..."),self.tr("Error")]
100+
messages=[self.tr("Success"),self.tr("Resolving host name..."),self.tr("Connecting..."),self.tr("Host connected. Sending request..."),self.tr("Downloading data..."),self.tr("Idle"),self.tr("Closing connection..."),self.tr("Error")]
90101
message = messages[state]
91102
if state2:
92103
message += " (%s%%)" % state2
@@ -107,13 +118,17 @@ def repositoryFetched(self, repoName):
107118
self.displayState(repoName,7)
108119
if not repositories.fetchingInProgress():
109120
self.close()
121+
# } - C++ style footer for compability with lupdate
110122
# --- /class QgsPluginInstallerFetchingDialog -------------------------------------------------------------- #
111123

112124

113125

114126

115127

116128
# --- class QgsPluginInstallerRepositoryDialog ------------------------------------------------------------- #
129+
""" " C++ style header for compability with lupdate
130+
QgsPluginInstallerRepositoryDialog::foo(){
131+
" """
117132
class QgsPluginInstallerRepositoryDialog(QDialog, Ui_QgsPluginInstallerRepositoryDetailsDialog):
118133
# ----------------------------------------- #
119134
def __init__(self, parent=None):
@@ -128,13 +143,17 @@ def __init__(self, parent=None):
128143
def textChanged(self, string):
129144
enable = (self.editName.text().count() > 0 and self.editURL.text().count() > 0)
130145
self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
146+
# } - C++ style footer for compability with lupdate
131147
# --- /class QgsPluginInstallerRepositoryDialog ------------------------------------------------------------ #
132148

133149

134150

135151

136152

137153
# --- class QgsPluginInstallerInstallingDialog --------------------------------------------------------------- #
154+
""" " C++ style header for compability with lupdate
155+
QgsPluginInstallerInstallingDialog::foo(){
156+
" """
138157
class QgsPluginInstallerInstallingDialog(QDialog, Ui_QgsPluginInstallerInstallingDialog):
139158
# ----------------------------------------- #
140159
def __init__(self, parent, plugin):
@@ -148,13 +167,13 @@ def __init__(self, parent, plugin):
148167
self.connect(self.buttonBox, SIGNAL("clicked(QAbstractButton*)"), self.abort)
149168

150169
url = QUrl(plugin["url"])
151-
path = QString(url.toPercentEncoding(url.path(), "!$&'()*+,;=:@/"))
170+
path = QString(url.toPercentEncoding(url.path(), "!$&'()*+,;=:/@"))
152171
fileName = plugin["filename"]
153172
#print "Retrieving from %s" % path
154173
tmpDir = QDir.tempPath()
155174
tmpPath = QDir.cleanPath(tmpDir+"/"+fileName)
156175
self.file = QFile(tmpPath)
157-
self.http = QHttp(url.host())
176+
self.http = QPHttp(url.host())
158177
self.connect(self.http, SIGNAL("stateChanged ( int )"), self.stateChanged)
159178
self.connect(self.http, SIGNAL("dataReadProgress ( int , int )"), self.readProgress)
160179
self.connect(self.http, SIGNAL("requestFinished (int, bool)"), self.requestFinished)
@@ -195,6 +214,10 @@ def requestFinished(self, requestId, state):
195214
# make sure that the parent directory exists
196215
if not QDir(pluginDir).exists():
197216
QDir().mkpath(pluginDir)
217+
218+
# if the target directory already exists as a link, remove the link without resolving:
219+
QFile(pluginDir+QString(QDir.separator())+self.plugin["localdir"]).remove()
220+
198221
#print "Extracting to plugin directory (%s)" % pluginDir
199222
try:
200223
un = unzip()
@@ -221,28 +244,37 @@ def abort(self):
221244
self.http.abort()
222245
self.mResult = self.tr("Aborted by user")
223246
self.reject()
247+
# } - C++ style footer for compability with lupdate
224248
# --- /class QgsPluginInstallerPluginErrorDialog ------------------------------------------------------------- #
225249

226250

227251

228252

229253

230254
# --- class QgsPluginInstallerPluginErrorDialog -------------------------------------------------------------- #
255+
""" " C++ style header for compability with lupdate
256+
QgsPluginInstallerPluginErrorDialog::foo(){
257+
" """
231258
class QgsPluginInstallerPluginErrorDialog(QDialog, Ui_QgsPluginInstallerPluginErrorDialog):
232259
# ----------------------------------------- #
233260
def __init__(self, parent, errorMessage):
234261
QDialog.__init__(self, parent)
235262
self.setupUi(self)
236263
if not errorMessage:
237-
errorMessage = self.tr("No error message received. Try to restart QGIS and ensure the plugin isn't installed under different name. If it is, contact the plugin author and submit this issue, please.")
264+
errorMessage = self.tr("No error message received. Try to restart QGIS and ensure the plugin isn't installed under a different name. If it is, contact the plugin author and submit this issue, please.")
238265
self.textBrowser.setText(errorMessage)
266+
# } - C++ style footer for compability with lupdate
239267
# --- /class QgsPluginInstallerPluginErrorDialog ------------------------------------------------------------- #
240268

241269

242270

243271

244272

273+
245274
# --- class QgsPluginInstallerDialog ------------------------------------------------------------------------- #
275+
""" " C++ style header for compability with lupdate
276+
QgsPluginInstallerDialog::foo(){
277+
" """
246278
class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialog):
247279
# ----------------------------------------- #
248280
def __init__(self, parent, fl):
@@ -296,6 +328,8 @@ def getAllAvailablePlugins(self):
296328
for key in repositories.allUnavailable():
297329
QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Error reading repository: ") + key + "\n" + repositories.all()[key]["error"])
298330

331+
plugins.getAllInstalled()
332+
299333

300334
# ----------------------------------------- #
301335
def populateMostWidgets(self):
@@ -331,8 +365,8 @@ def populateMostWidgets(self):
331365
# filling the status filter comboBox
332366
self.comboFilter2.clear()
333367
self.comboFilter2.addItem(self.tr("any status"))
334-
self.comboFilter2.addItem(self.tr("not installed"))
335-
self.comboFilter2.addItem(self.tr("installed"))
368+
self.comboFilter2.addItem(self.tr("not installed", "plural"))
369+
self.comboFilter2.addItem(self.tr("installed", "plural"))
336370
if plugins.isThereAnythingNew():
337371
self.comboFilter2.addItem(self.tr("upgradeable and news"))
338372

@@ -376,22 +410,22 @@ def populatePluginTree(self):
376410
"installed" : self.tr("This plugin is installed"),
377411
"upgradeable" : self.tr("This plugin is installed, but there is an updated version available"),
378412
"orphan" : self.tr("This plugin is installed, but I can't find it in any enabled repository"),
379-
"new" : self.tr("This plugin is not installed and is seen first time"),
413+
"new" : self.tr("This plugin is not installed and is seen for the first time"),
380414
"newer" : self.tr("This plugin is installed and is newer than its version available in a repository"),
381415
"invalid" : self.tr("This plugin seems to be invalid or have unfulfilled dependencies\nIt has been installed, but can't be loaded")}
382-
status ={"not installed" : self.tr("not installed"),
383-
"installed" : self.tr("installed"),
384-
"upgradeable" : self.tr("upgradeable"),
385-
"orphan" : self.tr("installed"),
386-
"new" : self.tr("new!"),
387-
"newer" : self.tr("installed"),
388-
"invalid" : self.tr("invalid")}
416+
status ={"not installed" : self.tr("not installed", "singular"),
417+
"installed" : self.tr("installed", "singular"),
418+
"upgradeable" : self.tr("upgradeable", "singular"),
419+
"orphan" : self.tr("installed", "singular"),
420+
"new" : self.tr("new!", "singular"),
421+
"newer" : self.tr("installed", "singular"),
422+
"invalid" : self.tr("invalid", "singular")}
389423
order = ["invalid","upgradeable","new","not installed","installed","orphan","newer"]
390424
def addItem(p):
391425
if self.filterCheck(p):
392426
statusTip = descrip[p["status"]]
393427
if p["read-only"]:
394-
statusTip += "\n" + self.tr("Note that it's installed in the read-only location and you can't uninstall it")
428+
statusTip += "\n" + self.tr("Note that it's a core plugin and I can't uninstall it")
395429
if p["status"] == "upgradeable":
396430
ver = p["version_inst"] + " -> " + p["version_avail"]
397431
elif p["status"] == "newer":
@@ -405,15 +439,15 @@ def addItem(p):
405439
elif p["status"] in ["not installed", "new"]:
406440
vd = self.tr("available version") + ": " + p["version_avail"]
407441
elif p["status"] == "installed":
408-
vd = self.tr("installed version") + ": " + p["version_inst"] + "\n" + self.tr("That's the newest available version.")
442+
vd = self.tr("installed version") + ": " + p["version_inst"] + "\n" + self.tr("That's the newest available version")
409443
elif p["status"] == "orphan":
410-
vd = self.tr("installed version") + ": " + p["version_inst"] + "\n" + self.tr("There is no version available for download.")
444+
vd = self.tr("installed version") + ": " + p["version_inst"] + "\n" + self.tr("There is no version available for download")
411445
else:
412446
vd = ""
413447
if p["status"] == "invalid":
414448
p["desc_local"] = self.tr("This plugin seems to be invalid or have unfulfilled dependencies")
415449
p["desc_repo"] = self.tr("This plugin seems to be invalid or have unfulfilled dependencies\nIt has been installed, but can't be loaded")
416-
if p["status"] == "orphan":
450+
if not p["repository"]:
417451
repository = self.tr("only locally available")
418452
else:
419453
repository = p["repository"]
@@ -467,7 +501,7 @@ def treeClicked(self):
467501
""" the pluginsTree has been clicked """
468502
buttons={"not installed":(True,False,self.tr("Install plugin")),
469503
"installed":(True,True,self.tr("Reinstall plugin")),
470-
"upgradeable":(True,True,self.tr("Upgrade plugin",)),
504+
"upgradeable":(True,True,self.tr("Upgrade plugin")),
471505
"orphan":(False,True,self.tr("Install/upgrade plugin")),
472506
"new":(True, False,self.tr("Install plugin")),
473507
"newer":(True,True,self.tr("Downgrade plugin")),
@@ -528,11 +562,9 @@ def installPlugin(self):
528562
if result:
529563
QMessageBox.warning(self, self.tr("Plugin uninstall failed"), result)
530564
plugins.updatePlugin(key, False)
531-
self.populateMostWidgets()
532565
self.populatePluginTree()
533566
return
534567
plugins.updatePlugin(key, False)
535-
self.populateMostWidgets()
536568
self.populatePluginTree()
537569
QMessageBox.information(self, infoString[0], infoString[1])
538570

@@ -546,7 +578,6 @@ def uninstallPlugin(self):
546578
plugin = plugins.all()[key]
547579
if not plugin:
548580
return
549-
550581
warning = self.tr("Are you sure you want to uninstall the plugin ") + plugin["name"] + "?"
551582
if plugin["status"] == "orphan":
552583
warning += "\n\n"+self.tr("Warning: this plugin isn't available in any accessible repository!")
@@ -563,7 +594,7 @@ def uninstallPlugin(self):
563594
exec ("del sys.modules[%s]" % plugin["localdir"])
564595
except:
565596
pass
566-
if plugin["status"] == "orphan":
597+
if not plugin["repository"]:
567598
plugins.remove(key)
568599
else:
569600
plugins.setPluginData(key, "status", "not installed")
@@ -586,9 +617,8 @@ def ChangeCheckingPolicy(self,policy):
586617
def addKnownRepositories(self):
587618
""" update list of known repositories - in the future it will be replaced with an online fetching """
588619
#print "add known repositories"
589-
message = "You are going to add some plugin repositories neither authorized nor supported by the QGIS team, however provided by folks associated with us.\n"
590-
message += "Plugin authors generally make efforts to make their works useful and safe, but we can't assume any responsibility for them. FEEL WARNED!"
591-
if QMessageBox.question(self, self.tr("QGIS Python Plugin Installer"), self.tr(message), QMessageBox.Ok, QMessageBox.Abort) == QMessageBox.Ok:
620+
message = self.tr("You are going to add some plugin repositories neither authorized nor supported by the QGIS 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!")
621+
if QMessageBox.question(self, self.tr("QGIS Python Plugin Installer"), message, QMessageBox.Ok, QMessageBox.Abort) == QMessageBox.Ok:
592622
repositories.addKnownRepos()
593623
# refresh lists and populate widgets
594624
QApplication.setOverrideCursor(Qt.WaitCursor)
@@ -704,4 +734,5 @@ def reject(self):
704734
""" update the list of seen plugins before exit (both 'done' and 'x' buttons emit 'reject' signal) """
705735
plugins.updateSeenPluginsList()
706736
QDialog.reject(self)
737+
# } - C++ style footer for compability with lupdate
707738
# --- /class QgsPluginInstallerDialog ------------------------------------------------------------------------ #

‎python/plugins/plugin_installer/installer_plugin.py

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
"""
3-
Copyright (C) 2008 Matthew Perry
2+
""" "
3+
Copyright (C) 2007-2008 Matthew Perry
44
Copyright (C) 2008 Borys Jurgiel
55
66
/***************************************************************************
@@ -11,7 +11,15 @@
1111
* (at your option) any later version. *
1212
* *
1313
***************************************************************************/
14-
"""
14+
15+
This file contains some additional quote marks (for example in the lines 2 and 20), they are
16+
for compatibility with lupdate, which doesn't properly recognize the comments in Python.
17+
The use of lupdate instead of pylupdate is forced by integration with rest of QGIS files,
18+
which are written mainly in C++. After editing this file make sure that lupdate and pylupdate
19+
find the same number of strings and balance the quotemarks if doesn't.
20+
" """
21+
22+
1523
from PyQt4.QtCore import *
1624
from PyQt4.QtGui import *
1725
from qgis.core import *
@@ -20,34 +28,34 @@
2028
import resources_rc
2129

2230

23-
2431
class InstallerPlugin:
2532
# ----------------------------------------- #
2633
def __init__(self, iface):
2734
self.iface = iface
28-
if str(QGis.QGIS_VERSION)[0] == "0": # old plugin API
29-
self.mainWindow = self.iface.getMainWindow
30-
else: # new plugin API
35+
if QGIS_VER: # new plugin API
3136
self.mainWindow = self.iface.mainWindow
37+
else: # old plugin API
38+
self.mainWindow = self.iface.getMainWindow
3239

3340
# ----------------------------------------- #
3441
def initGui(self):
3542
""" create action that will start plugin window and then add it to menu """
36-
self.action = QAction(QIcon(":/plugins/installer/PluginInstaller.png"), QCoreApplication.translate("QgsPluginInstaller","Fetch Python Plugins..."), self.mainWindow())
43+
self.action = QAction(QIcon(":/plugins/installer/plugin_installer.png"), QCoreApplication.translate("QgsPluginInstaller","Fetch Python Plugins..."), self.mainWindow())
3744
self.action.setWhatsThis(QCoreApplication.translate("QgsPluginInstaller","Install more plugins from remote repositories"))
3845
self.action.setStatusTip(QCoreApplication.translate("QgsPluginInstaller","Install more plugins from remote repositories"))
39-
if str(QGis.QGIS_VERSION)[0] == "0":
46+
if QGIS_VER: # new plugin API
47+
nextAction = self.iface.actionManagePlugins()
48+
self.iface.pluginMenu().insertAction(nextAction,self.action)
49+
else: # old plugin API
4050
nextAction = self.mainWindow().menuBar().actions()[4].menu().actions()[1]
4151
self.mainWindow().menuBar().actions()[4].menu().insertAction(nextAction,self.action)
42-
else:
43-
nextAction = self.iface.actionManagePlugins() #actionPluginSeparator1()
44-
self.iface.pluginMenu().insertAction(nextAction,self.action)
4552
QObject.connect(self.action, SIGNAL("activated()"), self.run)
4653
self.statusLabel = None
4754

4855
repositories.load()
4956
plugins.clear()
50-
if repositories.checkingOnStart():
57+
58+
if repositories.checkingOnStart() and repositories.allEnabled():
5159
self.statusLabel = QLabel(QCoreApplication.translate("QgsPluginInstaller","Looking for new plugins..."), self.mainWindow().statusBar())
5260
self.mainWindow().statusBar().insertPermanentWidget(0,self.statusLabel)
5361
QObject.connect(self.statusLabel, SIGNAL("linkActivated (QString)"), self.run)
@@ -112,11 +120,13 @@ def run(self, * params):
112120

113121
QApplication.restoreOverrideCursor()
114122

115-
# display error messages for every unavailable reposioty, except the case if all repositories are unavailable!
123+
# display an error message for every unavailable reposioty, except the case if all repositories are unavailable!
116124
if repositories.allUnavailable() and repositories.allUnavailable() != repositories.allEnabled():
117125
for key in repositories.allUnavailable():
118126
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"]))
119127

128+
plugins.getAllInstalled()
129+
120130
flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint
121131
self.guiDlg = QgsPluginInstallerDialog(self.mainWindow(),flags)
122132
self.guiDlg.show()

‎python/plugins/plugin_installer/repositorybase.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Form implementation generated from reading ui file 'repositorybase.ui'
44
#
5-
# Created: Fri Sep 12 19:21:37 2008
5+
# Created: Wed Sep 17 14:22:09 2008
66
# by: PyQt4 UI code generator 4.3
77
#
88
# WARNING! All changes made in this file will be lost!
@@ -118,6 +118,5 @@ def retranslateUi(self, QgsPluginInstallerRepositoryDetailsDialog):
118118
self.checkBoxEnabled.setToolTip(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialog", "Enable or disable the repository (disabled repositories will be omitted)", None, QtGui.QApplication.UnicodeUTF8))
119119
self.checkBoxEnabled.setWhatsThis(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialog", "Enable or disable the repository (disabled repositories will be omitted)", None, QtGui.QApplication.UnicodeUTF8))
120120
self.checkBoxEnabled.setText(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialog", "Enabled", None, QtGui.QApplication.UnicodeUTF8))
121-
self.labelInfo.setText(QtGui.QApplication.translate("QgsPluginInstallerRepositoryDetailsDialog", "[place for a warning message]", None, QtGui.QApplication.UnicodeUTF8))
122121

123122
import resources_rc

‎python/plugins/plugin_installer/repositorybase.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
<enum>QFrame::NoFrame</enum>
188188
</property>
189189
<property name="text" >
190-
<string>[place for a warning message]</string>
190+
<string/>
191191
</property>
192192
</widget>
193193
</item>

‎python/plugins/plugin_installer/resources.qrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<RCC>
22
<qresource prefix="/plugins/installer">
3-
<file>PluginInstaller.png</file>
3+
<file>plugin_installer.png</file>
44
<file>qgis-icon.png</file>
55
<file>repoDisabled.png</file>
66
<file>repoUnavailable.png</file>

‎python/plugins/plugin_installer/resources_rc.py

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Resource object code
44
#
5-
# Created: pt. wrz 12 19:21:37 2008
5+
# Created: sob. wrz 13 00:34:16 2008
66
# by: The Resource Compiler for PyQt (Qt v4.3.2)
77
#
88
# WARNING! All changes made in this file will be lost!
@@ -162,58 +162,6 @@
162162
\xae\xad\x5d\xf1\x5c\xcf\x3f\x9c\xe8\xa1\xcd\x18\x70\x3e\x28\xa8\
163163
\x1e\x34\x9b\x57\xff\xfb\x3f\xc8\x9f\xa2\x63\x68\x95\x98\xd0\x55\
164164
\x56\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
165-
\x00\x00\x03\x11\
166-
\x89\
167-
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
168-
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
169-
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
170-
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x12\x00\x00\
171-
\x0b\x12\x01\xd2\xdd\x7e\xfc\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
172-
\xd4\x0c\x0e\x14\x29\x37\x87\x80\x5f\xe3\x00\x00\x02\x9e\x49\x44\
173-
\x41\x54\x78\xda\x95\x92\x5b\x48\x53\x01\x18\xc7\xff\x3b\x3b\xd3\
174-
\xb9\xa6\x39\x2f\x9b\x97\xb4\x24\x13\xa7\xb9\x12\xb1\xde\x7a\xb1\
175-
\x0c\xc4\x4c\x34\x08\xc5\x34\x8d\x0a\x0c\x34\x7b\x29\x84\x8c\x22\
176-
\x33\xd0\x61\x3d\x16\x51\x12\x2a\x09\xf9\x50\xa1\xf8\x30\x12\xba\
177-
\x4b\x37\x9b\x28\xa3\x79\x69\xa6\xa6\xe7\xec\xd2\xe6\xe6\x39\x67\
178-
\x3b\x97\x5e\x5a\x99\x5b\x50\xdf\xdb\xf7\x7d\xfc\x7f\x1f\xfc\xbf\
179-
\x3f\xf0\x1f\x15\x73\x1e\xd9\x9a\x2e\x3c\x24\x33\xb1\x3b\x38\x23\
180-
\xfe\x45\x18\xdd\x82\x54\x4d\x27\x6e\xcb\xb5\x98\x10\x56\x50\xc2\
181-
\x4f\x43\x0c\xee\xc8\x70\x82\x95\x95\x9e\x84\xd8\x58\xa9\x66\xca\
182-
\x32\xb9\x43\x4e\xb2\xfc\x3b\xdb\x1c\xd5\xd4\x3f\x5c\x44\xe8\x24\
183-
\x52\xa0\x41\x01\xb0\xff\xf5\x1a\xc3\xf4\x95\xf0\x82\xd1\xf1\x78\
184-
\xa4\xdc\xab\x89\x53\xd6\xd4\x9d\xd4\x1f\x7d\x69\xad\x10\x53\x8c\
185-
\xa4\xa4\x3e\x8e\x6f\x11\x7b\xf1\x02\x80\x3a\xac\x78\x75\xf5\x8e\
186-
\x21\x20\x5c\x63\xe6\x1c\xc7\xa4\xba\x53\xd9\x23\x00\x54\x64\x06\
187-
\x48\x7d\xa7\x7a\x5e\xd7\x46\x4a\xcd\x17\x0d\xd3\x91\x5a\x79\x01\
188-
\x00\x79\x58\x0f\x94\xca\xef\xed\x94\xcf\xaa\xf4\xad\x05\x30\x6b\
189-
\xf5\xbc\x01\xc0\xa8\x8e\xa0\x79\x59\xf4\xa6\x1d\x8a\xc8\x44\x7d\
190-
\x7d\xf6\xf6\xc6\x86\xbc\xfd\xc0\x6f\x0f\x7e\x01\x86\x86\xce\xa8\
191-
\x78\x19\x5d\xcc\x70\x7e\xf8\x39\x01\xd4\x0a\x63\x53\x37\x42\x4f\
192-
\xc4\xe3\x6a\x16\x95\xb0\x76\xba\x72\x27\xd4\xd1\x0a\xa4\x67\xa8\
193-
\xcb\x00\x44\x86\x00\x72\x73\xa5\x24\x2e\xe0\x89\x08\xf6\x7e\x41\
194-
\x08\xc8\x93\xd0\x23\xd2\x60\x0f\xeb\xf4\xc3\xc9\xc9\x9b\x00\x00\
195-
\x2a\x95\x3c\x05\x80\x2a\x04\x60\x36\x3b\xdd\x3c\x38\x09\x00\x08\
196-
\x42\x86\x2d\x45\x9a\x73\x07\xb2\xf3\x0a\x8b\xb8\x9c\xc1\xda\xea\
197-
\x82\x31\x99\x4c\x06\x00\xb0\xd3\x1c\x0b\x40\x0a\x01\x94\x95\x3d\
198-
\x70\xd9\x5d\xac\x19\x00\xa2\x54\x24\x0e\x1a\xb6\xe6\x47\x8c\x8a\
199-
\x96\xa6\xaa\x9c\xd2\xd8\x44\xf2\x0a\x2f\x8a\xe0\x38\x01\x1f\xde\
200-
\xd2\x13\x00\x7c\xe1\x4c\x14\x5f\x3f\xa7\xba\x58\x86\x07\x41\xc8\
201-
\x30\x69\x59\x72\xf6\xdf\x9a\xac\xcd\x48\x8f\xeb\x76\x31\x54\x94\
202-
\x3f\x20\xe0\xd5\xb3\xe5\x35\xd3\xf0\xc2\x3d\x00\xfe\x10\x00\xb9\
203-
\x0d\xc4\x59\xb3\x69\xa9\xf3\xd1\x47\x87\x9d\x66\x50\x55\x96\x45\
204-
\x1a\x76\x25\xba\xb5\xf1\x9a\x48\x00\x98\x9a\x70\x06\x6e\x5c\x37\
205-
\x1b\xdd\x6e\x6e\xb4\xa3\xa3\xea\xcf\x37\x46\x55\x42\xa1\x2c\x46\
206-
\xbb\x40\xa3\x77\xf0\xd3\xe7\xb8\x13\x97\x9f\x7e\x99\x18\x77\xcc\
207-
\xb4\xb6\xed\x19\x98\xb1\xb1\x0d\x82\x28\xc2\xeb\xe5\x7d\x4e\xbb\
208-
\xd0\xc7\xb2\x77\x5b\xd7\x58\x7b\x43\xb8\x1c\x29\x00\x68\x55\x15\
209-
\xb8\x1f\xb9\x0f\xdd\x3f\xd3\x96\xf6\xc4\x54\x7a\xc1\x4a\x55\x4b\
210-
\x56\xaa\x5a\x72\xf9\x5a\xfc\xbd\x03\xe5\x76\x85\x82\x28\x0c\x8a\
211-
\xe4\xeb\x3d\x00\xe0\x53\xe4\x63\x41\xa4\x01\x61\x11\x63\x00\x3c\
212-
\x8b\x5f\x99\x71\x8f\xdb\x9f\x6a\x9b\x5d\x8d\x19\x1c\xb4\xcc\xdf\
213-
\x34\xbe\xbf\xe4\x71\xfb\x4d\xeb\xc3\xb4\xb1\x08\xb9\x0e\x9b\x37\
214-
\xcc\x48\x00\x1a\x00\x31\x00\x64\xeb\x17\x3f\x00\x3d\x4b\x18\xbb\
215-
\x0e\x57\x7e\xbc\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
216-
\
217165
\x00\x00\x13\x3e\
218166
\x89\
219167
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -524,6 +472,58 @@
524472
\x2e\x17\x0c\xed\x7d\x65\xf2\x6f\x00\x36\x2d\x10\x9f\x17\x4e\x01\
525473
\xc4\x00\x4e\x03\x38\xf2\x9f\x01\x00\x7c\x97\x4a\xe1\x34\x7b\x75\
526474
\xb6\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
475+
\x00\x00\x03\x11\
476+
\x89\
477+
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
478+
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
479+
\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
480+
\xa7\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x12\x00\x00\
481+
\x0b\x12\x01\xd2\xdd\x7e\xfc\x00\x00\x00\x07\x74\x49\x4d\x45\x07\
482+
\xd4\x0c\x0e\x14\x29\x37\x87\x80\x5f\xe3\x00\x00\x02\x9e\x49\x44\
483+
\x41\x54\x78\xda\x95\x92\x5b\x48\x53\x01\x18\xc7\xff\x3b\x3b\xd3\
484+
\xb9\xa6\x39\x2f\x9b\x97\xb4\x24\x13\xa7\xb9\x12\xb1\xde\x7a\xb1\
485+
\x0c\xc4\x4c\x34\x08\xc5\x34\x8d\x0a\x0c\x34\x7b\x29\x84\x8c\x22\
486+
\x33\xd0\x61\x3d\x16\x51\x12\x2a\x09\xf9\x50\xa1\xf8\x30\x12\xba\
487+
\x4b\x37\x9b\x28\xa3\x79\x69\xa6\xa6\xe7\xec\xd2\xe6\xe6\x39\x67\
488+
\x3b\x97\x5e\x5a\x99\x5b\x50\xdf\xdb\xf7\x7d\xfc\x7f\x1f\xfc\xbf\
489+
\x3f\xf0\x1f\x15\x73\x1e\xd9\x9a\x2e\x3c\x24\x33\xb1\x3b\x38\x23\
490+
\xfe\x45\x18\xdd\x82\x54\x4d\x27\x6e\xcb\xb5\x98\x10\x56\x50\xc2\
491+
\x4f\x43\x0c\xee\xc8\x70\x82\x95\x95\x9e\x84\xd8\x58\xa9\x66\xca\
492+
\x32\xb9\x43\x4e\xb2\xfc\x3b\xdb\x1c\xd5\xd4\x3f\x5c\x44\xe8\x24\
493+
\x52\xa0\x41\x01\xb0\xff\xf5\x1a\xc3\xf4\x95\xf0\x82\xd1\xf1\x78\
494+
\xa4\xdc\xab\x89\x53\xd6\xd4\x9d\xd4\x1f\x7d\x69\xad\x10\x53\x8c\
495+
\xa4\xa4\x3e\x8e\x6f\x11\x7b\xf1\x02\x80\x3a\xac\x78\x75\xf5\x8e\
496+
\x21\x20\x5c\x63\xe6\x1c\xc7\xa4\xba\x53\xd9\x23\x00\x54\x64\x06\
497+
\x48\x7d\xa7\x7a\x5e\xd7\x46\x4a\xcd\x17\x0d\xd3\x91\x5a\x79\x01\
498+
\x00\x79\x58\x0f\x94\xca\xef\xed\x94\xcf\xaa\xf4\xad\x05\x30\x6b\
499+
\xf5\xbc\x01\xc0\xa8\x8e\xa0\x79\x59\xf4\xa6\x1d\x8a\xc8\x44\x7d\
500+
\x7d\xf6\xf6\xc6\x86\xbc\xfd\xc0\x6f\x0f\x7e\x01\x86\x86\xce\xa8\
501+
\x78\x19\x5d\xcc\x70\x7e\xf8\x39\x01\xd4\x0a\x63\x53\x37\x42\x4f\
502+
\xc4\xe3\x6a\x16\x95\xb0\x76\xba\x72\x27\xd4\xd1\x0a\xa4\x67\xa8\
503+
\xcb\x00\x44\x86\x00\x72\x73\xa5\x24\x2e\xe0\x89\x08\xf6\x7e\x41\
504+
\x08\xc8\x93\xd0\x23\xd2\x60\x0f\xeb\xf4\xc3\xc9\xc9\x9b\x00\x00\
505+
\x2a\x95\x3c\x05\x80\x2a\x04\x60\x36\x3b\xdd\x3c\x38\x09\x00\x08\
506+
\x42\x86\x2d\x45\x9a\x73\x07\xb2\xf3\x0a\x8b\xb8\x9c\xc1\xda\xea\
507+
\x82\x31\x99\x4c\x06\x00\xb0\xd3\x1c\x0b\x40\x0a\x01\x94\x95\x3d\
508+
\x70\xd9\x5d\xac\x19\x00\xa2\x54\x24\x0e\x1a\xb6\xe6\x47\x8c\x8a\
509+
\x96\xa6\xaa\x9c\xd2\xd8\x44\xf2\x0a\x2f\x8a\xe0\x38\x01\x1f\xde\
510+
\xd2\x13\x00\x7c\xe1\x4c\x14\x5f\x3f\xa7\xba\x58\x86\x07\x41\xc8\
511+
\x30\x69\x59\x72\xf6\xdf\x9a\xac\xcd\x48\x8f\xeb\x76\x31\x54\x94\
512+
\x3f\x20\xe0\xd5\xb3\xe5\x35\xd3\xf0\xc2\x3d\x00\xfe\x10\x00\xb9\
513+
\x0d\xc4\x59\xb3\x69\xa9\xf3\xd1\x47\x87\x9d\x66\x50\x55\x96\x45\
514+
\x1a\x76\x25\xba\xb5\xf1\x9a\x48\x00\x98\x9a\x70\x06\x6e\x5c\x37\
515+
\x1b\xdd\x6e\x6e\xb4\xa3\xa3\xea\xcf\x37\x46\x55\x42\xa1\x2c\x46\
516+
\xbb\x40\xa3\x77\xf0\xd3\xe7\xb8\x13\x97\x9f\x7e\x99\x18\x77\xcc\
517+
\xb4\xb6\xed\x19\x98\xb1\xb1\x0d\x82\x28\xc2\xeb\xe5\x7d\x4e\xbb\
518+
\xd0\xc7\xb2\x77\x5b\xd7\x58\x7b\x43\xb8\x1c\x29\x00\x68\x55\x15\
519+
\xb8\x1f\xb9\x0f\xdd\x3f\xd3\x96\xf6\xc4\x54\x7a\xc1\x4a\x55\x4b\
520+
\x56\xaa\x5a\x72\xf9\x5a\xfc\xbd\x03\xe5\x76\x85\x82\x28\x0c\x8a\
521+
\xe4\xeb\x3d\x00\xe0\x53\xe4\x63\x41\xa4\x01\x61\x11\x63\x00\x3c\
522+
\x8b\x5f\x99\x71\x8f\xdb\x9f\x6a\x9b\x5d\x8d\x19\x1c\xb4\xcc\xdf\
523+
\x34\xbe\xbf\xe4\x71\xfb\x4d\xeb\xc3\xb4\xb1\x08\xb9\x0e\x9b\x37\
524+
\xcc\x48\x00\x1a\x00\x31\x00\x64\xeb\x17\x3f\x00\x3d\x4b\x18\xbb\
525+
\x0e\x57\x7e\xbc\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
526+
\
527527
"
528528

529529
qt_resource_name = "\
@@ -549,24 +549,24 @@
549549
\x00\x72\
550550
\x00\x65\x00\x70\x00\x6f\x00\x55\x00\x6e\x00\x61\x00\x76\x00\x61\x00\x69\x00\x6c\x00\x61\x00\x62\x00\x6c\x00\x65\x00\x2e\x00\x70\
551551
\x00\x6e\x00\x67\
552+
\x00\x14\
553+
\x04\x88\x2d\xc7\
554+
\x00\x70\
555+
\x00\x6c\x00\x75\x00\x67\x00\x69\x00\x6e\x00\x5f\x00\x69\x00\x6e\x00\x73\x00\x74\x00\x61\x00\x6c\x00\x6c\x00\x65\x00\x72\x00\x2e\
556+
\x00\x70\x00\x6e\x00\x67\
552557
\x00\x0d\
553558
\x09\xa1\x91\x67\
554559
\x00\x71\
555560
\x00\x67\x00\x69\x00\x73\x00\x2d\x00\x69\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
556-
\x00\x13\
557-
\x06\x9f\x85\x27\
558-
\x00\x50\
559-
\x00\x6c\x00\x75\x00\x67\x00\x69\x00\x6e\x00\x49\x00\x6e\x00\x73\x00\x74\x00\x61\x00\x6c\x00\x6c\x00\x65\x00\x72\x00\x2e\x00\x70\
560-
\x00\x6e\x00\x67\
561561
"
562562

563563
qt_resource_struct = "\
564564
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
565565
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
566566
\x00\x00\x00\x14\x00\x02\x00\x00\x00\x05\x00\x00\x00\x03\
567-
\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
568-
\x00\x00\x00\xc6\x00\x00\x00\x00\x00\x01\x00\x00\x0c\x26\
569567
\x00\x00\x00\xa6\x00\x00\x00\x00\x00\x01\x00\x00\x09\x11\
568+
\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
569+
\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x01\x00\x00\x1c\x53\
570570
\x00\x00\x00\x7a\x00\x00\x00\x00\x00\x01\x00\x00\x05\x7f\
571571
\x00\x00\x00\x52\x00\x00\x00\x00\x00\x01\x00\x00\x01\xe6\
572572
"

‎python/plugins/plugin_installer/unzip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self, verbose = True, percent = 10):
2626

2727
def extract(self, file, dir):
2828
if not dir.endswith(':') and not os.path.exists(dir):
29-
os.mkdir(dir)
29+
os.makedirs(dir)
3030

3131
zf = zipfile.ZipFile(file)
3232

0 commit comments

Comments
 (0)
Please sign in to comment.