mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Interface modifications to KCmdLineArgs, KAboutData and KComponentData; BIC, SIC. Most of the depending code has been auto-converted to new API.
svn path=/trunk/KDE/kdebase/apps/; revision=682259
This commit is contained in:
parent
dcb1f98e9b
commit
dc59b32f75
24 changed files with 341 additions and 375 deletions
|
@ -60,7 +60,7 @@ DolphinPart::~DolphinPart()
|
|||
|
||||
KAboutData* DolphinPart::createAboutData()
|
||||
{
|
||||
return new KAboutData("dolphinpart", I18N_NOOP( "Dolphin Part" ), "0.1");
|
||||
return new KAboutData("dolphinpart", 0, ki18n( "Dolphin Part" ), "0.1");
|
||||
}
|
||||
|
||||
bool DolphinPart::openUrl(const KUrl& url)
|
||||
|
|
|
@ -24,34 +24,30 @@
|
|||
#include <kcmdlineargs.h>
|
||||
#include <klocale.h>
|
||||
|
||||
static KCmdLineOptions options[] =
|
||||
{
|
||||
{ "+[Url]", I18N_NOOP("Document to open"), 0
|
||||
},
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
KAboutData about("dolphin",
|
||||
I18N_NOOP("Dolphin"),
|
||||
KAboutData about("dolphin", 0,
|
||||
ki18n("Dolphin"),
|
||||
"0.9.0",
|
||||
I18N_NOOP("File Manager"),
|
||||
ki18n("File Manager"),
|
||||
KAboutData::License_GPL,
|
||||
"(C) 2006 Peter Penz");
|
||||
ki18n("(C) 2006 Peter Penz"));
|
||||
about.setHomepage("http://enzosworld.gmxhome.de");
|
||||
about.setBugAddress("peter.penz@gmx.at");
|
||||
about.addAuthor("Peter Penz", I18N_NOOP("Maintainer and developer"), "peter.penz@gmx.at");
|
||||
about.addAuthor("Cvetoslav Ludmiloff", I18N_NOOP("Developer"), "ludmiloff@gmail.com");
|
||||
about.addAuthor("Stefan Monov", I18N_NOOP("Developer"), "logixoul@gmail.com");
|
||||
about.addAuthor("Michael Austin", I18N_NOOP("Documentation"), "tuxedup@users.sourceforge.net");
|
||||
about.addAuthor("Orville Bennett", I18N_NOOP("Documentation"), "obennett@hartford.edu");
|
||||
about.addCredit("Aaron J. Seigo", I18N_NOOP("... for the great support and the amazing patches"));
|
||||
about.addCredit("Patrice Tremblay and Gregor Kalisnik", I18N_NOOP("... for their patches"));
|
||||
about.addCredit("Ain, Itai, Ivan, Stephane, Patrice, Piotr and Stefano",
|
||||
I18N_NOOP("... for their translations"));
|
||||
about.addAuthor(ki18n("Peter Penz"), ki18n("Maintainer and developer"), "peter.penz@gmx.at");
|
||||
about.addAuthor(ki18n("Cvetoslav Ludmiloff"), ki18n("Developer"), "ludmiloff@gmail.com");
|
||||
about.addAuthor(ki18n("Stefan Monov"), ki18n("Developer"), "logixoul@gmail.com");
|
||||
about.addAuthor(ki18n("Michael Austin"), ki18n("Documentation"), "tuxedup@users.sourceforge.net");
|
||||
about.addAuthor(ki18n("Orville Bennett"), ki18n("Documentation"), "obennett@hartford.edu");
|
||||
about.addCredit(ki18n("Aaron J. Seigo"), ki18n("... for the great support and the amazing patches"));
|
||||
about.addCredit(ki18n("Patrice Tremblay and Gregor Kalisnik"), ki18n("... for their patches"));
|
||||
about.addCredit(ki18n("Ain, Itai, Ivan, Stephane, Patrice, Piotr and Stefano"),
|
||||
ki18n("... for their translations"));
|
||||
|
||||
KCmdLineArgs::init(argc, argv, &about);
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("+[Url]", ki18n("Document to open"));
|
||||
KCmdLineArgs::addCmdLineOptions(options);
|
||||
|
||||
if (!DolphinApplication::start()) {
|
||||
|
|
|
@ -26,20 +26,18 @@
|
|||
|
||||
static const char description[] = I18N_NOOP( "KDE's application finder" );
|
||||
|
||||
static KCmdLineOptions options[] = {
|
||||
{ "dir <dir>", I18N_NOOP( "Install .desktop files into directory <dir>" ), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
KAboutData aboutData( "kappfinder", I18N_NOOP( "KAppfinder" ),
|
||||
"1.0", description, KAboutData::License_GPL,
|
||||
"(c) 1998-2000, Matthias Hoelzer-Kluepfel" );
|
||||
aboutData.addAuthor( "Matthias Hoelzer-Kluepfel", 0, "hoelzer@kde.org" );
|
||||
aboutData.addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" );
|
||||
KAboutData aboutData( "kappfinder", 0, ki18n( "KAppfinder" ),
|
||||
"1.0", ki18n(description), KAboutData::License_GPL,
|
||||
ki18n("(c) 1998-2000, Matthias Hoelzer-Kluepfel") );
|
||||
aboutData.addAuthor( ki18n("Matthias Hoelzer-Kluepfel"), KLocalizedString(), "hoelzer@kde.org" );
|
||||
aboutData.addAuthor( ki18n("Tobias Koenig"), KLocalizedString(), "tokoe@kde.org" );
|
||||
|
||||
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("dir <dir>", ki18n( "Install .desktop files into directory <dir>" ));
|
||||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
|
|
|
@ -76,23 +76,23 @@ KCMUserAccount::KCMUserAccount( QWidget *parent, const QStringList &)
|
|||
_mw->lblUsername->setText( _ku->loginName() );
|
||||
_mw->lblUID->setText( QString().number(_ku->uid()) );
|
||||
|
||||
KAboutData *about = new KAboutData(I18N_NOOP("kcm_useraccount"),
|
||||
I18N_NOOP("Password & User Information"), 0, 0,
|
||||
KAboutData *about = new KAboutData(I18N_NOOP("kcm_useraccount"), 0,
|
||||
ki18n("Password & User Information"), 0, KLocalizedString(),
|
||||
KAboutData::License_GPL,
|
||||
I18N_NOOP("(C) 2002, Braden MacDonald, "
|
||||
ki18n("(C) 2002, Braden MacDonald, "
|
||||
"(C) 2004 Ravikiran Rajagopal"));
|
||||
|
||||
about->addAuthor("Frans Englich", I18N_NOOP("Maintainer"), "frans.englich@telia.com");
|
||||
about->addAuthor("Ravikiran Rajagopal", 0, "ravi@kde.org");
|
||||
about->addAuthor("Michael H\303\244ckel", "haeckel@kde.org" );
|
||||
about->addAuthor(ki18n("Frans Englich"), ki18n("Maintainer"), "frans.englich@telia.com");
|
||||
about->addAuthor(ki18n("Ravikiran Rajagopal"), KLocalizedString(), "ravi@kde.org");
|
||||
about->addAuthor(ki18n("Michael H\303\244ckel"), ki18n("haeckel@kde.org") );
|
||||
|
||||
about->addAuthor("Braden MacDonald", I18N_NOOP("Face editor"), "bradenm_k@shaw.ca");
|
||||
about->addAuthor("Geert Jansen", I18N_NOOP("Password changer"), "jansen@kde.org",
|
||||
about->addAuthor(ki18n("Braden MacDonald"), ki18n("Face editor"), "bradenm_k@shaw.ca");
|
||||
about->addAuthor(ki18n("Geert Jansen"), ki18n("Password changer"), "jansen@kde.org",
|
||||
"http://www.stack.nl/~geertj/");
|
||||
about->addAuthor("Daniel Molkentin");
|
||||
about->addAuthor("Alex Zepeda");
|
||||
about->addAuthor("Hans Karlsson", I18N_NOOP("Icons"), "karlsson.h@home.se");
|
||||
about->addAuthor("Hermann Thomas", I18N_NOOP("Icons"), "h.thomas@gmx.de");
|
||||
about->addAuthor(ki18n("Daniel Molkentin"));
|
||||
about->addAuthor(ki18n("Alex Zepeda"));
|
||||
about->addAuthor(ki18n("Hans Karlsson"), ki18n("Icons"), "karlsson.h@home.se");
|
||||
about->addAuthor(ki18n("Hermann Thomas"), ki18n("Icons"), "h.thomas@gmx.de");
|
||||
setAboutData(about);
|
||||
|
||||
setQuickHelp( i18n("<qt>Here you can change your personal information, which "
|
||||
|
|
|
@ -18,22 +18,19 @@
|
|||
#include "passwd.h"
|
||||
#include "passwddlg.h"
|
||||
|
||||
static KCmdLineOptions options[] =
|
||||
{
|
||||
{ "+[user]", I18N_NOOP("Change password of this user"), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
KAboutData aboutData("kdepasswd", I18N_NOOP("KDE passwd"),
|
||||
KDE_VERSION_STRING, I18N_NOOP("Changes a UNIX password."),
|
||||
KAboutData::License_Artistic, "Copyright (c) 2000 Geert Jansen");
|
||||
aboutData.addAuthor("Geert Jansen", I18N_NOOP("Maintainer"),
|
||||
KAboutData aboutData("kdepasswd", 0, ki18n("KDE passwd"),
|
||||
KDE_VERSION_STRING, ki18n("Changes a UNIX password."),
|
||||
KAboutData::License_Artistic, ki18n("Copyright (c) 2000 Geert Jansen"));
|
||||
aboutData.addAuthor(ki18n("Geert Jansen"), ki18n("Maintainer"),
|
||||
"jansen@kde.org", "http://www.stack.nl/~geertj/");
|
||||
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("+[user]", ki18n("Change password of this user"));
|
||||
KCmdLineArgs::addCmdLineOptions(options);
|
||||
KUniqueApplication::addCmdLineOptions();
|
||||
|
||||
|
@ -46,7 +43,7 @@ int main(int argc, char **argv)
|
|||
KUniqueApplication app;
|
||||
|
||||
KUser ku;
|
||||
QByteArray user;
|
||||
QString user;
|
||||
bool bRoot = ku.isSuperUser();
|
||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
|
@ -54,7 +51,7 @@ int main(int argc, char **argv)
|
|||
user = args->arg(0);
|
||||
|
||||
/* You must be able to run "kdepasswd loginName" */
|
||||
if ( !user.isEmpty() && user!=KUser().loginName().toUtf8() && !bRoot)
|
||||
if ( !user.isEmpty() && user!=KUser().loginName() && !bRoot)
|
||||
{
|
||||
KMessageBox::sorry(0, i18n("You need to be root to change the password of other users."));
|
||||
return 0;
|
||||
|
@ -68,7 +65,7 @@ int main(int argc, char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
KDEpasswd2Dialog *dlg = new KDEpasswd2Dialog(oldpass, user);
|
||||
KDEpasswd2Dialog *dlg = new KDEpasswd2Dialog(oldpass, user.toLocal8Bit());
|
||||
|
||||
|
||||
dlg->exec();
|
||||
|
|
|
@ -58,47 +58,6 @@ using namespace std;
|
|||
extern "C" { int XSetTransientForHint( Display *, unsigned long, unsigned long ); }
|
||||
#endif // Q_WS_X11
|
||||
|
||||
static KCmdLineOptions options[] =
|
||||
{
|
||||
{ "yesno <text>", I18N_NOOP("Question message box with yes/no buttons"), 0 },
|
||||
{ "yesnocancel <text>", I18N_NOOP("Question message box with yes/no/cancel buttons"), 0 },
|
||||
{ "warningyesno <text>", I18N_NOOP("Warning message box with yes/no buttons"), 0 },
|
||||
{ "warningcontinuecancel <text>", I18N_NOOP("Warning message box with continue/cancel buttons"), 0 },
|
||||
{ "warningyesnocancel <text>", I18N_NOOP("Warning message box with yes/no/cancel buttons"), 0 },
|
||||
{ "sorry <text>", I18N_NOOP("'Sorry' message box"), 0 },
|
||||
{ "error <text>", I18N_NOOP("'Error' message box"), 0 },
|
||||
{ "msgbox <text>", I18N_NOOP("Message Box dialog"), 0 },
|
||||
{ "inputbox <text> <init>", I18N_NOOP("Input Box dialog"), 0 },
|
||||
{ "password <text>", I18N_NOOP("Password dialog"), 0 },
|
||||
{ "textbox <file> [width] [height]", I18N_NOOP("Text Box dialog"), 0 },
|
||||
{ "textinputbox <text> <init> [width] [height]", I18N_NOOP("Text Input Box dialog"), 0 },
|
||||
{ "combobox <text> [tag item] [tag item] ...", I18N_NOOP("ComboBox dialog"), 0 },
|
||||
{ "menu <text> [tag item] [tag item] ...", I18N_NOOP("Menu dialog"), 0 },
|
||||
{ "checklist <text> [tag item status] ...", I18N_NOOP("Check List dialog"), 0 },
|
||||
{ "radiolist <text> [tag item status] ...", I18N_NOOP("Radio List dialog"), 0 },
|
||||
{ "passivepopup <text> <timeout>", I18N_NOOP("Passive Popup"), 0 },
|
||||
{ "getopenfilename [startDir] [filter]", I18N_NOOP("File dialog to open an existing file"), 0 },
|
||||
{ "getsavefilename [startDir] [filter]", I18N_NOOP("File dialog to save a file"), 0 },
|
||||
{ "getexistingdirectory [startDir]", I18N_NOOP("File dialog to select an existing directory"), 0 },
|
||||
{ "getopenurl [startDir] [filter]", I18N_NOOP("File dialog to open an existing URL"), 0 },
|
||||
{ "getsaveurl [startDir] [filter]", I18N_NOOP("File dialog to save a URL"), 0 },
|
||||
{ "geticon [group] [context]", I18N_NOOP("Icon chooser dialog"), 0 },
|
||||
{ "progressbar <text> [totalsteps]", I18N_NOOP("Progress bar dialog, returns a D-Bus reference for communication"), 0},
|
||||
|
||||
// TODO gauge stuff, reading values from stdin
|
||||
|
||||
{ "title <text>", I18N_NOOP("Dialog title"), 0 },
|
||||
{ "default <text>", I18N_NOOP("Default entry to use for combobox and menu"), 0 },
|
||||
{ "multiple", I18N_NOOP("Allows the --getopenurl and --getopenfilename options to return multiple files"), 0 },
|
||||
{ "separate-output", I18N_NOOP("Return list items on separate lines (for checklist option and file open with --multiple)"), 0 },
|
||||
{ "print-winid", I18N_NOOP("Outputs the winId of each dialog"), 0 },
|
||||
{ "embed <winid>", I18N_NOOP("Makes the dialog transient for an X app specified by winid"), 0 },
|
||||
{ "dontagain <file:entry>", I18N_NOOP("Config file and option name for saving the \"don't-show/ask-again\" state"), 0 },
|
||||
|
||||
{ "+[arg]", I18N_NOOP("Arguments - depending on main option"), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
// this class hooks into the eventloop and outputs the id
|
||||
// of shown dialogs or makes the dialog transient for other winids.
|
||||
// Will destroy itself on app exit.
|
||||
|
@ -161,7 +120,7 @@ static int directCommand(KCmdLineArgs *args)
|
|||
// --title text
|
||||
KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt"); // --title is a qt option
|
||||
if(qtargs->isSet("title")) {
|
||||
title = QFile::decodeName(qtargs->getOption("title"));
|
||||
title = qtargs->getOption("title");
|
||||
}
|
||||
|
||||
// --separate-output
|
||||
|
@ -237,7 +196,7 @@ static int directCommand(KCmdLineArgs *args)
|
|||
}
|
||||
int ret;
|
||||
|
||||
QString text = QString::fromLocal8Bit(args->getOption( option ));
|
||||
QString text = args->getOption( option );
|
||||
int pos;
|
||||
while ((pos = text.indexOf( QLatin1String("\\n") )) >= 0)
|
||||
{
|
||||
|
@ -266,9 +225,9 @@ static int directCommand(KCmdLineArgs *args)
|
|||
QString init;
|
||||
|
||||
if (args->count() > 0)
|
||||
init = QString::fromLocal8Bit(args->arg(0));
|
||||
init = args->arg(0);
|
||||
|
||||
bool retcode = Widgets::inputBox(0, title, QString::fromLocal8Bit(args->getOption("inputbox")), init, result);
|
||||
bool retcode = Widgets::inputBox(0, title, args->getOption("inputbox"), init, result);
|
||||
cout << result.toLocal8Bit().data() << endl;
|
||||
return retcode ? 0 : 1;
|
||||
}
|
||||
|
@ -278,7 +237,7 @@ static int directCommand(KCmdLineArgs *args)
|
|||
if (args->isSet("password"))
|
||||
{
|
||||
QString result;
|
||||
bool retcode = Widgets::passwordBox(0, title, QString::fromLocal8Bit(args->getOption("password")), result);
|
||||
bool retcode = Widgets::passwordBox(0, title, args->getOption("password"), result);
|
||||
cout << result.data() << endl;
|
||||
return retcode ? 0 : 1;
|
||||
}
|
||||
|
@ -288,12 +247,12 @@ static int directCommand(KCmdLineArgs *args)
|
|||
{
|
||||
int duration = 0;
|
||||
if (args->count() > 0)
|
||||
duration = 1000 * QString::fromLocal8Bit(args->arg(0)).toInt();
|
||||
duration = 1000 * args->arg(0).toInt();
|
||||
if (duration == 0)
|
||||
duration = 10000;
|
||||
KPassivePopup *popup = KPassivePopup::message( KPassivePopup::Balloon, // style
|
||||
title,
|
||||
QString::fromLocal8Bit( args->getOption("passivepopup") ),
|
||||
args->getOption("passivepopup"),
|
||||
QPixmap() /* don't crash 0*/, // icon
|
||||
(QWidget*)0UL, // parent
|
||||
duration );
|
||||
|
@ -330,11 +289,11 @@ static int directCommand(KCmdLineArgs *args)
|
|||
int h = 0;
|
||||
|
||||
if (args->count() == 2) {
|
||||
w = QString::fromLocal8Bit(args->arg(0)).toInt();
|
||||
h = QString::fromLocal8Bit(args->arg(1)).toInt();
|
||||
w = args->arg(0).toInt();
|
||||
h = args->arg(1).toInt();
|
||||
}
|
||||
|
||||
return Widgets::textBox(0, w, h, title, QString::fromLocal8Bit(args->getOption("textbox")));
|
||||
return Widgets::textBox(0, w, h, title, args->getOption("textbox"));
|
||||
}
|
||||
|
||||
// --textinputbox file [width] [height]
|
||||
|
@ -344,16 +303,16 @@ static int directCommand(KCmdLineArgs *args)
|
|||
int h = 200;
|
||||
|
||||
if (args->count() == 4) {
|
||||
w = QString::fromLocal8Bit(args->arg(2)).toInt();
|
||||
h = QString::fromLocal8Bit(args->arg(3)).toInt();
|
||||
w = args->arg(2).toInt();
|
||||
h = args->arg(3).toInt();
|
||||
}
|
||||
|
||||
QStringList list;
|
||||
list.append(QString::fromLocal8Bit(args->getOption("textinputbox")));
|
||||
list.append(args->getOption("textinputbox"));
|
||||
|
||||
if (args->count() >= 1) {
|
||||
for (int i = 0; i < args->count(); i++)
|
||||
list.append(QString::fromLocal8Bit(args->arg(i)));
|
||||
list.append(args->arg(i));
|
||||
}
|
||||
|
||||
QString result;
|
||||
|
@ -367,9 +326,9 @@ static int directCommand(KCmdLineArgs *args)
|
|||
QStringList list;
|
||||
if (args->count() >= 2) {
|
||||
for (int i = 0; i < args->count(); i++) {
|
||||
list.append(QString::fromLocal8Bit(args->arg(i)));
|
||||
list.append(args->arg(i));
|
||||
}
|
||||
QString text = QString::fromLocal8Bit(args->getOption("combobox"));
|
||||
QString text = args->getOption("combobox");
|
||||
if (args->isSet("default")) {
|
||||
defaultEntry = args->getOption("default");
|
||||
}
|
||||
|
@ -386,9 +345,9 @@ static int directCommand(KCmdLineArgs *args)
|
|||
QStringList list;
|
||||
if (args->count() >= 2) {
|
||||
for (int i = 0; i < args->count(); i++) {
|
||||
list.append(QString::fromLocal8Bit(args->arg(i)));
|
||||
list.append(args->arg(i));
|
||||
}
|
||||
QString text = QString::fromLocal8Bit(args->getOption("menu"));
|
||||
QString text = args->getOption("menu");
|
||||
if (args->isSet("default")) {
|
||||
defaultEntry = args->getOption("default");
|
||||
}
|
||||
|
@ -407,10 +366,10 @@ static int directCommand(KCmdLineArgs *args)
|
|||
QStringList list;
|
||||
if (args->count() >= 3) {
|
||||
for (int i = 0; i < args->count(); i++) {
|
||||
list.append(QString::fromLocal8Bit(args->arg(i)));
|
||||
list.append(args->arg(i));
|
||||
}
|
||||
|
||||
QString text = QString::fromLocal8Bit(args->getOption("checklist"));
|
||||
QString text = args->getOption("checklist");
|
||||
QStringList result;
|
||||
|
||||
bool retcode = Widgets::checkList(0, title, text, list, separateOutput, result);
|
||||
|
@ -429,10 +388,10 @@ static int directCommand(KCmdLineArgs *args)
|
|||
QStringList list;
|
||||
if (args->count() >= 3) {
|
||||
for (int i = 0; i < args->count(); i++) {
|
||||
list.append(QString::fromLocal8Bit(args->arg(i)));
|
||||
list.append(args->arg(i));
|
||||
}
|
||||
|
||||
QString text = QString::fromLocal8Bit(args->getOption("radiolist"));
|
||||
QString text = args->getOption("radiolist");
|
||||
QString result;
|
||||
bool retcode = Widgets::radioBox(0, title, text, list, result);
|
||||
cout << result.toLocal8Bit().data() << endl;
|
||||
|
@ -445,9 +404,9 @@ static int directCommand(KCmdLineArgs *args)
|
|||
if (args->isSet("getopenfilename")) {
|
||||
QString startDir;
|
||||
QString filter;
|
||||
startDir = QString::fromLocal8Bit(args->getOption("getopenfilename"));
|
||||
startDir = args->getOption("getopenfilename");
|
||||
if (args->count() >= 1) {
|
||||
filter = QString::fromLocal8Bit(args->arg(0));
|
||||
filter = args->arg(0);
|
||||
}
|
||||
KFileDialog dlg( startDir, filter, 0 );
|
||||
dlg.setOperationMode( KFileDialog::Opening );
|
||||
|
@ -485,12 +444,12 @@ static int directCommand(KCmdLineArgs *args)
|
|||
QString startDir;
|
||||
QString filter;
|
||||
if ( args->isSet("getsavefilename") ) {
|
||||
startDir = QString::fromLocal8Bit(args->getOption("getsavefilename"));
|
||||
startDir = args->getOption("getsavefilename");
|
||||
} else {
|
||||
startDir = QString::fromLocal8Bit(args->getOption("getsaveurl"));
|
||||
startDir = args->getOption("getsaveurl");
|
||||
}
|
||||
if (args->count() >= 1) {
|
||||
filter = QString::fromLocal8Bit(args->arg(0));
|
||||
filter = args->arg(0);
|
||||
}
|
||||
// copied from KFileDialog::getSaveFileName(), so we can add geometry
|
||||
bool specialDir = ( startDir.at(0) == ':' );
|
||||
|
@ -524,7 +483,7 @@ static int directCommand(KCmdLineArgs *args)
|
|||
// getexistingdirectory [startDir]
|
||||
if (args->isSet("getexistingdirectory")) {
|
||||
QString startDir;
|
||||
startDir = QString::fromLocal8Bit(args->getOption("getexistingdirectory"));
|
||||
startDir = args->getOption("getexistingdirectory");
|
||||
QString result;
|
||||
#ifdef Q_WS_WIN
|
||||
result = QFileDialog::getExistingDirectory( 0, title, startDir,
|
||||
|
@ -557,9 +516,9 @@ static int directCommand(KCmdLineArgs *args)
|
|||
if (args->isSet("getopenurl")) {
|
||||
QString startDir;
|
||||
QString filter;
|
||||
startDir = QString::fromLocal8Bit(args->getOption("getopenurl"));
|
||||
startDir = args->getOption("getopenurl");
|
||||
if (args->count() >= 1) {
|
||||
filter = QString::fromLocal8Bit(args->arg(0));
|
||||
filter = args->arg(0);
|
||||
}
|
||||
KFileDialog dlg( startDir, filter, 0 );
|
||||
dlg.setOperationMode( KFileDialog::Opening );
|
||||
|
@ -593,9 +552,9 @@ static int directCommand(KCmdLineArgs *args)
|
|||
// geticon [group] [context]
|
||||
if (args->isSet("geticon")) {
|
||||
QString groupStr, contextStr;
|
||||
groupStr = QString::fromLocal8Bit(args->getOption("geticon"));
|
||||
groupStr = args->getOption("geticon");
|
||||
if (args->count() >= 1) {
|
||||
contextStr = QString::fromLocal8Bit(args->arg(0));
|
||||
contextStr = args->arg(0);
|
||||
}
|
||||
K3Icon::Group group = K3Icon::NoGroup;
|
||||
if ( groupStr == QLatin1String( "Desktop" ) )
|
||||
|
@ -648,10 +607,10 @@ static int directCommand(KCmdLineArgs *args)
|
|||
close(1);
|
||||
|
||||
int totalsteps = 100;
|
||||
QString text = QString::fromLocal8Bit(args->getOption("progressbar"));
|
||||
QString text = args->getOption("progressbar");
|
||||
|
||||
if (args->count() == 1)
|
||||
totalsteps = QString::fromLocal8Bit(args->arg(0)).toInt();
|
||||
totalsteps = args->arg(0).toInt();
|
||||
|
||||
return Widgets::progressBar(0, title, text, totalsteps) ? 1 : 0;
|
||||
}
|
||||
|
@ -663,19 +622,54 @@ static int directCommand(KCmdLineArgs *args)
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
KAboutData aboutData( "kdialog", I18N_NOOP("KDialog"),
|
||||
"1.0", I18N_NOOP( "KDialog can be used to show nice dialog boxes from shell scripts" ),
|
||||
KAboutData aboutData( "kdialog", 0, ki18n("KDialog"),
|
||||
"1.0", ki18n( "KDialog can be used to show nice dialog boxes from shell scripts" ),
|
||||
KAboutData::License_GPL,
|
||||
"(C) 2000, Nick Thompson");
|
||||
aboutData.addAuthor("David Faure", I18N_NOOP("Current maintainer"),"faure@kde.org");
|
||||
aboutData.addAuthor("Brad Hards", 0, "bradh@frogmouth.net");
|
||||
aboutData.addAuthor("Nick Thompson",0, 0/*"nickthompson@lucent.com" bounces*/);
|
||||
aboutData.addAuthor("Matthias Hölzer",0,"hoelzer@kde.org");
|
||||
aboutData.addAuthor("David Gümbel",0,"david.guembel@gmx.net");
|
||||
aboutData.addAuthor("Richard Moore",0,"rich@kde.org");
|
||||
aboutData.addAuthor("Dawit Alemayehu",0,"adawit@kde.org");
|
||||
ki18n("(C) 2000, Nick Thompson"));
|
||||
aboutData.addAuthor(ki18n("David Faure"), ki18n("Current maintainer"),"faure@kde.org");
|
||||
aboutData.addAuthor(ki18n("Brad Hards"), KLocalizedString(), "bradh@frogmouth.net");
|
||||
aboutData.addAuthor(ki18n("Nick Thompson"),KLocalizedString(), 0/*"nickthompson@lucent.com" bounces*/);
|
||||
aboutData.addAuthor(ki18n("Matthias Hölzer"),KLocalizedString(),"hoelzer@kde.org");
|
||||
aboutData.addAuthor(ki18n("David Gümbel"),KLocalizedString(),"david.guembel@gmx.net");
|
||||
aboutData.addAuthor(ki18n("Richard Moore"),KLocalizedString(),"rich@kde.org");
|
||||
aboutData.addAuthor(ki18n("Dawit Alemayehu"),KLocalizedString(),"adawit@kde.org");
|
||||
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("yesno <text>", ki18n("Question message box with yes/no buttons"));
|
||||
options.add("yesnocancel <text>", ki18n("Question message box with yes/no/cancel buttons"));
|
||||
options.add("warningyesno <text>", ki18n("Warning message box with yes/no buttons"));
|
||||
options.add("warningcontinuecancel <text>", ki18n("Warning message box with continue/cancel buttons"));
|
||||
options.add("warningyesnocancel <text>", ki18n("Warning message box with yes/no/cancel buttons"));
|
||||
options.add("sorry <text>", ki18n("'Sorry' message box"));
|
||||
options.add("error <text>", ki18n("'Error' message box"));
|
||||
options.add("msgbox <text>", ki18n("Message Box dialog"));
|
||||
options.add("inputbox <text> <init>", ki18n("Input Box dialog"));
|
||||
options.add("password <text>", ki18n("Password dialog"));
|
||||
options.add("textbox <file> [width] [height]", ki18n("Text Box dialog"));
|
||||
options.add("textinputbox <text> <init> [width] [height]", ki18n("Text Input Box dialog"));
|
||||
options.add("combobox <text> [tag item] [tag item] ...", ki18n("ComboBox dialog"));
|
||||
options.add("menu <text> [tag item] [tag item] ...", ki18n("Menu dialog"));
|
||||
options.add("checklist <text> [tag item status] ...", ki18n("Check List dialog"));
|
||||
options.add("radiolist <text> [tag item status] ...", ki18n("Radio List dialog"));
|
||||
options.add("passivepopup <text> <timeout>", ki18n("Passive Popup"));
|
||||
options.add("getopenfilename [startDir] [filter]", ki18n("File dialog to open an existing file"));
|
||||
options.add("getsavefilename [startDir] [filter]", ki18n("File dialog to save a file"));
|
||||
options.add("getexistingdirectory [startDir]", ki18n("File dialog to select an existing directory"));
|
||||
options.add("getopenurl [startDir] [filter]", ki18n("File dialog to open an existing URL"));
|
||||
options.add("getsaveurl [startDir] [filter]", ki18n("File dialog to save a URL"));
|
||||
options.add("geticon [group] [context]", ki18n("Icon chooser dialog"));
|
||||
options.add("progressbar <text> [totalsteps]", ki18n("Progress bar dialog, returns a D-Bus reference for communication"));
|
||||
// TODO gauge stuff, reading values from stdin
|
||||
options.add("title <text>", ki18n("Dialog title"));
|
||||
options.add("default <text>", ki18n("Default entry to use for combobox and menu"));
|
||||
options.add("multiple", ki18n("Allows the --getopenurl and --getopenfilename options to return multiple files"));
|
||||
options.add("separate-output", ki18n("Return list items on separate lines (for checklist option and file open with --multiple)"));
|
||||
options.add("print-winid", ki18n("Outputs the winId of each dialog"));
|
||||
options.add("embed <winid>", ki18n("Makes the dialog transient for an X app specified by winid"));
|
||||
options.add("dontagain <file:entry>", ki18n("Config file and option name for saving the \"don't-show/ask-again\" state"));
|
||||
options.add("+[arg]", ki18n("Arguments - depending on main option"));
|
||||
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
||||
|
||||
KApplication app;
|
||||
|
|
|
@ -40,12 +40,6 @@
|
|||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
|
||||
static const KCmdLineOptions cmdLineOptions[] =
|
||||
{
|
||||
{ "+directory", I18N_NOOP( "Directory to scan for extra bookmarks" ), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
// The code for this function was taken from kdesktop/kcheckrunning.cpp
|
||||
static bool kdeIsRunning()
|
||||
{
|
||||
|
@ -66,14 +60,17 @@ int main( int argc, char**argv )
|
|||
{
|
||||
const bool kdeRunning = kdeIsRunning();
|
||||
|
||||
KAboutData aboutData( "kbookmarkmerger", I18N_NOOP( "KBookmarkMerger" ),
|
||||
"1.0", I18N_NOOP( "Merges bookmarks installed by 3rd parties into the user's bookmarks" ),
|
||||
KAboutData aboutData( "kbookmarkmerger", 0, ki18n( "KBookmarkMerger" ),
|
||||
"1.0", ki18n( "Merges bookmarks installed by 3rd parties into the user's bookmarks" ),
|
||||
KAboutData::License_BSD,
|
||||
I18N_NOOP( "Copyright © 2005 Frerich Raabe" ) );
|
||||
aboutData.addAuthor( "Frerich Raabe", I18N_NOOP( "Original author" ),
|
||||
ki18n( "Copyright © 2005 Frerich Raabe" ) );
|
||||
aboutData.addAuthor( ki18n("Frerich Raabe"), ki18n( "Original author" ),
|
||||
"raabe@kde.org" );
|
||||
|
||||
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||
|
||||
KCmdLineOptions cmdLineOptions;
|
||||
cmdLineOptions.add("+directory", ki18n( "Directory to scan for extra bookmarks" ));
|
||||
KCmdLineArgs::addCmdLineOptions( cmdLineOptions );
|
||||
|
||||
KApplication app( false );
|
||||
|
@ -103,7 +100,7 @@ int main( int argc, char**argv )
|
|||
|
||||
bool didMergeBookmark = false;
|
||||
|
||||
QString extraBookmarksDirName = QFile::decodeName( args->arg( 0 ) );
|
||||
QString extraBookmarksDirName = args->arg( 0 );
|
||||
QDir extraBookmarksDir( extraBookmarksDirName, "*.xml" );
|
||||
if ( !extraBookmarksDir.isReadable() ) {
|
||||
kError() << "Failed to read files in directory " << extraBookmarksDirName << endl;
|
||||
|
|
|
@ -39,28 +39,6 @@
|
|||
#include <kbookmarkexporter.h>
|
||||
#include <toplevel_interface.h>
|
||||
|
||||
static KCmdLineOptions options[] = {
|
||||
{"importmoz <filename>", I18N_NOOP("Import bookmarks from a file in Mozilla format"), 0},
|
||||
{"importns <filename>", I18N_NOOP("Import bookmarks from a file in Netscape (4.x and earlier) format"), 0},
|
||||
{"importie <filename>", I18N_NOOP("Import bookmarks from a file in Internet Explorer's Favorites format"), 0},
|
||||
{"importopera <filename>", I18N_NOOP("Import bookmarks from a file in Opera format"), 0},
|
||||
|
||||
{"exportmoz <filename>", I18N_NOOP("Export bookmarks to a file in Mozilla format"), 0},
|
||||
{"exportns <filename>", I18N_NOOP("Export bookmarks to a file in Netscape (4.x and earlier) format"), 0},
|
||||
{"exporthtml <filename>", I18N_NOOP("Export bookmarks to a file in a printable HTML format"), 0},
|
||||
{"exportie <filename>", I18N_NOOP("Export bookmarks to a file in Internet Explorer's Favorites format"), 0},
|
||||
{"exportopera <filename>", I18N_NOOP("Export bookmarks to a file in Opera format"), 0},
|
||||
|
||||
{"address <address>", I18N_NOOP("Open at the given position in the bookmarks file"), 0},
|
||||
{"customcaption <caption>", I18N_NOOP("Set the user readable caption for example \"Konsole\""), 0},
|
||||
{"nobrowser", I18N_NOOP("Hide all browser related functions"), 0},
|
||||
{"dbusObjectName <name>", I18N_NOOP("A unique name that represents this bookmark collection, usually the kinstance name.\n"
|
||||
"This should be \"konqueror\" for the konqueror bookmarks, \"kfile\" for KFileDialog bookmarks, etc.\n"
|
||||
"The final DBus object path is /KBookmarkManager/dbusObjectName"), 0},
|
||||
{"+[file]", I18N_NOOP("File to edit"), 0},
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
// TODO - make this register() or something like that and move dialog into main
|
||||
static bool askUser(const QString& filename, bool &readonly) {
|
||||
|
||||
|
@ -112,15 +90,33 @@ static bool askUser(const QString& filename, bool &readonly) {
|
|||
#include <kactioncollection.h>
|
||||
|
||||
extern "C" KDE_EXPORT int kdemain(int argc, char **argv) {
|
||||
KAboutData aboutData("keditbookmarks", I18N_NOOP("Bookmark Editor"), KDE_VERSION_STRING,
|
||||
I18N_NOOP("Konqueror Bookmarks Editor"),
|
||||
KAboutData aboutData("keditbookmarks", 0, ki18n("Bookmark Editor"), KDE_VERSION_STRING,
|
||||
ki18n("Konqueror Bookmarks Editor"),
|
||||
KAboutData::License_GPL,
|
||||
I18N_NOOP("(c) 2000 - 2003, KDE developers") );
|
||||
aboutData.addAuthor("David Faure", I18N_NOOP("Initial author"), "faure@kde.org");
|
||||
aboutData.addAuthor("Alexander Kellett", I18N_NOOP("Author"), "lypanov@kde.org");
|
||||
ki18n("(c) 2000 - 2003, KDE developers") );
|
||||
aboutData.addAuthor(ki18n("David Faure"), ki18n("Initial author"), "faure@kde.org");
|
||||
aboutData.addAuthor(ki18n("Alexander Kellett"), ki18n("Author"), "lypanov@kde.org");
|
||||
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
KCmdLineArgs::addStdCmdLineOptions();
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("importmoz <filename>", ki18n("Import bookmarks from a file in Mozilla format"));
|
||||
options.add("importns <filename>", ki18n("Import bookmarks from a file in Netscape (4.x and earlier) format"));
|
||||
options.add("importie <filename>", ki18n("Import bookmarks from a file in Internet Explorer's Favorites format"));
|
||||
options.add("importopera <filename>", ki18n("Import bookmarks from a file in Opera format"));
|
||||
options.add("exportmoz <filename>", ki18n("Export bookmarks to a file in Mozilla format"));
|
||||
options.add("exportns <filename>", ki18n("Export bookmarks to a file in Netscape (4.x and earlier) format"));
|
||||
options.add("exporthtml <filename>", ki18n("Export bookmarks to a file in a printable HTML format"));
|
||||
options.add("exportie <filename>", ki18n("Export bookmarks to a file in Internet Explorer's Favorites format"));
|
||||
options.add("exportopera <filename>", ki18n("Export bookmarks to a file in Opera format"));
|
||||
options.add("address <address>", ki18n("Open at the given position in the bookmarks file"));
|
||||
options.add("customcaption <caption>", ki18n("Set the user readable caption for example \"Konsole\""));
|
||||
options.add("nobrowser", ki18n("Hide all browser related functions"));
|
||||
options.add("dbusObjectName <name>", ki18n("A unique name that represents this bookmark collection, usually the kinstance name.\n"
|
||||
"This should be \"konqueror\" for the konqueror bookmarks, \"kfile\" for KFileDialog bookmarks, etc.\n"
|
||||
"The final DBus object path is /KBookmarkManager/dbusObjectName"));
|
||||
options.add("+[file]", ki18n("File to edit"));
|
||||
KCmdLineArgs::addCmdLineOptions(options);
|
||||
|
||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||
|
@ -137,7 +133,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) {
|
|||
bool gotFilenameArg = (args->count() == 1);
|
||||
|
||||
QString filename = gotFilenameArg
|
||||
? QLatin1String(args->arg(0))
|
||||
? args->arg(0)
|
||||
: KStandardDirs::locateLocal("data", QLatin1String("konqueror/bookmarks.xml"));
|
||||
|
||||
if (!isGui) {
|
||||
|
@ -159,12 +155,12 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) {
|
|||
// TODO - maybe an xbel export???
|
||||
if (got > 1) // got == 0 isn't possible as !isGui is dependant on "export.*"
|
||||
KCmdLineArgs::usage(I18N_NOOP("You may only specify a single --export option."));
|
||||
QString path = QString::fromLocal8Bit(args->getOption(arg2));
|
||||
QString path = args->getOption(arg2);
|
||||
CurrentMgr::self()->doExport(exportType, path);
|
||||
} else if (importType) {
|
||||
if (got > 1) // got == 0 isn't possible as !isGui is dependant on "import.*"
|
||||
KCmdLineArgs::usage(I18N_NOOP("You may only specify a single --import option."));
|
||||
QString path = QString::fromLocal8Bit(args->getOption(arg2));
|
||||
QString path = args->getOption(arg2);
|
||||
ImportCommand *importer = ImportCommand::importerFactory(importType);
|
||||
importer->import(path, true);
|
||||
importer->execute();
|
||||
|
@ -175,17 +171,17 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) {
|
|||
}
|
||||
|
||||
QString address = args->isSet("address")
|
||||
? QString::fromLocal8Bit(args->getOption("address"))
|
||||
? args->getOption("address")
|
||||
: QString("/0");
|
||||
|
||||
QString caption = args->isSet("customcaption")
|
||||
? QString::fromLocal8Bit(args->getOption("customcaption"))
|
||||
? args->getOption("customcaption")
|
||||
: QString();
|
||||
|
||||
QString dbusObjectName;
|
||||
if(args->isSet("dbusObjectName"))
|
||||
{
|
||||
dbusObjectName = QString::fromLocal8Bit(args->getOption("dbusObjectName"));
|
||||
dbusObjectName = args->getOption("dbusObjectName");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -78,7 +78,7 @@ KFindPart::~KFindPart()
|
|||
|
||||
KAboutData *KFindPart::createAboutData()
|
||||
{
|
||||
return new KAboutData( "kfindpart", I18N_NOOP( "Find Component" ), "1.0" );
|
||||
return new KAboutData( "kfindpart", 0, ki18n( "Find Component" ), "1.0" );
|
||||
}
|
||||
|
||||
bool KFindPart::doOpenURL( const KUrl &url )
|
||||
|
|
|
@ -11,36 +11,32 @@
|
|||
|
||||
static const char description[] = I18N_NOOP("KDE file find utility");
|
||||
|
||||
static KCmdLineOptions options[] =
|
||||
{
|
||||
{ "+[searchpath]", I18N_NOOP("Path(s) to search"), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
int main( int argc, char ** argv )
|
||||
{
|
||||
KLocale::setMainCatalog("kfindpart");
|
||||
KAboutData aboutData( "kfind", I18N_NOOP("KFind"),
|
||||
KFIND_VERSION, description, KAboutData::License_GPL,
|
||||
I18N_NOOP("(c) 1998-2003, The KDE Developers"));
|
||||
KAboutData aboutData( "kfind", "kfindpart", ki18n("KFind"),
|
||||
KFIND_VERSION, ki18n(description), KAboutData::License_GPL,
|
||||
ki18n("(c) 1998-2003, The KDE Developers"));
|
||||
|
||||
aboutData.addAuthor("Eric Coquelle", I18N_NOOP("Current Maintainer"), "coquelle@caramail.com");
|
||||
aboutData.addAuthor("Mark W. Webb", I18N_NOOP("Developer"), "markwebb@adelphia.net");
|
||||
aboutData.addAuthor("Beppe Grimaldi", I18N_NOOP("UI Design & more search options"), "grimalkin@ciaoweb.it");
|
||||
aboutData.addAuthor("Martin Hartig");
|
||||
aboutData.addAuthor("Stephan Kulow", 0, "coolo@kde.org");
|
||||
aboutData.addAuthor("Mario Weilguni",0, "mweilguni@sime.com");
|
||||
aboutData.addAuthor("Alex Zepeda",0, "zipzippy@sonic.net");
|
||||
aboutData.addAuthor("Miroslav Fl<46>r",0, "flidr@kky.zcu.cz");
|
||||
aboutData.addAuthor("Harri Porten",0, "porten@kde.org");
|
||||
aboutData.addAuthor("Dima Rogozin",0, "dima@mercury.co.il");
|
||||
aboutData.addAuthor("Carsten Pfeiffer",0, "pfeiffer@kde.org");
|
||||
aboutData.addAuthor("Hans Petter Bieker", 0, "bieker@kde.org");
|
||||
aboutData.addAuthor("Waldo Bastian", I18N_NOOP("UI Design"), "bastian@kde.org");
|
||||
aboutData.addAuthor("Alexander Neundorf", 0, "neundorf@kde.org");
|
||||
aboutData.addAuthor("Clarence Dang", 0, "dang@kde.org");
|
||||
aboutData.addAuthor(ki18n("Eric Coquelle"), ki18n("Current Maintainer"), "coquelle@caramail.com");
|
||||
aboutData.addAuthor(ki18n("Mark W. Webb"), ki18n("Developer"), "markwebb@adelphia.net");
|
||||
aboutData.addAuthor(ki18n("Beppe Grimaldi"), ki18n("UI Design & more search options"), "grimalkin@ciaoweb.it");
|
||||
aboutData.addAuthor(ki18n("Martin Hartig"));
|
||||
aboutData.addAuthor(ki18n("Stephan Kulow"), KLocalizedString(), "coolo@kde.org");
|
||||
aboutData.addAuthor(ki18n("Mario Weilguni"),KLocalizedString(), "mweilguni@sime.com");
|
||||
aboutData.addAuthor(ki18n("Alex Zepeda"),KLocalizedString(), "zipzippy@sonic.net");
|
||||
aboutData.addAuthor(ki18n("Miroslav Fl<46>r"),KLocalizedString(), "flidr@kky.zcu.cz");
|
||||
aboutData.addAuthor(ki18n("Harri Porten"),KLocalizedString(), "porten@kde.org");
|
||||
aboutData.addAuthor(ki18n("Dima Rogozin"),KLocalizedString(), "dima@mercury.co.il");
|
||||
aboutData.addAuthor(ki18n("Carsten Pfeiffer"),KLocalizedString(), "pfeiffer@kde.org");
|
||||
aboutData.addAuthor(ki18n("Hans Petter Bieker"), KLocalizedString(), "bieker@kde.org");
|
||||
aboutData.addAuthor(ki18n("Waldo Bastian"), ki18n("UI Design"), "bastian@kde.org");
|
||||
aboutData.addAuthor(ki18n("Alexander Neundorf"), KLocalizedString(), "neundorf@kde.org");
|
||||
aboutData.addAuthor(ki18n("Clarence Dang"), KLocalizedString(), "dang@kde.org");
|
||||
|
||||
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("+[searchpath]", ki18n("Path(s) to search"));
|
||||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
|
||||
KApplication app;
|
||||
|
|
|
@ -65,18 +65,20 @@ K_GLOBAL_STATIC_WITH_ARGS(KComponentData, s_instance, ("kfmclient"))
|
|||
|
||||
static void needInstance();
|
||||
|
||||
static const KCmdLineOptions options[] =
|
||||
{
|
||||
{ "noninteractive", I18N_NOOP("Non interactive use: no message boxes"), 0},
|
||||
{ "commands", I18N_NOOP("Show available commands"), 0},
|
||||
{ "+command", I18N_NOOP("Command (see --commands)"), 0},
|
||||
{ "+[URL(s)]", I18N_NOOP("Arguments for command"), 0},
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
|
||||
{
|
||||
KCmdLineArgs::init(argc, argv, appName, programName, description, version, false);
|
||||
KCmdLineArgs::init(argc, argv, appName, 0, ki18n(programName), version, ki18n(description), false);
|
||||
|
||||
|
||||
KCmdLineOptions options;
|
||||
|
||||
options.add("noninteractive", ki18n("Non interactive use: no message boxes"));
|
||||
|
||||
options.add("commands", ki18n("Show available commands"));
|
||||
|
||||
options.add("+command", ki18n("Command (see --commands)"));
|
||||
|
||||
options.add("+[URL(s)]", ki18n("Arguments for command"));
|
||||
|
||||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
KCmdLineArgs::addTempFileOption();
|
||||
|
@ -468,7 +470,7 @@ bool ClientApp::doIt()
|
|||
if ( !args->isSet( "ninteractive" ) ) {
|
||||
s_interactive = false;
|
||||
}
|
||||
QByteArray command = args->arg(0);
|
||||
QString command = args->arg(0);
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
// read ASN env. variable for non-KApp cases
|
||||
|
@ -497,7 +499,7 @@ bool ClientApp::doIt()
|
|||
}
|
||||
if ( argc == 3 )
|
||||
{
|
||||
return createNewWindow( args->url(1), command == "newTab", tempFile, QLatin1String(args->arg(2)) );
|
||||
return createNewWindow( args->url(1), command == "newTab", tempFile, args->arg(2) );
|
||||
}
|
||||
}
|
||||
else if ( command == "openProfile" )
|
||||
|
@ -506,11 +508,11 @@ bool ClientApp::doIt()
|
|||
QString url;
|
||||
if ( argc == 3 )
|
||||
url = args->url(2).url();
|
||||
return openProfile( QString::fromLocal8Bit(args->arg(1)), url );
|
||||
return openProfile( args->arg(1), url );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stderr, "%s", i18n("Syntax Error: Unknown command '%1'\n", QString::fromLocal8Bit(command)).toLocal8Bit().data() );
|
||||
fprintf( stderr, "%s", i18n("Syntax Error: Unknown command '%1'\n", command).toLocal8Bit().data() );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -98,7 +98,7 @@ KonqPart::~KonqPart()
|
|||
|
||||
KAboutData* KonqPart::createAboutData()
|
||||
{
|
||||
return new KAboutData( "konq_part", I18N_NOOP( "KonqPart" ), "0.1" );
|
||||
return new KAboutData( "konq_part", 0, ki18n( "KonqPart" ), "0.1" );
|
||||
}
|
||||
|
||||
void KonqPart::slotNewItems( const KFileItemList& items )
|
||||
|
|
|
@ -118,25 +118,21 @@ void FileTypeDialog::slotDatabaseChanged()
|
|||
|
||||
#include "keditfiletype.moc"
|
||||
|
||||
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 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
KServiceTypeProfile::setConfigurationMode();
|
||||
KLocale::setMainCatalog("filetypes");
|
||||
KAboutData aboutData( "keditfiletype", I18N_NOOP("KEditFileType"), "1.0",
|
||||
I18N_NOOP("KDE file type editor - simplified version for editing a single file type"),
|
||||
KAboutData aboutData( "keditfiletype", "filetypes", ki18n("KEditFileType"), "1.0",
|
||||
ki18n("KDE file type editor - simplified version for editing a single file type"),
|
||||
KAboutData::License_GPL,
|
||||
I18N_NOOP("(c) 2000, KDE developers") );
|
||||
aboutData.addAuthor("Preston Brown",0, "pbrown@kde.org");
|
||||
aboutData.addAuthor("David Faure",0, "faure@kde.org");
|
||||
ki18n("(c) 2000, KDE developers") );
|
||||
aboutData.addAuthor(ki18n("Preston Brown"),KLocalizedString(), "pbrown@kde.org");
|
||||
aboutData.addAuthor(ki18n("David Faure"),KLocalizedString(), "faure@kde.org");
|
||||
|
||||
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("parent <winid>", ki18n("Makes the dialog transient for the window specified by winid"));
|
||||
options.add("+mimetype", ki18n("File type to edit (e.g. text/html)"));
|
||||
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
||||
KApplication app;
|
||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||
|
|
|
@ -58,11 +58,11 @@ KSocksConfig::KSocksConfig(const KComponentData &componentData, QWidget *parent)
|
|||
{
|
||||
|
||||
KAboutData *about =
|
||||
new KAboutData(I18N_NOOP("kcmsocks"), I18N_NOOP("KDE SOCKS Control Module"),
|
||||
0, 0, KAboutData::License_GPL,
|
||||
I18N_NOOP("(c) 2001 George Staikos"));
|
||||
new KAboutData(I18N_NOOP("kcmsocks"), 0, ki18n("KDE SOCKS Control Module"),
|
||||
0, KLocalizedString(), KAboutData::License_GPL,
|
||||
ki18n("(c) 2001 George Staikos"));
|
||||
|
||||
about->addAuthor("George Staikos", 0, "staikos@kde.org");
|
||||
about->addAuthor(ki18n("George Staikos"), KLocalizedString(), "staikos@kde.org");
|
||||
|
||||
setAboutData( about );
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
KLocale::setMainCatalog("kdelibs");
|
||||
KCmdLineArgs::init(argc, argv, "kcustommenueditortest","kcustommenueditortest","test app","0");
|
||||
KCmdLineArgs::init(argc, argv, "kcustommenueditortest", "kdelibs", ki18n("kcustommenueditortest"),"0",ki18n("test app"));
|
||||
KApplication app;
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
KCustomMenuEditor editor(0);
|
||||
|
|
|
@ -55,19 +55,19 @@ KJSParts::KJSParts(QWidget *parent, const QStringList&)
|
|||
{
|
||||
mConfig = KSharedConfig::openConfig("konquerorrc", KConfig::NoGlobals);
|
||||
KAboutData *about =
|
||||
new KAboutData(I18N_NOOP("kcmkonqhtml"), I18N_NOOP("Konqueror Browsing Control Module"),
|
||||
0, 0, KAboutData::License_GPL,
|
||||
I18N_NOOP("(c) 1999 - 2001 The Konqueror Developers"));
|
||||
new KAboutData(I18N_NOOP("kcmkonqhtml"), 0, ki18n("Konqueror Browsing Control Module"),
|
||||
0, KLocalizedString(), KAboutData::License_GPL,
|
||||
ki18n("(c) 1999 - 2001 The Konqueror Developers"));
|
||||
|
||||
about->addAuthor("Waldo Bastian",0,"bastian@kde.org");
|
||||
about->addAuthor("David Faure",0,"faure@kde.org");
|
||||
about->addAuthor("Matthias Kalle Dalheimer",0,"kalle@kde.org");
|
||||
about->addAuthor("Lars Knoll",0,"knoll@kde.org");
|
||||
about->addAuthor("Dirk Mueller",0,"mueller@kde.org");
|
||||
about->addAuthor("Daniel Molkentin",0,"molkentin@kde.org");
|
||||
about->addAuthor("Wynn Wilkes",0,"wynnw@caldera.com");
|
||||
about->addAuthor(ki18n("Waldo Bastian"),KLocalizedString(),"bastian@kde.org");
|
||||
about->addAuthor(ki18n("David Faure"),KLocalizedString(),"faure@kde.org");
|
||||
about->addAuthor(ki18n("Matthias Kalle Dalheimer"),KLocalizedString(),"kalle@kde.org");
|
||||
about->addAuthor(ki18n("Lars Knoll"),KLocalizedString(),"knoll@kde.org");
|
||||
about->addAuthor(ki18n("Dirk Mueller"),KLocalizedString(),"mueller@kde.org");
|
||||
about->addAuthor(ki18n("Daniel Molkentin"),KLocalizedString(),"molkentin@kde.org");
|
||||
about->addAuthor(ki18n("Wynn Wilkes"),KLocalizedString(),"wynnw@caldera.com");
|
||||
|
||||
about->addCredit("Leo Savernik",I18N_NOOP("JavaScript access controls\n"
|
||||
about->addCredit(ki18n("Leo Savernik"),ki18n("JavaScript access controls\n"
|
||||
"Per-domain policies extensions"),
|
||||
"l.savernik@aon.at");
|
||||
|
||||
|
|
|
@ -113,8 +113,8 @@ const KComponentData &KonqSidebarFactory::componentData()
|
|||
{
|
||||
if( !s_instance )
|
||||
{
|
||||
s_about = new KAboutData("konqsidebartng", I18N_NOOP("Extended Sidebar"), "0.1");
|
||||
s_about->addAuthor("Joseph WENNINGER", 0, "jowenn@bigfoot.com");
|
||||
s_about = new KAboutData("konqsidebartng", 0, ki18n("Extended Sidebar"), "0.1");
|
||||
s_about->addAuthor(ki18n("Joseph WENNINGER"), KLocalizedString(), "jowenn@bigfoot.com");
|
||||
s_instance = new KComponentData(s_about);
|
||||
}
|
||||
return *s_instance;
|
||||
|
|
|
@ -232,48 +232,48 @@ const KAboutData *KonqFactory::aboutData()
|
|||
{
|
||||
if (!s_aboutData)
|
||||
{
|
||||
s_aboutData = new KAboutData( "konqueror", I18N_NOOP("Konqueror"),
|
||||
s_aboutData = new KAboutData( "konqueror", 0, ki18n("Konqueror"),
|
||||
KDE_VERSION_STRING,
|
||||
I18N_NOOP("Web browser, file manager and document viewer."),
|
||||
ki18n("Web browser, file manager and document viewer."),
|
||||
KAboutData::License_GPL,
|
||||
I18N_NOOP("(C) 1999-2007, The Konqueror developers"),
|
||||
0,
|
||||
ki18n("(C) 1999-2007, The Konqueror developers"),
|
||||
KLocalizedString(),
|
||||
I18N_NOOP("http://konqueror.kde.org") );
|
||||
s_aboutData->addAuthor( "David Faure", I18N_NOOP("Developer (framework, parts, JavaScript, I/O library) and maintainer"), "faure@kde.org" );
|
||||
s_aboutData->addAuthor( "Simon Hausmann", I18N_NOOP("Developer (framework, parts)"), "hausmann@kde.org" );
|
||||
s_aboutData->addAuthor( "Michael Reiher", I18N_NOOP("Developer (framework)"), "michael.reiher@gmx.de" );
|
||||
s_aboutData->addAuthor( "Matthias Welk", I18N_NOOP("Developer"), "welk@fokus.gmd.de" );
|
||||
s_aboutData->addAuthor( "Alexander Neundorf", I18N_NOOP("Developer (List views)"), "neundorf@kde.org" );
|
||||
s_aboutData->addAuthor( "Michael Brade", I18N_NOOP("Developer (List views, I/O library)"), "brade@kde.org" );
|
||||
s_aboutData->addAuthor( "Lars Knoll", I18N_NOOP("Developer (HTML rendering engine)"), "knoll@kde.org" );
|
||||
s_aboutData->addAuthor( "Dirk Mueller", I18N_NOOP("Developer (HTML rendering engine)"), "mueller@kde.org" );
|
||||
s_aboutData->addAuthor( "Peter Kelly", I18N_NOOP("Developer (HTML rendering engine)"), "pmk@post.com" );
|
||||
s_aboutData->addAuthor( "Waldo Bastian", I18N_NOOP("Developer (HTML rendering engine, I/O library)"), "bastian@kde.org" );
|
||||
s_aboutData->addAuthor( "Germain Garand", I18N_NOOP("Developer (HTML rendering engine)"), "germain@ebooksfrance.org" );
|
||||
s_aboutData->addAuthor( "Leo Savernik", I18N_NOOP("Developer (HTML rendering engine)"), "l.savernik@aon.at" );
|
||||
s_aboutData->addAuthor( "Stephan Kulow", I18N_NOOP("Developer (HTML rendering engine, I/O library, regression test framework)"), "coolo@kde.org" );
|
||||
s_aboutData->addAuthor( "Antti Koivisto", I18N_NOOP("Developer (HTML rendering engine)"), "koivisto@kde.org" );
|
||||
s_aboutData->addAuthor( "Zack Rusin", I18N_NOOP("Developer (HTML rendering engine)"), "zack@kde.org" );
|
||||
s_aboutData->addAuthor( "Tobias Anton", I18N_NOOP( "Developer (HTML rendering engine)" ), "anton@stud.fbi.fh-darmstadt.de" );
|
||||
s_aboutData->addAuthor( "Lubos Lunak", I18N_NOOP( "Developer (HTML rendering engine)" ), "l.lunak@kde.org" );
|
||||
s_aboutData->addAuthor( "Allan Sandfeld Jensen", I18N_NOOP( "Developer (HTML rendering engine)" ), "kde@carewolf.com" );
|
||||
s_aboutData->addAuthor( "Apple Safari Developers", I18N_NOOP("Developer (HTML rendering engine, JavaScript)"), "" );
|
||||
s_aboutData->addAuthor( "Harri Porten", I18N_NOOP("Developer (JavaScript)"), "porten@kde.org" );
|
||||
s_aboutData->addAuthor( "Koos Vriezen", I18N_NOOP("Developer (Java applets and other embedded objects)"), "koos.vriezen@xs4all.nl" );
|
||||
s_aboutData->addAuthor( "Matt Koss", I18N_NOOP("Developer (I/O library)"), "koss@miesto.sk" );
|
||||
s_aboutData->addAuthor( "Alex Zepeda", I18N_NOOP("Developer (I/O library)"), "zipzippy@sonic.net" );
|
||||
s_aboutData->addAuthor( "Richard Moore", I18N_NOOP("Developer (Java applet support)"), "rich@kde.org" );
|
||||
s_aboutData->addAuthor( "Dima Rogozin", I18N_NOOP("Developer (Java applet support)"), "dima@mercury.co.il" );
|
||||
s_aboutData->addAuthor( "Wynn Wilkes", I18N_NOOP("Developer (Java 2 security manager support,\n and other major improvements to applet support)"), "wynnw@calderasystems.com" );
|
||||
s_aboutData->addAuthor( "Stefan Schimanski", I18N_NOOP("Developer (Netscape plugin support)"), "schimmi@kde.org" );
|
||||
s_aboutData->addAuthor( "George Staikos", I18N_NOOP("Developer (SSL, Netscape plugins)"), "staikos@kde.org" );
|
||||
s_aboutData->addAuthor( "Dawit Alemayehu",I18N_NOOP("Developer (I/O library, Authentication support)"), "adawit@kde.org" );
|
||||
s_aboutData->addAuthor( "Carsten Pfeiffer",I18N_NOOP("Developer (framework)"), "pfeiffer@kde.org" );
|
||||
s_aboutData->addAuthor( "Torsten Rahn", I18N_NOOP("Graphics/icons"), "torsten@kde.org" );
|
||||
s_aboutData->addAuthor( "Torben Weis", I18N_NOOP("KFM author"), "weis@kde.org" );
|
||||
s_aboutData->addAuthor( "Joseph Wenninger", I18N_NOOP("Developer (navigation panel framework)"),"jowenn@kde.org");
|
||||
s_aboutData->addAuthor( "Stephan Binner", I18N_NOOP("Developer (misc stuff)"),"binner@kde.org");
|
||||
s_aboutData->addAuthor( "Ivor Hewitt", I18N_NOOP("Developer (AdBlock filter)"),"ivor@ivor.org");
|
||||
s_aboutData->addAuthor( ki18n("David Faure"), ki18n("Developer (framework, parts, JavaScript, I/O library) and maintainer"), "faure@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Simon Hausmann"), ki18n("Developer (framework, parts)"), "hausmann@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Michael Reiher"), ki18n("Developer (framework)"), "michael.reiher@gmx.de" );
|
||||
s_aboutData->addAuthor( ki18n("Matthias Welk"), ki18n("Developer"), "welk@fokus.gmd.de" );
|
||||
s_aboutData->addAuthor( ki18n("Alexander Neundorf"), ki18n("Developer (List views)"), "neundorf@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Michael Brade"), ki18n("Developer (List views, I/O library)"), "brade@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Lars Knoll"), ki18n("Developer (HTML rendering engine)"), "knoll@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Dirk Mueller"), ki18n("Developer (HTML rendering engine)"), "mueller@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Peter Kelly"), ki18n("Developer (HTML rendering engine)"), "pmk@post.com" );
|
||||
s_aboutData->addAuthor( ki18n("Waldo Bastian"), ki18n("Developer (HTML rendering engine, I/O library)"), "bastian@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Germain Garand"), ki18n("Developer (HTML rendering engine)"), "germain@ebooksfrance.org" );
|
||||
s_aboutData->addAuthor( ki18n("Leo Savernik"), ki18n("Developer (HTML rendering engine)"), "l.savernik@aon.at" );
|
||||
s_aboutData->addAuthor( ki18n("Stephan Kulow"), ki18n("Developer (HTML rendering engine, I/O library, regression test framework)"), "coolo@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Antti Koivisto"), ki18n("Developer (HTML rendering engine)"), "koivisto@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Zack Rusin"), ki18n("Developer (HTML rendering engine)"), "zack@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Tobias Anton"), ki18n( "Developer (HTML rendering engine)" ), "anton@stud.fbi.fh-darmstadt.de" );
|
||||
s_aboutData->addAuthor( ki18n("Lubos Lunak"), ki18n( "Developer (HTML rendering engine)" ), "l.lunak@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Allan Sandfeld Jensen"), ki18n( "Developer (HTML rendering engine)" ), "kde@carewolf.com" );
|
||||
s_aboutData->addAuthor( ki18n("Apple Safari Developers"), ki18n("Developer (HTML rendering engine, JavaScript)"));
|
||||
s_aboutData->addAuthor( ki18n("Harri Porten"), ki18n("Developer (JavaScript)"), "porten@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Koos Vriezen"), ki18n("Developer (Java applets and other embedded objects)"), "koos.vriezen@xs4all.nl" );
|
||||
s_aboutData->addAuthor( ki18n("Matt Koss"), ki18n("Developer (I/O library)"), "koss@miesto.sk" );
|
||||
s_aboutData->addAuthor( ki18n("Alex Zepeda"), ki18n("Developer (I/O library)"), "zipzippy@sonic.net" );
|
||||
s_aboutData->addAuthor( ki18n("Richard Moore"), ki18n("Developer (Java applet support)"), "rich@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Dima Rogozin"), ki18n("Developer (Java applet support)"), "dima@mercury.co.il" );
|
||||
s_aboutData->addAuthor( ki18n("Wynn Wilkes"), ki18n("Developer (Java 2 security manager support,\n and other major improvements to applet support)"), "wynnw@calderasystems.com" );
|
||||
s_aboutData->addAuthor( ki18n("Stefan Schimanski"), ki18n("Developer (Netscape plugin support)"), "schimmi@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("George Staikos"), ki18n("Developer (SSL, Netscape plugins)"), "staikos@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Dawit Alemayehu"),ki18n("Developer (I/O library, Authentication support)"), "adawit@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Carsten Pfeiffer"),ki18n("Developer (framework)"), "pfeiffer@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Torsten Rahn"), ki18n("Graphics/icons"), "torsten@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Torben Weis"), ki18n("KFM author"), "weis@kde.org" );
|
||||
s_aboutData->addAuthor( ki18n("Joseph Wenninger"), ki18n("Developer (navigation panel framework)"),"jowenn@kde.org");
|
||||
s_aboutData->addAuthor( ki18n("Stephan Binner"), ki18n("Developer (misc stuff)"),"binner@kde.org");
|
||||
s_aboutData->addAuthor( ki18n("Ivor Hewitt"), ki18n("Developer (AdBlock filter)"),"ivor@ivor.org");
|
||||
}
|
||||
return s_aboutData;
|
||||
}
|
||||
|
|
|
@ -40,22 +40,27 @@
|
|||
#include <QtDBus/QtDBus>
|
||||
#include <QDir>
|
||||
|
||||
static const KCmdLineOptions options[] =
|
||||
{
|
||||
{ "silent", I18N_NOOP("Start without a default window"), 0 },
|
||||
{ "preload", I18N_NOOP("Preload for later use"), 0 },
|
||||
{ "profile <profile>", I18N_NOOP("Profile to open"), 0 },
|
||||
{ "profiles", I18N_NOOP("List available profiles"), 0 },
|
||||
{ "mimetype <mimetype>", I18N_NOOP("Mimetype to use for this URL (e.g. text/html or inode/directory)"), 0 },
|
||||
{ "select", I18N_NOOP("For URLs that point to files, opens the directory and selects the file, instead of opening the actual file"), 0 },
|
||||
{ "+[URL]", I18N_NOOP("Location to open"), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
|
||||
{
|
||||
KCmdLineArgs::init( argc, argv, KonqFactory::aboutData() );
|
||||
|
||||
|
||||
KCmdLineOptions options;
|
||||
|
||||
options.add("silent", ki18n("Start without a default window"));
|
||||
|
||||
options.add("preload", ki18n("Preload for later use"));
|
||||
|
||||
options.add("profile <profile>", ki18n("Profile to open"));
|
||||
|
||||
options.add("profiles", ki18n("List available profiles"));
|
||||
|
||||
options.add("mimetype <mimetype>", ki18n("Mimetype to use for this URL (e.g. text/html or inode/directory)"));
|
||||
|
||||
options.add("select", ki18n("For URLs that point to files, opens the directory and selects the file, instead of opening the actual file"));
|
||||
|
||||
options.add("+[URL]", ki18n("Location to open"));
|
||||
|
||||
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
|
||||
KCmdLineArgs::addTempFileOption();
|
||||
|
||||
|
@ -103,18 +108,18 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
|
|||
}
|
||||
if (args->isSet("profile"))
|
||||
{
|
||||
QString profile = QString::fromLocal8Bit(args->getOption("profile"));
|
||||
QString profile = args->getOption("profile");
|
||||
QString profilePath = profile;
|
||||
if (profile[0] != '/')
|
||||
profilePath = KStandardDirs::locate( "data", QLatin1String("konqueror/profiles/")+profile );
|
||||
QString url;
|
||||
QStringList filesToSelect;
|
||||
if (args->count() == 1)
|
||||
url = QString::fromLocal8Bit(args->arg(0));
|
||||
url = args->arg(0);
|
||||
KUrl kurl(url);
|
||||
KParts::URLArgs urlargs;
|
||||
if (args->isSet("mimetype"))
|
||||
urlargs.serviceType = QString::fromLocal8Bit(args->getOption("mimetype"));
|
||||
urlargs.serviceType = args->getOption("mimetype");
|
||||
if (args->isSet("select")) {
|
||||
QString fn = kurl.fileName(KUrl::ObeyTrailingSlash);
|
||||
if( !fn.isEmpty() ){
|
||||
|
@ -181,13 +186,13 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
|
|||
if (url.isLocalFile() && QFile::exists(url.path())) // "konqueror index.html"
|
||||
urlToOpen = url;
|
||||
else
|
||||
urlToOpen = KUrl( KonqMisc::konqFilteredURL(0L, QString::fromLocal8Bit(args->arg(i))) ); // "konqueror slashdot.org"
|
||||
urlToOpen = KUrl( KonqMisc::konqFilteredURL(0L, args->arg(i)) ); // "konqueror slashdot.org"
|
||||
|
||||
if ( !mainwin ) {
|
||||
KParts::URLArgs urlargs;
|
||||
if (args->isSet("mimetype"))
|
||||
{
|
||||
urlargs.serviceType = QString::fromLocal8Bit(args->getOption("mimetype"));
|
||||
urlargs.serviceType = args->getOption("mimetype");
|
||||
kDebug(1202) << "main() : setting serviceType to " << urlargs.serviceType << endl;
|
||||
}
|
||||
if (args->isSet("select"))
|
||||
|
|
|
@ -621,58 +621,53 @@ void KWrite::modeChanged ( KTextEditor::Document *document )
|
|||
m_modeLabel->setText (document->mode());
|
||||
}
|
||||
|
||||
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 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
|
||||
{
|
||||
KLocale::setMainCatalog("kate"); //lukas: set this to have the kwritepart translated using kate message catalog
|
||||
|
||||
KAboutData aboutData ( "kwrite",
|
||||
I18N_NOOP("KWrite"),
|
||||
KAboutData aboutData ( "kwrite", "kate",
|
||||
ki18n("KWrite"),
|
||||
KDE_VERSION_STRING,
|
||||
I18N_NOOP( "KWrite - Text Editor" ), KAboutData::License_LGPL_V2,
|
||||
I18N_NOOP( "(c) 2000-2005 The Kate Authors" ), 0, "http://www.kate-editor.org" );
|
||||
aboutData.addAuthor ("Christoph Cullmann", I18N_NOOP("Maintainer"), "cullmann@kde.org", "http://www.babylon2k.de");
|
||||
aboutData.addAuthor ("Anders Lund", I18N_NOOP("Core Developer"), "anders@alweb.dk", "http://www.alweb.dk");
|
||||
aboutData.addAuthor ("Joseph Wenninger", I18N_NOOP("Core Developer"), "jowenn@kde.org","http://stud3.tuwien.ac.at/~e9925371");
|
||||
aboutData.addAuthor ("Hamish Rodda",I18N_NOOP("Core Developer"), "rodda@kde.org");
|
||||
aboutData.addAuthor ("Dominik Haumann", I18N_NOOP("Developer & Highlight wizard"), "dhdev@gmx.de");
|
||||
aboutData.addAuthor ("Waldo Bastian", I18N_NOOP( "The cool buffersystem" ), "bastian@kde.org" );
|
||||
aboutData.addAuthor ("Charles Samuels", I18N_NOOP("The Editing Commands"), "charles@kde.org");
|
||||
aboutData.addAuthor ("Matt Newell", I18N_NOOP("Testing, ..."), "newellm@proaxis.com");
|
||||
aboutData.addAuthor ("Michael Bartl", I18N_NOOP("Former Core Developer"), "michael.bartl1@chello.at");
|
||||
aboutData.addAuthor ("Michael McCallum", I18N_NOOP("Core Developer"), "gholam@xtra.co.nz");
|
||||
aboutData.addAuthor ("Jochen Wilhemly", I18N_NOOP( "KWrite Author" ), "digisnap@cs.tu-berlin.de" );
|
||||
aboutData.addAuthor ("Michael Koch",I18N_NOOP("KWrite port to KParts"), "koch@kde.org");
|
||||
aboutData.addAuthor ("Christian Gebauer", 0, "gebauer@kde.org" );
|
||||
aboutData.addAuthor ("Simon Hausmann", 0, "hausmann@kde.org" );
|
||||
aboutData.addAuthor ("Glen Parker",I18N_NOOP("KWrite Undo History, Kspell integration"), "glenebob@nwlink.com");
|
||||
aboutData.addAuthor ("Scott Manson",I18N_NOOP("KWrite XML Syntax highlighting support"), "sdmanson@alltel.net");
|
||||
aboutData.addAuthor ("John Firebaugh",I18N_NOOP("Patches and more"), "jfirebaugh@kde.org");
|
||||
ki18n( "KWrite - Text Editor" ), KAboutData::License_LGPL_V2,
|
||||
ki18n( "(c) 2000-2005 The Kate Authors" ), KLocalizedString(), "http://www.kate-editor.org" );
|
||||
aboutData.addAuthor (ki18n("Christoph Cullmann"), ki18n("Maintainer"), "cullmann@kde.org", "http://www.babylon2k.de");
|
||||
aboutData.addAuthor (ki18n("Anders Lund"), ki18n("Core Developer"), "anders@alweb.dk", "http://www.alweb.dk");
|
||||
aboutData.addAuthor (ki18n("Joseph Wenninger"), ki18n("Core Developer"), "jowenn@kde.org","http://stud3.tuwien.ac.at/~e9925371");
|
||||
aboutData.addAuthor (ki18n("Hamish Rodda"),ki18n("Core Developer"), "rodda@kde.org");
|
||||
aboutData.addAuthor (ki18n("Dominik Haumann"), ki18n("Developer & Highlight wizard"), "dhdev@gmx.de");
|
||||
aboutData.addAuthor (ki18n("Waldo Bastian"), ki18n( "The cool buffersystem" ), "bastian@kde.org" );
|
||||
aboutData.addAuthor (ki18n("Charles Samuels"), ki18n("The Editing Commands"), "charles@kde.org");
|
||||
aboutData.addAuthor (ki18n("Matt Newell"), ki18n("Testing, ..."), "newellm@proaxis.com");
|
||||
aboutData.addAuthor (ki18n("Michael Bartl"), ki18n("Former Core Developer"), "michael.bartl1@chello.at");
|
||||
aboutData.addAuthor (ki18n("Michael McCallum"), ki18n("Core Developer"), "gholam@xtra.co.nz");
|
||||
aboutData.addAuthor (ki18n("Jochen Wilhemly"), ki18n( "KWrite Author" ), "digisnap@cs.tu-berlin.de" );
|
||||
aboutData.addAuthor (ki18n("Michael Koch"),ki18n("KWrite port to KParts"), "koch@kde.org");
|
||||
aboutData.addAuthor (ki18n("Christian Gebauer"), KLocalizedString(), "gebauer@kde.org" );
|
||||
aboutData.addAuthor (ki18n("Simon Hausmann"), KLocalizedString(), "hausmann@kde.org" );
|
||||
aboutData.addAuthor (ki18n("Glen Parker"),ki18n("KWrite Undo History, Kspell integration"), "glenebob@nwlink.com");
|
||||
aboutData.addAuthor (ki18n("Scott Manson"),ki18n("KWrite XML Syntax highlighting support"), "sdmanson@alltel.net");
|
||||
aboutData.addAuthor (ki18n("John Firebaugh"),ki18n("Patches and more"), "jfirebaugh@kde.org");
|
||||
|
||||
aboutData.addCredit ("Matteo Merli",I18N_NOOP("Highlighting for RPM Spec-Files, Perl, Diff and more"), "merlim@libero.it");
|
||||
aboutData.addCredit ("Rocky Scaletta",I18N_NOOP("Highlighting for VHDL"), "rocky@purdue.edu");
|
||||
aboutData.addCredit ("Yury Lebedev",I18N_NOOP("Highlighting for SQL"),"");
|
||||
aboutData.addCredit ("Chris Ross",I18N_NOOP("Highlighting for Ferite"),"");
|
||||
aboutData.addCredit ("Nick Roux",I18N_NOOP("Highlighting for ILERPG"),"");
|
||||
aboutData.addCredit ("Carsten Niehaus", I18N_NOOP("Highlighting for LaTeX"),"");
|
||||
aboutData.addCredit ("Per Wigren", I18N_NOOP("Highlighting for Makefiles, Python"),"");
|
||||
aboutData.addCredit ("Jan Fritz", I18N_NOOP("Highlighting for Python"),"");
|
||||
aboutData.addCredit ("Daniel Naber","","");
|
||||
aboutData.addCredit ("Roland Pabel",I18N_NOOP("Highlighting for Scheme"),"");
|
||||
aboutData.addCredit ("Cristi Dumitrescu",I18N_NOOP("PHP Keyword/Datatype list"),"");
|
||||
aboutData.addCredit ("Carsten Pfeiffer", I18N_NOOP("Very nice help"), "");
|
||||
aboutData.addCredit (I18N_NOOP("All people who have contributed and I have forgotten to mention"),"","");
|
||||
aboutData.addCredit (ki18n("Matteo Merli"),ki18n("Highlighting for RPM Spec-Files, Perl, Diff and more"), "merlim@libero.it");
|
||||
aboutData.addCredit (ki18n("Rocky Scaletta"),ki18n("Highlighting for VHDL"), "rocky@purdue.edu");
|
||||
aboutData.addCredit (ki18n("Yury Lebedev"),ki18n("Highlighting for SQL"));
|
||||
aboutData.addCredit (ki18n("Chris Ross"),ki18n("Highlighting for Ferite"));
|
||||
aboutData.addCredit (ki18n("Nick Roux"),ki18n("Highlighting for ILERPG"));
|
||||
aboutData.addCredit (ki18n("Carsten Niehaus"), ki18n("Highlighting for LaTeX"));
|
||||
aboutData.addCredit (ki18n("Per Wigren"), ki18n("Highlighting for Makefiles, Python"));
|
||||
aboutData.addCredit (ki18n("Jan Fritz"), ki18n("Highlighting for Python"));
|
||||
aboutData.addCredit (ki18n("Daniel Naber"));
|
||||
aboutData.addCredit (ki18n("Roland Pabel"),ki18n("Highlighting for Scheme"));
|
||||
aboutData.addCredit (ki18n("Cristi Dumitrescu"),ki18n("PHP Keyword/Datatype list"));
|
||||
aboutData.addCredit (ki18n("Carsten Pfeiffer"), ki18n("Very nice help"));
|
||||
aboutData.addCredit (ki18n("All people who have contributed and I have forgotten to mention"));
|
||||
|
||||
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("stdin", ki18n("Read the contents of stdin"));
|
||||
options.add("encoding <argument>", ki18n("Set encoding for the file to open"));
|
||||
options.add("line <argument>", ki18n("Navigate to this line"));
|
||||
options.add("column <argument>", ki18n("Navigate to this column"));
|
||||
options.add("+[URL]", ki18n("Document to open"));
|
||||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
|
||||
KApplication a;
|
||||
|
@ -697,7 +692,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
|
|||
bool nav = false;
|
||||
int line = 0, column = 0;
|
||||
|
||||
QTextCodec *codec = args->isSet("encoding") ? QTextCodec::codecForName(args->getOption("encoding")) : 0;
|
||||
QTextCodec *codec = args->isSet("encoding") ? QTextCodec::codecForName(args->getOption("encoding").toLocal8Bit()) : 0;
|
||||
|
||||
if (args->isSet ("line"))
|
||||
{
|
||||
|
|
|
@ -164,7 +164,7 @@ const KComponentData &PluginFactory::componentData()
|
|||
|
||||
KAboutData *PluginFactory::aboutData()
|
||||
{
|
||||
KAboutData *about = new KAboutData("plugin", I18N_NOOP("plugin"), "1.99");
|
||||
KAboutData *about = new KAboutData("plugin", 0, ki18n("plugin"), "1.99");
|
||||
return about;
|
||||
}
|
||||
|
||||
|
|
|
@ -537,21 +537,17 @@ void sigChildHandler(int)
|
|||
errno = saved_errno;
|
||||
}
|
||||
|
||||
static KCmdLineOptions options[] =
|
||||
{
|
||||
{ "verbose", I18N_NOOP("Show progress output for GUI"), 0 },
|
||||
KCmdLineLastOption
|
||||
};
|
||||
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
KAboutData aboutData( "nspluginscan", I18N_NOOP("nspluginscan"),
|
||||
"0.3", "nspluginscan", KAboutData::License_GPL,
|
||||
"(c) 2000,2001 by Stefan Schimanski" );
|
||||
KAboutData aboutData( "nspluginscan", "nsplugin", ki18n("nspluginscan"),
|
||||
"0.3", ki18n("nspluginscan"), KAboutData::License_GPL,
|
||||
ki18n("(c) 2000,2001 by Stefan Schimanski") );
|
||||
|
||||
KLocale::setMainCatalog("nsplugin");
|
||||
KCmdLineArgs::init( argc, argv, &aboutData );
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("verbose", ki18n("Show progress output for GUI"));
|
||||
KCmdLineArgs::addCmdLineOptions( options );
|
||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
kDebug() << "main" << endl;
|
||||
setvbuf( stderr, NULL, _IONBF, 0 );
|
||||
KCmdLineArgs::init(argc, argv, "nsplugin", "testnsplugin", "A Netscape Plugin test program", "0.1");
|
||||
KCmdLineArgs::init(argc, argv, "nsplugin", 0, ki18n("testnsplugin"), "0.1", ki18n("A Netscape Plugin test program"));
|
||||
|
||||
KApplication app("nsplugin");
|
||||
|
||||
|
|
|
@ -118,11 +118,10 @@ int main(int argc, char** argv)
|
|||
#endif
|
||||
// QXtEventLoop integrator( "nspluginviewer" );
|
||||
parseCommandLine(argc, argv);
|
||||
KLocale::setMainCatalog("nsplugin");
|
||||
|
||||
kDebug(1430) << "4 - create KApplication" << endl;
|
||||
|
||||
KCmdLineArgs::init(argc, argv, "nspluginviewer", "nspluginviewer", "", "");
|
||||
KCmdLineArgs::init(argc, argv, "nspluginviewer", "nsplugin", ki18n("nspluginviewer"), "");
|
||||
KApplication app;
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue