[latexila] DocumentsPanel: remove active-tab property
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] DocumentsPanel: remove active-tab property
- Date: Sun, 6 Aug 2017 08:35:34 +0000 (UTC)
commit bcff602c95208b167249cfd596d038583dbf7a1b
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Aug 6 10:07:45 2017 +0200
DocumentsPanel: remove active-tab property
It is already implemented by TeplNotebook.
src/documents_panel.vala | 5 -----
src/main_window.vala | 4 ++--
2 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/documents_panel.vala b/src/documents_panel.vala
index 1b612df..25bf16e 100644
--- a/src/documents_panel.vala
+++ b/src/documents_panel.vala
@@ -21,7 +21,6 @@ using Gtk;
public class DocumentsPanel : Tepl.Notebook
{
- public DocumentTab active_tab { get; private set; }
public signal void right_click (Gdk.EventButton event);
private unowned MainWindow main_window;
@@ -29,10 +28,6 @@ public class DocumentsPanel : Tepl.Notebook
public DocumentsPanel (MainWindow main_window)
{
this.main_window = main_window;
- switch_page.connect ((page, page_num) =>
- {
- active_tab = (DocumentTab) get_nth_page ((int) page_num);
- });
}
public void add_tab (DocumentTab tab, int position, bool jump_to)
diff --git a/src/main_window.vala b/src/main_window.vala
index fa71dec..f20a311 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -114,9 +114,9 @@ public class MainWindow : ApplicationWindow
{
get
{
- if (_documents_panel == null || _documents_panel.get_n_pages () == 0)
+ if (_documents_panel == null)
return null;
- return _documents_panel.active_tab;
+ return (DocumentTab?) _documents_panel.active_tab;
}
set
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]