Add a buttonCancel parameter to all KMessageBox::*cancel* functions.

svn path=/trunk/KDE/kdebase/kdepasswd/; revision=648781
This commit is contained in:
Thomas Friedrichsmeier 2007-04-01 11:35:39 +00:00
parent b83d41e94b
commit 4092363e51
6 changed files with 21 additions and 15 deletions

View file

@ -115,6 +115,7 @@ void KDEpasswd2Dialog::accept()
i18n("Password Too Long"),
KGuiItem(i18n("Truncate")),
KGuiItem(i18n("Use as Is")),
KStandardGuiItem::cancel(),
"truncatePassword"))
{
case KMessageBox::Yes :

View file

@ -248,10 +248,10 @@ static int directCommand(KCmdLineArgs *args)
if ( type == KMessageBox::WarningContinueCancel ) {
/* TODO configurable button texts*/
ret = KMessageBox::messageBox( 0, type, text, title, KStandardGuiItem::cont(),
KStandardGuiItem::no(), dontagain );
KStandardGuiItem::no(), KStandardGuiItem::cancel(), dontagain );
} else {
ret = KMessageBox::messageBox( 0, type, text, title /*, TODO configurable button texts*/,
KStandardGuiItem::yes(), KStandardGuiItem::no(), dontagain );
KStandardGuiItem::yes(), KStandardGuiItem::no(), KStandardGuiItem::cancel(), dontagain );
}
delete dontagaincfg;
// ret is 1 for Ok, 2 for Cancel, 3 for Yes, 4 for No and 5 for Continue.

View file

@ -1771,7 +1771,7 @@ void KonqMainWindow::slotReload( KonqView* reloadView )
if (prop.isValid() && prop.toBool())
if ( KMessageBox::warningContinueCancel( this,
i18n("This page contains changes that have not been submitted.\nReloading the page will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"view-refresh"), "discardchangesreload") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"view-refresh"), KStandardGuiItem::cancel(), "discardchangesreload") != KMessageBox::Continue )
return;
}
@ -2544,7 +2544,7 @@ void KonqMainWindow::slotBreakOffTab()
if (prop.isValid() && prop.toBool())
if ( KMessageBox::warningContinueCancel( this,
i18n("This tab contains changes that have not been submitted.\nDetaching the tab will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab_breakoff"), "discardchangesdetach") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab_breakoff"), KStandardGuiItem::cancel(), "discardchangesdetach") != KMessageBox::Continue )
return;
}
@ -2562,7 +2562,7 @@ void KonqMainWindow::slotBreakOffTabPopup()
m_pViewManager->showTab( view );
if ( KMessageBox::warningContinueCancel( this,
i18n("This tab contains changes that have not been submitted.\nDetaching the tab will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab_breakoff"), "discardchangesdetach") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab_breakoff"), KStandardGuiItem::cancel(), "discardchangesdetach") != KMessageBox::Continue )
{
m_pViewManager->showTab( originalView );
return;
@ -2657,7 +2657,7 @@ void KonqMainWindow::slotRemoveView()
if (prop.isValid() && prop.toBool())
if ( KMessageBox::warningContinueCancel( this,
i18n("This view contains changes that have not been submitted.\nClosing the view will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"view_remove"), "discardchangesclose") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"view_remove"), KStandardGuiItem::cancel(), "discardchangesclose") != KMessageBox::Continue )
return;
}
@ -2673,7 +2673,7 @@ void KonqMainWindow::slotRemoveTab()
if (prop.isValid() && prop.toBool())
if ( KMessageBox::warningContinueCancel( this,
i18n("This tab contains changes that have not been submitted.\nClosing the tab will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab-remove"), "discardchangesclose") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab-remove"), KStandardGuiItem::cancel(), "discardchangesclose") != KMessageBox::Continue )
return;
}
@ -2690,7 +2690,7 @@ void KonqMainWindow::slotRemoveTabPopup()
m_pViewManager->showTab( view );
if ( KMessageBox::warningContinueCancel( this,
i18n("This tab contains changes that have not been submitted.\nClosing the tab will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab-remove"), "discardchangesclose") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab-remove"), KStandardGuiItem::cancel(), "discardchangesclose") != KMessageBox::Continue )
{
m_pViewManager->showTab( originalView );
return;
@ -2713,7 +2713,7 @@ void KonqMainWindow::slotRemoveOtherTabsPopup()
if ( KMessageBox::warningContinueCancel( this,
i18n("Do you really want to close all other tabs?"),
i18n("Close Other Tabs Confirmation"), KGuiItem(i18n("Close &Other Tabs"),"tab-remove"),
"CloseOtherTabConfirm") != KMessageBox::Continue )
KStandardGuiItem::cancel(), "CloseOtherTabConfirm") != KMessageBox::Continue )
return;
KonqView *originalView = m_currentView;
@ -2727,7 +2727,7 @@ void KonqMainWindow::slotRemoveOtherTabsPopup()
m_pViewManager->showTab( view );
if ( KMessageBox::warningContinueCancel( this,
i18n("This tab contains changes that have not been submitted.\nClosing other tabs will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab-remove"), "discardchangescloseother") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"tab-remove"), KStandardGuiItem::cancel(), "discardchangescloseother") != KMessageBox::Continue )
{
m_pViewManager->showTab( originalView );
return;
@ -2760,7 +2760,7 @@ void KonqMainWindow::slotReloadAllTabs()
m_pViewManager->showTab( view );
if ( KMessageBox::warningContinueCancel( this,
i18n("This tab contains changes that have not been submitted.\nReloading all tabs will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"view-refresh"), "discardchangesreload") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"view-refresh"), KStandardGuiItem::cancel(), "discardchangesreload") != KMessageBox::Continue )
{
m_pViewManager->showTab( originalView );
return;
@ -5299,6 +5299,7 @@ void KonqMainWindow::closeEvent( QCloseEvent *e )
i18n("Confirmation"),
KStandardGuiItem::quit(),
KGuiItem(i18n( "C&lose Current Tab" ), "tab-remove"),
KStandardGuiItem::cancel(),
"MultipleTabConfirm"
)
) {
@ -5331,7 +5332,7 @@ void KonqMainWindow::closeEvent( QCloseEvent *e )
m_pViewManager->showTab( view );
if ( KMessageBox::warningContinueCancel( this,
i18n("This tab contains changes that have not been submitted.\nClosing the window will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"application-exit"), "discardchangesclose") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"application-exit"), KStandardGuiItem::cancel(), "discardchangesclose") != KMessageBox::Continue )
{
e->ignore();
m_pViewManager->showTab( originalView );
@ -5349,7 +5350,7 @@ void KonqMainWindow::closeEvent( QCloseEvent *e )
if (prop.isValid() && prop.toBool())
if ( KMessageBox::warningContinueCancel( this,
i18n("This page contains changes that have not been submitted.\nClosing the window will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"application-exit"), "discardchangesclose") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes"),"application-exit"), KStandardGuiItem::cancel(), "discardchangesclose") != KMessageBox::Continue )
{
e->ignore();
return;

View file

@ -1146,6 +1146,7 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
"Loading a view profile will close them."),
i18n("Confirmation"),
KGuiItem(i18n("Load View Profile")),
KStandardGuiItem::cancel(),
"LoadProfileTabsConfirm" ) == KMessageBox::Cancel )
return;
}
@ -1160,7 +1161,7 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
showTab( view );
if ( KMessageBox::warningContinueCancel( 0,
i18n("This tab contains changes that have not been submitted.\nLoading a profile will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes")), "discardchangesloadprofile") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes")), KStandardGuiItem::cancel(), "discardchangesloadprofile") != KMessageBox::Continue )
/* WE: maybe KStandardGuiItem(Discard) here? */
{
showTab( originalView );
@ -1179,7 +1180,7 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const QString & filename,
if (prop.isValid() && prop.toBool())
if ( KMessageBox::warningContinueCancel( 0,
i18n("This page contains changes that have not been submitted.\nLoading a profile will discard these changes."),
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes")), "discardchangesloadprofile") != KMessageBox::Continue )
i18n("Discard Changes?"), KGuiItem(i18n("&Discard Changes")), KStandardGuiItem::cancel(), "discardchangesloadprofile") != KMessageBox::Continue )
return;
}
}

View file

@ -267,6 +267,7 @@ bool KonqOperations::askDeleteConfirmation( const KUrl::List & selectedUrls, int
prettyList,
i18n( "Delete Files" ),
KStandardGuiItem::del(),
KStandardGuiItem::cancel(),
keyName, KMessageBox::Notify | KMessageBox::Dangerous);
break;
@ -278,6 +279,7 @@ bool KonqOperations::askDeleteConfirmation( const KUrl::List & selectedUrls, int
prettyList,
i18n( "Move to Trash" ),
KGuiItem( i18nc( "Verb", "&Trash" ), "edit-trash"),
KStandardGuiItem::cancel(),
keyName, KMessageBox::Notify | KMessageBox::Dangerous);
}
if (!keyName.isEmpty())

View file

@ -699,6 +699,7 @@ bool KonqUndoManager::UiInterface::copiedFileWasModified( const KUrl& src, const
"Are you sure you want to delete %4?", dest.pathOrUrl(), src.pathOrUrl(), timeStr, dest.pathOrUrl() ),
i18n( "Undo File Copy Confirmation" ),
KStandardGuiItem::cont(),
KStandardGuiItem::cancel(),
QString(),
KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue;
}