[gedit] tab: don't set GEDIT_TAB_KEY on the view
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] tab: don't set GEDIT_TAB_KEY on the view
- Date: Sun, 15 Jun 2014 18:20:45 +0000 (UTC)
commit f027603f9dc4d631ff8b3ce0bc1d3fdf89b7952f
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Jun 15 20:11:04 2014 +0200
tab: don't set GEDIT_TAB_KEY on the view
The GEDIT_TAB_KEY is set only on the GeditDocument. For the view we can
anyway get its GeditDocument easily with gtk_text_view_get_buffer().
gedit/gedit-tab.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 57a5bd3..ce3b650 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1660,12 +1660,9 @@ gedit_tab_init (GeditTab *tab)
gtk_box_pack_end (GTK_BOX (tab), GTK_WIDGET (tab->priv->frame),
TRUE, TRUE, 0);
- doc = gedit_view_frame_get_document (tab->priv->frame);
+ doc = gedit_tab_get_document (tab);
g_object_set_data (G_OBJECT (doc), GEDIT_TAB_KEY, tab);
- view = gedit_view_frame_get_view (tab->priv->frame);
- g_object_set_data (G_OBJECT (view), GEDIT_TAB_KEY, tab);
-
g_signal_connect (doc,
"notify::location",
G_CALLBACK (document_location_notify_handler),
@@ -1695,6 +1692,8 @@ gedit_tab_init (GeditTab *tab)
G_CALLBACK (document_saved),
tab);
+ view = gedit_tab_get_view (tab);
+
g_signal_connect_after (view,
"focus-in-event",
G_CALLBACK (view_focused_in),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]