mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-03 07:53:39 +02:00
gio-tool: Various fixes related to error messages
This patch contains the following changes: - Print all errors with "gio: " prefix - Print file uri in error for each tool allowing multiple locations - Mark all error messages translatable - Do not leak strings used in error messages - Always start error messages with capital letter - Unify some error messages across various tools - Fix addional/missing new line characters https://bugzilla.gnome.org/show_bug.cgi?id=776169
This commit is contained in:
@@ -156,14 +156,14 @@ 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);
|
||||
print_error (_("Failed to load info for handler “%s”"), 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"),
|
||||
handler, mimetype, error->message);
|
||||
print_error (_("Failed to set “%s” as the default handler for “%s”: %s\n"),
|
||||
handler, mimetype, error->message);
|
||||
g_error_free (error);
|
||||
g_object_unref (info);
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user