diff options
Diffstat (limited to 'tdeioslave/media/mounthelper')
-rw-r--r-- | tdeioslave/media/mounthelper/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/Makefile.am | 2 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/dialog.cpp | 26 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/dialog.h | 4 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | 10 | ||||
-rw-r--r-- | tdeioslave/media/mounthelper/unlockdialog.ui (renamed from tdeioslave/media/mounthelper/decryptdialog.ui) | 4 |
6 files changed, 24 insertions, 24 deletions
diff --git a/tdeioslave/media/mounthelper/CMakeLists.txt b/tdeioslave/media/mounthelper/CMakeLists.txt index 766fe3def..90afad33f 100644 --- a/tdeioslave/media/mounthelper/CMakeLists.txt +++ b/tdeioslave/media/mounthelper/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories( set( target tdeio_media_mounthelper ) set( ${target}_SRCS - tdeio_media_mounthelper.cpp decryptdialog.ui dialog.cpp + tdeio_media_mounthelper.cpp unlockdialog.ui dialog.cpp ) tde_add_executable( ${target} AUTOMOC diff --git a/tdeioslave/media/mounthelper/Makefile.am b/tdeioslave/media/mounthelper/Makefile.am index ce226f728..60f9dc809 100644 --- a/tdeioslave/media/mounthelper/Makefile.am +++ b/tdeioslave/media/mounthelper/Makefile.am @@ -3,7 +3,7 @@ bin_PROGRAMS = tdeio_media_mounthelper INCLUDES = -I$(srcdir)/../libmediacommon $(all_includes) AM_LDFLAGS = $(all_libraries) -tdeio_media_mounthelper_SOURCES = tdeio_media_mounthelper.cpp decryptdialog.ui dialog.cpp +tdeio_media_mounthelper_SOURCES = tdeio_media_mounthelper.cpp unlockdialog.ui dialog.cpp tdeio_media_mounthelper_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor tdeio_media_mounthelper_LDADD = ../libmediacommon/libmediacommon.la $(LIB_TDEIO) $(LIB_TDEUI) diff --git a/tdeioslave/media/mounthelper/dialog.cpp b/tdeioslave/media/mounthelper/dialog.cpp index ffa97b3b7..f2cdb6b53 100644 --- a/tdeioslave/media/mounthelper/dialog.cpp +++ b/tdeioslave/media/mounthelper/dialog.cpp @@ -23,41 +23,41 @@ #include "dialog.h" Dialog::Dialog(TQString url, TQString iconName) : - KDialogBase(NULL, "Dialog", true, "Decrypt Storage Device", (Cancel|User1), User1, false, KGuiItem(i18n("Decrypt"), "decrypted" )) + KDialogBase(NULL, "Dialog", true, "Unlock Storage Device", (Cancel|User1), User1, false, KGuiItem(i18n("Unlock"), "unlocked" )) { - decryptDialog = new DecryptDialog(this); + unlockDialog = new UnlockDialog(this); - decryptDialog->errorBox->hide(); - decryptDialog->descLabel->setText(decryptDialog->descLabel->text().arg(url)); - decryptDialog->descLabel->adjustSize(); - decryptDialog->adjustSize(); + unlockDialog->errorBox->hide(); + unlockDialog->descLabel->setText(unlockDialog->descLabel->text().arg(url)); + unlockDialog->descLabel->adjustSize(); + unlockDialog->adjustSize(); enableButton( User1, false ); TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon(iconName, TDEIcon::NoGroup, TDEIcon::SizeLarge); - decryptDialog->encryptedIcon->setPixmap( pixmap ); + unlockDialog->encryptedIcon->setPixmap( pixmap ); - connect(decryptDialog->passwordEdit, TQT_SIGNAL (textChanged(const TQString &)), this, TQT_SLOT (slotPasswordChanged(const TQString &))); + connect(unlockDialog->passwordEdit, TQT_SIGNAL (textChanged(const TQString &)), this, TQT_SLOT (slotPasswordChanged(const TQString &))); - setMainWidget(decryptDialog); + setMainWidget(unlockDialog); } Dialog::~Dialog() { - delete decryptDialog; + delete unlockDialog; } TQString Dialog::getPassword() { - return decryptDialog->passwordEdit->text(); + return unlockDialog->passwordEdit->text(); } void Dialog::slotDialogError(TQString errorMsg) { kdDebug() << __func__ << "(" << errorMsg << " )" << endl; - decryptDialog->errorLabel->setText(TQString("<b>%1</b>").arg(errorMsg)); - decryptDialog->errorBox->show(); + unlockDialog->errorLabel->setText(TQString("<b>%1</b>").arg(errorMsg)); + unlockDialog->errorBox->show(); } void Dialog::slotPasswordChanged(const TQString &text) diff --git a/tdeioslave/media/mounthelper/dialog.h b/tdeioslave/media/mounthelper/dialog.h index 6a164b8e8..8444ec7dd 100644 --- a/tdeioslave/media/mounthelper/dialog.h +++ b/tdeioslave/media/mounthelper/dialog.h @@ -34,7 +34,7 @@ #include <tqlabel.h> #include <tqgroupbox.h> -#include "decryptdialog.h" +#include "unlockdialog.h" class KryptoMedia; @@ -54,7 +54,7 @@ public slots: void slotPasswordChanged(const TQString &text); private: - DecryptDialog *decryptDialog; + UnlockDialog *unlockDialog; }; #endif // DIALOG_H_ diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp index 75d703b95..f32268855 100644 --- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp +++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp @@ -104,8 +104,8 @@ MountHelper::MountHelper() : TDEApplication() } if (!medium.needDecryption()) { - m_errorStr = i18n("%1 is already decrypted.").arg(url.prettyURL()); - TQTimer::singleShot(0, this, TQT_SLOT(error()) ); + m_errorStr = i18n("%1 is already unlocked.").arg(url.prettyURL()); + TQTimer::singleShot(0, this, TQT_SLOT(error())); return; } @@ -166,9 +166,9 @@ MountHelper::MountHelper() : TDEApplication() } } - /* If this is a decrypted volume and there is no error yet - * we try to teardown the decryption */ - if (m_errorStr.isNull() && medium.isEncrypted() && !medium.clearDeviceUdi().isNull()) + // If this is an unlocked encrypted volume and there is no error yet, we try to lock it + if (unmountResult.contains("result") && unmountResult["result"].toBool() && + medium.isEncrypted() && !medium.clearDeviceUdi().isNull()) { DCOPReply reply = mediamanager.call( "undecrypt", medium.id()); if (reply.isValid()) { diff --git a/tdeioslave/media/mounthelper/decryptdialog.ui b/tdeioslave/media/mounthelper/unlockdialog.ui index 939f0a36a..99a46a9ac 100644 --- a/tdeioslave/media/mounthelper/decryptdialog.ui +++ b/tdeioslave/media/mounthelper/unlockdialog.ui @@ -1,8 +1,8 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> -<class>DecryptDialog</class> +<class>UnlockDialog</class> <widget class="TQWidget"> <property name="name"> - <cstring>DecryptDialog</cstring> + <cstring>UnlockDialog</cstring> </property> <property name="geometry"> <rect> |