Skip to content

Commit

Permalink
Merge branch 'unstable'
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanisław committed Jun 7, 2019
2 parents 2299c88 + 1508afe commit e3ba5e0
Show file tree
Hide file tree
Showing 17 changed files with 151 additions and 66 deletions.
12 changes: 10 additions & 2 deletions data/com.github.stsdc.monitor.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@
<url type="help">https://github.com/stsdc/monitor/issues</url>

<releases>
<release version="0.4.4" date="2019-04-12">
<release version="0.5.0" date="2019-06-07">
​ <description>
​ <ul>
<li>Add start-in-background option to UI (Ryo Nakano)</li>
<li>Fix contents of the window are not shown (Ryo Nakano)</li>
<li>Fix no row is still selected when indicator options are enabled (Ryo Nakano)</li>
<li>Fix the app crashes by clicking the "End/Kill Process" buttons when no process is selected (Ryo Nakano)</li>
<li>Added buttons to either "kill" or "end" a process. (Evan Buss)</li>
<li>Change screenshot to English (Christopher Crouse)</li>
<li>Update Russian translation (camellan)</li>
<li>Check if the default display is a X11 display (Hannes Schulze)</li>
<li>Update German translation (J0Ar)</li>
<li>Update Spanish translation (Mario Rodrigo)</li>
</ul>
​ </description>
​ </release>
Expand Down
Binary file modified data/com.github.stsdc.monitor.screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
com.github.stsdc.monitor (0.5.0) bionic; urgency=low

* Fix contents of the window are not shown (Ryo Nakano)
* Fix no row is still selected when indicator options are enabled (Ryo Nakano)
* Fix the app crashes by clicking the "End/Kill Process" buttons when no process is selected (Ryo Nakano)
* Added buttons to either "kill" or "end" a process. (Evan Buss)
* Change screenshot to English (Christopher Crouse)
* Update Russian translation (camellan)
* Check if the default display is a X11 display (Hannes Schulze)
* Update German translation (J0Ar)
* Update Spanish translation (Mario Rodrigo)

-- Stanisław Dac <[email protected]> Fri, 07 Jun 2019 11:03:57 +0200

com.github.stsdc.monitor (0.4.4) bionic; urgency=low

* Add start-in-background option to UI
Expand Down
4 changes: 3 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

project('com.github.stsdc.monitor', 'vala', 'c', version: '0.4.0')
project('com.github.stsdc.monitor', 'vala', 'c', version: '0.5.0')

# these are Meson modules
gnome = import('gnome')
Expand All @@ -16,6 +16,7 @@ bamf = dependency('libbamf3')
gtop = dependency('libgtop-2.0')
wnck = dependency('libwnck-3.0')
wingpanel = dependency('wingpanel-2.0')
gdk_x11 = dependency('gdk-x11-3.0')

config_data = configuration_data()
config_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
Expand Down Expand Up @@ -74,6 +75,7 @@ executable(
bamf,
gtop,
wnck,
gdk_x11,
meson.get_compiler('c').find_library('m', required : false),
meson.get_compiler('vala').find_library('posix')
],
Expand Down
9 changes: 6 additions & 3 deletions meson/post_install.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
import os
import subprocess

schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')
schema_dir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')
icon_cache_dir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'icons', 'hicolor')

if not os.environ.get('DESTDIR'):
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', schemadir], shell=False)
print('Compiling gsettings schemas')
subprocess.call(['glib-compile-schemas', schema_dir])

print('Updating desktop icon cache…')
subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
25 changes: 11 additions & 14 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,23 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"

#: src/Indicator/Widgets/PopoverWidget.vala:12
#, fuzzy
msgid "Show Monitor"
msgstr "Monitor"
msgstr "Zeige Monitor"

#: src/Indicator/Widgets/PopoverWidget.vala:13
#, fuzzy
msgid "Quit Monitor"
msgstr "Monitor"
msgstr "Beende Monitor"

#. Some information about the indicator
#. Unique name
#: src/Indicator/Indicator.vala:44
msgid "Monitor Indicator"
msgstr ""
msgstr "Monitor Indikator"

#. Localised name
#: src/Indicator/Indicator.vala:45
msgid "Show system resources"
msgstr ""
msgstr "Zeige Systemressourcen an"

#: src/Widgets/Headerbar.vala:13
msgid "Monitor"
Expand All @@ -40,21 +38,20 @@ msgstr "Strg+E"

#: src/Widgets/Headerbar.vala:32
msgid "Settings"
msgstr ""
msgstr "Einstellungen"

#: src/Widgets/Headerbar.vala:46
#, fuzzy
msgid "Show an indicator:"
msgstr "Monitor"
msgstr "Zeige einen Indikator:"

#: src/Widgets/Headerbar.vala:52
msgid "Start in background:"
msgstr ""
msgstr "Im Hintergrund ausführen:"

#. setup name column
#: src/Widgets/OverallView.vala:21
msgid "Process Name"
msgstr "Prozess"
msgstr "Prozess Name"

#: src/Widgets/OverallView.vala:42 src/Widgets/Statusbar/Statusbar.vala:7
msgid "CPU"
Expand Down Expand Up @@ -82,7 +79,7 @@ msgstr "GiB"

#: src/Widgets/Search.vala:9
msgid "Search Process"
msgstr "Suche"
msgstr "Suche Prozess"

#: src/Widgets/Search.vala:10
msgid "Type Process Name or PID"
Expand All @@ -91,7 +88,7 @@ msgstr "Geben Sie den Prozessnamen oder PID ein"
#: src/Widgets/Statusbar/Statusbar.vala:12
#: src/Widgets/Statusbar/Statusbar.vala:16
msgid "Calculating…"
msgstr ""
msgstr "Berechne…"

#: src/Models/GenericModel.vala:274
msgid "Background Applications"
Expand All @@ -101,4 +98,4 @@ msgstr "Hintergrundanwendungen"
#~ msgstr "CPU:"

#~ msgid "Memory:"
#~ msgstr "Arbeitsspeicher"
#~ msgstr "Arbeitsspeicher:"
12 changes: 6 additions & 6 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-12 18:26+0200\n"
"PO-Revision-Date: 2019-03-31 10:43+0200\n"
"Last-Translator: Raí B. Toffoletto <[email protected]>\n"
"PO-Revision-Date: 2019-06-03 23:25+0100\n"
"Last-Translator: Mario Rodrigo\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
Expand All @@ -31,7 +31,7 @@ msgstr "Cerrar Monitor"
#. Unique name
#: src/Indicator/Indicator.vala:44
msgid "Monitor Indicator"
msgstr "Icone de panel"
msgstr "Icono de monitorización"

#. Localised name
#: src/Indicator/Indicator.vala:45
Expand Down Expand Up @@ -61,7 +61,7 @@ msgstr "Mostrar icone de panel"

#: src/Widgets/Headerbar.vala:52
msgid "Start in background:"
msgstr ""
msgstr "Arrancar en segundo plano"

#. setup name column
#: src/Widgets/OverallView.vala:21
Expand Down Expand Up @@ -103,7 +103,7 @@ msgstr "Introduce el nombre del proceso o el PID"
#: src/Widgets/Statusbar/Statusbar.vala:12
#: src/Widgets/Statusbar/Statusbar.vala:16
msgid "Calculating…"
msgstr ""
msgstr "Calculando…"

#: src/Models/GenericModel.vala:274
msgid "Background Applications"
Expand All @@ -113,4 +113,4 @@ msgstr "Aplicaciones en segundo plano"
#~ msgstr "CPU :"

#~ msgid "Memory:"
#~ msgstr "Memoria :"
#~ msgstr "Memoria:"
14 changes: 7 additions & 7 deletions po/extra/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ msgstr ""
#: data/com.github.stsdc.monitor.appdata.xml.in:7
#: data/com.github.stsdc.monitor.desktop.in:3
msgid "Monitor"
msgstr ""
msgstr "Monitor"

#: data/com.github.stsdc.monitor.appdata.xml.in:8
msgid "Manage processes and monitor system resources"
msgstr ""
msgstr "Prozessverwaltung und Überwachung der Systemressourcen"

#: data/com.github.stsdc.monitor.appdata.xml.in:10
msgid "Display usage of system resources, filter and manage processes."
msgstr ""
msgstr "Lassen Sie sich die Auslastung der Systemressourcen anzeigen, filtern und verwalten Sie Prozesse."

#: data/com.github.stsdc.monitor.appdata.xml.in:22
msgid "Stanisław Dac"
msgstr ""
msgstr "Stanisław Dac"

#: data/com.github.stsdc.monitor.desktop.in:4
msgid "System Monitor"
msgstr ""
msgstr "System Monitor"

#: data/com.github.stsdc.monitor.desktop.in:6
msgid "Manage processes and monitor resource usage of the system"
msgstr ""
msgstr "Verwalten von Prozessen und Überwachen der Ressourcenauslastung des Systems"

#: data/com.github.stsdc.monitor.desktop.in:10
msgid "com.github.stsdc.monitor"
msgstr ""

#: data/com.github.stsdc.monitor.desktop.in:14
msgid "System monitor;System usage;Task manager;"
msgstr ""
msgstr "System monitor;System usage;Task manager;"
20 changes: 10 additions & 10 deletions po/extra/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: extra\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-20 22:25+0900\n"
"PO-Revision-Date: 2018-10-20 22:25+0900\n"
"Last-Translator: Automatically generated\n"
"PO-Revision-Date: 2019-06-03 23:25+0100\n"
"Last-Translator: Mario Rodrigo\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
Expand All @@ -20,32 +20,32 @@ msgstr ""
#: data/com.github.stsdc.monitor.appdata.xml.in:7
#: data/com.github.stsdc.monitor.desktop.in:3
msgid "Monitor"
msgstr ""
msgstr "Monitor"

#: data/com.github.stsdc.monitor.appdata.xml.in:8
msgid "Manage processes and monitor system resources"
msgstr ""
msgstr "Gestionar procesos y monitorizar los recursos del sistema"

#: data/com.github.stsdc.monitor.appdata.xml.in:10
msgid "Display usage of system resources, filter and manage processes."
msgstr ""
msgstr "Mostrar el uso de los recursos del sistema, filtrar y gestionar procesos."

#: data/com.github.stsdc.monitor.appdata.xml.in:22
msgid "Stanisław Dac"
msgstr ""
msgstr "Stanisław Dac"

#: data/com.github.stsdc.monitor.desktop.in:4
msgid "System Monitor"
msgstr ""
msgstr "Monitor del sistema"

#: data/com.github.stsdc.monitor.desktop.in:6
msgid "Manage processes and monitor resource usage of the system"
msgstr ""
msgstr "Gestionar procesos y monitorizar el uso de recursos del sistema"

#: data/com.github.stsdc.monitor.desktop.in:10
msgid "com.github.stsdc.monitor"
msgstr ""
msgstr "com.github.stsdc.monitor"

#: data/com.github.stsdc.monitor.desktop.in:14
msgid "System monitor;System usage;Task manager;"
msgstr ""
msgstr "Monitor del sistema; Uso del sistema; Gestor de tareas;"
7 changes: 3 additions & 4 deletions po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ msgid "Settings"
msgstr "Параметры"

#: src/Widgets/Headerbar.vala:46
#, fuzzy
msgid "Show an indicator:"
msgstr "Показывать индикатор"
msgstr "Показывать индикатор:"

#: src/Widgets/Headerbar.vala:52
msgid "Start in background:"
msgstr ""
msgstr "Запустить в фоновом режиме:"

#. setup name column
#: src/Widgets/OverallView.vala:21
Expand Down Expand Up @@ -96,7 +95,7 @@ msgstr "Введите имя или ИД процесса"
#: src/Widgets/Statusbar/Statusbar.vala:12
#: src/Widgets/Statusbar/Statusbar.vala:16
msgid "Calculating…"
msgstr ""
msgstr "Вычисление…"

#: src/Models/GenericModel.vala:274
msgid "Background Applications"
Expand Down
19 changes: 16 additions & 3 deletions src/Managers/Process.vala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,18 @@ namespace Monitor {
// Kills the process
// Returns if kill was successful
public bool kill () {
if (Posix.kill (pid, Posix.Signal.INT) == 0) {
// Sends a kill signal that cannot be ignored
if (Posix.kill (pid, Posix.Signal.KILL) == 0) {
return true;
}
return false;
}

// Ends the process
// Returns if end was successful
public bool end () {
// Sends a terminate signal
if (Posix.kill (pid, Posix.Signal.TERM) == 0) {
return true;
}
return false;
Expand Down Expand Up @@ -106,8 +117,10 @@ namespace Monitor {
GTop.get_proc_mem (out proc_mem, pid);
mem_usage = (proc_mem.resident - proc_mem.share) / 1024; // in KiB

Wnck.ResourceUsage resu = Wnck.ResourceUsage.pid_read (Gdk.Display.get_default(), pid);
mem_usage += (resu.total_bytes_estimate / 1024);
if (Gdk.Display.get_default () is Gdk.X11.Display) {
Wnck.ResourceUsage resu = Wnck.ResourceUsage.pid_read (Gdk.Display.get_default(), pid);
mem_usage += (resu.total_bytes_estimate / 1024);
}
} catch (Error e) {
warning ("Can't read process stat: '%s'", e.message);
return false;
Expand Down
10 changes: 9 additions & 1 deletion src/Models/GenericModel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,15 @@ namespace Monitor {
process.kill ();
info ("Kill:%d",process.pid);
}
}
}

public void end_process (int pid) {
if (pid > 0) {
var process = process_manager.get_process (pid);
process.end ();
info ("End:%d",process.pid);
}
}
}

}
3 changes: 3 additions & 0 deletions src/Monitor.vala
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Monitor {
public override void activate () {
// only have one window
if (get_windows () != null) {
window.show_all ();
window.present ();
return;
}
Expand All @@ -43,6 +44,8 @@ namespace Monitor {
window.show_all ();
}

window.process_view.focus_on_first_row ();

var quit_action = new SimpleAction ("quit", null);
add_action (quit_action);
set_accels_for_action ("app.quit", {"<Ctrl>q"});
Expand Down
4 changes: 4 additions & 0 deletions src/Services/Shortcuts.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ namespace Monitor {
handled = true;
break;
case Gdk.Key.e:
window.process_view.end_process ();
handled = true;
break;
case Gdk.Key.k:
window.process_view.kill_process ();
handled = true;
break;
Expand Down
Loading

0 comments on commit e3ba5e0

Please sign in to comment.