gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18757 - in gnunet-gtk: contrib src/fs


From: gnunet
Subject: [GNUnet-SVN] r18757 - in gnunet-gtk: contrib src/fs
Date: Fri, 23 Dec 2011 09:38:28 +0100

Author: grothoff
Date: 2011-12-23 09:38:28 +0100 (Fri, 23 Dec 2011)
New Revision: 18757

Modified:
   gnunet-gtk/contrib/gnunet_fs_gtk_create_namespace_dialog.glade
   gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade
   gnunet-gtk/contrib/gnunet_fs_gtk_open_directory_dialog.glade
   gnunet-gtk/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade
   gnunet-gtk/src/fs/gnunet-fs-gtk-download.c
   gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
   gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.h
   gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c
   gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c
   gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_file_publish.c
   gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_open_directory.c
   gnunet-gtk/src/fs/gnunet-fs-gtk.c
   gnunet-gtk/src/fs/gnunet-fs-gtk.h
Log:
LRN: #1759: get rid of gtk_dialog_run

Modified: gnunet-gtk/contrib/gnunet_fs_gtk_create_namespace_dialog.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_create_namespace_dialog.glade      
2011-12-22 14:15:31 UTC (rev 18756)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_create_namespace_dialog.glade      
2011-12-23 08:38:28 UTC (rev 18757)
@@ -4,6 +4,7 @@
   <!-- interface-naming-policy project-wide -->
   <object class="GtkDialog" id="GNUNET_GTK_create_namespace_dialog">
     <property name="visible">True</property>
+    <property name="can_focus">False</property>
     <property name="can_default">True</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Create namespace</property>
@@ -13,17 +14,20 @@
     <property name="icon_name">folder-new</property>
     <property name="type_hint">dialog</property>
     <property name="skip_taskbar_hint">True</property>
-    <property name="has_separator">False</property>
+    <signal name="response" 
handler="GNUNET_GTK_create_namespace_dialog_response_cb" swapped="no"/>
     <child internal-child="vbox">
       <object class="GtkVBox" id="GNUNET_GTK_create_namespace_vbox">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="spacing">2</property>
         <child>
           <object class="GtkHBox" id="GNUNET_GTK_create_namespace_value_hbox">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <child>
               <object class="GtkLabel" 
id="GNUNET_GTK_create_namespace_name_label">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_Name:</property>
                 <property name="use_underline">True</property>
               </object>
@@ -40,8 +44,14 @@
                 <property name="can_focus">True</property>
                 <property name="invisible_char">●</property>
                 <property name="activates_default">True</property>
+                <property name="primary_icon_activatable">False</property>
+                <property name="secondary_icon_activatable">False</property>
+                <property name="primary_icon_sensitive">True</property>
+                <property name="secondary_icon_sensitive">True</property>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
@@ -56,14 +66,15 @@
         <child internal-child="action_area">
           <object class="GtkHButtonBox" 
id="GNUNET_GTK_create_namespace_dialog-action_area">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" 
id="GNUNET_GTK_create_namespace_cancel_button">
                 <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -75,12 +86,12 @@
             <child>
               <object class="GtkButton" 
id="GNUNET_GTK_create_namespace_ok_button">
                 <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -92,6 +103,8 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
             <property name="position">1</property>
           </packing>
         </child>

Modified: gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade  2011-12-22 14:15:31 UTC 
(rev 18756)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_main_window.glade  2011-12-23 08:38:28 UTC 
(rev 18757)
@@ -2,6 +2,823 @@
 <interface>
   <requires lib="gtk+" version="2.20"/>
   <!-- interface-naming-policy project-wide -->
+  <object class="GtkAdjustment" 
id="GNUNET_GTK_edit_publication_metadata_preview_image_horizontal_adjustment">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" 
id="GNUNET_GTK_edit_publication_metadata_preview_image_verticall_adjustment">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="GNUNET_GTK_edit_publication_window">
+    <property name="can_focus">False</property>
+    <property name="border_width">4</property>
+    <property name="modal">True</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <property name="deletable">False</property>
+    <property name="transient_for">GNUNET_GTK_main_window</property>
+    <signal name="realize" 
handler="GNUNET_GTK_edit_publication_window_realize_cb" swapped="no"/>
+    <child>
+      <object class="GtkVBox" id="GNUNET_GTK_edit_publication_master_vbox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVPaned" 
id="GNUNET_GTK_edit_publication_main_vpaned">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <child>
+              <object class="GtkHPaned" 
id="GNUNET_GTK_edit_publication_top_hpaned">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="position_set">True</property>
+                <child>
+                  <object class="GtkVBox" 
id="GNUNET_GTK_edit_publication_metadata_vbox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <object class="GtkHBox" 
id="GNUNET_GTK_edit_publication_hbox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkLabel" 
id="GNUNET_GTK_edit_publication_type_label">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" 
translatable="yes">_Publication type:</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" 
id="_GNUNET_GTK_edit_publication_type_combo">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property 
name="model">GNUNET_GTK_publication_types_liststore</property>
+                            <property name="active">0</property>
+                            <child>
+                              <object class="GtkCellRendererText" 
id="cellrenderertext2"/>
+                              <attributes>
+                                <attribute name="text">1</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" 
id="GNUNET_GTK_edit_publication_add_button">
+                            <property name="label">gtk-add</property>
+                            <property 
name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="clicked" 
handler="GNUNET_GTK_edit_publication_add_button_clicked_cb" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" 
id="GNUNET_GTK_edit_publication_delete_button">
+                            <property name="label">gtk-delete</property>
+                            <property 
name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_stock">True</property>
+                            <signal name="clicked" 
handler="GNUNET_GTK_edit_publication_delete_button_clicked_cb" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">5</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" 
id="GNUNET_GTK_edit_publication_metadata_scrolled_window">
+                        <property name="width_request">400</property>
+                        <property name="height_request">120</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" 
id="GNUNET_GTK_edit_publication_metadata_tree_view">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property 
name="model">GNUNET_GTK_publication_metadata_liststore</property>
+                            <property name="enable_search">False</property>
+                            <property name="search_column">0</property>
+                            <property name="tooltip_column">4</property>
+                            <child>
+                              <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_edit_publication_metadata_tree_view_type_column">
+                                <property name="resizable">True</property>
+                                <property name="title" 
translatable="yes">Type</property>
+                                <property name="clickable">True</property>
+                                <property name="sort_column_id">1</property>
+                                <child>
+                                  <object class="GtkCellRendererCombo" 
id="GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer">
+                                    <property name="editable">True</property>
+                                    <property name="has_entry">False</property>
+                                    <property 
name="model">GNUNET_GTK_publication_metadata_types_liststore</property>
+                                    <property name="text_column">2</property>
+                                    <signal name="changed" 
handler="GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_changed_cb"
 swapped="no"/>
+                                    <signal name="edited" 
handler="GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb"
 swapped="no"/>
+                                  </object>
+                                  <attributes>
+                                    <attribute name="text">2</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_edit_publication_metadata_tree_view_description_column">
+                                <property name="sizing">autosize</property>
+                                <property name="title" 
translatable="yes">Value</property>
+                                <property name="expand">True</property>
+                                <property name="clickable">True</property>
+                                <property name="sort_column_id">2</property>
+                                <child>
+                                  <object class="GtkCellRendererText" 
id="GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer">
+                                    <property name="editable">True</property>
+                                    <signal name="edited" 
handler="GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb"
 swapped="no"/>
+                                  </object>
+                                  <attributes>
+                                    <attribute name="text">3</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="resize">True</property>
+                    <property name="shrink">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" 
id="GNUNET_GTK_edit_publication_metadata_preview_frame">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" 
id="GNUNET_GTK_edit_publication_metadata_preview_alignment">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" 
id="GNUNET_GTK_edit_publication_metadata_preview_vbox">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkFileChooserButton" 
id="GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property 
name="create_folders">False</property>
+                                <property name="title" 
translatable="yes">Select file</property>
+                                <signal name="file-set" 
handler="GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button_file_set_cb"
 swapped="no"/>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkScrolledWindow" 
id="GNUNET_GTK_edit_publication_metadata_preview_image_scrolled_window">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property 
name="hadjustment">GNUNET_GTK_edit_publication_metadata_preview_image_horizontal_adjustment</property>
+                                <property 
name="vadjustment">GNUNET_GTK_edit_publication_metadata_preview_image_verticall_adjustment</property>
+                                <property 
name="hscrollbar_policy">automatic</property>
+                                <property 
name="vscrollbar_policy">automatic</property>
+                                <child>
+                                  <object class="GtkViewport" 
id="GNUNET_GTK_edit_publication_metadata_preview_image_viewport">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property 
name="hadjustment">GNUNET_GTK_edit_publication_metadata_preview_image_horizontal_adjustment</property>
+                                    <property 
name="vadjustment">GNUNET_GTK_edit_publication_metadata_preview_image_verticall_adjustment</property>
+                                    <property 
name="shadow_type">none</property>
+                                    <child>
+                                      <object class="GtkImage" 
id="GNUNET_GTK_edit_publication_metadata_preview_image">
+                                        <property 
name="can_focus">False</property>
+                                        <property 
name="stock">gtk-missing-image</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" 
translatable="yes">Preview:</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="resize">True</property>
+                    <property name="shrink">False</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" 
id="GNUNET_GTK_edit_publication_secondary_hbox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkHBox" 
id="GNUNET_GTK_edit_publication_keyword_list_hbox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkLabel" 
id="GNUNET_GTK_edit_publication_keyword_label">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" 
translatable="yes">_Keyword:</property>
+                                <property name="use_underline">True</property>
+                                <property 
name="mnemonic_widget">GNUNET_GTK_edit_publication_keyword_entry</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" 
id="GNUNET_GTK_edit_publication_keyword_entry">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">●</property>
+                                <property 
name="invisible_char_set">True</property>
+                                <property 
name="caps_lock_warning">False</property>
+                                <property 
name="primary_icon_activatable">False</property>
+                                <property 
name="secondary_icon_activatable">False</property>
+                                <property 
name="primary_icon_sensitive">True</property>
+                                <property 
name="secondary_icon_sensitive">True</property>
+                                <signal name="key-press-event" 
handler="GNUNET_GTK_edit_publication_keyword_entry_key_press_event_cb" 
swapped="no"/>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkScrolledWindow" 
id="GNUNET_GTK_edit_publication_keyword_scrolled_window">
+                            <property name="width_request">400</property>
+                            <property name="height_request">120</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hscrollbar_policy">never</property>
+                            <property 
name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">in</property>
+                            <child>
+                              <object class="GtkTreeView" 
id="GNUNET_GTK_edit_publication_keyword_list_tree_view">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property 
name="model">GNUNET_GTK_publication_keywords_liststore</property>
+                                <property name="search_column">0</property>
+                                <child>
+                                  <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_edit_publication_keyword_list_tree_view_column">
+                                    <property name="title" 
translatable="yes">Keywords</property>
+                                    <property name="clickable">True</property>
+                                    <property 
name="reorderable">True</property>
+                                    <property 
name="sort_column_id">0</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" 
id="GNUNET_GTK_edit_publication_keyword_list_tree_view_renderer"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" 
id="GNUNET_GTK_edit_publication_normalization_checkbox">
+                            <property name="label" 
translatable="yes">Normalize all keywords a_utomatically after "OK" is 
pressed</property>
+                            <property 
name="use_action_appearance">False</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" 
handler="GNUNET_GTK_edit_publication_normalization_checkbox_toggled_cb" 
swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVBox" 
id="GNUNET_GTK_edit_publication_keyword_list_button_vbox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkButton" 
id="GNUNET_GTK_edit_publication_keyword_list_add_button">
+                            <property name="label">Add key_word</property>
+                            <property 
name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="image">add_stock_image</property>
+                            <property name="use_underline">True</property>
+                            <signal name="clicked" 
handler="GNUNET_GTK_edit_publication_keyword_list_add_button_clicked_cb" 
swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" 
id="GNUNET_GTK_edit_publication_keyword_list_normalize_button">
+                            <property name="label" 
translatable="yes">_Normalize selected</property>
+                            <property 
name="use_action_appearance">False</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_underline">True</property>
+                            <signal name="clicked" 
handler="GNUNET_GTK_edit_publication_keyword_list_normalize_button_clicked_cb" 
swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="pack_type">end</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" 
id="GNUNET_GTK_edit_publication_keyword_list_del_button">
+                            <property name="label">Delete _selected</property>
+                            <property 
name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_underline">True</property>
+                            <signal name="clicked" 
handler="GNUNET_GTK_edit_publication_keyword_list_del_button_clicked_cb" 
swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">5</property>
+                            <property name="pack_type">end</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">5</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="padding">4</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="yalign">0</property>
+                        <property name="yscale">0</property>
+                        <property name="left_padding">4</property>
+                        <property name="right_padding">4</property>
+                        <child>
+                          <object class="GtkVBox" 
id="GNUNET_GTK_edit_publication_misc_vbox">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkHBox" 
id="GNUNET_GTK_edit_publication_anonymity_hbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkLabel" 
id="GNUNET_GTK_edit_publication_anonymity_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">1</property>
+                                    <property name="label" 
translatable="yes">A_nonymity:</property>
+                                    <property 
name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkAlignment" 
id="GNUNET_GTK_edit_publication_anonymity_combobox_alignment">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <object class="GtkComboBox" 
id="GNUNET_GTK_edit_publication_anonymity_combobox">
+                                        <property 
name="visible">True</property>
+                                        <property 
name="can_focus">False</property>
+                                        <property 
name="model">main_window_search_anonymity_liststore</property>
+                                        <property name="active">1</property>
+                                        <child>
+                                          <object class="GtkCellRendererText" 
id="GNUNET_GTK_edit_publication_anonymity_combobox_renderer"/>
+                                          <attributes>
+                                            <attribute 
name="foreground">2</attribute>
+                                            <attribute 
name="text">0</attribute>
+                                          </attributes>
+                                        </child>
+                                        <child>
+                                          <object class="GtkCellRendererText" 
id="GNUNET_GTK_edit_publication_anonymity_combobox_renerer_level"/>
+                                          <attributes>
+                                            <attribute 
name="text">1</attribute>
+                                          </attributes>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" 
id="GNUNET_GTK_edit_publication_priority_hbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkLabel" 
id="GNUNET_GTK_edit_publication_priority_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">1</property>
+                                    <property name="label" 
translatable="yes">_Priority:</property>
+                                    <property 
name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" 
id="GNUNET_GTK_edit_publication_priority_spin_button">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="invisible_char">●</property>
+                                    <property 
name="invisible_char_set">True</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                    <property 
name="primary_icon_sensitive">True</property>
+                                    <property 
name="secondary_icon_sensitive">True</property>
+                                    <property 
name="adjustment">priority_adjustment</property>
+                                    <property name="numeric">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" 
id="GNUNET_GTK_edit_publication_root_hbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkLabel" 
id="GNUNET_GTK_edit_publication_root_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">1</property>
+                                    <property name="label" 
translatable="yes">_Root keyword:</property>
+                                    <property 
name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" 
id="GNUNET_GTK_edit_publication_root_entry">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="invisible_char">•</property>
+                                    <property name="text">root</property>
+                                    <property 
name="invisible_char_set">True</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                    <property 
name="primary_icon_sensitive">True</property>
+                                    <property 
name="secondary_icon_sensitive">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox4">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkLabel" 
id="GNUNET_GTK_edit_publication_expiration_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">1</property>
+                                    <property name="label" 
translatable="yes">_Expriation year:</property>
+                                    <property 
name="use_underline">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" 
id="GNUNET_GTK_edit_publication_expiration_year_spin_button">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="max_length">4</property>
+                                    <property 
name="invisible_char">•</property>
+                                    <property 
name="invisible_char_set">True</property>
+                                    <property 
name="primary_icon_activatable">False</property>
+                                    <property 
name="secondary_icon_activatable">False</property>
+                                    <property 
name="primary_icon_sensitive">True</property>
+                                    <property 
name="secondary_icon_sensitive">True</property>
+                                    <property 
name="adjustment">expiration_year_adjustment</property>
+                                    <property name="climb_rate">1</property>
+                                    <property name="numeric">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" 
id="GNUNET_GTK_edit_publication_index_hbox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkLabel" 
id="GNUNET_GTK_edit_publication_index_label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">1</property>
+                                    <property name="label" 
translatable="yes">_Index file:</property>
+                                    <property 
name="use_underline">True</property>
+                                    <property 
name="mnemonic_widget">GNUNET_GTK_edit_publication_index_checkbutton</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="padding">5</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkCheckButton" 
id="GNUNET_GTK_edit_publication_index_checkbutton">
+                                    <property 
name="use_action_appearance">False</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property 
name="receives_default">False</property>
+                                    <property 
name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">4</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Publication 
options:</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" 
id="GNUNET_GTK_edit_publication_buttons_hbox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_edit_publication_confirm_button">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" 
handler="GNUNET_GTK_edit_publication_confirm_button_clicked_cb" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">4</property>
+                <property name="pack_type">end</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_edit_publication_cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" 
handler="GNUNET_GTK_edit_publication_cancel_button_clicked_cb" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">4</property>
+                <property name="pack_type">end</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="padding">1</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkTreeStore" 
id="GNUNET_GTK_file_sharing_publishing_tree_store">
+    <columns>
+      <!-- column-name filesize -->
+      <column type="gchararray"/>
+      <!-- column-name do_index -->
+      <column type="gboolean"/>
+      <!-- column-name filename -->
+      <column type="gchararray"/>
+      <!-- column-name anonymity_level -->
+      <column type="guint"/>
+      <!-- column-name priority -->
+      <column type="guint"/>
+      <!-- column-name file_information_struct -->
+      <column type="gpointer"/>
+    </columns>
+  </object>
   <object class="GtkWindow" id="GNUNET_GTK_main_window">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">gnunet-fs-gtk</property>
@@ -41,7 +858,6 @@
                 <property name="use_underline">True</property>
                 <child type="submenu">
                   <object class="GtkMenu" 
id="GNUNET_GTK_main_menu_file_sharing_box">
-                    <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
                       <object class="GtkImageMenuItem" 
id="GNUNET_GTK_main_menu_file_create_pseudonym">
@@ -52,7 +868,7 @@
                         <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>
                         <property name="accel_path">&lt;gnunet-fs-gtk&gt;/File 
sharing/Create pseudonym</property>
                         <property name="use_underline">True</property>
-                        <property name="image">image3</property>
+                        <property name="image">new_stock_imag</property>
                         <property name="use_stock">False</property>
                         <accelerator key="n" signal="activate" 
modifiers="GDK_CONTROL_MASK"/>
                         <signal name="activate" 
handler="GNUNET_GTK_main_menu_create_pseudonym_activate_cb" swapped="no"/>
@@ -65,7 +881,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="use_underline">True</property>
-                        <property name="image">image6</property>
+                        <property name="image">index_stock_image</property>
                         <property name="use_stock">False</property>
                         <signal name="activate" 
handler="GNUNET_GTK_main_menu_file_advertise_pseudonym_activate_cb" 
swapped="no"/>
                       </object>
@@ -79,7 +895,7 @@
                         <property name="tooltip_text" 
translatable="yes">Publish files or directories on GNUnet</property>
                         <property name="accel_path">&lt;gnunet-fs-gtk&gt;/File 
sharing/Publish</property>
                         <property name="use_underline">True</property>
-                        <property name="image">image2</property>
+                        <property name="image">up_stock_image</property>
                         <property name="use_stock">False</property>
                         <accelerator key="a" signal="activate" 
modifiers="GDK_CONTROL_MASK"/>
                         <signal name="activate" 
handler="GNUNET_GTK_main_menu_file_publish_activate_cb" swapped="no"/>
@@ -88,7 +904,6 @@
                     <child>
                       <object class="GtkSeparatorMenuItem" 
id="GNUNET_GTK_main_menu_file_sep1">
                         <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
                         <property name="can_focus">False</property>
                       </object>
                     </child>
@@ -96,12 +911,10 @@
                       <object class="GtkImageMenuItem" 
id="GNUNET_GTK_main_menu_file_search">
                         <property name="label" 
translatable="yes">_Search</property>
                         <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="tooltip_text" 
translatable="yes">Search GNUnet for files</property>
                         <property name="accel_path">&lt;gnunet-fs-gtk&gt;/File 
sharing/Search</property>
                         <property name="use_underline">True</property>
-                        <property name="image">image4</property>
                         <property name="use_stock">False</property>
                         <accelerator key="s" signal="activate" 
modifiers="GDK_CONTROL_MASK"/>
                         <signal name="activate" 
handler="GNUNET_GTK_main_menu_file_search_activate_cb" swapped="no"/>
@@ -123,7 +936,7 @@
                         <property name="tooltip_text" 
translatable="yes">Download a file or directory with a known URI.</property>
                         <property name="accel_path">&lt;gnunet-fs-gtk&gt;/File 
sharing/Download</property>
                         <property name="use_underline">True</property>
-                        <property name="image">image5</property>
+                        <property name="image">down_stock_image</property>
                         <property name="use_stock">False</property>
                         <accelerator key="d" signal="activate" 
modifiers="GDK_CONTROL_MASK"/>
                         <signal name="activate" 
handler="GNUNET_GTK_main_menu_file_download_uri_activate_cb" swapped="no"/>
@@ -138,7 +951,7 @@
                         <property name="tooltip_text" translatable="yes">Use 
this option to browse a GNUnet directory file that has been previously 
downloaded.</property>
                         <property name="accel_path">&lt;gnunet-fs-gtk&gt;/File 
sharing/Open directory</property>
                         <property name="use_underline">True</property>
-                        <property name="image">image1</property>
+                        <property name="image">open_stock_image</property>
                         <property name="use_stock">False</property>
                         <accelerator key="F3" signal="activate"/>
                         <signal name="activate" 
handler="GNUNET_GTK_main_menu_file_open_gnunet_directory_activate_cb" 
swapped="no"/>
@@ -387,6 +1200,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="image">find_stock_image</property>
                     <signal name="clicked" 
handler="main_window_search_button_clicked_cb" swapped="no"/>
                   </object>
                 </child>
@@ -403,8 +1217,7 @@
                 <property name="can_focus">True</property>
                 <property name="invisible_char">●</property>
                 <property name="invisible_char_set">True</property>
-                <property name="primary_icon_stock">gtk-find</property>
-                <property name="primary_icon_activatable">True</property>
+                <property name="primary_icon_activatable">False</property>
                 <property name="secondary_icon_activatable">False</property>
                 <property name="primary_icon_sensitive">True</property>
                 <property name="secondary_icon_sensitive">True</property>
@@ -665,6 +1478,407 @@
       </object>
     </child>
   </object>
+  <object class="GtkWindow" id="GNUNET_GTK_master_publish_dialog">
+    <property name="height_request">500</property>
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">Publish content on 
GNUnet</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="deletable">False</property>
+    <property name="transient_for">GNUNET_GTK_main_window</property>
+    <signal name="realize" 
handler="GNUNET_GTK_master_publish_dialog_realize_cb" swapped="no"/>
+    <signal name="delete-event" 
handler="GNUNET_GTK_master_publish_dialog_delete_event_cb" swapped="no"/>
+    <child>
+      <object class="GtkVBox" id="GNUNET_GTK_master_publish_dialog_vbox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="border_width">4</property>
+        <property name="spacing">7</property>
+        <child>
+          <object class="GtkScrolledWindow" 
id="GNUNET_GTK_master_publish_dialog_file_information_scrolled_window">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hadjustment">adjustment5</property>
+            <property name="vadjustment">adjustment6</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkTreeView" 
id="GNUNET_GTK_master_publish_dialog_file_information_tree_view">
+                <property name="height_request">100</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property 
name="model">GNUNET_GTK_file_sharing_publishing_tree_store</property>
+                <property name="hadjustment">adjustment5</property>
+                <property name="vadjustment">adjustment6</property>
+                <property name="enable_tree_lines">True</property>
+                <child>
+                  <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_master_publish_dialog_file_information_filesize_column">
+                    <property name="sizing">autosize</property>
+                    <property name="title" translatable="yes">Size</property>
+                    <child>
+                      <object class="GtkCellRendererText" 
id="GNUNET_GTK_master_publish_dialog_file_information_filesize_renderer"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_master_publish_dialog_file_information_filename_column">
+                    <property name="resizable">True</property>
+                    <property name="sizing">autosize</property>
+                    <property name="title" 
translatable="yes">Filename</property>
+                    <property name="expand">True</property>
+                    <property name="clickable">True</property>
+                    <property name="reorderable">True</property>
+                    <property name="sort_indicator">True</property>
+                    <child>
+                      <object class="GtkCellRendererText" 
id="GNUNET_GTK_master_publish_dialog_file_information_filename_renderer"/>
+                      <attributes>
+                        <attribute name="text">2</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" 
id="GNUNET_GTK_master_dialog_modification_button_hbox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkTable" 
id="GNUNET_GTK_master_publish_dialog_action_table">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_add_button">
+                    <property name="label" translatable="yes">Add 
_File</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_underline">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_add_button_clicked_cb" swapped="no"/>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_new_button">
+                    <property name="label" translatable="yes">_Create empty 
directory</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="image">new_stock_image</property>
+                    <property name="use_underline">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_new_button_clicked_cb" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_open_button">
+                    <property name="label" translatable="yes">Add 
_Directory</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_underline">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_open_button_clicked_cb" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_edit_button">
+                    <property name="label">gtk-edit</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_edit_button_clicked_cb" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_delete_button">
+                    <property name="label">gtk-delete</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_delete_button_clicked_cb" 
swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">25</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" 
id="GNUNET_GTK_master_publish_dialog_arrow_table">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">3</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_up_button">
+                    <property name="label">gtk-go-up</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_up_button_clicked_cb" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_left_button">
+                    <property name="label" translatable="yes">_Left</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="image">left_stock_image</property>
+                    <property name="use_underline">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_left_button_clicked_cb" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_down_button">
+                    <property name="label">gtk-go-down</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_stock">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_down_button_clicked_cb" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_right_button">
+                    <property name="label" translatable="yes">_Right</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="sensitive">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="image">right_stock_image</property>
+                    <property name="use_underline">True</property>
+                    <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_right_button_clicked_cb" 
swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">25</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_scrolled_window">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hadjustment">adjustment7</property>
+            <property name="vadjustment">adjustment8</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkTreeView" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_tree_view">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property 
name="model">GNUNET_GTK_pseudonym_tree_store</property>
+                <property name="hadjustment">adjustment7</property>
+                <property name="vadjustment">adjustment8</property>
+                <property name="reorderable">True</property>
+                <property name="rubber_banding">True</property>
+                <property name="enable_grid_lines">both</property>
+                <child>
+                  <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_name_column">
+                    <property name="resizable">True</property>
+                    <property name="title" 
translatable="yes">Pseudonym</property>
+                    <property name="clickable">True</property>
+                    <property name="reorderable">True</property>
+                    <property name="sort_indicator">True</property>
+                    <child>
+                      <object class="GtkCellRendererText" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_name_renderer"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_column">
+                    <property name="resizable">True</property>
+                    <property name="sizing">autosize</property>
+                    <property name="title" translatable="yes">Current 
identifier</property>
+                    <property name="clickable">True</property>
+                    <child>
+                      <object class="GtkCellRendererText" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_identifier_renderer"/>
+                      <attributes>
+                        <attribute name="editable">8</attribute>
+                        <attribute name="text">2</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_updates_column">
+                    <property name="resizable">True</property>
+                    <property name="sizing">autosize</property>
+                    <property name="fixed_width">5</property>
+                    <property name="title" translatable="yes">Update 
identifier</property>
+                    <child>
+                      <object class="GtkCellRendererText" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_updates_renderer"/>
+                      <attributes>
+                        <attribute name="editable">7</attribute>
+                        <attribute name="text">5</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_description_column">
+                    <property name="title" translatable="yes">Description (of 
existing content)</property>
+                    <child>
+                      <object class="GtkCellRendererText" 
id="GNUNET_GTK_master_publish_dialog_pseudonym_description_renderer">
+                        <property name="wrap_mode">word</property>
+                      </object>
+                      <attributes>
+                        <attribute name="text">6</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" 
id="GNUNET_GTK_master_publish_dialog_master_buttons_hbox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_execute_button">
+                <property name="label" translatable="yes">_Execute</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+                <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb" 
swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="pack_type">end</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_master_publish_dialog_cancel_button">
+                <property name="label" translatable="yes">_Cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+                <signal name="clicked" 
handler="GNUNET_GTK_master_publish_dialog_cancel_button_clicked_cb" 
swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="pack_type">end</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
   <object class="GtkListStore" id="GNUNET_GTK_meta_data_list_store">
     <columns>
       <!-- column-name extractor_meta_type -->
@@ -706,7 +1920,6 @@
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">_URI:</property>
                 <property name="use_underline">True</property>
-                <property name="selectable">True</property>
                 <property 
name="mnemonic_widget">GNUNET_GTK_open_url_dialog_url_textview</property>
               </object>
               <packing>
@@ -756,7 +1969,6 @@
                 <property name="can_focus">False</property>
                 <property name="label" 
translatable="yes">_Anonymity:</property>
                 <property name="use_underline">True</property>
-                <property name="selectable">True</property>
                 <property 
name="mnemonic_widget">GNUNET_GTK_open_url_dialog_anonymity_combobox</property>
               </object>
               <packing>
@@ -819,7 +2031,7 @@
                 <property name="sensitive">False</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="image">execute_stock_image2</property>
+                <property name="image">execute_stock_image</property>
                 <property name="use_underline">True</property>
                 <signal name="clicked" 
handler="GNUNET_GTK_open_url_dialog_execute_button_clicked_cb" swapped="no"/>
               </object>
@@ -874,6 +2086,710 @@
       <column type="guint64"/>
     </columns>
   </object>
+  <object class="GtkTreeStore" id="GNUNET_GTK_pseudonym_tree_store">
+    <columns>
+      <!-- column-name local_name -->
+      <column type="gchararray"/>
+      <!-- column-name namespace_handle -->
+      <column type="gpointer"/>
+      <!-- column-name last_id -->
+      <column type="gchararray"/>
+      <!-- column-name last_uri -->
+      <column type="gchararray"/>
+      <!-- column-name last_meta -->
+      <column type="gpointer"/>
+      <!-- column-name next_id -->
+      <column type="gchararray"/>
+      <!-- column-name last_description_from_meta -->
+      <column type="gchararray"/>
+      <!-- column-name next_id_editable -->
+      <column type="gboolean"/>
+      <!-- column-name current_id_editable -->
+      <column type="gboolean"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" id="GNUNET_GTK_publication_keywords_liststore">
+    <columns>
+      <!-- column-name Keyword -->
+      <column type="gchararray"/>
+      <!-- column-name Added -->
+      <column type="gboolean"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" id="GNUNET_GTK_publication_metadata_liststore">
+    <columns>
+      <!-- column-name Type -->
+      <column type="gint"/>
+      <!-- column-name Format -->
+      <column type="gint"/>
+      <!-- column-name Type1 -->
+      <column type="gchararray"/>
+      <!-- column-name Value -->
+      <column type="gchararray"/>
+      <!-- column-name Description -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" 
id="GNUNET_GTK_publication_metadata_types_liststore">
+    <columns>
+      <!-- column-name Type -->
+      <column type="gint"/>
+      <!-- column-name Format -->
+      <column type="gint"/>
+      <!-- column-name Type1 -->
+      <column type="gchararray"/>
+      <!-- column-name Description -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" id="GNUNET_GTK_publication_types_liststore">
+    <columns>
+      <!-- column-name Type -->
+      <column type="gint"/>
+      <!-- column-name Type1 -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">-1</col>
+        <col id="1" translatable="yes">Generic</col>
+      </row>
+      <row>
+        <col id="0">1</col>
+        <col id="1" translatable="yes">Text</col>
+      </row>
+      <row>
+        <col id="0">2</col>
+        <col id="1" translatable="yes">Music</col>
+      </row>
+      <row>
+        <col id="0">3</col>
+        <col id="1" translatable="yes">Video</col>
+      </row>
+      <row>
+        <col id="0">4</col>
+        <col id="1" translatable="yes">Image</col>
+      </row>
+      <row>
+        <col id="0">5</col>
+        <col id="1" translatable="yes">Namespace</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkFileChooserDialog" 
id="GNUNET_GTK_publish_directory_dialog">
+    <property name="can_focus">False</property>
+    <property name="can_default">True</property>
+    <property name="events">GDK_FOCUS_CHANGE_MASK | 
GDK_STRUCTURE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="modal">True</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <property name="transient_for">GNUNET_GTK_main_window</property>
+    <property name="action">select-folder</property>
+    <property name="create_folders">False</property>
+    <property name="select_multiple">True</property>
+    <signal name="response" 
handler="GNUNET_GTK_publish_directory_dialog_response_cb" swapped="no"/>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area6">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_publish_dialog_cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_publish_directory_dialog_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkHBox" id="hbox6">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkCheckButton" 
id="GNUNET_GTK_publish_directory_dialog_do_index_checkbutton">
+                    <property name="label" translatable="yes">Index 
files</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">20</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <object class="GtkLabel" 
id="GNUNET_GTK_publish_directory_dialog_priority_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" 
translatable="yes">Priority:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="padding">13</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" 
id="GNUNET_GTK_publish_directory_dialog_priority_spin_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property 
name="secondary_icon_activatable">False</property>
+                    <property name="primary_icon_sensitive">True</property>
+                    <property name="secondary_icon_sensitive">True</property>
+                    <property name="adjustment">priority_adjustment</property>
+                    <property name="numeric">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="padding">20</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox7">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkLabel" 
id="GNUNET_GTK_publish_directory_dialog_expiration_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Expiration 
year:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">20</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" 
id="GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property 
name="secondary_icon_activatable">False</property>
+                    <property name="primary_icon_sensitive">True</property>
+                    <property name="secondary_icon_sensitive">True</property>
+                    <property 
name="adjustment">expiration_year_adjustment</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" 
id="GNUNET_GTK_publish_directory_dialog_anonymity_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" 
translatable="yes">Anonymity:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="padding">5</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" 
id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_alignment">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkComboBox" 
id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property 
name="model">main_window_search_anonymity_liststore</property>
+                        <property name="active">1</property>
+                        <child>
+                          <object class="GtkCellRendererText" 
id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renderer"/>
+                          <attributes>
+                            <attribute name="foreground">2</attribute>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                        <child>
+                          <object class="GtkCellRendererText" 
id="GNUNET_GTK_publish_directory_dialog_anonymity_combobox_renerer_level"/>
+                          <attributes>
+                            <attribute name="text">1</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget 
response="-6">GNUNET_GTK_publish_dialog_cancel_button</action-widget>
+      <action-widget 
response="-5">GNUNET_GTK_publish_directory_dialog_ok_button</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkFileChooserDialog" id="GNUNET_GTK_publish_file_dialog">
+    <property name="can_focus">False</property>
+    <property name="can_default">True</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Publish file...</property>
+    <property name="modal">True</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="type_hint">normal</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <property name="transient_for">GNUNET_GTK_main_window</property>
+    <property name="create_folders">False</property>
+    <property name="select_multiple">True</property>
+    <signal name="delete-event" handler="gtk_widget_hide_on_delete" 
swapped="no"/>
+    <signal name="response" 
handler="GNUNET_GTK_publish_file_dialog_response_cb" swapped="no"/>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox5">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_publish_file_dialog_cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_publish_file_dialog_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkHBox" id="hbox2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkCheckButton" 
id="GNUNET_GTK_publish_file_dialog_do_index_checkbutton">
+                    <property name="label" translatable="yes">Index 
file</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">20</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <object class="GtkLabel" 
id="GNUNET_GTK_publish_file_dialog_priority_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" 
translatable="yes">Priority:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="padding">13</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" 
id="GNUNET_GTK_publish_file_dialog_priority_spin_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property 
name="secondary_icon_activatable">False</property>
+                    <property name="primary_icon_sensitive">True</property>
+                    <property name="secondary_icon_sensitive">True</property>
+                    <property name="adjustment">priority_adjustment</property>
+                    <property name="numeric">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="padding">20</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkLabel" 
id="GNUNET_GTK_publish_file_dialog_expiration_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Expiration 
year:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">20</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" 
id="GNUNET_GTK_publish_file_dialog_expiration_year_spin_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property 
name="secondary_icon_activatable">False</property>
+                    <property name="primary_icon_sensitive">True</property>
+                    <property name="secondary_icon_sensitive">True</property>
+                    <property 
name="adjustment">expiration_year_adjustment</property>
+                    <property name="numeric">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" 
id="GNUNET_GTK_publish_file_dialog_anonymity_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" 
translatable="yes">Anonymity:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="padding">5</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" 
id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_alignment">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkComboBox" 
id="GNUNET_GTK_publish_file_dialog_anonymity_combobox">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property 
name="model">main_window_search_anonymity_liststore</property>
+                        <property name="active">1</property>
+                        <child>
+                          <object class="GtkCellRendererText" 
id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renderer"/>
+                          <attributes>
+                            <attribute name="foreground">2</attribute>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                        <child>
+                          <object class="GtkCellRendererText" 
id="GNUNET_GTK_publish_file_dialog_anonymity_combobox_renerer_level"/>
+                          <attributes>
+                            <attribute name="text">1</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget 
response="-6">GNUNET_GTK_publish_file_dialog_cancel_button</action-widget>
+      <action-widget 
response="-5">GNUNET_GTK_publish_file_dialog_ok_button</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkListStore" 
id="GNUNET_GTK_publish_file_dialog_expiration_list_store">
+    <columns>
+      <!-- column-name human_readable_time -->
+      <column type="gchararray"/>
+      <!-- column-name time_in_ms -->
+      <column type="guint64"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore">
+    <columns>
+      <!-- column-name namespace_name -->
+      <column type="gchararray"/>
+      <!-- column-name namespace_handle -->
+      <column type="gpointer"/>
+    </columns>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkDialog" id="GNUNET_GTK_select_pseudonym_dialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Select pseudonym...</property>
+    <property name="modal">True</property>
+    <property name="default_width">400</property>
+    <property name="default_height">300</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="type_hint">normal</property>
+    <signal name="realize" 
handler="GNUNET_GTK_select_pseudonym_dialog_realize_cb" swapped="no"/>
+    <signal name="response" 
handler="GNUNET_GTK_select_pseudonym_dialog_response_cb" swapped="no"/>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox3">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_select_pseudonym_cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_select_pseudonym_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" 
id="GNUNET_GTK_select_pseudonym_scrolledwindow">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hadjustment">adjustment3</property>
+            <property name="vadjustment">adjustment4</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkTreeView" 
id="GNUNET_GTK_select_pseudonym_tree_view">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property 
name="model">GNUNET_GTK_select_pseudonym_liststore</property>
+                <property name="hadjustment">adjustment3</property>
+                <property name="vadjustment">adjustment4</property>
+                <property name="search_column">0</property>
+                <child>
+                  <object class="GtkTreeViewColumn" 
id="GNUNET_GTK_select_pseudonym_tree_view_column">
+                    <property name="title" translatable="yes">Name</property>
+                    <property name="expand">True</property>
+                    <property name="clickable">True</property>
+                    <property name="reorderable">True</property>
+                    <property name="sort_indicator">True</property>
+                    <property name="sort_column_id">0</property>
+                    <child>
+                      <object class="GtkCellRendererText" 
id="GNUNET_GTK_select_pseudonym_name_renderer"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget 
response="-6">GNUNET_GTK_select_pseudonym_cancel_button</action-widget>
+      <action-widget 
response="-5">GNUNET_GTK_select_pseudonym_ok_button</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkImage" id="add_stock_image">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-add</property>
+  </object>
   <object class="GtkAdjustment" id="adjustment1">
     <property name="upper">100</property>
     <property name="step_increment">1</property>
@@ -886,86 +2802,51 @@
     <property name="page_increment">10</property>
     <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment3">
+  <object class="GtkAdjustment" id="adjustment5">
     <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment4">
+  <object class="GtkAdjustment" id="adjustment6">
     <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkImage" id="execute_stock_image">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="stock">gtk-execute</property>
+  <object class="GtkAdjustment" id="adjustment7">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
   </object>
-  <object class="GtkImage" id="execute_stock_image1">
+  <object class="GtkAdjustment" id="adjustment8">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkImage" id="down_stock_image">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="stock">gtk-execute</property>
+    <property name="stock">gtk-go-down</property>
   </object>
-  <object class="GtkImage" id="execute_stock_image2">
+  <object class="GtkImage" id="execute_stock_image">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="stock">gtk-execute</property>
   </object>
-  <object class="GtkImage" id="image1">
+  <object class="GtkImage" id="find_stock_image">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="stock">gtk-open</property>
-  </object>
-  <object class="GtkImage" id="image2">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="stock">gtk-go-up</property>
-  </object>
-  <object class="GtkImage" id="image3">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="stock">gtk-new</property>
-  </object>
-  <object class="GtkImage" id="image4">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
     <property name="stock">gtk-find</property>
   </object>
-  <object class="GtkImage" id="image5">
+  <object class="GtkImage" id="index_stock_image">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="stock">gtk-go-down</property>
-  </object>
-  <object class="GtkImage" id="image6">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
     <property name="stock">gtk-index</property>
   </object>
-  <object class="GtkImage" id="image7">
+  <object class="GtkImage" id="left_stock_image">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="stock">gtk-index</property>
+    <property name="stock">gtk-go-back</property>
   </object>
-  <object class="GtkImage" id="image8">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="stock">gtk-index</property>
-  </object>
-  <object class="GtkImage" id="image9">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="stock">gtk-index</property>
-  </object>
-  <object class="GtkSizeGroup" id="enties_and_comboboxes_sizegroup">
-    <property name="mode">vertical</property>
-    <widgets>
-      <widget name="main_window_search_entry"/>
-      <widget name="main_window_search_anonymity_combobox"/>
-      <widget name="main_window_search_mime_combobox"/>
-    </widgets>
-  </object>
   <object class="GtkListStore" id="main_window_search_anonymity_liststore">
     <columns>
       <!-- column-name Name -->
@@ -1067,6 +2948,7 @@
     <property name="can_focus">False</property>
     <property name="events">GDK_LEAVE_NOTIFY_MASK | 
GDK_STRUCTURE_MASK</property>
     <property name="resizable">False</property>
+    <property name="destroy_with_parent">True</property>
     <property name="type_hint">dropdown-menu</property>
     <property name="skip_taskbar_hint">True</property>
     <property name="skip_pager_hint">True</property>
@@ -1117,4 +2999,78 @@
       </object>
     </child>
   </object>
+  <object class="GtkImage" id="new_stock_imag">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-new</property>
+  </object>
+  <object class="GtkImage" id="new_stock_image">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-new</property>
+  </object>
+  <object class="GtkImage" id="open_stock_image">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-open</property>
+  </object>
+  <object class="GtkAdjustment" id="priority_adjustment">
+    <property name="upper">10000000</property>
+    <property name="value">1000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkImage" id="right_stock_image">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-go-forward</property>
+  </object>
+  <object class="GtkImage" id="up_stock_image">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-go-up</property>
+  </object>
+  <object class="GtkSizeGroup" 
id="edit_publication_options_input_widgets_sizegroup">
+    <widgets>
+      <widget name="GNUNET_GTK_edit_publication_anonymity_combobox_alignment"/>
+      <widget name="GNUNET_GTK_edit_publication_priority_spin_button"/>
+      <widget name="GNUNET_GTK_edit_publication_root_entry"/>
+      <widget name="GNUNET_GTK_edit_publication_expiration_year_spin_button"/>
+      <widget name="GNUNET_GTK_edit_publication_index_checkbutton"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="edit_publication_options_labels_sizegroup">
+    <widgets>
+      <widget name="GNUNET_GTK_edit_publication_anonymity_label"/>
+      <widget name="GNUNET_GTK_edit_publication_priority_label"/>
+      <widget name="GNUNET_GTK_edit_publication_root_label"/>
+      <widget name="GNUNET_GTK_edit_publication_expiration_label"/>
+      <widget name="GNUNET_GTK_edit_publication_index_label"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="enties_and_comboboxes_sizegroup">
+    <property name="mode">vertical</property>
+    <widgets>
+      <widget name="main_window_search_entry"/>
+      <widget name="main_window_search_anonymity_combobox"/>
+      <widget name="main_window_search_mime_combobox"/>
+    </widgets>
+  </object>
+  <object class="GtkAdjustment" id="expiration_year_adjustment">
+    <property name="upper">9999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup4">
+    <widgets>
+      <widget name="GNUNET_GTK_master_publish_dialog_cancel_button"/>
+      <widget name="GNUNET_GTK_master_publish_dialog_execute_button"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup5">
+    <widgets>
+      <widget name="GNUNET_GTK_edit_publication_confirm_button"/>
+      <widget name="GNUNET_GTK_edit_publication_cancel_button"/>
+    </widgets>
+  </object>
 </interface>

Modified: gnunet-gtk/contrib/gnunet_fs_gtk_open_directory_dialog.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_open_directory_dialog.glade        
2011-12-22 14:15:31 UTC (rev 18756)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_open_directory_dialog.glade        
2011-12-23 08:38:28 UTC (rev 18757)
@@ -4,30 +4,30 @@
   <!-- interface-naming-policy project-wide -->
   <object class="GtkFileFilter" id="gnunet_directory_filter"/>
   <object class="GtkFileChooserDialog" id="GNUNET_GTK_open_directory_dialog">
+    <property name="can_focus">False</property>
     <property name="can_default">True</property>
     <property name="border_width">5</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
+    <property name="create_folders">False</property>
     <property name="filter">gnunet_directory_filter</property>
-    <property name="create_folders">False</property>
+    <signal name="response" 
handler="GNUNET_GTK_open_directory_dialog_response_cb" swapped="no"/>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox3">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="spacing">2</property>
-        <child>
-          <placeholder/>
-        </child>
         <child internal-child="action_area">
           <object class="GtkHButtonBox" id="dialog-action_area4">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" 
id="GNUNET_GTK_open_directory_dialog_cancel_button">
                 <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -39,11 +39,11 @@
             <child>
               <object class="GtkButton" 
id="GNUNET_GTK_open_directory_dialog_ok_button">
                 <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -55,10 +55,14 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
     </child>
     <action-widgets>

Modified: gnunet-gtk/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade      
2011-12-22 14:15:31 UTC (rev 18756)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade      
2011-12-23 08:38:28 UTC (rev 18757)
@@ -2,28 +2,81 @@
 <interface>
   <requires lib="gtk+" version="2.20"/>
   <!-- interface-naming-policy project-wide -->
-  <object class="GtkAdjustment" id="adjustment2">
+  <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore">
+    <columns>
+      <!-- column-name namespace_name -->
+      <column type="gchararray"/>
+      <!-- column-name namespace_handle -->
+      <column type="gpointer"/>
+    </columns>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
     <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
     <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment1">
+  <object class="GtkAdjustment" id="adjustment2">
     <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
     <property name="page_size">10</property>
   </object>
   <object class="GtkDialog" id="GNUNET_GTK_select_pseudonym_dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Select pseudonym...</property>
     <property name="modal">True</property>
     <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
     <child internal-child="vbox">
       <object class="GtkVBox" id="GNUNET_GTK_select_pseudonym_dialog_vbox">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" 
id="GNUNET_GTK_select_pseudonym_dialog_action_area">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_select_pseudonym_cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" 
id="GNUNET_GTK_select_pseudonym_ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkScrolledWindow" 
id="GNUNET_GTK_select_pseudonym_scrolledwindow">
             <property name="visible">True</property>
@@ -59,54 +112,14 @@
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <placeholder/>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" 
id="GNUNET_GTK_select_pseudonym_dialog_action_area">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" 
id="GNUNET_GTK_select_pseudonym_cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" 
id="GNUNET_GTK_select_pseudonym_ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
@@ -114,12 +127,4 @@
       <action-widget 
response="-5">GNUNET_GTK_select_pseudonym_ok_button</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore">
-    <columns>
-      <!-- column-name namespace_name -->
-      <column type="gchararray"/>
-      <!-- column-name namespace_handle -->
-      <column type="gpointer"/>
-    </columns>
-  </object>
 </interface>

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-download.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-download.c  2011-12-22 14:15:31 UTC (rev 
18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-download.c  2011-12-23 08:38:28 UTC (rev 
18757)
@@ -203,7 +203,7 @@
   dlc->response = 0;
   dlc->dc = dc;
   g_object_set_data (G_OBJECT (ad), "dialog-context", dlc);
-  gtk_widget_show_all (ad);
+  gtk_window_present (GTK_WINDOW (ad));
 }
 
 /* end of gnunet-fs-gtk-download.c */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c       2011-12-22 
14:15:31 UTC (rev 18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c       2011-12-23 
08:38:28 UTC (rev 18757)
@@ -24,253 +24,249 @@
  */
 #include "gnunet-fs-gtk-common.h"
 #include "gnunet-fs-gtk-edit_publish_dialog.h"
+#include "gnunet-fs-gtk.h"
 #include <gnunet/gnunet_util_lib.h>
+#include <gdk/gdkkeysyms.h>
 
-/**
- * Builder for the current dialog.
- */
-static GtkBuilder *builder;
+#define PUBSTATE "edit-publication-state"
 
-/**
- * Are we editing metadata for a directory?
- */
-static int is_directory;
-
-/**
- * Set to YES if the preview was changed.
- */
-static int preview_changed;
-
-void
-GNUNET_GTK_edit_file_information_keyword_list_normalize_button_clicked_cb ()
+struct edit_publication_state
 {
-  GNUNET_break (0);
-}
+  int *do_index;
+  char **short_fn;
+  guint *anonymity_level;
+  guint *priority;
+  struct GNUNET_FS_FileInformation *fip;
+  gint preview_changed;
+  gboolean allow_no_keywords;
+  gboolean is_directory;
+  GNUNET_FS_GTK_edit_publish_dialog_cb cb;
+  gchar *root;
+  gpointer cls;
+};
 
-void
-GNUNET_GTK_edit_file_information_keyword_list_del_button_clicked_cb ()
-{
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkTreeModel *tm;
-  GtkTreeIter iter;
-
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_edit_file_information_keyword_list_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
-  {
-    GNUNET_break (0);
-    return;
-  }
-  gtk_list_store_remove (GTK_LIST_STORE (tm), &iter);
-}
-
-void
-GNUNET_GTK_edit_file_information_keyword_list_add_button_clicked_cb ()
-{
-  const char *keyword;
-  GtkEntry *entry;
-  GtkListStore *ls;
-  GtkTreeIter iter;
-
-  ls = GTK_LIST_STORE (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_keyword_list_store"));
-  entry =
-      GTK_ENTRY (gtk_builder_get_object
-                 (builder, "GNUNET_GTK_edit_file_information_keyword_entry"));
-  keyword = gtk_entry_get_text (entry);
-  if (strlen (keyword) > 0)
-    gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, keyword, -1);
-  gtk_entry_set_text (entry, "");
-}
-
-
-void
-GNUNET_GTK_edit_file_information_keyword_entry_changed_cb ()
-{
-  const char *keyword;
-  GtkEntry *entry;
-  GtkWidget *button;
-
-  button =
-      GTK_WIDGET (gtk_builder_get_object
-                  (builder,
-                   
"GNUNET_GTK_edit_file_information_keyword_list_add_button"));
-  entry =
-      GTK_ENTRY (gtk_builder_get_object
-                 (builder, "GNUNET_GTK_edit_file_information_keyword_entry"));
-  keyword = gtk_entry_get_text (entry);
-  gtk_widget_set_sensitive (button, (strlen (keyword) > 0) ? TRUE : FALSE);
-}
-
-
 static void
 metadata_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
 {
   GtkTreeView *tv;
   GtkTreeSelection *sel;
   GtkWidget *button;
+  GtkBuilder *builder;
 
+  builder = GTK_BUILDER (user_data);
+
   tv = GTK_TREE_VIEW (gtk_builder_get_object
                       (builder,
-                       "GNUNET_GTK_edit_file_information_metadata_tree_view"));
+                       "GNUNET_GTK_edit_publication_metadata_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   button =
       GTK_WIDGET (gtk_builder_get_object
                   (builder,
-                   "GNUNET_GTK_edit_file_information_metadata_delete_button"));
+                   "GNUNET_GTK_edit_publication_delete_button"));
   gtk_widget_set_sensitive (button,
                             gtk_tree_selection_get_selected (sel, NULL, NULL));
 }
 
-
 static void
-keyword_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
+keywords_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
 {
   GtkTreeView *tv;
   GtkTreeSelection *sel;
   GtkWidget *button;
+  GtkBuilder *builder;
 
+  builder = GTK_BUILDER (user_data);
+
+
   tv = GTK_TREE_VIEW (gtk_builder_get_object
                       (builder,
-                       
"GNUNET_GTK_edit_file_information_keyword_list_tree_view"));
+                       "GNUNET_GTK_edit_publication_keyword_list_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   button =
       GTK_WIDGET (gtk_builder_get_object
                   (builder,
-                   
"GNUNET_GTK_edit_file_information_keyword_list_del_button"));
+                   "GNUNET_GTK_edit_publication_keyword_list_del_button"));
 
   gtk_widget_set_sensitive (button,
                             gtk_tree_selection_get_selected (sel, NULL, NULL));
   button =
       GTK_WIDGET (gtk_builder_get_object
                   (builder,
-                   
"GNUNET_GTK_edit_file_information_keyword_list_normalize_button"));
+                   
"GNUNET_GTK_edit_publication_keyword_list_normalize_button"));
   gtk_widget_set_sensitive (button,
                             gtk_tree_selection_get_selected (sel, NULL, NULL));
 }
 
 
 void
-GNUNET_GTK_edit_file_information_metadata_value_entry_changed_cb ()
+GNUNET_GTK_edit_publication_window_realize_cb (GtkWidget *widget,
+    gpointer user_data)
 {
+  GtkBuilder *builder;
+  GtkListStore *metatypes_list;
+  GtkTreeIter iter;
   GtkTreeView *tv;
   GtkTreeSelection *sel;
-  const char *value;
-  GtkEntry *entry;
-  GtkWidget *button;
+  guint type;
+  guint max_type;
 
-  entry =
-      GTK_ENTRY (gtk_builder_get_object
-                 (builder,
-                  "GNUNET_GTK_edit_file_information_metadata_value_entry"));
-  value = gtk_entry_get_text (entry);
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_edit_file_information_metadata_type_tree_view"));
+  builder = GTK_BUILDER (user_data);
+  metatypes_list = GTK_LIST_STORE (gtk_builder_get_object (builder,
+      "GNUNET_GTK_publication_metadata_types_liststore"));
+
+  tv = GTK_TREE_VIEW (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_metadata_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
-  button =
-      GTK_WIDGET (gtk_builder_get_object
-                  (builder,
-                   "GNUNET_GTK_edit_file_information_metadata_add_button"));
-  gtk_widget_set_sensitive (button,
-                            (strlen (value) >
-                             0) ? gtk_tree_selection_get_selected (sel, NULL,
-                                                                   NULL) :
-                            FALSE);
+  g_signal_connect (G_OBJECT (sel), "changed",
+                    G_CALLBACK (metadata_selection_changed_cb), builder);
+
+  tv = GTK_TREE_VIEW (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_keyword_list_tree_view"));
+  sel = gtk_tree_view_get_selection (tv);
+  g_signal_connect (G_OBJECT (sel), "changed",
+                    G_CALLBACK (keywords_selection_changed_cb), builder);
+
+  max_type = EXTRACTOR_metatype_get_max ();
+  for (type = 1; type < max_type - 1; type++)
+    gtk_list_store_insert_with_values (metatypes_list, &iter, G_MAXINT,
+        0, type,
+        1, EXTRACTOR_METAFORMAT_UTF8,
+        2, EXTRACTOR_metatype_to_string (type),
+        3, EXTRACTOR_metatype_to_description (type), -1);
 }
 
-
 void
-GNUNET_GTK_edit_file_information_keyword_entry_activate_cb ()
+GNUNET_GTK_edit_publication_add_button_clicked_cb (GtkButton *button,
+    gpointer user_data)
 {
-  GNUNET_GTK_edit_file_information_keyword_list_add_button_clicked_cb ();
+  GtkBuilder *builder;
+  GtkTreeView *meta_tree;
+  GtkListStore *meta_list;
+  GtkTreeIter iter;
+
+  builder = GTK_BUILDER (user_data);
+  meta_tree = GTK_TREE_VIEW (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_metadata_tree_view"));
+  meta_list = GTK_LIST_STORE (gtk_tree_view_get_model (meta_tree));
+  
+  gtk_list_store_insert (meta_list, &iter, 0);  
+  /* type == -1 means "not set" */
+  gtk_list_store_set (meta_list, &iter, 0, -1, 1, EXTRACTOR_METAFORMAT_UTF8,
+      2, _("Select a type"), 3, _("Specify a value"), 4, NULL, -1);
 }
 
-
-void
-GNUNET_GTK_edit_file_information_metadata_preview_file_chooser_button_file_set_cb
-    (GtkFileChooserButton * widget, gpointer user_data)
+gboolean
+GNUNET_GTK_edit_publication_keyword_entry_key_press_event_cb (GtkWidget 
*widget,
+    GdkEventKey *event, gpointer user_data)
 {
-  gchar *fn;
-  GtkImage *image;
+  GtkBuilder *builder;
+  GtkButton *add_button;
+  builder = GTK_BUILDER (user_data);
 
-  fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
-  image =
-      GTK_IMAGE (gtk_builder_get_object
-                 (builder,
-                  "GNUNET_GTK_edit_file_information_metadata_preview_image"));
-  gtk_image_set_from_file (image, fn);
-  preview_changed = GNUNET_YES;
+  if (event->keyval == GDK_KEY_Return)
+  {
+    add_button = GTK_BUTTON (gtk_builder_get_object (builder,
+        "GNUNET_GTK_edit_publication_add_button"));
+    GNUNET_GTK_edit_publication_add_button_clicked_cb (add_button, user_data);
+    return TRUE;
+  }
+  return FALSE;
 }
 
-
 void
-GNUNET_GTK_edit_file_information_metadata_delete_button_clicked_cb ()
+GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb (
+    GtkCellRendererText *renderer, gchar *path, gchar *new_text,
+    gpointer user_data)
 {
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkTreeModel *tm;
+  GtkBuilder *builder;
+  GtkTreeView *meta_tree;
+  GtkListStore *meta_list;
+  GtkCellRendererCombo *combo;
+  GtkTreeModel *combo_model;
   GtkTreeIter iter;
+  gint type_id;
+  gchar *description = NULL;
+  GtkTreeIter *pass_data = NULL;
 
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       "GNUNET_GTK_edit_file_information_metadata_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
-  {
-    GNUNET_break (0);
+  builder = GTK_BUILDER (user_data);
+  meta_tree = GTK_TREE_VIEW (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_metadata_tree_view"));
+  meta_list = GTK_LIST_STORE (gtk_tree_view_get_model (meta_tree));
+  if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (meta_list), &iter, 
path))
     return;
-  }
-  gtk_list_store_remove (GTK_LIST_STORE (tm), &iter);
+
+  combo = GTK_CELL_RENDERER_COMBO (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer"));
+
+  pass_data = g_object_get_data (G_OBJECT (combo), "selected-type");
+  if (!pass_data)
+    return;
+  g_object_get (combo, "model", &combo_model, NULL);
+  gtk_tree_model_get (combo_model, pass_data, 0, &type_id, 2, &description, 
-1);
+  g_free (combo_model);
+  g_free (pass_data);
+  g_object_set_data (G_OBJECT (combo), "selected-type", NULL);
+
+  gtk_list_store_set (meta_list, &iter, 0, type_id, 1,
+      EXTRACTOR_METAFORMAT_UTF8, 2, new_text, 4, description, -1);
+  g_free (description);
 }
 
+void
+GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_changed_cb (
+    GtkCellRendererCombo *combo, gchar *path_string, GtkTreeIter *new_iter,
+    gpointer user_data)
+{
+  GtkTreeIter *pass_data;
 
+  pass_data = g_object_get_data (G_OBJECT (combo), "selected-type");
+  if (pass_data)
+    g_free (pass_data);
+  pass_data = g_new0 (GtkTreeIter, 1);
+  *pass_data = *new_iter;
+  g_object_set_data (G_OBJECT (combo), "selected-type", pass_data);
+}
+
 void
-GNUNET_GTK_edit_file_information_metadata_add_button_clicked_cb ()
+GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb (
+    GtkCellRendererText *renderer, gchar *path, gchar *new_text,
+    gpointer user_data)
 {
-  const char *value;
+  GtkBuilder *builder;
+  GtkTreeView *meta_tree;
+  GtkListStore *meta_list;
+  GtkTreeIter iter;
+  gint metatype;
   char *avalue;
   const char *ivalue;
-  GtkEntry *entry;
-  GtkListStore *ls;
-  GtkTreeModel *tm;
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkTreeIter iter;
-  guint type;
   size_t slen;
   char *pos;
 
-  entry =
-      GTK_ENTRY (gtk_builder_get_object
-                 (builder,
-                  "GNUNET_GTK_edit_file_information_metadata_value_entry"));
-  value = gtk_entry_get_text (entry);
-  if ((value == NULL) || (strlen (value) == 0))
-  {
-    GNUNET_break (0);
+  GObject *pubwindow;
+  struct edit_publication_state *state = NULL;
+
+  builder = GTK_BUILDER (user_data);
+  meta_tree = GTK_TREE_VIEW (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_metadata_tree_view"));
+  meta_list = GTK_LIST_STORE (gtk_tree_view_get_model (meta_tree));
+  if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (meta_list), &iter, 
path))
     return;
-  }
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_edit_file_information_metadata_type_tree_view"));
-  tm = gtk_tree_view_get_model (tv);
-  sel = gtk_tree_view_get_selection (tv);
-  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
+
+  pubwindow = gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window");
+  state = g_object_get_data (pubwindow, PUBSTATE);
+  if (!state)
   {
     GNUNET_break (0);
     return;
   }
-  gtk_tree_model_get (tm, &iter, 1, &type, -1);
-  ls = GTK_LIST_STORE (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_meta_data_list_store"));
-  if ((type == EXTRACTOR_METATYPE_FILENAME) &&
-      (value[strlen (value) - 1] != '/') && (is_directory))
+
+  gtk_tree_model_get (GTK_TREE_MODEL (meta_list), &iter, 0, &metatype, -1);
+  if (metatype == EXTRACTOR_METATYPE_FILENAME
+      && new_text[strlen (new_text) - 1] != '/'
+      && state->is_directory)
   {
-    GNUNET_asprintf (&avalue, "%s/", value);
+    GNUNET_asprintf (&avalue, "%s/", new_text);
     /* if user typed '\' instead of '/', change it! */
     slen = strlen (avalue);
     while ((slen > 1) && (avalue[slen - 2] == '\\'))
@@ -281,7 +277,7 @@
     }
     while (NULL != (pos = strstr (avalue, "\\")))
       *pos = '/';
-    /* remove '../' everywhere */
+    // remove '../' everywhere 
     while (NULL != (pos = strstr (avalue, "../")))
     {
       pos[0] = '_';
@@ -292,158 +288,260 @@
   }
   else
   {
-    ivalue = value;
+    ivalue = new_text;
     avalue = NULL;
   }
 
-  gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, type, 1,
-                                     (guint) EXTRACTOR_METAFORMAT_UTF8, 2,
-                                     EXTRACTOR_metatype_to_string (type), 3,
-                                     ivalue, -1);
+  gtk_list_store_set (meta_list, &iter, 3, ivalue, -1);
   GNUNET_free_non_null (avalue);
-  gtk_entry_set_text (GTK_ENTRY (entry), "");
 }
 
+void
+GNUNET_GTK_edit_publication_delete_button_clicked_cb (GtkButton *button,
+    gpointer user_data)
+{
+  GtkTreeView *tv;
+  GtkTreeSelection *sel;
+  GtkTreeModel *tm;
+  GtkTreeIter iter;
+  GtkBuilder *builder = GTK_BUILDER (user_data);
 
-/**
- * Add each of the keywords to the keyword list store.
- *
- * @param cls closure
- * @param keyword the keyword
- * @param is_mandatory is the keyword mandatory (in a search)
- * @return GNUNET_OK to continue to iterate
- */
-static int
-add_keyword (void *cls, const char *keyword, int is_mandatory)
+  tv = GTK_TREE_VIEW (gtk_builder_get_object
+                      (builder,
+                       "GNUNET_GTK_edit_publication_metadata_tree_view"));
+  sel = gtk_tree_view_get_selection (tv);
+  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
+  {
+    GNUNET_break (0);
+    return;
+  }
+  if (gtk_list_store_remove (GTK_LIST_STORE (tm), &iter))
+    gtk_tree_selection_select_iter (sel, &iter);
+}
+
+void
+GNUNET_GTK_edit_publication_keyword_list_add_button_clicked_cb (
+    GtkButton *button, gpointer user_data)
 {
+  const char *keyword;
+  GtkEntry *entry;
   GtkListStore *ls;
   GtkTreeIter iter;
+  GtkBuilder *builder;
+  GtkWidget *ok;
 
+  builder = GTK_BUILDER (user_data);
+
   ls = GTK_LIST_STORE (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_keyword_list_store"));
-  gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, keyword, -1);
-  return GNUNET_OK;
+                       (builder, "GNUNET_GTK_publication_keywords_liststore"));
+  entry =
+      GTK_ENTRY (gtk_builder_get_object
+                 (builder, "GNUNET_GTK_edit_publication_keyword_entry"));
+  keyword = gtk_entry_get_text (entry);
+  if (strlen (keyword) > 0)
+  {
+    gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, keyword, 1, 
TRUE, -1);
+    ok = GTK_WIDGET (gtk_builder_get_object (builder,
+        "GNUNET_GTK_edit_publication_confirm_button"));
+    gtk_widget_set_sensitive (ok, TRUE);
+  }
+  gtk_entry_set_text (entry, "");
 }
 
+gboolean
+gtk_tree_model_get_item_count_cb (GtkTreeModel *model, GtkTreePath *path,
+    GtkTreeIter *iter, gpointer data)
+{
+  gint *counter = (gint *) data;
+  *counter += 1;
+  return FALSE;
+}
 
-/**
- * Add the given meta data to the model (or make it the preview
- * image if it is an image).
- *
- * @param cls closure, NULL
- * @param plugin_name name of the plugin that produced this value;
- *        special values can be used (i.e. '<zlib>' for zlib being
- *        used in the main libextractor library and yielding
- *        meta data).
- * @param type libextractor-type describing the meta data
- * @param format basic format information about data
- * @param data_mime_type mime-type of data (not of the original file);
- *        can be NULL (if mime-type is not known)
- * @param data actual meta-data found
- * @param data_len number of bytes in data
- * @return 0 to continue extracting
- */
-static int
-add_meta_item (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType 
type,
-               enum EXTRACTOR_MetaFormat format, const char *data_mime_type,
-               const char *data, size_t data_len)
+void
+GNUNET_GTK_edit_publication_keyword_entry_changed_cb (GtkEditable *editable,
+    gpointer user_data)
 {
-  GtkListStore *ls;
+  const char *keyword;
+  GtkEntry *entry;
+  GtkWidget *button;
+  GtkBuilder *builder;
+
+  builder = GTK_BUILDER (user_data);
+
+  button =
+      GTK_WIDGET (gtk_builder_get_object
+                  (builder,
+                   "GNUNET_GTK_edit_publication_keyword_list_add_button"));
+  entry =
+      GTK_ENTRY (gtk_builder_get_object
+                 (builder, "GNUNET_GTK_edit_publication_keyword_entry"));
+  keyword = gtk_entry_get_text (entry);
+  gtk_widget_set_sensitive (button, (strlen (keyword) > 0) ? TRUE : FALSE);
+}
+
+
+gint
+gtk_tree_model_get_item_count (GtkTreeModel *model)
+{
+  gint c = 0;
+  gtk_tree_model_foreach (model, &gtk_tree_model_get_item_count_cb, &c);
+  return c;
+}
+
+gboolean
+gtk_tree_model_has_items_cb (GtkTreeModel *model, GtkTreePath *path,
+    GtkTreeIter *iter, gpointer data)
+{
+  gboolean *val = (gboolean *) data;
+  *val = TRUE;
+  return TRUE;
+}
+
+gboolean
+gtk_tree_model_has_items (GtkTreeModel *model)
+{
+  gboolean b = FALSE;
+  gtk_tree_model_foreach (model, &gtk_tree_model_has_items_cb, &b);
+  return b;
+}
+
+void
+GNUNET_GTK_edit_publication_keyword_list_del_button_clicked_cb (
+    GtkButton *button, gpointer user_data)
+{
+  GtkTreeView *tv;
+  GtkTreeSelection *sel;
+  GtkTreeModel *tm;
   GtkTreeIter iter;
+  GtkBuilder *builder;
+  GtkWidget *ok;
+  GObject *pubwindow;
+  struct edit_publication_state *state = NULL;
+  builder = GTK_BUILDER (user_data);
 
-  switch (format)
+  tv = GTK_TREE_VIEW (gtk_builder_get_object
+                      (builder,
+                       "GNUNET_GTK_edit_publication_keyword_list_tree_view"));
+
+  sel = gtk_tree_view_get_selection (tv);
+  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
   {
-  case EXTRACTOR_METAFORMAT_UTF8:
-  case EXTRACTOR_METAFORMAT_C_STRING:
-    ls = GTK_LIST_STORE (gtk_builder_get_object
-                         (builder, "GNUNET_GTK_meta_data_list_store"));
-    gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, (guint) type, 1,
-                                       (guint) format, 2,
-                                       EXTRACTOR_metatype_to_string (type), 3,
-                                       data, -1);
-    break;
-  case EXTRACTOR_METAFORMAT_UNKNOWN:
-    break;
-  case EXTRACTOR_METAFORMAT_BINARY:
-    break;
-  default:
     GNUNET_break (0);
+    return;
   }
-  return 0;
+  if (gtk_list_store_remove (GTK_LIST_STORE (tm), &iter))
+    gtk_tree_selection_select_iter (sel, &iter);
+
+  ok = GTK_WIDGET (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_confirm_button"));
+
+  pubwindow = gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window");
+  state = g_object_get_data (pubwindow, PUBSTATE);
+  if (!state)
+  {
+    GNUNET_break (0);
+    return;
+  }
+
+  if (!state->allow_no_keywords && !gtk_tree_model_has_items (tm))
+    gtk_widget_set_sensitive (ok, FALSE);
 }
 
+void
+GNUNET_GTK_edit_publication_keyword_list_normalize_button_clicked_cb (
+    GtkButton *button, gpointer user_data)
+{
+  GtkTreeView *tv;
+  GtkTreeSelection *sel;
+  GtkTreeModel *tm;
+  GtkTreeIter iter, inserted;
+  gchar *value;
+  struct GNUNET_FS_Uri *uri;
+  struct GNUNET_FS_Uri *nuri;
+  char *nvalue;
+  char *emsg;
+  GtkBuilder *builder;
+  builder = GTK_BUILDER (user_data);
 
-/**
- * Function called to extract the information from FI.
- *
- * @param cls closure
- * @param fi the entry in the publish-structure
- * @param length length of the file or directory
- * @param meta metadata for the file or directory (can be modified)
- * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
- * @param bo block options
- * @param do_index should we index (can be modified)
- * @param client_info pointer to client context set upon creation (can be 
modified)
- * @return GNUNET_SYSERR (aborts after first call)
- */
-static int
-file_information_extract (void *cls, struct GNUNET_FS_FileInformation *fi,
-                          uint64_t length,
-                          struct GNUNET_CONTAINER_MetaData *meta,
-                          struct GNUNET_FS_Uri **uri,
-                          struct GNUNET_FS_BlockOptions *bo, int *do_index,
-                          void **client_info)
+  tv = GTK_TREE_VIEW (gtk_builder_get_object
+                      (builder,
+                       "GNUNET_GTK_edit_publication_keyword_list_tree_view"));
+  sel = gtk_tree_view_get_selection (tv);
+  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
+    return;
+  gtk_tree_model_get (tm, &iter, 0, &value, -1);
+  emsg = NULL;
+  uri = GNUNET_FS_uri_ksk_create (value, &emsg);
+  if (uri == NULL)
+  {
+    GNUNET_break (0);
+    GNUNET_free (emsg);
+    g_free (value);
+    return;
+  }
+  nuri = GNUNET_FS_uri_ksk_canonicalize (uri);
+  nvalue = GNUNET_FS_uri_ksk_to_string_fancy (nuri);
+
+  if (strcmp (value, nvalue) != 0)
+  {
+    gtk_list_store_insert_after (GTK_LIST_STORE (tm), &inserted, &iter);
+    gtk_list_store_set (GTK_LIST_STORE (tm), &inserted, 0, nvalue, -1);
+  }
+  GNUNET_FS_uri_destroy (nuri);
+  GNUNET_FS_uri_destroy (uri);
+  GNUNET_free (nvalue);
+  g_free (value);
+}
+
+void
+GNUNET_GTK_edit_publication_normalization_checkbox_toggled_cb (
+    GtkToggleButton *button, gpointer user_data)
 {
-  GtkImage *img;
-  GdkPixbuf *pixbuf;
-  struct tm *t;
-  int year;
-  time_t tp;
+  GtkBuilder *builder;
+  GtkToggleButton *norm_button;
+  builder = GTK_BUILDER (user_data);
+  norm_button = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_keyword_list_normalize_button"));
+  gtk_widget_set_sensitive (GTK_WIDGET (norm_button),
+      !gtk_toggle_button_get_active (norm_button));
+}
 
-  if (NULL != *uri)
-    GNUNET_FS_uri_ksk_get_keywords (*uri, &add_keyword, NULL);
-  if (NULL != meta)
+void
+GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button_file_set_cb (
+    GtkFileChooserButton *widget, gpointer user_data)
+{
+  gchar *fn;
+  GtkImage *image;
+  GObject *pubwindow;
+  GtkBuilder *builder = GTK_BUILDER (user_data);
+  struct edit_publication_state *state = NULL;
+
+  pubwindow = gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window");
+  state = g_object_get_data (pubwindow, PUBSTATE);
+  if (!state)
   {
-    GNUNET_CONTAINER_meta_data_iterate (meta, &add_meta_item, NULL);
-    pixbuf = GNUNET_FS_GTK_get_thumbnail_from_meta_data (meta);
-    if (pixbuf != NULL)
-    {
-      img =
-          GTK_IMAGE (gtk_builder_get_object
-                     (builder,
-                      
"GNUNET_GTK_edit_file_information_metadata_preview_image"));
-      gtk_image_set_from_pixbuf (img, pixbuf);
-    }
+    GNUNET_break (0);
+    return;
   }
-  tp = bo->expiration_time.abs_value / 1000;    /* ms to seconds */
-  t = gmtime (&tp);
-  if (t == NULL)
-    year = 0;
-  else
-    year = t->tm_year + 1900;
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON
-                             (gtk_builder_get_object
-                              (builder,
-                               
"GNUNET_GTK_edit_file_information_expiration_year_spin_button")),
-                             year);
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON
-                             (gtk_builder_get_object
-                              (builder,
-                               
"GNUNET_GTK_edit_file_information_anonymity_spin_button")),
-                             bo->anonymity_level);
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON
-                             (gtk_builder_get_object
-                              (builder,
-                               
"GNUNET_GTK_edit_file_information_priority_spin_button")),
-                             bo->content_priority);
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
-                                (gtk_builder_get_object
-                                 (builder,
-                                  
"GNUNET_GTK_edit_file_information_index_check_button")),
-                                *do_index);
-  return GNUNET_SYSERR;         /* only visit top-level item */
+
+  fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+  image =
+      GTK_IMAGE (gtk_builder_get_object
+                 (builder,
+                  "GNUNET_GTK_edit_publication_metadata_preview_image"));
+  gtk_image_set_from_file (image, fn);
+  state->preview_changed = GNUNET_YES;
 }
 
+struct fiu_context
+{
+  GtkBuilder *builder;
+  char **short_fn;
+  gchar *root;
+  struct GNUNET_CONTAINER_MetaData *md;
+};
 
 /**
  * Copy binary meta data from to the new container and also
@@ -469,7 +567,9 @@
                      const char *data_mime_type, const char *data,
                      size_t data_len)
 {
-  struct GNUNET_CONTAINER_MetaData *md = cls;
+  struct fiu_context *context = (struct fiu_context *) cls;
+  GtkBuilder *builder = context->builder;
+  struct GNUNET_CONTAINER_MetaData *md = context->md;
   GtkTreeModel *tm;
   GtkTreeIter iter;
   gchar *value;
@@ -477,13 +577,25 @@
   guint nformat;
   int keep;
 
+  GObject *pubwindow;
+  struct edit_publication_state *state = NULL;
+
+  pubwindow = gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window");
+  state = g_object_get_data (pubwindow, PUBSTATE);
+  if (!state)
+  {
+    GNUNET_break (0);
+    return 0;
+  }
+
   keep = GNUNET_NO;
   switch (format)
   {
   case EXTRACTOR_METAFORMAT_UTF8:
   case EXTRACTOR_METAFORMAT_C_STRING:
     tm = GTK_TREE_MODEL (gtk_builder_get_object
-                         (builder, "GNUNET_GTK_meta_data_list_store"));
+                         (builder, 
"GNUNET_GTK_publication_metadata_liststore"));
     if (TRUE == gtk_tree_model_get_iter_first (tm, &iter))
     {
       do
@@ -505,7 +617,7 @@
   case EXTRACTOR_METAFORMAT_UNKNOWN:
     break;
   case EXTRACTOR_METAFORMAT_BINARY:
-    if (preview_changed == GNUNET_NO)
+    if (state->preview_changed == GNUNET_NO)
       keep = GNUNET_YES;
     break;
   default:
@@ -542,7 +654,9 @@
                          struct GNUNET_FS_BlockOptions *bo, int *do_index,
                          void **client_info)
 {
-  char **short_fn = cls;
+  struct fiu_context *context = (struct fiu_context *) cls;
+  char **short_fn = context->short_fn;
+  GtkBuilder *builder = context->builder;
   struct GNUNET_CONTAINER_MetaData *nm;
   GtkTreeModel *tm;
   GtkTreeIter iter;
@@ -558,26 +672,49 @@
   const char *mime;
   GFile *f;
   GFileInfo *finfo;
+  gboolean auto_normalize = FALSE;
 
-  bo->anonymity_level =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_edit_file_information_anonymity_spin_button")));
+  GObject *pubwindow;
+  struct edit_publication_state *state = NULL;
+
+  pubwindow = gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window");
+  state = g_object_get_data (pubwindow, PUBSTATE);
+  if (!state)
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+
+  if (!GNUNET_GTK_get_selected_anonymity_level (builder,
+      "GNUNET_GTK_edit_publication_anonymity_combobox", &bo->anonymity_level))
+    return GNUNET_SYSERR;
   bo->content_priority =
       gtk_spin_button_get_value (GTK_SPIN_BUTTON
                                  (gtk_builder_get_object
                                   (builder,
-                                   
"GNUNET_GTK_edit_file_information_priority_spin_button")));
+                                   
"GNUNET_GTK_edit_publication_priority_spin_button")));
   *do_index =
       gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
                                     (gtk_builder_get_object
                                      (builder,
-                                      
"GNUNET_GTK_edit_file_information_index_check_button")));
+                                      
"GNUNET_GTK_edit_publication_index_checkbutton")));
+  auto_normalize = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                    (gtk_builder_get_object
+                                     (builder,
+                                      
"GNUNET_GTK_edit_publication_normalization_checkbox")));
   sb = GTK_SPIN_BUTTON (gtk_builder_get_object
                         (builder,
-                         
"GNUNET_GTK_edit_file_information_expiration_year_spin_button"));
+                         
"GNUNET_GTK_edit_publication_expiration_year_spin_button"));
   bo->expiration_time = GNUNET_FS_GTK_get_expiration_time (sb);
+
+  g_free (context->root);
+  context->root =
+      g_strdup (gtk_entry_get_text (GTK_ENTRY
+                          (gtk_builder_get_object
+                           (builder,
+                            "GNUNET_GTK_edit_publication_root_entry"))));
+
   /* update URI */
   if (NULL != (*uri))
     GNUNET_FS_uri_destroy (*uri);
@@ -586,7 +723,7 @@
   mrg = NULL;
 
   tm = GTK_TREE_MODEL (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_keyword_list_store"));
+                       (builder, "GNUNET_GTK_publication_keywords_liststore"));
   if (TRUE == gtk_tree_model_get_iter_first (tm, &iter))
   {
     do
@@ -598,6 +735,24 @@
       if (NULL != *uri)
         GNUNET_FS_uri_destroy (*uri);
       *uri = mrg;
+      if (auto_normalize)
+      {
+        char *emsg = NULL;
+        struct GNUNET_FS_Uri *nuri;
+
+        nuri = GNUNET_FS_uri_ksk_create (value, &emsg);
+        if (nuri == NULL)
+          GNUNET_free_non_null (emsg);
+        else
+        {
+          nxt = GNUNET_FS_uri_ksk_canonicalize (nuri);
+          mrg = GNUNET_FS_uri_ksk_merge (nxt, *uri);
+          GNUNET_FS_uri_destroy (nxt);
+          if (NULL != *uri)
+            GNUNET_FS_uri_destroy (*uri);
+          *uri = mrg;
+        }
+      }
       g_free (value);
     }
     while (TRUE == gtk_tree_model_iter_next (tm, &iter));
@@ -605,30 +760,31 @@
 
   /* update meta */
   nm = GNUNET_CONTAINER_meta_data_create ();
-  GNUNET_CONTAINER_meta_data_iterate (meta, &preserve_meta_items, nm);
+  context->md = nm;
+  GNUNET_CONTAINER_meta_data_iterate (meta, &preserve_meta_items, context);
 
   GNUNET_CONTAINER_meta_data_clear (meta);
   tm = GTK_TREE_MODEL (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_meta_data_list_store"));
+                       (builder, "GNUNET_GTK_publication_metadata_liststore"));
   if (TRUE == gtk_tree_model_get_iter_first (tm, &iter))
   {
     do
     {
       gtk_tree_model_get (tm, &iter, 0, &ntype, 1, &nformat, 3, &value, -1);
-      GNUNET_CONTAINER_meta_data_insert (nm, "<user>", ntype, nformat,
-                                         "text/plain", value,
-                                         strlen (value) + 1);
+      if (ntype >= 0)
+        GNUNET_CONTAINER_meta_data_insert (nm, "<user>", ntype, nformat,
+            "text/plain", value, strlen (value) + 1);
       g_free (value);
     }
     while (TRUE == gtk_tree_model_iter_next (tm, &iter));
   }
   GNUNET_CONTAINER_meta_data_merge (meta, nm);
-  if (preview_changed == GNUNET_YES)
+  if (state->preview_changed == GNUNET_YES)
   {
     fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER
                                         (gtk_builder_get_object
                                          (builder,
-                                          
"GNUNET_GTK_edit_file_information_metadata_preview_file_chooser_button")));
+                                          
"GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button")));
     f = g_file_new_for_path (fn);
     finfo =
         g_file_query_info (f, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, 0, NULL,
@@ -663,32 +819,190 @@
   return GNUNET_SYSERR;         /* only visit top-level item */
 }
 
+void
+GNUNET_GTK_edit_publication_cancel_button_clicked_cb (
+    GtkButton *button, gpointer user_data)
+{
+  GtkBuilder *builder;
+  GObject *pubwindow;
+  struct edit_publication_state *state = NULL;
 
+  builder = GTK_BUILDER (user_data);
+
+  pubwindow = gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window");
+  state = g_object_get_data (pubwindow, PUBSTATE);
+  if (!state)
+  {
+    GNUNET_break (0);
+    return;
+  }
+
+  state->cb (state->cls, state->do_index, state->short_fn,
+      state->anonymity_level, state->priority, NULL, state->fip, 
GTK_RESPONSE_CANCEL);
+  g_free (state);
+  g_object_set_data (pubwindow, PUBSTATE, NULL);
+  gtk_widget_hide (GTK_WIDGET (pubwindow));
+}
+
+void
+GNUNET_GTK_edit_publication_confirm_button_clicked_cb (
+    GtkButton *button, gpointer user_data)
+{
+  GtkBuilder *builder;
+  GObject *pubwindow;
+  struct edit_publication_state *state = NULL;
+  struct fiu_context ctx;
+
+  builder = GTK_BUILDER (user_data);
+
+  pubwindow = gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window");
+  state = g_object_get_data (pubwindow, PUBSTATE);
+  if (!state)
+  {
+    GNUNET_break (0);
+    return;
+  }
+
+  ctx.builder = builder;
+  ctx.short_fn = state->short_fn;
+  ctx.root = NULL;
+  ctx.md = NULL;
+
+  GNUNET_FS_file_information_inspect (state->fip, &file_information_update, 
&ctx);
+  if (!GNUNET_GTK_get_selected_anonymity_level (builder,
+      "GNUNET_GTK_edit_publication_anonymity_combobox", 
state->anonymity_level))
+  *state->priority =
+      gtk_spin_button_get_value (GTK_SPIN_BUTTON
+                                 (gtk_builder_get_object
+                                  (builder,
+                                   
"GNUNET_GTK_edit_publication_priority_spin_button")));
+  *state->do_index =
+      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                    (gtk_builder_get_object
+                                     (builder,
+                                      
"GNUNET_GTK_edit_publication_index_checkbutton")));
+
+
+  state->cb (state->cls, state->do_index, state->short_fn,
+      state->anonymity_level, state->priority, ctx.root, state->fip,
+      GTK_RESPONSE_OK);
+  g_free (state);
+  g_object_set_data (pubwindow, PUBSTATE, NULL);
+  gtk_widget_hide (GTK_WIDGET (pubwindow));
+}
+
 /**
- * Open the dialog to edit file information data.
+ * Add each of the keywords to the keyword list store.
+ *
+ * @param cls closure
+ * @param keyword the keyword
+ * @param is_mandatory is the keyword mandatory (in a search)
+ * @return GNUNET_OK to continue to iterate
  */
-void
-GNUNET_FS_GTK_edit_publish_dialog (int *do_index, char **short_fn,
-                                   guint * anonymity_level, guint * priority,
-                                   struct GNUNET_FS_FileInformation *fip)
+static int
+add_keyword (void *cls, const char *keyword, int is_mandatory)
 {
-  GtkWidget *ad;
   GtkListStore *ls;
   GtkTreeIter iter;
-  guint type;
-  guint max_type;
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
 
-  GNUNET_assert (builder == NULL);
-  builder =
-      GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_edit_dialog.glade");
-  if (builder == NULL)
+  ls = GTK_LIST_STORE (cls);
+  gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, keyword, 1, 
FALSE, -1);
+  return GNUNET_OK;
+}
+
+/**
+ * Function called to extract the information from FI.
+ *
+ * @param cls closure
+ * @param fi the entry in the publish-structure
+ * @param length length of the file or directory
+ * @param meta metadata for the file or directory (can be modified)
+ * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
+ * @param bo block options
+ * @param do_index should we index (can be modified)
+ * @param client_info pointer to client context set upon creation (can be 
modified)
+ * @return GNUNET_SYSERR (aborts after first call)
+ */
+static int
+file_information_extract (void *cls, struct GNUNET_FS_FileInformation *fi,
+                          uint64_t length,
+                          struct GNUNET_CONTAINER_MetaData *meta,
+                          struct GNUNET_FS_Uri **uri,
+                          struct GNUNET_FS_BlockOptions *bo, int *do_index,
+                          void **client_info)
+{
+  GtkBuilder *builder = GTK_BUILDER (cls);
+  GtkImage *img;
+  GdkPixbuf *pixbuf;
+  struct tm *t;
+  int year;
+  time_t tp;
+  GtkListStore *ls;
+
+  ls = GTK_LIST_STORE (gtk_builder_get_object
+                       (builder, "GNUNET_GTK_publication_keywords_liststore"));
+
+  if (NULL != *uri)
+    GNUNET_FS_uri_ksk_get_keywords (*uri, &add_keyword, ls);
+  if (NULL != meta)
   {
-    GNUNET_break (0);
-    return;
+    ls = GTK_LIST_STORE (gtk_builder_get_object (builder,
+        "GNUNET_GTK_publication_metadata_liststore"));
+    GNUNET_CONTAINER_meta_data_iterate (meta, 
&GNUNET_FS_GTK_add_meta_data_to_list_store, ls);
+    pixbuf = GNUNET_FS_GTK_get_thumbnail_from_meta_data (meta);
+    if (pixbuf != NULL)
+    {
+      img =
+          GTK_IMAGE (gtk_builder_get_object
+                     (builder,
+                      "GNUNET_GTK_publication_metadata_preview_image"));
+      gtk_image_set_from_pixbuf (img, pixbuf);
+    }
   }
-  preview_changed = GNUNET_NO;
+  tp = bo->expiration_time.abs_value / 1000;    /* ms to seconds */
+  t = gmtime (&tp);
+  if (t == NULL)
+    year = 0;
+  else
+    year = t->tm_year + 1900;
+  gtk_spin_button_set_value (GTK_SPIN_BUTTON
+                             (gtk_builder_get_object
+                              (builder,
+                               
"GNUNET_GTK_edit_publication_expiration_year_spin_button")),
+                             year);
+  GNUNET_GTK_select_anonymity_level (builder,
+      "GNUNET_GTK_edit_publication_anonymity_combobox", bo->anonymity_level);
+  gtk_spin_button_set_value (GTK_SPIN_BUTTON
+                             (gtk_builder_get_object
+                              (builder,
+                               
"GNUNET_GTK_edit_publication_priority_spin_button")),
+                             bo->content_priority);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+                                (gtk_builder_get_object
+                                 (builder,
+                                  
"GNUNET_GTK_edit_publication_index_checkbutton")),
+                                *do_index);
+  return GNUNET_SYSERR;         /* only visit top-level item */
+}
+
+
+/**
+ * Open the dialog to edit file information data.
+ */
+void
+GNUNET_FS_GTK_edit_publish_dialog (GtkBuilder *builder, GtkWindow *parent, int 
*do_index,
+    char **short_fn, guint *anonymity_level, guint *priority,
+    struct GNUNET_FS_FileInformation *fip, gboolean allow_no_keywords,
+    GNUNET_FS_GTK_edit_publish_dialog_cb cb, gpointer cls)
+{
+  GtkWidget *dialog;
+  GObject *pubwindow;
+  GtkEntry *entry;
+  GtkWidget *ok;
+  struct edit_publication_state *state;
+
   GNUNET_FS_GTK_setup_expiration_year_adjustment (builder);
   if (GNUNET_FS_file_information_is_directory (fip))
   {
@@ -696,80 +1010,60 @@
     gtk_widget_hide (GTK_WIDGET
                      (gtk_builder_get_object
                       (builder,
-                       
"GNUNET_GTK_edit_file_information_index_check_button")));
+                       "GNUNET_GTK_edit_publication_index_checkbutton")));
     gtk_widget_hide (GTK_WIDGET
                      (gtk_builder_get_object
                       (builder,
-                       "GNUNET_GTK_edit_file_information_index_label")));
-
+                       "GNUNET_GTK_edit_publication_index_label")));
   }
-
-  ad = GTK_WIDGET (gtk_builder_get_object
-                   (builder, "GNUNET_GTK_edit_file_information_dialog"));
-  ls = GTK_LIST_STORE (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_metatype_list_store"));
-  max_type = EXTRACTOR_metatype_get_max ();
-  type = 1;
-  while (type < max_type - 1)
+  if (allow_no_keywords)
   {
-    gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0,
-                                       EXTRACTOR_metatype_to_string (type), 1,
-                                       type, 2,
-                                       EXTRACTOR_metatype_to_description 
(type),
-                                       -1);
-    type++;
+    gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder,
+        "GNUNET_GTK_edit_publication_root_entry")));
+    gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder,
+        "GNUNET_GTK_edit_publication_root_label")));
   }
+  gtk_list_store_clear (GTK_LIST_STORE (gtk_builder_get_object (
+      builder, "GNUNET_GTK_publication_keywords_liststore")));
+  gtk_list_store_clear (GTK_LIST_STORE (gtk_builder_get_object (
+      builder, "GNUNET_GTK_publication_metadata_liststore")));
 
-  GNUNET_FS_file_information_inspect (fip, &file_information_extract, NULL);
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_edit_file_information_metadata_type_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK
-                    
(GNUNET_GTK_edit_file_information_metadata_value_entry_changed_cb),
-                    NULL);
+  GNUNET_FS_file_information_inspect (fip, &file_information_extract, builder);
 
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       "GNUNET_GTK_edit_file_information_metadata_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK (metadata_selection_changed_cb), NULL);
+  dialog = GTK_WIDGET (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window"));
 
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_edit_file_information_keyword_list_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK (keyword_selection_changed_cb), NULL);
-  gtk_window_set_title (GTK_WINDOW (ad), *short_fn);
-  if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad)))
-  {
-    gtk_widget_destroy (ad);
-    g_object_unref (G_OBJECT (builder));
-    builder = NULL;
-    return;
-  }
-  GNUNET_FS_file_information_inspect (fip, &file_information_update, short_fn);
-  *anonymity_level =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_edit_file_information_anonymity_spin_button")));
-  *priority =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_edit_file_information_priority_spin_button")));
-  *do_index =
-      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
-                                    (gtk_builder_get_object
-                                     (builder,
-                                      
"GNUNET_GTK_edit_file_information_index_check_button")));
-  gtk_widget_destroy (ad);
-  g_object_unref (G_OBJECT (builder));
-  builder = NULL;
+  gtk_window_set_title (GTK_WINDOW (dialog), *short_fn);
+
+  state = g_new0 (struct edit_publication_state, 1);
+  state->do_index = do_index;
+  state->short_fn = short_fn;
+  state->root = NULL;
+  state->anonymity_level = anonymity_level;
+  state->priority = priority;
+  state->fip = fip;
+  state->preview_changed = GNUNET_NO;
+  state->allow_no_keywords = allow_no_keywords;
+  state->is_directory = GNUNET_FS_file_information_is_directory (fip);
+  state->cb = cb;
+  state->cls = cls;
+
+  entry =
+      GTK_ENTRY (gtk_builder_get_object
+                 (builder, "GNUNET_GTK_edit_publication_keyword_entry"));
+  gtk_entry_set_text (entry, "");
+
+  pubwindow = gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_window");
+  g_object_set_data (pubwindow, PUBSTATE, state);
+
+  ok = GTK_WIDGET (gtk_builder_get_object (builder,
+      "GNUNET_GTK_edit_publication_confirm_button"));
+  gtk_widget_set_sensitive (ok, allow_no_keywords ? TRUE : FALSE);
+
+  gtk_window_set_transient_for (GTK_WINDOW (pubwindow), parent);
+
+  gtk_window_present (GTK_WINDOW (dialog));
 }
 
 /* end of gnunet-fs-gtk-edit_publish_dialog.c */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.h       2011-12-22 
14:15:31 UTC (rev 18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.h       2011-12-23 
08:38:28 UTC (rev 18757)
@@ -30,10 +30,20 @@
 #include <gnunet/gnunet_fs_service.h>
 
 
+typedef void
+(*GNUNET_FS_GTK_edit_publish_dialog_cb) (gpointer cls, int *do_index, char 
**short_fn,
+                                   guint * anonymity_level, guint * priority, 
gchar *root,
+                                   struct GNUNET_FS_FileInformation *fip, gint 
ret);
+
+
+/**
+ * Open the dialog to edit file information data.
+ */
 void
-GNUNET_FS_GTK_edit_publish_dialog (int *do_index, char **short_fn,
-                                   guint * anonymity_level, guint * priority,
-                                   struct GNUNET_FS_FileInformation *fip);
+GNUNET_FS_GTK_edit_publish_dialog (GtkBuilder *builder, GtkWindow *parent, int 
*do_index,
+    char **short_fn, guint * anonymity_level, guint * priority,
+    struct GNUNET_FS_FileInformation *fip, gboolean allow_no_keywords,
+    GNUNET_FS_GTK_edit_publish_dialog_cb cb, gpointer cls);
 
 #endif
 /* end of gnunet-fs-gtk-edit_publish_dialog.h */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c 2011-12-22 
14:15:31 UTC (rev 18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c 2011-12-23 
08:38:28 UTC (rev 18757)
@@ -24,345 +24,9 @@
  */
 #include "gnunet-fs-gtk-common.h"
 #include "gnunet-fs-gtk.h"
+#include "gnunet-fs-gtk-edit_publish_dialog.h"
 
-static GtkBuilder *builder;
-
-
 /**
- * Canonicalize spelling of currently selected keyword.
- */
-void
-GNUNET_GTK_advertise_pseudonym_keyword_list_normalize_button_clicked_cb ()
-{
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkTreeModel *tm;
-  GtkTreeIter iter;
-  gchar *value;
-  struct GNUNET_FS_Uri *uri;
-  struct GNUNET_FS_Uri *nuri;
-  char *nvalue;
-  char *emsg;
-
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_advertise_pseudonym_keyword_list_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
-  {
-    GNUNET_break (0);
-    return;
-  }
-  gtk_tree_model_get (tm, &iter, 0, &value, -1);
-  emsg = NULL;
-  uri = GNUNET_FS_uri_ksk_create (value, &emsg);
-  if (uri == NULL)
-  {
-    GNUNET_break (0);
-    GNUNET_free (emsg);
-    g_free (value);
-    return;
-  }
-  nuri = GNUNET_FS_uri_ksk_canonicalize (uri);
-  nvalue = GNUNET_FS_uri_ksk_to_string_fancy (nuri);
-  gtk_list_store_set (GTK_LIST_STORE (tm), &iter, 0, nvalue, -1);
-  GNUNET_FS_uri_destroy (nuri);
-  GNUNET_FS_uri_destroy (uri);
-  GNUNET_free (nvalue);
-  g_free (value);
-}
-
-
-/**
- * Remove the currently selected keyword from the list.
- */
-void
-GNUNET_GTK_advertise_pseudonym_keyword_list_del_button_clicked_cb ()
-{
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkTreeModel *tm;
-  GtkTreeIter iter;
-  GtkWidget *w;
-
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_advertise_pseudonym_keyword_list_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
-  {
-    GNUNET_break (0);
-    return;
-  }
-  gtk_list_store_remove (GTK_LIST_STORE (tm), &iter);
-  if (TRUE != gtk_tree_model_get_iter_first (tm, &iter))
-  {
-    /* keyword list now empty, disable 'Ok' button! */
-    w = GTK_WIDGET (gtk_builder_get_object (builder, 
-                                           
"GNUNET_GTK_advertise_pseudonym_confirm_button"));
-    gtk_widget_set_sensitive (w, FALSE);
-  }
-}
-
-
-/**
- * Add keyword from entry line to keyword list.
- */
-void
-GNUNET_GTK_advertise_pseudonym_keyword_list_add_button_clicked_cb ()
-{
-  const char *keyword;
-  GtkEntry *entry;
-  GtkListStore *ls;
-  GtkTreeIter iter;
-  GtkWidget *w;
-
-  ls = GTK_LIST_STORE (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_keyword_list_store"));
-  entry =
-      GTK_ENTRY (gtk_builder_get_object
-                 (builder, "GNUNET_GTK_advertise_pseudonym_keyword_entry"));
-  keyword = gtk_entry_get_text (entry);
-  if (strlen (keyword) > 0)
-  {
-    gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, keyword, -1); 
-    /* enable OK button */
-    w = GTK_WIDGET (gtk_builder_get_object (builder, 
"GNUNET_GTK_advertise_pseudonym_confirm_button"));
-    gtk_widget_set_sensitive (w, TRUE);
-  }
-  gtk_entry_set_text (entry, "");
-}
-
-
-/**
- * Update sensitivity of keyword add button.
- */
-void
-GNUNET_GTK_advertise_pseudonym_keyword_entry_changed_cb ()
-{
-  const char *keyword;
-  GtkEntry *entry;
-  GtkWidget *button;
-
-  button =
-      GTK_WIDGET (gtk_builder_get_object
-                  (builder,
-                   "GNUNET_GTK_advertise_pseudonym_keyword_list_add_button"));
-  entry =
-      GTK_ENTRY (gtk_builder_get_object
-                 (builder, "GNUNET_GTK_advertise_pseudonym_keyword_entry"));
-  keyword = gtk_entry_get_text (entry);
-  gtk_widget_set_sensitive (button, (strlen (keyword) > 0) ? TRUE : FALSE);
-}
-
-/**
- * Update sensitivity of metadata delete button.
- */
-static void
-metadata_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
-{
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkWidget *button;
-
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       "GNUNET_GTK_advertise_pseudonym_metadata_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  button =
-      GTK_WIDGET (gtk_builder_get_object
-                  (builder,
-                   "GNUNET_GTK_advertise_pseudonym_metadata_delete_button"));
-  gtk_widget_set_sensitive (button,
-                            gtk_tree_selection_get_selected (sel, NULL, NULL));
-}
-
-
-/**
- * Update sensitivity of keyword delete and normalize button.
- */
-static void
-keyword_selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
-{
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkWidget *button;
-
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_advertise_pseudonym_keyword_list_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  button =
-      GTK_WIDGET (gtk_builder_get_object
-                  (builder,
-                   "GNUNET_GTK_advertise_pseudonym_keyword_list_del_button"));
-
-  gtk_widget_set_sensitive (button,
-                            gtk_tree_selection_get_selected (sel, NULL, NULL));
-  button =
-      GTK_WIDGET (gtk_builder_get_object
-                  (builder,
-                   
"GNUNET_GTK_advertise_pseudonym_keyword_list_normalize_button"));
-  gtk_widget_set_sensitive (button,
-                            gtk_tree_selection_get_selected (sel, NULL, NULL));
-}
-
-
-/**
- * Update sensitivity of metadata add button.
- */
-void
-GNUNET_GTK_advertise_pseudonym_metadata_value_entry_changed_cb ()
-{
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  const char *value;
-  GtkEntry *entry;
-  GtkWidget *button;
-
-  entry =
-      GTK_ENTRY (gtk_builder_get_object
-                 (builder,
-                  "GNUNET_GTK_advertise_pseudonym_metadata_value_entry"));
-  value = gtk_entry_get_text (entry);
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_advertise_pseudonym_metadata_type_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  button =
-      GTK_WIDGET (gtk_builder_get_object
-                  (builder,
-                   "GNUNET_GTK_advertise_pseudonym_metadata_add_button"));
-  gtk_widget_set_sensitive (button,
-                            (strlen (value) >
-                             0) ? gtk_tree_selection_get_selected (sel, NULL,
-                                                                   NULL) :
-                            FALSE);
-}
-
-
-/**
- * Add keyword to keyword list.
- */
-void
-GNUNET_GTK_advertise_pseudonym_keyword_entry_activate_cb ()
-{
-  GNUNET_GTK_advertise_pseudonym_keyword_list_add_button_clicked_cb ();
-}
-
-
-void
-GNUNET_GTK_advertise_pseudonym_metadata_preview_file_chooser_button_file_set_cb
-    ()
-{
-  GNUNET_break (0);
-}
-
-/**
- * Delete currently selected item from meta data list.
- */
-void
-GNUNET_GTK_advertise_pseudonym_metadata_delete_button_clicked_cb ()
-{
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkTreeModel *tm;
-  GtkTreeIter iter;
-
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       "GNUNET_GTK_advertise_pseudonym_metadata_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
-  {
-    GNUNET_break (0);
-    return;
-  }
-  gtk_list_store_remove (GTK_LIST_STORE (tm), &iter);
-}
-
-
-/**
- * Add metadata to metadata list.
- */
-void
-GNUNET_GTK_advertise_pseudonym_metadata_add_button_clicked_cb ()
-{
-  const char *value;
-  char *avalue;
-  const char *ivalue;
-  GtkEntry *entry;
-  GtkListStore *ls;
-  GtkTreeModel *tm;
-  GtkTreeView *tv;
-  GtkTreeSelection *sel;
-  GtkTreeIter iter;
-  guint type;
-  size_t slen;
-  char *pos;
-
-  entry =
-      GTK_ENTRY (gtk_builder_get_object
-                 (builder,
-                  "GNUNET_GTK_advertise_pseudonym_metadata_value_entry"));
-  value = gtk_entry_get_text (entry);
-  if ((value == NULL) || (strlen (value) == 0))
-  {
-    GNUNET_break (0);
-    return;
-  }
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_advertise_pseudonym_metadata_type_tree_view"));
-  tm = gtk_tree_view_get_model (tv);
-  sel = gtk_tree_view_get_selection (tv);
-  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
-  {
-    GNUNET_break (0);
-    return;
-  }
-  gtk_tree_model_get (tm, &iter, 1, &type, -1);
-  ls = GTK_LIST_STORE (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_meta_data_list_store"));
-  if ((type == EXTRACTOR_METATYPE_FILENAME) &&
-      (value[strlen (value) - 1] != '/'))
-  {
-    GNUNET_asprintf (&avalue, "%s/", value);
-    /* if user typed '\' instead of '/', change it! */
-    slen = strlen (avalue);
-    while ((slen > 1) && (avalue[slen - 2] == '\\'))
-    {
-      avalue[slen - 2] = '/';
-      avalue[slen - 1] = '\0';
-      slen--;
-    }
-    while (NULL != (pos = strstr (avalue, "\\")))
-      *pos = '/';
-    /* remove '../' everywhere */
-    while (NULL != (pos = strstr (avalue, "../")))
-    {
-      pos[0] = '_';
-      pos[1] = '_';
-      pos[2] = '_';
-    }
-    ivalue = avalue;
-  }
-  else
-  {
-    ivalue = value;
-    avalue = NULL;
-  }
-
-  gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, type, 1,
-                                     (guint) EXTRACTOR_METAFORMAT_UTF8, 2,
-                                     EXTRACTOR_metatype_to_string (type), 3,
-                                     ivalue, -1);
-  GNUNET_free_non_null (avalue);
-  gtk_entry_set_text (GTK_ENTRY (entry), "");
-}
-
-
-/**
  * Callback with information about local (!) namespaces.
  * Contains the names of the local namespace and the global
  * ID.  Adds the to the list store.
@@ -390,6 +54,8 @@
 {
   GtkTreeIter iter;
   GtkWidget *ok_button;
+  GtkBuilder *builder;
+  builder = GTK_BUILDER (user_data);
 
   ok_button =
       GTK_WIDGET (gtk_builder_get_object
@@ -400,60 +66,100 @@
     gtk_widget_set_sensitive (ok_button, FALSE);
 }
 
+struct namespace_data_struct
+{
+  struct GNUNET_FS_Namespace *ns;
+  int do_index;
+  char *short_fn;
+  guint anonymity_level;
+  guint priority;
+  gchar *root;
+};
 
 /**
- * Advertise pseudonym selected.
+ * Function called on entries in a GNUNET_FS_FileInformation publish-structure.
+ *
+ * @param cls closure
+ * @param fi the entry in the publish-structure
+ * @param length length of the file or directory
+ * @param meta metadata for the file or directory (can be modified)
+ * @param uri pointer to the keywords that will be used for this entry (can be 
modified)
+ * @param bo block options (can be modified)
+ * @param do_index should we index (can be modified)
+ * @param client_info pointer to client context set upon creation (can be 
modified)
+ * @return GNUNET_OK to continue, GNUNET_NO to remove
+ *         this entry from the directory, GNUNET_SYSERR
+ *         to abort the iteration
  */
+int
+advertise_namespace (void *cls, struct GNUNET_FS_FileInformation *fi,
+    uint64_t length, struct GNUNET_CONTAINER_MetaData *meta,
+    struct GNUNET_FS_Uri **uri, struct GNUNET_FS_BlockOptions *bo,
+    int *do_index, void **client_info)
+{
+  struct namespace_data_struct *nds;
+  nds = (struct namespace_data_struct *) cls;
+  GNUNET_FS_namespace_advertise (GNUNET_FS_GTK_get_fs_handle (), *uri,
+      nds->ns, meta, bo, nds->root, NULL, NULL);
+  return GNUNET_SYSERR;
+}
+
 void
-GNUNET_GTK_main_menu_file_advertise_pseudonym_activate_cb (GtkWidget * dummy,
-                                                           gpointer data)
+adv_pseudonym_edit_publish_dialog_cb (gpointer cls, int *do_index, char 
**short_fn,
+    guint * anonymity_level, guint * priority, gchar *root,
+    struct GNUNET_FS_FileInformation *fip, gint ret)
 {
+  struct namespace_data_struct *nds;
+  nds = (struct namespace_data_struct *) cls;
+
+  if (ret == GTK_RESPONSE_OK)
+  {
+    nds->do_index = *do_index;
+    nds->short_fn = *short_fn;
+    nds->anonymity_level = *anonymity_level;
+    nds->priority = *priority;
+    nds->root = root;
+    GNUNET_FS_file_information_inspect (fip,
+        advertise_namespace, nds);
+  }
+  g_free (nds->root);
+  GNUNET_FS_namespace_delete (nds->ns, GNUNET_NO);
+  g_free (nds);
+  GNUNET_FS_file_information_destroy (fip, NULL, NULL);
+}
+
+void
+GNUNET_GTK_select_pseudonym_dialog_response_cb (GtkDialog *dialog,
+   gint response_id, gpointer user_data)
+{
+  GtkBuilder *builder;
   GtkWidget *ad;
-  struct GNUNET_FS_Namespace *ns;
-  struct GNUNET_FS_Namespace *nso;
-  GtkListStore *ls;
   GtkTreeView *tv;
-  GtkTreeIter iter;
   GtkTreeSelection *sel;
   GtkTreeModel *tm;
-  GtkSpinButton *sb;
+  GtkTreeIter iter;
+  struct GNUNET_FS_Namespace *ns;
+  struct GNUNET_FS_Namespace *nso;
+  GtkWindow *transient;
+  struct namespace_data_struct *nds;
+  struct GNUNET_FS_FileInformation *fip;
+  struct GNUNET_CONTAINER_MetaData *meta;
+  builder = GTK_BUILDER (user_data);
   struct GNUNET_FS_BlockOptions bo;
-  struct GNUNET_FS_Uri *nxt;
-  struct GNUNET_FS_Uri *mrg;
-  struct GNUNET_FS_Uri *uri;
-  struct GNUNET_CONTAINER_MetaData *nm;
-  const char *root;
-  char *value;
-  guint ntype;
-  guint nformat;
-  guint type;
-  guint max_type;
 
-  builder =
-      GNUNET_GTK_get_new_builder
-      ("gnunet_fs_gtk_select_pseudonym_dialog.glade");
-  if (builder == NULL)
-  {
-    GNUNET_break (0);
-    return;
-  }
   ad = GTK_WIDGET (gtk_builder_get_object
                    (builder, "GNUNET_GTK_select_pseudonym_dialog"));
-  ls = GTK_LIST_STORE (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_select_pseudonym_liststore"));
-  GNUNET_FS_namespace_list (GNUNET_FS_GTK_get_fs_handle (), &add_to_list, ls);
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder, "GNUNET_GTK_select_pseudonym_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK (selection_changed_cb), NULL);
-  if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad)))
+
+  if (response_id != -5)
   {
-    gtk_widget_destroy (ad);
-    g_object_unref (G_OBJECT (builder));
-    builder = NULL;
+    gtk_widget_hide (ad);
     return;
   }
+  tv = GTK_TREE_VIEW (gtk_builder_get_object
+                      (builder,
+                       "GNUNET_GTK_select_pseudonym_tree_view"));
+  sel = gtk_tree_view_get_selection (tv);
+
   GNUNET_assert (TRUE == gtk_tree_selection_get_selected (sel, &tm, &iter));
   gtk_tree_model_get (tm, &iter, 1, &ns, -1);
   /* free all namespaces from list store except "ns" */
@@ -467,130 +173,73 @@
     }
     while (TRUE == gtk_tree_model_iter_next (tm, &iter));
   }
-  gtk_widget_destroy (ad);
-  g_object_unref (G_OBJECT (builder));
-  builder = NULL;
+  transient = gtk_window_get_transient_for (GTK_WINDOW (ad));
+  gtk_widget_hide (ad);
 
+  meta = GNUNET_CONTAINER_meta_data_create ();
 
-  builder =
-      GNUNET_GTK_get_new_builder
-      ("gnunet_fs_gtk_advertise_pseudonym_dialog.glade");
-  if (builder == NULL)
-  {
-    GNUNET_break (0);
-    return;
-  }
-  GNUNET_FS_GTK_setup_expiration_year_adjustment (builder);
-  ad = GTK_WIDGET (gtk_builder_get_object
-                   (builder, "GNUNET_GTK_advertise_pseudonym_dialog"));
-  ls = GTK_LIST_STORE (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_metatype_list_store"));
-  max_type = EXTRACTOR_metatype_get_max ();
-  type = 1;
-  while (type < max_type - 1)
-  {
-    gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0,
-                                       EXTRACTOR_metatype_to_string (type), 1,
-                                       type, 2,
-                                       EXTRACTOR_metatype_to_description 
(type),
-                                       -1);
-    type++;
-  }
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_advertise_pseudonym_metadata_type_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK
-                    
(GNUNET_GTK_advertise_pseudonym_metadata_value_entry_changed_cb),
-                    NULL);
+  nds = g_new0 (struct namespace_data_struct, 1);
+  nds->ns = ns;
+  nds->do_index = FALSE;
+  nds->short_fn = NULL;
+  nds->anonymity_level = 1;
+  nds->priority = 1000;
+  nds->root = NULL;
+  /* This is a bogus fileinfo. It's needed because edit_publish_dialog
+   * was written to work with fileinfo, and return a fileinfo.
+   */
+  memset (&bo, 0, sizeof (bo));
+  fip = GNUNET_FS_file_information_create_empty_directory (NULL, NULL,
+      NULL, meta, &bo);
+  GNUNET_CONTAINER_meta_data_destroy (meta);
 
-  tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       "GNUNET_GTK_advertise_pseudonym_metadata_tree_view"));
-  sel = gtk_tree_view_get_selection (tv);
-  g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK (metadata_selection_changed_cb), NULL);
+  GNUNET_FS_GTK_edit_publish_dialog (builder, transient, &nds->do_index,
+      &nds->short_fn, &nds->anonymity_level, &nds->priority,
+      fip, FALSE, &adv_pseudonym_edit_publish_dialog_cb, nds);
+}
 
+void
+GNUNET_GTK_select_pseudonym_dialog_realize_cb (GtkWidget *widget,
+    gpointer user_data)
+{
+  GtkTreeView *tv;
+  GtkTreeSelection *sel;
+  GtkBuilder *builder;
+
+  builder = GTK_BUILDER (user_data);
+
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (builder,
-                       
"GNUNET_GTK_advertise_pseudonym_keyword_list_tree_view"));
+                      (builder, "GNUNET_GTK_select_pseudonym_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK (keyword_selection_changed_cb), NULL);
-  if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad)))
-  {
-    gtk_widget_destroy (ad);
-    g_object_unref (G_OBJECT (builder));
-    builder = NULL;
-    return;
-  }
-  /* get keywords from list store */
-  nxt = NULL;
-  mrg = NULL;
-  uri = NULL;
-  tm = GTK_TREE_MODEL (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_keyword_list_store"));
-  if (TRUE == gtk_tree_model_get_iter_first (tm, &iter))
-  {
-    do
-    {
-      gtk_tree_model_get (tm, &iter, 0, &value, -1);
-      nxt = GNUNET_FS_uri_ksk_create_from_args (1, (const char **) &value);
-      mrg = GNUNET_FS_uri_ksk_merge (nxt, uri);
-      GNUNET_FS_uri_destroy (nxt);
-      if (NULL != uri)
-        GNUNET_FS_uri_destroy (uri);
-      uri = mrg;
-      g_free (value);
-    }
-    while (TRUE == gtk_tree_model_iter_next (tm, &iter));
-  }
-  /* get meta */
-  nm = GNUNET_CONTAINER_meta_data_create ();
-  tm = GTK_TREE_MODEL (gtk_builder_get_object
-                       (builder, "GNUNET_GTK_meta_data_list_store"));
-  if (TRUE == gtk_tree_model_get_iter_first (tm, &iter))
-  {
-    do
-    {
-      gtk_tree_model_get (tm, &iter, 0, &ntype, 1, &nformat, 3, &value, -1);
-      GNUNET_CONTAINER_meta_data_insert (nm, "<user>", ntype, nformat,
-                                         "text/plain", value,
-                                         strlen (value) + 1);
-      g_free (value);
-    }
-    while (TRUE == gtk_tree_model_iter_next (tm, &iter));
-  }
-  bo.anonymity_level =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_advertise_pseudonym_anonymity_spin_button")));
-  bo.content_priority =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_advertise_pseudonym_priority_spin_button")));
-  sb = GTK_SPIN_BUTTON (gtk_builder_get_object
-                        (builder,
-                         
"GNUNET_GTK_advertise_pseudonym_expiration_year_spin_button"));
-  bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb);
-  root =
-      gtk_entry_get_text (GTK_ENTRY
-                          (gtk_builder_get_object
-                           (builder,
-                            "GNUNET_GTK_advertise_pseudonym_root_entry")));
-  GNUNET_FS_namespace_advertise (GNUNET_FS_GTK_get_fs_handle (), uri, ns, nm,
-                                 &bo, root, NULL, NULL);
-  GNUNET_FS_namespace_delete (ns, GNUNET_NO);
-  GNUNET_CONTAINER_meta_data_destroy (nm);
-  if (NULL != uri)
-    GNUNET_FS_uri_destroy (uri);
-  gtk_widget_destroy (ad);
-  g_object_unref (G_OBJECT (builder));
-  builder = NULL;
+                    G_CALLBACK (selection_changed_cb), user_data);
 }
 
+/**
+ * Advertise pseudonym selected.
+ */
+void
+GNUNET_GTK_main_menu_file_advertise_pseudonym_activate_cb (GtkWidget * dummy,
+                                                           gpointer data)
+{
+  GtkWidget *ad;
+  GtkListStore *ls;
+  GtkWidget *toplevel;
+  GtkBuilder *builder;
 
+  builder = GTK_BUILDER (data);
+
+  ad = GTK_WIDGET (gtk_builder_get_object
+                   (builder, "GNUNET_GTK_select_pseudonym_dialog"));
+  ls = GTK_LIST_STORE (gtk_builder_get_object
+                       (builder, "GNUNET_GTK_select_pseudonym_liststore"));
+  gtk_list_store_clear (ls);
+  GNUNET_FS_namespace_list (GNUNET_FS_GTK_get_fs_handle (), &add_to_list, ls);
+  toplevel = gtk_widget_get_toplevel (dummy);
+  if (GTK_IS_WINDOW (toplevel))
+    gtk_window_set_transient_for (GTK_WINDOW (ad), GTK_WINDOW (toplevel));
+  gtk_window_present (GTK_WINDOW (ad));
+}
+
+
 /* end of gnunet-fs-gtk-main_window_adv_pseudonym.c */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c      
2011-12-22 14:15:31 UTC (rev 18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_create_pseudonym.c      
2011-12-23 08:38:28 UTC (rev 18757)
@@ -26,28 +26,20 @@
 #include "gnunet-fs-gtk-common.h"
 #include "gnunet-fs-gtk.h"
 
-/**
- */
 void
-GNUNET_GTK_main_menu_create_pseudonym_activate_cb (GtkWidget * dummy,
-                                                   gpointer data)
+GNUNET_GTK_create_namespace_dialog_response_cb (GtkDialog *dialog,
+  gint response_id, gpointer user_data)
 {
+  const char *name;
+  struct GNUNET_FS_Namespace *ns;
   GtkWidget *ad;
   GtkBuilder *builder;
-  const char *name;
-  struct GNUNET_FS_Namespace *ns;
 
-  builder =
-      GNUNET_GTK_get_new_builder
-      ("gnunet_fs_gtk_create_namespace_dialog.glade");
-  if (builder == NULL)
-  {
-    GNUNET_break (0);
-    return;
-  }
+  builder = GTK_BUILDER (user_data);
   ad = GTK_WIDGET (gtk_builder_get_object
                    (builder, "GNUNET_GTK_create_namespace_dialog"));
-  if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad)))
+
+  if (response_id != -5)
   {
     gtk_widget_destroy (ad);
     g_object_unref (G_OBJECT (builder));
@@ -65,5 +57,32 @@
   g_object_unref (G_OBJECT (builder));
 }
 
+/**
+ */
+void
+GNUNET_GTK_main_menu_create_pseudonym_activate_cb (GtkWidget * dummy,
+                                                   gpointer data)
+{
+  GtkWidget *ad;
+  GtkWidget *toplevel;
+  GtkBuilder *builder;
 
+  builder =
+      GNUNET_GTK_get_new_builder
+      ("gnunet_fs_gtk_create_namespace_dialog.glade");
+  if (builder == NULL)
+  {
+    GNUNET_break (0);
+    return;
+  }
+  ad = GTK_WIDGET (gtk_builder_get_object
+                   (builder, "GNUNET_GTK_create_namespace_dialog"));
+
+  toplevel = gtk_widget_get_toplevel (dummy);
+  if (GTK_IS_WINDOW (toplevel))
+    gtk_window_set_transient_for (GTK_WINDOW (ad), GTK_WINDOW (toplevel));
+  gtk_window_present (GTK_WINDOW (ad));
+}
+
+
 /* end of gnunet-fs-gtk-main_window_create_pseudonym.c */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_file_publish.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_file_publish.c  2011-12-22 
14:15:31 UTC (rev 18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_file_publish.c  2011-12-23 
08:38:28 UTC (rev 18757)
@@ -26,16 +26,11 @@
 #include "gnunet-fs-gtk.h"
 #include "gnunet-fs-gtk-edit_publish_dialog.h"
 #include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_fs_service.h>
 
 #define MARKER_DIR_FILE_SIZE "-"
 
 /**
- * Builder used for the master publish dialog.
- */
-static GtkBuilder *master_builder;
-
-
-/**
  * Check if two GtkTreeIters refer to the same element.
  *
  * @param tm tree model of the iterators
@@ -63,7 +58,7 @@
  * Update selectivity in the master dialog.
  */
 static void
-update_selectivity ()
+update_selectivity (gpointer data)
 {
   GtkTreeView *tv;
   GtkTreeModel *tm;
@@ -83,12 +78,15 @@
   struct GNUNET_FS_FileInformation *fip;
   int ns_ok;
   gchar *namespace_id;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   tm = GTK_TREE_MODEL (gtk_builder_get_object
-                       (master_builder,
+                       (builder,
                         "GNUNET_GTK_file_sharing_publishing_tree_store"));
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_pseudonym_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   ns_ok = GNUNET_YES;
@@ -102,34 +100,34 @@
   }
   up_button =
       GTK_WIDGET (gtk_builder_get_object
-                  (master_builder,
+                  (builder,
                    "GNUNET_GTK_master_publish_dialog_up_button"));
   down_button =
       GTK_WIDGET (gtk_builder_get_object
-                  (master_builder,
+                  (builder,
                    "GNUNET_GTK_master_publish_dialog_down_button"));
   left_button =
       GTK_WIDGET (gtk_builder_get_object
-                  (master_builder,
+                  (builder,
                    "GNUNET_GTK_master_publish_dialog_left_button"));
   right_button =
       GTK_WIDGET (gtk_builder_get_object
-                  (master_builder,
+                  (builder,
                    "GNUNET_GTK_master_publish_dialog_right_button"));
   delete_button =
       GTK_WIDGET (gtk_builder_get_object
-                  (master_builder,
+                  (builder,
                    "GNUNET_GTK_master_publish_dialog_delete_button"));
   edit_button =
       GTK_WIDGET (gtk_builder_get_object
-                  (master_builder,
+                  (builder,
                    "GNUNET_GTK_master_publish_dialog_edit_button"));
   execute_button =
       GTK_WIDGET (gtk_builder_get_object
-                  (master_builder,
+                  (builder,
                    "GNUNET_GTK_master_publish_dialog_execute_button"));
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   tm = gtk_tree_view_get_model (tv);
@@ -208,7 +206,7 @@
  * @param iter parent entry, or NULL for top-level addition
  */
 static void
-add_file_at_iter (const char *filename, const struct GNUNET_FS_BlockOptions 
*bo,
+add_file_at_iter (gpointer data, const char *filename, const struct 
GNUNET_FS_BlockOptions *bo,
                   int do_index, GtkTreeIter * iter)
 {
   struct GNUNET_FS_FileInformation *fi;
@@ -223,6 +221,9 @@
   char *file_size_fancy;
   const char *ss;
   struct stat sbuf;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   if (0 != STAT (filename, &sbuf))
     return;
@@ -239,7 +240,7 @@
     }
   }
   ts = GTK_TREE_STORE (gtk_builder_get_object
-                       (master_builder,
+                       (builder,
                         "GNUNET_GTK_file_sharing_publishing_tree_store"));
 
   meta = GNUNET_CONTAINER_meta_data_create ();
@@ -273,7 +274,7 @@
                       short_fn, 3, (guint) bo->anonymity_level, 4,
                       (guint) bo->content_priority, 5, fi, -1);
   GNUNET_free (file_size_fancy);
-  update_selectivity ();
+  update_selectivity (data);
 }
 
 
@@ -287,7 +288,7 @@
  * @param pos iterator to set to the location of the new element
  */
 static void
-create_dir_at_iter (const char *name, const struct GNUNET_FS_BlockOptions *bo,
+create_dir_at_iter (gpointer data, const char *name, const struct 
GNUNET_FS_BlockOptions *bo,
                     GtkTreeIter * iter, GtkTreeIter * pos)
 {
   struct GNUNET_FS_FileInformation *fi;
@@ -295,9 +296,12 @@
   GtkTreePath *path;
   struct GNUNET_CONTAINER_MetaData *meta;
   GtkTreeStore *ts;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   ts = GTK_TREE_STORE (gtk_builder_get_object
-                       (master_builder,
+                       (builder,
                         "GNUNET_GTK_file_sharing_publishing_tree_store"));
   meta = GNUNET_CONTAINER_meta_data_create ();
   GNUNET_FS_meta_data_make_directory (meta);
@@ -315,7 +319,7 @@
   gtk_tree_store_set (ts, pos, 0, MARKER_DIR_FILE_SIZE, 1, (gboolean) 
GNUNET_NO,
                       2, name, 3, (guint) bo->anonymity_level, 4,
                       (guint) bo->content_priority, 5, fi, -1);
-  update_selectivity ();
+  update_selectivity (data);
 }
 
 
@@ -797,11 +801,14 @@
  * @param do_index should we index?
  */
 static void
-add_dir (const char *filename, const struct GNUNET_FS_BlockOptions *bo,
+add_dir (gpointer data, const char *filename, const struct 
GNUNET_FS_BlockOptions *bo,
          int do_index)
 {
   struct stat sbuf;
   struct AddDirContext scan_ctx;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   if (0 != STAT (filename, &sbuf))
     return;
@@ -815,7 +822,7 @@
   scan_ctx.do_index = do_index;
   scan_ctx.ts =
       GTK_TREE_STORE (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        "GNUNET_GTK_file_sharing_publishing_tree_store"));
   scan_directory (&scan_ctx, filename);
 }
@@ -827,7 +834,7 @@
 static void
 selection_changed_cb (GtkTreeSelection * ts, gpointer user_data)
 {
-  update_selectivity ();
+  update_selectivity (user_data);
 }
 
 
@@ -847,7 +854,7 @@
  * Move an entry in the tree.
  */
 static void
-move_entry (GtkTreeModel * tm, GtkTreeIter * old, GtkTreeIter * newpos,
+move_entry (gpointer data, GtkTreeModel * tm, GtkTreeIter * old, GtkTreeIter * 
newpos,
             int dsel)
 {
   struct GNUNET_FS_FileInformation *fip;
@@ -863,6 +870,9 @@
   GtkTreeIter cnewpos;
   GtkTreeRowReference *rr;
   GtkTreeRowReference *rr2;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   gtk_tree_model_get (tm, old, 0, &fsf, 1, &do_index, 2, &short_fn, 3,
                       &anonymity_level, 4, &priority, 5, &fip, -1);
@@ -874,7 +884,7 @@
   if (dsel == GNUNET_YES)
   {
     tv = GTK_TREE_VIEW (gtk_builder_get_object
-                        (master_builder,
+                        (builder,
                          
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
     sel = gtk_tree_view_get_selection (tv);
     path = gtk_tree_model_get_path (tm, newpos);
@@ -894,7 +904,7 @@
       gtk_tree_path_free (path);
       gtk_tree_store_insert_before (GTK_TREE_STORE (tm), &cnewpos, newpos,
                                     NULL);
-      move_entry (tm, &child, &cnewpos, GNUNET_NO);
+      move_entry (data, tm, &child, &cnewpos, GNUNET_NO);
       path = gtk_tree_row_reference_get_path (rr2);
       gtk_tree_row_reference_free (rr2);
       GNUNET_assert (TRUE == gtk_tree_model_get_iter (tm, &child, path));
@@ -913,7 +923,7 @@
     gtk_tree_path_free (path);
     gtk_tree_selection_select_iter (sel, newpos);
   }
-  update_selectivity ();
+  update_selectivity (data);
 }
 
 /**
@@ -926,9 +936,12 @@
 {
   GtkTreeIter iter;
   GtkTreeStore *ts;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (user_data);
 
   ts = GTK_TREE_STORE (gtk_builder_get_object
-                       (master_builder, "GNUNET_GTK_pseudonym_tree_store"));
+                       (builder, "GNUNET_GTK_pseudonym_tree_store"));
 
   if (TRUE !=
       gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (ts), &iter, cpath))
@@ -937,7 +950,7 @@
     return;
   }
   gtk_tree_store_set (ts, &iter, 5, new_text, -1);
-  update_selectivity ();
+  update_selectivity (user_data);
 }
 
 
@@ -951,9 +964,12 @@
 {
   GtkTreeIter iter;
   GtkTreeStore *ts;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (user_data);
 
   ts = GTK_TREE_STORE (gtk_builder_get_object
-                       (master_builder, "GNUNET_GTK_pseudonym_tree_store"));
+                       (builder, "GNUNET_GTK_pseudonym_tree_store"));
 
   if (TRUE !=
       gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (ts), &iter, cpath))
@@ -962,7 +978,7 @@
     return;
   }
   gtk_tree_store_set (ts, &iter, 2, new_text, -1);
-  update_selectivity ();
+  update_selectivity (user_data);
 }
 
 
@@ -978,9 +994,12 @@
   GtkTreeIter pred;
   GtkTreeIter prev;
   GtkTreeIter pos;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
@@ -1010,7 +1029,7 @@
     GNUNET_break (0);
     return;
   }
-  move_entry (tm, &iter, &pos, GNUNET_YES);
+  move_entry (data, tm, &iter, &pos, GNUNET_YES);
   remove_old_entry (GTK_TREE_STORE (tm), &iter);
 }
 
@@ -1025,9 +1044,12 @@
   GtkTreeIter iter;
   GtkTreeIter parent;
   GtkTreeIter pos;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
@@ -1046,7 +1068,7 @@
     GNUNET_break (0);
     return;
   }
-  move_entry (tm, &iter, &pos, GNUNET_YES);
+  move_entry (data, tm, &iter, &pos, GNUNET_YES);
   remove_old_entry (GTK_TREE_STORE (tm), &iter);
 }
 
@@ -1064,9 +1086,12 @@
   GtkTreeIter prev;
   GtkTreeIter *pprev;
   GtkTreeIter pos;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
@@ -1101,7 +1126,7 @@
     GNUNET_break (0);
     return;
   }
-  move_entry (tm, &iter, &pos, GNUNET_YES);
+  move_entry (data, tm, &iter, &pos, GNUNET_YES);
   remove_old_entry (GTK_TREE_STORE (tm), &iter);
 }
 
@@ -1116,9 +1141,12 @@
   GtkTreeIter iter;
   GtkTreeIter next;
   GtkTreeIter pos;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
@@ -1138,7 +1166,7 @@
     GNUNET_break (0);
     return;
   }
-  move_entry (tm, &iter, &pos, GNUNET_YES);
+  move_entry (data, tm, &iter, &pos, GNUNET_YES);
   remove_old_entry (GTK_TREE_STORE (tm), &iter);
 }
 
@@ -1152,9 +1180,12 @@
   GtkTreeIter iter;
   GtkTreeIter pos;
   struct GNUNET_FS_BlockOptions bo;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   /* FIXME: consider opening a dialog to get
@@ -1169,10 +1200,10 @@
   bo.replication_level = 1;
   if (TRUE != gtk_tree_selection_get_selected (sel, NULL, &iter))
   {
-    create_dir_at_iter ("unnamed/", &bo, NULL, &pos);
+    create_dir_at_iter (data, "unnamed/", &bo, NULL, &pos);
     return;
   }
-  create_dir_at_iter ("unnamed/", &bo, &iter, &pos);
+  create_dir_at_iter (data, "unnamed/", &bo, &iter, &pos);
 }
 
 
@@ -1182,86 +1213,87 @@
 {
   GtkWidget *ad;
   GtkBuilder *builder;
-  char *filename;
-  struct GNUNET_FS_BlockOptions bo;
-  int do_index;
-  GtkSpinButton *sb;
+  GtkWindow *master_pubdialog;
+  
+  builder = GTK_BUILDER (data);
 
-  builder =
-      GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_file_dialog.glade");
-  if (builder == NULL)
-  {
-    GNUNET_break (0);
-    return;
-  }
   ad = GTK_WIDGET (gtk_builder_get_object
                    (builder, "GNUNET_GTK_publish_file_dialog"));
   GNUNET_FS_GTK_setup_expiration_year_adjustment (builder);
-  if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad)))
-  {
-    gtk_widget_destroy (ad);
-    g_object_unref (G_OBJECT (builder));
-    return;
-  }
-  filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (ad));
-  sb = GTK_SPIN_BUTTON (gtk_builder_get_object
-                        (builder,
-                         
"GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"));
-  bo.anonymity_level =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_publish_file_dialog_anonymity_spin_button")));
-  bo.content_priority =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_publish_file_dialog_priority_spin_button")));
-  bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb);
-  bo.replication_level = 1;     /* FIXME... */
-  do_index =
-      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
-                                    (gtk_builder_get_object
-                                     (builder,
-                                      
"GNUNET_GTK_publish_file_dialog_do_index_checkbutton")));
-  add_file_at_iter (filename, &bo, do_index, NULL);
-  gtk_widget_destroy (ad);
-  g_object_unref (G_OBJECT (builder));
-  g_free (filename);
-  update_selectivity ();
+
+  master_pubdialog = GTK_WINDOW (gtk_builder_get_object (builder,
+      "GNUNET_GTK_master_publish_dialog"));
+  gtk_window_set_transient_for (GTK_WINDOW (ad), master_pubdialog);
+
+  gtk_window_present (GTK_WINDOW (ad));
 }
 
+struct edit_pub_cb_args
+{
+  GtkTreeModel *tm;
+  GtkTreeIter iter;
+  /* FIXME: this indirection madness is not really required any longer.
+   * we only need to pass over *tm and iter, everything else can be
+   * copied.
+   */
+  gchar *short_fn;
+  struct GNUNET_FS_FileInformation *fip;
+  int do_index;
+  guint anonymity_level;
+  guint priority;
+};
 
 void
+master_publish_edit_publish_dialog_cb (gpointer cls, int *do_index, char 
**short_fn,
+    guint * anonymity_level, guint * priority, gchar *root,
+    struct GNUNET_FS_FileInformation *fip, gint ret)
+{
+  struct edit_pub_cb_args *cbargs = (struct edit_pub_cb_args *) cls;
+  if (ret == GTK_RESPONSE_OK)
+    gtk_tree_store_set (GTK_TREE_STORE (cbargs->tm), &cbargs->iter,
+        1, *do_index, 2, *short_fn, 3, *anonymity_level, 4, *priority, -1);
+  g_free (root);
+  g_free (short_fn);
+  g_free (cbargs);
+}
+
+void
 GNUNET_GTK_master_publish_dialog_edit_button_clicked_cb (GtkWidget * dummy,
                                                          gpointer data)
 {
   GtkTreeView *tv;
   GtkTreeModel *tm;
   GtkTreeSelection *sel;
-  GtkTreeIter iter;
-  int do_index;
-  guint anonymity_level;
-  guint priority;
-  gchar *short_fn;
-  struct GNUNET_FS_FileInformation *fip;
+  struct edit_pub_cb_args *cbargs;
+  GtkBuilder *builder;
+  GtkWindow *master_pubdialog;
 
+  builder = GTK_BUILDER (data);
+
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
+
+  cbargs = g_new0 (struct edit_pub_cb_args, 1);
+  cbargs->tm = gtk_tree_view_get_model (tv);
+
+  master_pubdialog = GTK_WINDOW (gtk_builder_get_object (builder,
+      "GNUNET_GTK_master_publish_dialog"));
   sel = gtk_tree_view_get_selection (tv);
-  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
+  if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &cbargs->iter))
   {
     GNUNET_break (0);
+    g_free (cbargs);
     return;
   }
-  gtk_tree_model_get (tm, &iter, 1, &do_index, 2, &short_fn, 3,
-                      &anonymity_level, 4, &priority, 5, &fip, -1);
-  GNUNET_FS_GTK_edit_publish_dialog (&do_index, &short_fn, &anonymity_level,
-                                     &priority, fip);
-  gtk_tree_store_set (GTK_TREE_STORE (tm), &iter, 1, do_index, 2, short_fn, 3,
-                      anonymity_level, 4, priority, -1);
-  g_free (short_fn);
+
+  gtk_tree_model_get (tm, &cbargs->iter, 1, &cbargs->do_index, 2,
+      &cbargs->short_fn, 3, &cbargs->anonymity_level, 4, &cbargs->priority,
+      5, &cbargs->fip, -1);
+
+  GNUNET_FS_GTK_edit_publish_dialog (builder, master_pubdialog, 
&cbargs->do_index,
+      &cbargs->short_fn, &cbargs->anonymity_level, &cbargs->priority,
+      cbargs->fip, TRUE, &master_publish_edit_publish_dialog_cb, cbargs);
 }
 
 
@@ -1298,9 +1330,12 @@
   GtkTreeSelection *sel;
   GtkTreeIter iter;
   struct GNUNET_FS_FileInformation *fip;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
 
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter))
@@ -1311,65 +1346,69 @@
   gtk_tree_model_get (tm, &iter, 5, &fip, -1);
   GNUNET_FS_file_information_destroy (fip, &free_fi_row_reference, NULL);
   gtk_tree_store_remove (GTK_TREE_STORE (tm), &iter);
-  update_selectivity ();
+  update_selectivity (data);
 }
 
-
 void
-GNUNET_GTK_master_publish_dialog_open_button_clicked_cb (GtkWidget * dummy,
-                                                         gpointer data)
+GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog *dialog,
+    gint response_id, gpointer user_data)
 {
-  GtkWidget *ad;
-  GtkBuilder *builder;
   char *filename;
   int do_index;
   GtkSpinButton *sb;
   struct GNUNET_FS_BlockOptions bo;
+  GtkWidget *ad;
+  GtkBuilder *builder;
 
-  builder =
-      GNUNET_GTK_get_new_builder
-      ("gnunet_fs_gtk_publish_directory_dialog.glade");
-  if (builder == NULL)
+  builder = GTK_BUILDER (user_data);
+
+  ad = GTK_WIDGET (gtk_builder_get_object (builder,
+      "GNUNET_GTK_publish_directory_dialog"));
+
+  if (response_id == -5)
   {
-    GNUNET_break (0);
-    return;
+    filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (ad));
+    sb = GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+        "GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"));
+    if (!GNUNET_GTK_get_selected_anonymity_level (builder,
+        "GNUNET_GTK_publish_directory_dialog_anonymity_combobox",
+        &bo.anonymity_level))
+      bo.anonymity_level = 1;
+    bo.content_priority = gtk_spin_button_get_value (GTK_SPIN_BUTTON (
+        gtk_builder_get_object (builder,
+        "GNUNET_GTK_publish_directory_dialog_priority_spin_button")));
+    bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb);
+    do_index = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
+        gtk_builder_get_object (builder,
+        "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton")));
+
+    /* FIXME: open progress dialog here... */
+    add_dir (user_data, filename, &bo, do_index);
+    g_free (filename);
+    update_selectivity (user_data);
   }
+  gtk_widget_hide (ad);
+}
+
+
+void
+GNUNET_GTK_master_publish_dialog_open_button_clicked_cb (GtkWidget * dummy,
+                                                         gpointer data)
+{
+  GtkWidget *ad;
+  GtkBuilder *builder;
+  GtkWindow *master_pubdialog;
+  
+  builder = GTK_BUILDER (data);
   GNUNET_FS_GTK_setup_expiration_year_adjustment (builder);
   ad = GTK_WIDGET (gtk_builder_get_object
                    (builder, "GNUNET_GTK_publish_directory_dialog"));
-  if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad)))
-  {
-    gtk_widget_destroy (ad);
-    g_object_unref (G_OBJECT (builder));
-    return;
-  }
-  filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (ad));
-  sb = GTK_SPIN_BUTTON (gtk_builder_get_object
-                        (builder,
-                         
"GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"));
-  bo.anonymity_level =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_publish_directory_dialog_anonymity_spin_button")));
-  bo.content_priority =
-      gtk_spin_button_get_value (GTK_SPIN_BUTTON
-                                 (gtk_builder_get_object
-                                  (builder,
-                                   
"GNUNET_GTK_publish_directory_dialog_priority_spin_button")));
-  bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb);
-  do_index =
-      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
-                                    (gtk_builder_get_object
-                                     (builder,
-                                      
"GNUNET_GTK_publish_directory_dialog_do_index_checkbutton")));
 
-  gtk_widget_destroy (ad);
-  g_object_unref (G_OBJECT (builder));
-  /* FIXME: open progress dialog here... */
-  add_dir (filename, &bo, do_index);
-  g_free (filename);
-  update_selectivity ();
+  master_pubdialog = GTK_WINDOW (gtk_builder_get_object (builder,
+      "GNUNET_GTK_master_publish_dialog"));
+  gtk_window_set_transient_for (GTK_WINDOW (ad), master_pubdialog);
+
+  gtk_window_present (GTK_WINDOW (ad));
 }
 
 
@@ -1598,52 +1637,58 @@
   }
 }
 
-
-/**
- */
 void
-GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget * dummy, gpointer 
data)
+GNUNET_GTK_master_publish_dialog_realize_cb (GtkWidget *widget,
+    gpointer user_data)
 {
-  GtkWidget *ad;
-  GtkTreeStore *ts;
-  gint ret;
   GtkTreeView *tv;
   GtkTreeSelection *sel;
-  GtkTreeIter iter;
-  struct GNUNET_FS_FileInformation *fi;
-  GtkTreeModel *tm;
-  GtkTreeModel *ptm;
-  struct GNUNET_FS_Namespace *namespace;
-  gchar *namespace_id;
-  gchar *namespace_uid;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (user_data);
 
-  GNUNET_assert (master_builder == NULL);
-  master_builder =
-      GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_publish_dialog.glade");
-  if (master_builder == NULL)
-    return;
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK (selection_changed_cb), NULL);
-  ad = GTK_WIDGET (gtk_builder_get_object
-                   (master_builder, "GNUNET_GTK_master_publish_dialog"));
-  ts = GTK_TREE_STORE (gtk_builder_get_object
-                       (master_builder, "GNUNET_GTK_pseudonym_tree_store"));
-  GNUNET_FS_namespace_list (GNUNET_FS_GTK_get_fs_handle (),
-                            &add_namespace_to_ts, ts);
-  tm = GTK_TREE_MODEL (gtk_builder_get_object
-                       (master_builder,
-                        "GNUNET_GTK_file_sharing_publishing_tree_store"));
+                    G_CALLBACK (selection_changed_cb), user_data);
   tv = GTK_TREE_VIEW (gtk_builder_get_object
-                      (master_builder,
+                      (builder,
                        
"GNUNET_GTK_master_publish_dialog_pseudonym_tree_view"));
   sel = gtk_tree_view_get_selection (tv);
   g_signal_connect (G_OBJECT (sel), "changed",
-                    G_CALLBACK (selection_changed_cb), NULL);
-  ret = gtk_dialog_run (GTK_DIALOG (ad));
+                    G_CALLBACK (selection_changed_cb), user_data);
+}
+
+void
+hide_master_publish_dialog (gpointer user_data, gint ret)
+{
+  GtkTreeView *tv, *ptv;
+  GtkTreeSelection *sel;
+  GtkTreeModel *tm, *ptm;
+  GtkTreeIter iter;
+  gpointer namespace;
+  gchar *namespace_id;
+  gchar *namespace_uid;
+  struct GNUNET_FS_FileInformation *fi;
+  GtkWidget *ad;
+  GtkBuilder *builder = GTK_BUILDER (user_data);
+
+  ad = GTK_WIDGET (gtk_builder_get_object
+                   (builder, "GNUNET_GTK_master_publish_dialog"));
+
+  ptv = GTK_TREE_VIEW (gtk_builder_get_object
+                      (builder,
+                       
"GNUNET_GTK_master_publish_dialog_pseudonym_tree_view"));
+  sel = gtk_tree_view_get_selection (ptv);
+  ptm = gtk_tree_view_get_model (ptv);
+
+  tv = GTK_TREE_VIEW (gtk_builder_get_object
+                      (builder,
+                       
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
+  tm = gtk_tree_view_get_model (tv);
+  
   if (ret == GTK_RESPONSE_OK)
   {
     if (TRUE == gtk_tree_selection_get_selected (sel, &ptm, &iter))
@@ -1666,14 +1711,10 @@
                                  GNUNET_FS_PUBLISH_OPTION_NONE);
       }
       while (gtk_tree_model_iter_next (tm, &iter));
-    if (namespace_id != NULL)
-      g_free (namespace_id);
-    if (namespace_uid != NULL)
-      g_free (namespace_uid);
+    g_free (namespace_id);
+    g_free (namespace_uid);
   }
-  ptm =
-      GTK_TREE_MODEL (gtk_builder_get_object
-                      (master_builder, "GNUNET_GTK_pseudonym_tree_store"));
+
   /* free state from 'ptm' */
   if (TRUE == gtk_tree_model_get_iter_first (ptm, &iter))
     do
@@ -1681,6 +1722,7 @@
       free_pseudonym_tree_store (ptm, &iter);
     }
     while (TRUE == gtk_tree_model_iter_next (ptm, &iter));
+  gtk_tree_store_clear (GTK_TREE_STORE (ptm));
 
   /* free state from 'tm' */
   if (TRUE == gtk_tree_model_get_iter_first (tm, &iter))
@@ -1689,11 +1731,101 @@
       free_file_information_tree_store (tm, &iter);
     }
     while (TRUE == gtk_tree_model_iter_next (tm, &iter));
+  gtk_tree_store_clear (GTK_TREE_STORE (tm));
 
-  gtk_widget_destroy (ad);
-  g_object_unref (G_OBJECT (master_builder));
-  master_builder = NULL;
+  gtk_widget_hide (ad);
 }
 
+void
+GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb (GtkButton *button,
+    gpointer user_data)
+{
+  hide_master_publish_dialog (user_data, GTK_RESPONSE_OK);
+}
 
+void
+GNUNET_GTK_master_publish_dialog_cancel_button_clicked_cb (GtkButton *button,
+    gpointer user_data)
+{
+  hide_master_publish_dialog (user_data, GTK_RESPONSE_CANCEL);
+}
+
+gboolean
+GNUNET_GTK_master_publish_dialog_delete_event_cb (GtkWidget *widget,
+    GdkEvent *event, gpointer user_data)
+{
+  hide_master_publish_dialog (user_data, GTK_RESPONSE_CANCEL);
+  return TRUE;
+}
+
+void
+GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog *dialog,
+    gint response_id, gpointer user_data)
+{
+  char *filename;
+  struct GNUNET_FS_BlockOptions bo;
+  int do_index;
+  GtkSpinButton *sb;
+  GtkWidget *ad;
+
+  GtkBuilder *builder = GTK_BUILDER (user_data);
+
+  ad = GTK_WIDGET (gtk_builder_get_object (builder,
+      "GNUNET_GTK_publish_file_dialog"));
+
+  if (response_id == -5)
+  {
+    /* OK */
+    filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (ad));
+    sb = GTK_SPIN_BUTTON (gtk_builder_get_object (builder,
+        "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"));
+
+    if (!GNUNET_GTK_get_selected_anonymity_level (builder,
+        "GNUNET_GTK_publish_file_dialog_anonymity_combobox", 
&bo.anonymity_level))
+      bo.anonymity_level = 1;
+    bo.content_priority = gtk_spin_button_get_value (GTK_SPIN_BUTTON (
+        gtk_builder_get_object (builder,
+        "GNUNET_GTK_publish_file_dialog_priority_spin_button")));
+    bo.expiration_time = GNUNET_FS_GTK_get_expiration_time (sb);
+    bo.replication_level = 1;     /* FIXME... */
+    do_index = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
+        gtk_builder_get_object (builder,
+        "GNUNET_GTK_publish_file_dialog_do_index_checkbutton")));
+    add_file_at_iter (user_data, filename, &bo, do_index, NULL);
+    g_free (filename);
+    update_selectivity (user_data);
+  }
+  else
+  {
+    /* Cancel/Escape/close/etc */
+  }
+  gtk_widget_hide (ad);
+}
+
+/**
+ */
+void
+GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget * dummy, gpointer 
data)
+{
+  GtkWidget *ad;
+  GtkTreeStore *ts;
+  GtkBuilder *builder;
+  
+  builder = GTK_BUILDER (data);
+
+  ad = GTK_WIDGET (gtk_builder_get_object
+                   (builder, "GNUNET_GTK_master_publish_dialog"));
+
+  if (!gtk_widget_get_visible (ad))
+  {
+    ts = GTK_TREE_STORE (gtk_builder_get_object (builder,
+        "GNUNET_GTK_pseudonym_tree_store"));
+    GNUNET_FS_namespace_list (GNUNET_FS_GTK_get_fs_handle (),
+        &add_namespace_to_ts, ts);
+  }
+
+  gtk_window_present (GTK_WINDOW (ad));
+}
+
+
 /* end of gnunet-fs-gtk-main_window_file_publish.c */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_open_directory.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_open_directory.c        
2011-12-22 14:15:31 UTC (rev 18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_open_directory.c        
2011-12-23 08:38:28 UTC (rev 18757)
@@ -85,7 +85,35 @@
                                                meta, NULL, 0));
 }
 
+void
+GNUNET_GTK_open_directory_dialog_response_cb (GtkDialog *dialog,
+    gint response_id, gpointer user_data)
+{
+  GtkBuilder *builder;
+  GtkWidget *ad;
+  char *filename;
+  struct AddChildContext acc;
 
+  builder = GTK_BUILDER (user_data);
+  ad = GTK_WIDGET (gtk_builder_get_object
+                   (builder, "GNUNET_GTK_open_directory_dialog"));
+
+  if (response_id != -5)
+  {
+    gtk_widget_destroy (ad);
+    g_object_unref (G_OBJECT (builder));
+    return;
+  }
+
+  filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (ad));
+  gtk_widget_destroy (ad);
+  g_object_unref (G_OBJECT (builder));
+  acc.filename = filename;
+  acc.ts = NULL;
+  GNUNET_FS_GTK_mmap_and_scan (filename, &add_child, &acc);
+  g_free (filename);
+}
+
 /**
  * User selected "Open directory" in menu.  Display dialog, open
  * file and then display a new tab with its contents.
@@ -94,12 +122,12 @@
 GNUNET_GTK_main_menu_file_open_gnunet_directory_activate_cb (GtkWidget * dummy,
                                                              gpointer data)
 {
-  struct AddChildContext acc;
   GtkWidget *ad;
   GtkBuilder *builder;
-  char *filename;
+  GtkWidget *toplevel;
   GtkFileFilter *ff;
 
+
   builder =
       GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_open_directory_dialog.glade");
   if (builder == NULL)
@@ -113,19 +141,11 @@
                         (builder, "gnunet_directory_filter"));
   /* FIXME: some day, write a custom file filter for gnunet-directories... */
   gtk_file_filter_add_pattern (ff, "*" GNUNET_FS_DIRECTORY_EXT);
-  if (GTK_RESPONSE_OK != gtk_dialog_run (GTK_DIALOG (ad)))
-  {
-    gtk_widget_destroy (ad);
-    g_object_unref (G_OBJECT (builder));
-    return;
-  }
-  filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (ad));
-  gtk_widget_destroy (ad);
-  g_object_unref (G_OBJECT (builder));
-  acc.filename = filename;
-  acc.ts = NULL;
-  GNUNET_FS_GTK_mmap_and_scan (filename, &add_child, &acc);
-  g_free (filename);
+
+  toplevel = gtk_widget_get_toplevel (dummy);
+  if (GTK_IS_WINDOW (toplevel))
+    gtk_window_set_transient_for (GTK_WINDOW (ad), GTK_WINDOW (toplevel));
+  gtk_window_present (GTK_WINDOW (ad));
 }
 
 /* end of gnunet-fs-gtk-main_window_open_directory.c */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c   2011-12-22 14:15:31 UTC (rev 18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c   2011-12-23 08:38:28 UTC (rev 18757)
@@ -247,7 +247,7 @@
   GtkTreeModel *model;
   guint level;
 
-  combo = GTK_COMBO_BOX(gtk_builder_get_object (builder, combo_name));
+  combo = GTK_COMBO_BOX (gtk_builder_get_object (builder, combo_name));
   if (!combo)
     return FALSE;
 
@@ -265,6 +265,38 @@
 }
 
 gboolean
+GNUNET_GTK_select_anonymity_level (GtkBuilder *builder, gchar *combo_name, 
guint sel_level)
+{
+  GtkComboBox *combo;
+  GtkTreeIter iter;
+  GtkTreeModel *model;
+  guint level;
+  gboolean go_on;
+
+  combo = GTK_COMBO_BOX (gtk_builder_get_object (builder, combo_name));
+  if (!combo)
+    return FALSE;
+
+  model = gtk_combo_box_get_model (combo);
+  if (!model)
+    return FALSE;
+
+  for (go_on = gtk_tree_model_get_iter_first (model, &iter);
+      go_on;
+      go_on = gtk_tree_model_iter_next (model, &iter))
+  {
+    gboolean is_it = FALSE;
+    gtk_tree_model_get (model, &iter, 1, &level, -1);
+    if (level == sel_level)
+    {
+      gtk_combo_box_set_active_iter (combo, &iter);
+      return TRUE;
+    }
+  }
+  return FALSE;
+}
+
+gboolean
 get_selected_namespace_treepath_iter_model_widget (GtkBuilder *builder,
     GtkTreePath **p_treepath, GtkTreeIter *p_iter, GtkTreeModel **p_model,
     GtkWidget **p_widget)

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.h   2011-12-22 14:15:31 UTC (rev 18756)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.h   2011-12-23 08:38:28 UTC (rev 18757)
@@ -76,5 +76,18 @@
     gchar *combo_name, guint *p_level);
 
 
+/**
+ * Set the selected anonymity level.
+ * For dialogue initialization.
+ *
+ * @param builder builder object for the window
+ * @param combo_name name of the combobox widget to get anonymity from
+ * @param sel_level the level value to select
+ * @return TRUE on success, FALSE on error (no item with such level)
+ */
+gboolean
+GNUNET_GTK_select_anonymity_level (GtkBuilder *builder,
+    gchar *combo_name, guint sel_level);
+
 #endif
 /* end of gnunet-fs-gtk.h */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]