Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def textRouter::TextRouter::on_menuUtilitiesApplyFilter_select (   self,
  event 
)

Lets the user choose a filter which is then applied to the text.

Definition at line 2136 of file textRouter.py.

02136                                                        :
        """Lets the user choose a filter which is then applied to the text."""
        if self.filters == []:
            self.status("There are currently no filters defined.")
            return 0

        options = [ "%s" % filter[0] for filter in self.filters ]

        default = options[0]
        dlg = ChooserDialog(self, 'Choose Filter', \
                            "Choose which filter to apply...", \
                            options, default)
        dlg.showModal()
        
        if not dlg.accepted():
            self.status("Filter application cancelled.")
        else:
            i = dlg.components.options.findString(dlg.components.options.stringSelection)
            fhandles = os.popen2(self.filters[i][1])
            fhandles[0].write(self.getOutputText())
            fhandles[0].close()
            self.updateTextBox(fhandles[1].read())
        dlg.destroy()



    # ------------------------- #
    #   Help  Menu   Handlers   #
    # ------------------------- #
    def on_menuHelpHelp_select(self, event):


Generated by  Doxygen 1.6.0   Back to index