backport r1113772: use the icons the kstandardguiitem would use in all

kguiitems we create


svn path=/branches/partitionmanager/1.0/partitionmanager/; revision=1113777
This commit is contained in:
Volker Lanz 2010-04-11 18:29:53 +00:00
parent a873af141c
commit bde6a18f68
5 changed files with 14 additions and 14 deletions

View File

@ -91,7 +91,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
i18ncp("@info", "<para>Do you really want to quit the application?</para><para>There is still an operation pending.</para>",
"<para>Do you really want to quit the application?</para><para>There are still %1 operations pending.</para>", pmWidget().numPendingOperations()),
i18nc("@title:window", "Discard Pending Operations and Quit?"),
KGuiItem(i18nc("@action:button", "&Quit <application>%1</application>", KGlobal::mainComponent().aboutData()->programName())),
KGuiItem(i18nc("@action:button", "&Quit <application>%1</application>", KGlobal::mainComponent().aboutData()->programName()), "arrow-right"),
KStandardGuiItem::cancel(), "reallyQuit") == KMessageBox::Cancel)
{
event->ignore();

View File

@ -677,7 +677,7 @@ void PartitionManagerWidget::onDeletePartition()
"Do you really want to delete the partition that is currently in the clipboard? "
"It will no longer be available for pasting after it has been deleted."),
i18nc("@title:window", "Really Delete Partition in the Clipboard?"),
KGuiItem(i18nc("@action:button", "&Delete It")),
KGuiItem(i18nc("@action:button", "&Delete It"), "arrow-right"),
KStandardGuiItem::cancel(), "reallyDeleteClipboardPartition") == KMessageBox::Cancel)
return;
@ -857,7 +857,7 @@ void PartitionManagerWidget::onCreateNewPartitionTable()
"<para><list><item><filename>%1</filename> (%2)</item></list></para>"
"<para><warning>This will destroy all data on the device.</warning></para>", selectedDevice()->deviceNode(), selectedDevice()->name()),
i18nc("@title:window", "Destroy All Data on Device?"),
KGuiItem(i18nc("@action:button", "&Create New Partition Table")),
KGuiItem(i18nc("@action:button", "&Create New Partition Table"), "arrow-right"),
KStandardGuiItem::cancel()) == KMessageBox::Continue)
{
operationStack().push(new CreatePartitionTableOperation(*selectedDevice()));
@ -876,7 +876,7 @@ void PartitionManagerWidget::onRefreshDevices()
"<para>Do you really want to rescan the devices?</para>"
"<para><warning>This will also clear the list of pending operations.</warning></para>"),
i18nc("@title:window", "Really Rescan the Devices?"),
KGuiItem(i18nc("@action:button", "&Rescan Devices")),
KGuiItem(i18nc("@action:button", "&Rescan Devices"), "arrow-right"),
KStandardGuiItem::cancel(), "reallyRescanDevices") == KMessageBox::Continue)
{
scanDevices();
@ -899,7 +899,7 @@ void PartitionManagerWidget::onClearAllOperations()
if (KMessageBox::warningContinueCancel(this,
i18nc("@info", "Do you really want to clear the list of pending operations?"),
i18nc("@title:window", "Clear Pending Operations?"),
KGuiItem(i18nc("@action:button", "&Clear Pending Operations")),
KGuiItem(i18nc("@action:button", "&Clear Pending Operations"), "arrow-right"),
KStandardGuiItem::cancel(), "reallyClearPendingOperations") == KMessageBox::Continue)
{
log() << i18nc("@info/plain", "Clearing the list of pending operations.");
@ -924,7 +924,7 @@ void PartitionManagerWidget::onApplyAllOperations()
"<para>Do you really want to apply the pending operations listed below?</para>"
"<para><warning>This will permanently modify your disks.</warning></para>"),
opList, i18nc("@title:window", "Apply Pending Operations?"),
KGuiItem(i18nc("@action:button", "&Apply Pending Operations")),
KGuiItem(i18nc("@action:button", "&Apply Pending Operations"), "arrow-right"),
KStandardGuiItem::cancel()) == KMessageBox::Continue)
{
log() << i18nc("@info/plain", "Applying operations...");
@ -981,7 +981,7 @@ void PartitionManagerWidget::onBackupPartition()
if (fileName.isEmpty())
return;
if (!QFile::exists(fileName) || KMessageBox::warningContinueCancel(this, i18nc("@info", "Do you want to overwrite the existing file <filename>%1</filename>?", fileName), i18nc("@title:window", "Overwrite Existing File?"), KGuiItem(i18nc("@action:button", "&Overwrite File")), KStandardGuiItem::cancel()) == KMessageBox::Continue)
if (!QFile::exists(fileName) || KMessageBox::warningContinueCancel(this, i18nc("@info", "Do you want to overwrite the existing file <filename>%1</filename>?", fileName), i18nc("@title:window", "Overwrite Existing File?"), KGuiItem(i18nc("@action:button", "&Overwrite File"), "arrow-right"), KStandardGuiItem::cancel()) == KMessageBox::Continue)
{
operationStack().push(new BackupOperation(*selectedDevice(), *selectedPartition(), fileName));
updatePartitions();

View File

@ -302,8 +302,8 @@ void PartPropsDialog::onFilesystemChanged(int)
i18nc("@info", "<para><warning>You are about to lose all data on partition <filename>%1</filename>.</warning></para>"
"<para>Changing the file system on a partition already on disk will erase all its contents. If you continue now and apply the resulting operation in the main window, all data on <filename>%1</filename> will unrecoverably be lost.</para>", partition().deviceNode()),
i18nc("@title:window", "Really Recreate <filename>%1</filename> with File System %2?", partition().deviceNode(), dialogWidget().fileSystem().currentText()),
KGuiItem(i18nc("@action:button", "&Change the File System")),
KGuiItem(i18nc("@action:button", "&Do Not Change the File System")), "reallyChangeFileSystem") == KMessageBox::Continue)
KGuiItem(i18nc("@action:button", "&Change the File System"), "arrow-right"),
KGuiItem(i18nc("@action:button", "&Do Not Change the File System"), "dialog-cancel"), "reallyChangeFileSystem") == KMessageBox::Continue)
{
setDirty();
updateHideAndShow();
@ -323,8 +323,8 @@ void PartPropsDialog::onRecreate(int state)
i18nc("@info", "<para><warning>You are about to lose all data on partition <filename>%1</filename>.</warning></para>"
"<para>Recreating a file system will erase all its contents. If you continue now and apply the resulting operation in the main window, all data on <filename>%1</filename> will unrecoverably be lost.</para>", partition().deviceNode()),
i18nc("@title:window", "Really Recreate File System on <filename>%1</filename>?", partition().deviceNode()),
KGuiItem(i18nc("@action:button", "&Recreate the File System")),
KGuiItem(i18nc("@action:button", "&Do Not Recreate the File System")), "reallyRecreateFileSystem") == KMessageBox::Continue))
KGuiItem(i18nc("@action:button", "&Recreate the File System"), "arrow-right"),
KGuiItem(i18nc("@action:button", "&Do Not Recreate the File System"), "dialog-cancel"), "reallyRecreateFileSystem") == KMessageBox::Continue))
{
setDirty();
setWarnFileSystemChange();

View File

@ -181,7 +181,7 @@ void ProgressDialog::slotButtonClicked(int button)
KApplication::restoreOverrideCursor();
if (KMessageBox::questionYesNo(this, i18nc("@info", "Do you really want to cancel?"), i18nc("@title:window", "Cancel Running Operations"), KGuiItem(i18nc("@action:button", "Yes, Cancel Operations")), KStandardGuiItem::no()) == KMessageBox::Yes)
if (KMessageBox::questionYesNo(this, i18nc("@info", "Do you really want to cancel?"), i18nc("@title:window", "Cancel Running Operations"), KGuiItem(i18nc("@action:button", "Yes, Cancel Operations"), "dialog-ok"), KStandardGuiItem::no()) == KMessageBox::Yes)
// in the meantime while we were showing the messagebox, the runner might have finished.
if (operationRunner().isRunning())
operationRunner().cancel();
@ -389,7 +389,7 @@ void ProgressDialog::saveReport()
if (fileName.isEmpty())
return;
if (!QFile::exists(fileName) || KMessageBox::warningContinueCancel(this, i18nc("@info", "Do you want to overwrite the existing file <filename>%1</filename>?", fileName), i18nc("@title:window", "Overwrite Existing File?"), KGuiItem(i18nc("@action:button", "&Overwrite File")), KStandardGuiItem::cancel()) == KMessageBox::Continue)
if (!QFile::exists(fileName) || KMessageBox::warningContinueCancel(this, i18nc("@info", "Do you want to overwrite the existing file <filename>%1</filename>?", fileName), i18nc("@title:window", "Overwrite Existing File?"), KGuiItem(i18nc("@action:button", "&Overwrite File"), "arrow-right"), KStandardGuiItem::cancel()) == KMessageBox::Continue)
{
QFile file(fileName);

View File

@ -96,7 +96,7 @@ bool checkPermissions()
"<para>Do you want to continue running <application>%1</application>?</para>",
KGlobal::mainComponent().aboutData()->programName()),
i18nc("@title:window", "No administrative privileges"),
KGuiItem(i18nc("@action:button", "Run without administrative privileges")),
KGuiItem(i18nc("@action:button", "Run without administrative privileges"), "arrow-right"),
KStandardGuiItem::cancel(),
"runWithoutRootPrivileges") == KMessageBox::Continue;
}