[Konsole-devel] [konsole] src: Add alert about unlimited scrollback saving to HD.

Kurt Hindenburg kurt.hindenburg at gmail.com
Sun Apr 8 15:14:35 UTC 2012


I notice that if you run konsole from an xterm and Ctrl+C in xterm, the
konsole history files are not removed.  I would suspect a computer crash or
incorrectly shutdown would also leave the files.

It would be nice to try to fix that and until then should we add "quitting
Konsole cleanly." to the warning?

 Kurt

On Mon, Apr 2, 2012 at 10:39 PM, Kurt Hindenburg
<kurt.hindenburg at gmail.com>wrote:

> Git commit fe83cf054574ab5e849eb291ffe9b4ebd5c4b66a by Kurt Hindenburg.
> Committed on 03/04/2012 at 04:37.
> Pushed by hindenburg into branch 'master'.
>
> Add alert about unlimited scrollback saving to HD.
>
> Some people may not realize that when using 'unlimited scrollback' the
> scrollback is on the hard drive unencrypted.  The recent libvte
> 'security' report brought this issue up.
>
> REVIEW: 104452
>
> M  +13   -1    src/HistorySizeWidget.cpp
> M  +27   -2    src/HistorySizeWidget.ui
>
> http://commits.kde.org/konsole/fe83cf054574ab5e849eb291ffe9b4ebd5c4b66a
>
> diff --git a/src/HistorySizeWidget.cpp b/src/HistorySizeWidget.cpp
> index fcb131c..1e7670d 100644
> --- a/src/HistorySizeWidget.cpp
> +++ b/src/HistorySizeWidget.cpp
> @@ -36,6 +36,15 @@ HistorySizeWidget::HistorySizeWidget(QWidget* parent)
>     _ui = new Ui::HistorySizeWidget();
>     _ui->setupUi(this);
>
> +    _ui->unlimitedWarningWidget->setVisible(false);
> +    _ui->unlimitedWarningWidget->setWordWrap(true);
> +    _ui->unlimitedWarningWidget->setCloseButtonVisible(false);
> +    _ui->unlimitedWarningWidget->setMessageType(KMessageWidget::Warning);
> +    _ui->unlimitedWarningWidget->setText(i18nc("@info:status",
> +        "When using this option, the scrollback data will be written "
> +        "unencrypted to temporary files. Those temporary files will be "
> +        "deleted automatically when quitting Konsole."));
> +
>     // focus and select the spinner automatically when appropriate
>     _ui->fixedSizeHistoryButton->setFocusProxy(_ui->historyLineSpinner);
>     connect(_ui->fixedSizeHistoryButton , SIGNAL(clicked()) ,
> @@ -62,7 +71,9 @@ HistorySizeWidget::~HistorySizeWidget()
>
>  void HistorySizeWidget::buttonClicked(QAbstractButton*) const
>  {
> -    emit historyModeChanged(mode());
> +    Enum::HistoryModeEnum selectedMode = mode();
> +    _ui->unlimitedWarningWidget->setVisible(Enum::UnlimitedHistory ==
> selectedMode);
> +    emit historyModeChanged(selectedMode);
>  }
>
>  void HistorySizeWidget::setMode(Enum::HistoryModeEnum aMode)
> @@ -74,6 +85,7 @@ void HistorySizeWidget::setMode(Enum::HistoryModeEnum
> aMode)
>     } else if (aMode == Enum::UnlimitedHistory) {
>         _ui->unlimitedHistoryButton->setChecked(true);
>     }
> +    _ui->unlimitedWarningWidget->setVisible(Enum::UnlimitedHistory ==
> aMode);
>
>  }
>
> diff --git a/src/HistorySizeWidget.ui b/src/HistorySizeWidget.ui
> index abba938..076b575 100644
> --- a/src/HistorySizeWidget.ui
> +++ b/src/HistorySizeWidget.ui
> @@ -7,10 +7,16 @@
>     <x>0</x>
>     <y>0</y>
>     <width>400</width>
> -    <height>86</height>
> +    <height>143</height>
>    </rect>
>   </property>
> -  <layout class="QVBoxLayout">
> +  <property name="sizePolicy">
> +   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
> +    <horstretch>0</horstretch>
> +    <verstretch>0</verstretch>
> +   </sizepolicy>
> +  </property>
> +  <layout class="QVBoxLayout" name="verticalLayout">
>    <item>
>     <widget class="QRadioButton" name="noHistoryButton">
>      <property name="sizePolicy">
> @@ -29,6 +35,9 @@
>    </item>
>    <item>
>     <layout class="QHBoxLayout">
> +     <property name="sizeConstraint">
> +      <enum>QLayout::SetFixedSize</enum>
> +     </property>
>      <item>
>       <widget class="QRadioButton" name="fixedSizeHistoryButton">
>        <property name="sizePolicy">
> @@ -89,6 +98,16 @@
>      </property>
>     </widget>
>    </item>
> +   <item>
> +    <widget class="KMessageWidget" name="unlimitedWarningWidget">
> +     <property name="sizePolicy">
> +      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
> +       <horstretch>0</horstretch>
> +       <verstretch>0</verstretch>
> +      </sizepolicy>
> +     </property>
> +    </widget>
> +   </item>
>   </layout>
>  </widget>
>  <customwidgets>
> @@ -97,6 +116,12 @@
>    <extends>QSpinBox</extends>
>    <header>knuminput.h</header>
>   </customwidget>
> +  <customwidget>
> +   <class>KMessageWidget</class>
> +   <extends>QFrame</extends>
> +   <header>kmessagewidget.h</header>
> +   <container>1</container>
> +  </customwidget>
>  </customwidgets>
>  <resources/>
>  <connections/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20120408/d17d01e9/attachment.html>


More information about the konsole-devel mailing list