Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 9 additions & 20 deletions src/Dialogs/UnsafePasteDialog.vala
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
/*
* Copyright 2011-2021 elementary, Inc. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 3 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
* SPDX-License-Identifier: LGPL-3.0-or-later
* SPDX-FileCopyrightText: 2011-2025 elementary, Inc. (https://elementary.io)
*/

public class Terminal.UnsafePasteDialog : Granite.MessageDialog {
public string text_to_paste { get; construct; }

public UnsafePasteDialog (MainWindow parent, string title_text, string text_to_paste) {
Object (
buttons: Gtk.ButtonsType.NONE,
transient_for: parent,
primary_text: title_text,
transient_for: parent
text_to_paste: text_to_paste,
buttons: Gtk.ButtonsType.NONE
);

show_error_details (text_to_paste);
}

construct {
image_icon = new ThemedIcon ("dialog-warning");

secondary_text =
_("Copying commands into Terminal can be dangerous. Be sure you understand what each part of the pasted text does before continuing.");
show_error_details (text_to_paste);

var show_protection_warnings = new Gtk.CheckButton.with_label (_("Show paste protection warnings"));

Expand Down