summaryrefslogtreecommitdiff
path: root/gtk/gtktreeselection.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-06-02 04:17:41 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-06-02 04:17:41 +0000
commitad4ca1eaa4dcd935c83bf723b5f624dec3aa7780 (patch)
tree7a9431d25f52a3a62931fafa95de2a2b229fa87f /gtk/gtktreeselection.c
parentd5f3cb140955ee9b95c1cbdcebe90ca321c3b18a (diff)
downloadgtk+-ad4ca1eaa4dcd935c83bf723b5f624dec3aa7780.tar.gz
Don't allow unless selection mode is multiple. (#142634, John Finlay)
Wed Jun 2 00:17:07 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtktreeselection.c (gtk_tree_selection_select_range): Don't allow unless selection mode is multiple. (#142634, John Finlay)
Diffstat (limited to 'gtk/gtktreeselection.c')
-rw-r--r--gtk/gtktreeselection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c
index d0f7f0752a..4e5a76a7da 100644
--- a/gtk/gtktreeselection.c
+++ b/gtk/gtktreeselection.c
@@ -1021,7 +1021,7 @@ gtk_tree_selection_real_select_all (GtkTreeSelection *selection)
* gtk_tree_selection_select_all:
* @selection: A #GtkTreeSelection.
*
- * Selects all the nodes. @selection is must be set to #GTK_SELECTION_MULTIPLE
+ * Selects all the nodes. @selection must be set to #GTK_SELECTION_MULTIPLE
* mode.
**/
void
@@ -1243,6 +1243,7 @@ gtk_tree_selection_real_modify_range (GtkTreeSelection *selection,
* @end_path: The final node of the range.
*
* Selects a range of nodes, determined by @start_path and @end_path inclusive.
+ * @selection must be set to #GTK_SELECTION_MULTIPLE mode.
**/
void
gtk_tree_selection_select_range (GtkTreeSelection *selection,
@@ -1251,6 +1252,7 @@ gtk_tree_selection_select_range (GtkTreeSelection *selection,
{
g_return_if_fail (GTK_IS_TREE_SELECTION (selection));
g_return_if_fail (selection->tree_view != NULL);
+ g_return_if_fail (selection->type == GTK_SELECTION_MULTIPLE);
if (gtk_tree_selection_real_modify_range (selection, RANGE_SELECT, start_path, end_path))
g_signal_emit (selection, tree_selection_signals[CHANGED], 0);