Hello community,

here is the log from the commit of package libdazzle for openSUSE:Factory 
checked in at 2017-09-13 21:53:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdazzle (Old)
 and      /work/SRC/openSUSE:Factory/.libdazzle.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdazzle"

Wed Sep 13 21:53:13 2017 rev:2 rq:523539 version:3.26.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdazzle/libdazzle.changes      2017-08-30 
16:22:12.909828652 +0200
+++ /work/SRC/openSUSE:Factory/.libdazzle.new/libdazzle.changes 2017-09-13 
21:53:16.928480399 +0200
@@ -1,0 +2,42 @@
+Mon Sep 11 23:19:18 UTC 2017 - [email protected]
+
+- Update to version 3.26.0:
+  + Fix tab/shift+tab to change focus when using shortcut manager.
+  + Manually set marshaller and va marshallers on DzlTreeBuilder
+    which helps slightly with performance of signal emission.
+  + Various Mingw build fixes.
+- Add gtk-doc BuildRequires, build documentation.
+- Pass  enable_tracing=false, enable_profiling=false,
+  enable_rdtscp=false, enable_tools=true, with_introspection=true,
+  with_vapi=true, enable_gtk_doc=true and enable_tests=false to
+  meson, ensure we build the features we want.
+
+-------------------------------------------------------------------
+Thu Sep  7 07:54:37 UTC 2017 - [email protected]
+
+- Update to version 3.25.92:
+  + Enforce GNU11 C standard when configuring project.
+  + DzlApplicationWindow automatically queries the shortcut
+    manager.
+  + The shortcut manager now checks GtkApplication registered
+    accelerators providing an improved migration strategy for
+    applications.
+  + Lifecycle tests were removed from the test-fuzzy-index as they
+    were racy via delayed disposal of threaded workers. This should
+    fix unit tests for various distributions on less common
+    hardware.
+  + Menu buttons now remove the proper section item when handling
+    GMenuModel changes.
+  + Our meson-based build system now checks if version-script is
+    supported and only applies the ABI map in that case. We may
+    consider switching to export macros in the future.
+  + Counters are now disabled on Windows.
+  + Various compiler pre-processor checks have been improved.
+  + A fallback for strcasecmp() is included for Windows.
+  + DzlSuggestion will now use intern'd strings for icon-names to
+    help reduce the number of duplicate strings in memory.
+  + Various CSS styling refinements.
+  + DzlListBox fixed a lingering pointer to the cached row during
+    disposal.
+
+-------------------------------------------------------------------

Old:
----
  libdazzle-3.25.91.tar.xz

New:
----
  libdazzle-3.26.0.tar.xz

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

Other differences:
------------------
++++++ libdazzle.spec ++++++
--- /var/tmp/diff_new_pack.V3sGD0/_old  2017-09-13 21:53:17.460405558 +0200
+++ /var/tmp/diff_new_pack.V3sGD0/_new  2017-09-13 21:53:17.464404996 +0200
@@ -18,13 +18,14 @@
 
 %define base 3.25
 Name:           libdazzle
-Version:        3.25.91
+Version:        3.26.0
 Release:        0
 Summary:        Collection of fancy features for GLib and Gtk+
 License:        GPL-3.0+ AND LGPL-2.1+
 Group:          Development/Tools/Other
 Url:            https://git.gnome.org/browse/libdazzle/
-Source0:        
https://download.gnome.org/sources/%{name}/%{base}/%{name}-%{version}.tar.xz
+Source0:        
http://download.gnome.org/sources/libdazzle/3.26/%{name}-%{version}.tar.xz
+BuildRequires:  gtk-doc
 BuildRequires:  meson
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(glib-2.0)
@@ -82,7 +83,16 @@
 %autosetup
 
 %build
-%{meson}
+%{meson} \
+       -Denable_tracing=false \
+       -Denable_profiling=false \
+       -Denable_rdtscp=false \
+       -Denable_tools=true \
+       -Dwith_introspection=true \
+       -Dwith_vapi=true \
+       -Denable_gtk_doc=true \
+       -Denable_tests=false \
+       %{nil}
 %{meson_build}
 
 %install
@@ -103,6 +113,7 @@
 
 %files devel
 %doc AUTHORS CONTRIBUTING.md NEWS README.md
+%doc %{_datadir}/gtk-doc/html/libdazzle/
 %{_includedir}/libdazzle-1.0/
 %{_datadir}/gir-1.0/Dazzle-1.0.gir
 %{_libdir}/libdazzle-1.0.so

++++++ libdazzle-3.25.91.tar.xz -> libdazzle-3.26.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/NEWS new/libdazzle-3.26.0/NEWS
--- old/libdazzle-3.25.91/NEWS  2017-08-25 22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/NEWS   2017-09-11 23:25:08.000000000 +0200
@@ -1,3 +1,45 @@
+==============
+Version 3.26.0
+==============
+
+This is our first stable release! Thanks to everyone involved in making
+that happen!
+
+Changes in this release:
+
+ • Fix tab/shift+tab to change focus when using shortcut manager.
+ • Manually set marshaller and va marshallers on DzlTreeBuilder
+   which helps slightly with performance of signal emission.
+ • Various Mingw build fixes.
+
+===============
+Version 3.25.92
+===============
+
+Changes in this release:
+
+ • Enforce GNU11 C standard when configuring project.
+ • DzlApplicationWindow automatically queries the shortcut manager.
+ • The shortcut manager now checks GtkApplication registered accelerators
+   providing an improved migration strategy for applications.
+ • Lifecycle tests were removed from the test-fuzzy-index as they were
+   racy via delayed disposal of threaded workers. This should fix unit
+   tests for various distributions on less common hardware.
+ • Menu buttons now remove the proper section item when handling GMenuModel
+   changes.
+ • Our meson-based build system now checks if version-script is supported
+   and only applies the ABI map in that case. We may consider switching to
+   export macros in the future.
+ • Counters are now disabled on Windows.
+ • Various compiler pre-processor checks have been improved.
+ • A fallback for strcasecmp() is included for Windows.
+ • DzlSuggestion will now use intern'd strings for icon-names to help
+   reduce the number of duplicate strings in memory.
+ • Various CSS styling refinements.
+ • DzlListBox fixed a lingering pointer to the cached row during disposal.
+   This fixes a crash that would occur if GObjectClass.dispose() was called
+   multiple times.
+
 ===============
 Version 3.25.91
 ===============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.25.91/data/themes/shared/shared-suggestions.css 
new/libdazzle-3.26.0/data/themes/shared/shared-suggestions.css
--- old/libdazzle-3.25.91/data/themes/shared/shared-suggestions.css     
2017-08-25 22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/data/themes/shared/shared-suggestions.css      
2017-09-11 23:25:08.000000000 +0200
@@ -44,3 +44,7 @@
   border-bottom: none;
   margin-bottom: 3px;
 }
+
+dzlsuggestionpopover > revealer > box > elastic > scrolledwindow > viewport > 
list > row > box > image:first-child {
+  min-width: 16px;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/meson.build 
new/libdazzle-3.26.0/meson.build
--- old/libdazzle-3.25.91/meson.build   2017-08-25 22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/meson.build    2017-09-11 23:25:08.000000000 +0200
@@ -1,8 +1,8 @@
 project('libdazzle', 'c',
-          version: '3.25.91',
+          version: '3.26.0',
           license: 'GPLv3+',
     meson_version: '>= 0.40.1',
-  default_options: [ 'warning_level=1', 'buildtype=debugoptimized' ],
+  default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 
'c_std=gnu11' ],
 )
 
 version_arr = meson.project_version().split('.')
@@ -84,6 +84,12 @@
   language: 'c'
 )
 
+# Check if we can use version scripts for ABI exports
+ld_supports_version_script = cc.links('''
+  int main (void) { return 0; }
+''', args: '-Wl,--version-script,' + join_paths(meson.source_root(), 
'src/dazzle.map'))
+message('Linker supports --version-script: 
@0@'.format(ld_supports_version_script))
+
 # Setup various paths that subdirectory meson.build files need
 package_subdir = get_option('package_subdir') # When used as subproject
 libdir = join_paths(get_option('libdir'), package_subdir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/app/dzl-application-window.c 
new/libdazzle-3.26.0/src/app/dzl-application-window.c
--- old/libdazzle-3.25.91/src/app/dzl-application-window.c      2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/app/dzl-application-window.c       2017-09-11 
23:25:08.000000000 +0200
@@ -19,11 +19,28 @@
 #define G_LOG_DOMAIN "dzl-application-window"
 
 #include "app/dzl-application-window.h"
+#include "shortcuts/dzl-shortcut-manager.h"
 #include "util/dzl-gtk.h"
 
 #define DEFAULT_DISMISSAL_SECONDS   3
 #define SHOW_HEADER_WITHIN_DISTANCE 5
 
+/**
+ * SECTION:dzl-application-window
+ * @title: DzlApplicationWindow
+ * @short_description: An base application window for applications
+ *
+ * The #DzlApplicationWindow class provides a #GtkApplicationWindow subclass
+ * that integrates well with #DzlApplication. It provides features such as:
+ *
+ *  - Integration with the #DzlShortcutManager for capture/bubble keyboard
+ *    input events.
+ *  - Native support for fullscreen state by re-parenting the #GtkHeaderBar as
+ *    necessary. #DzlApplicationWindow does expect you to use GtkHeaderBar.
+ *
+ * Since: 3.26
+ */
+
 typedef struct
 {
   GtkStack    *titlebar_container;
@@ -36,6 +53,7 @@
   guint        fullscreen_source;
   guint        fullscreen_reveal_source;
   guint        fullscreen : 1;
+  guint        in_key_press : 1;
 } DzlApplicationWindowPrivate;
 
 enum {
@@ -324,6 +342,28 @@
   gtk_container_add (GTK_CONTAINER (priv->event_box), widget);
 }
 
+static gboolean
+dzl_application_window_key_press_event (GtkWidget   *widget,
+                                        GdkEventKey *event)
+{
+  DzlApplicationWindow *self = (DzlApplicationWindow *)widget;
+  DzlApplicationWindowPrivate *priv = 
dzl_application_window_get_instance_private (self);
+  gboolean ret;
+
+  g_assert (DZL_IS_APPLICATION_WINDOW (self));
+  g_assert (event != NULL);
+
+  /* Be re-entrant safe from the shortcut manager */
+  if (priv->in_key_press)
+    return GTK_WIDGET_CLASS 
(dzl_application_window_parent_class)->key_press_event (widget, event);
+
+  priv->in_key_press = TRUE;
+  ret = dzl_shortcut_manager_handle_event (NULL, event, widget);
+  priv->in_key_press = FALSE;
+
+  return ret;
+}
+
 static void
 dzl_application_window_destroy (GtkWidget *widget)
 {
@@ -408,6 +448,7 @@
   object_class->set_property = dzl_application_window_set_property;
 
   widget_class->destroy = dzl_application_window_destroy;
+  widget_class->key_press_event = dzl_application_window_key_press_event;
 
   container_class->add = dzl_application_window_add;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/app/dzl-application.c 
new/libdazzle-3.26.0/src/app/dzl-application.c
--- old/libdazzle-3.25.91/src/app/dzl-application.c     2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/app/dzl-application.c      2017-09-11 
23:25:08.000000000 +0200
@@ -119,7 +119,8 @@
   else
     merge_id = dzl_menu_manager_add_filename (priv->menu_manager, menu_path, 
&error);
 
-  g_hash_table_insert (priv->menu_merge_ids, (gchar *)resource_path, 
GUINT_TO_POINTER (merge_id));
+  if (merge_id != 0)
+    g_hash_table_insert (priv->menu_merge_ids, (gchar *)resource_path, 
GUINT_TO_POINTER (merge_id));
 
   if (error != NULL &&
       !(g_error_matches (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND) 
||
@@ -155,7 +156,11 @@
   /* Remove any merged menus from the @resource_path/gtk/menus.ui */
   merge_id = GPOINTER_TO_UINT (g_hash_table_lookup (priv->menu_merge_ids, 
resource_path));
   if (merge_id != 0)
-    dzl_menu_manager_remove (priv->menu_manager, merge_id);
+    {
+      if (g_hash_table_contains (priv->menu_merge_ids, resource_path))
+        g_hash_table_remove (priv->menu_merge_ids, resource_path);
+      dzl_menu_manager_remove (priv->menu_manager, merge_id);
+    }
 
   /* Remove keythemes path from the shortcuts manager */
   keythemes_path = g_strjoin (NULL, "resource://", resource_path, 
"/shortcuts", NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.25.91/src/menus/dzl-menu-button-section.c 
new/libdazzle-3.26.0/src/menus/dzl-menu-button-section.c
--- old/libdazzle-3.25.91/src/menus/dzl-menu-button-section.c   2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/menus/dzl-menu-button-section.c    2017-09-11 
23:25:08.000000000 +0200
@@ -106,11 +106,12 @@
 
   for (guint i = 0; i < removed; i++)
     {
-      GtkWidget *child = dzl_box_get_nth_child (self->items_box, i);
+      GtkWidget *child = dzl_box_get_nth_child (self->items_box, position);
+
       gtk_widget_destroy (child);
     }
 
-  for (guint i = position; i < position + added; i++)
+  for (guint i = position; i < (position + added); i++)
     {
       DzlMenuButtonItem *item;
       g_autoptr(GVariant) target = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/menus/dzl-menu-button.c 
new/libdazzle-3.26.0/src/menus/dzl-menu-button.c
--- old/libdazzle-3.25.91/src/menus/dzl-menu-button.c   2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/menus/dzl-menu-button.c    2017-09-11 
23:25:08.000000000 +0200
@@ -128,7 +128,7 @@
       gtk_widget_destroy (child);
     }
 
-  for (guint i = position; i < position + added; i++)
+  for (guint i = position; i < (position + added); i++)
     {
       g_autofree gchar *label = NULL;
       g_autoptr(GMenuModel) linked_model = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/menus/dzl-menu-manager.c 
new/libdazzle-3.26.0/src/menus/dzl-menu-manager.c
--- old/libdazzle-3.25.91/src/menus/dzl-menu-manager.c  2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/menus/dzl-menu-manager.c   2017-09-11 
23:25:08.000000000 +0200
@@ -562,6 +562,17 @@
   return merge_id;
 }
 
+/**
+ * dzl_menu_manager_remove:
+ * @self: a #DzlMenuManager
+ * @merge_id: A previously registered merge id
+ *
+ * This removes items from menus that were added as part of a previous
+ * menu merge. Use the value returned from dzl_menu_manager_merge() as
+ * the @merge_id.
+ *
+ * Since: 3.26
+ */
 void
 dzl_menu_manager_remove (DzlMenuManager *self,
                          guint           merge_id)
@@ -586,14 +597,16 @@
       /* Iterate backward so we have a stable loop variable. */
       for (i = n_items - 1; i >= 0; i--)
         {
-          guint item_merge_id;
+          guint item_merge_id = 0;
 
           if (g_menu_model_get_item_attribute (G_MENU_MODEL (menu),
                                                i,
                                                DZL_MENU_ATTRIBUTE_MERGE_ID,
                                                "u", &item_merge_id))
-            if (item_merge_id == merge_id)
-              g_menu_remove (menu, i);
+            {
+              if (item_merge_id == merge_id)
+                g_menu_remove (menu, i);
+            }
         }
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/meson.build 
new/libdazzle-3.26.0/src/meson.build
--- old/libdazzle-3.25.91/src/meson.build       2017-08-25 22:08:59.000000000 
+0200
+++ new/libdazzle-3.26.0/src/meson.build        2017-09-11 23:25:08.000000000 
+0200
@@ -85,6 +85,11 @@
 
 libdazzle_map = join_paths(meson.current_source_dir(), 'dazzle.map')
 
+libdazzle_link_args = []
+if ld_supports_version_script
+libdazzle_link_args += [ '-Wl,--version-script,' + libdazzle_map ]
+endif
+
 libdazzle = shared_library(
   'dazzle-' + apiversion,
   libdazzle_sources,
@@ -92,7 +97,7 @@
             soversion: 0,
          link_depends: libdazzle_map,
                c_args: libdazzle_args,
-            link_args: [ '-Wl,--version-script,' + libdazzle_map ],
+            link_args: libdazzle_link_args,
          dependencies: libdazzle_deps,
   include_directories: [ root_inc, src_inc ],
               install: true,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/panel/dzl-dock-bin-edge.c 
new/libdazzle-3.26.0/src/panel/dzl-dock-bin-edge.c
--- old/libdazzle-3.25.91/src/panel/dzl-dock-bin-edge.c 2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/panel/dzl-dock-bin-edge.c  2017-09-11 
23:25:08.000000000 +0200
@@ -177,9 +177,9 @@
 
 static void
 dzl_dock_bin_edge_get_property (GObject    *object,
-                            guint       prop_id,
-                            GValue     *value,
-                            GParamSpec *pspec)
+                                guint       prop_id,
+                                GValue     *value,
+                                GParamSpec *pspec)
 {
   DzlDockBinEdge *self = DZL_DOCK_BIN_EDGE (object);
 
@@ -196,9 +196,9 @@
 
 static void
 dzl_dock_bin_edge_set_property (GObject      *object,
-                            guint         prop_id,
-                            const GValue *value,
-                            GParamSpec   *pspec)
+                                guint         prop_id,
+                                const GValue *value,
+                                GParamSpec   *pspec)
 {
   DzlDockBinEdge *self = DZL_DOCK_BIN_EDGE (object);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/panel/dzl-dock-bin-edge.h 
new/libdazzle-3.26.0/src/panel/dzl-dock-bin-edge.h
--- old/libdazzle-3.25.91/src/panel/dzl-dock-bin-edge.h 2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/panel/dzl-dock-bin-edge.h  2017-09-11 
23:25:08.000000000 +0200
@@ -33,14 +33,14 @@
 
   void (*move_to_bin_child) (DzlDockBinEdge *self);
 
-  void (*padding1) (void);
-  void (*padding2) (void);
-  void (*padding3) (void);
-  void (*padding4) (void);
-  void (*padding5) (void);
-  void (*padding6) (void);
-  void (*padding7) (void);
-  void (*padding8) (void);
+  gpointer _reserved1;
+  gpointer _reserved2;
+  gpointer _reserved3;
+  gpointer _reserved4;
+  gpointer _reserved5;
+  gpointer _reserved6;
+  gpointer _reserved7;
+  gpointer _reserved8;
 };
 
 GtkPositionType dzl_dock_bin_edge_get_edge (DzlDockBinEdge  *self);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/panel/dzl-tab-strip.h 
new/libdazzle-3.26.0/src/panel/dzl-tab-strip.h
--- old/libdazzle-3.25.91/src/panel/dzl-tab-strip.h     2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/panel/dzl-tab-strip.h      2017-09-11 
23:25:08.000000000 +0200
@@ -49,9 +49,6 @@
 GtkPositionType  dzl_tab_strip_get_edge        (DzlTabStrip     *self);
 void             dzl_tab_strip_set_edge        (DzlTabStrip     *self,
                                                 GtkPositionType  edge);
-gboolean         dzl_tab_strip_get_show_labels (DzlTabStrip     *self);
-void             dzl_tab_strip_set_show_labels (DzlTabStrip     *self,
-                                                gboolean         show_labels);
 DzlTabStyle      dzl_tab_strip_get_style       (DzlTabStrip     *self);
 void             dzl_tab_strip_set_style       (DzlTabStrip     *self,
                                                 DzlTabStyle      style);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.25.91/src/search/dzl-fuzzy-index-cursor.c 
new/libdazzle-3.26.0/src/search/dzl-fuzzy-index-cursor.c
--- old/libdazzle-3.25.91/src/search/dzl-fuzzy-index-cursor.c   2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/search/dzl-fuzzy-index-cursor.c    2017-09-11 
23:25:08.000000000 +0200
@@ -25,6 +25,10 @@
 #include "search/dzl-fuzzy-index-private.h"
 #include "util/dzl-int-pair.h"
 
+#if defined(__LP64__) || defined(_WIN64)
+# define DZL_FUZZY_64 1
+#endif
+
 struct _DzlFuzzyIndexCursor
 {
   GObject          object;
@@ -87,7 +91,7 @@
 {
   union {
     gpointer ptr;
-#if __WORDSIZE == 64
+#ifdef DZL_FUZZY_64
     gdouble fval;
 #else
     gfloat fval;
@@ -102,7 +106,7 @@
 {
   union {
     gpointer ptr;
-#if __WORDSIZE == 64
+#ifdef DZL_FUZZY_64
     gdouble fval;
 #else
     gfloat fval;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/search/dzl-pattern-spec.c 
new/libdazzle-3.26.0/src/search/dzl-pattern-spec.c
--- old/libdazzle-3.25.91/src/search/dzl-pattern-spec.c 2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/search/dzl-pattern-spec.c  2017-09-11 
23:25:08.000000000 +0200
@@ -47,6 +47,37 @@
   guint           case_sensitive : 1;
 };
 
+#ifdef G_OS_WIN32
+/* A fallback for missing strcasestr() on Windows. This is not in any way
+ * optimized, but at least it supports something resembling UTF-8.
+ */
+static char *
+strcasestr (const gchar *haystack,
+            const gchar *needle)
+{
+  g_autofree gchar *haystack_folded = g_utf8_casefold (haystack, -1);
+  g_autofree gchar *needle_folded = g_utf8_casefold (needle, -1);
+  const gchar *pos;
+  gsize n_chars = 0;
+
+  pos = strstr (haystack_folded, needle_folded);
+
+  if (pos == NULL)
+    return NULL;
+
+  for (const gchar *iter = haystack_folded;
+       *iter != '\0';
+       iter = g_utf8_next_char (iter))
+    {
+      if (iter >= pos)
+        break;
+      n_chars++;
+    }
+
+  return g_utf8_offset_to_pointer (haystack, n_chars);
+}
+#endif
+
 DzlPatternSpec *
 dzl_pattern_spec_new (const gchar *needle)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/search/dzl-trie.c 
new/libdazzle-3.26.0/src/search/dzl-trie.c
--- old/libdazzle-3.25.91/src/search/dzl-trie.c 2017-08-25 22:08:59.000000000 
+0200
+++ new/libdazzle-3.26.0/src/search/dzl-trie.c  2017-09-11 23:25:08.000000000 
+0200
@@ -22,8 +22,8 @@
 
 #include "dzl-trie.h"
 
-#if defined(__LP64__) || __WORDSIZE == 64 || defined(_WIN64)
-#define TRIE_64 1
+#if defined(__LP64__) || defined(_WIN64)
+# define TRIE_64 1
 #endif
 
 #define STATIC_ASSERT(a)                              \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.25.91/src/shortcuts/dzl-shortcut-closure-chain.c 
new/libdazzle-3.26.0/src/shortcuts/dzl-shortcut-closure-chain.c
--- old/libdazzle-3.25.91/src/shortcuts/dzl-shortcut-closure-chain.c    
2017-08-25 22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/shortcuts/dzl-shortcut-closure-chain.c     
2017-09-11 23:25:08.000000000 +0200
@@ -27,6 +27,7 @@
 #include "shortcuts/dzl-shortcut-controller.h"
 #include "shortcuts/dzl-shortcut-private.h"
 #include "util/dzl-gtk.h"
+#include "util/dzl-util-private.h"
 
 static DzlShortcutClosureChain *
 dzl_shortcut_closure_chain_new (DzlShortcutClosureType type)
@@ -145,39 +146,20 @@
                                                  const gchar             
*detailed_action_name)
 {
   DzlShortcutClosureChain *tail;
-  g_autoptr(GError) error = NULL;
   g_autoptr(GVariant) target_value = NULL;
-  g_autofree gchar *full_name = NULL;
-  g_autofree gchar *group = NULL;
-  const gchar *name = NULL;
-  const gchar *dot;
+  g_autofree gchar *prefix = NULL;
+  g_autofree gchar *name = NULL;
 
   g_return_val_if_fail (detailed_action_name != NULL, NULL);
 
-  if (!g_action_parse_detailed_name (detailed_action_name, &full_name, 
&target_value, &error))
+  if (!dzl_g_action_name_parse_full (detailed_action_name, &prefix, &name, 
&target_value))
     {
-      g_warning ("%s", error->message);
-      return chain;
-    }
-
-  if (target_value != NULL)
-    g_variant_take_ref (target_value);
-
-  dot = strchr (full_name, '.');
-
-  if (dot != NULL)
-    {
-      group = g_strndup (full_name, dot - full_name);
-      name = dot + 1;
-    }
-  else
-    {
-      group = NULL;
-      name = full_name;
+      g_warning ("Failed to parse action: %s", detailed_action_name);
+      return NULL;
     }
 
   tail = dzl_shortcut_closure_chain_new (DZL_SHORTCUT_CLOSURE_ACTION);
-  tail->action.group = g_intern_string (group);
+  tail->action.group = g_intern_string (prefix);
   tail->action.name = g_intern_string (name);
   tail->action.params = g_steal_pointer (&target_value);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.25.91/src/shortcuts/dzl-shortcut-manager.c 
new/libdazzle-3.26.0/src/shortcuts/dzl-shortcut-manager.c
--- old/libdazzle-3.25.91/src/shortcuts/dzl-shortcut-manager.c  2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/shortcuts/dzl-shortcut-manager.c   2017-09-11 
23:25:08.000000000 +0200
@@ -30,6 +30,7 @@
 #include "shortcuts/dzl-shortcuts-group.h"
 #include "shortcuts/dzl-shortcuts-section.h"
 #include "shortcuts/dzl-shortcuts-shortcut.h"
+#include "util/dzl-gtk.h"
 #include "util/dzl-util-private.h"
 
 typedef struct
@@ -797,6 +798,61 @@
   return _dzl_shortcut_controller_handle (root, event, chord, phase, widget);
 }
 
+static gboolean
+dzl_shortcut_manager_run_fallbacks (DzlShortcutManager     *self,
+                                    GtkWidget              *widget,
+                                    GtkWidget              *toplevel,
+                                    const DzlShortcutChord *chord)
+{
+  g_assert (DZL_IS_SHORTCUT_MANAGER (self));
+  g_assert (GTK_IS_WIDGET (widget));
+  g_assert (GTK_IS_WIDGET (toplevel));
+  g_assert (chord != NULL);
+
+  if (dzl_shortcut_chord_get_length (chord) == 1)
+    {
+      GApplication *app = g_application_get_default ();
+      GdkModifierType state;
+      guint keyval;
+
+      dzl_shortcut_chord_get_nth_key (chord, 0, &keyval, &state);
+
+      /* See if the toplevel activates this, like Tab, etc */
+      if (gtk_bindings_activate (G_OBJECT (toplevel), keyval, state))
+        return TRUE;
+
+      if (GTK_IS_APPLICATION (app))
+        {
+          g_autofree gchar *accel = dzl_shortcut_chord_to_string (chord);
+          g_auto(GStrv) actions = NULL;
+
+          actions = gtk_application_get_actions_for_accel (GTK_APPLICATION 
(app), accel);
+
+          if (actions != NULL)
+            {
+              for (guint i = 0; actions[i] != NULL; i++)
+                {
+                  const gchar *action = actions[i];
+                  g_autofree gchar *prefix = NULL;
+                  g_autofree gchar *name = NULL;
+                  g_autoptr(GVariant) param = NULL;
+
+                  if (!dzl_g_action_name_parse_full (action, &prefix, &name, 
&param))
+                    {
+                      g_warning ("Failed to parse: %s", action);
+                      continue;
+                    }
+
+                  if (dzl_gtk_widget_action (widget, prefix, name, param))
+                    return TRUE;
+                }
+            }
+        }
+    }
+
+  return FALSE;
+}
+
 /**
  * dzl_shortcut_manager_handle_event:
  * @self: (nullable): An #DzlShortcutManager
@@ -883,7 +939,8 @@
       (match = dzl_shortcut_manager_run_phase (self, event, chord, 
DZL_SHORTCUT_PHASE_CAPTURE, widget, focus)) ||
       (match = dzl_shortcut_manager_run_phase (self, event, chord, 
DZL_SHORTCUT_PHASE_DISPATCH, widget, focus)) ||
       (match = dzl_shortcut_manager_run_phase (self, event, chord, 
DZL_SHORTCUT_PHASE_BUBBLE, widget, focus)) ||
-      (match = dzl_shortcut_manager_run_global (self, event, chord, 
DZL_SHORTCUT_PHASE_BUBBLE, root, widget)))
+      (match = dzl_shortcut_manager_run_global (self, event, chord, 
DZL_SHORTCUT_PHASE_BUBBLE, root, widget)) ||
+      (match = dzl_shortcut_manager_run_fallbacks (self, widget, toplevel, 
chord)))
     ret = GDK_EVENT_STOP;
 
   DZL_TRACE_MSG ("match = %d", match);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.25.91/src/suggestions/dzl-suggestion-entry.c 
new/libdazzle-3.26.0/src/suggestions/dzl-suggestion-entry.c
--- old/libdazzle-3.25.91/src/suggestions/dzl-suggestion-entry.c        
2017-08-25 22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/suggestions/dzl-suggestion-entry.c 2017-09-11 
23:25:08.000000000 +0200
@@ -242,6 +242,7 @@
 
   if (text == NULL || *text == '\0')
     {
+      dzl_suggestion_entry_buffer_set_suggestion (priv->buffer, NULL);
       g_signal_emit (self, signals [HIDE_SUGGESTIONS], 0);
       DZL_GOTO (finish);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libdazzle-3.25.91/src/suggestions/dzl-suggestion-row.c 
new/libdazzle-3.26.0/src/suggestions/dzl-suggestion-row.c
--- old/libdazzle-3.25.91/src/suggestions/dzl-suggestion-row.c  2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/suggestions/dzl-suggestion-row.c   2017-09-11 
23:25:08.000000000 +0200
@@ -66,10 +66,8 @@
   g_return_if_fail (priv->suggestion != NULL);
 
   icon_name = dzl_suggestion_get_icon_name (priv->suggestion);
-  if (icon_name == NULL)
-    icon_name = "web-browser-symbolic";
-
   g_object_set (priv->image, "icon-name", icon_name, NULL);
+
   gtk_label_set_label (priv->title, dzl_suggestion_get_title 
(priv->suggestion));
 
   subtitle = dzl_suggestion_get_subtitle (priv->suggestion);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/suggestions/dzl-suggestion.c 
new/libdazzle-3.26.0/src/suggestions/dzl-suggestion.c
--- old/libdazzle-3.25.91/src/suggestions/dzl-suggestion.c      2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/suggestions/dzl-suggestion.c       2017-09-11 
23:25:08.000000000 +0200
@@ -24,8 +24,10 @@
 {
   gchar *title;
   gchar *subtitle;
-  gchar *icon_name;
   gchar *id;
+
+  /* interned string */
+  const gchar *icon_name;
 } DzlSuggestionPrivate;
 
 enum {
@@ -54,9 +56,10 @@
   DzlSuggestion *self = (DzlSuggestion *)object;
   DzlSuggestionPrivate *priv = dzl_suggestion_get_instance_private (self);
 
+  priv->icon_name = NULL;
+
   g_clear_pointer (&priv->title, g_free);
   g_clear_pointer (&priv->subtitle, g_free);
-  g_clear_pointer (&priv->icon_name, g_free);
   g_clear_pointer (&priv->id, g_free);
 
   G_OBJECT_CLASS (dzl_suggestion_parent_class)->finalize (object);
@@ -77,7 +80,7 @@
       break;
 
     case PROP_ICON_NAME:
-      g_value_set_string (value, dzl_suggestion_get_icon_name (self));
+      g_value_set_static_string (value, dzl_suggestion_get_icon_name (self));
       break;
 
     case PROP_TITLE:
@@ -233,10 +236,11 @@
 
   g_return_if_fail (DZL_IS_SUGGESTION (self));
 
-  if (g_strcmp0 (priv->icon_name, icon_name) != 0)
+  icon_name = g_intern_string (icon_name);
+
+  if (priv->icon_name != icon_name)
     {
-      g_free (priv->icon_name);
-      priv->icon_name = g_strdup (icon_name);
+      priv->icon_name = icon_name;
       g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_ICON_NAME]);
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/tree/dzl-tree-builder.c 
new/libdazzle-3.26.0/src/tree/dzl-tree-builder.c
--- old/libdazzle-3.25.91/src/tree/dzl-tree-builder.c   2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/tree/dzl-tree-builder.c    2017-09-11 
23:25:08.000000000 +0200
@@ -229,20 +229,28 @@
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (DzlTreeBuilderClass, added),
-                  NULL, NULL, NULL,
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__OBJECT,
                   G_TYPE_NONE,
                   1,
                   DZL_TYPE_TREE);
+  g_signal_set_va_marshaller (signals [ADDED],
+                              G_TYPE_FROM_CLASS (klass),
+                              g_cclosure_marshal_VOID__OBJECTv);
 
   signals [BUILD_NODE] =
     g_signal_new ("build-node",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (DzlTreeBuilderClass, build_node),
-                  NULL, NULL, NULL,
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__OBJECT,
                   G_TYPE_NONE,
                   1,
                   DZL_TYPE_TREE_NODE);
+  g_signal_set_va_marshaller (signals [BUILD_NODE],
+                              G_TYPE_FROM_CLASS (klass),
+                              g_cclosure_marshal_VOID__OBJECTv);
 
   signals [NODE_ACTIVATED] =
     g_signal_new ("node-activated",
@@ -270,30 +278,42 @@
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (DzlTreeBuilderClass, node_selected),
-                  NULL, NULL, NULL,
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__OBJECT,
                   G_TYPE_NONE,
                   1,
                   DZL_TYPE_TREE_NODE);
+  g_signal_set_va_marshaller (signals [NODE_SELECTED],
+                              G_TYPE_FROM_CLASS (klass),
+                              g_cclosure_marshal_VOID__OBJECTv);
 
   signals [NODE_UNSELECTED] =
     g_signal_new ("node-unselected",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (DzlTreeBuilderClass, node_unselected),
-                  NULL, NULL, NULL,
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__OBJECT,
                   G_TYPE_NONE,
                   1,
                   DZL_TYPE_TREE_NODE);
+  g_signal_set_va_marshaller (signals [NODE_UNSELECTED],
+                              G_TYPE_FROM_CLASS (klass),
+                              g_cclosure_marshal_VOID__OBJECTv);
 
   signals [REMOVED] =
     g_signal_new ("removed",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (DzlTreeBuilderClass, removed),
-                  NULL, NULL, NULL,
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__OBJECT,
                   G_TYPE_NONE,
                   1,
                   DZL_TYPE_TREE);
+  g_signal_set_va_marshaller (signals [REMOVED],
+                              G_TYPE_FROM_CLASS (klass),
+                              g_cclosure_marshal_VOID__OBJECTv);
 }
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/tree/dzl-tree-builder.h 
new/libdazzle-3.26.0/src/tree/dzl-tree-builder.h
--- old/libdazzle-3.25.91/src/tree/dzl-tree-builder.h   2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/tree/dzl-tree-builder.h    2017-09-11 
23:25:08.000000000 +0200
@@ -31,9 +31,9 @@
   GInitiallyUnownedClass parent_class;
 
   void     (*added)           (DzlTreeBuilder *builder,
-                               GtkWidget     *tree);
+                               GtkWidget      *tree);
   void     (*removed)         (DzlTreeBuilder *builder,
-                               GtkWidget     *tree);
+                               GtkWidget      *tree);
   void     (*build_node)      (DzlTreeBuilder *builder,
                                DzlTreeNode    *node);
   gboolean (*node_activated)  (DzlTreeBuilder *builder,
@@ -44,7 +44,7 @@
                                DzlTreeNode    *node);
   void     (*node_popup)      (DzlTreeBuilder *builder,
                                DzlTreeNode    *node,
-                               GMenu         *menu);
+                               GMenu          *menu);
 };
 
 DzlTree *dzl_tree_builder_get_tree (DzlTreeBuilder *builder);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/util/dzl-counter.c 
new/libdazzle-3.26.0/src/util/dzl-counter.c
--- old/libdazzle-3.25.91/src/util/dzl-counter.c        2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/util/dzl-counter.c 2017-09-11 23:25:08.000000000 
+0200
@@ -26,7 +26,6 @@
 
 #include <glib/gprintf.h>
 #include <gmodule.h>
-#include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <fcntl.h>
@@ -35,6 +34,10 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#ifdef G_OS_UNIX
+# include <sys/mman.h>
+#endif
+
 #include "dzl-counter.h"
 
 G_DEFINE_BOXED_TYPE (DzlCounterArena, dzl_counter_arena, 
dzl_counter_arena_ref, dzl_counter_arena_unref)
@@ -156,13 +159,15 @@
 static void
 _dzl_counter_arena_init_local (DzlCounterArena *arena)
 {
+  gsize size;
+  gint page_size;
   ShmHeader *header;
+#ifndef G_OS_WIN32
   gpointer mem;
   unsigned pid;
-  gsize size;
-  gint page_size;
   gint fd;
   gchar name [32];
+#endif
 
   page_size = sysconf (_SC_PAGE_SIZE);
 
@@ -174,6 +179,8 @@
       goto use_malloc;
     }
 
+#ifndef G_OS_WIN32
+
   /*
    * FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=749280
    *
@@ -233,26 +240,39 @@
 failure:
   shm_unlink (name);
   close (fd);
+#endif
 
 use_malloc:
   g_warning ("Failed to allocate shared memory for counters. "
              "Counters will not be available to external processes.");
 
+  /*
+   * Ask for double memory than required so that we can be certain
+   * that the memalign will keep us within valid memory ranges.
+   */
+  if (size < page_size)
+    size = page_size;
   arena->data_is_mmapped = FALSE;
-  arena->cells = g_malloc0 (size << 1);
   arena->n_cells = (size / DATA_CELL_SIZE);
   arena->data_length = size;
+#ifdef G_OS_WIN32
+  arena->cells = _aligned_malloc (size, page_size);
+#else
+  arena->cells = g_malloc0 (size << 1);
+#endif
 
+#ifndef G_OS_WIN32
   /*
    * Make sure that we have a properly aligned allocation back from
    * malloc. Since we are at least a page size, we should pretty much
    * be guaranteed this, but better to check with posix_memalign().
    */
-  if (posix_memalign ((void *)&arena->cells, page_size, size << 1) != 0)
+  if (posix_memalign ((gpointer)&arena->cells, page_size, size << 1) != 0)
     {
       perror ("posix_memalign()");
       abort ();
     }
+#endif
 
   header = (void *)arena->cells;
   header->magic = MAGIC;
@@ -392,7 +412,12 @@
   if (arena->data_is_mmapped)
     munmap (arena->cells, arena->data_length);
   else
+#ifdef G_OS_WIN32
+    /* Allocated with _aligned_malloc() */
+    _aligned_free (arena->cells);
+#else
     g_free (arena->cells);
+#endif
 
   g_clear_pointer (&arena->counters, g_list_free);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/util/dzl-int-pair.h 
new/libdazzle-3.26.0/src/util/dzl-int-pair.h
--- old/libdazzle-3.25.91/src/util/dzl-int-pair.h       2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/util/dzl-int-pair.h        2017-09-11 
23:25:08.000000000 +0200
@@ -26,7 +26,11 @@
 
 G_BEGIN_DECLS
 
-#if __WORDSIZE >= 64
+#if defined(__LP64__) || defined(_WIN64)
+# define DZL_INT_PAIR_64
+#endif
+
+#ifdef DZL_INT_PAIR_64
 
 typedef union
 {
@@ -82,7 +86,7 @@
   pair.first = first;
   pair.second = second;
 
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   return pair.ptr;
 #else
   return g_slice_copy (sizeof (DzlIntPair), &pair);
@@ -105,7 +109,7 @@
   pair.first = first;
   pair.second = second;
 
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   return pair.ptr;
 #else
   return g_slice_copy (sizeof (DzlUIntPair), &pair);
@@ -119,7 +123,7 @@
 dzl_int_pair_first (DzlIntPair *pair)
 {
   DzlIntPair p;
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   p.ptr = pair;
 #else
   p = *pair;
@@ -134,7 +138,7 @@
 dzl_int_pair_second (DzlIntPair *pair)
 {
   DzlIntPair p;
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   p.ptr = pair;
 #else
   p = *pair;
@@ -149,7 +153,7 @@
 dzl_uint_pair_first (DzlUIntPair *pair)
 {
   DzlUIntPair p;
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   p.ptr = pair;
 #else
   p = *pair;
@@ -164,7 +168,7 @@
 dzl_uint_pair_second (DzlUIntPair *pair)
 {
   DzlUIntPair p;
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   p.ptr = pair;
 #else
   p = *pair;
@@ -178,7 +182,7 @@
 static inline void
 dzl_int_pair_free (DzlIntPair *pair)
 {
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   /* Do Nothing */
 #else
   g_slice_free (DzlIntPair, pair);
@@ -191,7 +195,7 @@
 static inline void
 dzl_uint_pair_free (DzlUIntPair *pair)
 {
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   /* Do Nothing */
 #else
   g_slice_free (DzlUIntPair, pair);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/util/dzl-util-private.h 
new/libdazzle-3.26.0/src/util/dzl-util-private.h
--- old/libdazzle-3.25.91/src/util/dzl-util-private.h   2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/util/dzl-util-private.h    2017-09-11 
23:25:08.000000000 +0200
@@ -65,6 +65,10 @@
 void          dzl_g_action_name_parse               (const gchar      
*action_name,
                                                      gchar           **prefix,
                                                      gchar           **name);
+gboolean      dzl_g_action_name_parse_full          (const gchar      
*detailed_action_name,
+                                                     gchar           **prefix,
+                                                     gchar           **name,
+                                                     GVariant        **target);
 void          dzl_gtk_style_context_get_borders     (GtkStyleContext  
*style_context,
                                                      GtkBorder        
*borders);
 void          dzl_gtk_allocation_subtract_border    (GtkAllocation    *alloc,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/util/dzl-util.c 
new/libdazzle-3.26.0/src/util/dzl-util.c
--- old/libdazzle-3.25.91/src/util/dzl-util.c   2017-08-25 22:08:59.000000000 
+0200
+++ new/libdazzle-3.26.0/src/util/dzl-util.c    2017-09-11 23:25:08.000000000 
+0200
@@ -265,6 +265,47 @@
   split_action_name (action_name, prefix, name);
 }
 
+gboolean
+dzl_g_action_name_parse_full (const gchar  *detailed_action_name,
+                              gchar       **prefix,
+                              gchar       **name,
+                              GVariant    **target)
+{
+  g_autofree gchar *full_name = NULL;
+  g_autoptr(GVariant) target_value = NULL;
+  const gchar *dot;
+
+  if (detailed_action_name == NULL)
+    return FALSE;
+
+  if (!g_action_parse_detailed_name (detailed_action_name, &full_name, 
&target_value, NULL))
+    return FALSE;
+
+  if (target_value != NULL)
+    g_variant_take_ref (target_value);
+
+  dot = strchr (full_name, '.');
+
+  if (dot != NULL)
+    {
+      if (prefix != NULL)
+        *prefix = g_strndup (full_name, dot - full_name);
+
+      if (name != NULL)
+        *name = g_strdup (dot + 1);
+    }
+  else
+    {
+      *prefix = NULL;
+      *name = g_steal_pointer (&full_name);
+    }
+
+  if (target != NULL)
+    *target = g_steal_pointer (&target_value);
+
+  return TRUE;
+}
+
 void
 dzl_gtk_allocation_subtract_border (GtkAllocation *alloc,
                                     GtkBorder     *border)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/util/meson.build 
new/libdazzle-3.26.0/src/util/meson.build
--- old/libdazzle-3.25.91/src/util/meson.build  2017-08-25 22:08:59.000000000 
+0200
+++ new/libdazzle-3.26.0/src/util/meson.build   2017-09-11 23:25:08.000000000 
+0200
@@ -1,6 +1,5 @@
 util_headers = [
   'dzl-cairo.h',
-  'dzl-counter.h',
   'dzl-date-time.h',
   'dzl-dnd.h',
   'dzl-file-manager.h',
@@ -16,7 +15,6 @@
 
 util_sources = [
   'dzl-cairo.c',
-  'dzl-counter.c',
   'dzl-date-time.c',
   'dzl-dnd.c',
   'dzl-file-manager.c',
@@ -30,6 +28,14 @@
   'dzl-variant.c',
 ]
 
+# No counters if building on win32 for now.
+# They need explicit porting to that platform and should
+# probably just wrap the eventtrace API or something.
+if host_machine.system() != 'windows'
+  util_headers += ['dzl-counter.h']
+  util_sources += ['dzl-counter.c']
+endif
+
 libdazzle_public_headers += files(util_headers)
 libdazzle_public_sources += files(util_sources)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/widgets/dzl-list-box.c 
new/libdazzle-3.26.0/src/widgets/dzl-list-box.c
--- old/libdazzle-3.25.91/src/widgets/dzl-list-box.c    2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/widgets/dzl-list-box.c     2017-09-11 
23:25:08.000000000 +0200
@@ -166,6 +166,8 @@
   priv->recycle_max = 0;
 
   rows = priv->trashed_rows.head;
+
+  priv->trashed_rows.head = NULL;
   priv->trashed_rows.tail = NULL;
   priv->trashed_rows.length = 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/src/widgets/meson.build 
new/libdazzle-3.26.0/src/widgets/meson.build
--- old/libdazzle-3.25.91/src/widgets/meson.build       2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/src/widgets/meson.build        2017-09-11 
23:25:08.000000000 +0200
@@ -4,7 +4,6 @@
   'dzl-box.h',
   'dzl-centering-bin.h',
   'dzl-column-layout.h',
-  'dzl-counters-window.h',
   'dzl-elastic-bin.h',
   'dzl-empty-state.h',
   'dzl-entry-box.h',
@@ -33,7 +32,6 @@
   'dzl-box.c',
   'dzl-centering-bin.c',
   'dzl-column-layout.c',
-  'dzl-counters-window.c',
   'dzl-elastic-bin.c',
   'dzl-empty-state.c',
   'dzl-entry-box.c',
@@ -56,6 +54,11 @@
   'dzl-three-grid.c',
 ]
 
+if host_machine.system() != 'windows'
+  widgets_headers += ['dzl-counters-window.h']
+  widgets_sources += ['dzl-counters-window.c']
+endif
+
 libdazzle_public_headers += files(widgets_headers)
 libdazzle_public_sources += files(widgets_sources)
 libdazzle_private_sources += files('dzl-rect-helper.c')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/tests/meson.build 
new/libdazzle-3.26.0/tests/meson.build
--- old/libdazzle-3.25.91/tests/meson.build     2017-08-25 22:08:59.000000000 
+0200
+++ new/libdazzle-3.26.0/tests/meson.build      2017-09-11 23:25:08.000000000 
+0200
@@ -287,11 +287,14 @@
 )
 test('test-ring', test_ring, env: test_env)
 
+# Counters only run on UNIX-like systems currently
+if host_machine.system() != 'windows'
 test_counters_window = executable('test-counters-window', 
'test-counters-window.c',
         c_args: test_cflags,
      link_args: test_link_args,
   dependencies: libdazzle_deps + [libdazzle_dep],
 )
+endif
 
 test_list_store = executable('test-list-store', 'test-list-store.c',
         c_args: test_cflags,
@@ -326,4 +329,18 @@
 )
 test('test-list-store-adapter', test_list_store_adapter, env: test_env)
 
+test_util = executable('test-util', 'test-util.c',
+        c_args: test_cflags,
+     link_args: test_link_args,
+  dependencies: libdazzle_deps + [libdazzle_dep],
+)
+test('test-util', test_util, env: test_env)
+
+test_pattern_spec = executable('test-pattern-spec', 'test-pattern-spec.c',
+        c_args: test_cflags,
+     link_args: test_link_args,
+  dependencies: libdazzle_deps + [libdazzle_dep],
+)
+test('test-pattern-spec', test_pattern_spec, env: test_env)
+
 endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/tests/test-fuzzy-index.c 
new/libdazzle-3.26.0/tests/test-fuzzy-index.c
--- old/libdazzle-3.25.91/tests/test-fuzzy-index.c      2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/tests/test-fuzzy-index.c       2017-09-11 
23:25:08.000000000 +0200
@@ -50,10 +50,8 @@
   main_loop = g_main_loop_new (NULL, FALSE);
 
   file = g_file_new_for_path ("index.gvariant");
-  g_object_add_weak_pointer (G_OBJECT (file), (gpointer *)&file);
 
   builder = dzl_fuzzy_index_builder_new ();
-  g_object_add_weak_pointer (G_OBJECT (builder), (gpointer *)&builder);
 
   dzl_fuzzy_index_builder_insert (builder, "foo", g_variant_new_int32 (1), 7);
   dzl_fuzzy_index_builder_insert (builder, "FOO", g_variant_new_int32 (2), 7);
@@ -113,23 +111,12 @@
   g_variant_dict_clear (&dict);
 
   g_object_unref (builder);
-#if 0
-  /* There may still be task queues racing to hold the object */
-  g_assert (builder == NULL);
-#endif
 
   r = g_file_delete (file, NULL, &error);
   g_assert_no_error (error);
   g_assert (r);
 
   g_object_unref (file);
-
-#if 0
-  /* It would be nice if we could rely on testing this for NULL,
-   * but the async operations could still hold a reference.
-   */
-  g_assert (file == NULL);
-#endif
 }
 
 static void
@@ -170,10 +157,6 @@
           g_autofree gchar *format = g_variant_print (doc, TRUE);
           g_print ("%f %s %s\n", score, key, format);
         }
-
-      g_object_add_weak_pointer (G_OBJECT (match), (gpointer *)&match);
-      g_object_unref (match);
-      g_assert (match == NULL);
     }
 
   g_main_loop_quit (main_loop);
@@ -231,12 +214,8 @@
   gboolean r;
 
   main_loop = g_main_loop_new (NULL, FALSE);
-
   file = g_file_new_for_path ("index.gvariant");
-  g_object_add_weak_pointer (G_OBJECT (file), (gpointer *)&file);
-
   builder = dzl_fuzzy_index_builder_new ();
-  g_object_add_weak_pointer (G_OBJECT (builder), (gpointer *)&builder);
 
   /*
    * We want to ensure we only get the highest scoring item for a
@@ -261,14 +240,12 @@
   g_assert_no_error (error);
 
   g_object_unref (builder);
-  g_assert (builder == NULL);
 
   r = g_file_delete (file, NULL, &error);
   g_assert_no_error (error);
   g_assert (r);
 
   g_object_unref (file);
-  g_assert (file == NULL);
 }
 
 gint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/tests/test-int-pair.c 
new/libdazzle-3.26.0/tests/test-int-pair.c
--- old/libdazzle-3.25.91/tests/test-int-pair.c 2017-08-25 22:08:59.000000000 
+0200
+++ new/libdazzle-3.26.0/tests/test-int-pair.c  2017-09-11 23:25:08.000000000 
+0200
@@ -6,7 +6,7 @@
   DzlIntPair *p;
 
   p = dzl_int_pair_new (0, 0);
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   /* Technically not ANSI as NULL is allowed to be non-zero, but all the
    * platforms we support, this is the case.
    */
@@ -40,7 +40,7 @@
   DzlUIntPair *p;
 
   p = dzl_uint_pair_new (0, 0);
-#if __WORDSIZE >= 64
+#ifdef DZL_INT_PAIR_64
   /* Technically not ANSI as NULL is allowed to be non-zero, but all the
    * platforms we support, this is the case.
    */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/tests/test-pattern-spec.c 
new/libdazzle-3.26.0/tests/test-pattern-spec.c
--- old/libdazzle-3.25.91/tests/test-pattern-spec.c     1970-01-01 
01:00:00.000000000 +0100
+++ new/libdazzle-3.26.0/tests/test-pattern-spec.c      2017-09-11 
23:25:08.000000000 +0200
@@ -0,0 +1,56 @@
+/* test-pattern-spec.c
+ *
+ * Copyright (C) 2017 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/>.
+ */
+
+#include <dazzle.h>
+
+static void
+test_basic (void)
+{
+  static const struct {
+    const gchar *needle;
+    const gchar *haystack;
+    gboolean     result;
+  } tests[] = {
+    { "blue", "red blue purple pink green black cyan", TRUE },
+    { "Blue", "red blue purple pink green black cyan", FALSE },
+    { "blue", "red Blue purple pink green black cyan", TRUE },
+    { "DzlPatternSpec", "DzlPatternSpec_autoptr", TRUE },
+    { "dzlpattern", "DzlPatternSpec_autoptr", TRUE },
+    { "dzlpattern", "dzl_pattern_spec", FALSE },
+    { "dzl pattern", "dzl_pattern_spec", TRUE },
+  };
+
+  for (guint i = 0; i < G_N_ELEMENTS (tests); i++)
+    {
+      g_autoptr(DzlPatternSpec) spec = NULL;
+      gboolean r;
+
+      spec = dzl_pattern_spec_new (tests[i].needle);
+      r = dzl_pattern_spec_match (spec, tests[i].haystack);
+      g_assert_cmpint (r, ==, tests[i].result);
+    }
+}
+
+gint
+main (gint argc,
+      gchar *argv[])
+{
+  g_test_init (&argc, &argv, NULL);
+  g_test_add_func ("/Dazzle/PatternSpec/basic", test_basic);
+  return g_test_run ();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/tests/test-suggestion.c 
new/libdazzle-3.26.0/tests/test-suggestion.c
--- old/libdazzle-3.25.91/tests/test-suggestion.c       2017-08-25 
22:08:59.000000000 +0200
+++ new/libdazzle-3.26.0/tests/test-suggestion.c        2017-09-11 
23:25:08.000000000 +0200
@@ -35,17 +35,17 @@
 
 static DzlFuzzyMutableIndex *search_index;
 static const DemoData demo_data[] = {
-  { NULL, "https://twitter.com";, "Twitter", "twitter.com" },
-  { NULL, "https://facebook.com";, "Facebook", "facebook.com" },
-  { NULL, "https://google.com";, "Google", "google.com" },
-  { NULL, "https://images.google.com";, "Google Images", "images.google.com" },
-  { NULL, "https://news.ycombinator.com";, "Hacker News", 
"news.ycombinator.com" },
-  { NULL, "https://reddit.com/r/gnome";, "GNOME Desktop Environment", 
"reddit.com/r/gnome" },
-  { NULL, "https://reddit.com/r/linux";, "Linux, GNU/Linux, free software", 
"reddit.com/r/linux" },
-  { NULL, "https://wiki.gnome.org";, "GNOME Wiki", "wiki.gnome.org" },
-  { NULL, "https://gnome.org";, "GNOME", "gnome.org" },
-  { NULL, "https://planet.gnome.org";, "Planet GNOME", "planet.gnome.org" },
-  { NULL, "https://wiki.gnome.org/Apps/Builder";, "GNOME Builder", 
"wiki.gnome.org/Apps/Builder" },
+  { "web-browser-symbolic", "https://twitter.com";, "Twitter", "twitter.com" },
+  { "web-browser-symbolic", "https://facebook.com";, "Facebook", "facebook.com" 
},
+  { "web-browser-symbolic", "https://google.com";, "Google", "google.com" },
+  { "web-browser-symbolic", "https://images.google.com";, "Google Images", 
"images.google.com" },
+  { "web-browser-symbolic", "https://news.ycombinator.com";, "Hacker News", 
"news.ycombinator.com" },
+  { "web-browser-symbolic", "https://reddit.com/r/gnome";, "GNOME Desktop 
Environment", "reddit.com/r/gnome" },
+  { "web-browser-symbolic", "https://reddit.com/r/linux";, "Linux, GNU/Linux, 
free software", "reddit.com/r/linux" },
+  { "web-browser-symbolic", "https://wiki.gnome.org";, "GNOME Wiki", 
"wiki.gnome.org" },
+  { "web-browser-symbolic", "https://gnome.org";, "GNOME", "gnome.org" },
+  { "web-browser-symbolic", "https://planet.gnome.org";, "Planet GNOME", 
"planet.gnome.org" },
+  { "web-browser-symbolic", "https://wiki.gnome.org/Apps/Builder";, "GNOME 
Builder", "wiki.gnome.org/Apps/Builder" },
 };
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/tests/test-util.c 
new/libdazzle-3.26.0/tests/test-util.c
--- old/libdazzle-3.25.91/tests/test-util.c     1970-01-01 01:00:00.000000000 
+0100
+++ new/libdazzle-3.26.0/tests/test-util.c      2017-09-11 23:25:08.000000000 
+0200
@@ -0,0 +1,72 @@
+/* test-util.c
+ *
+ * Copyright (C) 2017 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/>.
+ */
+
+#include <dazzle.h>
+
+#include "util/dzl-util-private.h"
+
+static void
+test_action_parsing (void)
+{
+  struct {
+    const gchar *input;
+    const gchar *expected_prefix;
+    const gchar *expected_name;
+    const gchar *expected_target;
+  } simple_tests[] = {
+    { "app.foobar", "app", "foobar", NULL },
+    { "win.foo", "win", "foo", NULL },
+    { "win.foo::1", "win", "foo", "'1'" },
+    { "win.foo(1)", "win", "foo", "1" },
+  };
+
+  for (guint i = 0; i < G_N_ELEMENTS (simple_tests); i++)
+    {
+      g_autofree gchar *prefix = NULL;
+      g_autofree gchar *name = NULL;
+      g_autoptr(GVariant) target = NULL;
+
+      if (!dzl_g_action_name_parse_full (simple_tests[i].input, &prefix, 
&name, &target))
+        g_error ("Failed to parse %s", simple_tests[i].input);
+
+      g_assert_cmpstr (prefix, ==, simple_tests[i].expected_prefix);
+      g_assert_cmpstr (name, ==, simple_tests[i].expected_name);
+
+      if (simple_tests[i].expected_target)
+        {
+          g_autoptr(GVariant) expected_target = g_variant_parse (NULL,
+                                                                 
simple_tests[i].expected_target,
+                                                                 NULL, NULL, 
NULL);
+          if (!g_variant_equal (expected_target, target))
+            {
+              g_printerr ("Expected: %s\n", g_variant_print (expected_target, 
TRUE));
+              g_printerr ("Actual: %s\n", g_variant_print (target, TRUE));
+              g_assert_not_reached ();
+            }
+        }
+    }
+}
+
+gint
+main (gint   argc,
+      gchar *argv[])
+{
+  g_test_init (&argc, &argv, NULL);
+  g_test_add_func ("/Util/Action/parse", test_action_parsing);
+  return g_test_run ();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdazzle-3.25.91/tools/meson.build 
new/libdazzle-3.26.0/tools/meson.build
--- old/libdazzle-3.25.91/tools/meson.build     2017-08-25 22:08:59.000000000 
+0200
+++ new/libdazzle-3.26.0/tools/meson.build      2017-09-11 23:25:08.000000000 
+0200
@@ -1,8 +1,11 @@
 if get_option('enable_tools')
 
+# Counters are UNIX-systems only currently
+if host_machine.system() != 'windows'
 dazzle_list_counters = executable('dazzle-list-counters', 
'dazzle-list-counters.c',
   dependencies: libdazzle_deps + [libdazzle_dep],
        install: true,
 )
+endif
 
 endif


Reply via email to