Would be nice to roll this into _updateDialogLabel() itself -- i.e. if plugin is non-null use its label, otherwise compute one based on the `query` arg.  That way there's only one copy of the .text() call.