Browse Source

use internal preset for default response

PHP-GTK3
yggverse 4 months ago
parent
commit
caaf88d280
  1. 9
      src/Entity/Browser/Menu/Tab/Clean.php

9
src/Entity/Browser/Menu/Tab/Clean.php

@ -25,6 +25,7 @@ class Clean @@ -25,6 +25,7 @@ class Clean
public const TOOLTIP = 'Close all tabs';
public const DIALOG_MESSAGE_FORMAT = 'Clean session';
public const DIALOG_FORMAT_SECONDARY_TEXT = 'Close all tabs and start new session?';
public const DIALOG_DEFAULT_RESPONSE = GtkResponseType::CANCEL;
public function __construct(
Tab $tab
@ -57,14 +58,14 @@ class Clean @@ -57,14 +58,14 @@ class Clean
_($this::DIALOG_MESSAGE_FORMAT)
);
$dialog->set_default_response(
GtkResponseType::CANCEL
);
$dialog->format_secondary_text(
_($this::DIALOG_FORMAT_SECONDARY_TEXT)
);
$dialog->set_default_response(
$this::DIALOG_DEFAULT_RESPONSE
);
if (GtkResponseType::OK == $dialog->run())
{
$this->tab->menu->browser->container->tab->clean();

Loading…
Cancel
Save