diff --git a/data/com.github.stsdc.monitor.appdata.xml.in b/data/com.github.stsdc.monitor.appdata.xml.in index 56feae7f..82e4ce5b 100644 --- a/data/com.github.stsdc.monitor.appdata.xml.in +++ b/data/com.github.stsdc.monitor.appdata.xml.in @@ -25,12 +25,11 @@ https://github.com/stsdc/monitor/issues - +
    -
  • Update Portuguese translation (Hugo Carvalho)
  • -
  • Update French translation (Nathan Bonnemains and Skeudwenn)
  • -
  • Fix: Don't show swap percentage when it's not available (Ryo Nakano)
  • +
  • Bugfix (potential) of crushes and high CPU usage
  • +
  • Update German translation (Carsten Dietrich)
diff --git a/data/meson.build b/data/meson.build index 41b5b6ee..83d252ce 100644 --- a/data/meson.build +++ b/data/meson.build @@ -3,17 +3,17 @@ icon_sizes = ['16', '24', '32', '48', '64', '128'] foreach i : icon_sizes install_data( join_paths('icons', i, meson.project_name() + '.svg'), - install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps') + install_dir: join_paths(icondir, i + 'x' + i, 'apps') ) install_data( join_paths('icons', i, meson.project_name() + '.svg'), - install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i + '@2', 'apps') + install_dir: join_paths(icondir, i + 'x' + i + '@2', 'apps') ) endforeach install_data( meson.project_name() + '.gschema.xml', - install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas') + install_dir: join_paths(datadir, 'glib-2.0', 'schemas') ) i18n.merge_file( @@ -22,7 +22,7 @@ i18n.merge_file( po_dir: join_paths(meson.source_root(), 'po', 'extra'), type: 'desktop', install: true, - install_dir: join_paths(get_option('datadir'), 'applications') + install_dir: join_paths(datadir, 'applications') ) i18n.merge_file( @@ -30,5 +30,5 @@ i18n.merge_file( output: meson.project_name() + '.appdata.xml', po_dir: join_paths(meson.source_root(), 'po', 'extra'), install: true, - install_dir: join_paths(get_option('datadir'), 'metainfo') + install_dir: join_paths(datadir, 'metainfo') ) diff --git a/debian/changelog b/debian/changelog index 6ee4d66e..5bb9e234 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +com.github.stsdc.monitor (0.6.2) bionic; urgency=low + + * Bugfix (potential) of crushes and high CPU usage + * Update German translation (Carsten Dietrich) + +-- Stanisław Dac Sat, 21 Dec 2019 14:06:37 +0100 + com.github.stsdc.monitor (0.6.1) bionic; urgency=low * Update Portuguese translation (Hugo Carvalho) diff --git a/meson.build b/meson.build index 744d73bf..ce056adc 100644 --- a/meson.build +++ b/meson.build @@ -1,10 +1,16 @@ -project('com.github.stsdc.monitor', 'vala', 'c', version: '0.6.0') +project('com.github.stsdc.monitor', 'vala', 'c', version: '0.6.2') # these are Meson modules gnome = import('gnome') i18n = import('i18n') +# common dirs +prefix = get_option('prefix') +datadir = join_paths(prefix, get_option('datadir')) +libdir = join_paths(prefix, get_option('libdir')) +icondir = join_paths(datadir, 'icons', 'hicolor') + # and these are project dependencies glib = dependency('glib-2.0') granite = dependency('granite', version: '>= 5.2.0') @@ -106,9 +112,7 @@ shared_module( wingpanel ], install: true, - install_dir : wingpanel.get_pkgconfig_variable('indicatorsdir'), - # install_dir : '/usr/lib/x86_64-linux-gnu/wingpanel/' - + install_dir : wingpanel.get_pkgconfig_variable('indicatorsdir', define_variable: ['libdir', libdir]), ) # Add in a post install script diff --git a/po/de.po b/po/de.po index 50ca1e75..cd912759 100644 --- a/po/de.po +++ b/po/de.po @@ -29,23 +29,20 @@ msgid "Monitor" msgstr "Monitor" #: src/Widgets/Headerbar.vala:23 -#, fuzzy msgid "End Process" msgstr "Prozess beenden" #: src/Widgets/Headerbar.vala:26 -#, fuzzy msgid "End selected process" -msgstr "Prozess beenden" +msgstr "Ausgewählten Prozess beenden" #: src/Widgets/Headerbar.vala:30 -#, fuzzy msgid "Kill Process" -msgstr "" +msgstr "Prozess abwürgen" #: src/Widgets/Headerbar.vala:32 msgid "Kill selected process" -msgstr "" +msgstr "Ausgewählten Prozess abwürgen" #: src/Widgets/Headerbar.vala:42 msgid "Settings" @@ -93,9 +90,8 @@ msgid "Search Process" msgstr "Suche Prozess" #: src/Widgets/Search.vala:15 -#, fuzzy msgid "Type process name or PID to search" -msgstr "Geben Sie den Prozessnamen oder PID ein" +msgstr "Geben Sie den zu suchenden Prozessnamen oder die PID ein" #: src/Widgets/Statusbar/Statusbar.vala:12 #: src/Widgets/Statusbar/Statusbar.vala:16 @@ -105,12 +101,3 @@ msgstr "Berechne…" #: src/Models/GenericModel.vala:274 msgid "Background Applications" msgstr "Hintergrundanwendungen" - -#~ msgid "Ctrl+E" -#~ msgstr "Strg+E" - -#~ msgid "CPU:" -#~ msgstr "CPU:" - -#~ msgid "Memory:" -#~ msgstr "Arbeitsspeicher:" diff --git a/src/Models/GenericModel.vala b/src/Models/GenericModel.vala index 16c2e1ab..65a40297 100644 --- a/src/Models/GenericModel.vala +++ b/src/Models/GenericModel.vala @@ -161,12 +161,18 @@ namespace Monitor { return true; } + // THE BUG IS SOMEWHERE IN HERE // reparent children to background processes - private void reparent (Gtk.TreeIter iter) { + private void reparent (ref Gtk.TreeIter iter) { Gtk.TreeIter child_iter; + Value pid_value_prev; + while (iter_children (out child_iter, iter)) { Value pid_value; get_value (child_iter, Column.PID, out pid_value); + pid_value_prev = pid_value; + debug( "reparent %d", pid_value.get_int ()); + add_process_to_row (background_apps_iter, pid_value.get_int ()); } } @@ -176,10 +182,26 @@ namespace Monitor { // if process rows has pid if (process_rows.has_key (pid)) { var row = process_rows.get (pid); - var iter = row.iter; - reparent (iter); - // remove row from model - remove (ref iter); + Gtk.TreeIter iter = row.iter; + + debug ("remove process: user_data %d, stamp %d", (int) iter.user_data, iter.stamp); + + Value pid_value; + get_value (iter, Column.PID, out pid_value); + + // Column.NAME, for example returns (null) + // Column.PID return 0 + + debug("removing %d", pid_value.get_int()); + + // sometimes iter has null values + // this potentially should prevent segfaults + if (pid_value.get_int() != 0) { + reparent (ref iter); + // remove row from model + remove (ref iter); + } + // remove row from row cache process_rows.unset (pid); } @@ -223,7 +245,7 @@ namespace Monitor { // reparenting it and it's children if it already exists. private bool add_process_to_row (Gtk.TreeIter row, int pid) { var process = process_manager.get_process (pid); - debug ("add_process_to_row %d", pid); + debug ("add_process_to_row pid:%d", pid); if (process != null) { // if process is already in list, then we need to reparent it and it's children @@ -252,9 +274,9 @@ namespace Monitor { // i.e. skip if subprocess is already in but isn't an ancestor of this process row if (process_rows.has_key (sub_pid) && ( (old_location != null && !is_ancestor (old_location, process_rows[sub_pid].iter)) - || old_location == null)) - continue; - + || old_location == null)) { + continue; + } add_process_to_row (iter, sub_pid); } diff --git a/src/Widgets/OverallView.vala b/src/Widgets/OverallView.vala index 75ced365..2a4e530c 100644 --- a/src/Widgets/OverallView.vala +++ b/src/Widgets/OverallView.vala @@ -65,7 +65,6 @@ namespace Monitor { pid_column.expand = false; pid_column.alignment = 0.5f; pid_column.set_sort_column_id (Column.PID); - pid_column.pack_start (pid_cell, false); pid_column.add_attribute (pid_cell, "text", Column.PID); insert_column (pid_column, -1);