[gnome-builder/wip/chergert/headerbar] omnibar: notify user of missing runtime
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/headerbar] omnibar: notify user of missing runtime
- Date: Fri, 24 Jun 2016 00:13:22 +0000 (UTC)
commit 2c814ba784ae8c8826465ba7713eab2434ecf306
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 23 17:13:15 2016 -0700
omnibar: notify user of missing runtime
libide/workbench/ide-omni-bar-row.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libide/workbench/ide-omni-bar-row.c b/libide/workbench/ide-omni-bar-row.c
index 111b82d..2aaee9a 100644
--- a/libide/workbench/ide-omni-bar-row.c
+++ b/libide/workbench/ide-omni-bar-row.c
@@ -18,6 +18,8 @@
#define G_LOG_DOMAIN "ide-omni-bar-row"
+#include <glib/gi18n.h>
+
#include "devices/ide-device.h"
#include "runtimes/ide-runtime.h"
#include "workbench/ide-omni-bar-row.h"
@@ -64,6 +66,7 @@ on_runtime_changed (IdeOmniBarRow *self,
GParamSpec *pspec,
IdeConfiguration *config)
{
+ g_autofree gchar *freeme = NULL;
const gchar *display_name = NULL;
IdeRuntime *runtime;
@@ -72,6 +75,11 @@ on_runtime_changed (IdeOmniBarRow *self,
if (NULL != (runtime = ide_configuration_get_runtime (config)))
display_name = ide_runtime_get_display_name (runtime);
+ else
+ display_name = freeme = g_strdup_printf ("%s (%s)",
+ ide_configuration_get_runtime_id (config),
+ /* Translators, missing means we could not locate the runtime */
+ _("missing"));
gtk_label_set_label (self->runtime_title, display_name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]