mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-17 14:11:14 +01:00
2016-07-21 Fred Gleason <fredg@paravelsystems.com>
* Added a '--script' option to rdclilogedit(1).
This commit is contained in:
@@ -15369,3 +15369,5 @@
|
|||||||
* Added a 'setpurgedate' command to rdclilogedit(1).
|
* Added a 'setpurgedate' command to rdclilogedit(1).
|
||||||
* Added a 'setservice' command to rdclilogedit(1).
|
* Added a 'setservice' command to rdclilogedit(1).
|
||||||
* Added a 'setstartdate' command to rdclilogedit(1).
|
* Added a 'setstartdate' command to rdclilogedit(1).
|
||||||
|
2016-07-21 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a '--script' option to rdclilogedit(1).
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
MainObject::MainObject(QObject *parent)
|
MainObject::MainObject(QObject *parent)
|
||||||
:QObject(parent)
|
:QObject(parent)
|
||||||
{
|
{
|
||||||
|
edit_script_option=false;
|
||||||
|
|
||||||
edit_log=NULL;
|
edit_log=NULL;
|
||||||
edit_log_event=NULL;
|
edit_log_event=NULL;
|
||||||
edit_modified=false;
|
edit_modified=false;
|
||||||
@@ -45,9 +47,12 @@ MainObject::MainObject(QObject *parent)
|
|||||||
//
|
//
|
||||||
// Read Command Options
|
// Read Command Options
|
||||||
//
|
//
|
||||||
RDCmdSwitch *cmd=
|
RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdclilogedit",
|
||||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdimport",RDCLILOGEDIT_USAGE);
|
RDCLILOGEDIT_USAGE);
|
||||||
for(int i=0;i<(int)cmd->keys()-1;i++) {
|
for(int i=0;i<(int)cmd->keys();i++) {
|
||||||
|
if(cmd->key(i)=="--script") {
|
||||||
|
edit_script_option=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -123,7 +128,9 @@ void MainObject::userData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("\n");
|
if(!edit_script_option) {
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,18 +144,20 @@ void MainObject::OverwriteError(const QString &cmd) const
|
|||||||
|
|
||||||
void MainObject::PrintPrompt() const
|
void MainObject::PrintPrompt() const
|
||||||
{
|
{
|
||||||
if(edit_log==NULL) {
|
if(!edit_script_option) {
|
||||||
printf("logedit> ");
|
if(edit_log==NULL) {
|
||||||
}
|
printf("logedit> ");
|
||||||
else {
|
|
||||||
if(edit_modified) {
|
|
||||||
printf("logedit[%s*]> ",(const char *)edit_log->name());
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("logedit[%s]> ",(const char *)edit_log->name());
|
if(edit_modified) {
|
||||||
|
printf("logedit[%s*]> ",(const char *)edit_log->name());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
printf("logedit[%s]> ",(const char *)edit_log->name());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ class MainObject : public QObject
|
|||||||
void DispatchCommand(QString cmd);
|
void DispatchCommand(QString cmd);
|
||||||
QString ListLine(RDLogEvent *evt,int line) const;
|
QString ListLine(RDLogEvent *evt,int line) const;
|
||||||
void PrintPrompt() const;
|
void PrintPrompt() const;
|
||||||
|
bool edit_script_option;
|
||||||
QString edit_accum;
|
QString edit_accum;
|
||||||
bool edit_modified;
|
bool edit_modified;
|
||||||
bool edit_new_log;
|
bool edit_new_log;
|
||||||
|
|||||||
Reference in New Issue
Block a user