| 1 | #-------------------------------------------------------------------------- |
| 2 | # This file is part of BKChem - a chemical drawing program |
| 3 | # Copyright (C) 2002-2009 Beda Kosata <[email protected]> |
| 4 | |
| 5 | # This program is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 2 of the License, or |
| 8 | # (at your option) any later version. |
| 9 | |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | |
| 15 | # Complete text of GNU GPL can be found in the file gpl.txt in the |
| 16 | # main directory of the program |
| 17 | |
| 18 | #-------------------------------------------------------------------------- |
| 19 | |
| 20 | """Set of dialogs used by BKChem. |
| 21 | |
| 22 | """ |
| 23 | |
| 24 | import osscip-python python python-stdlib 3.11 os/__init__: |
| 25 | import rescip-python python python-stdlib 3.11 re/__init__: |
| 26 | try: |
| 27 | import tkinterscip-python python python-stdlib 3.11 tkinter/__init__: as Tkinter |
| 28 | import tkinter.fontscip-python python python-stdlib 3.11 `tkinter.font`/__init__: as tkFont |
| 29 | import tkinter.messageboxscip-python python python-stdlib 3.11 `tkinter.messagebox`/__init__: as tkMessageBox |
| 30 | except ImportErrorscip-python python python-stdlib 3.11 builtins/ImportError#: |
| 31 | import Tkinter |
| 32 | import tkFont |
| 33 | import tkMessageBox |
| 34 | |
| 35 | import Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__: |
| 36 | import datascip-python python bkchem 0.14.0rc4 data/__init__: |
| 37 | import miscscip-python python bkchem 0.14.0rc4 misc/__init__: |
| 38 | import classesscip-python python bkchem 0.14.0rc4 classes/__init__: |
| 39 | import widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__: |
| 40 | import os_supportscip-python python bkchem 0.14.0rc4 os_support/__init__: |
| 41 | |
| 42 | from singleton_storescip-python python bkchem 0.14.0rc4 singleton_store/__init__: import Storescip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Store#, Screenscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Screen# |
| 43 | |
| 44 | |
| 45 | |
| 46 | ## SCALE DIALOG |
| 47 | |
| 48 | class scale_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#(objectscip-python python python-stdlib 3.11 builtins/object#): |
| 49 | """Dialog used to get ratio for scaling in percent. |
| 50 | |
| 51 | """ |
| 52 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self), parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(parent)): |
| 53 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#dialog. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#( parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(parent), |
| 54 | buttons=(_('OK'), _('Cancel')), |
| 55 | defaultbutton=_('OK'), |
| 56 | title=_('Scale'), |
| 57 | command=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().) |
| 58 | # X RATIO |
| 59 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Counterscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Counter#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 60 | labelpos = 'w', |
| 61 | label_text=_("Scale X (in %):"), |
| 62 | entryfield_value = 100, |
| 63 | entryfield_validate={ 'validator':'integer', 'min':0, 'max':100000}, |
| 64 | entry_width = 5, |
| 65 | entryfield_modifiedcommand = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self)._scalex_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scalex_changed()., |
| 66 | increment = 10, |
| 67 | datatype = 'integer') |
| 68 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..pack(pady=10, anchor='w', padx=10) |
| 69 | # Y RATIO |
| 70 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Counterscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Counter#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 71 | labelpos = 'w', |
| 72 | label_text=_("Scale Y (in %):"), |
| 73 | entryfield_value = 100, |
| 74 | entryfield_validate={ 'validator':'integer', 'min':0, 'max':100000}, |
| 75 | entry_width = 5, |
| 76 | entryfield_modifiedcommand = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self)._scaley_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scaley_changed()., |
| 77 | increment = 10, |
| 78 | datatype = 'integer') |
| 79 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..pack(pady=10, anchor='w', padx=10) |
| 80 | |
| 81 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 82 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_ratio_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio_entry. = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 83 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Preserve aspect ratio?'), |
| 84 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio., |
| 85 | commandscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(command) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self)._preserve_ratio_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().) |
| 86 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_ratio_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio_entry..packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)="w") |
| 87 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio..setscip-python python python-stdlib 3.11 builtins/set#( 1) |
| 88 | |
| 89 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_centersscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_centers. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 90 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_centers_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_centers_entry. = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 91 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Fix position of centers of objects?'), |
| 92 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_centersscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_centers.) |
| 93 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).preserve_centers_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_centers_entry..packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)="w") |
| 94 | |
| 95 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).scale_fontsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#scale_fonts. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 96 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).scale_fonts_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#scale_fonts_entry. = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 97 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Scale font and mark sizes?'), |
| 98 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).scale_fontsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#scale_fonts.) |
| 99 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).scale_fonts_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#scale_fonts_entry..packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)="w") |
| 100 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).scale_fontsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#scale_fonts..setscip-python python python-stdlib 3.11 builtins/set#( 1) |
| 101 | |
| 102 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#dialog..activatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#activate().() |
| 103 | |
| 104 | |
| 105 | def donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self), buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(button)): |
| 106 | """called on dialog exit""" |
| 107 | if not buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(button) or buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(button) == _('Cancel'): |
| 108 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).resultscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#result. = None |
| 109 | elif not (selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..valid() and selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..valid()) : |
| 110 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).resultscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#result. = () |
| 111 | else: |
| 112 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).resultscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#result. = (floatscip-python python python-stdlib 3.11 builtins/float#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..get()), floatscip-python python python-stdlib 3.11 builtins/float#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..get())) #, self.preserve_center.get()) |
| 113 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).preserve_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().(): |
| 114 | # x is significant if ratio should be preserved |
| 115 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).resultscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#result. = (selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).resultscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#result.[0], selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).resultscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#result.[0]) |
| 116 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#done().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#dialog..deactivatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#deactivate().() |
| 117 | |
| 118 | |
| 119 | def _scalex_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scalex_changed().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scalex_changed().(self)): |
| 120 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scalex_changed().(self).preserve_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().(): |
| 121 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scalex_changed().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..get() != selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scalex_changed().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..get(): |
| 122 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scalex_changed().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..setentry( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scalex_changed().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..get()) |
| 123 | |
| 124 | |
| 125 | def _scaley_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scaley_changed().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scaley_changed().(self)): |
| 126 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scaley_changed().(self).preserve_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().(): |
| 127 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scaley_changed().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..get() != selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scaley_changed().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..get(): |
| 128 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scaley_changed().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..setentry( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_scaley_changed().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..get()) |
| 129 | |
| 130 | |
| 131 | def _preserve_ratio_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self)): |
| 132 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self).preserve_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#preserve_ratio..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().(): |
| 133 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..get() != selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..get(): |
| 134 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..get() == '100': |
| 135 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..setentry( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..get()) |
| 136 | else: |
| 137 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self).entryyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryy..setentry( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#_preserve_ratio_changed().(self).entryxscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/scale_dialog#entryx..get()) |
| 138 | |
| 139 | |
| 140 | |
| 141 | ## CONFIG DIALOG |
| 142 | |
| 143 | class config_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#(objectscip-python python python-stdlib 3.11 builtins/object#): |
| 144 | """Items configuration. |
| 145 | |
| 146 | """ |
| 147 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self), parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(parent), itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items)): |
| 148 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#items. = itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) |
| 149 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).changes_madescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#changes_made. = 0 |
| 150 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#parent. = parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(parent) |
| 151 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#dialog. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#( parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(parent), |
| 152 | buttons=(_('OK'), _('Cancel')), |
| 153 | defaultbutton=_('OK'), |
| 154 | title=_('Configuration'), |
| 155 | command=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done()., |
| 156 | master='parent') |
| 157 | #parent.bind_all( "<Button-1>", self.raise_me, add='+') |
| 158 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#pages. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.NoteBookscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().()) |
| 159 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#pages..pack( anchor='w', pady=0, padx=0, fill='both', expand=1) |
| 160 | |
| 161 | # create pages for different item types |
| 162 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_page. = None |
| 163 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).bond_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#bond_page. = None |
| 164 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_page. = None |
| 165 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).text_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#text_page. = None |
| 166 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).plus_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#plus_page. = None |
| 167 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).font_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_page. = None |
| 168 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).common_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#common_page. = None |
| 169 | arrows = [] |
| 170 | for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items): |
| 171 | if o.object_type == 'point': |
| 172 | itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items).remove( o) |
| 173 | if o.arrow not in arrows: |
| 174 | arrows.appendscip-python python python-stdlib 3.11 builtins/list#append().( o.arrow) |
| 175 | itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) += arrows |
| 176 | types = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.object_type for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items)]) |
| 177 | |
| 178 | if 'atom' in types: |
| 179 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_page. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().(_('Atom')) |
| 180 | # charge |
| 181 | charges = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.charge for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) if hasattr( o, 'charge')]) |
| 182 | if len( charges) == 1: |
| 183 | charge = charges[0] |
| 184 | else: |
| 185 | charge = '' |
| 186 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_chargescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_charge. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Counterscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Counter#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_page., |
| 187 | labelpos = 'w', |
| 188 | label_text = _('Charge'), |
| 189 | entryfield_value = charge, |
| 190 | entryfield_validate={ 'validator':'integer', 'min':-4, 'max':4}, |
| 191 | entry_width = 3, |
| 192 | increment = 1, |
| 193 | datatype = 'integer') |
| 194 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_chargescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_charge..pack( anchor='nw', padx=10, pady=5) |
| 195 | # show? |
| 196 | shows = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.show for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) if hasattr( o, 'show')]) |
| 197 | if len( shows) == 1: |
| 198 | show = intscip-python python python-stdlib 3.11 builtins/int#( shows[0]) |
| 199 | else: |
| 200 | show = 2 # means the show should be preserved as is |
| 201 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_showscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_show. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.OptionMenuscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_page., |
| 202 | labelpos = 'nw', |
| 203 | label_text = _('Atom name'), |
| 204 | items = (_("don't show"), _("show"), ""), |
| 205 | initialitem = show) |
| 206 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_showscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_show..pack( anchor = 'nw') |
| 207 | # positioning |
| 208 | poss = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.pos for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) if o.object_type == 'atom']) |
| 209 | if not poss: |
| 210 | pos = None |
| 211 | elif len( poss) == 1 and poss[0]: |
| 212 | pos = ['center-first', 'center-last'].indexscip-python python python-stdlib 3.11 builtins/list#index().( poss[0]) |
| 213 | else: |
| 214 | pos = 2 # means the centering should be preserved as is |
| 215 | if pos is None: |
| 216 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_posscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_pos. = None |
| 217 | else: |
| 218 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_posscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_pos. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.OptionMenuscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_page., |
| 219 | labelpos = 'nw', |
| 220 | label_text = _('Atom positioning'), |
| 221 | items = (_("center first letter"), _("center last letter"), ""), |
| 222 | initialitem = pos) |
| 223 | |
| 224 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_posscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_pos..pack( anchor = 'nw') |
| 225 | # show hydrogens |
| 226 | shows = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.show_hydrogens for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) if o.object_type == 'atom']) |
| 227 | if len( shows) == 1: |
| 228 | show = shows[0] |
| 229 | else: |
| 230 | show = 2 # means the show should be preserved as is |
| 231 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_show_hscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_show_h. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.OptionMenuscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_page., |
| 232 | labelpos = 'nw', |
| 233 | label_text = _('Hydrogens'), |
| 234 | items = (_("off"), _("on"), ""), |
| 235 | initialitem = show) |
| 236 | |
| 237 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).atom_show_hscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_show_h..pack( anchor = 'nw') |
| 238 | |
| 239 | # marks |
| 240 | #self.marks = widgets.GraphicalAngleChooser( self.atom_page, 270) |
| 241 | #self.marks.pack() |
| 242 | |
| 243 | # BOND |
| 244 | if 'bond' in types: |
| 245 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).bond_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#bond_page. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().(_('Bond')) |
| 246 | # bond_widths (former distances) |
| 247 | dists = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( mapscip-python python python-stdlib 3.11 builtins/map#( abs, [o.bond_width for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) if o.object_type == 'bond'])) |
| 248 | if len( dists) == 1: |
| 249 | dist = dists[0] |
| 250 | else: |
| 251 | dist = '' |
| 252 | if not miscscip-python python bkchem 0.14.0rc4 misc/__init__:.split_number_and_unitscip-python python bkchem 0.14.0rc4 `bkchem.misc`/split_number_and_unit().( dist)[1]: |
| 253 | dist = strscip-python python python-stdlib 3.11 builtins/str#( dist) + 'px' |
| 254 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).bond_distscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#bond_dist. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.WidthChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).bond_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#bond_page., dist, labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#__init__().(label)=_('Bond width')) |
| 255 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).bond_distscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#bond_dist..pack( anchor='ne', padx=10, pady=5) |
| 256 | |
| 257 | # wedge_widths |
| 258 | dists = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( mapscip-python python python-stdlib 3.11 builtins/map#( abs, [o.wedge_width for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) if o.object_type == 'bond'])) |
| 259 | if len( dists) == 1: |
| 260 | dist = dists[0] |
| 261 | else: |
| 262 | dist = '' |
| 263 | if not miscscip-python python bkchem 0.14.0rc4 misc/__init__:.split_number_and_unitscip-python python bkchem 0.14.0rc4 `bkchem.misc`/split_number_and_unit().( dist)[1]: |
| 264 | dist = strscip-python python python-stdlib 3.11 builtins/str#( dist) + 'px' |
| 265 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).wedge_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#wedge_width. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.WidthChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).bond_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#bond_page., dist, labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#__init__().(label)=_('Wedge/Hatch width')) |
| 266 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).wedge_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#wedge_width..pack( anchor='ne', padx=10, pady=5) |
| 267 | |
| 268 | # double bond length ratio |
| 269 | ratios = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.double_length_ratio for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) if o.object_type == 'bond']) |
| 270 | if len( ratios) == 1: |
| 271 | ratio = ratios[0] |
| 272 | else: |
| 273 | ratio = '' |
| 274 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).double_length_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#double_length_ratio. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.RatioCounterscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/RatioCounter#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).bond_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#bond_page., |
| 275 | ratio, |
| 276 | labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/RatioCounter#__init__().(label)=_('Double-bond length ratio')) |
| 277 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).double_length_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#double_length_ratio..pack( anchor='nw', padx=10, pady=5) |
| 278 | |
| 279 | # ARROW |
| 280 | if 'arrow' in types: |
| 281 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_page. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().(_('Arrow')) |
| 282 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_end_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end_changed. = 0 |
| 283 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_start_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start_changed. = 0 |
| 284 | arrow_items = [o for o in itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items) if o.object_type == 'arrow'] |
| 285 | |
| 286 | # arrow start pins |
| 287 | arrow_starts = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.get_pins()[0] for o in arrow_items]) |
| 288 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_startscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 289 | if len( arrow_starts) == 1: |
| 290 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_startscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start..setscip-python python python-stdlib 3.11 builtins/set#( arrow_starts[0]) |
| 291 | else: |
| 292 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_startscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start..setscip-python python python-stdlib 3.11 builtins/set#( 0) |
| 293 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_start_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start_entry. = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_page., |
| 294 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Arrow-head on start'), |
| 295 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_startscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start., |
| 296 | commandscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(command) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self)._arrow_start_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_arrow_start_changed().) |
| 297 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_start_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start_entry..packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)='w') |
| 298 | |
| 299 | # arrow end pins |
| 300 | arrow_ends = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.get_pins()[1] for o in arrow_items]) |
| 301 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_endscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 302 | if len( arrow_ends) == 1: |
| 303 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_endscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end..setscip-python python python-stdlib 3.11 builtins/set#( arrow_ends[0]) |
| 304 | else: |
| 305 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_endscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end..setscip-python python python-stdlib 3.11 builtins/set#( 0) |
| 306 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_end_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end_entry. = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_page., |
| 307 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Arrow-head on end'), |
| 308 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_endscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end., |
| 309 | commandscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(command) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self)._arrow_end_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_arrow_end_changed().) |
| 310 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_end_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end_entry..packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)='w') |
| 311 | |
| 312 | # spline? |
| 313 | splines = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.spline for o in arrow_items]) |
| 314 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).splinescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 315 | if len( splines) == 1: |
| 316 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).splinescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline..setscip-python python python-stdlib 3.11 builtins/set#( splines[0]) |
| 317 | else: |
| 318 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).splinescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline..setscip-python python python-stdlib 3.11 builtins/set#( 0) |
| 319 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).spline_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline_entry. = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).arrow_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_page., |
| 320 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Spline arrow'), |
| 321 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).splinescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline., |
| 322 | commandscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(command) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self)._spline_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_spline_changed().) |
| 323 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).spline_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline_changed. = 0 |
| 324 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).spline_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline_entry..packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)='w') |
| 325 | |
| 326 | # TEXTS |
| 327 | |
| 328 | # PLUS |
| 329 | |
| 330 | # FONT |
| 331 | font_items = listscip-python python python-stdlib 3.11 builtins/list#(filterscip-python python python-stdlib 3.11 builtins/filter#(lambda x: hasattr(x, 'font_family'), itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items))) |
| 332 | if font_items: |
| 333 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).font_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_page. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().(_('Font')) |
| 334 | |
| 335 | sizes = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.font_size for o in font_items]) |
| 336 | if len( sizes) == 1: |
| 337 | size = sizes[0] |
| 338 | else: |
| 339 | size = '' |
| 340 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).font_sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_size. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.FontSizeChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/FontSizeChooser#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).font_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_page., size) |
| 341 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).font_sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_size..pack( anchor = 'nw') |
| 342 | |
| 343 | used_families = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.font_family for o in font_items]) |
| 344 | if len( used_families) == 1: |
| 345 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).used_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#used_family. = used_families[0] |
| 346 | else: |
| 347 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).used_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#used_family. = '' |
| 348 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_family. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.FontFamilyChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/FontFamilyChooser#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).font_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_page., selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).used_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#used_family.) |
| 349 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_family..pack( anchor="nw", side = 'bottom') |
| 350 | |
| 351 | # COMMON |
| 352 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).common_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#common_page. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().(_('Common')) |
| 353 | line_items = listscip-python python python-stdlib 3.11 builtins/list#(filterscip-python python python-stdlib 3.11 builtins/filter#(lambda x: hasattr(x, 'line_width'), itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items))) |
| 354 | if line_items: |
| 355 | widths = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.line_width for o in line_items]) |
| 356 | if len( widths) == 1: |
| 357 | width = widths[0] |
| 358 | else: |
| 359 | width = '' |
| 360 | if not miscscip-python python bkchem 0.14.0rc4 misc/__init__:.split_number_and_unitscip-python python bkchem 0.14.0rc4 `bkchem.misc`/split_number_and_unit().( width)[1]: |
| 361 | width = strscip-python python python-stdlib 3.11 builtins/str#( width) + 'px' |
| 362 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).line_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#line_width. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.WidthChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).common_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#common_page., width, labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#__init__().(label)=_('Line width')) |
| 363 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).line_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#line_width..pack( anchor='nw', padx=10, pady=5) |
| 364 | |
| 365 | line_color_items = listscip-python python python-stdlib 3.11 builtins/list#(filterscip-python python python-stdlib 3.11 builtins/filter#(lambda x: hasattr(x, 'line_color'), itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items))) |
| 366 | if line_color_items: |
| 367 | lines = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.line_color for o in line_color_items]) |
| 368 | if len( lines) == 1: |
| 369 | line = lines[0] |
| 370 | else: |
| 371 | line = None |
| 372 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).line_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#line_color. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.ColorButtonWithTransparencyCheckerscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).common_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#common_page., colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#__init__().(color)=line, textscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#__init__().(text)=_("Line color")) |
| 373 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).line_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#line_color..packscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#pack().( anchor='nw', padx=10, pady=10) |
| 374 | |
| 375 | area_color_items = listscip-python python python-stdlib 3.11 builtins/list#(filterscip-python python python-stdlib 3.11 builtins/filter#(lambda x: hasattr(x, 'area_color'), itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(items))) |
| 376 | if area_color_items: |
| 377 | areas = miscscip-python python bkchem 0.14.0rc4 misc/__init__:.filter_uniquescip-python python bkchem 0.14.0rc4 `bkchem.misc`/filter_unique().( [o.area_color for o in area_color_items]) |
| 378 | if len( areas) == 1: |
| 379 | area = areas[0] |
| 380 | else: |
| 381 | area = None |
| 382 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).area_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#area_color. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.ColorButtonWithTransparencyCheckerscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).common_pagescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#common_page., colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#__init__().(color)=area, textscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#__init__().(text)=_("Area color")) |
| 383 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).area_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#area_color..packscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#pack().( anchor='nw', padx=10, pady=5) |
| 384 | |
| 385 | |
| 386 | # RUN IT ALL |
| 387 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#pages..setnaturalsizescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#setnaturalsize().() |
| 388 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#dialog..activatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#activate().( globalModescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#activate().(globalMode)=0) |
| 389 | |
| 390 | |
| 391 | def donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self), buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(button)): |
| 392 | """called on dialog exit""" |
| 393 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#dialog..deactivatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#deactivate().() |
| 394 | if buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(button) != _('OK'): |
| 395 | pass |
| 396 | else: |
| 397 | #print(self.marks.get()) |
| 398 | # apply changes |
| 399 | for o in selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#items.: |
| 400 | change = 0 |
| 401 | # ATOM |
| 402 | if o.object_type == 'atom': |
| 403 | a = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).atom_showscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_show..indexscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#index().( Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.SELECTscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/SELECT.) |
| 404 | if a != 2: |
| 405 | o.show = a |
| 406 | change = 1 |
| 407 | # positionning |
| 408 | a = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).atom_posscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_pos..indexscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#index().( Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.SELECTscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/SELECT.) |
| 409 | if a != 2: |
| 410 | o.pos = ('center-first', 'center-last')[ a] |
| 411 | change = 1 |
| 412 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).atom_chargescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_charge..get(): |
| 413 | a = intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).atom_chargescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_charge..get()) |
| 414 | if hasattr( o, 'charge') and o.charge != a: |
| 415 | o.charge = a |
| 416 | change = 1 |
| 417 | # hydrogens |
| 418 | a = intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).atom_show_hscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#atom_show_h..indexscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#index().( Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.SELECTscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/SELECT.)) |
| 419 | if a != 2: |
| 420 | o.show_hydrogens = a |
| 421 | change = 1 |
| 422 | # font is in common now |
| 423 | # BOND |
| 424 | elif o.object_type == 'bond': |
| 425 | # width is in common now |
| 426 | # bond_width |
| 427 | d = Screenscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Screen#.any_to_pxscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Screen#any_to_px().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).bond_distscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#bond_dist..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ValueWithUnitParent#getvalue().()) |
| 428 | if d: |
| 429 | if d != abs( o.bond_width): |
| 430 | o.bond_width = d * miscscip-python python bkchem 0.14.0rc4 misc/__init__:.signumscip-python python bkchem 0.14.0rc4 `bkchem.misc`/signum().( o.bond_width) |
| 431 | change = 1 |
| 432 | # wedge_width |
| 433 | d = Screenscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Screen#.any_to_pxscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Screen#any_to_px().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).wedge_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#wedge_width..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ValueWithUnitParent#getvalue().()) |
| 434 | if d: |
| 435 | if d != o.wedge_width: |
| 436 | o.wedge_width = d |
| 437 | change = 1 |
| 438 | # ratio |
| 439 | ratio = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).double_length_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#double_length_ratio..getvalue() |
| 440 | if ratio: |
| 441 | ratio = floatscip-python python python-stdlib 3.11 builtins/float#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).double_length_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#double_length_ratio..getvalue()) |
| 442 | if ratio != o.double_length_ratio: |
| 443 | o.double_length_ratio = ratio |
| 444 | change = 1 |
| 445 | |
| 446 | # ARROW - most is in common now |
| 447 | elif o.object_type == 'arrow': |
| 448 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).arrow_start_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start_changed.: |
| 449 | o.set_pins( start = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).arrow_startscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().()) |
| 450 | change = 1 |
| 451 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).arrow_end_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end_changed.: |
| 452 | o.set_pins( end = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).arrow_endscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().()) |
| 453 | change = 1 |
| 454 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).spline_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline_changed.: |
| 455 | o.spline = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).splinescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().() |
| 456 | change = 1 |
| 457 | |
| 458 | # TEXT - all is in common now |
| 459 | # PLUS - all is in common now |
| 460 | # VECTOR - all is in common now |
| 461 | |
| 462 | # COMMON PROPERTIES |
| 463 | # LINE COLOR |
| 464 | if hasattr( o, 'line_color') and selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).line_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#line_color..colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#color().: |
| 465 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).line_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#line_color..colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#color(). != o.line_color: |
| 466 | o.line_color = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).line_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#line_color..colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#color(). |
| 467 | change = 1 |
| 468 | # AREA COLOR |
| 469 | if hasattr( o, 'area_color') and selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).area_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#area_color..colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#color().: |
| 470 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).area_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#area_color..colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#color(). != o.area_color: |
| 471 | o.area_color = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).area_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#area_color..colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#color(). |
| 472 | change = 1 |
| 473 | # LINE WIDTH |
| 474 | if hasattr( o, 'line_width'): |
| 475 | w = Screenscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Screen#.any_to_pxscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Screen#any_to_px().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).line_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#line_width..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ValueWithUnitParent#getvalue().()) |
| 476 | if w: |
| 477 | if w != o.line_width: |
| 478 | o.line_width = w |
| 479 | change = 1 |
| 480 | # FONT |
| 481 | if hasattr( o, 'font_family'): |
| 482 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).font_sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_size..get(): |
| 483 | a = intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).font_sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_size..get()) |
| 484 | o.font_size = a |
| 485 | change = 1 |
| 486 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_family..getcurselectionscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#getcurselection().() and selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_family..getcurselectionscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#getcurselection().()[0] != selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).used_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#used_family.: |
| 487 | a = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#font_family..getcurselectionscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#getcurselection().()[0] |
| 488 | o.font_family = a |
| 489 | change = 1 |
| 490 | |
| 491 | # APPLY THE CHANGES |
| 492 | if change: |
| 493 | o.redraw() |
| 494 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).changes_madescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#changes_made. = 1 |
| 495 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#done().(self).cleanupscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#cleanup().() |
| 496 | |
| 497 | |
| 498 | def _arrow_end_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_arrow_end_changed().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_arrow_end_changed().(self)): |
| 499 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_arrow_end_changed().(self).arrow_end_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_end_changed. = 1 |
| 500 | |
| 501 | |
| 502 | def _arrow_start_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_arrow_start_changed().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_arrow_start_changed().(self)): |
| 503 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_arrow_start_changed().(self).arrow_start_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#arrow_start_changed. = 1 |
| 504 | |
| 505 | |
| 506 | def _spline_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_spline_changed().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_spline_changed().(self)): |
| 507 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#_spline_changed().(self).spline_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#spline_changed. = 1 |
| 508 | |
| 509 | |
| 510 | def raise_mescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#raise_me().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#raise_me().(self), eventscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#raise_me().(event)): |
| 511 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#raise_me().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#dialog..tkraise() |
| 512 | |
| 513 | |
| 514 | def cleanupscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#cleanup().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/config_dialog#cleanup().(self)): |
| 515 | pass |
| 516 | #self.parent.unbind_all( "<Button-1>") |
| 517 | |
| 518 | |
| 519 | |
| 520 | ## -------------------- FILE PROPERTIES DIALOG -------------------- |
| 521 | |
| 522 | class file_properties_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#(objectscip-python python python-stdlib 3.11 builtins/object#): |
| 523 | |
| 524 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(self), parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(parent), paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(paper)): |
| 525 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#parent. = parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(parent) |
| 526 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper. = paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(paper) |
| 527 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#dialog. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#( parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(parent), |
| 528 | buttons=(_('OK'), _('Cancel')), |
| 529 | defaultbutton=_('OK'), |
| 530 | title=_('File properties'), |
| 531 | command=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(self).donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done()., |
| 532 | master='parent') |
| 533 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(self).drawscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().() |
| 534 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#dialog..activatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#activate().() |
| 535 | |
| 536 | |
| 537 | def drawscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self)): |
| 538 | paper_frame = Tkinter.Framescip-python python python-stdlib 3.11 tkinter/Frame#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 539 | bdscip-python python python-stdlib 3.11 tkinter/Frame#__init__().(bd)=2, |
| 540 | reliefscip-python python python-stdlib 3.11 tkinter/Frame#__init__().(relief)="groove") |
| 541 | paper_frame.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=10, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=10, anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)="n", fillscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(fill)="x") |
| 542 | |
| 543 | # paper type |
| 544 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper.._paper_properties['type'] == 'custom': |
| 545 | t = _('Custom') |
| 546 | else: |
| 547 | t = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper.._paper_properties['type'] |
| 548 | paper_types = sortedscip-python python python-stdlib 3.11 builtins/sorted().(datascip-python python bkchem 0.14.0rc4 data/__init__:.paper_typesscip-python python bkchem 0.14.0rc4 `bkchem.data`/paper_types..keysscip-python python python-stdlib 3.11 builtins/dict#keys().()) |
| 549 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paper_type_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_type_chooser. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.OptionMenuscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#( paper_frame, |
| 550 | items=paper_types, #+[_('Custom')], |
| 551 | initialitem = t, |
| 552 | labelpos = 'w', |
| 553 | label_text = _('Paper size')+':', |
| 554 | menubutton_width = 10) |
| 555 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paper_type_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_type_chooser..pack( anchor='w', padx=5, pady=5) |
| 556 | # paper orientation |
| 557 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_orientation_chooser. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.RadioSelectscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#( paper_frame, |
| 558 | buttontype='radiobutton', |
| 559 | orient='vertical', |
| 560 | pady=0) |
| 561 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_orientation_chooser..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().(_('Portrait')) |
| 562 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_orientation_chooser..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().(_('Landscape')) |
| 563 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_orientation_chooser..pack( anchor='w', padx=5, pady=5) |
| 564 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper.._paper_properties['orientation'] == 'portrait': |
| 565 | i = 0 |
| 566 | else: |
| 567 | i = 1 |
| 568 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_orientation_chooser..invokescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#invoke().( i) |
| 569 | |
| 570 | # full svg or just the filled part |
| 571 | crop_frame = Tkinter.Framescip-python python python-stdlib 3.11 tkinter/Frame#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 572 | bdscip-python python python-stdlib 3.11 tkinter/Frame#__init__().(bd)=2, |
| 573 | reliefscip-python python python-stdlib 3.11 tkinter/Frame#__init__().(relief)="groove") |
| 574 | crop_frame.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=10, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=10, anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)="n", fillscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(fill)="x") |
| 575 | |
| 576 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).crop_paper_in_svgscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#crop_paper_in_svg. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 577 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).crop_paper_in_svgscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#crop_paper_in_svg..setscip-python python python-stdlib 3.11 builtins/set#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper..get_paper_property( 'crop_svg')) |
| 578 | crop = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( crop_frame, |
| 579 | anchorscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(anchor)="n", |
| 580 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Auto crop image in SVG?\n(applies to some other exports as well)'), |
| 581 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).crop_paper_in_svgscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#crop_paper_in_svg., |
| 582 | commandscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(command)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).crop_paper_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#crop_paper_changed().) |
| 583 | crop.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)='w', padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=5, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=5) |
| 584 | # margin for cropping |
| 585 | margin = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper..get_paper_property( 'crop_margin') |
| 586 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).margin_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#margin_entry. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Counterscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Counter#( crop_frame, |
| 587 | labelpos = 'w', |
| 588 | label_text=_("Margin for cropped image (in pixels):"), |
| 589 | entryfield_value = margin, |
| 590 | entryfield_validate={ 'validator':'integer', 'min':0, 'max':1000}, |
| 591 | entry_width = 5, |
| 592 | increment = 5, |
| 593 | datatype = 'integer') |
| 594 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).margin_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#margin_entry..pack( anchor='n', padx=5, pady=5) |
| 595 | # use real minus ? |
| 596 | minus_frame = Tkinter.Framescip-python python python-stdlib 3.11 tkinter/Frame#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 597 | bdscip-python python python-stdlib 3.11 tkinter/Frame#__init__().(bd)=2, |
| 598 | reliefscip-python python python-stdlib 3.11 tkinter/Frame#__init__().(relief)="groove") |
| 599 | minus_frame.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=10, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=10, anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)="n", fillscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(fill)="x") |
| 600 | |
| 601 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#use_real_minus. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 602 | use_real_minus_button = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( minus_frame, |
| 603 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Use real minus character (instead of hyphen)?'), |
| 604 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#use_real_minus.) |
| 605 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#use_real_minus..setscip-python python python-stdlib 3.11 builtins/set#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper..get_paper_property( 'use_real_minus')) |
| 606 | use_real_minus_button.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)='w', padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=5, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=5) |
| 607 | |
| 608 | # replace hyphens with minuses in export? |
| 609 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).replace_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#replace_minus. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 610 | replace_minus_button = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( minus_frame, |
| 611 | textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Replace hyphens with minus in SVG export?'), |
| 612 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable) = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).replace_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#replace_minus.) |
| 613 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).replace_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#replace_minus..setscip-python python python-stdlib 3.11 builtins/set#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper..get_paper_property( 'replace_minus')) |
| 614 | # ***HACK*** |
| 615 | #replace_minus_button.pack( anchor='w', padx=5, pady=5) |
| 616 | |
| 617 | |
| 618 | def donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self), buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(button)): |
| 619 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#dialog..deactivatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#deactivate().() |
| 620 | if buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(button) == _('OK'): |
| 621 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_orientation_chooser..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#getvalue().() == _('Portrait'): |
| 622 | o = 'portrait' |
| 623 | else: |
| 624 | o = 'landscape' |
| 625 | type = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).paper_type_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper_type_chooser..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#getvalue().() |
| 626 | if type == _('Custom'): |
| 627 | type = 'custom' |
| 628 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper..set_paper_properties( type=type, |
| 629 | orientation=o, |
| 630 | crop_svg=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).crop_paper_in_svgscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#crop_paper_in_svg..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().(), |
| 631 | crop_margin=intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).margin_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#margin_entry..getvalue()), |
| 632 | use_real_minus=intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#use_real_minus..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().()), |
| 633 | replace_minus=intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).replace_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#replace_minus..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().())) |
| 634 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#done().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#paper..changes_made = 1 |
| 635 | |
| 636 | |
| 637 | def crop_paper_changedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#crop_paper_changed().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/file_properties_dialog#crop_paper_changed().(self)): |
| 638 | return |
| 639 | val = self.crop_paper_in_svg.get() |
| 640 | if not val: |
| 641 | self.margin_entry.configure( entry_state="disabled") |
| 642 | else: |
| 643 | self.margin_entry.configure( entry_state="normal") |
| 644 | |
| 645 | |
| 646 | |
| 647 | ##-------------------- STANDARD VALUES DIALOG -------------------- |
| 648 | |
| 649 | class standard_values_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#(objectscip-python python python-stdlib 3.11 builtins/object#): |
| 650 | |
| 651 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self), parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(parent), standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(standard)): |
| 652 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#parent. = parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(parent) |
| 653 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard. = standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(standard) |
| 654 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#dialog. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#( parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(parent), |
| 655 | buttons=(_('OK'), _('Cancel'), _('Save')), |
| 656 | defaultbutton=_('OK'), |
| 657 | title=_('Standard values'), |
| 658 | command=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self).donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done()., |
| 659 | master='parent') |
| 660 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self).bodyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#body. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().() |
| 661 | #self.body.pack( fill='both', expand=1) |
| 662 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self).drawscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().() |
| 663 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#dialog..activatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#activate().() |
| 664 | |
| 665 | |
| 666 | def drawscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self)): |
| 667 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#pages. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.NoteBookscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).bodyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#body.) |
| 668 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#pages..pack( anchor='w', pady=0, padx=0, fill='both', expand=1) |
| 669 | # COMMON |
| 670 | common_page = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().( _('Common')) |
| 671 | # LINE |
| 672 | line_group = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Groupscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Group#( common_page, tag_text=_('Line')) |
| 673 | line_group.pack( fill='x') |
| 674 | # line width |
| 675 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).line_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#line_width. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.WidthChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#( line_group.interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Group#interior().(), selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..line_width, labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#__init__().(label)=_('Line width')) |
| 676 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).line_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#line_width..pack( anchor='nw', padx=10, pady=5) |
| 677 | # COLORS |
| 678 | color_group = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Groupscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Group#( common_page, tag_text=_('Color')) |
| 679 | color_group.pack( fill='x') |
| 680 | # line color |
| 681 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).line_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#line_color. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.ColorButtonWithTransparencyCheckerscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#( color_group.interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Group#interior().(), colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#__init__().(color)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..line_color, textscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#__init__().(text)=_("Line color")) |
| 682 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).line_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#line_color..packscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#pack().( side='left', padx=10, pady=5) |
| 683 | # area color |
| 684 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).area_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#area_color. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.ColorButtonWithTransparencyCheckerscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#( color_group.interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Group#interior().(), colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#__init__().(color)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..area_color, textscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#__init__().(text)=_("Area color")) |
| 685 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).area_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#area_color..packscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#pack().( side='right', padx=10, pady=5) |
| 686 | |
| 687 | # ATOM |
| 688 | atom_group = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().( _('Atom')) |
| 689 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).show_hydrogensscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#show_hydrogens. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 690 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).show_hydrogensscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#show_hydrogens..setscip-python python python-stdlib 3.11 builtins/set#( intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..show_hydrogens)) |
| 691 | sh = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( atom_group, textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Show hydrogens on visible atoms'), variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).show_hydrogensscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#show_hydrogens.) |
| 692 | sh.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)='w', padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=10, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=10) |
| 693 | |
| 694 | # BOND |
| 695 | bond_group = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().( _("Bond")) #Pmw.Group( self.body, tag_text=_('Bond')) |
| 696 | # bond width |
| 697 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).bond_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#bond_width. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.WidthChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#( bond_group, selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..bond_width, labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#__init__().(label)=_('Bond width')) |
| 698 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).bond_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#bond_width..pack( anchor='ne', padx=10, pady=5) |
| 699 | # wedge bond width |
| 700 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).wedge_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#wedge_width. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.WidthChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#( bond_group, selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..wedge_width, labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/WidthChooser#__init__().(label)=_('Wedge/Hatch width')) |
| 701 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).wedge_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#wedge_width..pack( anchor='ne', padx=10, pady=5) |
| 702 | # bond length |
| 703 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).bond_lengthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#bond_length. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.LengthChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/LengthChooser#( bond_group, selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..bond_length, labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/LengthChooser#__init__().(label)=_('Bond length')) |
| 704 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).bond_lengthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#bond_length..pack( anchor='ne', padx=10, pady=5) |
| 705 | # double bond length ratio |
| 706 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).double_length_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#double_length_ratio. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.RatioCounterscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/RatioCounter#( bond_group, |
| 707 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..double_length_ratio, |
| 708 | labelscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/RatioCounter#__init__().(label)=_('Double-bond length ratio')) |
| 709 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).double_length_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#double_length_ratio..pack( anchor='ne', padx=10, pady=5) |
| 710 | |
| 711 | # FONT |
| 712 | font_group = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().( _('Font')) |
| 713 | # font size |
| 714 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).font_sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#font_size. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.FontSizeChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/FontSizeChooser#( font_group, selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..font_size) |
| 715 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).font_sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#font_size..pack( anchor = 'nw') |
| 716 | # font family |
| 717 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#font_family. = widgetsscip-python python bkchem 0.14.0rc4 widgets/__init__:.FontFamilyChooserscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/FontFamilyChooser#( font_group, selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard..font_family) |
| 718 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#font_family..pack( anchor="nw", side='bottom') |
| 719 | |
| 720 | # PAPER |
| 721 | # paper type |
| 722 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#parent..paper |
| 723 | paper_group = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().(_('Paper')) |
| 724 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper.._paper_properties['type'] == 'custom': |
| 725 | t = _('Custom') |
| 726 | else: |
| 727 | t = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper.._paper_properties['type'] |
| 728 | paper_types = sortedscip-python python python-stdlib 3.11 builtins/sorted().(datascip-python python bkchem 0.14.0rc4 data/__init__:.paper_typesscip-python python bkchem 0.14.0rc4 `bkchem.data`/paper_types..keysscip-python python python-stdlib 3.11 builtins/dict#keys().()) |
| 729 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paper_type_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_type_chooser. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.OptionMenuscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#( paper_group, |
| 730 | items=paper_types, #+[_('Custom')], |
| 731 | initialitem = t, |
| 732 | labelpos = 'w', |
| 733 | label_text = _('Paper size')+':', |
| 734 | menubutton_width = 10) |
| 735 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paper_type_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_type_chooser..pack( anchor='w', padx=10, pady=10) |
| 736 | # paper orientation |
| 737 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_orientation_chooser. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.RadioSelectscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#( paper_group, |
| 738 | buttontype='radiobutton', |
| 739 | orient='vertical', |
| 740 | pady=0) |
| 741 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_orientation_chooser..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().(_('Portrait')) |
| 742 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_orientation_chooser..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().(_('Landscape')) |
| 743 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_orientation_chooser..pack( anchor='w', padx=10, pady=10) |
| 744 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper.._paper_properties['orientation'] == 'portrait': |
| 745 | i = 0 |
| 746 | else: |
| 747 | i = 1 |
| 748 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_orientation_chooser..invokescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#invoke().( i) |
| 749 | # full svg or just the filled part |
| 750 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).crop_paper_in_svgscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#crop_paper_in_svg. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 751 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).crop_paper_in_svgscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#crop_paper_in_svg..setscip-python python python-stdlib 3.11 builtins/set#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper..get_paper_property( 'crop_svg')) |
| 752 | crop = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( paper_group, textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Auto crop image in SVG?'), variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).crop_paper_in_svgscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#crop_paper_in_svg.) |
| 753 | crop.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)='w', padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=10, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=10) |
| 754 | # crop margin |
| 755 | margin = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper..get_paper_property( 'crop_margin') |
| 756 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).margin_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#margin_entry. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Counterscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Counter#( paper_group, |
| 757 | labelpos = 'w', |
| 758 | label_text=_("Margin for cropped image (in pixels):"), |
| 759 | entryfield_value = margin, |
| 760 | entryfield_validate={ 'validator':'integer', 'min':0, 'max':1000}, |
| 761 | entry_width = 5, |
| 762 | increment = 5, |
| 763 | datatype = 'integer') |
| 764 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).margin_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#margin_entry..pack( anchor='w', padx=10, pady=10) |
| 765 | |
| 766 | |
| 767 | # DIALOG WIDE PART |
| 768 | # how to apply? |
| 769 | apply_group = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Groupscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Group#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).bodyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#body., tag_text=_('Apply')) |
| 770 | apply_group.pack( fill='x', padx=5, pady=5) |
| 771 | # apply all or only the changed ones? - it must be created before apply_button because |
| 772 | # of the callback that operates on activity of apply_button2 |
| 773 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.RadioSelectscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#( apply_group.interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Group#interior().(), |
| 774 | buttontype = 'radiobutton', |
| 775 | orient = 'vertical', |
| 776 | pady = 0) |
| 777 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().( _("changed values only")) |
| 778 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().( _("all values")) |
| 779 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..invokescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#invoke().( 0) |
| 780 | # apply to current drawing? |
| 781 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.RadioSelectscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#( apply_group.interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Group#interior().(), |
| 782 | buttontype = 'radiobutton', |
| 783 | command = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self)._apply_button_callbackscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback()., |
| 784 | orient = 'vertical', |
| 785 | pady = 0) |
| 786 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().( _("to new drawings only")) |
| 787 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().( _("to selected and new drawings (no resize)")) |
| 788 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().( _("to the whole drawing (no resize)")) |
| 789 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button..invokescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#invoke().( 0) |
| 790 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button..pack( padx=0, pady=0, anchor='w') |
| 791 | # we pack the button2 here to get a better organization |
| 792 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..pack( padx=0, pady=10, anchor='w') |
| 793 | |
| 794 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#pages..setnaturalsizescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#setnaturalsize().() |
| 795 | |
| 796 | |
| 797 | def donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self), buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(button)): |
| 798 | if buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(button) == _('Save'): |
| 799 | a = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#parent..paper.save_personal_standard( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).get_the_standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().()) |
| 800 | if a: |
| 801 | tkMessageBox.showinfo( _("Standard saved"), |
| 802 | _("The standard was successfully saved as personal standard to %s\n\nIt is not automatically applied to the current drawing and will be activated after you restart BKChem.\nYou can still apply the changes to the current drawing from the dialog window.") % a) |
| 803 | else: |
| 804 | tkMessageBox.showerror( _("Standard not saved"), |
| 805 | _("For some reason the standard couldn't be saved. Probably the right location for personal profile couldn't be found or wasn't writable. Sorry for the inconvenience.")) |
| 806 | return |
| 807 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#dialog..deactivatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#deactivate().() |
| 808 | if buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(button) == _('OK'): |
| 809 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#standard. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).get_the_standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().() |
| 810 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).applyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button..indexscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#index().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#getvalue().()) |
| 811 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).apply_allscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_all. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..indexscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#index().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#getvalue().()) |
| 812 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).changescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#change. = 1 |
| 813 | else: |
| 814 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).changescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#change. = 0 |
| 815 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#done().(self).apply_allscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_all. = 0 |
| 816 | |
| 817 | |
| 818 | def get_the_standardscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self)): |
| 819 | st = classesscip-python python bkchem 0.14.0rc4 classes/__init__:.standardscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#() |
| 820 | st.bond_widthscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#bond_width. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).bond_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#bond_width..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ValueWithUnitParent#getvalue().() |
| 821 | st.line_widthscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#line_width. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).line_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#line_width..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ValueWithUnitParent#getvalue().() |
| 822 | st.wedge_widthscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#wedge_width. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).wedge_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#wedge_width..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ValueWithUnitParent#getvalue().() |
| 823 | st.bond_lengthscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#bond_length. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).bond_lengthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#bond_length..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ValueWithUnitParent#getvalue().() |
| 824 | st.double_length_ratioscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#double_length_ratio. = floatscip-python python python-stdlib 3.11 builtins/float#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).double_length_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#double_length_ratio..getvalue()) |
| 825 | st.line_colorscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#line_color. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).line_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#line_color..colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#color(). |
| 826 | st.area_colorscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#area_color. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).area_colorscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#area_color..colorscip-python python bkchem 0.14.0rc4 `bkchem.widgets`/ColorButtonWithTransparencyChecker#color(). |
| 827 | st.font_familyscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#font_family. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#font_family..getcurselectionscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#getcurselection().() and selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).font_familyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#font_family..getcurselectionscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#getcurselection().()[0] or '' |
| 828 | st.font_sizescip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#font_size. = intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).font_sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#font_size..get()) |
| 829 | st.show_hydrogensscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#show_hydrogens. = intscip-python python python-stdlib 3.11 builtins/int#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).show_hydrogensscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#show_hydrogens..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().()) |
| 830 | # paper properties |
| 831 | # type |
| 832 | type = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).paper_type_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_type_chooser..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/OptionMenu#getvalue().() |
| 833 | if type == _('Custom'): |
| 834 | type = 'custom' |
| 835 | st.paper_typescip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#paper_type. = type |
| 836 | # orientation |
| 837 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).paper_orientation_chooserscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_orientation_chooser..getvaluescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#getvalue().() == _('Portrait'): |
| 838 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).paper_orientationscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#paper_orientation. = 'portrait' |
| 839 | else: |
| 840 | st.paper_orientationscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#paper_orientation. = 'landscape' |
| 841 | # crop_svg |
| 842 | st.paper_crop_svgscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#paper_crop_svg. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).crop_paper_in_svgscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#crop_paper_in_svg..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().() |
| 843 | # crop_margin |
| 844 | st.paper_crop_marginscip-python python bkchem 0.14.0rc4 `bkchem.classes`/standard#paper_crop_margin. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#get_the_standard().(self).margin_entryscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#margin_entry..getvalue() |
| 845 | return st |
| 846 | |
| 847 | |
| 848 | def _apply_button_callbackscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().(self), tagscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().(tag)): |
| 849 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().(self).apply_buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button..indexscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#index().( tagscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().(tag)) != 0: |
| 850 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..invokescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#invoke().(0) |
| 851 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..configurescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaArchetype#configure().( Button_state = 'normal') |
| 852 | else: |
| 853 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..invokescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#invoke().(1) |
| 854 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#_apply_button_callback().(self).apply_button2scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/standard_values_dialog#apply_button2..configurescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaArchetype#configure().( Button_state = 'disabled') |
| 855 | |
| 856 | |
| 857 | |
| 858 | ##-------------------- PREFERENCES DIALOG -------------------- |
| 859 | |
| 860 | class preferences_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#(objectscip-python python python-stdlib 3.11 builtins/object#): |
| 861 | |
| 862 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self), parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(parent), preferencesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(preferences)): |
| 863 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#parent. = parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(parent) |
| 864 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).preferencesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#preferences. = preferencesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(preferences) |
| 865 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#dialog. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#( parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(parent), |
| 866 | buttons=(_('OK'), _('Cancel')), |
| 867 | defaultbutton=_('OK'), |
| 868 | title=_('Preferences'), |
| 869 | command=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done()., |
| 870 | master='parent') |
| 871 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).bodyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#body. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#dialog..interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().() |
| 872 | #self.body.pack( fill='both', expand=1) |
| 873 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).replace_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#replace_minus. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 874 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).replace_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#replace_minus..setscip-python python python-stdlib 3.11 builtins/set#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).preferencesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#preferences..get_preference( "replace_minus") or 0) |
| 875 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#use_real_minus. = Tkinter.IntVarscip-python python python-stdlib 3.11 tkinter/IntVar#() |
| 876 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#use_real_minus..setscip-python python python-stdlib 3.11 builtins/set#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).preferencesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#preferences..get_preference( "use_real_minus") or 0) |
| 877 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).use_real_minus_oldscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#use_real_minus_old. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#use_real_minus..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().() |
| 878 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).resultscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#result. = 0 |
| 879 | |
| 880 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).drawscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().() |
| 881 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#__init__().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#dialog..activatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#activate().() |
| 882 | |
| 883 | |
| 884 | def drawscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().(self)): |
| 885 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#pages. = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.NoteBookscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().(self).bodyscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#body.) |
| 886 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#pages..pack( anchor='w', pady=0, padx=0, fill='both', expand=1) |
| 887 | # COMMON |
| 888 | common_page = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#pages..addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#add().( _('Common')) |
| 889 | # use real minus ? |
| 890 | replace_minus_button = Tkinter.Checkbuttonscip-python python python-stdlib 3.11 tkinter/Checkbutton#( common_page, textscip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(text)=_('Use real minus character (instead of hyphen)?'), |
| 891 | variablescip-python python python-stdlib 3.11 tkinter/Checkbutton#__init__().(variable)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#use_real_minus.) |
| 892 | replace_minus_button.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)='w', padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=10, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=10) |
| 893 | |
| 894 | # replace hyphens with minuses in export? |
| 895 | # ***HACK*** |
| 896 | #replace_minus_button = Tkinter.Checkbutton( common_page, text=_('Replace hyphens with minus in SVG export?'), |
| 897 | # variable=self.replace_minus) |
| 898 | #replace_minus_button.pack( anchor='w', padx=10, pady=10) |
| 899 | |
| 900 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#draw().(self).pagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#pages..setnaturalsizescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/NoteBook#setnaturalsize().() |
| 901 | |
| 902 | |
| 903 | def donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(self), buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(button)): |
| 904 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(self).dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#dialog..deactivatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#deactivate().() |
| 905 | if buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(button) == _('OK'): |
| 906 | #self.preferences.add_preference( "replace_minus", self.replace_minus.get()) |
| 907 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(self).preferencesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#preferences..add_preference( "use_real_minus", selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#use_real_minus..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().()) |
| 908 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(self).use_real_minusscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#use_real_minus..getscip-python python python-stdlib 3.11 tkinter/IntVar#get().() != selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(self).use_real_minus_oldscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#use_real_minus_old.: |
| 909 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#done().(self).resultscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/preferences_dialog#result. = 1 |
| 910 | else: |
| 911 | pass |
| 912 | |
| 913 | |
| 914 | |
| 915 | ## -------------------- fragment overwiev -------------------- |
| 916 | |
| 917 | class fragment_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#( Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#): |
| 918 | |
| 919 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(self), paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(paper), deletionscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(deletion)=True): |
| 920 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#paper. = paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(paper) |
| 921 | if deletionscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(deletion): |
| 922 | butts = (_('OK'), _('Delete'), _('Cancel')) |
| 923 | else: |
| 924 | butts = (_('OK'), _('Cancel')) |
| 925 | |
| 926 | Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#.__init__scip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(self), |
| 927 | Storescip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Store#.appscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Store#app., |
| 928 | buttons=butts, |
| 929 | defaultbutton=_('OK'), |
| 930 | title=_('Fragment overview'), |
| 931 | command=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(self).donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#done()., |
| 932 | master='parent') |
| 933 | |
| 934 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(self)._itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_items. = setscip-python python python-stdlib 3.11 builtins/set#() |
| 935 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(self)._fragsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_frags. = {} |
| 936 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(self).valuescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#value. = None |
| 937 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#__init__().(self).init_listscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#init_list().() |
| 938 | |
| 939 | |
| 940 | def init_listscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#init_list().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#init_list().(self)): |
| 941 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#init_list().(self).listscip-python python python-stdlib 3.11 builtins/list# = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.ScrolledListBoxscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#init_list().(self).interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 942 | selectioncommand=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#init_list().(self).selectscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select()., |
| 943 | labelpos = "n", |
| 944 | label_text=_("Fragments"), |
| 945 | listbox_selectmode="single", |
| 946 | listbox_width=30, |
| 947 | items=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#init_list().(self).get_all_fragmentsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#get_all_fragments().()) |
| 948 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#init_list().(self).listscip-python python python-stdlib 3.11 builtins/list#.pack() |
| 949 | |
| 950 | |
| 951 | def get_all_fragmentsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#get_all_fragments().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#get_all_fragments().(self)): |
| 952 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#get_all_fragments().(self)._fragsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_frags. = {} |
| 953 | for m in selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#get_all_fragments().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#paper..molecules: |
| 954 | for frag in m.fragments: |
| 955 | text_form = "%s (%s)" % (frag.name, frag.id) |
| 956 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#get_all_fragments().(self)._fragsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_frags.[ text_form] = frag |
| 957 | return selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#get_all_fragments().(self)._fragsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_frags..keysscip-python python python-stdlib 3.11 builtins/dict#keys().() |
| 958 | |
| 959 | |
| 960 | def selectscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select().(self)): |
| 961 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select().(self).cleanscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#clean().() |
| 962 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select().(self).listscip-python python python-stdlib 3.11 builtins/list#.getvaluescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#getvalue().(): |
| 963 | frag = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select().(self)._fragsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_frags.[ selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select().(self).listscip-python python python-stdlib 3.11 builtins/list#.getvaluescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#getvalue().()[0]] |
| 964 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select().(self).valuescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#value. = frag |
| 965 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#select().(self)._highlightscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().( frag) |
| 966 | |
| 967 | |
| 968 | def _highlightscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(self), fragscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(frag), sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size)=3): |
| 969 | for b in fragscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(frag).edges: |
| 970 | x1, y1 = b.atom1.get_xy() |
| 971 | x2, y2 = b.atom2.get_xy() |
| 972 | x = (x1 + x2) / 2 |
| 973 | y = (y1 + y2) / 2 |
| 974 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(self)._itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_items..addscip-python python python-stdlib 3.11 builtins/set#add().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#paper..create_oval( x-sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size), y-sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size), x+sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size), y+sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size), fill="orange", outline="red")) |
| 975 | for a in fragscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(frag).vertices: |
| 976 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(self)._itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_items..addscip-python python python-stdlib 3.11 builtins/set#add().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#paper..create_oval( a.x-sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size), a.y-sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size), a.x+sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size), a.y+sizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_highlight().(size), fill="orange", outline="red")) |
| 977 | |
| 978 | |
| 979 | def cleanscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#clean().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#clean().(self)): |
| 980 | for i in selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#clean().(self)._itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_items.: |
| 981 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#clean().(self).paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#paper..delete(i) |
| 982 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#clean().(self)._itemsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_items. = setscip-python python python-stdlib 3.11 builtins/set#() |
| 983 | |
| 984 | |
| 985 | def donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#done().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#done().(self), buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#done().(button)): |
| 986 | if buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#done().(button) == _('Delete'): |
| 987 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#done().(self)._delete_selectedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().() |
| 988 | return |
| 989 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#done().(self).cleanscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#clean().() |
| 990 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#done().(self).deactivatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#deactivate().() |
| 991 | |
| 992 | |
| 993 | def _delete_selectedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().(self)): |
| 994 | if selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().(self).valuescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#value.: |
| 995 | mol = listscip-python python python-stdlib 3.11 builtins/list#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().(self).valuescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#value..edges | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().(self).valuescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#value..vertices)[0].molecule |
| 996 | mol.delete_fragment( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().(self).valuescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#value.) |
| 997 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().(self).listscip-python python python-stdlib 3.11 builtins/list#.setlistscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#setlist().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#_delete_selected().(self).get_all_fragmentsscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/fragment_dialog#get_all_fragments().()) |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | ## -------------------- logging dialog -------------------- |
| 1002 | |
| 1003 | class logging_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#( Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#): |
| 1004 | |
| 1005 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().(self), paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().(paper), loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().(logger)): |
| 1006 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger. = loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().(logger) |
| 1007 | Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#.__init__scip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().(self), |
| 1008 | Storescip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Store#.appscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Store#app., |
| 1009 | buttons=(_('OK'), _('Cancel')), |
| 1010 | defaultbutton=_('OK'), |
| 1011 | title=_('Logging'), |
| 1012 | command=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().(self).donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done()., |
| 1013 | master='parent') |
| 1014 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#__init__().(self).init_listscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().() |
| 1015 | |
| 1016 | |
| 1017 | def init_listscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self)): |
| 1018 | root = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().() |
| 1019 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).choosersscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#choosers. = {} |
| 1020 | Tkinter.Labelscip-python python python-stdlib 3.11 tkinter/Label#( root, textscip-python python python-stdlib 3.11 tkinter/Label#__init__().(text)=_("Choose how each type of message is to be shown:"), fontscip-python python python-stdlib 3.11 tkinter/Label#__init__().(font)=("Helvetica", 12, "bold")).packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=10) |
| 1021 | for message_type in selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger..type_order: |
| 1022 | f = Tkinter.Framescip-python python python-stdlib 3.11 tkinter/Frame#( root) |
| 1023 | label = Tkinter.Labelscip-python python python-stdlib 3.11 tkinter/Label#( f, textscip-python python python-stdlib 3.11 tkinter/Label#__init__().(text)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger..type_to_text[message_type], fontscip-python python python-stdlib 3.11 tkinter/Label#__init__().(font)=("Helvetica", 12, "bold")) |
| 1024 | label.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( sidescip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(side)='left', anchorscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(anchor)="w") |
| 1025 | chooser = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.RadioSelectscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#( f, |
| 1026 | buttontype='radiobutton', |
| 1027 | orient='horizontal', |
| 1028 | pady=0) |
| 1029 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).choosersscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#choosers.[message_type] = chooser |
| 1030 | for handle_type in selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger..handle_order: |
| 1031 | chooser.addscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#add().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger..handle_to_text[handle_type]) |
| 1032 | chooser.invokescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/RadioSelect#invoke().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger..handle_order.index( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#init_list().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger..handling[message_type])) |
| 1033 | chooser.pack( side='right', anchor='e', padx=5, pady=5) |
| 1034 | f.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( fillscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(fill)="x") |
| 1035 | Tkinter.Labelscip-python python python-stdlib 3.11 tkinter/Label#( root, textscip-python python python-stdlib 3.11 tkinter/Label#__init__().(text)=_("The setting will be immediately applied and saved on application exit.")).packscip-python python python-stdlib 3.11 tkinter/Pack#pack.( padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=10) |
| 1036 | |
| 1037 | |
| 1038 | def donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().(self), buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().(button)): |
| 1039 | if buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().(button) == _("OK"): |
| 1040 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().(self).proceedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#proceed. = True |
| 1041 | for message_type,chooser in selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().(self).choosersscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#choosers..itemsscip-python python python-stdlib 3.11 builtins/dict#items().(): |
| 1042 | index = chooser.index( chooser.getvalue()) |
| 1043 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger..set_handling( message_type, selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().(self).loggerscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#logger..handle_order[index]) |
| 1044 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/logging_dialog#done().(self).deactivatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#deactivate().() |
| 1045 | |
| 1046 | |
| 1047 | |
| 1048 | ## -------------------- language dialog -------------------- |
| 1049 | |
| 1050 | class language_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#( Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#): |
| 1051 | |
| 1052 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#__init__().(self), paperscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#__init__().(paper)): |
| 1053 | Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.Dialogscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#.__init__scip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#__init__().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#__init__().(self), |
| 1054 | Storescip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Store#.appscip-python python bkchem 0.14.0rc4 `bkchem.singleton_store`/Store#app., |
| 1055 | buttons=(_('OK'), _('Cancel')), |
| 1056 | defaultbutton=_('OK'), |
| 1057 | title=_('Language'), |
| 1058 | command=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#__init__().(self).donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#done()., |
| 1059 | master='parent') |
| 1060 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#__init__().(self).proceedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#proceed. = False |
| 1061 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#__init__().(self).init_listscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().() |
| 1062 | |
| 1063 | |
| 1064 | def init_listscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().(self)): |
| 1065 | langs = [] |
| 1066 | import gettextscip-python python python-stdlib 3.11 gettext/__init__: |
| 1067 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().(self).languagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#languages. = {} |
| 1068 | for lang, language in datascip-python python bkchem 0.14.0rc4 data/__init__:.languagesscip-python python bkchem 0.14.0rc4 `bkchem.data`/languages..itemsscip-python python python-stdlib 3.11 builtins/dict#items().(): |
| 1069 | system = gettextscip-python python python-stdlib 3.11 gettext/__init__:.findscip-python python python-stdlib 3.11 gettext/find().('BKChem', osscip-python python python-stdlib 3.11 os/__init__:.pathscip-python python python-stdlib 3.11 os/path..normpathscip-python python python-stdlib 3.11 posixpath/abspath().(osscip-python python python-stdlib 3.11 os/__init__:.pathscip-python python python-stdlib 3.11 os/path..joinscip-python python python-stdlib 3.11 posixpath/abspath().( |
| 1070 | os_supportscip-python python bkchem 0.14.0rc4 os_support/__init__:.get_bkchem_run_dirscip-python python bkchem 0.14.0rc4 `bkchem.os_support`/get_bkchem_run_dir().(), '../../../../share/locale')), [lang]) |
| 1071 | if not system: |
| 1072 | system = gettextscip-python python python-stdlib 3.11 gettext/__init__:.findscip-python python python-stdlib 3.11 gettext/find().('BKChem', None, [lang]) |
| 1073 | local = gettextscip-python python python-stdlib 3.11 gettext/__init__:.findscip-python python python-stdlib 3.11 gettext/find().( 'BKChem', osscip-python python python-stdlib 3.11 os/__init__:.pathscip-python python python-stdlib 3.11 os/path..normpathscip-python python python-stdlib 3.11 posixpath/abspath().( osscip-python python python-stdlib 3.11 os/__init__:.pathscip-python python python-stdlib 3.11 os/path..joinscip-python python python-stdlib 3.11 posixpath/abspath().( os_supportscip-python python bkchem 0.14.0rc4 os_support/__init__:.get_bkchem_run_dirscip-python python bkchem 0.14.0rc4 `bkchem.os_support`/get_bkchem_run_dir().(), '../locale')), [lang]) |
| 1074 | if system or local or lang == "en": |
| 1075 | lang_text = "%s (%s)" % (language, lang) |
| 1076 | langs.appendscip-python python python-stdlib 3.11 builtins/list#append().( lang_text) |
| 1077 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().(self).languagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#languages.[lang_text] = lang |
| 1078 | langs.sortscip-python python python-stdlib 3.11 builtins/list#sort().() |
| 1079 | # default |
| 1080 | default = "%s (default)"%_("System default") |
| 1081 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().(self).languagesscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#languages.[default] = "default" |
| 1082 | langs.appendscip-python python python-stdlib 3.11 builtins/list#append().( default) |
| 1083 | |
| 1084 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().(self).listscip-python python python-stdlib 3.11 builtins/list# = Pmwscip-python python bkchem 0.14.0rc4 Pmw/__init__:.ScrolledListBoxscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/ScrolledListBox#( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().(self).interiorscip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/Dialog#interior().(), |
| 1085 | #selectioncommand=self.select, |
| 1086 | labelpos = "n", |
| 1087 | label_text=_("Available Languages"), |
| 1088 | listbox_selectmode="single", |
| 1089 | listbox_width=30, |
| 1090 | items=langs) |
| 1091 | del gettextscip-python python python-stdlib 3.11 gettext/__init__: |
| 1092 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#init_list().(self).listscip-python python python-stdlib 3.11 builtins/list#.pack() |
| 1093 | |
| 1094 | |
| 1095 | def donescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#done().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#done().(self), buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#done().(button)): |
| 1096 | if buttonscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#done().(button) == _("OK"): |
| 1097 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#done().(self).proceedscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#proceed. = True |
| 1098 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/language_dialog#done().(self).deactivatescip-python python bkchem 0.14.0rc4 `bkchem.Pmw`/MegaToplevel#deactivate().() |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | ## -------------------- PROGRESS DIALOG -------------------- |
| 1103 | |
| 1104 | class progress_dialogscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#( Tkinter.Toplevelscip-python python python-stdlib 3.11 tkinter/Toplevel#): |
| 1105 | |
| 1106 | bar_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_width. = 300 |
| 1107 | bar_heightscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_height. = 20 |
| 1108 | bar_fontsizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_fontsize. = 8 |
| 1109 | |
| 1110 | |
| 1111 | def __init__scip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self), parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(parent), titlescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(title)=None): |
| 1112 | |
| 1113 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#parent. = parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(parent) |
| 1114 | |
| 1115 | Tkinter.Toplevelscip-python python python-stdlib 3.11 tkinter/Toplevel#.__init__scip-python python python-stdlib 3.11 tkinter/Toplevel#__init__().(selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self), parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(parent)) |
| 1116 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).transient(parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(parent)) |
| 1117 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).geometry("+%d+%d" % (parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(parent).winfo_rootx()+200, |
| 1118 | parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(parent).winfo_rooty()+200)) |
| 1119 | #self.resizable( 0, 0) |
| 1120 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).update_idletasks() |
| 1121 | |
| 1122 | if titlescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(title): |
| 1123 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).title(titlescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(title)) |
| 1124 | |
| 1125 | body = Tkinter.Framescip-python python python-stdlib 3.11 tkinter/Frame#(selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self)) |
| 1126 | body.packscip-python python python-stdlib 3.11 tkinter/Pack#pack.(padxscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(padx)=5, padyscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(pady)=5, sidescip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(side)="left", expandscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(expand)=1, fillscip-python python python-stdlib 3.11 tkinter/Pack#pack_configure().(fill)="both") |
| 1127 | |
| 1128 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).top_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#top_text. = Tkinter.StringVarscip-python python python-stdlib 3.11 tkinter/StringVar#() |
| 1129 | Tkinter.Labelscip-python python python-stdlib 3.11 tkinter/Label#( body, textvariablescip-python python python-stdlib 3.11 tkinter/Label#__init__().(textvariable)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).top_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#top_text., widthscip-python python python-stdlib 3.11 tkinter/Label#__init__().(width)=50, heightscip-python python python-stdlib 3.11 tkinter/Label#__init__().(height)=1, anchorscip-python python python-stdlib 3.11 tkinter/Label#__init__().(anchor)="w").gridscip-python python python-stdlib 3.11 tkinter/Grid#grid.( rowscip-python python python-stdlib 3.11 tkinter/Grid#grid_configure().(row)=1, stickyscip-python python python-stdlib 3.11 tkinter/Grid#grid_configure().(sticky)="W") |
| 1130 | |
| 1131 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).canvasscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#canvas. = Tkinter.Canvasscip-python python python-stdlib 3.11 tkinter/Canvas#( body, widthscip-python python python-stdlib 3.11 tkinter/Canvas#__init__().(width)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).bar_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_width., heightscip-python python python-stdlib 3.11 tkinter/Canvas#__init__().(height)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).bar_heightscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_height., backgroundscip-python python python-stdlib 3.11 tkinter/Canvas#__init__().(background)="white") |
| 1132 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).canvasscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#canvas..gridscip-python python python-stdlib 3.11 tkinter/Grid#grid.( rowscip-python python python-stdlib 3.11 tkinter/Grid#grid_configure().(row)=2) |
| 1133 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).barscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).canvasscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#canvas..create_rectanglescip-python python python-stdlib 3.11 tkinter/Canvas#create_rectangle().( 0, 0, 0, selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).bar_heightscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_height., fillscip-python python python-stdlib 3.11 tkinter/Canvas#create_rectangle().(fill)="#7395c8") |
| 1134 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#ratio. = selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).canvasscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#canvas..create_textscip-python python python-stdlib 3.11 tkinter/Canvas#create_text().( (selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).bar_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_width./2)-10, |
| 1135 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).bar_heightscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_height.-8, |
| 1136 | textscip-python python python-stdlib 3.11 tkinter/Canvas#create_text().(text)="0%", |
| 1137 | fontscip-python python python-stdlib 3.11 tkinter/Canvas#create_text().(font)="Helvetica %d normal" % selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).bar_fontsizescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_fontsize.) |
| 1138 | |
| 1139 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).bottom_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bottom_text. = Tkinter.StringVarscip-python python python-stdlib 3.11 tkinter/StringVar#() |
| 1140 | Tkinter.Labelscip-python python python-stdlib 3.11 tkinter/Label#( body, textvariablescip-python python python-stdlib 3.11 tkinter/Label#__init__().(textvariable)=selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).bottom_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bottom_text., widthscip-python python python-stdlib 3.11 tkinter/Label#__init__().(width)=50, heightscip-python python python-stdlib 3.11 tkinter/Label#__init__().(height)=1, anchorscip-python python python-stdlib 3.11 tkinter/Label#__init__().(anchor)="w").gridscip-python python python-stdlib 3.11 tkinter/Grid#grid.( rowscip-python python python-stdlib 3.11 tkinter/Grid#grid_configure().(row)=3, stickyscip-python python python-stdlib 3.11 tkinter/Grid#grid_configure().(sticky)="W") |
| 1141 | |
| 1142 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).grab_set() |
| 1143 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).protocol("WM_DELETE_WINDOW", selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).closescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#close().) |
| 1144 | |
| 1145 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).focus_set() |
| 1146 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).update_idletasks() |
| 1147 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#__init__().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#parent..update_idletasks() |
| 1148 | #self.wait_window(self) |
| 1149 | |
| 1150 | |
| 1151 | def updatescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(self), ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(ratio), top_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(top_text)="", bottom_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(bottom_text)=""): |
| 1152 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(self).set_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().( ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(ratio)) |
| 1153 | if top_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(top_text): |
| 1154 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(self).top_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#top_text..setscip-python python python-stdlib 3.11 builtins/set#( top_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(top_text)) |
| 1155 | if bottom_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(bottom_text): |
| 1156 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(self).bottom_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bottom_text..setscip-python python python-stdlib 3.11 builtins/set#( bottom_textscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(bottom_text)) |
| 1157 | |
| 1158 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#update().(self).update_idletasks() |
| 1159 | |
| 1160 | |
| 1161 | def set_ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(self), ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(ratio)): |
| 1162 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(self).canvasscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#canvas..coordsscip-python python python-stdlib 3.11 tkinter/Canvas#coords().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(self).barscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar., 0, 0, ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(ratio)*selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(self).bar_widthscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_width., selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(self).bar_heightscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#bar_height.) |
| 1163 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(self).canvasscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#canvas..itemconfigscip-python python python-stdlib 3.11 tkinter/Canvas#itemconfig.( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(self).ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#ratio., text="%d%%" % (100*ratioscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#set_ratio().(ratio))) |
| 1164 | |
| 1165 | |
| 1166 | def closescip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#close().( selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#close().(self)): |
| 1167 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#close().(self).parentscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#parent..focus_set() |
| 1168 | selfscip-python python bkchem 0.14.0rc4 `bkchem.dialogs`/progress_dialog#close().(self).destroy() |
| 1169 |