[Xfce4-commits] <xfce4-taskmanager:master> Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-taskmanager
Landry Breuil
noreply at xfce.org
Sun May 16 12:58:02 CEST 2010
Updating branch refs/heads/master
to ee9bd057fde481b90143a363c5158d39e1610c7b (commit)
from 00d61079725fad2440e8418b67c6fb370fa02d3b (commit)
commit ee9bd057fde481b90143a363c5158d39e1610c7b
Merge: 00d61079725fad2440e8418b67c6fb370fa02d3b 0be1d45507fea8ab4b4937670d643d3fa414e67e
Author: Landry Breuil <landry at rhaalovely.net>
Date: Sun May 16 12:56:06 2010 +0200
Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-taskmanager
Conflicts:
src/task-manager-bsd.c
commit 0be1d45507fea8ab4b4937670d643d3fa414e67e
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Sun May 16 12:28:28 2010 +0200
Don't recount CPU count in Linux implementation
commit b961822ba4ee1962d23622ea8ace0639f5377397
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Sun May 16 12:07:17 2010 +0200
Move POSIX code to task-manager.c
The functions send_signal_to_pid() and set_priority_to_pid() are using
POSIX functions and “should” be safe in task-manager.c. Still keep the
enumeration as a bridge between virtual values and real values, there is
no benefit removing them (wasting minutes) and it won't make the code
look better (or worse).
The functions have been removed from the Linux and BSD implementations.
commit 8a56b552b5086ce1471de092be78abf7bf8e4aa2
Author: Dmitrij Smirnov <arch at cnc-parts.info>
Date: Sun May 16 11:40:27 2010 +0200
l10n: Updated Russian (ru) translation to 97%
New status: 44 messages complete with 1 fuzzy and 0 untranslated.
Transmitted-via: Transifex (translations.xfce.org).
commit 7acf0503200d38fdca93bd304811b62c668bc7be
Author: Gökmen Görgen <gkmngrgn at gmail.com>
Date: Sat May 15 18:06:36 2010 +0200
l10n: Updated Turkish (tr) translation to 100%
New status: 45 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (translations.xfce.org).
commit ec00c4a5f94f74097f87e90ce0765b6138cc6eed
Author: Johannes Lips <johannes.lips at googlemail.com>
Date: Sat May 15 17:05:33 2010 +0200
l10n: Updated German (de) translation to 44%
New status: 20 messages complete with 20 fuzzies and 5 untranslated.
Transmitted-via: Transifex (translations.xfce.org).
commit 2c3d44e56bdcde1d79f406bd0fef51d9db46a9b5
Author: Johannes Lips <johannes.lips at googlemail.com>
Date: Sat May 15 16:48:13 2010 +0200
l10n: Updated German (de) translation to 44%
New status: 20 messages complete with 21 fuzzies and 4 untranslated.
Transmitted-via: Transifex (translations.xfce.org).
commit 772d76074cf7f016a3747140b882d8cc3a3058d0
Author: Sergio Marques <smarquespt at gmail.com>
Date: Fri May 14 17:27:41 2010 +0200
l10n: Updated Portuguese (pt) translation to 100%
New status: 45 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (translations.xfce.org).
commit b4a7c271e2865d2b884e97dd095aa07f5233d6a4
Author: Sergio Marques <smarquespt at gmail.com>
Date: Fri May 14 17:27:22 2010 +0200
l10n: Updated Portuguese (pt) translation to 97%
New status: 44 messages complete with 1 fuzzy and 0 untranslated.
Transmitted-via: Transifex (translations.xfce.org).
po/de.po | 31 ++++++-----
po/pt.po | 98 +++++++++++++++--------------------
po/ru.po | 3 +-
po/tr.po | 127 ++++++++++++++++++++++------------------------
src/task-manager-bsd.c | 56 +--------------------
src/task-manager-linux.c | 79 ++++++-----------------------
src/task-manager.c | 115 +++++++++++++++++++++++++++++++----------
src/task-manager.h | 16 +++---
8 files changed, 232 insertions(+), 293 deletions(-)
diff --git a/po/de.po b/po/de.po
index a1f3345..896bb8c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: xfce4-taskmanager 0.4.0-rc1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-10 21:04+0000\n"
+"POT-Creation-Date: 2010-05-15 10:07+0000\n"
"PO-Revision-Date: 2008-07-31 01:00+0200\n"
"Last-Translator: Fabian Nowak <timystery at arcor.de>\n"
"Language-Team: German <xfce-i18n at xfce.org>\n"
@@ -41,9 +41,9 @@ msgid "Memory: %.2f%%"
msgstr "Speicher: %.2f%%"
#: ../src/process-statusbar.c:135
-#, c-format
+#, c-format, fuzzy
msgid "Swap: %.2f%%"
-msgstr ""
+msgstr "Auslagerungsspeicher: %.2f%%"
#: ../src/process-statusbar.c:142
#, c-format
@@ -110,16 +110,17 @@ msgid "Error sending signal"
msgstr "Signal konnte nicht gesendet werden"
#: ../src/process-tree-view.c:227
-#, c-format, fuzzy
+#, fuzzy, c-format
msgid "An error was encountered by sending a signal to the PID %d. It is likely you don't have the required privileges."
msgstr "Beim Senden eines Signals an die Anwendung mit der ID %d ist ein Fehler aufgetreten. Möglicherweise haben Sie nicht die notwendigen Rechte."
#: ../src/process-tree-view.c:244
+#, fuzzy
msgid "Error setting priority"
-msgstr ""
+msgstr "Fehler beim Setzen der Priorität"
#: ../src/process-tree-view.c:245
-#, c-format, fuzzy
+#, fuzzy, c-format
msgid "An error was encountered by setting a priority to the PID %d. It is likely you don't have the required privileges."
msgstr "Beim Senden eines Signals an die Anwendung mit der ID %d ist ein Fehler aufgetreten. Möglicherweise haben Sie nicht die notwendigen Rechte."
@@ -167,8 +168,9 @@ msgid "Priority"
msgstr "Priorität"
#: ../src/process-window.c:197
+#, fuzzy
msgid "Execution error"
-msgstr ""
+msgstr "Ausführungsfehler"
#: ../src/process-window.c:226
#, fuzzy
@@ -184,8 +186,9 @@ msgid "Terminal emulator"
msgstr ""
#: ../src/process-window.c:229
+#, fuzzy
msgid "XTerm"
-msgstr ""
+msgstr "XTerm"
#: ../src/process-window.c:271
msgid "Show all processes"
@@ -208,19 +211,19 @@ msgstr ""
"Paul Seyfert"
#: ../src/task-manager.c:146
-#, c-format
+#, c-format, fuzzy
msgid "%lu MiB"
-msgstr ""
+msgstr "%lu MiB"
#: ../src/task-manager.c:153
-#, c-format
+#, c-format, fuzzy
msgid "%lu KiB"
-msgstr ""
+msgstr "%lu KiB"
#: ../src/task-manager.c:157
-#, c-format
+#, c-format, fuzzy
msgid "%lu B"
-msgstr ""
+msgstr "%lu B"
#. TODO make precision optional
#: ../src/task-manager.c:168
diff --git a/po/pt.po b/po/pt.po
index 45354e8..e7f7078 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -2,12 +2,12 @@
# Copyright (C) 2005 Johannes Zellner.
# This file is distributed under the same license as the xfce4-taskmanager package.
# Nuno Miguel <nunis at netcabo.pt>, 2007.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: xfce4-taskmanager 0.4.0-rc1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-10 23:04+0200\n"
+"POT-Creation-Date: 2010-05-14 10:07+0000\n"
"PO-Revision-Date: 2008-08-28 12:30+0100\n"
"Last-Translator: Nuno Miguel <nunis at netcabo.pt>\n"
"Language-Team: \n"
@@ -16,40 +16,38 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../xfce4-taskmanager.desktop.in.h:1 ../src/process-window.c:326
-#, fuzzy
msgid "Easy to use task manager"
-msgstr "Xfce4-Taskmanager é um gestor de tarefas fácil de usar"
+msgstr "Gestor de tarefas fácil de utilizar"
#: ../xfce4-taskmanager.desktop.in.h:2 ../src/process-tree-view.c:215
#: ../src/process-tree-view.c:229 ../src/process-tree-view.c:247
#: ../src/process-window.c:199 ../src/process-window.c:321
-#, fuzzy
msgid "Task Manager"
-msgstr "Gestor de tarefas Xfce4"
+msgstr "Gestor de Tarefas"
#: ../src/process-statusbar.c:121
#, c-format
msgid "CPU: %.2f%%"
-msgstr ""
+msgstr "CPU: %.2f%%"
#: ../src/process-statusbar.c:128
#, c-format
msgid "Memory: %.2f%%"
-msgstr ""
+msgstr "Memória: %.2f%%"
#: ../src/process-statusbar.c:135
#, c-format
msgid "Swap: %.2f%%"
-msgstr ""
+msgstr "Swap: %.2f%%"
#: ../src/process-statusbar.c:142
#, c-format
msgid "Processes: %d"
-msgstr ""
+msgstr "Processos: %d"
#: ../src/process-tree-view.c:106
msgid "Task"
-msgstr ""
+msgstr "Tarefa"
#: ../src/process-tree-view.c:116 ../src/process-window.c:276
msgid "PID"
@@ -65,67 +63,58 @@ msgstr "Estado"
#: ../src/process-tree-view.c:141
msgid "VSZ"
-msgstr ""
+msgstr "VSZ"
#: ../src/process-tree-view.c:149
msgid "RSS"
msgstr "RSS"
#: ../src/process-tree-view.c:157 ../src/process-window.c:281
-#, fuzzy
msgid "UID"
-msgstr "PID"
+msgstr "UID"
#: ../src/process-tree-view.c:165 ../src/process-window.c:282
-#, fuzzy
msgid "CPU"
-msgstr "CPU%"
+msgstr "CPU"
-#. TRANSLATORS: “Prio.” is short for Priority, it appears in the tree view header.
+#. TRANSLATORS: “Prio.” is short for Priority, it appears in the tree view
+#. header.
#: ../src/process-tree-view.c:174
-#, fuzzy
msgid "Prio."
-msgstr "Prio"
+msgstr "Prio."
#: ../src/process-tree-view.c:212
-#, fuzzy
msgid "Terminate task"
-msgstr "Terminar a tarefa?"
+msgstr "Terminar tarefa"
#: ../src/process-tree-view.c:212
-#, fuzzy
msgid "Kill task"
-msgstr "Matar"
+msgstr "Matar tarefa"
#: ../src/process-tree-view.c:214
#, c-format
msgid "Are you sure you want to send a signal to the PID %d?"
-msgstr ""
+msgstr "Tem a certeza que pretende enviar um sinal ao PID %d?"
#: ../src/process-tree-view.c:225
msgid "Error sending signal"
-msgstr ""
+msgstr "Erro ao enviar o sinal"
#: ../src/process-tree-view.c:227
#, c-format
-msgid ""
-"An error was encountered by sending a signal to the PID %d. It is likely you "
-"don't have the required privileges."
-msgstr ""
+msgid "An error was encountered by sending a signal to the PID %d. It is likely you don't have the required privileges."
+msgstr "Ocorreu um erro ao enviar o sinal ao PID %d. É possível que não tenha os privilégios necessários."
#: ../src/process-tree-view.c:244
msgid "Error setting priority"
-msgstr ""
+msgstr "Erro ao definir a prioridade"
#: ../src/process-tree-view.c:245
#, c-format
-msgid ""
-"An error was encountered by setting a priority to the PID %d. It is likely "
-"you don't have the required privileges."
-msgstr ""
+msgid "An error was encountered by setting a priority to the PID %d. It is likely you don't have the required privileges."
+msgstr "Ocorreu um erro ao definir a prioridade para o PID %d. É possível que não tenha os privilégios necessários."
#: ../src/process-tree-view.c:260
-#, fuzzy
msgid "Terminate"
msgstr "Terminar"
@@ -143,23 +132,23 @@ msgstr "Matar"
#: ../src/process-tree-view.c:287
msgid "Very low"
-msgstr ""
+msgstr "Muito baixa"
#: ../src/process-tree-view.c:292
msgid "Low"
-msgstr ""
+msgstr "Baixa"
#: ../src/process-tree-view.c:297
msgid "Normal"
-msgstr ""
+msgstr "Normal"
#: ../src/process-tree-view.c:302
msgid "High"
-msgstr ""
+msgstr "Alta"
#: ../src/process-tree-view.c:307
msgid "Very high"
-msgstr ""
+msgstr "Muito alta"
#: ../src/process-tree-view.c:312 ../src/process-window.c:283
msgid "Priority"
@@ -167,38 +156,35 @@ msgstr "Prioridade"
#: ../src/process-window.c:197
msgid "Execution error"
-msgstr ""
+msgstr "Erro de execução"
#: ../src/process-window.c:226
msgid "Run Program..."
-msgstr ""
+msgstr "Executar Programa..."
#: ../src/process-window.c:227
msgid "Application Finder"
-msgstr ""
+msgstr "Descobridor de Aplicações"
#: ../src/process-window.c:228
-#, fuzzy
msgid "Terminal emulator"
-msgstr "Autor Original:"
+msgstr "Emulador de terminal"
#: ../src/process-window.c:229
-#, fuzzy
msgid "XTerm"
-msgstr "Terminar"
+msgstr "XTerm"
#: ../src/process-window.c:271
-#, fuzzy
msgid "Show all processes"
-msgstr "Controle os seus processos"
+msgstr "Mostrar todos os processos"
#: ../src/process-window.c:279
msgid "Virtual Bytes"
-msgstr ""
+msgstr "Bytes Virtuais"
#: ../src/process-window.c:280
msgid "Private Bytes"
-msgstr ""
+msgstr "Bytes Privados"
#: ../src/process-window.c:329
msgid "translator-credits"
@@ -207,23 +193,23 @@ msgstr "Nuno Miguel"
#: ../src/task-manager.c:146
#, c-format
msgid "%lu MiB"
-msgstr ""
+msgstr "%lu MB"
#: ../src/task-manager.c:153
#, c-format
msgid "%lu KiB"
-msgstr ""
+msgstr "%lu KB"
#: ../src/task-manager.c:157
#, c-format
msgid "%lu B"
-msgstr ""
+msgstr "%lu B"
#. TODO make precision optional
#: ../src/task-manager.c:168
-#, fuzzy, c-format
+#, c-format
msgid "%.2f%%"
-msgstr "%0.0f %%"
+msgstr "%.2f%%"
#~ msgid "Control your processes"
#~ msgstr "Controle os seus processos"
diff --git a/po/ru.po b/po/ru.po
index fcde637..ead994c 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: xfce4-taskmanager 0.4.0-rc1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-11 04:07+0000\n"
+"POT-Creation-Date: 2010-05-16 04:07+0000\n"
"PO-Revision-Date: 2009-10-17 23:23+0300\n"
"Last-Translator: Vlad Vasilev <lortwer at gmail.com>\n"
"Language-Team: Russian <ru at li.org>\n"
@@ -23,7 +23,6 @@ msgstr "Простой менеджер процессов"
#: ../xfce4-taskmanager.desktop.in.h:2 ../src/process-tree-view.c:215
#: ../src/process-tree-view.c:229 ../src/process-tree-view.c:247
#: ../src/process-window.c:199 ../src/process-window.c:321
-#, fuzzy
msgid "Task Manager"
msgstr "Диспетчер задач Xfce 4"
diff --git a/po/tr.po b/po/tr.po
index e42bba2..79bd9db 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -4,126 +4,123 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-10 23:04+0200\n"
"PO-Revision-Date: \n"
-"Last-Translator: Samed Beyribey <ras0ir at eventualis.org>\n"
+"Last-Translator: Gökmen Görgen <gkmngrgn at gmail.com>\n"
"Language-Team: Xfce-TR <xfce-tr at googlegroups.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Country: TURKEY\n"
-#: ../xfce4-taskmanager.desktop.in.h:1 ../src/process-window.c:326
-#, fuzzy
+#: ../xfce4-taskmanager.desktop.in.h:1
+#: ../src/process-window.c:326
msgid "Easy to use task manager"
-msgstr "Xfce4-Taskmanager kullanımı kolay bir görev yöneticisidir"
-
-#: ../xfce4-taskmanager.desktop.in.h:2 ../src/process-tree-view.c:215
-#: ../src/process-tree-view.c:229 ../src/process-tree-view.c:247
-#: ../src/process-window.c:199 ../src/process-window.c:321
-#, fuzzy
+msgstr "Kullanımı kolay görev yöneticisi"
+
+#: ../xfce4-taskmanager.desktop.in.h:2
+#: ../src/process-tree-view.c:215
+#: ../src/process-tree-view.c:229
+#: ../src/process-tree-view.c:247
+#: ../src/process-window.c:199
+#: ../src/process-window.c:321
msgid "Task Manager"
-msgstr "Xfce4 Görev Yöneticisi"
+msgstr "Görev Yöneticisi"
#: ../src/process-statusbar.c:121
#, c-format
msgid "CPU: %.2f%%"
-msgstr ""
+msgstr "İşlemci : %.2f%%"
#: ../src/process-statusbar.c:128
#, c-format
msgid "Memory: %.2f%%"
-msgstr ""
+msgstr "Hafıza : %.2f%%"
#: ../src/process-statusbar.c:135
#, c-format
msgid "Swap: %.2f%%"
-msgstr ""
+msgstr "Takas : %.2f%%"
#: ../src/process-statusbar.c:142
#, c-format
msgid "Processes: %d"
-msgstr ""
+msgstr "İşlemler : %d"
#: ../src/process-tree-view.c:106
msgid "Task"
-msgstr ""
+msgstr "Görev"
-#: ../src/process-tree-view.c:116 ../src/process-window.c:276
+#: ../src/process-tree-view.c:116
+#: ../src/process-window.c:276
msgid "PID"
msgstr "PID"
-#: ../src/process-tree-view.c:124 ../src/process-window.c:277
+#: ../src/process-tree-view.c:124
+#: ../src/process-window.c:277
msgid "PPID"
msgstr "PPID"
-#: ../src/process-tree-view.c:132 ../src/process-window.c:278
+#: ../src/process-tree-view.c:132
+#: ../src/process-window.c:278
msgid "State"
msgstr "Durum"
#: ../src/process-tree-view.c:141
msgid "VSZ"
-msgstr ""
+msgstr "VSZ"
#: ../src/process-tree-view.c:149
msgid "RSS"
msgstr "RSS"
-#: ../src/process-tree-view.c:157 ../src/process-window.c:281
-#, fuzzy
+#: ../src/process-tree-view.c:157
+#: ../src/process-window.c:281
msgid "UID"
-msgstr "PID"
+msgstr "UID"
-#: ../src/process-tree-view.c:165 ../src/process-window.c:282
-#, fuzzy
+#: ../src/process-tree-view.c:165
+#: ../src/process-window.c:282
msgid "CPU"
-msgstr "CPU%"
+msgstr "CPU"
#. TRANSLATORS: “Prio.” is short for Priority, it appears in the tree view header.
#: ../src/process-tree-view.c:174
-#, fuzzy
msgid "Prio."
-msgstr "Öncel"
+msgstr "Öncelik"
#: ../src/process-tree-view.c:212
-#, fuzzy
msgid "Terminate task"
-msgstr "Görevi sonlandırmak istiyor musunuz?"
+msgstr "Süreci sonlandır"
#: ../src/process-tree-view.c:212
-#, fuzzy
msgid "Kill task"
-msgstr "Sonlandır"
+msgstr "Süreci öldür"
#: ../src/process-tree-view.c:214
#, c-format
msgid "Are you sure you want to send a signal to the PID %d?"
-msgstr ""
+msgstr "PID %d için sinyal göndermek istediğinize emin misiniz?"
#: ../src/process-tree-view.c:225
msgid "Error sending signal"
-msgstr ""
+msgstr "Sinyal gönderme hatası"
#: ../src/process-tree-view.c:227
#, c-format
-msgid ""
-"An error was encountered by sending a signal to the PID %d. It is likely you "
-"don't have the required privileges."
-msgstr ""
+msgid "An error was encountered by sending a signal to the PID %d. It is likely you don't have the required privileges."
+msgstr "PID %d için sinyal gönderilirken beklenmeyen hata oluştu. Muhtemelen gereken izinlere sahip değilsiniz."
#: ../src/process-tree-view.c:244
msgid "Error setting priority"
-msgstr ""
+msgstr "Öncelik ayarlama hatası"
#: ../src/process-tree-view.c:245
#, c-format
-msgid ""
-"An error was encountered by setting a priority to the PID %d. It is likely "
-"you don't have the required privileges."
-msgstr ""
+msgid "An error was encountered by setting a priority to the PID %d. It is likely you don't have the required privileges."
+msgstr "PID %d için öncelik atarken beklenmeyen hata oluştu. Muhtemelen gereken izinlere sahip değilsiniz."
#: ../src/process-tree-view.c:260
-#, fuzzy
msgid "Terminate"
-msgstr "Term"
+msgstr "Sonlandır"
#: ../src/process-tree-view.c:267
msgid "Stop"
@@ -139,62 +136,60 @@ msgstr "Sonlandır"
#: ../src/process-tree-view.c:287
msgid "Very low"
-msgstr ""
+msgstr "Çok düşük"
#: ../src/process-tree-view.c:292
msgid "Low"
-msgstr ""
+msgstr "Düşük"
#: ../src/process-tree-view.c:297
msgid "Normal"
-msgstr ""
+msgstr "Normal"
#: ../src/process-tree-view.c:302
msgid "High"
-msgstr ""
+msgstr "Yüksek"
#: ../src/process-tree-view.c:307
msgid "Very high"
-msgstr ""
+msgstr "Çok yüksek"
-#: ../src/process-tree-view.c:312 ../src/process-window.c:283
+#: ../src/process-tree-view.c:312
+#: ../src/process-window.c:283
msgid "Priority"
msgstr "Öncelik"
#: ../src/process-window.c:197
msgid "Execution error"
-msgstr ""
+msgstr "Başlatıcı hatası"
#: ../src/process-window.c:226
msgid "Run Program..."
-msgstr ""
+msgstr "Program Çalıştır"
#: ../src/process-window.c:227
msgid "Application Finder"
-msgstr ""
+msgstr "Uygulama Bulucu"
#: ../src/process-window.c:228
-#, fuzzy
msgid "Terminal emulator"
-msgstr "Geliştirici:"
+msgstr "Terminal öykünücüsü"
#: ../src/process-window.c:229
-#, fuzzy
msgid "XTerm"
-msgstr "Term"
+msgstr "XTerm"
#: ../src/process-window.c:271
-#, fuzzy
msgid "Show all processes"
-msgstr "Süreçlerinizi kontrol edin"
+msgstr "Tüm işlemleri göster"
#: ../src/process-window.c:279
msgid "Virtual Bytes"
-msgstr ""
+msgstr "Sanal Bitler"
#: ../src/process-window.c:280
msgid "Private Bytes"
-msgstr ""
+msgstr "Özel Bitler"
#: ../src/process-window.c:329
msgid "translator-credits"
@@ -203,23 +198,23 @@ msgstr "Samed Beyribey <ras0ir at eventualis.org>, 2008"
#: ../src/task-manager.c:146
#, c-format
msgid "%lu MiB"
-msgstr ""
+msgstr "%lu MiB"
#: ../src/task-manager.c:153
#, c-format
msgid "%lu KiB"
-msgstr ""
+msgstr "%lu KiB"
#: ../src/task-manager.c:157
#, c-format
msgid "%lu B"
-msgstr ""
+msgstr "%lu B"
#. TODO make precision optional
#: ../src/task-manager.c:168
-#, fuzzy, c-format
+#, c-format
msgid "%.2f%%"
-msgstr "%0.0f %%"
+msgstr "%.2f%%"
#~ msgid "Control your processes"
#~ msgstr "Süreçlerinizi kontrol edin"
diff --git a/src/task-manager-bsd.c b/src/task-manager-bsd.c
index 68c1248..2246433 100644
--- a/src/task-manager-bsd.c
+++ b/src/task-manager-bsd.c
@@ -17,6 +17,7 @@
*/
#include <stdlib.h>
+#include <err.h>
/* for getpwuid() */
#include <sys/types.h>
#include <pwd.h>
@@ -26,9 +27,6 @@
#include <sys/sysctl.h>
/* for swapctl() */
#include <sys/swap.h>
-/* for kill() */
-#include <signal.h>
-#include <err.h>
/* for strlcpy() */
#include <string.h>
/* for getpagesize() */
@@ -207,55 +205,3 @@ gboolean get_memory_usage (guint64 *memory_total, guint64 *memory_free, guint64
return TRUE;
}
-gboolean send_signal_to_pid (guint task_id, gint sig)
-{
- gint ret;
- switch (sig)
- {
- case XTM_SIGNAL_TERMINATE:
- sig = SIGTERM;
- break;
- case XTM_SIGNAL_STOP:
- sig = SIGSTOP;
- break;
- case XTM_SIGNAL_CONTINUE:
- sig = SIGCONT;
- break;
- case XTM_SIGNAL_KILL:
- sig = SIGKILL;
- break;
- default:
- return TRUE;
- }
- ret = kill (task_id, sig);
- return (ret == 0) ? TRUE : FALSE;
-}
-
-
-gboolean set_priority_to_pid (guint task_id, gint prio)
-{
- gint res;
- switch (prio)
- {
- case XTM_PRIORITY_VERY_LOW:
- prio = 15;
- break;
- case XTM_PRIORITY_LOW:
- prio = 5;
- break;
- case XTM_PRIORITY_NORMAL:
- prio = 0;
- break;
- case XTM_PRIORITY_HIGH:
- prio = -5;
- break;
- case XTM_PRIORITY_VERY_HIGH:
- prio = -15;
- break;
- default:
- return TRUE;
- }
- res = setpriority (PRIO_PROCESS, task_id, prio);
- return (res == 0) ? TRUE : FALSE;
-}
-
diff --git a/src/task-manager-linux.c b/src/task-manager-linux.c
index ece59d5..ba92f2e 100644
--- a/src/task-manager-linux.c
+++ b/src/task-manager-linux.c
@@ -14,8 +14,6 @@
#include <pwd.h>
#include <unistd.h>
#include <string.h>
-#include <signal.h>
-#include <sys/resource.h>
#include <glib.h>
@@ -72,13 +70,19 @@ get_cpu_usage (gushort *cpu_count, gfloat *cpu_user, gfloat *cpu_system)
fgets (buffer, 1024, file);
sscanf (buffer, "cpu\t%u %u %u %u", &user, &user_nice, &system, &idle);
- _cpu_count = 0;
- while (fgets (buffer, 1024, file) != NULL)
+ if (_cpu_count == 0)
{
- if (buffer[0] != 'c' && buffer[1] != 'p' && buffer[2] != 'u')
- break;
- _cpu_count += 1;
+ _cpu_count = 0;
+ while (fgets (buffer, 1024, file) != NULL)
+ {
+ if (buffer[0] != 'c' && buffer[1] != 'p' && buffer[2] != 'u')
+ break;
+ _cpu_count += 1;
+ }
+ if (_cpu_count == 0)
+ _cpu_count += 1;
}
+
fclose (file);
old_jiffies_user = cur_jiffies_user;
@@ -91,8 +95,7 @@ get_cpu_usage (gushort *cpu_count, gfloat *cpu_user, gfloat *cpu_system)
*cpu_user = (old_jiffies > 0) ? (cur_jiffies_user - old_jiffies_user) * 100 / (gdouble)(cur_jiffies - old_jiffies) : 0;
*cpu_system = (old_jiffies > 0) ? (cur_jiffies_system - old_jiffies_system) * 100 / (gdouble)(cur_jiffies - old_jiffies) : 0;
- *cpu_count = (_cpu_count > 0) ? _cpu_count : 1;
- _cpu_count = *cpu_count;
+ *cpu_count = _cpu_count;
return TRUE;
}
@@ -160,6 +163,9 @@ get_cpu_percent (guint pid, gulong jiffies_user, gfloat *cpu_user, gulong jiffie
g_hash_table_insert (hash_cpu_user, GUINT_TO_POINTER (pid), GUINT_TO_POINTER (jiffies_user));
g_hash_table_insert (hash_cpu_system, GUINT_TO_POINTER (pid), GUINT_TO_POINTER (jiffies_system));
+ if (jiffies_user < jiffies_user_old || jiffies_system < jiffies_system_old)
+ return;
+
if (_cpu_count > 0)
{
*cpu_user = (jiffies_user_old > 0) ? (jiffies_user - jiffies_user_old) / (gfloat)_cpu_count : 0;
@@ -329,58 +335,3 @@ pid_is_sleeping (guint pid)
return (state[0] == 'T') ? TRUE : FALSE;
}
-gboolean
-send_signal_to_pid (guint pid, gint signal)
-{
- gint sig;
- gint res;
- switch (signal)
- {
- case XTM_SIGNAL_TERMINATE:
- sig = SIGTERM;
- break;
- case XTM_SIGNAL_STOP:
- sig = SIGSTOP;
- break;
- case XTM_SIGNAL_CONTINUE:
- sig = SIGCONT;
- break;
- case XTM_SIGNAL_KILL:
- sig = SIGKILL;
- break;
- default:
- return TRUE;
- }
- res = kill (pid, sig);
- return (res == 0) ? TRUE : FALSE;
-}
-
-gboolean
-set_priority_to_pid (guint pid, gint priority)
-{
- gint prio;
- gint res;
- switch (priority)
- {
- case XTM_PRIORITY_VERY_LOW:
- prio = 15;
- break;
- case XTM_PRIORITY_LOW:
- prio = 5;
- break;
- case XTM_PRIORITY_NORMAL:
- prio = 0;
- break;
- case XTM_PRIORITY_HIGH:
- prio = -5;
- break;
- case XTM_PRIORITY_VERY_HIGH:
- prio = -15;
- break;
- default:
- return TRUE;
- }
- res = setpriority (PRIO_PROCESS, pid, prio);
- return (res == 0) ? TRUE : FALSE;
-}
-
diff --git a/src/task-manager.c b/src/task-manager.c
index d878eb2..c1cd55c 100644
--- a/src/task-manager.c
+++ b/src/task-manager.c
@@ -14,6 +14,8 @@
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
+#include <signal.h>
+#include <sys/resource.h>
#include <glib-object.h>
#include <glib/gi18n.h>
@@ -92,34 +94,6 @@ _xtm_task_manager_set_model (XtmTaskManager *manager, GtkTreeModel *model)
manager->model = model;
}
-void
-get_owner_uid (guint *owner_uid, gchar **owner_uid_name)
-{
- uid_t uid;
- struct passwd *pw;
- gchar *username = NULL;
-
- uid = getuid ();
- pw = getpwuid (uid);
-
- username = g_strdup ((pw != NULL) ? pw->pw_name : "nobody");
-
- *owner_uid = (guint) uid;
- *owner_uid_name = username;
-}
-
-gchar *
-get_hostname ()
-{
-#ifndef HOST_NAME_MAX
-#define HOST_NAME_MAX 255
-#endif
- char hostname[HOST_NAME_MAX];
- if (gethostname (hostname, HOST_NAME_MAX))
- return g_strdup ("(unknown)");
- return g_strdup_printf ("%s", hostname);
-}
-
static void
model_add_task (GtkTreeModel *model, Task *task)
{
@@ -372,3 +346,88 @@ xtm_task_manager_update_model (XtmTaskManager *manager)
return;
}
+
+
+void
+get_owner_uid (guint *owner_uid, gchar **owner_uid_name)
+{
+ uid_t uid;
+ struct passwd *pw;
+ gchar *username = NULL;
+
+ uid = getuid ();
+ pw = getpwuid (uid);
+
+ username = g_strdup ((pw != NULL) ? pw->pw_name : "nobody");
+
+ *owner_uid = (guint) uid;
+ *owner_uid_name = username;
+}
+
+gchar *
+get_hostname ()
+{
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 255
+#endif
+ char hostname[HOST_NAME_MAX];
+ if (gethostname (hostname, HOST_NAME_MAX))
+ return g_strdup ("(unknown)");
+ return g_strdup_printf ("%s", hostname);
+}
+
+gboolean
+send_signal_to_pid (guint pid, gint signal)
+{
+ gint sig;
+ gint res;
+ switch (signal)
+ {
+ case XTM_SIGNAL_TERMINATE:
+ sig = SIGTERM;
+ break;
+ case XTM_SIGNAL_STOP:
+ sig = SIGSTOP;
+ break;
+ case XTM_SIGNAL_CONTINUE:
+ sig = SIGCONT;
+ break;
+ case XTM_SIGNAL_KILL:
+ sig = SIGKILL;
+ break;
+ default:
+ return TRUE;
+ }
+ res = kill (pid, sig);
+ return (res == 0) ? TRUE : FALSE;
+}
+
+gboolean
+set_priority_to_pid (guint pid, gint priority)
+{
+ gint prio;
+ gint res;
+ switch (priority)
+ {
+ case XTM_PRIORITY_VERY_LOW:
+ prio = 15;
+ break;
+ case XTM_PRIORITY_LOW:
+ prio = 5;
+ break;
+ case XTM_PRIORITY_NORMAL:
+ prio = 0;
+ break;
+ case XTM_PRIORITY_HIGH:
+ prio = -5;
+ break;
+ case XTM_PRIORITY_VERY_HIGH:
+ prio = -15;
+ break;
+ default:
+ return TRUE;
+ }
+ res = setpriority (PRIO_PROCESS, pid, prio);
+ return (res == 0) ? TRUE : FALSE;
+}
+
diff --git a/src/task-manager.h b/src/task-manager.h
index cfefe64..df6e939 100644
--- a/src/task-manager.h
+++ b/src/task-manager.h
@@ -63,12 +63,10 @@ enum
* OS specific implementation.
*/
-gboolean get_memory_usage (guint64 *memory_total, guint64 *memory_free, guint64 *memory_cache, guint64 *memory_buffers, guint64 *swap_total, guint64 *swap_free);
-gboolean get_cpu_usage (gushort *cpu_count, gfloat *cpu_user, gfloat *cpu_system);
-gboolean get_task_list (GArray *task_list);
-gboolean pid_is_sleeping (guint pid);
-gboolean send_signal_to_pid (guint pid, gint signal);
-gboolean set_priority_to_pid (guint pid, gint priority);
+gboolean get_memory_usage (guint64 *memory_total, guint64 *memory_free, guint64 *memory_cache, guint64 *memory_buffers, guint64 *swap_total, guint64 *swap_free);
+gboolean get_cpu_usage (gushort *cpu_count, gfloat *cpu_user, gfloat *cpu_system);
+gboolean get_task_list (GArray *task_list);
+gboolean pid_is_sleeping (guint pid);
/**
* GObject class used to update the graphical widgets.
@@ -95,7 +93,9 @@ void xtm_task_manager_update_model (XtmTaskManager *manager);
* Helper functions.
*/
-void get_owner_uid (guint *owner_uid, gchar **owner_uid_name);
-gchar * get_hostname ();
+void get_owner_uid (guint *owner_uid, gchar **owner_uid_name);
+gchar * get_hostname ();
+gboolean send_signal_to_pid (guint pid, gint signal);
+gboolean set_priority_to_pid (guint pid, gint priority);
#endif /* !TASK_MANAGER_H */
More information about the Xfce4-commits
mailing list