[latexila] DocumentTab: use TeplTab::close-request signal



commit cbe084a28e271c61d4bac8726235dfc73daad66d
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Aug 6 14:16:59 2017 +0200

    DocumentTab: use TeplTab::close-request signal

 src/document_tab.vala |    4 +---
 src/main_window.vala  |    2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/document_tab.vala b/src/document_tab.vala
index c82674c..9e77f6e 100644
--- a/src/document_tab.vala
+++ b/src/document_tab.vala
@@ -113,8 +113,6 @@ public class DocumentTab : Tepl.Tab
         }
     }
 
-    public signal void close_document ();
-
     public DocumentTab ()
     {
         DocumentView document_view = new DocumentView (new Document ());
@@ -162,7 +160,7 @@ public class DocumentTab : Tepl.Tab
         Gedit.CloseButton close_button = new Gedit.CloseButton ();
         close_button.set_margin_start (2);
         close_button.tooltip_text = _("Close document");
-        close_button.clicked.connect (() => this.close_document ());
+        close_button.clicked.connect (() => this.close_request ());
 
         _label = new Grid ();
         _label.set_hexpand (false);
diff --git a/src/main_window.vala b/src/main_window.vala
index b8c20ac..608ea4c 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -702,7 +702,7 @@ public class MainWindow : ApplicationWindow
         if (tab == null)
             return null;
 
-        tab.close_document.connect (() => { close_tab (tab); });
+        tab.close_request.connect (() => { close_tab (tab); });
 
         Document doc = tab.document;
 


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