Skip to content

Commit 2e727ea

Browse files
author
borysiasty
committedMar 21, 2009
Plugin Installer - revert last changes in order to keep the stable gui
git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@10363 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 0e1f397 commit 2e727ea

File tree

7 files changed

+208
-590
lines changed

7 files changed

+208
-590
lines changed
 

‎python/plugins/plugin_installer/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def name():
1414
return "Plugin Installer"
1515

1616
def version():
17-
return "Version 0.9.11"
17+
return "Version 0.9.8"
1818

1919
def description():
2020
return "Downloads and installs QGIS python plugins"
@@ -23,7 +23,7 @@ def qgisMinimumVersion():
2323
return "0.9"
2424

2525
def authorName():
26-
return "Matthew Perry, Borys Jurgiel"
26+
return "perrygeo, borysiasty"
2727

2828
def homepage():
2929
return "http://bwj.aster.net.pl/qgis/"

‎python/plugins/plugin_installer/i18n.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ QgsPluginInstallerDialog::foo()
200200
// def ChangeCheckingPolicy
201201

202202
// def addKnownRepositories
203-
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." )
203+
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!" )
204204
tr( "QGIS Python Plugin Installer" )
205205

206206
// def addRepository

‎python/plugins/plugin_installer/installer_data.py

Lines changed: 8 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"error_details" QString,
4444
"homepage" QString,
4545
"url" QString,
46-
"experimental" bool
4746
"filename" QString,
4847
"repository" QString,
4948
"localdir" QString,
@@ -84,7 +83,7 @@ def setIface(qgisIface):
8483
("Martin Dobias' Sandbox", "http://mapserver.sk/~wonder/qgis/plugins-sandbox.xml", ""),
8584
("Aaron Racicot's Repository", "http://qgisplugins.z-pulley.com", ""),
8685
("Barry Rowlingson's Repository", "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml", ""),
87-
("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml", "")]
86+
("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml", "")]
8887

8988

9089
# --- class QPHttp ----------------------------------------------------------------------- #
@@ -97,8 +96,6 @@ def __init__(self,*args):
9796
if settings.value("/proxyEnabled").toBool():
9897
self.proxy=QNetworkProxy()
9998
proxyType = settings.value( "/proxyType", QVariant(0)).toString()
100-
if len(args)>0 and settings.value("/proxyExcludedUrls").toString().contains(args[0]):
101-
proxyType = "NoProxy"
10299
if proxyType in ["1","Socks5Proxy"]: self.proxy.setType(QNetworkProxy.Socks5Proxy)
103100
elif proxyType in ["2","NoProxy"]: self.proxy.setType(QNetworkProxy.NoProxy)
104101
elif proxyType in ["3","HttpProxy"]: self.proxy.setType(QNetworkProxy.HttpProxy)
@@ -238,48 +235,6 @@ def setCheckingOnStart(self, state):
238235
settings.setValue(settingsGroup+"/checkOnStart", QVariant(state))
239236

240237

241-
# ----------------------------------------- #
242-
def checkingOnStartInterval(self):
243-
""" return checking for news and updates interval """
244-
settings = QSettings()
245-
(i, ok) = settings.value(settingsGroup+"/checkOnStartInterval").toInt()
246-
if i < 0 or not ok:
247-
i = 1
248-
# allowed values: 0,1,3,7,14,30 days
249-
interval = 0
250-
for j in [1,3,7,14,30]:
251-
if i >= j:
252-
interval = j
253-
return interval
254-
255-
256-
# ----------------------------------------- #
257-
def setCheckingOnStartInterval(self, interval):
258-
""" set checking for news and updates interval """
259-
settings = QSettings()
260-
settings.setValue(settingsGroup+"/checkOnStartInterval", QVariant(interval))
261-
262-
263-
# ----------------------------------------- #
264-
def saveCheckingOnStartLastDate(self):
265-
""" set today's date as the day of last checking """
266-
settings = QSettings()
267-
settings.setValue(settingsGroup+"/checkOnStartLastDate", QVariant(QDate.currentDate()))
268-
269-
270-
# ----------------------------------------- #
271-
def timeForChecking(self):
272-
""" determine whether it's the time for checking for news and updates now """
273-
if self.checkingOnStartInterval() == 0:
274-
return True
275-
settings = QSettings()
276-
interval = settings.value(settingsGroup+"/checkOnStartLastDate").toDate().daysTo(QDate.currentDate())
277-
if interval >= self.checkingOnStartInterval():
278-
return True
279-
else:
280-
return False
281-
282-
283238
# ----------------------------------------- #
284239
def load(self):
285240
""" populate the mRepositories dict"""
@@ -376,19 +331,15 @@ def xmlDownloaded(self,nr,state):
376331
fileName = QFileInfo(pluginNodes.item(i).firstChildElement("download_url").text().trimmed()).fileName()
377332
name = fileName.section(".", 0, 0)
378333
name = str(name)
379-
experimental = False
380-
if pluginNodes.item(i).firstChildElement("experimental").text().simplified().toUpper() in ["TRUE","YES"]:
381-
experimental = True
382334
plugin = {}
383335
plugin[name] = {
384336
"name" : pluginNodes.item(i).toElement().attribute("name"),
385337
"version_avail" : pluginNodes.item(i).toElement().attribute("version"),
386-
"desc_repo" : pluginNodes.item(i).firstChildElement("description").text().simplified(),
338+
"desc_repo" : pluginNodes.item(i).firstChildElement("description").text().trimmed(),
387339
"desc_local" : "",
388-
"author" : pluginNodes.item(i).firstChildElement("author_name").text().simplified(),
389-
"homepage" : pluginNodes.item(i).firstChildElement("homepage").text().simplified(),
390-
"url" : pluginNodes.item(i).firstChildElement("download_url").text().simplified(),
391-
"experimental" : experimental,
340+
"author" : pluginNodes.item(i).firstChildElement("author_name").text().trimmed(),
341+
"homepage" : pluginNodes.item(i).firstChildElement("homepage").text().trimmed(),
342+
"url" : pluginNodes.item(i).firstChildElement("download_url").text().trimmed(),
392343
"filename" : fileName,
393344
"status" : "not installed",
394345
"error" : "",
@@ -397,14 +348,14 @@ def xmlDownloaded(self,nr,state):
397348
"repository" : reposName,
398349
"localdir" : name,
399350
"read-only" : False}
400-
qgisMinimumVersion = pluginNodes.item(i).firstChildElement("qgis_minimum_version").text().simplified()
351+
qgisMinimumVersion = pluginNodes.item(i).firstChildElement("qgis_minimum_version").text().trimmed()
401352
if not qgisMinimumVersion: qgisMinimumVersion = "0"
402353
# please use the tag below only if really needed! (for example if plugin development is abandoned)
403-
qgisMaximumVersion = pluginNodes.item(i).firstChildElement("qgis_maximum_version").text().simplified()
354+
qgisMaximumVersion = pluginNodes.item(i).firstChildElement("qgis_maximum_version").text().trimmed()
404355
if not qgisMaximumVersion: qgisMaximumVersion = "2"
405356
#if compatible, add the plugin to the list
406357
if compareVersions(QGIS_VER, qgisMinimumVersion) < 2 and compareVersions(qgisMaximumVersion, QGIS_VER) < 2:
407-
if QGIS_VER[0]==qgisMinimumVersion[0] or name=="plugin_installer" or (qgisMinimumVersion!="0" and qgisMaximumVersion!="2"):
358+
if QGIS_VER[0]=="0" or qgisMinimumVersion[0]=="1" or name=="plugin_installer":
408359
plugins.addPlugin(plugin)
409360
plugins.workarounds()
410361
self.mRepositories[reposName]["state"] = 2
@@ -418,7 +369,6 @@ def xmlDownloaded(self,nr,state):
418369
# is the checking done?
419370
if not self.fetchingInProgress():
420371
plugins.getAllInstalled()
421-
self.saveCheckingOnStartLastDate()
422372
self.emit(SIGNAL("checkingDone()"))
423373
# --- /class Repositories ---------------------------------------------------------------- #
424374

@@ -552,7 +502,6 @@ def updatePlugin(self, key, readOnly):
552502
"author" : auth,
553503
"homepage" : homepage,
554504
"url" : path,
555-
"experimental" : False,
556505
"filename" : "",
557506
"status" : "",
558507
"error" : error,
@@ -572,7 +521,6 @@ def updatePlugin(self, key, readOnly):
572521
self.mPlugins[key]["name"] = plugin["name"] # local name has higher priority
573522
self.mPlugins[key]["version_inst"] = plugin["version_inst"]
574523
self.mPlugins[key]["desc_local"] = plugin["desc_local"]
575-
self.mPlugins[key]["experimental"] = False
576524
# set status
577525
#
578526
# installed available status

‎python/plugins/plugin_installer/installer_gui.py

Lines changed: 17 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -262,27 +262,15 @@ def __init__(self, parent, fl):
262262
self.connect(self.buttonAddRep, SIGNAL("clicked()"), self.addRepository)
263263
self.connect(self.buttonEditRep, SIGNAL("clicked()"), self.editRepository)
264264
self.connect(self.buttonDeleteRep, SIGNAL("clicked()"), self.deleteRepository)
265-
self.buttonEditRep.setEnabled(False)
266-
self.buttonDeleteRep.setEnabled(False)
267-
# configuration widgets
268-
self.connect(self.checkUpdates, SIGNAL("toggled (bool)"), self.changeCheckingPolicy)
269-
self.connect(self.comboInterval, SIGNAL("currentIndexChanged (int)"), self.changeCheckingInterval)
270-
self.connect(self.radioPluginType0, SIGNAL("toggled (bool)"), self.changePluginPolicy)
271-
self.connect(self.radioPluginType1, SIGNAL("toggled (bool)"), self.changePluginPolicy)
272-
self.connect(self.radioPluginType2, SIGNAL("toggled (bool)"), self.changePluginPolicy)
265+
# checkingOnStart checkbox
266+
self.connect(self.checkUpdates, SIGNAL("stateChanged (int)"), self.ChangeCheckingPolicy)
273267
if repositories.checkingOnStart():
274-
self.checkUpdates.setChecked(Qt.Checked)
275-
else:
276-
self.checkUpdates.setChecked(Qt.Unchecked)
277-
interval = repositories.checkingOnStartInterval()
278-
intervals = [0,1,3,7,14,30] # days
279-
if intervals.count(interval):
280-
index = intervals.index(interval)
268+
self.checkUpdates.setCheckState(Qt.Checked)
281269
else:
282-
index = 1
283-
if QGIS_VER[0] == "0":
284-
self.label_2.setText("<b>Note: This functionality requires QGIS 1.0</b>")
285-
self.comboInterval.setCurrentIndex(index)
270+
self.checkUpdates.setCheckState(Qt.Unchecked)
271+
self.buttonEditRep.setEnabled(False)
272+
self.buttonDeleteRep.setEnabled(False)
273+
286274
self.populateMostWidgets()
287275

288276

@@ -340,32 +328,13 @@ def populateMostWidgets(self):
340328
for i in [0,1,2]:
341329
self.treeRepositories.resizeColumnToContents(i)
342330
self.comboFilter1.addItem(self.tr("orphans"))
343-
# fill the status filter comboBox
331+
# filling the status filter comboBox
344332
self.comboFilter2.clear()
345333
self.comboFilter2.addItem(self.tr("any status"))
346334
self.comboFilter2.addItem(self.tr("not installed", "plural"))
347335
self.comboFilter2.addItem(self.tr("installed", "plural"))
348336
if plugins.isThereAnythingNew():
349337
self.comboFilter2.addItem(self.tr("upgradeable and news"))
350-
#set configuration widgets (dependent on the repository list)
351-
if len(repositories.all()) == 1 or QGIS_VER[0] == "0":
352-
self.radioPluginType0.setEnabled(False)
353-
self.radioPluginType1.setEnabled(False)
354-
self.radioPluginType2.setEnabled(False)
355-
else:
356-
self.radioPluginType0.setEnabled(True)
357-
self.radioPluginType1.setEnabled(True)
358-
self.radioPluginType2.setEnabled(True)
359-
settings = QSettings()
360-
(i, ok) = settings.value(settingsGroup+"/allowedPluginType", QVariant(2)).toInt()
361-
if QGIS_VER[0] == "0":
362-
self.radioPluginType1.setChecked(Qt.Checked)
363-
elif i == 1 or len(repositories.all()) == 1:
364-
self.radioPluginType0.setChecked(Qt.Checked)
365-
elif i == 3:
366-
self.radioPluginType2.setChecked(Qt.Checked)
367-
else:
368-
self.radioPluginType1.setChecked(Qt.Checked)
369338

370339

371340
# ----------------------------------------- #
@@ -389,17 +358,14 @@ def filterCheck(self,plugin):
389358
return False
390359
if self.comboFilter2.currentIndex() == 3 and not plugin["status"] in ["upgradeable","new"]:
391360
return False
392-
if self.radioPluginType0.isChecked() and plugin["repository"] != officialRepo[0] and plugin["status"] in ["not installed","new"]:
393-
return False
394-
if self.radioPluginType1.isChecked() and plugin["experimental"] and plugin["status"] in ["not installed","new"]:
395-
return False
396361
if self.lineFilter.text() == "":
397362
return True
398363
else:
399364
for i in ["name","version_inst","version_avail","desc_repo","desc_local","author","status","repository"]:
400365
item = QString(plugin[i]) #.toUpper()
401366
if item != None:
402367
if item.contains(self.lineFilter.text(), Qt.CaseInsensitive):
368+
#if item.find(self.lineFilter.text().toUpper()) > -1:
403369
return True
404370
return False
405371

@@ -692,41 +658,17 @@ def repositoryTreeClicked(self):
692658

693659

694660
# ----------------------------------------- #
695-
def changeCheckingPolicy(self,policy):
696-
""" the Checking On Start checkbox has been clicked """
697-
if policy:
661+
def ChangeCheckingPolicy(self,policy):
662+
if policy == Qt.Checked:
698663
repositories.setCheckingOnStart(True)
699664
else:
700665
repositories.setCheckingOnStart(False)
701666

702667

703-
# ----------------------------------------- #
704-
def changeCheckingInterval(self,interval):
705-
""" the Checking on start interval combobox has been clicked """
706-
intervals = [0,1,3,7,14,30]
707-
repositories.setCheckingOnStartInterval(intervals[interval])
708-
709-
710-
# ----------------------------------------- #
711-
def changePluginPolicy(self, state):
712-
""" one of the plugin type radiobuttons has been clicked """
713-
if not state: # radio button released
714-
return
715-
if self.radioPluginType0.isChecked():
716-
i = 1
717-
elif self.radioPluginType1.isChecked():
718-
i = 2
719-
else:
720-
i = 3
721-
settings = QSettings()
722-
settings.setValue(settingsGroup+"/allowedPluginType", QVariant(i))
723-
self.populatePluginTree()
724-
725-
726668
# ----------------------------------------- #
727669
def addKnownRepositories(self):
728670
""" update list of known repositories - in the future it will be replaced with an online fetching """
729-
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.")
671+
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!")
730672
if QMessageBox.question(self, self.tr("QGIS Python Plugin Installer"), message, QMessageBox.Ok, QMessageBox.Abort) == QMessageBox.Ok:
731673
repositories.addKnownRepos()
732674
# refresh lists and populate widgets
@@ -745,13 +687,13 @@ def addRepository(self):
745687
if not dlg.exec_():
746688
return
747689
for i in repositories.all().values():
748-
if dlg.editURL.text().trimmed() == i["url"]:
690+
if dlg.editURL.text() == i["url"]:
749691
QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Unable to add another repository with the same URL!"))
750692
return
751693
settings = QSettings()
752694
settings.beginGroup(self.reposGroup)
753695
reposName = dlg.editName.text()
754-
reposURL = dlg.editURL.text().trimmed()
696+
reposURL = dlg.editURL.text()
755697
if repositories.all().has_key(reposName):
756698
reposName = reposName + "(2)"
757699
# add to settings
@@ -787,7 +729,7 @@ def editRepository(self):
787729
if not dlg.exec_():
788730
return # nothing to do if cancelled
789731
for i in repositories.all().values():
790-
if dlg.editURL.text().trimmed() == i["url"] and dlg.editURL.text().trimmed() != repositories.all()[reposName]["url"]:
732+
if dlg.editURL.text() == i["url"] and dlg.editURL.text() != repositories.all()[reposName]["url"]:
791733
QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Unable to add another repository with the same URL!"))
792734
return
793735
# delete old repo from QSettings and create new one
@@ -797,9 +739,9 @@ def editRepository(self):
797739
newName = dlg.editName.text()
798740
if repositories.all().has_key(newName) and newName != reposName:
799741
newName = newName + "(2)"
800-
settings.setValue(newName+"/url", QVariant(dlg.editURL.text().trimmed()))
742+
settings.setValue(newName+"/url", QVariant(dlg.editURL.text()))
801743
settings.setValue(newName+"/enabled", QVariant(bool(dlg.checkBoxEnabled.checkState())))
802-
if dlg.editURL.text().trimmed() == repositories.all()[reposName]["url"] and dlg.checkBoxEnabled.checkState() == checkState[repositories.all()[reposName]["enabled"]]:
744+
if dlg.editURL.text() == repositories.all()[reposName]["url"] and dlg.checkBoxEnabled.checkState() == checkState[repositories.all()[reposName]["enabled"]]:
803745
repositories.rename(reposName, newName)
804746
self.populateMostWidgets()
805747
return # nothing else to do if only repository name was changed

‎python/plugins/plugin_installer/installer_plugin.py

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
"""
23
Copyright (C) 2007-2008 Matthew Perry
34
Copyright (C) 2008 Borys Jurgiel
@@ -31,26 +32,10 @@ def __init__(self, iface):
3132
else: # old plugin API
3233
self.mainWindow = self.iface.getMainWindow
3334

34-
35-
# ----------------------------------------- #
36-
def getThemeIcon(self, theName):
37-
myCurThemePath = QgsApplication.activeThemePath() + "/plugins/" + theName;
38-
myDefThemePath = QgsApplication.defaultThemePath() + "/plugins/" + theName;
39-
myQrcPath = ":/plugins/installer/" + theName;
40-
if QFile.exists(myCurThemePath):
41-
return QIcon(myCurThemePath)
42-
elif QFile.exists(myDefThemePath):
43-
return QIcon(myDefThemePath)
44-
elif QFile.exists(myQrcPath):
45-
return QIcon(myQrcPath)
46-
else:
47-
return QIcon()
48-
49-
5035
# ----------------------------------------- #
5136
def initGui(self):
5237
""" create action that will start plugin window and then add it to menu """
53-
self.action = QAction(self.getThemeIcon("plugin_installer.png"), QCoreApplication.translate("QgsPluginInstaller","Fetch Python Plugins..."), self.mainWindow())
38+
self.action = QAction(QIcon(":/plugins/installer/plugin_installer.png"), QCoreApplication.translate("QgsPluginInstaller","Fetch Python Plugins..."), self.mainWindow())
5439
self.action.setWhatsThis(QCoreApplication.translate("QgsPluginInstaller","Install more plugins from remote repositories"))
5540
self.action.setStatusTip(QCoreApplication.translate("QgsPluginInstaller","Install more plugins from remote repositories"))
5641
if QGIS_MAJOR_VER: # new plugin API
@@ -65,12 +50,10 @@ def initGui(self):
6550
repositories.load()
6651
plugins.clear()
6752

68-
if repositories.checkingOnStart() and repositories.timeForChecking() and repositories.allEnabled():
53+
if repositories.checkingOnStart() and repositories.allEnabled():
6954
self.statusLabel = QLabel(QCoreApplication.translate("QgsPluginInstaller","Looking for new plugins..."), self.mainWindow().statusBar())
7055
self.mainWindow().statusBar().insertPermanentWidget(0,self.statusLabel)
71-
QObject.connect(self.statusLabel, SIGNAL("linkActivated (QString)"), self.preRun)
72-
73-
56+
QObject.connect(self.statusLabel, SIGNAL("linkActivated (QString)"), self.run)
7457
QObject.connect(repositories, SIGNAL("checkingDone()"), self.checkingDone)
7558
for key in repositories.allEnabled():
7659
repositories.requestFetching(key)
@@ -106,37 +89,25 @@ def checkingDone(self):
10689
# ----------------------------------------- #
10790
def unload(self):
10891
""" remove the menu item and notify label """
109-
if QGIS_MAJOR_VER: # new plugin API
110-
self.iface.pluginMenu().removeAction(self.action)
111-
else: # old plugin API
112-
self.mainWindow().menuBar().actions()[4].menu().removeAction(self.action)
92+
self.mainWindow().menuBar().actions()[4].menu().removeAction(self.action)
11393
if self.statusLabel:
11494
self.mainWindow().statusBar().removeWidget(self.statusLabel)
11595

11696

11797
# ----------------------------------------- #
118-
def preRun(self, * params):
119-
""" stupid method to get rid of the string value """
120-
self.run()
121-
122-
123-
# ----------------------------------------- #
124-
def run(self, parent = None):
98+
def run(self, * params):
12599
""" create and show a configuration dialog """
126100
QApplication.setOverrideCursor(Qt.WaitCursor)
127101
if self.statusLabel:
128102
self.mainWindow().statusBar().removeWidget(self.statusLabel)
129103
self.statusLabel = None
130104

131-
if not parent:
132-
parent = self.mainWindow()
133-
134105
for key in repositories.all():
135106
if repositories.all()[key]["state"] == 3: # if state = 3 (error), try to fetch once again
136107
repositories.requestFetching(key)
137108

138109
if repositories.fetchingInProgress():
139-
self.fetchDlg = QgsPluginInstallerFetchingDialog(parent)
110+
self.fetchDlg = QgsPluginInstallerFetchingDialog(self.mainWindow())
140111
self.fetchDlg.exec_()
141112
del self.fetchDlg
142113
for key in repositories.all():
@@ -147,10 +118,10 @@ def run(self, parent = None):
147118
# display an error message for every unavailable reposioty, except the case if all repositories are unavailable!
148119
if repositories.allUnavailable() and repositories.allUnavailable() != repositories.allEnabled():
149120
for key in repositories.allUnavailable():
150-
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"]))
121+
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"]))
151122

152123
plugins.getAllInstalled()
153124

154125
flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint
155-
self.guiDlg = QgsPluginInstallerDialog(parent,flags)
126+
self.guiDlg = QgsPluginInstallerDialog(self.mainWindow(),flags)
156127
self.guiDlg.show()

‎python/plugins/plugin_installer/qgsplugininstallerbase.py

Lines changed: 114 additions & 181 deletions
Large diffs are not rendered by default.

‎python/plugins/plugin_installer/qgsplugininstallerbase.ui

Lines changed: 57 additions & 233 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,20 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>799</width>
10-
<height>382</height>
9+
<width>769</width>
10+
<height>395</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle" >
1414
<string>QGIS Python Plugin Installer</string>
1515
</property>
1616
<property name="windowIcon" >
17-
<iconset resource="resources.qrc" >
18-
<normaloff>:/plugins/installer/qgis-icon.png</normaloff>:/plugins/installer/qgis-icon.png</iconset>
17+
<iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
1918
</property>
2019
<property name="whatsThis" >
2120
<string>QGIS Python Plugin Installer</string>
2221
</property>
2322
<layout class="QGridLayout" >
24-
<item row="1" column="0" >
25-
<layout class="QHBoxLayout" >
26-
<item>
27-
<widget class="QLabel" name="label_3" >
28-
<property name="whatsThis" >
29-
<string/>
30-
</property>
31-
<property name="text" >
32-
<string>The plugins will be installed to ~/.qgis/python/plugins</string>
33-
</property>
34-
</widget>
35-
</item>
36-
<item>
37-
<widget class="QPushButton" name="buttonClose" >
38-
<property name="sizePolicy" >
39-
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
40-
<horstretch>0</horstretch>
41-
<verstretch>0</verstretch>
42-
</sizepolicy>
43-
</property>
44-
<property name="toolTip" >
45-
<string>Close the Installer window</string>
46-
</property>
47-
<property name="whatsThis" >
48-
<string>Close the Installer window</string>
49-
</property>
50-
<property name="text" >
51-
<string>Close</string>
52-
</property>
53-
</widget>
54-
</item>
55-
</layout>
56-
</item>
5723
<item row="0" column="0" >
5824
<widget class="QTabWidget" name="tabWidget" >
5925
<property name="toolTip" >
@@ -202,7 +168,7 @@
202168
<property name="orientation" >
203169
<enum>Qt::Horizontal</enum>
204170
</property>
205-
<property name="sizeHint" stdset="0" >
171+
<property name="sizeHint" >
206172
<size>
207173
<width>40</width>
208174
<height>20</height>
@@ -288,6 +254,22 @@
288254
</column>
289255
</widget>
290256
</item>
257+
<item row="1" column="0" >
258+
<widget class="QCheckBox" name="checkUpdates" >
259+
<property name="toolTip" >
260+
<string>Allow the Installer to look for updates and news in enabled repositories on QGIS startup</string>
261+
</property>
262+
<property name="statusTip" >
263+
<string/>
264+
</property>
265+
<property name="whatsThis" >
266+
<string>Allow the Installer to look for updates and news in enabled repositories on QGIS startup</string>
267+
</property>
268+
<property name="text" >
269+
<string>Check for updates on startup</string>
270+
</property>
271+
</widget>
272+
</item>
291273
<item row="1" column="1" >
292274
<spacer>
293275
<property name="orientation" >
@@ -296,9 +278,9 @@
296278
<property name="sizeType" >
297279
<enum>QSizePolicy::Preferred</enum>
298280
</property>
299-
<property name="sizeHint" stdset="0" >
281+
<property name="sizeHint" >
300282
<size>
301-
<width>20</width>
283+
<width>30</width>
302284
<height>20</height>
303285
</size>
304286
</property>
@@ -325,7 +307,7 @@
325307
<property name="orientation" >
326308
<enum>Qt::Horizontal</enum>
327309
</property>
328-
<property name="sizeHint" stdset="0" >
310+
<property name="sizeHint" >
329311
<size>
330312
<width>40</width>
331313
<height>20</height>
@@ -374,195 +356,41 @@
374356
</item>
375357
</layout>
376358
</widget>
377-
<widget class="QWidget" name="tab_3" >
378-
<attribute name="title" >
379-
<string>Options</string>
380-
</attribute>
381-
<attribute name="toolTip" >
382-
<string>Configuration of the plugin installer</string>
383-
</attribute>
384-
<layout class="QVBoxLayout" name="verticalLayout" >
385-
<item>
386-
<widget class="QGroupBox" name="checkUpdates" >
387-
<property name="enabled" >
388-
<bool>true</bool>
389-
</property>
390-
<property name="sizePolicy" >
391-
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
392-
<horstretch>0</horstretch>
393-
<verstretch>0</verstretch>
394-
</sizepolicy>
395-
</property>
396-
<property name="title" >
397-
<string>Check for updates on startup</string>
398-
</property>
399-
<property name="checkable" >
400-
<bool>true</bool>
401-
</property>
402-
<property name="checked" >
403-
<bool>false</bool>
404-
</property>
405-
<layout class="QGridLayout" name="gridLayout" >
406-
<item row="0" column="0" >
407-
<widget class="QComboBox" name="comboInterval" >
408-
<item>
409-
<property name="text" >
410-
<string>every time QGIS starts</string>
411-
</property>
412-
</item>
413-
<item>
414-
<property name="text" >
415-
<string>once a day</string>
416-
</property>
417-
</item>
418-
<item>
419-
<property name="text" >
420-
<string>every 3 days</string>
421-
</property>
422-
</item>
423-
<item>
424-
<property name="text" >
425-
<string>every week</string>
426-
</property>
427-
</item>
428-
<item>
429-
<property name="text" >
430-
<string>every 2 weeks</string>
431-
</property>
432-
</item>
433-
<item>
434-
<property name="text" >
435-
<string>every month</string>
436-
</property>
437-
</item>
438-
</widget>
439-
</item>
440-
<item row="2" column="0" >
441-
<spacer name="verticalSpacer_3" >
442-
<property name="orientation" >
443-
<enum>Qt::Vertical</enum>
444-
</property>
445-
<property name="sizeType" >
446-
<enum>QSizePolicy::Fixed</enum>
447-
</property>
448-
<property name="sizeHint" stdset="0" >
449-
<size>
450-
<width>20</width>
451-
<height>10</height>
452-
</size>
453-
</property>
454-
</spacer>
455-
</item>
456-
<item row="1" column="0" >
457-
<widget class="QLabel" name="label" >
458-
<property name="sizePolicy" >
459-
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
460-
<horstretch>0</horstretch>
461-
<verstretch>0</verstretch>
462-
</sizepolicy>
463-
</property>
464-
<property name="text" >
465-
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
466-
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
467-
p, li { white-space: pre-wrap; }
468-
&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
469-
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Note:&lt;/span> 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.&lt;/p>&lt;/body>&lt;/html></string>
470-
</property>
471-
<property name="wordWrap" >
472-
<bool>true</bool>
473-
</property>
474-
</widget>
475-
</item>
476-
</layout>
477-
</widget>
478-
</item>
479-
<item>
480-
<widget class="QGroupBox" name="groupBox_2" >
481-
<property name="sizePolicy" >
482-
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
483-
<horstretch>0</horstretch>
484-
<verstretch>1</verstretch>
485-
</sizepolicy>
486-
</property>
487-
<property name="title" >
488-
<string>Allowed plugins</string>
489-
</property>
490-
<layout class="QGridLayout" name="gridLayout_2" >
491-
<item row="0" column="0" >
492-
<widget class="QRadioButton" name="radioPluginType0" >
493-
<property name="enabled" >
494-
<bool>false</bool>
495-
</property>
496-
<property name="text" >
497-
<string>Only show plugins from the official repository</string>
498-
</property>
499-
<property name="checked" >
500-
<bool>true</bool>
501-
</property>
502-
</widget>
503-
</item>
504-
<item row="1" column="0" >
505-
<widget class="QRadioButton" name="radioPluginType1" >
506-
<property name="enabled" >
507-
<bool>false</bool>
508-
</property>
509-
<property name="text" >
510-
<string>Show all plugins except those marked as experimental</string>
511-
</property>
512-
<property name="checked" >
513-
<bool>false</bool>
514-
</property>
515-
</widget>
516-
</item>
517-
<item row="2" column="0" >
518-
<widget class="QRadioButton" name="radioPluginType2" >
519-
<property name="enabled" >
520-
<bool>false</bool>
521-
</property>
522-
<property name="text" >
523-
<string>Show all plugins, even those marked as experimental</string>
524-
</property>
525-
</widget>
526-
</item>
527-
<item row="3" column="0" >
528-
<widget class="QLabel" name="label_2" >
529-
<property name="sizePolicy" >
530-
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
531-
<horstretch>0</horstretch>
532-
<verstretch>0</verstretch>
533-
</sizepolicy>
534-
</property>
535-
<property name="minimumSize" >
536-
<size>
537-
<width>0</width>
538-
<height>75</height>
539-
</size>
540-
</property>
541-
<property name="text" >
542-
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
543-
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
544-
p, li { white-space: pre-wrap; }
545-
&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
546-
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Note:&lt;/span> 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.&lt;/p>&lt;/body>&lt;/html></string>
547-
</property>
548-
<property name="textFormat" >
549-
<enum>Qt::RichText</enum>
550-
</property>
551-
<property name="alignment" >
552-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
553-
</property>
554-
<property name="wordWrap" >
555-
<bool>true</bool>
556-
</property>
557-
</widget>
558-
</item>
559-
</layout>
560-
</widget>
561-
</item>
562-
</layout>
563-
</widget>
564359
</widget>
565360
</item>
361+
<item row="1" column="0" >
362+
<layout class="QHBoxLayout" >
363+
<item>
364+
<widget class="QLabel" name="label_3" >
365+
<property name="whatsThis" >
366+
<string/>
367+
</property>
368+
<property name="text" >
369+
<string>The plugins will be installed to ~/.qgis/python/plugins</string>
370+
</property>
371+
</widget>
372+
</item>
373+
<item>
374+
<widget class="QPushButton" name="buttonClose" >
375+
<property name="sizePolicy" >
376+
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
377+
<horstretch>0</horstretch>
378+
<verstretch>0</verstretch>
379+
</sizepolicy>
380+
</property>
381+
<property name="toolTip" >
382+
<string>Close the Installer window</string>
383+
</property>
384+
<property name="whatsThis" >
385+
<string>Close the Installer window</string>
386+
</property>
387+
<property name="text" >
388+
<string>Close</string>
389+
</property>
390+
</widget>
391+
</item>
392+
</layout>
393+
</item>
566394
</layout>
567395
</widget>
568396
<tabstops>
@@ -576,14 +404,10 @@ p, li { white-space: pre-wrap; }
576404
<tabstop>buttonClose</tabstop>
577405
<tabstop>treeRepositories</tabstop>
578406
<tabstop>buttonFetchRepositories</tabstop>
407+
<tabstop>checkUpdates</tabstop>
579408
<tabstop>buttonAddRep</tabstop>
580409
<tabstop>buttonEditRep</tabstop>
581410
<tabstop>buttonDeleteRep</tabstop>
582-
<tabstop>checkUpdates</tabstop>
583-
<tabstop>comboInterval</tabstop>
584-
<tabstop>radioPluginType0</tabstop>
585-
<tabstop>radioPluginType1</tabstop>
586-
<tabstop>radioPluginType2</tabstop>
587411
</tabstops>
588412
<resources>
589413
<include location="resources.qrc" />

0 commit comments

Comments
 (0)
Please sign in to comment.