gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r7075 - in gnunet-gtk: . src/common src/core src/include sr


From: gnunet
Subject: [GNUnet-SVN] r7075 - in gnunet-gtk: . src/common src/core src/include src/plugins/daemon src/plugins/fs src/plugins/stats
Date: Sat, 7 Jun 2008 15:45:52 -0600 (MDT)

Author: grothoff
Date: 2008-06-07 15:45:51 -0600 (Sat, 07 Jun 2008)
New Revision: 7075

Added:
   gnunet-gtk/src/plugins/fs/status.c
   gnunet-gtk/src/plugins/fs/status.h
Modified:
   gnunet-gtk/gnunet-gtk.glade
   gnunet-gtk/src/common/helper.c
   gnunet-gtk/src/common/logging.c
   gnunet-gtk/src/core/main.c
   gnunet-gtk/src/include/gnunetgtk_common.h
   gnunet-gtk/src/plugins/daemon/daemon.c
   gnunet-gtk/src/plugins/fs/Makefile.am
   gnunet-gtk/src/plugins/fs/collection.c
   gnunet-gtk/src/plugins/fs/download.c
   gnunet-gtk/src/plugins/fs/fs.c
   gnunet-gtk/src/plugins/fs/fs.h
   gnunet-gtk/src/plugins/fs/namespace.c
   gnunet-gtk/src/plugins/fs/namespace_search.c
   gnunet-gtk/src/plugins/fs/search.c
   gnunet-gtk/src/plugins/stats/functions.c
Log:
nicer logging

Modified: gnunet-gtk/gnunet-gtk.glade
===================================================================
--- gnunet-gtk/gnunet-gtk.glade 2008-06-07 21:31:20 UTC (rev 7074)
+++ gnunet-gtk/gnunet-gtk.glade 2008-06-07 21:45:51 UTC (rev 7075)
@@ -4,7 +4,6 @@
 <glade-interface>
   <widget class="GtkWindow" id="mainWindow">
     <property name="can_focus">True</property>
-    <property name="has_focus">True</property>
     <property name="can_default">True</property>
     <property name="has_default">True</property>
     <property name="title" translatable="yes">GNUnet, GNU's Peer-to-Peer 
Network</property>
@@ -25,7 +24,6 @@
               <widget class="GtkScrolledWindow" id="welcomeScrolledWindow">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
                 <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
                 <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
                 <child>
@@ -577,43 +575,115 @@
                       <placeholder/>
                     </child>
                     <child>
-                      <widget class="GtkVBox" id="vbox21">
+                      <widget class="GtkScrolledWindow" id="scrolledwindow9">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="shadow_type">GTK_SHADOW_IN</property>
+                        <child>
+                          <widget class="GtkTreeView" 
id="activeSearchesSummary">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="reorderable">True</property>
+                            <property name="rules_hint">True</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label16">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">1</property>
+                        <property name="xpad">5</property>
+                        <property name="ypad">5</property>
+                        <property name="label" 
translatable="yes">&lt;b&gt;Search Overview&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkScrolledWindow" id="scrolledwindow10">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="shadow_type">GTK_SHADOW_IN</property>
+                        <child>
+                          <widget class="GtkTreeView" id="activeDownloadsList">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="reorderable">True</property>
+                            <property name="rules_hint">True</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVBox" id="vbox8">
+                        <property name="visible">True</property>
                         <property name="homogeneous">True</property>
                         <child>
-                          <widget class="GtkButton" id="stopUploadButton">
+                          <widget class="GtkButton" id="abortDownloadButton">
                             <property name="visible">True</property>
                             <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Cancel 
the selected upload (and all sub-uploads) and remove them from the 
list</property>
+                            <property name="tooltip" translatable="yes">Cancel 
the selected download (and all sub-downloads) and delete incomplete 
downloads</property>
+                            <property name="label">gtk-delete</property>
+                            <property name="use_stock">True</property>
+                            <property name="response_id">0</property>
+                            <signal name="clicked" 
handler="on_abortDownloadButton_clicked_"/>
+                          </widget>
+                          <packing>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="stopDownloadButton">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip" translatable="yes">Stop 
the selected download (and all sub-downloads) and remove them from the list.  
This will NOT cause the deletion of files from incomplete downloads.</property>
                             <property name="label">gtk-stop</property>
                             <property name="use_stock">True</property>
                             <property name="response_id">0</property>
-                            <signal name="clicked" 
handler="on_stopUploadButton_clicked_" object="activeUploadsList"/>
+                            <signal name="clicked" 
handler="on_stopDownloadButton_clicked_"/>
                           </widget>
                           <packing>
-                            <property name="expand">False</property>
                             <property name="fill">False</property>
+                            <property name="position">1</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkButton" 
id="clearCompletedUploadsButton">
+                          <widget class="GtkButton" 
id="clearCompletedDownloadsButton">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Clear 
completed uploads from the list</property>
+                            <property name="tooltip" translatable="yes">Clear 
completed downloads from the list</property>
                             <property name="response_id">0</property>
-                            <signal name="clicked" 
handler="on_clearCompletedUploadsButton_clicked_"/>
+                            <signal name="clicked" 
handler="on_clearCompletedDownloadsButton_clicked_"/>
                             <child>
-                              <widget class="GtkAlignment" id="alignment4">
+                              <widget class="GtkAlignment" id="alignment3">
                                 <property name="visible">True</property>
                                 <property 
name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox5">
+                                  <widget class="GtkHBox" id="hbox4">
                                     <property name="visible">True</property>
                                     <property name="spacing">2</property>
                                     <child>
-                                      <widget class="GtkImage" id="image4">
+                                      <widget class="GtkImage" id="image3">
                                         <property 
name="visible">True</property>
                                         <property 
name="stock">gtk-clear</property>
                                       </widget>
@@ -623,7 +693,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label2">
+                                      <widget class="GtkLabel" id="label5">
                                         <property 
name="visible">True</property>
                                         <property name="label" 
translatable="yes">_Clean</property>
                                         <property 
name="use_underline">True</property>
@@ -640,107 +710,22 @@
                             </child>
                           </widget>
                           <packing>
+                            <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">1</property>
+                            <property name="position">2</property>
                           </packing>
                         </child>
                       </widget>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
-                        <property name="top_attach">6</property>
-                        <property name="bottom_attach">7</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
                         <property name="x_options">GTK_FILL</property>
                         <property name="x_padding">5</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="stopSearchButton">
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">True</property>
-                        <property name="tooltip" translatable="yes">Cancel the 
selected search and remove it from the list</property>
-                        <property name="border_width">4</property>
-                        <property name="label">gtk-stop</property>
-                        <property name="use_stock">True</property>
-                        <property name="response_id">0</property>
-                        <signal name="clicked" 
handler="on_closeSearchSummaryButton_clicked_" object="activeSearchesSummary"/>
-                      </widget>
-                      <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>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment14">
-                        <property name="visible">True</property>
-                        <property name="top_padding">5</property>
-                        <child>
-                          <widget class="GtkLabel" id="label46">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="xpad">5</property>
-                            <property name="ypad">5</property>
-                            <property name="label" 
translatable="yes">&lt;b&gt;Publications&lt;/b&gt;</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">5</property>
-                        <property name="bottom_attach">6</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment11">
-                        <property name="visible">True</property>
-                        <property name="top_padding">5</property>
-                        <child>
-                          <widget class="GtkLabel" id="label45">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="xpad">5</property>
-                            <property name="ypad">5</property>
-                            <property name="label" 
translatable="yes">&lt;b&gt;Downloads&lt;/b&gt;</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow8">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="activeUploadsList">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="reorderable">True</property>
-                            <property name="rules_hint">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">6</property>
-                        <property name="bottom_attach">7</property>
-                      </packing>
-                    </child>
-                    <child>
                       <widget class="GtkHBox" id="hbox1">
                         <property name="visible">True</property>
                         <child>
@@ -762,7 +747,6 @@
                           <widget class="GtkEntry" id="statusDownloadURIEntry">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="has_focus">True</property>
                             <property name="activates_default">True</property>
                             <property name="text">gnunet://ecrs/</property>
                           </widget>
@@ -856,58 +840,129 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkVBox" id="vbox8">
+                      <widget class="GtkScrolledWindow" id="scrolledwindow8">
                         <property name="visible">True</property>
-                        <property name="homogeneous">True</property>
+                        <property name="can_focus">False</property>
+                        <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="shadow_type">GTK_SHADOW_IN</property>
                         <child>
-                          <widget class="GtkButton" id="abortDownloadButton">
+                          <widget class="GtkTreeView" id="activeUploadsList">
                             <property name="visible">True</property>
-                            <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Cancel 
the selected download (and all sub-downloads) and delete incomplete 
downloads</property>
-                            <property name="label">gtk-delete</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                            <signal name="clicked" 
handler="on_abortDownloadButton_clicked_"/>
+                            <property name="reorderable">True</property>
+                            <property name="rules_hint">True</property>
                           </widget>
-                          <packing>
-                            <property name="fill">False</property>
-                          </packing>
                         </child>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment11">
+                        <property name="visible">True</property>
+                        <property name="top_padding">5</property>
                         <child>
-                          <widget class="GtkButton" id="stopDownloadButton">
+                          <widget class="GtkLabel" id="label45">
                             <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="xpad">5</property>
+                            <property name="ypad">5</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Downloads&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment14">
+                        <property name="visible">True</property>
+                        <property name="top_padding">5</property>
+                        <child>
+                          <widget class="GtkLabel" id="label46">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="xpad">5</property>
+                            <property name="ypad">5</property>
+                            <property name="label" 
translatable="yes">&lt;b&gt;Publications&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                        <property name="y_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="stopSearchButton">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="tooltip" translatable="yes">Cancel the 
selected search and remove it from the list</property>
+                        <property name="border_width">4</property>
+                        <property name="label">gtk-stop</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                        <signal name="clicked" 
handler="on_closeSearchSummaryButton_clicked_" object="activeSearchesSummary"/>
+                      </widget>
+                      <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>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVBox" id="vbox21">
+                        <property name="visible">True</property>
+                        <property name="homogeneous">True</property>
+                        <child>
+                          <widget class="GtkButton" id="stopUploadButton">
+                            <property name="visible">True</property>
                             <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Stop 
the selected download (and all sub-downloads) and remove them from the list.  
This will NOT cause the deletion of files from incomplete downloads.</property>
+                            <property name="tooltip" translatable="yes">Cancel 
the selected upload (and all sub-uploads) and remove them from the 
list</property>
                             <property name="label">gtk-stop</property>
                             <property name="use_stock">True</property>
                             <property name="response_id">0</property>
-                            <signal name="clicked" 
handler="on_stopDownloadButton_clicked_"/>
+                            <signal name="clicked" 
handler="on_stopUploadButton_clicked_" object="activeUploadsList"/>
                           </widget>
                           <packing>
+                            <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">1</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkButton" 
id="clearCompletedDownloadsButton">
+                          <widget class="GtkButton" 
id="clearCompletedUploadsButton">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Clear 
completed downloads from the list</property>
+                            <property name="tooltip" translatable="yes">Clear 
completed uploads from the list</property>
                             <property name="response_id">0</property>
-                            <signal name="clicked" 
handler="on_clearCompletedDownloadsButton_clicked_"/>
+                            <signal name="clicked" 
handler="on_clearCompletedUploadsButton_clicked_"/>
                             <child>
-                              <widget class="GtkAlignment" id="alignment3">
+                              <widget class="GtkAlignment" id="alignment4">
                                 <property name="visible">True</property>
                                 <property 
name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox4">
+                                  <widget class="GtkHBox" id="hbox5">
                                     <property name="visible">True</property>
                                     <property name="spacing">2</property>
                                     <child>
-                                      <widget class="GtkImage" id="image3">
+                                      <widget class="GtkImage" id="image4">
                                         <property 
name="visible">True</property>
                                         <property 
name="stock">gtk-clear</property>
                                       </widget>
@@ -917,7 +972,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label5">
+                                      <widget class="GtkLabel" id="label2">
                                         <property 
name="visible">True</property>
                                         <property name="label" 
translatable="yes">_Clean</property>
                                         <property 
name="use_underline">True</property>
@@ -934,85 +989,26 @@
                             </child>
                           </widget>
                           <packing>
-                            <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">2</property>
+                            <property name="position">1</property>
                           </packing>
                         </child>
                       </widget>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
                         <property name="x_options">GTK_FILL</property>
                         <property name="x_padding">5</property>
                       </packing>
                     </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow10">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" id="activeDownloadsList">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="reorderable">True</property>
-                            <property name="rules_hint">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label16">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="yalign">1</property>
-                        <property name="xpad">5</property>
-                        <property name="ypad">5</property>
-                        <property name="label" 
translatable="yes">&lt;b&gt;Search Overview&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="right_attach">2</property>
-                        <property name="y_options">GTK_FILL</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow9">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_IN</property>
-                        <child>
-                          <widget class="GtkTreeView" 
id="activeSearchesSummary">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="reorderable">True</property>
-                            <property name="rules_hint">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
                   </widget>
                 </child>
                 <child>
                   <widget class="GtkHBox" id="hbox44">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="has_focus">True</property>
                     <child>
                       <widget class="GtkImage" id="image27">
                         <property name="visible">True</property>
@@ -1293,52 +1289,80 @@
                           <placeholder/>
                         </child>
                         <child>
-                          <widget class="GtkAlignment" id="alignment8">
+                          <widget class="GtkLabel" id="methodLabel">
                             <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
                             <property name="xalign">0</property>
-                            <property name="xscale">0</property>
-                            <child>
-                              <widget class="GtkSpinButton" 
id="contentPrioritySpinButton">
-                                <property name="width_request">94</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="tooltip" 
translatable="yes">How important is the file (used to prioritize data in the 
local datastore).</property>
-                                <property name="adjustment">950 0 100000000 50 
500 500</property>
-                                <property name="climb_rate">500</property>
-                                <property name="numeric">True</property>
-                              </widget>
-                            </child>
+                            <property name="xpad">5</property>
+                            <property name="label" 
translatable="yes">Method:</property>
+                            <property name="use_underline">True</property>
+                            <property 
name="mnemonic_widget">indexbutton</property>
                           </widget>
                           <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkRadioButton" id="indexbutton">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip" 
translatable="yes">Indexing will avoid copying the file into the GNUnet 
database.  Instead, GNUnet will try to add a symbolic link to the specified 
file.  If that fails, a copy of the file will be created.  Indexing should be 
used if the local machine is unlikely to ever be compromised by an adversary 
and if the uploaded file will not be modified or moved in the future.  Indexing 
is more efficient than insertion.</property>
+                            <property name="label" 
translatable="yes">Inde_x</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
                             <property name="left_attach">1</property>
                             <property name="right_attach">2</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkAlignment" id="alignment7">
+                          <widget class="GtkRadioButton" id="insertButton">
                             <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip" 
translatable="yes">Inserting a file means that an encrypted copy will be added 
to the GNUnet database.  Without the proper key (which is not stored in 
plaintext anywhere) the file cannot be decrypted.  Use this option for small 
files, files that will be modified soon, files that maybe moved or if you are 
afraid that an adversary may detect the file in plaintext on your machine 
(after compromising your machine).</property>
+                            <property name="label" 
translatable="yes">I_nsert</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">indexbutton</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="scopeLabel">
+                            <property name="visible">True</property>
                             <property name="xalign">0</property>
-                            <property name="xscale">0</property>
-                            <child>
-                              <widget class="GtkSpinButton" 
id="uploadAnonymityLevelSpinButton">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="tooltip" 
translatable="yes">What level of sender-anonymity is desired when sharing this 
particular file?  0 allows direct connections (no anonymity).  Higher levels 
require increasing amounts of cover traffic per shared block, increasing your 
privacy at the expense of efficiency.</property>
-                                <property name="adjustment">1 0 10000 1 10 
10</property>
-                                <property name="climb_rate">1</property>
-                                <property name="numeric">True</property>
-                              </widget>
-                            </child>
+                            <property name="xpad">5</property>
+                            <property name="label" 
translatable="yes">Scope:</property>
+                            <property name="use_underline">True</property>
+                            <property 
name="mnemonic_widget">scopeFileOnlyButton</property>
                           </widget>
                           <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>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="anonymityUploadLabel">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="xpad">5</property>
+                            <property name="label" 
translatable="yes">_Anonymity:</property>
+                            <property name="use_underline">True</property>
+                          </widget>
+                          <packing>
                             <property name="top_attach">2</property>
                             <property name="bottom_attach">3</property>
                             <property name="x_options">GTK_FILL</property>
@@ -1346,24 +1370,43 @@
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkCheckButton" 
id="doExtractCheckButton">
+                          <widget class="GtkRadioButton" 
id="scopeRecursiveButton">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" 
translatable="yes">Controls if GNUnet should (automatically) extract metadata 
for files.  If unchecked, the default metadata for the upload will only contain 
the filename.  If checked, GNU libextractor will be used to provide additional 
metadata (such as thumbnails).  The option only applies when a directory is 
uploaded.  For individual files, GNU libextractor is always used (you will have 
a chance to edit the extracted metadata in a dialog).</property>
+                            <property name="tooltip" 
translatable="yes">Recursively publish an entire directory tree</property>
+                            <property name="label" 
translatable="yes">_Recursive (for entire directories)</property>
+                            <property name="use_underline">True</property>
                             <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <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>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" 
id="deepIndexCheckButton">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip" translatable="yes">Should 
it be possible to directly find files in the directory?  If unchecked, it will 
only be possible for the directory itself to be found with a normal keyword 
search.  This option only really makes a difference for uploads of 
directories.</property>
+                            <property name="response_id">0</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <child>
-                              <widget class="GtkAlignment" id="alignment24">
+                              <widget class="GtkAlignment" id="alignment15">
                                 <property name="visible">True</property>
                                 <property name="xscale">0</property>
                                 <property name="yscale">0</property>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox66">
+                                  <widget class="GtkHBox" id="hbox52">
                                     <property name="visible">True</property>
                                     <property name="spacing">2</property>
                                     <child>
-                                      <widget class="GtkImage" id="image49">
+                                      <widget class="GtkImage" id="image40">
                                         <property 
name="visible">True</property>
                                         <property 
name="stock">gtk-index</property>
                                       </widget>
@@ -1373,9 +1416,9 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label151">
+                                      <widget class="GtkLabel" id="label128">
                                         <property 
name="visible">True</property>
-                                        <property name="label" 
translatable="yes">Use libextractor for files in directories</property>
+                                        <property name="label" 
translatable="yes">Add keywords for files in directories</property>
                                         <property 
name="use_underline">True</property>
                                       </widget>
                                       <packing>
@@ -1392,48 +1435,28 @@
                           <packing>
                             <property name="left_attach">2</property>
                             <property name="right_attach">3</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkRadioButton" 
id="scopeFileOnlyButton">
+                          <widget class="GtkButton" id="fsinsertuploadbutton">
                             <property name="visible">True</property>
+                            <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Only 
publish a single file</property>
-                            <property name="label" translatable="yes">File 
onl_y</property>
-                            <property name="use_underline">True</property>
+                            <property name="tooltip" translatable="yes">Share 
the specified file with the selected options (you will then be prompted to 
enter meta-data and keywords)</property>
                             <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property 
name="group">scopeRecursiveButton</property>
-                          </widget>
-                          <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>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" 
id="mainFileSharingInsertBrowseButton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Browse 
local computer for files (or directories) to publish</property>
-                            <property name="response_id">0</property>
-                            <signal name="clicked" 
handler="on_mainFileSharingInsertBrowseButton_clicked_" 
object="fsinsertfilenamecombo"/>
+                            <signal name="clicked" 
handler="on_fsinsertuploadbutton_clicked_"/>
                             <child>
-                              <widget class="GtkHBox" id="hbox60">
+                              <widget class="GtkHBox" id="hbox55">
                                 <property name="visible">True</property>
                                 <property name="spacing">2</property>
                                 <child>
-                                  <widget class="GtkImage" id="image46">
+                                  <widget class="GtkImage" id="image42">
                                     <property name="visible">True</property>
-                                    <property name="stock">gtk-open</property>
+                                    <property name="stock">gtk-go-up</property>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>
@@ -1441,9 +1464,9 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label143">
+                                  <widget class="GtkLabel" id="label137">
                                     <property name="visible">True</property>
-                                    <property name="label" 
translatable="yes">_Browse</property>
+                                    <property name="label" 
translatable="yes">Pub_lish</property>
                                     <property 
name="use_underline">True</property>
                                   </widget>
                                   <packing>
@@ -1458,32 +1481,26 @@
                           <packing>
                             <property name="left_attach">2</property>
                             <property name="right_attach">3</property>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
+                            <property name="top_attach">5</property>
+                            <property name="bottom_attach">6</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkAlignment" 
id="uploadFilenameAlignment">
+                          <widget class="GtkLabel" id="uploadFilenameLabel">
                             <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkComboBoxEntry" 
id="uploadFilenameComboBoxEntry">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <signal name="changed" 
handler="on_uploadFilenameComboBoxEntry_changed_"/>
-                                <child internal-child="entry">
-                                  <widget class="GtkEntry" 
id="comboboxentry-entry3">
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="xpad">5</property>
+                            <property name="label" 
translatable="yes">_Filename:</property>
+                            <property name="use_underline">True</property>
+                            <property 
name="justify">GTK_JUSTIFY_CENTER</property>
+                            <property 
name="mnemonic_widget">uploadFilenameComboBoxEntry</property>
                           </widget>
                           <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
                             <property name="top_attach">4</property>
                             <property name="bottom_attach">5</property>
+                            <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
@@ -1503,38 +1520,43 @@
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkLabel" id="uploadFilenameLabel">
+                          <widget class="GtkAlignment" 
id="uploadFilenameAlignment">
                             <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="xpad">5</property>
-                            <property name="label" 
translatable="yes">_Filename:</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="justify">GTK_JUSTIFY_CENTER</property>
-                            <property 
name="mnemonic_widget">uploadFilenameComboBoxEntry</property>
+                            <child>
+                              <widget class="GtkComboBoxEntry" 
id="uploadFilenameComboBoxEntry">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <signal name="changed" 
handler="on_uploadFilenameComboBoxEntry_changed_"/>
+                                <child internal-child="entry">
+                                  <widget class="GtkEntry" 
id="comboboxentry-entry3">
+                                  </widget>
+                                </child>
+                              </widget>
+                            </child>
                           </widget>
                           <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
                             <property name="top_attach">4</property>
                             <property name="bottom_attach">5</property>
-                            <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkButton" id="fsinsertuploadbutton">
+                          <widget class="GtkButton" 
id="mainFileSharingInsertBrowseButton">
                             <property name="visible">True</property>
-                            <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Share 
the specified file with the selected options (you will then be prompted to 
enter meta-data and keywords)</property>
+                            <property name="tooltip" translatable="yes">Browse 
local computer for files (or directories) to publish</property>
                             <property name="response_id">0</property>
-                            <signal name="clicked" 
handler="on_fsinsertuploadbutton_clicked_"/>
+                            <signal name="clicked" 
handler="on_mainFileSharingInsertBrowseButton_clicked_" 
object="fsinsertfilenamecombo"/>
                             <child>
-                              <widget class="GtkHBox" id="hbox55">
+                              <widget class="GtkHBox" id="hbox60">
                                 <property name="visible">True</property>
                                 <property name="spacing">2</property>
                                 <child>
-                                  <widget class="GtkImage" id="image42">
+                                  <widget class="GtkImage" id="image46">
                                     <property name="visible">True</property>
-                                    <property name="stock">gtk-go-up</property>
+                                    <property name="stock">gtk-open</property>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>
@@ -1542,9 +1564,9 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label137">
+                                  <widget class="GtkLabel" id="label143">
                                     <property name="visible">True</property>
-                                    <property name="label" 
translatable="yes">Pub_lish</property>
+                                    <property name="label" 
translatable="yes">_Browse</property>
                                     <property 
name="use_underline">True</property>
                                   </widget>
                                   <packing>
@@ -1559,31 +1581,52 @@
                           <packing>
                             <property name="left_attach">2</property>
                             <property name="right_attach">3</property>
-                            <property name="top_attach">5</property>
-                            <property name="bottom_attach">6</property>
+                            <property name="top_attach">4</property>
+                            <property name="bottom_attach">5</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkCheckButton" 
id="deepIndexCheckButton">
+                          <widget class="GtkRadioButton" 
id="scopeFileOnlyButton">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="tooltip" translatable="yes">Should 
it be possible to directly find files in the directory?  If unchecked, it will 
only be possible for the directory itself to be found with a normal keyword 
search.  This option only really makes a difference for uploads of 
directories.</property>
+                            <property name="tooltip" translatable="yes">Only 
publish a single file</property>
+                            <property name="label" translatable="yes">File 
onl_y</property>
+                            <property name="use_underline">True</property>
                             <property name="response_id">0</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
+                            <property 
name="group">scopeRecursiveButton</property>
+                          </widget>
+                          <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>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkCheckButton" 
id="doExtractCheckButton">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="tooltip" 
translatable="yes">Controls if GNUnet should (automatically) extract metadata 
for files.  If unchecked, the default metadata for the upload will only contain 
the filename.  If checked, GNU libextractor will be used to provide additional 
metadata (such as thumbnails).  The option only applies when a directory is 
uploaded.  For individual files, GNU libextractor is always used (you will have 
a chance to edit the extracted metadata in a dialog).</property>
+                            <property name="response_id">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
                             <child>
-                              <widget class="GtkAlignment" id="alignment15">
+                              <widget class="GtkAlignment" id="alignment24">
                                 <property name="visible">True</property>
                                 <property name="xscale">0</property>
                                 <property name="yscale">0</property>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox52">
+                                  <widget class="GtkHBox" id="hbox66">
                                     <property name="visible">True</property>
                                     <property name="spacing">2</property>
                                     <child>
-                                      <widget class="GtkImage" id="image40">
+                                      <widget class="GtkImage" id="image49">
                                         <property 
name="visible">True</property>
                                         <property 
name="stock">gtk-index</property>
                                       </widget>
@@ -1593,9 +1636,9 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label128">
+                                      <widget class="GtkLabel" id="label151">
                                         <property 
name="visible">True</property>
-                                        <property name="label" 
translatable="yes">Add keywords for files in directories</property>
+                                        <property name="label" 
translatable="yes">Use libextractor for files in directories</property>
                                         <property 
name="use_underline">True</property>
                                       </widget>
                                       <packing>
@@ -1612,40 +1655,32 @@
                           <packing>
                             <property name="left_attach">2</property>
                             <property name="right_attach">3</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkRadioButton" 
id="scopeRecursiveButton">
+                          <widget class="GtkAlignment" id="alignment7">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="tooltip" 
translatable="yes">Recursively publish an entire directory tree</property>
-                            <property name="label" 
translatable="yes">_Recursive (for entire directories)</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <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>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="anonymityUploadLabel">
-                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
                             <property name="xalign">0</property>
-                            <property name="xpad">5</property>
-                            <property name="label" 
translatable="yes">_Anonymity:</property>
-                            <property name="use_underline">True</property>
+                            <property name="xscale">0</property>
+                            <child>
+                              <widget class="GtkSpinButton" 
id="uploadAnonymityLevelSpinButton">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="tooltip" 
translatable="yes">What level of sender-anonymity is desired when sharing this 
particular file?  0 allows direct connections (no anonymity).  Higher levels 
require increasing amounts of cover traffic per shared block, increasing your 
privacy at the expense of efficiency.</property>
+                                <property name="adjustment">1 0 10000 1 10 
10</property>
+                                <property name="climb_rate">1</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                            </child>
                           </widget>
                           <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
                             <property name="top_attach">2</property>
                             <property name="bottom_attach">3</property>
                             <property name="x_options">GTK_FILL</property>
@@ -1653,71 +1688,32 @@
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkLabel" id="scopeLabel">
+                          <widget class="GtkAlignment" id="alignment8">
                             <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
                             <property name="xalign">0</property>
-                            <property name="xpad">5</property>
-                            <property name="label" 
translatable="yes">Scope:</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">scopeFileOnlyButton</property>
+                            <property name="xscale">0</property>
+                            <child>
+                              <widget class="GtkSpinButton" 
id="contentPrioritySpinButton">
+                                <property name="width_request">94</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="tooltip" 
translatable="yes">How important is the file (used to prioritize data in the 
local datastore).</property>
+                                <property name="adjustment">950 0 100000000 50 
500 500</property>
+                                <property name="climb_rate">500</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                            </child>
                           </widget>
                           <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="insertButton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="tooltip" 
translatable="yes">Inserting a file means that an encrypted copy will be added 
to the GNUnet database.  Without the proper key (which is not stored in 
plaintext anywhere) the file cannot be decrypted.  Use this option for small 
files, files that will be modified soon, files that maybe moved or if you are 
afraid that an adversary may detect the file in plaintext on your machine 
(after compromising your machine).</property>
-                            <property name="label" 
translatable="yes">I_nsert</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">indexbutton</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkRadioButton" id="indexbutton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="tooltip" 
translatable="yes">Indexing will avoid copying the file into the GNUnet 
database.  Instead, GNUnet will try to add a symbolic link to the specified 
file.  If that fails, a copy of the file will be created.  Indexing should be 
used if the local machine is unlikely to ever be compromised by an adversary 
and if the uploaded file will not be modified or moved in the future.  Indexing 
is more efficient than insertion.</property>
-                            <property name="label" 
translatable="yes">Inde_x</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
                             <property name="left_attach">1</property>
                             <property name="right_attach">2</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="methodLabel">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="xpad">5</property>
-                            <property name="label" 
translatable="yes">Method:</property>
-                            <property name="use_underline">True</property>
-                            <property 
name="mnemonic_widget">indexbutton</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -2111,51 +2107,6 @@
                       <placeholder/>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">_Room 
Name</property>
-                        <property name="use_underline">True</property>
-                        <property 
name="mnemonic_widget">chatRoomNameEntry</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label4">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" 
translatable="yes">_Moniker</property>
-                        <property name="use_underline">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="chatRoomNameEntry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="chatRoomMonikerEntry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
-                      </widget>
-                      <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>
                       <widget class="GtkButton" id="on_chat_room_name_button">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -2202,6 +2153,51 @@
                         <property name="y_options"></property>
                       </packing>
                     </child>
+                    <child>
+                      <widget class="GtkEntry" id="chatRoomMonikerEntry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
+                      </widget>
+                      <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>
+                      <widget class="GtkEntry" id="chatRoomNameEntry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" 
translatable="yes">_Moniker</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">_Room 
Name</property>
+                        <property name="use_underline">True</property>
+                        <property 
name="mnemonic_widget">chatRoomNameEntry</property>
+                      </widget>
+                    </child>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
@@ -2356,6 +2352,57 @@
                 <property name="tab_fill">False</property>
               </packing>
             </child>
+            <child>
+              <widget class="GtkScrolledWindow" 
id="messageWindowScrolledWindow">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property 
name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <property 
name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <child>
+                  <widget class="GtkTextView" id="messageWindowTextView">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="editable">False</property>
+                    <property name="wrap_mode">GTK_WRAP_WORD</property>
+                    <property name="cursor_visible">False</property>
+                    <property name="accepts_tab">False</property>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">6</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="hbox9">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkImage" id="image8">
+                    <property name="visible">True</property>
+                    <property name="stock">gtk-dialog-info</property>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="labelPeers1">
+                    <property name="visible">True</property>
+                    <property name="xpad">5</property>
+                    <property name="label" translatable="yes">_Logs</property>
+                    <property name="use_underline">True</property>
+                    <property name="justify">GTK_JUSTIFY_CENTER</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">6</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
           </widget>
         </child>
         <child>
@@ -2877,8 +2924,8 @@
                 <property name="response_id">-5</property>
                 <signal name="clicked" handler="gtk_widget_destroy" 
object="metaDisplayDialog"/>
                 <signal name="activate" handler="gtk_widget_destroy" 
object="metaDisplayDialog"/>
-                <accelerator key="Return" modifiers="" signal="activate"/>
                 <accelerator key="Escape" modifiers="" signal="activate"/>
+                <accelerator key="Return" modifiers="" signal="activate"/>
               </widget>
             </child>
           </widget>
@@ -4205,54 +4252,6 @@
       </widget>
     </child>
   </widget>
-  <widget class="GtkWindow" id="statusWindow">
-    <property name="width_request">780</property>
-    <property name="height_request">300</property>
-    <property name="border_width">5</property>
-    <property name="type">GTK_WINDOW_POPUP</property>
-    <property name="title" translatable="yes">Messages</property>
-    <property name="window_position">GTK_WIN_POS_CENTER</property>
-    <property name="icon_name">gtk-dialog-info</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_NOTIFICATION</property>
-    <property name="focus_on_map">False</property>
-    <child>
-      <widget class="GtkVBox" id="vbox16">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkScrolledWindow" id="messageWindowScrolledWindow">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <child>
-              <widget class="GtkTextView" id="messageWindowTextView">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="wrap_mode">GTK_WRAP_WORD</property>
-                <property name="cursor_visible">False</property>
-                <property name="accepts_tab">False</property>
-              </widget>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkButton" id="messageWindowCloseButton">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="label">gtk-close</property>
-            <property name="use_stock">True</property>
-            <property name="response_id">0</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
   <widget class="GtkDialog" id="namespaceInsertDialog">
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Add File to Namespace</property>
@@ -4913,9 +4912,9 @@
     <property name="modal">True</property>
     <property name="icon_name">gtk-save-as</property>
     <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="show_hidden">True</property>
-    <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property>
     <property name="do_overwrite_confirmation">True</property>
+    <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property>
+    <property name="show_hidden">True</property>
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox7">
         <property name="visible">True</property>

Modified: gnunet-gtk/src/common/helper.c
===================================================================
--- gnunet-gtk/src/common/helper.c      2008-06-07 21:31:20 UTC (rev 7074)
+++ gnunet-gtk/src/common/helper.c      2008-06-07 21:45:51 UTC (rev 7075)
@@ -90,8 +90,6 @@
 
 static void *shutdown_function;
 
-static struct GNUNET_GE_Context *ectx;
-
 static struct GNUNET_GC_Configuration *cfg;
 
 static struct GNUNET_CronManager *cron;
@@ -234,7 +232,7 @@
       if ((module == NULL) ||
           (TRUE != g_module_symbol (module, handler_name, &method)))
         {
-          GNUNET_GE_LOG (ectx,
+          GNUNET_GE_LOG (NULL,
                          GNUNET_GE_WARNING | GNUNET_GE_DEVELOPER |
                          GNUNET_GE_IMMEDIATE,
                          _("Failed to find handler for `%s'\n"),
@@ -265,7 +263,7 @@
   struct GNUNET_PluginHandle *lib;
   InitCall init;
 
-  lib = GNUNET_plugin_load (ectx, "libgnunetgtkmodule_", name);
+  lib = GNUNET_plugin_load (NULL, "libgnunetgtkmodule_", name);
   if (lib == NULL)
     return;
   p = GNUNET_malloc (sizeof (Plugin));
@@ -275,7 +273,7 @@
   plugin = p;
   init = GNUNET_plugin_resolve_function (lib, "init_", GNUNET_NO);
   if (init != NULL)
-    init (ectx, cfg);
+    init (NULL, cfg);
 }
 
 static void
@@ -330,21 +328,19 @@
 }
 
 void
-GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *e,
-                                      struct GNUNET_GC_Configuration *c,
+GNUNET_GTK_initialize_common_library (struct GNUNET_GC_Configuration *c,
                                       void *callback)
 {
   char *load;
   char *path;
   char *filename;
 
-  ectx = e;
   cfg = c;
   shutdown_function = callback;
   sclock = GNUNET_mutex_create (GNUNET_YES);
   mainThread = GNUNET_thread_get_self ();
   saveCallsUp = GNUNET_YES;
-  cron = GNUNET_cron_create (ectx);
+  cron = GNUNET_cron_create (NULL);
 
   /* load the interface */
   path = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
@@ -364,7 +360,7 @@
 
   mainXML = glade_xml_new (gladeFile, "mainWindow", PACKAGE_NAME);
   if (mainXML == NULL)
-    GNUNET_GE_DIE_STRERROR_FILE (ectx,
+    GNUNET_GE_DIE_STRERROR_FILE (NULL,
                                  GNUNET_GE_FATAL | GNUNET_GE_USER |
                                  GNUNET_GE_IMMEDIATE, "glade_xml_new",
                                  gladeFile);
@@ -463,7 +459,7 @@
   cls.arg = arg;
   doneThread = GNUNET_thread_create (&shutdownCode, &cls, 64 * 1024);
   if (doneThread == NULL)
-    GNUNET_GE_DIE_STRERROR (ectx,
+    GNUNET_GE_DIE_STRERROR (NULL,
                             GNUNET_GE_FATAL | GNUNET_GE_ADMIN |
                             GNUNET_GE_BULK, "pthread_create");
   if (!GNUNET_thread_test_self (mainThread))
@@ -521,7 +517,7 @@
       if (!notify_init ("gnunet-gtk"))
         {
           once = 1;
-          GNUNET_GE_LOG (ectx,
+          GNUNET_GE_LOG (NULL,
                          GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER |
                          GNUNET_GE_ADMIN,
                          _("Could not initialize libnotify\n"));
@@ -557,7 +553,7 @@
       if (!notify_notification_show (libnotify, NULL))
         {
           once = 1;
-          GNUNET_GE_LOG (ectx,
+          GNUNET_GE_LOG (NULL,
                          GNUNET_GE_WARNING | GNUNET_GE_USER | GNUNET_GE_ADMIN
                          | GNUNET_GE_BULK,
                          _("Could not send notification via libnotify\n"));

Modified: gnunet-gtk/src/common/logging.c
===================================================================
--- gnunet-gtk/src/common/logging.c     2008-06-07 21:31:20 UTC (rev 7074)
+++ gnunet-gtk/src/common/logging.c     2008-06-07 21:45:51 UTC (rev 7075)
@@ -30,49 +30,18 @@
 #include <glib.h>
 #include <gmodule.h>
 
-static GtkWidget *infoWindow;
-
 static GtkWidget *infoWindowTextView;
 
-static GladeXML *statusXML;
-
 static void
 init ()
 {
-  GtkWidget *button;
-
-  if (statusXML != NULL)
+  if (infoWindowTextView != NULL)
     return;
-  statusXML
-    =
-    glade_xml_new (GNUNET_GTK_get_glade_filename (), "statusWindow",
-                   PACKAGE_NAME);
-  infoWindow = glade_xml_get_widget (statusXML, "statusWindow");
   infoWindowTextView
-    = glade_xml_get_widget (statusXML, "messageWindowTextView");
-  button = glade_xml_get_widget (statusXML, "messageWindowCloseButton");
-  GNUNET_GTK_connect_glade_with_plugins (statusXML);
-
-  g_signal_connect_data (infoWindow,
-                         "delete-event",
-                         G_CALLBACK (&gtk_widget_hide_on_delete),
-                         NULL, NULL, 0);
-  g_signal_connect_data (button,
-                         "clicked",
-                         G_CALLBACK (&gtk_widget_hide_on_delete),
-                         infoWindow, NULL, G_CONNECT_SWAPPED);
+    = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML(),
+                           "messageWindowTextView");
 }
-
 /**
- * Closure for doInfoMessage.
- */
-typedef struct
-{
-  int doPopup;
-  char *note;
-} InfoMessage;
-
-/**
  * Do not track more than MAX messages
  */
 #define MAX_LINES 1000
@@ -83,49 +52,40 @@
 static void *
 doInfoMessage (void *args)
 {
-  const InfoMessage *info = args;
+  char * note = args;
   GtkTextIter iter;
   GtkTextBuffer *buffer;
   GtkTextIter end;
 
   init ();
-  if (info->doPopup == GNUNET_YES)
-    gtk_widget_show (infoWindow);
   buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (infoWindowTextView));
-  gtk_text_buffer_get_iter_at_offset (buffer, &iter, -1);
-  gtk_text_buffer_insert (buffer, &iter, info->note, -1);
+  gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
+  gtk_text_buffer_insert (buffer, &iter, note, -1);
   if (gtk_text_buffer_get_line_count (buffer) >= MAX_LINES)
     {
-      gtk_text_buffer_get_iter_at_line (buffer, &iter, MAX_LINES - 1);
-      gtk_text_buffer_get_iter_at_line (buffer, &end, MAX_LINES);
+      gtk_text_buffer_get_iter_at_line (buffer, &iter, MAX_LINES-1);
+      gtk_text_buffer_get_iter_at_line (buffer, &end, -1);
       gtk_text_buffer_delete (buffer, &iter, &end);
     }
   return NULL;
 }
 
-void
-GNUNET_GTK_hide_info_window()
-{
-  gtk_widget_hide (infoWindow);
-}
-
 /**
  * Appends a message to the info window
  *
  * @param doPopup do we open the window, GNUNET_YES or GNUNET_NO
  */
 void
-GNUNET_GTK_show_info_message (int doPopup, const char *format, ...)
+GNUNET_GTK_show_info_message (const char *format, ...)
 {
   va_list args;
-  InfoMessage info;
+  gchar * note;
 
   va_start (args, format);
-  info.note = g_strdup_vprintf (format, args);
+  note = g_strdup_vprintf (format, args);
   va_end (args);
-  info.doPopup = doPopup;
-  GNUNET_GTK_save_call (&doInfoMessage, &info);
-  g_free (info.note);
+  GNUNET_GTK_save_call (&doInfoMessage, note);
+  g_free (note);
 }
 
 static void *
@@ -169,8 +129,8 @@
   va_start (args, txt);
   note = g_strdup_vprintf (txt, args);
   va_end (args);
-  GNUNET_GTK_show_info_message (GNUNET_NO, note);
-  GNUNET_GTK_save_call (&saveAddLogEntry, (void *) note);
+  GNUNET_GTK_save_call (&doInfoMessage, note);
+  GNUNET_GTK_save_call (&saveAddLogEntry, note);
   g_free (note);
 }
 
@@ -178,12 +138,7 @@
 ge_gtk_log_handler (void *ctx,
                     GNUNET_GE_KIND kind, const char *date, const char *msg)
 {
-  int popUp;
-
-  popUp = GNUNET_NO;
-  if ((kind & (GNUNET_GE_FATAL | GNUNET_GE_ERROR | GNUNET_GE_WARNING)) > 0)
-    popUp = GNUNET_YES;
-  GNUNET_GTK_show_info_message (popUp, "%s: %s", date, msg);
+  GNUNET_GTK_show_info_message ("%s: %s", date, msg);
 }
 
 struct GNUNET_GE_Context *
@@ -197,13 +152,4 @@
   return myLog;
 }
 
-void __attribute__ ((destructor)) GNUNET_GTK_common_ltdl_fini ()
-{
-  if (statusXML != NULL)
-    {
-      gtk_widget_destroy (infoWindow);
-      infoWindow = NULL;
-      UNREF (statusXML);
-      statusXML = NULL;
-    }
-}
+/* end of logging.c */

Modified: gnunet-gtk/src/core/main.c
===================================================================
--- gnunet-gtk/src/core/main.c  2008-06-07 21:31:20 UTC (rev 7074)
+++ gnunet-gtk/src/core/main.c  2008-06-07 21:45:51 UTC (rev 7075)
@@ -119,7 +119,7 @@
   bind_textdomain_codeset ("GNUnet", "UTF-8");
   bind_textdomain_codeset ("gnunet-gtk", "UTF-8");
 #endif
-  GNUNET_GTK_initialize_common_library (ectx, cfg, &GNUNET_GTK_main_quit);
+  GNUNET_GTK_initialize_common_library (cfg, &GNUNET_GTK_main_quit);
   /* configure GTK logging */
   GNUNET_GC_get_configuration_value_string (cfg,
                                             "LOGGING",
@@ -140,7 +140,6 @@
   dataDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
   gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), dataDir);
   GNUNET_free (dataDir);
-  GNUNET_GTK_hide_info_window();
   gtk_window_maximize (GTK_WINDOW (root));
   gtk_widget_show (root);
   gtk_window_present (GTK_WINDOW (root));

Modified: gnunet-gtk/src/include/gnunetgtk_common.h
===================================================================
--- gnunet-gtk/src/include/gnunetgtk_common.h   2008-06-07 21:31:20 UTC (rev 
7074)
+++ gnunet-gtk/src/include/gnunetgtk_common.h   2008-06-07 21:45:51 UTC (rev 
7075)
@@ -44,8 +44,7 @@
 #endif
 
 
-void GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *ectx,
-                                           struct GNUNET_GC_Configuration
+void GNUNET_GTK_initialize_common_library (struct GNUNET_GC_Configuration
                                            *cfg, void *callback);
 
 void GNUNET_GTK_shutdown_plugins (void);
@@ -79,7 +78,7 @@
  * @param doPopup if GNUNET_YES, the info window will
  *   be opened
  */
-void GNUNET_GTK_show_info_message (int doPopup, const char *format, ...);
+void GNUNET_GTK_show_info_message (const char *format, ...);
 
 /**
  * Appends a log entry to the info window
@@ -90,9 +89,6 @@
  */
 void GNUNET_GTK_add_log_entry (const char *txt, ...);
 
-void
-GNUNET_GTK_hide_info_window(void);
-
 struct GNUNET_GE_Context *GNUNET_GTK_create_gtk_logger (GNUNET_GE_KIND mask);
 
 #define GNUNET_GTK_NOTIFY_LEVEL_LOW 0

Modified: gnunet-gtk/src/plugins/daemon/daemon.c
===================================================================
--- gnunet-gtk/src/plugins/daemon/daemon.c      2008-06-07 21:31:20 UTC (rev 
7074)
+++ gnunet-gtk/src/plugins/daemon/daemon.c      2008-06-07 21:45:51 UTC (rev 
7075)
@@ -47,21 +47,38 @@
 static struct GNUNET_GC_Configuration *cfg;
 
 /**
+ * Do the actual update (in event thread).
+ */
+static void *
+updateAppModelSafe (void *arg)
+{
+  GtkWidget *w;
+  GtkListStore *model = arg;
+
+  w =
+    glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
+                          "applicationList");
+  gtk_tree_view_set_model (GTK_TREE_VIEW (w), GTK_TREE_MODEL (model));
+  gtk_tree_selection_set_mode (gtk_tree_view_get_selection
+                               (GTK_TREE_VIEW (w)), GTK_SELECTION_NONE);
+  return NULL;
+}
+
+/**
  * cron job that periodically updates the model for the
  * application list.
  */
-static void *
-updateAppModelSafe (void *unused)
+static void
+updateAppModel (void *dummy)
 {
   struct GNUNET_ClientServerConnection *sock;
-  GtkWidget *w;
-  GtkListStore *model;
   GtkTreeIter iter;
   char *apps;
   char *next;
   char *pos;
   char *desc;
-
+  GtkListStore *model;
+  
   model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
   apps = NULL;
   sock = GNUNET_client_connection_create (ectx, cfg);
@@ -102,24 +119,12 @@
       while (next != NULL);
       GNUNET_free (apps);
     }
-  w =
-    glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
-                          "applicationList");
-  gtk_tree_view_set_model (GTK_TREE_VIEW (w), GTK_TREE_MODEL (model));
-  gtk_tree_selection_set_mode (gtk_tree_view_get_selection
-                               (GTK_TREE_VIEW (w)), GTK_SELECTION_NONE);
+  GNUNET_client_connection_destroy (sock);
+  GNUNET_GTK_save_call (&updateAppModelSafe, model);
   g_object_unref (model);
-  GNUNET_client_connection_destroy (sock);
-  return NULL;
 }
 
-static void
-updateAppModel (void *dummy)
-{
-  GNUNET_GTK_save_call (&updateAppModelSafe, NULL);
-}
 
-
 static void *
 doUpdateMenus (void *arg)
 {
@@ -166,7 +171,6 @@
         isLocal = FALSE;
       GNUNET_free (host);
     }
-  updateAppModelSafe (NULL);
   if (ret == 0)
     {
       canStart = 0;
@@ -238,15 +242,24 @@
   return NULL;
 }
 
+/**
+ * Cron job that checks if the daemon is running.
+ */
 static void
 cronCheckDaemon (void *dummy)
 {
+  static int last = -1;
   int ret;
 
   if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg))
     ret = 1;
   else
     ret = 0;
+  if (last != ret)
+    {
+      updateAppModel(NULL);
+      last = ret;
+    }
   GNUNET_GTK_save_call (&doUpdateMenus, &ret);
 }
 
@@ -269,7 +282,10 @@
   gtk_widget_set_sensitive (launchEntry, FALSE);
   if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg))
     {
-      cronCheckDaemon (NULL);
+      GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (),
+                             &cronCheckDaemon,
+                             15 * GNUNET_CRON_SECONDS,
+                             NULL);
       return;
     }
   else
@@ -309,7 +325,10 @@
                   GNUNET_GTK_add_log_entry (_("Launched gnunetd\n"));
                 }
               g_free (fn);
-              cronCheckDaemon (NULL);
+             GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (),
+                                     &cronCheckDaemon,
+                                     15 * GNUNET_CRON_SECONDS,
+                                     NULL);
               return;
             }
           else
@@ -329,7 +348,10 @@
         }
       if (fn != NULL)
         g_free (fn);
-      cronCheckDaemon (NULL);
+      GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (),
+                             &cronCheckDaemon,
+                             15 * GNUNET_CRON_SECONDS,
+                             NULL);
     }
 }
 
@@ -368,7 +390,10 @@
         }
       GNUNET_client_connection_destroy (sock);
     }
-  cronCheckDaemon (NULL);
+  GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (),
+                         &cronCheckDaemon,
+                         15 * GNUNET_CRON_SECONDS,
+                         NULL);
 }
 
 void
@@ -449,7 +474,7 @@
   GNUNET_free (daemon_config);
 
   cron = GNUNET_GTK_get_cron_manager ();
-  GNUNET_cron_add_job (cron, &cronCheckDaemon, 0, 15 * GNUNET_CRON_SECONDS,
+  GNUNET_cron_add_job (cron, &cronCheckDaemon, 2 * GNUNET_CRON_SECONDS, 15 * 
GNUNET_CRON_SECONDS,
                        NULL);
   GNUNET_cron_add_job (cron, &updateAppModel, 5 * GNUNET_CRON_MINUTES,
                        5 * GNUNET_CRON_MINUTES, NULL);

Modified: gnunet-gtk/src/plugins/fs/Makefile.am
===================================================================
--- gnunet-gtk/src/plugins/fs/Makefile.am       2008-06-07 21:31:20 UTC (rev 
7074)
+++ gnunet-gtk/src/plugins/fs/Makefile.am       2008-06-07 21:45:51 UTC (rev 
7075)
@@ -21,6 +21,7 @@
   namespace_create.c \
   namespace_search.c namespace_search.h \
   search.c search.h \
+  status.c status.h \
   download.c download.h \
   upload.c upload.h
 libgnunetgtkmodule_fs_la_LIBADD = \

Modified: gnunet-gtk/src/plugins/fs/collection.c
===================================================================
--- gnunet-gtk/src/plugins/fs/collection.c      2008-06-07 21:31:20 UTC (rev 
7074)
+++ gnunet-gtk/src/plugins/fs/collection.c      2008-06-07 21:45:51 UTC (rev 
7075)
@@ -133,13 +133,11 @@
         glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
                               "deleteCollection");
       gtk_widget_set_sensitive (w, FALSE);
-      GNUNET_GTK_show_info_message (GNUNET_NO, _("Collection stopped.\n"));
+      GNUNET_GTK_show_info_message (_("Collection stopped.\n"));
     }
   else
     {
-      GNUNET_GTK_show_info_message (GNUNET_YES,
-                                    _
-                                    ("Failed to stop collection (consult 
logs).\n"));
+      GNUNET_GTK_show_info_message (_("Failed to stop collection (consult 
logs).\n"));
     }
 }
 

Modified: gnunet-gtk/src/plugins/fs/download.c
===================================================================
--- gnunet-gtk/src/plugins/fs/download.c        2008-06-07 21:31:20 UTC (rev 
7074)
+++ gnunet-gtk/src/plugins/fs/download.c        2008-06-07 21:45:51 UTC (rev 
7075)
@@ -28,6 +28,7 @@
 #include "platform.h"
 #include "fs.h"
 #include "search.h"
+#include "status.h"
 #include "meta.h"
 
 /* ****************** FSUI download events ****************** */

Modified: gnunet-gtk/src/plugins/fs/fs.c
===================================================================
--- gnunet-gtk/src/plugins/fs/fs.c      2008-06-07 21:31:20 UTC (rev 7074)
+++ gnunet-gtk/src/plugins/fs/fs.c      2008-06-07 21:45:51 UTC (rev 7075)
@@ -676,102 +676,59 @@
 
 }
 
+static void 
+init_cron_job(void * arg)
+{
+  GtkWidget * tab = arg;
+
+  ctx = GNUNET_FSUI_start (ectx, cfg, "gnunet-gtk",
+                          8, /* FIXME: allow user to configure download 
parallelism */
+                           GNUNET_YES, &eventProcessor, NULL);
+  GNUNET_GTK_save_call((GNUNET_ThreadMainFunction) &gtk_widget_show,
+                      tab);
+}
+
 void
 init_fs (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c)
 {
   GtkWidget *tab;
-  GtkWidget *book;
-  gint num;
+  struct GNUNET_CronManager * cron;
 
   ectx = e;
   cfg = c;
   GNUNET_CO_init (ectx, cfg);
-  tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook");
-  gtk_widget_show (tab);
-  book =
-    glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainnotebook");
-  num = gtk_notebook_get_current_page (GTK_NOTEBOOK (book));
-  gtk_notebook_set_current_page (GTK_NOTEBOOK (book), 1);
-  gtk_notebook_set_current_page (GTK_NOTEBOOK (book), num);
   fs_summary_start ();
   fs_collection_start ();
   fs_namespace_start ();
-  ctx = GNUNET_FSUI_start (ectx, cfg, "gnunet-gtk", 8,  /* FIXME: allow user 
to configure download parallelism */
-                           GNUNET_YES, &eventProcessor, NULL);
-}
-
-static void *
-hide_save_call (void *arg)
-{
-  GtkWidget *tab;
-
   tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook");
-  gtk_widget_hide (tab);
-  return NULL;
+  cron = GNUNET_GTK_get_cron_manager();
+  GNUNET_cron_add_job(cron, &init_cron_job, 0, 0, tab);
 }
 
 static void *
 cleanup_save_call (void *arg)
 {
+  GtkWidget *tab = arg;
+
   fs_summary_stop ();
   fs_namespace_stop ();
+  gtk_widget_hide(tab);
   return NULL;
 }
 
 void
 done_fs ()
 {
-  GNUNET_GTK_save_call (&hide_save_call, NULL);
-  GNUNET_FSUI_stop (ctx);
-  GNUNET_GTK_save_call (&cleanup_save_call, NULL);
+  struct GNUNET_CronManager * cron;
+  GtkWidget *tab;
+
+  tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook");
+  cron = GNUNET_GTK_get_cron_manager();
+  GNUNET_cron_del_job(cron, &init_cron_job, 0, tab);
+  if (ctx != NULL)
+    GNUNET_FSUI_stop (ctx);
+  GNUNET_GTK_save_call (&cleanup_save_call, tab);
   GNUNET_CO_done ();
 }
 
-
-const char *
-getColorCode (enum GNUNET_URITRACK_STATE state)
-{
-  if (state & (GNUNET_URITRACK_DIRECTORY_ADDED))
-    return "blue";
-  if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED))
-    return "cyan";
-  if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) &&
-      (0 == (state &
-             (GNUNET_URITRACK_DOWNLOAD_COMPLETED |
-              GNUNET_URITRACK_DOWNLOAD_ABORTED))))
-    return "yellow";
-  if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED)
-    return "springgreen";
-  if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED)
-    return "red";
-  if (state &
-      (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND))
-    return "gray";
-  return NULL;
-}
-
-
-const char *
-getStatusName (enum GNUNET_URITRACK_STATE state)
-{
-  if (state & (GNUNET_URITRACK_DIRECTORY_ADDED))
-    return _("added");
-  if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED))
-    return _("shared");
-  if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) &&
-      (0 == (state &
-             (GNUNET_URITRACK_DOWNLOAD_COMPLETED |
-              GNUNET_URITRACK_DOWNLOAD_ABORTED))))
-    return _("started");
-  if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED)
-    return _("completed");
-  if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED)
-    return _("aborted");
-  if (state &
-      (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND))
-    return "";
-  return "";
-}
-
-
 /* end of fs.c */

Modified: gnunet-gtk/src/plugins/fs/fs.h
===================================================================
--- gnunet-gtk/src/plugins/fs/fs.h      2008-06-07 21:31:20 UTC (rev 7074)
+++ gnunet-gtk/src/plugins/fs/fs.h      2008-06-07 21:45:51 UTC (rev 7075)
@@ -40,7 +40,7 @@
 enum
 {
   NS_SEARCH_DESCRIPTION = 0,
-  NS_SEARCH_ENCNAME,
+  NS_SEARCH_NAME,
   NS_SEARCH_METADATA,
   NS_SEARCH_RATING,
   NS_SEARCH_NUM,
@@ -348,9 +348,4 @@
 
 extern GtkTreeStore *upload_summary;
 
-const char *getColorCode (enum GNUNET_URITRACK_STATE state);
-
-const char *getStatusName (enum GNUNET_URITRACK_STATE state);
-
-
 #endif

Modified: gnunet-gtk/src/plugins/fs/namespace.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace.c       2008-06-07 21:31:20 UTC (rev 
7074)
+++ gnunet-gtk/src/plugins/fs/namespace.c       2008-06-07 21:45:51 UTC (rev 
7075)
@@ -566,8 +566,7 @@
     }
   else
     {
-      GNUNET_GTK_show_info_message (GNUNET_YES,
-                                    _
+      GNUNET_GTK_show_info_message (_
                                     ("Failed to insert content into namespace "
                                      "(consult logs).\n"));
     }

Modified: gnunet-gtk/src/plugins/fs/namespace_search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace_search.c        2008-06-07 21:31:20 UTC 
(rev 7074)
+++ gnunet-gtk/src/plugins/fs/namespace_search.c        2008-06-07 21:45:51 UTC 
(rev 7075)
@@ -48,7 +48,7 @@
   GtkWidget *ncbe;
   GtkTreeModel *model;
   GtkTreeIter iter;
-  char *encStr;
+  char *nsName;
   char *description;
   int rating;
   int newrating;
@@ -63,24 +63,27 @@
                           "searchNamespaceComboBoxEntry");
   model = gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe));
   description = NULL;
-  encStr = NULL;
+  nsName = NULL;
   if (TRUE == gtk_combo_box_get_active_iter (GTK_COMBO_BOX (ncbe), &iter))
     {
       gtk_tree_model_get (model,
                           &iter,
                           NS_SEARCH_DESCRIPTION, &description,
-                          NS_SEARCH_ENCNAME, &encStr,
+                          NS_SEARCH_NAME, &nsName,
                           NS_SEARCH_RATING, &rating, -1);
-      if ((description != NULL) && (0 == strcmp (description, _("globally"))))
+      if ((description != NULL) && (0 == strcmp (description, "")))
         {
           /* just to be sure */
           gtk_widget_set_sensitive (spin, FALSE);
         }
       else
         {
-          if (encStr != NULL)
+          if (nsName != NULL)
             {
-              GNUNET_enc_to_hash (encStr, &nsid);
+             GNUNET_GE_ASSERT(NULL,
+                              GNUNET_OK ==
+                              GNUNET_pseudonym_name_to_id(ectx, cfg,
+                                                          nsName, &nsid));
               newrating = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin));
               rating = GNUNET_pseudonym_rank (ectx,
                                               cfg, &nsid, newrating - rating);
@@ -104,8 +107,8 @@
     }
   if (description != NULL)
     free (description);
-  if (encStr != NULL)
-    free (encStr);
+  if (nsName != NULL)
+    free (nsName);
   GNUNET_GTK_DEBUG_END ();
 }
 
@@ -125,7 +128,7 @@
   GtkTreeModel *model;
   GtkTreeIter iter;
   int rating;
-  char *encStr;
+  char *nsName;
   char *descStr;
   GNUNET_HashCode ns;
   char *root;
@@ -139,22 +142,25 @@
                           "searchNamespaceComboBoxEntry");
   model = gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe));
   descStr = NULL;
-  encStr = NULL;
+  nsName = NULL;
   if (TRUE == gtk_combo_box_get_active_iter (GTK_COMBO_BOX (ncbe), &iter))
     {
       gtk_tree_model_get (model,
                           &iter,
                           NS_SEARCH_DESCRIPTION, &descStr,
-                          NS_SEARCH_ENCNAME, &encStr,
+                          NS_SEARCH_NAME, &nsName,
                           NS_SEARCH_RATING, &rating, -1);
-      if ((descStr != NULL) && (0 == strcmp (descStr, _("globally"))))
+      if ((descStr != NULL) && (0 == strcmp (descStr, "")))
         {
           gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 0);
           gtk_widget_set_sensitive (spin, FALSE);
         }
-      else if (encStr != NULL)
+      else if (nsName != NULL)
         {
-          GNUNET_enc_to_hash (encStr, &ns);
+         GNUNET_GE_ASSERT(NULL,
+                          GNUNET_OK ==
+                          GNUNET_pseudonym_name_to_id(ectx, cfg,
+                                                      nsName, &ns));
           gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), rating);
           gtk_widget_set_sensitive (spin, TRUE);
           keyword
@@ -183,8 +189,8 @@
     }
   if (descStr != NULL)
     free (descStr);
-  if (encStr != NULL)
-    free (encStr);
+  if (nsName != NULL)
+    free (nsName);
   GNUNET_GTK_DEBUG_END ();
 }
 
@@ -200,24 +206,19 @@
 saveDiscovery (void *cls)
 {
   struct NewNamespaceInfo *nni = cls;
-
   GtkListStore *model;
   GtkTreeIter iter;
-  GNUNET_EncName enc;
-  char *name;
   struct GNUNET_MetaData *dmd;
   GtkWidget *ncbe;
   char *desc;
-  size_t n;
+  char *haveName;
   int found;
-  char *encName;
 
   GNUNET_GTK_DEBUG_BEGIN ();
   ncbe =
     glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
                           "searchNamespaceComboBoxEntry");
   model = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe)));
-  GNUNET_hash_to_enc (nni->namespaceId, &enc);
   if (nni->md == NULL)
     {
       dmd = NULL;
@@ -242,9 +243,6 @@
         desc = GNUNET_strdup ("");
     }
 
-  n = strlen (desc) + 64;
-  name = GNUNET_malloc (n);
-  GNUNET_snprintf (name, n, "%s: %.*s", desc, 20, &enc);
   /* check if present! */
   found = GNUNET_NO;
   if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter))
@@ -252,30 +250,27 @@
       do
         {
           gtk_tree_model_get (GTK_TREE_MODEL (model),
-                              &iter, NS_SEARCH_ENCNAME, &encName, -1);
-          if ((encName != NULL) &&
-              (0 == strcmp (encName, (const char *) &enc)))
+                              &iter, NS_SEARCH_NAME, &haveName, -1);
+          if ((haveName != NULL) &&
+              (0 == strcmp (haveName, nni->namespaceName)))
             found = GNUNET_YES;
-          GNUNET_free_non_null (encName);
+          GNUNET_free_non_null (haveName);
         }
       while ((found == GNUNET_NO) &&
              (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter)));
     }
   if (found == GNUNET_NO)
     {
-      GNUNET_GTK_show_info_message (GNUNET_YES,
-                                    _("Namespace found: %s - %.*s\n"), desc,
-                                    20, &enc);
+      GNUNET_GTK_show_info_message (_("Namespace `%s' found: %s.\n"), 
nni->namespaceName, desc);
       gtk_list_store_append (model, &iter);
       gtk_list_store_set (model,
                           &iter,
-                          NS_SEARCH_DESCRIPTION, name,
-                          NS_SEARCH_ENCNAME, &enc,
+                          NS_SEARCH_DESCRIPTION, desc,
+                          NS_SEARCH_NAME, nni->namespaceName,
                           NS_SEARCH_METADATA, dmd,
                           NS_SEARCH_RATING, nni->rating, -1);
     }
   GNUNET_free (desc);
-  GNUNET_free (name);
   GNUNET_GTK_DEBUG_END ();
 
   return NULL;

Modified: gnunet-gtk/src/plugins/fs/search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/search.c  2008-06-07 21:31:20 UTC (rev 7074)
+++ gnunet-gtk/src/plugins/fs/search.c  2008-06-07 21:45:51 UTC (rev 7075)
@@ -27,6 +27,7 @@
 #include "platform.h"
 #include "gnunetgtk_common.h"
 #include "search.h"
+#include "status.h"
 #include "helper.h"
 #include "fs.h"
 #include "meta.h"
@@ -1164,35 +1165,43 @@
                                      &iter))
     {
       char *descStr;
-      char *ns;
+      char *nsName;
 
-      ns = NULL;
+      nsName = NULL;
       descStr = NULL;
       gtk_tree_model_get (gtk_combo_box_get_model
                           (GTK_COMBO_BOX (searchNamespaceGtkCB)), &iter,
-                          NS_SEARCH_DESCRIPTION, &descStr, NS_SEARCH_ENCNAME,
-                          &ns, -1);
+                          NS_SEARCH_DESCRIPTION, &descStr, NS_SEARCH_NAME,
+                          &nsName, -1);
 
-      if ((descStr != NULL) && (0 == strcmp (descStr, _("globally"))))
+      if ((descStr != NULL) && (0 == strcmp (descStr, "")))
         {
-          ns = NULL;
+          nsName = NULL;
         }
       else
         {
-          if ((descStr == NULL) && (ns != NULL))
-            descStr = GNUNET_strdup (ns);
+          if ((descStr == NULL) && (nsName != NULL))
+            descStr = GNUNET_strdup (nsName);
         }
-      if (ns != NULL)
+      if (nsName != NULL)
         {
           char *ustring;
+         GNUNET_EncName enc;
+         GNUNET_HashCode nsid;
 
+         GNUNET_GE_ASSERT(NULL,
+                          GNUNET_OK ==
+                          GNUNET_pseudonym_name_to_id(ectx, cfg,
+                                                      nsName, &nsid));
+         GNUNET_hash_to_enc(&nsid, &enc);
+
           ustring =
             GNUNET_malloc (strlen (searchString) + sizeof (GNUNET_EncName) +
                            strlen (GNUNET_ECRS_URI_PREFIX) +
                            strlen (GNUNET_ECRS_SUBSPACE_INFIX) + 10);
           strcpy (ustring, GNUNET_ECRS_URI_PREFIX);
           strcat (ustring, GNUNET_ECRS_SUBSPACE_INFIX);
-          strcat (ustring, ns);
+          strcat (ustring, (const char*)&enc);
           strcat (ustring, "/");
           strcat (ustring, searchString);
           fsss.uri = GNUNET_ECRS_string_to_uri (ectx, ustring);
@@ -1208,8 +1217,8 @@
         }
       if (descStr != NULL)
         free (descStr);
-      if (ns != NULL)
-        free (ns);
+      if (nsName != NULL)
+        free (nsName);
     }
   if (fsss.uri == NULL)
     fsss.uri = GNUNET_ECRS_keyword_string_to_uri (ectx, searchString);

Added: gnunet-gtk/src/plugins/fs/status.c
===================================================================
--- gnunet-gtk/src/plugins/fs/status.c                          (rev 0)
+++ gnunet-gtk/src/plugins/fs/status.c  2008-06-07 21:45:51 UTC (rev 7075)
@@ -0,0 +1,79 @@
+/*
+     This file is part of GNUnet.
+     (C) 2007, 2008 Christian Grothoff (and other contributing authors)
+
+     GNUnet is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published
+     by the Free Software Foundation; either version 2, or (at your
+     option) any later version.
+
+     GNUnet is distributed in the hope that it will be useful, but
+     WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file src/plugins/fs/status.c
+ * @brief status codes for files
+ * @author Christian Grothoff
+ */
+
+#include "platform.h"
+#include <GNUnet/gnunet_uritrack_lib.h>
+#include "status.h"
+
+
+
+const char *
+getColorCode (enum GNUNET_URITRACK_STATE state)
+{
+  if (state & (GNUNET_URITRACK_DIRECTORY_ADDED))
+    return "blue";
+  if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED))
+    return "cyan";
+  if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) &&
+      (0 == (state &
+             (GNUNET_URITRACK_DOWNLOAD_COMPLETED |
+              GNUNET_URITRACK_DOWNLOAD_ABORTED))))
+    return "yellow";
+  if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED)
+    return "springgreen";
+  if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED)
+    return "red";
+  if (state &
+      (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND))
+    return "gray";
+  return NULL;
+}
+
+
+const char *
+getStatusName (enum GNUNET_URITRACK_STATE state)
+{
+  if (state & (GNUNET_URITRACK_DIRECTORY_ADDED))
+    return _("added");
+  if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED))
+    return _("shared");
+  if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) &&
+      (0 == (state &
+             (GNUNET_URITRACK_DOWNLOAD_COMPLETED |
+              GNUNET_URITRACK_DOWNLOAD_ABORTED))))
+    return _("started");
+  if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED)
+    return _("completed");
+  if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED)
+    return _("aborted");
+  if (state &
+      (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND))
+    return "";
+  return "";
+}
+
+
+/* end of status.c */

Added: gnunet-gtk/src/plugins/fs/status.h
===================================================================
--- gnunet-gtk/src/plugins/fs/status.h                          (rev 0)
+++ gnunet-gtk/src/plugins/fs/status.h  2008-06-07 21:45:51 UTC (rev 7075)
@@ -0,0 +1,38 @@
+/*
+     This file is part of GNUnet.
+     (C) 2007, 2008 Christian Grothoff (and other contributing authors)
+
+     GNUnet is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published
+     by the Free Software Foundation; either version 2, or (at your
+     option) any later version.
+
+     GNUnet is distributed in the hope that it will be useful, but
+     WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file src/plugins/fs/status.h
+ * @brief status codes for files
+ * @author Christian Grothoff
+ */
+
+#ifndef FS_STATUS_H
+#define FS_STATUS_H
+
+#include "platform.h"
+#include <GNUnet/gnunet_uritrack_lib.h>
+#include "status.h"
+
+const char *getColorCode (enum GNUNET_URITRACK_STATE state);
+
+const char *getStatusName (enum GNUNET_URITRACK_STATE state);
+
+#endif

Modified: gnunet-gtk/src/plugins/stats/functions.c
===================================================================
--- gnunet-gtk/src/plugins/stats/functions.c    2008-06-07 21:31:20 UTC (rev 
7074)
+++ gnunet-gtk/src/plugins/stats/functions.c    2008-06-07 21:45:51 UTC (rev 
7075)
@@ -478,12 +478,18 @@
   return GNUNET_OK;
 }
 
+struct UpdateClosure {
+  GNUNET_CronTime delta;
+  int is_running;
+};
+
 /*
  * Update the status bar indicator about daemon and connexions status
  */
 static void *
-updateDaemonStatus (void *delta)
+updateDaemonStatus (void *cls)
 {
+  struct UpdateClosure * uc = cls;
   static gboolean once = TRUE;
   static int last_status = -5;
   unsigned long long connected_peers;
@@ -567,10 +573,10 @@
 
       once = FALSE;
     }
-  if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg))
+  if (uc->is_running)
     {
       if (GNUNET_OK !=
-          getStatValue (&connected_peers, (GNUNET_CronTime *) delta, NULL,
+          getStatValue (&connected_peers, NULL, NULL,
                         "# of connected peers", GNUNET_NO))
         {
           if (last_status != -1)
@@ -665,15 +671,16 @@
 {
   static GNUNET_CronTime lastUpdate;
   GNUNET_CronTime now;
-  GNUNET_CronTime delta;
+  struct UpdateClosure uc;
 
   now = GNUNET_get_time ();
-  delta = now - lastUpdate;
+  uc.delta = now - lastUpdate;
+  uc.is_running = GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg);
   GNUNET_mutex_lock (lock);
   if (GNUNET_OK ==
-      GNUNET_STATS_get_statistics (ectx, sock, &statsProcessor, &delta))
+      GNUNET_STATS_get_statistics (ectx, sock, &statsProcessor, &uc.delta))
     lastUpdate = now;
-  GNUNET_GTK_save_call (&updateDaemonStatus, (void *) &delta);
+  GNUNET_GTK_save_call (&updateDaemonStatus, (void *) &uc);
   GNUNET_mutex_unlock (lock);
 }
 





reply via email to

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