projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gui: Fix temporary filtering by a variable's value.
[pspp]
/
src
/
ui
/
gui
/
dict-display.c
diff --git
a/src/ui/gui/dict-display.c
b/src/ui/gui/dict-display.c
index 1665d7ff3f7a3c0a4bc8e1b4ebeb12b99cc8cfb9..ada7fb40fcbd5ab45ad55edca1c5508c5a4c8c07 100644
(file)
--- a/
src/ui/gui/dict-display.c
+++ b/
src/ui/gui/dict-display.c
@@
-23,6
+23,7
@@
#include "dict-display.h"
#include "psppire-dict.h"
#include "dict-display.h"
#include "psppire-dict.h"
+#include "psppire-var-view.h"
#include <libpspp/i18n.h>
#include "helper.h"
#include <data/variable.h>
#include <libpspp/i18n.h>
#include "helper.h"
#include <data/variable.h>
@@
-54,7
+55,6
@@
get_base_model (GtkTreeModel *top_model, GtkTreeIter *top_iter,
}
}
-
void
insert_source_row_into_entry (GtkTreeIter iter,
GtkWidget *dest,
void
insert_source_row_into_entry (GtkTreeIter iter,
GtkWidget *dest,
@@
-84,7
+84,6
@@
insert_source_row_into_entry (GtkTreeIter iter,
}
}
-
void
insert_source_row_into_tree_view (GtkTreeIter iter,
GtkWidget *dest,
void
insert_source_row_into_tree_view (GtkTreeIter iter,
GtkWidget *dest,
@@
-96,24
+95,28
@@
insert_source_row_into_tree_view (GtkTreeIter iter,
GtkTreeIter dest_iter;
GtkTreeIter dict_iter;
gint *row ;
GtkTreeIter dest_iter;
GtkTreeIter dict_iter;
gint *row ;
- GtkTreeModel *destmodel = gtk_tree_view_get_model (
GTK_TREE_VIEW (dest));
+ GtkTreeModel *destmodel = gtk_tree_view_get_model (GTK_TREE_VIEW (dest));
+ const struct variable *var;
GtkTreeModel *dict;
GtkTreeModel *dict;
-
get_base_model (model, &iter, &dict, &dict_iter);
path = gtk_tree_model_get_path (dict, &dict_iter);
row = gtk_tree_path_get_indices (path);
get_base_model (model, &iter, &dict, &dict_iter);
path = gtk_tree_model_get_path (dict, &dict_iter);
row = gtk_tree_path_get_indices (path);
+ var = psppire_dict_get_variable (PSPPIRE_DICT (dict), *row);
+
gtk_list_store_append (GTK_LIST_STORE (destmodel), &dest_iter);
gtk_list_store_append (GTK_LIST_STORE (destmodel), &dest_iter);
- gtk_list_store_set (GTK_LIST_STORE (destmodel), &dest_iter, 0, *row, -1);
+
+ gtk_list_store_set (GTK_LIST_STORE (destmodel), &dest_iter, 0, var, -1);
gtk_tree_path_free (path);
}
gtk_tree_path_free (path);
}
+
gboolean
is_currently_in_entry (GtkTreeModel *model, GtkTreeIter *iter,
PsppireSelector *selector)
gboolean
is_currently_in_entry (GtkTreeModel *model, GtkTreeIter *iter,
PsppireSelector *selector)
@@
-125,7
+128,12
@@
is_currently_in_entry (GtkTreeModel *model, GtkTreeIter *iter,
gint dict_index;
gint *indeces;
GtkTreePath *path;
gint dict_index;
gint *indeces;
GtkTreePath *path;
- const gchar *text = gtk_entry_get_text (GTK_ENTRY (selector->dest));
+ GtkWidget *entry = NULL;
+ const gchar *text = NULL;
+
+ g_object_get (selector, "dest-widget", &entry, NULL);
+
+ text = gtk_entry_get_text (GTK_ENTRY (entry));
get_base_model (model, iter, &dict, &dict_iter);
get_base_model (model, iter, &dict, &dict_iter);
@@
-144,5
+152,3
@@
is_currently_in_entry (GtkTreeModel *model, GtkTreeIter *iter,
return result;
}
return result;
}
-
-