[gnome-builder/editor-layout] render dirty tabs with dot after the title
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] render dirty tabs with dot after the title
- Date: Sun, 30 Nov 2014 13:21:44 +0000 (UTC)
commit 98b970936ea1342a908d473153dd03c3c210091d
Author: Christian Hergert <christian hergert me>
Date: Sun Nov 30 04:59:46 2014 -0800
render dirty tabs with dot after the title
src/tabs/gb-tab-stack.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/tabs/gb-tab-stack.c b/src/tabs/gb-tab-stack.c
index cb3ec93..dbb7aeb 100644
--- a/src/tabs/gb-tab-stack.c
+++ b/src/tabs/gb-tab-stack.c
@@ -425,24 +425,27 @@ gb_tab_stack_combobox_text_func (GtkCellLayout *cell_layout,
gpointer data)
{
const gchar *title = NULL;
- gchar *str = NULL;
GbTab *tab = NULL;
gtk_tree_model_get (tree_model, iter, 0, &tab, -1);
if (GB_IS_TAB (tab))
title = gb_tab_get_title (tab);
-
if (!title)
+ title = _("untitled");
+
+ if (gb_tab_get_dirty (tab))
{
- /* TODO: temp tab name */
- title = _("untitled");
- }
+ gchar *str;
- g_object_set (cell, "text", title, NULL);
+ str = g_strdup_printf ("%s •", title);
+ g_object_set (cell, "text", str, NULL);
+ g_free (str);
+ }
+ else
+ g_object_set (cell, "text", title, NULL);
g_clear_object (&tab);
- g_free (str);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]