diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c b/src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c index 05094a12..e0a8b0e4 100644 --- a/src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c +++ b/src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c | |||
@@ -26,28 +26,20 @@ | |||
26 | #include "gnunet-fs-gtk-common.h" | 26 | #include "gnunet-fs-gtk-common.h" |
27 | #include "gnunet-fs-gtk.h" | 27 | #include "gnunet-fs-gtk.h" |
28 | 28 | ||
29 | /** | ||
30 | */ | ||
31 | void | 29 | void |
32 | GNUNET_GTK_main_menu_create_pseudonym_activate_cb (GtkWidget * dummy, | 30 | GNUNET_GTK_create_namespace_dialog_response_cb (GtkDialog *dialog, |
33 | gpointer data) | 31 | gint response_id, gpointer user_data) |
34 | { | 32 | { |
35 | GtkWidget *ad; | ||
36 | GtkBuilder *builder; | ||
37 | const char *name; | 33 | const char *name; |
38 | struct GNUNET_FS_Namespace *ns; | 34 | struct GNUNET_FS_Namespace *ns; |
35 | GtkWidget *ad; | ||
36 | GtkBuilder *builder; | ||
39 | 37 | ||
40 | builder = | 38 | builder = GTK_BUILDER (user_data); |
41 | GNUNET_GTK_get_new_builder | ||
42 | ("gnunet_fs_gtk_create_namespace_dialog.glade"); | ||
43 | if (builder == NULL) | ||
44 | { | ||
45 | GNUNET_break (0); | ||
46 | return; | ||
47 | } | ||
48 | ad = GTK_WIDGET (gtk_builder_get_object | 39 | ad = GTK_WIDGET (gtk_builder_get_object |
49 | (builder, "GNUNET_GTK_create_namespace_dialog")); | 40 | (builder, "GNUNET_GTK_create_namespace_dialog")); |
50 | if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad))) | 41 | |
42 | if (response_id != -5) | ||
51 | { | 43 | { |
52 | gtk_widget_destroy (ad); | 44 | gtk_widget_destroy (ad); |
53 | g_object_unref (G_OBJECT (builder)); | 45 | g_object_unref (G_OBJECT (builder)); |
@@ -65,5 +57,32 @@ GNUNET_GTK_main_menu_create_pseudonym_activate_cb (GtkWidget * dummy, | |||
65 | g_object_unref (G_OBJECT (builder)); | 57 | g_object_unref (G_OBJECT (builder)); |
66 | } | 58 | } |
67 | 59 | ||
60 | /** | ||
61 | */ | ||
62 | void | ||
63 | GNUNET_GTK_main_menu_create_pseudonym_activate_cb (GtkWidget * dummy, | ||
64 | gpointer data) | ||
65 | { | ||
66 | GtkWidget *ad; | ||
67 | GtkWidget *toplevel; | ||
68 | GtkBuilder *builder; | ||
69 | |||
70 | builder = | ||
71 | GNUNET_GTK_get_new_builder | ||
72 | ("gnunet_fs_gtk_create_namespace_dialog.glade"); | ||
73 | if (builder == NULL) | ||
74 | { | ||
75 | GNUNET_break (0); | ||
76 | return; | ||
77 | } | ||
78 | ad = GTK_WIDGET (gtk_builder_get_object | ||
79 | (builder, "GNUNET_GTK_create_namespace_dialog")); | ||
80 | |||
81 | toplevel = gtk_widget_get_toplevel (dummy); | ||
82 | if (GTK_IS_WINDOW (toplevel)) | ||
83 | gtk_window_set_transient_for (GTK_WINDOW (ad), GTK_WINDOW (toplevel)); | ||
84 | gtk_window_present (GTK_WINDOW (ad)); | ||
85 | } | ||
86 | |||
68 | 87 | ||
69 | /* end of gnunet-fs-gtk-main_window_create_pseudonym.c */ | 88 | /* end of gnunet-fs-gtk-main_window_create_pseudonym.c */ |