Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xfce4-cpugraph-plugin for openSUSE:Factory checked in at 2021-02-15 23:20:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xfce4-cpugraph-plugin (Old) and /work/SRC/openSUSE:Factory/.xfce4-cpugraph-plugin.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xfce4-cpugraph-plugin" Mon Feb 15 23:20:52 2021 rev:4 rq:872608 version:1.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/xfce4-cpugraph-plugin/xfce4-cpugraph-plugin.changes 2021-02-01 13:30:31.662314628 +0100 +++ /work/SRC/openSUSE:Factory/.xfce4-cpugraph-plugin.new.28504/xfce4-cpugraph-plugin.changes 2021-02-15 23:23:08.640009103 +0100 @@ -1,0 +2,11 @@ +Sun Feb 14 22:05:58 UTC 2021 - Marcel Kuehlhorn <tu...@opensuse.org> + +- Update to version 1.2.2 + * Record CPU load data even if the chart is currently disabled + * Validate size against minimum and maximum allowed values + * Change semantics of the non-linear time-scale mode + * Fix corner cases when rendering the grid and LED modes + * Show SMT stats tooltip only when needed + * Translation Updates + +------------------------------------------------------------------- Old: ---- xfce4-cpugraph-plugin-1.2.1.tar.bz2 New: ---- xfce4-cpugraph-plugin-1.2.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xfce4-cpugraph-plugin.spec ++++++ --- /var/tmp/diff_new_pack.txNUOh/_old 2021-02-15 23:23:09.228009981 +0100 +++ /var/tmp/diff_new_pack.txNUOh/_new 2021-02-15 23:23:09.232009987 +0100 @@ -20,7 +20,7 @@ %define plugin cpugraph %bcond_with git Name: xfce4-%{plugin}-plugin -Version: 1.2.1 +Version: 1.2.2 Release: 0 Summary: CPU Graph Plugin for the Xfce Panel License: GPL-2.0-or-later ++++++ xfce4-cpugraph-plugin-1.2.1.tar.bz2 -> xfce4-cpugraph-plugin-1.2.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/ChangeLog new/xfce4-cpugraph-plugin-1.2.2/ChangeLog --- old/xfce4-cpugraph-plugin-1.2.1/ChangeLog 2021-01-30 15:30:21.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/ChangeLog 2021-02-14 18:50:14.000000000 +0100 @@ -1,3 +1,90 @@ +commit ff5c8db0b3f095f18c5a40f781f0947bea4f72c6 +Author: Jan Ziak <0xe2.0x9a.0...@gmail.com> +Date: Sun Feb 14 18:25:59 2021 +0100 + + Record CPU load data even if the chart is currently disabled + + Recording the history of the CPU load has a very low overhead. There is + no benefit to be gained by disabling the recording. + + Clear history when changing the tracked core. Do not clear history when + changing the mode to disabled. + +commit 612eeae757fb22af3b9dc4c116416ed1b9da9669 +Author: Jan Ziak <0xe2.0x9a.0...@gmail.com> +Date: Sun Feb 14 18:02:42 2021 +0100 + + Validate size against minimum and maximum allowed values + +commit 7dac8fed3862b71b7732dd53ec4f1e0eddd4b10a +Author: Jan Ziak <0xe2.0x9a.0...@gmail.com> +Date: Sat Feb 13 21:58:32 2021 +0100 + + Change semantics of the non-linear time-scale mode + + This patch changes the semantics of the non-linear mode from scaling the + y-axis (CPU load) to scaling the x-axis (time). This enables the cpugraph + plugin to display CPU load history up to 16 hours into the past using + a width of just 128 pixels in case the update interval is 3 seconds. + + Width: 128 60 128 60 + Interval: 3 3 0.25 0.25 + => Linear range: 6m 3m 32s 15s + => Non-linear range: 16h 31m 80m 2.6m + + The implementation uses an exponential function with base 1.04. + + The behavior of scaling the y-axis (CPU load) according to how far it is + in the past can be restored in a future patch upon request. + + Closes: https://gitlab.xfce.org/panel-plugins/xfce4-cpugraph-plugin/-/issues/18 + Closes: https://gitlab.xfce.org/panel-plugins/xfce4-cpugraph-plugin/-/issues/19 + Closes: https://gitlab.xfce.org/panel-plugins/xfce4-cpugraph-plugin/-/issues/20 + +commit 548ebac62549864d2c2acdcb0033aa49cdd837e1 +Author: Anonymous <nore...@xfce.org> +Date: Sun Feb 14 12:50:23 2021 +0100 + + I18n: Update translation el (70%). + + 38 translated messages, 16 untranslated messages. + + Transifex (https://www.transifex.com/xfce/public/). + +commit 889be68d93e18132f8bef5d156631b6340c76ddd +Author: Jan Ziak <0xe2.0x9a.0...@gmail.com> +Date: Sat Feb 13 18:04:28 2021 +0100 + + Fix corner cases when rendering the grid and LED modes + +commit d2a2a84d784f3693c4a9d519c460898815d883d6 +Author: Jan Ziak <0xe2.0x9a.0...@gmail.com> +Date: Wed Feb 10 21:39:01 2021 +0100 + + Show SMT stats tooltip only when needed + +commit 558863f5b7aef88ee8474a36068ad5eb95dcdd7b +Author: Robert Antoni Buj Gelonch <r...@fedoraproject.org> +Date: Wed Feb 3 12:50:04 2021 +0100 + + I18n: Update translation ca (85%). + + 46 translated messages, 8 untranslated messages. + + Transifex (https://www.transifex.com/xfce/public/). + +commit 81bbfd05e7c31f6a601f36200d3c0bac67da8198 +Author: Jan Ziak <0xe2.0x9a.0...@gmail.com> +Date: Sat Jan 30 15:37:01 2021 +0100 + + Back to development + +commit 31cba658719add81e66ee4e2c1a6b3a921299e3c +Author: Jan Ziak <0xe2.0x9a.0...@gmail.com> +Date: Sat Jan 30 15:30:35 2021 +0100 + + Updates for release + commit a3875c3ac3cc116b25b3bb41ea8421236a0774cb Author: Ga??l Bonithon <g...@xfce.org> Date: Fri Jan 29 10:27:07 2021 +0100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/NEWS new/xfce4-cpugraph-plugin-1.2.2/NEWS --- old/xfce4-cpugraph-plugin-1.2.1/NEWS 2021-01-30 15:30:03.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/NEWS 2021-02-14 18:50:05.000000000 +0100 @@ -1,3 +1,13 @@ +1.2.2 (2021-02-14) +===== +- Record CPU load data even if the chart is currently disabled +- Validate size against minimum and maximum allowed values +- Change semantics of the non-linear time-scale mode +- Fix corner cases when rendering the grid and LED modes +- Show SMT stats tooltip only when needed +- Translation Updates: + Catalan, Greek + 1.2.1 (2021-01-30) ===== - Repaint CPU load history after the user changes the update interval diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/configure new/xfce4-cpugraph-plugin-1.2.2/configure --- old/xfce4-cpugraph-plugin-1.2.1/configure 2021-01-30 15:30:20.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/configure 2021-02-14 18:50:12.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xfce4-cpugraph-plugin 1.2.1. +# Generated by GNU Autoconf 2.69 for xfce4-cpugraph-plugin 1.2.2. # # Report bugs to <https://gitlab.xfce.org/panel-plugins/xfce4-cpugraph-plugin/>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='xfce4-cpugraph-plugin' PACKAGE_TARNAME='xfce4-cpugraph-plugin' -PACKAGE_VERSION='1.2.1' -PACKAGE_STRING='xfce4-cpugraph-plugin 1.2.1' +PACKAGE_VERSION='1.2.2' +PACKAGE_STRING='xfce4-cpugraph-plugin 1.2.2' PACKAGE_BUGREPORT='https://gitlab.xfce.org/panel-plugins/xfce4-cpugraph-plugin/' PACKAGE_URL='' @@ -1399,7 +1399,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xfce4-cpugraph-plugin 1.2.1 to adapt to many kinds of systems. +\`configure' configures xfce4-cpugraph-plugin 1.2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1471,7 +1471,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xfce4-cpugraph-plugin 1.2.1:";; + short | recursive ) echo "Configuration of xfce4-cpugraph-plugin 1.2.2:";; esac cat <<\_ACEOF @@ -1596,7 +1596,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xfce4-cpugraph-plugin configure 1.2.1 +xfce4-cpugraph-plugin configure 1.2.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1965,7 +1965,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xfce4-cpugraph-plugin $as_me 1.2.1, which was +It was created by xfce4-cpugraph-plugin $as_me 1.2.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2830,7 +2830,7 @@ # Define the identity of the package. PACKAGE='xfce4-cpugraph-plugin' - VERSION='1.2.1' + VERSION='1.2.2' cat >>confdefs.h <<_ACEOF @@ -15115,7 +15115,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xfce4-cpugraph-plugin $as_me 1.2.1, which was +This file was extended by xfce4-cpugraph-plugin $as_me 1.2.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15181,7 +15181,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xfce4-cpugraph-plugin config.status 1.2.1 +xfce4-cpugraph-plugin config.status 1.2.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/configure.ac new/xfce4-cpugraph-plugin-1.2.2/configure.ac --- old/xfce4-cpugraph-plugin-1.2.1/configure.ac 2021-01-30 15:30:18.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/configure.ac 2021-02-14 18:50:09.000000000 +0100 @@ -14,8 +14,8 @@ AC_CONFIG_MACRO_DIRS([m4]) m4_define([cpugraph_version_major], [1]) m4_define([cpugraph_version_minor], [2]) -m4_define([cpugraph_version_micro], [1]) -m4_define([cpugraph_version_build], [a3875c3]) +m4_define([cpugraph_version_micro], [2]) +m4_define([cpugraph_version_build], [ff5c8db]) m4_define([cpugraph_version_tag], []) m4_define([cpugraph_version], [cpugraph_version_major().cpugraph_version_minor().cpugraph_version_micro()ifelse(cpugraph_version_tag(), [git], [cpugraph_version_tag()-cpugraph_version_build()], [cpugraph_version_tag()])]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/cpu.c new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/cpu.c --- old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/cpu.c 2021-01-30 15:12:10.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/cpu.c 2021-02-14 18:45:27.000000000 +0100 @@ -240,6 +240,9 @@ gssize i; for (i = 0; i < base->history.cap_pow2; i++) base->history.data[i] = (CpuLoad) {}; + + if (base->mode != MODE_DISABLED) + gtk_widget_queue_draw (base->draw_area); } static void @@ -256,7 +259,7 @@ old_offset = base->history.offset; cap_pow2 = 1; - while (cap_pow2 < 128 * slowest / fastest) + while (cap_pow2 < MAX_SIZE * slowest / fastest) cap_pow2 <<= 1; while (cap_pow2 < history_size * slowest / fastest) cap_pow2 <<= 1; @@ -268,8 +271,9 @@ base->history.data = (CpuLoad*) g_malloc0 (cap_pow2 * sizeof (CpuLoad)); base->history.mask = cap_pow2 - 1; base->history.offset = 0; - for (i = 0; i < old_cap_pow2 && i < cap_pow2; i++) - base->history.data[i] = old_data[(old_offset + i) & old_mask]; + if (old_data != NULL) + for (i = 0; i < old_cap_pow2 && i < cap_pow2; i++) + base->history.data[i] = old_data[(old_offset + i) & old_mask]; g_free (old_data); } @@ -299,7 +303,15 @@ history = size; } - if (history > base->history.cap_pow2 || base->non_linear) + /* Expand history size for the non-linear time-scale mode. + * 128 * pow(1.04, 128) = 19385.5175366781 + * 163 * pow(1.04, 163) = 97414.11965601446 + */ + history = ceil (history * pow(NONLINEAR_MODE_BASE, history)); + if (G_UNLIKELY (history < 0 || history > MAX_HISTORY_SIZE)) + history = MAX_HISTORY_SIZE; + + if (history > base->history.cap_pow2) resize_history (base, history); else base->history.size = history; @@ -573,42 +585,21 @@ else if (base->tracked_core != 0 && G_LIKELY (base->tracked_core < base->nr_cores + 1)) base->cpu_data[0].load = base->cpu_data[base->tracked_core].load; - if (base->mode != MODE_DISABLED) + if (base->history.data != NULL) { CpuLoad load; - /* Update the history */ - if (base->non_linear) - { - const gssize mask = base->history.mask; - const gssize offset = base->history.offset; - gssize i; - for (i = base->history.size - 1; i > 0; i--) - { - const gfloat scale = 256.0f; - gfloat a, b, factor; - a = base->history.data[(offset+i) & mask].value * scale; - b = base->history.data[(offset+i-1) & mask].value * scale; - if (a < b) a++; - factor = (i * 2); - base->history.data[(offset+i) & mask].timestamp = 0; - base->history.data[(offset+i) & mask].value = (a * (factor-1) + b) / factor / scale; - } - } - else - { - base->history.offset = (base->history.offset - 1) & base->history.mask; - } + /* Prepend a datapoint to the history */ + base->history.offset = (base->history.offset - 1) & base->history.mask; load.timestamp = g_get_real_time (); load.value = base->cpu_data[0].load; base->history.data[base->history.offset] = load; - - /* Draw the history graph */ - gtk_widget_queue_draw (base->draw_area); } update_tooltip (base); + if (base->mode != MODE_DISABLED) + gtk_widget_queue_draw (base->draw_area); if (base->bars.draw_area) gtk_widget_queue_draw (base->bars.draw_area); @@ -866,7 +857,8 @@ if (base->non_linear != nonlinear) { base->non_linear = nonlinear; - clear_history (base); + if (base->mode != MODE_DISABLED) + gtk_widget_queue_draw (base->draw_area); } } @@ -892,16 +884,19 @@ base->timeout_id = g_timeout_add (interval, update_cb, base); if (change && !init) - { if (base->mode != MODE_DISABLED) gtk_widget_queue_draw (base->draw_area); - } } } void set_size (CPUGraph *base, guint size) { + if (G_UNLIKELY (size < MIN_SIZE)) + size = MIN_SIZE; + if (G_UNLIKELY (size > MAX_SIZE)) + size = MAX_SIZE; + base->size = size; size_cb (base->plugin, xfce_panel_plugin_get_size (base->plugin), base); } @@ -919,9 +914,7 @@ if (mode == MODE_DISABLED) { - /* Hide graph and clear history */ gtk_widget_hide (base->frame_widget); - clear_history (base); } else { @@ -947,12 +940,17 @@ void set_tracked_core (CPUGraph *base, guint core) { - gboolean has_bars = base->has_bars; - if (has_bars) - set_bars (base, FALSE); - base->tracked_core = core; - if (has_bars) - set_bars (base, TRUE); + if (base->tracked_core != core) + { + gboolean has_bars = base->has_bars; + if (has_bars) + set_bars (base, FALSE); + base->tracked_core = core; + if (has_bars) + set_bars (base, TRUE); + + clear_history (base); + } } void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/cpu.h new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/cpu.h --- old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/cpu.h 2021-01-30 15:12:10.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/cpu.h 2021-02-14 18:45:27.000000000 +0100 @@ -34,7 +34,11 @@ #define BORDER 8 #define HIGHLIGHT_SMT_BY_DEFAULT FALSE +#define MAX_HISTORY_SIZE (100*1000) #define MAX_LOAD_THRESHOLD 0.2 +#define MAX_SIZE 128 +#define MIN_SIZE 10 +#define NONLINEAR_MODE_BASE 1.04 typedef enum { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/mode.c new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/mode.c --- old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/mode.c 2021-01-30 15:12:10.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/mode.c 2021-02-14 18:45:27.000000000 +0100 @@ -66,44 +66,112 @@ const CpuLoad *history_data = base->history.data; const gssize history_mask = base->history.mask; const gssize history_offset = base->history.offset; - gssize i, j; - for (i = 0, j = 0; i < count; i++) + if (!base->non_linear) { - const gint64 timestamp = start + i * step; - CpuLoad nearest = {}; - for (; j < history_cap_pow2; j++) + gssize i, j; + for (i = 0, j = 0; i < count; i++) { - CpuLoad load = history_data[(history_offset + j) & history_mask]; + const gint64 timestamp = start + i * step; + CpuLoad nearest = {}; + for (; j < history_cap_pow2; j++) + { + CpuLoad load = history_data[(history_offset + j) & history_mask]; - if (load.timestamp == 0) - goto end; + if (load.timestamp == 0) + goto end; - if (nearest.timestamp == 0) - { - nearest = load; - } - else - { - gint64 delta = load.timestamp - timestamp; - if (labs (delta) < labs (nearest.timestamp - timestamp)) + if (nearest.timestamp == 0) { nearest = load; } - else if (labs (delta) > labs (nearest.timestamp - timestamp)) + else { - if (j > 0) - j--; - break; + gint64 delta = labs (load.timestamp - timestamp); + if (delta < labs (nearest.timestamp - timestamp)) + { + nearest = load; + } + else if (delta > labs (nearest.timestamp - timestamp)) + { + if (j > 0) + j--; + break; + } } } + out[i] = nearest.value; } - out[i] = nearest.value; + + end: + for (; i < count; i++) + out[i] = 0; } + else + { + gssize i; + for (i = 0; i < count; i++) + { + /* Note: step < 0, therefore: timestamp1 < timestamp0 */ + const gint64 timestamp0 = start + (i+0) * pow (NONLINEAR_MODE_BASE, i+0) * step; + const gint64 timestamp1 = start + (i+1) * pow (NONLINEAR_MODE_BASE, i+1) * step; + gfloat sum = 0; + gint count = 0; + gssize j; + + for (j = 0; j < history_cap_pow2; j++) + { + CpuLoad load = history_data[(history_offset + j) & history_mask]; + if (load.timestamp > timestamp1 && load.timestamp <= timestamp0) + { + sum += load.value; + count++; + } + else if (load.timestamp < timestamp1) + break; + } -end: - for (; i < count; i++) - out[i] = 0; + /* count==0 in the following cases: + * - Both timestamps are pointing to a time before the CPU load measurements have started + * - Both timestamps are pointing to a time before the history has been cleared + * - There has been a change in base->update_interval, + * for example from RATE_SLOWEST to RATE_FASTEST + */ + + if (count != 0) + out[i] = sum / count; + else + out[i] = -1; + } + + for (i = 0; i < count; i++) + { + if (out[i] == -1) + { + gfloat prev = -1, next = -1; + gssize j; + + for (j = 0; j < i; j++) + if (out[j] != -1) + { + prev = out[j]; + break; + } + + for (j = i+1; j < count; j++) + if (out[j] != -1) + { + next = out[j]; + break; + } + + if (prev != -1 && next != -1) + out[i] = (prev + next) / 2; + else + out[i] = 0; + } + } + } } void @@ -161,8 +229,8 @@ void draw_graph_LED (CPUGraph *base, cairo_t *cr, gint w, gint h) { - gint nrx = (w + 1) / 3; - gint nry = (h + 1) / 2; + const gint nrx = (w + 2) / 3; + const gint nry = (h + 1) / 2; gint x, y; const gint64 step = 1000 * (gint64) get_update_interval_ms (base->update_interval); gint64 t0; @@ -176,7 +244,7 @@ for (x = 0; x * 3 < w; x++) { - gint idx = nrx - x; + const gint idx = nrx - x - 1; gint limit; if (G_LIKELY (idx >= 0 && idx < nrx)) @@ -211,8 +279,12 @@ void draw_graph_no_history (CPUGraph *base, cairo_t *cr, gint w, gint h) { - gfloat usage = base->history.data[base->history.offset].value; - gint tmp = 0; + gfloat usage; + + if (G_UNLIKELY (base->history.data == NULL)) + return; + + usage = base->history.data[base->history.offset].value; if (usage < base->load_threshold) usage = 0; @@ -228,6 +300,7 @@ else { const gint h_usage = h - (gint) roundf (usage); + gint tmp = 0; gint y; for (y = h - 1; y >= h_usage; y--, tmp++) { @@ -260,19 +333,19 @@ cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE); cairo_set_line_width (cr, 1); - for (x = 0; x * 6 < w; x++) + for (x = 0; x < w; x += 6) { - /* draw line */ - cairo_move_to (cr, x * 6 + 0.5, 0.5); - cairo_line_to (cr, x * 6 + 0.5, h - 1 + 0.5); + /* draw vertical line */ + cairo_move_to (cr, x + 0.5, 0.5); + cairo_line_to (cr, x + 0.5, h - 1 + 0.5); cairo_stroke (cr); } - for (y = 0; y * 4 < h; y++) + for (y = 0; y < h; y += 4) { - /* draw line */ - cairo_move_to (cr, 0.5, y * 4 + 0.5); - cairo_line_to (cr, w - 1 + 0.5, y * 4 + 0.5); + /* draw horizontal line */ + cairo_move_to (cr, 0.5, y + 0.5); + cairo_line_to (cr, w - 1 + 0.5, y + 0.5); cairo_stroke (cr); } @@ -280,7 +353,7 @@ cairo_save (cr); cairo_set_line_width (cr, thickness); - last = (point) {0, h}; + last = (point) {}; for (x = 0; x < w; x++) { gfloat load, usage; @@ -293,10 +366,12 @@ current.x = x; current.y = h + (thickness-1)/2 - usage; + if (x == 0) + last = current; /* draw line */ - cairo_move_to (cr, current.x + 0.5, current.y + 0.5); - cairo_line_to (cr, last.x + 0.5, last.y + 0.5); + cairo_move_to (cr, last.x + 0.5, last.y + 0.5); + cairo_line_to (cr, current.x + 0.5, current.y + 0.5); cairo_stroke (cr); last = current; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/properties.c new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/properties.c --- old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/properties.c 2021-01-30 15:12:10.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/properties.c 2021-02-14 18:45:27.000000000 +0100 @@ -41,6 +41,7 @@ GtkWidget *color_mode_combobox; GtkBox *hbox_highlight_smt, *hbox_in_terminal, *hbox_startup_notification; GtkLabel *smt_stats; + gchar *smt_stats_tooltip; guint timeout_id; } CPUGraphOptions; @@ -152,7 +153,7 @@ GtkWidget *label, *notebook; GtkSizeGroup *sg; CPUGraphOptions *dlg_data; - gchar *smt_issues_tooltip, *smt_stats_tooltip; + gchar *smt_issues_tooltip; xfce_panel_plugin_block_menu (plugin); @@ -188,7 +189,7 @@ base->startup_notification, change_startup_notification, dlg_data); smt_issues_tooltip = _("Color used to highlight potentially suboptimal\nplacement of threads on CPUs with SMT"); - smt_stats_tooltip = g_strdup_printf("%s\n%s", + dlg_data->smt_stats_tooltip = g_strdup_printf("%s\n%s", _("'Overall' is showing the impact on the overall performance of the machine."), _("'Hotspots' is showing the momentary performance impact on just the threads involved in suboptimal SMT scheduling decisions.")); @@ -214,7 +215,6 @@ vbox3 = create_tab (); dlg_data->smt_stats = create_label_line (vbox3, ""); - gtk_widget_set_tooltip_text (GTK_WIDGET (dlg_data->smt_stats), smt_stats_tooltip); notebook = gtk_notebook_new (); gtk_container_set_border_width (GTK_CONTAINER (notebook), BORDER - 2); @@ -233,8 +233,6 @@ update_sensitivity (dlg_data); gtk_widget_show_all (dlg); - - g_free (smt_stats_tooltip); } static GtkBox * @@ -337,6 +335,7 @@ { if (data->timeout_id) g_source_remove (data->timeout_id); + g_free (data->smt_stats_tooltip); g_free (data); } @@ -384,7 +383,7 @@ else hbox = create_option_line (vbox, sg, _("Height:"), NULL); - size = gtk_spin_button_new_with_range (10, 128, 1); + size = gtk_spin_button_new_with_range (MIN_SIZE, MAX_SIZE, 1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (size), base->size); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (size), FALSE, FALSE, 0); g_signal_connect (size, "value-changed", G_CALLBACK (change_size), base); @@ -673,6 +672,7 @@ { const CPUGraph *base = data->base; gchar *smt_text; + gboolean show_tooltip = FALSE; if (base->topology) { @@ -716,6 +716,8 @@ smt_text = g_strdup_printf ("%s\n%s\n%s\n\t%s\n\t%s", smt_detected, lines[0], lines[1], lines[2], lines[3]); + + show_tooltip = TRUE; } } else @@ -729,7 +731,10 @@ } if (strcmp (gtk_label_get_text (data->smt_stats), smt_text)) + { gtk_label_set_text (data->smt_stats, smt_text); + gtk_widget_set_tooltip_text (GTK_WIDGET (data->smt_stats), show_tooltip ? data->smt_stats_tooltip : ""); + } g_free (smt_text); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/settings.c new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/settings.c --- old/xfce4-cpugraph-plugin-1.2.1/panel-plugin/settings.c 2021-01-30 15:12:10.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/panel-plugin/settings.c 2021-02-14 18:45:27.000000000 +0100 @@ -110,31 +110,34 @@ } } - switch (mode) - { - case MODE_DISABLED: - case MODE_NORMAL: - case MODE_LED: - case MODE_NO_HISTORY: - case MODE_GRID: - break; - default: - mode = MODE_NORMAL; - } + xfce_rc_close (rc); + } + } - switch (rate) - { - case RATE_FASTEST: - case RATE_FAST: - case RATE_NORMAL: - case RATE_SLOW: - case RATE_SLOWEST: - break; - default: - rate = RATE_NORMAL; - } + // Validate settings + { + switch (mode) + { + case MODE_DISABLED: + case MODE_NORMAL: + case MODE_LED: + case MODE_NO_HISTORY: + case MODE_GRID: + break; + default: + mode = MODE_NORMAL; + } - xfce_rc_close (rc); + switch (rate) + { + case RATE_FASTEST: + case RATE_FAST: + case RATE_NORMAL: + case RATE_SLOW: + case RATE_SLOWEST: + break; + default: + rate = RATE_NORMAL; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/po/ca.po new/xfce4-cpugraph-plugin-1.2.2/po/ca.po --- old/xfce4-cpugraph-plugin-1.2.1/po/ca.po 2021-01-30 15:30:22.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/po/ca.po 2021-02-14 18:50:14.000000000 +0100 @@ -12,8 +12,8 @@ "Project-Id-Version: Xfce Panel Plugins\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-13 00:48+0100\n" -"PO-Revision-Date: 2021-01-12 23:48+0000\n" -"Last-Translator: Xfce Bot <transi...@xfce.org>\n" +"PO-Revision-Date: 2021-02-03 08:09+0000\n" +"Last-Translator: Robert Antoni Buj Gelonch <r...@fedoraproject.org>\n" "Language-Team: Catalan (http://www.transifex.com/xfce/xfce-panel-plugins/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -27,7 +27,7 @@ #: ../panel-plugin/cpu.c:157 msgid "Copyright (c) 2003-2021\n" -msgstr "" +msgstr "Drets d'autor (c) 2003-2021\n" #: ../panel-plugin/cpu.c:567 #, c-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xfce4-cpugraph-plugin-1.2.1/po/el.po new/xfce4-cpugraph-plugin-1.2.2/po/el.po --- old/xfce4-cpugraph-plugin-1.2.1/po/el.po 2021-01-30 15:30:21.000000000 +0100 +++ new/xfce4-cpugraph-plugin-1.2.2/po/el.po 2021-02-14 18:50:14.000000000 +0100 @@ -10,8 +10,8 @@ "Project-Id-Version: Xfce Panel Plugins\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-13 00:48+0100\n" -"PO-Revision-Date: 2021-01-12 23:48+0000\n" -"Last-Translator: Xfce Bot <transi...@xfce.org>\n" +"PO-Revision-Date: 2021-02-14 08:08+0000\n" +"Last-Translator: Ioannis LM\n" "Language-Team: Greek (http://www.transifex.com/xfce/xfce-panel-plugins/language/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,7 +25,7 @@ #: ../panel-plugin/cpu.c:157 msgid "Copyright (c) 2003-2021\n" -msgstr "" +msgstr "???????????????????? ???????????????????? (c) 2003-2021\n" #: ../panel-plugin/cpu.c:567 #, c-format