diff --git a/ChangeLog b/ChangeLog index e2ffa318..6c5e7739 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15028,3 +15028,6 @@ * Fixed a regression in 'rdlibrary/audio_cart.cpp' that caused information to be corrupted in the cut list after editing a cut's dayparting information. +2016-03-25 Fred Gleason + * Added a 'Show Only Recent Logs' checkbox in 'rdlogedit/rdlogedit.cpp' + and 'rdlogedit/rdlogedit.h'. diff --git a/lib/rd.h b/lib/rd.h index cb308164..4097db0c 100644 --- a/lib/rd.h +++ b/lib/rd.h @@ -561,6 +561,11 @@ #define RDCARTSLOTS_MAX_ROWS 16 #define RDCARTSLOTS_MAX_COLUMNS 4 +/* + * RDLogEdit Log Listing Limit Quantity + */ +#define RDLOGEDIT_LIMIT_QUAN 14 + /* * Custom MIME Types (for Drag and Drop) */ diff --git a/rdlogedit/edit_log.cpp b/rdlogedit/edit_log.cpp index fcf08759..5313f498 100644 --- a/rdlogedit/edit_log.cpp +++ b/rdlogedit/edit_log.cpp @@ -2,9 +2,7 @@ // // Edit a Rivendell Log // -// (C) Copyright 2002-2008 Fred Gleason -// -// $Id: edit_log.cpp,v 1.91.6.10.2.2 2014/05/22 16:12:54 cvs Exp $ +// (C) Copyright 2002-2016 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/rdlogedit/edit_log.h b/rdlogedit/edit_log.h index 893e49a3..a9a2fd2f 100644 --- a/rdlogedit/edit_log.h +++ b/rdlogedit/edit_log.h @@ -2,9 +2,7 @@ // // Create a Rivendell Log // -// (C) Copyright 2002-2004 Fred Gleason -// -// $Id: edit_log.h,v 1.36.8.2 2014/02/20 16:33:55 cvs Exp $ +// (C) Copyright 2002-2016 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as diff --git a/rdlogedit/rdlogedit.cpp b/rdlogedit/rdlogedit.cpp index c0dcc2a3..7921d8c1 100644 --- a/rdlogedit/rdlogedit.cpp +++ b/rdlogedit/rdlogedit.cpp @@ -288,6 +288,15 @@ MainWidget::MainWidget(QWidget *parent,const char *name,WFlags f) log_filter_button->setFont(button_font); connect(log_filter_button,SIGNAL(clicked()),this,SLOT(filterClearedData())); + // + // Show Recent Checkbox + // + log_recent_check=new QCheckBox(this); + connect(log_recent_check,SIGNAL(toggled(bool)),this,SLOT(recentData(bool))); + log_recent_label= + new QLabel(log_recent_check,tr("Show Only Recent Logs"),this); + log_recent_label->setFont(button_font); + // // Log List // @@ -433,6 +442,12 @@ void MainWidget::userData() } +void MainWidget::recentData(bool state) +{ + RefreshList(); +} + + void MainWidget::addData() { QString logname; @@ -730,7 +745,9 @@ void MainWidget::resizeEvent(QResizeEvent *e) log_filter_label->setGeometry(230,10,50,20); log_filter_edit->setGeometry(285,10,size().width()-360,20); log_filter_button->setGeometry(size().width()-60,8,50,25); - log_log_list->setGeometry(10,37,size().width()-20,size().height()-107); + log_recent_check->setGeometry(285,35,15,15); + log_recent_label->setGeometry(305,33,200,20); + log_log_list->setGeometry(10,57,size().width()-20,size().height()-127); log_add_button->setGeometry(10,size().height()-55,80,50); log_edit_button->setGeometry(100,size().height()-55,80,50); log_delete_button->setGeometry(190,size().height()-55,80,50); @@ -832,6 +849,10 @@ void MainWidget::RefreshList() sql+="(DESCRIPTION like \"%%"+RDEscapeString(filter)+"%%\")||"; sql+="(SERVICE like \"%%"+RDEscapeString(filter)+"%%\"))"; } + if(log_recent_check->isChecked()) { + sql+=QString().sprintf("order by ORIGIN_DATETIME desc limit %d", + RDLOGEDIT_LIMIT_QUAN); + } if (rdstation_conf->broadcastSecurity() == RDStation::UserSec && rduser != NULL) { diff --git a/rdlogedit/rdlogedit.h b/rdlogedit/rdlogedit.h index 9a726ede..623c49b6 100644 --- a/rdlogedit/rdlogedit.h +++ b/rdlogedit/rdlogedit.h @@ -2,9 +2,7 @@ // // The Log Editor Utility for Rivendell. // -// (C) Copyright 2002-2003 Fred Gleason -// -// $Id: rdlogedit.h,v 1.28.4.1 2014/01/08 23:32:50 cvs Exp $ +// (C) Copyright 2002-2016 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -30,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +55,7 @@ class MainWidget : public QMainWindow private slots: void connectedData(bool state); void userData(); + void recentData(bool state); void addData(); void editData(); void deleteData(); @@ -83,6 +83,8 @@ class MainWidget : public QMainWindow QLabel *log_filter_label; QLineEdit *log_filter_edit; QPushButton *log_filter_button; + QCheckBox *log_recent_check; + QLabel *log_recent_label; QListView *log_log_list; std::vector log_clipboard; QPushButton *log_add_button; diff --git a/rdlogedit/rdlogedit_cs.ts b/rdlogedit/rdlogedit_cs.ts index 0541c724..de3e5d02 100644 --- a/rdlogedit/rdlogedit_cs.ts +++ b/rdlogedit/rdlogedit_cs.ts @@ -875,6 +875,10 @@ Vyhledejte svého správce systému kvůli aktualizaci! Clear + + Show Only Recent Logs + + VoiceTracker diff --git a/rdlogedit/rdlogedit_de.ts b/rdlogedit/rdlogedit_de.ts index cfa38cb7..b7f18ca1 100644 --- a/rdlogedit/rdlogedit_de.ts +++ b/rdlogedit/rdlogedit_de.ts @@ -874,6 +874,10 @@ See your system administrator for an update! Clear + + Show Only Recent Logs + + VoiceTracker diff --git a/rdlogedit/rdlogedit_es.ts b/rdlogedit/rdlogedit_es.ts index 20d92dfe..9a41b877 100644 --- a/rdlogedit/rdlogedit_es.ts +++ b/rdlogedit/rdlogedit_es.ts @@ -875,6 +875,10 @@ See your system administrator for an update! Clear + + Show Only Recent Logs + + VoiceTracker diff --git a/rdlogedit/rdlogedit_fr.ts b/rdlogedit/rdlogedit_fr.ts index f2ad1b4f..bc6f3bd1 100644 --- a/rdlogedit/rdlogedit_fr.ts +++ b/rdlogedit/rdlogedit_fr.ts @@ -852,6 +852,10 @@ See your system administrator for an update! Clear + + Show Only Recent Logs + + VoiceTracker diff --git a/rdlogedit/rdlogedit_nb.ts b/rdlogedit/rdlogedit_nb.ts index 8b635ec7..4f6652f1 100644 --- a/rdlogedit/rdlogedit_nb.ts +++ b/rdlogedit/rdlogedit_nb.ts @@ -896,6 +896,10 @@ See your system administrator for an update! Clear + + Show Only Recent Logs + + VoiceTracker diff --git a/rdlogedit/rdlogedit_nn.ts b/rdlogedit/rdlogedit_nn.ts index 8b635ec7..4f6652f1 100644 --- a/rdlogedit/rdlogedit_nn.ts +++ b/rdlogedit/rdlogedit_nn.ts @@ -896,6 +896,10 @@ See your system administrator for an update! Clear + + Show Only Recent Logs + + VoiceTracker diff --git a/rdlogedit/rdlogedit_pt_BR.ts b/rdlogedit/rdlogedit_pt_BR.ts index f888d982..36c15f36 100644 --- a/rdlogedit/rdlogedit_pt_BR.ts +++ b/rdlogedit/rdlogedit_pt_BR.ts @@ -875,6 +875,10 @@ See your system administrator for an update! Clear + + Show Only Recent Logs + + VoiceTracker