mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
use internal preset for default response
This commit is contained in:
parent
1ae1f772f8
commit
caaf88d280
1 changed files with 5 additions and 4 deletions
|
|
@ -25,6 +25,7 @@ class Clean
|
||||||
public const TOOLTIP = 'Close all tabs';
|
public const TOOLTIP = 'Close all tabs';
|
||||||
public const DIALOG_MESSAGE_FORMAT = 'Clean session';
|
public const DIALOG_MESSAGE_FORMAT = 'Clean session';
|
||||||
public const DIALOG_FORMAT_SECONDARY_TEXT = 'Close all tabs and start new session?';
|
public const DIALOG_FORMAT_SECONDARY_TEXT = 'Close all tabs and start new session?';
|
||||||
|
public const DIALOG_DEFAULT_RESPONSE = GtkResponseType::CANCEL;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Tab $tab
|
Tab $tab
|
||||||
|
|
@ -57,14 +58,14 @@ class Clean
|
||||||
_($this::DIALOG_MESSAGE_FORMAT)
|
_($this::DIALOG_MESSAGE_FORMAT)
|
||||||
);
|
);
|
||||||
|
|
||||||
$dialog->set_default_response(
|
|
||||||
GtkResponseType::CANCEL
|
|
||||||
);
|
|
||||||
|
|
||||||
$dialog->format_secondary_text(
|
$dialog->format_secondary_text(
|
||||||
_($this::DIALOG_FORMAT_SECONDARY_TEXT)
|
_($this::DIALOG_FORMAT_SECONDARY_TEXT)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$dialog->set_default_response(
|
||||||
|
$this::DIALOG_DEFAULT_RESPONSE
|
||||||
|
);
|
||||||
|
|
||||||
if (GtkResponseType::OK == $dialog->run())
|
if (GtkResponseType::OK == $dialog->run())
|
||||||
{
|
{
|
||||||
$this->tab->menu->browser->container->tab->clean();
|
$this->tab->menu->browser->container->tab->clean();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue