Hello community,

here is the log from the commit of package libzbc for openSUSE:Factory checked 
in at 2019-12-12 23:20:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzbc (Old)
 and      /work/SRC/openSUSE:Factory/.libzbc.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libzbc"

Thu Dec 12 23:20:15 2019 rev:13 rq:756356 version:5.8.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/libzbc/libzbc.changes    2019-09-04 
09:14:36.342944290 +0200
+++ /work/SRC/openSUSE:Factory/.libzbc.new.4691/libzbc.changes  2019-12-12 
23:20:47.542199326 +0100
@@ -1,0 +2,9 @@
+Thu Dec 12 17:10:38 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Update to release 5.8.3
+  * This release fixes a bug in gzviewer and compilation
+    warnings. It also adds the --disable-gui configuration option
+    to allow manually disabling the compilation of GUI tools
+    (gzbc and gzviewer).
+
+-------------------------------------------------------------------

Old:
----
  v5.8.2.tar.gz

New:
----
  v5.8.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libzbc.spec ++++++
--- /var/tmp/diff_new_pack.4UDAms/_old  2019-12-12 23:20:48.018199284 +0100
+++ /var/tmp/diff_new_pack.4UDAms/_new  2019-12-12 23:20:48.022199283 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libzbc
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,8 +17,8 @@
 
 
 Name:           libzbc
-%define lname   libzbc-5_8_2
-Version:        5.8.2
+%define lname   libzbc-5_8_3
+Version:        5.8.3
 Release:        0
 Summary:        Library for manipulating ZBC and ZAC disks
 License:        BSD-2-Clause AND LGPL-3.0-or-later

++++++ v5.8.2.tar.gz -> v5.8.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzbc-5.8.2/configure.ac 
new/libzbc-5.8.3/configure.ac
--- old/libzbc-5.8.2/configure.ac       2019-09-02 10:18:32.000000000 +0200
+++ new/libzbc-5.8.3/configure.ac       2019-12-12 17:46:42.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT([libzbc], [5.8.2],
+AC_INIT([libzbc], [5.8.3],
        [[email protected], [email protected]],
        [libzbc], [https://github.com/hgst/libzbc])
 AC_CONFIG_AUX_DIR([build-aux])
@@ -33,9 +33,18 @@
 
 # Conditionals
 
-# Build gzbc only if GTK3 is installed.
-PKG_CHECK_MODULES([GTK], [gtk+-3.0], [HAVE_GTK3=1], [HAVE_GTK3=0])
-AM_CONDITIONAL([BUILD_GUI], [test "$HAVE_GTK3" -eq 1])
+AC_ARG_ENABLE([gui],
+       AS_HELP_STRING([--disable-gui], [Disable build of GUI tools (gzbc and 
gzviewer) [default=no]]))
+AS_IF([test "x$enable_gui" != "xno"],
+[
+       # Build gzbc only if GTK3 is installed.
+       PKG_CHECK_MODULES([GTK], [gtk+-3.0], [HAVE_GTK3=1], [HAVE_GTK3=0])
+       AM_CONDITIONAL([BUILD_GUI], [test "$HAVE_GTK3" -eq 1])
+       AM_CONDITIONAL([BUILD_GUI], [test "$HAVE_GTK3" -eq 1])
+],
+[
+       AM_CONDITIONAL([BUILD_GUI], false)
+])
 
 # Build test suite
 AC_ARG_WITH([test],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzbc-5.8.2/tools/gzviewer/gzviewer_if.c 
new/libzbc-5.8.3/tools/gzviewer/gzviewer_if.c
--- old/libzbc-5.8.2/tools/gzviewer/gzviewer_if.c       2019-09-02 
10:18:32.000000000 +0200
+++ new/libzbc-5.8.3/tools/gzviewer/gzviewer_if.c       2019-12-12 
17:46:42.000000000 +0100
@@ -23,12 +23,14 @@
 
 #include "gzviewer.h"
 
-static void gzv_set_zone_info(struct gzv_zone *zone)
+static void gzv_set_zone_tooltip(struct gzv_zone *zone)
 {
+       struct zbc_zone *zbcz = zone->zbc_zone;
        char info[512];
 
-       if (!zone->zbc_zone) {
-               gtk_widget_set_tooltip_markup(zone->da, NULL);
+       if (!zbcz) {
+               gtk_widget_set_has_tooltip(GTK_WIDGET(zone->da), false);
+               gtk_widget_set_tooltip_markup(GTK_WIDGET(zone->da), NULL);
                return;
        }
 
@@ -38,12 +40,11 @@
                 "  - Condition: %s\n"
                 "  - Start sector: %llu\n"
                 "  - Length: %llu 512-B sectors",
-                zone->zno,
-                zbc_zone_type_str(zone->zbc_zone->zbz_type),
-                zbc_zone_condition_str(zone->zbc_zone->zbz_condition),
-                zbc_zone_start(zone->zbc_zone),
-                zbc_zone_length(zone->zbc_zone));
-       gtk_widget_set_tooltip_markup(zone->da, info);
+                zone->zno, zbc_zone_type_str(zbcz->zbz_type),
+                zbc_zone_condition_str(zbcz->zbz_condition),
+                zbc_zone_start(zbcz), zbc_zone_length(zbcz));
+       gtk_widget_set_tooltip_markup(GTK_WIDGET(zone->da), info);
+       gtk_widget_set_has_tooltip(GTK_WIDGET(zone->da), true);
 }
 
 static void gzv_if_update(void)
@@ -55,25 +56,27 @@
                gzv.grid_zno_first = gzv.nr_zones / gzv.nr_col;
 
        if (gzv_report_zones(gzv.grid_zno_first, gzv.nr_grid_zones))
-               return;
+               goto out;
 
        z = gzv.grid_zno_first;
        for (i = 0; i < gzv.nr_grid_zones; i++) {
                gzv.grid_zones[i].zno = z;
+               zbcz = gzv.grid_zones[i].zbc_zone;
                if (z >= gzv.nr_zones) {
+                       if (zbcz)
+                               gtk_widget_hide(gzv.grid_zones[i].da);
                        gzv.grid_zones[i].zbc_zone = NULL;
-                       gtk_widget_hide(gzv.grid_zones[i].da);
                } else {
-                       zbcz = gzv.grid_zones[i].zbc_zone;
                        gzv.grid_zones[i].zbc_zone = &gzv.zbc_zones[z];
                        if (!zbcz)
                                gtk_widget_show(gzv.grid_zones[i].da);
                }
-               gzv_set_zone_info(&gzv.grid_zones[i]);
+               gzv_set_zone_tooltip(&gzv.grid_zones[i]);
                gtk_widget_queue_draw(gzv.grid_zones[i].da);
                z++;
        }
 
+out:
        gzv.last_refresh = gzv_msec();
 }
 
@@ -130,18 +133,16 @@
        cairo_fill(cr);
 
        if (!zbc_zone_conventional(z) &&
-           (zbc_zone_imp_open(z) ||
-            zbc_zone_exp_open(z) ||
-            zbc_zone_closed(z))) {
-
+           zbc_zone_wp(z) > zbc_zone_start(z)) {
                /* Written space in zone */
-               w = ((long long)allocation.width * zbc_zone_length(z)) /
-                    (zbc_zone_wp(z) - zbc_zone_start(z));
-               if (w) {
-                       gdk_cairo_set_source_rgba(cr, &gzv.seqw_color);
-                       cairo_rectangle(cr, 0, 0, w, allocation.height);
-                       cairo_fill(cr);
-               }
+               w = (long long)allocation.width *
+                    (zbc_zone_wp(z) - zbc_zone_start(z)) / zbc_zone_length(z);
+               if (w > allocation.width)
+                       w = allocation.width;
+
+               gdk_cairo_set_source_rgba(cr, &gzv.seqw_color);
+               cairo_rectangle(cr, 0, 0, w, allocation.height);
+               cairo_fill(cr);
        }
 
        /* Draw zone number */
@@ -261,7 +262,7 @@
        gtk_widget_show(grid);
 
        for (r = 0; r < gzv.nr_row; r++) {
-               for (c = 0; c < gzv.nr_col && z < gzv.nr_zones; c++) {
+               for (c = 0; c < gzv.nr_col; c++) {
                        zone = &gzv.grid_zones[z];
 
                        da = gtk_drawing_area_new();
@@ -272,7 +273,6 @@
                        gtk_grid_attach(GTK_GRID(grid), da, c, r, 1, 1);
                        g_signal_connect(da, "draw",
                                         G_CALLBACK(gzv_if_zone_draw_cb), zone);
-
                        z++;
                }
        }


Reply via email to