summaryrefslogtreecommitdiff
path: root/src/anastasis/anastasis-gtk_handle-country-activated.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/anastasis/anastasis-gtk_handle-country-activated.c')
-rw-r--r--src/anastasis/anastasis-gtk_handle-country-activated.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/anastasis/anastasis-gtk_handle-country-activated.c b/src/anastasis/anastasis-gtk_handle-country-activated.c
index 2c80b61..afb65f3 100644
--- a/src/anastasis/anastasis-gtk_handle-country-activated.c
+++ b/src/anastasis/anastasis-gtk_handle-country-activated.c
@@ -41,11 +41,8 @@ void
anastasis_gtk_country_selection_changed_cb (GtkTreeSelection *treeselection,
gpointer user_data)
{
- GtkTreeSelection *currency_selection;
- GtkTreeModel *currency_model;
GtkTreeModel *model;
GtkTreeIter iter;
- char *scode;
(void) user_data;
if (! gtk_tree_selection_get_selected (treeselection,
@@ -56,61 +53,4 @@ anastasis_gtk_country_selection_changed_cb (GtkTreeSelection *treeselection,
return;
}
AG_enable_next ();
- gtk_tree_model_get (model,
- &iter,
- AG_CCMC_COUNTRY_CODE,
- &scode,
- -1);
- /* select all currencies matching current country */
- currency_selection = GTK_TREE_SELECTION (
- GCG_get_main_window_object ("anastasis_gtk_currency_selection"));
- gtk_tree_selection_unselect_all (currency_selection);
- currency_model = GTK_TREE_MODEL (
- GCG_get_main_window_object ("currency_liststore"));
- {
- json_t *countries;
- json_t *country;
- size_t index;
-
- countries = json_object_get (AG_redux_state,
- "countries");
- json_array_foreach (countries, index, country)
- {
- const char *code;
- const char *currency;
-
- code = json_string_value (json_object_get (country,
- "code"));
- GNUNET_assert (NULL != code);
- if (0 != strcmp (code,
- scode))
- continue;
- currency = json_string_value (json_object_get (country,
- "currency"));
- GNUNET_assert (NULL != currency);
- {
- GtkTreeIter citer;
- char *pcur;
-
- if (gtk_tree_model_get_iter_first (currency_model,
- &citer))
- do {
- gtk_tree_model_get (currency_model,
- &citer,
- AG_CMC_CURRENCY_NAME,
- &pcur,
- -1);
- if (0 == strcasecmp (pcur,
- currency))
- {
- gtk_tree_selection_select_iter (currency_selection,
- &citer);
- }
- g_free (pcur);
- } while (gtk_tree_model_iter_next (currency_model,
- &citer));
- }
- }
- }
- g_free (scode);
}