diff options
Diffstat (limited to 'src/fs/main_window_create_pseudonym.c')
-rw-r--r-- | src/fs/main_window_create_pseudonym.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/fs/main_window_create_pseudonym.c b/src/fs/main_window_create_pseudonym.c new file mode 100644 index 00000000..9faf0bae --- /dev/null +++ b/src/fs/main_window_create_pseudonym.c | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | (C) 2005, 2006, 2010 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet 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 2, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet 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 GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file src/main_window_create_pseudonym.c | ||
23 | * @author Christian Grothoff | ||
24 | * | ||
25 | */ | ||
26 | #include "common.h" | ||
27 | #include "gnunet-fs-gtk.h" | ||
28 | |||
29 | /** | ||
30 | */ | ||
31 | void | ||
32 | GNUNET_GTK_main_menu_create_pseudonym_activate_cb (GtkWidget * dummy, | ||
33 | gpointer data) | ||
34 | { | ||
35 | GtkWidget *ad; | ||
36 | GtkBuilder *builder; | ||
37 | const char *name; | ||
38 | struct GNUNET_FS_Namespace *ns; | ||
39 | |||
40 | builder = GNUNET_GTK_get_new_builder ("create_namespace_dialog.glade"); | ||
41 | if (builder == NULL) | ||
42 | { | ||
43 | GNUNET_break (0); | ||
44 | return; | ||
45 | } | ||
46 | ad = GTK_WIDGET (gtk_builder_get_object (builder, | ||
47 | "GNUNET_GTK_create_namespace_dialog")); | ||
48 | if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad))) | ||
49 | { | ||
50 | gtk_widget_destroy (ad); | ||
51 | g_object_unref (G_OBJECT (builder)); | ||
52 | return; | ||
53 | } | ||
54 | name = gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, | ||
55 | "GNUNET_GTK_create_namespace_name_entry"))); | ||
56 | /* FIXME: show busy dialog while doing key creation */ | ||
57 | ns = GNUNET_FS_namespace_create (GNUNET_FS_GTK_get_fs_handle (), | ||
58 | name); | ||
59 | GNUNET_FS_namespace_delete (ns, GNUNET_NO); | ||
60 | gtk_widget_destroy (ad); | ||
61 | g_object_unref (G_OBJECT (builder)); | ||
62 | } | ||
63 | |||
64 | |||
65 | /* end of main_window_create_pseudonym.c */ | ||