|
|
@ -110,8 +110,8 @@ bool WinPopupLib::checkMessageDir()
|
|
|
|
"Should the directory be created? (May need root password)").tqarg(WP_POPUP_DIR),
|
|
|
|
"Should the directory be created? (May need root password)").tqarg(WP_POPUP_DIR),
|
|
|
|
TQString::tqfromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create"));
|
|
|
|
TQString::tqfromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create"));
|
|
|
|
if (tmpYesNo == KMessageBox::Yes) {
|
|
|
|
if (tmpYesNo == KMessageBox::Yes) {
|
|
|
|
TQStringList kdesuArgs = TQStringList(TQString("-c mkdir -p -m 0777 " + WP_POPUP_DIR));
|
|
|
|
TQStringList tdesuArgs = TQStringList(TQString("-c mkdir -p -m 0777 " + WP_POPUP_DIR));
|
|
|
|
if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) return true;
|
|
|
|
if (KApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
KFileItem tmpFileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL::fromPathOrURL(WP_POPUP_DIR));
|
|
|
|
KFileItem tmpFileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL::fromPathOrURL(WP_POPUP_DIR));
|
|
|
@ -129,8 +129,8 @@ bool WinPopupLib::checkMessageDir()
|
|
|
|
"Fix? (May need root password)").tqarg(WP_POPUP_DIR),
|
|
|
|
"Fix? (May need root password)").tqarg(WP_POPUP_DIR),
|
|
|
|
TQString::tqfromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix"));
|
|
|
|
TQString::tqfromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix"));
|
|
|
|
if (tmpYesNo == KMessageBox::Yes) {
|
|
|
|
if (tmpYesNo == KMessageBox::Yes) {
|
|
|
|
TQStringList kdesuArgs = TQStringList(TQString("-c chmod 0777 " + WP_POPUP_DIR));
|
|
|
|
TQStringList tdesuArgs = TQStringList(TQString("-c chmod 0777 " + WP_POPUP_DIR));
|
|
|
|
if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) return true;
|
|
|
|
if (KApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
@ -305,8 +305,8 @@ void WinPopupLib::readMessages(const KFileItemList &items)
|
|
|
|
"Fix? (May need root password)"),
|
|
|
|
"Fix? (May need root password)"),
|
|
|
|
TQString::tqfromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix"));
|
|
|
|
TQString::tqfromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix"));
|
|
|
|
if (tmpYesNo == KMessageBox::Yes) {
|
|
|
|
if (tmpYesNo == KMessageBox::Yes) {
|
|
|
|
TQStringList kdesuArgs = TQStringList(TQString("-c chmod 0666 " + tmpItem->url().path()));
|
|
|
|
TQStringList tdesuArgs = TQStringList(TQString("-c chmod 0666 " + tmpItem->url().path()));
|
|
|
|
if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) {
|
|
|
|
if (KApplication::tdeinitExecWait("tdesu", tdesuArgs) == 0) {
|
|
|
|
if (!messageFile.remove())
|
|
|
|
if (!messageFile.remove())
|
|
|
|
KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Still cannot remove it; please fix manually."));
|
|
|
|
KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Still cannot remove it; please fix manually."));
|
|
|
|
}
|
|
|
|
}
|
|
|
|