summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-05-19 09:23:56 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-05-19 09:24:02 +0900
commit1defe28610e534d9362f90370889275a47f90bf7 (patch)
tree7e31f455c6c09e978d08904fce5d1a01b20387a7 /gio
parent7ae3a4342f42d9432e0d24c17bbcf6ea06232b95 (diff)
downloadglib-1defe28610e534d9362f90370889275a47f90bf7.tar.gz
glib-1defe28610e534d9362f90370889275a47f90bf7.tar.bz2
glib-1defe28610e534d9362f90370889275a47f90bf7.zip
Imported Upstream version 2.51.0
Change-Id: I4219f1e9924abb0277e06eb3575732907a86e82d Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gio')
-rw-r--r--gio/Makefile.am1
-rw-r--r--gio/gapplication-tool.c14
-rw-r--r--gio/gapplication.c2
-rw-r--r--gio/gcharsetconverter.c4
-rw-r--r--gio/gdbus-tool.c10
-rw-r--r--gio/gdbusaddress.c48
-rw-r--r--gio/gdbusauth.c24
-rw-r--r--gio/gdbusauthmechanismsha1.c34
-rw-r--r--gio/gdbusmessage.c30
-rw-r--r--gio/gdbusserver.c6
-rw-r--r--gio/gdesktopappinfo.c8
-rw-r--r--gio/gdrive.c10
-rw-r--r--gio/gdtlsconnection.c6
-rw-r--r--gio/gemblem.c4
-rw-r--r--gio/gemblemedicon.c2
-rw-r--r--gio/gfdonotificationbackend.c2
-rw-r--r--gio/gfile.c14
-rw-r--r--gio/gfileicon.c2
-rw-r--r--gio/gfileinputstream.c4
-rw-r--r--gio/gfileiostream.c2
-rw-r--r--gio/gfileoutputstream.c4
-rw-r--r--gio/gicon.c2
-rw-r--r--gio/ginetaddressmask.c2
-rw-r--r--gio/ginputstream.c2
-rw-r--r--gio/gio-tool-copy.c2
-rw-r--r--gio/gio-tool-info.c4
-rw-r--r--gio/gio-tool-list.c2
-rw-r--r--gio/gio-tool-mime.c8
-rw-r--r--gio/gio-tool-monitor.c2
-rw-r--r--gio/gio-tool-move.c4
-rw-r--r--gio/gio-tool-set.c2
-rw-r--r--gio/gio-tool.c4
-rw-r--r--gio/glib-compile-resources.c10
-rw-r--r--gio/glocalfile.c17
-rw-r--r--gio/glocalfileinfo.c4
-rw-r--r--gio/glocalfileoutputstream.c8
-rw-r--r--gio/glocalfileprivate.h30
-rw-r--r--gio/gmount.c14
-rw-r--r--gio/gnetworkaddress.c2
-rw-r--r--gio/goutputstream.c4
-rw-r--r--gio/gproxyaddress.c2
-rw-r--r--gio/gresolver.c12
-rw-r--r--gio/gresource-tool.c4
-rw-r--r--gio/gresource.c16
-rw-r--r--gio/gresourcefile.c10
-rw-r--r--gio/gsettings-tool.c16
-rw-r--r--gio/gsettings.c2
-rw-r--r--gio/gsocketclient.c4
-rw-r--r--gio/gsocks4aproxy.c4
-rw-r--r--gio/gsocks5proxy.c4
-rw-r--r--gio/gsubprocess.c2
-rw-r--r--gio/gthemedicon.c4
-rw-r--r--gio/gthreadedresolver.c22
-rw-r--r--gio/gtlscertificate.c4
-rw-r--r--gio/gtlsconnection.c6
-rw-r--r--gio/gunixmounts.c35
-rw-r--r--gio/gunixmounts.h3
-rw-r--r--gio/gvolume.c6
58 files changed, 291 insertions, 219 deletions
diff --git a/gio/Makefile.am b/gio/Makefile.am
index ffe5ee28a..cbeeaa13c 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -193,6 +193,7 @@ local_sources = \
ghttpproxy.h \
glocalfile.c \
glocalfile.h \
+ glocalfileprivate.h \
glocalfileenumerator.c \
glocalfileenumerator.h \
glocalfileinfo.c \
diff --git a/gio/gapplication-tool.c b/gio/gapplication-tool.c
index 35bdcc971..ef7182e65 100644
--- a/gio/gapplication-tool.c
+++ b/gio/gapplication-tool.c
@@ -54,7 +54,7 @@ static const struct help_topic topics[] = {
},
{ "launch", N_("Launch an application"),
N_("Launch the application (with optional files to open)"),
- N_("APPID [FILE...]")
+ N_("APPID [FILE…]")
},
{ "action", N_("Activate an action"),
N_("Invoke an action on the application"),
@@ -130,7 +130,7 @@ app_help (gboolean requested,
gint maxwidth;
gint i;
- g_string_append_printf (string, "\n %s %s %s\n\n", "gapplication", _("COMMAND"), _("[ARGS...]"));
+ g_string_append_printf (string, "\n %s %s %s\n\n", "gapplication", _("COMMAND"), _("[ARGS…]"));
g_string_append_printf (string, _("Commands:\n"));
maxwidth = 0;
@@ -143,7 +143,7 @@ app_help (gboolean requested,
g_string_append (string, "\n");
/* Translators: do not translate 'help', but please translate 'COMMAND'. */
- g_string_append_printf (string, _("Use '%s help COMMAND' to get detailed help.\n\n"), "gapplication");
+ g_string_append_printf (string, _("Use “%s help COMMAND” to get detailed help.\n\n"), "gapplication");
}
if (requested)
@@ -168,7 +168,7 @@ app_check_name (gchar **args,
if (!g_dbus_is_name (args[0]))
{
- g_printerr (_("invalid application id: '%s'\n"), args[0]);
+ g_printerr (_("invalid application id: “%s”\n"), args[0]);
return FALSE;
}
@@ -179,7 +179,7 @@ static int
app_no_args (const gchar *command)
{
/* Translators: %s is replaced with a command name like 'list-actions' */
- g_printerr (_("'%s' takes no arguments\n\n"), command);
+ g_printerr (_("“%s” takes no arguments\n\n"), command);
return app_help (FALSE, command);
}
@@ -322,8 +322,8 @@ app_action (gchar **args)
if (!g_action_name_is_valid (name))
{
- g_printerr (_("invalid action name: '%s'\n"
- "action names must consist of only alphanumerics, '-' and '.'\n"), name);
+ g_printerr (_("invalid action name: “%s”\n"
+ "action names must consist of only alphanumerics, “-” and “.”\n"), name);
return 1;
}
diff --git a/gio/gapplication.c b/gio/gapplication.c
index f56070520..0ffbc6627 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -547,7 +547,7 @@ g_application_parse_command_line (GApplication *application,
{
GOptionEntry entries[] = {
{ "gapplication-app-id", '\0', 0, G_OPTION_ARG_STRING, &app_id,
- N_("Override the application's ID") },
+ N_("Override the application’s ID") },
{ NULL }
};
diff --git a/gio/gcharsetconverter.c b/gio/gcharsetconverter.c
index 86be20e84..77e5a231e 100644
--- a/gio/gcharsetconverter.c
+++ b/gio/gcharsetconverter.c
@@ -451,11 +451,11 @@ g_charset_converter_initable_init (GInitable *initable,
{
if (errno == EINVAL)
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Conversion from character set '%s' to '%s' is not supported"),
+ _("Conversion from character set “%s” to “%s” is not supported"),
conv->from, conv->to);
else
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Could not open converter from '%s' to '%s'"),
+ _("Could not open converter from “%s” to “%s”"),
conv->from, conv->to);
return FALSE;
}
diff --git a/gio/gdbus-tool.c b/gio/gdbus-tool.c
index dc70b6750..7503528ca 100644
--- a/gio/gdbus-tool.c
+++ b/gio/gdbus-tool.c
@@ -99,7 +99,7 @@ usage (gint *argc, gchar **argv[], gboolean use_stdout)
" call Invoke a method on a remote object\n"
" emit Emit a signal\n"
"\n"
- "Use \"%s COMMAND --help\" to get help on each command.\n"),
+ "Use “%s COMMAND --help” to get help on each command.\n"),
program_name);
g_free (program_name);
g_option_context_set_description (o, s);
@@ -468,7 +468,7 @@ call_helper_get_method_in_signature (GDBusConnection *c,
if (interface_info == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Warning: According to introspection data, interface '%s' does not exist\n"),
+ _("Warning: According to introspection data, interface “%s” does not exist\n"),
interface_name);
goto out;
}
@@ -477,7 +477,7 @@ call_helper_get_method_in_signature (GDBusConnection *c,
if (method_info == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Warning: According to introspection data, method '%s' does not exist on interface '%s'\n"),
+ _("Warning: According to introspection data, method “%s” does not exist on interface “%s”\n"),
method_name,
interface_name);
goto out;
@@ -947,7 +947,7 @@ handle_call (gint *argc,
s = strrchr (opt_call_method, '.');
if (!request_completion && s == NULL)
{
- g_printerr (_("Error: Method name '%s' is invalid\n"), opt_call_method);
+ g_printerr (_("Error: Method name “%s” is invalid\n"), opt_call_method);
goto out;
}
method_name = g_strdup (s + 1);
@@ -1025,7 +1025,7 @@ handle_call (gint *argc,
if (type != NULL)
{
s = g_variant_type_dup_string (type);
- g_printerr (_("Error parsing parameter %d of type '%s': %s\n"),
+ g_printerr (_("Error parsing parameter %d of type “%s”: %s\n"),
parm + 1,
s,
context);
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index d05866658..23f18c9f1 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -150,7 +150,7 @@ is_valid_unix (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Unsupported key '%s' in address entry '%s'"),
+ _("Unsupported key “%s” in address entry “%s”"),
key,
address_entry);
goto out;
@@ -177,7 +177,7 @@ is_valid_unix (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Address '%s' is invalid (need exactly one of path, tmpdir or abstract keys)"),
+ _("Address “%s” is invalid (need exactly one of path, tmpdir or abstract keys)"),
address_entry);
goto out;
}
@@ -190,7 +190,7 @@ is_valid_unix (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Meaningless key/value pair combination in address entry '%s'"),
+ _("Meaningless key/value pair combination in address entry “%s”"),
address_entry);
out:
@@ -238,7 +238,7 @@ is_valid_nonce_tcp (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Unsupported key '%s' in address entry '%s'"),
+ _("Unsupported key “%s” in address entry “%s”"),
key,
address_entry);
goto out;
@@ -253,7 +253,7 @@ is_valid_nonce_tcp (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error in address '%s' - the port attribute is malformed"),
+ _("Error in address “%s” — the port attribute is malformed"),
address_entry);
goto out;
}
@@ -264,7 +264,7 @@ is_valid_nonce_tcp (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error in address '%s' - the family attribute is malformed"),
+ _("Error in address “%s” — the family attribute is malformed"),
address_entry);
goto out;
}
@@ -319,7 +319,7 @@ is_valid_tcp (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Unsupported key '%s' in address entry '%s'"),
+ _("Unsupported key “%s” in address entry “%s”"),
key,
address_entry);
goto out;
@@ -334,7 +334,7 @@ is_valid_tcp (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error in address '%s' - the port attribute is malformed"),
+ _("Error in address “%s” — the port attribute is malformed"),
address_entry);
goto out;
}
@@ -345,7 +345,7 @@ is_valid_tcp (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error in address '%s' - the family attribute is malformed"),
+ _("Error in address “%s” — the family attribute is malformed"),
address_entry);
goto out;
}
@@ -454,7 +454,7 @@ _g_dbus_address_parse_entry (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Address element '%s' does not contain a colon (:)"),
+ _("Address element “%s” does not contain a colon (:)"),
address_entry);
goto out;
}
@@ -475,7 +475,7 @@ _g_dbus_address_parse_entry (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Key/Value pair %d, '%s', in address element '%s' does not contain an equal sign"),
+ _("Key/Value pair %d, “%s”, in address element “%s” does not contain an equal sign"),
n,
kv_pair,
address_entry);
@@ -489,7 +489,7 @@ _g_dbus_address_parse_entry (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error unescaping key or value in Key/Value pair %d, '%s', in address element '%s'"),
+ _("Error unescaping key or value in Key/Value pair %d, “%s”, in address element “%s”"),
n,
kv_pair,
address_entry);
@@ -567,8 +567,8 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error in address '%s' - the unix transport requires exactly one of the "
- "keys 'path' or 'abstract' to be set"),
+ _("Error in address “%s” — the unix transport requires exactly one of the "
+ "keys “path” or “abstract” to be set"),
address_entry);
}
else if (path != NULL)
@@ -603,7 +603,7 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error in address '%s' - the host attribute is missing or malformed"),
+ _("Error in address “%s” — the host attribute is missing or malformed"),
address_entry);
goto out;
}
@@ -617,7 +617,7 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error in address '%s' - the port attribute is missing or malformed"),
+ _("Error in address “%s” — the port attribute is missing or malformed"),
address_entry);
goto out;
}
@@ -631,7 +631,7 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error in address '%s' - the noncefile attribute is missing or malformed"),
+ _("Error in address “%s” — the noncefile attribute is missing or malformed"),
address_entry);
goto out;
}
@@ -660,7 +660,7 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Unknown or unsupported transport '%s' for address '%s'"),
+ _("Unknown or unsupported transport “%s” for address “%s”"),
transport_name,
address_entry);
}
@@ -696,7 +696,7 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error opening nonce file '%s': %s"),
+ _("Error opening nonce file “%s”: %s"),
nonce_file,
g_strerror (errno));
g_object_unref (ret);
@@ -714,7 +714,7 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error reading from nonce file '%s': %s"),
+ _("Error reading from nonce file “%s”: %s"),
nonce_file,
g_strerror (errno));
}
@@ -723,7 +723,7 @@ g_dbus_address_connect (const gchar *address_entry,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error reading from nonce file '%s', expected 16 bytes, got %d"),
+ _("Error reading from nonce file “%s”, expected 16 bytes, got %d"),
nonce_file,
(gint) num_bytes_read);
}
@@ -741,7 +741,7 @@ g_dbus_address_connect (const gchar *address_entry,
cancellable,
error))
{
- g_prefix_error (error, _("Error writing contents of nonce file '%s' to stream:"), nonce_file);
+ g_prefix_error (error, _("Error writing contents of nonce file “%s” to stream:"), nonce_file);
g_object_unref (ret);
ret = NULL;
goto out;
@@ -1117,7 +1117,7 @@ get_session_address_dbus_launch (GError **error)
if (!g_spawn_check_exit_status (exit_status, error))
{
- g_prefix_error (error, _("Error spawning command line '%s': "), command_line);
+ g_prefix_error (error, _("Error spawning command line “%s”: "), command_line);
goto out;
}
@@ -1633,7 +1633,7 @@ g_dbus_address_get_for_bus_sync (GBusType bus_type,
G_IO_ERROR,
G_IO_ERROR_FAILED,
_("Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable"
- " - unknown value '%s'"),
+ " — unknown value “%s”"),
starter_bus);
}
else
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
index a870e86e0..4036d778a 100644
--- a/gio/gdbusauth.c
+++ b/gio/gdbusauth.c
@@ -1207,25 +1207,19 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
{
gchar *data;
gsize data_len;
-
+ gchar *encoded_data;
data = _g_dbus_auth_mechanism_server_data_send (mech, &data_len);
- if (data != NULL)
+ encoded_data = hexencode (data);
+ s = g_strdup_printf ("DATA %s\r\n", encoded_data);
+ g_free (encoded_data);
+ g_free (data);
+ debug_print ("SERVER: writing '%s'", s);
+ if (!g_data_output_stream_put_string (dos, s, cancellable, error))
{
- gchar *encoded_data;
-
- encoded_data = hexencode (data);
- s = g_strdup_printf ("DATA %s\r\n", encoded_data);
- g_free (encoded_data);
- g_free (data);
-
- debug_print ("SERVER: writing '%s'", s);
- if (!g_data_output_stream_put_string (dos, s, cancellable, error))
- {
- g_free (s);
- goto out;
- }
g_free (s);
+ goto out;
}
+ g_free (s);
}
goto change_state;
break;
diff --git a/gio/gdbusauthmechanismsha1.c b/gio/gdbusauthmechanismsha1.c
index 0b9db7f8f..0aa5c2516 100644
--- a/gio/gdbusauthmechanismsha1.c
+++ b/gio/gdbusauthmechanismsha1.c
@@ -258,7 +258,7 @@ ensure_keyring_directory (GError **error)
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errno),
- _("Error when getting information for directory '%s': %s"),
+ _("Error when getting information for directory “%s”: %s"),
path,
strerror (errno));
g_free (path);
@@ -270,7 +270,7 @@ ensure_keyring_directory (GError **error)
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("Permissions on directory '%s' are malformed. Expected mode 0700, got 0%o"),
+ _("Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o"),
path,
statbuf.st_mode & 0777);
g_free (path);
@@ -291,7 +291,7 @@ ensure_keyring_directory (GError **error)
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errno),
- _("Error creating directory '%s': %s"),
+ _("Error creating directory “%s”: %s"),
path,
strerror (errno));
g_free (path);
@@ -374,7 +374,7 @@ keyring_lookup_entry (const gchar *cookie_context,
error))
{
g_prefix_error (error,
- _("Error opening keyring '%s' for reading: "),
+ _("Error opening keyring “%s” for reading: "),
path);
goto out;
}
@@ -398,7 +398,7 @@ keyring_lookup_entry (const gchar *cookie_context,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("Line %d of the keyring at '%s' with content '%s' is malformed"),
+ _("Line %d of the keyring at “%s” with content “%s” is malformed"),
n + 1,
path,
line);
@@ -412,7 +412,7 @@ keyring_lookup_entry (const gchar *cookie_context,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("First token of line %d of the keyring at '%s' with content '%s' is malformed"),
+ _("First token of line %d of the keyring at “%s” with content “%s” is malformed"),
n + 1,
path,
line);
@@ -427,7 +427,7 @@ keyring_lookup_entry (const gchar *cookie_context,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("Second token of line %d of the keyring at '%s' with content '%s' is malformed"),
+ _("Second token of line %d of the keyring at “%s” with content “%s” is malformed"),
n + 1,
path,
line);
@@ -451,7 +451,7 @@ keyring_lookup_entry (const gchar *cookie_context,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("Didn't find cookie with id %d in the keyring at '%s'"),
+ _("Didn’t find cookie with id %d in the keyring at “%s”"),
cookie_id,
path);
@@ -529,7 +529,7 @@ keyring_acquire_lock (const gchar *path,
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errno),
- _("Error deleting stale lock file '%s': %s"),
+ _("Error deleting stale lock file “%s”: %s"),
lock,
strerror (errno));
goto out;
@@ -561,7 +561,7 @@ keyring_acquire_lock (const gchar *path,
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errno),
- _("Error creating lock file '%s': %s"),
+ _("Error creating lock file “%s”: %s"),
lock,
strerror (errno));
goto out;
@@ -591,7 +591,7 @@ keyring_release_lock (const gchar *path,
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errno),
- _("Error closing (unlinked) lock file '%s': %s"),
+ _("Error closing (unlinked) lock file “%s”: %s"),
lock,
strerror (errno));
goto out;
@@ -601,7 +601,7 @@ keyring_release_lock (const gchar *path,
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errno),
- _("Error unlinking lock file '%s': %s"),
+ _("Error unlinking lock file “%s”: %s"),
lock,
strerror (errno));
goto out;
@@ -678,7 +678,7 @@ keyring_generate_entry (const gchar *cookie_context,
{
g_propagate_prefixed_error (error,
local_error,
- _("Error opening keyring '%s' for writing: "),
+ _("Error opening keyring “%s” for writing: "),
path);
goto out;
}
@@ -711,7 +711,7 @@ keyring_generate_entry (const gchar *cookie_context,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("Line %d of the keyring at '%s' with content '%s' is malformed"),
+ _("Line %d of the keyring at “%s” with content “%s” is malformed"),
n + 1,
path,
line);
@@ -725,7 +725,7 @@ keyring_generate_entry (const gchar *cookie_context,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("First token of line %d of the keyring at '%s' with content '%s' is malformed"),
+ _("First token of line %d of the keyring at “%s” with content “%s” is malformed"),
n + 1,
path,
line);
@@ -739,7 +739,7 @@ keyring_generate_entry (const gchar *cookie_context,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
- _("Second token of line %d of the keyring at '%s' with content '%s' is malformed"),
+ _("Second token of line %d of the keyring at “%s” with content “%s” is malformed"),
n + 1,
path,
line);
@@ -875,7 +875,7 @@ keyring_generate_entry (const gchar *cookie_context,
else
{
g_prefix_error (error,
- _("(Additionally, releasing the lock for '%s' also failed: %s) "),
+ _("(Additionally, releasing the lock for “%s” also failed: %s) "),
path,
local_error->message);
}
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index d9d8f3726..86bd5bf1e 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -1366,7 +1366,7 @@ read_string (GMemoryBuffer *mbuf,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Expected NUL byte after the string '%s' but found byte %d"),
+ _("Expected NUL byte after the string “%s” but found byte %d"),
str, mbuf->data[mbuf->pos + len]);
g_free (str);
mbuf->pos += len + 1;
@@ -1386,7 +1386,7 @@ read_string (GMemoryBuffer *mbuf,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
_("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'"),
+ "The valid UTF-8 string up until that point was “%s”"),
offset,
(gint) len,
valid_str);
@@ -1584,7 +1584,7 @@ parse_value_from_blob (GMemoryBuffer *buf,
g_set_error (&local_error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Parsed value '%s' is not a valid D-Bus object path"),
+ _("Parsed value “%s” is not a valid D-Bus object path"),
v);
goto fail;
}
@@ -1606,7 +1606,7 @@ parse_value_from_blob (GMemoryBuffer *buf,
g_set_error (&local_error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Parsed value '%s' is not a valid D-Bus signature"),
+ _("Parsed value “%s” is not a valid D-Bus signature"),
v);
goto fail;
}
@@ -1673,7 +1673,7 @@ parse_value_from_blob (GMemoryBuffer *buf,
g_set_error (&local_error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Encountered array of type 'a%c', expected to have a length a multiple "
+ _("Encountered array of type “a%c”, expected to have a length a multiple "
"of %u bytes, but found to be %u bytes in length"),
g_variant_type_peek_string (element_type)[0], fixed_size, array_len);
goto fail;
@@ -1840,7 +1840,7 @@ parse_value_from_blob (GMemoryBuffer *buf,
g_set_error (&local_error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Parsed value '%s' for variant is not a valid D-Bus signature"),
+ _("Parsed value “%s” for variant is not a valid D-Bus signature"),
sig);
goto fail;
}
@@ -1864,7 +1864,7 @@ parse_value_from_blob (GMemoryBuffer *buf,
g_set_error (&local_error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error deserializing GVariant with type string '%s' from the D-Bus wire format"),
+ _("Error deserializing GVariant with type string “%s” from the D-Bus wire format"),
s);
g_free (s);
goto fail;
@@ -2048,7 +2048,7 @@ g_dbus_message_new_from_blob (guchar *blob,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Invalid endianness value. Expected 0x6c ('l') or 0x42 ('B') but found value 0x%02x"),
+ _("Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value 0x%02x"),
endianness);
goto out;
}
@@ -2117,7 +2117,7 @@ g_dbus_message_new_from_blob (guchar *blob,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Signature header with signature '%s' found but message body is empty"),
+ _("Signature header with signature “%s” found but message body is empty"),
signature_str);
goto out;
}
@@ -2131,7 +2131,7 @@ g_dbus_message_new_from_blob (guchar *blob,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Parsed value '%s' is not a valid D-Bus signature (for body)"),
+ _("Parsed value “%s” is not a valid D-Bus signature (for body)"),
signature_str);
goto out;
}
@@ -2512,7 +2512,7 @@ append_value_to_blob (GVariant *value,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Error serializing GVariant with type string '%s' to the D-Bus wire format"),
+ _("Error serializing GVariant with type string “%s” to the D-Bus wire format"),
g_variant_get_type_string (value));
goto fail;
}
@@ -2701,7 +2701,7 @@ g_dbus_message_to_blob (GDBusMessage *message,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Message body has signature '%s' but there is no signature header"),
+ _("Message body has signature “%s” but there is no signature header"),
signature_str);
g_free (tupled_signature_str);
goto out;
@@ -2711,7 +2711,7 @@ g_dbus_message_to_blob (GDBusMessage *message,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Message body has type signature '%s' but signature in the header field is '%s'"),
+ _("Message body has type signature “%s” but signature in the header field is “%s”"),
tupled_signature_str, g_variant_get_type_string (message->body));
g_free (tupled_signature_str);
goto out;
@@ -2727,7 +2727,7 @@ g_dbus_message_to_blob (GDBusMessage *message,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Message body is empty but signature in the header field is '(%s)'"),
+ _("Message body is empty but signature in the header field is “(%s)”"),
signature_str);
goto out;
}
@@ -3280,7 +3280,7 @@ g_dbus_message_to_gerror (GDBusMessage *message,
g_dbus_error_set_dbus_error (error,
error_name,
"",
- _("Error return with body of type '%s'"),
+ _("Error return with body of type “%s”"),
g_variant_get_type_string (body));
}
else
diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c
index dbafc188b..d23711fa9 100644
--- a/gio/gdbusserver.c
+++ b/gio/gdbusserver.c
@@ -870,7 +870,7 @@ try_tcp (GDBusServer *server,
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errno),
- _("Error writing nonce file at '%s': %s"),
+ _("Error writing nonce file at “%s”: %s"),
server->nonce_file,
strerror (errno));
goto out;
@@ -1041,7 +1041,7 @@ initable_init (GInitable *initable,
g_set_error (&last_error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("The string '%s' is not a valid D-Bus GUID"),
+ _("The string “%s” is not a valid D-Bus GUID"),
server->guid);
goto out;
}
@@ -1081,7 +1081,7 @@ initable_init (GInitable *initable,
g_set_error (&this_error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Cannot listen on unsupported transport '%s'"),
+ _("Cannot listen on unsupported transport “%s”"),
transport_name);
g_free (transport_name);
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index f45328e4f..fe9d71a0c 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -2401,7 +2401,7 @@ expand_application_parameters (GDesktopAppInfo *info,
if (exec_line == NULL)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Desktop file didn't specify Exec field"));
+ _("Desktop file didn’t specify Exec field"));
return FALSE;
}
@@ -3094,11 +3094,11 @@ ensure_dir (DirType type,
display_name = g_filename_display_name (path);
if (type == APP_DIR)
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
- _("Can't create user application configuration folder %s: %s"),
+ _("Can’t create user application configuration folder %s: %s"),
display_name, g_strerror (errsv));
else
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
- _("Can't create user MIME configuration folder %s: %s"),
+ _("Can’t create user MIME configuration folder %s: %s"),
display_name, g_strerror (errsv));
g_free (display_name);
@@ -3596,7 +3596,7 @@ g_desktop_app_info_ensure_saved (GDesktopAppInfo *info,
display_name = g_filename_display_name (filename);
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Can't create user desktop file %s"), display_name);
+ _("Can’t create user desktop file %s"), display_name);
g_free (display_name);
g_free (filename);
g_free (data);
diff --git a/gio/gdrive.c b/gio/gdrive.c
index ab19ab832..f69bc6176 100644
--- a/gio/gdrive.c
+++ b/gio/gdrive.c
@@ -414,7 +414,7 @@ g_drive_eject (GDrive *drive,
g_task_report_new_error (drive, callback, user_data,
g_drive_eject_with_operation,
G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("drive doesn't implement eject"));
+ _("drive doesn’t implement eject"));
return;
}
@@ -492,7 +492,7 @@ g_drive_eject_with_operation (GDrive *drive,
/* Translators: This is an error
* message for drive objects that
* don't implement any of eject or eject_with_operation. */
- _("drive doesn't implement eject or eject_with_operation"));
+ _("drive doesn’t implement eject or eject_with_operation"));
return;
}
@@ -568,7 +568,7 @@ g_drive_poll_for_media (GDrive *drive,
g_task_report_new_error (drive, callback, user_data,
g_drive_poll_for_media,
G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("drive doesn't implement polling for media"));
+ _("drive doesn’t implement polling for media"));
return;
}
@@ -773,7 +773,7 @@ g_drive_start (GDrive *drive,
g_task_report_new_error (drive, callback, user_data,
g_drive_start,
G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("drive doesn't implement start"));
+ _("drive doesn’t implement start"));
return;
}
@@ -875,7 +875,7 @@ g_drive_stop (GDrive *drive,
g_task_report_new_error (drive, callback, user_data,
g_drive_start,
G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("drive doesn't implement stop"));
+ _("drive doesn’t implement stop"));
return;
}
diff --git a/gio/gdtlsconnection.c b/gio/gdtlsconnection.c
index 08fa84f67..cfa282680 100644
--- a/gio/gdtlsconnection.c
+++ b/gio/gdtlsconnection.c
@@ -183,7 +183,7 @@ g_dtls_connection_default_init (GDtlsConnectionInterface *iface)
g_object_interface_install_property (iface,
g_param_spec_object ("certificate",
P_("Certificate"),
- P_("The connection's certificate"),
+ P_("The connection’s certificate"),
G_TYPE_TLS_CERTIFICATE,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
@@ -203,7 +203,7 @@ g_dtls_connection_default_init (GDtlsConnectionInterface *iface)
g_object_interface_install_property (iface,
g_param_spec_object ("peer-certificate",
P_("Peer Certificate"),
- P_("The connection's peer's certificate"),
+ P_("The connection’s peer’s certificate"),
G_TYPE_TLS_CERTIFICATE,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
@@ -222,7 +222,7 @@ g_dtls_connection_default_init (GDtlsConnectionInterface *iface)
g_object_interface_install_property (iface,
g_param_spec_flags ("peer-certificate-errors",
P_("Peer Certificate Errors"),
- P_("Errors found with the peer's certificate"),
+ P_("Errors found with the peer’s certificate"),
G_TYPE_TLS_CERTIFICATE_FLAGS,
0,
G_PARAM_READABLE |
diff --git a/gio/gemblem.c b/gio/gemblem.c
index ed35eb2b0..96304c6e7 100644
--- a/gio/gemblem.c
+++ b/gio/gemblem.c
@@ -138,7 +138,7 @@ g_emblem_class_init (GEmblemClass *klass)
g_object_class_install_property (gobject_class,
PROP_ORIGIN,
g_param_spec_enum ("origin",
- P_("GEmblem's origin"),
+ P_("GEmblem’s origin"),
P_("Tells which origin the emblem is derived from"),
G_TYPE_EMBLEM_ORIGIN,
G_EMBLEM_ORIGIN_UNKNOWN,
@@ -320,7 +320,7 @@ g_emblem_from_tokens (gchar **tokens,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Can't handle version %d of GEmblem encoding"),
+ _("Can’t handle version %d of GEmblem encoding"),
version);
return NULL;
}
diff --git a/gio/gemblemedicon.c b/gio/gemblemedicon.c
index f90af899b..95bc72e66 100644
--- a/gio/gemblemedicon.c
+++ b/gio/gemblemedicon.c
@@ -359,7 +359,7 @@ g_emblemed_icon_from_tokens (gchar **tokens,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Can't handle version %d of GEmblemedIcon encoding"),
+ _("Can’t handle version %d of GEmblemedIcon encoding"),
version);
goto fail;
}
diff --git a/gio/gfdonotificationbackend.c b/gio/gfdonotificationbackend.c
index 9a39d75bf..7b980278a 100644
--- a/gio/gfdonotificationbackend.c
+++ b/gio/gfdonotificationbackend.c
@@ -424,7 +424,7 @@ g_fdo_notification_backend_withdraw_notification (GNotificationBackend *backend,
"org.freedesktop.Notifications",
"/org/freedesktop/Notifications",
"org.freedesktop.Notifications", "CloseNotification",
- g_variant_new ("(u)", n->notify_id), NULL,
+ g_variant_new ("(u)", n->id), NULL,
G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, NULL);
}
diff --git a/gio/gfile.c b/gio/gfile.c
index 851213eb0..0e9b608a4 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -2512,7 +2512,7 @@ copy_symlink (GFile *destination,
if (file_type == G_FILE_TYPE_DIRECTORY)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY,
- _("Can't copy over directory"));
+ _("Can’t copy over directory"));
return FALSE;
}
}
@@ -2572,7 +2572,7 @@ open_source_for_copy (GFile *source,
if (file_type == G_FILE_TYPE_DIRECTORY)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_MERGE,
- _("Can't copy directory over directory"));
+ _("Can’t copy directory over directory"));
return NULL;
}
/* continue to would_recurse error */
@@ -2599,7 +2599,7 @@ open_source_for_copy (GFile *source,
}
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_RECURSE,
- _("Can't recursively copy directory"));
+ _("Can’t recursively copy directory"));
return NULL;
}
@@ -3025,7 +3025,7 @@ btrfs_reflink_with_progress (GInputStream *in,
/* Most probably something odd happened; retry with fallback */
g_set_error_literal (error, G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
- _("Copy (reflink/clone) is not supported or didn't work"));
+ _("Copy (reflink/clone) is not supported or didn’t work"));
/* We retry with fallback for all error cases because Btrfs is currently
* unstable, and so we can't trust it to do clone properly.
* In addition, any hard errors here would cause the same failure in the
@@ -3088,7 +3088,7 @@ file_copy_fallback (GFile *source,
{
/* FIXME: could try to recreate device nodes and others? */
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Can't copy special file"));
+ _("Can’t copy special file"));
goto out;
}
@@ -4155,7 +4155,7 @@ g_file_set_display_name (GFile *file,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("File names cannot contain '%c'"), G_DIR_SEPARATOR);
+ _("File names cannot contain “%c”"), G_DIR_SEPARATOR);
return NULL;
}
@@ -6601,7 +6601,7 @@ g_file_mount_enclosing_volume (GFile *location,
g_task_report_new_error (location, callback, user_data,
g_file_mount_enclosing_volume,
G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("volume doesn't implement mount"));
+ _("volume doesn’t implement mount"));
return;
}
diff --git a/gio/gfileicon.c b/gio/gfileicon.c
index 793a2ab7a..fb76d8a1a 100644
--- a/gio/gfileicon.c
+++ b/gio/gfileicon.c
@@ -233,7 +233,7 @@ g_file_icon_from_tokens (gchar **tokens,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Can't handle version %d of GFileIcon encoding"),
+ _("Can’t handle version %d of GFileIcon encoding"),
version);
goto out;
}
diff --git a/gio/gfileinputstream.c b/gio/gfileinputstream.c
index 273bd2279..bdfb7794c 100644
--- a/gio/gfileinputstream.c
+++ b/gio/gfileinputstream.c
@@ -146,7 +146,7 @@ g_file_input_stream_query_info (GFileInputStream *stream,
info = class->query_info (stream, attributes, cancellable, error);
else
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Stream doesn't support query_info"));
+ _("Stream doesn’t support query_info"));
if (cancellable)
g_cancellable_pop_current (cancellable);
@@ -391,7 +391,7 @@ query_info_async_thread (GTask *task,
info = class->query_info (stream, attributes, cancellable, &error);
else
g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Stream doesn't support query_info"));
+ _("Stream doesn’t support query_info"));
if (info == NULL)
g_task_return_error (task, error);
diff --git a/gio/gfileiostream.c b/gio/gfileiostream.c
index 87c424a8c..8a0ec1536 100644
--- a/gio/gfileiostream.c
+++ b/gio/gfileiostream.c
@@ -164,7 +164,7 @@ g_file_io_stream_query_info (GFileIOStream *stream,
info = class->query_info (stream, attributes, cancellable, error);
else
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Stream doesn't support query_info"));
+ _("Stream doesn’t support query_info"));
if (cancellable)
g_cancellable_pop_current (cancellable);
diff --git a/gio/gfileoutputstream.c b/gio/gfileoutputstream.c
index 61987ca35..e6e298a75 100644
--- a/gio/gfileoutputstream.c
+++ b/gio/gfileoutputstream.c
@@ -161,7 +161,7 @@ g_file_output_stream_query_info (GFileOutputStream *stream,
info = class->query_info (stream, attributes, cancellable, error);
else
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Stream doesn't support query_info"));
+ _("Stream doesn’t support query_info"));
if (cancellable)
g_cancellable_pop_current (cancellable);
@@ -494,7 +494,7 @@ query_info_async_thread (GTask *task,
info = class->query_info (stream, attributes, cancellable, &error);
else
g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Stream doesn't support query_info"));
+ _("Stream doesn’t support query_info"));
if (info == NULL)
g_task_return_error (task, error);
diff --git a/gio/gicon.c b/gio/gicon.c
index 6c9a3ec97..a252c408e 100644
--- a/gio/gicon.c
+++ b/gio/gicon.c
@@ -458,7 +458,7 @@ g_icon_new_for_string (const gchar *str,
g_set_error_literal (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Can't handle the supplied version of the icon encoding"));
+ _("Can’t handle the supplied version of the icon encoding"));
return icon;
}
diff --git a/gio/ginetaddressmask.c b/gio/ginetaddressmask.c
index f717c7798..2279abf30 100644
--- a/gio/ginetaddressmask.c
+++ b/gio/ginetaddressmask.c
@@ -297,7 +297,7 @@ g_inet_address_mask_new_from_string (const gchar *mask_string,
{
parse_error:
g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
- _("Could not parse '%s' as IP address mask"),
+ _("Could not parse “%s” as IP address mask"),
mask_string);
return NULL;
}
diff --git a/gio/ginputstream.c b/gio/ginputstream.c
index 772bd1f70..9406bbb08 100644
--- a/gio/ginputstream.c
+++ b/gio/ginputstream.c
@@ -185,7 +185,7 @@ g_input_stream_read (GInputStream *stream,
if (class->read_fn == NULL)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Input stream doesn't implement read"));
+ _("Input stream doesn’t implement read"));
return -1;
}
diff --git a/gio/gio-tool-copy.c b/gio/gio-tool-copy.c
index 4f3c391f7..c64fd4e78 100644
--- a/gio/gio-tool-copy.c
+++ b/gio/gio-tool-copy.c
@@ -184,7 +184,7 @@ handle_copy (int argc, char *argv[], gboolean do_help)
error = NULL;
uri = g_file_get_uri (target);
- g_print (_("%s: overwrite '%s'? "), argv[0], uri);
+ g_print (_("%s: overwrite “%s”? "), argv[0], uri);
g_free (uri);
if (fgets (line, sizeof (line), stdin) &&
diff --git a/gio/gio-tool-info.c b/gio/gio-tool-info.c
index 055fd5892..8b86293d7 100644
--- a/gio/gio-tool-info.c
+++ b/gio/gio-tool-info.c
@@ -34,7 +34,7 @@ static const GOptionEntry entries[] = {
{ "query-writable", 'w', 0, G_OPTION_ARG_NONE, &writable, N_("List writable attributes"), NULL },
{ "filesystem", 'f', 0, G_OPTION_ARG_NONE, &filesystem, N_("Get file system info"), NULL },
{ "attributes", 'a', 0, G_OPTION_ARG_STRING, &attributes, N_("The attributes to get"), N_("ATTRIBUTES") },
- { "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don't follow symbolic links"), NULL },
+ { "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don’t follow symbolic links"), NULL },
{ NULL }
};
@@ -286,7 +286,7 @@ handle_info (int argc, char *argv[], gboolean do_help)
"locations instead of local files: for example, you can use something\n"
"like smb://server/resource/file.txt as location. File attributes can\n"
"be specified with their GIO name, e.g. standard::icon, or just by\n"
- "namespace, e.g. unix, or by '*', which matches all attributes"));
+ "namespace, e.g. unix, or by “*”, which matches all attributes"));
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
if (do_help)
diff --git a/gio/gio-tool-list.c b/gio/gio-tool-list.c
index ec3858385..528024fb8 100644
--- a/gio/gio-tool-list.c
+++ b/gio/gio-tool-list.c
@@ -35,7 +35,7 @@ static const GOptionEntry entries[] = {
{ "attributes", 'a', 0, G_OPTION_ARG_STRING, &attributes, N_("The attributes to get"), N_("ATTRIBUTES") },
{ "hidden", 'h', 0, G_OPTION_ARG_NONE, &show_hidden, N_("Show hidden files"), NULL },
{ "long", 'l', 0, G_OPTION_ARG_NONE, &show_long, N_("Use a long listing format"), NULL },
- { "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don't follow symbolic links"), NULL},
+ { "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don’t follow symbolic links"), NULL},
{ "print-uris", 'u', 0, G_OPTION_ARG_NONE, &print_uris, N_("Print full URIs"), NULL},
{ NULL }
};
diff --git a/gio/gio-tool-mime.c b/gio/gio-tool-mime.c
index 467808d89..92a96c0fb 100644
--- a/gio/gio-tool-mime.c
+++ b/gio/gio-tool-mime.c
@@ -110,13 +110,13 @@ handle_mime (int argc, char *argv[], gboolean do_help)
info = g_app_info_get_default_for_type (mimetype, FALSE);
if (!info)
{
- g_print (_("No default applications for '%s'\n"), mimetype);
+ g_print (_("No default applications for “%s”\n"), mimetype);
}
else
{
GList *list, *l;
- g_print (_("Default application for '%s': %s\n"), mimetype, g_app_info_get_id (info));
+ g_print (_("Default application for “%s”: %s\n"), mimetype, g_app_info_get_id (info));
g_object_unref (info);
list = g_app_info_get_all_for_type (mimetype);
@@ -156,13 +156,13 @@ handle_mime (int argc, char *argv[], gboolean do_help)
info = get_app_info_for_id (handler);
if (info == NULL)
{
- g_printerr (_("Failed to load info for handler '%s'\n"), handler);
+ g_printerr (_("Failed to load info for handler “%s”\n"), handler);
return 1;
}
if (g_app_info_set_as_default_for_type (info, mimetype, &error) == FALSE)
{
- g_printerr (_("Failed to set '%s' as the default handler for '%s': %s\n"),
+ g_printerr (_("Failed to set “%s” as the default handler for “%s”: %s\n"),
handler, mimetype, error->message);
g_error_free (error);
g_object_unref (info);
diff --git a/gio/gio-tool-monitor.c b/gio/gio-tool-monitor.c
index e137a5d16..9e43d99a6 100644
--- a/gio/gio-tool-monitor.c
+++ b/gio/gio-tool-monitor.c
@@ -40,7 +40,7 @@ static const GOptionEntry entries[] = {
{ "direct", 'D', 0, G_OPTION_ARG_FILENAME_ARRAY, &watch_direct,
N_("Monitor a file directly (notices changes made via hardlinks)"), N_("LOCATION") },
{ "silent", 's', 0, G_OPTION_ARG_FILENAME_ARRAY, &watch_silent,
- N_("Monitors a file directly, but doesn't report changes"), N_("LOCATION") },
+ N_("Monitors a file directly, but doesn’t report changes"), N_("LOCATION") },
{ "no-moves", 'n', 0, G_OPTION_ARG_NONE, &no_moves,
N_("Report moves and renames as simple deleted/created events"), NULL },
{ "mounts", 'm', 0, G_OPTION_ARG_NONE, &mounts,
diff --git a/gio/gio-tool-move.c b/gio/gio-tool-move.c
index 253e61074..acbe8e954 100644
--- a/gio/gio-tool-move.c
+++ b/gio/gio-tool-move.c
@@ -39,7 +39,7 @@ static const GOptionEntry entries[] = {
{ "progress", 'p', 0, G_OPTION_ARG_NONE, &progress, N_("Show progress"), NULL },
{ "interactive", 'i', 0, G_OPTION_ARG_NONE, &interactive, N_("Prompt before overwrite"), NULL },
{ "backup", 'b', 0, G_OPTION_ARG_NONE, &backup, N_("Backup existing destination files"), NULL },
- { "no-copy-fallback", 'C', 0, G_OPTION_ARG_NONE, &no_copy_fallback, N_("Don't use copy and delete fallback"), NULL },
+ { "no-copy-fallback", 'C', 0, G_OPTION_ARG_NONE, &no_copy_fallback, N_("Don’t use copy and delete fallback"), NULL },
{ NULL }
};
@@ -178,7 +178,7 @@ handle_move (int argc, char *argv[], gboolean do_help)
error = NULL;
uri = g_file_get_uri (target);
- g_print (_("%s: overwrite '%s'? "), argv[0], uri);
+ g_print (_("%s: overwrite “%s”? "), argv[0], uri);
g_free (uri);
if (fgets (line, sizeof (line), stdin) &&
(line[0] == 'y' || line[0] == 'Y'))
diff --git a/gio/gio-tool-set.c b/gio/gio-tool-set.c
index 3a0e2e489..2b63acab8 100644
--- a/gio/gio-tool-set.c
+++ b/gio/gio-tool-set.c
@@ -31,7 +31,7 @@ static gboolean nofollow_symlinks = FALSE;
static const GOptionEntry entries[] = {
{ "type", 't', 0, G_OPTION_ARG_STRING, &attr_type, N_("Type of the attribute"), N_("TYPE") },
- { "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don't follow symbolic links"), NULL },
+ { "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don’t follow symbolic links"), NULL },
{ NULL }
};
diff --git a/gio/gio-tool.c b/gio/gio-tool.c
index 1c084316b..2937d8e71 100644
--- a/gio/gio-tool.c
+++ b/gio/gio-tool.c
@@ -184,7 +184,7 @@ handle_version (int argc, char *argv[], gboolean do_help)
if (do_help || argc > 1)
{
if (!do_help)
- g_printerr ("gio: %s\n\n", _("'version' takes no arguments"));
+ g_printerr ("gio: %s\n\n", _("“version” takes no arguments"));
g_printerr ("%s\n", _("Usage:"));
g_printerr (" gio version\n");
@@ -225,7 +225,7 @@ usage (void)
g_printerr (" trash %s\n", _("Move files or directories to the trash"));
g_printerr (" tree %s\n", _("Lists the contents of locations in a tree"));
g_printerr ("\n");
- g_printerr (_("Use %s to get detailed help.\n"), "'gio help COMMAND'");
+ g_printerr (_("Use %s to get detailed help.\n"), "“gio help COMMAND”");
exit (1);
}
diff --git a/gio/glib-compile-resources.c b/gio/glib-compile-resources.c
index bd5058d64..3d13b124e 100644
--- a/gio/glib-compile-resources.c
+++ b/gio/glib-compile-resources.c
@@ -245,7 +245,7 @@ end_element (GMarkupParseContext *context,
if (real_file == NULL && state->collect_data)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Failed to locate '%s' in any source directory"), file);
+ _("Failed to locate “%s” in any source directory"), file);
return;
}
}
@@ -256,7 +256,7 @@ end_element (GMarkupParseContext *context,
if (!exists && state->collect_data)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Failed to locate '%s' in current directory"), file);
+ _("Failed to locate “%s” in current directory"), file);
return;
}
}
@@ -287,7 +287,7 @@ end_element (GMarkupParseContext *context,
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
- _("Unknown processing option \"%s\""), options[i]);
+ _("Unknown processing option “%s”"), options[i]);
g_strfreev (options);
goto cleanup;
}
@@ -626,8 +626,8 @@ main (int argc, char **argv)
{ "generate-source", 0, 0, G_OPTION_ARG_NONE, &generate_source, N_("Generate sourcecode used to link in the resource file into your code"), NULL },
{ "generate-dependencies", 0, 0, G_OPTION_ARG_NONE, &generate_dependencies, N_("Generate dependency list"), NULL },
{ "dependency-file", 0, 0, G_OPTION_ARG_FILENAME, &dependency_file, N_("name of the dependency file to generate"), N_("FILE") },
- { "manual-register", 0, 0, G_OPTION_ARG_NONE, &manual_register, N_("Don't automatically create and register resource"), NULL },
- { "internal", 0, 0, G_OPTION_ARG_NONE, &internal, N_("Don't export functions; declare them G_GNUC_INTERNAL"), NULL },
+ { "manual-register", 0, 0, G_OPTION_ARG_NONE, &manual_register, N_("Don’t automatically create and register resource"), NULL },
+ { "internal", 0, 0, G_OPTION_ARG_NONE, &internal, N_("Don’t export functions; declare them G_GNUC_INTERNAL"), NULL },
{ "c-name", 0, 0, G_OPTION_ARG_STRING, &c_name, N_("C identifier name used for the generated source code"), NULL },
{ NULL }
};
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index 4075d4b52..8f64777e6 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -51,6 +51,7 @@
#include "gfileattribute.h"
#include "glocalfile.h"
+#include "glocalfileprivate.h"
#include "glocalfileinfo.h"
#include "glocalfileenumerator.h"
#include "glocalfileinputstream.h"
@@ -1195,7 +1196,7 @@ g_local_file_set_display_name (GFile *file,
if (parent == NULL)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Can't rename root directory"));
+ _("Can’t rename root directory"));
return NULL;
}
@@ -1220,7 +1221,7 @@ g_local_file_set_display_name (GFile *file,
else
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_EXISTS,
- _("Can't rename file, filename already exists"));
+ _("Can’t rename file, filename already exists"));
return NULL;
}
@@ -1706,8 +1707,8 @@ find_mountpoint_for (const char *file,
}
}
-static char *
-find_topdir_for (const char *file)
+char *
+_g_local_file_find_topdir_for (const char *file)
{
char *dir;
char *mountpoint = NULL;
@@ -1961,8 +1962,8 @@ g_local_file_trash (GFile *file,
uid = geteuid ();
g_snprintf (uid_str, sizeof (uid_str), "%lu", (unsigned long)uid);
-
- topdir = find_topdir_for (local->filename);
+
+ topdir = _g_local_file_find_topdir_for (local->filename);
if (topdir == NULL)
{
g_set_io_error (error,
@@ -2366,12 +2367,12 @@ g_local_file_move (GFile *source,
g_set_error_literal (error,
G_IO_ERROR,
G_IO_ERROR_WOULD_MERGE,
- _("Can't move directory over directory"));
+ _("Can’t move directory over directory"));
else
g_set_error_literal (error,
G_IO_ERROR,
G_IO_ERROR_IS_DIRECTORY,
- _("Can't copy over directory"));
+ _("Can’t copy over directory"));
return FALSE;
}
}
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 620320fcf..595d73654 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -772,7 +772,7 @@ set_xattr (char *filename,
{
g_set_error (error, G_IO_ERROR,
g_io_error_from_errno (errsv),
- _("Error setting extended attribute '%s': %s"),
+ _("Error setting extended attribute “%s”: %s"),
escaped_attribute, g_strerror (errsv));
return FALSE;
}
@@ -1763,7 +1763,7 @@ _g_local_file_info_get (const char *basename,
g_object_unref (info);
g_set_error (error, G_IO_ERROR,
g_io_error_from_errno (errsv),
- _("Error when getting information for file '%s': %s"),
+ _("Error when getting information for file “%s”: %s"),
display_name, g_strerror (errsv));
g_free (display_name);
return NULL;
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
index 491d7991b..65c51d71f 100644
--- a/gio/glocalfileoutputstream.c
+++ b/gio/glocalfileoutputstream.c
@@ -552,7 +552,7 @@ set_error_from_open_errno (const char *filename,
char *display_name = g_filename_display_name (filename);
g_set_error (error, G_IO_ERROR,
g_io_error_from_errno (errsv),
- _("Error opening file '%s': %s"),
+ _("Error opening file “%s”: %s"),
display_name, g_strerror (errsv));
g_free (display_name);
}
@@ -782,7 +782,7 @@ handle_overwrite_open (const char *filename,
char *display_name = g_filename_display_name (filename);
g_set_error (error, G_IO_ERROR,
g_io_error_from_errno (errsv),
- _("Error opening file '%s': %s"),
+ _("Error opening file “%s”: %s"),
display_name, g_strerror (errsv));
g_free (display_name);
return -1;
@@ -800,7 +800,7 @@ handle_overwrite_open (const char *filename,
char *display_name = g_filename_display_name (filename);
g_set_error (error, G_IO_ERROR,
g_io_error_from_errno (errsv),
- _("Error when getting information for file '%s': %s"),
+ _("Error when getting information for file “%s”: %s"),
display_name, g_strerror (errsv));
g_free (display_name);
goto err_out;
@@ -1032,7 +1032,7 @@ handle_overwrite_open (const char *filename,
char *display_name = g_filename_display_name (filename);
g_set_error (error, G_IO_ERROR,
g_io_error_from_errno (errsv),
- _("Error opening file '%s': %s"),
+ _("Error opening file “%s”: %s"),
display_name, g_strerror (errsv));
g_free (display_name);
goto err_out2;
diff --git a/gio/glocalfileprivate.h b/gio/glocalfileprivate.h
new file mode 100644
index 000000000..b4090a743
--- /dev/null
+++ b/gio/glocalfileprivate.h
@@ -0,0 +1,30 @@
+/* GIO - GLib Input, Output and Streaming Library
+ *
+ * Copyright (C) 2016 Red Hat, 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 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: Ondrej Holy <oholy@redhat.com>
+ */
+
+#ifndef __G_LOCAL_FILE_PRIVATE_H__
+#define __G_LOCAL_FILE_PRIVATE_H__
+
+G_BEGIN_DECLS
+
+gchar *_g_local_file_find_topdir_for (const char *file_path);
+
+G_END_DECLS
+
+#endif /* __G_LOCAL_FILE_PRIVATE_H__ */
diff --git a/gio/gmount.c b/gio/gmount.c
index 5deb55bfb..175877599 100644
--- a/gio/gmount.c
+++ b/gio/gmount.c
@@ -390,7 +390,7 @@ g_mount_unmount (GMount *mount,
/* Translators: This is an error
* message for mount objects that
* don't implement unmount. */
- _("mount doesn't implement \"unmount\""));
+ _("mount doesn’t implement “unmount”"));
return;
}
@@ -466,7 +466,7 @@ g_mount_eject (GMount *mount,
/* Translators: This is an error
* message for mount objects that
* don't implement eject. */
- _("mount doesn't implement \"eject\""));
+ _("mount doesn’t implement “eject”"));
return;
}
@@ -544,7 +544,7 @@ g_mount_unmount_with_operation (GMount *mount,
/* Translators: This is an error
* message for mount objects that
* don't implement any of unmount or unmount_with_operation. */
- _("mount doesn't implement \"unmount\" or \"unmount_with_operation\""));
+ _("mount doesn’t implement “unmount” or “unmount_with_operation”"));
return;
}
@@ -629,7 +629,7 @@ g_mount_eject_with_operation (GMount *mount,
/* Translators: This is an error
* message for mount objects that
* don't implement any of eject or eject_with_operation. */
- _("mount doesn't implement \"eject\" or \"eject_with_operation\""));
+ _("mount doesn’t implement “eject” or “eject_with_operation”"));
return;
}
@@ -717,7 +717,7 @@ g_mount_remount (GMount *mount,
/* Translators: This is an error
* message for mount objects that
* don't implement remount. */
- _("mount doesn't implement \"remount\""));
+ _("mount doesn’t implement “remount”"));
return;
}
@@ -799,7 +799,7 @@ g_mount_guess_content_type (GMount *mount,
/* Translators: This is an error
* message for mount objects that
* don't implement content type guessing. */
- _("mount doesn't implement content type guessing"));
+ _("mount doesn’t implement content type guessing"));
return;
}
@@ -886,7 +886,7 @@ g_mount_guess_content_type_sync (GMount *mount,
/* Translators: This is an error
* message for mount objects that
* don't implement content type guessing. */
- _("mount doesn't implement synchronous content type guessing"));
+ _("mount doesn’t implement synchronous content type guessing"));
return NULL;
}
diff --git a/gio/gnetworkaddress.c b/gio/gnetworkaddress.c
index 6e0122766..ba82164de 100644
--- a/gio/gnetworkaddress.c
+++ b/gio/gnetworkaddress.c
@@ -375,7 +375,7 @@ g_network_address_parse (const gchar *host_and_port,
if (end == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
- _("Hostname '%s' contains '[' but not ']'"), host_and_port);
+ _("Hostname “%s” contains “[” but not “]”"), host_and_port);
return NULL;
}
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index db9145074..8e8172fbc 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -209,7 +209,7 @@ g_output_stream_write (GOutputStream *stream,
if (class->write_fn == NULL)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Output stream doesn't implement write"));
+ _("Output stream doesn’t implement write"));
return -1;
}
@@ -557,7 +557,7 @@ g_output_stream_real_splice (GOutputStream *stream,
if (class->write_fn == NULL)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Output stream doesn't implement write"));
+ _("Output stream doesn’t implement write"));
res = FALSE;
goto notsupported;
}
diff --git a/gio/gproxyaddress.c b/gio/gproxyaddress.c
index 0227b9ec7..0d263fbdd 100644
--- a/gio/gproxyaddress.c
+++ b/gio/gproxyaddress.c
@@ -272,7 +272,7 @@ g_proxy_address_class_init (GProxyAddressClass *klass)
PROP_URI,
g_param_spec_string ("uri",
P_("URI"),
- P_("The proxy's URI"),
+ P_("The proxy’s URI"),
NULL,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
diff --git a/gio/gresolver.c b/gio/gresolver.c
index 56dd5a1db..9b931bb56 100644
--- a/gio/gresolver.c
+++ b/gio/gresolver.c
@@ -185,6 +185,7 @@ g_resolver_init (GResolver *resolver)
#endif
}
+G_LOCK_DEFINE_STATIC (default_resolver);
static GResolver *default_resolver;
/**
@@ -201,10 +202,15 @@ static GResolver *default_resolver;
GResolver *
g_resolver_get_default (void)
{
+ GResolver *ret;
+
+ G_LOCK (default_resolver);
if (!default_resolver)
default_resolver = g_object_new (G_TYPE_THREADED_RESOLVER, NULL);
+ ret = g_object_ref (default_resolver);
+ G_UNLOCK (default_resolver);
- return g_object_ref (default_resolver);
+ return ret;
}
/**
@@ -226,9 +232,11 @@ g_resolver_get_default (void)
void
g_resolver_set_default (GResolver *resolver)
{
+ G_LOCK (default_resolver);
if (default_resolver)
g_object_unref (default_resolver);
default_resolver = g_object_ref (resolver);
+ G_UNLOCK (default_resolver);
}
/* Bionic has res_init() but it's not in any header */
@@ -330,7 +338,7 @@ handle_ip_address (const char *hostname,
#endif
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
- _("Error resolving '%s': %s"),
+ _("Error resolving “%s”: %s"),
hostname, gai_strerror (EAI_NONAME));
return TRUE;
}
diff --git a/gio/gresource-tool.c b/gio/gresource-tool.c
index 262dd7b69..51fabc192 100644
--- a/gio/gresource-tool.c
+++ b/gio/gresource-tool.c
@@ -532,7 +532,7 @@ cmd_help (gboolean requested,
{
g_string_append (string,
_("Usage:\n"
- " gresource [--section SECTION] COMMAND [ARGS...]\n"
+ " gresource [--section SECTION] COMMAND [ARGS…]\n"
"\n"
"Commands:\n"
" help Show this information\n"
@@ -541,7 +541,7 @@ cmd_help (gboolean requested,
" details List resources with details\n"
" extract Extract a resource\n"
"\n"
- "Use 'gresource help COMMAND' to get detailed help.\n\n"));
+ "Use “gresource help COMMAND” to get detailed help.\n\n"));
}
else
{
diff --git a/gio/gresource.c b/gio/gresource.c
index 59c5b40d5..d613740d9 100644
--- a/gio/gresource.c
+++ b/gio/gresource.c
@@ -592,7 +592,7 @@ gboolean do_lookup (GResource *resource,
if (value == NULL)
{
g_set_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
path);
}
else
@@ -757,7 +757,7 @@ g_resource_lookup_data (GResource *resource,
g_object_unref (decompressor);
g_set_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_INTERNAL,
- _("The resource at '%s' failed to decompress"),
+ _("The resource at “%s” failed to decompress"),
path);
return NULL;
@@ -843,7 +843,7 @@ g_resource_enumerate_children (GResource *resource,
if (*path == 0)
{
g_set_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
path);
return NULL;
}
@@ -860,7 +860,7 @@ g_resource_enumerate_children (GResource *resource,
if (children == NULL)
{
g_set_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
path);
return NULL;
}
@@ -984,7 +984,7 @@ g_resources_open_stream (const gchar *path,
if (l == NULL)
g_set_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
path);
g_rw_lock_reader_unlock (&resources_lock);
@@ -1056,7 +1056,7 @@ g_resources_lookup_data (const gchar *path,
if (l == NULL)
g_set_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
path);
g_rw_lock_reader_unlock (&resources_lock);
@@ -1129,7 +1129,7 @@ g_resources_enumerate_children (const gchar *path,
if (hash == NULL)
{
g_set_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
path);
return NULL;
}
@@ -1199,7 +1199,7 @@ g_resources_get_info (const gchar *path,
if (l == NULL)
g_set_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
path);
g_rw_lock_reader_unlock (&resources_lock);
diff --git a/gio/gresourcefile.c b/gio/gresourcefile.c
index 6f211f4ff..fde563fd7 100644
--- a/gio/gresourcefile.c
+++ b/gio/gresourcefile.c
@@ -450,7 +450,7 @@ g_resource_file_query_info (GFile *file,
if (g_error_matches (my_error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
resource->path);
}
else
@@ -573,7 +573,7 @@ g_resource_file_read (GFile *file,
if (g_error_matches (my_error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
resource->path);
}
else
@@ -706,11 +706,11 @@ _g_resource_file_enumerator_new (GResourceFile *file,
res = g_resources_get_info (file->path, 0, NULL, NULL, NULL);
if (res)
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY,
- _("The resource at '%s' is not a directory"),
+ _("The resource at “%s” is not a directory"),
file->path);
else
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
- _("The resource at '%s' does not exist"),
+ _("The resource at “%s” does not exist"),
file->path);
return NULL;
}
@@ -914,7 +914,7 @@ g_resource_file_input_stream_seek (GFileInputStream *stream,
if (!G_IS_SEEKABLE (file->stream))
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Input stream doesn't implement seek"));
+ _("Input stream doesn’t implement seek"));
return FALSE;
}
diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c
index 88f304b66..544af848e 100644
--- a/gio/gsettings-tool.c
+++ b/gio/gsettings-tool.c
@@ -48,13 +48,13 @@ check_relocatable_schema (GSettingsSchema *schema,
{
if (schema == NULL)
{
- g_printerr (_("No such schema '%s'\n"), schema_id);
+ g_printerr (_("No such schema “%s”\n"), schema_id);
return FALSE;
}
if (!is_relocatable_schema (schema))
{
- g_printerr (_("Schema '%s' is not relocatable "
+ g_printerr (_("Schema “%s” is not relocatable "
"(path must not be specified)\n"),
schema_id);
return FALSE;
@@ -69,13 +69,13 @@ check_schema (GSettingsSchema *schema,
{
if (schema == NULL)
{
- g_printerr (_("No such schema '%s'\n"), schema_id);
+ g_printerr (_("No such schema “%s”\n"), schema_id);
return FALSE;
}
if (is_relocatable_schema (schema))
{
- g_printerr (_("Schema '%s' is relocatable "
+ g_printerr (_("Schema “%s” is relocatable "
"(path must be specified)\n"),
schema_id);
return FALSE;
@@ -619,7 +619,7 @@ gsettings_help (gboolean requested,
g_string_append (string,
_("Usage:\n"
" gsettings --version\n"
- " gsettings [--schemadir SCHEMADIR] COMMAND [ARGS...]\n"
+ " gsettings [--schemadir SCHEMADIR] COMMAND [ARGS…]\n"
"\n"
"Commands:\n"
" help Show this information\n"
@@ -637,7 +637,7 @@ gsettings_help (gboolean requested,
" writable Check if a key is writable\n"
" monitor Watch for changes\n"
"\n"
- "Use 'gsettings help COMMAND' to get detailed help.\n\n"));
+ "Use “gsettings help COMMAND” to get detailed help.\n\n"));
}
else
{
@@ -848,7 +848,7 @@ main (int argc, char **argv)
{
if (global_schema == NULL)
{
- g_printerr (_("No such schema '%s'\n"), parts[0]);
+ g_printerr (_("No such schema “%s”\n"), parts[0]);
return 1;
}
}
@@ -861,7 +861,7 @@ main (int argc, char **argv)
{
if (!g_settings_schema_has_key (global_schema, argv[3]))
{
- g_printerr (_("No such key '%s'\n"), argv[3]);
+ g_printerr (_("No such key “%s”\n"), argv[3]);
return 1;
}
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 0a5029577..ea1b88cc4 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -935,7 +935,7 @@ g_settings_class_init (GSettingsClass *class)
g_object_class_install_property (object_class, PROP_DELAY_APPLY,
g_param_spec_boolean ("delay-apply",
P_("Delay-apply mode"),
- P_("Whether this settings object is in 'delay-apply' mode"),
+ P_("Whether this settings object is in “delay-apply” mode"),
FALSE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
}
diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c
index 2a83665d3..840051e14 100644
--- a/gio/gsocketclient.c
+++ b/gio/gsocketclient.c
@@ -1107,7 +1107,7 @@ g_socket_client_connect (GSocketClient *client,
else
{
g_set_error (&last_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Proxy protocol '%s' is not supported."),
+ _("Proxy protocol “%s” is not supported."),
protocol);
g_object_unref (connection);
connection = NULL;
@@ -1558,7 +1558,7 @@ g_socket_client_connected_callback (GObject *source,
g_clear_error (&data->last_error);
g_set_error (&data->last_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("Proxy protocol '%s' is not supported."),
+ _("Proxy protocol “%s” is not supported."),
protocol);
enumerator_next_async (data);
diff --git a/gio/gsocks4aproxy.c b/gio/gsocks4aproxy.c
index 4fcabc8ea..8fabdd30a 100644
--- a/gio/gsocks4aproxy.c
+++ b/gio/gsocks4aproxy.c
@@ -115,7 +115,7 @@ set_connect_msg (guint8 *msg,
if (addr_len != 4)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_PROXY_FAILED,
- _("SOCKSv4 does not support IPv6 address '%s'"),
+ _("SOCKSv4 does not support IPv6 address “%s”"),
ip);
g_object_unref (addr);
return -1;
@@ -150,7 +150,7 @@ set_connect_msg (guint8 *msg,
if (host_len > SOCKS4_MAX_LEN)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_PROXY_FAILED,
- _("Hostname '%s' is too long for SOCKSv4 protocol"),
+ _("Hostname “%s” is too long for SOCKSv4 protocol"),
hostname);
return -1;
}
diff --git a/gio/gsocks5proxy.c b/gio/gsocks5proxy.c
index 93b9497dc..dfe45c179 100644
--- a/gio/gsocks5proxy.c
+++ b/gio/gsocks5proxy.c
@@ -283,7 +283,7 @@ set_connect_msg (guint8 *msg,
if (host_len > SOCKS5_MAX_LEN)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_PROXY_FAILED,
- _("Hostname '%s' is too long for SOCKSv5 protocol"),
+ _("Hostname “%s” is too long for SOCKSv5 protocol"),
hostname);
return -1;
}
@@ -383,7 +383,7 @@ parse_connect_reply (const guint8 *data, gint *atype, GError **error)
case SOCKS5_REP_CMD_NOT_SUP:
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PROXY_FAILED,
- _("SOCKSv5 proxy does not support 'connect' command."));
+ _("SOCKSv5 proxy does not support “connect” command."));
return FALSE;
break;
diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c
index 0567f1f8a..c791543af 100644
--- a/gio/gsubprocess.c
+++ b/gio/gsubprocess.c
@@ -357,7 +357,7 @@ unix_open_file (const char *filename,
display_name = g_filename_display_name (filename);
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (saved_errno),
- _("Error opening file '%s': %s"), display_name,
+ _("Error opening file “%s”: %s"), display_name,
g_strerror (saved_errno));
g_free (display_name);
/* fall through... */
diff --git a/gio/gthemedicon.c b/gio/gthemedicon.c
index 3d72bc25f..e1fc74cfe 100644
--- a/gio/gthemedicon.c
+++ b/gio/gthemedicon.c
@@ -270,7 +270,7 @@ g_themed_icon_class_init (GThemedIconClass *klass)
g_object_class_install_property (gobject_class, PROP_USE_DEFAULT_FALLBACKS,
g_param_spec_boolean ("use-default-fallbacks",
P_("use default fallbacks"),
- P_("Whether to use default fallbacks found by shortening the name at '-' characters. Ignores names after the first if multiple names are given."),
+ P_("Whether to use default fallbacks found by shortening the name at “-” characters. Ignores names after the first if multiple names are given."),
FALSE,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK));
}
@@ -515,7 +515,7 @@ g_themed_icon_from_tokens (gchar **tokens,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
- _("Can't handle version %d of GThemedIcon encoding"),
+ _("Can’t handle version %d of GThemedIcon encoding"),
version);
goto out;
}
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index b1b46e9ea..6b3b1f088 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -113,7 +113,7 @@ do_lookup_by_name (GTask *task,
g_task_return_new_error (task,
G_RESOLVER_ERROR,
G_RESOLVER_ERROR_NOT_FOUND,
- _("Error resolving '%s': %s"),
+ _("Error resolving “%s”: %s"),
hostname,
_("No valid addresses were found"));
}
@@ -123,7 +123,7 @@ do_lookup_by_name (GTask *task,
g_task_return_new_error (task,
G_RESOLVER_ERROR,
g_resolver_error_from_addrinfo_error (retval),
- _("Error resolving '%s': %s"),
+ _("Error resolving “%s”: %s"),
hostname, gai_strerror (retval));
}
@@ -210,7 +210,7 @@ do_lookup_by_address (GTask *task,
g_task_return_new_error (task,
G_RESOLVER_ERROR,
g_resolver_error_from_addrinfo_error (retval),
- _("Error reverse-resolving '%s': %s"),
+ _("Error reverse-resolving “%s”: %s"),
phys ? phys : "(unknown)",
gai_strerror (retval));
g_free (phys);
@@ -547,17 +547,17 @@ g_resolver_records_from_res_query (const gchar *rrname,
if (len == 0 || herr == HOST_NOT_FOUND || herr == NO_DATA)
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
- _("No DNS record of the requested type for '%s'"), rrname);
+ _("No DNS record of the requested type for “%s”"), rrname);
}
else if (herr == TRY_AGAIN)
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_TEMPORARY_FAILURE,
- _("Temporarily unable to resolve '%s'"), rrname);
+ _("Temporarily unable to resolve “%s”"), rrname);
}
else
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_INTERNAL,
- _("Error resolving '%s'"), rrname);
+ _("Error resolving “%s”"), rrname);
}
return NULL;
@@ -627,7 +627,7 @@ g_resolver_records_from_res_query (const gchar *rrname,
if (records == NULL)
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
- _("No DNS record of the requested type for '%s'"), rrname);
+ _("No DNS record of the requested type for “%s”"), rrname);
return NULL;
}
@@ -725,17 +725,17 @@ g_resolver_records_from_DnsQuery (const gchar *rrname,
if (status == DNS_ERROR_RCODE_NAME_ERROR)
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
- _("No DNS record of the requested type for '%s'"), rrname);
+ _("No DNS record of the requested type for “%s”"), rrname);
}
else if (status == DNS_ERROR_RCODE_SERVER_FAILURE)
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_TEMPORARY_FAILURE,
- _("Temporarily unable to resolve '%s'"), rrname);
+ _("Temporarily unable to resolve “%s”"), rrname);
}
else
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_INTERNAL,
- _("Error resolving '%s'"), rrname);
+ _("Error resolving “%s”"), rrname);
}
return NULL;
@@ -775,7 +775,7 @@ g_resolver_records_from_DnsQuery (const gchar *rrname,
if (records == NULL)
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
- _("No DNS record of the requested type for '%s'"), rrname);
+ _("No DNS record of the requested type for “%s”"), rrname);
return NULL;
}
diff --git a/gio/gtlscertificate.c b/gio/gtlscertificate.c
index 59edab3f2..e75ea2adf 100644
--- a/gio/gtlscertificate.c
+++ b/gio/gtlscertificate.c
@@ -146,7 +146,7 @@ g_tls_certificate_class_init (GTlsCertificateClass *class)
g_object_class_install_property (gobject_class, PROP_PRIVATE_KEY,
g_param_spec_boxed ("private-key",
P_("Private key"),
- P_("The DER representation of the certificate's private key"),
+ P_("The DER representation of the certificate’s private key"),
G_TYPE_BYTE_ARRAY,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
@@ -170,7 +170,7 @@ g_tls_certificate_class_init (GTlsCertificateClass *class)
g_object_class_install_property (gobject_class, PROP_PRIVATE_KEY_PEM,
g_param_spec_string ("private-key-pem",
P_("Private key (PEM)"),
- P_("The PEM representation of the certificate's private key"),
+ P_("The PEM representation of the certificate’s private key"),
NULL,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
diff --git a/gio/gtlsconnection.c b/gio/gtlsconnection.c
index c0c98f7e7..c1b644c55 100644
--- a/gio/gtlsconnection.c
+++ b/gio/gtlsconnection.c
@@ -206,7 +206,7 @@ g_tls_connection_class_init (GTlsConnectionClass *klass)
g_object_class_install_property (gobject_class, PROP_CERTIFICATE,
g_param_spec_object ("certificate",
P_("Certificate"),
- P_("The connection's certificate"),
+ P_("The connection’s certificate"),
G_TYPE_TLS_CERTIFICATE,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
@@ -226,7 +226,7 @@ g_tls_connection_class_init (GTlsConnectionClass *klass)
g_object_class_install_property (gobject_class, PROP_PEER_CERTIFICATE,
g_param_spec_object ("peer-certificate",
P_("Peer Certificate"),
- P_("The connection's peer's certificate"),
+ P_("The connection’s peer’s certificate"),
G_TYPE_TLS_CERTIFICATE,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
@@ -245,7 +245,7 @@ g_tls_connection_class_init (GTlsConnectionClass *klass)
g_object_class_install_property (gobject_class, PROP_PEER_CERTIFICATE_ERRORS,
g_param_spec_flags ("peer-certificate-errors",
P_("Peer Certificate Errors"),
- P_("Errors found with the peer's certificate"),
+ P_("Errors found with the peer’s certificate"),
G_TYPE_TLS_CERTIFICATE_FLAGS,
0,
G_PARAM_READABLE |
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index b5e066f84..52be25a34 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -64,6 +64,7 @@
#endif
#include "gunixmounts.h"
+#include "glocalfileprivate.h"
#include "gfile.h"
#include "gfilemonitor.h"
#include "glibintl.h"
@@ -1444,6 +1445,40 @@ g_unix_mount_at (const char *mount_path,
}
/**
+ * g_unix_mount_for: (skip)
+ * @file_path: file path on some unix mount.
+ * @time_read: (out) (allow-none): guint64 to contain a timestamp.
+ *
+ * Gets a #GUnixMountEntry for a given file path. If @time_read
+ * is set, it will be filled with a unix timestamp for checking
+ * if the mounts have changed since with g_unix_mounts_changed_since().
+ *
+ * Returns: (transfer full): a #GUnixMountEntry.
+ *
+ * Since: 2.52
+ **/
+GUnixMountEntry *
+g_unix_mount_for (const char *file_path,
+ guint64 *time_read)
+{
+ GUnixMountEntry *entry;
+
+ g_return_val_if_fail (file_path != NULL, NULL);
+
+ entry = g_unix_mount_at (file_path, time_read);
+ if (entry == NULL)
+ {
+ char *topdir;
+
+ topdir = _g_local_file_find_topdir_for (file_path);
+ entry = g_unix_mount_at (topdir, time_read);
+ g_free (topdir);
+ }
+
+ return entry;
+}
+
+/**
* g_unix_mount_points_get: (skip)
* @time_read: (out) (allow-none): guint64 to contain a timestamp.
*
diff --git a/gio/gunixmounts.h b/gio/gunixmounts.h
index faf811999..90b9f0369 100644
--- a/gio/gunixmounts.h
+++ b/gio/gunixmounts.h
@@ -119,6 +119,9 @@ GList * g_unix_mounts_get (guint64 *time_re
GLIB_AVAILABLE_IN_ALL
GUnixMountEntry *g_unix_mount_at (const char *mount_path,
guint64 *time_read);
+GLIB_AVAILABLE_IN_2_52
+GUnixMountEntry *g_unix_mount_for (const char *file_path,
+ guint64 *time_read);
GLIB_AVAILABLE_IN_ALL
gboolean g_unix_mounts_changed_since (guint64 time);
GLIB_AVAILABLE_IN_ALL
diff --git a/gio/gvolume.c b/gio/gvolume.c
index a14cbc613..5626baa66 100644
--- a/gio/gvolume.c
+++ b/gio/gvolume.c
@@ -360,7 +360,7 @@ g_volume_mount (GVolume *volume,
g_task_report_new_error (volume, callback, user_data,
g_volume_mount,
G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("volume doesn't implement mount"));
+ _("volume doesn’t implement mount"));
return;
}
@@ -434,7 +434,7 @@ g_volume_eject (GVolume *volume,
g_task_report_new_error (volume, callback, user_data,
g_volume_eject_with_operation,
G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- _("volume doesn't implement eject"));
+ _("volume doesn’t implement eject"));
return;
}
@@ -511,7 +511,7 @@ g_volume_eject_with_operation (GVolume *volume,
/* Translators: This is an error
* message for volume objects that
* don't implement any of eject or eject_with_operation. */
- _("volume doesn't implement eject or eject_with_operation"));
+ _("volume doesn’t implement eject or eject_with_operation"));
return;
}