oops, my bad...

On Sat, Aug 2, 2008 at 3:28 PM, Ed Leafe <[EMAIL PROTECTED]> wrote:
> dabo Commit
> Revision 4334
> Date: 2008-08-02 14:28:40 -0700 (Sat, 02 Aug 2008)
> Author: Ed
> Trac: http://svn.dabodev.com/trac/dabo/changeset/4334
>
> Changed:
> U   trunk/dabo/ui/uiwx/__init__.py
>
> Log:
> Replaced the recent commit that was wiped out by a subsequent commit.
>
> Removed the use of a key word as a variable name.
>
>
> Diff:
> Modified: trunk/dabo/ui/uiwx/__init__.py
> ===================================================================
> --- trunk/dabo/ui/uiwx/__init__.py      2008-08-02 21:02:04 UTC (rev 4333)
> +++ trunk/dabo/ui/uiwx/__init__.py      2008-08-02 21:28:40 UTC (rev 4334)
> @@ -987,40 +987,16 @@
>                        expanded += argSp
>                args = expanded
>                arglist = []
> -               tmplt = "%s Files (*.%s)|*.%s"
> -               fileDict = {"html" : "HTML",
> -                       "xml" : "XML",
> -                       "txt" : "Text",
> -                       "jpg" : "JPEG",
> -                       "gif" : "GIF",
> -                       "tif" : "TIFF",
> -                       "tiff" : "TIFF",
> -                       "png" : "PNG",
> -                       "ico" : "Icon",
> -                       "bmp" : "Bitmap" }
> -
> -               for a in args:
> -                       descrp = ext = ""
> -                       if a == "py":
> -                               fDesc = "Python Scripts (*.py)|*.py"
> -                       elif a == "*":
> -                               fDesc = "All Files (*)|*"
> -                       elif a == "fsxml":
> -                               fDesc = "Dabo FieldSpec Files 
> (*.fsxml)|*.fsxml"
> -                       elif a == "cnxml":
> -                               fDesc = "Dabo Connection Files 
> (*.cnxml)|*.cnxml"
> -                       elif a == "rfxml":
> -                               fDesc = "Dabo Report Format Files 
> (*.rfxml)|*.rfxml"
> -                       elif a == "cdxml":
> -                               fDesc = "Dabo Class Designer Files 
> (*.cdxml)|*.cdxml"
> -                       elif a == "mnxml":
> -                               fDesc = "Dabo Menu Designer Files 
> (*.mnxml)|*.mnxml"
> -                       else:
> -                               if a in fileDict:
> -                                       fDesc = tmplt % (fileDict[a], a, a)
> -                               else:
> -                                       fDesc = "%s files (*.%s)|*.%s" % 
> (a.upper(), a, a)
> -                       arglist.append(fDesc)
> +               fileDict = dabo.file_extensions
> +               fileDict.update(dabo.custom_extensions)
> +               tmplt = "%s (*.%s)|*.%s"
> +               normArgs = list(set([arg.lower() for arg in args]))
> +               for ftype in normArgs:
> +                       try:
> +                               fDesc = fileDict[ftype.lower()]
> +                       except KeyError:
> +                               fDesc = "%s Files" % ftype.upper()
> +                       arglist.append(tmplt % (fDesc, ftype, ftype))
>                ret = "|".join(arglist)
>        return ret
>
> @@ -1171,10 +1147,10 @@
>                                                binding = eval(fnc)
>                                        except NameError:
>                                                binding = fnc
> -                               type = menu._extractKey(itmatts, "MenuType", 
> "")
> +                               mtype = menu._extractKey(itmatts, "MenuType", 
> "")
>                                help = menu._extractKey(itmatts, "HelpText")
>                                menuItem = menu.append(cap, OnHit=binding, 
> help=help,
> -                                               picture=pic, special=special, 
> HotKey=hk, menutype=type)
> +                                               picture=pic, special=special, 
> HotKey=hk, menutype=mtype)
>                                if itmatts:
>                                        menuItem.setPropertiesFromAtts(itmatts,
>                                                        context={"form": form, 
> "app": dabo.dAppRef})
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to