[latexila] Avoid critical message
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Avoid critical message
- Date: Fri, 27 Sep 2013 15:33:13 +0000 (UTC)
commit 0c6fcbf65a4cd2ad950c1b0a8fc5a3a6fb567efb
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Sep 27 17:30:12 2013 +0200
Avoid critical message
Gtk-CRITICAL **: gtk_notebook_get_n_pages: assertion 'GTK_IS_NOTEBOOK (notebook)' failed
src/document_view.vala | 1 +
src/main_window.vala | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/document_view.vala b/src/document_view.vala
index 2d4e784..3da3fbc 100644
--- a/src/document_view.vala
+++ b/src/document_view.vala
@@ -176,6 +176,7 @@ public class DocumentView : Gtk.SourceView
GtkSpell.Checker checker = new GtkSpell.Checker ();
checker.attach (this);
+ checker.decode_language_codes = true;
try
{
diff --git a/src/main_window.vala b/src/main_window.vala
index 93b3a99..a62b5b1 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -602,7 +602,12 @@ public class MainWindow : Window
public Gee.List<DocumentView> get_views ()
{
Gee.List<DocumentView> all_views = new Gee.LinkedList<Document> ();
+
+ if (_documents_panel == null)
+ return all_views;
+
int nb_documents = _documents_panel.get_n_pages ();
+
for (int i = 0 ; i < nb_documents ; i++)
{
DocumentTab tab = _documents_panel.get_nth_page (i) as DocumentTab;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]