def show_browser(self, widget): if not self.browse_dlg: dlg = gimpui.ProcBrowserDialog(_("Python Procedure Browser"), role='gimp_exec_batch', buttons=(gtk.STOCK_APPLY, gtk.RESPONSE_APPLY, gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) dlg.set_default_response(gtk.RESPONSE_APPLY) dlg.set_alternative_button_order((gtk.RESPONSE_CLOSE, gtk.RESPONSE_APPLY)) dlg.connect('response', self.browse_response) dlg.connect('row-activated', lambda dlg: dlg.response(gtk.RESPONSE_APPLY)) self.browse_dlg = dlg self.browse_dlg.present()
def _create_pdb_procedure_browser_dialog(self): dialog = gimpui.ProcBrowserDialog( _("Procedure Browser"), role=pg.config.PLUGIN_NAME, buttons=(gtk.STOCK_ADD, gtk.RESPONSE_OK, gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) dialog.set_default_response(gtk.RESPONSE_OK) dialog.set_alternative_button_order( (gtk.RESPONSE_OK, gtk.RESPONSE_CANCEL)) dialog.connect("response", self._on_pdb_procedure_browser_dialog_response) dialog.show_all() return dialog