# desensitize the save button if the entry is empty or blank my $text = $entry->get_text; $window->set_response_sensitive ('accept', $text !~ m/^\s*$/); $window->set_response_sensitive ('reject', TRUE);