2016-07-22 Fred Gleason <fredg@paravelsystems.com>

* Renamed the '--script' option in rdclilogedit(1) to be '-n' or
	'--quiet' or '--silent'.
This commit is contained in:
Fred Gleason
2016-07-22 13:13:35 -04:00
parent 797b6e5849
commit f92e2ea142
4 changed files with 11 additions and 7 deletions

View File

@@ -38,7 +38,7 @@
MainObject::MainObject(QObject *parent)
:QObject(parent)
{
edit_script_option=false;
edit_quiet_option=false;
edit_log=NULL;
edit_log_event=NULL;
@@ -51,8 +51,9 @@ MainObject::MainObject(QObject *parent)
RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdclilogedit",
RDCLILOGEDIT_USAGE);
for(int i=0;i<(int)cmd->keys();i++) {
if(cmd->key(i)=="--script") {
edit_script_option=true;
if((cmd->key(i)=="-n")||(cmd->key(i)=="--quiet")||
(cmd->key(i)=="--silent")) {
edit_quiet_option=true;
}
}
@@ -131,7 +132,7 @@ void MainObject::userData()
}
}
}
if(!edit_script_option) {
if(!edit_quiet_option) {
printf("\n");
}
exit(0);
@@ -147,7 +148,7 @@ void MainObject::OverwriteError(const QString &cmd) const
void MainObject::PrintPrompt() const
{
if(!edit_script_option) {
if(!edit_quiet_option) {
if(edit_log==NULL) {
printf("logedit> ");
}

View File

@@ -74,7 +74,7 @@ class MainObject : public QObject
void DispatchCommand(QString cmd);
QString ListLine(RDLogEvent *evt,int line) const;
void PrintPrompt() const;
bool edit_script_option;
bool edit_quiet_option;
QString edit_accum;
bool edit_modified;
bool edit_new_log;