changeset 1873:9117dcbfd624

remove some unused code
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 11 Mar 2007 02:27:24 +0100
parents a58046e1490d
children c4eb073a9cca
files MoinMoin/action/info.py MoinMoin/parser/text_python.py MoinMoin/theme/__init__.py MoinMoin/util/web.py
diffstat 4 files changed, 4 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/info.py	Sun Mar 11 00:03:03 2007 +0100
+++ b/MoinMoin/action/info.py	Sun Mar 11 02:27:24 2007 +0100
@@ -94,19 +94,7 @@
 
         def render_action(text, query, **kw):
             kw.update(dict(rel='nofollow'))
-            if 0: # XXX diff button doesnt work
-                params_html = []
-                for k, v in query.items():
-                    params_html.append('<input type="hidden" name="%s" value="%s">' % (k, v))
-                params_html = ''.join(params_html)
-                html = '''
-<form>
-<input type="submit" value="%s">
-%s
-</form>
-''' % (text, params_html)
-            else:
-                html = page.link_to(request, text, querystr=query, **kw)
+            html = page.link_to(request, text, querystr=query, **kw)
             return html
 
         # read in the complete log of this page
--- a/MoinMoin/parser/text_python.py	Sun Mar 11 00:03:03 2007 +0100
+++ b/MoinMoin/parser/text_python.py	Sun Mar 11 02:27:24 2007 +0100
@@ -83,9 +83,6 @@
     def __call__(self, toktype, toktext, (srow,scol), (erow,ecol), line):
         """ Token handler.
         """
-        if 0: print "type", toktype, token.tok_name[toktype], "text", toktext, \
-                    "start", srow,scol, "end", erow,ecol, "<br>"
-
         # calculate new positions
         oldpos = self.pos
         newpos = self.lines[srow] + scol
--- a/MoinMoin/theme/__init__.py	Sun Mar 11 00:03:03 2007 +0100
+++ b/MoinMoin/theme/__init__.py	Sun Mar 11 02:27:24 2007 +0100
@@ -2,7 +2,7 @@
 """
     MoinMoin - Theme Package
 
-    @copyright: 2003-2006 by MoinMoin:ThomasWaldmann
+    @copyright: 2003-2007 by MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -521,15 +521,8 @@
             alt = alt % vars
         except KeyError, err:
             alt = 'KeyError: %s' % str(err)
-        if self.request:
-            alt = self.request.getText(alt, formatted=False)
-        try:
-            tag = self.request.formatter.image(src=img, alt=alt, width=w, height=h)
-        except AttributeError: # XXX FIXME if we have no formatter or no request 
-            tag = '<img src="%s" alt="%s" width="%s" height="%s">' % (
-                img, alt, w, h)
-            import warnings
-            warnings.warn("calling themes without correct request", DeprecationWarning)
+        alt = self.request.getText(alt, formatted=False)
+        tag = self.request.formatter.image(src=img, alt=alt, width=w, height=h)
         return tag
 
     def make_iconlink(self, which, d):
--- a/MoinMoin/util/web.py	Sun Mar 11 00:03:03 2007 +0100
+++ b/MoinMoin/util/web.py	Sun Mar 11 02:27:24 2007 +0100
@@ -25,16 +25,6 @@
         return result
 
 
-def getLinkIcon(request, formatter, scheme):
-    """ Get icon for fancy links, or '' if user doesn't want them.
-    """
-    if scheme in ["mailto", "news", "telnet", "ftp", "file"]:
-        icon = scheme
-    else:
-        icon = "www"
-
-    return request.theme.make_icon(icon)
-
 def makeSelection(name, values, selectedval=None, size=1):
     """ Make a HTML <select> element named `name` from a value list.
         The list can either be a list of strings, or a list of