diff options
author | Adrian Szyndela <adrian.s@samsung.com> | 2020-01-17 12:35:01 +0100 |
---|---|---|
committer | Adrian Szyndela <adrian.s@samsung.com> | 2020-01-28 13:21:53 +0100 |
commit | f16be3c8039d8bf59d3fb6655b31a21c05cfc298 (patch) | |
tree | 0e0ca24ee556ad58c95cf05c5a731dfb52976031 | |
parent | 9f7f0b6175d24b29e4a1dd13dcf15e6571072a87 (diff) | |
parent | 341683cfae94bb8234f60972c4c022bf95f3c577 (diff) | |
download | glib-f16be3c8039d8bf59d3fb6655b31a21c05cfc298.tar.gz glib-f16be3c8039d8bf59d3fb6655b31a21c05cfc298.tar.bz2 glib-f16be3c8039d8bf59d3fb6655b31a21c05cfc298.zip |
Merge 2.55.1 into tizen
Change-Id: Ifc32b4cc67f8ecfc5a1dde9f88af171e0d6f7a68
148 files changed, 4129 insertions, 1709 deletions
diff --git a/Makefile.am b/Makefile.am index ff661e0a2..49b5e4e71 100644 --- a/Makefile.am +++ b/Makefile.am @@ -149,7 +149,7 @@ valgrinddir = $(datadir)/glib-2.0/valgrind dist_valgrind_DATA = glib.supp # build documentation when doing distcheck -DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man --disable-maintainer-mode +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man --disable-maintainer-mode DISTCLEANFILES += config.lt @@ -1,3 +1,94 @@ +Overview of changes in GLib 2.55.1 +================================== + +* Build: + - The --enable-rebuilds configure option has been removed + - The --with-charsetalias-dir configure option has been added + +* GList and GSList now have autoptr support + +* The gsettings list-schemas command has gained a --print-paths option + +* Bugs fixed: + 346816 Refactor LIBDIR in libcharset Makefile + 508976 Does g_slist_sort preserve the order of equal elements? + 562334 2.18.2 break libglade on Solaris + 662802 systemtap multiarch issue + 684282 Add support static link of GIO modules + 692034 Install an invalidation notifier for GClosure in g_source_set_closure() + 694723 Get rid of REBUILD stuff in configure.ac + 697715 floating point precision problem in check test gst/gstvalue + 701156 testgobject assumes that the priv data follows the instance data + 720380 Segfault when using GDBusMenuModel on a peer-to-peer connection + 724383 glib: document restrictions on various foreach() functions + 724412 GLib mappedfile.c test uses g_get_user_runtime_dir instead of a tempo... + 724794 Fix "on on" typo in tap-driver.sh comment + 732003 gnode: Eliminate implicit signed-to-unsigned integer conversion + 734479 G_VALUE_HOLDS etc. cause -Wcast-qual warnings for a const GValue * + 737677 gmain: Make GSourceCallback thread-safe + 741167 gdbus-codegen fix for boxed out parameters + 748534 gtest: if a subprocess assertion fails, print its stdout and stderr + 749527 add weak pointer helpers similar to g_set_object + 749652 compilation errors with gcc 4.8 + 754634 Update the list of Linux filesystem magic numbers used in get_fs_type + 756011 Fix up annotations for GBookmarkFile + 761102 Increase performance for main loop + 773980 GIR scanner doesn't interpret array type properly + 776147 gio/glocalfilemonitor.c doesn't handle case G_FILE_MONITOR_EVENT_MOVE... + 776195 -z nodelete configure check does not work on Solaris + 777075 Potential leak of memory pointed to by 'list' + 779413 Translated X-Geoclue-Reason string not used in a dialog window + 780309 gio/tests/appinfo build fails: gdesktopappinfo.c skipped on OS X + 780893 Reword licensing header for gdbus-codegen + 782057 Unit tests fail in run-assert-msg-test.sh + 784995 meson: some Windows improvements + 786796 gtk-doc build fails with meson + 788806 Impossible to build static glib via meson + 788936 Show mime type icons on OS X + 790416 g_date_time_format returns empty string on %r with German locale + 790588 Generated file missing from .gitignore + 790697 g_object_ref API should propagate parameter type + 790785 glib-tap: Add missing mkdir for .test generation rule + 790829 glib-genmarshal --body must not generate alias implementations + 790830 Mismatch between number of interface methods in text and example code + 790837 Meson: missing many configure options + 790839 GApplication command line: lacks parameter_string, summary and descri... + 790877 fix non-portable check in G_GNUC_CHECK_VERSION + 790894 Do not connect to the session bus when trying GProxyResolverPortal io... + 790896 docs/reference/README has broken link to http://www.gtk.org/rdp/ + 790914 gdesktopappinfo: Downgrade a warning to a debug message + 790934 gtester doesn't handle skipped tests + 790948 GSourceFuncs documentation is confusing: when will dispatch be called? + 791036 Guard for g_output_stream_vprintf makes no sense + 791128 C runtime complains about bad arguments on each g_log() call + 791221 po/README.translators has no useful information in 2017 + 791235 Fix gschema.dtd regarding flags. + 791267 Make gschema.dtd usable. + 791296 gtester-report: fix range usage when running as python3 app + 791318 GBytes: Improve documentation + 791325 Gio handling of thumbnail:: attribute namespace causes inconsistent b... + 791334 gbinding.c:898: The target object of type GNetworkAddress has no prop... + 791337 Crash opening URIs with g_desktop_app_info_launch_uris_with_spawn() + 791342 Add autoptr support for lists + 791460 meson: fixes for OSX + 791532 Implicit declaration of function ‘memcmp’ in gtestutils.h + 791622 Disable strict-aliasing in GLib + 791720 Criticals in gio/xdp-dbus.h leading to crash under flatpak + 791744 gmenumodel test sometimes fails: assertion failed (items_changed_coun... + 791745 not immediately clear whether g_test_slow() is in effect by default + 791906 GSocketListenerClass.event has wrong signature + 792064 gsettings list-schemas --print-paths + 792098 Binding: bind_property’s @notify func is nullable + 792099 gdbus-test-codegen: Cast to void* to printf "%p" + 792129 meson: skip optional linux/unix deps that default to true when buildi... + 792322 GLib-GIO:ERROR:gschema-compile.c:51:test_schema: child process (/gsch... + 792324 gkeyfile: Document need for KEEP_TRANSLATIONS with get_locale_string() + +* Translation updates + Hebrew + Indonesian + + Overview of changes in GLib 2.55.0 ================================== diff --git a/config.h.meson b/config.h.meson index 3f310b3c9..2350fd320 100644 --- a/config.h.meson +++ b/config.h.meson @@ -352,9 +352,6 @@ /* Define to 1 if libselinux is available */ #mesondefine HAVE_SELINUX -/* Define to 1 if you have the <selinux/selinux.h> header file. */ -#mesondefine HAVE_SELINUX_SELINUX_H - /* Define to 1 if you have the `sendmmsg' function. */ #mesondefine HAVE_SENDMMSG diff --git a/configure.ac b/configure.ac index 23f6d5d88..d6cbd9f57 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ m4_define(glib_configure_ac) m4_define([glib_major_version], [2]) m4_define([glib_minor_version], [55]) -m4_define([glib_micro_version], [0]) +m4_define([glib_micro_version], [1]) m4_define([glib_interface_age], [0]) m4_define([glib_binary_age], [m4_eval(100 * glib_minor_version + glib_micro_version)]) @@ -252,10 +252,6 @@ AC_ARG_ENABLE(mem_pools, [AS_HELP_STRING([--disable-mem-pools], [disable all glib memory pools])],, [disable_mem_pools=no]) -AC_ARG_ENABLE(rebuilds, - [AS_HELP_STRING([--disable-rebuilds], - [disable all source autogeneration rules])],, - [enable_rebuilds=yes]) AC_ARG_ENABLE(libdbuspolicy, [AS_HELP_STRING([--enable-libdbuspolicy], [enable libdbuspolicy for kdbus transport [default=no]])],, @@ -368,20 +364,8 @@ AC_SUBST(GLIB_EXTRA_CFLAGS) AC_EXEEXT -# define a MAINT-like variable REBUILD which is set if Perl -# and awk are found, so autogenerated sources can be rebuilt AC_PROG_AWK AC_CHECK_PROGS(PERL, [perl5 perl]) -# We would like indent, but don't require it. -AC_CHECK_PROG(INDENT, indent, indent) -REBUILD=\# -if test "x$enable_rebuilds" = "xyes" && \ - test -n "$PERL" && \ - $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \ - test -n "$AWK" ; then - REBUILD= -fi -AC_SUBST(REBUILD) # option to specify python interpreter to use; this just sets $PYTHON, so that # we will fallback to reading $PYTHON if --with-python is not given, and @@ -759,6 +743,12 @@ AC_STRUCT_DIRENT_D_TYPE # Checks for libcharset AM_LANGINFO_CODESET gl_GLIBC21 +AC_ARG_WITH(charsetalias-dir, + AS_HELP_STRING([--with-charsetalias-dir=DIR], [directory for charset.alias file [LIBDIR]]), + [], + [with_charsetalias_dir='${libdir}']) +GLIB_CHARSETALIAS_DIR=$with_charsetalias_dir +AC_SUBST(GLIB_CHARSETALIAS_DIR) # check additional type sizes AC_CHECK_SIZEOF(size_t) @@ -2578,13 +2568,13 @@ AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$have_systemtap = xyes]) AC_ARG_WITH([tapset-install-dir], AS_HELP_STRING([--with-tapset-install-dir=DIR], - [path where systemtap tapsets are installed [DATADIR/systemtap/tapset]]), + [path where systemtap tapsets are installed [DATADIR/systemtap/tapset/HOST_CPU]]), [if test "x${withval}" = x; then - ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset" + ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset/${host_cpu}" else ABS_TAPSET_DIR="${withval}" fi], - [ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"]) + [ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset/${host_cpu}"]) AC_SUBST(ABS_TAPSET_DIR) dnl ************************************ @@ -2691,6 +2681,14 @@ AS_IF([ test "x$use_only_gcov" = "xyes"], [ LDFLAGS="$LDFLAGS -lgcov" ]) +dnl ******************************* +dnl *** Disable strict aliasing *** +dnl ******************************* +dnl See https://bugzilla.gnome.org/show_bug.cgi?id=791622 +AS_IF([test "${GCC}" = "yes"],[ + CFLAGS="$CFLAGS -fno-strict-aliasing" +]) + dnl ****************************** dnl *** output the whole stuff *** dnl ****************************** @@ -3383,8 +3381,9 @@ dnl AC_ARG_ENABLE([znodelete], [AS_HELP_STRING([--disable-znodelete], [avoid linking with -z,nodelete])],, - [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}" + [SAVED_CFLAGS="${CFLAGS}" SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}" AC_MSG_CHECKING([for --fatal-warnings linker flag]) + CFLAGS="${SAVED_CFLAGS} ${shared_flag:- -shared}" LDFLAGS=-Wl,--fatal-warnings LIBS= AC_TRY_LINK([], [return 0], @@ -3399,7 +3398,7 @@ AC_ARG_ENABLE([znodelete], enable_znodelete=yes, AC_MSG_RESULT(no) enable_znodelete=no) - LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"]) + CFLAGS="${SAVED_CFLAGS}" LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"]) if test "x${enable_znodelete}" = "xyes"; then GLIB_LINK_FLAGS="$GLIB_LINK_FLAGS -Wl,-z,nodelete" diff --git a/docs/reference/README b/docs/reference/README deleted file mode 100644 index 895028105..000000000 --- a/docs/reference/README +++ /dev/null @@ -1,63 +0,0 @@ -This package contains the reference documentation -for GLib. For more information about Glib, -see: - - http://www.gtk.org - -For information about contributing to the -GLib/GTK+ reference documentation project, see: - - http://www.gtk.org/rdp/ - -The GLib reference documentation is freely redistributable, -see the file COPYING for details. - - -REQUIREMENTS -============ - -To build the documentation, you must have the gtk-doc -package installed. To rebuild the template files, -you must have the current version of the GLib -header files installed. - - -BUILD -===== - -First, run configure to generate the makefiles for this -module. There is one option specific to this package - - --with-html-dir=DIR top of installed HTML documentation tree - - -The Makefiles for this module define three targets: - - templates: - - Scan the headers and merge the results with the current - template files - - sgml: - - Generate SGML files using the DocBook DTD from - the template files - - html: - - Generate HTML from the SGML files. - -To build the documentation, do: - - make sgml - make html - -You should only run the 'make templates' step if you -need to regenerate the templates for a more recent -version of the GLib sources. - - -INSTALLATION -============ - - make install diff --git a/docs/reference/gio/gio-docs.xml b/docs/reference/gio/gio-docs.xml index bc23bf946..6abd0ea79 100644 --- a/docs/reference/gio/gio-docs.xml +++ b/docs/reference/gio/gio-docs.xml @@ -167,6 +167,8 @@ <xi:include href="xml/gproxyresolver.xml"/> <xi:include href="xml/gsimpleproxyresolver.xml"/> <xi:include href="xml/gsocketconnectable.xml"/> + <xi:include href="xml/gsocketaddressenumerator.xml"/> + <xi:include href="xml/gproxyaddressenumerator.xml"/> <xi:include href="xml/gnetworkaddress.xml"/> <xi:include href="xml/gnetworkservice.xml"/> <xi:include href="xml/gsrvtarget.xml"/> diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt index e0472f7ca..277ca6184 100644 --- a/docs/reference/gio/gio-sections.txt +++ b/docs/reference/gio/gio-sections.txt @@ -1609,6 +1609,7 @@ g_desktop_app_info_get_keywords g_desktop_app_info_get_startup_wm_class g_desktop_app_info_set_desktop_env g_desktop_app_info_get_string +g_desktop_app_info_get_locale_string g_desktop_app_info_get_boolean g_desktop_app_info_has_key GDesktopAppLaunchCallback @@ -1937,26 +1938,40 @@ GSocketConnectableIface g_socket_connectable_enumerate g_socket_connectable_proxy_enumerate g_socket_connectable_to_string -<SUBSECTION> -GSocketAddressEnumerator -g_socket_address_enumerator_next -g_socket_address_enumerator_next_async -g_socket_address_enumerator_next_finish -<SUBSECTION> -GProxyAddressEnumerator <SUBSECTION Standard> G_IS_SOCKET_CONNECTABLE G_SOCKET_CONNECTABLE G_SOCKET_CONNECTABLE_GET_IFACE G_TYPE_SOCKET_CONNECTABLE +<SUBSECTION Private> +g_socket_connectable_get_type +</SECTION> + +<SECTION> +<FILE>gsocketaddressenumerator</FILE> +<TITLE>GSocketAddressEnumerator</TITLE> +GSocketAddressEnumerator GSocketAddressEnumeratorClass +g_socket_address_enumerator_next +g_socket_address_enumerator_next_async +g_socket_address_enumerator_next_finish +<SUBSECTION Standard> G_IS_SOCKET_ADDRESS_ENUMERATOR G_IS_SOCKET_ADDRESS_ENUMERATOR_CLASS G_SOCKET_ADDRESS_ENUMERATOR G_SOCKET_ADDRESS_ENUMERATOR_CLASS G_SOCKET_ADDRESS_ENUMERATOR_GET_CLASS G_TYPE_SOCKET_ADDRESS_ENUMERATOR +<SUBSECTION Private> +g_socket_address_enumerator_get_type +</SECTION> + +<SECTION> +<FILE>gproxyaddressenumerator</FILE> +<TITLE>GProxyAddressEnumerator</TITLE> +GProxyAddressEnumerator GProxyAddressEnumeratorClass +<SUBSECTION Standard> G_IS_PROXY_ADDRESS_ENUMERATOR G_IS_PROXY_ADDRESS_ENUMERATOR_CLASS G_PROXY_ADDRESS_ENUMERATOR @@ -1966,8 +1981,6 @@ G_TYPE_PROXY_ADDRESS_ENUMERATOR <SUBSECTION Private> GProxyAddressEnumeratorPrivate g_proxy_address_enumerator_get_type -g_socket_address_enumerator_get_type -g_socket_connectable_get_type </SECTION> <SECTION> @@ -3220,6 +3233,9 @@ g_application_run g_application_add_main_option_entries g_application_add_main_option g_application_add_option_group +g_application_set_option_context_parameter_string +g_application_set_option_context_summary +g_application_set_option_context_description <SUBSECTION> g_application_set_default g_application_get_default diff --git a/docs/reference/gio/gsettings.xml b/docs/reference/gio/gsettings.xml index 9528b9dd7..d7dc65db6 100644 --- a/docs/reference/gio/gsettings.xml +++ b/docs/reference/gio/gsettings.xml @@ -75,6 +75,7 @@ <cmdsynopsis> <command>gsettings</command> <arg choice="plain">list-schemas</arg> + <arg choice="opt">--print-paths</arg> </cmdsynopsis> <cmdsynopsis> <command>gsettings</command> @@ -198,7 +199,8 @@ Reset all keys under the given <replaceable>SCHEMA</replaceable>. <listitem><para> Lists the installed, non-relocatable schemas. See <option>list-relocatable-schemas</option> if you are interested in -relocatable schemas. +relocatable schemas. If <optional><option>--print-paths</option></optional> +is given, the path where each schema is mapped is also printed. </para></listitem> </varlistentry> diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build index e6b1386f6..33d1557ac 100644 --- a/docs/reference/gio/meson.build +++ b/docs/reference/gio/meson.build @@ -1,4 +1,4 @@ -if get_option('with-docs') != 'no' +if get_option('gtk_doc') subdir('xml') ignore_headers = [ @@ -52,9 +52,12 @@ if get_option('with-docs') != 'no' 'gnetworkmonitorbase.h', 'gnetworkmonitornetlink.h', 'gnetworkmonitornm.h', + 'gnetworkmonitorportal.h', 'gnotificationbackend.h', 'gnotification-private.h', + 'gosxappinfo.h', 'gpollfilemonitor.h', + 'gproxyresolverportal.h', 'gregistrysettingsbackend.h', 'gresourcefile.h', 'gsettingsbackendinternal.h', @@ -202,7 +205,7 @@ if get_option('with-docs') != 'no' endif -if get_option('with-man') != 'no' and xsltproc.found() +if get_option('man') manpages = ['gapplication', 'gio-querymodules', 'glib-compile-schemas', 'glib-compile-resources', 'gsettings', 'gresource', 'gdbus', 'gio', 'gdbus-codegen'] diff --git a/docs/reference/glib/building.xml b/docs/reference/glib/building.xml index 492b5ed5a..57c3c8c7d 100644 --- a/docs/reference/glib/building.xml +++ b/docs/reference/glib/building.xml @@ -42,8 +42,15 @@ the standard options. </para> <para> + GLib is compiled with + <ulink url="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fstrict-aliasing">strict aliasing</ulink> + disabled. It is strongly recommended that this is not re-enabled by + overriding the compiler flags, as GLib has not been tested with strict + aliasing and cannot be guaranteed to work. + </para> + <para> The GTK+ documentation contains - <ulink url="../gtk/gtk-building.html">further details</ulink> + <ulink url="https://developer.gnome.org/gtk3/stable/gtk-building.html">further details</ulink> about the build process and ways to influence it. </para> </refsect1> @@ -52,26 +59,23 @@ <para> Before you can compile the GLib library, you need to have various other tools and libraries installed on your system. - Beyond a C compiler (which must implement C90, but does not need - to implement C99), the two tools needed during the build process - (as differentiated from the tools used in when creating GLib - mentioned above such as <application>autoconf</application>) are - <command>pkg-config</command> and GNU make. + If you are building from a release archive, you will need + <ulink url="https://wiki.gnome.org/Projects/GLib/CompilerRequirements">a compliant C toolchain</ulink>, + GNU Make, and <application>pkg-config</application>; + if you are building directly from a Git repository clone + of GLib, you will also need the GNU Autotools mentioned + above. </para> <itemizedlist> <listitem> <para> - <ulink url="http://www.freedesktop.org/software/pkgconfig/">pkg-config</ulink> + <ulink url="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</ulink> is a tool for tracking the compilation flags needed for libraries that are used by the GLib library. (For each library, a small <literal>.pc</literal> text file is installed in a standard location that contains the compilation flags needed for that library along with version number - information.) The version of <command>pkg-config</command> - needed to build GLib is mirrored in the - <filename>dependencies</filename> directory - on the <ulink url="ftp://ftp.gtk.org/pub/gtk/v2.2/">GTK+ FTP - site.</ulink> + information). </para> </listitem> <listitem> @@ -107,7 +111,7 @@ <para> If your system has an <function>iconv()</function> implementation but you want to use libiconv instead, you can pass the - --with-libiconv option to configure. This forces + <option>--with-libiconv</option> option to configure. This forces libiconv to be used. </para> <para> @@ -151,20 +155,21 @@ <listitem> <para> GRegex uses the <ulink url="http://www.pcre.org/">PCRE library</ulink> - for regular expression matching. The default is to use the internal - version of PCRE that is patched to use GLib for memory management - and Unicode handling. If you prefer to use the system-supplied PCRE - library you can pass the <option>--with-pcre=system</option> option - to, but it is not recommended. + for regular expression matching. The default is to use the system + version of PCRE, to reduce the chances of security fixes going out + of sync. GLib additionally provides an internal copy of PCRE in case + the system version is too old, or does not support UTF-8; the internal + copy is patched to use GLib for memory management and to share the + same Unicode tables. </para> </listitem> <listitem> <para> The optional extended attribute support in GIO requires the - getxattr() family of functions that may be provided by glibc or - by the standalone libattr library. To build GLib without extended - attribute support, use the <option>--disable-xattr</option> - option. + <function>getxattr()</function> family of functions that may be + provided by the C library or by the standalone libattr library. To + build GLib without extended attribute support, use the + <option>--disable-xattr</option> option. </para> </listitem> <listitem> @@ -187,7 +192,9 @@ The optional support for <ulink url="http://sourceware.org/systemtap/">SystemTap</ulink> can be disabled with the <option>--disable-systemtap</option> - configure option. + configure option. Additionally, you can control the location + where GLib installs the SystemTap probes, using the + <option>--with-tapset-install-dir=DIR</option> configure option. </para> </listitem> </itemizedlist> @@ -203,15 +210,16 @@ </para> <formalpara> - <title><systemitem>--enable-debug</systemitem></title> + <title><option>--enable-debug</option></title> <para> Turns on various amounts of debugging support. Setting this to 'no' - disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and - all cast checks between different object types. Setting it to 'minimum' disables only cast checks. Setting it to 'yes' enables - <link linkend="G-DEBUG:CAPS">runtime debugging</link>. - The default is 'minimum'. - Note that 'no' is fast, but dangerous as it tends to destabilize + disables <function>g_assert()</function>, <function>g_return_if_fail()</function>, + <function>g_return_val_if_fail()</function> and all cast checks + between different object types. Setting it to 'minimum' disables + only cast checks. Setting it to 'yes' enables <link linkend="G-DEBUG:CAPS">runtime debugging</link>. + The default is 'minimum' for stable releases, and 'yes' for development + snapshots. Note that 'no' is fast, but dangerous as it tends to destabilize even mostly bug-free software by changing the effect of many bugs from simple warnings into fatal crashes. Thus <option>--enable-debug=no</option> should <emphasis>not</emphasis> @@ -220,26 +228,26 @@ </formalpara> <formalpara> - <title><systemitem>--disable-gc-friendly</systemitem> and - <systemitem>--enable-gc-friendly</systemitem></title> + <title><option>--disable-gc-friendly</option> and + <option>--enable-gc-friendly</option></title> <para> - By default, and with <systemitem>--disable-gc-friendly</systemitem> - as well, Glib does not clear the memory for certain objects before - they are freed. For example, Glib may decide to recycle GList nodes + By default, and with <option>--disable-gc-friendly</option> + as well, GLib does not clear the memory for certain objects before + they are freed. For example, GLib may decide to recycle GList nodes by putting them in a free list. However, memory profiling and debugging tools like <ulink url="http://www.valgrind.org">Valgrind</ulink> work better if an application does not keep dangling pointers to freed memory (even though these pointers are no longer dereferenced), or invalid pointers inside uninitialized memory. - The <systemitem>--enable-gc-friendly</systemitem> option makes Glib + The <option>--enable-gc-friendly</option> option makes GLib clear memory in these situations: </para> <itemizedlist> <listitem> <para> - When shrinking a GArray, Glib will clear the memory no longer + When shrinking a GArray, GLib will clear the memory no longer available in the array: shrink an array from 10 bytes to 7, and the last 3 bytes will be cleared. This includes removals of single and multiple elements. @@ -247,7 +255,7 @@ </listitem> <listitem> <para> - When growing a GArray, Glib will clear the new chunk of memory. + When growing a GArray, GLib will clear the new chunk of memory. Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will be cleared. </para> @@ -259,14 +267,14 @@ </listitem> <listitem> <para> - When freeing a node from a GHashTable, Glib will first clear + When freeing a node from a GHashTable, GLib will first clear the node, which used to have pointers to the key and the value stored at that node. </para> </listitem> <listitem> <para> - When destroying or removing a GTree node, Glib will clear the node, + When destroying or removing a GTree node, GLib will clear the node, which used to have pointers to the node's value, and the left and right subnodes. </para> @@ -275,13 +283,13 @@ <para> Since clearing the memory has a cost, - <systemitem>--disable-gc-friendly</systemitem> is the default. + <option>--disable-gc-friendly</option> is the default. </para> </formalpara> <formalpara> - <title><systemitem>--disable-mem-pools</systemitem> and - <systemitem>--enable-mem-pools</systemitem></title> + <title><option>--disable-mem-pools</option> and + <option>--enable-mem-pools</option></title> <para> Many small chunks of memory are often allocated via collective pools @@ -321,7 +329,7 @@ </formalpara> <formalpara> - <title><systemitem>--with-threads</systemitem></title> + <title><option>--with-threads</option></title> <para> Specify a thread implementation to use. Available options are @@ -331,19 +339,7 @@ </formalpara> <formalpara> - <title><systemitem>--disable-regex</systemitem> and - <systemitem>--enable-regex</systemitem></title> - - <para> - Do not compile GLib with regular expression support. - GLib will be smaller because it will not need the - PCRE library. This is however not recommended, as - programs may need GRegex. - </para> - </formalpara> - - <formalpara> - <title><systemitem>--with-pcre</systemitem></title> + <title><option>--with-pcre</option></title> <para> Specify whether to use the internal or the system-supplied @@ -358,30 +354,34 @@ <listitem> <para> 'system' means that GRegex will be compiled to use - the system-supplied PCRE library. + the system-supplied PCRE library; this is the default + setting. </para> </listitem> </itemizedlist> - Using the internal PCRE is the preferred solution: + Using the internal PCRE is the preferred solution if: <itemizedlist> <listitem> <para> - System-supplied PCRE has a separated copy of the big tables - used for Unicode handling. + your system has strict resource constraints; the system-supplied + PCRE has a separated copy of the tables used for Unicode + handling, whereas the internal copy shares the Unicode tables + used by GLib. </para> </listitem> <listitem> <para> - Some systems have PCRE libraries compiled without some needed - features, such as UTF-8 and Unicode support. + your system has PCRE built without some needed features, + such as UTF-8 and Unicode support. </para> </listitem> <listitem> <para> - PCRE uses some global variables for memory management and - other features. In the rare case of a program using both - GRegex and PCRE (maybe indirectly through a library), - this variables could lead to problems when they are modified. + you are planning to use both GRegex and PCRE API at the same + time, either directly or indirectly through a dependency; PCRE + uses some global variables for memory management and + other features, and if both GLib and PCRE try to access them + at the same time, this could lead to undefined behavior. </para> </listitem> </itemizedlist> @@ -389,31 +389,34 @@ </formalpara> <formalpara> - <title><systemitem>--disable-included-printf</systemitem> and - <systemitem>--enable-included-printf</systemitem></title> + <title><option>--disable-included-printf</option> and + <option>--enable-included-printf</option></title> <para> By default the <command>configure</command> script will try to auto-detect whether the C library provides a suitable set - of printf() functions. In detail, <command>configure</command> - checks that the semantics of snprintf() are as specified by C99 + of <function>printf()</function> functions. In detail, + <command>configure</command> checks that the semantics of + <function>snprintf()</function> are as specified by C99 and that positional parameters as specified in the Single Unix Specification are supported. If this not the case, GLib will - include an implementation of the printf() family. + include an implementation of the <function>printf()</function> + family. </para> <para> These options can be used to explicitly control whether - an implementation of the printf() family should be included or not. + an implementation of the <function>printf()</function> family + should be included or not. </para> </formalpara> <formalpara> - <title><systemitem>--disable-Bsymbolic</systemitem> and - <systemitem>--enable-Bsymbolic</systemitem></title> + <title><option>--disable-Bsymbolic</option> and + <option>--enable-Bsymbolic</option></title> <para> - By default, GLib uses the -Bsymbolic-functions linker - flag to avoid intra-library PLT jumps. A side-effect + By default, GLib uses the <option>-Bsymbolic-functions</option> + linker flag to avoid intra-library PLT jumps. A side-effect of this is that it is no longer possible to override internal uses of GLib functions with <envar>LD_PRELOAD</envar>. Therefore, it may make @@ -424,8 +427,8 @@ </formalpara> <formalpara> - <title><systemitem>--disable-gtk-doc</systemitem> and - <systemitem>--enable-gtk-doc</systemitem></title> + <title><option>--disable-gtk-doc</option> and + <option>--enable-gtk-doc</option></title> <para> By default the <command>configure</command> script will try @@ -442,8 +445,8 @@ </formalpara> <formalpara> - <title><systemitem>--disable-man</systemitem> and - <systemitem>--enable-man</systemitem></title> + <title><option>--disable-man</option> and + <option>--enable-man</option></title> <para> By default the <command>configure</command> script will try @@ -458,23 +461,24 @@ </formalpara> <formalpara> - <title><systemitem>--disable-xattr</systemitem> and - <systemitem>--enable-xattr</systemitem></title> + <title><option>--disable-xattr</option> and + <option>--enable-xattr</option></title> <para> By default the <command>configure</command> script will try - to auto-detect whether the getxattr() family of functions - is available. If it is, then extended attribute support - will be included in GIO. These options can be used to - explicitly control whether extended attribute support - should be included or not. getxattr() and friends can - be provided by glibc or by the standalone libattr library. + to auto-detect whether the <function>getxattr()</function> + family of functions is available. If it is, then extended + attribute support will be included in GIO. These options can + be used to explicitly control whether extended attribute + support should be included or not. <function>getxattr()</function> + and friends can be provided by glibc or by the standalone + libattr library. </para> </formalpara> <formalpara> - <title><systemitem>--disable-selinux</systemitem> and - <systemitem>--enable-selinux</systemitem></title> + <title><option>--disable-selinux</option> and + <option>--enable-selinux</option></title> <para> By default the <command>configure</command> script will @@ -486,8 +490,8 @@ </formalpara> <formalpara> - <title><systemitem>--disable-dtrace</systemitem> and - <systemitem>--enable-dtrace</systemitem></title> + <title><option>--disable-dtrace</option> and + <option>--enable-dtrace</option></title> <para> By default the <command>configure</command> script will @@ -496,8 +500,8 @@ </formalpara> <formalpara> - <title><systemitem>--disable-systemtap</systemitem> and - <systemitem>--enable-systemtap</systemitem></title> + <title><option>--disable-systemtap</option> and + <option>--enable-systemtap</option></title> <para> This option requires DTrace support. If it is available, then @@ -507,8 +511,8 @@ </formalpara> <formalpara> - <title><systemitem>--enable-coverage</systemitem> and - <systemitem>--disable-coverage</systemitem></title> + <title><option>--enable-coverage</option> and + <option>--disable-coverage</option></title> <para> Enable the generation of coverage reports for the GLib tests. @@ -520,7 +524,7 @@ </formalpara> <formalpara> - <title><systemitem>--with-runtime-libdir=RELPATH</systemitem></title> + <title><option>--with-runtime-libdir=RELPATH</option></title> <para> Allows specifying a relative path to where to install the runtime @@ -528,21 +532,21 @@ GLib applications). This can be used in operating system setups where programs using GLib needs to run before e.g. <filename>/usr</filename> is mounted. - For example, if LIBDIR is <filename>/usr/lib</filename> and + For example, if <varname>LIBDIR</varname> is <filename>/usr/lib</filename> and <filename>../../lib</filename> is passed to - <systemitem>--with-runtime-libdir</systemitem> then the + <option>--with-runtime-libdir</option> then the runtime libraries are installed into <filename>/lib</filename> rather than <filename>/usr/lib</filename>. </para> </formalpara> <formalpara> - <title><systemitem>--with-python</systemitem></title> + <title><option>--with-python=PATH</option></title> <para> Allows specifying the Python interpreter to use, either as an absolute path, - or as a program name. GLib can be built with Python 2 (at least version 2.5) - or Python 3. + or as a program name. GLib can be built with Python 2 (at least version 2.7) + or, preferably, with Python 3. </para> </formalpara> </refsect1> diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index 5235c9f4c..0f6b47e2f 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -401,6 +401,8 @@ G_INLINE_FUNC g_auto g_autoptr g_autofree +g_autolist +g_autoslist G_DEFINE_AUTOPTR_CLEANUP_FUNC G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC G_DEFINE_AUTO_CLEANUP_FREE_FUNC diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build index 271574dda..f0f915e96 100644 --- a/docs/reference/glib/meson.build +++ b/docs/reference/glib/meson.build @@ -1,4 +1,4 @@ -if get_option('with-docs') != 'no' +if get_option('gtk_doc') subdir('xml') ignore_headers = [ @@ -145,7 +145,7 @@ if get_option('with-docs') != 'no' install: true) endif -if get_option('with-man') != 'no' and xsltproc.found() +if get_option('man') manpages = ['glib-gettextize', 'gtester', 'gtester-report'] foreach page : manpages custom_target(page + '-man', diff --git a/docs/reference/gobject/gobject-sections.txt b/docs/reference/gobject/gobject-sections.txt index 2f4b30079..d1fc4bdc1 100644 --- a/docs/reference/gobject/gobject-sections.txt +++ b/docs/reference/gobject/gobject-sections.txt @@ -279,6 +279,8 @@ g_object_weak_ref g_object_weak_unref g_object_add_weak_pointer g_object_remove_weak_pointer +g_set_weak_pointer +g_clear_weak_pointer GToggleNotify g_object_add_toggle_ref g_object_remove_toggle_ref diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build index 5a7aa4754..de46cf96d 100644 --- a/docs/reference/gobject/meson.build +++ b/docs/reference/gobject/meson.build @@ -1,4 +1,4 @@ -if get_option('with-docs') != 'no' +if get_option('gtk_doc') subdir('xml') ignore_headers = [ @@ -72,12 +72,15 @@ if get_option('with-docs') != 'no' configuration: version_conf ) + gtkdocincl = include_directories('.') + gnome.gtkdoc('gobject', main_xml : 'gobject-docs.xml', namespace : 'g', gobject_typesfile : join_paths(meson.current_source_dir(), 'gobject.types'), mode : 'none', dependencies : [libgobject_dep, libglib_dep], + include_directories : [gtkdocincl], src_dir : 'gobject', scan_args : [ '--deprecated-guards=G_DISABLE_DEPRECATED', @@ -106,7 +109,7 @@ if get_option('with-docs') != 'no' ) endif -if get_option('with-man') != 'no' and xsltproc.found() +if get_option('man') manpages = ['glib-mkenums', 'glib-genmarshal', 'gobject-query'] foreach page : manpages custom_target(page + '-man', diff --git a/docs/reference/gobject/tut_gobject.xml b/docs/reference/gobject/tut_gobject.xml index 8097cb649..ac5c8e1e7 100644 --- a/docs/reference/gobject/tut_gobject.xml +++ b/docs/reference/gobject/tut_gobject.xml @@ -105,9 +105,9 @@ ViewerFile *file = g_object_new (VIEWER_TYPE_FILE, NULL); This will make sure the class structure of this new object is correctly initialized. Here, <function>viewer_file_class_init</function> is expected to override the object's class methods and setup the - class' own methods. In the example above, the constructor method is - the only overridden method: it is set to - <function>viewer_file_constructor</function>. + class' own methods. In the example above, the <literal>constructed</literal> + method is the only overridden method: it is set to + <function>viewer_file_constructed</function>. </para> <para> diff --git a/docs/reference/gobject/tut_howto.xml b/docs/reference/gobject/tut_howto.xml index 0696666be..01391a970 100644 --- a/docs/reference/gobject/tut_howto.xml +++ b/docs/reference/gobject/tut_howto.xml @@ -860,7 +860,7 @@ b_method_to_call (B *obj, gint some_param) <para> The first step is to get the header right. This interface - defines two methods: + defines three methods: <informalexample><programlisting> /* * Copyright/Licensing information. diff --git a/gio/Makefile.am b/gio/Makefile.am index 3663375ef..66e6b1bd0 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -484,6 +484,7 @@ gio_base_sources = \ gioenums.h \ gioerror.c \ giomodule.c \ + giomodule-priv.c \ giomodule-priv.h \ gioscheduler.c \ giostream.c \ @@ -829,7 +830,7 @@ glib_compile_resources_SOURCES = \ gvdb/gvdb-builder.c \ glib-compile-resources.c -gio_querymodules_SOURCES = gio-querymodules.c +gio_querymodules_SOURCES = gio-querymodules.c giomodule-priv.c gio_querymodules_LDADD = libgio-2.0.la \ $(top_builddir)/gobject/libgobject-2.0.la \ $(top_builddir)/gmodule/libgmodule-2.0.la \ diff --git a/gio/completion/gsettings b/gio/completion/gsettings index 22b2ac379..d509758e9 100644 --- a/gio/completion/gsettings +++ b/gio/completion/gsettings @@ -37,6 +37,10 @@ __gsettings() { list-keys|list-children|list-recursively|reset-recursively) choices="$(gsettings $schemadir list-schemas 2> /dev/null)"$'\n'"$(gsettings $schemadir list-relocatable-schemas 2> /dev/null | sed -e 's.$.:/.')" ;; + list-schemas) + COMPREPLY=($(compgen -W "--print-paths" -- ${COMP_WORDS[${COMP_CWORD}]})) + return 0 + ;; get|range|set|reset|writable|monitor|describe) choices="$(gsettings $schemadir list-schemas 2> /dev/null | sed -e 's.$. .')"$'\n'"$(gsettings $schemadir list-relocatable-schemas 2> /dev/null | sed -e 's.$.:/.')" diff --git a/gio/gapplication.c b/gio/gapplication.c index 9d880fc1d..67e6c16bf 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -246,6 +246,9 @@ struct _GApplicationPrivate GSList *option_groups; GHashTable *packed_options; gboolean options_parsed; + gchar *parameter_string; + gchar *summary; + gchar *description; /* Allocated option strings, from g_application_add_main_option() */ GSList *option_strings; @@ -484,7 +487,9 @@ g_application_parse_command_line (GApplication *application, */ g_return_val_if_fail (!application->priv->options_parsed, NULL); - context = g_option_context_new (NULL); + context = g_option_context_new (application->priv->parameter_string); + g_option_context_set_summary (context, application->priv->summary); + g_option_context_set_description (context, application->priv->description); gapplication_group = g_option_group_new ("gapplication", _("GApplication options"), _("Show GApplication options"), @@ -814,6 +819,77 @@ g_application_add_option_group (GApplication *application, application->priv->option_groups = g_slist_prepend (application->priv->option_groups, group); } +/** + * g_application_set_option_context_parameter_string: + * @application: the #GApplication + * @parameter_string: (nullable): a string which is displayed + * in the first line of `--help` output, after the usage summary `programname [OPTION...]`. + * + * Sets the parameter string to be used by the commandline handling of @application. + * + * This function registers the argument to be passed to g_option_context_new() + * when the internal #GOptionContext of @application is created. + * + * See g_option_context_new() for more information about @parameter_string. + * + * Since: 2.56 + */ +void +g_application_set_option_context_parameter_string (GApplication *application, + const gchar *parameter_string) +{ + g_return_if_fail (G_IS_APPLICATION (application)); + + g_free (application->priv->parameter_string); + application->priv->parameter_string = g_strdup (parameter_string); +} + +/** + * g_application_set_option_context_summary: + * @application: the #GApplication + * @summary: (nullable): a string to be shown in `--help` output + * before the list of options, or %NULL + * + * Adds a summary to the @application option context. + * + * See g_option_context_set_summary() for more information. + * + * Since: 2.56 + */ +void +g_application_set_option_context_summary (GApplication *application, + const gchar *summary) +{ + g_return_if_fail (G_IS_APPLICATION (application)); + + g_free (application->priv->summary); + application->priv->summary = g_strdup (summary); +} + +/** + * g_application_set_option_context_description: + * @application: the #GApplication + * @description: (nullable): a string to be shown in `--help` output + * after the list of options, or %NULL + * + * Adds a description to the @application option context. + * + * See g_option_context_set_description() for more information. + * + * Since: 2.56 + */ +void +g_application_set_option_context_description (GApplication *application, + const gchar *description) +{ + g_return_if_fail (G_IS_APPLICATION (application)); + + g_free (application->priv->description); + application->priv->description = g_strdup (description); + +} + + /* vfunc defaults {{{1 */ static void g_application_real_before_emit (GApplication *application, @@ -1275,6 +1351,10 @@ g_application_finalize (GObject *object) if (application->priv->packed_options) g_hash_table_unref (application->priv->packed_options); + g_free (application->priv->parameter_string); + g_free (application->priv->summary); + g_free (application->priv->description); + g_slist_free_full (application->priv->option_strings, g_free); if (application->priv->impl) diff --git a/gio/gapplication.h b/gio/gapplication.h index a9d2d281a..cdb93655a 100644 --- a/gio/gapplication.h +++ b/gio/gapplication.h @@ -175,7 +175,15 @@ void g_application_add_main_option (GApplic GLIB_AVAILABLE_IN_2_40 void g_application_add_option_group (GApplication *application, GOptionGroup *group); - +GLIB_AVAILABLE_IN_2_56 +void g_application_set_option_context_parameter_string (GApplication *application, + const gchar *parameter_string); +GLIB_AVAILABLE_IN_2_56 +void g_application_set_option_context_summary (GApplication *application, + const gchar *summary); +GLIB_AVAILABLE_IN_2_56 +void g_application_set_option_context_description (GApplication *application, + const gchar *description); GLIB_AVAILABLE_IN_ALL gboolean g_application_get_is_registered (GApplication *application); GLIB_AVAILABLE_IN_ALL diff --git a/gio/gasyncinitable.c b/gio/gasyncinitable.c index c48184353..bc5e40e7b 100644 --- a/gio/gasyncinitable.c +++ b/gio/gasyncinitable.c @@ -457,7 +457,7 @@ g_async_initable_new_finish (GAsyncInitable *initable, GError **error) { if (g_async_initable_init_finish (initable, res, error)) - return g_object_ref (initable); + return g_object_ref (G_OBJECT (initable)); else return NULL; } diff --git a/gio/gcancellable.c b/gio/gcancellable.c index d833bcfc0..48c736cca 100644 --- a/gio/gcancellable.c +++ b/gio/gcancellable.c @@ -644,6 +644,18 @@ typedef struct { guint cancelled_handler; } GCancellableSource; +/* + * We can't guarantee that the source still has references, so we are + * relying on the fact that g_source_set_ready_time() no longer makes + * assertions about the reference count - the source might be in the + * window between last-unref and finalize, during which its refcount + * is officially 0. However, we *can* guarantee that it's OK to + * dereference it in a limited way, because we know we haven't yet reached + * cancellable_source_finalize() - if we had, then we would have waited + * for signal emission to finish, then disconnected the signal handler + * under the lock. + * See https://bugzilla.gnome.org/show_bug.cgi?id=791754 + */ static void cancellable_source_cancelled (GCancellable *cancellable, gpointer user_data) diff --git a/gio/gdbus-2.0/codegen/.gitignore b/gio/gdbus-2.0/codegen/.gitignore index 2d1abb9f6..0015c09e7 100644 --- a/gio/gdbus-2.0/codegen/.gitignore +++ b/gio/gdbus-2.0/codegen/.gitignore @@ -1,2 +1,3 @@ *.pyc +config.py gdbus-codegen diff --git a/gio/gdbus-2.0/codegen/codegen.py b/gio/gdbus-2.0/codegen/codegen.py index 7590e5624..6d64009d3 100644 --- a/gio/gdbus-2.0/codegen/codegen.py +++ b/gio/gdbus-2.0/codegen/codegen.py @@ -58,7 +58,8 @@ class CodeGenerator: self.c.write('/*\n' ' * Generated by gdbus-codegen %s. DO NOT EDIT.\n' ' *\n' - ' * The license of this code is the same as for the source it was derived from.\n' + ' * The license of this code is the same as for the D-Bus interface description\n' + ' * it was derived from.\n' ' */\n' '\n' %(config.VERSION)) @@ -222,7 +223,8 @@ class CodeGenerator: self.h.write('/*\n' ' * Generated by gdbus-codegen %s. DO NOT EDIT.\n' ' *\n' - ' * The license of this code is the same as for the source it was derived from.\n' + ' * The license of this code is the same as for the D-Bus interface description\n' + ' * it was derived from.\n' ' */\n' '\n' '#ifndef __%s__\n' @@ -993,7 +995,7 @@ class CodeGenerator: self.c.write(self.docbook_gen.expand( '/**\n' ' * %s_override_properties:\n' - ' * @klass: The class structure for a #GObject<!-- -->-derived class.\n' + ' * @klass: The class structure for a #GObject derived class.\n' ' * @property_id_begin: The property id to assign to the first overridden property.\n' ' *\n' ' * Overrides all #GObject properties in the #%s interface for a concrete class.\n' @@ -1082,7 +1084,7 @@ class CodeGenerator: ' * @invocation: A #GDBusMethodInvocation.\n' %(i.camel_name, m.name_hyphen, i.camel_name), False)) if unix_fd: - self.c.write (' * @fd_list: (allow-none): A #GUnixFDList or %NULL.\n') + self.c.write (' * @fd_list: (nullable): A #GUnixFDList or %NULL.\n') for a in m.in_args: self.c.write (' * @arg_%s: Argument passed by remote caller.\n'%(a.name)) self.c.write(self.docbook_gen.expand( @@ -1343,9 +1345,9 @@ class CodeGenerator: for a in m.in_args: self.c.write(' * @arg_%s: Argument to pass with the method invocation.\n'%(a.name)) if unix_fd: - self.c.write(' * @fd_list: (allow-none): A #GUnixFDList or %NULL.\n') + self.c.write(' * @fd_list: (nullable): A #GUnixFDList or %NULL.\n') self.c.write(self.docbook_gen.expand( - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %%NULL.\n' ' * @user_data: User data to pass to @callback.\n' ' *\n' @@ -1395,7 +1397,7 @@ class CodeGenerator: ' * @proxy: A #%sProxy.\n' %(i.name_lower, m.name_lower, i.camel_name)) for a in m.out_args: - self.c.write(' * @out_%s: (out): Return location for return parameter or %%NULL to ignore.\n'%(a.name)) + self.c.write(' * @out_%s: (out)%s: Return location for return parameter or %%NULL to ignore.\n'%(a.name, ' ' + a.array_annotation if a.array_annotation else '')) if unix_fd: self.c.write(' * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.\n') self.c.write(self.docbook_gen.expand( @@ -1448,13 +1450,13 @@ class CodeGenerator: for a in m.in_args: self.c.write(' * @arg_%s: Argument to pass with the method invocation.\n'%(a.name)) if unix_fd: - self.c.write(' * @fd_list: (allow-none): A #GUnixFDList or %NULL.\n') + self.c.write(' * @fd_list: (nullable): A #GUnixFDList or %NULL.\n') for a in m.out_args: - self.c.write(' * @out_%s: (out): Return location for return parameter or %%NULL to ignore.\n'%(a.name)) + self.c.write(' * @out_%s: (out)%s: Return location for return parameter or %%NULL to ignore.\n'%(a.name, ' ' + a.array_annotation if a.array_annotation else '')) if unix_fd: self.c.write(' * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.\n') self.c.write(self.docbook_gen.expand( - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @error: Return location for error or %%NULL.\n' ' *\n' ' * Synchronously invokes the %s.%s() D-Bus method on @proxy. The calling thread is blocked until a reply is received.\n' @@ -1528,7 +1530,7 @@ class CodeGenerator: ' * @invocation: (transfer full): A #GDBusMethodInvocation.\n' %(i.name_lower, m.name_lower, i.camel_name)) if unix_fd: - self.c.write (' * @fd_list: (allow-none): A #GUnixFDList or %NULL.\n') + self.c.write (' * @fd_list: (nullable): A #GUnixFDList or %NULL.\n') for a in m.out_args: self.c.write(' * @%s: Parameter to return.\n'%(a.name)) self.c.write(self.docbook_gen.expand( @@ -1888,9 +1890,9 @@ class CodeGenerator: ' * %s_proxy_new:\n' ' * @connection: A #GDBusConnection.\n' ' * @flags: Flags from the #GDBusProxyFlags enumeration.\n' - ' * @name: (allow-none): A bus name (well-known or unique) or %%NULL if @connection is not a message bus connection.\n' + ' * @name: (nullable): A bus name (well-known or unique) or %%NULL if @connection is not a message bus connection.\n' ' * @object_path: An object path.\n' - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @callback: A #GAsyncReadyCallback to call when the request is satisfied.\n' ' * @user_data: User data to pass to @callback.\n' ' *\n' @@ -1948,9 +1950,9 @@ class CodeGenerator: ' * %s_proxy_new_sync:\n' ' * @connection: A #GDBusConnection.\n' ' * @flags: Flags from the #GDBusProxyFlags enumeration.\n' - ' * @name: (allow-none): A bus name (well-known or unique) or %%NULL if @connection is not a message bus connection.\n' + ' * @name: (nullable): A bus name (well-known or unique) or %%NULL if @connection is not a message bus connection.\n' ' * @object_path: An object path.\n' - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @error: Return location for error or %%NULL\n' ' *\n' ' * Synchronously creates a proxy for the D-Bus interface #%s. See g_dbus_proxy_new_sync() for more details.\n' @@ -1988,7 +1990,7 @@ class CodeGenerator: ' * @flags: Flags from the #GDBusProxyFlags enumeration.\n' ' * @name: A bus name (well-known or unique).\n' ' * @object_path: An object path.\n' - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @callback: A #GAsyncReadyCallback to call when the request is satisfied.\n' ' * @user_data: User data to pass to @callback.\n' ' *\n' @@ -2048,7 +2050,7 @@ class CodeGenerator: ' * @flags: Flags from the #GDBusProxyFlags enumeration.\n' ' * @name: A bus name (well-known or unique).\n' ' * @object_path: An object path.\n' - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @error: Return location for error or %%NULL\n' ' *\n' ' * Like %s_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.\n' @@ -3076,7 +3078,7 @@ class CodeGenerator: '/**\n' ' * %sobject_skeleton_set_%s:\n' ' * @object: A #%sObjectSkeleton.\n' - ' * @interface_: (allow-none): A #%s or %%NULL to clear the interface.\n' + ' * @interface_: (nullable): A #%s or %%NULL to clear the interface.\n' ' *\n' ' * Sets the #%s instance for the D-Bus interface #%s on @object.\n' %(self.ns_lower, i.name_upper.lower(), self.namespace, i.camel_name, i.camel_name, i.name), False)) @@ -3150,12 +3152,12 @@ class CodeGenerator: ' * %sobject_manager_client_get_proxy_type:\n' ' * @manager: A #GDBusObjectManagerClient.\n' ' * @object_path: The object path of the remote object (unused).\n' - ' * @interface_name: (allow-none): Interface name of the remote object or %%NULL to get the object proxy #GType.\n' + ' * @interface_name: (nullable): Interface name of the remote object or %%NULL to get the object proxy #GType.\n' ' * @user_data: User data (unused).\n' ' *\n' - ' * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy<!-- -->- and #GDBusProxy<!-- -->-derived types.\n' + ' * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy derived and #GDBusProxy derived types.\n' ' *\n' - ' * Returns: A #GDBusProxy<!-- -->-derived #GType if @interface_name is not %%NULL, otherwise the #GType for #%sObjectProxy.\n' + ' * Returns: A #GDBusProxy derived #GType if @interface_name is not %%NULL, otherwise the #GType for #%sObjectProxy.\n' %(self.ns_lower, self.namespace), False)) self.c.write(' */\n') self.c.write('GType\n' @@ -3190,9 +3192,9 @@ class CodeGenerator: ' * %sobject_manager_client_new:\n' ' * @connection: A #GDBusConnection.\n' ' * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.\n' - ' * @name: (allow-none): A bus name (well-known or unique) or %%NULL if @connection is not a message bus connection.\n' + ' * @name: (nullable): A bus name (well-known or unique) or %%NULL if @connection is not a message bus connection.\n' ' * @object_path: An object path.\n' - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @callback: A #GAsyncReadyCallback to call when the request is satisfied.\n' ' * @user_data: User data to pass to @callback.\n' ' *\n' @@ -3250,9 +3252,9 @@ class CodeGenerator: ' * %sobject_manager_client_new_sync:\n' ' * @connection: A #GDBusConnection.\n' ' * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.\n' - ' * @name: (allow-none): A bus name (well-known or unique) or %%NULL if @connection is not a message bus connection.\n' + ' * @name: (nullable): A bus name (well-known or unique) or %%NULL if @connection is not a message bus connection.\n' ' * @object_path: An object path.\n' - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @error: Return location for error or %%NULL\n' ' *\n' ' * Synchronously creates #GDBusObjectManagerClient using %sobject_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details.\n' @@ -3290,7 +3292,7 @@ class CodeGenerator: ' * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.\n' ' * @name: A bus name (well-known or unique).\n' ' * @object_path: An object path.\n' - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @callback: A #GAsyncReadyCallback to call when the request is satisfied.\n' ' * @user_data: User data to pass to @callback.\n' ' *\n' @@ -3350,7 +3352,7 @@ class CodeGenerator: ' * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.\n' ' * @name: A bus name (well-known or unique).\n' ' * @object_path: An object path.\n' - ' * @cancellable: (allow-none): A #GCancellable or %%NULL.\n' + ' * @cancellable: (nullable): A #GCancellable or %%NULL.\n' ' * @error: Return location for error or %%NULL\n' ' *\n' ' * Like %sobject_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection.\n' diff --git a/gio/gdbus-2.0/codegen/dbustypes.py b/gio/gdbus-2.0/codegen/dbustypes.py index b163cb935..2dc8e11eb 100644 --- a/gio/gdbus-2.0/codegen/dbustypes.py +++ b/gio/gdbus-2.0/codegen/dbustypes.py @@ -54,6 +54,8 @@ class Arg: self.format_out = '@' + self.signature self.gvariant_get = 'XXX' self.gvalue_get = 'g_value_get_variant' + self.array_annotation = '' + if not utils.lookup_annotation(self.annotations, 'org.gtk.GDBus.C.ForceGVariant'): if self.signature == 'b': self.ctype_in_g = 'gboolean ' @@ -200,6 +202,7 @@ class Arg: self.format_out = '^as' self.gvariant_get = 'g_variant_get_strv' self.gvalue_get = 'g_value_get_boxed' + self.array_annotation = '(array zero-terminated=1)' elif self.signature == 'ao': self.ctype_in_g = 'const gchar *const *' self.ctype_in = 'const gchar *const *' @@ -211,6 +214,7 @@ class Arg: self.format_out = '^ao' self.gvariant_get = 'g_variant_get_objv' self.gvalue_get = 'g_value_get_boxed' + self.array_annotation = '(array zero-terminated=1)' elif self.signature == 'aay': self.ctype_in_g = 'const gchar *const *' self.ctype_in = 'const gchar *const *' @@ -222,6 +226,8 @@ class Arg: self.format_out = '^aay' self.gvariant_get = 'g_variant_get_bytestring_array' self.gvalue_get = 'g_value_get_boxed' + self.array_annotation = '(array zero-terminated=1)' + class Method: def __init__(self, name): diff --git a/gio/gdbusactiongroup.c b/gio/gdbusactiongroup.c index 0acee36a9..894b482bd 100644 --- a/gio/gdbusactiongroup.c +++ b/gio/gdbusactiongroup.c @@ -475,7 +475,8 @@ g_dbus_action_group_iface_init (GActionGroupInterface *iface) /** * g_dbus_action_group_get: * @connection: A #GDBusConnection - * @bus_name: the bus name which exports the action group + * @bus_name: (nullable): the bus name which exports the action + * group or %NULL if @connection is not a message bus connection * @object_path: the object path at which the action group is exported * * Obtains a #GDBusActionGroup for the action group which is exported at @@ -503,6 +504,8 @@ g_dbus_action_group_get (GDBusConnection *connection, { GDBusActionGroup *group; + g_return_val_if_fail (bus_name != NULL || g_dbus_connection_get_unique_name (connection) == NULL, NULL); + group = g_object_new (G_TYPE_DBUS_ACTION_GROUP, NULL); group->connection = g_object_ref (connection); group->bus_name = g_strdup (bus_name); diff --git a/gio/gdbusauthmechanismsha1.c b/gio/gdbusauthmechanismsha1.c index 47cef7833..0cbaf946d 100644 --- a/gio/gdbusauthmechanismsha1.c +++ b/gio/gdbusauthmechanismsha1.c @@ -273,7 +273,7 @@ ensure_keyring_directory (GError **error) G_IO_ERROR_FAILED, _("Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o"), path, - statbuf.st_mode & 0777); + (guint) (statbuf.st_mode & 0777)); g_free (path); path = NULL; goto out; @@ -284,7 +284,7 @@ ensure_keyring_directory (GError **error) #endif #endif } - goto out; + goto out; } if (g_mkdir (path, 0700) != 0) diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c index 26bc1640f..e8fb9ac6c 100755 --- a/gio/gdbusconnection.c +++ b/gio/gdbusconnection.c @@ -177,7 +177,7 @@ * ## An example for file descriptor passing # {#gdbus-unix-fd-client} * * Here is an example for passing UNIX file descriptors: - * [gdbus-unix-fd-client.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-unix-fd-client.c) + * [gdbus-unix-fd-client.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-unix-fd-client.c) * * ## An example for exporting a GObject # {#gdbus-export} * diff --git a/gio/gdbuserror.c b/gio/gdbuserror.c index 95949ead3..f2778d2d0 100644 --- a/gio/gdbuserror.c +++ b/gio/gdbuserror.c @@ -101,9 +101,9 @@ * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover * org.project.Foo.Bar.Error.AnotherError using g_dbus_error_get_remote_error(). * - * Note that errors in the %G_DBUS_ERROR error domain is intended only + * Note that the %G_DBUS_ERROR error domain is intended only * for returning errors from a remote message bus process. Errors - * generated locally in-process by e.g. #GDBusConnection is from the + * generated locally in-process by e.g. #GDBusConnection should use the * %G_IO_ERROR domain. */ diff --git a/gio/gdbuserror.h b/gio/gdbuserror.h index 115ad8292..5bd8b5b14 100644 --- a/gio/gdbuserror.h +++ b/gio/gdbuserror.h @@ -37,9 +37,9 @@ G_BEGIN_DECLS * in this domain will be from the #GDBusError enumeration. See * #GError for more information on error domains. * - * Note that errors in this error domain is intended only for + * Note that this error domain is intended only for * returning errors from a remote message bus process. Errors - * generated locally in-process by e.g. #GDBusConnection is from the + * generated locally in-process by e.g. #GDBusConnection should use the * %G_IO_ERROR domain. * * Since: 2.26 diff --git a/gio/gdbusmenumodel.c b/gio/gdbusmenumodel.c index 9593d97f6..e29614a41 100644 --- a/gio/gdbusmenumodel.c +++ b/gio/gdbusmenumodel.c @@ -203,7 +203,7 @@ path_identifier_equal (gconstpointer a, ConstPathIdentifier *id_b = b; return id_a->connection == id_b->connection && - g_str_equal (id_a->bus_name, id_b->bus_name) && + g_strcmp0 (id_a->bus_name, id_b->bus_name) == 0 && g_str_equal (id_a->object_path, id_b->object_path); } @@ -857,7 +857,8 @@ g_dbus_menu_model_get_from_group (GDBusMenuGroup *group, /** * g_dbus_menu_model_get: * @connection: a #GDBusConnection - * @bus_name: the bus name which exports the menu model + * @bus_name: (nullable): the bus name which exports the menu model + * or %NULL if @connection is not a message bus connection * @object_path: the object path at which the menu model is exported * * Obtains a #GDBusMenuModel for the menu model which is exported @@ -883,6 +884,8 @@ g_dbus_menu_model_get (GDBusConnection *connection, GDBusMenuModel *proxy; GMainContext *context; + g_return_val_if_fail (bus_name != NULL || g_dbus_connection_get_unique_name (connection) == NULL, NULL); + context = g_main_context_get_thread_default (); if (context == NULL) context = g_main_context_default (); diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c index 39314281e..e4b5fb0d9 100644 --- a/gio/gdbusmessage.c +++ b/gio/gdbusmessage.c @@ -3480,10 +3480,10 @@ g_dbus_message_print (GDBusMessage *message, { #ifndef MAJOR_MINOR_NOT_FOUND g_string_append_printf (fs, "%s" "dev=%d:%d", fs->len > 0 ? "," : "", - major (statbuf.st_dev), minor (statbuf.st_dev)); + (gint) major (statbuf.st_dev), (gint) minor (statbuf.st_dev)); #endif g_string_append_printf (fs, "%s" "mode=0%o", fs->len > 0 ? "," : "", - statbuf.st_mode); + (guint) statbuf.st_mode); g_string_append_printf (fs, "%s" "ino=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "", (guint64) statbuf.st_ino); g_string_append_printf (fs, "%s" "uid=%u", fs->len > 0 ? "," : "", @@ -3492,7 +3492,7 @@ g_dbus_message_print (GDBusMessage *message, (guint) statbuf.st_gid); #ifndef MAJOR_MINOR_NOT_FOUND g_string_append_printf (fs, "%s" "rdev=%d:%d", fs->len > 0 ? "," : "", - major (statbuf.st_rdev), minor (statbuf.st_rdev)); + (gint) major (statbuf.st_rdev), (gint) minor (statbuf.st_rdev)); #endif g_string_append_printf (fs, "%s" "size=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "", (guint64) statbuf.st_size); diff --git a/gio/gdbusobjectmanagerserver.c b/gio/gdbusobjectmanagerserver.c index d8781ed20..273629dec 100644 --- a/gio/gdbusobjectmanagerserver.c +++ b/gio/gdbusobjectmanagerserver.c @@ -1033,7 +1033,7 @@ g_dbus_object_manager_server_get_object (GDBusObjectManager *_manager, g_mutex_lock (&manager->priv->lock); data = g_hash_table_lookup (manager->priv->map_object_path_to_data, object_path); if (data != NULL) - ret = g_object_ref (data->object); + ret = g_object_ref (G_DBUS_OBJECT (data->object)); g_mutex_unlock (&manager->priv->lock); return ret; diff --git a/gio/gdbusutils.c b/gio/gdbusutils.c index 3b11eed46..db167866f 100644 --- a/gio/gdbusutils.c +++ b/gio/gdbusutils.c @@ -694,7 +694,7 @@ g_dbus_gvalue_to_gvariant (const GValue *gvalue, { GVariant *untrusted_empty; untrusted_empty = g_variant_new_from_data (type, NULL, 0, FALSE, NULL, NULL); - ret = g_variant_ref_sink (g_variant_get_normal_form (untrusted_empty)); + ret = g_variant_take_ref (g_variant_get_normal_form (untrusted_empty)); g_variant_unref (untrusted_empty); } diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index cb5ec48b5..26bc53bd5 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -2199,7 +2199,7 @@ g_desktop_app_info_get_show_in (GDesktopAppInfo *info, /* Launching... {{{2 */ static char * -expand_macro_single (char macro, char *uri) +expand_macro_single (char macro, const char *uri) { GFile *file; char *result = NULL; @@ -2248,6 +2248,29 @@ expand_macro_single (char macro, char *uri) return result; } +static char * +expand_macro_uri (char macro, const char *uri, gboolean force_file_uri, char force_file_uri_macro) +{ + char *expanded = NULL; + + g_return_val_if_fail (uri != NULL, NULL); + + if (!force_file_uri || + /* Pass URI if it contains an anchor */ + strchr (uri, '#') != NULL) + { + expanded = expand_macro_single (macro, uri); + } + else + { + expanded = expand_macro_single (force_file_uri_macro, uri); + if (expanded == NULL) + expanded = expand_macro_single (macro, uri); + } + + return expanded; +} + static void expand_macro (char macro, GString *exec, @@ -2255,10 +2278,10 @@ expand_macro (char macro, GList **uri_list) { GList *uris = *uri_list; - char *expanded; + char *expanded = NULL; gboolean force_file_uri; char force_file_uri_macro; - char *uri; + const char *uri; g_return_if_fail (exec != NULL); @@ -2295,19 +2318,8 @@ expand_macro (char macro, if (uris) { uri = uris->data; - if (!force_file_uri || - /* Pass URI if it contains an anchor */ - strchr (uri, '#') != NULL) - { - expanded = expand_macro_single (macro, uri); - } - else - { - expanded = expand_macro_single (force_file_uri_macro, uri); - if (expanded == NULL) - expanded = expand_macro_single (macro, uri); - } - + expanded = expand_macro_uri (macro, uri, + force_file_uri, force_file_uri_macro); if (expanded) { g_string_append (exec, expanded); @@ -2325,20 +2337,8 @@ expand_macro (char macro, while (uris) { uri = uris->data; - - if (!force_file_uri || - /* Pass URI if it contains an anchor */ - strchr (uri, '#') != NULL) - { - expanded = expand_macro_single (macro, uri); - } - else - { - expanded = expand_macro_single (force_file_uri_macro, uri); - if (expanded == NULL) - expanded = expand_macro_single (macro, uri); - } - + expanded = expand_macro_uri (macro, uri, + force_file_uri, force_file_uri_macro); if (expanded) { g_string_append (exec, expanded); @@ -2494,7 +2494,7 @@ prepend_terminal_to_vector (int *argc, if (check == NULL) { check = g_strdup ("xterm"); - g_warning ("couldn't find a terminal, falling back to xterm"); + g_debug ("Couldn’t find a terminal: falling back to xterm"); } term_argv[0] = check; term_argv[1] = g_strdup ("-e"); @@ -2658,6 +2658,8 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info, { gboolean completed = FALSE; GList *old_uris; + GList *dup_uris; + char **argv, **envp; int argc; ChildSetupData data; @@ -2671,6 +2673,11 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info, else envp = g_get_environ (); + /* The GList* passed to expand_application_parameters() will be modified + * internally by expand_macro(), so we need to pass a copy of it instead, + * and also use that copy to control the exit condition of the loop below. + */ + dup_uris = g_list_copy (uris); do { GPid pid; @@ -2678,13 +2685,13 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info, GList *iter; char *sn_id = NULL; - old_uris = uris; - if (!expand_application_parameters (info, exec_line, &uris, &argc, &argv, error)) + old_uris = dup_uris; + if (!expand_application_parameters (info, exec_line, &dup_uris, &argc, &argv, error)) goto out; /* Get the subset of URIs we're launching with this process */ launched_uris = NULL; - for (iter = old_uris; iter != NULL && iter != uris; iter = iter->next) + for (iter = old_uris; iter != NULL && iter != dup_uris; iter = iter->next) launched_uris = g_list_prepend (launched_uris, iter->data); launched_uris = g_list_reverse (launched_uris); @@ -2780,11 +2787,12 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info, g_strfreev (argv); argv = NULL; } - while (uris != NULL); + while (dup_uris != NULL); completed = TRUE; out: + g_list_free (dup_uris); g_strfreev (argv); g_strfreev (envp); @@ -4409,6 +4417,33 @@ g_desktop_app_info_get_string (GDesktopAppInfo *info, } /** + * g_desktop_app_info_get_locale_string: + * @info: a #GDesktopAppInfo + * @key: the key to look up + * + * Looks up a localized string value in the keyfile backing @info + * translated to the current locale. + * + * The @key is looked up in the "Desktop Entry" group. + * + * Returns: (nullable): a newly allocated string, or %NULL if the key + * is not found + * + * Since: 2.56 + */ +char * +g_desktop_app_info_get_locale_string (GDesktopAppInfo *info, + const char *key) +{ + g_return_val_if_fail (G_IS_DESKTOP_APP_INFO (info), NULL); + g_return_val_if_fail (key != NULL && *key != '\0', NULL); + + return g_key_file_get_locale_string (info->keyfile, + G_KEY_FILE_DESKTOP_GROUP, + key, NULL, NULL); +} + +/** * g_desktop_app_info_get_boolean: * @info: a #GDesktopAppInfo * @key: the key to look up diff --git a/gio/gdesktopappinfo.h b/gio/gdesktopappinfo.h index 7be940bdd..a2df3dd51 100644 --- a/gio/gdesktopappinfo.h +++ b/gio/gdesktopappinfo.h @@ -82,6 +82,9 @@ gboolean g_desktop_app_info_has_key (GDesktopAppInfo *info, GLIB_AVAILABLE_IN_2_36 char * g_desktop_app_info_get_string (GDesktopAppInfo *info, const char *key); +GLIB_AVAILABLE_IN_2_56 +char * g_desktop_app_info_get_locale_string (GDesktopAppInfo *info, + const char *key); GLIB_AVAILABLE_IN_2_36 gboolean g_desktop_app_info_get_boolean (GDesktopAppInfo *info, const char *key); diff --git a/gio/gio-querymodules.c b/gio/gio-querymodules.c index 7abfe07fb..74c659462 100644 --- a/gio/gio-querymodules.c +++ b/gio/gio-querymodules.c @@ -20,6 +20,7 @@ #include "config.h" #include "giomodule.h" +#include "giomodule-priv.h" #include <gstdio.h> #include <errno.h> @@ -83,7 +84,20 @@ query_dir (const char *dirname) if (module) { - g_module_symbol (module, "g_io_module_query", (gpointer) &query); + gchar *modulename; + gchar *symname; + + modulename = _g_io_module_extract_name (name); + symname = g_strconcat ("g_io_", modulename, "_query", NULL); + g_module_symbol (module, symname, (gpointer) &query); + g_free (symname); + g_free (modulename); + + if (!query) + { + /* Fallback to old name */ + g_module_symbol (module, "g_io_module_query", (gpointer) &query); + } if (query) { diff --git a/gio/gio.rc.in b/gio/gio.rc.in index cfaa42d3e..3b19b3ee1 100644 --- a/gio/gio.rc.in +++ b/gio/gio.rc.in @@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "Gio" VALUE "FileVersion", "@GLIB_VERSION@.0" VALUE "InternalName", "libgio-2.0-@LT_CURRENT_MINUS_AGE@" - VALUE "LegalCopyright", "Copyright 2006-2011 Red Hat, Inc. and others." + VALUE "LegalCopyright", "Copyright 2006-2011 Red Hat, Inc. and others." VALUE "OriginalFilename", "libgio-2.0-@LT_CURRENT_MINUS_AGE@.dll" VALUE "ProductName", "GLib" VALUE "ProductVersion", "@GLIB_VERSION@" diff --git a/gio/giomodule-priv.c b/gio/giomodule-priv.c new file mode 100644 index 000000000..41afa54a0 --- /dev/null +++ b/gio/giomodule-priv.c @@ -0,0 +1,69 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2017 Collabora Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Xavier Claessens <xavier.claessens@collabora.com> + */ + +#include "config.h" +#include "giomodule.h" +#include "giomodule-priv.h" + +#include <string.h> + +/** + * _g_io_module_extract_name: + * @filename: filename of a GIOModule + * + * Extract the plugin name from its filename. It removes optional "lib" or + * "libgio" prefix, and removes everything after the first dot. For example: + * "libgiognutls.so" -> "gnutls". + * + * Returns: (transfer full): the module's name + */ +gchar * +_g_io_module_extract_name (const char *filename) +{ + gchar *bname, *name; + const gchar *dot; + gsize prefix_len, len; + gsize i; + + bname = g_path_get_basename (filename); + for (i = 0; bname[i]; ++i) + { + if (bname[i] == '-') + bname[i] = '_'; + } + + if (g_str_has_prefix (bname, "libgio")) + prefix_len = 6; + else if (g_str_has_prefix (bname, "lib")) + prefix_len = 3; + else + prefix_len = 0; /* use whole name (minus suffix) as plugin name */ + + dot = strchr (bname, '.'); + if (dot != NULL) + len = dot - bname - prefix_len; + else + len = strlen (bname + prefix_len); + + name = g_strndup (bname + prefix_len, len); + g_free (bname); + + return name; +} diff --git a/gio/giomodule-priv.h b/gio/giomodule-priv.h index e48059313..68d46f25c 100644 --- a/gio/giomodule-priv.h +++ b/gio/giomodule-priv.h @@ -41,6 +41,9 @@ GType _g_io_module_get_default_type (const gchar *extension_point, void *_g_io_win32_get_module (void); #endif +gchar *_g_io_module_extract_name (const char *filename); + + G_END_DECLS #endif /* __G_IO_MODULE_PRIV_H__ */ diff --git a/gio/giomodule.c b/gio/giomodule.c index 40476957c..1adfd937e 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c @@ -291,6 +291,43 @@ g_io_module_finalize (GObject *object) } static gboolean +load_symbols (GIOModule *module) +{ + gchar *name; + gchar *load_symname; + gchar *unload_symname; + gboolean ret; + + name = _g_io_module_extract_name (module->filename); + load_symname = g_strconcat ("g_io_", name, "_load", NULL); + unload_symname = g_strconcat ("g_io_", name, "_unload", NULL); + + ret = g_module_symbol (module->library, + load_symname, + (gpointer) &module->load) && + g_module_symbol (module->library, + unload_symname, + (gpointer) &module->unload); + + if (!ret) + { + /* Fallback to old names */ + ret = g_module_symbol (module->library, + "g_io_module_load", + (gpointer) &module->load) && + g_module_symbol (module->library, + "g_io_module_unload", + (gpointer) &module->unload); + } + + g_free (name); + g_free (load_symname); + g_free (unload_symname); + + return ret; +} + +static gboolean g_io_module_load_module (GTypeModule *gmodule) { GIOModule *module = G_IO_MODULE (gmodule); @@ -310,12 +347,7 @@ g_io_module_load_module (GTypeModule *gmodule) } /* Make sure that the loaded library contains the required methods */ - if (! g_module_symbol (module->library, - "g_io_module_load", - (gpointer) &module->load) || - ! g_module_symbol (module->library, - "g_io_module_unload", - (gpointer) &module->unload)) + if (!load_symbols (module)) { g_printerr ("%s\n", g_module_error ()); g_module_close (module->library); diff --git a/gio/giomodule.h b/gio/giomodule.h index 485f5eb9f..e94b8099d 100644 --- a/gio/giomodule.h +++ b/gio/giomodule.h @@ -112,6 +112,14 @@ GTypeClass* g_io_extension_ref_class (GIOExtension * This function is run after the module has been loaded into GIO, * to initialize the module. Typically, this function will call * g_io_extension_point_implement(). + * + * Since 2.56, this function should be named `g_io_<modulename>_load`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. **/ GLIB_AVAILABLE_IN_ALL void g_io_module_load (GIOModule *module); @@ -124,6 +132,14 @@ void g_io_module_load (GIOModule *module); * * This function is run when the module is being unloaded from GIO, * to finalize the module. + * + * Since 2.56, this function should be named `g_io_<modulename>_unload`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. **/ GLIB_AVAILABLE_IN_ALL void g_io_module_unload (GIOModule *module); @@ -155,6 +171,14 @@ void g_io_module_unload (GIOModule *module); * run gio-querymodules in order to build the cache files required for * lazy loading. * + * Since 2.56, this function should be named `g_io_<modulename>_query`, where + * `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and + * everything after the first dot removed, and with `-` replaced with `_` + * throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. + * Using the new symbol names avoids name clashes when building modules + * statically. The old symbol names continue to be supported, but cannot be used + * for static builds. + * * Returns: (transfer full): A %NULL-terminated array of strings, * listing the supported extension points of the module. The array * must be suitable for freeing with g_strfreev(). diff --git a/gio/glocalfile.c b/gio/glocalfile.c index e484a31bf..e7481454e 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -665,22 +665,42 @@ get_fs_type (long f_type) return "autofs"; case 0xADFF: return "affs"; + case 0x62646576: + return "bdevfs"; case 0x42465331: return "befs"; case 0x1BADFACE: return "bfs"; + case 0x42494e4d: + return "binfmt_misc"; case 0x9123683E: return "btrfs"; + case 0x73727279: + return "btrfs_test_fs"; + case 0x27e0eb: + return "cgroup"; + case 0x63677270: + return "cgroup2"; case 0xFF534D42: return "cifs"; case 0x73757245: return "coda"; case 0x012FF7B7: return "coh"; + case 0x62656570: + return "configfs"; case 0x28cd3d45: return "cramfs"; + case 0x64626720: + return "debugfs"; case 0x1373: return "devfs"; + case 0x1cd1: + return "devpts"; + case 0xf15f: + return "ecryptfs"; + case 0xde5e81e4: + return "efivarfs"; case 0x00414A53: return "efs"; case 0x137D: @@ -689,8 +709,18 @@ get_fs_type (long f_type) return "ext2"; case 0xEF53: return "ext3/ext4"; + case 0xF2F52010: + return "f2fs"; + case 0x65735546: + return "fuse"; + case 0x65735543: + return "fusectl"; + case 0xBAD1DEA: + return "futexfs"; case 0x4244: return "hfs"; + case 0x00c0ffee: + return "hostfs"; case 0xF995E849: return "hpfs"; case 0x958458f6: @@ -709,42 +739,80 @@ get_fs_type (long f_type) return "minix2"; case 0x2478: return "minix22"; + case 0x4d5a: + return "minix3"; + case 0x19800202: + return "mqueue"; case 0x4d44: return "msdos"; case 0x564c: return "ncp"; case 0x6969: return "nfs"; + case 0x3434: + return "nilfs"; + case 0x6e736673: + return "nsfs"; case 0x5346544e: return "ntfs"; + case 0x7461636f: + return "ocfs2"; case 0x9fa1: return "openprom"; + case 0x794c7630: + return "overlay"; + case 0x50495045: + return "pipefs"; case 0x9fa0: return "proc"; + case 0x6165676C: + return "pstore"; case 0x002f: return "qnx4"; + case 0x68191122: + return "qnx6"; + case 0x858458f6: + return "ramfs"; case 0x52654973: return "reiserfs"; case 0x7275: return "romfs"; + case 0x67596969: + return "rpc_pipefs"; + case 0x73636673: + return "securityfs"; + case 0xf97cff8c: + return "selinuxfs"; + case 0x43415d53: + return "smackfs"; case 0x517B: return "smb"; + case 0x534F434B: + return "sockfs"; case 0x73717368: return "squashfs"; + case 0x62656572: + return "sysfs"; case 0x012FF7B6: return "sysv2"; case 0x012FF7B5: return "sysv4"; case 0x01021994: return "tmpfs"; + case 0x74726163: + return "tracefs"; case 0x15013346: return "udf"; case 0x00011954: return "ufs"; case 0x9fa2: return "usbdevice"; + case 0x01021997: + return "v9fs"; case 0xa501FCF5: return "vxfs"; + case 0xabba1974: + return "xenfs"; case 0x012FF7B4: return "xenix"; case 0x58465342: @@ -753,8 +821,6 @@ get_fs_type (long f_type) return "xiafs"; case 0x52345362: return "reiser4"; - case 0x65735546: - return "fuse"; default: return NULL; } diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index fad80d37c..50d870fb7 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -657,7 +657,10 @@ get_xattrs_from_fd (int fd, } if (list_res_size == -1) - return; + { + g_free (list); + return; + } attr = list; while (list_res_size > 0) @@ -1674,7 +1677,7 @@ get_icon_name (const char *path, { name = use_symbolic ? "folder-videos-symbolic" : "folder-videos"; } - else if (g_strcmp0 (content_type, "inode/directory") == 0) + else if (g_content_type_is_mime_type (content_type,"inode/directory")) { name = use_symbolic ? "folder-symbolic" : "folder"; } @@ -1978,7 +1981,11 @@ _g_local_file_info_get (const char *basename, get_xattrs (path, FALSE, info, attribute_matcher, (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS) == 0); if (_g_file_attribute_matcher_matches_id (attribute_matcher, - G_FILE_ATTRIBUTE_ID_THUMBNAIL_PATH)) + G_FILE_ATTRIBUTE_ID_THUMBNAIL_PATH) || + _g_file_attribute_matcher_matches_id (attribute_matcher, + G_FILE_ATTRIBUTE_ID_THUMBNAIL_IS_VALID) || + _g_file_attribute_matcher_matches_id (attribute_matcher, + G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED)) { if (stat_ok) get_thumbnail_attributes (path, info, &statbuf); diff --git a/gio/glocalfileiostream.c b/gio/glocalfileiostream.c index 30e68488e..779137fb8 100644 --- a/gio/glocalfileiostream.c +++ b/gio/glocalfileiostream.c @@ -57,7 +57,7 @@ _g_local_file_io_stream_new (GLocalFileOutputStream *output_stream) int fd; stream = g_object_new (G_TYPE_LOCAL_FILE_IO_STREAM, NULL); - stream->output_stream = g_object_ref (output_stream); + stream->output_stream = g_object_ref (G_OUTPUT_STREAM (output_stream)); _g_local_file_output_stream_set_do_close (output_stream, FALSE); fd = _g_local_file_output_stream_get_fd (output_stream); stream->input_stream = (GInputStream *)_g_local_file_input_stream_new (fd); diff --git a/gio/gmenuexporter.c b/gio/gmenuexporter.c index e5ad54a5e..e12a0f78e 100644 --- a/gio/gmenuexporter.c +++ b/gio/gmenuexporter.c @@ -525,7 +525,9 @@ g_menu_exporter_remote_free (gpointer data) g_menu_exporter_group_unsubscribe (group, GPOINTER_TO_INT (val)); } - g_bus_unwatch_name (remote->watch_id); + if (remote->watch_id > 0) + g_bus_unwatch_name (remote->watch_id); + g_hash_table_unref (remote->watches); g_slice_free (GMenuExporterRemote, remote); @@ -556,6 +558,7 @@ struct _GMenuExporter guint next_group_id; GMenuExporterMenu *root; + GMenuExporterRemote *peer_remote; GHashTable *remotes; }; @@ -582,16 +585,25 @@ g_menu_exporter_subscribe (GMenuExporter *exporter, GVariantIter iter; guint32 id; - remote = g_hash_table_lookup (exporter->remotes, sender); + if (sender != NULL) + remote = g_hash_table_lookup (exporter->remotes, sender); + else + remote = exporter->peer_remote; if (remote == NULL) { - guint watch_id; + if (sender != NULL) + { + guint watch_id; - watch_id = g_bus_watch_name_on_connection (exporter->connection, sender, G_BUS_NAME_WATCHER_FLAGS_NONE, - NULL, g_menu_exporter_name_vanished, exporter, NULL); - remote = g_menu_exporter_remote_new (exporter, watch_id); - g_hash_table_insert (exporter->remotes, g_strdup (sender), remote); + watch_id = g_bus_watch_name_on_connection (exporter->connection, sender, G_BUS_NAME_WATCHER_FLAGS_NONE, + NULL, g_menu_exporter_name_vanished, exporter, NULL); + remote = g_menu_exporter_remote_new (exporter, watch_id); + g_hash_table_insert (exporter->remotes, g_strdup (sender), remote); + } + else + remote = exporter->peer_remote = + g_menu_exporter_remote_new (exporter, 0); } g_variant_builder_init (&builder, G_VARIANT_TYPE ("(a(uuaa{sv}))")); @@ -616,7 +628,10 @@ g_menu_exporter_unsubscribe (GMenuExporter *exporter, GVariantIter iter; guint32 id; - remote = g_hash_table_lookup (exporter->remotes, sender); + if (sender != NULL) + remote = g_hash_table_lookup (exporter->remotes, sender); + else + remote = exporter->peer_remote; if (remote == NULL) return; @@ -626,7 +641,12 @@ g_menu_exporter_unsubscribe (GMenuExporter *exporter, g_menu_exporter_remote_unsubscribe (remote, id); if (!g_menu_exporter_remote_has_subscriptions (remote)) - g_hash_table_remove (exporter->remotes, sender); + { + if (sender != NULL) + g_hash_table_remove (exporter->remotes, sender); + else + g_clear_pointer (&exporter->peer_remote, g_menu_exporter_remote_free); + } } static void @@ -691,6 +711,7 @@ g_menu_exporter_free (gpointer user_data) GMenuExporter *exporter = user_data; g_menu_exporter_menu_free (exporter->root); + g_clear_pointer (&exporter->peer_remote, g_menu_exporter_remote_free); g_hash_table_unref (exporter->remotes); g_hash_table_unref (exporter->groups); g_object_unref (exporter->connection); diff --git a/gio/gmountoperation.h b/gio/gmountoperation.h index e73081875..24b96e002 100644 --- a/gio/gmountoperation.h +++ b/gio/gmountoperation.h @@ -64,6 +64,12 @@ struct _GMountOperationClass const char *default_domain, GAskPasswordFlags flags); + /** + * GMountOperationClass::ask_question: + * @op: + * @message: + * @choices: (array zero-terminated=1) (element-type utf8): + */ void (* ask_question) (GMountOperation *op, const char *message, const char *choices[]); @@ -73,6 +79,15 @@ struct _GMountOperationClass void (* aborted) (GMountOperation *op); + /** + * GMountOperationClass::show_processes: + * @op: + * @message: + * @processes: (element-type GPid): + * @choices: (array zero-terminated=1) (element-type utf8): + * + * Since: 2.22 + */ void (* show_processes) (GMountOperation *op, const gchar *message, GArray *processes, diff --git a/gio/gnativesocketaddress.c b/gio/gnativesocketaddress.c index 60d81e641..21106348f 100644 --- a/gio/gnativesocketaddress.c +++ b/gio/gnativesocketaddress.c @@ -47,7 +47,10 @@ struct _GNativeSocketAddressPrivate { struct sockaddr *sockaddr; - struct sockaddr_storage storage; + union { + struct sockaddr_storage storage; + struct sockaddr sa; + } storage; gsize sockaddr_len; }; @@ -58,7 +61,7 @@ g_native_socket_address_dispose (GObject *object) { GNativeSocketAddress *address = G_NATIVE_SOCKET_ADDRESS (object); - if (address->priv->sockaddr != (struct sockaddr *)&address->priv->storage) + if (address->priv->sockaddr != &address->priv->storage.sa) g_free (address->priv->sockaddr); G_OBJECT_CLASS (g_native_socket_address_parent_class)->dispose (object); @@ -150,7 +153,7 @@ g_native_socket_address_new (gpointer native, addr = g_object_new (G_TYPE_NATIVE_SOCKET_ADDRESS, NULL); if (len <= sizeof(addr->priv->storage)) - addr->priv->sockaddr = (struct sockaddr*)&addr->priv->storage; + addr->priv->sockaddr = &addr->priv->storage.sa; else addr->priv->sockaddr = g_malloc (len); diff --git a/gio/gnetworkaddress.c b/gio/gnetworkaddress.c index 5231cad8f..07f923a90 100644 --- a/gio/gnetworkaddress.c +++ b/gio/gnetworkaddress.c @@ -1088,7 +1088,7 @@ g_network_address_connectable_enumerate (GSocketConnectable *connectable) GNetworkAddressAddressEnumerator *addr_enum; addr_enum = g_object_new (G_TYPE_NETWORK_ADDRESS_ADDRESS_ENUMERATOR, NULL); - addr_enum->addr = g_object_ref (connectable); + addr_enum->addr = g_object_ref (G_NETWORK_ADDRESS (connectable)); return (GSocketAddressEnumerator *)addr_enum; } diff --git a/gio/gnetworkservice.c b/gio/gnetworkservice.c index 4d4093b3c..a910a2d3c 100644 --- a/gio/gnetworkservice.c +++ b/gio/gnetworkservice.c @@ -729,7 +729,7 @@ g_network_service_connectable_enumerate (GSocketConnectable *connectable) GNetworkServiceAddressEnumerator *srv_enum; srv_enum = g_object_new (G_TYPE_NETWORK_SERVICE_ADDRESS_ENUMERATOR, NULL); - srv_enum->srv = g_object_ref (connectable); + srv_enum->srv = g_object_ref (G_NETWORK_SERVICE (connectable)); srv_enum->resolver = g_resolver_get_default (); srv_enum->use_proxy = FALSE; diff --git a/gio/gopenuriportal.c b/gio/gopenuriportal.c index 51a72dfc2..247ed8ce7 100644 --- a/gio/gopenuriportal.c +++ b/gio/gopenuriportal.c @@ -197,7 +197,8 @@ open_call_done (GObject *source, GAsyncResult *result, gpointer user_data) { - GDBusConnection *connection = G_DBUS_CONNECTION (source); + GXdpOpenURI *openuri = GXDP_OPEN_URI (source); + GDBusConnection *connection; GTask *task = user_data; GError *error = NULL; gboolean open_file; @@ -206,6 +207,7 @@ open_call_done (GObject *source, const char *handle; guint signal_id; + connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (openuri)); open_file = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (task), "open-file")); if (open_file) diff --git a/gio/gosxcontenttype.c b/gio/gosxcontenttype.c index 347477577..52ba5763a 100644 --- a/gio/gosxcontenttype.c +++ b/gio/gosxcontenttype.c @@ -192,12 +192,69 @@ g_content_type_get_description (const gchar *type) return create_cstr_from_cfstring_with_fallback (desc_str, "unknown"); } +/* <internal> + * _get_generic_icon_name_from_mime_type + * + * This function produces a generic icon name from a @mime_type. + * If no generic icon name is found in the xdg mime database, the + * generic icon name is constructed. + * + * Background: + * generic-icon elements specify the icon to use as a generic icon for this + * particular mime-type, given by the name attribute. This is used if there + * is no specific icon (see icon for how these are found). These are used + * for categories of similar types (like spreadsheets or archives) that can + * use a common icon. The Icon Naming Specification lists a set of such + * icon names. If this element is not specified then the mimetype is used + * to generate the generic icon by using the top-level media type + * (e.g. "video" in "video/ogg") and appending "-x-generic" + * (i.e. "video-x-generic" in the previous example). + * + * From: https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.18.html + */ + +static gchar * +_get_generic_icon_name_from_mime_type (const gchar *mime_type) +{ + const gchar *xdg_icon_name; + gchar *icon_name; + + G_LOCK (gio_xdgmime); + xdg_icon_name = xdg_mime_get_generic_icon (mime_type); + G_UNLOCK (gio_xdgmime); + + if (xdg_icon_name == NULL) + { + const char *p; + const char *suffix = "-x-generic"; + gsize prefix_len; + + p = strchr (mime_type, '/'); + if (p == NULL) + prefix_len = strlen (mime_type); + else + prefix_len = p - mime_type; + + icon_name = g_malloc (prefix_len + strlen (suffix) + 1); + memcpy (icon_name, mime_type, prefix_len); + memcpy (icon_name + prefix_len, suffix, strlen (suffix)); + icon_name[prefix_len + strlen (suffix)] = 0; + } + else + { + icon_name = g_strdup (xdg_icon_name); + } + + return icon_name; +} + + static GIcon * g_content_type_get_icon_internal (const gchar *uti, gboolean symbolic) { char *mimetype_icon; - char *type; + char *mime_type; char *generic_mimetype_icon = NULL; char *q; char *icon_names[6]; @@ -208,22 +265,23 @@ g_content_type_get_icon_internal (const gchar *uti, g_return_val_if_fail (uti != NULL, NULL); - type = g_content_type_get_mime_type (uti); + mime_type = g_content_type_get_mime_type (uti); G_LOCK (gio_xdgmime); - xdg_icon = xdg_mime_get_icon (type); + xdg_icon = xdg_mime_get_icon (mime_type); G_UNLOCK (gio_xdgmime); if (xdg_icon) icon_names[n++] = g_strdup (xdg_icon); - mimetype_icon = g_strdup (type); + mimetype_icon = g_strdup (mime_type); while ((q = strchr (mimetype_icon, '/')) != NULL) *q = '-'; icon_names[n++] = mimetype_icon; - generic_mimetype_icon = g_content_type_get_generic_icon_name (type); + generic_mimetype_icon = _get_generic_icon_name_from_mime_type (mime_type); + if (generic_mimetype_icon) icon_names[n++] = generic_mimetype_icon; @@ -243,7 +301,7 @@ g_content_type_get_icon_internal (const gchar *uti, for (i = 0; i < n; i++) g_free (icon_names[i]); - g_free(type); + g_free(mime_type); return themed_icon; } diff --git a/gio/goutputstream.c b/gio/goutputstream.c index 6372fd9c9..d72660a4d 100644 --- a/gio/goutputstream.c +++ b/gio/goutputstream.c @@ -384,7 +384,7 @@ g_output_stream_vprintf (GOutputStream *stream, gboolean success; g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream), FALSE); - g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (stream), FALSE); + g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (format != NULL, FALSE); diff --git a/gio/gproxyaddressenumerator.h b/gio/gproxyaddressenumerator.h index 4bd05ced6..1b99e35c0 100644 --- a/gio/gproxyaddressenumerator.h +++ b/gio/gproxyaddressenumerator.h @@ -40,7 +40,7 @@ G_BEGIN_DECLS * GProxyAddressEnumerator: * * A subclass of #GSocketAddressEnumerator that takes another address - * enumerator and wraps its results in #GProxyAddress<!-- -->es as + * enumerator and wraps its results in #GProxyAddresses as * directed by the default #GProxyResolver. */ diff --git a/gio/gproxyresolverportal.c b/gio/gproxyresolverportal.c index c300ec3e8..d5258006e 100644 --- a/gio/gproxyresolverportal.c +++ b/gio/gproxyresolverportal.c @@ -42,9 +42,15 @@ G_DEFINE_TYPE_WITH_CODE (GProxyResolverPortal, g_proxy_resolver_portal, G_TYPE_O "portal", 90)) -static void -g_proxy_resolver_portal_init (GProxyResolverPortal *resolver) +static gboolean +ensure_resolver_proxy (GProxyResolverPortal *resolver) { + if (resolver->resolver) + return TRUE; + + if (!glib_should_use_portal ()) + return FALSE; + resolver->resolver = gxdp_proxy_resolver_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, "org.freedesktop.portal.Desktop", @@ -53,6 +59,13 @@ g_proxy_resolver_portal_init (GProxyResolverPortal *resolver) NULL); resolver->network_available = glib_network_available_in_sandbox (); + + return resolver->resolver != NULL; +} + +static void +g_proxy_resolver_portal_init (GProxyResolverPortal *resolver) +{ } static gboolean @@ -62,7 +75,7 @@ g_proxy_resolver_portal_is_supported (GProxyResolver *object) char *name_owner; gboolean has_portal; - if (!glib_should_use_portal () || !resolver->resolver) + if (!ensure_resolver_proxy (resolver)) return FALSE; name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY (resolver->resolver)); @@ -83,6 +96,9 @@ g_proxy_resolver_portal_lookup (GProxyResolver *proxy_resolver, GProxyResolverPortal *resolver = G_PROXY_RESOLVER_PORTAL (proxy_resolver); char **proxy = NULL; + ensure_resolver_proxy (resolver); + g_assert (resolver->resolver); + if (!gxdp_proxy_resolver_call_lookup_sync (resolver->resolver, uri, &proxy, @@ -129,6 +145,9 @@ g_proxy_resolver_portal_lookup_async (GProxyResolver *proxy_resolver, GProxyResolverPortal *resolver = G_PROXY_RESOLVER_PORTAL (proxy_resolver); GTask *task; + ensure_resolver_proxy (resolver); + g_assert (resolver->resolver); + task = g_task_new (proxy_resolver, cancellable, callback, user_data); gxdp_proxy_resolver_call_lookup (resolver->resolver, uri, diff --git a/gio/gschema.dtd b/gio/gschema.dtd index 00e3a1653..8cd552d4a 100644 --- a/gio/gschema.dtd +++ b/gio/gschema.dtd @@ -1,4 +1,4 @@ -<!ELEMENT schemalist (schema|enum)* > +<!ELEMENT schemalist (schema|enum|flags)* > <!ATTLIST schemalist gettext-domain CDATA #IMPLIED > <!ELEMENT schema (key|child|override)* > @@ -47,7 +47,8 @@ <!-- range is only allowed for keys with numeric type --> <!ELEMENT range EMPTY > -<!-- min and max must be parseable as values of the key type and min < max --> +<!-- min and max must be parseable as values of the key type and + min must be less than or equal to max --> <!ATTLIST range min CDATA #REQUIRED max CDATA #REQUIRED > diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c index d74b6dd9e..57eb838a1 100644 --- a/gio/gsettings-tool.c +++ b/gio/gsettings-tool.c @@ -141,6 +141,35 @@ gsettings_list_schemas (void) } static void +gsettings_list_schemas_with_paths (void) +{ + gchar **schemas; + gsize i; + + g_settings_schema_source_list_schemas (global_schema_source, TRUE, &schemas, NULL); + + for (i = 0; schemas[i] != NULL; i++) + { + GSettingsSchema *schema; + gchar *schema_name; + const gchar *schema_path; + + schema_name = g_steal_pointer (&schemas[i]); + + schema = g_settings_schema_source_lookup (global_schema_source, schema_name, TRUE); + schema_path = g_settings_schema_get_path (schema); + + schemas[i] = g_strconcat (schema_name, " ", schema_path, NULL); + + g_settings_schema_unref (schema); + g_free (schema_name); + } + + output_list (schemas); + g_strfreev (schemas); +} + +static void gsettings_list_relocatable_schemas (void) { gchar **schemas; @@ -532,7 +561,7 @@ gsettings_help (gboolean requested, else if (strcmp (command, "list-schemas") == 0) { description = _("List the installed (non-relocatable) schemas"); - synopsis = ""; + synopsis = "[--print-paths]"; } else if (strcmp (command, "list-relocatable-schemas") == 0) @@ -690,7 +719,7 @@ int main (int argc, char **argv) { void (* function) (void); - gboolean need_settings; + gboolean need_settings, skip_third_arg_test; #ifdef G_OS_WIN32 gchar *tmp; @@ -744,6 +773,7 @@ main (int argc, char **argv) g_settings_schema_source_ref (global_schema_source); need_settings = TRUE; + skip_third_arg_test = FALSE; if (strcmp (argv[1], "help") == 0) return gsettings_help (TRUE, argv[2]); @@ -754,6 +784,13 @@ main (int argc, char **argv) else if (argc == 2 && strcmp (argv[1], "list-schemas") == 0) function = gsettings_list_schemas; + else if (argc == 3 && strcmp (argv[1], "list-schemas") == 0 + && strcmp (argv[2], "--print-paths") == 0) + { + skip_third_arg_test = TRUE; + function = gsettings_list_schemas_with_paths; + } + else if (argc == 2 && strcmp (argv[1], "list-relocatable-schemas") == 0) function = gsettings_list_relocatable_schemas; @@ -802,7 +839,7 @@ main (int argc, char **argv) else return gsettings_help (FALSE, argv[1]); - if (argc > 2) + if (argc > 2 && !skip_third_arg_test) { gchar **parts; diff --git a/gio/gsocket.c b/gio/gsocket.c index 567b4802e..06042d8a8 100644 --- a/gio/gsocket.c +++ b/gio/gsocket.c @@ -421,7 +421,10 @@ check_timeout (GSocket *socket, static void g_socket_details_from_fd (GSocket *socket) { - struct sockaddr_storage address; + union { + struct sockaddr_storage storage; + struct sockaddr sa; + } address; gint fd; guint addrlen; int value, family; @@ -454,7 +457,7 @@ g_socket_details_from_fd (GSocket *socket) } addrlen = sizeof address; - if (getsockname (fd, (struct sockaddr *) &address, &addrlen) != 0) + if (getsockname (fd, &address.sa, &addrlen) != 0) { errsv = get_socket_errno (); goto err; @@ -463,8 +466,8 @@ g_socket_details_from_fd (GSocket *socket) if (addrlen > 0) { g_assert (G_STRUCT_OFFSET (struct sockaddr, sa_family) + - sizeof address.ss_family <= addrlen); - family = address.ss_family; + sizeof address.storage.ss_family <= addrlen); + family = address.storage.ss_family; } else { @@ -488,7 +491,7 @@ g_socket_details_from_fd (GSocket *socket) { case G_SOCKET_FAMILY_IPV4: case G_SOCKET_FAMILY_IPV6: - socket->priv->family = address.ss_family; + socket->priv->family = address.storage.ss_family; switch (socket->priv->type) { case G_SOCKET_TYPE_STREAM: @@ -521,7 +524,7 @@ g_socket_details_from_fd (GSocket *socket) if (socket->priv->family != G_SOCKET_FAMILY_INVALID) { addrlen = sizeof address; - if (getpeername (fd, (struct sockaddr *) &address, &addrlen) >= 0) + if (getpeername (fd, &address.sa, &addrlen) >= 0) { socket->priv->connected_read = TRUE; socket->priv->connected_write = TRUE; @@ -1936,12 +1939,15 @@ GSocketAddress * g_socket_get_local_address (GSocket *socket, GError **error) { - struct sockaddr_storage buffer; + union { + struct sockaddr_storage storage; + struct sockaddr sa; + } buffer; guint len = sizeof (buffer); g_return_val_if_fail (G_IS_SOCKET (socket), NULL); - if (getsockname (socket->priv->fd, (struct sockaddr *) &buffer, &len) < 0) + if (getsockname (socket->priv->fd, &buffer.sa, &len) < 0) { int errsv = get_socket_errno (); g_set_error (error, G_IO_ERROR, socket_io_error_from_errno (errsv), @@ -1949,7 +1955,7 @@ g_socket_get_local_address (GSocket *socket, return NULL; } - return g_socket_address_new_from_native (&buffer, len); + return g_socket_address_new_from_native (&buffer.storage, len); } /** @@ -1969,7 +1975,10 @@ GSocketAddress * g_socket_get_remote_address (GSocket *socket, GError **error) { - struct sockaddr_storage buffer; + union { + struct sockaddr_storage storage; + struct sockaddr sa; + } buffer; guint len = sizeof (buffer); g_return_val_if_fail (G_IS_SOCKET (socket), NULL); @@ -1984,7 +1993,7 @@ g_socket_get_remote_address (GSocket *socket, if (!socket->priv->remote_address) { - if (getpeername (socket->priv->fd, (struct sockaddr *) &buffer, &len) < 0) + if (getpeername (socket->priv->fd, &buffer.sa, &len) < 0) { int errsv = get_socket_errno (); g_set_error (error, G_IO_ERROR, socket_io_error_from_errno (errsv), @@ -1992,7 +2001,7 @@ g_socket_get_remote_address (GSocket *socket, return NULL; } - socket->priv->remote_address = g_socket_address_new_from_native (&buffer, len); + socket->priv->remote_address = g_socket_address_new_from_native (&buffer.storage, len); } return g_object_ref (socket->priv->remote_address); @@ -2104,7 +2113,10 @@ g_socket_bind (GSocket *socket, gboolean reuse_address, GError **error) { - struct sockaddr_storage addr; + union { + struct sockaddr_storage storage; + struct sockaddr sa; + } addr; gboolean so_reuseaddr; #ifdef SO_REUSEPORT gboolean so_reuseport; @@ -2115,7 +2127,7 @@ g_socket_bind (GSocket *socket, if (!check_socket (socket, error)) return FALSE; - if (!g_socket_address_to_native (address, &addr, sizeof addr, error)) + if (!g_socket_address_to_native (address, &addr.storage, sizeof addr, error)) return FALSE; /* On Windows, SO_REUSEADDR has the semantics we want for UDP @@ -2147,7 +2159,7 @@ g_socket_bind (GSocket *socket, g_socket_set_option (socket, SOL_SOCKET, SO_REUSEPORT, so_reuseport, NULL); #endif - if (bind (socket->priv->fd, (struct sockaddr *) &addr, + if (bind (socket->priv->fd, &addr.sa, g_socket_address_get_native_size (address)) < 0) { int errsv = get_socket_errno (); @@ -2793,14 +2805,17 @@ g_socket_connect (GSocket *socket, GCancellable *cancellable, GError **error) { - struct sockaddr_storage buffer; + union { + struct sockaddr_storage storage; + struct sockaddr sa; + } buffer; g_return_val_if_fail (G_IS_SOCKET (socket) && G_IS_SOCKET_ADDRESS (address), FALSE); if (!check_socket (socket, error)) return FALSE; - if (!g_socket_address_to_native (address, &buffer, sizeof buffer, error)) + if (!g_socket_address_to_native (address, &buffer.storage, sizeof buffer, error)) return FALSE; if (socket->priv->remote_address) @@ -2811,7 +2826,7 @@ g_socket_connect (GSocket *socket, { win32_unset_event_mask (socket, FD_CONNECT); - if (connect (socket->priv->fd, (struct sockaddr *) &buffer, + if (connect (socket->priv->fd, &buffer.sa, g_socket_address_get_native_size (address)) < 0) { int errsv = get_socket_errno (); diff --git a/gio/gsocketaddress.c b/gio/gsocketaddress.c index 413968b9b..848e37b0b 100644 --- a/gio/gsocketaddress.c +++ b/gio/gsocketaddress.c @@ -375,7 +375,7 @@ g_socket_address_connectable_enumerate (GSocketConnectable *connectable) GSocketAddressAddressEnumerator *sockaddr_enum; sockaddr_enum = g_object_new (G_TYPE_SOCKET_ADDRESS_ADDRESS_ENUMERATOR, NULL); - sockaddr_enum->sockaddr = g_object_ref (connectable); + sockaddr_enum->sockaddr = g_object_ref (G_SOCKET_ADDRESS (connectable)); return (GSocketAddressEnumerator *)sockaddr_enum; } diff --git a/gio/gsocketconnectable.h b/gio/gsocketconnectable.h index 6a92dac39..6528d4936 100644 --- a/gio/gsocketconnectable.h +++ b/gio/gsocketconnectable.h @@ -35,7 +35,7 @@ G_BEGIN_DECLS /** * GSocketConnectable: * - * Interface for objects that contain or generate #GSocketAddress<!-- -->es. + * Interface for objects that contain or generate #GSocketAddresses. */ typedef struct _GSocketConnectableIface GSocketConnectableIface; diff --git a/gio/gsocketlistener.h b/gio/gsocketlistener.h index 687fab3d4..e5185c28d 100644 --- a/gio/gsocketlistener.h +++ b/gio/gsocketlistener.h @@ -62,7 +62,7 @@ struct _GSocketListenerClass void (* changed) (GSocketListener *listener); void (* event) (GSocketListener *listener, - GSocketListenerEvent *event, + GSocketListenerEvent event, GSocket *socket); /* Padding for future expansion */ diff --git a/gio/gunixvolume.c b/gio/gunixvolume.c index 7abdb4458..b54d1fd6e 100644 --- a/gio/gunixvolume.c +++ b/gio/gunixvolume.c @@ -252,7 +252,7 @@ g_unix_volume_get_mount (GVolume *volume) GUnixVolume *unix_volume = G_UNIX_VOLUME (volume); if (unix_volume->mount != NULL) - return g_object_ref (unix_volume->mount); + return g_object_ref (G_MOUNT (unix_volume->mount)); return NULL; } diff --git a/gio/inotify/inotify-helper.c b/gio/inotify/inotify-helper.c index dce57e507..d64e34d0c 100644 --- a/gio/inotify/inotify-helper.c +++ b/gio/inotify/inotify-helper.c @@ -156,9 +156,12 @@ ih_event_callback (ik_event_t *event, gboolean file_event) { gboolean interesting; + GFileMonitorEvent event_flags; g_assert (!file_event); /* XXX hardlink support */ + event_flags = ih_mask_to_EventFlags (event->mask); + if (event->mask & IN_MOVE) { /* We either have a rename (in the same directory) or a move @@ -187,17 +190,22 @@ ih_event_callback (ik_event_t *event, else other = NULL; - /* this is either an incoming or outgoing move */ - interesting = g_file_monitor_source_handle_event (sub->user_data, ih_mask_to_EventFlags (event->mask), + /* This is either an incoming or outgoing move. Since we checked the + * event->mask above, it should have converted to a #GFileMonitorEvent + * properly. If not, the assumption we have made about event->mask + * only ever having a single bit set (apart from IN_ISDIR) is false. + * The kernel documentation is lacking here. */ + g_assert (event_flags != -1); + interesting = g_file_monitor_source_handle_event (sub->user_data, event_flags, event->name, NULL, other, event->timestamp); if (other) g_object_unref (other); } } - else + else if (event_flags != -1) /* unpaired event -- no 'other' field */ - interesting = g_file_monitor_source_handle_event (sub->user_data, ih_mask_to_EventFlags (event->mask), + interesting = g_file_monitor_source_handle_event (sub->user_data, event_flags, event->name, NULL, NULL, event->timestamp); if (event->mask & IN_CREATE) diff --git a/gio/inotify/inotify-path.c b/gio/inotify/inotify-path.c index 5110dff45..f0528f443 100644 --- a/gio/inotify/inotify-path.c +++ b/gio/inotify/inotify-path.c @@ -532,8 +532,9 @@ ip_event_callback (ik_event_t *event) GList* dir_list = NULL; GList *file_list = NULL; - /* We can ignore the IGNORED events */ - if (event->mask & IN_IGNORED) + /* We can ignore the IGNORED events. Likewise, if the event queue overflowed, + * there is not much we can do to recover. */ + if (event->mask & (IN_IGNORED | IN_Q_OVERFLOW)) { _ik_event_free (event); return TRUE; diff --git a/gio/kqueue/kqueue-helper.c b/gio/kqueue/kqueue-helper.c index d4e66cd4d..e7d583c8b 100644 --- a/gio/kqueue/kqueue-helper.c +++ b/gio/kqueue/kqueue-helper.c @@ -97,8 +97,10 @@ convert_kqueue_events_to_gio (uint32_t flags, gboolean *done) } if (flags & NOTE_RENAME) { + /* Since there’s apparently no way to get the new name of the file out of + * kqueue(), all we can do is say that this one has been deleted. */ *done = TRUE; - return G_FILE_MONITOR_EVENT_MOVED; + return G_FILE_MONITOR_EVENT_DELETED; } if (flags & NOTE_REVOKE) { diff --git a/gio/meson.build b/gio/meson.build index 4a10d49d7..83160734e 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -18,10 +18,9 @@ if host_system == 'windows' # inline workarounds for getaddrinfo, getnameinfo and freeaddrinfo if # they aren't present at run-time (on Windows 2000). gnetworking_h_wspiapi_include = '#include <wspiapi.h>' -endif - -if host_system.contains('android') - # Android does not have C_IN in public headers, we define it wherever necessary +elif not host_system.contains('android') + # Don't check for C_IN on Android since it does not define it in public + # headers, we define it ourselves wherever necessary if not cc.compiles('''#include <sys/types.h> #include <arpa/nameser.h> int qclass = C_IN;''', @@ -121,7 +120,7 @@ gnetworking_h = configure_file(input : 'gnetworking.h.in', install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'), configuration : gnetworking_h_conf) -gdbus_headers = files([ +gdbus_headers = files( 'gdbusauthobserver.h', 'gcredentials.h', 'gdbusutils.h', @@ -144,9 +143,9 @@ gdbus_headers = files([ 'gdbusobjectmanagerclient.h', 'gdbusobjectmanagerserver.h', 'gtestdbus.h', -]) +) -gdbus_sources = [ +gdbus_sources = files( 'gdbusutils.c', 'gdbusaddress.c', 'gdbusauthobserver.c', @@ -174,7 +173,7 @@ gdbus_sources = [ 'gdbusobjectmanagerclient.c', 'gdbusobjectmanagerserver.c', 'gtestdbus.c', -] +) # Generate gdbus-codegen subdir('gdbus-2.0/codegen') @@ -213,13 +212,13 @@ gdbus_daemon_generated = custom_target('gdbus-daemon-generated', '--generate-c-code', 'gdbus-daemon-generated', '--c-namespace', '_G', '@INPUT@']) -settings_headers = files([ +settings_headers = files( 'gsettingsbackend.h', 'gsettingsschema.h', 'gsettings.h', -]) +) -settings_sources = [ +settings_sources = files( 'gvdb/gvdb-reader.c', 'gdelayedsettingsbackend.c', 'gkeyfilesettingsbackend.c', @@ -229,18 +228,18 @@ settings_sources = [ 'gsettingsschema.c', 'gsettings-mapping.c', 'gsettings.c', -] +) if host_system == 'windows' - settings_sources += [ 'gregistrysettingsbackend.c' ] + settings_sources += files('gregistrysettingsbackend.c') endif # FIXME: #if OS_COCOA -#settings_sources += [ 'gnextstepsettingsbackend.c' ] +#settings_sources += files('gnextstepsettingsbackend.c') #endif -application_headers = files([ +application_headers = files( 'gapplication.h', 'gapplicationcommandline.h', @@ -259,9 +258,9 @@ application_headers = files([ 'gmenuexporter.h', 'gdbusmenumodel.h', 'gnotification.h', -]) +) -application_sources = [ +application_sources = files( 'gapplication.c', 'gapplicationcommandline.c', 'gapplicationimpl-dbus.c', @@ -282,9 +281,9 @@ application_sources = [ 'gdbusmenumodel.c', 'gnotification.c', 'gnotificationbackend.c', -] +) -local_sources = [ +local_sources = files( 'ghttpproxy.c', 'glocalfile.c', 'glocalfileenumerator.c', @@ -298,7 +297,7 @@ local_sources = [ 'gsocks4aproxy.c', 'gsocks5proxy.c', 'thumbnail-verify.c', -] +) platform_deps = [] internal_deps = [] @@ -306,9 +305,16 @@ appinfo_sources = [] contenttype_sources = [] portal_sources = [] unix_sources = [] +win32_sources = [] + +# This is also used by tests/gdbus-daemon, so use files() to include the path +gdbus_daemon_sources = [ + files('gdbusdaemon.c'), + gdbus_daemon_generated, +] if host_system != 'windows' - unix_sources = [ + unix_sources = files( 'gfiledescriptorbased.c', 'gunixconnection.c', 'gunixcredentialsmessage.c', @@ -323,19 +329,19 @@ if host_system != 'windows' 'gunixoutputstream.c', 'gfdonotificationbackend.c', 'ggtknotificationbackend.c', - ] + ) - portal_sources = [ + portal_sources = [files( 'gdocumentportal.c', 'gopenuriportal.c', 'gnetworkmonitorportal.c', 'gproxyresolverportal.c', 'gportalsupport.c', - 'gportalnotificationbackend.c', + 'gportalnotificationbackend.c'), xdp_dbus_generated ] - gio_unix_include_headers = [ + gio_unix_include_headers = files( 'gfiledescriptorbased.h', 'gunixconnection.h', 'gunixcredentialsmessage.h', @@ -345,18 +351,18 @@ if host_system != 'windows' 'gunixinputstream.h', 'gunixoutputstream.h', 'gunixsocketaddress.h', - ] + ) if glib_have_cocoa - contenttype_sources += ['gosxcontenttype.c'] - appinfo_sources += ['gosxappinfo.c'] + contenttype_sources += files('gosxcontenttype.c') + appinfo_sources += files('gosxappinfo.c') if glib_have_os_x_9_or_later - unix_sources += ['gcocoanotificationbackend.c'] + unix_sources += files('gcocoanotificationbackend.c') endif else - contenttype_sources += ['gcontenttype.c'] - appinfo_sources += ['gdesktopappinfo.c'] - gio_unix_include_headers += ['gdesktopappinfo.h'] + contenttype_sources += files('gcontenttype.c') + appinfo_sources += files('gdesktopappinfo.c') + gio_unix_include_headers += files('gdesktopappinfo.h') subdir('xdgmime') internal_deps += [xdgmime_lib] endif @@ -364,43 +370,42 @@ if host_system != 'windows' install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio') if glib_conf.has('HAVE_NETLINK') - unix_sources += [ + unix_sources += files( 'gnetworkmonitornetlink.c', 'gnetworkmonitornm.c', - ] + ) endif -endif - -# This is also used by tests/gdbus-daemon, so use files() to include the path -gdbus_daemon_sources = [ - files('gdbusdaemon.c'), - gdbus_daemon_generated, -] - -win32_sources = gdbus_daemon_sources -if host_system == 'windows' - appinfo_sources += ['gwin32appinfo.c'] - contenttype_sources += ['gcontenttype-win32.c'] +else + appinfo_sources += files('gwin32appinfo.c') + contenttype_sources += files('gcontenttype-win32.c') platform_deps += [cc.find_library('shlwapi'), cc.find_library('dnsapi'), iphlpapi_dep, winsock2] - win32_sources += [ + win32_sources += files( 'gwin32registrykey.c', 'gwin32mount.c', 'gwin32volumemonitor.c', 'gwin32inputstream.c', 'gwin32outputstream.c', - ] + ) + + gio_win_rc = configure_file( + input: 'gio.rc.in', + output: 'gio.rc', + configuration: glibconfig_conf, + ) + gio_win_res = windows.compile_resources(gio_win_rc) + win32_sources += [gio_win_res] - gio_win32_include_headers = [ + gio_win32_include_headers = files( 'gwin32inputstream.h', 'gwin32outputstream.h', - ] + ) install_headers(gio_win32_include_headers, subdir : 'gio-win32-2.0/gio') endif -gio_sources = [ +gio_sources = files( 'gappinfo.c', 'gasynchelper.c', 'gasyncinitable.c', @@ -444,6 +449,7 @@ gio_sources = [ 'ginputstream.c', 'gioerror.c', 'giomodule.c', + 'giomodule-priv.c', 'gioscheduler.c', 'giostream.c', 'gloadableicon.c', @@ -517,10 +523,11 @@ gio_sources = [ 'gzlibdecompressor.c', 'glistmodel.c', 'gliststore.c', -] +) gio_sources += appinfo_sources gio_sources += contenttype_sources +gio_sources += gdbus_daemon_sources gio_sources += unix_sources gio_sources += win32_sources gio_sources += application_sources @@ -530,14 +537,6 @@ gio_sources += portal_sources gio_sources += local_sources MISSING_STUFF = ''' -if OS_WIN32_AND_DLL_COMPILATION -gio_win32_res = gio-win32-res.o -gio_win32_res_ldflag = -Wl,$(gio_win32_res) -endif - -gio-win32-res.o: gio.rc - '$(WINDRES) gio.rc $@ - # This is read by gobject-introspection/misc/ and gtk-doc gio-public-headers.txt: Makefile '$(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@ @@ -549,7 +548,7 @@ gio-2.0.lib: libgio-2.0.la gio.def '$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@ ''' -gio_headers = files([ +gio_headers = files( 'gappinfo.h', 'gasyncinitable.h', 'gasyncresult.h', @@ -655,7 +654,7 @@ gio_headers = files([ 'gzlibdecompressor.h', 'glistmodel.h', 'gliststore.h', -]) +) gio_headers += application_headers gio_headers += settings_headers @@ -725,7 +724,7 @@ else gio_dtrace_hdr = [] endif -libgio = shared_library('gio-2.0', +libgio = library('gio-2.0', gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources, gio_dtrace_hdr, gio_dtrace_obj, version : library_version, @@ -735,10 +734,9 @@ libgio = shared_library('gio-2.0', link_with : internal_deps, #libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS)', # '$(gio_win32_res_ldflag)', - #$(SELINUX_LIBS) - #$(XATTR_LIBS) dependencies : [libintl, libz_dep, libdl_dep, libmount_dep, libglib_dep, - libgobject_dep, libgmodule_dep] + platform_deps + network_libs, + libgobject_dep, libgmodule_dep, selinux_dep, xattr_dep, + platform_deps, network_libs], c_args : gio_c_args, # intl.lib is not compatible with SAFESEH link_args : noseh_link_args, @@ -749,6 +747,15 @@ libgio_dep = declare_dependency(link_with : libgio, # We sadly need to export configinc here because everyone includes <gio/*.h> include_directories : [configinc, gioinc]) +if host_system == 'windows' + # Hack till https://github.com/mesonbuild/meson/issues/2324 is fixed + libgiounix_dep = dependency('', required : false) + libgiowin32_dep = libgio_dep +else + libgiowin32_dep = dependency('', required : false) + libgiounix_dep = libgio_dep +endif + # Dependencies used by executables below libelf = dependency('libelf', version : '>= 0.8.12', required : false) if libelf.found() @@ -797,7 +804,7 @@ executable('gresource', 'gresource-tool.c', link_args : noseh_link_args, dependencies : [libelf, libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) -executable('gio-querymodules', 'gio-querymodules.c', +executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c', install : true, c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args, # intl.lib is not compatible with SAFESEH diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am index 11165b835..e2285e447 100644 --- a/gio/tests/Makefile.am +++ b/gio/tests/Makefile.am @@ -15,6 +15,7 @@ LDADD = \ AM_CPPFLAGS = $(gio_INCLUDES) $(GLIB_DEBUG_FLAGS) -I$(top_builddir)/gio -I$(top_srcdir)/gio DEFS = -DG_LOG_DOMAIN=\"GLib-GIO\" -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\" AM_CFLAGS = $(GLIB_WARN_CFLAGS) +AM_TESTS_ENVIRONMENT += GIO_MODULE_DIR= # ----------------------------------------------------------------------------- # Test programs buildable on all platforms @@ -86,6 +87,7 @@ uninstalled_test_extra_programs = \ gapplication-example-cmdline \ gapplication-example-cmdline2 \ gapplication-example-cmdline3 \ + gapplication-example-cmdline4 \ gapplication-example-dbushooks \ gapplication-example-open \ gdbus-example-export \ @@ -138,6 +140,7 @@ schema_tests = \ enum-with-chained-alias.gschema.xml \ enum-with-choice.gschema.xml \ enum-with-invalid-alias.gschema.xml \ + enum-with-invalid-value.gschema.xml \ enum-with-repeated-alias.gschema.xml \ enum-with-repeated-nick.gschema.xml \ enum-with-repeated-value.gschema.xml \ diff --git a/gio/tests/appinfo-test.desktop b/gio/tests/appinfo-test.desktop index 6c9a85ccf..90e412043 100644 --- a/gio/tests/appinfo-test.desktop +++ b/gio/tests/appinfo-test.desktop @@ -15,3 +15,5 @@ StartupWMClass=appinfo-class MimeType=image/png;image/jpeg; Keywords=keyword1;test keyword; Categories=GNOME;GTK; +X-JunkFood=Burger +X-JunkFood[de]=Bratwurst diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c index 190205398..2e69da051 100644 --- a/gio/tests/appinfo.c +++ b/gio/tests/appinfo.c @@ -7,9 +7,8 @@ #include <gio/gdesktopappinfo.h> static void -test_launch (void) +test_launch_for_app_info (GAppInfo *appinfo) { - GAppInfo *appinfo; GError *error; GFile *file; GList *l; @@ -22,10 +21,6 @@ test_launch (void) return; } - path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL); - appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path); - g_assert (appinfo != NULL); - error = NULL; g_assert (g_app_info_launch (appinfo, NULL, NULL, &error)); g_assert_no_error (error); @@ -33,6 +28,7 @@ test_launch (void) g_assert (g_app_info_launch_uris (appinfo, NULL, NULL, &error)); g_assert_no_error (error); + path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL); file = g_file_new_for_path (path); l = NULL; l = g_list_append (l, file); @@ -51,11 +47,84 @@ test_launch (void) g_assert_no_error (error); g_list_free (l); g_free (uri); +} + +static void +test_launch (void) +{ + GAppInfo *appinfo; + const gchar *path; + path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL); + appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path); + g_assert (appinfo != NULL); + + test_launch_for_app_info (appinfo); g_object_unref (appinfo); } static void +test_launch_no_app_id (void) +{ + const gchar desktop_file_base_contents[] = + "[Desktop Entry]\n" + "Type=Application\n" + "GenericName=generic-appinfo-test\n" + "Name=appinfo-test\n" + "Name[de]=appinfo-test-de\n" + "X-GNOME-FullName=example\n" + "X-GNOME-FullName[de]=Beispiel\n" + "Comment=GAppInfo example\n" + "Comment[de]=GAppInfo Beispiel\n" + "Icon=testicon.svg\n" + "Terminal=true\n" + "StartupNotify=true\n" + "StartupWMClass=appinfo-class\n" + "MimeType=image/png;image/jpeg;\n" + "Keywords=keyword1;test keyword;\n" + "Categories=GNOME;GTK;\n"; + + const char *exec_line_variants[] = { + "Exec=./appinfo-test --option %U %i --name %c --filename %k %m %%", + "Exec=./appinfo-test --option %u %i --name %c --filename %k %m %%" + }; + + gsize i; + + g_test_bug ("791337"); + + for (i = 0; i < G_N_ELEMENTS (exec_line_variants); i++) + { + gchar *desktop_file_contents; + GKeyFile *fake_desktop_file; + GAppInfo *appinfo; + gboolean loaded; + + g_test_message ("Exec line variant #%" G_GSIZE_FORMAT, i); + + desktop_file_contents = g_strdup_printf ("%s\n%s", + desktop_file_base_contents, + exec_line_variants[i]); + + /* We load a desktop file from memory to force the app not + * to have an app ID, which would check different codepaths. + */ + fake_desktop_file = g_key_file_new (); + loaded = g_key_file_load_from_data (fake_desktop_file, desktop_file_contents, -1, G_KEY_FILE_NONE, NULL); + g_assert_true (loaded); + + appinfo = (GAppInfo*)g_desktop_app_info_new_from_keyfile (fake_desktop_file); + g_assert (appinfo != NULL); + + test_launch_for_app_info (appinfo); + + g_free (desktop_file_contents); + g_object_unref (appinfo); + g_key_file_unref (fake_desktop_file); + } +} + +static void test_locale (const char *locale) { GAppInfo *appinfo; @@ -480,6 +549,7 @@ main (int argc, char *argv[]) g_setenv ("XDG_CURRENT_DESKTOP", "GNOME", TRUE); g_test_init (&argc, &argv, NULL); + g_test_bug_base ("https://bugzilla.gnome.org/show_bug.cgi?id="); /* With Meson build we need to change into right directory, so that the * appinfo-test binary can be found. */ @@ -490,6 +560,7 @@ main (int argc, char *argv[]) g_test_add_func ("/appinfo/basic", test_basic); g_test_add_func ("/appinfo/text", test_text); g_test_add_func ("/appinfo/launch", test_launch); + g_test_add_func ("/appinfo/launch/no-appid", test_launch_no_app_id); g_test_add_func ("/appinfo/show-in", test_show_in); g_test_add_func ("/appinfo/commandline", test_commandline); g_test_add_func ("/appinfo/launch-context", test_launch_context); diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c index 3086da428..d1b68c441 100644 --- a/gio/tests/desktop-app-info.c +++ b/gio/tests/desktop-app-info.c @@ -17,6 +17,8 @@ * Author: Matthias Clasen */ +#include <locale.h> + #include <glib/glib.h> #include <glib/gstdio.h> #include <gio/gio.h> @@ -346,9 +348,14 @@ static void test_extra_getters (void) { GDesktopAppInfo *appinfo; + const gchar *lang; gchar *s; gboolean b; + lang = setlocale (LC_ALL, NULL); + g_setenv ("LANGUAGE", "de_DE.UTF8", TRUE); + setlocale (LC_ALL, ""); + appinfo = g_desktop_app_info_new_from_filename (g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL)); g_assert (appinfo != NULL); @@ -359,10 +366,24 @@ test_extra_getters (void) g_assert_cmpstr (s, ==, "appinfo-class"); g_free (s); + s = g_desktop_app_info_get_locale_string (appinfo, "X-JunkFood"); + g_assert_cmpstr (s, ==, "Bratwurst"); + g_free (s); + + g_setenv ("LANGUAGE", "sv_SV.UTF8", TRUE); + setlocale (LC_ALL, ""); + + s = g_desktop_app_info_get_locale_string (appinfo, "X-JunkFood"); + g_assert_cmpstr (s, ==, "Burger"); /* fallback */ + g_free (s); + b = g_desktop_app_info_get_boolean (appinfo, "Terminal"); g_assert (b); g_object_unref (appinfo); + + g_setenv ("LANGUAGE", lang, TRUE); + setlocale (LC_ALL, ""); } static void diff --git a/gio/tests/gapplication-example-cmdline4.c b/gio/tests/gapplication-example-cmdline4.c new file mode 100644 index 000000000..112006212 --- /dev/null +++ b/gio/tests/gapplication-example-cmdline4.c @@ -0,0 +1,85 @@ +#include <gio/gio.h> +#include <stdlib.h> +#include <string.h> + + +static gint +handle_local_options (GApplication *application, + GVariantDict *options, + gpointer user_data) +{ + guint32 count; + + /* Deal (locally) with version option */ + if (g_variant_dict_lookup (options, "version", "b", &count)) + { + g_print ("This is example-cmdline4, version 1.2.3\n"); + return EXIT_SUCCESS; + } + + return -1; + +} + +static gint +command_line (GApplication *application, + GApplicationCommandLine *cmdline, + gpointer user_data) +{ + guint32 count; + + GVariantDict *options = g_application_command_line_get_options_dict (cmdline); + + /* Deal with arg option */ + if (g_variant_dict_lookup (options, "flag", "b", &count)) + { + g_application_command_line_print (cmdline, "flag is set\n"); + } + + return EXIT_SUCCESS; +} + + +int +main (int argc, char **argv) +{ + GApplication *app; + int status; + + GOptionEntry entries[] = { + /* A version flag option, to be handled locally */ + { "version", 'v', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, "Show the application version", NULL }, + + /* A dummy flag option, to be handled in primary */ + { "flag", 'f', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, "A flag argument", NULL }, + + { NULL } + }; + + app = g_application_new ("org.gtk.TestApplication", + G_APPLICATION_HANDLES_COMMAND_LINE); + + g_application_add_main_option_entries (app, entries); + + g_application_set_option_context_parameter_string (app, "- a simple command line example"); + g_application_set_option_context_summary (app, + "Summary:\n" + "This is a simple command line --help example."); + g_application_set_option_context_description (app, + "Description:\n" + "This example illustrates the use of " + "g_application command line --help functionalities " + "(parameter string, summary, description). " + "It does nothing at all except displaying information " + "when invoked with --help argument...\n"); + + g_signal_connect (app, "handle-local-options", G_CALLBACK (handle_local_options), NULL); + g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL); + + /* This application does absolutely nothing, except if a command line is given */ + status = g_application_run (app, argc, argv); + + g_object_unref (app); + + return status; +} diff --git a/gio/tests/gdbus-object-manager-example/meson.build b/gio/tests/gdbus-object-manager-example/meson.build index 630357378..d594c685b 100644 --- a/gio/tests/gdbus-object-manager-example/meson.build +++ b/gio/tests/gdbus-object-manager-example/meson.build @@ -14,7 +14,7 @@ gdbus_example_objectmanager_generated = custom_target('gdbus-example-objectmanag '--generate-docbook', 'gdbus-example-objectmanager-generated', '@INPUT@']) -libgdbus_example_objectmanager = shared_library('libgdbus-example-objectmanager', +libgdbus_example_objectmanager = library('libgdbus-example-objectmanager', gdbus_example_objectmanager_generated, c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args, dependencies : [libglib_dep, libgmodule_dep, libgobject_dep, libgio_dep], diff --git a/gio/tests/gdbus-test-codegen.c b/gio/tests/gdbus-test-codegen.c index 3a0235106..1c4e83c4c 100644 --- a/gio/tests/gdbus-test-codegen.c +++ b/gio/tests/gdbus-test-codegen.c @@ -172,7 +172,12 @@ on_handle_test_non_primitive_types (FooiGenBar *object, s = g_strjoinv (", ", (gchar **) array_of_bytestrings); g_string_append_printf (str, "array_of_bytestrings: [%s] ", s); g_free (s); - foo_igen_bar_complete_test_non_primitive_types (object, invocation, str->str); + foo_igen_bar_complete_test_non_primitive_types (object, invocation, + array_of_strings, + array_of_objpaths, + array_of_signatures, + array_of_bytestrings, + str->str); g_string_free (str, TRUE); return TRUE; } @@ -400,7 +405,7 @@ on_handle_get_self (FooiGenMethodThreads *object, gpointer user_data) { gchar *s; - s = g_strdup_printf ("%p", g_thread_self ()); + s = g_strdup_printf ("%p", (void *)g_thread_self ()); foo_igen_method_threads_complete_get_self (object, invocation, s); g_free (s); return TRUE; @@ -700,7 +705,12 @@ check_bar_proxy (FooiGenBar *proxy, const gchar *array_of_strings[3] = {"one", "two", NULL}; const gchar *array_of_strings_2[3] = {"one2", "two2", NULL}; const gchar *array_of_objpaths[3] = {"/one", "/one/two", NULL}; + GVariant *array_of_signatures = NULL; const gchar *array_of_bytestrings[3] = {"one\xff", "two\xff", NULL}; + gchar **ret_array_of_strings = NULL; + gchar **ret_array_of_objpaths = NULL; + GVariant *ret_array_of_signatures = NULL; + gchar **ret_array_of_bytestrings = NULL; guchar ret_val_byte; gboolean ret_val_boolean; gint16 ret_val_int16; @@ -887,7 +897,13 @@ check_bar_proxy (FooiGenBar *proxy, g_assert_no_error (error); g_assert (ret); + g_clear_pointer (&ret_val_string, g_free); + g_clear_pointer (&ret_val_objpath, g_free); + g_clear_pointer (&ret_val_signature, g_free); + g_clear_pointer (&ret_val_bytestring, g_free); + error = NULL; + array_of_signatures = g_variant_ref_sink (g_variant_new_parsed ("[@g 'ass', 'git']")); ret = foo_igen_bar_call_test_non_primitive_types_sync (proxy, g_variant_new_parsed ("{'one': 'red'," " 'two': 'blue'}"), @@ -896,8 +912,12 @@ check_bar_proxy (FooiGenBar *proxy, g_variant_new_parsed ("(42, 'foo', 'bar')"), array_of_strings, array_of_objpaths, - g_variant_new_parsed ("[@g 'ass', 'git']"), + array_of_signatures, array_of_bytestrings, + &ret_array_of_strings, + &ret_array_of_objpaths, + &ret_array_of_signatures, + &ret_array_of_bytestrings, &s, NULL, /* GCancellable */ &error); @@ -905,6 +925,24 @@ check_bar_proxy (FooiGenBar *proxy, g_assert_no_error (error); g_assert (ret); + g_assert_nonnull (ret_array_of_strings); + g_assert_cmpuint (g_strv_length ((gchar **) ret_array_of_strings), ==, + g_strv_length ((gchar **) array_of_strings)); + g_assert_nonnull (ret_array_of_objpaths); + g_assert_cmpuint (g_strv_length ((gchar **) ret_array_of_objpaths), ==, + g_strv_length ((gchar **) array_of_objpaths)); + g_assert_nonnull (ret_array_of_signatures); + g_assert_true (g_variant_equal (ret_array_of_signatures, array_of_signatures)); + g_assert_nonnull (ret_array_of_bytestrings); + g_assert_cmpuint (g_strv_length ((gchar **) ret_array_of_bytestrings), ==, + g_strv_length ((gchar **) array_of_bytestrings)); + + g_clear_pointer (&ret_array_of_strings, g_strfreev); + g_clear_pointer (&ret_array_of_objpaths, g_strfreev); + g_clear_pointer (&ret_array_of_signatures, g_variant_unref); + g_clear_pointer (&ret_array_of_bytestrings, g_strfreev); + g_clear_pointer (&s, g_free); + /* Check that org.freedesktop.DBus.Error.UnknownMethod is returned on * unimplemented methods. */ @@ -1049,6 +1087,7 @@ check_bar_proxy (FooiGenBar *proxy, /* cleanup */ g_free (data); + g_variant_unref (array_of_signatures); } /* ---------------------------------------------------------------------------------------------------- */ diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c index a604f996f..5d6f485c4 100644 --- a/gio/tests/gmenumodel.c +++ b/gio/tests/gmenumodel.c @@ -1,7 +1,37 @@ #include <gio/gio.h> +#include <gio/gunixsocketaddress.h> +#include <glib/gstdio.h> +#include <string.h> #include "gdbus-sessionbus.h" +static gboolean +time_out (gpointer unused G_GNUC_UNUSED) +{ + g_error ("Timed out"); + /* not reached */ + return FALSE; +} + +static guint +add_timeout (guint seconds) +{ +#ifdef G_OS_UNIX + /* Safety-catch against the main loop having blocked */ + alarm (seconds + 5); +#endif + return g_timeout_add_seconds (seconds, time_out, NULL); +} + +static void +cancel_timeout (guint timeout_id) +{ +#ifdef G_OS_UNIX + alarm (0); +#endif + g_source_remove (timeout_id); +} + /* Markup printing {{{1 */ /* This used to be part of GLib, but it was removed before the stable @@ -715,6 +745,180 @@ test_random (void) g_rand_free (rand); } +typedef struct +{ + GDBusConnection *client_connection; + GDBusConnection *server_connection; + GDBusServer *server; + + GThread *service_thread; + GMutex service_loop_lock; + GCond service_loop_cond; + + GMainLoop *service_loop; + GMainLoop *loop; +} PeerConnection; + +static gboolean +on_new_connection (GDBusServer *server, + GDBusConnection *connection, + gpointer user_data) +{ + PeerConnection *data = user_data; + + data->server_connection = g_object_ref (connection); + + g_main_loop_quit (data->loop); + + return TRUE; +} + +static void +create_service_loop (GMainContext *service_context, + PeerConnection *data) +{ + g_assert (data->service_loop == NULL); + g_mutex_lock (&data->service_loop_lock); + data->service_loop = g_main_loop_new (service_context, FALSE); + g_cond_broadcast (&data->service_loop_cond); + g_mutex_unlock (&data->service_loop_lock); +} + +static void +teardown_service_loop (PeerConnection *data) +{ + g_mutex_lock (&data->service_loop_lock); + g_clear_pointer (&data->service_loop, g_main_loop_unref); + g_mutex_unlock (&data->service_loop_lock); +} + +static void +await_service_loop (PeerConnection *data) +{ + g_mutex_lock (&data->service_loop_lock); + while (data->service_loop == NULL) + g_cond_wait (&data->service_loop_cond, &data->service_loop_lock); + g_mutex_unlock (&data->service_loop_lock); +} + +static gpointer +service_thread_func (gpointer user_data) +{ + PeerConnection *data = user_data; + GMainContext *service_context; + GError *error; + gchar *address; + gchar *tmpdir; + GDBusServerFlags flags; + gchar *guid; + + service_context = g_main_context_new (); + g_main_context_push_thread_default (service_context); + + tmpdir = NULL; + flags = G_DBUS_SERVER_FLAGS_NONE; + +#ifdef G_OS_UNIX + if (g_unix_socket_address_abstract_names_supported ()) + address = g_strdup ("unix:tmpdir=/tmp/test-dbus-peer"); + else + { + tmpdir = g_dir_make_tmp ("test-dbus-peer-XXXXXX", NULL); + address = g_strdup_printf ("unix:tmpdir=%s", tmpdir); + } +#else + address = g_strdup ("nonce-tcp:"); + flags |= G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS; +#endif + + guid = g_dbus_generate_guid (); + + error = NULL; + data->server = g_dbus_server_new_sync (address, + flags, + guid, + NULL, + NULL, + &error); + g_assert_no_error (error); + g_free (address); + g_free (guid); + + g_signal_connect (data->server, + "new-connection", + G_CALLBACK (on_new_connection), + data); + + g_dbus_server_start (data->server); + + create_service_loop (service_context, data); + g_main_loop_run (data->service_loop); + + g_main_context_pop_thread_default (service_context); + + teardown_service_loop (data); + g_main_context_unref (service_context); + + if (tmpdir) + { + g_rmdir (tmpdir); + g_free (tmpdir); + } + + return NULL; +} + +static void +peer_connection_up (PeerConnection *data) +{ + GError *error; + + memset (data, '\0', sizeof (PeerConnection)); + data->loop = g_main_loop_new (NULL, FALSE); + + g_mutex_init (&data->service_loop_lock); + g_cond_init (&data->service_loop_cond); + + /* bring up a server - we run the server in a different thread to + avoid deadlocks */ + data->service_thread = g_thread_new ("test_dbus_peer", + service_thread_func, + data); + await_service_loop (data); + g_assert (data->server != NULL); + + /* bring up a connection and accept it */ + error = NULL; + data->client_connection = + g_dbus_connection_new_for_address_sync (g_dbus_server_get_client_address (data->server), + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT, + NULL, /* GDBusAuthObserver */ + NULL, /* cancellable */ + &error); + g_assert_no_error (error); + g_assert (data->client_connection != NULL); + while (data->server_connection == NULL) + g_main_loop_run (data->loop); +} + +static void +peer_connection_down (PeerConnection *data) +{ + g_object_unref (data->client_connection); + g_object_unref (data->server_connection); + + g_dbus_server_stop (data->server); + g_object_unref (data->server); + + g_main_loop_quit (data->service_loop); + g_thread_join (data->service_thread); + + g_mutex_clear (&data->service_loop_lock); + g_cond_clear (&data->service_loop_cond); + + g_main_loop_unref (data->loop); +} + struct roundtrip_state { RandomMenu *random; @@ -754,20 +958,23 @@ roundtrip_step (gpointer data) } static void -test_dbus_roundtrip (void) +do_roundtrip (GDBusConnection *exporter_connection, + GDBusConnection *proxy_connection) { struct roundtrip_state state; - GDBusConnection *bus; guint export_id; guint id; - bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); - state.rand = g_rand_new_with_seed (g_test_rand_int ()); state.random = random_menu_new (state.rand, 2); - export_id = g_dbus_connection_export_menu_model (bus, "/", G_MENU_MODEL (state.random), NULL); - state.proxy = g_dbus_menu_model_get (bus, g_dbus_connection_get_unique_name (bus), "/"); + export_id = g_dbus_connection_export_menu_model (exporter_connection, + "/", + G_MENU_MODEL (state.random), + NULL); + state.proxy = g_dbus_menu_model_get (proxy_connection, + g_dbus_connection_get_unique_name (proxy_connection), + "/"); state.proxy_mirror = mirror_menu_new (G_MENU_MODEL (state.proxy)); state.count = 0; state.success = 0; @@ -780,13 +987,32 @@ test_dbus_roundtrip (void) g_main_loop_unref (state.loop); g_source_remove (id); g_object_unref (state.proxy); - g_dbus_connection_unexport_menu_model (bus, export_id); + g_dbus_connection_unexport_menu_model (exporter_connection, export_id); g_object_unref (state.random); g_object_unref (state.proxy_mirror); g_rand_free (state.rand); +} + +static void +test_dbus_roundtrip (void) +{ + GDBusConnection *bus; + + bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); + do_roundtrip (bus, bus); g_object_unref (bus); } +static void +test_dbus_peer_roundtrip (void) +{ + PeerConnection peer; + + peer_connection_up (&peer); + do_roundtrip (peer.server_connection, peer.client_connection); + peer_connection_down (&peer); +} + static gint items_changed_count; static void @@ -810,25 +1036,30 @@ stop_loop (gpointer data) } static void -test_dbus_subscriptions (void) +do_subscriptions (GDBusConnection *exporter_connection, + GDBusConnection *proxy_connection) { - GDBusConnection *bus; GMenu *menu; GDBusMenuModel *proxy; GMainLoop *loop; GError *error = NULL; guint export_id; + guint timeout_id; + timeout_id = add_timeout (60); loop = g_main_loop_new (NULL, FALSE); - bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); - menu = g_menu_new (); - export_id = g_dbus_connection_export_menu_model (bus, "/", G_MENU_MODEL (menu), &error); + export_id = g_dbus_connection_export_menu_model (exporter_connection, + "/", + G_MENU_MODEL (menu), + &error); g_assert_no_error (error); - proxy = g_dbus_menu_model_get (bus, g_dbus_connection_get_unique_name (bus), "/"); + proxy = g_dbus_menu_model_get (proxy_connection, + g_dbus_connection_get_unique_name (proxy_connection), + "/"); items_changed_count = 0; g_signal_connect (proxy, "items-changed", G_CALLBACK (items_changed), NULL); @@ -839,32 +1070,42 @@ test_dbus_subscriptions (void) g_assert_cmpint (items_changed_count, ==, 0); + /* We don't subscribe to change-notification until we look at the items */ g_timeout_add (100, stop_loop, loop); g_main_loop_run (loop); + /* Looking at the items triggers subscription */ g_menu_model_get_n_items (G_MENU_MODEL (proxy)); - g_timeout_add (100, stop_loop, loop); - g_main_loop_run (loop); + while (items_changed_count < 1) + g_main_context_iteration (NULL, TRUE); + /* We get all three items in one batch */ g_assert_cmpint (items_changed_count, ==, 1); g_assert_cmpint (g_menu_model_get_n_items (G_MENU_MODEL (proxy)), ==, 3); + /* If we wait, we don't get any more */ g_timeout_add (100, stop_loop, loop); g_main_loop_run (loop); + g_assert_cmpint (items_changed_count, ==, 1); + g_assert_cmpint (g_menu_model_get_n_items (G_MENU_MODEL (proxy)), ==, 3); + /* Now we're subscribed, we get changes individually */ g_menu_append (menu, "item4", NULL); g_menu_append (menu, "item5", NULL); g_menu_append (menu, "item6", NULL); g_menu_remove (menu, 0); g_menu_remove (menu, 0); - g_timeout_add (200, stop_loop, loop); - g_main_loop_run (loop); + while (items_changed_count < 6) + g_main_context_iteration (NULL, TRUE); g_assert_cmpint (items_changed_count, ==, 6); g_assert_cmpint (g_menu_model_get_n_items (G_MENU_MODEL (proxy)), ==, 4); + + /* After destroying the proxy and waiting a bit, we don't get any more + * items-changed signals */ g_object_unref (proxy); g_timeout_add (100, stop_loop, loop); @@ -878,13 +1119,33 @@ test_dbus_subscriptions (void) g_assert_cmpint (items_changed_count, ==, 6); - g_dbus_connection_unexport_menu_model (bus, export_id); + g_dbus_connection_unexport_menu_model (exporter_connection, export_id); g_object_unref (menu); g_main_loop_unref (loop); + cancel_timeout (timeout_id); +} + +static void +test_dbus_subscriptions (void) +{ + GDBusConnection *bus; + + bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); + do_subscriptions (bus, bus); g_object_unref (bus); } +static void +test_dbus_peer_subscriptions (void) +{ + PeerConnection peer; + + peer_connection_up (&peer); + do_subscriptions (peer.server_connection, peer.client_connection); + peer_connection_down (&peer); +} + static gpointer do_modify (gpointer data) { @@ -1229,6 +1490,8 @@ main (int argc, char **argv) g_test_add_func ("/gmenu/dbus/roundtrip", test_dbus_roundtrip); g_test_add_func ("/gmenu/dbus/subscriptions", test_dbus_subscriptions); g_test_add_func ("/gmenu/dbus/threaded", test_dbus_threaded); + g_test_add_func ("/gmenu/dbus/peer/roundtrip", test_dbus_peer_roundtrip); + g_test_add_func ("/gmenu/dbus/peer/subscriptions", test_dbus_peer_subscriptions); g_test_add_func ("/gmenu/attributes", test_attributes); g_test_add_func ("/gmenu/attributes/iterate", test_attribute_iter); g_test_add_func ("/gmenu/links", test_links); diff --git a/gio/tests/meson.build b/gio/tests/meson.build index fb17cc407..70df55910 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -1,5 +1,9 @@ common_gio_tests_deps = [libglib_dep, libgmodule_dep, libgobject_dep, libgio_dep] +if host_system == 'darwin' +common_gio_tests_deps += [libintl] +endif + subdir('gdbus-object-manager-example') gengiotypefuncs_prog = find_program('gengiotypefuncs.py') @@ -67,6 +71,7 @@ test_extra_programs = [ test_env = [ 'G_TEST_SRCDIR=' + meson.current_source_dir(), 'G_TEST_BUILDDIR=' + meson.current_build_dir(), + 'GIO_MODULE_DIR=', ] test_c_args = [ @@ -304,6 +309,7 @@ uninstalled_test_extra_programs = [ ['gapplication-example-cmdline'], ['gapplication-example-cmdline2'], ['gapplication-example-cmdline3'], + ['gapplication-example-cmdline4'], ['gapplication-example-dbushooks'], ['gapplication-example-open'], ['gdbus-daemon', gdbus_daemon_sources], diff --git a/gio/tests/modules/meson.build b/gio/tests/modules/meson.build index c219015d3..5ae131ae7 100644 --- a/gio/tests/modules/meson.build +++ b/gio/tests/modules/meson.build @@ -1,10 +1,10 @@ -libtestmodulea = shared_library('testmodulea', 'test-module-a.c', +libtestmodulea = library('testmodulea', 'test-module-a.c', install : false, dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep], c_args : [ ] ) -libtestmoduleb = shared_library('testmoduleb', 'test-module-b.c', +libtestmoduleb = library('testmoduleb', 'test-module-b.c', install : false, dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep], c_args : [ ] diff --git a/gio/tests/test-codegen.xml b/gio/tests/test-codegen.xml index 505ae5c17..885a21f77 100644 --- a/gio/tests/test-codegen.xml +++ b/gio/tests/test-codegen.xml @@ -50,9 +50,13 @@ <arg direction="in" type="a{s(ii)}" name="dict_s_to_pairs" /> <arg direction="in" type="(iss)" name="a_struct" /> <arg direction="in" type="as" name="array_of_strings" /> + <arg direction="out" type="as" name="ret_array_of_strings" /> <arg direction="in" type="ao" name="array_of_objpaths" /> + <arg direction="out" type="ao" name="ret_array_of_objpaths" /> <arg direction="in" type="ag" name="array_of_signatures" /> + <arg direction="out" type="ag" name="ret_array_of_signatures" /> <arg direction="in" type="aay" name="array_of_bytestrings" /> + <arg direction="out" type="aay" name="ret_array_of_bytestrings" /> <arg direction="out" type="ay" name="result" /> </method> diff --git a/gio/tests/test-pipe-unix.c b/gio/tests/test-pipe-unix.c index 14b22e763..ccf9faac8 100644 --- a/gio/tests/test-pipe-unix.c +++ b/gio/tests/test-pipe-unix.c @@ -86,7 +86,7 @@ test_pipe (GInputStream **is, * @right: (out) (optional): used to return the other #GIOStream * @error: used to raise an error * - * Return two #GIOStream<!---->s connected to each other with pipes. + * Return two #GIOStreams connected to each other with pipes. * The "left" input stream is connected by a unidirectional pipe * to the "right" output stream, and vice versa. This can be used * as a bidirectional pipe to a child process, for instance. diff --git a/gio/xdgmime/meson.build b/gio/xdgmime/meson.build index 128d70d27..a8d545971 100644 --- a/gio/xdgmime/meson.build +++ b/gio/xdgmime/meson.build @@ -1,4 +1,4 @@ -xdgmime_sources = [ +xdgmime_sources = files( 'xdgmime.c', 'xdgmimealias.c', 'xdgmimecache.c', @@ -7,7 +7,7 @@ xdgmime_sources = [ 'xdgmimeint.c', 'xdgmimemagic.c', 'xdgmimeparent.c', -] +) xdgmime_lib = static_library('xdgmime', sources : xdgmime_sources, diff --git a/glib-tap.mk b/glib-tap.mk index 5f25b620a..e73438db8 100644 --- a/glib-tap.mk +++ b/glib-tap.mk @@ -125,7 +125,8 @@ installed_testcases = $(test_programs) $(installed_test_programs) \ installed_test_meta_DATA = $(installed_testcases:=.test) %.test: %$(EXEEXT) Makefile - $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ + $(AM_V_GEN) ($(MKDIR_P) $(@D); \ + echo '[Test]' > $@.tmp; \ echo 'Type=session' >> $@.tmp; \ echo 'Exec=$(installed_testdir)/$(notdir $<) --tap' >> $@.tmp; \ echo 'Output=TAP' >> $@.tmp; \ diff --git a/glib/docs.c b/glib/docs.c index d6ac4b392..b9c42454a 100644 --- a/glib/docs.c +++ b/glib/docs.c @@ -2608,6 +2608,62 @@ */ /** + * g_autolist: + * @TypeName: a supported variable type + * + * Helper to declare a list variable with automatic deep cleanup. + * + * The list is deeply freed, in a way appropriate to the specified type, when the + * variable goes out of scope. The type must support this. + * + * This feature is only supported on GCC and clang. This macro is not + * defined on other compilers and should not be used in programs that + * are intended to be portable to those compilers. + * + * This is meant to be used to declare lists of a type with a cleanup + * function. The type of the variable is a GList *. You + * must not add your own '*'. + * + * This macro can be used to avoid having to do explicit cleanups of + * local variables when exiting functions. It often vastly simplifies + * handling of error conditions, removing the need for various tricks + * such as 'goto out' or repeating of cleanup code. It is also helpful + * for non-error cases. + * + * See also g_autoslist(), g_autoptr() and g_steal_pointer(). + * + * Since: 2.56 + */ + +/** + * g_autoslist: + * @TypeName: a supported variable type + * + * Helper to declare a singly linked list variable with automatic deep cleanup. + * + * The list is deeply freed, in a way appropriate to the specified type, when the + * variable goes out of scope. The type must support this. + * + * This feature is only supported on GCC and clang. This macro is not + * defined on other compilers and should not be used in programs that + * are intended to be portable to those compilers. + * + * This is meant to be used to declare lists of a type with a cleanup + * function. The type of the variable is a GSList *. You + * must not add your own '*'. + * + * This macro can be used to avoid having to do explicit cleanups of + * local variables when exiting functions. It often vastly simplifies + * handling of error conditions, removing the need for various tricks + * such as 'goto out' or repeating of cleanup code. It is also helpful + * for non-error cases. + * + * See also g_autolist(), g_autoptr() and g_steal_pointer(). + * + * Since: 2.56 + */ + +/** * G_DEFINE_AUTOPTR_CLEANUP_FUNC: * @TypeName: a type name to define a g_autoptr() cleanup function for * @func: the cleanup function diff --git a/glib/garray.c b/glib/garray.c index a4762842f..5670408fd 100644 --- a/glib/garray.c +++ b/glib/garray.c @@ -1503,7 +1503,8 @@ g_ptr_array_sort_with_data (GPtrArray *array, * @func: the function to call for each array element * @user_data: user data to pass to the function * - * Calls a function for each element of a #GPtrArray. + * Calls a function for each element of a #GPtrArray. @func must not + * add elements to or remove elements from the array. * * Since: 2.4 */ diff --git a/glib/gbacktrace.h b/glib/gbacktrace.h index 96d450584..d7322f4e2 100644 --- a/glib/gbacktrace.h +++ b/glib/gbacktrace.h @@ -30,6 +30,9 @@ #endif #include <glib/gtypes.h> +#ifdef __sun__ +#include <sys/select.h> +#endif #include <signal.h> G_BEGIN_DECLS diff --git a/glib/gbookmarkfile.c b/glib/gbookmarkfile.c index 596e370e8..92a5e0f19 100644 --- a/glib/gbookmarkfile.c +++ b/glib/gbookmarkfile.c @@ -1612,7 +1612,8 @@ g_bookmark_file_free (GBookmarkFile *bookmark) /** * g_bookmark_file_load_from_data: * @bookmark: an empty #GBookmarkFile struct - * @data: desktop bookmarks loaded in memory + * @data: (array length=length) (element-type guint8): desktop bookmarks + * loaded in memory * @length: the length of @data in bytes * @error: return location for a #GError, or %NULL * @@ -1766,7 +1767,7 @@ find_file_in_data_dirs (const gchar *file, * g_bookmark_file_load_from_data_dirs: * @bookmark: a #GBookmarkFile * @file: (type filename): a relative path to a filename to open and parse - * @full_path: (type filename) (nullable): return location for a string + * @full_path: (out) (optional) (type filename): return location for a string * containing the full path of the file, or %NULL * @error: return location for a #GError, or %NULL * @@ -1852,8 +1853,8 @@ g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark, * * This function outputs @bookmark as a string. * - * Returns: a newly allocated string holding - * the contents of the #GBookmarkFile + * Returns: (array length=length) (element-type guint8): + * a newly allocated string holding the contents of the #GBookmarkFile * * Since: 2.12 */ @@ -2822,7 +2823,8 @@ g_bookmark_file_remove_group (GBookmarkFile *bookmark, * g_bookmark_file_set_groups: * @bookmark: a #GBookmarkFile * @uri: an item's URI - * @groups: (nullable): an array of group names, or %NULL to remove all groups + * @groups: (nullable) (array length=length) (element-type utf8): an array of + * group names, or %NULL to remove all groups * @length: number of group name values in @groups * * Sets a list of group names for the item with URI @uri. Each previously diff --git a/glib/gbytes.c b/glib/gbytes.c index 5f5046ff6..e0db00592 100644 --- a/glib/gbytes.c +++ b/glib/gbytes.c @@ -482,7 +482,7 @@ g_bytes_ref (GBytes *bytes) * @bytes: (nullable): a #GBytes * * Releases a reference on @bytes. This may result in the bytes being - * freed. + * freed. If @bytes is %NULL, it will return immediately. * * Since: 2.32 */ diff --git a/glib/gdataset.c b/glib/gdataset.c index ae36e9e2f..cc4397ca5 100644 --- a/glib/gdataset.c +++ b/glib/gdataset.c @@ -1065,8 +1065,12 @@ g_datalist_get_data (GData **datalist, * * Calls the given function for each data element which is associated * with the given location. Note that this function is NOT thread-safe. - * So unless @datalist can be protected from any modifications during - * invocation of this function, it should not be called. + * So unless @dataset_location can be protected from any modifications + * during invocation of this function, it should not be called. + * + * @func can make changes to the dataset, but the iteration will not + * reflect changes made during the g_dataset_foreach() call, other + * than skipping over elements that are removed. **/ void g_dataset_foreach (gconstpointer dataset_location, @@ -1104,6 +1108,10 @@ g_dataset_foreach (gconstpointer dataset_location, * function is NOT thread-safe. So unless @datalist can be protected * from any modifications during invocation of this function, it should * not be called. + * + * @func can make changes to @datalist, but the iteration will not + * reflect changes made during the g_datalist_foreach() call, other + * than skipping over elements that are removed. **/ void g_datalist_foreach (GData **datalist, diff --git a/glib/gdatetime.c b/glib/gdatetime.c index e1c726047..88af308e9 100644 --- a/glib/gdatetime.c +++ b/glib/gdatetime.c @@ -175,7 +175,6 @@ static const guint16 days_in_year[2][13] = #define PREFERRED_DATE_TIME_FMT nl_langinfo (D_T_FMT) #define PREFERRED_DATE_FMT nl_langinfo (D_FMT) #define PREFERRED_TIME_FMT nl_langinfo (T_FMT) -#define PREFERRED_TIME_FMT nl_langinfo (T_FMT) #define PREFERRED_12HR_TIME_FMT nl_langinfo (T_FMT_AMPM) static const gint weekday_item[2][7] = @@ -1295,6 +1294,7 @@ g_date_time_new (GTimeZone *tz, { GDateTime *datetime; gint64 full_time; + gint64 usec; g_return_val_if_fail (tz != NULL, NULL); @@ -1322,10 +1322,20 @@ g_date_time_new (GTimeZone *tz, G_TIME_TYPE_STANDARD, &full_time); + /* This is the correct way to convert a scaled FP value to integer. + * If this surprises you, please observe that (int)(1.000001 * 1e6) + * is 1000000. This is not a problem with precision, it's just how + * FP numbers work. + * See https://bugzilla.gnome.org/show_bug.cgi?id=697715. */ + usec = seconds * USEC_PER_SECOND; + if ((usec + 1) * 1e-6 <= seconds) { + usec++; + } + full_time += UNIX_EPOCH_START * SEC_PER_DAY; datetime->days = full_time / SEC_PER_DAY; datetime->usec = (full_time % SEC_PER_DAY) * USEC_PER_SECOND; - datetime->usec += ((int) (seconds * USEC_PER_SECOND)) % USEC_PER_SECOND; + datetime->usec += usec % USEC_PER_SECOND; return datetime; } @@ -2684,6 +2694,8 @@ g_date_time_format_locale (GDateTime *datetime, { case 'a': name = WEEKDAY_ABBR (datetime); + if (g_strcmp0 (name, "") == 0) + return FALSE; #if !defined (HAVE_LANGINFO_TIME) if (!locale_is_utf8) { @@ -2701,6 +2713,8 @@ g_date_time_format_locale (GDateTime *datetime, break; case 'A': name = WEEKDAY_FULL (datetime); + if (g_strcmp0 (name, "") == 0) + return FALSE; #if !defined (HAVE_LANGINFO_TIME) if (!locale_is_utf8) { @@ -2718,6 +2732,8 @@ g_date_time_format_locale (GDateTime *datetime, break; case 'b': name = MONTH_ABBR (datetime); + if (g_strcmp0 (name, "") == 0) + return FALSE; #if !defined (HAVE_LANGINFO_TIME) if (!locale_is_utf8) { @@ -2735,6 +2751,8 @@ g_date_time_format_locale (GDateTime *datetime, break; case 'B': name = MONTH_FULL (datetime); + if (g_strcmp0 (name, "") == 0) + return FALSE; #if !defined (HAVE_LANGINFO_TIME) if (!locale_is_utf8) { @@ -2752,6 +2770,8 @@ g_date_time_format_locale (GDateTime *datetime, break; case 'c': { + if (g_strcmp0 (PREFERRED_DATE_TIME_FMT, "") == 0) + return FALSE; if (!g_date_time_locale_format_locale (datetime, PREFERRED_DATE_TIME_FMT, outstr, locale_is_utf8)) return FALSE; @@ -2785,6 +2805,8 @@ g_date_time_format_locale (GDateTime *datetime, break; case 'h': name = MONTH_ABBR (datetime); + if (g_strcmp0 (name, "") == 0) + return FALSE; #if !defined (HAVE_LANGINFO_TIME) if (!locale_is_utf8) { @@ -2844,6 +2866,8 @@ g_date_time_format_locale (GDateTime *datetime, break; case 'r': { + if (g_strcmp0 (PREFERRED_12HR_TIME_FMT, "") == 0) + return FALSE; if (!g_date_time_locale_format_locale (datetime, PREFERRED_12HR_TIME_FMT, outstr, locale_is_utf8)) return FALSE; @@ -2884,6 +2908,8 @@ g_date_time_format_locale (GDateTime *datetime, break; case 'x': { + if (g_strcmp0 (PREFERRED_DATE_FMT, "") == 0) + return FALSE; if (!g_date_time_locale_format_locale (datetime, PREFERRED_DATE_FMT, outstr, locale_is_utf8)) return FALSE; @@ -2891,6 +2917,8 @@ g_date_time_format_locale (GDateTime *datetime, break; case 'X': { + if (g_strcmp0 (PREFERRED_TIME_FMT, "") == 0) + return FALSE; if (!g_date_time_locale_format_locale (datetime, PREFERRED_TIME_FMT, outstr, locale_is_utf8)) return FALSE; @@ -3048,7 +3076,8 @@ g_date_time_format_locale (GDateTime *datetime, * for the specifier. * * Returns: a newly allocated string formatted to the requested format - * or %NULL in the case that there was an error. The string + * or %NULL in the case that there was an error (such as a format specifier + * not being supported in the current locale). The string * should be freed with g_free(). * * Since: 2.26 diff --git a/glib/gerror.c b/glib/gerror.c index a92cbe2f9..236e52869 100644 --- a/glib/gerror.c +++ b/glib/gerror.c @@ -705,8 +705,7 @@ g_error_add_prefix (gchar **string, * nothing. * * If *@err is %NULL (ie: an error variable is present but there is no - * error condition) then also do nothing. Whether or not it makes sense - * to take advantage of this feature is up to you. + * error condition) then also do nothing. * * Since: 2.16 */ diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index e45661a69..732e05b08 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -2183,6 +2183,10 @@ g_key_file_set_locale_string (GKeyFile *key_file, * translated in the given @locale if available. If @locale is * %NULL then the current locale is assumed. * + * If @locale is to be non-%NULL, or if the current locale will change over + * the lifetime of the #GKeyFile, it must be loaded with + * %G_KEY_FILE_KEEP_TRANSLATIONS in order to load strings for all locales. + * * If @key cannot be found then %NULL is returned and @error is set * to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value associated * with @key cannot be interpreted or no suitable translation can @@ -2271,6 +2275,10 @@ g_key_file_get_locale_string (GKeyFile *key_file, * translated in the given @locale if available. If @locale is * %NULL then the current locale is assumed. * + * If @locale is to be non-%NULL, or if the current locale will change over + * the lifetime of the #GKeyFile, it must be loaded with + * %G_KEY_FILE_KEEP_TRANSLATIONS in order to load strings for all locales. + * * If @key cannot be found then %NULL is returned and @error is set * to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated * with @key cannot be interpreted or no suitable translations diff --git a/glib/glib.rc.in b/glib/glib.rc.in index a476718b7..c69f64401 100644 --- a/glib/glib.rc.in +++ b/glib/glib.rc.in @@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "GLib" VALUE "FileVersion", "@GLIB_VERSION@.0" VALUE "InternalName", "libglib-2.0-@LT_CURRENT_MINUS_AGE@" - VALUE "LegalCopyright", "Copyright 1995-2011 Peter Mattis, Spencer Kimball, Josh MacDonald and others." + VALUE "LegalCopyright", "Copyright 1995-2011 Peter Mattis, Spencer Kimball, Josh MacDonald and others." VALUE "OriginalFilename", "libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll" VALUE "ProductName", "GLib" VALUE "ProductVersion", "@GLIB_VERSION@" diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in index 43e1ba122..076d7ac8d 100644 --- a/glib/glibconfig.h.in +++ b/glib/glibconfig.h.in @@ -18,6 +18,9 @@ */ #mesondefine GLIB_USING_SYSTEM_PRINTF +#mesondefine GLIB_STATIC_COMPILATION +#mesondefine GOBJECT_STATIC_COMPILATION + G_BEGIN_DECLS #define G_MINFLOAT FLT_MIN @@ -115,7 +118,6 @@ typedef unsigned @glib_intptr_type_define@ guintptr; #define GLIB_MICRO_VERSION @GLIB_MICRO_VERSION@ @glib_os@ -@glib_static_compilation@ @glib_vacopy@ diff --git a/glib/glist.c b/glib/glist.c index 2b5692ee9..6f2079a4c 100644 --- a/glib/glist.c +++ b/glib/glist.c @@ -211,6 +211,9 @@ g_list_free_1 (GList *list) * Convenience method, which frees all the memory used by a #GList, * and calls @free_func on every element's data. * + * @free_func must not modify the list (eg, by removing the freed + * element from it). + * * Since: 2.28 */ void @@ -985,6 +988,9 @@ g_list_length (GList *list) * @user_data: user data to pass to the function * * Calls a function for each element of a #GList. + * + * It is safe for @func to remove the element from @list, but it must + * not modify any part of the list after that element. */ /** * GFunc: diff --git a/glib/gmacros.h b/glib/gmacros.h index 7b980fb34..430a3fbb7 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -37,11 +37,14 @@ */ #include <stddef.h> +#ifdef __GNUC__ #define G_GNUC_CHECK_VERSION(major, minor) \ - (defined(__GNUC__) && \ - ((__GNUC__ > (major)) || \ - ((__GNUC__ == (major)) && \ - (__GNUC_MINOR__ >= (minor))))) + ((__GNUC__ > (major)) || \ + ((__GNUC__ == (major)) && \ + (__GNUC_MINOR__ >= (minor)))) +#else +#define G_GNUC_CHECK_VERSION(major, minor) 0 +#endif /* Here we provide G_GNUC_EXTENSION as an alias for __extension__, * where this is valid. This allows for warningless compilation of @@ -430,11 +433,17 @@ #define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN #endif +#ifndef __GI_SCANNER__ + #ifdef __GNUC__ /* these macros are private */ #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName #define _GLIB_AUTOPTR_TYPENAME(TypeName) TypeName##_autoptr +#define _GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName) glib_listautoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_LIST_TYPENAME(TypeName) TypeName##_listautoptr +#define _GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName) glib_slistautoptr_cleanup_##TypeName +#define _GLIB_AUTOPTR_SLIST_TYPENAME(TypeName) TypeName##_slistautoptr #define _GLIB_AUTO_FUNC_NAME(TypeName) glib_auto_cleanup_##TypeName #define _GLIB_CLEANUP(func) __attribute__((cleanup(func))) #define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) \ @@ -446,8 +455,12 @@ /* these macros are API */ #define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) \ typedef TypeName *_GLIB_AUTOPTR_TYPENAME(TypeName); \ + typedef GList *_GLIB_AUTOPTR_LIST_TYPENAME(TypeName); \ + typedef GSList *_GLIB_AUTOPTR_SLIST_TYPENAME(TypeName); \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ static inline void _GLIB_AUTOPTR_FUNC_NAME(TypeName) (TypeName **_ptr) { if (*_ptr) (func) (*_ptr); } \ + static inline void _GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName) (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) func); } \ + static inline void _GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName) (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) func); } \ G_GNUC_END_IGNORE_DEPRECATIONS #define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ @@ -458,6 +471,8 @@ static inline void _GLIB_AUTO_FUNC_NAME(TypeName) (TypeName *_ptr) { if (*_ptr != none) (func) (*_ptr); } \ G_GNUC_END_IGNORE_DEPRECATIONS #define g_autoptr(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_TYPENAME(TypeName) +#define g_autolist(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_LIST_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_LIST_TYPENAME(TypeName) +#define g_autoslist(TypeName) _GLIB_CLEANUP(_GLIB_AUTOPTR_SLIST_FUNC_NAME(TypeName)) _GLIB_AUTOPTR_SLIST_TYPENAME(TypeName) #define g_auto(TypeName) _GLIB_CLEANUP(_GLIB_AUTO_FUNC_NAME(TypeName)) TypeName #define g_autofree _GLIB_CLEANUP(g_autoptr_cleanup_generic_gfree) @@ -471,6 +486,16 @@ #define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) /* no declaration of g_auto() or g_autoptr() here */ -#endif +#endif /* __GNUC__ */ + +#else + +#define _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) + +#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) +#define G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) + +#endif /* __GI_SCANNER__ */ #endif /* __G_MACROS_H__ */ diff --git a/glib/gmain.c b/glib/gmain.c index 7e7e44b27..a30eaa71f 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -268,7 +268,7 @@ struct _GMainContext guint owner_count; GSList *waiters; - gint ref_count; + volatile gint ref_count; GHashTable *sources; /* guint -> GSource */ @@ -277,8 +277,7 @@ struct _GMainContext guint next_id; GList *source_lists; - gboolean in_check_or_prepare; - gboolean need_wakeup; + gint in_check_or_prepare; GPollRec *poll_records; guint n_poll_records; @@ -300,7 +299,7 @@ struct _GMainContext struct _GSourceCallback { - guint ref_count; + volatile gint ref_count; GSourceFunc func; gpointer data; GDestroyNotify notify; @@ -310,7 +309,7 @@ struct _GMainLoop { GMainContext *context; gboolean is_running; - gint ref_count; + volatile gint ref_count; }; struct _GTimeoutSource @@ -652,7 +651,6 @@ g_main_context_new (void) context->pending_dispatches = g_ptr_array_new (); - context->need_wakeup = FALSE; context->time_is_fresh = FALSE; context->wakeup = g_wakeup_new (); @@ -1129,11 +1127,17 @@ source_remove_from_context (GSource *source, static void conditional_wakeup (GMainContext *context) { - /* This flag is set if at the start of prepare() we have no other ready - * sources, and hence would wait in poll(). In that case, any other threads - * attaching sources will need to signal a wakeup. + /* We want to signal wakeups in two cases: + * 1 When the context is owned by another thread + * 2 When the context owner is NULL (two subcases) + * 2a Possible if the context has never been acquired + * 2b Or if the context has no current owner + * + * At least case 2a) is necessary to ensure backwards compatibility with + * qemu's use of GMainContext. + * https://bugzilla.gnome.org/show_bug.cgi?id=761102#c14 */ - if (context->need_wakeup) + if (context->owner != G_THREAD_SELF) g_wakeup_signal (context->wakeup); } @@ -1551,7 +1555,7 @@ g_source_callback_ref (gpointer cb_data) { GSourceCallback *callback = cb_data; - callback->ref_count++; + g_atomic_int_inc (&callback->ref_count); } static void @@ -1559,8 +1563,7 @@ g_source_callback_unref (gpointer cb_data) { GSourceCallback *callback = cb_data; - callback->ref_count--; - if (callback->ref_count == 0) + if (g_atomic_int_dec_and_test (&callback->ref_count)) { if (callback->notify) callback->notify (callback->data); @@ -1825,7 +1828,7 @@ g_source_get_priority (GSource *source) * Note that if you have a pair of sources where the ready time of one * suggests that it will be delivered first but the priority for the * other suggests that it would be delivered first, and the ready time - * for both sources is reached during the same main context iteration + * for both sources is reached during the same main context iteration, * then the order of dispatch is undefined. * * It is a no-op to call this function on a #GSource which has already been @@ -1843,16 +1846,29 @@ g_source_set_ready_time (GSource *source, GMainContext *context; g_return_if_fail (source != NULL); - g_return_if_fail (source->ref_count > 0); - - if (source->priv->ready_time == ready_time) - return; + /* We deliberately don't check for ref_count > 0 here, because that + * breaks cancellable_source_cancelled() in GCancellable: it has no + * way to find out that the last-unref has happened until the + * finalize() function is called, but that's too late, because the + * ref_count already has already reached 0 before that time. + * However, priv is only poisoned (set to NULL) after finalize(), + * so we can use this as a simple guard against use-after-free. + * See https://bugzilla.gnome.org/show_bug.cgi?id=791754 */ + g_return_if_fail (source->priv != NULL); context = source->context; if (context) LOCK_CONTEXT (context); + if (source->priv->ready_time == ready_time) + { + if (context) + UNLOCK_CONTEXT (context); + + return; + } + source->priv->ready_time = ready_time; TRACE (GLIB_SOURCE_SET_READY_TIME (source, ready_time)); @@ -2123,6 +2139,21 @@ g_source_unref_internal (GSource *source, source->ref_count--; } + if (old_cb_funcs) + { + /* Temporarily increase the ref count again so that GSource methods + * can be called from callback_funcs.unref(). */ + source->ref_count++; + if (context) + UNLOCK_CONTEXT (context); + + old_cb_funcs->unref (old_cb_data); + + if (context) + LOCK_CONTEXT (context); + source->ref_count--; + } + g_free (source->name); source->name = NULL; @@ -2147,20 +2178,9 @@ g_source_unref_internal (GSource *source, g_free (source); } - + if (!have_lock && context) UNLOCK_CONTEXT (context); - - if (old_cb_funcs) - { - if (have_lock) - UNLOCK_CONTEXT (context); - - old_cb_funcs->unref (old_cb_data); - - if (have_lock) - LOCK_CONTEXT (context); - } } /** @@ -2319,17 +2339,15 @@ g_main_context_find_source_by_user_data (GMainContext *context, * g_source_remove: * @tag: the ID of the source to remove. * - * Removes the source with the given id from the default main context. + * Removes the source with the given ID from the default main context. You must + * use g_source_destroy() for sources added to a non-default main context. * - * The id of a #GSource is given by g_source_get_id(), or will be + * The ID of a #GSource is given by g_source_get_id(), or will be * returned by the functions g_source_attach(), g_idle_add(), * g_idle_add_full(), g_timeout_add(), g_timeout_add_full(), * g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and * g_io_add_watch_full(). * - * See also g_source_destroy(). You must use g_source_destroy() for sources - * added to a non-default main context. - * * It is a programmer error to attempt to remove a non-existent source. * * More specifically: source IDs can be reissued after a source has been @@ -3417,10 +3435,6 @@ g_main_context_prepare (GMainContext *context, LOCK_CONTEXT (context); - /* context->need_wakeup is protected by LOCK_CONTEXT/UNLOCK_CONTEXT, - * so need not set it yet. - */ - context->time_is_fresh = FALSE; if (context->in_check_or_prepare) @@ -3546,8 +3560,6 @@ g_main_context_prepare (GMainContext *context, } } g_source_iter_clear (&iter); - /* See conditional_wakeup() where this is used */ - context->need_wakeup = (n_ready == 0); TRACE (GLIB_MAIN_CONTEXT_AFTER_PREPARE (context, current_priority, n_ready)); @@ -3682,12 +3694,6 @@ g_main_context_check (GMainContext *context, TRACE (GLIB_MAIN_CONTEXT_BEFORE_CHECK (context, max_priority, fds, n_fds)); - /* We don't need to wakeup during check or dispatch, because - * all sources will be re-evaluated during prepare/query. - */ - context->need_wakeup = FALSE; - - /* And if we have a wakeup pending, acknowledge it */ for (i = 0; i < n_fds; i++) { if (fds[i].fd == context->wake_up_rec.fd) diff --git a/glib/gmain.h b/glib/gmain.h index a7da20d84..76e2c14c1 100644 --- a/glib/gmain.h +++ b/glib/gmain.h @@ -87,8 +87,8 @@ typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs; * the @timeout_ values returned which were >= 0. Since 2.36 this may * be %NULL, in which case the effect is as if the function always returns * %FALSE with a timeout of -1. If @prepare returns a - * timeout and the source also has a 'ready time' set then the - * nearer of the two will be used. + * timeout and the source also has a ready time set, then the + * lower of the two will be used. * @check: Called after all the file descriptors are polled. The source * should return %TRUE if it is ready to be dispatched. Note that some * time may have passed since the previous prepare function was called, @@ -96,17 +96,17 @@ typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs; * be %NULL, in which case the effect is as if the function always returns * %FALSE. * @dispatch: Called to dispatch the event source, after it has returned - * %TRUE in either its @prepare or its @check function. The @dispatch - * function is passed in a callback function and data. The callback - * function may be %NULL if the source was never connected to a callback - * using g_source_set_callback(). The @dispatch function should call the - * callback function with @user_data and whatever additional parameters - * are needed for this type of event source. The return value of the - * @dispatch function should be #G_SOURCE_REMOVE if the source should be - * removed or #G_SOURCE_CONTINUE to keep it. + * %TRUE in either its @prepare or its @check function, or if a ready time + * has been reached. The @dispatch function receives a callback function and + * user data. The callback function may be %NULL if the source was never + * connected to a callback using g_source_set_callback(). The @dispatch + * function should call the callback function with @user_data and whatever + * additional parameters are needed for this type of event source. The + * return value of the @dispatch function should be #G_SOURCE_REMOVE if the + * source should be removed or #G_SOURCE_CONTINUE to keep it. * @finalize: Called when the source is finalized. At this point, the source * will have been destroyed, had its callback cleared, and have been removed - * from its #GMainContext, but it will still have its final reference count; + * from its #GMainContext, but it will still have its final reference count, * so methods can be called on it from within this function. * * The `GSourceFuncs` struct contains a table of diff --git a/glib/gmem.h b/glib/gmem.h index 462d49ed3..9530512d0 100644 --- a/glib/gmem.h +++ b/glib/gmem.h @@ -113,16 +113,17 @@ gpointer g_try_realloc_n (gpointer mem, #define g_clear_pointer(pp, destroy) \ G_STMT_START { \ G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \ - /* Only one access, please */ \ - gpointer *_pp = (gpointer *) (pp); \ + /* Only one access, please; work around type aliasing */ \ + union { char *in; gpointer *out; } _pp; \ gpointer _p; \ /* This assignment is needed to avoid a gcc warning */ \ GDestroyNotify _destroy = (GDestroyNotify) (destroy); \ \ - _p = *_pp; \ + _pp.in = (char *) (pp); \ + _p = *_pp.out; \ if (_p) \ { \ - *_pp = NULL; \ + *_pp.out = NULL; \ _destroy (_p); \ } \ } G_STMT_END diff --git a/glib/gmessages.c b/glib/gmessages.c index 8c9f558a9..8c78568b5 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -2167,12 +2167,15 @@ g_log_writer_is_journald (gint output_fd) if (g_once_init_enter (&initialized)) { - struct sockaddr_storage addr; + union { + struct sockaddr_storage storage; + struct sockaddr sa; + struct sockaddr_un un; + } addr; socklen_t addr_len = sizeof(addr); - int err = getpeername (output_fd, (struct sockaddr *) &addr, &addr_len); - if (err == 0 && addr.ss_family == AF_UNIX) - fd_is_journal = g_str_has_prefix (((struct sockaddr_un *)&addr)->sun_path, - "/run/systemd/journal/"); + int err = getpeername (output_fd, &addr.sa, &addr_len); + if (err == 0 && addr.storage.ss_family == AF_UNIX) + fd_is_journal = g_str_has_prefix (addr.un.sun_path, "/run/systemd/journal/"); g_once_init_leave (&initialized, TRUE); } @@ -2268,7 +2271,7 @@ g_log_writer_format_fields (GLogLevelFlags log_level, /* Timestamp */ now = g_get_real_time (); - now_secs = (time_t) now / 1000000; + now_secs = (time_t) (now / 1000000); now_tm = localtime (&now_secs); strftime (time_buf, sizeof (time_buf), "%H:%M:%S", now_tm); diff --git a/glib/gnode.c b/glib/gnode.c index 51c9fdc80..de98fd575 100644 --- a/glib/gnode.c +++ b/glib/gnode.c @@ -779,7 +779,7 @@ g_node_traverse_level (GNode *node, static gboolean g_node_depth_traverse_level (GNode *node, GTraverseFlags flags, - guint depth, + gint depth, GNodeTraverseFunc func, gpointer data) { @@ -787,7 +787,7 @@ g_node_depth_traverse_level (GNode *node, gboolean more_levels; level = 0; - while (level != depth) + while (depth < 0 || level != (guint) depth) { more_levels = FALSE; if (g_node_traverse_level (node, flags, level, func, data, &more_levels)) @@ -816,6 +816,7 @@ g_node_depth_traverse_level (GNode *node, * Traverses a tree starting at the given root #GNode. * It calls the given function for each node visited. * The traversal can be halted at any point by returning %TRUE from @func. + * @func must not do anything that would modify the structure of the tree. */ /** @@ -1235,8 +1236,9 @@ g_node_last_sibling (GNode *node) * @func: the function to call for each visited node * @data: user data to pass to the function * - * Calls a function for each of the children of a #GNode. - * Note that it doesn't descend beneath the child nodes. + * Calls a function for each of the children of a #GNode. Note that it + * doesn't descend beneath the child nodes. @func must not do anything + * that would modify the structure of the tree. */ /** * GNodeForeachFunc: diff --git a/glib/gnulib/meson.build b/glib/gnulib/meson.build index 6746631d1..44227c611 100644 --- a/glib/gnulib/meson.build +++ b/glib/gnulib/meson.build @@ -1,4 +1,4 @@ gnulib_lib = static_library('gnulib', 'asnprintf.c', 'printf.c', 'printf-args.c', 'printf-parse.c', 'vasnprintf.c', - include_directories : configinc, + include_directories : [configinc, glibinc], pic : true, c_args : [ '-DLIBDIR="@0@"'.format(get_option('libdir')), '-DGLIB_COMPILATION', '-DG_LOG_DOMAIN="GLib"' ] + glib_hidden_visibility_args) diff --git a/glib/gqueue.c b/glib/gqueue.c index 01bd13439..26fe507a3 100644 --- a/glib/gqueue.c +++ b/glib/gqueue.c @@ -95,6 +95,9 @@ g_queue_free (GQueue *queue) * Convenience method, which frees all the memory used by a #GQueue, * and calls the specified destroy function on every element's data. * + * @free_func should not modify the queue (eg, by removing the freed + * element from it). + * * Since: 2.32 */ void @@ -231,6 +234,9 @@ g_queue_copy (GQueue *queue) * Calls @func for each element in the queue passing @user_data to the * function. * + * It is safe for @func to remove the element from @queue, but it must + * not modify any part of the queue after that element. + * * Since: 2.4 */ void diff --git a/glib/gsequence.c b/glib/gsequence.c index a67f2576f..2dac88a94 100644 --- a/glib/gsequence.c +++ b/glib/gsequence.c @@ -294,7 +294,8 @@ g_sequence_free (GSequence *seq) * @user_data: user data passed to @func * * Calls @func for each item in the range (@begin, @end) passing - * @user_data to the function. + * @user_data to the function. @func must not modify the sequence + * itself. * * Since: 2.14 */ @@ -335,7 +336,7 @@ g_sequence_foreach_range (GSequenceIter *begin, * @user_data: user data passed to @func * * Calls @func for each item in the sequence passing @user_data - * to the function. + * to the function. @func must not modify the sequence itself. * * Since: 2.14 */ diff --git a/glib/gslist.c b/glib/gslist.c index 028237d3d..7a24fb66d 100644 --- a/glib/gslist.c +++ b/glib/gslist.c @@ -165,6 +165,9 @@ g_slist_free_1 (GSList *list) * Convenience method, which frees all the memory used by a #GSList, and * calls the specified destroy function on every element's data. * + * @free_func must not modify the list (eg, by removing the freed + * element from it). + * * Since: 2.28 **/ void @@ -844,6 +847,9 @@ g_slist_length (GSList *list) * @user_data: user data to pass to the function * * Calls a function for each element of a #GSList. + * + * It is safe for @func to remove the element from @list, but it must + * not modify any part of the list after that element. */ void g_slist_foreach (GSList *list, @@ -1028,7 +1034,8 @@ g_slist_sort_real (GSList *list, * first element comes before the second, or a positive value if * the first element comes after the second. * - * Sorts a #GSList using the given comparison function. + * Sorts a #GSList using the given comparison function. The algorithm + * used is a stable sort. * * Returns: the start of the sorted #GSList */ diff --git a/glib/gtester-report b/glib/gtester-report index d11b255bc..c4790adbb 100755 --- a/glib/gtester-report +++ b/glib/gtester-report @@ -75,7 +75,7 @@ def attribute_as_text (node, aname, node_name = None): def html_indent_string (n): uncollapsible_space = ' ' # HTML won't compress alternating sequences of ' ' and ' ' string = '' - for i in range (0, (n + 1) / 2): + for i in range (0, int((n + 1) / 2)): string += uncollapsible_space return string diff --git a/glib/gtester.c b/glib/gtester.c index 38a7f9610..9451aea56 100644 --- a/glib/gtester.c +++ b/glib/gtester.c @@ -102,21 +102,37 @@ testcase_close (long double duration, gint exit_status, guint n_forks) { + gboolean success; + g_return_if_fail (testcase_open > 0); test_log_printfe ("%s<duration>%.6Lf</duration>\n", sindent (log_indent), duration); + success = exit_status == G_TEST_RUN_SUCCESS || exit_status == G_TEST_RUN_SKIPPED; test_log_printfe ("%s<status exit-status=\"%d\" n-forks=\"%d\" result=\"%s\"/>\n", sindent (log_indent), exit_status, n_forks, - exit_status ? "failed" : "success"); + success ? "failed" : "success"); log_indent -= 2; test_log_printfe ("%s</testcase>\n", sindent (log_indent)); testcase_open--; if (gtester_verbose) - g_print ("%s\n", exit_status ? "FAIL" : "OK"); - if (exit_status && subtest_last_seed) + { + switch (exit_status) + { + case G_TEST_RUN_SUCCESS: + g_print ("OK\n"); + break; + case G_TEST_RUN_SKIPPED: + g_print ("SKIP\n"); + break; + default: + g_print ("FAIL\n"); + break; + } + } + if (!success && subtest_last_seed) g_print ("GTester: last random seed: %s\n", subtest_last_seed); - if (exit_status) + if (!success) testcase_fail_count += 1; - if (subtest_mode_fatal && exit_status) + if (subtest_mode_fatal && !success) terminate(); } diff --git a/glib/gtestutils.c b/glib/gtestutils.c index b620ce9c0..2f5e31296 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -248,6 +248,10 @@ * Exactly one of g_test_quick() and g_test_slow() is active in any run; * there is no "medium speed". * + * By default, tests are run in quick mode. In tests that use + * g_test_init(), the options `-m quick`, `-m slow` and `-m thorough` + * can be used to change this. + * * Returns: %TRUE if in quick mode */ @@ -258,6 +262,10 @@ * Exactly one of g_test_quick() and g_test_slow() is active in any run; * there is no "medium speed". * + * By default, tests are run in quick mode. In tests that use + * g_test_init(), the options `-m quick`, `-m slow` and `-m thorough` + * can be used to change this. + * * Returns: the opposite of g_test_quick() */ @@ -267,6 +275,10 @@ * Returns %TRUE if tests are run in thorough mode, equivalent to * g_test_slow(). * + * By default, tests are run in quick mode. In tests that use + * g_test_init(), the options `-m quick`, `-m slow` and `-m thorough` + * can be used to change this. + * * Returns: the same thing as g_test_slow() */ @@ -275,6 +287,10 @@ * * Returns %TRUE if tests are run in performance mode. * + * By default, tests are run in quick mode. In tests that use + * g_test_init(), the option `-m perf` enables performance tests, while + * `-m quick` disables them. + * * Returns: %TRUE if in performance mode */ @@ -283,7 +299,10 @@ * * Returns %TRUE if tests may provoke assertions and other formally-undefined * behaviour, to verify that appropriate warnings are given. It might, in some - * cases, be useful to turn this off if running tests under valgrind. + * cases, be useful to turn this off with if running tests under valgrind; + * in tests that use g_test_init(), the option `-m no-undefined` disables + * those tests, while `-m undefined` explicitly enables them (the default + * behaviour). * * Returns: %TRUE if tests may provoke programming errors */ @@ -292,6 +311,8 @@ * g_test_verbose: * * Returns %TRUE if tests are run in verbose mode. + * In tests that use g_test_init(), the option `--verbose` enables this, + * while `-q` or `--quiet` disables it. * The default is neither g_test_verbose() nor g_test_quiet(). * * Returns: %TRUE if in verbose mode @@ -301,6 +322,8 @@ * g_test_quiet: * * Returns %TRUE if tests are run in quiet mode. + * In tests that use g_test_init(), the option `-q` or `--quiet` enables + * this, while `--verbose` disables it. * The default is neither g_test_verbose() nor g_test_quiet(). * * Returns: %TRUE if in quiet mode @@ -750,12 +773,6 @@ static void gtest_default_log_handler (const gchar *log_domain, gpointer unused_data); -typedef enum { - G_TEST_RUN_SUCCESS, - G_TEST_RUN_SKIPPED, - G_TEST_RUN_FAILURE, - G_TEST_RUN_INCOMPLETE -} GTestResult; static const char * const g_test_result_names[] = { "OK", "SKIP", @@ -784,7 +801,7 @@ static double test_user_stamp = 0; static GSList *test_paths = NULL; static GSList *test_paths_skipped = NULL; static GTestSuite *test_suite_root = NULL; -static int test_trap_last_status = 0; +static int test_trap_last_status = 0; /* unmodified platform-specific status */ static GPid test_trap_last_pid = 0; static char *test_trap_last_subprocess = NULL; static char *test_trap_last_stdout = NULL; @@ -1216,15 +1233,16 @@ parse_args (gint *argc_p, * be skipped (ie, a test whose name contains "/subprocess"). * - `-m {perf|slow|thorough|quick|undefined|no-undefined}`: Execute tests according to these test modes: * - * `perf`: Performance tests, may take long and report results. + * `perf`: Performance tests, may take long and report results (off by default). * - * `slow`, `thorough`: Slow and thorough tests, may take quite long and maximize coverage. + * `slow`, `thorough`: Slow and thorough tests, may take quite long and maximize coverage + * (off by default). * - * `quick`: Quick tests, should run really quickly and give good coverage. + * `quick`: Quick tests, should run really quickly and give good coverage (the default). * * `undefined`: Tests for undefined behaviour, may provoke programming errors * under g_test_trap_subprocess() or g_test_expect_message() to check - * that appropriate assertions or warnings are given + * that appropriate assertions or warnings are given (the default). * * `no-undefined`: Avoid tests for undefined behaviour * @@ -2698,7 +2716,7 @@ sane_dup2 (int fd1, typedef struct { GPid pid; GMainLoop *loop; - int child_status; + int child_status; /* unmodified platform-specific status */ GIOChannel *stdout_io; gboolean echo_stdout; @@ -2723,18 +2741,8 @@ child_exited (GPid pid, { WaitForChildData *data = user_data; -#ifdef G_OS_UNIX - if (WIFEXITED (status)) /* normal exit */ - data->child_status = WEXITSTATUS (status); /* 0..255 */ - else if (WIFSIGNALED (status) && WTERMSIG (status) == SIGALRM) - data->child_status = G_TEST_STATUS_TIMED_OUT; - else if (WIFSIGNALED (status)) - data->child_status = (WTERMSIG (status) << 12); /* signalled */ - else /* WCOREDUMP (status) */ - data->child_status = 512; /* coredump */ -#else + g_assert (status != -1); data->child_status = status; -#endif check_complete (data); } @@ -3143,7 +3151,12 @@ g_test_subprocess (void) gboolean g_test_trap_has_passed (void) { - return test_trap_last_status == 0; /* exit_status == 0 && !signal && !coredump */ +#ifdef G_OS_UNIX + return (WIFEXITED (test_trap_last_status) && + WEXITSTATUS (test_trap_last_status) == 0); +#else + return test_trap_last_status == 0; +#endif } /** @@ -3158,7 +3171,12 @@ g_test_trap_has_passed (void) gboolean g_test_trap_reached_timeout (void) { +#ifdef G_OS_UNIX + return (WIFSIGNALED (test_trap_last_status) && + WTERMSIG (test_trap_last_status) == SIGALRM); +#else return test_trap_last_status == G_TEST_STATUS_TIMED_OUT; +#endif } static gboolean @@ -3166,6 +3184,49 @@ log_child_output (const gchar *process_id) { gchar *escaped; +#ifdef G_OS_UNIX + if (WIFEXITED (test_trap_last_status)) /* normal exit */ + { + if (WEXITSTATUS (test_trap_last_status) == 0) + g_test_message ("child process (%s) exit status: 0 (success)", + process_id); + else + g_test_message ("child process (%s) exit status: %d (error)", + process_id, WEXITSTATUS (test_trap_last_status)); + } + else if (WIFSIGNALED (test_trap_last_status) && + WTERMSIG (test_trap_last_status) == SIGALRM) + { + g_test_message ("child process (%s) timed out", process_id); + } + else if (WIFSIGNALED (test_trap_last_status)) + { + const gchar *maybe_dumped_core = ""; + +#ifdef WCOREDUMP + if (WCOREDUMP (test_trap_last_status)) + maybe_dumped_core = ", core dumped"; +#endif + + g_test_message ("child process (%s) killed by signal %d (%s)%s", + process_id, WTERMSIG (test_trap_last_status), + g_strsignal (WTERMSIG (test_trap_last_status)), + maybe_dumped_core); + } + else + { + g_test_message ("child process (%s) unknown wait status %d", + process_id, test_trap_last_status); + } +#else + if (test_trap_last_status == 0) + g_test_message ("child process (%s) exit status: 0 (success)", + process_id); + else + g_test_message ("child process (%s) exit status: %d (error)", + process_id, test_trap_last_status); +#endif + escaped = g_strescape (test_trap_last_stdout, NULL); g_test_message ("child process (%s) stdout: \"%s\"", process_id, escaped); g_free (escaped); diff --git a/glib/gtestutils.h b/glib/gtestutils.h index 165eb8fda..2f2445fa9 100644 --- a/glib/gtestutils.h +++ b/glib/gtestutils.h @@ -27,6 +27,7 @@ #include <glib/gstring.h> #include <glib/gerror.h> #include <glib/gslist.h> +#include <string.h> G_BEGIN_DECLS @@ -357,6 +358,13 @@ GLIB_VAR const GTestConfig * const g_test_config_vars; /* internal logging API */ typedef enum { + G_TEST_RUN_SUCCESS, + G_TEST_RUN_SKIPPED, + G_TEST_RUN_FAILURE, + G_TEST_RUN_INCOMPLETE +} GTestResult; + +typedef enum { G_TEST_LOG_NONE, G_TEST_LOG_ERROR, /* s:msg */ G_TEST_LOG_START_BINARY, /* s:binaryname s:seed */ diff --git a/glib/gvariant.c b/glib/gvariant.c index a09ab1809..ebef38dfd 100644 --- a/glib/gvariant.c +++ b/glib/gvariant.c @@ -5923,6 +5923,13 @@ g_variant_deep_copy (GVariant *value) * data from untrusted sources and you want to ensure your serialised * output is definitely in normal form. * + * If @value is already in normal form, a new reference will be returned + * (which will be floating if @value is floating). If it is not in normal form, + * the newly created #GVariant will be returned with a single non-floating + * reference. Typically, g_variant_take_ref() should be called on the return + * value from this function to guarantee ownership of a single non-floating + * reference to it. + * * Returns: (transfer full): a trusted #GVariant * * Since: 2.24 diff --git a/glib/libcharset/Makefile.am b/glib/libcharset/Makefile.am index 642f75c39..ea2697000 100644 --- a/glib/libcharset/Makefile.am +++ b/glib/libcharset/Makefile.am @@ -1,8 +1,9 @@ ## Process this file with automake to produce Makefile.in include $(top_srcdir)/glib.mk -AM_CPPFLAGS = \ - -DLIBDIR=\"$(libdir)\" \ +AM_CPPFLAGS = \ + $(gmodule_INCLUDES) \ + -DGLIB_CHARSETALIAS_DIR=\"$(GLIB_CHARSETALIAS_DIR)\" \ $(config_h_INCLUDES) noinst_LTLIBRARIES += libcharset.la @@ -24,10 +25,10 @@ EXTRA_DIST += \ make-patch.sh \ libcharset-glib.patch -charset_alias = $(DESTDIR)$(libdir)/charset.alias -charset_tmp = $(DESTDIR)$(libdir)/charset.tmp +charset_alias = $(DESTDIR)$(GLIB_CHARSETALIAS_DIR)/charset.alias +charset_tmp = $(DESTDIR)$(GLIB_CHARSETALIAS_DIR)/charset.tmp install-exec-local: all-local - $(mkinstalldirs) $(DESTDIR)$(libdir) + $(mkinstalldirs) $(DESTDIR)$(GLIB_CHARSETALIAS_DIR) if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ diff --git a/glib/libcharset/localcharset.c b/glib/libcharset/localcharset.c index 0d001f94c..0c4d544be 100644 --- a/glib/libcharset/localcharset.c +++ b/glib/libcharset/localcharset.c @@ -65,9 +65,9 @@ # define relocate(pathname) (pathname) #endif -/* Get LIBDIR. */ -#ifndef LIBDIR -# include "configmake.h" +/* Get GLIB_CHARSETALIAS_DIR. */ +#ifndef GLIB_CHARSETALIAS_DIR +# define GLIB_CHARSETALIAS_DIR LIBDIR #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ @@ -121,7 +121,7 @@ _g_locale_get_charset_aliases (void) necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') - dir = relocate (LIBDIR); + dir = relocate (GLIB_CHARSETALIAS_DIR); /* Concatenate dir and base into freshly allocated file_name. */ { diff --git a/glib/libcharset/meson.build b/glib/libcharset/meson.build index e926f21a5..be4a79023 100644 --- a/glib/libcharset/meson.build +++ b/glib/libcharset/meson.build @@ -1,4 +1,9 @@ +charsetalias_dir = get_option('charsetalias_dir') +if charsetalias_dir == '' + charsetalias_dir = get_option('libdir') +endif + charset_lib = static_library('charset', 'localcharset.c', include_directories : configinc, pic : true, - c_args : [ '-DLIBDIR="@0@"'.format(get_option('libdir')) ] + glib_hidden_visibility_args) + c_args : [ '-DGLIB_CHARSETALIAS_DIR="@0@"'.format(charsetalias_dir) ] + glib_hidden_visibility_args) diff --git a/glib/meson.build b/glib/meson.build index 223b7feaa..add29d06e 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -13,24 +13,24 @@ else subdir('gnulib') endif -glib_headers = [ +glib_headers = files( 'glib.h', 'glib-unix.h', 'glib-object.h', -] +) install_headers(glib_headers, subdir : 'glib-2.0') -glib_deprecated_headers = [ +glib_deprecated_headers = files( 'deprecated/gallocator.h', 'deprecated/gcache.h', 'deprecated/gcompletion.h', 'deprecated/gmain.h', 'deprecated/grel.h', 'deprecated/gthread.h', -] +) install_headers(glib_deprecated_headers, subdir : 'glib-2.0/glib/deprecated') -glib_sub_headers = [ +glib_sub_headers = files( 'glib-autocleanups.h', 'galloca.h', 'garray.h', @@ -105,18 +105,18 @@ glib_sub_headers = [ 'gversionmacros.h', 'gwin32.h', 'gprintf.h', -] +) install_headers(glib_sub_headers, subdir : 'glib-2.0/glib') -deprecated_sources = [ +deprecated_sources = files( 'deprecated/gallocator.c', 'deprecated/gcache.c', 'deprecated/gcompletion.c', 'deprecated/grel.c', 'deprecated/gthread-deprecated.c' -] +) -glib_sources = [ +glib_sources = files( 'garray.c', 'gasyncqueue.c', 'gatomic.c', @@ -194,15 +194,22 @@ glib_sources = [ 'gversion.c', 'gwakeup.c', 'gprintf.c', -] +) if host_system == 'windows' - thread_src = ['gthread-win32.c'] - plat_src = ['gwin32.c', 'gspawn-win32.c', 'giowin32.c'] + glib_win_rc = configure_file( + input: 'glib.rc.in', + output: 'glib.rc', + configuration: glibconfig_conf, + ) + glib_win_res = windows.compile_resources(glib_win_rc) + glib_sources += [glib_win_res] + glib_sources += files('gthread-win32.c') + glib_sources += files('gwin32.c', 'gspawn-win32.c', 'giowin32.c') platform_deps = [winsock2, cc.find_library('winmm')] else - thread_src = ['gthread-posix.c'] - plat_src = ['glib-unix.c', 'gspawn.c', 'giounix.c'] + glib_sources += files('gthread-posix.c') + glib_sources += files('glib-unix.c', 'gspawn.c', 'giounix.c') platform_deps = [] endif @@ -220,21 +227,25 @@ if use_pcre_static_flag pcre_static_args = ['-DPCRE_STATIC'] endif -libglib = shared_library('glib-2.0', +libglib = library('glib-2.0', glib_dtrace_obj, glib_dtrace_hdr, - sources : [deprecated_sources, glib_sources, thread_src, plat_src], + sources : [deprecated_sources, glib_sources], version : library_version, soversion : soversion, install : true, # intl.lib is not compatible with SAFESEH - link_args : noseh_link_args, + link_args : platform_ldflags + noseh_link_args, include_directories : configinc, link_with : [charset_lib, gnulib_lib], dependencies : [pcre, thread_dep, libintl, librt] + libiconv + platform_deps, c_args : ['-DG_LOG_DOMAIN="GLib"', '-DGLIB_COMPILATION'] + pcre_static_args + glib_hidden_visibility_args ) -libglib_dep = declare_dependency(link_with : libglib, +libglib_dep = declare_dependency( + link_with : libglib, + # thread_dep doesn't get pulled in from libglib atm, + # see https://github.com/mesonbuild/meson/issues/1426 + dependencies : [thread_dep], # We sadly need to export configinc here because everyone includes <glib/*.h> include_directories : [configinc, glibinc]) diff --git a/glib/tests/array-test.c b/glib/tests/array-test.c index d23ff2467..64b996fb8 100644 --- a/glib/tests/array-test.c +++ b/glib/tests/array-test.c @@ -39,6 +39,64 @@ sum_up (gpointer data, *sum += GPOINTER_TO_INT (data); } +/* Check that expanding an array with g_array_set_size() clears the new elements + * if @clear_ was specified during construction. */ +static void +array_new_cleared (void) +{ + GArray *garray; + gsize i; + + garray = g_array_new (FALSE, TRUE, sizeof (gint)); + g_assert_cmpuint (garray->len, ==, 0); + + g_array_set_size (garray, 5); + g_assert_cmpuint (garray->len, ==, 5); + + for (i = 0; i < 5; i++) + g_assert_cmpint (g_array_index (garray, gint, i), ==, 0); + + g_array_unref (garray); +} + +/* As with array_new_cleared(), but with a sized array. */ +static void +array_new_sized_cleared (void) +{ + GArray *garray; + gsize i; + + garray = g_array_sized_new (FALSE, TRUE, sizeof (gint), 10); + g_assert_cmpuint (garray->len, ==, 0); + + g_array_set_size (garray, 5); + g_assert_cmpuint (garray->len, ==, 5); + + for (i = 0; i < 5; i++) + g_assert_cmpint (g_array_index (garray, gint, i), ==, 0); + + g_array_unref (garray); +} + +/* Check that a zero-terminated array does actually have a zero terminator. */ +static void +array_new_zero_terminated (void) +{ + GArray *garray; + gchar *out_str = NULL; + + garray = g_array_new (TRUE, FALSE, sizeof (gchar)); + g_assert_cmpuint (garray->len, ==, 0); + + g_array_append_vals (garray, "hello", strlen ("hello")); + g_assert_cmpuint (garray->len, ==, 5); + g_assert_cmpstr (garray->data, ==, "hello"); + + out_str = g_array_free (garray, FALSE); + g_assert_cmpstr (out_str, ==, "hello"); + g_free (out_str); +} + static void array_append (void) { @@ -890,6 +948,9 @@ main (int argc, char *argv[]) g_test_bug_base ("https://bugzilla.gnome.org/"); /* array tests */ + g_test_add_func ("/array/new/cleared", array_new_cleared); + g_test_add_func ("/array/new/sized-cleared", array_new_sized_cleared); + g_test_add_func ("/array/new/zero-terminated", array_new_zero_terminated); g_test_add_func ("/array/append", array_append); g_test_add_func ("/array/prepend", array_prepend); g_test_add_func ("/array/remove", array_remove); diff --git a/glib/tests/autoptr.c b/glib/tests/autoptr.c index 754999cf1..ca6ae3464 100644 --- a/glib/tests/autoptr.c +++ b/glib/tests/autoptr.c @@ -410,6 +410,71 @@ test_strv (void) g_assert (val != NULL); } +static void +mark_freed (gpointer ptr) +{ + gboolean *freed = ptr; + *freed = TRUE; +} + +static void +test_autolist (void) +{ + char data[1] = {0}; + gboolean freed1 = FALSE; + gboolean freed2 = FALSE; + gboolean freed3 = FALSE; + GBytes *b1 = g_bytes_new_with_free_func (data, sizeof(data), mark_freed, &freed1); + GBytes *b2 = g_bytes_new_with_free_func (data, sizeof(data), mark_freed, &freed2); + GBytes *b3 = g_bytes_new_with_free_func (data, sizeof(data), mark_freed, &freed3); + + { + g_autolist(GBytes) l = NULL; + + l = g_list_prepend (l, b1); + l = g_list_prepend (l, b3); + } + + /* Only assert if autoptr works */ +#ifdef __GNUC__ + g_assert (freed1); + g_assert (freed3); +#endif + g_assert (!freed2); + + g_bytes_unref (b2); + g_assert (freed2); +} + +static void +test_autoslist (void) +{ + char data[1] = {0}; + gboolean freed1 = FALSE; + gboolean freed2 = FALSE; + gboolean freed3 = FALSE; + GBytes *b1 = g_bytes_new_with_free_func (data, sizeof(data), mark_freed, &freed1); + GBytes *b2 = g_bytes_new_with_free_func (data, sizeof(data), mark_freed, &freed2); + GBytes *b3 = g_bytes_new_with_free_func (data, sizeof(data), mark_freed, &freed3); + + { + g_autoslist(GBytes) l = NULL; + + l = g_slist_prepend (l, b1); + l = g_slist_prepend (l, b3); + } + + /* Only assert if autoptr works */ +#ifdef __GNUC__ + g_assert (freed1); + g_assert (freed3); +#endif + g_assert (!freed2); + + g_bytes_unref (b2); + g_assert (freed2); +} + int main (int argc, gchar *argv[]) { @@ -462,6 +527,8 @@ main (int argc, gchar *argv[]) g_test_add_func ("/autoptr/g_variant_dict", test_g_variant_dict); g_test_add_func ("/autoptr/g_variant_type", test_g_variant_type); g_test_add_func ("/autoptr/strv", test_strv); + g_test_add_func ("/autoptr/autolist", test_autolist); + g_test_add_func ("/autoptr/autoslist", test_autoslist); return g_test_run (); } diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c index f13b9def5..296a1e905 100644 --- a/glib/tests/gdatetime.c +++ b/glib/tests/gdatetime.c @@ -1415,14 +1415,13 @@ test_non_utf8_printf (void) setlocale (LC_ALL, "ja_JP.eucjp"); if (strstr (setlocale (LC_ALL, NULL), "ja_JP") == NULL) { - g_test_message ("locale ja_JP.eucjp not available, skipping non-UTF8 tests"); + g_test_skip ("locale ja_JP.eucjp not available, skipping non-UTF8 tests"); g_free (oldlocale); return; } if (g_get_charset (NULL)) { - g_test_message ("locale ja_JP.eucjp may be available, but glib seems to think that it's equivalent to UTF-8, skipping non-UTF-8 tests."); - g_test_message ("This is a known issue on Darwin"); + g_test_skip ("locale ja_JP.eucjp may be available, but glib seems to think that it's equivalent to UTF-8, skipping non-UTF-8 tests. This is a known issue on Darwin"); setlocale (LC_ALL, oldlocale); g_free (oldlocale); return; @@ -1545,7 +1544,7 @@ test_modifiers (void) TEST_PRINTF_DATE (2011, 7, 1, "%_Om", " \333\267"); /* ' 7' */ } else - g_test_message ("locale fa_IR not available, skipping O modifier tests"); + g_test_skip ("locale fa_IR not available, skipping O modifier tests"); setlocale (LC_ALL, oldlocale); g_free (oldlocale); } @@ -1819,6 +1818,27 @@ test_strftime (void) } #pragma GCC diagnostic pop +/* Check that g_date_time_format() correctly returns %NULL for format + * placeholders which are not supported in the current locale. */ +static void +test_GDateTime_strftime_error_handling (void) +{ + gchar *oldlocale; + + oldlocale = g_strdup (setlocale (LC_ALL, NULL)); + setlocale (LC_ALL, "de_DE.utf-8"); + if (strstr (setlocale (LC_ALL, NULL), "de_DE") != NULL) + { + /* de_DE doesn’t ever write time in 12-hour notation, so %r is + * unsupported for it. */ + TEST_PRINTF_TIME (23, 0, 0, "%r", NULL); + } + else + g_test_skip ("locale de_DE not available, skipping error handling tests"); + setlocale (LC_ALL, oldlocale); + g_free (oldlocale); +} + static void test_find_interval (void) { @@ -2083,6 +2103,21 @@ test_posix_parse (void) g_time_zone_unref (tz); } +static void +test_GDateTime_floating_point (void) +{ + GDateTime *dt; + GTimeZone *tz; + + g_test_bug ("697715"); + + tz = g_time_zone_new ("-03:00"); + dt = g_date_time_new (tz, 2010, 5, 24, 8, 0, 1.000001); + g_time_zone_unref (tz); + g_assert_cmpint (g_date_time_get_microsecond (dt), ==, 1); + g_date_time_unref (dt); +} + gint main (gint argc, gchar *argv[]) @@ -2127,6 +2162,7 @@ main (gint argc, g_test_add_func ("/GDateTime/printf", test_GDateTime_printf); g_test_add_func ("/GDateTime/non_utf8_printf", test_non_utf8_printf); g_test_add_func ("/GDateTime/strftime", test_strftime); + g_test_add_func ("/GDateTime/strftime/error_handling", test_GDateTime_strftime_error_handling); g_test_add_func ("/GDateTime/modifiers", test_modifiers); g_test_add_func ("/GDateTime/to_local", test_GDateTime_to_local); g_test_add_func ("/GDateTime/to_unix", test_GDateTime_to_unix); @@ -2140,6 +2176,7 @@ main (gint argc, g_test_add_func ("/GTimeZone/adjust-time", test_adjust_time); g_test_add_func ("/GTimeZone/no-header", test_no_header); g_test_add_func ("/GTimeZone/posix-parse", test_posix_parse); + g_test_add_func ("/GTimeZone/floating-point", test_GDateTime_floating_point); return g_test_run (); } diff --git a/glib/tests/list.c b/glib/tests/list.c index a53e3265a..1b5d6cadf 100644 --- a/glib/tests/list.c +++ b/glib/tests/list.c @@ -69,6 +69,38 @@ test_list_sort_with_data (void) g_list_free (list); } +/* Test that the sort is stable. */ +static void +test_list_sort_stable (void) +{ + GList *list = NULL; /* (element-type utf8) */ + GList *copy = NULL; /* (element-type utf8) */ + gsize i; + + /* Build a test list, already ordered. */ + for (i = 0; i < SIZE; i++) + list = g_list_append (list, g_strdup_printf ("%" G_GSIZE_FORMAT, i / 5)); + + /* Take a copy and sort it. */ + copy = g_list_copy (list); + copy = g_list_sort (copy, (GCompareFunc) g_strcmp0); + + /* Compare the two lists, checking pointers are equal to ensure the elements + * have been kept stable. */ + for (i = 0; i < SIZE; i++) + { + gpointer p1, p2; + + p1 = g_list_nth_data (list, i); + p2 = g_list_nth_data (list, i); + + g_assert (p1 == p2); + } + + g_list_free (copy); + g_list_free_full (list, g_free); +} + static void test_list_insert_sorted (void) { @@ -529,6 +561,7 @@ main (int argc, char *argv[]) g_test_add_func ("/list/sort", test_list_sort); g_test_add_func ("/list/sort-with-data", test_list_sort_with_data); + g_test_add_func ("/list/sort/stable", test_list_sort_stable); g_test_add_func ("/list/insert-sorted", test_list_insert_sorted); g_test_add_func ("/list/insert-sorted-with-data", test_list_insert_sorted_with_data); g_test_add_func ("/list/reverse", test_list_reverse); diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c index ccaea345c..828a4f38a 100644 --- a/glib/tests/mappedfile.c +++ b/glib/tests/mappedfile.c @@ -85,7 +85,7 @@ test_writable (void) const gchar *new = "abcdefghijklmnopqrstuvxyz"; gchar *tmp_copy_path; - tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL); + tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL); g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error); g_assert_no_error (error); @@ -129,7 +129,7 @@ test_writable_fd (void) int fd; gchar *tmp_copy_path; - tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL); + tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL); g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error); g_assert_no_error (error); diff --git a/glib/tests/slist.c b/glib/tests/slist.c index beb476765..1f817432c 100644 --- a/glib/tests/slist.c +++ b/glib/tests/slist.c @@ -68,6 +68,38 @@ test_slist_sort_with_data (void) g_slist_free (slist); } +/* Test that the sort is stable. */ +static void +test_slist_sort_stable (void) +{ + GSList *list = NULL; /* (element-type utf8) */ + GSList *copy = NULL; /* (element-type utf8) */ + gsize i; + + /* Build a test list, already ordered. */ + for (i = 0; i < SIZE; i++) + list = g_slist_append (list, g_strdup_printf ("%" G_GSIZE_FORMAT, i / 5)); + + /* Take a copy and sort it. */ + copy = g_slist_copy (list); + copy = g_slist_sort (copy, (GCompareFunc) g_strcmp0); + + /* Compare the two lists, checking pointers are equal to ensure the elements + * have been kept stable. */ + for (i = 0; i < SIZE; i++) + { + gpointer p1, p2; + + p1 = g_slist_nth_data (list, i); + p2 = g_slist_nth_data (list, i); + + g_assert (p1 == p2); + } + + g_slist_free (copy); + g_slist_free_full (list, g_free); +} + static void test_slist_insert_sorted (void) { @@ -409,6 +441,7 @@ main (int argc, char *argv[]) g_test_add_func ("/slist/sort", test_slist_sort); g_test_add_func ("/slist/sort-with-data", test_slist_sort_with_data); + g_test_add_func ("/slist/sort/stable", test_slist_sort_stable); g_test_add_func ("/slist/insert-sorted", test_slist_insert_sorted); g_test_add_func ("/slist/insert-sorted-with-data", test_slist_insert_sorted_with_data); g_test_add_func ("/slist/reverse", test_slist_reverse); diff --git a/gmodule/gmodule.rc.in b/gmodule/gmodule.rc.in index 0def0a92f..c3d762da9 100644 --- a/gmodule/gmodule.rc.in +++ b/gmodule/gmodule.rc.in @@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "GModule" VALUE "FileVersion", "@GLIB_VERSION@.0" VALUE "InternalName", "libgmodule-2.0-@LT_CURRENT_MINUS_AGE@" - VALUE "LegalCopyright", "Copyright 1998-2011 Tim Janik and others." + VALUE "LegalCopyright", "Copyright 1998-2011 Tim Janik and others." VALUE "OriginalFilename", "libgmodule-2.0-@LT_CURRENT_MINUS_AGE@.dll" VALUE "ProductName", "GLib" VALUE "ProductVersion", "@GLIB_VERSION@" diff --git a/gmodule/meson.build b/gmodule/meson.build index 191bca244..03c689e3a 100644 --- a/gmodule/meson.build +++ b/gmodule/meson.build @@ -84,8 +84,19 @@ gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in', install_headers(['gmodule.h'], subdir : 'glib-2.0') -libgmodule = shared_library('gmodule-2.0', - sources : ['gmodule.c'], +gmodule_sources = ['gmodule.c'] +if host_system == 'windows' + gmodule_win_rc = configure_file( + input: 'gmodule.rc.in', + output: 'gmodule.rc', + configuration: glibconfig_conf, + ) + gmodule_win_res = windows.compile_resources(gmodule_win_rc) + gmodule_sources += [gmodule_win_res] +endif + +libgmodule = library('gmodule-2.0', + sources : gmodule_sources, version : library_version, soversion : soversion, install : true, diff --git a/gobject/gbinding.c b/gobject/gbinding.c index f92fad826..899dc84fd 100644 --- a/gobject/gbinding.c +++ b/gobject/gbinding.c @@ -781,8 +781,8 @@ g_binding_unbind (GBinding *binding) * from the @target to the @source, or %NULL to use the default * @user_data: custom data to be passed to the transformation functions, * or %NULL - * @notify: function to be called when disposing the binding, to free the - * resources used by the transformation functions + * @notify: (nullable): a function to call when disposing the binding, to free + * resources used by the transformation functions, or %NULL if not required * * Complete version of g_object_bind_property(). * diff --git a/gobject/gclosure.c b/gobject/gclosure.c index 4d3031cd2..caa11549c 100644 --- a/gobject/gclosure.c +++ b/gobject/gclosure.c @@ -52,8 +52,8 @@ * to a function and maybe a data argument, and the marshaller * converts between #GValue and native C types. The GObject * library provides the #GCClosure type for this purpose. Bindings for - * other languages need marshallers which convert between #GValue<!-- - * -->s and suitable representations in the runtime of the language in + * other languages need marshallers which convert between #GValues + * and suitable representations in the runtime of the language in * order to use functions written in that languages as callbacks. * * Within GObject, closures play an important role in the diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in index 2560f9fb2..3656bf93c 100755 --- a/gobject/glib-genmarshal.in +++ b/gobject/glib-genmarshal.in @@ -1034,19 +1034,20 @@ if __name__ == '__main__': elif args.body: if args.verbose: print_info('Generating definition for {}'.format(line.strip())) - if compatibility_mode: - generate_std_alias = False - if args.stdinc: - std_marshaller = generate_marshaller_name(STD_PREFIX, retval, params) - if std_marshaller in GOBJECT_MARSHALLERS: - if args.verbose: - print_info('Skipping default marshaller {}'.format(line.strip())) - generate_std_alias = True + generate_std_alias = False + if args.stdinc: + std_marshaller = generate_marshaller_name(STD_PREFIX, retval, params) + if std_marshaller in GOBJECT_MARSHALLERS: + if args.verbose: + print_info('Skipping default marshaller {}'.format(line.strip())) + generate_std_alias = True marshaller = generate_marshaller_name(args.prefix, retval, params) - if compatibility_mode and generate_std_alias: - generate_marshaller_alias(args.output, marshaller, std_marshaller, - source_location=location, - include_va=args.valist_marshallers) + if generate_std_alias: + # We need to generate the alias if we are in compatibility mode + if compatibility_mode: + generate_marshaller_alias(args.output, marshaller, std_marshaller, + source_location=location, + include_va=args.valist_marshallers) else: generate_marshallers_body(args.output, retval, params, prefix=args.prefix, diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in index e8124b8f3..d551cdcf4 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -26,14 +26,6 @@ the GNU General Public License which can be found in the GLib source package. Sources, examples and contact information are available at http://www.gtk.org''' -# Python 2 defaults to ASCII in case stdout is redirected. -# This should make it match Python 3, which uses the locale encoding. -if sys.stdout.encoding is None: - output_stream = codecs.getwriter( - locale.getpreferredencoding())(sys.stdout) -else: - output_stream = sys.stdout - # pylint: disable=too-few-public-methods class Color: '''ANSI Terminal colors''' @@ -81,6 +73,29 @@ def write_output(output): global output_stream print(output, file=output_stream) + +# Python 2 defaults to ASCII in case stdout is redirected. +# This should make it match Python 3, which uses the locale encoding. +if sys.stdout.encoding is None: + output_stream = codecs.getwriter( + locale.getpreferredencoding())(sys.stdout) +else: + output_stream = sys.stdout + + +# Some source files aren't UTF-8 and the old perl version didn't care. +# Replace invalid data with a replacement character to keep things working. +# https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20 +def replace_and_warn(err): + # 7 characters of context either side of the offending character + print_warning('UnicodeWarning: {} at {} ({})'.format( + err.reason, err.start, + err.object[err.start - 7:err.end + 7])) + return ('?', err.end) + +codecs.register_error('replace_and_warn', replace_and_warn) + + # glib-mkenums.py # Information about the current enumeration flags = None # Is enumeration a bitmask? @@ -157,7 +172,8 @@ def parse_entries(file, file_name): m = re.match(r'\#include\s*<([^>]*)>', line) if m: newfilename = os.path.join("..", m.group(1)) - newfile = io.open(newfilename, encoding="utf-8") + newfile = io.open(newfilename, encoding="utf-8", + errors="replace_and_warn") if not parse_entries(newfile, newfilename): return False @@ -253,7 +269,7 @@ def read_template_file(file): } in_ = 'junk' - ifile = io.open(file, encoding="utf-8") + ifile = io.open(file, encoding="utf-8", errors="replace_and_warn") for line in ifile: m = re.match(r'\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\/', line) if m: @@ -413,7 +429,8 @@ def process_file(curfilename): firstenum = True try: - curfile = io.open(curfilename, encoding="utf-8") + curfile = io.open(curfilename, encoding="utf-8", + errors="replace_and_warn") except IOError as e: if e.errno == errno.ENOENT: print_warning('No file "{}" found.'.format(curfilename)) diff --git a/gobject/gobject.c b/gobject/gobject.c index 99f6ec998..d03d39fe2 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -2980,12 +2980,15 @@ g_object_is_floating (gpointer _object) * count unchanged. If the object is not floating, then this call * adds a new normal reference increasing the reference count by one. * + * Since GLib 2.56, the type of @object will be propagated to the return type + * under the same conditions as for g_object_ref(). + * * Since: 2.10 * * Returns: (type GObject.Object) (transfer none): @object */ gpointer -g_object_ref_sink (gpointer _object) +(g_object_ref_sink) (gpointer _object) { GObject *object = _object; gboolean was_floating; @@ -3185,10 +3188,15 @@ g_object_remove_toggle_ref (GObject *object, * * Increases the reference count of @object. * + * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type + * of @object will be propagated to the return type (using the GCC typeof() + * extension), so any casting the caller needs to do on the return type must be + * explicit. + * * Returns: (type GObject.Object) (transfer none): the same @object */ gpointer -g_object_ref (gpointer _object) +(g_object_ref) (gpointer _object) { GObject *object = _object; gint old_val; diff --git a/gobject/gobject.h b/gobject/gobject.h index b97dfb278..9830663ce 100644 --- a/gobject/gobject.h +++ b/gobject/gobject.h @@ -287,9 +287,8 @@ struct _GObject * * The class structure for the GObject type. * - * <example> - * <title>Implementing singletons using a constructor</title> - * <programlisting> + * |[<!-- language="C" --> + * // Example of implementing a singleton using a constructor. * static MySingleton *the_singleton = NULL; * * static GObject* @@ -311,7 +310,7 @@ struct _GObject * * return object; * } - * </programlisting></example> + * ]| */ struct _GObjectClass { @@ -508,6 +507,12 @@ GLIB_AVAILABLE_IN_ALL void g_object_remove_weak_pointer (GObject *object, gpointer *weak_pointer_location); +#if defined(__GNUC__) && !defined(__cplusplus) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 +/* Make reference APIs type safe with macros */ +#define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj)) +#define g_object_ref_sink(Obj) ((__typeof__(Obj)) (g_object_ref_sink) (Obj)) +#endif + /** * GToggleNotify: * @data: Callback data passed to g_object_add_toggle_ref() @@ -733,6 +738,108 @@ static inline gboolean (g_set_object) ((GObject **) (object_ptr), (GObject *) (new_object)) \ ) +/** + * g_clear_weak_pointer: (skip) + * @weak_pointer_location: The memory address of a pointer + * + * Clears a weak reference to a #GObject. + * + * @weak_pointer_location must not be %NULL. + * + * If the weak reference is %NULL then this function does nothing. + * Otherwise, the weak reference to the object is removed for that location + * and the pointer is set to %NULL. + * + * A macro is also included that allows this function to be used without + * pointer casts. The function itself is static inline, so its address may vary + * between compilation units. + * + * Since: 2.56 + */ +static inline void +(g_clear_weak_pointer) (gpointer *weak_pointer_location) +{ + GObject *object = (GObject *) *weak_pointer_location; + + if (object != NULL) + { + g_object_remove_weak_pointer (object, weak_pointer_location); + *weak_pointer_location = NULL; + } +} + +#define g_clear_weak_pointer(weak_pointer_location) \ + (/* Check types match. */ \ + (g_clear_weak_pointer) ((gpointer *) (weak_pointer_location)) \ + ) + +/** + * g_set_weak_pointer: (skip) + * @weak_pointer_location: the memory address of a pointer + * @new_object: (nullable) (transfer none): a pointer to the new #GObject to + * assign to it, or %NULL to clear the pointer + * + * Updates a pointer to weakly refer to @new_object. It assigns @new_object + * to @weak_pointer_location and ensures that @weak_pointer_location will + * automaticaly be set to %NULL if @new_object gets destroyed. The assignment + * is not atomic. The weak reference is not thread-safe, see + * g_object_add_weak_pointer() for details. + * + * @weak_pointer_location must not be %NULL. + * + * A macro is also included that allows this function to be used without + * pointer casts. The function itself is static inline, so its address may vary + * between compilation units. + * + * One convenient usage of this function is in implementing property setters: + * |[ + * void + * foo_set_bar (Foo *foo, + * Bar *new_bar) + * { + * g_return_if_fail (IS_FOO (foo)); + * g_return_if_fail (new_bar == NULL || IS_BAR (new_bar)); + * + * if (g_set_weak_pointer (&foo->bar, new_bar)) + * g_object_notify (foo, "bar"); + * } + * ]| + * + * Returns: %TRUE if the value of @weak_pointer_location changed, %FALSE otherwise + * + * Since: 2.56 + */ +static inline gboolean +(g_set_weak_pointer) (gpointer *weak_pointer_location, + GObject *new_object) +{ + GObject *old_object = (GObject *) *weak_pointer_location; + + /* elide a (weak_pointer_location != NULL) check because most of the time we + * will be operating on struct members with a constant offset, so a NULL + * check would not catch bugs + */ + + if (old_object == new_object) + return FALSE; + + if (old_object != NULL) + g_object_remove_weak_pointer (old_object, weak_pointer_location); + + *weak_pointer_location = new_object; + + if (new_object != NULL) + g_object_add_weak_pointer (new_object, weak_pointer_location); + + return TRUE; +} + +#define g_set_weak_pointer(weak_pointer_location, new_object) \ + (/* Check types match. */ \ + 0 ? *(weak_pointer_location) = (new_object), FALSE : \ + (g_set_weak_pointer) ((gpointer *) (weak_pointer_location), (GObject *) (new_object)) \ + ) + typedef struct { /*<private>*/ union { gpointer p; } priv; diff --git a/gobject/gobject.rc.in b/gobject/gobject.rc.in index a453d3d61..1c73e934b 100644 --- a/gobject/gobject.rc.in +++ b/gobject/gobject.rc.in @@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "GObject" VALUE "FileVersion", "@GLIB_VERSION@.0" VALUE "InternalName", "libgobject-2.0-@LT_CURRENT_MINUS_AGE@" - VALUE "LegalCopyright", "Copyright 1998-2011 Tim Janik, Red Hat, Inc. and others" + VALUE "LegalCopyright", "Copyright 1998-2011 Tim Janik, Red Hat, Inc. and others" VALUE "OriginalFilename", "libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll" VALUE "ProductName", "GLib" VALUE "ProductVersion", "@GLIB_VERSION@" diff --git a/gobject/gsourceclosure.c b/gobject/gsourceclosure.c index 8ee0266c5..3a1a1238a 100644 --- a/gobject/gsourceclosure.c +++ b/gobject/gsourceclosure.c @@ -258,7 +258,7 @@ g_source_set_closure (GSource *source, source->source_funcs != &g_timeout_funcs && source->source_funcs != &g_idle_funcs) { - g_critical (G_STRLOC ": closure can not be set on closure without GSourceFuncs::closure_callback\n"); + g_critical (G_STRLOC ": closure cannot be set on GSource without GSourceFuncs::closure_callback\n"); return; } diff --git a/gobject/gtype.c b/gobject/gtype.c index b0f12f6c3..275a8b60b 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -4193,14 +4193,14 @@ g_type_check_is_value_type (GType type) } gboolean -g_type_check_value (GValue *value) +g_type_check_value (const GValue *value) { return value && type_check_is_value_type_U (value->g_type); } gboolean -g_type_check_value_holds (GValue *value, - GType type) +g_type_check_value_holds (const GValue *value, + GType type) { return value && type_check_is_value_type_U (value->g_type) && g_type_is_a (value->g_type, type); } diff --git a/gobject/gtype.h b/gobject/gtype.h index 89c1bec16..f771c07ef 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -2202,9 +2202,9 @@ gboolean g_type_check_class_is_a (GTypeClass *g_class, GLIB_AVAILABLE_IN_ALL gboolean g_type_check_is_value_type (GType type) G_GNUC_CONST; GLIB_AVAILABLE_IN_ALL -gboolean g_type_check_value (GValue *value) G_GNUC_PURE; +gboolean g_type_check_value (const GValue *value) G_GNUC_PURE; GLIB_AVAILABLE_IN_ALL -gboolean g_type_check_value_holds (GValue *value, +gboolean g_type_check_value_holds (const GValue *value, GType type) G_GNUC_PURE; GLIB_AVAILABLE_IN_ALL gboolean g_type_test_flags (GType type, @@ -2255,7 +2255,7 @@ const gchar * g_type_name_from_class (GTypeClass *g_class); __r; \ })) # define _G_TYPE_CVH(vl, gt) (G_GNUC_EXTENSION ({ \ - GValue *__val = (GValue*) vl; GType __t = gt; gboolean __r; \ + const GValue *__val = (const GValue*) vl; GType __t = gt; gboolean __r; \ if (!__val) \ __r = FALSE; \ else if (__val->g_type == __t) \ @@ -2267,7 +2267,7 @@ const gchar * g_type_name_from_class (GTypeClass *g_class); #else /* !__GNUC__ */ # define _G_TYPE_CIT(ip, gt) (g_type_check_instance_is_a ((GTypeInstance*) ip, gt)) # define _G_TYPE_CCT(cp, gt) (g_type_check_class_is_a ((GTypeClass*) cp, gt)) -# define _G_TYPE_CVH(vl, gt) (g_type_check_value_holds ((GValue*) vl, gt)) +# define _G_TYPE_CVH(vl, gt) (g_type_check_value_holds ((const GValue*) vl, gt)) #endif /* !__GNUC__ */ /** * G_TYPE_FLAG_RESERVED_ID_BIT: diff --git a/gobject/gtypemodule.c b/gobject/gtypemodule.c index 5289ffeb4..c67f789b1 100644 --- a/gobject/gtypemodule.c +++ b/gobject/gtypemodule.c @@ -344,7 +344,7 @@ g_type_module_complete_interface_info (GTypePlugin *plugin, /** * g_type_module_register_type: - * @module: a #GTypeModule + * @module: (nullable): a #GTypeModule * @parent_type: the type for the parent class * @type_name: name for the type * @type_info: type information structure @@ -362,6 +362,9 @@ g_type_module_complete_interface_info (GTypePlugin *plugin, * As long as any instances of the type exist, the type plugin will * not be unloaded. * + * Since 2.56 if @module is %NULL this will call g_type_register_static() + * instead. This can be used when making a static build of the module. + * * Returns: the new or existing type ID */ GType @@ -374,10 +377,22 @@ g_type_module_register_type (GTypeModule *module, ModuleTypeInfo *module_type_info = NULL; GType type; - g_return_val_if_fail (module != NULL, 0); g_return_val_if_fail (type_name != NULL, 0); g_return_val_if_fail (type_info != NULL, 0); + if (module == NULL) + { + /* Cannot pass type_info directly to g_type_register_static() here because + * it has class_finalize != NULL and that's forbidden for static types */ + return g_type_register_static_simple (parent_type, + type_name, + type_info->class_size, + type_info->class_init, + type_info->instance_size, + type_info->instance_init, + flags); + } + type = g_type_from_name (type_name); if (type) { @@ -429,7 +444,7 @@ g_type_module_register_type (GTypeModule *module, /** * g_type_module_add_interface: - * @module: a #GTypeModule + * @module: (nullable): a #GTypeModule * @instance_type: type to which to add the interface. * @interface_type: interface type to add * @interface_info: type information structure @@ -440,6 +455,9 @@ g_type_module_register_type (GTypeModule *module, * * As long as any instances of the type exist, the type plugin will * not be unloaded. + * + * Since 2.56 if @module is %NULL this will call g_type_add_interface_static() + * instead. This can be used when making a static build of the module. */ void g_type_module_add_interface (GTypeModule *module, @@ -448,10 +466,15 @@ g_type_module_add_interface (GTypeModule *module, const GInterfaceInfo *interface_info) { ModuleInterfaceInfo *module_interface_info = NULL; - - g_return_if_fail (module != NULL); + g_return_if_fail (interface_info != NULL); + if (module == NULL) + { + g_type_add_interface_static (instance_type, interface_type, interface_info); + return; + } + if (g_type_is_a (instance_type, interface_type)) { GTypePlugin *old_plugin = g_type_interface_get_plugin (instance_type, @@ -492,7 +515,7 @@ g_type_module_add_interface (GTypeModule *module, /** * g_type_module_register_enum: - * @module: a #GTypeModule + * @module: (nullable): a #GTypeModule * @name: name for the type * @const_static_values: an array of #GEnumValue structs for the * possible enumeration values. The array is @@ -507,6 +530,9 @@ g_type_module_add_interface (GTypeModule *module, * As long as any instances of the type exist, the type plugin will * not be unloaded. * + * Since 2.56 if @module is %NULL this will call g_type_register_static() + * instead. This can be used when making a static build of the module. + * * Since: 2.6 * * Returns: the new or existing type ID @@ -518,7 +544,7 @@ g_type_module_register_enum (GTypeModule *module, { GTypeInfo enum_type_info = { 0, }; - g_return_val_if_fail (G_IS_TYPE_MODULE (module), 0); + g_return_val_if_fail (module == NULL || G_IS_TYPE_MODULE (module), 0); g_return_val_if_fail (name != NULL, 0); g_return_val_if_fail (const_static_values != NULL, 0); @@ -531,7 +557,7 @@ g_type_module_register_enum (GTypeModule *module, /** * g_type_module_register_flags: - * @module: a #GTypeModule + * @module: (nullable): a #GTypeModule * @name: name for the type * @const_static_values: an array of #GFlagsValue structs for the * possible flags values. The array is @@ -546,6 +572,9 @@ g_type_module_register_enum (GTypeModule *module, * As long as any instances of the type exist, the type plugin will * not be unloaded. * + * Since 2.56 if @module is %NULL this will call g_type_register_static() + * instead. This can be used when making a static build of the module. + * * Since: 2.6 * * Returns: the new or existing type ID @@ -557,7 +586,7 @@ g_type_module_register_flags (GTypeModule *module, { GTypeInfo flags_type_info = { 0, }; - g_return_val_if_fail (G_IS_TYPE_MODULE (module), 0); + g_return_val_if_fail (module == NULL || G_IS_TYPE_MODULE (module), 0); g_return_val_if_fail (name != NULL, 0); g_return_val_if_fail (const_static_values != NULL, 0); diff --git a/gobject/gvaluetypes.c b/gobject/gvaluetypes.c index 0afa8bdb8..4cc778be3 100644 --- a/gobject/gvaluetypes.c +++ b/gobject/gvaluetypes.c @@ -1281,7 +1281,7 @@ g_value_take_variant (GValue *value, * * Get the contents of a variant #GValue. * - * Returns: variant contents of @value + * Returns: (nullable): variant contents of @value (may be %NULL) * * Since: 2.26 */ @@ -1297,10 +1297,11 @@ g_value_get_variant (const GValue *value) * g_value_dup_variant: * @value: a valid #GValue of type %G_TYPE_VARIANT * - * Get the contents of a variant #GValue, increasing its refcount. + * Get the contents of a variant #GValue, increasing its refcount. The returned + * #GVariant is never floating. * - * Returns: variant contents of @value, should be unrefed using - * g_variant_unref() when no longer needed + * Returns: (transfer full) (nullable): variant contents of @value (may be %NULL); + * should be unreffed using g_variant_unref() when no longer needed * * Since: 2.26 */ diff --git a/gobject/meson.build b/gobject/meson.build index 4a392c29d..f58cfb297 100644 --- a/gobject/meson.build +++ b/gobject/meson.build @@ -1,4 +1,4 @@ -gobject_install_headers = files([ +gobject_install_headers = files( 'gobject-autocleanups.h', 'glib-types.h', 'gbinding.h', @@ -19,11 +19,10 @@ gobject_install_headers = files([ 'gvaluecollector.h', 'gvaluetypes.h', 'gobjectnotifyqueue.c', # sic -]) +) install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject') -gobject_c_sources = [ -# 'gobject_probes.d', +gobject_sources = files( 'gatomicarray.c', 'gbinding.c', 'gboxed.c', @@ -31,7 +30,6 @@ gobject_c_sources = [ 'genums.c', 'gmarshal.c', 'gobject.c', - 'gobject_trace.h', 'gparam.c', 'gparamspecs.c', 'gsignal.c', @@ -43,7 +41,17 @@ gobject_c_sources = [ 'gvaluearray.c', 'gvaluetransform.c', 'gvaluetypes.c', -] +) + +if host_system == 'windows' + gobject_win_rc = configure_file( + input: 'gobject.rc.in', + output: 'gobject.rc', + configuration: glibconfig_conf, + ) + gobject_win_res = windows.compile_resources(gobject_win_rc) + gobject_sources += [gobject_win_res] +endif if enable_dtrace gobject_dtrace_obj = dtrace_obj_gen.process('gobject_probes.d') @@ -53,9 +61,9 @@ else gobject_dtrace_hdr = [] endif -libgobject = shared_library('gobject-2.0', +libgobject = library('gobject-2.0', gobject_dtrace_obj, gobject_dtrace_hdr, - sources : [gobject_c_sources], + sources : gobject_sources, version : library_version, soversion : soversion, install : true, diff --git a/gobject/tests/reference.c b/gobject/tests/reference.c index aefa1e894..e3f86315c 100644 --- a/gobject/tests/reference.c +++ b/gobject/tests/reference.c @@ -313,6 +313,108 @@ test_weak_pointer (void) g_assert (weak2 == obj); } +static void +test_weak_pointer_clear (void) +{ + GObject *obj; + gpointer weak = NULL; + + g_clear_weak_pointer (&weak); + g_assert_null (weak); + + weak = obj = g_object_new (G_TYPE_OBJECT, NULL); + g_assert_cmpint (obj->ref_count, ==, 1); + + g_object_add_weak_pointer (obj, &weak); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_true (weak == obj); + + g_clear_weak_pointer (&weak); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_null (weak); + + g_object_unref (obj); +} + +static void +test_weak_pointer_clear_function (void) +{ + GObject *obj; + gpointer weak = NULL; + + (g_clear_weak_pointer) (&weak); + g_assert_null (weak); + + weak = obj = g_object_new (G_TYPE_OBJECT, NULL); + g_assert_cmpint (obj->ref_count, ==, 1); + + g_object_add_weak_pointer (obj, &weak); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_true (weak == obj); + + (g_clear_weak_pointer) (&weak); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_null (weak); + + g_object_unref (obj); +} + +static void +test_weak_pointer_set (void) +{ + GObject *obj; + gpointer weak = NULL; + + g_assert_false (g_set_weak_pointer (&weak, NULL)); + g_assert_null (weak); + + obj = g_object_new (G_TYPE_OBJECT, NULL); + g_assert_cmpint (obj->ref_count, ==, 1); + + g_assert_true (g_set_weak_pointer (&weak, obj)); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_true (weak == obj); + + g_assert_true (g_set_weak_pointer (&weak, NULL)); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_null (weak); + + g_assert_true (g_set_weak_pointer (&weak, obj)); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_true (weak == obj); + + g_object_unref (obj); + g_assert_null (weak); +} + +static void +test_weak_pointer_set_function (void) +{ + GObject *obj; + gpointer weak = NULL; + + g_assert_false ((g_set_weak_pointer) (&weak, NULL)); + g_assert_null (weak); + + obj = g_object_new (G_TYPE_OBJECT, NULL); + g_assert_cmpint (obj->ref_count, ==, 1); + + g_assert_true ((g_set_weak_pointer) (&weak, obj)); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_true (weak == obj); + + g_assert_true ((g_set_weak_pointer) (&weak, NULL)); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_null (weak); + + g_assert_true ((g_set_weak_pointer) (&weak, obj)); + g_assert_cmpint (obj->ref_count, ==, 1); + g_assert_true (weak == obj); + + g_object_unref (obj); + g_assert_null (weak); +} + /* See gobject/tests/threadtests.c for the threaded version */ static void test_weak_ref (void) @@ -667,6 +769,10 @@ main (int argc, char **argv) g_test_add_func ("/object/value", test_object_value); g_test_add_func ("/object/initially-unowned", test_initially_unowned); g_test_add_func ("/object/weak-pointer", test_weak_pointer); + g_test_add_func ("/object/weak-pointer/clear", test_weak_pointer_clear); + g_test_add_func ("/object/weak-pointer/clear-function", test_weak_pointer_clear_function); + g_test_add_func ("/object/weak-pointer/set", test_weak_pointer_set); + g_test_add_func ("/object/weak-pointer/set-function", test_weak_pointer_set_function); g_test_add_func ("/object/weak-ref", test_weak_ref); g_test_add_func ("/object/toggle-ref", test_toggle_ref); g_test_add_func ("/object/qdata", test_object_qdata); diff --git a/gthread/gthread.rc.in b/gthread/gthread.rc.in index a1abc5600..9e45fdff9 100644 --- a/gthread/gthread.rc.in +++ b/gthread/gthread.rc.in @@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "FileDescription", "GThread" VALUE "FileVersion", "@GLIB_VERSION@.0" VALUE "InternalName", "libgthread-2.0-@LT_CURRENT_MINUS_AGE@" - VALUE "LegalCopyright", "Copyright 1995-2011 Peter Mattis, Spencer Kimball, Josh MacDonald, Sebastian Wilhelmi and others." + VALUE "LegalCopyright", "Copyright 1995-2011 Peter Mattis, Spencer Kimball, Josh MacDonald, Sebastian Wilhelmi and others." VALUE "OriginalFilename", "libgthread-2.0-@LT_CURRENT_MINUS_AGE@.dll" VALUE "ProductName", "GLib" VALUE "ProductVersion", "@GLIB_VERSION@" diff --git a/gthread/meson.build b/gthread/meson.build index 8ccac3369..8d4696d29 100644 --- a/gthread/meson.build +++ b/gthread/meson.build @@ -1,7 +1,19 @@ # Just a skeleton lib for backwards compatibility since all the functionaliy # has been moved into glib now -libgthread = shared_library('gthread-2.0', - sources : [ 'gthread-impl.c' ], + +gthread_sources = ['gthread-impl.c'] +if host_system == 'windows' + gthread_win_rc = configure_file( + input: 'gthread.rc.in', + output: 'gthread.rc', + configuration: glibconfig_conf, + ) + gthread_win_res = windows.compile_resources(gthread_win_rc) + gthread_sources += [gthread_win_res] +endif + +libgthread = library('gthread-2.0', + sources : gthread_sources, version : library_version, soversion : soversion, install : true, diff --git a/meson.build b/meson.build index cd9cbf2ce..e35b54d64 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('glib', 'c', 'cpp', - version : '2.55.0', - meson_version : '>= 0.38.1', + version : '2.55.1', + meson_version : '>= 0.44.0', default_options : [ 'warning_level=1', 'c_std=gnu89' @@ -54,12 +54,19 @@ glib_libdir = join_paths(glib_prefix, get_option('libdir')) glib_datadir = join_paths(glib_prefix, get_option('datadir')) glib_pkgdatadir = join_paths(glib_datadir, 'glib-2.0') glib_includedir = join_paths(glib_prefix, get_option('includedir')) -glib_giomodulesdir = join_paths(glib_libdir, 'gio', 'modules') +glib_giomodulesdir = get_option('gio_module_dir') +if glib_giomodulesdir == '' + glib_giomodulesdir = join_paths(glib_libdir, 'gio', 'modules') +endif glib_pkgconfigreldir = join_paths(glib_libdir, 'pkgconfig') add_project_arguments('-D_GNU_SOURCE', language: 'c') +# Disable strict aliasing; +# see https://bugzilla.gnome.org/show_bug.cgi?id=791622 +add_project_arguments('-fno-strict-aliasing', language: 'c') + ######################## # Configuration begins # ######################## @@ -120,6 +127,11 @@ if get_option('default_library') != 'static' endif endif +if host_system == 'windows' and get_option('default_library') == 'static' + glibconfig_conf.set('GLIB_STATIC_COMPILATION', '1') + glibconfig_conf.set('GOBJECT_STATIC_COMPILATION', '1') +endif + # FIXME: what about Cygwin (G_WITH_CYGWIN) if host_system == 'windows' glib_os = '''#define G_OS_WIN32 @@ -459,6 +471,8 @@ if host_system == 'linux' endif endif +platform_ldflags=[] + # Mac OS X Carbon support glib_have_carbon = cc.compiles('''#include <Carbon/Carbon.h> #include <CoreServices/CoreServices.h>''', @@ -469,6 +483,7 @@ glib_have_os_x_9_or_later = false if glib_have_carbon glib_conf.set('HAVE_CARBON', true) CARBON_LIBS='-Wl,-framework,Carbon' # FIXME: propagate to .pc files as well + platform_ldflags += [CARBON_LIBS] glib_have_os_x_9_or_later = cc.compiles('''#include <AvailabilityMacros.h> #if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 #error Compiling for minimum OS X version before 10.9 @@ -487,6 +502,7 @@ glib_have_cocoa = cc.compiles('''#include <Cocoa/Cocoa.h> if glib_have_cocoa glib_conf.set('HAVE_COCOA', true) COCOA_LIBS='-Wl,-framework,Foundation' # FIXME: propagate to .pc files as well + platform_ldflags += [COCOA_LIBS] else COCOA_LIBS='' endif @@ -1066,6 +1082,7 @@ glibconfig_conf.set('g_module_suffix', g_module_suffix) glibconfig_conf.set('GLIB_MAJOR_VERSION', major_version) glibconfig_conf.set('GLIB_MINOR_VERSION', minor_version) glibconfig_conf.set('GLIB_MICRO_VERSION', micro_version) +glibconfig_conf.set('GLIB_VERSION', glib_version) glibconfig_conf.set('glib_void_p', voidp_size) glibconfig_conf.set('glib_long', long_size) @@ -1372,10 +1389,6 @@ endif # Tests for iconv # -# First, we check if the C library provides iconv, then GNU libiconv, then -# a native implementation -# FIXME: add option as well -# # USE_LIBICONV_GNU: Using GNU libiconv # USE_LIBICONV_NATIVE: Using a native impl of iconv in a separate library # @@ -1386,22 +1399,35 @@ endif if host_system == 'windows' libiconv = [] glib_conf.set('USE_LIBICONV_NATIVE', true) -# Check C library; never check MinGW C library -elif cc.has_function('iconv_open') - libiconv = [] -# Check for libiconv -elif cc.has_header_symbol('iconv.h', 'libiconv_open') - glib_conf.set('USE_LIBICONV_GNU', true) - libiconv = [cc.find_library('iconv')] -# Check for a custom iconv implementation -elif cc.has_header_symbol('iconv.h', 'iconv_open') - glib_conf.set('USE_LIBICONV_NATIVE', true) - libiconv = [cc.find_library('iconv')] else - error('No iconv() implementation found in C library or libiconv') + found_iconv = false + iconv_opt = get_option('iconv') + if iconv_opt == 'libc' + if cc.has_function('iconv_open') + libiconv = [] + found_iconv = true + endif + elif iconv_opt == 'gnu' + if cc.has_header_symbol('iconv.h', 'libiconv_open') + glib_conf.set('USE_LIBICONV_GNU', true) + libiconv = [cc.find_library('iconv')] + found_iconv = true + endif + elif iconv_opt == 'native' + if cc.has_header_symbol('iconv.h', 'iconv_open') + glib_conf.set('USE_LIBICONV_NATIVE', true) + libiconv = [cc.find_library('iconv')] + found_iconv = true + endif + endif + + if not found_iconv + error('No iconv() implementation found in C library or libiconv') + endif + endif -if get_option('with-pcre') == 'internal' +if get_option('internal_pcre') pcre = [] use_system_pcre = false else @@ -1488,15 +1514,12 @@ xgettext = find_program('xgettext', required : false) # libmount is only used by gio, but we need to fetch the libs to generate the # pkg-config file below libmount_dep = [] -libmount_opt = get_option('enable-libmount') -if host_system == 'linux' and libmount_opt != 'no' +if host_system == 'linux' and get_option('libmount') libmount_dep = [dependency('mount', version : '>=2.28', required : false)] if not libmount_dep[0].found() - libmount_dep = [cc.find_library('mount', required : false)] - libmount_h = cc.has_header('libmount/libmount.h') - libmount_needed = libmount_opt == 'yes' and host_system == 'linux' - if libmount_needed and (not libmount_dep[0].found() or not libmount_h) - error('Need libmount but couldn\'t find it') + libmount_dep = [cc.find_library('mount', required : true)] + if not cc.has_header('libmount/libmount.h') + error('libmount support needs libmount/libmount.h header') endif endif endif @@ -1505,6 +1528,52 @@ if host_system == 'windows' winsock2 = cc.find_library('ws2_32') endif +selinux_dep = [] +if host_system == 'linux' and get_option('selinux') + selinux_dep = [dependency('libselinux')] + glib_conf.set('SELINUX_LIBS', '-lselinux') + glib_conf.set('HAVE_SELINUX', 1) +endif + +xattr_dep = [] +if host_system != 'windows' and get_option('xattr') + # either glibc or libattr can provide xattr support + # for both of them, we check for getxattr being in + # the library and a valid xattr header. + + # try glibc + if cc.has_function('getxattr') and cc.has_header('sys/xattr.h') + glib_conf.set('HAVE_SYS_XATTR_H', 1) + glib_conf_prefix = glib_conf_prefix + '#define @0@ 1\n'.format('HAVE_SYS_XATTR_H') + #failure. try libattr + elif cc.has_header_symbol('attr/xattr.h', 'getxattr') + glib_conf.set('HAVE_ATTR_XATTR_H', 1) + glib_conf_prefix = glib_conf_prefix + '#define @0@ 1\n'.format('HAVE_ATTR_XATTR_H') + xattr_dep = [cc.find_library('xattr')] + else + error('No getxattr implementation found in C library or libxattr') + endif + + glib_conf.set('HAVE_XATTR', 1) + if cc.compiles(glib_conf_prefix + ''' + #include <stdio.h> + #ifdef HAVE_SYS_TYPES_H + #include <sys/types.h> + #endif + #ifdef HAVE_SYS_XATTR_H + #include <sys/xattr.h> + #elif HAVE_ATTR_XATTR_H + #include <attr/xattr.h> + #endif + + int main (void) { + ssize_t len = getxattr("", "", NULL, 0, 0, XATTR_NOFOLLOW); + }''', + name : 'XATTR_NOFOLLOW') + glib_conf.set('HAVE_XATTR_NOFOLLOW', 1) + endif +endif + python = import('python3').find_python() # Determine which user environment-dependent files that we want to install @@ -1533,17 +1602,17 @@ endif if use_system_pcre glib_conf.set('PCRE_LIBS', '-lpcre') endif -if libmount_dep.length() == 1 and libmount_dep[0].found() +if libmount_dep.length() != 0 glib_conf.set('LIBMOUNT_LIBS', '-lmount') glib_conf.set('HAVE_LIBMOUNT', 1) endif -glib_conf.set('GIO_MODULE_DIR', '${libdir}/gio/modules') +glib_conf.set('GIO_MODULE_DIR', glib_giomodulesdir) # FIXME: Missing: -# @G_MODULE_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@ @G_LIBS_EXTRA@ +# @G_MODULE_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@ @G_LIBS_EXTRA@ # @PCRE_REQUIRES@ @GLIB_EXTRA_CFLAGS@ @G_THREAD_CFLAGS@ # Tracing: dtrace -want_dtrace = get_option('enable-dtrace') +want_dtrace = get_option('dtrace') enable_dtrace = false # Since dtrace support is opt-in we just error out if it was requested but @@ -1570,13 +1639,13 @@ if want_dtrace endif # systemtap -want_systemtap = get_option('enable-systemtap') +want_systemtap = get_option('systemtap') enable_systemtap = false if want_systemtap and enable_dtrace - tapset_install_dir = get_option('tapset-install-dir') + tapset_install_dir = get_option('tapset_install_dir') if tapset_install_dir == '' - tapset_install_dir = join_paths(get_option('datadir'), 'systemtap/tapset') + tapset_install_dir = join_paths(get_option('datadir'), 'systemtap/tapset', host_machine.cpu_family()) endif stp_cdata = configuration_data() stp_cdata.set('ABS_GLIB_RUNTIME_LIBDIR', glib_libdir) @@ -1586,6 +1655,7 @@ if want_systemtap and enable_dtrace endif +windows = import('windows') subdir('glib') subdir('gobject') subdir('gthread') @@ -1652,11 +1722,8 @@ if host_system == 'windows' install_headers([ 'msvc_recommended_pragmas.h' ], subdir : 'glib-2.0') endif -if get_option('with-man') != 'no' - xsltproc = find_program('xsltproc', required : false) - if not xsltproc.found() and get_option('with-man') == 'yes' - error('man pages enabled and xsltproc not found') - endif +if get_option('man') + xsltproc = find_program('xsltproc', required : true) xsltproc_command = [ xsltproc, '--nonet', diff --git a/meson_options.txt b/meson_options.txt index 1811e8bbc..4504c6858 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,10 +1,65 @@ -option('with-docs', type : 'combo', choices : ['auto', 'yes', 'no'], value : 'auto') -option('with-man', type : 'combo', choices : ['auto', 'yes', 'no'], value : 'auto') -option('with-pcre', type : 'combo', choices : ['system', 'internal'], value : 'system') -option('enable-libmount', type : 'combo', choices : ['auto', 'yes', 'no'], value : 'yes') -option('enable-dtrace', type : 'boolean', value : false, - description : 'include tracing support for dtrace') -option('enable-systemtap', type : 'boolean', value : false, - description : 'include tracing support for systemtap') -option('tapset-install-dir', type : 'string', value : '', - description : 'path where systemtap tapsets are installed') +option('runtime_libdir', + type : 'string', + value : '', + description : 'install runtime libraries relative to libdir') + +option('iconv', + type : 'combo', + choices : ['libc', 'gnu', 'native'], + value : 'libc', + description : 'iconv implementation to use (\'libc\' = \'Part of the C stdlib\'; \'gnu\' = \'GNU\'s iconv\'; \'native\' = \'A separate iconv\')') + +option('charsetalias_dir', + type : 'string', + value : '', + description : 'directory for charset.alias dir (default to \'libdir\' if unset)') + +option('gio_module_dir', + type : 'string', + value : '', + description : 'load gio modules from this directory (default to \'libdir/gio/modules\' if unset)') + +option('selinux', + type : 'boolean', + value : true, + description : 'build with selinux support') + +option('xattr', + type : 'boolean', + value : true, + description : 'build with xattr support') + +option('libmount', + type : 'boolean', + value : true, + description : 'build with libmount support') + +option('internal_pcre', + type : 'boolean', + value : false, + description : 'whether to use internal PCRE') + +option('man', + type : 'boolean', + value : false, + description : 'generate man pages (requires xsltproc)') + +option('dtrace', + type : 'boolean', + value : false, + description : 'include tracing support for dtrace') + +option('systemtap', + type : 'boolean', + value : false, + description : 'include tracing support for systemtap') + +option('tapset_install_dir', + type : 'string', + value : '', + description : 'path where systemtap tapsets are installed') + +option('gtk_doc', + type : 'boolean', + value : false, + description : 'use gtk-doc to build documentation') diff --git a/po/README.translators b/po/README.translators deleted file mode 100644 index 984392c58..000000000 --- a/po/README.translators +++ /dev/null @@ -1,25 +0,0 @@ -All the .po files are now in UTF-8! - -For information on editing UTF-8 files on Unix, see -<http://www.cl.cam.ac.uk/~mgk25/unicode.html> - -If you just want to convert it back to your native encoding to -edit and then convert again to UTF-8 to commit, please see the -scripts in gnome-i18n/UTF-8, for example - - export ENCODING_TO=ISO-8859-15 - utftopo fi.po - emacs fi.po - potoutf.sh fi.po - cvs commit fi.po - -Alternatively, you can use the gettext package (>= 0.11) to convert -your translation to and from your native encoding: - -msgconv -t ISO-8859-15 fi.po > fi.native.po -emacs fi.native.po -msgconv -t UTF-8 fi.native.po > fi.po -cvs commit fi.po - -If you need help with this, ask, but please don't commit -non-UTF-8 files here. @@ -13,10 +13,9 @@ msgid "" msgstr "" "Project-Id-Version: glib.HEAD.he\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" -"product=glib&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2017-07-09 20:45+0300\n" -"PO-Revision-Date: 2017-07-09 20:46+0300\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-26 15:37+0200\n" +"PO-Revision-Date: 2017-11-26 15:45+0200\n" "Last-Translator: Yosef Or Boczko <yoseforb@gmail.com>\n" "Language-Team: עברית <>\n" "Language: he\n" @@ -287,8 +286,8 @@ msgid "Truncate not supported on base stream" msgstr "Truncate not supported on base stream" #: ../gio/gcancellable.c:317 ../gio/gdbusconnection.c:1849 -#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:870 -#: ../gio/gsimpleasyncresult.c:896 +#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:871 +#: ../gio/gsimpleasyncresult.c:897 #, c-format msgid "Operation was cancelled" msgstr "Operation was cancelled" @@ -306,31 +305,31 @@ msgid "Not enough space in destination" msgstr "Not enough space in destination" #: ../gio/gcharsetconverter.c:342 ../gio/gdatainputstream.c:848 -#: ../gio/gdatainputstream.c:1257 ../glib/gconvert.c:438 ../glib/gconvert.c:845 -#: ../glib/giochannel.c:1556 ../glib/giochannel.c:1598 -#: ../glib/giochannel.c:2442 ../glib/gutf8.c:866 ../glib/gutf8.c:1319 +#: ../gio/gdatainputstream.c:1257 ../glib/gconvert.c:437 ../glib/gconvert.c:844 +#: ../glib/giochannel.c:1557 ../glib/giochannel.c:1599 +#: ../glib/giochannel.c:2443 ../glib/gutf8.c:866 ../glib/gutf8.c:1319 msgid "Invalid byte sequence in conversion input" msgstr "Invalid byte sequence in conversion input" -#: ../gio/gcharsetconverter.c:347 ../glib/gconvert.c:446 ../glib/gconvert.c:770 -#: ../glib/giochannel.c:1563 ../glib/giochannel.c:2454 +#: ../gio/gcharsetconverter.c:347 ../glib/gconvert.c:445 ../glib/gconvert.c:769 +#: ../glib/giochannel.c:1564 ../glib/giochannel.c:2455 #, c-format msgid "Error during conversion: %s" msgstr "Error during conversion: %s" -#: ../gio/gcharsetconverter.c:444 ../gio/gsocket.c:1095 +#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1101 msgid "Cancellable initialization not supported" msgstr "Cancellable initialization not supported" # *** This file should not be translated to hebrew, please only copy the english text *** # *** Old hebrew ranslation is commented for backup sake *** -#: ../gio/gcharsetconverter.c:454 ../glib/gconvert.c:321 -#: ../glib/giochannel.c:1384 +#: ../gio/gcharsetconverter.c:456 ../glib/gconvert.c:320 +#: ../glib/giochannel.c:1385 #, c-format msgid "Conversion from character set “%s” to “%s” is not supported" msgstr "Conversion from character set “%s” to “%s” is not supported" -#: ../gio/gcharsetconverter.c:458 ../glib/gconvert.c:325 +#: ../gio/gcharsetconverter.c:460 ../glib/gconvert.c:324 #, c-format msgid "Could not open converter from “%s” to “%s”" msgstr "Could not open converter from “%s” to “%s”" @@ -454,65 +453,65 @@ msgstr "Error auto-launching: " msgid "Unknown or unsupported transport “%s” for address “%s”" msgstr "Unknown or unsupported transport “%s” for address “%s”" -#: ../gio/gdbusaddress.c:702 +#: ../gio/gdbusaddress.c:704 #, c-format msgid "Error opening nonce file “%s”: %s" msgstr "Error opening nonce file “%s”: %s" -#: ../gio/gdbusaddress.c:720 +#: ../gio/gdbusaddress.c:723 #, c-format msgid "Error reading from nonce file “%s”: %s" msgstr "Error reading from nonce file “%s”: %s" -#: ../gio/gdbusaddress.c:729 +#: ../gio/gdbusaddress.c:732 #, c-format msgid "Error reading from nonce file “%s”, expected 16 bytes, got %d" msgstr "Error reading from nonce file “%s”, expected 16 bytes, got %d" -#: ../gio/gdbusaddress.c:747 +#: ../gio/gdbusaddress.c:750 #, c-format msgid "Error writing contents of nonce file “%s” to stream:" msgstr "Error writing contents of nonce file “%s” to stream:" -#: ../gio/gdbusaddress.c:956 +#: ../gio/gdbusaddress.c:959 msgid "The given address is empty" msgstr "The given address is empty" -#: ../gio/gdbusaddress.c:1069 +#: ../gio/gdbusaddress.c:1072 #, c-format msgid "Cannot spawn a message bus when setuid" msgstr "Cannot spawn a message bus when setuid" -#: ../gio/gdbusaddress.c:1076 +#: ../gio/gdbusaddress.c:1079 msgid "Cannot spawn a message bus without a machine-id: " msgstr "Cannot spawn a message bus without a machine-id: " -#: ../gio/gdbusaddress.c:1083 +#: ../gio/gdbusaddress.c:1086 #, c-format msgid "Cannot autolaunch D-Bus without X11 $DISPLAY" msgstr "Cannot autolaunch D-Bus without X11 $DISPLAY" -#: ../gio/gdbusaddress.c:1125 +#: ../gio/gdbusaddress.c:1128 #, c-format msgid "Error spawning command line “%s”: " msgstr "Error spawning command line “%s”: " -#: ../gio/gdbusaddress.c:1342 +#: ../gio/gdbusaddress.c:1345 #, c-format msgid "(Type any character to close this window)\n" msgstr "(Type any character to close this window)\n" -#: ../gio/gdbusaddress.c:1496 +#: ../gio/gdbusaddress.c:1499 #, c-format msgid "Session dbus not running, and autolaunch failed" msgstr "Session dbus not running, and autolaunch failed" -#: ../gio/gdbusaddress.c:1507 +#: ../gio/gdbusaddress.c:1510 #, c-format msgid "Cannot determine session bus address (not implemented for this OS)" msgstr "Cannot determine session bus address (not implemented for this OS)" -#: ../gio/gdbusaddress.c:1645 +#: ../gio/gdbusaddress.c:1648 #, c-format msgid "" "Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable " @@ -521,7 +520,7 @@ msgstr "" "Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable " "— unknown value “%s”" -#: ../gio/gdbusaddress.c:1654 ../gio/gdbusconnection.c:7155 +#: ../gio/gdbusaddress.c:1657 ../gio/gdbusconnection.c:7155 msgid "" "Cannot determine bus address because the DBUS_STARTER_BUS_TYPE environment " "variable is not set" @@ -529,7 +528,7 @@ msgstr "" "Cannot determine bus address because the DBUS_STARTER_BUS_TYPE environment " "variable is not set" -#: ../gio/gdbusaddress.c:1664 +#: ../gio/gdbusaddress.c:1667 #, c-format msgid "Unknown bus type %d" msgstr "Unknown bus type %d" @@ -549,45 +548,45 @@ msgid "" msgstr "" "Exhausted all available authentication mechanisms (tried: %s) (available: %s)" -#: ../gio/gdbusauth.c:1174 +#: ../gio/gdbusauth.c:1171 msgid "Cancelled via GDBusAuthObserver::authorize-authenticated-peer" msgstr "Cancelled via GDBusAuthObserver::authorize-authenticated-peer" -#: ../gio/gdbusauthmechanismsha1.c:261 +#: ../gio/gdbusauthmechanismsha1.c:262 #, c-format msgid "Error when getting information for directory “%s”: %s" msgstr "Error when getting information for directory “%s”: %s" -#: ../gio/gdbusauthmechanismsha1.c:273 +#: ../gio/gdbusauthmechanismsha1.c:274 #, c-format msgid "" "Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o" msgstr "" "Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o" -#: ../gio/gdbusauthmechanismsha1.c:294 +#: ../gio/gdbusauthmechanismsha1.c:296 #, c-format msgid "Error creating directory “%s”: %s" msgstr "Error creating directory “%s”: %s" -#: ../gio/gdbusauthmechanismsha1.c:377 +#: ../gio/gdbusauthmechanismsha1.c:379 #, c-format msgid "Error opening keyring “%s” for reading: " msgstr "Error opening keyring “%s” for reading: " -#: ../gio/gdbusauthmechanismsha1.c:401 ../gio/gdbusauthmechanismsha1.c:714 +#: ../gio/gdbusauthmechanismsha1.c:402 ../gio/gdbusauthmechanismsha1.c:720 #, c-format msgid "Line %d of the keyring at “%s” with content “%s” is malformed" msgstr "Line %d of the keyring at “%s” with content “%s” is malformed" -#: ../gio/gdbusauthmechanismsha1.c:415 ../gio/gdbusauthmechanismsha1.c:728 +#: ../gio/gdbusauthmechanismsha1.c:416 ../gio/gdbusauthmechanismsha1.c:734 #, c-format msgid "" "First token of line %d of the keyring at “%s” with content “%s” is malformed" msgstr "" "First token of line %d of the keyring at “%s” with content “%s” is malformed" -#: ../gio/gdbusauthmechanismsha1.c:430 ../gio/gdbusauthmechanismsha1.c:742 +#: ../gio/gdbusauthmechanismsha1.c:430 ../gio/gdbusauthmechanismsha1.c:748 #, c-format msgid "" "Second token of line %d of the keyring at “%s” with content “%s” is malformed" @@ -599,32 +598,32 @@ msgstr "" msgid "Didn’t find cookie with id %d in the keyring at “%s”" msgstr "Didn’t find cookie with id %d in the keyring at “%s”" -#: ../gio/gdbusauthmechanismsha1.c:532 +#: ../gio/gdbusauthmechanismsha1.c:536 #, c-format msgid "Error deleting stale lock file “%s”: %s" msgstr "Error deleting stale lock file “%s”: %s" -#: ../gio/gdbusauthmechanismsha1.c:564 +#: ../gio/gdbusauthmechanismsha1.c:568 #, c-format msgid "Error creating lock file “%s”: %s" msgstr "Error creating lock file “%s”: %s" -#: ../gio/gdbusauthmechanismsha1.c:594 +#: ../gio/gdbusauthmechanismsha1.c:599 #, c-format msgid "Error closing (unlinked) lock file “%s”: %s" msgstr "Error closing (unlinked) lock file “%s”: %s" -#: ../gio/gdbusauthmechanismsha1.c:604 +#: ../gio/gdbusauthmechanismsha1.c:610 #, c-format msgid "Error unlinking lock file “%s”: %s" msgstr "Error unlinking lock file “%s”: %s" -#: ../gio/gdbusauthmechanismsha1.c:681 +#: ../gio/gdbusauthmechanismsha1.c:687 #, c-format msgid "Error opening keyring “%s” for writing: " msgstr "Error opening keyring “%s” for writing: " -#: ../gio/gdbusauthmechanismsha1.c:878 +#: ../gio/gdbusauthmechanismsha1.c:883 #, c-format msgid "(Additionally, releasing the lock for “%s” also failed: %s) " msgstr "(Additionally, releasing the lock for “%s” also failed: %s) " @@ -787,17 +786,17 @@ msgstr "" "Expected valid UTF-8 string but found invalid bytes at byte offset %d " "(length of string is %d). The valid UTF-8 string up until that point was “%s”" -#: ../gio/gdbusmessage.c:1589 +#: ../gio/gdbusmessage.c:1593 #, c-format msgid "Parsed value “%s” is not a valid D-Bus object path" msgstr "Parsed value “%s” is not a valid D-Bus object path" -#: ../gio/gdbusmessage.c:1611 +#: ../gio/gdbusmessage.c:1615 #, c-format msgid "Parsed value “%s” is not a valid D-Bus signature" msgstr "Parsed value “%s” is not a valid D-Bus signature" -#: ../gio/gdbusmessage.c:1658 +#: ../gio/gdbusmessage.c:1662 #, c-format msgid "" "Encountered array of length %u byte. Maximum length is 2<<26 bytes (64 MiB)." @@ -808,7 +807,7 @@ msgstr[0] "" msgstr[1] "" "Encountered array of length %u bytes. Maximum length is 2<<26 bytes (64 MiB)." -#: ../gio/gdbusmessage.c:1678 +#: ../gio/gdbusmessage.c:1682 #, c-format msgid "" "Encountered array of type “a%c”, expected to have a length a multiple of %u " @@ -817,19 +816,19 @@ msgstr "" "Encountered array of type “a%c”, expected to have a length a multiple of %u " "bytes, but found to be %u bytes in length" -#: ../gio/gdbusmessage.c:1845 +#: ../gio/gdbusmessage.c:1849 #, c-format msgid "Parsed value “%s” for variant is not a valid D-Bus signature" msgstr "Parsed value “%s” for variant is not a valid D-Bus signature" -#: ../gio/gdbusmessage.c:1869 +#: ../gio/gdbusmessage.c:1873 #, c-format msgid "" "Error deserializing GVariant with type string “%s” from the D-Bus wire format" msgstr "" "Error deserializing GVariant with type string “%s” from the D-Bus wire format" -#: ../gio/gdbusmessage.c:2053 +#: ../gio/gdbusmessage.c:2055 #, c-format msgid "" "Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value " @@ -838,40 +837,40 @@ msgstr "" "Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value " "0x%02x" -#: ../gio/gdbusmessage.c:2066 +#: ../gio/gdbusmessage.c:2068 #, c-format msgid "Invalid major protocol version. Expected 1 but found %d" msgstr "Invalid major protocol version. Expected 1 but found %d" -#: ../gio/gdbusmessage.c:2122 +#: ../gio/gdbusmessage.c:2124 #, c-format msgid "Signature header with signature “%s” found but message body is empty" msgstr "Signature header with signature “%s” found but message body is empty" -#: ../gio/gdbusmessage.c:2136 +#: ../gio/gdbusmessage.c:2138 #, c-format msgid "Parsed value “%s” is not a valid D-Bus signature (for body)" msgstr "Parsed value “%s” is not a valid D-Bus signature (for body)" -#: ../gio/gdbusmessage.c:2166 +#: ../gio/gdbusmessage.c:2168 #, c-format msgid "No signature header in message but the message body is %u byte" msgid_plural "No signature header in message but the message body is %u bytes" msgstr[0] "No signature header in message but the message body is %u byte" msgstr[1] "No signature header in message but the message body is %u bytes" -#: ../gio/gdbusmessage.c:2176 +#: ../gio/gdbusmessage.c:2178 msgid "Cannot deserialize message: " msgstr "Cannot deserialize message: " -#: ../gio/gdbusmessage.c:2517 +#: ../gio/gdbusmessage.c:2519 #, c-format msgid "" "Error serializing GVariant with type string “%s” to the D-Bus wire format" msgstr "" "Error serializing GVariant with type string “%s” to the D-Bus wire format" -#: ../gio/gdbusmessage.c:2654 +#: ../gio/gdbusmessage.c:2656 #, c-format msgid "" "Message has %d file descriptors but the header field indicates %d file " @@ -880,16 +879,16 @@ msgstr "" "Message has %d file descriptors but the header field indicates %d file " "descriptors" -#: ../gio/gdbusmessage.c:2662 +#: ../gio/gdbusmessage.c:2664 msgid "Cannot serialize message: " msgstr "Cannot serialize message: " -#: ../gio/gdbusmessage.c:2706 +#: ../gio/gdbusmessage.c:2708 #, c-format msgid "Message body has signature “%s” but there is no signature header" msgstr "Message body has signature “%s” but there is no signature header" -#: ../gio/gdbusmessage.c:2716 +#: ../gio/gdbusmessage.c:2718 #, c-format msgid "" "Message body has type signature “%s” but signature in the header field is " @@ -898,17 +897,17 @@ msgstr "" "Message body has type signature “%s” but signature in the header field is " "“%s”" -#: ../gio/gdbusmessage.c:2732 +#: ../gio/gdbusmessage.c:2734 #, c-format msgid "Message body is empty but signature in the header field is “(%s)”" msgstr "Message body is empty but signature in the header field is “(%s)”" -#: ../gio/gdbusmessage.c:3285 +#: ../gio/gdbusmessage.c:3287 #, c-format msgid "Error return with body of type “%s”" msgstr "Error return with body of type “%s”" -#: ../gio/gdbusmessage.c:3293 +#: ../gio/gdbusmessage.c:3295 msgid "Error return with empty body" msgstr "Error return with empty body" @@ -947,17 +946,17 @@ msgstr "Abstract name space not supported" msgid "Cannot specify nonce file when creating a server" msgstr "Cannot specify nonce file when creating a server" -#: ../gio/gdbusserver.c:873 +#: ../gio/gdbusserver.c:876 #, c-format msgid "Error writing nonce file at “%s”: %s" msgstr "Error writing nonce file at “%s”: %s" -#: ../gio/gdbusserver.c:1044 +#: ../gio/gdbusserver.c:1047 #, c-format msgid "The string “%s” is not a valid D-Bus GUID" msgstr "The string “%s” is not a valid D-Bus GUID" -#: ../gio/gdbusserver.c:1084 +#: ../gio/gdbusserver.c:1087 #, c-format msgid "Cannot listen on unsupported transport “%s”" msgstr "Cannot listen on unsupported transport “%s”" @@ -985,61 +984,61 @@ msgstr "" "\n" "Use “%s COMMAND --help” to get help on each command.\n" -#: ../gio/gdbus-tool.c:165 ../gio/gdbus-tool.c:227 ../gio/gdbus-tool.c:299 -#: ../gio/gdbus-tool.c:323 ../gio/gdbus-tool.c:725 ../gio/gdbus-tool.c:1068 -#: ../gio/gdbus-tool.c:1510 +#: ../gio/gdbus-tool.c:167 ../gio/gdbus-tool.c:234 ../gio/gdbus-tool.c:306 +#: ../gio/gdbus-tool.c:330 ../gio/gdbus-tool.c:811 ../gio/gdbus-tool.c:1150 +#: ../gio/gdbus-tool.c:1592 #, c-format msgid "Error: %s\n" msgstr "Error: %s\n" -#: ../gio/gdbus-tool.c:176 ../gio/gdbus-tool.c:240 ../gio/gdbus-tool.c:1526 +#: ../gio/gdbus-tool.c:178 ../gio/gdbus-tool.c:247 ../gio/gdbus-tool.c:1608 #, c-format msgid "Error parsing introspection XML: %s\n" msgstr "Error parsing introspection XML: %s\n" -#: ../gio/gdbus-tool.c:209 +#: ../gio/gdbus-tool.c:216 #, c-format msgid "Error: %s is not a valid name\n" msgstr "Error: %s is not a valid name\n" -#: ../gio/gdbus-tool.c:357 +#: ../gio/gdbus-tool.c:364 msgid "Connect to the system bus" msgstr "Connect to the system bus" -#: ../gio/gdbus-tool.c:358 +#: ../gio/gdbus-tool.c:365 msgid "Connect to the session bus" msgstr "Connect to the session bus" -#: ../gio/gdbus-tool.c:359 +#: ../gio/gdbus-tool.c:366 msgid "Connect to given D-Bus address" msgstr "Connect to given D-Bus address" -#: ../gio/gdbus-tool.c:369 +#: ../gio/gdbus-tool.c:376 msgid "Connection Endpoint Options:" msgstr "Connection Endpoint Options:" -#: ../gio/gdbus-tool.c:370 +#: ../gio/gdbus-tool.c:377 msgid "Options specifying the connection endpoint" msgstr "Options specifying the connection endpoint" -#: ../gio/gdbus-tool.c:392 +#: ../gio/gdbus-tool.c:399 #, c-format msgid "No connection endpoint specified" msgstr "No connection endpoint specified" -#: ../gio/gdbus-tool.c:402 +#: ../gio/gdbus-tool.c:409 #, c-format msgid "Multiple connection endpoints specified" msgstr "Multiple connection endpoints specified" -#: ../gio/gdbus-tool.c:472 +#: ../gio/gdbus-tool.c:479 #, c-format msgid "" "Warning: According to introspection data, interface “%s” does not exist\n" msgstr "" "Warning: According to introspection data, interface “%s” does not exist\n" -#: ../gio/gdbus-tool.c:481 +#: ../gio/gdbus-tool.c:488 #, c-format msgid "" "Warning: According to introspection data, method “%s” does not exist on " @@ -1048,166 +1047,167 @@ msgstr "" "Warning: According to introspection data, method “%s” does not exist on " "interface “%s”\n" -#: ../gio/gdbus-tool.c:543 +#: ../gio/gdbus-tool.c:550 msgid "Optional destination for signal (unique name)" msgstr "Optional destination for signal (unique name)" -#: ../gio/gdbus-tool.c:544 +#: ../gio/gdbus-tool.c:551 msgid "Object path to emit signal on" msgstr "Object path to emit signal on" -#: ../gio/gdbus-tool.c:545 +#: ../gio/gdbus-tool.c:552 msgid "Signal and interface name" msgstr "Signal and interface name" -#: ../gio/gdbus-tool.c:579 +#: ../gio/gdbus-tool.c:587 msgid "Emit a signal." msgstr "Emit a signal." -#: ../gio/gdbus-tool.c:613 ../gio/gdbus-tool.c:858 ../gio/gdbus-tool.c:1616 -#: ../gio/gdbus-tool.c:1851 ../gio/gdbus-tool.c:2067 +#: ../gio/gdbus-tool.c:642 ../gio/gdbus-tool.c:944 ../gio/gdbus-tool.c:1698 +#: ../gio/gdbus-tool.c:1931 ../gio/gdbus-tool.c:2152 #, c-format msgid "Error connecting: %s\n" msgstr "Error connecting: %s\n" -#: ../gio/gdbus-tool.c:625 +#: ../gio/gdbus-tool.c:659 ../gio/gdbus-tool.c:961 ../gio/gdbus-tool.c:1715 +#: ../gio/gdbus-tool.c:1956 #, c-format -msgid "Error: object path not specified.\n" -msgstr "Error: object path not specified.\n" +msgid "Error: Destination is not specified\n" +msgstr "Error: Destination is not specified\n" + +#: ../gio/gdbus-tool.c:670 +#, c-format +msgid "Error: %s is not a valid unique bus name.\n" +msgstr "Error: %s is not a valid unique bus name.\n" -#: ../gio/gdbus-tool.c:630 ../gio/gdbus-tool.c:925 ../gio/gdbus-tool.c:1681 -#: ../gio/gdbus-tool.c:1917 +#: ../gio/gdbus-tool.c:685 ../gio/gdbus-tool.c:987 ../gio/gdbus-tool.c:1741 +#, c-format +msgid "Error: Object path is not specified\n" +msgstr "Error: Object path is not specified\n" + +#: ../gio/gdbus-tool.c:705 ../gio/gdbus-tool.c:1007 ../gio/gdbus-tool.c:1761 +#: ../gio/gdbus-tool.c:2002 #, c-format msgid "Error: %s is not a valid object path\n" msgstr "Error: %s is not a valid object path\n" -#: ../gio/gdbus-tool.c:636 +#: ../gio/gdbus-tool.c:720 #, c-format -msgid "Error: signal not specified.\n" -msgstr "Error: signal not specified.\n" +msgid "Error: Signal name is not specified\n" +msgstr "Error: Signal name is not specified\n" -#: ../gio/gdbus-tool.c:643 +#: ../gio/gdbus-tool.c:731 #, c-format -msgid "Error: signal must be the fully-qualified name.\n" -msgstr "Error: signal must be the fully-qualified name.\n" +msgid "Error: Signal name “%s” is invalid\n" +msgstr "Error: Signal name “%s” is invalid\n" -#: ../gio/gdbus-tool.c:651 +#: ../gio/gdbus-tool.c:743 #, c-format msgid "Error: %s is not a valid interface name\n" msgstr "Error: %s is not a valid interface name\n" -#: ../gio/gdbus-tool.c:657 +#: ../gio/gdbus-tool.c:749 #, c-format msgid "Error: %s is not a valid member name\n" msgstr "Error: %s is not a valid member name\n" -#: ../gio/gdbus-tool.c:663 -#, c-format -msgid "Error: %s is not a valid unique bus name.\n" -msgstr "Error: %s is not a valid unique bus name.\n" - #. Use the original non-"parse-me-harder" error -#: ../gio/gdbus-tool.c:700 ../gio/gdbus-tool.c:1037 +#: ../gio/gdbus-tool.c:786 ../gio/gdbus-tool.c:1119 #, c-format msgid "Error parsing parameter %d: %s\n" msgstr "Error parsing parameter %d: %s\n" -#: ../gio/gdbus-tool.c:732 +#: ../gio/gdbus-tool.c:818 #, c-format msgid "Error flushing connection: %s\n" msgstr "Error flushing connection: %s\n" -#: ../gio/gdbus-tool.c:759 +#: ../gio/gdbus-tool.c:845 msgid "Destination name to invoke method on" msgstr "Destination name to invoke method on" -#: ../gio/gdbus-tool.c:760 +#: ../gio/gdbus-tool.c:846 msgid "Object path to invoke method on" msgstr "Object path to invoke method on" -#: ../gio/gdbus-tool.c:761 +#: ../gio/gdbus-tool.c:847 msgid "Method and interface name" msgstr "Method and interface name" -#: ../gio/gdbus-tool.c:762 +#: ../gio/gdbus-tool.c:848 msgid "Timeout in seconds" msgstr "Timeout in seconds" -#: ../gio/gdbus-tool.c:803 +#: ../gio/gdbus-tool.c:889 msgid "Invoke a method on a remote object." msgstr "Invoke a method on a remote object." -#: ../gio/gdbus-tool.c:878 ../gio/gdbus-tool.c:1635 ../gio/gdbus-tool.c:1870 -#, c-format -msgid "Error: Destination is not specified\n" -msgstr "Error: Destination is not specified\n" - -#: ../gio/gdbus-tool.c:890 ../gio/gdbus-tool.c:1652 ../gio/gdbus-tool.c:1882 +#: ../gio/gdbus-tool.c:972 ../gio/gdbus-tool.c:1732 ../gio/gdbus-tool.c:1967 #, c-format msgid "Error: %s is not a valid bus name\n" msgstr "Error: %s is not a valid bus name\n" -#: ../gio/gdbus-tool.c:905 ../gio/gdbus-tool.c:1661 -#, c-format -msgid "Error: Object path is not specified\n" -msgstr "Error: Object path is not specified\n" - -#: ../gio/gdbus-tool.c:940 +#: ../gio/gdbus-tool.c:1022 #, c-format msgid "Error: Method name is not specified\n" msgstr "Error: Method name is not specified\n" -#: ../gio/gdbus-tool.c:951 +#: ../gio/gdbus-tool.c:1033 #, c-format msgid "Error: Method name “%s” is invalid\n" msgstr "Error: Method name “%s” is invalid\n" -#: ../gio/gdbus-tool.c:1029 +#: ../gio/gdbus-tool.c:1111 #, c-format msgid "Error parsing parameter %d of type “%s”: %s\n" msgstr "Error parsing parameter %d of type “%s”: %s\n" -#: ../gio/gdbus-tool.c:1473 +#: ../gio/gdbus-tool.c:1555 msgid "Destination name to introspect" msgstr "Destination name to introspect" -#: ../gio/gdbus-tool.c:1474 +#: ../gio/gdbus-tool.c:1556 msgid "Object path to introspect" msgstr "Object path to introspect" -#: ../gio/gdbus-tool.c:1475 +#: ../gio/gdbus-tool.c:1557 msgid "Print XML" msgstr "Print XML" -#: ../gio/gdbus-tool.c:1476 +#: ../gio/gdbus-tool.c:1558 msgid "Introspect children" msgstr "Introspect children" -#: ../gio/gdbus-tool.c:1477 +#: ../gio/gdbus-tool.c:1559 msgid "Only print properties" msgstr "Only print properties" -#: ../gio/gdbus-tool.c:1568 +#: ../gio/gdbus-tool.c:1650 msgid "Introspect a remote object." msgstr "Introspect a remote object." -#: ../gio/gdbus-tool.c:1773 +#: ../gio/gdbus-tool.c:1853 msgid "Destination name to monitor" msgstr "Destination name to monitor" -#: ../gio/gdbus-tool.c:1774 +#: ../gio/gdbus-tool.c:1854 msgid "Object path to monitor" msgstr "Object path to monitor" -#: ../gio/gdbus-tool.c:1803 +#: ../gio/gdbus-tool.c:1883 msgid "Monitor a remote object." msgstr "corrupted object" -#: ../gio/gdbus-tool.c:1980 +#: ../gio/gdbus-tool.c:1941 +#, c-format +msgid "Error: can’t monitor a non-message-bus connection\n" +msgstr "Error: can’t monitor a non-message-bus connection\n" + +#: ../gio/gdbus-tool.c:2065 msgid "Service to activate before waiting for the other one (well-known name)" msgstr "Service to activate before waiting for the other one (well-known name)" -#: ../gio/gdbus-tool.c:1983 +#: ../gio/gdbus-tool.c:2068 msgid "" "Timeout to wait for before exiting with an error (seconds); 0 for no timeout " "(default)" @@ -1215,35 +1215,35 @@ msgstr "" "Timeout to wait for before exiting with an error (seconds); 0 for no timeout " "(default)" -#: ../gio/gdbus-tool.c:2031 +#: ../gio/gdbus-tool.c:2116 msgid "[OPTION…] BUS-NAME" msgstr "[OPTION…] BUS-NAME" -#: ../gio/gdbus-tool.c:2033 +#: ../gio/gdbus-tool.c:2118 msgid "Wait for a bus name to appear." msgstr "Wait for a bus name to appear." -#: ../gio/gdbus-tool.c:2109 +#: ../gio/gdbus-tool.c:2194 #, c-format msgid "Error: A service to activate for must be specified.\n" msgstr "Error: A service to activate for must be specified.\n" -#: ../gio/gdbus-tool.c:2114 +#: ../gio/gdbus-tool.c:2199 #, c-format msgid "Error: A service to wait for must be specified.\n" msgstr "Error: A service to wait for must be specified.\n" -#: ../gio/gdbus-tool.c:2119 +#: ../gio/gdbus-tool.c:2204 #, c-format msgid "Error: Too many arguments.\n" msgstr "Error: Too many arguments.\n" -#: ../gio/gdbus-tool.c:2127 ../gio/gdbus-tool.c:2134 +#: ../gio/gdbus-tool.c:2212 ../gio/gdbus-tool.c:2219 #, c-format msgid "Error: %s is not a valid well-known bus name.\n" msgstr "Error: %s is not a valid well-known bus name.\n" -#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4533 +#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4531 msgid "Unnamed" msgstr "Unnamed" @@ -1251,30 +1251,30 @@ msgstr "Unnamed" msgid "Desktop file didn’t specify Exec field" msgstr "Desktop file didn’t specify Exec field" -#: ../gio/gdesktopappinfo.c:2696 +#: ../gio/gdesktopappinfo.c:2694 msgid "Unable to find terminal required for application" msgstr "Unable to find terminal required for application" -#: ../gio/gdesktopappinfo.c:3129 +#: ../gio/gdesktopappinfo.c:3127 #, c-format msgid "Can’t create user application configuration folder %s: %s" msgstr "Can’t create user application configuration folder %s: %s" -#: ../gio/gdesktopappinfo.c:3133 +#: ../gio/gdesktopappinfo.c:3131 #, c-format msgid "Can’t create user MIME configuration folder %s: %s" msgstr "Can’t create user MIME configuration folder %s: %s" -#: ../gio/gdesktopappinfo.c:3373 ../gio/gdesktopappinfo.c:3397 +#: ../gio/gdesktopappinfo.c:3371 ../gio/gdesktopappinfo.c:3395 msgid "Application information lacks an identifier" msgstr "Application information lacks an identifier" -#: ../gio/gdesktopappinfo.c:3631 +#: ../gio/gdesktopappinfo.c:3629 #, c-format msgid "Can’t create user desktop file %s" msgstr "Can’t create user desktop file %s" -#: ../gio/gdesktopappinfo.c:3765 +#: ../gio/gdesktopappinfo.c:3763 #, c-format msgid "Custom definition for %s" msgstr "Custom definition for %s" @@ -1335,14 +1335,14 @@ msgstr "Malformed number of tokens (%d) in GEmblemedIcon encoding" msgid "Expected a GEmblem for GEmblemedIcon" msgstr "Expected a GEmblem for GEmblemedIcon" -#: ../gio/gfile.c:969 ../gio/gfile.c:1207 ../gio/gfile.c:1345 -#: ../gio/gfile.c:1583 ../gio/gfile.c:1638 ../gio/gfile.c:1696 -#: ../gio/gfile.c:1780 ../gio/gfile.c:1837 ../gio/gfile.c:1901 -#: ../gio/gfile.c:1956 ../gio/gfile.c:3613 ../gio/gfile.c:3668 -#: ../gio/gfile.c:3904 ../gio/gfile.c:3946 ../gio/gfile.c:4414 -#: ../gio/gfile.c:4825 ../gio/gfile.c:4910 ../gio/gfile.c:5000 -#: ../gio/gfile.c:5097 ../gio/gfile.c:5184 ../gio/gfile.c:5285 -#: ../gio/gfile.c:7826 ../gio/gfile.c:7916 ../gio/gfile.c:8000 +#: ../gio/gfile.c:970 ../gio/gfile.c:1208 ../gio/gfile.c:1346 +#: ../gio/gfile.c:1584 ../gio/gfile.c:1639 ../gio/gfile.c:1697 +#: ../gio/gfile.c:1781 ../gio/gfile.c:1838 ../gio/gfile.c:1902 +#: ../gio/gfile.c:1957 ../gio/gfile.c:3603 ../gio/gfile.c:3658 +#: ../gio/gfile.c:3894 ../gio/gfile.c:3936 ../gio/gfile.c:4404 +#: ../gio/gfile.c:4815 ../gio/gfile.c:4900 ../gio/gfile.c:4990 +#: ../gio/gfile.c:5087 ../gio/gfile.c:5174 ../gio/gfile.c:5275 +#: ../gio/gfile.c:7853 ../gio/gfile.c:7943 ../gio/gfile.c:8027 #: ../gio/win32/gwinhttpfile.c:437 msgid "Operation not supported" msgstr "Operation not supported" @@ -1351,69 +1351,69 @@ msgstr "Operation not supported" #. * trying to find the enclosing (user visible) #. * mount of a file, but none exists. #. -#: ../gio/gfile.c:1468 +#: ../gio/gfile.c:1469 msgid "Containing mount does not exist" msgstr "Containing mount does not exist" -#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2375 +#: ../gio/gfile.c:2516 ../gio/glocalfile.c:2380 msgid "Can’t copy over directory" msgstr "Can’t copy over directory" -#: ../gio/gfile.c:2575 +#: ../gio/gfile.c:2576 msgid "Can’t copy directory over directory" msgstr "Can’t copy directory over directory" -#: ../gio/gfile.c:2583 +#: ../gio/gfile.c:2584 msgid "Target file exists" msgstr "Target file exists" -#: ../gio/gfile.c:2602 +#: ../gio/gfile.c:2603 msgid "Can’t recursively copy directory" msgstr "Can’t recursively copy directory" -#: ../gio/gfile.c:2889 +#: ../gio/gfile.c:2878 msgid "Splice not supported" msgstr "Symbolic links not supported" -#: ../gio/gfile.c:2893 +#: ../gio/gfile.c:2882 #, c-format msgid "Error splicing file: %s" msgstr "Error opening file: %s" -#: ../gio/gfile.c:3024 +#: ../gio/gfile.c:3014 msgid "Copy (reflink/clone) between mounts is not supported" msgstr "Copy (reflink/clone) between mounts is not supported" -#: ../gio/gfile.c:3028 +#: ../gio/gfile.c:3018 msgid "Copy (reflink/clone) is not supported or invalid" msgstr "Copy (reflink/clone) is not supported or invalid" -#: ../gio/gfile.c:3033 +#: ../gio/gfile.c:3023 msgid "Copy (reflink/clone) is not supported or didn’t work" msgstr "Copy (reflink/clone) is not supported or didn’t work" -#: ../gio/gfile.c:3096 +#: ../gio/gfile.c:3086 msgid "Can’t copy special file" msgstr "Can’t copy special file" -#: ../gio/gfile.c:3894 +#: ../gio/gfile.c:3884 msgid "Invalid symlink value given" msgstr "Invalid symlink value given" -#: ../gio/gfile.c:4055 +#: ../gio/gfile.c:4045 msgid "Trash not supported" msgstr "Trash not supported" -#: ../gio/gfile.c:4167 +#: ../gio/gfile.c:4157 #, c-format msgid "File names cannot contain “%c”" msgstr "File names cannot contain “%c”" -#: ../gio/gfile.c:6613 ../gio/gvolume.c:363 +#: ../gio/gfile.c:6638 ../gio/gvolume.c:363 msgid "volume doesn’t implement mount" msgstr "volume doesn’t implement mount" -#: ../gio/gfile.c:6722 +#: ../gio/gfile.c:6747 msgid "No application is registered as handling this file" msgstr "No application is registered as handling this file" @@ -1459,7 +1459,7 @@ msgid "Truncate not supported on stream" msgstr "Truncate not supported on stream" #: ../gio/ghttpproxy.c:91 ../gio/gresolver.c:410 ../gio/gresolver.c:476 -#: ../glib/gconvert.c:1650 +#: ../glib/gconvert.c:1649 msgid "Invalid hostname" msgstr "Invalid hostname" @@ -1661,27 +1661,27 @@ msgstr "Lists the contents of locations in a tree" msgid "Use %s to get detailed help.\n" msgstr "Use %s to get detailed help.\n" -#: ../gio/gio-tool-cat.c:80 +#: ../gio/gio-tool-cat.c:87 msgid "Error writing to stdout" msgstr "Error writing to stdout" #. Translators: commandline placeholder -#: ../gio/gio-tool-cat.c:124 ../gio/gio-tool-info.c:282 +#: ../gio/gio-tool-cat.c:133 ../gio/gio-tool-info.c:282 #: ../gio/gio-tool-list.c:165 ../gio/gio-tool-mkdir.c:48 #: ../gio/gio-tool-monitor.c:37 ../gio/gio-tool-monitor.c:39 #: ../gio/gio-tool-monitor.c:41 ../gio/gio-tool-monitor.c:43 #: ../gio/gio-tool-monitor.c:203 ../gio/gio-tool-mount.c:1141 -#: ../gio/gio-tool-open.c:45 ../gio/gio-tool-remove.c:48 +#: ../gio/gio-tool-open.c:113 ../gio/gio-tool-remove.c:48 #: ../gio/gio-tool-rename.c:45 ../gio/gio-tool-set.c:89 #: ../gio/gio-tool-trash.c:81 ../gio/gio-tool-tree.c:239 msgid "LOCATION" msgstr "LOCATION" -#: ../gio/gio-tool-cat.c:129 +#: ../gio/gio-tool-cat.c:138 msgid "Concatenate files and print to standard output." msgstr "Concatenate files and print to standard output." -#: ../gio/gio-tool-cat.c:131 +#: ../gio/gio-tool-cat.c:140 msgid "" "gio cat works just like the traditional cat utility, but using GIO\n" "locations instead of local files: for example, you can use something\n" @@ -1691,9 +1691,9 @@ msgstr "" "locations instead of local files: for example, you can use something\n" "like smb://server/resource/file.txt as location." -#: ../gio/gio-tool-cat.c:153 ../gio/gio-tool-info.c:313 +#: ../gio/gio-tool-cat.c:162 ../gio/gio-tool-info.c:313 #: ../gio/gio-tool-mkdir.c:76 ../gio/gio-tool-monitor.c:228 -#: ../gio/gio-tool-open.c:71 ../gio/gio-tool-remove.c:72 +#: ../gio/gio-tool-open.c:139 ../gio/gio-tool-remove.c:72 msgid "No locations given" msgstr "No locations given" @@ -1734,7 +1734,7 @@ msgstr "SOURCE" #. Translators: commandline placeholder #: ../gio/gio-tool-copy.c:98 ../gio/gio-tool-move.c:94 -#: ../gio/gio-tool-save.c:165 +#: ../gio/gio-tool-save.c:160 msgid "DESTINATION" msgstr "DESTINATION" @@ -2082,7 +2082,7 @@ msgstr "" msgid "Target %s is not a directory" msgstr "Target %s is not a directory" -#: ../gio/gio-tool-open.c:50 +#: ../gio/gio-tool-open.c:118 msgid "" "Open files with the default application that\n" "is registered to handle files of this type." @@ -2110,7 +2110,7 @@ msgstr "Rename a file." msgid "Missing argument" msgstr "Missing argument" -#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:195 +#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:190 #: ../gio/gio-tool-set.c:137 msgid "Too many arguments" msgstr "Too many arguments" @@ -2150,21 +2150,21 @@ msgstr "The etag of the file being overwritten" msgid "ETAG" msgstr "ETAG" -#: ../gio/gio-tool-save.c:119 +#: ../gio/gio-tool-save.c:113 msgid "Error reading from standard input" msgstr "Error reading from standard input" #. Translators: The "etag" is a token allowing to verify whether a file has been modified -#: ../gio/gio-tool-save.c:145 +#: ../gio/gio-tool-save.c:139 #, c-format msgid "Etag not available\n" msgstr "Etag not available\n" -#: ../gio/gio-tool-save.c:168 +#: ../gio/gio-tool-save.c:163 msgid "Read from standard input and save to DEST." msgstr "Read from standard input and save to DEST." -#: ../gio/gio-tool-save.c:188 +#: ../gio/gio-tool-save.c:183 msgid "No destination given" msgstr "No destination given" @@ -2221,7 +2221,7 @@ msgstr "Follow symbolic links, mounts and shortcuts" msgid "List contents of directories in a tree-like format." msgstr "List contents of directories in a tree-like format." -#: ../gio/glib-compile-resources.c:142 ../gio/glib-compile-schemas.c:1486 +#: ../gio/glib-compile-resources.c:142 ../gio/glib-compile-schemas.c:1501 #, c-format msgid "Element <%s> not allowed inside <%s>" msgstr "Element <%s> not allowed inside <%s>" @@ -2266,12 +2266,12 @@ msgstr "Error reading file %s: %s" msgid "Error compressing file %s" msgstr "Error compressing file %s" -#: ../gio/glib-compile-resources.c:469 ../gio/glib-compile-schemas.c:1598 +#: ../gio/glib-compile-resources.c:469 #, c-format msgid "text may not appear inside <%s>" msgstr "text may not appear inside <%s>" -#: ../gio/glib-compile-resources.c:664 ../gio/glib-compile-schemas.c:2047 +#: ../gio/glib-compile-resources.c:664 ../gio/glib-compile-schemas.c:2067 msgid "Show program version and exit" msgstr "Show program version and exit" @@ -2287,8 +2287,8 @@ msgstr "" "The directories where files are to be read from (default to current " "directory)" -#: ../gio/glib-compile-resources.c:666 ../gio/glib-compile-schemas.c:2048 -#: ../gio/glib-compile-schemas.c:2076 +#: ../gio/glib-compile-resources.c:666 ../gio/glib-compile-schemas.c:2068 +#: ../gio/glib-compile-schemas.c:2096 msgid "DIRECTORY" msgstr "DIRECTORY" @@ -2345,54 +2345,207 @@ msgstr "" msgid "You should give exactly one file name\n" msgstr "You should give exactly one file name\n" -#: ../gio/glib-compile-schemas.c:784 -msgid "empty names are not permitted" -msgstr "empty names are not permitted" +#: ../gio/glib-compile-schemas.c:95 +#, c-format +msgid "nick must be a minimum of 2 characters" +msgstr "nick must be a minimum of 2 characters" + +#: ../gio/glib-compile-schemas.c:106 +#, c-format +msgid "Invalid numeric value" +msgstr "Invalid numeric value" + +#: ../gio/glib-compile-schemas.c:114 +#, c-format +msgid "<value nick='%s'/> already specified" +msgstr "<value nick='%s'/> already specified" + +#: ../gio/glib-compile-schemas.c:122 +#, c-format +msgid "value='%s' already specified" +msgstr "value='%s' already specified" + +#: ../gio/glib-compile-schemas.c:136 +#, c-format +msgid "flags values must have at most 1 bit set" +msgstr "flags values must have at most 1 bit set" + +#: ../gio/glib-compile-schemas.c:161 +#, c-format +msgid "<%s> must contain at least one <value>" +msgstr "<%s> must contain at least one <value>" + +#: ../gio/glib-compile-schemas.c:315 +#, c-format +msgid "<%s> is not contained in the specified range" +msgstr "<%s> is not contained in the specified range" + +#: ../gio/glib-compile-schemas.c:327 +#, c-format +msgid "<%s> is not a valid member of the specified enumerated type" +msgstr "<%s> is not a valid member of the specified enumerated type" + +#: ../gio/glib-compile-schemas.c:333 +#, c-format +msgid "<%s> contains string not in the specified flags type" +msgstr "<%s> contains string not in the specified flags type" + +#: ../gio/glib-compile-schemas.c:339 +#, c-format +msgid "<%s> contains a string not in <choices>" +msgstr "<%s> contains a string not in <choices>" + +#: ../gio/glib-compile-schemas.c:373 +msgid "<range/> already specified for this key" +msgstr "<range/> already specified for this key" -#: ../gio/glib-compile-schemas.c:794 +#: ../gio/glib-compile-schemas.c:391 #, c-format -msgid "invalid name '%s': names must begin with a lowercase letter" -msgstr "invalid name '%s': names must begin with a lowercase letter" +msgid "<range> not allowed for keys of type “%s”" +msgstr "<range> not allowed for keys of type “%s”" -#: ../gio/glib-compile-schemas.c:806 +#: ../gio/glib-compile-schemas.c:408 #, c-format +msgid "<range> specified minimum is greater than maximum" +msgstr "<range> specified minimum is greater than maximum" + +#: ../gio/glib-compile-schemas.c:433 +#, c-format +msgid "unsupported l10n category: %s" +msgstr "unsupported l10n category: %s" + +#: ../gio/glib-compile-schemas.c:441 +msgid "l10n requested, but no gettext domain given" +msgstr "l10n requested, but no gettext domain given" + +#: ../gio/glib-compile-schemas.c:453 +msgid "translation context given for value without l10n enabled" +msgstr "translation context given for value without l10n enabled" + +#: ../gio/glib-compile-schemas.c:475 +#, c-format +msgid "Failed to parse <default> value of type “%s”: " +msgstr "Failed to parse <default> value of type “%s”: " + +#: ../gio/glib-compile-schemas.c:492 msgid "" -"invalid name '%s': invalid character '%c'; only lowercase letters, numbers " -"and hyphen ('-') are permitted." +"<choices> cannot be specified for keys tagged as having an enumerated type" msgstr "" -"invalid name '%s': invalid character '%c'; only lowercase letters, numbers " -"and hyphen ('-') are permitted." +"<choices> cannot be specified for keys tagged as having an enumerated type" + +#: ../gio/glib-compile-schemas.c:501 +msgid "<choices> already specified for this key" +msgstr "<choices> already specified for this key" -#: ../gio/glib-compile-schemas.c:815 +#: ../gio/glib-compile-schemas.c:513 #, c-format -msgid "invalid name '%s': two successive hyphens ('--') are not permitted." -msgstr "invalid name '%s': two successive hyphens ('--') are not permitted." +msgid "<choices> not allowed for keys of type “%s”" +msgstr "<choices> not allowed for keys of type “%s”" -#: ../gio/glib-compile-schemas.c:824 +#: ../gio/glib-compile-schemas.c:529 #, c-format -msgid "invalid name '%s': the last character may not be a hyphen ('-')." -msgstr "invalid name '%s': the last character may not be a hyphen ('-')." +msgid "<choice value='%s'/> already given" +msgstr "<choice value='%s'/> already given" + +#: ../gio/glib-compile-schemas.c:544 +#, c-format +msgid "<choices> must contain at least one <choice>" +msgstr "<choices> must contain at least one <choice>" + +#: ../gio/glib-compile-schemas.c:558 +msgid "<aliases> already specified for this key" +msgstr "<aliases> already specified for this key" + +#: ../gio/glib-compile-schemas.c:562 +msgid "" +"<aliases> can only be specified for keys with enumerated or flags types or " +"after <choices>" +msgstr "" +"<aliases> can only be specified for keys with enumerated or flags types or " +"after <choices>" + +#: ../gio/glib-compile-schemas.c:581 +#, c-format +msgid "" +"<alias value='%s'/> given when “%s” is already a member of the enumerated " +"type" +msgstr "" +"<alias value='%s'/> given when “%s” is already a member of the enumerated " +"type" -#: ../gio/glib-compile-schemas.c:832 +#: ../gio/glib-compile-schemas.c:587 #, c-format -msgid "invalid name '%s': maximum length is 1024" -msgstr "invalid name '%s': maximum length is 1024" +msgid "<alias value='%s'/> given when <choice value='%s'/> was already given" +msgstr "<alias value='%s'/> given when <choice value='%s'/> was already given" -#: ../gio/glib-compile-schemas.c:902 +#: ../gio/glib-compile-schemas.c:595 +#, c-format +msgid "<alias value='%s'/> already specified" +msgstr "<alias value='%s'/> already specified" + +#: ../gio/glib-compile-schemas.c:605 +#, c-format +msgid "alias target “%s” is not in enumerated type" +msgstr "alias target “%s” is not in enumerated type" + +#: ../gio/glib-compile-schemas.c:606 +#, c-format +msgid "alias target “%s” is not in <choices>" +msgstr "alias target “%s” is not in <choices>" + +#: ../gio/glib-compile-schemas.c:621 +#, c-format +msgid "<aliases> must contain at least one <alias>" +msgstr "<aliases> must contain at least one <alias>" + +#: ../gio/glib-compile-schemas.c:786 +msgid "Empty names are not permitted" +msgstr "Empty names are not permitted" + +#: ../gio/glib-compile-schemas.c:796 +#, c-format +msgid "Invalid name “%s”: names must begin with a lowercase letter" +msgstr "Invalid name “%s”: names must begin with a lowercase letter" + +#: ../gio/glib-compile-schemas.c:808 +#, c-format +msgid "" +"Invalid name “%s”: invalid character “%c”; only lowercase letters, numbers " +"and hyphen (“-”) are permitted" +msgstr "" +"Invalid name “%s”: invalid character “%c”; only lowercase letters, numbers " +"and hyphen (“-”) are permitted" + +#: ../gio/glib-compile-schemas.c:817 +#, c-format +msgid "Invalid name “%s”: two successive hyphens (“--”) are not permitted" +msgstr "Invalid name “%s”: two successive hyphens (“--”) are not permitted" + +#: ../gio/glib-compile-schemas.c:826 +#, c-format +msgid "Invalid name “%s”: the last character may not be a hyphen (“-”)" +msgstr "Invalid name “%s”: the last character may not be a hyphen (“-”)" + +#: ../gio/glib-compile-schemas.c:834 +#, c-format +msgid "Invalid name “%s”: maximum length is 1024" +msgstr "Invalid name “%s”: maximum length is 1024" + +#: ../gio/glib-compile-schemas.c:904 #, c-format msgid "<child name='%s'> already specified" msgstr "<child name='%s'> already specified" -#: ../gio/glib-compile-schemas.c:928 -msgid "cannot add keys to a 'list-of' schema" -msgstr "cannot add keys to a 'list-of' schema" +#: ../gio/glib-compile-schemas.c:930 +msgid "Cannot add keys to a “list-of” schema" +msgstr "Cannot add keys to a “list-of” schema" -#: ../gio/glib-compile-schemas.c:939 +#: ../gio/glib-compile-schemas.c:941 #, c-format msgid "<key name='%s'> already specified" msgstr "<key name='%s'> already specified" -#: ../gio/glib-compile-schemas.c:957 +#: ../gio/glib-compile-schemas.c:959 #, c-format msgid "" "<key name='%s'> shadows <key name='%s'> in <schema id='%s'>; use <override> " @@ -2401,152 +2554,175 @@ msgstr "" "<key name='%s'> shadows <key name='%s'> in <schema id='%s'>; use <override> " "to modify value" -#: ../gio/glib-compile-schemas.c:968 +#: ../gio/glib-compile-schemas.c:970 #, c-format msgid "" -"exactly one of 'type', 'enum' or 'flags' must be specified as an attribute " +"Exactly one of “type”, “enum” or “flags” must be specified as an attribute " "to <key>" msgstr "" -"exactly one of 'type', 'enum' or 'flags' must be specified as an attribute " +"Exactly one of “type”, “enum” or “flags” must be specified as an attribute " "to <key>" -#: ../gio/glib-compile-schemas.c:987 +#: ../gio/glib-compile-schemas.c:989 #, c-format msgid "<%s id='%s'> not (yet) defined." msgstr "<%s id='%s'> not (yet) defined." -#: ../gio/glib-compile-schemas.c:1002 +#: ../gio/glib-compile-schemas.c:1004 #, c-format -msgid "invalid GVariant type string '%s'" -msgstr "invalid GVariant type string '%s'" +msgid "Invalid GVariant type string “%s”" +msgstr "Invalid GVariant type string “%s”" -#: ../gio/glib-compile-schemas.c:1032 -msgid "<override> given but schema isn't extending anything" -msgstr "<override> given but schema isn't extending anything" +#: ../gio/glib-compile-schemas.c:1034 +msgid "<override> given but schema isn’t extending anything" +msgstr "<override> given but schema isn’t extending anything" -#: ../gio/glib-compile-schemas.c:1045 +#: ../gio/glib-compile-schemas.c:1047 #, c-format -msgid "no <key name='%s'> to override" -msgstr "no <key name='%s'> to override" +msgid "No <key name='%s'> to override" +msgstr "No <key name='%s'> to override" -#: ../gio/glib-compile-schemas.c:1053 +#: ../gio/glib-compile-schemas.c:1055 #, c-format msgid "<override name='%s'> already specified" msgstr "<override name='%s'> already specified" -#: ../gio/glib-compile-schemas.c:1126 +#: ../gio/glib-compile-schemas.c:1128 #, c-format msgid "<schema id='%s'> already specified" msgstr "<schema id='%s'> already specified" -#: ../gio/glib-compile-schemas.c:1138 +#: ../gio/glib-compile-schemas.c:1140 #, c-format -msgid "<schema id='%s'> extends not yet existing schema '%s'" -msgstr "<schema id='%s'> extends not yet existing schema '%s'" +msgid "<schema id='%s'> extends not yet existing schema “%s”" +msgstr "<schema id='%s'> extends not yet existing schema “%s”" -#: ../gio/glib-compile-schemas.c:1154 +#: ../gio/glib-compile-schemas.c:1156 #, c-format -msgid "<schema id='%s'> is list of not yet existing schema '%s'" -msgstr "<schema id='%s'> is list of not yet existing schema '%s'" +msgid "<schema id='%s'> is list of not yet existing schema “%s”" +msgstr "<schema id='%s'> is list of not yet existing schema “%s”" -#: ../gio/glib-compile-schemas.c:1162 +#: ../gio/glib-compile-schemas.c:1164 #, c-format -msgid "Can not be a list of a schema with a path" -msgstr "Can not be a list of a schema with a path" +msgid "Cannot be a list of a schema with a path" +msgstr "Cannot be a list of a schema with a path" -#: ../gio/glib-compile-schemas.c:1172 +#: ../gio/glib-compile-schemas.c:1174 #, c-format -msgid "Can not extend a schema with a path" -msgstr "Can not extend a schema with a path" +msgid "Cannot extend a schema with a path" +msgstr "Cannot extend a schema with a path" -#: ../gio/glib-compile-schemas.c:1182 +#: ../gio/glib-compile-schemas.c:1184 #, c-format msgid "" "<schema id='%s'> is a list, extending <schema id='%s'> which is not a list" msgstr "" "<schema id='%s'> is a list, extending <schema id='%s'> which is not a list" -#: ../gio/glib-compile-schemas.c:1192 +#: ../gio/glib-compile-schemas.c:1194 #, c-format msgid "" -"<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but '%s' " -"does not extend '%s'" +"<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but “%s” " +"does not extend “%s”" msgstr "" -"<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but '%s' " -"does not extend '%s'" +"<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but “%s” " +"does not extend “%s”" + +#: ../gio/glib-compile-schemas.c:1211 +#, c-format +msgid "A path, if given, must begin and end with a slash" +msgstr "A path, if given, must begin and end with a slash" -#: ../gio/glib-compile-schemas.c:1209 +#: ../gio/glib-compile-schemas.c:1218 #, c-format -msgid "a path, if given, must begin and end with a slash" -msgstr "a path, if given, must begin and end with a slash" +msgid "The path of a list must end with “:/”" +msgstr "The path of a list must end with “:/”" -#: ../gio/glib-compile-schemas.c:1216 +#: ../gio/glib-compile-schemas.c:1227 #, c-format -msgid "the path of a list must end with ':/'" -msgstr "the path of a list must end with ':/'" +msgid "" +"Warning: Schema “%s” has path “%s”. Paths starting with “/apps/”, “/" +"desktop/” or “/system/” are deprecated." +msgstr "" +"Warning: Schema “%s” has path “%s”. Paths starting with “/apps/”, “/" +"desktop/” or “/system/” are deprecated." -#: ../gio/glib-compile-schemas.c:1242 +#: ../gio/glib-compile-schemas.c:1257 #, c-format msgid "<%s id='%s'> already specified" msgstr "<%s id='%s'> already specified" -#: ../gio/glib-compile-schemas.c:1392 ../gio/glib-compile-schemas.c:1408 +#: ../gio/glib-compile-schemas.c:1407 ../gio/glib-compile-schemas.c:1423 #, c-format msgid "Only one <%s> element allowed inside <%s>" msgstr "Only one <%s> element allowed inside <%s>" -#: ../gio/glib-compile-schemas.c:1490 +#: ../gio/glib-compile-schemas.c:1505 #, c-format msgid "Element <%s> not allowed at the top level" msgstr "Element <%s> not allowed at the top level" +#: ../gio/glib-compile-schemas.c:1523 +msgid "Element <default> is required in <key>" +msgstr "Element <default> is required in <key>" + +#: ../gio/glib-compile-schemas.c:1613 +#, c-format +msgid "Text may not appear inside <%s>" +msgstr "Text may not appear inside <%s>" + +#: ../gio/glib-compile-schemas.c:1681 +#, c-format +msgid "Warning: undefined reference to <schema id='%s'/>" +msgstr "Warning: undefined reference to <schema id='%s'/>" + #. Translators: Do not translate "--strict". -#: ../gio/glib-compile-schemas.c:1800 ../gio/glib-compile-schemas.c:1874 -#: ../gio/glib-compile-schemas.c:1950 +#: ../gio/glib-compile-schemas.c:1820 ../gio/glib-compile-schemas.c:1894 +#: ../gio/glib-compile-schemas.c:1970 #, c-format msgid "--strict was specified; exiting.\n" msgstr "--strict was specified; exiting.\n" -#: ../gio/glib-compile-schemas.c:1810 +#: ../gio/glib-compile-schemas.c:1830 #, c-format msgid "This entire file has been ignored.\n" msgstr "This entire file has been ignored.\n" -#: ../gio/glib-compile-schemas.c:1870 +#: ../gio/glib-compile-schemas.c:1890 #, c-format msgid "Ignoring this file.\n" msgstr "Ignoring this file.\n" -#: ../gio/glib-compile-schemas.c:1910 +#: ../gio/glib-compile-schemas.c:1930 #, c-format msgid "No such key '%s' in schema '%s' as specified in override file '%s'" msgstr "No such key '%s' in schema '%s' as specified in override file '%s'" -#: ../gio/glib-compile-schemas.c:1916 ../gio/glib-compile-schemas.c:1974 -#: ../gio/glib-compile-schemas.c:2002 +#: ../gio/glib-compile-schemas.c:1936 ../gio/glib-compile-schemas.c:1994 +#: ../gio/glib-compile-schemas.c:2022 #, c-format msgid "; ignoring override for this key.\n" msgstr "; ignoring override for this key.\n" -#: ../gio/glib-compile-schemas.c:1920 ../gio/glib-compile-schemas.c:1978 -#: ../gio/glib-compile-schemas.c:2006 +#: ../gio/glib-compile-schemas.c:1940 ../gio/glib-compile-schemas.c:1998 +#: ../gio/glib-compile-schemas.c:2026 #, c-format msgid " and --strict was specified; exiting.\n" msgstr " and --strict was specified; exiting.\n" -#: ../gio/glib-compile-schemas.c:1936 +#: ../gio/glib-compile-schemas.c:1956 #, c-format msgid "" "error parsing key '%s' in schema '%s' as specified in override file '%s': %s." msgstr "" "error parsing key '%s' in schema '%s' as specified in override file '%s': %s." -#: ../gio/glib-compile-schemas.c:1946 +#: ../gio/glib-compile-schemas.c:1966 #, c-format msgid "Ignoring override for this key.\n" msgstr "Ignoring override for this key.\n" -#: ../gio/glib-compile-schemas.c:1964 +#: ../gio/glib-compile-schemas.c:1984 #, c-format msgid "" "override for key '%s' in schema '%s' in override file '%s' is outside the " @@ -2555,7 +2731,7 @@ msgstr "" "override for key '%s' in schema '%s' in override file '%s' is outside the " "range given in the schema" -#: ../gio/glib-compile-schemas.c:1992 +#: ../gio/glib-compile-schemas.c:2012 #, c-format msgid "" "override for key '%s' in schema '%s' in override file '%s' is not in the " @@ -2564,23 +2740,23 @@ msgstr "" "override for key '%s' in schema '%s' in override file '%s' is not in the " "list of valid choices" -#: ../gio/glib-compile-schemas.c:2048 +#: ../gio/glib-compile-schemas.c:2068 msgid "where to store the gschemas.compiled file" msgstr "where to store the gschemas.compiled file" -#: ../gio/glib-compile-schemas.c:2049 +#: ../gio/glib-compile-schemas.c:2069 msgid "Abort on any errors in schemas" msgstr "Abort on any errors in schemas" -#: ../gio/glib-compile-schemas.c:2050 +#: ../gio/glib-compile-schemas.c:2070 msgid "Do not write the gschema.compiled file" msgstr "Do not write the gschema.compiled file" -#: ../gio/glib-compile-schemas.c:2051 +#: ../gio/glib-compile-schemas.c:2071 msgid "Do not enforce key name restrictions" msgstr "Do not enforce key name restrictions" -#: ../gio/glib-compile-schemas.c:2079 +#: ../gio/glib-compile-schemas.c:2099 msgid "" "Compile all GSettings schema files into a schema cache.\n" "Schema files are required to have the extension .gschema.xml,\n" @@ -2590,22 +2766,22 @@ msgstr "" "Schema files are required to have the extension .gschema.xml,\n" "and the cache file is called gschemas.compiled." -#: ../gio/glib-compile-schemas.c:2100 +#: ../gio/glib-compile-schemas.c:2120 #, c-format msgid "You should give exactly one directory name\n" msgstr "You should give exactly one directory name\n" -#: ../gio/glib-compile-schemas.c:2142 +#: ../gio/glib-compile-schemas.c:2162 #, c-format msgid "No schema files found: " msgstr "No schema files found: " -#: ../gio/glib-compile-schemas.c:2145 +#: ../gio/glib-compile-schemas.c:2165 #, c-format msgid "doing nothing.\n" msgstr "doing nothing.\n" -#: ../gio/glib-compile-schemas.c:2148 +#: ../gio/glib-compile-schemas.c:2168 #, c-format msgid "removed existing output file.\n" msgstr "removed existing output file.\n" @@ -2615,7 +2791,7 @@ msgstr "removed existing output file.\n" msgid "Invalid filename %s" msgstr "Invalid filename %s" -#: ../gio/glocalfile.c:1037 +#: ../gio/glocalfile.c:1039 #, c-format msgid "Error getting filesystem info for %s: %s" msgstr "Error getting filesystem info for %s: %s" @@ -2624,236 +2800,236 @@ msgstr "Error getting filesystem info for %s: %s" #. * the enclosing (user visible) mount of a file, but none #. * exists. #. -#: ../gio/glocalfile.c:1176 +#: ../gio/glocalfile.c:1178 #, c-format msgid "Containing mount for file %s not found" msgstr "Containing mount for file %s not found" -#: ../gio/glocalfile.c:1199 +#: ../gio/glocalfile.c:1201 msgid "Can’t rename root directory" msgstr "Can’t rename root directory" -#: ../gio/glocalfile.c:1217 ../gio/glocalfile.c:1240 +#: ../gio/glocalfile.c:1219 ../gio/glocalfile.c:1242 #, c-format msgid "Error renaming file %s: %s" msgstr "Error renaming file %s: %s" -#: ../gio/glocalfile.c:1224 +#: ../gio/glocalfile.c:1226 msgid "Can’t rename file, filename already exists" msgstr "Can’t rename file, filename already exists" -#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2251 ../gio/glocalfile.c:2279 -#: ../gio/glocalfile.c:2436 ../gio/glocalfileoutputstream.c:549 +#: ../gio/glocalfile.c:1239 ../gio/glocalfile.c:2256 ../gio/glocalfile.c:2284 +#: ../gio/glocalfile.c:2441 ../gio/glocalfileoutputstream.c:551 msgid "Invalid filename" msgstr "Invalid filename" -#: ../gio/glocalfile.c:1404 ../gio/glocalfile.c:1419 +#: ../gio/glocalfile.c:1407 ../gio/glocalfile.c:1422 #, c-format msgid "Error opening file %s: %s" msgstr "Error opening file %s: %s" -#: ../gio/glocalfile.c:1544 +#: ../gio/glocalfile.c:1547 #, c-format msgid "Error removing file %s: %s" msgstr "Error removing file %s: %s" -#: ../gio/glocalfile.c:1927 +#: ../gio/glocalfile.c:1931 #, c-format msgid "Error trashing file %s: %s" msgstr "Error trashing file %s: %s" -#: ../gio/glocalfile.c:1950 +#: ../gio/glocalfile.c:1954 #, c-format msgid "Unable to create trash dir %s: %s" msgstr "Unable to create trash dir %s: %s" -#: ../gio/glocalfile.c:1970 +#: ../gio/glocalfile.c:1974 #, c-format msgid "Unable to find toplevel directory to trash %s" msgstr "Unable to find toplevel directory to trash %s" -#: ../gio/glocalfile.c:2049 ../gio/glocalfile.c:2069 +#: ../gio/glocalfile.c:2053 ../gio/glocalfile.c:2073 #, c-format msgid "Unable to find or create trash directory for %s" msgstr "Unable to find or create trash directory for %s" -#: ../gio/glocalfile.c:2103 +#: ../gio/glocalfile.c:2108 #, c-format msgid "Unable to create trashing info file for %s: %s" msgstr "Unable to create trashing info file for %s: %s" -#: ../gio/glocalfile.c:2162 +#: ../gio/glocalfile.c:2167 #, c-format msgid "Unable to trash file %s across filesystem boundaries" msgstr "Unable to trash file %s across filesystem boundaries" -#: ../gio/glocalfile.c:2166 ../gio/glocalfile.c:2222 +#: ../gio/glocalfile.c:2171 ../gio/glocalfile.c:2227 #, c-format msgid "Unable to trash file %s: %s" msgstr "Unable to trash file %s: %s" -#: ../gio/glocalfile.c:2228 +#: ../gio/glocalfile.c:2233 #, c-format msgid "Unable to trash file %s" msgstr "Unable to trash file %s" -#: ../gio/glocalfile.c:2254 +#: ../gio/glocalfile.c:2259 #, c-format msgid "Error creating directory %s: %s" msgstr "Error creating directory %s: %s" -#: ../gio/glocalfile.c:2283 +#: ../gio/glocalfile.c:2288 #, c-format msgid "Filesystem does not support symbolic links" msgstr "Filesystem does not support symbolic links" -#: ../gio/glocalfile.c:2286 +#: ../gio/glocalfile.c:2291 #, c-format msgid "Error making symbolic link %s: %s" msgstr "Error making symbolic link %s: %s" -#: ../gio/glocalfile.c:2292 ../glib/gfileutils.c:2077 +#: ../gio/glocalfile.c:2297 ../glib/gfileutils.c:2127 msgid "Symbolic links not supported" msgstr "Symbolic links not supported" -#: ../gio/glocalfile.c:2347 ../gio/glocalfile.c:2382 ../gio/glocalfile.c:2439 +#: ../gio/glocalfile.c:2352 ../gio/glocalfile.c:2387 ../gio/glocalfile.c:2444 #, c-format msgid "Error moving file %s: %s" msgstr "Error moving file %s: %s" -#: ../gio/glocalfile.c:2370 +#: ../gio/glocalfile.c:2375 msgid "Can’t move directory over directory" msgstr "Can’t move directory over directory" -#: ../gio/glocalfile.c:2396 ../gio/glocalfileoutputstream.c:931 -#: ../gio/glocalfileoutputstream.c:945 ../gio/glocalfileoutputstream.c:960 -#: ../gio/glocalfileoutputstream.c:977 ../gio/glocalfileoutputstream.c:991 +#: ../gio/glocalfile.c:2401 ../gio/glocalfileoutputstream.c:935 +#: ../gio/glocalfileoutputstream.c:949 ../gio/glocalfileoutputstream.c:964 +#: ../gio/glocalfileoutputstream.c:981 ../gio/glocalfileoutputstream.c:995 msgid "Backup file creation failed" msgstr "Backup file creation failed" -#: ../gio/glocalfile.c:2415 +#: ../gio/glocalfile.c:2420 #, c-format msgid "Error removing target file: %s" msgstr "Error removing target file: %s" -#: ../gio/glocalfile.c:2429 +#: ../gio/glocalfile.c:2434 msgid "Move between mounts not supported" msgstr "Move between mounts not supported" -#: ../gio/glocalfile.c:2620 +#: ../gio/glocalfile.c:2625 #, c-format msgid "Could not determine the disk usage of %s: %s" msgstr "Could not determine the disk usage of %s: %s" -#: ../gio/glocalfileinfo.c:721 +#: ../gio/glocalfileinfo.c:745 msgid "Attribute value must be non-NULL" msgstr "Attribute value must be non-NULL" -#: ../gio/glocalfileinfo.c:728 +#: ../gio/glocalfileinfo.c:752 msgid "Invalid attribute type (string expected)" msgstr "Invalid attribute type (string expected)" -#: ../gio/glocalfileinfo.c:735 +#: ../gio/glocalfileinfo.c:759 msgid "Invalid extended attribute name" msgstr "Invalid extended attribute name" -#: ../gio/glocalfileinfo.c:775 +#: ../gio/glocalfileinfo.c:799 #, c-format msgid "Error setting extended attribute “%s”: %s" msgstr "Error setting extended attribute “%s”: %s" -#: ../gio/glocalfileinfo.c:1575 +#: ../gio/glocalfileinfo.c:1607 msgid " (invalid encoding)" msgstr " (invalid encoding)" -#: ../gio/glocalfileinfo.c:1766 ../gio/glocalfileoutputstream.c:809 +#: ../gio/glocalfileinfo.c:1776 ../gio/glocalfileoutputstream.c:813 #, c-format msgid "Error when getting information for file “%s”: %s" msgstr "Error when getting information for file “%s”: %s" -#: ../gio/glocalfileinfo.c:2017 +#: ../gio/glocalfileinfo.c:2034 #, c-format msgid "Error when getting information for file descriptor: %s" msgstr "Error when getting information for file descriptor: %s" -#: ../gio/glocalfileinfo.c:2062 +#: ../gio/glocalfileinfo.c:2079 msgid "Invalid attribute type (uint32 expected)" msgstr "Invalid attribute type (uint32 expected)" -#: ../gio/glocalfileinfo.c:2080 +#: ../gio/glocalfileinfo.c:2097 msgid "Invalid attribute type (uint64 expected)" msgstr "Invalid attribute type (uint64 expected)" -#: ../gio/glocalfileinfo.c:2099 ../gio/glocalfileinfo.c:2118 +#: ../gio/glocalfileinfo.c:2116 ../gio/glocalfileinfo.c:2135 msgid "Invalid attribute type (byte string expected)" msgstr "Invalid attribute type (byte string expected)" -#: ../gio/glocalfileinfo.c:2153 +#: ../gio/glocalfileinfo.c:2180 msgid "Cannot set permissions on symlinks" msgstr "Cannot set permissions on symlinks" -#: ../gio/glocalfileinfo.c:2169 +#: ../gio/glocalfileinfo.c:2196 #, c-format msgid "Error setting permissions: %s" msgstr "Error setting permissions: %s" -#: ../gio/glocalfileinfo.c:2220 +#: ../gio/glocalfileinfo.c:2247 #, c-format msgid "Error setting owner: %s" msgstr "Error setting owner: %s" -#: ../gio/glocalfileinfo.c:2243 +#: ../gio/glocalfileinfo.c:2270 msgid "symlink must be non-NULL" msgstr "symlink must be non-NULL" -#: ../gio/glocalfileinfo.c:2253 ../gio/glocalfileinfo.c:2272 -#: ../gio/glocalfileinfo.c:2283 +#: ../gio/glocalfileinfo.c:2280 ../gio/glocalfileinfo.c:2299 +#: ../gio/glocalfileinfo.c:2310 #, c-format msgid "Error setting symlink: %s" msgstr "Error setting symlink: %s" -#: ../gio/glocalfileinfo.c:2262 +#: ../gio/glocalfileinfo.c:2289 msgid "Error setting symlink: file is not a symlink" msgstr "Error setting symlink: file is not a symlink" -#: ../gio/glocalfileinfo.c:2388 +#: ../gio/glocalfileinfo.c:2415 #, c-format msgid "Error setting modification or access time: %s" msgstr "Error setting modification or access time: %s" # c-format -#: ../gio/glocalfileinfo.c:2411 +#: ../gio/glocalfileinfo.c:2438 msgid "SELinux context must be non-NULL" msgstr "SELinux context must be non-NULL" -#: ../gio/glocalfileinfo.c:2426 +#: ../gio/glocalfileinfo.c:2453 #, c-format msgid "Error setting SELinux context: %s" msgstr "Error setting SELinux context: %s" -#: ../gio/glocalfileinfo.c:2433 +#: ../gio/glocalfileinfo.c:2460 msgid "SELinux is not enabled on this system" msgstr "SELinux is not enabled on this system" -#: ../gio/glocalfileinfo.c:2525 +#: ../gio/glocalfileinfo.c:2552 #, c-format msgid "Setting attribute %s not supported" msgstr "Setting attribute %s not supported" -#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:694 +#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:696 #, c-format msgid "Error reading from file: %s" msgstr "Error reading from file: %s" #: ../gio/glocalfileinputstream.c:199 ../gio/glocalfileinputstream.c:211 #: ../gio/glocalfileinputstream.c:225 ../gio/glocalfileinputstream.c:333 -#: ../gio/glocalfileoutputstream.c:456 ../gio/glocalfileoutputstream.c:1009 +#: ../gio/glocalfileoutputstream.c:458 ../gio/glocalfileoutputstream.c:1013 #, c-format msgid "Error seeking in file: %s" msgstr "Error seeking in file: %s" -#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:246 -#: ../gio/glocalfileoutputstream.c:340 +#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:248 +#: ../gio/glocalfileoutputstream.c:342 #, c-format msgid "Error closing file: %s" msgstr "Error closing file: %s" @@ -2862,51 +3038,51 @@ msgstr "Error closing file: %s" msgid "Unable to find default local file monitor type" msgstr "Unable to find default local file monitor type" -#: ../gio/glocalfileoutputstream.c:194 ../gio/glocalfileoutputstream.c:226 -#: ../gio/glocalfileoutputstream.c:715 +#: ../gio/glocalfileoutputstream.c:196 ../gio/glocalfileoutputstream.c:228 +#: ../gio/glocalfileoutputstream.c:717 #, c-format msgid "Error writing to file: %s" msgstr "Error writing to file: %s" -#: ../gio/glocalfileoutputstream.c:273 +#: ../gio/glocalfileoutputstream.c:275 #, c-format msgid "Error removing old backup link: %s" msgstr "Error removing old backup link: %s" -#: ../gio/glocalfileoutputstream.c:287 ../gio/glocalfileoutputstream.c:300 +#: ../gio/glocalfileoutputstream.c:289 ../gio/glocalfileoutputstream.c:302 #, c-format msgid "Error creating backup copy: %s" msgstr "Error creating backup copy: %s" -#: ../gio/glocalfileoutputstream.c:318 +#: ../gio/glocalfileoutputstream.c:320 #, c-format msgid "Error renaming temporary file: %s" msgstr "Error renaming temporary file: %s" -#: ../gio/glocalfileoutputstream.c:502 ../gio/glocalfileoutputstream.c:1060 +#: ../gio/glocalfileoutputstream.c:504 ../gio/glocalfileoutputstream.c:1064 #, c-format msgid "Error truncating file: %s" msgstr "Error truncating file: %s" -#: ../gio/glocalfileoutputstream.c:555 ../gio/glocalfileoutputstream.c:791 -#: ../gio/glocalfileoutputstream.c:1041 ../gio/gsubprocess.c:360 +#: ../gio/glocalfileoutputstream.c:557 ../gio/glocalfileoutputstream.c:795 +#: ../gio/glocalfileoutputstream.c:1045 ../gio/gsubprocess.c:380 #, c-format msgid "Error opening file “%s”: %s" msgstr "Error opening file “%s”: %s" -#: ../gio/glocalfileoutputstream.c:822 +#: ../gio/glocalfileoutputstream.c:826 msgid "Target file is a directory" msgstr "Target file is a directory" -#: ../gio/glocalfileoutputstream.c:827 +#: ../gio/glocalfileoutputstream.c:831 msgid "Target file is not a regular file" msgstr "Target file is not a regular file" -#: ../gio/glocalfileoutputstream.c:839 +#: ../gio/glocalfileoutputstream.c:843 msgid "The file was externally modified" msgstr "The file was externally modified" -#: ../gio/glocalfileoutputstream.c:1025 +#: ../gio/glocalfileoutputstream.c:1029 #, c-format msgid "Error removing old file: %s" msgstr "Error removing old file: %s" @@ -2950,49 +3126,49 @@ msgstr "Requested seek beyond the end of the stream" #. Translators: This is an error #. * message for mount objects that #. * don't implement unmount. -#: ../gio/gmount.c:393 +#: ../gio/gmount.c:396 msgid "mount doesn’t implement “unmount”" msgstr "mount doesn’t implement “unmount”" #. Translators: This is an error #. * message for mount objects that #. * don't implement eject. -#: ../gio/gmount.c:469 +#: ../gio/gmount.c:472 msgid "mount doesn’t implement “eject”" msgstr "mount doesn’t implement “eject”" #. Translators: This is an error #. * message for mount objects that #. * don't implement any of unmount or unmount_with_operation. -#: ../gio/gmount.c:547 +#: ../gio/gmount.c:550 msgid "mount doesn’t implement “unmount” or “unmount_with_operation”" msgstr "mount doesn’t implement “unmount” or “unmount_with_operation”" #. Translators: This is an error #. * message for mount objects that #. * don't implement any of eject or eject_with_operation. -#: ../gio/gmount.c:632 +#: ../gio/gmount.c:635 msgid "mount doesn’t implement “eject” or “eject_with_operation”" msgstr "mount doesn’t implement “eject” or “eject_with_operation”" #. Translators: This is an error #. * message for mount objects that #. * don't implement remount. -#: ../gio/gmount.c:720 +#: ../gio/gmount.c:723 msgid "mount doesn’t implement “remount”" msgstr "mount doesn’t implement “remount”" #. Translators: This is an error #. * message for mount objects that #. * don't implement content type guessing. -#: ../gio/gmount.c:802 +#: ../gio/gmount.c:805 msgid "mount doesn’t implement content type guessing" msgstr "mount doesn’t implement content type guessing" #. Translators: This is an error #. * message for mount objects that #. * don't implement content type guessing. -#: ../gio/gmount.c:889 +#: ../gio/gmount.c:892 msgid "mount doesn’t implement synchronous content type guessing" msgstr "mount doesn’t implement synchronous content type guessing" @@ -3042,25 +3218,25 @@ msgstr "Source stream is already closed" msgid "Error resolving “%s”: %s" msgstr "Error resolving “%s”: %s" -#: ../gio/gresource.c:606 ../gio/gresource.c:857 ../gio/gresource.c:874 -#: ../gio/gresource.c:998 ../gio/gresource.c:1070 ../gio/gresource.c:1143 -#: ../gio/gresource.c:1213 ../gio/gresourcefile.c:453 -#: ../gio/gresourcefile.c:576 ../gio/gresourcefile.c:713 +#: ../gio/gresource.c:621 ../gio/gresource.c:880 ../gio/gresource.c:919 +#: ../gio/gresource.c:1043 ../gio/gresource.c:1115 ../gio/gresource.c:1188 +#: ../gio/gresource.c:1258 ../gio/gresourcefile.c:476 +#: ../gio/gresourcefile.c:599 ../gio/gresourcefile.c:736 #, c-format msgid "The resource at “%s” does not exist" msgstr "The resource at “%s” does not exist" -#: ../gio/gresource.c:771 +#: ../gio/gresource.c:786 #, c-format msgid "The resource at “%s” failed to decompress" msgstr "The resource at “%s” failed to decompress" -#: ../gio/gresourcefile.c:709 +#: ../gio/gresourcefile.c:732 #, c-format msgid "The resource at “%s” is not a directory" msgstr "The resource at “%s” is not a directory" -#: ../gio/gresourcefile.c:917 +#: ../gio/gresourcefile.c:940 msgid "Input stream doesn’t implement seek" msgstr "Input stream doesn’t implement seek" @@ -3424,144 +3600,174 @@ msgstr "Empty schema name given\n" msgid "No such key “%s”\n" msgstr "No such key “%s”\n" -#: ../gio/gsocket.c:379 +#: ../gio/gsocket.c:384 msgid "Invalid socket, not initialized" msgstr "Invalid socket, not initialized" -#: ../gio/gsocket.c:386 +#: ../gio/gsocket.c:391 #, c-format msgid "Invalid socket, initialization failed due to: %s" msgstr "Invalid socket, initialization failed due to: %s" -#: ../gio/gsocket.c:394 +#: ../gio/gsocket.c:399 msgid "Socket is already closed" msgstr "Socket is already closed" -#: ../gio/gsocket.c:409 ../gio/gsocket.c:2764 ../gio/gsocket.c:3949 -#: ../gio/gsocket.c:4005 +#: ../gio/gsocket.c:414 ../gio/gsocket.c:2995 ../gio/gsocket.c:4205 +#: ../gio/gsocket.c:4263 msgid "Socket I/O timed out" msgstr "Socket I/O timed out" -#: ../gio/gsocket.c:541 +#: ../gio/gsocket.c:546 #, c-format msgid "creating GSocket from fd: %s" msgstr "creating GSocket from fd: %s" -#: ../gio/gsocket.c:569 ../gio/gsocket.c:623 ../gio/gsocket.c:630 +#: ../gio/gsocket.c:575 ../gio/gsocket.c:629 ../gio/gsocket.c:636 #, c-format msgid "Unable to create socket: %s" msgstr "Unable to create socket: %s" -#: ../gio/gsocket.c:623 +#: ../gio/gsocket.c:629 msgid "Unknown family was specified" msgstr "Unknown family was specified" -#: ../gio/gsocket.c:630 +#: ../gio/gsocket.c:636 msgid "Unknown protocol was specified" msgstr "Unknown protocol was specified" -#: ../gio/gsocket.c:1121 +#: ../gio/gsocket.c:1127 #, c-format msgid "Cannot use datagram operations on a non-datagram socket." msgstr "Cannot use datagram operations on a non-datagram socket." -#: ../gio/gsocket.c:1138 +#: ../gio/gsocket.c:1144 #, c-format msgid "Cannot use datagram operations on a socket with a timeout set." msgstr "Cannot use datagram operations on a socket with a timeout set." -#: ../gio/gsocket.c:1942 +#: ../gio/gsocket.c:1948 #, c-format msgid "could not get local address: %s" msgstr "could not get local address: %s" -#: ../gio/gsocket.c:1985 +#: ../gio/gsocket.c:1991 #, c-format msgid "could not get remote address: %s" msgstr "could not get remote address: %s" -#: ../gio/gsocket.c:2051 +#: ../gio/gsocket.c:2057 #, c-format msgid "could not listen: %s" msgstr "could not listen: %s" -#: ../gio/gsocket.c:2150 +#: ../gio/gsocket.c:2156 #, c-format msgid "Error binding to address: %s" msgstr "Error binding to address: %s" -#: ../gio/gsocket.c:2265 ../gio/gsocket.c:2302 +#: ../gio/gsocket.c:2214 ../gio/gsocket.c:2251 ../gio/gsocket.c:2361 +#: ../gio/gsocket.c:2379 ../gio/gsocket.c:2449 ../gio/gsocket.c:2507 +#: ../gio/gsocket.c:2525 #, c-format msgid "Error joining multicast group: %s" msgstr "Error joining multicast group: %s" -#: ../gio/gsocket.c:2266 ../gio/gsocket.c:2303 +#: ../gio/gsocket.c:2215 ../gio/gsocket.c:2252 ../gio/gsocket.c:2362 +#: ../gio/gsocket.c:2380 ../gio/gsocket.c:2450 ../gio/gsocket.c:2508 +#: ../gio/gsocket.c:2526 #, c-format msgid "Error leaving multicast group: %s" msgstr "Error leaving multicast group: %s" -#: ../gio/gsocket.c:2267 +#: ../gio/gsocket.c:2216 msgid "No support for source-specific multicast" msgstr "No support for source-specific multicast" -#: ../gio/gsocket.c:2487 +#: ../gio/gsocket.c:2363 +msgid "Unsupported socket family" +msgstr "Unsupported socket family" + +#: ../gio/gsocket.c:2381 +msgid "source-specific not an IPv4 address" +msgstr "source-specific not an IPv4 address" + +#: ../gio/gsocket.c:2399 ../gio/gsocket.c:2428 ../gio/gsocket.c:2475 +#, c-format +msgid "Interface not found: %s" +msgstr "Interface not found: %s" + +#: ../gio/gsocket.c:2415 +#, c-format +msgid "Interface name too long" +msgstr "Interface name too long" + +#: ../gio/gsocket.c:2451 +msgid "No support for IPv4 source-specific multicast" +msgstr "No support for IPv4 source-specific multicast" + +#: ../gio/gsocket.c:2509 +msgid "No support for IPv6 source-specific multicast" +msgstr "No support for IPv6 source-specific multicast" + +#: ../gio/gsocket.c:2718 #, c-format msgid "Error accepting connection: %s" msgstr "Error accepting connection: %s" -#: ../gio/gsocket.c:2608 +#: ../gio/gsocket.c:2839 msgid "Connection in progress" msgstr "Connection in progress" -#: ../gio/gsocket.c:2657 +#: ../gio/gsocket.c:2888 msgid "Unable to get pending error: " msgstr "Unable to get pending error: " -#: ../gio/gsocket.c:2827 +#: ../gio/gsocket.c:3058 #, c-format msgid "Error receiving data: %s" msgstr "Error receiving data: %s" -#: ../gio/gsocket.c:3022 +#: ../gio/gsocket.c:3253 #, c-format msgid "Error sending data: %s" msgstr "Error sending data: %s" -#: ../gio/gsocket.c:3209 +#: ../gio/gsocket.c:3440 #, c-format msgid "Unable to shutdown socket: %s" msgstr "Unable to shutdown socket: %s" -#: ../gio/gsocket.c:3290 +#: ../gio/gsocket.c:3521 #, c-format msgid "Error closing socket: %s" msgstr "Error closing socket: %s" -#: ../gio/gsocket.c:3942 +#: ../gio/gsocket.c:4198 #, c-format msgid "Waiting for socket condition: %s" msgstr "Waiting for socket condition: %s" -#: ../gio/gsocket.c:4414 ../gio/gsocket.c:4494 ../gio/gsocket.c:4672 +#: ../gio/gsocket.c:4672 ../gio/gsocket.c:4752 ../gio/gsocket.c:4930 #, c-format msgid "Error sending message: %s" msgstr "Error sending message: %s" -#: ../gio/gsocket.c:4438 +#: ../gio/gsocket.c:4696 msgid "GSocketControlMessage not supported on Windows" msgstr "GSocketControlMessage not supported on Windows" -#: ../gio/gsocket.c:4891 ../gio/gsocket.c:4964 ../gio/gsocket.c:5190 +#: ../gio/gsocket.c:5149 ../gio/gsocket.c:5222 ../gio/gsocket.c:5448 #, c-format msgid "Error receiving message: %s" msgstr "Error receiving message: %s" -#: ../gio/gsocket.c:5462 +#: ../gio/gsocket.c:5720 #, c-format msgid "Unable to read socket credentials: %s" msgstr "Unable to read socket credentials: %s" -#: ../gio/gsocket.c:5471 +#: ../gio/gsocket.c:5729 msgid "g_socket_get_credentials not implemented for this OS" msgstr "g_socket_get_credentials not implemented for this OS" @@ -3702,18 +3908,18 @@ msgstr "No valid addresses were found" msgid "Error reverse-resolving “%s”: %s" msgstr "Error reverse-resolving “%s”: %s" -#: ../gio/gthreadedresolver.c:550 ../gio/gthreadedresolver.c:630 -#: ../gio/gthreadedresolver.c:728 ../gio/gthreadedresolver.c:778 +#: ../gio/gthreadedresolver.c:549 ../gio/gthreadedresolver.c:628 +#: ../gio/gthreadedresolver.c:726 ../gio/gthreadedresolver.c:776 #, c-format msgid "No DNS record of the requested type for “%s”" msgstr "No DNS record of the requested type for “%s”" -#: ../gio/gthreadedresolver.c:555 ../gio/gthreadedresolver.c:733 +#: ../gio/gthreadedresolver.c:554 ../gio/gthreadedresolver.c:731 #, c-format msgid "Temporarily unable to resolve “%s”" msgstr "Temporarily unable to resolve “%s”" -#: ../gio/gthreadedresolver.c:560 ../gio/gthreadedresolver.c:738 +#: ../gio/gthreadedresolver.c:559 ../gio/gthreadedresolver.c:736 #, c-format msgid "Error resolving “%s”" msgstr "Error resolving “%s”" @@ -3760,14 +3966,14 @@ msgstr "" msgid "The password entered is incorrect." msgstr "The password entered is incorrect." -#: ../gio/gunixconnection.c:166 ../gio/gunixconnection.c:561 +#: ../gio/gunixconnection.c:166 ../gio/gunixconnection.c:563 #, c-format msgid "Expecting 1 control message, got %d" msgid_plural "Expecting 1 control message, got %d" msgstr[0] "Expecting 1 control message, got %d" msgstr[1] "Expecting 1 control message, got %d" -#: ../gio/gunixconnection.c:182 ../gio/gunixconnection.c:573 +#: ../gio/gunixconnection.c:182 ../gio/gunixconnection.c:575 msgid "Unexpected type of ancillary data" msgstr "Unexpected type of ancillary data" @@ -3786,48 +3992,48 @@ msgstr "Received invalid fd" msgid "Error sending credentials: " msgstr "Error sending data: %s" -#: ../gio/gunixconnection.c:503 +#: ../gio/gunixconnection.c:504 #, c-format msgid "Error checking if SO_PASSCRED is enabled for socket: %s" msgstr "Error checking if SO_PASSCRED is enabled for socket: %s" -#: ../gio/gunixconnection.c:518 +#: ../gio/gunixconnection.c:520 #, c-format msgid "Error enabling SO_PASSCRED: %s" msgstr "Error enabling SO_PASSCRED: %s" -#: ../gio/gunixconnection.c:547 +#: ../gio/gunixconnection.c:549 msgid "" "Expecting to read a single byte for receiving credentials but read zero bytes" msgstr "" "Expecting to read a single byte for receiving credentials but read zero bytes" -#: ../gio/gunixconnection.c:587 +#: ../gio/gunixconnection.c:589 #, c-format msgid "Not expecting control message, but got %d" msgstr "Not expecting control message, but got %d" -#: ../gio/gunixconnection.c:611 +#: ../gio/gunixconnection.c:614 #, c-format msgid "Error while disabling SO_PASSCRED: %s" msgstr "Error while disabling SO_PASSCRED: %s" -#: ../gio/gunixinputstream.c:369 ../gio/gunixinputstream.c:390 +#: ../gio/gunixinputstream.c:372 ../gio/gunixinputstream.c:393 #, c-format msgid "Error reading from file descriptor: %s" msgstr "Error reading from file descriptor: %s" -#: ../gio/gunixinputstream.c:423 ../gio/gunixoutputstream.c:409 +#: ../gio/gunixinputstream.c:426 ../gio/gunixoutputstream.c:411 #: ../gio/gwin32inputstream.c:217 ../gio/gwin32outputstream.c:204 #, c-format msgid "Error closing file descriptor: %s" msgstr "Error closing file descriptor: %s" -#: ../gio/gunixmounts.c:2422 ../gio/gunixmounts.c:2475 +#: ../gio/gunixmounts.c:2539 ../gio/gunixmounts.c:2592 msgid "Filesystem root" msgstr "Filesystem root" -#: ../gio/gunixoutputstream.c:355 ../gio/gunixoutputstream.c:376 +#: ../gio/gunixoutputstream.c:358 ../gio/gunixoutputstream.c:378 #, c-format msgid "Error writing to file descriptor: %s" msgstr "Error writing to file descriptor: %s" @@ -3974,268 +4180,268 @@ msgstr "No application with name “%s” registered a bookmark for “%s”" msgid "Failed to expand exec line “%s” with URI “%s”" msgstr "Failed to expand exec line “%s” with URI “%s”" -#: ../glib/gconvert.c:477 ../glib/gutf8.c:862 ../glib/gutf8.c:1074 +#: ../glib/gconvert.c:476 ../glib/gutf8.c:862 ../glib/gutf8.c:1074 #: ../glib/gutf8.c:1211 ../glib/gutf8.c:1315 msgid "Partial character sequence at end of input" msgstr "Partial character sequence at end of input" -#: ../glib/gconvert.c:742 +#: ../glib/gconvert.c:741 #, c-format msgid "Cannot convert fallback “%s” to codeset “%s”" msgstr "Cannot convert fallback “%s” to codeset “%s”" -#: ../glib/gconvert.c:1513 +#: ../glib/gconvert.c:1512 #, c-format msgid "The URI “%s” is not an absolute URI using the “file” scheme" msgstr "The URI “%s” is not an absolute URI using the “file” scheme" -#: ../glib/gconvert.c:1523 +#: ../glib/gconvert.c:1522 #, c-format msgid "The local file URI “%s” may not include a “#”" msgstr "The local file URI “%s” may not include a “#”" -#: ../glib/gconvert.c:1540 +#: ../glib/gconvert.c:1539 #, c-format msgid "The URI “%s” is invalid" msgstr "The URI “%s” is invalid" -#: ../glib/gconvert.c:1552 +#: ../glib/gconvert.c:1551 #, c-format msgid "The hostname of the URI “%s” is invalid" msgstr "The hostname of the URI “%s” is invalid" -#: ../glib/gconvert.c:1568 +#: ../glib/gconvert.c:1567 #, c-format msgid "The URI “%s” contains invalidly escaped characters" msgstr "The URI “%s” contains invalidly escaped characters" -#: ../glib/gconvert.c:1640 +#: ../glib/gconvert.c:1639 #, c-format msgid "The pathname “%s” is not an absolute path" msgstr "The pathname “%s” is not an absolute path" #. Translators: this is the preferred format for expressing the date and the time -#: ../glib/gdatetime.c:202 +#: ../glib/gdatetime.c:203 msgctxt "GDateTime" msgid "%a %b %e %H:%M:%S %Y" msgstr "%Z %H:%M:%S %Y %b %d %a" #. Translators: this is the preferred format for expressing the date -#: ../glib/gdatetime.c:205 +#: ../glib/gdatetime.c:206 msgctxt "GDateTime" msgid "%m/%d/%y" msgstr "%d/%m/%y" #. Translators: this is the preferred format for expressing the time -#: ../glib/gdatetime.c:208 +#: ../glib/gdatetime.c:209 msgctxt "GDateTime" msgid "%H:%M:%S" msgstr "%H:%M:%S" #. Translators: this is the preferred format for expressing 12 hour time -#: ../glib/gdatetime.c:211 +#: ../glib/gdatetime.c:212 msgctxt "GDateTime" msgid "%I:%M:%S %p" msgstr "%I:%M:%S %P" -#: ../glib/gdatetime.c:224 +#: ../glib/gdatetime.c:225 msgctxt "full month name" msgid "January" msgstr "ינואר" -#: ../glib/gdatetime.c:226 +#: ../glib/gdatetime.c:227 msgctxt "full month name" msgid "February" msgstr "פברואר" -#: ../glib/gdatetime.c:228 +#: ../glib/gdatetime.c:229 msgctxt "full month name" msgid "March" msgstr "מרץ" -#: ../glib/gdatetime.c:230 +#: ../glib/gdatetime.c:231 msgctxt "full month name" msgid "April" msgstr "אפריל" -#: ../glib/gdatetime.c:232 +#: ../glib/gdatetime.c:233 msgctxt "full month name" msgid "May" msgstr "מאי" -#: ../glib/gdatetime.c:234 +#: ../glib/gdatetime.c:235 msgctxt "full month name" msgid "June" msgstr "יוני" -#: ../glib/gdatetime.c:236 +#: ../glib/gdatetime.c:237 msgctxt "full month name" msgid "July" msgstr "יולי" -#: ../glib/gdatetime.c:238 +#: ../glib/gdatetime.c:239 msgctxt "full month name" msgid "August" msgstr "אוגוסט" -#: ../glib/gdatetime.c:240 +#: ../glib/gdatetime.c:241 msgctxt "full month name" msgid "September" msgstr "ספטמבר" -#: ../glib/gdatetime.c:242 +#: ../glib/gdatetime.c:243 msgctxt "full month name" msgid "October" msgstr "אוקטובר" -#: ../glib/gdatetime.c:244 +#: ../glib/gdatetime.c:245 msgctxt "full month name" msgid "November" msgstr "נובמבר" -#: ../glib/gdatetime.c:246 +#: ../glib/gdatetime.c:247 msgctxt "full month name" msgid "December" msgstr "דצמבר" -#: ../glib/gdatetime.c:261 +#: ../glib/gdatetime.c:262 msgctxt "abbreviated month name" msgid "Jan" msgstr "ינו" -#: ../glib/gdatetime.c:263 +#: ../glib/gdatetime.c:264 msgctxt "abbreviated month name" msgid "Feb" msgstr "פבר" -#: ../glib/gdatetime.c:265 +#: ../glib/gdatetime.c:266 msgctxt "abbreviated month name" msgid "Mar" msgstr "מרץ" -#: ../glib/gdatetime.c:267 +#: ../glib/gdatetime.c:268 msgctxt "abbreviated month name" msgid "Apr" msgstr "אפר" -#: ../glib/gdatetime.c:269 +#: ../glib/gdatetime.c:270 msgctxt "abbreviated month name" msgid "May" msgstr "מאי" -#: ../glib/gdatetime.c:271 +#: ../glib/gdatetime.c:272 msgctxt "abbreviated month name" msgid "Jun" msgstr "יונ" -#: ../glib/gdatetime.c:273 +#: ../glib/gdatetime.c:274 msgctxt "abbreviated month name" msgid "Jul" msgstr "יול" -#: ../glib/gdatetime.c:275 +#: ../glib/gdatetime.c:276 msgctxt "abbreviated month name" msgid "Aug" msgstr "אוג" -#: ../glib/gdatetime.c:277 +#: ../glib/gdatetime.c:278 msgctxt "abbreviated month name" msgid "Sep" msgstr "ספט" -#: ../glib/gdatetime.c:279 +#: ../glib/gdatetime.c:280 msgctxt "abbreviated month name" msgid "Oct" msgstr "אוק" -#: ../glib/gdatetime.c:281 +#: ../glib/gdatetime.c:282 msgctxt "abbreviated month name" msgid "Nov" msgstr "נוב" -#: ../glib/gdatetime.c:283 +#: ../glib/gdatetime.c:284 msgctxt "abbreviated month name" msgid "Dec" msgstr "דצמ" -#: ../glib/gdatetime.c:298 +#: ../glib/gdatetime.c:299 msgctxt "full weekday name" msgid "Monday" msgstr "יום שני" -#: ../glib/gdatetime.c:300 +#: ../glib/gdatetime.c:301 msgctxt "full weekday name" msgid "Tuesday" msgstr "יום שלישי" -#: ../glib/gdatetime.c:302 +#: ../glib/gdatetime.c:303 msgctxt "full weekday name" msgid "Wednesday" msgstr "יום רביעי" -#: ../glib/gdatetime.c:304 +#: ../glib/gdatetime.c:305 msgctxt "full weekday name" msgid "Thursday" msgstr "יום חמישי" -#: ../glib/gdatetime.c:306 +#: ../glib/gdatetime.c:307 msgctxt "full weekday name" msgid "Friday" msgstr "יום שישי" -#: ../glib/gdatetime.c:308 +#: ../glib/gdatetime.c:309 msgctxt "full weekday name" msgid "Saturday" msgstr "שבת" -#: ../glib/gdatetime.c:310 +#: ../glib/gdatetime.c:311 msgctxt "full weekday name" msgid "Sunday" msgstr "יום ראשון" -#: ../glib/gdatetime.c:325 +#: ../glib/gdatetime.c:326 msgctxt "abbreviated weekday name" msgid "Mon" msgstr "ב׳" -#: ../glib/gdatetime.c:327 +#: ../glib/gdatetime.c:328 msgctxt "abbreviated weekday name" msgid "Tue" msgstr "ג׳" -#: ../glib/gdatetime.c:329 +#: ../glib/gdatetime.c:330 msgctxt "abbreviated weekday name" msgid "Wed" msgstr "ד׳" -#: ../glib/gdatetime.c:331 +#: ../glib/gdatetime.c:332 msgctxt "abbreviated weekday name" msgid "Thu" msgstr "ה" -#: ../glib/gdatetime.c:333 +#: ../glib/gdatetime.c:334 msgctxt "abbreviated weekday name" msgid "Fri" msgstr "ו׳" -#: ../glib/gdatetime.c:335 +#: ../glib/gdatetime.c:336 msgctxt "abbreviated weekday name" msgid "Sat" msgstr "ש׳" -#: ../glib/gdatetime.c:337 +#: ../glib/gdatetime.c:338 msgctxt "abbreviated weekday name" msgid "Sun" msgstr "א׳" #. Translators: 'before midday' indicator -#: ../glib/gdatetime.c:354 +#: ../glib/gdatetime.c:355 msgctxt "GDateTime" msgid "AM" msgstr "AM" #. Translators: 'after midday' indicator -#: ../glib/gdatetime.c:357 +#: ../glib/gdatetime.c:358 msgctxt "GDateTime" msgid "PM" msgstr "PM" @@ -4245,164 +4451,164 @@ msgstr "PM" msgid "Error opening directory “%s”: %s" msgstr "Error opening directory “%s”: %s" -#: ../glib/gfileutils.c:706 ../glib/gfileutils.c:798 +#: ../glib/gfileutils.c:716 ../glib/gfileutils.c:808 #, c-format msgid "Could not allocate %lu byte to read file “%s”" msgid_plural "Could not allocate %lu bytes to read file “%s”" msgstr[0] "Could not allocate %lu bytes to read file “%s”" msgstr[1] "Could not allocate %lu bytes to read file \"%s\"" -#: ../glib/gfileutils.c:723 +#: ../glib/gfileutils.c:733 #, c-format msgid "Error reading file “%s”: %s" msgstr "Error reading file “%s”: %s" -#: ../glib/gfileutils.c:759 +#: ../glib/gfileutils.c:769 #, c-format msgid "File “%s” is too large" msgstr "File “%s” is too large" -#: ../glib/gfileutils.c:823 +#: ../glib/gfileutils.c:833 #, c-format msgid "Failed to read from file “%s”: %s" msgstr "Failed to read from file “%s”: %s" -#: ../glib/gfileutils.c:871 ../glib/gfileutils.c:943 +#: ../glib/gfileutils.c:881 ../glib/gfileutils.c:953 #, c-format msgid "Failed to open file “%s”: %s" msgstr "Failed to open file “%s”: %s" -#: ../glib/gfileutils.c:883 +#: ../glib/gfileutils.c:893 #, c-format msgid "Failed to get attributes of file “%s”: fstat() failed: %s" msgstr "Failed to get attributes of file “%s”: fstat() failed: %s" -#: ../glib/gfileutils.c:913 +#: ../glib/gfileutils.c:923 #, c-format msgid "Failed to open file “%s”: fdopen() failed: %s" msgstr "Failed to open file “%s”: fdopen() failed: %s" -#: ../glib/gfileutils.c:1012 +#: ../glib/gfileutils.c:1022 #, c-format msgid "Failed to rename file “%s” to “%s”: g_rename() failed: %s" msgstr "Failed to rename file “%s” to “%s”: g_rename() failed: %s" -#: ../glib/gfileutils.c:1047 ../glib/gfileutils.c:1554 +#: ../glib/gfileutils.c:1057 ../glib/gfileutils.c:1564 #, c-format msgid "Failed to create file “%s”: %s" msgstr "Failed to create file “%s”: %s" -#: ../glib/gfileutils.c:1074 +#: ../glib/gfileutils.c:1084 #, c-format msgid "Failed to write file “%s”: write() failed: %s" msgstr "Failed to write file “%s”: write() failed: %s" -#: ../glib/gfileutils.c:1117 +#: ../glib/gfileutils.c:1127 #, c-format msgid "Failed to write file “%s”: fsync() failed: %s" msgstr "Failed to write file “%s”: fsync() failed: %s" -#: ../glib/gfileutils.c:1241 +#: ../glib/gfileutils.c:1251 #, c-format msgid "Existing file “%s” could not be removed: g_unlink() failed: %s" msgstr "Existing file “%s” could not be removed: g_unlink() failed: %s" -#: ../glib/gfileutils.c:1520 +#: ../glib/gfileutils.c:1530 #, c-format msgid "Template “%s” invalid, should not contain a “%s”" msgstr "Template “%s” invalid, should not contain a “%s”" -#: ../glib/gfileutils.c:1533 +#: ../glib/gfileutils.c:1543 #, c-format msgid "Template “%s” doesn’t contain XXXXXX" msgstr "Template “%s” doesn’t contain XXXXXX" -#: ../glib/gfileutils.c:2058 +#: ../glib/gfileutils.c:2105 #, c-format msgid "Failed to read the symbolic link “%s”: %s" msgstr "Failed to read the symbolic link “%s”: %s" -#: ../glib/giochannel.c:1388 +#: ../glib/giochannel.c:1389 #, c-format msgid "Could not open converter from “%s” to “%s”: %s" msgstr "Could not open converter from “%s” to “%s”: %s" -#: ../glib/giochannel.c:1733 +#: ../glib/giochannel.c:1734 msgid "Can’t do a raw read in g_io_channel_read_line_string" msgstr "Can’t do a raw read in g_io_channel_read_line_string" -#: ../glib/giochannel.c:1780 ../glib/giochannel.c:2038 -#: ../glib/giochannel.c:2125 +#: ../glib/giochannel.c:1781 ../glib/giochannel.c:2039 +#: ../glib/giochannel.c:2126 msgid "Leftover unconverted data in read buffer" msgstr "Left over unconverted data in read buffer" -#: ../glib/giochannel.c:1861 ../glib/giochannel.c:1938 +#: ../glib/giochannel.c:1862 ../glib/giochannel.c:1939 msgid "Channel terminates in a partial character" msgstr "Channel terminates in a partial character" -#: ../glib/giochannel.c:1924 +#: ../glib/giochannel.c:1925 msgid "Can’t do a raw read in g_io_channel_read_to_end" msgstr "Can’t do a raw read in g_io_channel_read_to_end" -#: ../glib/gkeyfile.c:736 +#: ../glib/gkeyfile.c:788 msgid "Valid key file could not be found in search dirs" msgstr "Valid key file could not be found in search dirs" -#: ../glib/gkeyfile.c:772 +#: ../glib/gkeyfile.c:825 msgid "Not a regular file" msgstr "Not a regular file" -#: ../glib/gkeyfile.c:1212 +#: ../glib/gkeyfile.c:1270 #, c-format msgid "" "Key file contains line “%s” which is not a key-value pair, group, or comment" msgstr "" "Key file contains line “%s” which is not a key-value pair, group, or comment" -#: ../glib/gkeyfile.c:1269 +#: ../glib/gkeyfile.c:1327 #, c-format msgid "Invalid group name: %s" msgstr "Invalid group name: %s" -#: ../glib/gkeyfile.c:1291 +#: ../glib/gkeyfile.c:1349 msgid "Key file does not start with a group" msgstr "Key file does not start with a group" -#: ../glib/gkeyfile.c:1317 +#: ../glib/gkeyfile.c:1375 #, c-format msgid "Invalid key name: %s" msgstr "Invalid key name: %s" -#: ../glib/gkeyfile.c:1344 +#: ../glib/gkeyfile.c:1402 #, c-format msgid "Key file contains unsupported encoding “%s”" msgstr "Key file contains unsupported encoding “%s”" -#: ../glib/gkeyfile.c:1587 ../glib/gkeyfile.c:1760 ../glib/gkeyfile.c:3140 -#: ../glib/gkeyfile.c:3203 ../glib/gkeyfile.c:3333 ../glib/gkeyfile.c:3463 -#: ../glib/gkeyfile.c:3607 ../glib/gkeyfile.c:3836 ../glib/gkeyfile.c:3903 +#: ../glib/gkeyfile.c:1645 ../glib/gkeyfile.c:1818 ../glib/gkeyfile.c:3198 +#: ../glib/gkeyfile.c:3261 ../glib/gkeyfile.c:3391 ../glib/gkeyfile.c:3521 +#: ../glib/gkeyfile.c:3665 ../glib/gkeyfile.c:3894 ../glib/gkeyfile.c:3961 #, c-format msgid "Key file does not have group “%s”" msgstr "Key file does not have group “%s”" -#: ../glib/gkeyfile.c:1715 +#: ../glib/gkeyfile.c:1773 #, c-format msgid "Key file does not have key “%s” in group “%s”" msgstr "Key file does not have key “%s” in group “%s”" -#: ../glib/gkeyfile.c:1877 ../glib/gkeyfile.c:1993 +#: ../glib/gkeyfile.c:1935 ../glib/gkeyfile.c:2051 #, c-format msgid "Key file contains key “%s” with value “%s” which is not UTF-8" msgstr "Key file contains key “%s” with value “%s” which is not UTF-8" -#: ../glib/gkeyfile.c:1897 ../glib/gkeyfile.c:2013 ../glib/gkeyfile.c:2382 +#: ../glib/gkeyfile.c:1955 ../glib/gkeyfile.c:2071 ../glib/gkeyfile.c:2440 #, c-format msgid "" "Key file contains key “%s” which has a value that cannot be interpreted." msgstr "" "Key file contains key “%s” which has a value that cannot be interpreted." -#: ../glib/gkeyfile.c:2600 ../glib/gkeyfile.c:2969 +#: ../glib/gkeyfile.c:2658 ../glib/gkeyfile.c:3027 #, c-format msgid "" "Key file contains key “%s” in group “%s” which has a value that cannot be " @@ -4411,36 +4617,36 @@ msgstr "" "Key file contains key “%s” in group “%s” which has a value that cannot be " "interpreted." -#: ../glib/gkeyfile.c:2678 ../glib/gkeyfile.c:2755 +#: ../glib/gkeyfile.c:2736 ../glib/gkeyfile.c:2813 #, c-format msgid "Key “%s” in group “%s” has value “%s” where %s was expected" msgstr "Key “%s” in group “%s” has value “%s” where %s was expected" -#: ../glib/gkeyfile.c:4143 +#: ../glib/gkeyfile.c:4201 msgid "Key file contains escape character at end of line" msgstr "Key file contains escape character at end of line" -#: ../glib/gkeyfile.c:4165 +#: ../glib/gkeyfile.c:4223 #, c-format msgid "Key file contains invalid escape sequence “%s”" msgstr "Key file contains invalid escape sequence “%s”" -#: ../glib/gkeyfile.c:4307 +#: ../glib/gkeyfile.c:4367 #, c-format msgid "Value “%s” cannot be interpreted as a number." msgstr "Value “%s” cannot be interpreted as a number." -#: ../glib/gkeyfile.c:4321 +#: ../glib/gkeyfile.c:4381 #, c-format msgid "Integer value “%s” out of range" msgstr "Integer value “%s” out of range" -#: ../glib/gkeyfile.c:4354 +#: ../glib/gkeyfile.c:4414 #, c-format msgid "Value “%s” cannot be interpreted as a float number." msgstr "Value “%s” cannot be interpreted as a float number." -#: ../glib/gkeyfile.c:4393 +#: ../glib/gkeyfile.c:4453 #, c-format msgid "Value “%s” cannot be interpreted as a boolean." msgstr "Value “%s” cannot be interpreted as a boolean." @@ -5113,77 +5319,77 @@ msgstr "Text ended before matching quote was found for %c. (The text was “%s msgid "Text was empty (or contained only whitespace)" msgstr "Text was empty (or contained only whitespace)" -#: ../glib/gspawn.c:250 +#: ../glib/gspawn.c:253 #, c-format msgid "Failed to read data from child process (%s)" msgstr "Failed to read data from child process (%s)" -#: ../glib/gspawn.c:394 +#: ../glib/gspawn.c:401 #, c-format msgid "Unexpected error in select() reading data from a child process (%s)" msgstr "Unexpected error in select() reading data from a child process (%s)" -#: ../glib/gspawn.c:479 +#: ../glib/gspawn.c:486 #, c-format msgid "Unexpected error in waitpid() (%s)" msgstr "Unexpected error in waitpid() (%s)" -#: ../glib/gspawn.c:886 ../glib/gspawn-win32.c:1231 +#: ../glib/gspawn.c:897 ../glib/gspawn-win32.c:1231 #, c-format msgid "Child process exited with code %ld" msgstr "Child process exited with code %ld" -#: ../glib/gspawn.c:894 +#: ../glib/gspawn.c:905 #, c-format msgid "Child process killed by signal %ld" msgstr "Child process killed by signal %ld" -#: ../glib/gspawn.c:901 +#: ../glib/gspawn.c:912 #, c-format msgid "Child process stopped by signal %ld" msgstr "Child process stopped by signal %ld" -#: ../glib/gspawn.c:908 +#: ../glib/gspawn.c:919 #, c-format msgid "Child process exited abnormally" msgstr "Child process exited abnormally" -#: ../glib/gspawn.c:1313 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345 +#: ../glib/gspawn.c:1324 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345 #, c-format msgid "Failed to read from child pipe (%s)" msgstr "Failed to read from child pipe (%s)" -#: ../glib/gspawn.c:1383 +#: ../glib/gspawn.c:1394 #, c-format msgid "Failed to fork (%s)" msgstr "Failed to fork (%s)" -#: ../glib/gspawn.c:1532 ../glib/gspawn-win32.c:368 +#: ../glib/gspawn.c:1543 ../glib/gspawn-win32.c:368 #, c-format msgid "Failed to change to directory “%s” (%s)" msgstr "Failed to change to directory “%s” (%s)" -#: ../glib/gspawn.c:1542 +#: ../glib/gspawn.c:1553 #, c-format msgid "Failed to execute child process “%s” (%s)" msgstr "Failed to execute child process “%s” (%s)" -#: ../glib/gspawn.c:1552 +#: ../glib/gspawn.c:1563 #, c-format msgid "Failed to redirect output or input of child process (%s)" msgstr "Failed to redirect output or input of child process (%s)" -#: ../glib/gspawn.c:1561 +#: ../glib/gspawn.c:1572 #, c-format msgid "Failed to fork child process (%s)" msgstr "Failed to fork child process (%s)" -#: ../glib/gspawn.c:1569 +#: ../glib/gspawn.c:1580 #, c-format msgid "Unknown error executing child process “%s”" msgstr "Unknown error executing child process “%s”" -#: ../glib/gspawn.c:1593 +#: ../glib/gspawn.c:1604 #, c-format msgid "Failed to read enough data from child pid pipe (%s)" msgstr "Failed to read enough data from child pid pipe (%s)" @@ -5235,21 +5441,21 @@ msgstr "" "Unexpected error in g_io_channel_win32_poll() reading data from a child " "process" -#: ../glib/gstrfuncs.c:3237 ../glib/gstrfuncs.c:3338 +#: ../glib/gstrfuncs.c:3247 ../glib/gstrfuncs.c:3348 msgid "Empty string is not a number" msgstr "Empty string is not a number" -#: ../glib/gstrfuncs.c:3261 +#: ../glib/gstrfuncs.c:3271 #, c-format msgid "“%s” is not a signed number" msgstr "“%s” is not a signed number" -#: ../glib/gstrfuncs.c:3271 ../glib/gstrfuncs.c:3374 +#: ../glib/gstrfuncs.c:3281 ../glib/gstrfuncs.c:3384 #, c-format msgid "Number “%s” is out of bounds [%s, %s]" msgstr "Number “%s” is out of bounds [%s, %s]" -#: ../glib/gstrfuncs.c:3364 +#: ../glib/gstrfuncs.c:3374 #, c-format msgid "“%s” is not an unsigned number" msgstr "“%s” is not an unsigned number" @@ -5271,91 +5477,175 @@ msgstr "Invalid sequence in conversion input" msgid "Character out of range for UTF-16" msgstr "Character out of range for UTF-16" -#: ../glib/gutils.c:2147 ../glib/gutils.c:2174 ../glib/gutils.c:2280 +#: ../glib/gutils.c:2229 #, c-format -msgid "%u byte" -msgid_plural "%u bytes" -msgstr[0] "בית אחד" -msgstr[1] "%u בתים" +msgid "%.1f kB" +msgstr "%.1f ק״ב" + +#: ../glib/gutils.c:2230 ../glib/gutils.c:2436 +#, c-format +msgid "%.1f MB" +msgstr "%.1f מ״ב" + +#: ../glib/gutils.c:2231 ../glib/gutils.c:2441 +#, c-format +msgid "%.1f GB" +msgstr "%.1f ג״ב" + +#: ../glib/gutils.c:2232 ../glib/gutils.c:2446 +#, c-format +msgid "%.1f TB" +msgstr "%.1f ט״ב" -#: ../glib/gutils.c:2153 +#: ../glib/gutils.c:2233 ../glib/gutils.c:2451 +#, c-format +msgid "%.1f PB" +msgstr "%.1f פ״ב" + +#: ../glib/gutils.c:2234 ../glib/gutils.c:2456 +#, c-format +msgid "%.1f EB" +msgstr "%.1f א״ב" + +#: ../glib/gutils.c:2237 #, c-format msgid "%.1f KiB" msgstr "%.1f KiB" -#: ../glib/gutils.c:2155 +#: ../glib/gutils.c:2238 #, c-format msgid "%.1f MiB" msgstr "%.1f MiB" -#: ../glib/gutils.c:2158 +#: ../glib/gutils.c:2239 #, c-format msgid "%.1f GiB" msgstr "%.1f GiB" -#: ../glib/gutils.c:2161 +#: ../glib/gutils.c:2240 #, c-format msgid "%.1f TiB" msgstr "%.1f TiB" -#: ../glib/gutils.c:2164 +#: ../glib/gutils.c:2241 #, c-format msgid "%.1f PiB" msgstr "%.1f PiB" -#: ../glib/gutils.c:2167 +#: ../glib/gutils.c:2242 #, c-format msgid "%.1f EiB" msgstr "%.1f EiB" -#: ../glib/gutils.c:2180 +#: ../glib/gutils.c:2245 #, c-format -msgid "%.1f kB" +msgid "%.1f kb" msgstr "%.1f ק״ב" -#: ../glib/gutils.c:2183 ../glib/gutils.c:2298 +#: ../glib/gutils.c:2246 #, c-format -msgid "%.1f MB" +msgid "%.1f Mb" msgstr "%.1f מ״ב" -#: ../glib/gutils.c:2186 ../glib/gutils.c:2303 +#: ../glib/gutils.c:2247 #, c-format -msgid "%.1f GB" +msgid "%.1f Gb" msgstr "%.1f ג״ב" -#: ../glib/gutils.c:2188 ../glib/gutils.c:2308 +#: ../glib/gutils.c:2248 #, c-format -msgid "%.1f TB" +msgid "%.1f Tb" msgstr "%.1f ט״ב" -#: ../glib/gutils.c:2191 ../glib/gutils.c:2313 +#: ../glib/gutils.c:2249 #, c-format -msgid "%.1f PB" +msgid "%.1f Pb" msgstr "%.1f פ״ב" -#: ../glib/gutils.c:2194 ../glib/gutils.c:2318 +#: ../glib/gutils.c:2250 #, c-format -msgid "%.1f EB" +msgid "%.1f Eb" +msgstr "%.1f א״ב" + +#: ../glib/gutils.c:2253 +#, c-format +msgid "%.1f Kib" +msgstr "%.1f ק״ב" + +#: ../glib/gutils.c:2254 +#, c-format +msgid "%.1f Mib" +msgstr "%.1f מ״ב" + +#: ../glib/gutils.c:2255 +#, c-format +msgid "%.1f Gib" +msgstr "%.1f ג״ב" + +#: ../glib/gutils.c:2256 +#, c-format +msgid "%.1f Tib" +msgstr "%.1f ט״ב" + +#: ../glib/gutils.c:2257 +#, c-format +msgid "%.1f Pib" +msgstr "%.1f פ״ב" + +#: ../glib/gutils.c:2258 +#, c-format +msgid "%.1f Eib" msgstr "%.1f א״ב" +#: ../glib/gutils.c:2292 ../glib/gutils.c:2418 +#, c-format +msgid "%u byte" +msgid_plural "%u bytes" +msgstr[0] "בית אחד" +msgstr[1] "%u בתים" + +#: ../glib/gutils.c:2296 +#, c-format +msgid "%u bit" +msgid_plural "%u bits" +msgstr[0] "סיבית אחת" +msgstr[1] "%u סיביות" + #. Translators: the %s in "%s bytes" will always be replaced by a number. -#: ../glib/gutils.c:2231 +#: ../glib/gutils.c:2363 #, c-format msgid "%s byte" msgid_plural "%s bytes" msgstr[0] "בית אחד" msgstr[1] "%s בתים" +#. Translators: the %s in "%s bits" will always be replaced by a number. +#: ../glib/gutils.c:2368 +#, c-format +msgid "%s bit" +msgid_plural "%s bits" +msgstr[0] "סיבית אחת" +msgstr[1] "%s סיביות" + #. Translators: this is from the deprecated function g_format_size_for_display() which uses 'KB' to #. * mean 1024 bytes. I am aware that 'KB' is not correct, but it has been preserved for reasons of #. * compatibility. Users will not see this string unless a program is using this deprecated function. #. * Please translate as literally as possible. #. -#: ../glib/gutils.c:2293 +#: ../glib/gutils.c:2431 #, c-format msgid "%.1f KB" msgstr "%.1f ק״ב" +#~ msgid "Error: object path not specified.\n" +#~ msgstr "Error: object path not specified.\n" + +#~ msgid "Error: signal not specified.\n" +#~ msgstr "Error: signal not specified.\n" + +#~ msgid "Error: signal must be the fully-qualified name.\n" +#~ msgstr "Error: signal must be the fully-qualified name.\n" + #~ msgid "No files given" #~ msgstr "No files given" @@ -10,8 +10,8 @@ msgstr "" "Project-Id-Version: glib master\n" "Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?" "product=glib&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2017-08-03 15:40+0000\n" -"PO-Revision-Date: 2017-08-04 10:19+0700\n" +"POT-Creation-Date: 2017-11-28 14:26+0000\n" +"PO-Revision-Date: 2017-12-05 14:29+0700\n" "Last-Translator: Kukuh Syafaat <syafaatkukuh@gmail.com>\n" "Language-Team: Indonesian <gnome@i15n.org>\n" "Language: id\n" @@ -19,7 +19,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 2.0.3\n" +"X-Generator: Poedit 2.0.4\n" #: ../gio/gapplication.c:490 msgid "GApplication options" @@ -284,8 +284,8 @@ msgid "Truncate not supported on base stream" msgstr "Pemenggalan tak didukung pada stream basis" #: ../gio/gcancellable.c:317 ../gio/gdbusconnection.c:1849 -#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:870 -#: ../gio/gsimpleasyncresult.c:896 +#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:871 +#: ../gio/gsimpleasyncresult.c:897 #, c-format msgid "Operation was cancelled" msgstr "Operasi dibatalkan" @@ -303,29 +303,29 @@ msgid "Not enough space in destination" msgstr "Tak cukup ruang di tujuan" #: ../gio/gcharsetconverter.c:342 ../gio/gdatainputstream.c:848 -#: ../gio/gdatainputstream.c:1257 ../glib/gconvert.c:438 ../glib/gconvert.c:845 -#: ../glib/giochannel.c:1556 ../glib/giochannel.c:1598 -#: ../glib/giochannel.c:2442 ../glib/gutf8.c:866 ../glib/gutf8.c:1319 +#: ../gio/gdatainputstream.c:1257 ../glib/gconvert.c:437 ../glib/gconvert.c:844 +#: ../glib/giochannel.c:1557 ../glib/giochannel.c:1599 +#: ../glib/giochannel.c:2443 ../glib/gutf8.c:866 ../glib/gutf8.c:1319 msgid "Invalid byte sequence in conversion input" msgstr "Rangkaian bita dalam input konversi tidak benar" -#: ../gio/gcharsetconverter.c:347 ../glib/gconvert.c:446 ../glib/gconvert.c:770 -#: ../glib/giochannel.c:1563 ../glib/giochannel.c:2454 +#: ../gio/gcharsetconverter.c:347 ../glib/gconvert.c:445 ../glib/gconvert.c:769 +#: ../glib/giochannel.c:1564 ../glib/giochannel.c:2455 #, c-format msgid "Error during conversion: %s" msgstr "Galat ketika konversi: %s" -#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1096 +#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1101 msgid "Cancellable initialization not supported" msgstr "Inisialisasi yang dapat dibatalkan tak didukung" -#: ../gio/gcharsetconverter.c:456 ../glib/gconvert.c:321 -#: ../glib/giochannel.c:1384 +#: ../gio/gcharsetconverter.c:456 ../glib/gconvert.c:320 +#: ../glib/giochannel.c:1385 #, c-format msgid "Conversion from character set “%s” to “%s” is not supported" msgstr "Konversi dari gugus karakter \"%s\" ke \"%s\" tak didukung" -#: ../gio/gcharsetconverter.c:460 ../glib/gconvert.c:325 +#: ../gio/gcharsetconverter.c:460 ../glib/gconvert.c:324 #, c-format msgid "Could not open converter from “%s” to “%s”" msgstr "Tidak dapat membuka pengubah dari \"%s\" ke \"%s\"" @@ -547,7 +547,7 @@ msgstr "" "Menghabiskan semua mekanisme otentikasi yang tersedia (dicoba: %s) " "(tersedia: %s)" -#: ../gio/gdbusauth.c:1174 +#: ../gio/gdbusauth.c:1171 msgid "Cancelled via GDBusAuthObserver::authorize-authenticated-peer" msgstr "Dibatalkan melalui GDBusAuthObserver::authorize-authenticated-peer" @@ -573,12 +573,12 @@ msgstr "Galat saat membuat direktori \"%s\": %s" msgid "Error opening keyring “%s” for reading: " msgstr "Galat saat membuka ring kunci \"%s\" untuk dibaca: " -#: ../gio/gdbusauthmechanismsha1.c:403 ../gio/gdbusauthmechanismsha1.c:721 +#: ../gio/gdbusauthmechanismsha1.c:402 ../gio/gdbusauthmechanismsha1.c:720 #, c-format msgid "Line %d of the keyring at “%s” with content “%s” is malformed" msgstr "Baris %d dari ring kunci pada \"%s\" dengan isi \"%s\" salah bentuk" -#: ../gio/gdbusauthmechanismsha1.c:417 ../gio/gdbusauthmechanismsha1.c:735 +#: ../gio/gdbusauthmechanismsha1.c:416 ../gio/gdbusauthmechanismsha1.c:734 #, c-format msgid "" "First token of line %d of the keyring at “%s” with content “%s” is malformed" @@ -586,7 +586,7 @@ msgstr "" "Token pertama dari baris %d dari ring kunci pada \"%s\" dengan isi \"%s\" " "salah bentuk" -#: ../gio/gdbusauthmechanismsha1.c:432 ../gio/gdbusauthmechanismsha1.c:749 +#: ../gio/gdbusauthmechanismsha1.c:430 ../gio/gdbusauthmechanismsha1.c:748 #, c-format msgid "" "Second token of line %d of the keyring at “%s” with content “%s” is malformed" @@ -594,7 +594,7 @@ msgstr "" "Token kedua dari baris %d dari ring kunci pada \"%s\" dengan isi \"%s\" " "salah bentuk" -#: ../gio/gdbusauthmechanismsha1.c:456 +#: ../gio/gdbusauthmechanismsha1.c:454 #, c-format msgid "Didn’t find cookie with id %d in the keyring at “%s”" msgstr "Tak menemukan cookie dengan id %d dalam gantungan kunci pada \"%s\"" @@ -604,27 +604,27 @@ msgstr "Tak menemukan cookie dengan id %d dalam gantungan kunci pada \"%s\"" msgid "Error deleting stale lock file “%s”: %s" msgstr "Galat saat menghapus berkas kunci yang basi \"%s\": %s" -#: ../gio/gdbusauthmechanismsha1.c:569 +#: ../gio/gdbusauthmechanismsha1.c:568 #, c-format msgid "Error creating lock file “%s”: %s" msgstr "Galat saat membuat berkas kunci \"%s\": %s" -#: ../gio/gdbusauthmechanismsha1.c:600 +#: ../gio/gdbusauthmechanismsha1.c:599 #, c-format msgid "Error closing (unlinked) lock file “%s”: %s" msgstr "Galat saat menutup berkas kunci (tak terkait) \"%s\": %s" -#: ../gio/gdbusauthmechanismsha1.c:611 +#: ../gio/gdbusauthmechanismsha1.c:610 #, c-format msgid "Error unlinking lock file “%s”: %s" msgstr "Galat saat membuka kait berkas kunci \"%s\": %s" -#: ../gio/gdbusauthmechanismsha1.c:688 +#: ../gio/gdbusauthmechanismsha1.c:687 #, c-format msgid "Error opening keyring “%s” for writing: " msgstr "Galat saat membuka gantungan kunci \"%s\" untuk ditulisi: " -#: ../gio/gdbusauthmechanismsha1.c:885 +#: ../gio/gdbusauthmechanismsha1.c:883 #, c-format msgid "(Additionally, releasing the lock for “%s” also failed: %s) " msgstr "(Selain itu, melepas kunci bagi \"%s\" juga gagal: %s) " @@ -788,17 +788,17 @@ msgstr "" "%d (panjang string adalah %d). String UTF-8 yang valid sampai titik itu " "adalah \"%s\"" -#: ../gio/gdbusmessage.c:1589 +#: ../gio/gdbusmessage.c:1593 #, c-format msgid "Parsed value “%s” is not a valid D-Bus object path" msgstr "Nilai terurai \"%s\" bukan lokasi objek D-Bus yang valid" -#: ../gio/gdbusmessage.c:1611 +#: ../gio/gdbusmessage.c:1615 #, c-format msgid "Parsed value “%s” is not a valid D-Bus signature" msgstr "Nilai terurai \"%s\" bukan tanda tangan D-Bus yang valid" -#: ../gio/gdbusmessage.c:1658 +#: ../gio/gdbusmessage.c:1662 #, c-format msgid "" "Encountered array of length %u byte. Maximum length is 2<<26 bytes (64 MiB)." @@ -808,7 +808,7 @@ msgstr[0] "" "Menjumpai larik dengan panjang %u bita. Panjang maksimal adalah 2<<26 bita " "(64 MiB)." -#: ../gio/gdbusmessage.c:1678 +#: ../gio/gdbusmessage.c:1682 #, c-format msgid "" "Encountered array of type “a%c”, expected to have a length a multiple of %u " @@ -817,12 +817,12 @@ msgstr "" "Menemui larik bertipe \"a%c\", mengharapkan punya panjang kelipatan %u byte, " "tapi menemui panjang %u byte" -#: ../gio/gdbusmessage.c:1845 +#: ../gio/gdbusmessage.c:1849 #, c-format msgid "Parsed value “%s” for variant is not a valid D-Bus signature" msgstr "Nilai terurai \"%s\" bagi varian bukan tanda tangan D-Bus yang valid" -#: ../gio/gdbusmessage.c:1869 +#: ../gio/gdbusmessage.c:1873 #, c-format msgid "" "Error deserializing GVariant with type string “%s” from the D-Bus wire format" @@ -830,7 +830,7 @@ msgstr "" "Galat saat deserialisasi GVariant dengan type string \"%s\" dari format " "kabel D-Bus" -#: ../gio/gdbusmessage.c:2053 +#: ../gio/gdbusmessage.c:2055 #, c-format msgid "" "Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value " @@ -839,24 +839,24 @@ msgstr "" "Nilai ke-endian-an tak valid. Berharap 0x6c (\"l\") atau (0x42) \"B\" tapi " "menemui 0x%02x" -#: ../gio/gdbusmessage.c:2066 +#: ../gio/gdbusmessage.c:2068 #, c-format msgid "Invalid major protocol version. Expected 1 but found %d" msgstr "Versi protokol mayor tak valid. Berharap 1 tapi menemui %d" -#: ../gio/gdbusmessage.c:2122 +#: ../gio/gdbusmessage.c:2124 #, c-format msgid "Signature header with signature “%s” found but message body is empty" msgstr "" "Header tanda tangan dengan tanda tangan \"%s\" ditemukan tapi body pesan " "kosong" -#: ../gio/gdbusmessage.c:2136 +#: ../gio/gdbusmessage.c:2138 #, c-format msgid "Parsed value “%s” is not a valid D-Bus signature (for body)" msgstr "Nilai terurai \"%s\" bukan tanda tangan D-Bus yang valid (bagi body)" -#: ../gio/gdbusmessage.c:2166 +#: ../gio/gdbusmessage.c:2168 #, c-format msgid "No signature header in message but the message body is %u byte" msgid_plural "No signature header in message but the message body is %u bytes" @@ -864,11 +864,11 @@ msgstr[0] "" "Tidak terdapat tajuk tanda tangan pada pesan, tetapi panjang badan pesan " "adalah %u bita" -#: ../gio/gdbusmessage.c:2176 +#: ../gio/gdbusmessage.c:2178 msgid "Cannot deserialize message: " msgstr "Tidak bisa men-deserialisasi pesan: " -#: ../gio/gdbusmessage.c:2517 +#: ../gio/gdbusmessage.c:2519 #, c-format msgid "" "Error serializing GVariant with type string “%s” to the D-Bus wire format" @@ -876,7 +876,7 @@ msgstr "" "Kesalahan serialisasi GVariant dengan type string \"%s\" ke format kabel D-" "Bus" -#: ../gio/gdbusmessage.c:2654 +#: ../gio/gdbusmessage.c:2656 #, c-format msgid "" "Message has %d file descriptors but the header field indicates %d file " @@ -885,16 +885,16 @@ msgstr "" "Pesan punya %d deskriptor berkas tapi ruas header mengindikasikan %d " "deskriptor berkas" -#: ../gio/gdbusmessage.c:2662 +#: ../gio/gdbusmessage.c:2664 msgid "Cannot serialize message: " msgstr "Tidak bisa men-serialisasi pesan: " -#: ../gio/gdbusmessage.c:2706 +#: ../gio/gdbusmessage.c:2708 #, c-format msgid "Message body has signature “%s” but there is no signature header" msgstr "Body pesan punya tanda tangan \"%s\" tapi tak ada header tanda tangan" -#: ../gio/gdbusmessage.c:2716 +#: ../gio/gdbusmessage.c:2718 #, c-format msgid "" "Message body has type signature “%s” but signature in the header field is " @@ -903,17 +903,17 @@ msgstr "" "Tubuh pesan memiliki tanda tangan tipe \"%s\" tapi tanda tangan di ruas " "header adalah \"(%s)\"" -#: ../gio/gdbusmessage.c:2732 +#: ../gio/gdbusmessage.c:2734 #, c-format msgid "Message body is empty but signature in the header field is “(%s)”" msgstr "Tubuh pesan kosong tapi tanda tangan pada ruas header adalah \"(%s)\"" -#: ../gio/gdbusmessage.c:3285 +#: ../gio/gdbusmessage.c:3287 #, c-format msgid "Error return with body of type “%s”" msgstr "Galat balikan dengan tubuh bertipe \"%s\"" -#: ../gio/gdbusmessage.c:3293 +#: ../gio/gdbusmessage.c:3295 msgid "Error return with empty body" msgstr "Galat balikan dengan body kosong" @@ -991,60 +991,60 @@ msgstr "" "Gunakan \"%s PERINTAH --help\" untuk memperoleh bantuan pada setiap " "perintah.\n" -#: ../gio/gdbus-tool.c:165 ../gio/gdbus-tool.c:227 ../gio/gdbus-tool.c:299 -#: ../gio/gdbus-tool.c:323 ../gio/gdbus-tool.c:725 ../gio/gdbus-tool.c:1068 -#: ../gio/gdbus-tool.c:1510 +#: ../gio/gdbus-tool.c:167 ../gio/gdbus-tool.c:234 ../gio/gdbus-tool.c:306 +#: ../gio/gdbus-tool.c:330 ../gio/gdbus-tool.c:811 ../gio/gdbus-tool.c:1150 +#: ../gio/gdbus-tool.c:1592 #, c-format msgid "Error: %s\n" msgstr "Galat: %s\n" -#: ../gio/gdbus-tool.c:176 ../gio/gdbus-tool.c:240 ../gio/gdbus-tool.c:1526 +#: ../gio/gdbus-tool.c:178 ../gio/gdbus-tool.c:247 ../gio/gdbus-tool.c:1608 #, c-format msgid "Error parsing introspection XML: %s\n" msgstr "Galat saat mengurai XML introspeksi: %s\n" -#: ../gio/gdbus-tool.c:209 +#: ../gio/gdbus-tool.c:216 #, c-format msgid "Error: %s is not a valid name\n" msgstr "Galat: %s bukan nama yang valid\n" -#: ../gio/gdbus-tool.c:357 +#: ../gio/gdbus-tool.c:364 msgid "Connect to the system bus" msgstr "Menyambung ke bus sistem" -#: ../gio/gdbus-tool.c:358 +#: ../gio/gdbus-tool.c:365 msgid "Connect to the session bus" msgstr "Menyambung ke bus sesi" -#: ../gio/gdbus-tool.c:359 +#: ../gio/gdbus-tool.c:366 msgid "Connect to given D-Bus address" msgstr "Menyambung ke alamat D-Bus yang diberikan" -#: ../gio/gdbus-tool.c:369 +#: ../gio/gdbus-tool.c:376 msgid "Connection Endpoint Options:" msgstr "Opsi Titik Ujung Sambungan:" -#: ../gio/gdbus-tool.c:370 +#: ../gio/gdbus-tool.c:377 msgid "Options specifying the connection endpoint" msgstr "Opsi yang menyatakan titik ujung sambungan" -#: ../gio/gdbus-tool.c:392 +#: ../gio/gdbus-tool.c:399 #, c-format msgid "No connection endpoint specified" msgstr "Titik ujung sambungan tak dinyatakan" -#: ../gio/gdbus-tool.c:402 +#: ../gio/gdbus-tool.c:409 #, c-format msgid "Multiple connection endpoints specified" msgstr "Telah dinyatakan titik ujung sambungan berganda" -#: ../gio/gdbus-tool.c:472 +#: ../gio/gdbus-tool.c:479 #, c-format msgid "" "Warning: According to introspection data, interface “%s” does not exist\n" msgstr "Peringatan: Menurut data introspeksi, antar muka \"%s\" tak ada\n" -#: ../gio/gdbus-tool.c:481 +#: ../gio/gdbus-tool.c:488 #, c-format msgid "" "Warning: According to introspection data, method “%s” does not exist on " @@ -1053,168 +1053,169 @@ msgstr "" "Peringatan: Menurut data introspeksi, metoda \"%s\" tak ada pada antar muka " "\"%s\"\n" -#: ../gio/gdbus-tool.c:543 +#: ../gio/gdbus-tool.c:550 msgid "Optional destination for signal (unique name)" msgstr "Tujuan opsional bagi sinyal (nama unik)" -#: ../gio/gdbus-tool.c:544 +#: ../gio/gdbus-tool.c:551 msgid "Object path to emit signal on" msgstr "Path objek untuk dipancari sinyal" -#: ../gio/gdbus-tool.c:545 +#: ../gio/gdbus-tool.c:552 msgid "Signal and interface name" msgstr "Nama antar muka dan sinyal" -#: ../gio/gdbus-tool.c:579 +#: ../gio/gdbus-tool.c:587 msgid "Emit a signal." msgstr "Pancarkan sinyal." -#: ../gio/gdbus-tool.c:613 ../gio/gdbus-tool.c:858 ../gio/gdbus-tool.c:1616 -#: ../gio/gdbus-tool.c:1851 ../gio/gdbus-tool.c:2067 +#: ../gio/gdbus-tool.c:642 ../gio/gdbus-tool.c:944 ../gio/gdbus-tool.c:1698 +#: ../gio/gdbus-tool.c:1931 ../gio/gdbus-tool.c:2152 #, c-format msgid "Error connecting: %s\n" msgstr "Galat saat menyambung: %s\n" -#: ../gio/gdbus-tool.c:625 +#: ../gio/gdbus-tool.c:659 ../gio/gdbus-tool.c:961 ../gio/gdbus-tool.c:1715 +#: ../gio/gdbus-tool.c:1956 #, c-format -msgid "Error: object path not specified.\n" -msgstr "Galat: path objek tak dinyatakan\n" +msgid "Error: Destination is not specified\n" +msgstr "Galat: Tujuan tak dinyatakan\n" -#: ../gio/gdbus-tool.c:630 ../gio/gdbus-tool.c:925 ../gio/gdbus-tool.c:1681 -#: ../gio/gdbus-tool.c:1917 +#: ../gio/gdbus-tool.c:670 +#, c-format +msgid "Error: %s is not a valid unique bus name.\n" +msgstr "Galat: '%s' bukan nama bus unik yang valid\n" + +#: ../gio/gdbus-tool.c:685 ../gio/gdbus-tool.c:987 ../gio/gdbus-tool.c:1741 +#, c-format +msgid "Error: Object path is not specified\n" +msgstr "Galat: Lokasi objek tak dinyatakan\n" + +#: ../gio/gdbus-tool.c:705 ../gio/gdbus-tool.c:1007 ../gio/gdbus-tool.c:1761 +#: ../gio/gdbus-tool.c:2002 #, c-format msgid "Error: %s is not a valid object path\n" msgstr "Galat: '%s' bukan suatu lokasi objek yang valid\n" -#: ../gio/gdbus-tool.c:636 +#: ../gio/gdbus-tool.c:720 #, c-format -msgid "Error: signal not specified.\n" -msgstr "Galat: sinyal tak dinyatakan\n" +msgid "Error: Signal name is not specified\n" +msgstr "Galat: Nama sinyal tak dinyatakan\n" -#: ../gio/gdbus-tool.c:643 +#: ../gio/gdbus-tool.c:731 #, c-format -msgid "Error: signal must be the fully-qualified name.\n" -msgstr "Galat: sinyal harus berupa nama yang berkualifikasi penuh.\n" +msgid "Error: Signal name “%s” is invalid\n" +msgstr "Galat: Nama sinyal \"%s\" tak valid\n" -#: ../gio/gdbus-tool.c:651 +#: ../gio/gdbus-tool.c:743 #, c-format msgid "Error: %s is not a valid interface name\n" msgstr "Galat: '%s' bukan nama antar muka yang valid\n" -#: ../gio/gdbus-tool.c:657 +#: ../gio/gdbus-tool.c:749 #, c-format msgid "Error: %s is not a valid member name\n" msgstr "Galat: '%s' bukan nama anggota yang valid\n" -#: ../gio/gdbus-tool.c:663 -#, c-format -msgid "Error: %s is not a valid unique bus name.\n" -msgstr "Galat: '%s' bukan nama bus unik yang valid\n" - #. Use the original non-"parse-me-harder" error -#: ../gio/gdbus-tool.c:700 ../gio/gdbus-tool.c:1037 +#: ../gio/gdbus-tool.c:786 ../gio/gdbus-tool.c:1119 #, c-format msgid "Error parsing parameter %d: %s\n" msgstr "Galat saat mengurai parameter %d: %s\n" -#: ../gio/gdbus-tool.c:732 +#: ../gio/gdbus-tool.c:818 #, c-format msgid "Error flushing connection: %s\n" msgstr "Galat saat menggelontor sambungan: %s\n" -#: ../gio/gdbus-tool.c:759 +#: ../gio/gdbus-tool.c:845 msgid "Destination name to invoke method on" msgstr "Nama tujuan tempat menjalankan metoda" -#: ../gio/gdbus-tool.c:760 +#: ../gio/gdbus-tool.c:846 msgid "Object path to invoke method on" msgstr "Lokasi objek tempat menjalankan metoda" -#: ../gio/gdbus-tool.c:761 +#: ../gio/gdbus-tool.c:847 msgid "Method and interface name" msgstr "Nama metoda dan antar muka" -#: ../gio/gdbus-tool.c:762 +#: ../gio/gdbus-tool.c:848 msgid "Timeout in seconds" msgstr "Tenggat waktu dalam detik" -#: ../gio/gdbus-tool.c:803 +#: ../gio/gdbus-tool.c:889 msgid "Invoke a method on a remote object." msgstr "Jalankan suatu metoda pada suatu objek jauh." -#: ../gio/gdbus-tool.c:878 ../gio/gdbus-tool.c:1635 ../gio/gdbus-tool.c:1870 -#, c-format -msgid "Error: Destination is not specified\n" -msgstr "Galat: Tujuan tak dinyatakan\n" - -#: ../gio/gdbus-tool.c:890 ../gio/gdbus-tool.c:1652 ../gio/gdbus-tool.c:1882 +#: ../gio/gdbus-tool.c:972 ../gio/gdbus-tool.c:1732 ../gio/gdbus-tool.c:1967 #, c-format msgid "Error: %s is not a valid bus name\n" msgstr "Galat: %s bukan nama bus yang valid\n" -#: ../gio/gdbus-tool.c:905 ../gio/gdbus-tool.c:1661 -#, c-format -msgid "Error: Object path is not specified\n" -msgstr "Galat: Lokasi objek tak dinyatakan\n" - -#: ../gio/gdbus-tool.c:940 +#: ../gio/gdbus-tool.c:1022 #, c-format msgid "Error: Method name is not specified\n" msgstr "Galat: Nama metoda tak dinyatakan\n" -#: ../gio/gdbus-tool.c:951 +#: ../gio/gdbus-tool.c:1033 #, c-format msgid "Error: Method name “%s” is invalid\n" msgstr "Galat: Nama metoda \"%s\" tak valid\n" -#: ../gio/gdbus-tool.c:1029 +#: ../gio/gdbus-tool.c:1111 #, c-format msgid "Error parsing parameter %d of type “%s”: %s\n" msgstr "Galat ketika mengurai parameter ke-%d bertipe \"%s\": %s\n" -#: ../gio/gdbus-tool.c:1473 +#: ../gio/gdbus-tool.c:1555 msgid "Destination name to introspect" msgstr "Nama tujuan untuk introspeksi" -#: ../gio/gdbus-tool.c:1474 +#: ../gio/gdbus-tool.c:1556 msgid "Object path to introspect" msgstr "Lokasi objek untuk introspeksi" -#: ../gio/gdbus-tool.c:1475 +#: ../gio/gdbus-tool.c:1557 msgid "Print XML" msgstr "Cetak XML" -#: ../gio/gdbus-tool.c:1476 +#: ../gio/gdbus-tool.c:1558 msgid "Introspect children" msgstr "Introspeksi anak" -#: ../gio/gdbus-tool.c:1477 +#: ../gio/gdbus-tool.c:1559 msgid "Only print properties" msgstr "Hanya cetak properti" -#: ../gio/gdbus-tool.c:1568 +#: ../gio/gdbus-tool.c:1650 msgid "Introspect a remote object." msgstr "Introspeksi suatu objek jauh." -#: ../gio/gdbus-tool.c:1773 +#: ../gio/gdbus-tool.c:1853 msgid "Destination name to monitor" msgstr "Nama tujuan untuk dipantau" -#: ../gio/gdbus-tool.c:1774 +#: ../gio/gdbus-tool.c:1854 msgid "Object path to monitor" msgstr "Lokasi objek untuk dipantau" -#: ../gio/gdbus-tool.c:1803 +#: ../gio/gdbus-tool.c:1883 msgid "Monitor a remote object." msgstr "Memantau suatu objek jauh." -#: ../gio/gdbus-tool.c:1980 +#: ../gio/gdbus-tool.c:1941 +#, c-format +msgid "Error: can’t monitor a non-message-bus connection\n" +msgstr "Galat: tidak dapat memonitor koneksi non bus pesan\n" + +#: ../gio/gdbus-tool.c:2065 msgid "Service to activate before waiting for the other one (well-known name)" msgstr "" "Layanan yang akan diaktifkan sebelum menunggu yang lain (nama yang dikenal " "baik)" -#: ../gio/gdbus-tool.c:1983 +#: ../gio/gdbus-tool.c:2068 msgid "" "Timeout to wait for before exiting with an error (seconds); 0 for no timeout " "(default)" @@ -1222,35 +1223,35 @@ msgstr "" "Tenggat waktu menunggu sebelum keluar dengan suatu kesalahan (detik); 0 " "untuk tanpa tenggat (baku)" -#: ../gio/gdbus-tool.c:2031 +#: ../gio/gdbus-tool.c:2116 msgid "[OPTION…] BUS-NAME" msgstr "[OPSI…] NAMA-BUS" -#: ../gio/gdbus-tool.c:2033 +#: ../gio/gdbus-tool.c:2118 msgid "Wait for a bus name to appear." msgstr "Tunggu suatu nama bus muncul." -#: ../gio/gdbus-tool.c:2109 +#: ../gio/gdbus-tool.c:2194 #, c-format msgid "Error: A service to activate for must be specified.\n" msgstr "Galat: Suatu layanan yang akan diaktifkan mesti dinyatakan\n" -#: ../gio/gdbus-tool.c:2114 +#: ../gio/gdbus-tool.c:2199 #, c-format msgid "Error: A service to wait for must be specified.\n" msgstr "Galat: Suatu layanan yang mesti ditunggu harus dinyatakan\n" -#: ../gio/gdbus-tool.c:2119 +#: ../gio/gdbus-tool.c:2204 #, c-format msgid "Error: Too many arguments.\n" msgstr "Galat: Terlalu banyak argumen.\n" -#: ../gio/gdbus-tool.c:2127 ../gio/gdbus-tool.c:2134 +#: ../gio/gdbus-tool.c:2212 ../gio/gdbus-tool.c:2219 #, c-format msgid "Error: %s is not a valid well-known bus name.\n" msgstr "Galat: %s bukan nama bus yang dikenal baik dan valid\n" -#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4533 +#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4531 msgid "Unnamed" msgstr "Tanpa nama" @@ -1258,31 +1259,31 @@ msgstr "Tanpa nama" msgid "Desktop file didn’t specify Exec field" msgstr "Berkas desktop tak menyatakan ruas Exec" -#: ../gio/gdesktopappinfo.c:2696 +#: ../gio/gdesktopappinfo.c:2694 msgid "Unable to find terminal required for application" msgstr "Tak bisa temukan terminal yang diperlukan bagi aplikasi" -#: ../gio/gdesktopappinfo.c:3129 +#: ../gio/gdesktopappinfo.c:3127 #, c-format msgid "Can’t create user application configuration folder %s: %s" msgstr "" "Tak bisa membuat folder %s untuk konfigurasi aplikasi bagi pengguna: %s" -#: ../gio/gdesktopappinfo.c:3133 +#: ../gio/gdesktopappinfo.c:3131 #, c-format msgid "Can’t create user MIME configuration folder %s: %s" msgstr "Tak bisa membuat folder %s untuk konfigurasi MIME bagi pengguna: %s" -#: ../gio/gdesktopappinfo.c:3373 ../gio/gdesktopappinfo.c:3397 +#: ../gio/gdesktopappinfo.c:3371 ../gio/gdesktopappinfo.c:3395 msgid "Application information lacks an identifier" msgstr "Informasi aplikasi tak punya identifier" -#: ../gio/gdesktopappinfo.c:3631 +#: ../gio/gdesktopappinfo.c:3629 #, c-format msgid "Can’t create user desktop file %s" msgstr "Tak bisa membuat berkas desktop pengguna %s" -#: ../gio/gdesktopappinfo.c:3765 +#: ../gio/gdesktopappinfo.c:3763 #, c-format msgid "Custom definition for %s" msgstr "Definisi gubahan bagi %s" @@ -1343,14 +1344,14 @@ msgstr "Cacah token (%d) salah bentuk di pengkodean GEmblemedIcon" msgid "Expected a GEmblem for GEmblemedIcon" msgstr "Berharap suatu GEmblem bagi GEmblemedIcon" -#: ../gio/gfile.c:969 ../gio/gfile.c:1207 ../gio/gfile.c:1345 -#: ../gio/gfile.c:1583 ../gio/gfile.c:1638 ../gio/gfile.c:1696 -#: ../gio/gfile.c:1780 ../gio/gfile.c:1837 ../gio/gfile.c:1901 -#: ../gio/gfile.c:1956 ../gio/gfile.c:3614 ../gio/gfile.c:3669 -#: ../gio/gfile.c:3905 ../gio/gfile.c:3947 ../gio/gfile.c:4415 -#: ../gio/gfile.c:4826 ../gio/gfile.c:4911 ../gio/gfile.c:5001 -#: ../gio/gfile.c:5098 ../gio/gfile.c:5185 ../gio/gfile.c:5286 -#: ../gio/gfile.c:7827 ../gio/gfile.c:7917 ../gio/gfile.c:8001 +#: ../gio/gfile.c:970 ../gio/gfile.c:1208 ../gio/gfile.c:1346 +#: ../gio/gfile.c:1584 ../gio/gfile.c:1639 ../gio/gfile.c:1697 +#: ../gio/gfile.c:1781 ../gio/gfile.c:1838 ../gio/gfile.c:1902 +#: ../gio/gfile.c:1957 ../gio/gfile.c:3603 ../gio/gfile.c:3658 +#: ../gio/gfile.c:3894 ../gio/gfile.c:3936 ../gio/gfile.c:4404 +#: ../gio/gfile.c:4815 ../gio/gfile.c:4900 ../gio/gfile.c:4990 +#: ../gio/gfile.c:5087 ../gio/gfile.c:5174 ../gio/gfile.c:5275 +#: ../gio/gfile.c:7853 ../gio/gfile.c:7943 ../gio/gfile.c:8027 #: ../gio/win32/gwinhttpfile.c:437 msgid "Operation not supported" msgstr "Operasi tak didukung" @@ -1359,69 +1360,69 @@ msgstr "Operasi tak didukung" #. * trying to find the enclosing (user visible) #. * mount of a file, but none exists. #. -#: ../gio/gfile.c:1468 +#: ../gio/gfile.c:1469 msgid "Containing mount does not exist" msgstr "Kait yang memuat tak ada" -#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2377 +#: ../gio/gfile.c:2516 ../gio/glocalfile.c:2380 msgid "Can’t copy over directory" msgstr "Tak bisa menyalin direktori atas direktori" -#: ../gio/gfile.c:2575 +#: ../gio/gfile.c:2576 msgid "Can’t copy directory over directory" msgstr "Tak bisa menyalin direktori atas direktori" -#: ../gio/gfile.c:2583 +#: ../gio/gfile.c:2584 msgid "Target file exists" msgstr "Berkas tujuan telah ada" -#: ../gio/gfile.c:2602 +#: ../gio/gfile.c:2603 msgid "Can’t recursively copy directory" msgstr "Tak bisa menyalin direktori secara rekursif" -#: ../gio/gfile.c:2889 +#: ../gio/gfile.c:2878 msgid "Splice not supported" msgstr "Splice tidak didukung" -#: ../gio/gfile.c:2893 +#: ../gio/gfile.c:2882 #, c-format msgid "Error splicing file: %s" msgstr "Galat saat men-splice berkas: %s" -#: ../gio/gfile.c:3025 +#: ../gio/gfile.c:3014 msgid "Copy (reflink/clone) between mounts is not supported" msgstr "Menyalin (reflink/clone) antar kait tak didukung" -#: ../gio/gfile.c:3029 +#: ../gio/gfile.c:3018 msgid "Copy (reflink/clone) is not supported or invalid" msgstr "Menyalin (reflink/clone) tak didukung atau tak valid" -#: ../gio/gfile.c:3034 +#: ../gio/gfile.c:3023 msgid "Copy (reflink/clone) is not supported or didn’t work" msgstr "Menyalin (reflink/clone) tak didukung atau tak bekerja" -#: ../gio/gfile.c:3097 +#: ../gio/gfile.c:3086 msgid "Can’t copy special file" msgstr "Tak bisa menyalin berkas spesial" -#: ../gio/gfile.c:3895 +#: ../gio/gfile.c:3884 msgid "Invalid symlink value given" msgstr "Diberikan nilai link simbolik yang tak valid" -#: ../gio/gfile.c:4056 +#: ../gio/gfile.c:4045 msgid "Trash not supported" msgstr "Tong sampah tak didukung" -#: ../gio/gfile.c:4168 +#: ../gio/gfile.c:4157 #, c-format msgid "File names cannot contain “%c”" msgstr "Nama berkas tak boleh mengandung \"%c\"" -#: ../gio/gfile.c:6614 ../gio/gvolume.c:363 +#: ../gio/gfile.c:6638 ../gio/gvolume.c:363 msgid "volume doesn’t implement mount" msgstr "volume tak mengimplementasi pengaitan" -#: ../gio/gfile.c:6723 +#: ../gio/gfile.c:6747 msgid "No application is registered as handling this file" msgstr "Tak ada aplikasi terdaftar yang menangani berkas ini" @@ -1467,7 +1468,7 @@ msgid "Truncate not supported on stream" msgstr "Pemenggalan tak didukung pada stream" #: ../gio/ghttpproxy.c:91 ../gio/gresolver.c:410 ../gio/gresolver.c:476 -#: ../glib/gconvert.c:1650 +#: ../glib/gconvert.c:1649 msgid "Invalid hostname" msgstr "Nama host salah" @@ -1669,27 +1670,27 @@ msgstr "Lihat daftar lokasi dalam suatu pohon" msgid "Use %s to get detailed help.\n" msgstr "Gunakan %s untuk memperoleh bantuan terrinci.\n" -#: ../gio/gio-tool-cat.c:83 +#: ../gio/gio-tool-cat.c:87 msgid "Error writing to stdout" msgstr "Galat saat menulis ke stdout" #. Translators: commandline placeholder -#: ../gio/gio-tool-cat.c:127 ../gio/gio-tool-info.c:282 +#: ../gio/gio-tool-cat.c:133 ../gio/gio-tool-info.c:282 #: ../gio/gio-tool-list.c:165 ../gio/gio-tool-mkdir.c:48 #: ../gio/gio-tool-monitor.c:37 ../gio/gio-tool-monitor.c:39 #: ../gio/gio-tool-monitor.c:41 ../gio/gio-tool-monitor.c:43 #: ../gio/gio-tool-monitor.c:203 ../gio/gio-tool-mount.c:1141 -#: ../gio/gio-tool-open.c:45 ../gio/gio-tool-remove.c:48 +#: ../gio/gio-tool-open.c:113 ../gio/gio-tool-remove.c:48 #: ../gio/gio-tool-rename.c:45 ../gio/gio-tool-set.c:89 #: ../gio/gio-tool-trash.c:81 ../gio/gio-tool-tree.c:239 msgid "LOCATION" msgstr "LOKASI" -#: ../gio/gio-tool-cat.c:132 +#: ../gio/gio-tool-cat.c:138 msgid "Concatenate files and print to standard output." msgstr "Sambung berkas berurutan dan cetak ke keluaran standar." -#: ../gio/gio-tool-cat.c:134 +#: ../gio/gio-tool-cat.c:140 msgid "" "gio cat works just like the traditional cat utility, but using GIO\n" "locations instead of local files: for example, you can use something\n" @@ -1699,9 +1700,9 @@ msgstr "" "sebagai ganti berkas lokal: sebagai contoh Anda dapat memakai\n" "seperti smb://server/sumberdaya/berkas.txt sebagai lokasi." -#: ../gio/gio-tool-cat.c:156 ../gio/gio-tool-info.c:313 +#: ../gio/gio-tool-cat.c:162 ../gio/gio-tool-info.c:313 #: ../gio/gio-tool-mkdir.c:76 ../gio/gio-tool-monitor.c:228 -#: ../gio/gio-tool-open.c:71 ../gio/gio-tool-remove.c:72 +#: ../gio/gio-tool-open.c:139 ../gio/gio-tool-remove.c:72 msgid "No locations given" msgstr "Tidak ada lokasi yang diberikan" @@ -1742,7 +1743,7 @@ msgstr "SUMBER" #. Translators: commandline placeholder #: ../gio/gio-tool-copy.c:98 ../gio/gio-tool-move.c:94 -#: ../gio/gio-tool-save.c:165 +#: ../gio/gio-tool-save.c:160 msgid "DESTINATION" msgstr "TUJUAN" @@ -2097,7 +2098,7 @@ msgstr "" msgid "Target %s is not a directory" msgstr "Target %s bukan suatu direktori" -#: ../gio/gio-tool-open.c:50 +#: ../gio/gio-tool-open.c:118 msgid "" "Open files with the default application that\n" "is registered to handle files of this type." @@ -2125,7 +2126,7 @@ msgstr "Ubah nama berkas." msgid "Missing argument" msgstr "Kurang argumen" -#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:195 +#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:190 #: ../gio/gio-tool-set.c:137 msgid "Too many arguments" msgstr "Terlalu banyak argumen" @@ -2165,21 +2166,21 @@ msgstr "Etag berkas sedang ditimpa" msgid "ETAG" msgstr "ETAG" -#: ../gio/gio-tool-save.c:119 +#: ../gio/gio-tool-save.c:113 msgid "Error reading from standard input" msgstr "Galat saat membaca dari masukan standar" #. Translators: The "etag" is a token allowing to verify whether a file has been modified -#: ../gio/gio-tool-save.c:145 +#: ../gio/gio-tool-save.c:139 #, c-format msgid "Etag not available\n" msgstr "Etag tak tersedia\n" -#: ../gio/gio-tool-save.c:168 +#: ../gio/gio-tool-save.c:163 msgid "Read from standard input and save to DEST." msgstr "Baca dari masukan standar dan simpan ke TUJUAN." -#: ../gio/gio-tool-save.c:188 +#: ../gio/gio-tool-save.c:183 msgid "No destination given" msgstr "Tidak ada tujuan yang diberikan" @@ -2814,7 +2815,7 @@ msgstr "menghapus berkas keluaran yang telah ada.\n" msgid "Invalid filename %s" msgstr "Nama berkas tak valid: %s" -#: ../gio/glocalfile.c:1037 +#: ../gio/glocalfile.c:1039 #, c-format msgid "Error getting filesystem info for %s: %s" msgstr "Galat saat mengambil info sistem berkas bagi %s: %s" @@ -2823,237 +2824,237 @@ msgstr "Galat saat mengambil info sistem berkas bagi %s: %s" #. * the enclosing (user visible) mount of a file, but none #. * exists. #. -#: ../gio/glocalfile.c:1176 +#: ../gio/glocalfile.c:1178 #, c-format msgid "Containing mount for file %s not found" msgstr "Kait wadah bagi berkas %s tak ditemukan" -#: ../gio/glocalfile.c:1199 +#: ../gio/glocalfile.c:1201 msgid "Can’t rename root directory" msgstr "Tidak bisa mengubah nama direktori root" -#: ../gio/glocalfile.c:1217 ../gio/glocalfile.c:1240 +#: ../gio/glocalfile.c:1219 ../gio/glocalfile.c:1242 #, c-format msgid "Error renaming file %s: %s" msgstr "Galat saat mengubah nama berkas %s: %s" -#: ../gio/glocalfile.c:1224 +#: ../gio/glocalfile.c:1226 msgid "Can’t rename file, filename already exists" msgstr "Tidak bisa mengubah nama berkas, nama telah dipakai" -#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2253 ../gio/glocalfile.c:2281 -#: ../gio/glocalfile.c:2438 ../gio/glocalfileoutputstream.c:549 +#: ../gio/glocalfile.c:1239 ../gio/glocalfile.c:2256 ../gio/glocalfile.c:2284 +#: ../gio/glocalfile.c:2441 ../gio/glocalfileoutputstream.c:551 msgid "Invalid filename" msgstr "Nama berkas tak valid" -#: ../gio/glocalfile.c:1404 ../gio/glocalfile.c:1419 +#: ../gio/glocalfile.c:1407 ../gio/glocalfile.c:1422 #, c-format msgid "Error opening file %s: %s" msgstr "Galat saat membuka berkas %s: %s" -#: ../gio/glocalfile.c:1544 +#: ../gio/glocalfile.c:1547 #, c-format msgid "Error removing file %s: %s" msgstr "Galat saat menghapus berkas %s: %s" -#: ../gio/glocalfile.c:1928 +#: ../gio/glocalfile.c:1931 #, c-format msgid "Error trashing file %s: %s" msgstr "Galat saat memindah berkas %s ke tong sampah: %s" -#: ../gio/glocalfile.c:1951 +#: ../gio/glocalfile.c:1954 #, c-format msgid "Unable to create trash dir %s: %s" msgstr "Tak bisa membuat direktori tong sampah %s: %s" -#: ../gio/glocalfile.c:1971 +#: ../gio/glocalfile.c:1974 #, c-format msgid "Unable to find toplevel directory to trash %s" msgstr "" "Tidak bisa menemukan direktori puncak %s yang akan dibuang ke tong sampah" -#: ../gio/glocalfile.c:2050 ../gio/glocalfile.c:2070 +#: ../gio/glocalfile.c:2053 ../gio/glocalfile.c:2073 #, c-format msgid "Unable to find or create trash directory for %s" msgstr "Tidak bisa menemukan atau membuat direktori tong sampah bagi %s" -#: ../gio/glocalfile.c:2105 +#: ../gio/glocalfile.c:2108 #, c-format msgid "Unable to create trashing info file for %s: %s" msgstr "Tidak bisa membuat berkas info pembuangan ke tong sampah bagi %s: %s" -#: ../gio/glocalfile.c:2164 +#: ../gio/glocalfile.c:2167 #, c-format msgid "Unable to trash file %s across filesystem boundaries" msgstr "" "Tidak bisa membuang berkas %s ke tong sampah menyeberang batas sistem berkas" -#: ../gio/glocalfile.c:2168 ../gio/glocalfile.c:2224 +#: ../gio/glocalfile.c:2171 ../gio/glocalfile.c:2227 #, c-format msgid "Unable to trash file %s: %s" msgstr "Tak bisa membuang berkas %s ke tong sampah: %s" -#: ../gio/glocalfile.c:2230 +#: ../gio/glocalfile.c:2233 #, c-format msgid "Unable to trash file %s" msgstr "Tak bisa membuang berkas ke tong sampah %s" -#: ../gio/glocalfile.c:2256 +#: ../gio/glocalfile.c:2259 #, c-format msgid "Error creating directory %s: %s" msgstr "Galat saat membuat direktori %s: %s" -#: ../gio/glocalfile.c:2285 +#: ../gio/glocalfile.c:2288 #, c-format msgid "Filesystem does not support symbolic links" msgstr "Sistem berkas tak mendukung taut simbolik" -#: ../gio/glocalfile.c:2288 +#: ../gio/glocalfile.c:2291 #, c-format msgid "Error making symbolic link %s: %s" msgstr "Galat saat membuat taut simbolis %s: %s" -#: ../gio/glocalfile.c:2294 ../glib/gfileutils.c:2077 +#: ../gio/glocalfile.c:2297 ../glib/gfileutils.c:2127 msgid "Symbolic links not supported" msgstr "Taut simbolik tidak didukung" -#: ../gio/glocalfile.c:2349 ../gio/glocalfile.c:2384 ../gio/glocalfile.c:2441 +#: ../gio/glocalfile.c:2352 ../gio/glocalfile.c:2387 ../gio/glocalfile.c:2444 #, c-format msgid "Error moving file %s: %s" msgstr "Galat saat memindah berkas %s: %s" -#: ../gio/glocalfile.c:2372 +#: ../gio/glocalfile.c:2375 msgid "Can’t move directory over directory" msgstr "Tidak bisa memindah direktori atas direktori" -#: ../gio/glocalfile.c:2398 ../gio/glocalfileoutputstream.c:933 -#: ../gio/glocalfileoutputstream.c:947 ../gio/glocalfileoutputstream.c:962 -#: ../gio/glocalfileoutputstream.c:979 ../gio/glocalfileoutputstream.c:993 +#: ../gio/glocalfile.c:2401 ../gio/glocalfileoutputstream.c:935 +#: ../gio/glocalfileoutputstream.c:949 ../gio/glocalfileoutputstream.c:964 +#: ../gio/glocalfileoutputstream.c:981 ../gio/glocalfileoutputstream.c:995 msgid "Backup file creation failed" msgstr "Pembuatan berkas cadangan gagal" -#: ../gio/glocalfile.c:2417 +#: ../gio/glocalfile.c:2420 #, c-format msgid "Error removing target file: %s" msgstr "Galat saat menghapus berkas tujuan: %s" -#: ../gio/glocalfile.c:2431 +#: ../gio/glocalfile.c:2434 msgid "Move between mounts not supported" msgstr "Perpindahan antar kait tak didukung" -#: ../gio/glocalfile.c:2622 +#: ../gio/glocalfile.c:2625 #, c-format msgid "Could not determine the disk usage of %s: %s" msgstr "Tak bisa menentukan penggunaan diska dari %s: %s" -#: ../gio/glocalfileinfo.c:731 +#: ../gio/glocalfileinfo.c:745 msgid "Attribute value must be non-NULL" msgstr "Nilai atribut tak boleh NULL" -#: ../gio/glocalfileinfo.c:738 +#: ../gio/glocalfileinfo.c:752 msgid "Invalid attribute type (string expected)" msgstr "Tipe atribut tak valid (diharapkan string)" -#: ../gio/glocalfileinfo.c:745 +#: ../gio/glocalfileinfo.c:759 msgid "Invalid extended attribute name" msgstr "Nama atribut tambahan yang tak valid" -#: ../gio/glocalfileinfo.c:785 +#: ../gio/glocalfileinfo.c:799 #, c-format msgid "Error setting extended attribute “%s”: %s" msgstr "Galat saat menata atribut yang diperluas \"%s\": %s" -#: ../gio/glocalfileinfo.c:1586 +#: ../gio/glocalfileinfo.c:1607 msgid " (invalid encoding)" msgstr " (pengkodean tak valid)" -#: ../gio/glocalfileinfo.c:1777 ../gio/glocalfileoutputstream.c:811 +#: ../gio/glocalfileinfo.c:1776 ../gio/glocalfileoutputstream.c:813 #, c-format msgid "Error when getting information for file “%s”: %s" msgstr "Galat saat mengambil informasi bagi berkas \"%s\": %s" -#: ../gio/glocalfileinfo.c:2028 +#: ../gio/glocalfileinfo.c:2034 #, c-format msgid "Error when getting information for file descriptor: %s" msgstr "Galat saat mengambil informasi bagi descriptor berkas: %s" -#: ../gio/glocalfileinfo.c:2073 +#: ../gio/glocalfileinfo.c:2079 msgid "Invalid attribute type (uint32 expected)" msgstr "Tipe atribut tak valid (diharapkan uint32)" -#: ../gio/glocalfileinfo.c:2091 +#: ../gio/glocalfileinfo.c:2097 msgid "Invalid attribute type (uint64 expected)" msgstr "Tipe atribut tak valid (diharapkan uint64)" -#: ../gio/glocalfileinfo.c:2110 ../gio/glocalfileinfo.c:2129 +#: ../gio/glocalfileinfo.c:2116 ../gio/glocalfileinfo.c:2135 msgid "Invalid attribute type (byte string expected)" msgstr "Jenis atribut tidak sah (diharapkan bita berjenis string)" -#: ../gio/glocalfileinfo.c:2164 +#: ../gio/glocalfileinfo.c:2180 msgid "Cannot set permissions on symlinks" msgstr "Tak bisa menata ijin pada taut simbolik" -#: ../gio/glocalfileinfo.c:2180 +#: ../gio/glocalfileinfo.c:2196 #, c-format msgid "Error setting permissions: %s" msgstr "Galat saat menata ijin: %s" -#: ../gio/glocalfileinfo.c:2231 +#: ../gio/glocalfileinfo.c:2247 #, c-format msgid "Error setting owner: %s" msgstr "Galat saat menata pemilik: %s" -#: ../gio/glocalfileinfo.c:2254 +#: ../gio/glocalfileinfo.c:2270 msgid "symlink must be non-NULL" msgstr "symlink tak boleh NULL" -#: ../gio/glocalfileinfo.c:2264 ../gio/glocalfileinfo.c:2283 -#: ../gio/glocalfileinfo.c:2294 +#: ../gio/glocalfileinfo.c:2280 ../gio/glocalfileinfo.c:2299 +#: ../gio/glocalfileinfo.c:2310 #, c-format msgid "Error setting symlink: %s" msgstr "Galat saat menata taut simbolis: %s" -#: ../gio/glocalfileinfo.c:2273 +#: ../gio/glocalfileinfo.c:2289 msgid "Error setting symlink: file is not a symlink" msgstr "Galat saat menata symlink: berkas bukan suatu link simbolik" -#: ../gio/glocalfileinfo.c:2399 +#: ../gio/glocalfileinfo.c:2415 #, c-format msgid "Error setting modification or access time: %s" msgstr "Galat saat menata waktu modifikasi atau akses: %s" -#: ../gio/glocalfileinfo.c:2422 +#: ../gio/glocalfileinfo.c:2438 msgid "SELinux context must be non-NULL" msgstr "Konteks SELinux tak boleh NULL" -#: ../gio/glocalfileinfo.c:2437 +#: ../gio/glocalfileinfo.c:2453 #, c-format msgid "Error setting SELinux context: %s" msgstr "Galat saat menata konteks SELinux: %s" -#: ../gio/glocalfileinfo.c:2444 +#: ../gio/glocalfileinfo.c:2460 msgid "SELinux is not enabled on this system" msgstr "SELinux tak diaktifkan di sistem ini" -#: ../gio/glocalfileinfo.c:2536 +#: ../gio/glocalfileinfo.c:2552 #, c-format msgid "Setting attribute %s not supported" msgstr "Penataan atribut %s tak didukung" -#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:694 +#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:696 #, c-format msgid "Error reading from file: %s" msgstr "Galat saat membaca dari berkas: %s" #: ../gio/glocalfileinputstream.c:199 ../gio/glocalfileinputstream.c:211 #: ../gio/glocalfileinputstream.c:225 ../gio/glocalfileinputstream.c:333 -#: ../gio/glocalfileoutputstream.c:456 ../gio/glocalfileoutputstream.c:1011 +#: ../gio/glocalfileoutputstream.c:458 ../gio/glocalfileoutputstream.c:1013 #, c-format msgid "Error seeking in file: %s" msgstr "Galat saat men-seek di berkas: %s" -#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:246 -#: ../gio/glocalfileoutputstream.c:340 +#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:248 +#: ../gio/glocalfileoutputstream.c:342 #, c-format msgid "Error closing file: %s" msgstr "Galat saat menutup berkas: %s" @@ -3062,51 +3063,51 @@ msgstr "Galat saat menutup berkas: %s" msgid "Unable to find default local file monitor type" msgstr "Tak bisa temukan tipe pemantauan berkas lokal baku" -#: ../gio/glocalfileoutputstream.c:194 ../gio/glocalfileoutputstream.c:226 -#: ../gio/glocalfileoutputstream.c:715 +#: ../gio/glocalfileoutputstream.c:196 ../gio/glocalfileoutputstream.c:228 +#: ../gio/glocalfileoutputstream.c:717 #, c-format msgid "Error writing to file: %s" msgstr "Galat saat menulis ke berkas: %s" -#: ../gio/glocalfileoutputstream.c:273 +#: ../gio/glocalfileoutputstream.c:275 #, c-format msgid "Error removing old backup link: %s" msgstr "Galat saat menghapus taut cadangan lama: %s" -#: ../gio/glocalfileoutputstream.c:287 ../gio/glocalfileoutputstream.c:300 +#: ../gio/glocalfileoutputstream.c:289 ../gio/glocalfileoutputstream.c:302 #, c-format msgid "Error creating backup copy: %s" msgstr "Galat saat membuat salinan cadangan: %s" -#: ../gio/glocalfileoutputstream.c:318 +#: ../gio/glocalfileoutputstream.c:320 #, c-format msgid "Error renaming temporary file: %s" msgstr "Galat saat mengubah nama berkas sementara: %s" -#: ../gio/glocalfileoutputstream.c:502 ../gio/glocalfileoutputstream.c:1062 +#: ../gio/glocalfileoutputstream.c:504 ../gio/glocalfileoutputstream.c:1064 #, c-format msgid "Error truncating file: %s" msgstr "Galat saat memenggal berkas: %s" -#: ../gio/glocalfileoutputstream.c:555 ../gio/glocalfileoutputstream.c:793 -#: ../gio/glocalfileoutputstream.c:1043 ../gio/gsubprocess.c:380 +#: ../gio/glocalfileoutputstream.c:557 ../gio/glocalfileoutputstream.c:795 +#: ../gio/glocalfileoutputstream.c:1045 ../gio/gsubprocess.c:380 #, c-format msgid "Error opening file “%s”: %s" msgstr "Galat saat membuka berkas \"%s\": %s" -#: ../gio/glocalfileoutputstream.c:824 +#: ../gio/glocalfileoutputstream.c:826 msgid "Target file is a directory" msgstr "Berkas tujuan adalah suatu direktori" -#: ../gio/glocalfileoutputstream.c:829 +#: ../gio/glocalfileoutputstream.c:831 msgid "Target file is not a regular file" msgstr "Berkas tujuan bukan berkas biasa" -#: ../gio/glocalfileoutputstream.c:841 +#: ../gio/glocalfileoutputstream.c:843 msgid "The file was externally modified" msgstr "Berkas telah diubah secara eksternal" -#: ../gio/glocalfileoutputstream.c:1027 +#: ../gio/glocalfileoutputstream.c:1029 #, c-format msgid "Error removing old file: %s" msgstr "Galat saat menghapus berkas lama: %s" @@ -3150,49 +3151,49 @@ msgstr "Seek yang diminta setelah akhir stream" #. Translators: This is an error #. * message for mount objects that #. * don't implement unmount. -#: ../gio/gmount.c:393 +#: ../gio/gmount.c:396 msgid "mount doesn’t implement “unmount”" msgstr "mount tak mengimplementasi \"unmount\"" #. Translators: This is an error #. * message for mount objects that #. * don't implement eject. -#: ../gio/gmount.c:469 +#: ../gio/gmount.c:472 msgid "mount doesn’t implement “eject”" msgstr "mount tak mengimplementasi \"eject\"" #. Translators: This is an error #. * message for mount objects that #. * don't implement any of unmount or unmount_with_operation. -#: ../gio/gmount.c:547 +#: ../gio/gmount.c:550 msgid "mount doesn’t implement “unmount” or “unmount_with_operation”" msgstr "mount tak mengimplementasi \"unmount\" atau \"unmount_with_operation\"" #. Translators: This is an error #. * message for mount objects that #. * don't implement any of eject or eject_with_operation. -#: ../gio/gmount.c:632 +#: ../gio/gmount.c:635 msgid "mount doesn’t implement “eject” or “eject_with_operation”" msgstr "mount tak mengimplementasi \"eject\" atau \"eject_with_operation\"" #. Translators: This is an error #. * message for mount objects that #. * don't implement remount. -#: ../gio/gmount.c:720 +#: ../gio/gmount.c:723 msgid "mount doesn’t implement “remount”" msgstr "mount tak mengimplementasi \"remount\"" #. Translators: This is an error #. * message for mount objects that #. * don't implement content type guessing. -#: ../gio/gmount.c:802 +#: ../gio/gmount.c:805 msgid "mount doesn’t implement content type guessing" msgstr "mount tak mengimplementasi penebakan jenis isi" #. Translators: This is an error #. * message for mount objects that #. * don't implement content type guessing. -#: ../gio/gmount.c:889 +#: ../gio/gmount.c:892 msgid "mount doesn’t implement synchronous content type guessing" msgstr "mount tak mengimplementasi penebakan sinkron jenis isi" @@ -3242,25 +3243,25 @@ msgstr "Stream sumber telah ditutup" msgid "Error resolving “%s”: %s" msgstr "Galat saat mengurai \"%s\": %s" -#: ../gio/gresource.c:606 ../gio/gresource.c:857 ../gio/gresource.c:874 -#: ../gio/gresource.c:998 ../gio/gresource.c:1070 ../gio/gresource.c:1143 -#: ../gio/gresource.c:1213 ../gio/gresourcefile.c:453 -#: ../gio/gresourcefile.c:576 ../gio/gresourcefile.c:713 +#: ../gio/gresource.c:621 ../gio/gresource.c:880 ../gio/gresource.c:919 +#: ../gio/gresource.c:1043 ../gio/gresource.c:1115 ../gio/gresource.c:1188 +#: ../gio/gresource.c:1258 ../gio/gresourcefile.c:476 +#: ../gio/gresourcefile.c:599 ../gio/gresourcefile.c:736 #, c-format msgid "The resource at “%s” does not exist" msgstr "Sumber daya pada \"%s\" tidak ada" -#: ../gio/gresource.c:771 +#: ../gio/gresource.c:786 #, c-format msgid "The resource at “%s” failed to decompress" msgstr "Sumber daya di \"%s\" gagal didekompresi" -#: ../gio/gresourcefile.c:709 +#: ../gio/gresourcefile.c:732 #, c-format msgid "The resource at “%s” is not a directory" msgstr "Sumber daya pada \"%s\" bukan suatu direktori" -#: ../gio/gresourcefile.c:917 +#: ../gio/gresourcefile.c:940 msgid "Input stream doesn’t implement seek" msgstr "Stream masukan tidak mengimplementasikan seek" @@ -3624,146 +3625,176 @@ msgstr "Nama skema yang diberikan kosong\n" msgid "No such key “%s”\n" msgstr "Tidak ada kunci seperti \"%s\"\n" -#: ../gio/gsocket.c:379 +#: ../gio/gsocket.c:384 msgid "Invalid socket, not initialized" msgstr "Soket tak valid, tak diinisialisasi" -#: ../gio/gsocket.c:386 +#: ../gio/gsocket.c:391 #, c-format msgid "Invalid socket, initialization failed due to: %s" msgstr "Soket tak valid, inisialisasi gagal karena: %s" -#: ../gio/gsocket.c:394 +#: ../gio/gsocket.c:399 msgid "Socket is already closed" msgstr "Soket telah ditutup" -#: ../gio/gsocket.c:409 ../gio/gsocket.c:2765 ../gio/gsocket.c:3950 -#: ../gio/gsocket.c:4008 +#: ../gio/gsocket.c:414 ../gio/gsocket.c:2995 ../gio/gsocket.c:4205 +#: ../gio/gsocket.c:4263 msgid "Socket I/O timed out" msgstr "I/O soket kehabisan waktu" -#: ../gio/gsocket.c:541 +#: ../gio/gsocket.c:546 #, c-format msgid "creating GSocket from fd: %s" msgstr "membuat GSocket dari fd: %s" -#: ../gio/gsocket.c:570 ../gio/gsocket.c:624 ../gio/gsocket.c:631 +#: ../gio/gsocket.c:575 ../gio/gsocket.c:629 ../gio/gsocket.c:636 #, c-format msgid "Unable to create socket: %s" msgstr "Tak bisa membuat soket: %s" -#: ../gio/gsocket.c:624 +#: ../gio/gsocket.c:629 msgid "Unknown family was specified" msgstr "Famili tak dikenal dinyatakan" -#: ../gio/gsocket.c:631 +#: ../gio/gsocket.c:636 msgid "Unknown protocol was specified" msgstr "Protokol tak dikenal dinyatakan" -#: ../gio/gsocket.c:1122 +#: ../gio/gsocket.c:1127 #, c-format msgid "Cannot use datagram operations on a non-datagram socket." msgstr "Tidak bisa memakai operasi datagram pada suatu soket bukan datagram." -#: ../gio/gsocket.c:1139 +#: ../gio/gsocket.c:1144 #, c-format msgid "Cannot use datagram operations on a socket with a timeout set." msgstr "" "Tidak bisa memakai operasi datagram pada suatu soket yang tenggang waktunya " "ditata." -#: ../gio/gsocket.c:1943 +#: ../gio/gsocket.c:1948 #, c-format msgid "could not get local address: %s" msgstr "tak bisa mendapat alamat lokal: %s" -#: ../gio/gsocket.c:1986 +#: ../gio/gsocket.c:1991 #, c-format msgid "could not get remote address: %s" msgstr "tak bisa mendapat alamat jauh: %s" -#: ../gio/gsocket.c:2052 +#: ../gio/gsocket.c:2057 #, c-format msgid "could not listen: %s" msgstr "tak bisa mendengarkan: %s" -#: ../gio/gsocket.c:2151 +#: ../gio/gsocket.c:2156 #, c-format msgid "Error binding to address: %s" msgstr "Galat saat mengikat ke alamat: %s" -#: ../gio/gsocket.c:2266 ../gio/gsocket.c:2303 +#: ../gio/gsocket.c:2214 ../gio/gsocket.c:2251 ../gio/gsocket.c:2361 +#: ../gio/gsocket.c:2379 ../gio/gsocket.c:2449 ../gio/gsocket.c:2507 +#: ../gio/gsocket.c:2525 #, c-format msgid "Error joining multicast group: %s" msgstr "Galat saat bergabung dengan grup multicast: %s" -#: ../gio/gsocket.c:2267 ../gio/gsocket.c:2304 +#: ../gio/gsocket.c:2215 ../gio/gsocket.c:2252 ../gio/gsocket.c:2362 +#: ../gio/gsocket.c:2380 ../gio/gsocket.c:2450 ../gio/gsocket.c:2508 +#: ../gio/gsocket.c:2526 #, c-format msgid "Error leaving multicast group: %s" msgstr "Galat saat meninggalkan grup multicast: %s" -#: ../gio/gsocket.c:2268 +#: ../gio/gsocket.c:2216 msgid "No support for source-specific multicast" msgstr "Tak ada dukungan bagi multicast spesifik sumber" -#: ../gio/gsocket.c:2488 +#: ../gio/gsocket.c:2363 +msgid "Unsupported socket family" +msgstr "Keluarga soket tak didukung" + +#: ../gio/gsocket.c:2381 +msgid "source-specific not an IPv4 address" +msgstr "spesifik sumber bukan alamat IPv4" + +#: ../gio/gsocket.c:2399 ../gio/gsocket.c:2428 ../gio/gsocket.c:2475 +#, c-format +msgid "Interface not found: %s" +msgstr "Antarmuka tidak ditemukan: %s" + +#: ../gio/gsocket.c:2415 +#, c-format +msgid "Interface name too long" +msgstr "Nama antarmuka terlalu panjang" + +#: ../gio/gsocket.c:2451 +msgid "No support for IPv4 source-specific multicast" +msgstr "Tak ada dukungan bagi multicast spesifik sumber IPV4" + +#: ../gio/gsocket.c:2509 +msgid "No support for IPv6 source-specific multicast" +msgstr "Tak ada dukungan bagi multicast spesifik sumber IPV6" + +#: ../gio/gsocket.c:2718 #, c-format msgid "Error accepting connection: %s" msgstr "Galat saat menerima sambungan: %s" -#: ../gio/gsocket.c:2609 +#: ../gio/gsocket.c:2839 msgid "Connection in progress" msgstr "Penyambungan tengah berlangsung" -#: ../gio/gsocket.c:2658 +#: ../gio/gsocket.c:2888 msgid "Unable to get pending error: " msgstr "Tak bisa mendapat kesalahan yang tertunda: " -#: ../gio/gsocket.c:2828 +#: ../gio/gsocket.c:3058 #, c-format msgid "Error receiving data: %s" msgstr "Galat saat menerima data: %s" -#: ../gio/gsocket.c:3023 +#: ../gio/gsocket.c:3253 #, c-format msgid "Error sending data: %s" msgstr "Galat saat mengirim data: %s" -#: ../gio/gsocket.c:3210 +#: ../gio/gsocket.c:3440 #, c-format msgid "Unable to shutdown socket: %s" msgstr "Tak bisa mematikan soket: %s" -#: ../gio/gsocket.c:3291 +#: ../gio/gsocket.c:3521 #, c-format msgid "Error closing socket: %s" msgstr "Galat saat menutup soket: %s" -#: ../gio/gsocket.c:3943 +#: ../gio/gsocket.c:4198 #, c-format msgid "Waiting for socket condition: %s" msgstr "Menunggu kondisi soket: %s" -#: ../gio/gsocket.c:4417 ../gio/gsocket.c:4497 ../gio/gsocket.c:4675 +#: ../gio/gsocket.c:4672 ../gio/gsocket.c:4752 ../gio/gsocket.c:4930 #, c-format msgid "Error sending message: %s" msgstr "Galat saat menerima pesan: %s" -#: ../gio/gsocket.c:4441 +#: ../gio/gsocket.c:4696 msgid "GSocketControlMessage not supported on Windows" msgstr "GSocketControlMessage tak didukung pada Windows" -#: ../gio/gsocket.c:4894 ../gio/gsocket.c:4967 ../gio/gsocket.c:5193 +#: ../gio/gsocket.c:5149 ../gio/gsocket.c:5222 ../gio/gsocket.c:5448 #, c-format msgid "Error receiving message: %s" msgstr "Galat saat menerima pesan: %s" -#: ../gio/gsocket.c:5465 +#: ../gio/gsocket.c:5720 #, c-format msgid "Unable to read socket credentials: %s" msgstr "Tak bisa membaca kredensial soket: %s" -#: ../gio/gsocket.c:5474 +#: ../gio/gsocket.c:5729 msgid "g_socket_get_credentials not implemented for this OS" msgstr "g_socket_get_credentials tidak diimplementasikan untuk OS ini" @@ -3902,18 +3933,18 @@ msgstr "Tak ada alamat valid yang ditemukan" msgid "Error reverse-resolving “%s”: %s" msgstr "Galat saat mengurai balik \"%s\": %s" -#: ../gio/gthreadedresolver.c:550 ../gio/gthreadedresolver.c:630 -#: ../gio/gthreadedresolver.c:728 ../gio/gthreadedresolver.c:778 +#: ../gio/gthreadedresolver.c:549 ../gio/gthreadedresolver.c:628 +#: ../gio/gthreadedresolver.c:726 ../gio/gthreadedresolver.c:776 #, c-format msgid "No DNS record of the requested type for “%s”" msgstr "Tidak ada record DNS dengan tipe yang diminta bagi \"%s\"" -#: ../gio/gthreadedresolver.c:555 ../gio/gthreadedresolver.c:733 +#: ../gio/gthreadedresolver.c:554 ../gio/gthreadedresolver.c:731 #, c-format msgid "Temporarily unable to resolve “%s”" msgstr "Sementara tidak dapat mengurai \"%s\"" -#: ../gio/gthreadedresolver.c:560 ../gio/gthreadedresolver.c:738 +#: ../gio/gthreadedresolver.c:559 ../gio/gthreadedresolver.c:736 #, c-format msgid "Error resolving “%s”" msgstr "Galat saat mengurai \"%s\"" @@ -4022,7 +4053,7 @@ msgstr "Galat saat membaca dari descriptor berkas: %s" msgid "Error closing file descriptor: %s" msgstr "Galat saat menutup descriptor berkas: %s" -#: ../gio/gunixmounts.c:2430 ../gio/gunixmounts.c:2483 +#: ../gio/gunixmounts.c:2539 ../gio/gunixmounts.c:2592 msgid "Filesystem root" msgstr "Akar sistem berkas" @@ -4176,42 +4207,42 @@ msgstr "" msgid "Failed to expand exec line “%s” with URI “%s”" msgstr "Gagal mengembangkan baris eksekusi \"%s\" dengan URI \"%s\"" -#: ../glib/gconvert.c:477 ../glib/gutf8.c:862 ../glib/gutf8.c:1074 +#: ../glib/gconvert.c:476 ../glib/gutf8.c:862 ../glib/gutf8.c:1074 #: ../glib/gutf8.c:1211 ../glib/gutf8.c:1315 msgid "Partial character sequence at end of input" msgstr "Rangkaian karakter sebagian pada akhir input" -#: ../glib/gconvert.c:742 +#: ../glib/gconvert.c:741 #, c-format msgid "Cannot convert fallback “%s” to codeset “%s”" msgstr "Tidak dapat mengonversi fallback \"%s\" menjadi codeset \"%s\"" -#: ../glib/gconvert.c:1513 +#: ../glib/gconvert.c:1512 #, c-format msgid "The URI “%s” is not an absolute URI using the “file” scheme" msgstr "URI \"%s\" bukanlah URI absolut dengan menggunakan skema \"file\"" -#: ../glib/gconvert.c:1523 +#: ../glib/gconvert.c:1522 #, c-format msgid "The local file URI “%s” may not include a “#”" msgstr "URI berkas lokal \"%s\" tak boleh mengandung \"#\"" -#: ../glib/gconvert.c:1540 +#: ../glib/gconvert.c:1539 #, c-format msgid "The URI “%s” is invalid" msgstr "URI \"%s\" tidak valid" -#: ../glib/gconvert.c:1552 +#: ../glib/gconvert.c:1551 #, c-format msgid "The hostname of the URI “%s” is invalid" msgstr "Nama host dari URI \"%s\" tidak valid" -#: ../glib/gconvert.c:1568 +#: ../glib/gconvert.c:1567 #, c-format msgid "The URI “%s” contains invalidly escaped characters" msgstr "URI \"%s\" mengandung karakter yang di-escape secara tidak valid" -#: ../glib/gconvert.c:1640 +#: ../glib/gconvert.c:1639 #, c-format msgid "The pathname “%s” is not an absolute path" msgstr "Nama path \"%s\" bukan lokasi absolut" @@ -4447,114 +4478,114 @@ msgstr "PM" msgid "Error opening directory “%s”: %s" msgstr "Galat saat membuka direktori \"%s\": %s" -#: ../glib/gfileutils.c:706 ../glib/gfileutils.c:798 +#: ../glib/gfileutils.c:716 ../glib/gfileutils.c:808 #, c-format msgid "Could not allocate %lu byte to read file “%s”" msgid_plural "Could not allocate %lu bytes to read file “%s”" msgstr[0] "Tidak dapat mengalokasikan %lu byte untuk membaca berkas \"%s\"" -#: ../glib/gfileutils.c:723 +#: ../glib/gfileutils.c:733 #, c-format msgid "Error reading file “%s”: %s" msgstr "Galat saat membaca berkas \"%s\": %s" -#: ../glib/gfileutils.c:759 +#: ../glib/gfileutils.c:769 #, c-format msgid "File “%s” is too large" msgstr "Berkas \"%s\" terlalu besar" -#: ../glib/gfileutils.c:823 +#: ../glib/gfileutils.c:833 #, c-format msgid "Failed to read from file “%s”: %s" msgstr "Gagal membaca dari berkas \"%s\": %s" -#: ../glib/gfileutils.c:871 ../glib/gfileutils.c:943 +#: ../glib/gfileutils.c:881 ../glib/gfileutils.c:953 #, c-format msgid "Failed to open file “%s”: %s" msgstr "Gagal membuka berkas \"%s\": %s" -#: ../glib/gfileutils.c:883 +#: ../glib/gfileutils.c:893 #, c-format msgid "Failed to get attributes of file “%s”: fstat() failed: %s" msgstr "Gagal mendapat atribut berkas \"%s\": fstat() gagal: %s" -#: ../glib/gfileutils.c:913 +#: ../glib/gfileutils.c:923 #, c-format msgid "Failed to open file “%s”: fdopen() failed: %s" msgstr "Gagal membuka berkas \"%s\": fdopen() gagal: %s" -#: ../glib/gfileutils.c:1012 +#: ../glib/gfileutils.c:1022 #, c-format msgid "Failed to rename file “%s” to “%s”: g_rename() failed: %s" msgstr "Gagal mengubah nama berkas \"%s\" menjadi \"%s\": g_rename() gagal: %s" -#: ../glib/gfileutils.c:1047 ../glib/gfileutils.c:1554 +#: ../glib/gfileutils.c:1057 ../glib/gfileutils.c:1564 #, c-format msgid "Failed to create file “%s”: %s" msgstr "Gagal membuat berkas \"%s\": %s" -#: ../glib/gfileutils.c:1074 +#: ../glib/gfileutils.c:1084 #, c-format msgid "Failed to write file “%s”: write() failed: %s" msgstr "Gagal menulis berkas \"%s\": write() gagal: %s" -#: ../glib/gfileutils.c:1117 +#: ../glib/gfileutils.c:1127 #, c-format msgid "Failed to write file “%s”: fsync() failed: %s" msgstr "Gagal menulis berkas \"%s\": fsync() gagal: %s" -#: ../glib/gfileutils.c:1241 +#: ../glib/gfileutils.c:1251 #, c-format msgid "Existing file “%s” could not be removed: g_unlink() failed: %s" msgstr "Berkas \"%s\" yang ada tidak dapat dibuang: g_unlink() gagal: %s" -#: ../glib/gfileutils.c:1520 +#: ../glib/gfileutils.c:1530 #, c-format msgid "Template “%s” invalid, should not contain a “%s”" msgstr "Templat \"%s\" tidak valid, tidak boleh mengandung \"%s\"" -#: ../glib/gfileutils.c:1533 +#: ../glib/gfileutils.c:1543 #, c-format msgid "Template “%s” doesn’t contain XXXXXX" msgstr "Templat \"%s\" tidak memuat XXXXXX" -#: ../glib/gfileutils.c:2058 +#: ../glib/gfileutils.c:2105 #, c-format msgid "Failed to read the symbolic link “%s”: %s" msgstr "Gagal membaca taut simbolik \"%s\": %s" -#: ../glib/giochannel.c:1388 +#: ../glib/giochannel.c:1389 #, c-format msgid "Could not open converter from “%s” to “%s”: %s" msgstr "Tidak dapat membuka pengubah dari \"%s\" menjadi \"%s\": %s" -#: ../glib/giochannel.c:1733 +#: ../glib/giochannel.c:1734 msgid "Can’t do a raw read in g_io_channel_read_line_string" msgstr "" "Tidak dapat melakukan pembacaan mentah dalam g_io_channel_read_line_string" -#: ../glib/giochannel.c:1780 ../glib/giochannel.c:2038 -#: ../glib/giochannel.c:2125 +#: ../glib/giochannel.c:1781 ../glib/giochannel.c:2039 +#: ../glib/giochannel.c:2126 msgid "Leftover unconverted data in read buffer" msgstr "Ada data tersisa yang belum dikonversi pada penyangga read" -#: ../glib/giochannel.c:1861 ../glib/giochannel.c:1938 +#: ../glib/giochannel.c:1862 ../glib/giochannel.c:1939 msgid "Channel terminates in a partial character" msgstr "Kanal terputus pada karakter sebagian" -#: ../glib/giochannel.c:1924 +#: ../glib/giochannel.c:1925 msgid "Can’t do a raw read in g_io_channel_read_to_end" msgstr "Tidak dapat melakukan pembacaan mentah dalam g_io_channel_read_to_end" -#: ../glib/gkeyfile.c:736 +#: ../glib/gkeyfile.c:788 msgid "Valid key file could not be found in search dirs" msgstr "Berkas kunci yang valid tak ditemukan pada direktori yang dicari" -#: ../glib/gkeyfile.c:773 +#: ../glib/gkeyfile.c:825 msgid "Not a regular file" msgstr "Bukan berkas biasa" -#: ../glib/gkeyfile.c:1218 +#: ../glib/gkeyfile.c:1270 #, c-format msgid "" "Key file contains line “%s” which is not a key-value pair, group, or comment" @@ -4562,51 +4593,51 @@ msgstr "" "Berkas kunci mengandung baris \"%s\" yang bukan suatu pasangan kunci-nilai, " "kelompok, atau komentar" -#: ../glib/gkeyfile.c:1275 +#: ../glib/gkeyfile.c:1327 #, c-format msgid "Invalid group name: %s" msgstr "Nama grup tak valid: %s" -#: ../glib/gkeyfile.c:1297 +#: ../glib/gkeyfile.c:1349 msgid "Key file does not start with a group" msgstr "Berkas kunci tidak mulai dengan sebuah kelompok" -#: ../glib/gkeyfile.c:1323 +#: ../glib/gkeyfile.c:1375 #, c-format msgid "Invalid key name: %s" msgstr "Nama kunci tak valid: %s" -#: ../glib/gkeyfile.c:1350 +#: ../glib/gkeyfile.c:1402 #, c-format msgid "Key file contains unsupported encoding “%s”" msgstr "Berkas kunci mengandung enkoding \"%s\" yang tidak didukung" -#: ../glib/gkeyfile.c:1593 ../glib/gkeyfile.c:1766 ../glib/gkeyfile.c:3146 -#: ../glib/gkeyfile.c:3209 ../glib/gkeyfile.c:3339 ../glib/gkeyfile.c:3469 -#: ../glib/gkeyfile.c:3613 ../glib/gkeyfile.c:3842 ../glib/gkeyfile.c:3909 +#: ../glib/gkeyfile.c:1645 ../glib/gkeyfile.c:1818 ../glib/gkeyfile.c:3198 +#: ../glib/gkeyfile.c:3261 ../glib/gkeyfile.c:3391 ../glib/gkeyfile.c:3521 +#: ../glib/gkeyfile.c:3665 ../glib/gkeyfile.c:3894 ../glib/gkeyfile.c:3961 #, c-format msgid "Key file does not have group “%s”" msgstr "Berkas kunci tidak memiliki grup \"%s\"" -#: ../glib/gkeyfile.c:1721 +#: ../glib/gkeyfile.c:1773 #, c-format msgid "Key file does not have key “%s” in group “%s”" msgstr "Berkas kunci tidak memiliki kunci \"%s\" dalam kelompok \"%s\"" -#: ../glib/gkeyfile.c:1883 ../glib/gkeyfile.c:1999 +#: ../glib/gkeyfile.c:1935 ../glib/gkeyfile.c:2051 #, c-format msgid "Key file contains key “%s” with value “%s” which is not UTF-8" msgstr "" "Berkas kunci mengandung kunci \"%s\" dengan nilai \"%s\" yang bukan UTF-8" -#: ../glib/gkeyfile.c:1903 ../glib/gkeyfile.c:2019 ../glib/gkeyfile.c:2388 +#: ../glib/gkeyfile.c:1955 ../glib/gkeyfile.c:2071 ../glib/gkeyfile.c:2440 #, c-format msgid "" "Key file contains key “%s” which has a value that cannot be interpreted." msgstr "" "Berkas kunci mengandung kunci \"%s\" yang nilainya tidak dapat diterjemahkan." -#: ../glib/gkeyfile.c:2606 ../glib/gkeyfile.c:2975 +#: ../glib/gkeyfile.c:2658 ../glib/gkeyfile.c:3027 #, c-format msgid "" "Key file contains key “%s” in group “%s” which has a value that cannot be " @@ -4615,36 +4646,36 @@ msgstr "" "Berkas kunci mengandung kunci \"%s\" dalam grup \"%s\" yang nilainya tidak " "dapat diterjemahkan." -#: ../glib/gkeyfile.c:2684 ../glib/gkeyfile.c:2761 +#: ../glib/gkeyfile.c:2736 ../glib/gkeyfile.c:2813 #, c-format msgid "Key “%s” in group “%s” has value “%s” where %s was expected" msgstr "Kunci \"%s\" dalam grup \"%s\" bernilai \"%s\" padahal diharapkan %s" -#: ../glib/gkeyfile.c:4149 +#: ../glib/gkeyfile.c:4201 msgid "Key file contains escape character at end of line" msgstr "Berkas kunci mengandung karakter escape pada akhir baris" -#: ../glib/gkeyfile.c:4171 +#: ../glib/gkeyfile.c:4223 #, c-format msgid "Key file contains invalid escape sequence “%s”" msgstr "Berkas kunci memuat urutan escape \"%s\" yang tidak valid" -#: ../glib/gkeyfile.c:4315 +#: ../glib/gkeyfile.c:4367 #, c-format msgid "Value “%s” cannot be interpreted as a number." msgstr "Nilai \"%s\" tidak bisa diterjemahkan sebagai sebuah bilangan." -#: ../glib/gkeyfile.c:4329 +#: ../glib/gkeyfile.c:4381 #, c-format msgid "Integer value “%s” out of range" msgstr "Nilai bilangan bulat \"%s\" di luar jangkauan" -#: ../glib/gkeyfile.c:4362 +#: ../glib/gkeyfile.c:4414 #, c-format msgid "Value “%s” cannot be interpreted as a float number." msgstr "Nilai \"%s\" tidak dapat diterjemahkan sebagai sebuah bilangan float." -#: ../glib/gkeyfile.c:4401 +#: ../glib/gkeyfile.c:4453 #, c-format msgid "Value “%s” cannot be interpreted as a boolean." msgstr "Nilai \"%s\" tidak dapat diterjemahkan sebagai sebuah boolean." @@ -5329,78 +5360,78 @@ msgstr "" msgid "Text was empty (or contained only whitespace)" msgstr "Teksnya kosong (atau hanya berisi whitespace)" -#: ../glib/gspawn.c:250 +#: ../glib/gspawn.c:253 #, c-format msgid "Failed to read data from child process (%s)" msgstr "Gagal saat membaca data dari proses child (%s)" -#: ../glib/gspawn.c:394 +#: ../glib/gspawn.c:401 #, c-format msgid "Unexpected error in select() reading data from a child process (%s)" msgstr "" "Terjadi galat pada fungsi select() ketika membaca data dari anak proses (%s)" -#: ../glib/gspawn.c:479 +#: ../glib/gspawn.c:486 #, c-format msgid "Unexpected error in waitpid() (%s)" msgstr "Terjadi galat pada fungsi waitpid() (%s)" -#: ../glib/gspawn.c:886 ../glib/gspawn-win32.c:1231 +#: ../glib/gspawn.c:897 ../glib/gspawn-win32.c:1231 #, c-format msgid "Child process exited with code %ld" msgstr "Proses anak keluar dengan kode %ld" -#: ../glib/gspawn.c:894 +#: ../glib/gspawn.c:905 #, c-format msgid "Child process killed by signal %ld" msgstr "Proses anak dimatikan oleh sinyal %ld" -#: ../glib/gspawn.c:901 +#: ../glib/gspawn.c:912 #, c-format msgid "Child process stopped by signal %ld" msgstr "Proses anak dihentikan oleh sinyal %ld" -#: ../glib/gspawn.c:908 +#: ../glib/gspawn.c:919 #, c-format msgid "Child process exited abnormally" msgstr "Proses anak keluar secara tak normal" -#: ../glib/gspawn.c:1313 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345 +#: ../glib/gspawn.c:1324 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345 #, c-format msgid "Failed to read from child pipe (%s)" msgstr "Gagal saat membaca dari pipe child (%s)" -#: ../glib/gspawn.c:1383 +#: ../glib/gspawn.c:1394 #, c-format msgid "Failed to fork (%s)" msgstr "Gagal saat fork (%s)" -#: ../glib/gspawn.c:1532 ../glib/gspawn-win32.c:368 +#: ../glib/gspawn.c:1543 ../glib/gspawn-win32.c:368 #, c-format msgid "Failed to change to directory “%s” (%s)" msgstr "Gagal pindah ke direktori \"%s\" (%s)" -#: ../glib/gspawn.c:1542 +#: ../glib/gspawn.c:1553 #, c-format msgid "Failed to execute child process “%s” (%s)" msgstr "Gagal menjalankan proses anak \"%s\" (%s)" -#: ../glib/gspawn.c:1552 +#: ../glib/gspawn.c:1563 #, c-format msgid "Failed to redirect output or input of child process (%s)" msgstr "Gagal mengarahkan output atau input pada proses child (%s)" -#: ../glib/gspawn.c:1561 +#: ../glib/gspawn.c:1572 #, c-format msgid "Failed to fork child process (%s)" msgstr "Gagal saat fork proses child (%s)" -#: ../glib/gspawn.c:1569 +#: ../glib/gspawn.c:1580 #, c-format msgid "Unknown error executing child process “%s”" msgstr "Galat tak dikenal ketika menjalankan proses anak \"%s\"" -#: ../glib/gspawn.c:1593 +#: ../glib/gspawn.c:1604 #, c-format msgid "Failed to read enough data from child pid pipe (%s)" msgstr "Gagal saat membaca data yang dibutuhkan dai pipe pid child (%s)" @@ -5489,85 +5520,167 @@ msgstr "Rangkaian input konversi salah" msgid "Character out of range for UTF-16" msgstr "Karakter di luar jangkauan UTF-16" -#: ../glib/gutils.c:2149 ../glib/gutils.c:2176 ../glib/gutils.c:2282 +#: ../glib/gutils.c:2229 #, c-format -msgid "%u byte" -msgid_plural "%u bytes" -msgstr[0] "%u bita" +msgid "%.1f kB" +msgstr "%.1f kB" + +#: ../glib/gutils.c:2230 ../glib/gutils.c:2436 +#, c-format +msgid "%.1f MB" +msgstr "%.1f MB" + +#: ../glib/gutils.c:2231 ../glib/gutils.c:2441 +#, c-format +msgid "%.1f GB" +msgstr "%.1f GB" -#: ../glib/gutils.c:2155 +#: ../glib/gutils.c:2232 ../glib/gutils.c:2446 +#, c-format +msgid "%.1f TB" +msgstr "%.1f TB" + +#: ../glib/gutils.c:2233 ../glib/gutils.c:2451 +#, c-format +msgid "%.1f PB" +msgstr "%.1f PB" + +#: ../glib/gutils.c:2234 ../glib/gutils.c:2456 +#, c-format +msgid "%.1f EB" +msgstr "%.1f EB" + +#: ../glib/gutils.c:2237 #, c-format msgid "%.1f KiB" msgstr "%.1f KiB" -#: ../glib/gutils.c:2157 +#: ../glib/gutils.c:2238 #, c-format msgid "%.1f MiB" msgstr "%.1f MiB" -#: ../glib/gutils.c:2160 +#: ../glib/gutils.c:2239 #, c-format msgid "%.1f GiB" msgstr "%.1f GiB" -#: ../glib/gutils.c:2163 +#: ../glib/gutils.c:2240 #, c-format msgid "%.1f TiB" msgstr "%.1f TiB" -#: ../glib/gutils.c:2166 +#: ../glib/gutils.c:2241 #, c-format msgid "%.1f PiB" msgstr "%.1f PiB" -#: ../glib/gutils.c:2169 +#: ../glib/gutils.c:2242 #, c-format msgid "%.1f EiB" msgstr "%.1f EiB" -#: ../glib/gutils.c:2182 +#: ../glib/gutils.c:2245 #, c-format -msgid "%.1f kB" -msgstr "%.1f kB" +msgid "%.1f kb" +msgstr "%.1f kb" -#: ../glib/gutils.c:2185 ../glib/gutils.c:2300 +#: ../glib/gutils.c:2246 #, c-format -msgid "%.1f MB" -msgstr "%.1f MB" +msgid "%.1f Mb" +msgstr "%.1f Mb" -#: ../glib/gutils.c:2188 ../glib/gutils.c:2305 +#: ../glib/gutils.c:2247 #, c-format -msgid "%.1f GB" -msgstr "%.1f GB" +msgid "%.1f Gb" +msgstr "%.1f Gb" -#: ../glib/gutils.c:2190 ../glib/gutils.c:2310 +#: ../glib/gutils.c:2248 #, c-format -msgid "%.1f TB" -msgstr "%.1f TB" +msgid "%.1f Tb" +msgstr "%.1f Tb" -#: ../glib/gutils.c:2193 ../glib/gutils.c:2315 +#: ../glib/gutils.c:2249 #, c-format -msgid "%.1f PB" -msgstr "%.1f PB" +msgid "%.1f Pb" +msgstr "%.1f Pb" -#: ../glib/gutils.c:2196 ../glib/gutils.c:2320 +#: ../glib/gutils.c:2250 #, c-format -msgid "%.1f EB" -msgstr "%.1f EB" +msgid "%.1f Eb" +msgstr "%.1f Eb" + +#: ../glib/gutils.c:2253 +#, c-format +msgid "%.1f Kib" +msgstr "%.1f Kib" + +#: ../glib/gutils.c:2254 +#, c-format +msgid "%.1f Mib" +msgstr "%.1f Mib" + +#: ../glib/gutils.c:2255 +#, c-format +msgid "%.1f Gib" +msgstr "%.1f Gib" + +#: ../glib/gutils.c:2256 +#, c-format +msgid "%.1f Tib" +msgstr "%.1f Tib" + +#: ../glib/gutils.c:2257 +#, c-format +msgid "%.1f Pib" +msgstr "%.1f Pib" + +#: ../glib/gutils.c:2258 +#, c-format +msgid "%.1f Eib" +msgstr "%.1f Eib" + +#: ../glib/gutils.c:2292 ../glib/gutils.c:2418 +#, c-format +msgid "%u byte" +msgid_plural "%u bytes" +msgstr[0] "%u bita" + +#: ../glib/gutils.c:2296 +#, c-format +msgid "%u bit" +msgid_plural "%u bits" +msgstr[0] "%u bita" #. Translators: the %s in "%s bytes" will always be replaced by a number. -#: ../glib/gutils.c:2233 +#: ../glib/gutils.c:2363 #, c-format msgid "%s byte" msgid_plural "%s bytes" msgstr[0] "%s bita" +#. Translators: the %s in "%s bits" will always be replaced by a number. +#: ../glib/gutils.c:2368 +#, c-format +msgid "%s bit" +msgid_plural "%s bits" +msgstr[0] "%s bita" + #. Translators: this is from the deprecated function g_format_size_for_display() which uses 'KB' to #. * mean 1024 bytes. I am aware that 'KB' is not correct, but it has been preserved for reasons of #. * compatibility. Users will not see this string unless a program is using this deprecated function. #. * Please translate as literally as possible. #. -#: ../glib/gutils.c:2295 +#: ../glib/gutils.c:2431 #, c-format msgid "%.1f KB" msgstr "%.1f KB" + +#~ msgid "Error: object path not specified.\n" +#~ msgstr "Galat: path objek tak dinyatakan\n" + +#~ msgid "Error: signal not specified.\n" +#~ msgstr "Galat: sinyal tak dinyatakan\n" + +#~ msgid "Error: signal must be the fully-qualified name.\n" +#~ msgstr "Galat: sinyal harus berupa nama yang berkualifikasi penuh.\n" diff --git a/tap-driver.sh b/tap-driver.sh index 19aa531de..64e3eb674 100755 --- a/tap-driver.sh +++ b/tap-driver.sh @@ -154,7 +154,7 @@ fi -v diag_string="$diag_string" \ ' # FIXME: the usages of "cat >&3" below could be optimized when using -# FIXME: GNU awk, and/on on systems that supports /dev/fd/. +# FIXME: GNU awk, and/or on systems that supports /dev/fd/. # Implementation note: in what follows, `result_obj` will be an # associative array that (partly) simulates a TAP result object diff --git a/tests/assert-msg-test.gdb b/tests/assert-msg-test.gdb index 63a254152..dbecaaf2a 100644 --- a/tests/assert-msg-test.gdb +++ b/tests/assert-msg-test.gdb @@ -1,4 +1,5 @@ run set print elements 0 -print (char*) __glib_assert_msg +# Work around https://sourceware.org/bugzilla/show_bug.cgi?id=22501 +print *((char**) &__glib_assert_msg) quit diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am index 656941db1..aa5dbb602 100644 --- a/tests/gobject/Makefile.am +++ b/tests/gobject/Makefile.am @@ -22,6 +22,7 @@ installed_test_programs = \ signals \ singleton \ references \ + testgobject \ $(NULL) # Don't install these ones, and keep them out of 'make check' because they take too long... @@ -43,6 +44,7 @@ accumulator_SOURCES = accumulator.c testmarshal.c testmarshal.h signals_SOURCES = signals.c defaultiface_SOURCES = defaultiface.c testmodule.c testmodule.h dynamictype_SOURCES = dynamictype.c testmodule.c testmodule.h +testgobject_SOURCES = testgobject.c if ENABLE_TIMELOOP installed_test_programs += timeloop-closure @@ -55,12 +57,12 @@ glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal testmarshal.h: stamp-testmarshal.h @true -stamp-testmarshal.h: @REBUILD@ testmarshal.list $(glib_genmarshal) +stamp-testmarshal.h: testmarshal.list $(glib_genmarshal) $(AM_V_GEN) $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --header >> xgen-gmh \ && (cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h) \ && rm -f xgen-gmh xgen-gmh~ \ && echo timestamp > $@ -testmarshal.c: @REBUILD@ testmarshal.h testmarshal.list $(glib_genmarshal) +testmarshal.c: testmarshal.h testmarshal.list $(glib_genmarshal) $(AM_V_GEN) (echo "#include \"testmarshal.h\""; $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --body) >> xgen-gmc \ && cp xgen-gmc testmarshal.c \ && rm -f xgen-gmc xgen-gmc~ diff --git a/tests/gobject/meson.build b/tests/gobject/meson.build index ba72d7a1e..95212393b 100644 --- a/tests/gobject/meson.build +++ b/tests/gobject/meson.build @@ -8,6 +8,7 @@ gobject_tests = [ ['signals'], ['singleton'], ['references'], + ['testgobject'], ] # We cannot use gnome.genmarshal() here diff --git a/tests/gobject/singleton.c b/tests/gobject/singleton.c index 2795d0e8f..79a41b263 100644 --- a/tests/gobject/singleton.c +++ b/tests/gobject/singleton.c @@ -46,7 +46,7 @@ my_singleton_constructor (GType type, GObjectConstructParam *construct_properties) { if (the_one_and_only) - return g_object_ref (the_one_and_only); + return g_object_ref (G_OBJECT (the_one_and_only)); else return G_OBJECT_CLASS (my_singleton_parent_class)->constructor (type, n_construct_properties, construct_properties); } diff --git a/tests/gobject/testgobject.c b/tests/gobject/testgobject.c index 9302278e5..391e01852 100644 --- a/tests/gobject/testgobject.c +++ b/tests/gobject/testgobject.c @@ -206,7 +206,6 @@ test_object_init (TestObject *tobject) priv = TEST_OBJECT_GET_PRIVATE (tobject); g_assert (priv); - g_assert ((gchar *)priv >= (gchar *)tobject + sizeof (TestObject)); priv->dummy1 = 54321; } @@ -359,12 +358,10 @@ derived_object_init (DerivedObject *dobject) derived_priv = DERIVED_OBJECT_GET_PRIVATE (dobject); g_assert (derived_priv); - g_assert ((gchar *)derived_priv >= (gchar *)TEST_OBJECT_GET_PRIVATE (dobject) + sizeof (TestObjectPrivate)); test_priv = TEST_OBJECT_GET_PRIVATE (dobject); g_assert (test_priv); - g_assert ((gchar *)test_priv >= (gchar *)dobject + sizeof (TestObject)); } diff --git a/tests/meson.build b/tests/meson.build index 694e1790f..552178271 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -5,7 +5,6 @@ test_env = [ 'G_TEST_BUILDDIR=' + meson.current_build_dir(), 'G_DEBUG=gc-friendly', 'MALLOC_CHECK_=2', - 'MALLOC_PERTURB_=@0@'.format(random_number % 256), ] test_cargs = ['-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"'] diff --git a/win32/vs15/Makefile.am b/win32/vs15/Makefile.am index 94408c698..fcea2b3d7 100644 --- a/win32/vs15/Makefile.am +++ b/win32/vs15/Makefile.am @@ -42,6 +42,6 @@ MSVC_BASE_VER = 10 MSVC_BASE_VER_LONG = 2010 MSVC_VER = 15 MSVC_VER_LONG = 15 -MSVC_TOOLSET = 141 +#MSVC_TOOLSET = 141 include $(top_srcdir)/win32/Makefile-newvs.am |