Commits

Kurt Hindenburg authored 0ec59c5f169
gkrellm: update commits from 2.3.10 onward from git master branch
No tags

sysutils/gkrellm/files/patch-master-commits.diff

Modified
226 226 +++ b/src/battery.c
227 227 @@ -382,7 +382,7 @@ estimate_battery_time_left(Battery *bat)
228 228 /* charging, use exponential: eta =~ 2.5 * time-constant (~=92%) */
229 229 eta = -2.5 * dt/60 / (log(1 - (gdouble)dp/(gdouble)(p+dp)));
230 230 else
231 231 - eta = abs((gdouble)p / rate); /* use linear */
232 232 + eta = fabs((gdouble)p / rate); /* use linear */
233 233
234 234 #ifdef BAT_ESTIMATE_DEBUG
235 235 fprintf(stderr, "eta = %.2f\t", eta);
236 +diff --git a/src/client.c b/src/client.c
237 +index e644eba..8f9d5f8 100644
238 +--- a/src/client.c
239 ++++ b/src/client.c
240 +@@ -1787,6 +1787,11 @@ read_server_setup(gint fd)
241 + void
242 + gkrellm_client_mode_disconnect(void)
243 + {
244 ++ if (client_input_id != 0)
245 ++ {
246 ++ gdk_input_remove(client_input_id);
247 ++ client_input_id = 0;
248 ++ }
249 + if (client_fd >= 0)
250 + {
251 + gkrellm_debug(DEBUG_CLIENT, "gkrellm_client_mode_disconnect(); " \
252 +@@ -1795,8 +1800,6 @@ gkrellm_client_mode_disconnect(void)
253 + }
254 + client_fd = -1;
255 + server_alive = FALSE;
256 +- gdk_input_remove(client_input_id);
257 +- client_input_id = 0;
258 + }
259 +
260 + static void
236 261 diff --git a/src/fs.c b/src/fs.c
237 -index 626bc74..6c73f41 100644
262 +index 626bc74..5db65b1 100644
238 263 --- a/src/fs.c
239 264 +++ b/src/fs.c
240 265 @@ -460,7 +460,7 @@ fs_draw_decal_text(FSmon *fs, gint value)
241 266 GkrellmDecal *d;
242 267 GkrellmTextstyle ts_save;
243 268 gchar buf[128];
244 269 - gint x_off, w;
245 270 + gint x_off, w = 0;
246 271
247 272 if (value == 0)
248 273 {
274 +@@ -810,7 +810,7 @@ fs_update(void)
275 + if (fs->blocks > 2147483648LL)
276 + fs->krell_factor = 1024 * 1024;
277 + else if (fs->blocks > 2097152LL)
278 +- fs->krell_factor = 1024 * 1024;
279 ++ fs->krell_factor = 1024;
280 + else
281 + fs->krell_factor = 1;
282 + }
249 283 diff --git a/src/gkrellm-sysdeps.h b/src/gkrellm-sysdeps.h
250 284 index 9a0f8fc..07295fb 100644
251 285 --- a/src/gkrellm-sysdeps.h
252 286 +++ b/src/gkrellm-sysdeps.h
253 287 @@ -139,7 +139,7 @@ void gkrellm_proc_assign_users(gint n_users);
254 288 | the device numbers to an identifying name. It may also set an order
255 289 | value for the name to control the stacking order of the disk chart.
256 290 | If gkrellm_disk_assign_data_by_name() is used, then an order may be
257 291 -| optionally specifed with gkrellm_sys_disk_order_from_name().
258 292 +| optionally specified with gkrellm_sys_disk_order_from_name().
445 479 @@ -4029,7 +4036,7 @@ gkrellm_sys_sensors_init(void)
446 480
447 481 sensors_nvidia_smi_read(TRUE);
448 482
449 483 - /* nvidia-settings GPU core & ambient temperatues
450 484 + /* nvidia-settings GPU core & ambient temperatures
451 485 */
452 486 cnt = sensors_nvidia_settings_ngpus();
453 487 ngpus_added = 0;
454 488 diff --git a/src/utils.c b/src/utils.c
455 -index f5300df..0190ed8 100644
489 +index f6162e9..0190ed8 100644
456 490 --- a/src/utils.c
457 491 +++ b/src/utils.c
458 -@@ -370,7 +370,8 @@ gkrellm_text_extents(PangoFontDescription *font_desc, gchar *text,
492 +@@ -276,13 +276,17 @@ gkrellm_format_size_abbrev(gchar *buf, size_t buflen, gfloat size,
493 + {
494 + gfloat abs_size;
495 + gint i;
496 ++ int ret;
497 +
498 + abs_size = (size < 0.0) ? -size : size;
499 +
500 + for (i = 0; i < tbl_size - 1; ++i)
501 + if (abs_size < tbl[i].limit)
502 + break;
503 +- return snprintf(buf, buflen, tbl[i].format, size / tbl[i].divisor);
504 ++ ret = snprintf(buf, buflen, tbl[i].format, size / tbl[i].divisor);
505 ++ if (ret < 0 || ret >= buflen)
506 ++ return 0;
507 ++ return ret;
508 + }
509 +
510 +
511 +@@ -366,7 +370,8 @@ gkrellm_text_extents(PangoFontDescription *font_desc, gchar *text,
459 512 else
460 513 {
461 514 utf8 = g_locale_to_utf8(text, -1, NULL, NULL, NULL);
462 515 - pango_layout_set_text(layout, utf8, len);
463 516 + if (utf8)
464 517 + pango_layout_set_text(layout, utf8, len);
465 518 g_free(utf8);
466 519 }
467 520 iter = pango_layout_get_iter(layout);
468 -@@ -460,7 +461,8 @@ gkrellm_gdk_draw_text(GdkDrawable *drawable, PangoFontDescription *font_desc,
521 +@@ -456,7 +461,8 @@ gkrellm_gdk_draw_text(GdkDrawable *drawable, PangoFontDescription *font_desc,
469 522
470 523 layout = gtk_widget_create_pango_layout(gkrellm_get_top_window(), NULL);
471 524 pango_layout_set_font_description(layout, font_desc);
472 525 - pango_layout_set_text(layout, string, len);
473 526 + if (g_utf8_validate(string, -1, NULL))
474 527 + pango_layout_set_text(layout, string, len);
475 528 gdk_draw_layout(drawable, gc, x, y, layout);
476 529 g_object_unref(layout);
477 530 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut