[Pkg-xfce-commits] [Git][xfce-team/desktop/garcon][upstream/latest] New upstream version 4.17.3.
Unit 193 (@unit193)
gitlab at salsa.debian.org
Mon Dec 5 07:07:40 GMT 2022
Unit 193 pushed to branch upstream/latest at xfce / desktop / garcon
Commits:
4d1ec977 by Unit 193 at 2022-12-05T02:01:00-05:00
New upstream version 4.17.3.
- - - - -
19 changed files:
- ChangeLog
- NEWS
- configure
- configure.ac
- docs/reference/html/GarconMenu.html
- docs/reference/html/GarconMenuItem.html
- docs/reference/html/GarconMenuItemCache.html
- docs/reference/html/annotation-glossary.html
- docs/reference/html/garcon-Version-Information.html
- docs/reference/html/garcon-garcon-menu-item-pool.html
- docs/reference/html/garcon-garcon-menu-node.html
- docs/reference/html/index.html
- garcon-gtk/garcon-gtk-menu.c
- garcon/garcon-config.h
- garcon/garcon-menu-item-cache.c
- garcon/garcon-menu-item-pool.c
- garcon/garcon-menu-item.c
- garcon/garcon-menu-node.c
- garcon/garcon-menu.c
Changes:
=====================================
ChangeLog
=====================================
@@ -1,3 +1,52 @@
+commit 0087b7e5983cee0aa36a82c6c26a16ccd0347aed
+Author: Gaël Bonithon <gael at xfce.org>
+Date: Fri Nov 4 15:55:22 2022 +0100
+
+ docs: Fix annotations
+
+commit 966f7c99dc5ebf39ec423883652b805b749a9a2d
+Author: Gaël Bonithon <gael at xfce.org>
+Date: Fri Nov 4 13:52:48 2022 +0100
+
+ garcon: Guard against race conditions when menu loads
+
+ Non-trivial functions connected to file monitoring or delayed must be
+ protected from concurrent execution with `garcon_menu_load()`.
+
+ Fixes: d2c7068e1d71738b5952f9a8823112709a4a56c4
+ Related: !18
+
+commit 9d4b716f6f5cb7f90b5d45797d1e153f2fd14c24
+Author: Gaël Bonithon <gael at xfce.org>
+Date: Fri Nov 4 13:43:02 2022 +0100
+
+ garcon-gtk: Populate GtkMenu only if GarconMenu is loaded
+
+ Fixes: d2c7068e1d71738b5952f9a8823112709a4a56c4
+ Related: !18
+
+commit 1988ddb98425528bbf6912748447115a39213250
+Author: Gaël Bonithon <gael at xfce.org>
+Date: Wed Nov 2 10:16:46 2022 +0100
+
+ garcon: Reset source id and list pointer on destruction and only then
+
+ Otherwise there is a time interval during which the id is null while the
+ object is still alive. This can cause problems especially since the menu
+ loading is asynchronous (d2c7068e1d71738b5952f9a8823112709a4a56c4).
+
+commit 821224b341eb5675d67aa3ab4b5ea48ad636acfc
+Author: Gaël Bonithon <gael at xfce.org>
+Date: Mon Oct 31 16:57:00 2022 +0100
+
+ Back to development
+
+commit 2bb5e9d7a6d66c48c5f0a2e926b4faa248c67e21
+Author: Gaël Bonithon <gael at xfce.org>
+Date: Mon Oct 31 16:56:30 2022 +0100
+
+ Updates for release
+
commit 563e07f52c44dda70376de8e6ded6d73c0997fd8
Author: Brian J. Tarricone <brian at tarricone.org>
Date: Fri Oct 28 03:19:12 2022 -0700
=====================================
NEWS
=====================================
@@ -1,3 +1,10 @@
+4.17.3 (2022-11-30)
+======
+- docs: Fix annotations
+- garcon: Guard against race conditions when menu loads
+- garcon-gtk: Populate GtkMenu only if GarconMenu is loaded
+- garcon: Reset source id and list pointer on destruction and only then
+
4.17.2 (2022-10-31)
======
- Dependency Changes:
=====================================
configure
=====================================
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.ac 563e07f.
+# From configure.ac 0087b7e.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for garcon 4.17.2.
+# Generated by GNU Autoconf 2.71 for garcon 4.17.3.
#
# Report bugs to <https://gitlab.xfce.org/xfce/garcon>.
#
@@ -626,8 +626,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='garcon'
PACKAGE_TARNAME='garcon'
-PACKAGE_VERSION='4.17.2'
-PACKAGE_STRING='garcon 4.17.2'
+PACKAGE_VERSION='4.17.3'
+PACKAGE_STRING='garcon 4.17.3'
PACKAGE_BUGREPORT='https://gitlab.xfce.org/xfce/garcon'
PACKAGE_URL=''
@@ -1487,7 +1487,7 @@ if test "$ac_init_help" = "long"; then
# 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 garcon 4.17.2 to adapt to many kinds of systems.
+\`configure' configures garcon 4.17.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1559,7 +1559,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of garcon 4.17.2:";;
+ short | recursive ) echo "Configuration of garcon 4.17.3:";;
esac
cat <<\_ACEOF
@@ -1698,7 +1698,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-garcon configure 4.17.2
+garcon configure 4.17.3
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1963,7 +1963,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by garcon $as_me 4.17.2, which was
+It was created by garcon $as_me 4.17.3, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3353,7 +3353,7 @@ fi
# Define the identity of the package.
PACKAGE='garcon'
- VERSION='4.17.2'
+ VERSION='4.17.3'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3646,7 +3646,7 @@ GARCON_VERINFO=0:0:0
GARCON_VERSION_MAJOR=4
GARCON_VERSION_MINOR=17
-GARCON_VERSION_MICRO=2
+GARCON_VERSION_MICRO=3
GARCON_VERSION_API_MAJOR=1
GARCON_VERSION_API=$GARCON_VERSION_API_MAJOR
@@ -17700,7 +17700,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by garcon $as_me 4.17.2, which was
+This file was extended by garcon $as_me 4.17.3, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17768,7 +17768,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-garcon config.status 4.17.2
+garcon config.status 4.17.3
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
=====================================
configure.ac
=====================================
@@ -30,8 +30,8 @@ m4_define([garcon_verinfo], [0:0:0])
m4_define([garcon_version_api_major], [1])
m4_define([garcon_version_major], [4])
m4_define([garcon_version_minor], [17])
-m4_define([garcon_version_micro], [2])
-m4_define([garcon_version_build], [563e07f])
+m4_define([garcon_version_micro], [3])
+m4_define([garcon_version_build], [0087b7e])
m4_define([garcon_version_tag], [])
m4_define([garcon_version], [garcon_version_major().garcon_version_minor().garcon_version_micro()ifelse(garcon_version_tag(), [git], [garcon_version_tag()-garcon_version_build()], [garcon_version_tag()])])
@@ -54,7 +54,7 @@ Copyright (c) 2012-2022 The Xfce development team
AC_INIT([garcon], [garcon_version], [https://gitlab.xfce.org/xfce/garcon])
AC_PREREQ([2.69])
AC_CONFIG_MACRO_DIRS([m4])
-AC_REVISION([563e07f])
+AC_REVISION([0087b7e])
AC_CANONICAL_TARGET()
dnl ***************************
=====================================
docs/reference/html/GarconMenu.html
=====================================
@@ -420,8 +420,6 @@ garcon_menu_get_directory (<em class="parameter"><code><a class="link" href="Gar
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>menu</code></em>
has
no valid directory element.</p>
-<p>The returned object should be unreffed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> when
-no longer needed.</p>
<p>The menu directory may contain a lot of useful information about
the menu like the display and icon name, desktop environments it
should show up in etc.</p>
@@ -443,7 +441,7 @@ should show up in etc.</p>
<div class="refsect3">
<a name="garcon-menu-get-directory.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GarconMenuDirectory.html" title="GarconMenuDirectory"><span class="type">GarconMenuDirectory</span></a>. </p>
-<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -473,7 +471,7 @@ should be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Li
<a name="garcon-menu-get-menus.returns"></a><h4>Returns</h4>
<p>a sorted list
of <a class="link" href="GarconMenu.html" title="GarconMenu"><span class="type">GarconMenu</span></a>. </p>
-<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GarconMenu]</span></p>
+<p><span class="annotation">[<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GarconMenu]</span></p>
</div>
</div>
<hr>
@@ -542,7 +540,7 @@ garcon_menu_get_menu_with_name (<em class="parameter"><code><a class="link" href
<div class="refsect3">
<a name="garcon-menu-get-menu-with-name.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GarconMenu.html" title="GarconMenu"><span class="type">GarconMenu</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
-<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -572,7 +570,7 @@ garcon_menu_get_parent (<em class="parameter"><code><a class="link" href="Garcon
<p>a <a class="link" href="GarconMenu.html" title="GarconMenu"><span class="type">GarconMenu</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
if <em class="parameter"><code>menu</code></em>
is the root menu. </p>
-<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -600,7 +598,7 @@ menu (for that of its submenus).</p>
<div class="refsect3">
<a name="garcon-menu-get-item-pool.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="garcon-garcon-menu-item-pool.html#GarconMenuItemPool"><span class="type">GarconMenuItemPool</span></a>. </p>
-<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -633,7 +631,7 @@ sorted by their display names in ascending order.</p>
<p>list
of <a class="link" href="GarconMenuItem.html" title="GarconMenuItem"><span class="type">GarconMenuItem</span></a> included in <em class="parameter"><code>menu</code></em>
. </p>
-<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GarconMenuItem][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GarconMenuItem][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -664,7 +662,7 @@ and separators.</p>
<div class="refsect3">
<a name="garcon-menu-get-elements.returns"></a><h4>Returns</h4>
<p>. </p>
-<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GarconMenuItem][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GarconMenuItem][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
</div>
</div>
=====================================
docs/reference/html/GarconMenuItem.html
=====================================
@@ -880,7 +880,7 @@ garcon_menu_item_get_categories (<em class="parameter"><code><a class="link" hre
<div class="refsect3">
<a name="garcon-menu-item-get-categories.returns"></a><h4>Returns</h4>
<p>. </p>
-<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -949,7 +949,7 @@ garcon_menu_item_get_keywords (<em class="parameter"><code><a class="link" href=
<div class="refsect3">
<a name="garcon-menu-item-get-keywords.returns"></a><h4>Returns</h4>
<p>. </p>
-<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -1004,7 +1004,7 @@ garcon_menu_item_get_actions (<em class="parameter"><code><a class="link" href="
<div class="refsect3">
<a name="garcon-menu-item-get-actions.returns"></a><h4>Returns</h4>
<p>. </p>
-<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GarconMenuItemAction][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GarconMenuItemAction][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -1031,7 +1031,7 @@ garcon_menu_item_get_action (<em class="parameter"><code><a class="link" href="G
<div class="refsect3">
<a name="garcon-menu-item-get-action.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GarconMenuItemAction.html" title="GarconMenuItemAction"><span class="type">GarconMenuItemAction</span></a>. </p>
-<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
=====================================
docs/reference/html/GarconMenuItemCache.html
=====================================
@@ -144,7 +144,7 @@ garcon_menu_item_cache_lookup (<em class="parameter"><code><a class="link" href=
<div class="refsect3">
<a name="garcon-menu-item-cache-lookup.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GarconMenuItem.html" title="GarconMenuItem"><span class="type">GarconMenuItem</span></a>. </p>
-<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
=====================================
docs/reference/html/annotation-glossary.html
=====================================
@@ -49,8 +49,12 @@
<dt><span class="glossterm"><a name="annotation-glossterm-skip"></a>skip</span></dt>
<dd class="glossdef"><p>Exposed in C code, not necessarily available in other languages.</p></dd>
<a name="glsT"></a><h3 class="title">T</h3>
+<dt><span class="glossterm"><a name="annotation-glossterm-transfer%20container"></a>transfer container</span></dt>
+<dd class="glossdef"><p>The caller owns the data container, but not the data inside it.</p></dd>
<dt><span class="glossterm"><a name="annotation-glossterm-transfer%20full"></a>transfer full</span></dt>
<dd class="glossdef"><p>The caller owns the data, and is responsible for free it.</p></dd>
+<dt><span class="glossterm"><a name="annotation-glossterm-transfer%20none"></a>transfer none</span></dt>
+<dd class="glossdef"><p>The data is owned by the callee, which is responsible of freeing it.</p></dd>
<dt><span class="glossterm"><a name="annotation-glossterm-type"></a>type</span></dt>
<dd class="glossdef"><p>Override the parsed C type with given type.</p></dd>
</div>
=====================================
docs/reference/html/garcon-Version-Information.html
=====================================
@@ -310,7 +310,7 @@ linked against at application run time.</p>
<hr>
<div class="refsect2">
<a name="GARCON-MICRO-VERSION:CAPS"></a><h3>GARCON_MICRO_VERSION</h3>
-<pre class="programlisting">#define GARCON_MICRO_VERSION 2
+<pre class="programlisting">#define GARCON_MICRO_VERSION 3
</pre>
<p>The micro version number of the garcon library.
Like garcon_micro_version, but from the headers used at
=====================================
docs/reference/html/garcon-garcon-menu-item-pool.html
=====================================
@@ -189,7 +189,7 @@ garcon_menu_item_pool_lookup (<em class="parameter"><code><a class="link" href="
<div class="refsect3">
<a name="garcon-menu-item-pool-lookup.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GarconMenuItem.html" title="GarconMenuItem"><span class="type">GarconMenuItem</span></a> object. </p>
-<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
@@ -223,7 +223,7 @@ garcon_menu_item_pool_lookup_file (<em class="parameter"><code><a class="link" h
<div class="refsect3">
<a name="garcon-menu-item-pool-lookup-file.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GarconMenuItem.html" title="GarconMenuItem"><span class="type">GarconMenuItem</span></a> object. </p>
-<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
=====================================
docs/reference/html/garcon-garcon-menu-node.html
=====================================
@@ -521,7 +521,7 @@ garcon_menu_node_tree_get_string_children
<div class="refsect3">
<a name="garcon-menu-node-tree-get-string-children.returns"></a><h4>Returns</h4>
<p>list of <a href="/usr/share/gtk-doc/html/glib/glib-N-ary-Trees.html#GNode"><span class="type">GNode</span></a>. </p>
-<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GNode][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
+<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GNode][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
</div>
<hr>
=====================================
docs/reference/html/index.html
=====================================
@@ -15,7 +15,7 @@
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">garcon Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">
- For garcon 4.17.2.
+ For garcon 4.17.3.
The latest version of this documentation can be found on-line at
<a class="ulink" href="https://developer.xfce.org/garcon/index.html" target="_top">https://developer.xfce.org/garcon/</a>.
</p></div>
=====================================
garcon-gtk/garcon-gtk-menu.c
=====================================
@@ -593,7 +593,7 @@ garcon_gtk_menu_load_finish (GObject *source_object,
g_list_free_full (children, (GDestroyNotify) gtk_widget_destroy);
/* update the GtkMenu in place if shown */
- if (gtk_widget_get_visible (GTK_WIDGET (menu)))
+ if (menu->priv->is_loaded && gtk_widget_get_visible (GTK_WIDGET (menu)))
garcon_gtk_menu_add (menu, GTK_MENU (menu), menu->priv->menu);
else
menu->priv->is_populated = FALSE;
=====================================
garcon/garcon-config.h
=====================================
@@ -57,7 +57,7 @@ G_BEGIN_DECLS
* application compile time, rather than from the library
* linked against at application run time.
**/
-#define GARCON_MICRO_VERSION 2
+#define GARCON_MICRO_VERSION 3
/**
* GARCON_CHECK_VERSION:
=====================================
garcon/garcon-menu-item-cache.c
=====================================
@@ -144,7 +144,7 @@ garcon_menu_item_cache_finalize (GObject *object)
* @uri: URI to look for
* @desktop_id: desktop id to update
*
- * Returns: (transfer full) (nullable): a #GarconMenuItem
+ * Returns: (transfer none) (nullable): a #GarconMenuItem
*/
GarconMenuItem*
garcon_menu_item_cache_lookup (GarconMenuItemCache *cache,
=====================================
garcon/garcon-menu-item-pool.c
=====================================
@@ -129,7 +129,7 @@ garcon_menu_item_pool_insert (GarconMenuItemPool *pool,
* @pool: a #GarconMenuItemPool
* @desktop_id: (type filename): .desktop file
*
- * Returns: (transfer full): a #GarconMenuItem object
+ * Returns: (transfer none): a #GarconMenuItem object
*/
GarconMenuItem*
garcon_menu_item_pool_lookup (GarconMenuItemPool *pool,
@@ -147,7 +147,7 @@ garcon_menu_item_pool_lookup (GarconMenuItemPool *pool,
* @pool: a #GarconMenuItemPool
* @file: a GFile instance
*
- * Returns: (transfer full): a #GarconMenuItem object
+ * Returns: (transfer none): a #GarconMenuItem object
*/
GarconMenuItem *
garcon_menu_item_pool_lookup_file (GarconMenuItemPool *pool,
=====================================
garcon/garcon-menu-item.c
=====================================
@@ -1381,7 +1381,7 @@ garcon_menu_item_set_desktop_id (GarconMenuItem *item,
*
* Returns list of categories
*
- * Returns: (element-type utf8) (transfer full):
+ * Returns: (element-type utf8) (transfer none):
*/
GList*
garcon_menu_item_get_categories (GarconMenuItem *item)
@@ -1418,7 +1418,7 @@ garcon_menu_item_set_categories (GarconMenuItem *item,
* garcon_menu_item_get_keywords:
* @item: a #GarconMenuItem
*
- * Returns: (element-type utf8) (transfer full):
+ * Returns: (element-type utf8) (transfer none):
*/
GList*
garcon_menu_item_get_keywords (GarconMenuItem *item)
@@ -1838,7 +1838,7 @@ garcon_menu_item_has_keyword (GarconMenuItem *item,
* garcon_menu_item_get_actions:
* @item: a #GarconMenuItem
*
- * Returns: (element-type GarconMenuItemAction) (transfer full):
+ * Returns: (element-type GarconMenuItemAction) (transfer container):
*/
GList *
garcon_menu_item_get_actions (GarconMenuItem *item)
@@ -1865,7 +1865,7 @@ garcon_menu_item_get_actions (GarconMenuItem *item)
* @item: a #GarconMenuItem
* @action_name:
*
- * Returns: (nullable) (transfer full): a #GarconMenuItemAction
+ * Returns: (nullable) (transfer none): a #GarconMenuItemAction
*/
GarconMenuItemAction *
garcon_menu_item_get_action (GarconMenuItem *item,
=====================================
garcon/garcon-menu-node.c
=====================================
@@ -549,7 +549,7 @@ collect_strings (GNode *node,
* @type: type for the menu nodes
* @reverse:
*
- * Returns: (element-type GNode) (transfer full): list of #GNode
+ * Returns: (element-type GNode) (transfer container): list of #GNode
*/
GList *
garcon_menu_node_tree_get_string_children (GNode *tree,
=====================================
garcon/garcon-menu.c
=====================================
@@ -215,6 +215,9 @@ struct _GarconMenuPrivate
/* idle reload-required to group events */
guint idle_reload_required_id;
+
+ /* asynchronous load from GarconGtkMenu */
+ GMutex load_lock;
};
@@ -328,6 +331,8 @@ garcon_menu_init (GarconMenu *menu)
menu->priv->pool = garcon_menu_item_pool_new ();
menu->priv->uses_custom_path = TRUE;
menu->priv->changed_files = NULL;
+ menu->priv->file_changed_idle = 0;
+ g_mutex_init (&menu->priv->load_lock);
menu->priv->idle_reload_required_id = 0;
/* Take reference on the menu item cache */
@@ -391,6 +396,7 @@ garcon_menu_finalize (GObject *object)
/* Clear resources allocated in the load process */
garcon_menu_clear (menu);
+ g_mutex_clear (&menu->priv->load_lock);
/* Free file */
if (menu->priv->file != NULL)
@@ -591,14 +597,11 @@ garcon_menu_get_name (GarconMenu *menu)
* Returns the #GarconMenuDirectory of @menu or %NULL if @menu has
* no valid directory element.
*
- * The returned object should be unreffed with g_object_unref() when
- * no longer needed.
- *
* The menu directory may contain a lot of useful information about
* the menu like the display and icon name, desktop environments it
* should show up in etc.
*
- * Returns: (transfer full) (nullable): a #GarconMenuDirectory
+ * Returns: (transfer none) (nullable): a #GarconMenuDirectory
*/
GarconMenuDirectory*
garcon_menu_get_directory (GarconMenu *menu)
@@ -674,6 +677,8 @@ garcon_menu_load (GarconMenu *menu,
g_return_val_if_fail (GARCON_IS_MENU (menu), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_mutex_lock (&menu->priv->load_lock);
+
/* Make sure to reset the menu to a loadable state */
garcon_menu_clear (menu);
@@ -706,6 +711,7 @@ garcon_menu_load (GarconMenu *menu,
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT,
_("File \"%s\" not found"), relative_filename);
g_free (relative_filename);
+ g_mutex_unlock (&menu->priv->load_lock);
return FALSE;
}
@@ -742,7 +748,10 @@ garcon_menu_load (GarconMenu *menu,
g_object_unref (parser);
if (!success)
- return FALSE;
+ {
+ g_mutex_unlock (&menu->priv->load_lock);
+ return FALSE;
+ }
/* Generate submenus */
garcon_menu_resolve_menus (menu);
@@ -752,7 +761,10 @@ garcon_menu_load (GarconMenu *menu,
/* Abort if the cancellable was cancelled */
if (g_cancellable_set_error_if_cancelled (cancellable, error))
- return FALSE;
+ {
+ g_mutex_unlock (&menu->priv->load_lock);
+ return FALSE;
+ }
desktop_id_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
@@ -769,6 +781,8 @@ garcon_menu_load (GarconMenu *menu,
/* Initiate file system monitoring */
garcon_menu_start_monitoring (menu);
+ g_mutex_unlock (&menu->priv->load_lock);
+
return TRUE;
}
@@ -781,7 +795,7 @@ garcon_menu_load (GarconMenu *menu,
* Returns a sorted list of #GarconMenu submenus of @menu. The list
* should be freed with g_list_free().
*
- * Returns: (transfer full) (element-type GarconMenu): a sorted list
+ * Returns: (transfer container) (element-type GarconMenu): a sorted list
* of #GarconMenu.
*/
GList *
@@ -835,7 +849,7 @@ garcon_menu_add_menu (GarconMenu *menu,
*
* Looks in @menu for a submenu with @name as name.
*
- * Returns: (transfer full) (nullable): a #GarconMenu or %NULL.
+ * Returns: (transfer none) (nullable): a #GarconMenu or %NULL.
*/
GarconMenu *
garcon_menu_get_menu_with_name (GarconMenu *menu,
@@ -866,7 +880,7 @@ garcon_menu_get_menu_with_name (GarconMenu *menu,
*
* Returns the parent #GarconMenu or @menu.
*
- * Returns: (transfer full) (nullable): a #GarconMenu or %NULL
+ * Returns: (transfer none) (nullable): a #GarconMenu or %NULL
* if @menu is the root menu.
*/
GarconMenu *
@@ -1364,7 +1378,7 @@ garcon_menu_remove_deleted_menus (GarconMenu *menu)
* Get the item pool of the menu. This pool contains all items in this
* menu (for that of its submenus).
*
- * Returns: (transfer full): a #GarconMenuItemPool.
+ * Returns: (transfer none): a #GarconMenuItemPool.
*/
GarconMenuItemPool*
garcon_menu_get_item_pool (GarconMenu *menu)
@@ -1396,7 +1410,7 @@ items_collect (const gchar *desktop_id,
* The caller is responsible to free the returned list using
* g_list_free() when no longer needed.
*
- * Returns: (element-type GarconMenuItem) (transfer full): list
+ * Returns: (element-type GarconMenuItem) (transfer container): list
* of #GarconMenuItem included in @menu.
*/
GList *
@@ -1525,7 +1539,7 @@ layout_elements_collect (GList **dest_list,
* Returns a list of #GarconMenuItem or %NULL. Free the list with
* g_list_free().
*
- * Returns: (element-type GarconMenuItem) (nullable) (transfer full):
+ * Returns: (element-type GarconMenuItem) (nullable) (transfer container):
*/
GList *
garcon_menu_get_elements (GarconMenu *menu)
@@ -1797,12 +1811,6 @@ garcon_menu_start_monitoring (GarconMenu *menu)
/* Let only the root menu monitor menu files, merge files/directories and app dirs */
if (menu->priv->parent == NULL)
{
- /* Create the list for merging consecutive file change events */
- menu->priv->changed_files = NULL;
-
- /* Reset the idle source for handling file changes */
- menu->priv->file_changed_idle = 0;
-
garcon_menu_monitor_menu_files (menu);
garcon_menu_monitor_files (menu, menu->priv->merge_files,
@@ -1849,7 +1857,10 @@ garcon_menu_stop_monitoring (GarconMenu *menu)
/* Stop the idle source for handling file changes from being invoked */
if (menu->priv->file_changed_idle != 0)
- g_source_remove (menu->priv->file_changed_idle);
+ {
+ g_source_remove (menu->priv->file_changed_idle);
+ menu->priv->file_changed_idle = 0;
+ }
/* Free the hash table for merging consecutive file change events */
_garcon_g_slist_free_full (menu->priv->changed_files, g_object_unref);
@@ -2143,11 +2154,14 @@ garcon_menu_file_changed (GarconMenu *menu,
g_return_if_fail (GARCON_IS_MENU (menu));
g_return_if_fail (menu->priv->parent == NULL);
+ g_mutex_lock (&menu->priv->load_lock);
+
/* Quick check: reloading is needed if the menu file being used has changed */
if (g_file_equal (menu->priv->file, file))
{
garcon_menu_debug (file, event_type, "menu changed");
garcon_menu_file_emit_reload_required (menu);
+ g_mutex_unlock (&menu->priv->load_lock);
return;
}
@@ -2155,7 +2169,10 @@ garcon_menu_file_changed (GarconMenu *menu,
* need to refresh if a menu file is removed that we're not using because
* it is lower in priority (else we'd be using it already) */
if (event_type == G_FILE_MONITOR_EVENT_DELETED)
- return;
+ {
+ g_mutex_unlock (&menu->priv->load_lock);
+ return;
+ }
/* Build the ${XDG_MENU_PREFIX}applications.menu filename */
prefix = g_getenv ("XDG_MENU_PREFIX");
@@ -2199,6 +2216,8 @@ garcon_menu_file_changed (GarconMenu *menu,
garcon_menu_debug (file, event_type, "new menu has higher prio");
garcon_menu_file_emit_reload_required (menu);
}
+
+ g_mutex_unlock (&menu->priv->load_lock);
}
@@ -2250,6 +2269,8 @@ garcon_menu_process_file_changes (gpointer user_data)
g_return_val_if_fail (GARCON_IS_MENU (menu), FALSE);
g_return_val_if_fail (menu->priv->parent == NULL, FALSE);
+ g_mutex_lock (&menu->priv->load_lock);
+
for (lp = menu->priv->changed_files; !stop_processing && lp != NULL; lp = lp->next)
{
file = G_FILE (lp->data);
@@ -2337,6 +2358,8 @@ garcon_menu_process_file_changes (gpointer user_data)
/* reset the idle source ID */
menu->priv->file_changed_idle = 0;
+ g_mutex_unlock (&menu->priv->load_lock);
+
/* remove the idle source */
return FALSE;
}
@@ -2365,6 +2388,8 @@ garcon_menu_app_dir_changed (GarconMenu *menu,
g_return_if_fail (GARCON_IS_MENU (menu));
g_return_if_fail (menu->priv->parent == NULL);
+ g_mutex_lock (&menu->priv->load_lock);
+
if (event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT
|| event_type == G_FILE_MONITOR_EVENT_CREATED
|| event_type == G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED)
@@ -2424,6 +2449,8 @@ garcon_menu_app_dir_changed (GarconMenu *menu,
}
}
}
+
+ g_mutex_unlock (&menu->priv->load_lock);
}
@@ -2439,6 +2466,8 @@ garcon_menu_directory_file_changed (GarconMenu *menu,
g_return_if_fail (GARCON_IS_MENU (menu));
+ g_mutex_lock (&menu->priv->load_lock);
+
if (event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT
|| event_type == G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED
|| event_type == G_FILE_MONITOR_EVENT_DELETED
@@ -2467,6 +2496,8 @@ garcon_menu_directory_file_changed (GarconMenu *menu,
if (old_directory != NULL)
g_object_unref (old_directory);
}
+
+ g_mutex_unlock (&menu->priv->load_lock);
}
View it on GitLab: https://salsa.debian.org/xfce-team/desktop/garcon/-/commit/4d1ec97781a31485c9d65d1e93e7244bc916b7bc
--
View it on GitLab: https://salsa.debian.org/xfce-team/desktop/garcon/-/commit/4d1ec97781a31485c9d65d1e93e7244bc916b7bc
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xfce-commits/attachments/20221205/6385ae9f/attachment-0001.htm>
More information about the Pkg-xfce-commits
mailing list