Skip to content

Commit

Permalink
Updates for Borys and added some missing files
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9310 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Sep 12, 2008
1 parent dbcc266 commit bd070ee
Show file tree
Hide file tree
Showing 14 changed files with 269 additions and 66 deletions.
35 changes: 19 additions & 16 deletions python/plugins/plugin_installer/CMakeLists.txt
Expand Up @@ -2,30 +2,33 @@
# file or the ui change
SET(INSTALLER_FILES
dialog.py
fetchingbase.py
fetchingbase.ui
guibase.py
guibase.ui
gui.py
icon.xpm
__init__.py
installer_plugin.py
qgis_plugins.py
resources.py
repository_ui.py
repository_dialog.py
qgis-icon.png
installingbase.ui
fetchingbase.py
guibase.py
repositorybase.py
plugin_installer.png
unzip.py
installer_data.py
installer_gui.py
installer_plugin.py
installingbase.py
installingbase.ui
pluginerrorbase.py
pluginerrorbase.ui
installer_data.py
plugin_installer.png
PluginInstaller.png
qgis-icon.png
qgis_plugins.py
repoConnected.png
guibase.ui
pluginerrorbase.py
repoDisabled.png
repositorybase.py
repositorybase.ui
repository_dialog.py
repository_ui.py
repoUnavailable.png
resources.py
resources_rc.py
repoDisabled.png
unzip.py
)
INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/plugin_installer)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/__init__.py
Expand Up @@ -20,7 +20,7 @@ def author_name():
return "perrygeo, borysiasty"

def version():
return "Version 0.05.6"
return "Version 0.06.1"

def classFactory(iface):
from installer_plugin import InstallerPlugin
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/fetchingbase.py
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'fetchingbase.ui'
#
# Created: Sun Sep 7 16:22:19 2008
# Created: Fri Sep 12 19:21:37 2008
# by: PyQt4 UI code generator 4.3
#
# WARNING! All changes made in this file will be lost!
Expand Down
200 changes: 200 additions & 0 deletions python/plugins/plugin_installer/fetchingbase.ui
@@ -0,0 +1,200 @@
<ui version="4.0" >
<author>Matthew Perry, Borys Jurgiel</author>
<class>QgsPluginInstallerFetchingDialog</class>
<widget class="QDialog" name="QgsPluginInstallerFetchingDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>521</width>
<height>332</height>
</rect>
</property>
<property name="windowTitle" >
<string>Fetching repositories</string>
</property>
<property name="windowIcon" >
<iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
</property>
<layout class="QGridLayout" >
<item row="1" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>249</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label1" >
<property name="text" >
<string>Overall progress:</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QProgressBar" name="progressBar" >
<property name="value" >
<number>24</number>
</property>
<property name="alignment" >
<set>Qt::AlignHCenter</set>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string/>
</property>
</widget>
</item>
<item row="4" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>248</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0" >
<layout class="QHBoxLayout" >
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>140</width>
<height>27</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="buttonSkip" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>180</width>
<height>0</height>
</size>
</property>
<property name="focusPolicy" >
<enum>Qt::NoFocus</enum>
</property>
<property name="text" >
<string>Abort fetching</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
<property name="default" >
<bool>false</bool>
</property>
<property name="flat" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>140</width>
<height>27</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0" >
<widget class="QTreeWidget" name="treeWidget" >
<property name="enabled" >
<bool>true</bool>
</property>
<property name="horizontalScrollBarPolicy" >
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="showDropIndicator" stdset="0" >
<bool>false</bool>
</property>
<property name="selectionMode" >
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="horizontalScrollMode" >
<enum>QAbstractItemView::ScrollPerItem</enum>
</property>
<property name="rootIsDecorated" >
<bool>false</bool>
</property>
<property name="itemsExpandable" >
<bool>false</bool>
</property>
<column>
<property name="text" >
<string>Repository</string>
</property>
</column>
<column>
<property name="text" >
<string>State</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="resources.qrc" />
</resources>
<connections>
<connection>
<sender>buttonSkip</sender>
<signal>clicked()</signal>
<receiver>QgsPluginInstallerFetchingDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>350</x>
<y>321</y>
</hint>
<hint type="destinationlabel" >
<x>250</x>
<y>76</y>
</hint>
</hints>
</connection>
</connections>
</ui>
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/guibase.py
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'guibase.ui'
#
# Created: Sun Sep 7 21:28:01 2008
# Created: Fri Sep 12 19:21:37 2008
# by: PyQt4 UI code generator 4.3
#
# WARNING! All changes made in this file will be lost!
Expand Down
24 changes: 13 additions & 11 deletions python/plugins/plugin_installer/installer_data.py
Expand Up @@ -229,7 +229,6 @@ def killConnection(self, key):

# ----------------------------------------- #
def xmlDownloaded(self,nr,state):
#print reposName, nr, state
if not self.httpId.has_key(nr):
return
reposName = self.httpId[nr]
Expand Down Expand Up @@ -296,8 +295,8 @@ def all(self):


# ----------------------------------------- #
def firstByName(self, name):
plugins = [i for i in self.mPlugins if self.mPlugins[i]["name"] == name]
def keyByUrl(self, name):
plugins = [i for i in self.mPlugins if self.mPlugins[i]["url"] == name]
if plugins:
return plugins[0]
return None
Expand Down Expand Up @@ -420,6 +419,11 @@ def addPlugin(self, plugins):
self.mPlugins[key] = plugin # add the plugin if not present yet or if is newer than existing one


# ----------------------------------------- #
def remove(self, key):
del self.mPlugins[key]


# ----------------------------------------- #
def updatePlugin(self, key, readOnly):
try:
Expand Down Expand Up @@ -452,6 +456,11 @@ def updatePlugin(self, key, readOnly):
desc = ""
auth = ""
homepage = ""
if readOnly:
path = QgsApplication.pkgDataPath()
else:
path = QgsApplication.qgisSettingsDirPath()
path = QDir.cleanPath(unicode(path,"utf-8") + "python/plugins/" + key)
normVer = self.normalizeVersion(QString(ver))
plugin = {
"name" : nam,
Expand All @@ -461,7 +470,7 @@ def updatePlugin(self, key, readOnly):
"desc_repo" : "",
"author" : auth,
"homepage" : homepage,
"url" : "",
"url" : path,
"filename" : "",
"status" : stat,
"repository" : "",
Expand All @@ -478,10 +487,6 @@ def updatePlugin(self, key, readOnly):
self.mPlugins[key]["name"] = plugin["name"] # local name has higher priority, except invalid plugins
self.mPlugins[key]["version_inst"] = plugin["version_inst"]
self.mPlugins[key]["desc_local"] = plugin["desc_local"]
if plugin["author"]:
self.mPlugins[key]["author"] = plugin["author"] #local author name has higher priority, if exists
if plugin["homepage"]:
self.mPlugins[key]["homepage"] = plugin["homepage"] # local homepage adress has higher priority, if exists
# set status
#
# installed available status
Expand Down Expand Up @@ -509,7 +514,6 @@ def updatePlugin(self, key, readOnly):
# ----------------------------------------- #
def getAllInstalled(self):
""" update the mPlugins dict with alredy installed plugins """
#print "getting list of installed plugins"
# first, try to add the read-only plugins...
try:
pluginDir = QDir.cleanPath(unicode(QgsApplication.pkgDataPath(),'utf-8') + "/python/plugins")
Expand Down Expand Up @@ -537,7 +541,6 @@ def getAllInstalled(self):
# ----------------------------------------- #
def markNews(self):
""" mark all new plugins as new """
#print "marking the new plugins"
settings = QSettings()
seenPlugins = settings.value(seenPluginGroup, QVariant(QStringList(self.mPlugins.keys()))).toStringList()
if len(seenPlugins) > 0:
Expand All @@ -549,7 +552,6 @@ def markNews(self):
# ----------------------------------------- #
def updateSeenPluginsList(self):
""" update the list of all seen plugins """
#print "updating the list of seen plugins"
settings = QSettings()
seenPlugins = settings.value(seenPluginGroup, QVariant(QStringList(self.mPlugins.keys()))).toStringList()
for i in self.mPlugins.keys():
Expand Down

0 comments on commit bd070ee

Please sign in to comment.