Removed unneeded plugin, now that this is built into Gramps

svn: r20027
This commit is contained in:
Doug Blank 2012-07-18 17:23:41 +00:00
parent aa4276602e
commit 828d1cd009
2 changed files with 0 additions and 136 deletions

View File

@ -164,20 +164,6 @@ register(GRAMPLET,
navtypes=["Person"],
)
register(GRAMPLET,
id="Plugin Manager",
name=_("Plugin Manager"),
description = _("Gramplet showing available third-party plugins (addons)"),
status = STABLE,
fname="pluginmanagergramplet.py",
height=300,
expand=True,
gramplet = 'PluginManagerGramplet',
gramplet_title=_("Plugin Manager"),
version="1.0.0",
gramps_target_version="3.5",
)
register(GRAMPLET,
id="Quick View",
name=_("Quick View"),

View File

@ -1,122 +0,0 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2009 Douglas S. Blank <doug.blank@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# $Id$
#------------------------------------------------------------------------
#
# Python modules
#
#------------------------------------------------------------------------
import urllib
#------------------------------------------------------------------------
#
# GRAMPS modules
#
#------------------------------------------------------------------------
from gen.plug import Gramplet
from gen.ggettext import sgettext as _
#------------------------------------------------------------------------
#
# PluginManagerGramplet class
#
#------------------------------------------------------------------------
class PluginManagerGramplet(Gramplet):
"""
Headlines News Gramplet reads the Headline News every hour.
"""
URL = "http://www.gramps-project.org/wiki/index.php?title=Plugins3.4&action=raw"
def init(self):
"""
Initializes the Gramplet
"""
self.set_use_markup(True)
def main(self):
"""
The main code of the Gramplet. (iterator)
"""
self.set_text(_("Reading") + " '%s'..." % self.URL)
yield True
fp = urllib.urlopen(self.URL)
state = "read"
headings = []
rows = []
row = []
for line in fp.readlines():
yield True
if line.startswith("|-") or line.startswith("|}"):
if row != []:
rows.append(row)
state = "row"
row = []
elif state == "row":
if line.startswith("!"):
headings.append(line[1:].strip())
elif line.startswith("|"):
row.append(line[1:].strip())
else:
state = "read"
types = dict([row[1], 1] for row in rows)
self.set_text("")
# name, type, ver, desc, use, rating, contact, download
for type in types:
self.render_text("<b>%s Plugins</b>\n" % _(type))
row_count = 1
for row in rows:
if type == row[1]:
if "|" in row[0][2:-2]:
link, text = row[0][2:-2].split("|", 1)
self.append_text("%d) " % row_count)
self.link(text, "WIKI", link)
self.append_text(" (%s)\n" % row[2]) # version
self.append_text(" %s\n" % row[3])
self.append_text(" [")
if row[-1].startswith("[["):
url, text = row[-1][2:-2].split("|", 1)
self.link("Download", "WIKI", url)
elif row[-1].startswith("["):
url, text = row[-1][1:-1].split(" ", 1)
self.link("Download", "URL", url)
else:
self.append_text("Download unavailable")
self.append_text("]\n\n")
row_count += 1
else:
text = row[0][2:-2]
self.append_text("%d) " % row_count)
self.link(text, "WIKI", text)
self.append_text(" (%s)\n" % row[2]) # version
self.append_text(" %s\n" % row[3])
self.append_text(" [")
if row[-1].startswith("[["):
url, text = row[-1][2:-2].split("|", 1)
self.link("Download", "WIKI", url)
elif row[-1].startswith("["):
url, text = row[-1][1:-1].split(" ", 1)
self.link("Download", "URL", url)
else:
self.append_text("Download unavailable")
self.append_text("]\n\n")
row_count += 1
self.append_text("\n", scroll_to="begin")