aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-07-29 11:22:28 +0000
committerChristian Grothoff <christian@grothoff.org>2010-07-29 11:22:28 +0000
commitb1599668f59f727506595953dd419370e4d5dc51 (patch)
tree52ed267b1cdc909b5f5dea248f5911849eda326b
parentd6703b8e9011268e9db4aa9c72c46ba10eb68fad (diff)
downloadgnunet-gtk-b1599668f59f727506595953dd419370e4d5dc51.tar.gz
gnunet-gtk-b1599668f59f727506595953dd419370e4d5dc51.zip
new pseudonym dialog
-rw-r--r--contrib/Makefile.am1
-rw-r--r--contrib/Makefile.in2
-rw-r--r--contrib/create_namespace_dialog.glade105
-rw-r--r--contrib/main-window.glade1
-rw-r--r--gnunet_gtk_config.h.in8
-rw-r--r--src/main_window_create_pseudonym.c29
6 files changed, 144 insertions, 2 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index cae5b417..c9fcf249 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -9,6 +9,7 @@ EXTRA_DIST = \
9 9
10pkgdata_DATA = \ 10pkgdata_DATA = \
11 about.glade \ 11 about.glade \
12 create_namespace_dialog.glade \
12 download_as.glade \ 13 download_as.glade \
13 main_tab_new_frame.glade \ 14 main_tab_new_frame.glade \
14 main-window.glade \ 15 main-window.glade \
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index 4b8b630a..37bb8c4d 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -157,6 +157,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
157INSTALL_SCRIPT = @INSTALL_SCRIPT@ 157INSTALL_SCRIPT = @INSTALL_SCRIPT@
158INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 158INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
159INTLLIBS = @INTLLIBS@ 159INTLLIBS = @INTLLIBS@
160INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
160LD = @LD@ 161LD = @LD@
161LDFLAGS = @LDFLAGS@ 162LDFLAGS = @LDFLAGS@
162LIBICONV = @LIBICONV@ 163LIBICONV = @LIBICONV@
@@ -260,6 +261,7 @@ EXTRA_DIST = \
260 261
261pkgdata_DATA = \ 262pkgdata_DATA = \
262 about.glade \ 263 about.glade \
264 create_namespace_dialog.glade \
263 download_as.glade \ 265 download_as.glade \
264 main_tab_new_frame.glade \ 266 main_tab_new_frame.glade \
265 main-window.glade \ 267 main-window.glade \
diff --git a/contrib/create_namespace_dialog.glade b/contrib/create_namespace_dialog.glade
new file mode 100644
index 00000000..025d41c4
--- /dev/null
+++ b/contrib/create_namespace_dialog.glade
@@ -0,0 +1,105 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.20"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkDialog" id="GNUNET_GTK_create_namespace_dialog">
6 <property name="visible">True</property>
7 <property name="can_default">True</property>
8 <property name="border_width">5</property>
9 <property name="title" translatable="yes">Create namespace</property>
10 <property name="resizable">False</property>
11 <property name="modal">True</property>
12 <property name="window_position">center</property>
13 <property name="icon_name">folder-new</property>
14 <property name="type_hint">dialog</property>
15 <property name="skip_taskbar_hint">True</property>
16 <property name="has_separator">False</property>
17 <child internal-child="vbox">
18 <object class="GtkVBox" id="GNUNET_GTK_create_namespace_vbox">
19 <property name="visible">True</property>
20 <property name="spacing">2</property>
21 <child>
22 <object class="GtkHBox" id="GNUNET_GTK_create_namespace_value_hbox">
23 <property name="visible">True</property>
24 <child>
25 <object class="GtkLabel" id="GNUNET_GTK_create_namespace_name_label">
26 <property name="visible">True</property>
27 <property name="label" translatable="yes">_Name:</property>
28 <property name="use_underline">True</property>
29 </object>
30 <packing>
31 <property name="expand">False</property>
32 <property name="fill">False</property>
33 <property name="padding">4</property>
34 <property name="position">0</property>
35 </packing>
36 </child>
37 <child>
38 <object class="GtkEntry" id="GNUNET_GTK_create_namespace_name_entry">
39 <property name="visible">True</property>
40 <property name="can_focus">True</property>
41 <property name="invisible_char">●</property>
42 <property name="activates_default">True</property>
43 </object>
44 <packing>
45 <property name="position">1</property>
46 </packing>
47 </child>
48 </object>
49 <packing>
50 <property name="expand">False</property>
51 <property name="fill">False</property>
52 <property name="padding">5</property>
53 <property name="position">0</property>
54 </packing>
55 </child>
56 <child internal-child="action_area">
57 <object class="GtkHButtonBox" id="GNUNET_GTK_create_namespace_dialog-action_area">
58 <property name="visible">True</property>
59 <property name="layout_style">end</property>
60 <child>
61 <object class="GtkButton" id="GNUNET_GTK_create_namespace_cancel_button">
62 <property name="label">gtk-cancel</property>
63 <property name="visible">True</property>
64 <property name="can_focus">True</property>
65 <property name="receives_default">True</property>
66 <property name="use_action_appearance">False</property>
67 <property name="use_stock">True</property>
68 </object>
69 <packing>
70 <property name="expand">False</property>
71 <property name="fill">False</property>
72 <property name="position">0</property>
73 </packing>
74 </child>
75 <child>
76 <object class="GtkButton" id="GNUNET_GTK_create_namespace_ok_button">
77 <property name="label">gtk-ok</property>
78 <property name="visible">True</property>
79 <property name="can_focus">True</property>
80 <property name="can_default">True</property>
81 <property name="has_default">True</property>
82 <property name="receives_default">True</property>
83 <property name="use_action_appearance">False</property>
84 <property name="use_stock">True</property>
85 </object>
86 <packing>
87 <property name="expand">False</property>
88 <property name="fill">False</property>
89 <property name="position">1</property>
90 </packing>
91 </child>
92 </object>
93 <packing>
94 <property name="expand">False</property>
95 <property name="position">1</property>
96 </packing>
97 </child>
98 </object>
99 </child>
100 <action-widgets>
101 <action-widget response="-6">GNUNET_GTK_create_namespace_cancel_button</action-widget>
102 <action-widget response="-5">GNUNET_GTK_create_namespace_ok_button</action-widget>
103 </action-widgets>
104 </object>
105</interface>
diff --git a/contrib/main-window.glade b/contrib/main-window.glade
index f46def64..1c1f061b 100644
--- a/contrib/main-window.glade
+++ b/contrib/main-window.glade
@@ -47,6 +47,7 @@
47 <child> 47 <child>
48 <object class="GtkImageMenuItem" id="GNUNET_GTK_main_menu_file_create_pseudonym"> 48 <object class="GtkImageMenuItem" id="GNUNET_GTK_main_menu_file_create_pseudonym">
49 <property name="label" translatable="yes">_Create pseudonym</property> 49 <property name="label" translatable="yes">_Create pseudonym</property>
50 <property name="visible">True</property>
50 <property name="tooltip_text" translatable="yes">Create a pseudonym for publishing content. Note that you can also publish content anonymously (without using a pseudonym).</property> 51 <property name="tooltip_text" translatable="yes">Create a pseudonym for publishing content. Note that you can also publish content anonymously (without using a pseudonym).</property>
51 <property name="use_action_appearance">False</property> 52 <property name="use_action_appearance">False</property>
52 <property name="accel_path">&lt;gnunet-gtk&gt;/File sharing/Create pseudonym</property> 53 <property name="accel_path">&lt;gnunet-gtk&gt;/File sharing/Create pseudonym</property>
diff --git a/gnunet_gtk_config.h.in b/gnunet_gtk_config.h.in
index 81afda19..91797001 100644
--- a/gnunet_gtk_config.h.in
+++ b/gnunet_gtk_config.h.in
@@ -15,6 +15,14 @@
15/* Define to 1 if you have the <argz.h> header file. */ 15/* Define to 1 if you have the <argz.h> header file. */
16#undef HAVE_ARGZ_H 16#undef HAVE_ARGZ_H
17 17
18/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
19 CoreFoundation framework. */
20#undef HAVE_CFLOCALECOPYCURRENT
21
22/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
23 the CoreFoundation framework. */
24#undef HAVE_CFPREFERENCESCOPYAPPVALUE
25
18/* Define if the GNU dcgettext() function is already present or preinstalled. 26/* Define if the GNU dcgettext() function is already present or preinstalled.
19 */ 27 */
20#undef HAVE_DCGETTEXT 28#undef HAVE_DCGETTEXT
diff --git a/src/main_window_create_pseudonym.c b/src/main_window_create_pseudonym.c
index b3a2d1fc..4224e6c4 100644
--- a/src/main_window_create_pseudonym.c
+++ b/src/main_window_create_pseudonym.c
@@ -31,8 +31,33 @@ void
31GNUNET_GTK_main_menu_create_pseudonym_activate_cb (GtkWidget * dummy, 31GNUNET_GTK_main_menu_create_pseudonym_activate_cb (GtkWidget * dummy,
32 gpointer data) 32 gpointer data)
33{ 33{
34 /* not implemented */ 34 GtkWidget *ad;
35 GNUNET_break (0); 35 GtkBuilder *builder;
36 const char *name;
37 struct GNUNET_FS_Namespace *ns;
38
39 builder = GNUNET_GTK_get_new_builder ("create_namespace_dialog.glade");
40 if (builder == NULL)
41 {
42 GNUNET_break (0);
43 return;
44 }
45 ad = GTK_WIDGET (gtk_builder_get_object (builder,
46 "GNUNET_GTK_create_namespace_dialog"));
47 if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad)))
48 {
49 gtk_widget_destroy (ad);
50 g_object_unref (G_OBJECT (builder));
51 return;
52 }
53 name = gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder,
54 "GNUNET_GTK_create_namespace_name_entry")));
55 /* FIXME: show busy dialog while doing key creation */
56 ns = GNUNET_FS_namespace_create (GNUNET_GTK_get_fs_handle (),
57 name);
58 GNUNET_FS_namespace_delete (ns, GNUNET_NO);
59 gtk_widget_destroy (ad);
60 g_object_unref (G_OBJECT (builder));
36} 61}
37 62
38 63