diff --git a/TODO b/TODO index 9924c05..4a0791f 100644 --- a/TODO +++ b/TODO @@ -21,8 +21,6 @@ Random plans and ideas for 1.1 and beyond: * let the user specify extern command locations and options in the settings -* let the user specify in the options which log levels to show in the global log - * write a setup-kcm in the style of k3b's so that the user can set the r/w permissions of the disks there; also use kauth to update the partition table in the kernel. that should cover all cases where we actually need root diff --git a/src/config.kcfg b/src/config.kcfg index 319748b..7332ff6 100644 --- a/src/config.kcfg +++ b/src/config.kcfg @@ -25,6 +25,9 @@ true + + 0 + 2048 diff --git a/src/gui/configurepagegeneral.ui b/src/gui/configurepagegeneral.ui index 3b14eb5..571e309 100644 --- a/src/gui/configurepagegeneral.ui +++ b/src/gui/configurepagegeneral.ui @@ -7,14 +7,14 @@ 0 0 459 - 361 + 575 Form - - + + @@ -42,7 +42,7 @@ - + @@ -90,6 +90,55 @@ + + + + + 0 + 1 + + + + Logging + + + + + + Hide Messages Below: + + + kcfg_minLogLevel + + + + + + + + Debug + + + + + Information + + + + + Warning + + + + + Error + + + + + + + diff --git a/src/gui/treelog.cpp b/src/gui/treelog.cpp index aede25d..cdefb67 100644 --- a/src/gui/treelog.cpp +++ b/src/gui/treelog.cpp @@ -161,12 +161,15 @@ void TreeLog::onNewLogMessage(Log::Level logLevel, const QString& s) kDebug() << s; - QTreeWidgetItem* item = new QTreeWidgetItem(); + if (logLevel >= Config::minLogLevel()) + { + QTreeWidgetItem* item = new QTreeWidgetItem(); - item->setIcon(0, SmallIcon(icons[logLevel])); - item->setText(1, QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); - item->setText(2, s); + item->setIcon(0, SmallIcon(icons[logLevel])); + item->setText(1, QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); + item->setText(2, s); - treeLog().addTopLevelItem(item); - treeLog().scrollToBottom(); + treeLog().addTopLevelItem(item); + treeLog().scrollToBottom(); + } }