[latexila] DocumentTab: remove TabLabel instance variable



commit 5261d865b52c74a06a0f88999ca1f227e42621eb
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Aug 12 16:11:31 2017 +0200

    DocumentTab: remove TabLabel instance variable
    
    Create the TabLabel at the right place.

 src/document_tab.vala    |   10 ----------
 src/documents_panel.vala |    5 ++++-
 2 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/src/document_tab.vala b/src/document_tab.vala
index 68c43d5..7764779 100644
--- a/src/document_tab.vala
+++ b/src/document_tab.vala
@@ -31,8 +31,6 @@ public class DocumentTab : Tepl.Tab
         get { return get_buffer () as Document; }
     }
 
-    private TabLabel _label;
-
     private bool ask_if_externally_modified = false;
 
     private uint auto_save_timeout;
@@ -127,9 +125,6 @@ public class DocumentTab : Tepl.Tab
 
         view.show_all ();
 
-        _label = new TabLabel (this);
-        _label.show ();
-
         /* auto save */
         GLib.Settings settings =
             new GLib.Settings ("org.gnome.latexila.preferences.editor");
@@ -147,11 +142,6 @@ public class DocumentTab : Tepl.Tab
         });
     }
 
-    public TabLabel get_label ()
-    {
-        return _label;
-    }
-
     public string get_menu_tip ()
     {
         return _("Activate '%s'").printf (document.get_uri_for_display ());
diff --git a/src/documents_panel.vala b/src/documents_panel.vala
index d065d36..d5cf97a 100644
--- a/src/documents_panel.vala
+++ b/src/documents_panel.vala
@@ -35,7 +35,10 @@ public class DocumentsPanel : Tepl.Notebook
         EventBox event_box = new EventBox ();
         event_box.set_visible_window (false);
 
-        event_box.add (tab.get_label ());
+        TabLabel tab_label = new TabLabel (tab);
+        tab_label.show ();
+        event_box.add (tab_label);
+
         event_box.button_press_event.connect ((event) =>
         {
             // right click


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]