diff options
Diffstat (limited to 'src/anastasis/anastasis-gtk_handle-currency-changed.c')
-rw-r--r-- | src/anastasis/anastasis-gtk_handle-currency-changed.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/src/anastasis/anastasis-gtk_handle-currency-changed.c b/src/anastasis/anastasis-gtk_handle-currency-changed.c deleted file mode 100644 index ba38b6f..0000000 --- a/src/anastasis/anastasis-gtk_handle-currency-changed.c +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of anastasis-gtk. | ||
3 | Copyright (C) 2021 Anastasis SARL | ||
4 | |||
5 | Anastasis is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 3, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | Anastasis is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with Anastasis; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | /** | ||
21 | * @file src/anastasis/anastasis-gtk_handle-country-activated.c | ||
22 | * @brief | ||
23 | * @author Christian Grothoff | ||
24 | * @author Dennis Neufeld | ||
25 | */ | ||
26 | #include <gnunet/platform.h> | ||
27 | #include <gnunet/gnunet_util_lib.h> | ||
28 | #include "anastasis-gtk_helper.h" | ||
29 | #include "anastasis-gtk_action.h" | ||
30 | #include "anastasis-gtk_handle-main-window-forward-clicked.h" | ||
31 | #include <jansson.h> | ||
32 | |||
33 | |||
34 | /** | ||
35 | * Function called on each selected item. | ||
36 | * Sets @a data to true if called. | ||
37 | * | ||
38 | * @param model unused | ||
39 | * @param path unused | ||
40 | * @param iter unused | ||
41 | * @param[out] data pointer to a `bool` to set to true | ||
42 | */ | ||
43 | static void | ||
44 | select_cb (GtkTreeModel *model, | ||
45 | GtkTreePath *path, | ||
46 | GtkTreeIter *iter, | ||
47 | gpointer data) | ||
48 | { | ||
49 | bool *ptr = data; | ||
50 | |||
51 | (void) model; | ||
52 | (void) path; | ||
53 | (void) iter; | ||
54 | *ptr = true; | ||
55 | } | ||
56 | |||
57 | |||
58 | /** | ||
59 | * Callback invoked if the currency selection changed. | ||
60 | * | ||
61 | * @param treeselection selection object | ||
62 | * @param user_data NULL | ||
63 | */ | ||
64 | void | ||
65 | anastasis_gtk_currency_selection_changed_cb (GtkTreeSelection *treeselection, | ||
66 | gpointer user_data) | ||
67 | { | ||
68 | bool have_sel = false; | ||
69 | |||
70 | (void) user_data; | ||
71 | gtk_tree_selection_selected_foreach (treeselection, | ||
72 | &select_cb, | ||
73 | &have_sel); | ||
74 | if (have_sel) | ||
75 | AG_enable_next (); | ||
76 | else | ||
77 | AG_insensitive ("anastasis_gtk_main_window_forward_button"); | ||
78 | } | ||