[gnome-builder] vim: use contextual messaging
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: use contextual messaging
- Date: Sat, 6 Jan 2018 10:08:35 +0000 (UTC)
commit a24235736b7b79df150612cbdc5ae93eddcb0525
Author: Christian Hergert <chergert redhat com>
Date: Sat Jan 6 01:57:05 2018 -0800
vim: use contextual messaging
src/plugins/command-bar/gb-command-vim.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/command-bar/gb-command-vim.c b/src/plugins/command-bar/gb-command-vim.c
index f811d93..96d9902 100644
--- a/src/plugins/command-bar/gb-command-vim.c
+++ b/src/plugins/command-bar/gb-command-vim.c
@@ -90,19 +90,19 @@ gb_command_vim_execute (GbCommand *command)
{
GbCommandVim *self = (GbCommandVim *)command;
- g_return_val_if_fail (GB_IS_COMMAND_VIM (self), NULL);
+ g_assert (GB_IS_COMMAND_VIM (self));
if (self->active_widget)
{
- GError *error = NULL;
+ g_autoptr(GError) error = NULL;
IDE_TRACE_MSG ("Executing Vim command: %s", self->command_text);
if (!gb_vim_execute (self->active_widget, self->command_text, &error))
- {
- g_warning ("%s", error->message);
- g_clear_error (&error);
- }
+ ide_widget_warning (self->active_widget,
+ /* translators: %s is replaced with the error message */
+ _("Command failed: %s"),
+ error->message);
}
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]