Hello community,

here is the log from the commit of package libdazzle for openSUSE:Factory 
checked in at 2019-05-10 09:17:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdazzle (Old)
 and      /work/SRC/openSUSE:Factory/.libdazzle.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdazzle"

Fri May 10 09:17:34 2019 rev:15 rq:701615 version:3.32.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdazzle/libdazzle.changes      2019-04-17 
10:06:21.822641165 +0200
+++ /work/SRC/openSUSE:Factory/.libdazzle.new.5148/libdazzle.changes    
2019-05-10 09:17:35.632261001 +0200
@@ -1,0 +2,9 @@
+Tue May  7 13:20:25 UTC 2019 - Bjørn Lie <[email protected]>
+
+- Update to version 3.32.2:
+  + Improved fuzzy highlighting pango markup when <> are
+    discovered.
+  + Fix improper GValue usage in DzlTab.
+  + Documentation improvements.
+
+-------------------------------------------------------------------

Old:
----
  libdazzle-3.32.1.tar.xz

New:
----
  libdazzle-3.32.2.tar.xz

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

Other differences:
------------------
++++++ libdazzle.spec ++++++
--- /var/tmp/diff_new_pack.ysKtjZ/_old  2019-05-10 09:17:36.420262220 +0200
+++ /var/tmp/diff_new_pack.ysKtjZ/_new  2019-05-10 09:17:36.420262220 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           libdazzle
-Version:        3.32.1
+Version:        3.32.2
 Release:        0
 Summary:        Collection of fancy features for GLib and Gtk+
 License:        GPL-3.0-or-later AND LGPL-2.1-or-later

++++++ libdazzle-3.32.1.tar.xz -> libdazzle-3.32.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.32.1/NEWS new/libdazzle-3.32.2/NEWS
--- old/libdazzle-3.32.1/NEWS   2019-04-11 02:46:01.000000000 +0200
+++ new/libdazzle-3.32.2/NEWS   2019-05-06 23:22:48.000000000 +0200
@@ -1,4 +1,14 @@
 ==============
+Version 3.32.2
+==============
+
+Changes in this release:
+
+ • Improved fuzzy highlighting pango markup when <> are discovered
+ • Fix improper GValue usage in DzlTab
+ • Documentation improvements
+
+==============
 Version 3.32.1
 ==============
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.32.1/meson.build 
new/libdazzle-3.32.2/meson.build
--- old/libdazzle-3.32.1/meson.build    2019-04-11 02:46:01.000000000 +0200
+++ new/libdazzle-3.32.2/meson.build    2019-05-06 23:22:48.000000000 +0200
@@ -1,5 +1,5 @@
 project('libdazzle', 'c',
-          version: '3.32.1',
+          version: '3.32.2',
           license: 'GPLv3+',
     meson_version: '>= 0.49.0',
   default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 
'c_std=gnu11' ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.32.1/src/panel/dzl-tab.c 
new/libdazzle-3.32.2/src/panel/dzl-tab.c
--- old/libdazzle-3.32.1/src/panel/dzl-tab.c    2019-04-11 02:46:01.000000000 
+0200
+++ new/libdazzle-3.32.2/src/panel/dzl-tab.c    2019-05-06 23:22:48.000000000 
+0200
@@ -651,7 +651,7 @@
       break;
 
     case PROP_ACTION_TARGET:
-      g_value_set_boxed (value, priv->action_target_value);
+      g_value_set_variant (value, priv->action_target_value);
       break;
 
     case PROP_CAN_CLOSE:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.32.1/src/search/dzl-fuzzy-mutable-index.c 
new/libdazzle-3.32.2/src/search/dzl-fuzzy-mutable-index.c
--- old/libdazzle-3.32.1/src/search/dzl-fuzzy-mutable-index.c   2019-04-11 
02:46:01.000000000 +0200
+++ new/libdazzle-3.32.2/src/search/dzl-fuzzy-mutable-index.c   2019-05-06 
23:22:48.000000000 +0200
@@ -595,16 +595,21 @@
 
       if (str_ch == '&')
         {
-          if (0 == strncmp (str, "&amp;", 5))
-            {
-              str += 4;
-              g_string_append (ret, "&amp;");
-              continue;
-            }
-          else if (0 == strncmp (str, "&apos;", 6))
+          const gchar *entity_end = strchr (str, ';');
+
+          if (entity_end != NULL)
             {
-              str += 5;
-              g_string_append (ret, "&apos;");
+              gsize len = entity_end - str;
+
+              if (element_open)
+                {
+                  g_string_append (ret, end);
+                  element_open = FALSE;
+                }
+
+              g_string_append_len (ret, str, len + 1);
+              str += len;
+
               continue;
             }
         }
@@ -618,7 +623,12 @@
               element_open = TRUE;
             }
 
-          g_string_append_unichar (ret, str_ch);
+          if (str_ch == '<')
+            g_string_append (ret, "&lt;");
+          else if (str_ch == '>')
+            g_string_append (ret, "&gt;");
+          else
+            g_string_append_unichar (ret, str_ch);
 
           /* TODO: We could seek to the next char and append in a batch. */
           match = g_utf8_next_char (match);
@@ -631,7 +641,12 @@
               element_open = FALSE;
             }
 
-          g_string_append_unichar (ret, str_ch);
+          if (str_ch == '<')
+            g_string_append (ret, "&lt;");
+          else if (str_ch == '>')
+            g_string_append (ret, "&gt;");
+          else
+            g_string_append_unichar (ret, str_ch);
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.32.1/src/shortcuts/dzl-shortcut-tooltip.c 
new/libdazzle-3.32.2/src/shortcuts/dzl-shortcut-tooltip.c
--- old/libdazzle-3.32.1/src/shortcuts/dzl-shortcut-tooltip.c   2019-04-11 
02:46:01.000000000 +0200
+++ new/libdazzle-3.32.2/src/shortcuts/dzl-shortcut-tooltip.c   2019-05-06 
23:22:48.000000000 +0200
@@ -478,7 +478,7 @@
  *
  * Returns: (nullable): an override accel, or %NULL
  *
- * Since: 3.320
+ * Since: 3.32
  */
 const gchar *
 dzl_shortcut_tooltip_get_accel (DzlShortcutTooltip *self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.32.1/tests/meson.build 
new/libdazzle-3.32.2/tests/meson.build
--- old/libdazzle-3.32.1/tests/meson.build      2019-04-11 02:46:01.000000000 
+0200
+++ new/libdazzle-3.32.2/tests/meson.build      2019-05-06 23:22:48.000000000 
+0200
@@ -398,4 +398,11 @@
   dependencies: libdazzle_deps + [libdazzle_dep],
 )
 
-endif
\ No newline at end of file
+test_fuzzy_highlight = executable('test-fuzzy-highlight', 
'test-fuzzy-highlight.c',
+        c_args: test_cflags,
+     link_args: test_link_args,
+  dependencies: libdazzle_deps + [libdazzle_dep],
+)
+test('test-fuzzy-highlight', test_fuzzy_highlight, env: test_env)
+
+endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.32.1/tests/test-fuzzy-highlight.c 
new/libdazzle-3.32.2/tests/test-fuzzy-highlight.c
--- old/libdazzle-3.32.1/tests/test-fuzzy-highlight.c   1970-01-01 
01:00:00.000000000 +0100
+++ new/libdazzle-3.32.2/tests/test-fuzzy-highlight.c   2019-05-06 
23:22:48.000000000 +0200
@@ -0,0 +1,53 @@
+/* test-fuzzy-highlight.c
+ *
+ * Copyright 2019 Christian Hergert <[email protected]>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#include <dazzle.h>
+
+static void
+test_highlight (void)
+{
+  static const struct {
+    const gchar *needle;
+    const gchar *haystack;
+    const gchar *expected;
+  } tests[] = {
+    { "with tab", "with <Tab>", "<b>with </b>&lt;<b>Tab</b>&gt;" },
+    { "with t", "with <Tab>", "<b>with </b>&lt;<b>T</b>ab&gt;" },
+    { "with tuff", "with &apos; stuff", "<b>with </b>&apos; s<b>tuff</b>" },
+    { "gtkwdg", "gtk_widget_show", "<b>gtk</b>_<b>w</b>i<b>dg</b>et_show" },
+  };
+
+  for (guint i = 0; i < G_N_ELEMENTS (tests); i++)
+    {
+      g_autofree gchar *highlight = dzl_fuzzy_highlight (tests[i].haystack,
+                                                         tests[i].needle,
+                                                         FALSE);
+      g_assert_cmpstr (highlight, ==, tests[i].expected);
+    }
+}
+
+gint
+main (gint argc,
+      gchar *argv[])
+{
+  g_test_init (&argc, &argv, NULL);
+  g_test_add_func ("/Dazzle/Fuzzy/highlight", test_highlight);
+  return g_test_run ();
+}


Reply via email to