Change license from GPLv2+ to GPLv3+.
[pspp-builds.git] / src / ui / gui / psppire-selector.c
index 6465189d759d365b8c627654b84a8209f464db74..7f34baebafcbcbad1ff98535aa30f1fdcb293a4e 100644 (file)
@@ -1,10 +1,9 @@
-/*
-   PSPPIRE --- A Graphical User Interface for PSPP
+/* PSPPIRE - a graphical user interface for PSPP.
    Copyright (C) 2007  Free Software Foundation
 
-   This program is free software; you can redistribute it and/or modify
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -13,9 +12,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA. */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 /*
   This module provides a widget, PsppireSelector derived from
@@ -68,6 +65,7 @@
 
 #include <gtk/gtktreeview.h>
 #include <gtk/gtktreeselection.h>
+#include <gtk/gtktextview.h>
 #include <gtk/gtkwidget.h>
 
 static void psppire_selector_base_finalize (PsppireSelectorClass *, gpointer);
@@ -561,8 +559,8 @@ is_source_item_visible (GtkTreeModel *childmodel,
     {
       PsppireSelector *selector = list->data;
 
-      if ( selector->filter (childmodel, iter, selector))
-         return FALSE;
+      if ( selector->filter && selector->filter (childmodel, iter, selector))
+       return FALSE;
 
       list = list->next;
     }
@@ -745,6 +743,11 @@ psppire_selector_set_subjects (PsppireSelector *selector,
   else if ( GTK_IS_ENTRY (dest))
     set_entry_dest (selector, GTK_ENTRY (dest));
 
+  else if (GTK_IS_TEXT_VIEW (dest))
+    {
+      /* Nothing to be done */
+    }
+
   else
     g_error ("Unsupported destination widget: %s", G_OBJECT_TYPE_NAME (dest));