From bbe5d64b99681fb211194529dcf16e0532b972bc Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 25 Oct 2020 01:01:16 +0200 Subject: [PATCH] Add info about backing up configuration to snap dialog --- src/dialogs/snapdialog.cpp | 12 +++++++++++- src/dialogs/snapdialog.ui | 14 ++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/dialogs/snapdialog.cpp b/src/dialogs/snapdialog.cpp index 19d328002..af42895f4 100644 --- a/src/dialogs/snapdialog.cpp +++ b/src/dialogs/snapdialog.cpp @@ -63,11 +63,21 @@ SnapDialog::SnapDialog(QWidget *parent) : QDialog(parent), ui_(new Ui_SnapDialog text += QString("

"); text += tr("For a better experience please consider the other options above."); text += QString("

"); - + + text += QString("

"); + text += tr("Copy your strawberry.conf and strawberry.db from your ~/snap directory to avoid losing configration before you uninstall the snap:"); + text += QString("
"); + text += QString("cp ~/snap/strawberry/*/.config/strawberry/strawberry.conf ~/.config/strawberry/strawberry.conf
"); + text += QString("cp ~/snap/strawberry/*/.local/share/strawberry/strawberry/strawberry.db ~/.local/share/strawberry/strawberry/strawberry.db
"); + text += QString("

"); + text += QString("

"); + text += tr("Uninstall the snap with: snap remove strawberry"); + text += QString("

"); text += QString("

"); ui_->label_text->setText(text); ui_->label_text->adjustSize(); + adjustSize(); ui_->buttonBox->button(QDialogButtonBox::Ok)->setShortcut(QKeySequence::Close); diff --git a/src/dialogs/snapdialog.ui b/src/dialogs/snapdialog.ui index db0065f51..949450aca 100644 --- a/src/dialogs/snapdialog.ui +++ b/src/dialogs/snapdialog.ui @@ -7,7 +7,7 @@ 0 0 600 - 300 + 400 @@ -42,16 +42,10 @@ - + Qt::Vertical - - - 20 - 40 - - @@ -84,14 +78,14 @@ - + Qt::Vertical 20 - 40 + 1