Merging in from bleeding edge kdebase branch

- i18n ported
- KAccel removed
- Some fixes for OS X

svn path=/trunk/KDE/kdebase/kfind/; revision=528190
This commit is contained in:
Hamish Rodda 2006-04-10 11:57:13 +00:00
parent 6a040a4e1b
commit e7d5dfa47f
59 changed files with 317 additions and 219 deletions

View file

@ -144,7 +144,7 @@ void ChFaceDlg::addCustomPixmap( QString imPath, bool saveCopy )
KonqOperations::copy( this, KonqOperations::COPY, KUrl::List( KUrl( userfaces.absolutePath() + "/.userinfo-tmp" ) ), KUrl( userfaces.absPath() + "/" + QFileInfo(imPath).fileName().section(".",0,0) ) );
#if 0
if ( !pix.save( userfaces.absolutePath() + "/" + imPath , "PNG" ) )
KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1").arg( userfaces.absolutePath() ) );
KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1", userfaces.absolutePath() ) );
#endif
}
@ -183,7 +183,7 @@ void ChFaceDlg::slotSaveCustomImage()
userfaces.mkdir( userfaces.absolutePath() );
if ( !m_FacesWidget->currentItem()->pixmap()->save( userfaces.absolutePath() + USER_CUSTOM_FILE , "PNG" ) )
KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1").arg( userfaces.absolutePath() ) );
KMessageBox::sorry(this, i18n("There was an error saving the image:\n%1", userfaces.absolutePath() ) );
}
}
#endif

View file

@ -235,7 +235,7 @@ void KCMUserAccount::save()
{
KMessageBox::sorry( this, i18n("An error occurred and your password has "
"probably not been changed. The error "
"message was:\n%1").arg(QString::fromLocal8Bit(proc->error())));
"message was:\n%1", QString::fromLocal8Bit(proc->error())));
kDebug() << "ChfnProcess->exec() failed. Error code: " << ret
<< "\nOutput:" << proc->error() << endl;
}
@ -246,7 +246,7 @@ void KCMUserAccount::save()
/* Save the image */
if( !_facePixmap.save( KCFGUserAccount::faceFile(), "PNG" ))
KMessageBox::error( this, i18n("There was an error saving the image: %1" ).arg(
KMessageBox::error( this, i18n("There was an error saving the image: %1" ,
KCFGUserAccount::faceFile()) );
}
@ -337,7 +337,7 @@ inline KUrl *KCMUserAccount::decodeImgDrop(QDropEvent *e, QWidget *wdg)
QString msg = i18n( "%1 does not appear to be an image file.\n"
"Please use files with these extensions:\n"
"%2").arg(url->fileName()).arg(qs.join("\n"));
"%2", url->fileName(), qs.join("\n"));
KMessageBox::sorry( wdg, msg);
delete url;
}

View file

@ -87,7 +87,7 @@ KDEpasswd2Dialog::KDEpasswd2Dialog(const char *oldpass, QByteArray user)
if (m_User.isEmpty())
setPrompt(i18n("Please enter your new password:"));
else
setPrompt(i18n("Please enter the new password for user <b>%1</b>:").arg(QString::fromLocal8Bit(m_User)));
setPrompt(i18n("Please enter the new password for user <b>%1</b>:", QString::fromLocal8Bit(m_User)));
}

View file

@ -209,7 +209,7 @@ void ActionsImpl::slotLoad()
= KFileDialog::getOpenFileName(QString(), "*.xml", KEBApp::self());
if (bookmarksFile.isNull())
return;
KEBApp::self()->reset(QString(), bookmarksFile);
KEBApp::self()->reset(QString(), bookmarksFile);
}
void ActionsImpl::slotSaveAs() {

View file

@ -69,7 +69,7 @@ QString CreateCommand::name() const {
} else if (m_group) {
return i18n("Create Folder");
} else if (!m_originalBookmark.isNull()) {
return i18n("Copy %1").arg(m_mytext);
return i18n("Copy %1", m_mytext);
} else {
return i18n("Create Bookmark");
}
@ -161,13 +161,13 @@ EditCommand::EditCommand(const QString & address, int col, const QString & newVa
QString EditCommand::name() const
{
if(mCol==-1)
return i18n("%1 Change").arg(i18n("Icon"));
return i18n("%1 Change", i18n("Icon"));
else if(mCol==0)
return i18n("%1 Change").arg(i18n("Title") );
return i18n("%1 Change", i18n("Title") );
else if(mCol==1)
return i18n("%1 Change").arg(i18n("URL"));
return i18n("%1 Change", i18n("URL"));
else if(mCol==2)
return i18n("%1 Change").arg(i18n("Comment"));
return i18n("%1 Change", i18n("Comment"));
//Never reached
return QString("");
}
@ -365,7 +365,7 @@ KEBMacroCommand* DeleteCommand::deleteAll(const KBookmarkGroup & parentGroup) {
/* -------------------------------------- */
QString MoveCommand::name() const {
return i18n("Move %1").arg(m_mytext);
return i18n("Move %1", m_mytext);
}
void MoveCommand::execute() {

View file

@ -38,7 +38,7 @@
KBookmarkEditorIface::KBookmarkEditorIface()
: QObject(), DCOPObject("KBookmarkEditor") {
// connect(KBookmarkNotifier_stub, SIGNAL( updatedAccessMetadata(QString,QString) ),
// this, SLOT( slotDcopUpdatedAccessMetadata(QString,QString) ));
// this, SLOT( slotDcopUpdatedAccessMetadata(QString,QString) ));
connectDCOPSignal(0, "KBookmarkNotifier", "updatedAccessMetadata(QString,QString)", "slotDcopUpdatedAccessMetadata(QString,QString)", false);
}

View file

@ -87,7 +87,7 @@ void FavIconsItr::doAction() {
if (!m_updater) {
m_updater = new FavIconUpdater(kapp);
connect(m_updater, SIGNAL( done(bool) ),
this, SLOT( slotDone(bool) ) );
this, SLOT( slotDone(bool) ) );
}
if (curBk().url().protocol().startsWith("http")) {
m_updater->downloadIcon(curBk());

View file

@ -41,11 +41,11 @@
#include <kbookmarkdombuilder.h>
QString ImportCommand::name() const {
return i18n("Import %1 Bookmarks").arg(visibleName());
return i18n("Import %1 Bookmarks", visibleName());
}
QString ImportCommand::folder() const {
return m_folder ? i18n("%1 Bookmarks").arg(visibleName()) : QString();
return m_folder ? i18n("%1 Bookmarks", visibleName()) : QString();
}
ImportCommand* ImportCommand::importerFactory(const QString &type) {
@ -74,7 +74,7 @@ ImportCommand* ImportCommand::performImport(const QString &type, QWidget *top) {
int answer =
KMessageBox::questionYesNoCancel(
top, i18n("Import as a new subfolder or replace all the current bookmarks?"),
i18n("%1 Import").arg(importer->visibleName()),
i18n("%1 Import", importer->visibleName()),
i18n("As New Folder"), i18n("Replace"));
if (answer == KMessageBox::Cancel) {

View file

@ -36,7 +36,9 @@
#include <qdom.h>
#include <qfile.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif
static const KCmdLineOptions cmdLineOptions[] =
{
@ -47,6 +49,7 @@ static const KCmdLineOptions cmdLineOptions[] =
// The code for this function was taken from kdesktop/kcheckrunning.cpp
static bool kdeIsRunning()
{
#ifdef Q_WS_X11
Display *dpy = XOpenDisplay( NULL );
if ( !dpy ) {
return false;
@ -54,6 +57,9 @@ static bool kdeIsRunning()
Atom atom = XInternAtom( dpy, "_KDE_RUNNING", False );
return XGetSelectionOwner( dpy, atom ) != None;
#else
return true;
#endif
}
int main( int argc, char**argv )

View file

@ -327,7 +327,7 @@ void KViewSearchLine::contextMenuEvent( QContextMenuEvent*e )
int logicalIndex = d->treeView->header()->logicalIndex(i);
QString columnText = model()->headerData(logicalIndex, Qt::Horizontal).toString();
if(columnText.isEmpty())
columnText = i18n("Column number %1","Column No. %1").arg(i);
columnText = i18nc("Column number %1","Column No. %1", i);
QAction * act = new QAction(columnText, 0);
act->setCheckable(true);
if( d->searchColumns.isEmpty() || d->searchColumns.contains(logicalIndex) )

View file

@ -95,9 +95,9 @@ static int askUser(KApplication &app, QString filename, bool &readonly) {
int ret = KMessageBox::warningYesNo(0,
i18n("Another instance of %1 is already running, do you really "
"want to open another instance or continue work in the same instance?\n"
"Please note that, unfortunately, duplicate views are read-only.").arg(kapp->caption()),
"Please note that, unfortunately, duplicate views are read-only.", kapp->caption()),
i18n("Warning"),
i18n("Run Another"), /* yes */
i18n("Run Another"), /* yes */
i18n("Continue in Same") /* no */);
if (ret == KMessageBox::No) {
@ -147,14 +147,14 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) {
CurrentMgr::ExportType exportType = CurrentMgr::MozillaExport; // uumm.. can i just set it to -1 ?
int got = 0;
const char *arg, *arg2 = 0, *importType = 0;
if (arg = "exportmoz", args->isSet(arg)) { exportType = CurrentMgr::MozillaExport; arg2 = arg; got++; }
if (arg = "exportns", args->isSet(arg)) { exportType = CurrentMgr::NetscapeExport; arg2 = arg; got++; }
if (arg = "exporthtml", args->isSet(arg)) { exportType = CurrentMgr::HTMLExport; arg2 = arg; got++; }
if (arg = "exportie", args->isSet(arg)) { exportType = CurrentMgr::IEExport; arg2 = arg; got++; }
if (arg = "exportmoz", args->isSet(arg)) { exportType = CurrentMgr::MozillaExport; arg2 = arg; got++; }
if (arg = "exportns", args->isSet(arg)) { exportType = CurrentMgr::NetscapeExport; arg2 = arg; got++; }
if (arg = "exporthtml", args->isSet(arg)) { exportType = CurrentMgr::HTMLExport; arg2 = arg; got++; }
if (arg = "exportie", args->isSet(arg)) { exportType = CurrentMgr::IEExport; arg2 = arg; got++; }
if (arg = "exportopera", args->isSet(arg)) { exportType = CurrentMgr::OperaExport; arg2 = arg; got++; }
if (arg = "importmoz", args->isSet(arg)) { importType = "Moz"; arg2 = arg; got++; }
if (arg = "importns", args->isSet(arg)) { importType = "NS"; arg2 = arg; got++; }
if (arg = "importie", args->isSet(arg)) { importType = "IE"; arg2 = arg; got++; }
if (arg = "importmoz", args->isSet(arg)) { importType = "Moz"; arg2 = arg; got++; }
if (arg = "importns", args->isSet(arg)) { importType = "NS"; arg2 = arg; got++; }
if (arg = "importie", args->isSet(arg)) { importType = "IE"; arg2 = arg; got++; }
if (arg = "importopera", args->isSet(arg)) { importType = "Opera"; arg2 = arg; got++; }
if (!importType && arg2) {
Q_ASSERT(arg2);

View file

@ -92,7 +92,7 @@ void TestLinkItr::doAction() {
connect(m_job, SIGNAL( result( KIO::Job *)),
this, SLOT( slotJobResult(KIO::Job *)));
connect(m_job, SIGNAL( data( KIO::Job *, const QByteArray &)),
connect(m_job, SIGNAL( data( KIO::Job *, const QByteArray &)),
this, SLOT( slotJobData(KIO::Job *, const QByteArray &)));
//FIXME curItem()->setTmpStatus(i18n("Checking..."));

View file

@ -109,7 +109,7 @@ void KfindDlg::startSearch()
isResultReported = false;
// Reset count - use the same i18n as below
setProgressMsg(i18n("one file found", "%n files found", 0));
setProgressMsg(i18np("one file found", "%n files found", 0));
emit resultSelected(false);
emit haveResults(false);
@ -214,7 +214,7 @@ void KfindDlg::addFile(const KFileItem* item, const QString& matchingLine)
}
int count = win->childCount();
QString str = i18n("one file found", "%n files found", count);
QString str = i18np("one file found", "%n files found", count);
setProgressMsg(str);
}

View file

@ -204,7 +204,7 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
// Layout
QGridLayout *grid1 = new QGridLayout( pages[1], 5, 6,
QGridLayout *grid1 = new QGridLayout( pages[1], 5, 6,
KDialog::marginHint(),
KDialog::spacingHint() );
@ -236,8 +236,8 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
grid1->setRowStretch(6,1);
// Connect
connect( findCreated, SIGNAL(toggled(bool)), SLOT(fixLayout()) );
connect( bg, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(fixLayout()) );
connect( findCreated, SIGNAL(toggled(bool)), SLOT(fixLayout()) );
connect( bg, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(fixLayout()) );
connect( sizeBox, SIGNAL(highlighted(int)), this, SLOT(slotSizeBoxChanged(int)));

View file

@ -286,7 +286,7 @@ void KfindWindow::selectionHasChanged()
void KfindWindow::deleteFiles()
{
QString tmp = i18n("Do you really want to delete the selected file?",
QString tmp = i18np("Do you really want to delete the selected file?",
"Do you really want to delete the %n selected files?",selectedItems().count());
if (KMessageBox::warningContinueCancel(parentWidget(), tmp, "", KGuiItem( i18n("&Delete"), "editdelete")) == KMessageBox::Cancel)
return;
@ -409,7 +409,7 @@ void KfindWindow::slotContextMenu(K3ListView *,Q3ListViewItem *item,const QPoint
{
//menu = new KMenu(item->text(0), this);
m_menu->addTitle(item->text(0));
m_menu->addAction(SmallIcon("fileopen"),i18n("Menu item", "Open"), this, SLOT(openBinding()));
m_menu->addAction(SmallIcon("fileopen"),i18nc("Menu item", "Open"), this, SLOT(openBinding()));
m_menu->addAction(SmallIcon("window_new"),i18n("Open Folder"), this, SLOT(openFolder()));
m_menu->addSeparator();
m_menu->addAction(SmallIcon("editcopy"),i18n("Copy"), this, SLOT(copySelection()));

View file

@ -162,7 +162,7 @@ void KQuery::slotListEntries( QStringList list )
for (; it != end; ++it)
{
file = new KFileItem( KFileItem::Unknown, KFileItem::Unknown, KUrl(*it));
file = new KFileItem( KFileItem::Unknown, KFileItem::Unknown, KUrl(*it));
processQuery(file);
delete file;
}
@ -442,7 +442,7 @@ void KQuery::setRegExp(const QString &regexp, bool caseSensitive)
QRegExp *regExp;
QRegExp sep(";");
QStringList strList=regexp.split( sep, QString::SkipEmptyParts);
// QRegExp globChars ("[\\*\\?\\[\\]]", TRUE, FALSE);
// QRegExp globChars ("[\\*\\?\\[\\]]", TRUE, FALSE);
while (!m_regexps.isEmpty())
delete m_regexps.takeFirst();

View file

@ -67,7 +67,9 @@ void KonqMainWindowIface::newTab( QString url, bool tempFile )
void KonqMainWindowIface::newTabASN( QString url, const DCOPCString& startup_id, bool tempFile )
{
#ifdef Q_WS_X11
KStartupInfo::setNewStartupId( m_pMainWindow, startup_id );
#endif
m_pMainWindow->openFilteredUrl( url, true, tempFile );
}

View file

@ -30,7 +30,10 @@
#include <kdebug.h>
#include <qfile.h>
//Added by qt3to4:
#ifdef Q_WS_X11
#include <QX11Info>
#include <X11/Xlib.h>
#endif
#include "konq_settingsxt.h"
// these DCOP calls come from outside, so any windows created by these
@ -40,7 +43,6 @@
// happened
// TODO a valid timestamp should be passed in the DCOP calls that
// are not for user scripting
#include <X11/Xlib.h>
KonquerorIface::KonquerorIface()
: DCOPObject( "KonquerorIface" )
@ -53,7 +55,9 @@ KonquerorIface::~KonquerorIface()
DCOPRef KonquerorIface::openBrowserWindow( const QString &url )
{
#ifdef Q_WS_X11
QX11Info::setAppUserTime( 0 );
#endif
KonqMainWindow *res = KonqMisc::createSimpleWindow( KUrl(url) );
if ( !res )
return DCOPRef();
@ -79,7 +83,9 @@ DCOPRef KonquerorIface::createNewWindowASN( const QString &url, const DCOPCStrin
DCOPRef KonquerorIface::createNewWindowWithSelection( const QString &url, QStringList filesToSelect )
{
#ifdef Q_WS_X11
QX11Info::setAppUserTime( 0 );
#endif
KonqMainWindow *res = KonqMisc::createNewWindow( KUrl(url), KParts::URLArgs(), false, filesToSelect );
if ( !res )
return DCOPRef();
@ -94,7 +100,9 @@ DCOPRef KonquerorIface::createNewWindowWithSelectionASN( const QString &url, QSt
DCOPRef KonquerorIface::createNewWindow( const QString &url, const QString &mimetype, bool tempFile )
{
#ifdef Q_WS_X11
QX11Info::setAppUserTime( 0 );
#endif
KParts::URLArgs args;
args.serviceType = mimetype;
// Filter the URL, so that "kfmclient openURL gg:foo" works also when konq is already running
@ -114,7 +122,9 @@ DCOPRef KonquerorIface::createNewWindowASN( const QString &url, const QString &m
DCOPRef KonquerorIface::createBrowserWindowFromProfile( const QString &path )
{
#ifdef Q_WS_X11
QX11Info::setAppUserTime( 0 );
#endif
kDebug(1202) << "void KonquerorIface::createBrowserWindowFromProfile( const QString &path ) " << endl;
kDebug(1202) << path << endl;
KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, QString() );
@ -131,7 +141,9 @@ DCOPRef KonquerorIface::createBrowserWindowFromProfileASN( const QString &path,
DCOPRef KonquerorIface::createBrowserWindowFromProfile( const QString & path, const QString &filename )
{
#ifdef Q_WS_X11
QX11Info::setAppUserTime( 0 );
#endif
kDebug(1202) << "void KonquerorIface::createBrowserWindowFromProfile( path, filename ) " << endl;
kDebug(1202) << path << "," << filename << endl;
KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename );
@ -149,7 +161,9 @@ DCOPRef KonquerorIface::createBrowserWindowFromProfileASN( const QString &path,
DCOPRef KonquerorIface::createBrowserWindowFromProfileAndURL( const QString & path, const QString &filename, const QString &url )
{
#ifdef Q_WS_X11
QX11Info::setAppUserTime( 0 );
#endif
KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename, KUrl(url) );
if ( !res )
return DCOPRef();
@ -165,7 +179,9 @@ DCOPRef KonquerorIface::createBrowserWindowFromProfileAndURLASN( const QString &
DCOPRef KonquerorIface::createBrowserWindowFromProfileAndURL( const QString &path, const QString &filename, const QString &url, const QString &mimetype )
{
#ifdef Q_WS_X11
QX11Info::setAppUserTime( 0 );
#endif
KParts::URLArgs args;
args.serviceType = mimetype;
KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename, KUrl(url), args );
@ -240,9 +256,11 @@ void KonquerorIface::comboCleared( DCOPCString objId )
bool KonquerorIface::processCanBeReused( int screen )
{
#ifdef Q_WS_X11
QX11Info info;
if( info.screen() != screen )
return false; // this instance run on different screen, and Qt apps can't migrate
#endif
if( KonqMainWindow::isPreloaded())
return false; // will be handled by preloading related code instead
QList<KonqMainWindow*>* windows = KonqMainWindow::mainWindowList();

View file

@ -196,15 +196,15 @@ QString KonqAboutPageFactory::intro()
"or choose an entry from the Bookmarks menu.") )
.arg( i18n( "To return to the previous "
"location, press the back button <img width='16' height='16' src=\"%1\"> "
"in the toolbar. ").arg( back_icon_path ) )
"in the toolbar. ", back_icon_path ) )
.arg( i18n( "To quickly go to your Home folder press the "
" home button <img width='16' height='16' src=\"%1\">." ).arg(gohome_icon_path) )
.arg( i18n( "For more detailed documentation on Konqueror click <a href=\"%1\">here</a>." )
.arg("exec:/khelpcenter") )
" home button <img width='16' height='16' src=\"%1\">." , gohome_icon_path) )
.arg( i18n( "For more detailed documentation on Konqueror click <a href=\"%1\">here</a>." ,
QString("exec:/khelpcenter")) )
.arg( i18n( "<em>Tuning Tip:</em> If you want the Konqueror web browser to start faster,"
" you can turn off this information screen by clicking <a href=\"%1\">here</a>. You can re-enable it"
" by choosing the Help -> Konqueror Introduction menu option, and then pressing "
"Settings -> Save View Profile \"Web Browsing\".").arg("config:/disable_overview") )
"Settings -> Save View Profile \"Web Browsing\".", QString("config:/disable_overview")) )
.arg( "<img width='16' height='16' src=\"%1\">" ).arg( continue_icon_path )
.arg( i18n( "Next: Tips &amp; Tricks" ) )
;
@ -247,26 +247,26 @@ QString KonqAboutPageFactory::specs()
"extra support for other common usability features that arise as "
"de facto standards across the Internet. Along with this support, "
"for such functions as favicons, Internet Keywords, and <A HREF=\"%1\">XBEL bookmarks</A>, "
"Konqueror also implements:").arg("http://pyxml.sourceforge.net/topics/xbel/") )
"Konqueror also implements:", QString("http://pyxml.sourceforge.net/topics/xbel/")) )
.arg( i18n("Web Browsing") )
.arg( i18n("Supported standards") )
.arg( i18n("Additional requirements*") )
.arg( i18n("<A HREF=\"%1\">DOM</A> (Level 1, partially Level 2) based "
"<A HREF=\"%2\">HTML 4.01</A>").arg("http://www.w3.org/DOM").arg("http://www.w3.org/TR/html4/") )
"<A HREF=\"%2\">HTML 4.01</A>", QString("http://www.w3.org/DOM"), QString("http://www.w3.org/TR/html4/")) )
.arg( i18n("built-in") )
.arg( i18n("<A HREF=\"%1\">Cascading Style Sheets</A> (CSS 1, partially CSS 2)").arg("http://www.w3.org/Style/CSS/") )
.arg( i18n("<A HREF=\"%1\">Cascading Style Sheets</A> (CSS 1, partially CSS 2)", QString("http://www.w3.org/Style/CSS/")) )
.arg( i18n("built-in") )
.arg( i18n("<A HREF=\"%1\">ECMA-262</A> Edition 3 (roughly equals JavaScript 1.5)").arg("http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM") )
.arg( i18n("JavaScript disabled (globally). Enable JavaScript <A HREF=\"%1\">here</A>.").arg("exec:/kcmshell khtml_java_js") )
.arg( i18n("JavaScript enabled (globally). Configure JavaScript <A HREF=\\\"%1\\\">here</A>.").arg("exec:/kcmshell khtml_java_js") ) // leave the double backslashes here, they are necessary for javascript !
.arg( i18n("Secure <A HREF=\"%1\">Java</A><SUP>&reg;</SUP> support").arg("http://java.sun.com") )
.arg( i18n("JDK 1.2.0 (Java 2) compatible VM (<A HREF=\"%1\">Blackdown</A>, <A HREF=\"%2\">IBM</A> or <A HREF=\"%3\">Sun</A>)")
.arg("http://www.blackdown.org").arg("http://www.ibm.com").arg("http://java.sun.com") )
.arg( i18n("Enable Java (globally) <A HREF=\"%1\">here</A>.").arg("exec:/kcmshell khtml_java_js") ) // TODO Maybe test if Java is enabled ?
.arg( i18n("Netscape Communicator<SUP>&reg;</SUP> <A HREF=\"%4\">plugins</A> (for viewing <A HREF=\"%1\">Flash<SUP>&reg;</SUP></A>, <A HREF=\"%2\">Real<SUP>&reg;</SUP></A>Audio, <A HREF=\"%3\">Real<SUP>&reg;</SUP></A>Video, etc.)")
.arg("http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash")
.arg("http://www.real.com").arg("http://www.real.com")
.arg("about:plugins") )
.arg( i18n("<A HREF=\"%1\">ECMA-262</A> Edition 3 (roughly equals JavaScript 1.5)", QString("http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM")) )
.arg( i18n("JavaScript disabled (globally). Enable JavaScript <A HREF=\"%1\">here</A>.", QString("exec:/kcmshell khtml_java_js")) )
.arg( i18n("JavaScript enabled (globally). Configure JavaScript <A HREF=\\\"%1\\\">here</A>.", QString("exec:/kcmshell khtml_java_js")) ) // leave the double backslashes here, they are necessary for javascript !
.arg( i18n("Secure <A HREF=\"%1\">Java</A><SUP>&reg;</SUP> support", QString("http://java.sun.com")) )
.arg( i18n("JDK 1.2.0 (Java 2) compatible VM (<A HREF=\"%1\">Blackdown</A>, <A HREF=\"%2\">IBM</A> or <A HREF=\"%3\">Sun</A>)",
QString("http://www.blackdown.org"), QString("http://www.ibm.com"), QString("http://java.sun.com")) )
.arg( i18n("Enable Java (globally) <A HREF=\"%1\">here</A>.", QString("exec:/kcmshell khtml_java_js")) ) // TODO Maybe test if Java is enabled ?
.arg( i18n("Netscape Communicator<SUP>&reg;</SUP> <A HREF=\"%4\">plugins</A> (for viewing <A HREF=\"%1\">Flash<SUP>&reg;</SUP></A>, <A HREF=\"%2\">Real<SUP>&reg;</SUP></A>Audio, <A HREF=\"%3\">Real<SUP>&reg;</SUP></A>Video, etc.)",
QString("http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"),
QString("http://www.real.com"), QString("http://www.real.com"),
QString("about:plugins")) )
.arg( i18n("built-in") )
.arg( i18n("Secure Sockets Layer") )
.arg( i18n("(TLS/SSL v2/3) for secure communications up to 168bit") )
@ -282,13 +282,13 @@ QString KonqAboutPageFactory::specs()
.arg( i18n("Transfer protocols") )
.arg( i18n("HTTP 1.1 (including gzip/bzip2 compression)") )
.arg( i18n("FTP") )
.arg( i18n("and <A HREF=\"%1\">many more...</A>").arg("exec:/kcmshell ioslaveinfo") )
.arg( i18n("and <A HREF=\"%1\">many more...</A>", QString("exec:/kcmshell ioslaveinfo")) )
.arg( i18n("URL-Completion") )
.arg( i18n("Manual"))
.arg( i18n("Popup"))
.arg( i18n("(Short-) Automatic"))
.arg( "<img width='16' height='16' src=\"%1\">" ).arg( continue_icon_path )
.arg( i18n("<a href=\"%1\">Return to Starting Points</a>").arg("launch.html") )
.arg( i18n("<a href=\"%1\">Return to Starting Points</a>", QString("launch.html")) )
;
@ -342,37 +342,37 @@ QString KonqAboutPageFactory::tips()
"using Google, for the search phrase \"KDE\". There are a lot of "
"Web-Shortcuts predefined to make searching for software or looking "
"up certain words in an encyclopedia a breeze. You can even "
"<a href=\"%1\">create your own</a> Web-Shortcuts." ).arg("exec:/kcmshell ebrowsing") )
"<a href=\"%1\">create your own</a> Web-Shortcuts." , QString("exec:/kcmshell ebrowsing")) )
.arg( i18n( "Use the magnifier button <img width='16' height='16' src=\"%1\"> in the"
" toolbar to increase the font size on your web page.").arg(viewmag_icon_path) )
" toolbar to increase the font size on your web page.", viewmag_icon_path) )
.arg( i18n( "When you want to paste a new address into the Location toolbar you might want to "
"clear the current entry by pressing the black arrow with the white cross "
"<img width='16' height='16' src=\"%1\"> in the toolbar.")
.arg(QApplication::isRightToLeft() ? locationbar_erase_rtl_icon_path : locationbar_erase_icon_path))
"<img width='16' height='16' src=\"%1\"> in the toolbar.",
QApplication::isRightToLeft() ? locationbar_erase_rtl_icon_path : locationbar_erase_icon_path))
.arg( i18n( "To create a link on your desktop pointing to the current page, "
"simply drag the \"Location\" label that is to the left of the Location toolbar, drop it on to "
"the desktop, and choose \"Link\"." ) )
.arg( i18n( "You can also find <img width='16' height='16' src=\"%1\"> \"Full-Screen Mode\" "
"in the Settings menu. This feature is very useful for \"Talk\" "
"sessions.").arg(window_fullscreen_icon_path) )
"sessions.", window_fullscreen_icon_path) )
.arg( i18n( "Divide et impera (lat. \"Divide and conquer\") - by splitting a window "
"into two parts (e.g. Window -> <img width='16' height='16' src=\"%1\"> Split View "
"Left/Right) you can make Konqueror appear the way you like. You"
" can even load some example view-profiles (e.g. Midnight Commander)"
", or create your own ones." ).arg(view_left_right_icon_path))
", or create your own ones." , view_left_right_icon_path))
.arg( i18n( "Use the <a href=\"%1\">user-agent</a> feature if the website you are visiting "
"asks you to use a different browser "
"(and do not forget to send a complaint to the webmaster!)" ).arg("exec:/kcmshell useragent") )
"(and do not forget to send a complaint to the webmaster!)" , QString("exec:/kcmshell useragent")) )
.arg( i18n( "The <img width='16' height='16' src=\"%1\"> History in your SideBar ensures "
"that you can keep track of the pages you have visited recently.").arg(history_icon_path) )
"that you can keep track of the pages you have visited recently.", history_icon_path) )
.arg( i18n( "Use a caching <a href=\"%1\">proxy</a> to speed up your"
" Internet connection.").arg("exec:/kcmshell proxy") )
" Internet connection.", QString("exec:/kcmshell proxy")) )
.arg( i18n( "Advanced users will appreciate the Konsole which you can embed into "
"Konqueror (Window -> <img width='16' height='16' SRC=\"%1\"> Show "
"Terminal Emulator).").arg(openterm_icon_path))
"Terminal Emulator).", openterm_icon_path))
.arg( i18n( "Thanks to <a href=\"%1\">DCOP</a> you can have full control over Konqueror using a script."
).arg("exec:/kdcop") )
.arg( i18n( "<img width='16' height='16' src=\"%1\">" ).arg( continue_icon_path ) )
, QString("exec:/kdcop")) )
.arg( i18n( "<img width='16' height='16' src=\"%1\">" , continue_icon_path ) )
.arg( i18n( "Next: Specifications" ) )
;

View file

@ -47,8 +47,10 @@
#include "KDesktopIface_stub.h"
#include "kwin.h"
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <QX11Info>
#endif
static const char appName[] = "kfmclient";
static const char programName[] = I18N_NOOP("kfmclient");
@ -244,6 +246,7 @@ static bool startNewKonqueror( QString url, QString mimetype, const QString& pro
static int currentScreen()
{
#ifdef Q_WS_X11
QX11Info info;
if( QX11Info::display() != NULL )
return info.screen();
@ -255,6 +258,7 @@ static int currentScreen()
const char* colonpos = strrchr( env, ':' );
if( dotpos != NULL && colonpos != NULL && dotpos > colonpos )
return atoi( dotpos + 1 );
#endif
return 0;
}
@ -305,6 +309,7 @@ static DCOPCString konqyToReuse( const QString& url, const QString& mimetype, co
void clientApp::sendASNChange()
{
#ifdef Q_WS_X11
KStartupInfoId id;
id.initId( startup_id_str );
KStartupInfoData data;
@ -317,6 +322,7 @@ void clientApp::sendASNChange()
KStartupInfo::sendChangeX( dpy, id, data );
if( dpy != NULL && dpy != QX11Info::display())
XCloseDisplay( dpy );
#endif
}
bool clientApp::createNewWindow(const KUrl & url, bool newTab, bool tempFile, const QString & mimetype)
@ -352,7 +358,9 @@ bool clientApp::createNewWindow(const KUrl & url, bool newTab, bool tempFile, co
kDebug() << config.readEntry( "BrowserApplication" ) << endl;
Q_ASSERT( qApp );
//clientApp app;
#ifdef Q_WS_X11
KStartupInfo::appStarted();
#endif
KRun * run = new KRun( url,0L ); // TODO pass tempFile [needs support in the KRun ctor]
QObject::connect( run, SIGNAL( finished() ), qApp, SLOT( delayedQuit() ));
@ -402,9 +410,11 @@ bool clientApp::createNewWindow(const KUrl & url, bool newTab, bool tempFile, co
kError() << "Couldn't start konqueror from konqueror.desktop: " << error << endl;
*/
// pass kfmclient's startup id to konqueror using kshell
#ifdef Q_WS_X11
KStartupInfoId id;
id.initId( startup_id_str );
id.setupStartupEnv();
#endif
KProcess proc;
proc << "kshell" << "konqueror";
if ( !mimetype.isEmpty() )
@ -413,7 +423,9 @@ bool clientApp::createNewWindow(const KUrl & url, bool newTab, bool tempFile, co
proc << "-tempfile";
proc << url.url();
proc.start( KProcess::DontCare );
#ifdef Q_WS_X11
KStartupInfo::resetStartupEnv();
#endif
kDebug( 1202 ) << "clientApp::createNewWindow KProcess started" << endl;
//}
}
@ -440,7 +452,7 @@ bool clientApp::openProfile( const QString & profileName, const QString & url, c
QString profile = locate( "data", QLatin1String("konqueror/profiles/") + profileName );
if ( profile.isEmpty() )
{
fprintf( stderr, "%s", i18n("Profile %1 not found\n").arg(profileName).toLocal8Bit().data() );
fprintf( stderr, "%s", i18n("Profile %1 not found\n", profileName).toLocal8Bit().data() );
::exit( 0 );
}
KonquerorIface_stub konqy( appId, "KonquerorIface" );
@ -487,8 +499,10 @@ bool clientApp::doIt()
}
QByteArray command = args->arg(0);
#ifdef Q_WS_X11
// read ASN env. variable for non-KApp cases
startup_id_str = KStartupInfo::currentStartupIdEnv().id();
#endif
kDebug() << "Creating clientApp" << endl;
int fake_argc = 0;
@ -645,7 +659,7 @@ bool clientApp::doIt()
}
else
{
fprintf( stderr, "%s", i18n("Syntax Error: Unknown command '%1'\n").arg(QString::fromLocal8Bit(command)).toLocal8Bit().data() );
fprintf( stderr, "%s", i18n("Syntax Error: Unknown command '%1'\n", QString::fromLocal8Bit(command)).toLocal8Bit().data() );
return false;
}
return true;

View file

@ -426,8 +426,10 @@ bool KonqCombo::eventFilter( QObject *o, QEvent *ev )
return false;
}
if ( KKey( e ) == KKey( int( KStdAccel::deleteWordBack() ) ) ||
KKey( e ) == KKey( int( KStdAccel::deleteWordForward() ) ) ||
KShortcut key = e->key() | e->modifiers();
if ( key == KStdAccel::deleteWordBack() ||
key == KStdAccel::deleteWordForward() ||
((e->modifiers() & Qt::ControlModifier) &&
(e->key() == Qt::Key_Left || e->key() == Qt::Key_Right) ) ) {
selectWord(e);
@ -449,8 +451,9 @@ void KonqCombo::keyPressEvent( QKeyEvent *e )
KHistoryCombo::keyPressEvent( e );
// we have to set it as temporary, otherwise we wouldn't get our nice
// pixmap. Yes, QComboBox still sucks.
if ( KKey( e ) == KKey( int( KStdAccel::rotateUp() ) ) ||
KKey( e ) == KKey( int( KStdAccel::rotateDown() ) ) )
KShortcut key = e->key() | e->modifiers();
if ( key == KStdAccel::rotateUp() ||
key == KStdAccel::rotateDown() )
setTemporary( currentText() );
}

View file

@ -139,8 +139,8 @@ KonqViewFactory KonqFactory::createView( const QString &serviceType,
factory = KLibLoader::self()->factory( QFile::encodeName(service->library()) );
if ( !factory )
KMessageBox::error(0,
i18n("There was an error loading the module %1.\nThe diagnostics is:\n%2")
.arg(service->name()).arg(KLibLoader::self()->lastErrorMessage()));
i18n("There was an error loading the module %1.\nThe diagnostics is:\n%2",
service->name(), KLibLoader::self()->lastErrorMessage()));
}
KTrader::OfferList::Iterator it = offers.begin();
@ -157,8 +157,8 @@ KonqViewFactory KonqFactory::createView( const QString &serviceType,
factory = KLibLoader::self()->factory( QFile::encodeName(service->library()) );
if ( !factory )
KMessageBox::error(0,
i18n("There was an error loading the module %1.\nThe diagnostics is:\n%2")
.arg(service->name()).arg(KLibLoader::self()->lastErrorMessage()));
i18n("There was an error loading the module %1.\nThe diagnostics is:\n%2",
service->name(), KLibLoader::self()->lastErrorMessage()));
// If this works, we exit the loop.
} else
kDebug(1202) << "Not allowed as default " << service->desktopEntryName() << endl;

View file

@ -233,7 +233,7 @@ void KonqFrameStatusBar::slotSpeedProgress( int bytesPerSecond )
QString sizeStr;
if ( bytesPerSecond > 0 )
sizeStr = i18n( "%1/s" ).arg( KIO::convertSize( bytesPerSecond ) );
sizeStr = i18n( "%1/s" , KIO::convertSize( bytesPerSecond ) );
else
sizeStr = i18n( "Stalled" );

View file

@ -72,7 +72,7 @@ PopupMenuGUIClient::PopupMenuGUIClient( KonqMainWindow *mainWindow,
if ( embeddingServices.count() == 1 )
{
KService::Ptr service = *embeddingServices.begin();
addEmbeddingService( menu, 0, i18n( "Preview in %1" ).arg( service->name() ), service );
addEmbeddingService( menu, 0, i18n( "Preview in %1" , service->name() ), service );
}
else if ( embeddingServices.count() > 1 )
{
@ -186,11 +186,11 @@ ToggleViewGUIClient::ToggleViewGUIClient( KonqMainWindow *mainWindow )
KTrader::OfferList::ConstIterator cEnd = offers.end();
for (; cIt != cEnd; ++cIt )
{
QString description = i18n( "Show %1" ).arg( (*cIt)->name() );
QString description = i18n( "Show %1" , (*cIt)->name() );
QString name = (*cIt)->desktopEntryName();
//kDebug(1202) << "ToggleViewGUIClient: name=" << name << endl;
KToggleAction *action = new KToggleAction( description, mainWindow->actionCollection(), name.toLatin1() );
action->setCheckedState( i18n( "Hide %1" ).arg( (*cIt)->name() ) );
action->setCheckedState( i18n( "Hide %1" , (*cIt)->name() ) );
// HACK
if ( (*cIt)->icon() != "unknown" )

View file

@ -34,7 +34,10 @@
#include <qfile.h>
#include <QApplication>
#include <qwidget.h>
#ifdef Q_WS_X11
#include <QX11Info>
#endif
static const KCmdLineOptions options[] =
{
@ -128,6 +131,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
{
if (args->isSet("preload"))
{
#ifdef Q_WS_X11
if( KonqSettings::maxPreloadCount() > 0 )
{
DCOPRef ref( "kded", "konqy_preloader" );
@ -145,6 +149,9 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
{
return 0; // no preloading
}
#else
return 0; // no preloading
#endif
}
else if (!args->isSet("silent"))
{

View file

@ -64,7 +64,9 @@
#include <qmetaobject.h>
#include <qlayout.h>
#include <qfileinfo.h>
#ifdef Q_WS_X11
#include <QX11Info>
#endif
//Added by qt3to4:
#include <QCustomEvent>
#include <QFocusEvent>
@ -121,10 +123,12 @@
#include <malloc.h>
#endif
#include <X11/Xlib.h>
#include <sys/time.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <fixx11h.h>
#endif
#include <kauthorized.h>
#include <ktoolinvocation.h>
@ -499,12 +503,12 @@ void KonqMainWindow::openURL( KonqView *_view, const KUrl &_url,
}
else if ( !url.isValid() )
{
KMessageBox::error(0, i18n("Malformed URL\n%1").arg(url.url()));
KMessageBox::error(0, i18n("Malformed URL\n%1", url.url()));
return;
}
else if ( !KProtocolInfo::isKnownProtocol( url ) && url.protocol() != "about" )
{
KMessageBox::error(0, i18n("Protocol not supported\n%1").arg(url.protocol()));
KMessageBox::error(0, i18n("Protocol not supported\n%1", url.protocol()));
return;
}
@ -587,7 +591,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KUrl &_url,
//kDebug(1202) << "KonqMainWindow::openURL : we were not following. Fire app." << endl;
// We know the servicetype, let's try its preferred service
if ( isMimeTypeAssociatedWithSelf( serviceType, offer ) ) {
KMessageBox::error( this, i18n("There appears to be a configuration error. You have associated Konqueror with %1, but it cannot handle this file type.").arg(serviceType));
KMessageBox::error( this, i18n("There appears to be a configuration error. You have associated Konqueror with %1, but it cannot handle this file type.", serviceType));
return;
}
if ( !url.isLocalFile() && KonqRun::isTextExecutable( serviceType ) )
@ -862,7 +866,7 @@ bool KonqMainWindow::openView( QString serviceType, const KUrl &_url, KonqView *
KonqRun* run = childView->run();
if (run)
suggestedFilename = run->suggestedFilename();
suggestedFilename = run->suggestedFileName();
KParts::BrowserRun::AskSaveResult res = KParts::BrowserRun::askEmbedOrSave(
url, serviceType, suggestedFilename );
@ -1230,6 +1234,7 @@ void KonqMainWindow::slotCreateNewWindow( const KUrl &url, const KParts::URLArgs
// and the WM should take care of it itself.
bool wm_usertime_support = false;
#ifdef Q_WS_X11
Time saved_last_input_time = QX11Info::appUserTime();
if ( windowArgs.lowerWindow )
{
@ -1262,6 +1267,9 @@ void KonqMainWindow::slotCreateNewWindow( const KUrl &url, const KParts::URLArgs
this->setActiveWindow();
}
}
#else // Q_WS_X11
mainWindow->show();
#endif
if ( windowArgs.fullscreen )
mainWindow->action( "fullscreen" )->trigger();
@ -2832,15 +2840,15 @@ void KonqMainWindow::slotRemoveLocalProperties()
} else
{
Q_ASSERT( QFile::exists(u.path()) ); // The action shouldn't be enabled, otherwise.
KMessageBox::sorry( this, i18n("No permissions to write to %1").arg(u.path()) );
KMessageBox::sorry( this, i18n("No permissions to write to %1", u.path()) );
}
}
}
bool KonqMainWindow::askForTarget(const QString& text, KUrl& url)
bool KonqMainWindow::askForTarget(const KLocalizedString& text, KUrl& url)
{
const KUrl initialUrl = (viewCount()==2) ? otherView(m_currentView)->url() : m_currentView->url();
QString label = text.arg( m_currentView->url().pathOrURL() );
QString label = text.subs( m_currentView->url().pathOrURL() ).toString();
KUrlRequesterDlg dlg(initialUrl.pathOrURL(), label, this);
dlg.setCaption(i18n("Enter Target"));
dlg.urlRequester()->setMode( KFile::File | KFile::ExistingOnly | KFile::Directory );
@ -2851,7 +2859,7 @@ bool KonqMainWindow::askForTarget(const QString& text, KUrl& url)
return true;
else
{
KMessageBox::error( this, i18n("<qt><b>%1</b> is not valid</qt>").arg(url.url()));
KMessageBox::error( this, i18n("<qt><b>%1</b> is not valid</qt>", url.url()));
return false;
}
}
@ -2867,7 +2875,7 @@ void KonqMainWindow::slotCopyFiles()
{
//kDebug(1202) << "KonqMainWindow::slotCopyFiles()" << endl;
KUrl dest;
if (!askForTarget(i18n("Copy selected files from %1 to:"),dest))
if (!askForTarget(ki18n("Copy selected files from %1 to:"),dest))
return;
KonqOperations::copy(this,KonqOperations::COPY,currentURLs(),dest);
@ -2877,7 +2885,7 @@ void KonqMainWindow::slotMoveFiles()
{
//kDebug(1202) << "KonqMainWindow::slotMoveFiles()" << endl;
KUrl dest;
if (!askForTarget(i18n("Move selected files from %1 to:"),dest))
if (!askForTarget(ki18n("Move selected files from %1 to:"),dest))
return;
KonqOperations::copy(this,KonqOperations::MOVE,currentURLs(),dest);
@ -3672,7 +3680,7 @@ void KonqMainWindow::initActions()
m_paLinkView = new KToggleAction( i18n( "Lin&k View"), 0, this, SLOT( slotLinkView() ), actionCollection(), "link" );
// Go menu
m_paUp = new KToolBarPopupAction( i18n( "&Up" ), "up", KStdAccel::shortcut(KStdAccel::Up), actionCollection(), "up" );
m_paUp = new KToolBarPopupAction( i18n( "&Up" ), QString("up"), KStdAccel::shortcut(KStdAccel::Up), actionCollection(), QString("up") );
connect( m_paUp, SIGNAL( triggered( Qt::MouseButtons, Qt::KeyboardModifiers) ), this,
SLOT( slotUp(Qt::MouseButtons, Qt::KeyboardModifiers) ) );
connect( m_paUp->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT( slotUpAboutToShow() ) );
@ -3743,7 +3751,7 @@ void KonqMainWindow::initActions()
// Window menu
m_paSplitViewHor = new KAction( i18n( "Split View &Left/Right" ), "view_left_right", Qt::CTRL+Qt::SHIFT+Qt::Key_L, this, SLOT( slotSplitViewHorizontal() ), actionCollection(), "splitviewh" );
m_paSplitViewVer = new KAction( i18n( "Split View &Top/Bottom" ), "view_top_bottom", Qt::CTRL+Qt::SHIFT+Qt::Key_T, this, SLOT( slotSplitViewVertical() ), actionCollection(), "splitviewv" );
m_paAddTab = new KAction( i18n( "&New Tab" ), "tab_new", "CTRL+SHIFT+N;CTRL+T", this, SLOT( slotAddTab() ), actionCollection(), "newtab" );
m_paAddTab = new KAction( i18n( "&New Tab" ), "tab_new", KShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_N, Qt::CTRL+Qt::Key_T), this, SLOT( slotAddTab() ), actionCollection(), "newtab" );
m_paDuplicateTab = new KAction( i18n( "&Duplicate Current Tab" ), "tab_duplicate", Qt::CTRL+Qt::SHIFT+Qt::Key_D, this, SLOT( slotDuplicateTab() ), actionCollection(), "duplicatecurrenttab" );
m_paBreakOffTab = new KAction( i18n( "Detach Current Tab" ), "tab_breakoff", Qt::CTRL+Qt::SHIFT+Qt::Key_B, this, SLOT( slotBreakOffTab() ), actionCollection(), "breakoffcurrenttab" );
m_paRemoveView = new KAction( i18n( "&Close Active View" ),"view_remove", Qt::CTRL+Qt::SHIFT+Qt::Key_R, this, SLOT( slotRemoveView() ), actionCollection(), "removeview" );
@ -3756,7 +3764,7 @@ void KonqMainWindow::initActions()
QString actionname;
for (int i=1;i<13;i++) {
actionname.sprintf("activate_tab_%02d", i);
new KAction(i18n("Activate Tab %1").arg(i), 0, this, SLOT(slotActivateTab()), actionCollection(), actionname.toUtf8());
new KAction(i18n("Activate Tab %1", i), 0, this, SLOT(slotActivateTab()), actionCollection(), actionname.toUtf8());
}
m_paMoveTabLeft = new KAction( i18n("Move Tab Left"), 0 , Qt::CTRL+Qt::SHIFT+Qt::Key_Left,this, SLOT( slotMoveTabLeft()),actionCollection(),"tab_move_left");
@ -3773,12 +3781,12 @@ void KonqMainWindow::initActions()
m_ptaFullScreen = KStdAction::fullScreen( 0, 0, actionCollection(), this );
KShortcut fullScreenShortcut = m_ptaFullScreen->shortcut();
fullScreenShortcut.append( KKey( Qt::Key_F11 ) );
fullScreenShortcut.append( Qt::Key_F11 );
m_ptaFullScreen->setShortcut( fullScreenShortcut );
connect( m_ptaFullScreen, SIGNAL( toggled( bool )), this, SLOT( slotUpdateFullScreen( bool )));
KShortcut reloadShortcut = KStdAccel::shortcut(KStdAccel::Reload);
reloadShortcut.append(KKey(Qt::CTRL + Qt::Key_R));
reloadShortcut.append(Qt::CTRL + Qt::Key_R);
m_paReload = new KAction( i18n( "&Reload" ), "reload", reloadShortcut, this, SLOT( slotReload() ), actionCollection(), "reload" );
m_paReloadAllTabs = new KAction( i18n( "&Reload All Tabs" ), "reload_all_tabs", Qt::SHIFT+Qt::Key_F5, this, SLOT( slotReloadAllTabs() ), actionCollection(), "reload_all_tabs" );
@ -3790,7 +3798,7 @@ void KonqMainWindow::initActions()
// Those are connected to the browserextension directly
m_paCut = KStdAction::cut( 0, 0, actionCollection(), "cut" );
KShortcut cutShortCut = m_paCut->shortcut();
cutShortCut.remove( KKey( Qt::SHIFT + Qt::Key_Delete ) ); // used for deleting files
cutShortCut.remove( Qt::SHIFT + Qt::Key_Delete ); // used for deleting files
m_paCut->setShortcut( cutShortCut );
m_paCopy = KStdAction::copy( 0, 0, actionCollection(), "copy" );
@ -3859,7 +3867,7 @@ void KonqMainWindow::initActions()
// help stuff
m_paUp->setWhatsThis( i18n( "Enter the parent folder<p>"
"For instance, if the current location is file:/home/%1 clicking this "
"button will take you to file:/home." ).arg( KUser().loginName() ) );
"button will take you to file:/home." , KUser().loginName() ) );
m_paUp->setToolTip( i18n( "Enter the parent folder" ) );
m_paBack->setWhatsThis( i18n( "Move backwards one step in the browsing history<p>" ) );
@ -4264,7 +4272,7 @@ void KonqMainWindow::currentProfileChanged()
{
bool enabled = !m_pViewManager->currentProfile().isEmpty();
m_paSaveViewProfile->setEnabled( enabled );
m_paSaveViewProfile->setText( enabled ? i18n("&Save View Profile \"%1\"...").arg(m_pViewManager->currentProfileText())
m_paSaveViewProfile->setText( enabled ? i18n("&Save View Profile \"%1\"...", m_pViewManager->currentProfileText())
: i18n("&Save View Profile...") );
}
@ -4784,7 +4792,7 @@ void KonqMainWindow::updateOpenWithActions()
KTrader::OfferList::ConstIterator end = services.end();
for (; it != end; ++it )
{
KAction *action = new KAction( i18n( "Open with %1" ).arg( (*it)->name() ), 0, 0, 0, actionCollection(), (*it)->desktopEntryName().toLatin1() );
KAction *action = new KAction( i18n( "Open with %1" , (*it)->name() ), 0, 0, 0, actionCollection(), (*it)->desktopEntryName().toLatin1() );
action->setIconName( (*it)->icon() );
connect( action, SIGNAL( activated() ),
@ -5193,8 +5201,8 @@ void KonqMainWindow::slotAddWebSideBar(const KUrl& url, const QString& name)
}
int rc = KMessageBox::questionYesNo(0L,
i18n("Add new web extension \"%1\" to your sidebar?")
.arg(name.isEmpty() ? name : url.prettyURL()),
i18n("Add new web extension \"%1\" to your sidebar?",
name.isEmpty() ? name : url.prettyURL()),
i18n("Web Sidebar"),i18n("Add"),i18n("Do Not Add"));
if (rc == KMessageBox::Yes) {
@ -5537,6 +5545,7 @@ void KonqMainWindow::setPreloadedWindow( KonqMainWindow* window )
// that won't be reset by loading a profile
void KonqMainWindow::resetWindow()
{
#ifdef Q_WS_X11
char data[ 1 ];
// empty append to get current X timestamp
QWidget tmp_widget;
@ -5556,6 +5565,7 @@ void KonqMainWindow::resetWindow()
static Atom atom3 = XInternAtom( QX11Info::display(), "_NET_WM_USER_TIME", False );
XDeleteProperty( QX11Info::display(), winId(), atom3 );
#endif
// Qt remembers the iconic state if the window was withdrawn while on another virtual desktop
setWindowState( windowState() & ~Qt::WindowMinimized );
ignoreInitialGeometry();
@ -5620,6 +5630,7 @@ bool KonqMainWindow::event( QEvent* e )
bool KonqMainWindow::stayPreloaded()
{
#ifdef Q_WS_X11
// last window?
if( mainWindowList()->count() > 1 )
return false;
@ -5642,6 +5653,9 @@ bool KonqMainWindow::stayPreloaded()
kDebug(1202) << "Konqy kept for preloading :" << kapp->dcopClient()->appId() << endl;
KonqMainWindow::setPreloadedWindow( this );
return true;
#else
return false;
#endif
}
// try to avoid staying running when leaking too much memory

View file

@ -36,6 +36,7 @@
#include <QCustomEvent>
#include <kfileitem.h>
#include <klocale.h>
#include "konq_openurlrequest.h"
#include <kparts/mainwindow.h>
@ -49,6 +50,7 @@
#include <ktrader.h>
#include "konq_combo.h"
#include "konq_frame.h"
#include <klocalizedstring.h>
class QFile;
class KAction;
@ -536,7 +538,7 @@ protected:
virtual void closeEvent( QCloseEvent * );
virtual bool queryExit();
bool askForTarget(const QString& text, KUrl& url);
bool askForTarget(const KLocalizedString& text, KUrl& url);
private Q_SLOTS:
void slotUndoTextChanged(const QString& newText);

View file

@ -130,7 +130,9 @@ KonqMainWindow * KonqMisc::createBrowserWindowFromProfile( const QString &path,
else if( KonqMainWindow::isPreloaded() && KonqMainWindow::preloadedWindow() != NULL )
{
mainWindow = KonqMainWindow::preloadedWindow();
#ifdef Q_WS_X11
KStartupInfo::setWindowStartupId( mainWindow->winId(), kapp->startupId());
#endif
KonqMainWindow::setPreloadedWindow( NULL );
KonqMainWindow::setPreloadedFlag( false );
mainWindow->resetWindow();

View file

@ -115,7 +115,7 @@ void KonqRun::foundMimeType( const QString & _type )
if ( !m_bFinished && // only if we're going to open
KonqMainWindow::isMimeTypeAssociatedWithSelf( mimeType ) ) {
KMessageBox::error( m_pMainWindow, i18n( "There appears to be a configuration error. You have associated Konqueror with %1, but it cannot handle this file type." ).arg( mimeType ) );
KMessageBox::error( m_pMainWindow, i18n( "There appears to be a configuration error. You have associated Konqueror with %1, but it cannot handle this file type." , mimeType ) );
m_bFinished = true;
}

View file

@ -267,8 +267,8 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
}
else
{
QString msg = dir ? i18n("<qt><b>%1</b> does not have a home folder.</qt>").arg(user) :
i18n("<qt>There is no user called <b>%1</b>.</qt>").arg(user);
QString msg = dir ? i18n("<qt><b>%1</b> does not have a home folder.</qt>", user) :
i18n("<qt>There is no user called <b>%1</b>.</qt>", user);
setErrorMsg( data, msg );
setURIType( data, KURIFilterData::ERROR );
// Always return true for error conditions so
@ -494,7 +494,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
return true;
}
//kDebug() << "fileNotFound -> ERROR" << endl;
setErrorMsg( data, i18n( "<qt>The file or folder <b>%1</b> does not exist." ).arg( data.uri().prettyURL() ) );
setErrorMsg( data, i18n( "<qt>The file or folder <b>%1</b> does not exist.", data.uri().prettyURL() ) );
setURIType( data, KURIFilterData::ERROR );
return true;
}

View file

@ -114,7 +114,7 @@ FileTypeDetails::FileTypeDetails( QWidget * parent )
// The order of those three items is very important. If you change it, fix typeslistitem.cpp !
new QRadioButton( i18n("Show file in embedded viewer"), m_autoEmbed );
new QRadioButton( i18n("Show file in separate viewer"), m_autoEmbed );
m_rbGroupSettings = new QRadioButton( i18n("Use settings for '%1' group"), m_autoEmbed );
m_rbGroupSettings = new QRadioButton( QString("Use settings for '%1' group"), m_autoEmbed );
connect(m_autoEmbed, SIGNAL( clicked( int ) ), SLOT( slotAutoEmbedClicked( int ) ));
m_chkAskSave = new QCheckBox( i18n("Ask whether to save to disk instead"), m_autoEmbed);
@ -282,7 +282,7 @@ void FileTypeDetails::setTypeItem( TypesListItem * tlitem )
iconButton->resetIcon();
description->setText(tlitem ? tlitem->comment() : QString());
if ( tlitem )
m_rbGroupSettings->setText( i18n("Use settings for '%1' group").arg( tlitem->majorType() ) );
m_rbGroupSettings->setText( i18n("Use settings for '%1' group", tlitem->majorType() ) );
extensionLB->clear();
addExtButton->setEnabled(true);
removeExtButton->setEnabled(false);

View file

@ -28,10 +28,10 @@
#include <kcmdlineargs.h>
#include <ksycoca.h>
#include <kstandarddirs.h>
#include <QX11Info>
#include <klocale.h>
#ifdef Q_WS_X11
#include <QX11Info>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#endif
@ -106,7 +106,7 @@ void FileTypeDialog::slotDatabaseChanged()
static KCmdLineOptions options[] =
{
{ "parent <winid>", I18N_NOOP("Makes the dialog transient for the window specified by winid"), 0 },
{ "+mimetype", I18N_NOOP("File type to edit (e.g. text/html)"), 0 },
{ "+mimetype", I18N_NOOP("File type to edit (e.g. text/html)"), 0 },
KCmdLineLastOption
};
@ -151,7 +151,7 @@ int main(int argc, char ** argv)
QString comment;
if ( arg.startsWith( "*." ) && arg.length() >= 3 ) {
QString type = arg.mid( 3 ).prepend( arg[2].toUpper() );
comment = i18n( "%1 File" ).arg( type );
comment = i18n( "%1 File", type );
}
mime = new KMimeType( loc, mimeString.arg( inc ), QString(), comment, patterns );
}
@ -172,9 +172,9 @@ int main(int argc, char ** argv)
#endif
args->clear();
if ( !createType )
dlg.setCaption( i18n("Edit File Type %1").arg(mime->name()) );
dlg.setCaption( i18n("Edit File Type %1", mime->name()) );
else {
dlg.setCaption( i18n("Create New File Type %1").arg(mime->name()) );
dlg.setCaption( i18n("Create New File Type %1", mime->name()) );
dlg.enableButton( KDialogBase::Apply, true );
}
app.setMainWidget( &dlg );

View file

@ -45,7 +45,7 @@ KServiceListItem::KServiceListItem( KService::Ptr pService, int kind )
if ( kind == KServiceListWidget::SERVICELIST_APPLICATIONS )
setText( pService->name() );
else
setText( i18n( "%1 (%2)" ).arg( pService->name() ).arg( pService->desktopEntryName() ) );
setText( i18n( "%1 (%2)", pService->name(), pService->desktopEntryName() ) );
bool isApplication = pService->type() == "Application";
if (!isApplication)
@ -350,18 +350,6 @@ void KServiceListWidget::editService()
void KServiceListWidget::removeService()
{
if (!m_item) return;
// Here are some strings already so that we don't have to break translations
// later on.
QString msg1 = i18n("The service <b>%1</b> can not be removed.");
QString msg2 = i18n("The service is listed here because it has been associated "
"with the <b>%1</b> (%2) file type and files of type "
"<b>%3</b> (%4) are per definition also of type "
"<b>%5</b>.");
QString msg3 = i18n("Either select the <b>%1</b> file type to remove the "
"service from there or move the service down "
"to deprecate it.");
QString msg4 = i18n("Do you want to remove the service from the <b>%1</b> "
"file type or from the <b>%2</b> file type?");
int selected = servicesLB->currentItem();
@ -375,11 +363,21 @@ void KServiceListWidget::removeService()
}
else if (mimetype)
{
KMessageBox::sorry(this, "<qt>"+msg1.arg(serviceItem->text())+"<p>"+
msg2.arg(mimetype->name()).arg(mimetype->comment()).
arg(m_item->name()).arg(m_item->comment()).
arg(mimetype->name())+"<p>"+
msg3.arg(mimetype->name()));
KMessageBox::sorry(this, "<qt>"+
i18n("The service <b>%1</b> can not be removed.", serviceItem->text())+
"<p>"+
i18n("The service is listed here because it has been associated "
"with the <b>%1</b> (%2) file type and files of type "
"<b>%3</b> (%4) are per definition also of type "
"<b>%5</b>.", mimetype->name(), mimetype->comment(),
m_item->name(), m_item->comment(), mimetype->name())+
"<p>"+
i18n("Either select the <b>%1</b> file type to remove the "
"service from there or move the service down "
"to deprecate it.", mimetype->name()));
// i18n("Do you want to remove the service from the <b>%1</b> "
// "file type or from the <b>%2</b> file type?", ???, ???);
}
else
{

View file

@ -174,7 +174,7 @@ bool KCookiesPolicies::handleDuplicate( const QString& domain, int advice )
{
QString msg = i18n("<qt>A policy already exists for"
"<center><b>%1</b></center>"
"Do you want to replace it?</qt>").arg(domain);
"Do you want to replace it?</qt>", domain);
int res = KMessageBox::warningContinueCancel(this, msg,
i18n("Duplicate Policy"),
i18n("Replace"));

View file

@ -342,7 +342,7 @@ bool KManualProxyDlg::handleDuplicate( const QString& site )
QString msg = i18n("You entered a duplicate address. "
"Please try again.");
QString details = i18n("<qt><center><b>%1</b></center> "
"is already in the list.</qt>").arg(site);
"is already in the list.</qt>", site);
KMessageBox::detailedError( this, msg, details, i18n("Duplicate Entry") );
return true;
}

View file

@ -25,7 +25,7 @@ KIOPreferences::KIOPreferences( KInstance *inst, QWidget* parent )
gb_Timeout->setWhatsThis( i18n("Here you can set timeout values. "
"You might want to tweak them if your "
"connection is very slow. The maximum "
"allowed value is %1 seconds.").arg(MAX_TIMEOUT_VALUE));
"allowed value is %1 seconds.", MAX_TIMEOUT_VALUE));
mainLayout->addWidget( gb_Timeout );
sb_socketRead = new KIntNumInput( gb_Timeout);

View file

@ -29,11 +29,24 @@
#include <kfiledialog.h>
#include <k3listview.h>
#include <kmessagebox.h>
#include "config.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include "socks.h"
#include "unistd.h"
#include <ksocks.h>
#include <kapplication.h>
#include <klocale.h>
#include "socks.h"
#include <kaboutdata.h>
#include <kglobal.h>

View file

@ -224,7 +224,7 @@ bool UserAgentDlg::handleDuplicate( const QString& site,
QString msg = i18n("<qt><center>Found an existing identification for"
"<br/><b>%1</b><br/>"
"Do you want to replace it?</center>"
"</qt>").arg(site);
"</qt>", site);
int res = KMessageBox::warningContinueCancel(this, msg,
i18n("Duplicate Identification"),
i18n("Replace"));

View file

@ -40,7 +40,9 @@
#include "desktop.h"
#include "desktop.moc"
#ifdef Q_WS_X11
#include <QX11Info>
#endif
extern "C"
{
@ -77,7 +79,7 @@ KDesktopConfig::KDesktopConfig(KInstance *inst, QWidget *parent)
_numInput = new KIntNumInput(4, number_group);
_numInput->setRange(1, maxDesktops, 1, true);
connect(_numInput, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
connect(_numInput, SIGNAL(valueChanged(int)), SLOT( changed() ));
connect(_numInput, SIGNAL(valueChanged(int)), SLOT( changed() ));
label->setBuddy( _numInput );
QString wtstr = i18n( "Here you can set how many virtual desktops you want on your KDE desktop. Move the slider to change the value." );
label->setWhatsThis( wtstr );
@ -96,14 +98,14 @@ KDesktopConfig::KDesktopConfig(KInstance *inst, QWidget *parent)
for(int i = 0; i < (maxDesktops/2); i++)
{
_nameLabel[i] = new QLabel(i18n("Desktop %1:").arg(i+1), name_group);
_nameLabel[i] = new QLabel(i18n("Desktop %1:", i+1), name_group);
_nameInput[i] = new KLineEdit(name_group);
_nameLabel[i+(maxDesktops/2)] = new QLabel(i18n("Desktop %1:").arg(i+(maxDesktops/2)+1), name_group);
_nameLabel[i+(maxDesktops/2)] = new QLabel(i18n("Desktop %1:", i+(maxDesktops/2)+1), name_group);
_nameInput[i+(maxDesktops/2)] = new KLineEdit(name_group);
_nameLabel[i]->setWhatsThis( i18n( "Here you can enter the name for desktop %1" ).arg( i+1 ) );
_nameInput[i]->setWhatsThis( i18n( "Here you can enter the name for desktop %1" ).arg( i+1 ) );
_nameLabel[i+(maxDesktops/2)]->setWhatsThis( i18n( "Here you can enter the name for desktop %1" ).arg( i+(maxDesktops/2)+1 ) );
_nameInput[i+(maxDesktops/2)]->setWhatsThis( i18n( "Here you can enter the name for desktop %1" ).arg( i+(maxDesktops/2)+1 ) );
_nameLabel[i]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+1 ) );
_nameInput[i]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+1 ) );
_nameLabel[i+(maxDesktops/2)]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+(maxDesktops/2)+1 ) );
_nameInput[i+(maxDesktops/2)]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+(maxDesktops/2)+1 ) );
connect(_nameInput[i], SIGNAL(textChanged(const QString&)),
SLOT( changed() ));
@ -123,7 +125,11 @@ KDesktopConfig::KDesktopConfig(KInstance *inst, QWidget *parent)
layout->addStretch(1);
// Begin check for immutable
#ifdef Q_WS_X11
int kwin_screen_number = DefaultScreen(QX11Info::display());
#else
int kwin_screen_number = 0;
#endif
KConfig config( "kwinrc" );
@ -153,6 +159,7 @@ KDesktopConfig::KDesktopConfig(KInstance *inst, QWidget *parent)
void KDesktopConfig::load()
{
#ifdef Q_WS_X11
// get number of desktops
NETRootInfo info( QX11Info::display(), NET::NumberOfDesktops | NET::DesktopNames );
int n = info.numberOfDesktops();
@ -179,10 +186,14 @@ void KDesktopConfig::load()
_wheelOption->setEnabled(false);
delete desktopConfig;
#else
_numInput->setValue(1);
#endif
}
void KDesktopConfig::save()
{
#ifdef Q_WS_X11
NETRootInfo info( QX11Info::display(), NET::NumberOfDesktops | NET::DesktopNames );
// set desktop names
for(int i = 1; i <= maxDesktops; i++)
@ -218,6 +229,7 @@ void KDesktopConfig::save()
kapp->dcopClient()->send( appname, "KDesktopIface", "configure()", data );
emit changed(false);
#endif
}
void KDesktopConfig::defaults()
@ -226,7 +238,7 @@ void KDesktopConfig::defaults()
_numInput->setValue(n);
for(int i = 0; i < maxDesktops; i++)
_nameInput[i]->setText(i18n("Desktop %1").arg(i+1));
_nameInput[i]->setText(i18n("Desktop %1", i+1));
for(int i = 0; i < maxDesktops; i++)
_nameInput[i]->setEnabled(i < n);
@ -244,7 +256,7 @@ void KDesktopConfig::slotValueChanged(int n)
{
_nameInput[i]->setEnabled(i < n);
if(i<n && _nameInput[i]->text().isEmpty())
_nameInput[i]->setText(i18n("Desktop %1").arg(i+1));
_nameInput[i]->setText(i18n("Desktop %1", i+1));
}
if (!_wheelOptionImmutable)
_wheelOption->setEnabled(n>1);

View file

@ -224,12 +224,12 @@ void KonqFontOptions::slotStandardFont(const QString& n )
void KonqFontOptions::slotPNbLinesChanged(int value)
{
m_pNbLines->setSuffix( i18n( " line", " lines", value ) );
m_pNbLines->setSuffix( i18np( " line", " lines", value ) );
}
void KonqFontOptions::slotPNbWidthChanged(int value)
{
m_pNbWidth->setSuffix( i18n( " pixel", " pixels", value ) );
m_pNbWidth->setSuffix( i18np( " pixel", " pixels", value ) );
}
void KonqFontOptions::load()

View file

@ -267,8 +267,8 @@ bool DesktopPathConfig::moveDir( const KUrl & src, const KUrl & dest, const QStr
return true;
m_ok = true;
// Ask for confirmation before moving the files
if ( KMessageBox::questionYesNo( this, i18n("The path for '%1' has been changed;\ndo you want the files to be moved from '%2' to '%3'?").
arg(type).arg(src.path()).arg(dest.path()), i18n("Confirmation Required"),i18n("Move"),KStdGuiItem::cancel() )
if ( KMessageBox::questionYesNo( this, i18n("The path for '%1' has been changed;\ndo you want the files to be moved from '%2' to '%3'?",
type, src.path(), dest.path()), i18n("Confirmation Required"),i18n("Move"),KStdGuiItem::cancel() )
== KMessageBox::Yes )
{
bool destExists = QFile::exists(dest.path());

View file

@ -171,8 +171,8 @@ KMiscHTMLOptions::KMiscHTMLOptions(KConfig *config, QString group, KInstance *in
QLabel *label = new QLabel( i18n("Und&erline links:"), this);
m_pUnderlineCombo = new QComboBox( false, this );
label->setBuddy(m_pUnderlineCombo);
m_pUnderlineCombo->insertItem(i18n("underline","Enabled"), UnderlineAlways);
m_pUnderlineCombo->insertItem(i18n("underline","Disabled"), UnderlineNever);
m_pUnderlineCombo->insertItem(i18nc("underline","Enabled"), UnderlineAlways);
m_pUnderlineCombo->insertItem(i18nc("underline","Disabled"), UnderlineNever);
m_pUnderlineCombo->insertItem(i18n("Only on Hover"), UnderlineHover);
lay->addWidget(label, row, 0);
lay->addWidget(m_pUnderlineCombo, row, 1);
@ -191,8 +191,8 @@ KMiscHTMLOptions::KMiscHTMLOptions(KConfig *config, QString group, KInstance *in
label = new QLabel( i18n("A&nimations:"), this);
m_pAnimationsCombo = new QComboBox( false, this );
label->setBuddy(m_pAnimationsCombo);
m_pAnimationsCombo->insertItem(i18n("animations","Enabled"), AnimationsAlways);
m_pAnimationsCombo->insertItem(i18n("animations","Disabled"), AnimationsNever);
m_pAnimationsCombo->insertItem(i18nc("animations","Enabled"), AnimationsAlways);
m_pAnimationsCombo->insertItem(i18nc("animations","Disabled"), AnimationsNever);
m_pAnimationsCombo->insertItem(i18n("Show Only Once"), AnimationsLoopOnce);
lay->addWidget(label, row, 0);
lay->addWidget(m_pAnimationsCombo, row, 1);

View file

@ -62,7 +62,7 @@ KPluginOptions::KPluginOptions( KConfig* config, QString group, KInstance *inst,
enablePluginsGloballyCB = new QCheckBox( i18n( "&Enable plugins globally" ), globalGB );
enableHTTPOnly = new QCheckBox( i18n( "Only allow &HTTP and HTTPS URLs for plugins" ), globalGB );
enableUserDemand = new QCheckBox( i18n( "&Load plugins on demand only" ), globalGB );
priorityLabel = new QLabel(i18n("CPU priority for plugins: %1").arg(QString()), globalGB);
priorityLabel = new QLabel(i18n("CPU priority for plugins: %1", QString()), globalGB);
priority = new QSlider(5, 100, 5, 100, Qt::Horizontal, globalGB);
connect( enablePluginsGloballyCB, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
connect( enablePluginsGloballyCB, SIGNAL( clicked() ), this, SLOT( slotTogglePluginsEnabled() ) );
@ -158,18 +158,18 @@ void KPluginOptions::updatePLabel(int p) {
QString level;
p = (100 - p)/5;
if (p > 15) {
level = i18n("lowest priority", "lowest");
level = i18nc("lowest priority", "lowest");
} else if (p > 11) {
level = i18n("low priority", "low");
level = i18nc("low priority", "low");
} else if (p > 7) {
level = i18n("medium priority", "medium");
level = i18nc("medium priority", "medium");
} else if (p > 3) {
level = i18n("high priority", "high");
level = i18nc("high priority", "high");
} else {
level = i18n("highest priority", "highest");
level = i18nc("highest priority", "highest");
}
priorityLabel->setText(i18n("CPU priority for plugins: %1").arg(level));
priorityLabel->setText(i18n("CPU priority for plugins: %1", level));
}

View file

@ -77,7 +77,7 @@ void KShellCmdPlugin::slotExecuteShellCommand()
chDir+="; ";
chDir+=cmd;
KShellCommandDialog *shellCmdDialog=new KShellCommandDialog(i18n("Output from command: \"%1\"").arg(cmd),chDir,part->widget(),true);
KShellCommandDialog *shellCmdDialog=new KShellCommandDialog(i18n("Output from command: \"%1\"", cmd),chDir,part->widget(),true);
shellCmdDialog->resize(500,300);
shellCmdDialog->executeCommand();
delete shellCmdDialog;

View file

@ -498,7 +498,7 @@ void Sidebar_Widget::slotSetURL( )
ksc.setGroup("Desktop Entry");
if ( !dlg.selectedURL().isValid())
{
KMessageBox::error(this, i18n("<qt><b>%1</b> does not exist</qt>").arg(dlg.selectedURL().url()));
KMessageBox::error(this, i18n("<qt><b>%1</b> does not exist</qt>", dlg.selectedURL().url()));
}
else
{
@ -530,7 +530,7 @@ void Sidebar_Widget::slotSetIcon( )
void Sidebar_Widget::slotRemove()
{
if (KMessageBox::warningContinueCancel(this,i18n("<qt>Do you really want to remove the <b>%1</b> tab?</qt>").arg(m_currentButton->displayName),
if (KMessageBox::warningContinueCancel(this,i18n("<qt>Do you really want to remove the <b>%1</b> tab?</qt>", m_currentButton->displayName),
QString(),KStdGuiItem::del())==KMessageBox::Continue)
{
QFile f(m_path+m_currentButton->file);

View file

@ -52,14 +52,14 @@ KonqSidebarBookmarkModule::KonqSidebarBookmarkModule( KonqSidebarTree * parentTr
tree()->setDropFormats(formats);
connect(tree(), SIGNAL(moved(Q3ListViewItem*,Q3ListViewItem*,Q3ListViewItem*)),
this, SLOT(slotMoved(Q3ListViewItem*,Q3ListViewItem*,Q3ListViewItem*)));
this, SLOT(slotMoved(Q3ListViewItem*,Q3ListViewItem*,Q3ListViewItem*)));
connect(tree(), SIGNAL(dropped(K3ListView*,QDropEvent*,Q3ListViewItem*,Q3ListViewItem*)),
this, SLOT(slotDropped(K3ListView*,QDropEvent*,Q3ListViewItem*,Q3ListViewItem*)));
this, SLOT(slotDropped(K3ListView*,QDropEvent*,Q3ListViewItem*,Q3ListViewItem*)));
connect(tree(), SIGNAL(expanded(Q3ListViewItem*)),
this, SLOT(slotOpenChange(Q3ListViewItem*)));
this, SLOT(slotOpenChange(Q3ListViewItem*)));
connect(tree(), SIGNAL(collapsed(Q3ListViewItem*)),
this, SLOT(slotOpenChange(Q3ListViewItem*)));
this, SLOT(slotOpenChange(Q3ListViewItem*)));
m_collection = new KActionCollection( this );
(void) new KAction( i18n("&Create New Folder"), "folder_new", 0, this,
@ -311,8 +311,8 @@ void KonqSidebarBookmarkModule::slotDelete()
if (KMessageBox::warningYesNo(
tree(),
folder ? i18n("Are you sure you wish to remove the bookmark folder\n\"%1\"?").arg(bookmark.text())
: i18n("Are you sure you wish to remove the bookmark\n\"%1\"?").arg(bookmark.text()),
folder ? i18n("Are you sure you wish to remove the bookmark folder\n\"%1\"?", bookmark.text())
: i18n("Are you sure you wish to remove the bookmark\n\"%1\"?", bookmark.text()),
folder ? i18n("Bookmark Folder Deletion")
: i18n("Bookmark Deletion"),
KGuiItem( i18n("&Delete"), "editdelete"), KStdGuiItem::cancel())

View file

@ -421,7 +421,7 @@ void KonqSidebarDirTreeModule::slotNewItems( const KFileItemList& entries )
if( !parentItem )
{
KMessageBox::error( tree(), i18n("Cannot find parent item %1 in the tree. Internal error.").arg( dir.url(-1) ) );
KMessageBox::error( tree(), i18n("Cannot find parent item %1 in the tree. Internal error.", dir.url(-1) ) );
return;
}

View file

@ -114,12 +114,12 @@ QString KonqSidebarHistoryItem::key( int column, bool ascending ) const
QString KonqSidebarHistoryItem::toolTipText() const
{
if ( s_settings->m_detailedTips ) {
// this weird ordering of %4, %1, %2, %3 is due to the reason, that some
// urls seem to contain %N, which would get substituted in the next
// .arg() calls. So to fix this, we first substitute the last items
// and then put in the url.
QString tip = i18n("<qt><center><b>%4</b></center><hr>Last visited: %1<br>First visited: %2<br>Number of times visited: %3</qt>");
return tip.arg( KGlobal::locale()->formatDateTime( m_entry->lastVisited ) ).arg( KGlobal::locale()->formatDateTime( m_entry->firstVisited ) ).arg( m_entry->numberOfTimesVisited ).arg( m_entry->url.url() );
return i18n("<qt><center><b>%1</b></center><hr>Last visited: %2<br>"
"First visited: %3<br>Number of times visited: %4</qt>",
m_entry->url.url(),
KGlobal::locale()->formatDateTime( m_entry->lastVisited ),
KGlobal::locale()->formatDateTime( m_entry->firstVisited ),
m_entry->numberOfTimesVisited);
}
return m_entry->url.url();

View file

@ -213,7 +213,7 @@ QString HistorySidebarConfig::quickHelp() const
void HistorySidebarConfig::slotExpireChanged( int value )
{
dialog->spinExpire->setSuffix( i18n(" day", " days", value) );
dialog->spinExpire->setSuffix( i18np(" day", " days", value) );
configChanged();
}
@ -222,9 +222,9 @@ void HistorySidebarConfig::slotExpireChanged( int value )
// to enfore newer <= older.
void HistorySidebarConfig::slotNewerChanged( int value )
{
dialog->comboNewer->changeItem( i18n ( "Day", "Days", value),
dialog->comboNewer->changeItem( i18np ( "Day", "Days", value),
KonqSidebarHistorySettings::DAYS);
dialog->comboNewer->changeItem( i18n ( "Minute", "Minutes", value),
dialog->comboNewer->changeItem( i18np ( "Minute", "Minutes", value),
KonqSidebarHistorySettings::MINUTES);
if ( dialog->spinNewer->value() > dialog->spinOlder->value() )
@ -234,9 +234,9 @@ void HistorySidebarConfig::slotNewerChanged( int value )
void HistorySidebarConfig::slotOlderChanged( int value )
{
dialog->comboOlder->changeItem( i18n ( "Day", "Days", value),
dialog->comboOlder->changeItem( i18np ( "Day", "Days", value),
KonqSidebarHistorySettings::DAYS);
dialog->comboOlder->changeItem( i18n ( "Minute", "Minutes", value),
dialog->comboOlder->changeItem( i18np ( "Minute", "Minutes", value),
KonqSidebarHistorySettings::MINUTES);
if ( dialog->spinNewer->value() > dialog->spinOlder->value() )

View file

@ -761,7 +761,7 @@ void KonqSidebarTree::loadTopLevelGroup( KonqSidebarTreeItem *parent, const QStr
item->setExpandable( false );
}
void KonqSidebarTree::loadTopLevelItem( KonqSidebarTreeItem *parent, const QString &filename )
void KonqSidebarTree::loadTopLevelItem( KonqSidebarTreeItem *parent, const QString &filename )
{
KDesktopFile cfg( filename, true );
cfg.setDollarExpansion(true);

View file

@ -563,8 +563,8 @@ void KWrite::cursorPositionChanged ( KTextEditor::View *view )
KTextEditor::Cursor position (view->cursorPositionVirtual());
m_lineColLabel->setText(
i18n(" Line: %1 Col: %2 ").arg(KGlobal::locale()->formatNumber(position.line()+1, 0))
.arg(KGlobal::locale()->formatNumber(position.column()+1, 0)) );
i18n(" Line: %1 Col: %2 ", KGlobal::locale()->formatNumber(position.line()+1, 0),
KGlobal::locale()->formatNumber(position.column()+1, 0)) );
}
void KWrite::selectionChanged (KTextEditor::View *view)
@ -635,11 +635,11 @@ void KWrite::documentNameChanged ()
static KCmdLineOptions options[] =
{
{ "stdin", I18N_NOOP("Read the contents of stdin"), 0},
{ "encoding <argument>", I18N_NOOP("Set encoding for the file to open"), 0 },
{ "line <argument>", I18N_NOOP("Navigate to this line"), 0 },
{ "column <argument>", I18N_NOOP("Navigate to this column"), 0 },
{ "+[URL]", I18N_NOOP("Document to open"), 0 },
{ "stdin", I18N_NOOP("Read the contents of stdin"), 0},
{ "encoding <argument>", I18N_NOOP("Set encoding for the file to open"), 0 },
{ "line <argument>", I18N_NOOP("Navigate to this line"), 0 },
{ "column <argument>", I18N_NOOP("Navigate to this column"), 0 },
{ "+[URL]", I18N_NOOP("Document to open"), 0 },
KCmdLineLastOption
};
@ -784,7 +784,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
t->view()->setCursorPosition (KTextEditor::Cursor (line, column));
}
else
KMessageBox::sorry( t, i18n("The file '%1' could not be opened: it is not a normal file, it is a folder.").arg(args->url(z).url()) );
KMessageBox::sorry( t, i18n("The file '%1' could not be opened: it is not a normal file, it is a folder.", args->url(z).url()) );
}
}
}

View file

@ -39,7 +39,7 @@ kde4_add_dcop_skels(konq_LIB_SRCS konq_undo.h konq_historycomm.h konq_faviconmgr
kde4_add_library(konq SHARED ${konq_LIB_SRCS})
target_link_libraries(konq ${KDE4_KDE3SUPPORT_LIBS} ${QT_QTXML_LIBRARY} kdefx ${ZLIB_LIBRARY})
target_link_libraries(konq ${KDE4_KDE3SUPPORT_LIBS} ${QT_QTXML_LIBRARY} kdefx ${ZLIB_LIBRARY} ${KDE4_KDESU_LIBS})
set_target_properties(konq PROPERTIES VERSION 4.2.0 SOVERSION 4 )
install_targets(${LIB_INSTALL_DIR} konq )

View file

@ -381,7 +381,7 @@ void KNewMenu::slotNewFile()
if ( !QFile::exists( entry.templatePath ) ) {
kWarning(1203) << entry.templatePath << " doesn't exist" << endl;
KMessageBox::sorry( 0L, i18n("<qt>The template file <b>%1</b> does not exist.</qt>").arg(entry.templatePath));
KMessageBox::sorry( 0L, i18n("<qt>The template file <b>%1</b> does not exist.</qt>", entry.templatePath));
return;
}
m_isURLDesktopFile = false;

View file

@ -299,10 +299,10 @@ void KonqDirPart::lmbClicked( KFileItem * fileItem )
// No permissions or local file that doesn't exist - need to find out which
if ( ( !fileItem->isLocalFile() ) || QFile::exists( url.path() ) )
{
KMessageBox::error( widget(), i18n("<p>You do not have enough permissions to read <b>%1</b></p>").arg(url.prettyURL()) );
KMessageBox::error( widget(), i18n("<p>You do not have enough permissions to read <b>%1</b></p>", url.prettyURL()) );
return;
}
KMessageBox::error( widget(), i18n("<p><b>%1</b> does not seem to exist anymore</p>").arg(url.prettyURL()) );
KMessageBox::error( widget(), i18n("<p><b>%1</b> does not seem to exist anymore</p>", url.prettyURL()) );
return;
}
@ -469,7 +469,7 @@ void KonqDirPart::emitTotalCount()
bShowsResult = prop.isValid() && prop.toBool();
}
//kDebug(1203) << "KonqDirPart::emitTotalCount bShowsResult=" << bShowsResult << endl;
emit setStatusBarText( bShowsResult ? i18n("Search result: %1").arg(summary) : summary );
emit setStatusBarText( bShowsResult ? i18n("Search result: %1", summary) : summary );
}
void KonqDirPart::emitCounts( const KFileItemList & lst )

View file

@ -273,7 +273,7 @@ bool KonqOperations::askDeleteConfirmation( const KUrl::List & selectedURLs, int
{
case DEL:
result = KMessageBox::warningContinueCancelList( 0,
i18n( "Do you really want to delete this item?", "Do you really want to delete these %n items?", prettyList.count()),
i18np( "Do you really want to delete this item?", "Do you really want to delete these %n items?", prettyList.count()),
prettyList,
i18n( "Delete Files" ),
KStdGuiItem::del(),
@ -282,7 +282,7 @@ bool KonqOperations::askDeleteConfirmation( const KUrl::List & selectedURLs, int
case SHRED:
result = KMessageBox::warningContinueCancelList( 0,
i18n( "Do you really want to shred this item?", "Do you really want to shred these %n items?", prettyList.count()),
i18np( "Do you really want to shred this item?", "Do you really want to shred these %n items?", prettyList.count()),
prettyList,
i18n( "Shred Files" ),
KGuiItem( i18n( "Shred" ), "editshred" ),
@ -292,10 +292,10 @@ bool KonqOperations::askDeleteConfirmation( const KUrl::List & selectedURLs, int
case MOVE:
default:
result = KMessageBox::warningContinueCancelList( 0,
i18n( "Do you really want to move this item to the trash?", "Do you really want to move these %n items to the trash?", prettyList.count()),
i18np( "Do you really want to move this item to the trash?", "Do you really want to move these %n items to the trash?", prettyList.count()),
prettyList,
i18n( "Move to Trash" ),
KGuiItem( i18n( "Verb", "&Trash" ), "edittrash"),
KGuiItem( i18nc( "Verb", "&Trash" ), "edittrash"),
keyName, KMessageBox::Dangerous);
}
if (!keyName.isEmpty())
@ -349,6 +349,7 @@ void KonqOperations::doDrop( const KFileItem * destItem, const KUrl & dest, QDro
// Check the state of the modifiers key at the time of the drop
// TODO port to QApplication::keyboardModifiers()
#ifdef Q_WS_X11 // removing for now, it should be OK once it uses keyboardModifiers()
Window root;
Window child;
int root_x, root_y, win_x, win_y;
@ -381,6 +382,11 @@ void KonqOperations::doDrop( const KFileItem * destItem, const KUrl & dest, QDro
// In both cases asyncDrop will delete op when done
ev->acceptProposedAction();
#else
kdDebug(1203) << "we don't handle keyboard modifiers yet, skip check" << endl;
ev->setAccepted( false );
return;
#endif
}
else
{
@ -533,8 +539,9 @@ void KonqOperations::doFileCopy()
// No point in asking copy/move/link when using dnd from or to the trash.
action = Qt::MoveAction;
}
else if ( (((m_info->keybstate & ControlMask) == 0) && ((m_info->keybstate & ShiftMask) == 0)) ||
linkOnly )
else if ( (
((QApplication::keyboardModifiers() & Qt::ControlModifier) == 0) &&
((QApplication::keyboardModifiers() & Qt::ShiftModifier) == 0) ) || linkOnly )
{
// Neither control nor shift are pressed => show popup menu
KonqIconViewWidget *iconView = dynamic_cast<KonqIconViewWidget*>(parent());
@ -565,15 +572,15 @@ void KonqOperations::doFileCopy()
QMenu popup;
QAction* popupMoveAction = new QAction( i18n( "&Move Here" ) + "\t" + KKey::modFlagLabel( KKey::SHIFT ), this );
QAction* popupMoveAction = new QAction(i18n( "&Move Here" ) + "\t" + QKeySequence( Qt::Key_Shift ).toString(), this);
popupMoveAction->setIcon(SmallIconSet("goto"));
QAction* popupCopyAction = new QAction( i18n( "&Copy Here" ) + "\t" + KKey::modFlagLabel( KKey::CTRL ), this );
QAction* popupCopyAction = new QAction(i18n( "&Copy Here" ) + "\t" + QKeySequence( Qt::Key_Control ).toString(), this);
popupCopyAction->setIcon(SmallIconSet("editcopy"));
QAction* popupLinkAction = new QAction( i18n( "&Link Here" ) + "\t" + KKey::modFlagLabel( (KKey::ModFlag)( KKey::CTRL|KKey::SHIFT ) ), this );
QAction* popupLinkAction = new QAction(i18n( "&Link Here" ) + "\t" + QKeySequence( Qt::CTRL + Qt::Key_Shift ).toString(), this);
popupLinkAction->setIcon(SmallIconSet("www"));
QAction* popupWallAction = new QAction( i18n( "Set as &Wallpaper" ), this );
popupWallAction->setIcon(SmallIconSet("background"));
QAction* popupCancelAction = new QAction( i18n( "C&ancel" ) + "\t" + KKey( Qt::Key_Escape ).toString(), this );
QAction* popupCancelAction = new QAction(i18n( "C&ancel" ) + "\t" + QKeySequence( Qt::Key_Escape ).toString(), this);
popupCancelAction->setIcon(SmallIconSet("cancel"));
if ( sReading && !linkOnly)

View file

@ -867,7 +867,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
QString actionName( (*it)->name().replace( "&", "&&" ) );
if ( menu == domElement() ) // no submenu -> prefix single offer
actionName = i18n( "Open with %1" ).arg( actionName );
actionName = i18n( "Open with %1" , actionName );
KIcon actIcon;
actIcon.addPixmap( (*it)->pixmap( K3Icon::Small ) );

View file

@ -89,7 +89,7 @@ QString PluginLiveConnectExtension::evalJavaScript( const QString & script )
kDebug(1432) << "PLUGIN:LiveConnect::evalJavaScript " << script << endl;
ArgList args;
QString jscode;
jscode.sprintf("this.__nsplugin=eval(\"%s\")", qPrintable( QString(script).replace('\\', "\\\\").replace('"', "\\\"")));
jscode.sprintf("this.__nsplugin=eval(\"%s\")", qPrintable( QString(script).replace('\\', "\\\\").replace('"', "\\\"")));
//kDebug(1432) << "String is [" << jscode << "]" << endl;
args.push_back(qMakePair(KParts::LiveConnectExtension::TypeString, jscode));
QString nsplugin("Undefined");
@ -296,7 +296,7 @@ bool PluginPart::openURL(const KUrl &url)
// status messages
emit setWindowCaption( url.prettyURL() );
emit setStatusBarText( i18n("Loading Netscape plugin for %1").arg(url.prettyURL()) );
emit setStatusBarText( i18n("Loading Netscape plugin for %1", url.prettyURL()) );
// create plugin widget
NSPluginInstance *inst = _loader->newInstance( _canvas, surl, smime, embed,
@ -307,7 +307,7 @@ bool PluginPart::openURL(const KUrl &url)
if ( inst ) {
_widget = inst;
} else {
QLabel *label = new QLabel( i18n("Unable to load Netscape plugin for %1").arg(url.url()), _canvas );
QLabel *label = new QLabel( i18n("Unable to load Netscape plugin for %1", url.url()), _canvas );
label->setAlignment( Qt::AlignCenter );
label->setWordWrap( true );
_widget = label;

View file

@ -543,7 +543,7 @@ void sigChildHandler(int)
static KCmdLineOptions options[] =
{
{ "verbose", I18N_NOOP("Show progress output for GUI"), 0 },
{ "verbose", I18N_NOOP("Show progress output for GUI"), 0 },
KCmdLineLastOption
};

View file

@ -807,7 +807,7 @@ void NSPluginInstance::timer()
kDebug() << "posting to " << url << endl;
emitStatus( i18n("Submitting data to %1").arg(url) );
emitStatus( i18n("Submitting data to %1", url) );
s->post( url, req.data, req.mime, req.notify, req.args );
} else if (url.toLower().startsWith("javascript:")){
if (_callback) {
@ -826,7 +826,7 @@ void NSPluginInstance::timer()
kDebug() << "getting " << url << endl;
emitStatus( i18n("Requesting %1").arg(url) );
emitStatus( i18n("Requesting %1", url) );
s->get( url, req.mime, req.notify, req.reload );
}