diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 511ef3a0..9c6c7080 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -1,17 +1,17 @@
-name: "CI: Lint"
+# name: "CI: Lint"
-on: [push, pull_request]
+# on: [push, pull_request]
-jobs:
- lint:
+# jobs:
+# lint:
- runs-on: ubuntu-latest
+# runs-on: ubuntu-latest
- container:
- image: valalang/lint
+# container:
+# image: valalang/lint
- steps:
- - uses: actions/checkout@v1
- - name: Lint
- run: io.elementary.vala-lint -d .
\ No newline at end of file
+# steps:
+# - uses: actions/checkout@v1
+# - name: Lint
+# run: io.elementary.vala-lint -d .
\ No newline at end of file
diff --git a/data/com.github.stsdc.monitor.appdata.xml.in b/data/com.github.stsdc.monitor.appdata.xml.in
index 61c0c352..e296017a 100644
--- a/data/com.github.stsdc.monitor.appdata.xml.in
+++ b/data/com.github.stsdc.monitor.appdata.xml.in
@@ -28,6 +28,16 @@
https://github.com/stsdc/monitor/issues
+
+
+
+ - 🐛 Try to fix frequent GUI hangs 🥶
+ - 🇳🇱 Update Dutch translation (@Vistaus)
+ - 🇵🇹 Update Portuguese translation (@hugok79)
+ - 🇷🇴 Add Romanian translation (@tiberiufrat)
+
+
+
diff --git a/data/com.github.stsdc.monitor.gschema.xml b/data/com.github.stsdc.monitor.gschema.xml
index 90fc778d..e7a9bf71 100644
--- a/data/com.github.stsdc.monitor.gschema.xml
+++ b/data/com.github.stsdc.monitor.gschema.xml
@@ -40,6 +40,31 @@
To start Monitor in background or not
To start Monitor in background or not
+
+ false
+ To show CPU usage in Monitor Indicator or not
+ To show CPU usage in Monitor Indicator or not
+
+
+ false
+ To show memory usage in Monitor Indicator or not
+ To show memory usage in Monitor Indicator or not
+
+
+ false
+ To show temperature value in Monitor Indicator or not
+ To show temperature value in Monitor Indicator or not
+
+
+ false
+ To show network up bandwith data in Monitor Indicator or not
+ To show network up bandwith in Monitor Indicator or not
+
+
+ false
+ To show network down bandwith in Monitor Indicator or not
+ To show network down bandwith in Monitor Indicator or not
+
'process_view'
Opened view
diff --git a/meson.build b/meson.build
index c60fd15b..ea8c4828 100644
--- a/meson.build
+++ b/meson.build
@@ -144,6 +144,7 @@ shared_module(
'src/Indicator/Widgets/PopoverWidget.vala',
'src/Indicator/Widgets/IndicatorWidget.vala',
'src/Indicator/Widgets/TemperatureWidget.vala',
+ 'src/Indicator/Widgets/NetworkWidget.vala',
'src/Indicator/Services/DBusClient.vala',
# 'src/Widgets/RevealerSwitch.vala',
diff --git a/po/LINGUAS b/po/LINGUAS
index 591730cc..7fa9c498 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1 +1 @@
-de es fr it ja lt nl pl pt ru tr uk
+de es fr it ja lt nl pl pt ru tr uk ro
diff --git a/po/extra/LINGUAS b/po/extra/LINGUAS
index 4bf78248..0bf70ee9 100644
--- a/po/extra/LINGUAS
+++ b/po/extra/LINGUAS
@@ -1 +1 @@
-de es fr ja lt nl pl pt ru uk
+de es fr ja lt nl pl pt ru uk ro
diff --git a/po/extra/pt.po b/po/extra/pt.po
index 817962aa..a88aaa69 100644
--- a/po/extra/pt.po
+++ b/po/extra/pt.po
@@ -2,21 +2,22 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the extra package.
# FIRST AUTHOR , YEAR.
+# Hugo Carvalho , 2019, 2020, 2021.
#
msgid ""
msgstr ""
"Project-Id-Version: extra\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-20 22:25+0900\n"
-"PO-Revision-Date: 2020-10-15 18:34+0100\n"
+"PO-Revision-Date: 2021-01-11 21:29+0000\n"
+"Last-Translator: Hugo Carvalho \n"
"Language-Team: \n"
+"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
-"Last-Translator: Hugo Carvalho \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"Language: pt\n"
#: data/com.github.stsdc.monitor.appdata.xml.in:7
#: data/com.github.stsdc.monitor.desktop.in:3
@@ -37,7 +38,7 @@ msgstr "Stanisław Dac"
#: data/com.github.stsdc.monitor.desktop.in:4
msgid "System Monitor"
-msgstr "Monitor do sistema"
+msgstr "Monitor do Sistema"
#: data/com.github.stsdc.monitor.desktop.in:6
msgid "Manage processes and monitor resource usage of the system"
@@ -49,4 +50,4 @@ msgstr "com.github.stsdc.monitor"
#: data/com.github.stsdc.monitor.desktop.in:14
msgid "System monitor;System usage;Task manager;"
-msgstr "Monitor do sistema;Utilização do sistema;Gestor de tarefas;"
+msgstr "Monitor do Sistema;Utilização do Sistema;Gestor de Tarefas;"
diff --git a/po/extra/ro.po b/po/extra/ro.po
new file mode 100644
index 00000000..d4b566d9
--- /dev/null
+++ b/po/extra/ro.po
@@ -0,0 +1,52 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the extra package.
+# Tiberiu Frățilă , 2020.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: extra\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-10-20 22:25+0900\n"
+"PO-Revision-Date: 2020-12-16 09:58+0200\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.6\n"
+"Last-Translator: \n"
+"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
+"Language: ro_RO\n"
+
+#: data/com.github.stsdc.monitor.appdata.xml.in:7
+#: data/com.github.stsdc.monitor.desktop.in:3
+msgid "Monitor"
+msgstr "Monitor"
+
+#: data/com.github.stsdc.monitor.appdata.xml.in:8
+msgid "Manage processes and monitor system resources"
+msgstr "Gestionează procesele și monitorizează resursele de sistem"
+
+#: data/com.github.stsdc.monitor.appdata.xml.in:10
+msgid "Display usage of system resources, filter and manage processes."
+msgstr "Afișează gradul de utilizare a resurselor de sistem, filtrează și gestionează procesele."
+
+#: data/com.github.stsdc.monitor.appdata.xml.in:22
+msgid "Stanisław Dac"
+msgstr "Stanisław Dac"
+
+#: data/com.github.stsdc.monitor.desktop.in:4
+msgid "System Monitor"
+msgstr "Monitor de sistem"
+
+#: data/com.github.stsdc.monitor.desktop.in:6
+msgid "Manage processes and monitor resource usage of the system"
+msgstr "Gestionează procesele și monitorizează resursele de sistem"
+
+#: data/com.github.stsdc.monitor.desktop.in:10
+msgid "com.github.stsdc.monitor"
+msgstr "com.github.stsdc.monitor"
+
+#: data/com.github.stsdc.monitor.desktop.in:14
+msgid "System monitor;System usage;Task manager;"
+msgstr "System monitor;System usage;Task manager;Monitor de sistem;Manager de activități;Procese;Utilizarea sistemului;"
diff --git a/po/nl.po b/po/nl.po
index 587d867e..bd454b9d 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -3,24 +3,22 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-25 22:12+0400\n"
-"PO-Revision-Date: 2020-08-22 19:23+0200\n"
+"PO-Revision-Date: 2020-12-14 13:52+0100\n"
"Last-Translator: Heimen Stoffels \n"
"Language-Team: \n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.4.1\n"
+"X-Generator: Poedit 2.4.2\n"
#: src/MainWindow.vala:34
-#, fuzzy
msgid "Processes"
-msgstr "Procesnaam"
+msgstr "Processen"
#: src/MainWindow.vala:35
-#, fuzzy
msgid "System"
-msgstr "Systeemaanroepen"
+msgstr "Systeem"
#: src/Utils.vala:2
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32
@@ -97,32 +95,31 @@ msgstr "THR"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110
msgid "The app is waiting in an uninterruptible disk sleep"
-msgstr ""
+msgstr "De toepassing wacht op een ononderbreekbare slaapstand"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112
msgid "Idle kernel thread"
-msgstr ""
+msgstr "Inactieve kernel-thread"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114
msgid "The process is running or runnable (on run queue)"
-msgstr ""
+msgstr "Het proces is actief of activeerbaar (in de wachtrij)"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116
-msgid ""
-"The process is in an interruptible sleep; waiting for an event to complete"
-msgstr ""
+msgid "The process is in an interruptible sleep; waiting for an event to complete"
+msgstr "Het proces bevindt zich in een ononderbreekbare slaapstand, wachtend op afronding van een handeling"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118
msgid "The process is stopped by a job control signal"
-msgstr ""
+msgstr "Het proces is afgebroken door een taaksignaal"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120
msgid "The process is stopped stopped by a debugger during the tracing"
-msgstr ""
+msgstr "Het proces is afgebroken door een foutopsporingstoepassing"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122
msgid "The app is terminated but not reaped by its parent"
-msgstr ""
+msgstr "De toepassing is gedwongen afgesloten, maar niet door het bovenliggende proces"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18
msgid "Opened files"
@@ -197,33 +194,33 @@ msgstr "RAM: %.1f%%"
#: src/Views/SystemView/SystemCPUView.vala:32
#: src/Views/SystemView/SystemMemoryView.vala:28
msgid "UTILIZATION"
-msgstr ""
+msgstr "GEBRUIK"
#: src/Views/SystemView/SystemCPUView.vala:34
#: src/Views/SystemView/SystemCPUView.vala:94
#: src/Views/SystemView/SystemMemoryView.vala:30
#: src/Views/SystemView/SystemMemoryView.vala:35
msgid "Show detailed info"
-msgstr ""
+msgstr "Uitgebreide informatie tonen"
#: src/Views/SystemView/SystemCPUView.vala:36
msgid "FREQUENCY"
-msgstr ""
+msgstr "FREQUENTIE"
#: src/Views/SystemView/SystemCPUView.vala:40
msgid "TEMPERATURE"
-msgstr ""
+msgstr "TEMPERATUUR"
#: src/Views/SystemView/SystemCPUView.vala:96
#: src/Views/SystemView/SystemMemoryView.vala:37
msgid "Hide detailed info"
-msgstr ""
+msgstr "Uitgebreide informatie verbergen"
#: src/Views/SystemView/SystemCPUView.vala:152
#: src/Views/SystemView/SystemMemoryView.vala:100
#, c-format
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: src/Views/SystemView/SystemCPUView.vala:153
#: src/Widgets/Statusbar/Statusbar.vala:44
@@ -232,61 +229,61 @@ msgstr "GHz"
#: src/Views/SystemView/SystemCPUView.vala:154
msgid "℃"
-msgstr ""
+msgstr "℃"
#: src/Views/SystemView/SystemMemoryView.vala:41
msgid "Total: "
-msgstr ""
+msgstr "Totaal: "
#: src/Views/SystemView/SystemMemoryView.vala:44
msgid "Used: "
-msgstr ""
+msgstr "Gebruikt: "
#: src/Views/SystemView/SystemMemoryView.vala:47
msgid "Shared: "
-msgstr ""
+msgstr "Gedeeld: "
#: src/Views/SystemView/SystemMemoryView.vala:50
msgid "Buffered: "
-msgstr ""
+msgstr "Gebufferd: "
#: src/Views/SystemView/SystemMemoryView.vala:53
msgid "Cached: "
-msgstr ""
+msgstr "Gecachet: "
#: src/Views/SystemView/SystemMemoryView.vala:56
msgid "Locked: "
-msgstr ""
+msgstr "Vergrendeld: "
#: src/Views/SystemView/SystemMemoryView.vala:103
#, c-format
msgid "Total: %s"
-msgstr ""
+msgstr "Totaal: %s"
#: src/Views/SystemView/SystemMemoryView.vala:104
#, c-format
msgid "Used: %s"
-msgstr ""
+msgstr "Gebruikt: %s"
#: src/Views/SystemView/SystemMemoryView.vala:105
#, c-format
msgid "Shared: %s"
-msgstr ""
+msgstr "Gedeeld: %s"
#: src/Views/SystemView/SystemMemoryView.vala:106
#, c-format
msgid "Buffered: %s"
-msgstr ""
+msgstr "Gebufferd: %s"
#: src/Views/SystemView/SystemMemoryView.vala:107
#, c-format
msgid "Cached: %s"
-msgstr ""
+msgstr "Gecachet: %s"
#: src/Views/SystemView/SystemMemoryView.vala:108
#, c-format
msgid "Locked: %s"
-msgstr ""
+msgstr "Vergrendeld: %s"
#: src/Widgets/Headerbar/Headerbar.vala:13
msgid "Monitor"
@@ -310,7 +307,7 @@ msgstr "Zoeken naar proces"
#: src/Widgets/Headerbar/Search.vala:15
msgid "Type process name or PID to search"
-msgstr "Voer de procesnaam of PID in"
+msgstr "Voer de procesnaam of pid in"
#: src/Widgets/Statusbar/Statusbar.vala:14
msgid "Swap"
diff --git a/po/pt.po b/po/pt.po
index 5e3b55d2..94c1c01f 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -2,14 +2,14 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR , YEAR.
-# Raí B. Toffoletto , 2019.
+# Hugo Carvalho , 2019, 2020, 2021.
#
msgid ""
msgstr ""
-"Project-Id-Version: \n"
+"Project-Id-Version: Monitor\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-04-28 22:18+0400\n"
-"PO-Revision-Date: 2020-10-15 18:36+0100\n"
+"POT-Creation-Date: 2020-09-25 22:12+0400\n"
+"PO-Revision-Date: 2021-01-11 21:25+0000\n"
"Last-Translator: Hugo Carvalho \n"
"Language-Team: \n"
"Language: pt\n"
@@ -20,14 +20,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/MainWindow.vala:34
-#, fuzzy
msgid "Processes"
-msgstr "Nome do processo"
+msgstr "Processos"
#: src/MainWindow.vala:35
-#, fuzzy
msgid "System"
-msgstr "Chamadas de sistema"
+msgstr "Sistema"
#: src/Utils.vala:2
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32
@@ -75,7 +73,7 @@ msgstr "Eliminado"
#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20
msgid "Are you sure you want to do this?"
-msgstr "Tem a certeza que quer fazer isso?"
+msgstr "Tem a certeza que deseja fazer isto?"
#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23
msgid "Yes"
@@ -104,32 +102,31 @@ msgstr "THR"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110
msgid "The app is waiting in an uninterruptible disk sleep"
-msgstr ""
+msgstr "A aplicação está à espera num modo de suspensão de disco ininterrupto"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112
msgid "Idle kernel thread"
-msgstr ""
+msgstr "Fio de execução de kernel inativo"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114
msgid "The process is running or runnable (on run queue)"
-msgstr ""
+msgstr "O processo está em execução ou pode ser executado (na fila de execução)"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116
-msgid ""
-"The process is in an interruptible sleep; waiting for an event to complete"
-msgstr ""
+msgid "The process is in an interruptible sleep; waiting for an event to complete"
+msgstr "O processo está numa suspensão interrompível; a espera da conclusão de um evento"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118
msgid "The process is stopped by a job control signal"
-msgstr ""
+msgstr "O processo é interrompido por um sinal de controlo do trabalho"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120
msgid "The process is stopped stopped by a debugger during the tracing"
-msgstr ""
+msgstr "O processo é interrompido por um depurador durante o rastreio"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122
msgid "The app is terminated but not reaped by its parent"
-msgstr ""
+msgstr "A aplicação é terminada mas não recuperada pela sua origem"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18
msgid "Opened files"
@@ -145,7 +142,7 @@ msgstr "Chamadas de sistema"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:32
msgid "Read/Written"
-msgstr "Ler/Escrita"
+msgstr "Leitura/Escrita"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:37
msgid "Cancelled write"
@@ -161,19 +158,19 @@ msgstr "Terminar processo selecionado"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79
msgid "Kill Process"
-msgstr "Matar processo"
+msgstr "Eliminar processo"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80
msgid "Kill selected process"
-msgstr "Matar processo selecionado"
+msgstr "Eliminar processo selecionado"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90
msgid "Confirm kill of the process?"
-msgstr "Confirma matar o processo?"
+msgstr "Confirma a eliminação do processo?"
#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97
msgid "Confirm end of the process?"
-msgstr "Confirma terminar o processo?"
+msgstr "Confirmar o fim do processo?"
#. setup name column
#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:17
@@ -204,33 +201,33 @@ msgstr "RAM: %.1f%%"
#: src/Views/SystemView/SystemCPUView.vala:32
#: src/Views/SystemView/SystemMemoryView.vala:28
msgid "UTILIZATION"
-msgstr ""
+msgstr "UTILIZAÇÃO"
#: src/Views/SystemView/SystemCPUView.vala:34
#: src/Views/SystemView/SystemCPUView.vala:94
#: src/Views/SystemView/SystemMemoryView.vala:30
#: src/Views/SystemView/SystemMemoryView.vala:35
msgid "Show detailed info"
-msgstr ""
+msgstr "Mostrar informação detalhada"
#: src/Views/SystemView/SystemCPUView.vala:36
msgid "FREQUENCY"
-msgstr ""
+msgstr "FREQUÊNCIA"
#: src/Views/SystemView/SystemCPUView.vala:40
msgid "TEMPERATURE"
-msgstr ""
+msgstr "TEMPERATURA"
#: src/Views/SystemView/SystemCPUView.vala:96
#: src/Views/SystemView/SystemMemoryView.vala:37
msgid "Hide detailed info"
-msgstr ""
+msgstr "Ocultar informação detalhada"
#: src/Views/SystemView/SystemCPUView.vala:152
#: src/Views/SystemView/SystemMemoryView.vala:100
#, c-format
msgid "%d%%"
-msgstr ""
+msgstr "%d%%"
#: src/Views/SystemView/SystemCPUView.vala:153
#: src/Widgets/Statusbar/Statusbar.vala:44
@@ -239,61 +236,61 @@ msgstr "GHz"
#: src/Views/SystemView/SystemCPUView.vala:154
msgid "℃"
-msgstr ""
+msgstr "℃"
#: src/Views/SystemView/SystemMemoryView.vala:41
msgid "Total: "
-msgstr ""
+msgstr "Total: "
#: src/Views/SystemView/SystemMemoryView.vala:44
msgid "Used: "
-msgstr ""
+msgstr "Utilizado: "
#: src/Views/SystemView/SystemMemoryView.vala:47
msgid "Shared: "
-msgstr ""
+msgstr "Partilhado: "
#: src/Views/SystemView/SystemMemoryView.vala:50
msgid "Buffered: "
-msgstr ""
+msgstr "Buffered: "
#: src/Views/SystemView/SystemMemoryView.vala:53
msgid "Cached: "
-msgstr ""
+msgstr "Em cache: "
#: src/Views/SystemView/SystemMemoryView.vala:56
msgid "Locked: "
-msgstr ""
+msgstr "Bloqueado: "
#: src/Views/SystemView/SystemMemoryView.vala:103
#, c-format
msgid "Total: %s"
-msgstr ""
+msgstr "Total: %s"
#: src/Views/SystemView/SystemMemoryView.vala:104
#, c-format
msgid "Used: %s"
-msgstr ""
+msgstr "Utilizado: %s"
#: src/Views/SystemView/SystemMemoryView.vala:105
#, c-format
msgid "Shared: %s"
-msgstr ""
+msgstr "Partilhado: %s"
#: src/Views/SystemView/SystemMemoryView.vala:106
#, c-format
msgid "Buffered: %s"
-msgstr ""
+msgstr "Buffered: %s"
#: src/Views/SystemView/SystemMemoryView.vala:107
#, c-format
msgid "Cached: %s"
-msgstr ""
+msgstr "Em cache: %s"
#: src/Views/SystemView/SystemMemoryView.vala:108
#, c-format
msgid "Locked: %s"
-msgstr ""
+msgstr "Bloqueado: %s"
#: src/Widgets/Headerbar/Headerbar.vala:13
msgid "Monitor"
diff --git a/po/ro.po b/po/ro.po
new file mode 100644
index 00000000..21aaf019
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,335 @@
+# French translations for com.github.stsdc.monitor package.
+# Copyright (C) 2019 THE com.github.stsdc.monitor'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the com.github.stsdc.monitor package.
+# Tiberiu Frățilă , 2020.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: com.github.stsdc.monitor\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-12-16 10:30+0200\n"
+"PO-Revision-Date: 2020-12-16 10:30+0200\n"
+"Last-Translator: Tiberiu Frățilă\n"
+"Language-Team: \n"
+"Language: ro\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
+"X-Generator: Poedit 2.0.6\n"
+
+#: src/MainWindow.vala:34
+msgid "Processes"
+msgstr "Procese"
+
+#: src/MainWindow.vala:35
+msgid "System"
+msgstr "Sistem"
+
+#: src/Utils.vala:2
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:32
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:35
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:24
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:25
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:29
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:30
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:34
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:35
+msgid "N/A"
+msgstr "N/A"
+
+#: src/Utils.vala:67
+msgid "B"
+msgstr "o"
+
+#: src/Utils.vala:72
+#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:116
+msgid "KiB"
+msgstr "Kio"
+
+#: src/Utils.vala:78
+#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:121
+msgid "MiB"
+msgstr "Mio"
+
+#: src/Utils.vala:83
+#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:127
+#: src/Widgets/Statusbar/Statusbar.vala:55
+msgid "GiB"
+msgstr "Gio"
+
+#: src/Indicator/Widgets/PopoverWidget.vala:13
+msgid "Show Monitor"
+msgstr "Arată monitorul"
+
+#: src/Indicator/Widgets/PopoverWidget.vala:16
+msgid "Quit Monitor"
+msgstr "Închide monitorul"
+
+#: src/Views/ProcessView/ProcessInfoView/OpenFilesListBox.vala:56
+msgid "Deleted"
+msgstr "Șters"
+
+#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:20
+msgid "Are you sure you want to do this?"
+msgstr "Sunteți sigur că doriți să faceți asta?"
+
+#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:23
+msgid "Yes"
+msgstr "Da"
+
+#: src/Views/ProcessView/ProcessInfoView/Preventor.vala:27
+msgid "No"
+msgstr "Nu"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:39
+#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:59
+msgid "PID"
+msgstr "PID"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:40
+msgid "NI"
+msgstr "NI"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:41
+msgid "PRI"
+msgstr "PRI"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:42
+msgid "THR"
+msgstr "THR"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:110
+msgid "The app is waiting in an uninterruptible disk sleep"
+msgstr ""
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:112
+msgid "Idle kernel thread"
+msgstr ""
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:114
+msgid "The process is running or runnable (on run queue)"
+msgstr "Procesul rulează sau poate fi rulat (în coada de rulare)"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:116
+msgid "The process is in an interruptible sleep; waiting for an event to complete"
+msgstr ""
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:118
+msgid "The process is stopped by a job control signal"
+msgstr ""
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:120
+msgid "The process is stopped stopped by a debugger during the tracing"
+msgstr ""
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala:122
+msgid "The app is terminated but not reaped by its parent"
+msgstr ""
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:18
+msgid "Opened files"
+msgstr "Fișiere deschise"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:22
+msgid "Characters"
+msgstr "Caractere"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:27
+msgid "System calls"
+msgstr "Apeluri de sistem"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:32
+msgid "Read/Written"
+msgstr "Citit/scris"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala:37
+msgid "Cancelled write"
+msgstr "Scriere anulată"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:73
+msgid "End Process"
+msgstr "Termină procesul"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:75
+msgid "End selected process"
+msgstr "Termină procesul selectat"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:79
+msgid "Kill Process"
+msgstr "Omoară procesul"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:80
+msgid "Kill selected process"
+msgstr "Omoară procesul selectat"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:90
+msgid "Confirm kill of the process?"
+msgstr "Confirmi omorârea procesului?"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoView.vala:97
+msgid "Confirm end of the process?"
+msgstr "Confirmi terminarea procesului?"
+
+#. setup name column
+#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:17
+msgid "Process Name"
+msgstr "Numele procesului"
+
+#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:38
+#: src/Widgets/Statusbar/Statusbar.vala:8
+msgid "CPU"
+msgstr "Procesor"
+
+#: src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala:49
+#: src/Views/SystemView/SystemMemoryView.vala:26
+#: src/Widgets/Statusbar/Statusbar.vala:11
+msgid "Memory"
+msgstr "Memorie"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:50
+#, c-format
+msgid "CPU: %.1f%%"
+msgstr "Procesor: %.1f%%"
+
+#: src/Views/ProcessView/ProcessInfoView/ProcessInfoCPURAM.vala:51
+#, c-format
+msgid "RAM: %.1f%%"
+msgstr "Memorie: %.1f%%"
+
+#: src/Views/SystemView/SystemCPUView.vala:32
+#: src/Views/SystemView/SystemMemoryView.vala:28
+msgid "UTILIZATION"
+msgstr "UTILIZARE"
+
+#: src/Views/SystemView/SystemCPUView.vala:34
+#: src/Views/SystemView/SystemCPUView.vala:94
+#: src/Views/SystemView/SystemMemoryView.vala:30
+#: src/Views/SystemView/SystemMemoryView.vala:35
+msgid "Show detailed info"
+msgstr "Arată informații detaliate"
+
+#: src/Views/SystemView/SystemCPUView.vala:36
+msgid "FREQUENCY"
+msgstr "FRECVENȚĂ"
+
+#: src/Views/SystemView/SystemCPUView.vala:40
+msgid "TEMPERATURE"
+msgstr "TEMPERATURĂ"
+
+#: src/Views/SystemView/SystemCPUView.vala:96
+#: src/Views/SystemView/SystemMemoryView.vala:37
+msgid "Hide detailed info"
+msgstr "Ascunde informațiile detaliate"
+
+#: src/Views/SystemView/SystemCPUView.vala:152
+#: src/Views/SystemView/SystemMemoryView.vala:100
+#, c-format
+msgid "%d%%"
+msgstr "%d%%"
+
+#: src/Views/SystemView/SystemCPUView.vala:153
+#: src/Widgets/Statusbar/Statusbar.vala:44
+msgid "GHz"
+msgstr "GHz"
+
+#: src/Views/SystemView/SystemCPUView.vala:154
+msgid "℃"
+msgstr "℃"
+
+#: src/Views/SystemView/SystemMemoryView.vala:41
+msgid "Total: "
+msgstr "Total: "
+
+#: src/Views/SystemView/SystemMemoryView.vala:44
+msgid "Used: "
+msgstr "Folosit: "
+
+#: src/Views/SystemView/SystemMemoryView.vala:47
+msgid "Shared: "
+msgstr "Partajat: "
+
+#: src/Views/SystemView/SystemMemoryView.vala:50
+msgid "Buffered: "
+msgstr "Buffer: "
+
+#: src/Views/SystemView/SystemMemoryView.vala:53
+msgid "Cached: "
+msgstr "Cache: "
+
+#: src/Views/SystemView/SystemMemoryView.vala:56
+msgid "Locked: "
+msgstr "Blocat: "
+
+#: src/Views/SystemView/SystemMemoryView.vala:103
+#, c-format
+msgid "Total: %s"
+msgstr "Total: %s"
+
+#: src/Views/SystemView/SystemMemoryView.vala:104
+#, c-format
+msgid "Used: %s"
+msgstr "Folosit: %s"
+
+#: src/Views/SystemView/SystemMemoryView.vala:105
+#, c-format
+msgid "Shared: %s"
+msgstr "Partajat: %s"
+
+#: src/Views/SystemView/SystemMemoryView.vala:106
+#, c-format
+msgid "Buffered: %s"
+msgstr "Buffer: %s"
+
+#: src/Views/SystemView/SystemMemoryView.vala:107
+#, c-format
+msgid "Cached: %s"
+msgstr "Cache: %s"
+
+#: src/Views/SystemView/SystemMemoryView.vala:108
+#, c-format
+msgid "Locked: %s"
+msgstr "Blocat: %s"
+
+#: src/Widgets/Headerbar/Headerbar.vala:13
+msgid "Monitor"
+msgstr "Monitor"
+
+#: src/Widgets/Headerbar/Headerbar.vala:21
+msgid "Settings"
+msgstr "Configurări"
+
+#: src/Widgets/Headerbar/Headerbar.vala:35
+msgid "Show an indicator:"
+msgstr "Arată un indicator:"
+
+#: src/Widgets/Headerbar/Headerbar.vala:41
+msgid "Start in background:"
+msgstr "Pornește în fundal:"
+
+#: src/Widgets/Headerbar/Search.vala:14
+msgid "Search Process"
+msgstr "Caută un proces"
+
+#: src/Widgets/Headerbar/Search.vala:15
+msgid "Type process name or PID to search"
+msgstr "Introdu numele unui proces sau un PID pentru a căuta"
+
+#: src/Widgets/Statusbar/Statusbar.vala:14
+msgid "Swap"
+msgstr "Swap"
+
+#: src/Widgets/Statusbar/Statusbar.vala:16
+#: src/Widgets/Statusbar/Statusbar.vala:22
+#: src/Widgets/Statusbar/Statusbar.vala:29
+msgid "Calculating…"
+msgstr "Se calculează..."
+
+#~ msgid "Monitor Indicator"
+#~ msgstr "Indicateur du panneau"
+
+#~ msgid "Show system resources"
+#~ msgstr "Afficher les ressources du système"
+
+#~ msgid "Background Applications"
+#~ msgstr "Applications en arrière-plan"
diff --git a/src/Indicator/Indicator.vala b/src/Indicator/Indicator.vala
index 57b1635c..ed033258 100644
--- a/src/Indicator/Indicator.vala
+++ b/src/Indicator/Indicator.vala
@@ -15,14 +15,29 @@ public class Monitor.Indicator : Wingpanel.Indicator {
dbusclient = DBusClient.get_default ();
dbusclient.monitor_vanished.connect (() => this.visible = false);
- dbusclient.monitor_appeared.connect (() => this.visible = settings.get_boolean ("indicator-state"));
+ dbusclient.monitor_appeared.connect (() => {
+ this.visible = settings.get_boolean ("indicator-state");
+ display_widget.cpu_widget.visible = settings.get_boolean ("indicator-cpu-state");
+ display_widget.memory_widget.visible = settings.get_boolean ("indicator-memory-state");
+ display_widget.temperature_widget.visible = settings.get_boolean ("indicator-temperature-state");
+ display_widget.network_up_widget.visible = settings.get_boolean ("indicator-network-up-state");
+ display_widget.network_down_widget.visible = settings.get_boolean ("indicator-network-down-state");
- dbusclient.interface.indicator_state.connect ((state) => this.visible = state);
+ });
+ dbusclient.interface.indicator_state.connect ((state) => this.visible = state);
+ dbusclient.interface.indicator_cpu_state.connect ((state) => display_widget.cpu_widget.visible = state);
+ dbusclient.interface.indicator_memory_state.connect ((state) => display_widget.memory_widget.visible = state);
+ dbusclient.interface.indicator_temperature_state.connect ((state) => display_widget.temperature_widget.visible = state);
+ dbusclient.interface.indicator_network_up_state.connect ((state) => display_widget.network_up_widget.visible = state);
+ dbusclient.interface.indicator_network_down_state.connect ((state) => display_widget.network_down_widget.visible = state);
+
dbusclient.interface.update.connect ((sysres) => {
display_widget.cpu_widget.percentage = sysres.cpu_percentage;
display_widget.temperature_widget.degree = sysres.cpu_temperature;
display_widget.memory_widget.percentage = sysres.memory_percentage;
+ display_widget.network_up_widget.bandwith = sysres.network_up;
+ display_widget.network_down_widget.bandwith = sysres.network_down;
});
popover_widget.quit_monitor.connect (() => {
diff --git a/src/Indicator/Services/DBusClient.vala b/src/Indicator/Services/DBusClient.vala
index 8a7f0ff9..296b2c9b 100644
--- a/src/Indicator/Services/DBusClient.vala
+++ b/src/Indicator/Services/DBusClient.vala
@@ -4,6 +4,11 @@ public interface Monitor.DBusClientInterface : Object {
public abstract void show_monitor () throws Error;
public signal void update (ResourcesSerialized data);
public signal void indicator_state (bool state);
+ public signal void indicator_cpu_state (bool state);
+ public signal void indicator_memory_state (bool state);
+ public signal void indicator_temperature_state (bool state);
+ public signal void indicator_network_up_state (bool state);
+ public signal void indicator_network_down_state (bool state);
}
diff --git a/src/Indicator/Widgets/DisplayWidget.vala b/src/Indicator/Widgets/DisplayWidget.vala
index 2d9729cf..42502f2f 100644
--- a/src/Indicator/Widgets/DisplayWidget.vala
+++ b/src/Indicator/Widgets/DisplayWidget.vala
@@ -3,19 +3,27 @@ public class Monitor.Widgets.DisplayWidget : Gtk.Grid {
public IndicatorWidget memory_widget;
public TemperatureWidget temperature_widget;
+ public NetworkWidget network_up_widget;
+ public NetworkWidget network_down_widget;
construct {
valign = Gtk.Align.CENTER;
cpu_widget = new IndicatorWidget ("cpu-symbolic");
-
+ cpu_widget.visible = false;
memory_widget = new IndicatorWidget ("ram-symbolic");
-
+ memory_widget.visible = false;
temperature_widget = new TemperatureWidget ("temperature-sensor-symbolic");
-
+ temperature_widget.visible = false;
+ network_up_widget = new NetworkWidget ("up-arrow-symbolic");
+ network_up_widget.visible = false;
+ network_down_widget = new NetworkWidget ("down-arrow-symbolic");
+ network_down_widget.visible = false;
add (cpu_widget);
add (memory_widget);
add (temperature_widget);
+ add (network_up_widget);
+ add (network_down_widget);
}
}
diff --git a/src/Indicator/Widgets/NetworkWidget.vala b/src/Indicator/Widgets/NetworkWidget.vala
new file mode 100644
index 00000000..becd1abd
--- /dev/null
+++ b/src/Indicator/Widgets/NetworkWidget.vala
@@ -0,0 +1,28 @@
+public class Monitor.Widgets.NetworkWidget : Gtk.Box {
+ private Gtk.Label bandwith_label;
+
+ public string icon_name { get; construct; }
+ public int bandwith {
+ set {
+ bandwith_label.label = ("%s").printf (Utils.HumanUnitFormatter.string_bytes_to_human (value.to_string (), true));
+ }
+ }
+
+ public NetworkWidget (string icon_name) {
+ Object (
+ orientation: Gtk.Orientation.HORIZONTAL,
+ icon_name: icon_name
+ );
+ }
+
+ construct {
+ //var icon = new Gtk.Image.from_icon_name (icon_name, Gtk.IconSize.SMALL_TOOLBAR);
+
+ bandwith_label = new Gtk.Label (Utils.NOT_AVAILABLE);
+ bandwith_label.margin = 2;
+ bandwith_label.width_chars = 4;
+
+ //pack_start (icon);
+ pack_start (bandwith_label);
+ }
+}
diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index abc84683..deec9a47 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -57,7 +57,7 @@ public class Monitor.MainWindow : Gtk.Window {
});
Timeout.add_seconds (2, () => {
- new Thread ("resource-updates", () => {
+ // new Thread ("resource-updates", () => {
resources.update ();
var res = resources.serialize ();
statusbar.update (res);
@@ -70,8 +70,8 @@ public class Monitor.MainWindow : Gtk.Window {
return false;
});
return true;
- });
- return true;
+ // });
+ // return true;
});
diff --git a/src/Monitor.vala b/src/Monitor.vala
index d6fe129d..7988a332 100644
--- a/src/Monitor.vala
+++ b/src/Monitor.vala
@@ -41,6 +41,21 @@ namespace Monitor {
if (!MonitorApp.settings.get_boolean ("indicator-state")) {
MonitorApp.settings.set_boolean ("indicator-state", true);
}
+ if (!MonitorApp.settings.get_boolean ("indicator-cpu-state")) {
+ MonitorApp.settings.set_boolean ("indicator-cpu-state", true);
+ }
+ if (!MonitorApp.settings.get_boolean ("indicator-memory-state")) {
+ MonitorApp.settings.set_boolean ("indicator-memory-state", true);
+ }
+ if (!MonitorApp.settings.get_boolean ("indicator-temperature-state")) {
+ MonitorApp.settings.set_boolean ("indicator-temperature-state", true);
+ }
+ if (!MonitorApp.settings.get_boolean ("indicator-network-up-state")) {
+ MonitorApp.settings.set_boolean ("indicator-network-up-state", false);
+ }
+ if (!MonitorApp.settings.get_boolean ("indicator-network-down-state")) {
+ MonitorApp.settings.set_boolean ("indicator-network-down-state", false);
+ }
window.hide ();
MonitorApp.settings.set_boolean ("background-state", true);
diff --git a/src/Resources/Resources.vala b/src/Resources/Resources.vala
index 78d04610..9e0c34d1 100644
--- a/src/Resources/Resources.vala
+++ b/src/Resources/Resources.vala
@@ -30,7 +30,9 @@ public class Monitor.Resources : Object {
memory_total = memory.total,
swap_percentage = swap.percentage,
swap_used = swap.used,
- swap_total = swap.total
+ swap_total = swap.total,
+ network_up = network.bytes_out,
+ network_down = network.bytes_in
};
}
diff --git a/src/Resources/ResourcesSerialized.vala b/src/Resources/ResourcesSerialized.vala
index af3468d0..d2d2e929 100644
--- a/src/Resources/ResourcesSerialized.vala
+++ b/src/Resources/ResourcesSerialized.vala
@@ -8,4 +8,6 @@ public struct ResourcesSerialized {
public int swap_percentage;
public double swap_used;
public double swap_total;
+ public int network_up;
+ public int network_down;
}
diff --git a/src/Resources/TemperatureSensor.vala b/src/Resources/TemperatureSensor.vala
index 1b8a227c..3940bad9 100644
--- a/src/Resources/TemperatureSensor.vala
+++ b/src/Resources/TemperatureSensor.vala
@@ -63,6 +63,16 @@ class TemperatureSensor : Object {
}
}
}
+
+ // Raspberry Pi 4
+ } else if (sensor_name == "cpu_thermal") {
+ debug ("Found temp. sensor: %s", sensor_name);
+ Dir hwmonx_dir = Dir.open (Path.build_filename (HWMON_PATH, hwmonx), 0);
+ string ? hwmonx_prop = hwmonx_dir.read_name ();
+ string tempx_input = "temp%c_input".printf (hwmonx_prop[4]);
+ cpu_temp_paths.add (Path.build_filename (HWMON_PATH, hwmonx, tempx_input));
+ debug (open_file (cpu_temp_paths[0]));
+
} else if (sensor_name == "amdgpu") {
debug ("Found temp. sensor: %s", sensor_name);
} else {
diff --git a/src/Services/DBusServer.vala b/src/Services/DBusServer.vala
index ad59278c..3d3ad2fb 100644
--- a/src/Services/DBusServer.vala
+++ b/src/Services/DBusServer.vala
@@ -11,6 +11,11 @@ public class Monitor.DBusServer : Object {
public signal void update (ResourcesSerialized data);
public signal void indicator_state (bool state);
+ public signal void indicator_cpu_state (bool state);
+ public signal void indicator_memory_state (bool state);
+ public signal void indicator_temperature_state (bool state);
+ public signal void indicator_network_up_state (bool state);
+ public signal void indicator_network_down_state (bool state);
public signal void quit ();
public signal void show ();
diff --git a/src/Utils.vala b/src/Utils.vala
index 46293ae3..728d139f 100644
--- a/src/Utils.vala
+++ b/src/Utils.vala
@@ -45,18 +45,26 @@ public class Monitor.Utils.Strings {
*/
public class Monitor.Utils.HumanUnitFormatter {
const string[] SIZE_UNITS = { "B", "KiB", "MiB", "GiB", "TiB" };
+ const string[] PACKED_SIZE_UNITS = { "B", "K", "M", "G", "T" };
const double KFACTOR = 1024;
/**
* format a string of bytes to an human readable format with units
*/
- public static string string_bytes_to_human (string bytes) {
+ public static string string_bytes_to_human (string bytes, bool packed = false) {
+ string[] units;
+
+ if (packed)
+ units = HumanUnitFormatter.PACKED_SIZE_UNITS;
+ else
+ units = HumanUnitFormatter.SIZE_UNITS;
+
double current_size = double.parse (bytes);
- string current_size_formatted = bytes.to_string () + HumanUnitFormatter.SIZE_UNITS[0];
+ string current_size_formatted = bytes.to_string () + units[0];
- for (int i = 0; i <= HumanUnitFormatter.SIZE_UNITS.length; i++) {
+ for (int i = 0; i <= units.length; i++) {
if (current_size < HumanUnitFormatter.KFACTOR) {
- return GLib.Math.round (current_size).to_string () + HumanUnitFormatter.SIZE_UNITS[i];
+ return GLib.Math.round (current_size).to_string () + units[i];
}
current_size = current_size / HumanUnitFormatter.KFACTOR;
}
diff --git a/src/Widgets/Chart/Chart.vala b/src/Widgets/Chart/Chart.vala
index 389c6f3e..8033fa29 100644
--- a/src/Widgets/Chart/Chart.vala
+++ b/src/Widgets/Chart/Chart.vala
@@ -27,9 +27,10 @@ public class Monitor.Chart : Gtk.Box {
live_chart.expand = true;
live_chart.legend.visible = false;
live_chart.grid.visible = true;
- live_chart.background.color = Gdk.RGBA () {
- red = 1, green = 1, blue = 1, alpha = 1
- }; // White background
+ live_chart.background.visible = false;
+ // live_chart.background.color = Gdk.RGBA () {
+ // red = 1, green = 1, blue = 1, alpha = 1
+ // }; // White background
}
public Chart (int series_quantity) {
diff --git a/src/Widgets/Headerbar/Headerbar.vala b/src/Widgets/Headerbar/Headerbar.vala
index 11068e4f..1456b902 100644
--- a/src/Widgets/Headerbar/Headerbar.vala
+++ b/src/Widgets/Headerbar/Headerbar.vala
@@ -2,6 +2,11 @@ public class Monitor.Headerbar : Gtk.HeaderBar {
private MainWindow window;
private Gtk.Switch show_indicator_switch;
private Gtk.Switch background_switch;
+ private Gtk.CheckButton indicator_cpu_check;
+ private Gtk.CheckButton indicator_memory_check;
+ private Gtk.CheckButton indicator_temperature_check;
+ private Gtk.CheckButton indicator_network_up_check;
+ private Gtk.CheckButton indicator_network_down_check;
public Search search;
@@ -43,11 +48,50 @@ public class Monitor.Headerbar : Gtk.HeaderBar {
background_switch.state = MonitorApp.settings.get_boolean ("background-state");
set_background_switch_state ();
+ var indicator_list_label = new Gtk.Label (_("Items in indicator:"));
+ indicator_list_label.halign = Gtk.Align.END;
+
+ var indicator_cpu_label = new Gtk.Label (_("CPU"));
+ indicator_cpu_check = new Gtk.CheckButton ();
+ indicator_cpu_check.active = MonitorApp.settings.get_boolean ("indicator-cpu-state");
+
+ var indicator_memory_label = new Gtk.Label (_("Memory"));
+ indicator_memory_check = new Gtk.CheckButton ();
+ indicator_memory_check.active = MonitorApp.settings.get_boolean ("indicator-memory-state");
+
+ var indicator_temperature_label = new Gtk.Label (_("Temperature"));
+ indicator_temperature_check = new Gtk.CheckButton ();
+ indicator_temperature_check.active = MonitorApp.settings.get_boolean ("indicator-temperature-state");
+
+ var indicator_network_up_label = new Gtk.Label (_("Network up"));
+ indicator_network_up_check = new Gtk.CheckButton ();
+ indicator_network_up_check.active = MonitorApp.settings.get_boolean ("indicator-network-up-state");
+
+ var indicator_network_down_label = new Gtk.Label (_("Network down"));
+ indicator_network_down_check = new Gtk.CheckButton ();
+ indicator_network_down_check.active = MonitorApp.settings.get_boolean ("indicator-network-down-state");
+
preferences_grid.attach (indicator_label, 0, 0, 1, 1);
preferences_grid.attach (show_indicator_switch, 1, 0, 1, 1);
preferences_grid.attach (background_label, 0, 1, 1, 1);
preferences_grid.attach (background_switch, 1, 1, 1, 1);
+ // Settings popup needs design.
+ // Also not sure about new network indicator.
+ // Needs design, disabling this for now
+
+ // preferences_grid.attach (indicator_list_label, 0, 2, 1, 1);
+ // preferences_grid.attach (indicator_cpu_label, 0, 3, 1, 1);
+ // preferences_grid.attach (indicator_cpu_check, 1, 3, 1, 1);
+ // preferences_grid.attach (indicator_memory_label, 0, 4, 1, 1);
+ // preferences_grid.attach (indicator_memory_check, 1, 4, 1, 1);
+ // preferences_grid.attach (indicator_temperature_label, 0, 5, 1, 1);
+ // preferences_grid.attach (indicator_temperature_check, 1, 5, 1, 1);
+ // preferences_grid.attach (indicator_network_up_label, 0, 6, 1, 1);
+ // preferences_grid.attach (indicator_network_up_check, 1, 6, 1, 1);
+ // preferences_grid.attach (indicator_network_down_label, 0, 7, 1, 1);
+ // preferences_grid.attach (indicator_network_down_check, 1, 7, 1, 1);
+
preferences_grid.show_all ();
search = new Search (window);
@@ -58,6 +102,27 @@ public class Monitor.Headerbar : Gtk.HeaderBar {
MonitorApp.settings.set_boolean ("indicator-state", show_indicator_switch.state);
window.dbusserver.indicator_state (show_indicator_switch.state);
set_background_switch_state ();
+ set_indicators_check_sensitive ();
+ });
+ indicator_cpu_check.notify["active"].connect (() => {
+ MonitorApp.settings.set_boolean ("indicator-cpu-state", indicator_cpu_check.active);
+ window.dbusserver.indicator_cpu_state (indicator_cpu_check.active);
+ });
+ indicator_memory_check.notify["active"].connect (() => {
+ MonitorApp.settings.set_boolean ("indicator-cpu-state", indicator_memory_check.active);
+ window.dbusserver.indicator_memory_state (indicator_memory_check.active);
+ });
+ indicator_temperature_check.notify["active"].connect (() => {
+ MonitorApp.settings.set_boolean ("indicator-cpu-state", indicator_temperature_check.active);
+ window.dbusserver.indicator_temperature_state (indicator_temperature_check.active);
+ });
+ indicator_network_up_check.notify["active"].connect (() => {
+ MonitorApp.settings.set_boolean ("indicator-cpu-state", indicator_network_up_check.active);
+ window.dbusserver.indicator_network_up_state (indicator_network_up_check.active);
+ });
+ indicator_network_down_check.notify["active"].connect (() => {
+ MonitorApp.settings.set_boolean ("indicator-cpu-state", indicator_network_down_check.active);
+ window.dbusserver.indicator_network_down_state (indicator_network_down_check.active);
});
background_switch.notify["active"].connect (() => {
MonitorApp.settings.set_boolean ("background-state", background_switch.state);
@@ -72,5 +137,14 @@ public class Monitor.Headerbar : Gtk.HeaderBar {
background_switch.state = false;
}
}
+ private void set_indicators_check_sensitive () {
+ bool sensitive = show_indicator_switch.active;
+
+ indicator_cpu_check.sensitive = sensitive;
+ indicator_memory_check.sensitive = sensitive;
+ indicator_temperature_check.sensitive = sensitive;
+ indicator_network_up_check.sensitive = sensitive;
+ indicator_network_down_check.sensitive = sensitive;
+ }
}