Run the "are you sure" dialog for quitting Guake
352931
def quit(self):
        
        # Stop an open "close tab" dialog from obstructing a quit
        response = self.run() == Gtk.ResponseType.YES
        self.destroy()
        # Keep Guake focussed after dismissing tab-close prompt
        # if tab == -1:
        #     self.window.present()
        return response
457039
def stop(self, *args, **kwargs):
        
        if self.status in (Status.stopping, Status.stopped):
            logger.debug("{} is already {}".format(self, self.status.name))
        else:
            self.status = Status.stopping
            self.onStopping(*args, **kwargs)
            self.status = Status.stopped
42304
def do_quit(self, _: argparse.Namespace) -> bool:
        """"""
        self._should_quit = True
        return self._STOP_AND_EXIT
1344995
def stop():
    '''
    
    '''
    ret = {'comment': '', 'success': False}

    cmd = __execute_cmd('riak', 'stop')

    if cmd['retcode'] != 0:
        ret['comment'] = cmd['stderr']
    else:
        ret['comment'] = cmd['stdout']
        ret['success'] = True

    return ret
1240158
def ask_confirmation(prompt = 'Continue?', default = false)
      a = ''
      s = default ? '[Y/n]' : '[y/N]'
      d = default ? 'y' : 'n'
      until %w[y n].include? a
        a = ask("#{prompt} #{s} ") { |q| q.limit = 1; q.case = :downcase }
        a = d if a.length.zero?
      end
      a == 'y'
    end
607620
def quit(self):
    """"""
    try:
      # Don't expect a response.
      self._client.write(sc_pb.Request(quit=sc_pb.RequestQuit()))
    except protocol.ConnectionError:
      pass  # It's likely already (shutting) down, so continue as if it worked.
    finally:
      self.close()
179813
def _confirm_dialog(self, prompt):
        '''  '''
        response = raw_input(prompt).strip().lower()
        valid = {'y': True, 'ye': True, 'yes': True, 'n': False, 'no': False}
        while True:
            try:
                return valid[response]
            except:
                response = raw_input("Please respond 'y' or 'n': ").strip().lower()
1128107
def on_exit(self):
        
        if self.zip_path:
            # Only try to remove uploaded zip if we're running a command that has loaded credentials
            if self.load_credentials:
                self.remove_uploaded_zip()

            self.remove_local_zip()
411908
public function quit($close_on_error = true)
    {
        $noerror = $this->sendCommand('QUIT', 'QUIT', 221);
        $err = $this->error; //Save any error
        if ($noerror or $close_on_error) {
            $this->close();
            $this->error = $err; //Restore any error from the quit command
        }

        return $noerror;
    }
141192
def run(self):
        
        response = None
        root = tkinter.Tk()
        root.withdraw()
        while response is not True:
            response = tkinter.messagebox.askokcancel(title=self.title, message=self.pre_message)
        if self.post_message:
            print(self.post_message)
        self.exit_time = time.time()
740683
def exit(self, status=0, message=None):
        
        if message:
            raise HelpBanner(message.strip(), code=status)
1243065
def quit(self):
        """"""
        try:
            RemoteWebDriver.quit(self)
        except Exception:
            # We don't care about the message because something probably has gone wrong
            pass

        if self.w3c:
            self.service.stop()
        else:
            self.binary.kill()

        if self.profile is not None:
            try:
                shutil.rmtree(self.profile.path)
                if self.profile.tempfolder is not None:
                    shutil.rmtree(self.profile.tempfolder)
            except Exception as e:
                print(str(e))
832763
def on_exit(self):
        
        answer = messagebox.askyesnocancel("Exit", "Do you want to save as you quit the application?")
        if answer:
            self.save()
            self.quit()
            self.destroy()
        elif answer is None:
            pass # the cancel action
        else:
            self.quit()
            self.destroy()
186778
def confirm_operation(prompt, prefix=None, assume_yes=False, err=False):
    """"""
    if assume_yes:
        return True

    prefix = prefix or click.style(
        "Are you %s certain you want to" % (click.style("absolutely", bold=True))
    )

    prompt = "%(prefix)s %(prompt)s?" % {"prefix": prefix, "prompt": prompt}

    if click.confirm(prompt, err=err):
        return True

    click.echo(err=err)
    click.secho("OK, phew! Close call. :-)", fg="green", err=err)
    return False
790519
function cmd_confirm(args, done) {
    var seneca = this
    var why
    var userent = seneca.make(user_canon)

    userent.load$({ confirmcode: args.code }, function(err, user) {
      if (err) return done(err)

      if (user) {
        if (user.active) {
          user.confirmed = true
          user.save$(function(err, user) {
            if (err) return done(err)
            done(null, { ok: true, user: user })
          })
        } else {
          seneca.log.debug(
            'confirm/fail',
            (why = 'not-active'),
            args.code,
            user
          )
          return done(null, { ok: false, why: why, user: user })
        }
      } else {
        seneca.log.debug(
          'confirm/fail',
          (why = 'invalid-code'),
          args.code,
          user
        )
        return done(null, { ok: false, why: why })
      }
    })
  }
383627
void exit() {

        if (m_changed) {
            CmsConfirmationDialog.show(
                CmsVaadinUtils.getMessageText(org.opencms.ui.apps.Messages.GUI_EDITOR_CLOSE_CAPTION_0),
                CmsVaadinUtils.getMessageText(org.opencms.ui.apps.Messages.GUI_EDITOR_CLOSE_TEXT_0),
                new Runnable() {

                    public void run() {

                        exitInternal();
                    }
                });
        } else {
            exitInternal();
        }

    }
1094600
def quit(self, daemononly = False):
        '''
        
        '''
        if not self.quitting:
            self.quitting = True
            self.queue.append(SystemControlEvent(SystemControlEvent.QUIT, daemononly = daemononly), True)