[gnome-builder] editor: remove unused editor title
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: remove unused editor title
- Date: Mon, 8 Sep 2014 19:20:34 +0000 (UTC)
commit 07467ab7658a126e03315a5eb8556e286428aef8
Author: Christian Hergert <christian hergert me>
Date: Mon Sep 8 12:00:31 2014 -0700
editor: remove unused editor title
This will come back when we add the GtkSourceFile "file" property to
GbEditorTab.
src/editor/gb-editor-tab.c | 33 ---------------------------------
1 files changed, 0 insertions(+), 33 deletions(-)
---
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index 36501df..1227275 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -472,35 +472,6 @@ gb_editor_tab_set_settings (GbEditorTab *tab,
EXIT;
}
-static gboolean
-transform_file_to_title (GBinding *binding,
- const GValue *src_value,
- GValue *dst_value,
- gpointer user_data)
-{
- GbEditorTabPrivate *priv;
- GbEditorTab *tab = user_data;
- gchar *title;
- GFile *file;
-
- g_return_val_if_fail (GB_IS_EDITOR_TAB (tab), FALSE);
- g_return_val_if_fail (G_VALUE_HOLDS (src_value, G_TYPE_FILE), FALSE);
- g_return_val_if_fail (G_VALUE_HOLDS (dst_value, G_TYPE_STRING), FALSE);
-
- priv = tab->priv;
-
- file = g_value_get_object (src_value);
-
- if (file)
- title = g_file_get_basename (file);
- else
- title = g_strdup_printf (_ ("Unsaved File %u"), priv->unsaved_number);
-
- g_value_take_string (dst_value, title);
-
- return TRUE;
-}
-
static void
set_search_position_label (GbEditorTab *tab,
const gchar *text)
@@ -648,10 +619,6 @@ gb_editor_tab_set_document (GbEditorTab *tab,
gtk_text_view_set_buffer (GTK_TEXT_VIEW (priv->source_view),
GTK_TEXT_BUFFER (priv->document));
- g_object_bind_property_full (priv->document, "file", tab, "title",
- G_BINDING_SYNC_CREATE, transform_file_to_title,
- NULL, tab, NULL);
-
g_signal_connect_swapped (priv->document,
"cursor-moved",
G_CALLBACK (gb_editor_tab_cursor_moved),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]