gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r13522 - in gnunet-setup: . contrib src


From: gnunet
Subject: [GNUnet-SVN] r13522 - in gnunet-setup: . contrib src
Date: Wed, 3 Nov 2010 00:55:15 +0100

Author: grothoff
Date: 2010-11-03 00:55:15 +0100 (Wed, 03 Nov 2010)
New Revision: 13522

Modified:
   gnunet-setup/TODO
   gnunet-setup/contrib/gnunet-setup.glade
   gnunet-setup/src/gnunet-setup-options.c
   gnunet-setup/src/gnunet-setup.c
Log:
done

Modified: gnunet-setup/TODO
===================================================================
--- gnunet-setup/TODO   2010-11-02 23:54:17 UTC (rev 13521)
+++ gnunet-setup/TODO   2010-11-02 23:55:15 UTC (rev 13522)
@@ -1,7 +1,6 @@
 * More glade work:
   - VPN configuration
 * specify general UI elements 
-  - fs tab
   - write WWW documentation for UI elements:
     + general tab
     + transport tab

Modified: gnunet-setup/contrib/gnunet-setup.glade
===================================================================
--- gnunet-setup/contrib/gnunet-setup.glade     2010-11-02 23:54:17 UTC (rev 
13521)
+++ gnunet-setup/contrib/gnunet-setup.glade     2010-11-02 23:55:15 UTC (rev 
13522)
@@ -2,76 +2,70 @@
 <interface>
   <requires lib="gtk+" version="2.20"/>
   <!-- interface-naming-policy project-wide -->
-  <object class="GtkAdjustment" 
id="GNUNET_setup_fs_datacache_mysql_port_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">65535</property>
-    <property name="value">3306</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_fs_datastore_quota_adjustment">
+    <property name="lower">1000000</property>
+    <property name="upper">999999999999</property>
+    <property name="value">100000000</property>
+    <property name="step_increment">1000000</property>
+    <property name="page_increment">1000000000</property>
   </object>
-  <object class="GtkAdjustment" 
id="GNUNET_setup_fs_datastore_mysql_port_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">65535</property>
-    <property name="value">3306</property>
+  <object class="GtkAdjustment" id="adjustment8">
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
+    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" 
id="GNUNET_setup_fs_datacache_quota_adjustment">
-    <property name="lower">65536</property>
-    <property name="upper">9999999999</property>
-    <property name="value">1024000</property>
-    <property name="step_increment">65536</property>
-    <property name="page_increment">1024000</property>
-  </object>
-  <object class="GtkAdjustment" id="GNUNET_setup_bandwidth_out_adjustment">
-    <property name="lower">1024</property>
-    <property name="upper">999999999</property>
-    <property name="value">65536</property>
+  <object class="GtkAdjustment" id="adjustment7">
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
+    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="GNUNET_setup_bandwidth_in_adjustment">
-    <property name="lower">5000</property>
-    <property name="upper">999999999</property>
-    <property name="value">65536</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
+  <object class="GtkListStore" id="GNUNET_setup_hostlist_url_liststore">
+    <columns>
+      <!-- column-name url -->
+      <column type="gchararray"/>
+    </columns>
   </object>
-  <object class="GtkAdjustment" id="adjustment6">
-    <property name="upper">100</property>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_hostlist_server_port_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">65535</property>
+    <property name="value">8080</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment5">
-    <property name="upper">100</property>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_transport_http_port_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">65535</property>
+    <property name="value">1080</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment4">
-    <property name="upper">100</property>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_transport_udp_port_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">65535</property>
+    <property name="value">2086</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment3">
-    <property name="upper">100</property>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_transport_tcp_port_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">65535</property>
+    <property name="value">2086</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="upper">100</property>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_transport_https_port_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">65535</property>
+    <property name="value">443</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="upper">100</property>
+  <object class="GtkAdjustment" id="GNUNET_setup_min_friends_adjustment">
+    <property name="upper">9999</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
   <object class="GtkDialog" id="GNUNET_setup_dialog">
     <property name="border_width">5</property>
@@ -1338,7 +1332,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkSpinButton" 
id="GNUNET_setup_datastore_mysql_port_entry">
+                                      <object class="GtkSpinButton" 
id="GNUNET_setup_datastore_mysql_port_spinbutton">
                                         <property 
name="visible">True</property>
                                         <property 
name="can_focus">True</property>
                                         <property 
name="invisible_char">•</property>
@@ -1611,7 +1605,7 @@
                                   <object class="GtkHBox" id="hbox13c">
                                     <property name="visible">True</property>
                                     <child>
-                                      <object class="GtkLabel" 
id="GNUNET_setup_datacache_database_name_label">
+                                      <object class="GtkLabel" 
id="GNUNET_setup_datacache_mysql_database_name_label">
                                         <property 
name="visible">True</property>
                                         <property name="label" 
translatable="yes">MySQL database name:</property>
                                       </object>
@@ -1623,7 +1617,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkEntry" 
id="GNUNET_setup_datacache_database_name_entry">
+                                      <object class="GtkEntry" 
id="GNUNET_setup_datacache_mysql_database_name_entry">
                                         <property 
name="visible">True</property>
                                         <property 
name="can_focus">True</property>
                                         <property 
name="invisible_char">•</property>
@@ -1647,7 +1641,7 @@
                                   <object class="GtkHBox" id="hbox14c">
                                     <property name="visible">True</property>
                                     <child>
-                                      <object class="GtkLabel" 
id="GNUNET_setup_datacache_config_file_label">
+                                      <object class="GtkLabel" 
id="GNUNET_setup_datacache_mysql_config_file_label">
                                         <property 
name="visible">True</property>
                                         <property name="label" 
translatable="yes">Configuration file:</property>
                                       </object>
@@ -1658,7 +1652,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkFileChooserButton" 
id="GNUNET_setup_datacache_config_file_filechooserbutton">
+                                      <object class="GtkFileChooserButton" 
id="GNUNET_setup_datacache_mysql_config_file_filechooserbutton">
                                         <property 
name="visible">True</property>
                                       </object>
                                       <packing>
@@ -1777,7 +1771,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkSpinButton" 
id="GNUNET_setup_datacache_mysql_port_entry">
+                                      <object class="GtkSpinButton" 
id="GNUNET_setup_datacache_mysql_port_spinbutton">
                                         <property 
name="visible">True</property>
                                         <property 
name="can_focus">True</property>
                                         <property 
name="invisible_char">•</property>
@@ -1974,69 +1968,75 @@
       <action-widget response="-3">GNUNET_setup_save_button</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkAdjustment" id="GNUNET_setup_min_friends_adjustment">
-    <property name="upper">9999</property>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
+    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" 
id="GNUNET_setup_transport_https_port_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">65535</property>
-    <property name="value">443</property>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
+    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" 
id="GNUNET_setup_transport_tcp_port_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">65535</property>
-    <property name="value">2086</property>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
+    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" 
id="GNUNET_setup_transport_udp_port_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">65535</property>
-    <property name="value">2086</property>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
+    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" 
id="GNUNET_setup_transport_http_port_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">65535</property>
-    <property name="value">1080</property>
+  <object class="GtkAdjustment" id="adjustment5">
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
+    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" 
id="GNUNET_setup_hostlist_server_port_adjustment">
-    <property name="lower">1</property>
-    <property name="upper">65535</property>
-    <property name="value">8080</property>
+  <object class="GtkAdjustment" id="adjustment6">
+    <property name="upper">100</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
+    <property name="page_size">10</property>
   </object>
-  <object class="GtkListStore" id="GNUNET_setup_hostlist_url_liststore">
-    <columns>
-      <!-- column-name url -->
-      <column type="gchararray"/>
-    </columns>
+  <object class="GtkAdjustment" id="GNUNET_setup_bandwidth_in_adjustment">
+    <property name="lower">5000</property>
+    <property name="upper">999999999</property>
+    <property name="value">65536</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment7">
-    <property name="upper">100</property>
+  <object class="GtkAdjustment" id="GNUNET_setup_bandwidth_out_adjustment">
+    <property name="lower">1024</property>
+    <property name="upper">999999999</property>
+    <property name="value">65536</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment8">
-    <property name="upper">100</property>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_fs_datacache_quota_adjustment">
+    <property name="lower">65536</property>
+    <property name="upper">9999999999</property>
+    <property name="value">1024000</property>
+    <property name="step_increment">65536</property>
+    <property name="page_increment">1024000</property>
+  </object>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_fs_datastore_mysql_port_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">65535</property>
+    <property name="value">3306</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">10</property>
   </object>
-  <object class="GtkAdjustment" 
id="GNUNET_setup_fs_datastore_quota_adjustment">
-    <property name="lower">1000000</property>
-    <property name="upper">999999999999</property>
-    <property name="value">100000000</property>
-    <property name="step_increment">1000000</property>
-    <property name="page_increment">1000000000</property>
+  <object class="GtkAdjustment" 
id="GNUNET_setup_fs_datacache_mysql_port_adjustment">
+    <property name="lower">1</property>
+    <property name="upper">65535</property>
+    <property name="value">3306</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
   </object>
 </interface>

Modified: gnunet-setup/src/gnunet-setup-options.c
===================================================================
--- gnunet-setup/src/gnunet-setup-options.c     2010-11-02 23:54:17 UTC (rev 
13521)
+++ gnunet-setup/src/gnunet-setup-options.c     2010-11-02 23:55:15 UTC (rev 
13522)
@@ -162,8 +162,69 @@
 }
 
 
+/**
+ * Initialize a GtkEntry based on a text option.
+ *
+ * @param cls closure
+ * @param section section with the value
+ * @param option option name
+ * @param value value as a string
+ * @param widget widget to initialize
+ * @param cfg configuration handle
+ * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
+ */
+static int
+load_text (const void *cls,
+          const char *section,
+          const char *option,
+          const char *value,
+          GObject *widget,
+          const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  GtkEntry *entry;
 
+  entry = GTK_ENTRY (widget);
+  if (entry == NULL)
+    return GNUNET_SYSERR;
+  gtk_entry_set_text (entry,
+                     value);
+  return GNUNET_OK;
+}
+
+
 /**
+ * Set text option based on a GtkEntry.
+ *
+ * @param cls closure
+ * @param section section with the value
+ * @param option option name
+ * @param widget widget to initialize
+ * @param cfg configuration handle to update
+ * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
+ */
+static int
+save_text (const void *cls,
+          const char *section,
+          const char *option,
+          GObject *widget,
+          struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  GtkEntry *entry;
+  const gchar *txt;
+
+  entry = GTK_ENTRY (widget);
+  if (entry == NULL)
+    return GNUNET_SYSERR;
+  txt = gtk_entry_get_text (entry);
+  GNUNET_CONFIGURATION_set_value_string (cfg, 
+                                        section, option,
+                                        txt);
+  return GNUNET_OK;
+}
+
+
+
+/**
  * Initialize a GtkSpinButton based on a numeric option.
  *
  * @param cls closure
@@ -943,10 +1004,103 @@
       hide_postgres_datastore_tab
     },
 
+    {
+      "GNUNET_setup_datastore_mysql_database_name_entry",
+      "changed",
+      "datastore-mysql",
+      "DATABASE",
+      gettext_noop ("Name for the MySQL database"),
+      "https://gnunet.org/configuration-datastore";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
 
+    { 
+      "GNUNET_setup_datastore_mysql_config_file_filechooserbutton",
+      "selection-changed",
+      "datastore-mysql",
+      "CONFIG",
+      gettext_noop ("Configuration file for MySQL access"),
+      "http://dev.mysql.com/doc/refman/5.5/en/option-files.html";,
+      &load_filename,
+      &save_filename, NULL,
+      NULL
+    },
 
+    {
+      "GNUNET_setup_datastore_mysql_username_entry",
+      "changed",
+      "datastore-mysql",
+      "USER",
+      gettext_noop ("Username for MySQL access"),
+      "https://gnunet.org/configuration-datastore";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
 
+    {
+      "GNUNET_setup_datastore_mysql_password_entry",
+      "changed",
+      "datastore-mysql",
+      "PASSWORD",
+      gettext_noop ("Password for MySQL access"),
+      "https://gnunet.org/configuration-datastore";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
+
+    {
+      "GNUNET_setup_datastore_mysql_hostname_entry",
+      "changed",
+      "datastore-mysql",
+      "HOST",
+      gettext_noop ("Name of host running MySQL database"),
+      "https://gnunet.org/configuration-datastore";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
+
+    {
+      "GNUNET_setup_datastore_mysql_port_spinbutton",
+      "value-changed",
+      "datastore-mysql",
+      "PORT",
+      gettext_noop ("Port of MySQL database"),
+      "https://gnunet.org/configuration-datastore";,
+      &load_number,
+      &save_number, NULL,
+      NULL
+    },
+
+    {
+      "GNUNET_setup_datastore_postgres_config_entry",
+      "changed",
+      "datastore-postgres",
+      "CONFIG",
+      gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"),
+      "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
+
     
+    { 
+      "GNUNET_setup_fs_migration_checkbutton",
+      "toggled",
+      "fs",
+      "ACTIVEMIGRATION",
+      gettext_noop ("Is content migration allowed?"),
+      "https://gnunet.org/configuration-fs";,
+      &load_yes_no,
+      &save_yes_no, NULL,
+      NULL
+    },    
+    
     {
       "GNUNET_setup_fs_datacache_sqlite_radiobutton",
       "toggled",
@@ -983,6 +1137,89 @@
       hide_postgres_datacache_tab
     },
   
+    {
+      "GNUNET_setup_datacache_mysql_database_name_entry",
+      "changed",
+      "datacache-mysql",
+      "DATABASE",
+      gettext_noop ("Name for the MySQL database"),
+      "https://gnunet.org/configuration-datacache";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
+
+    { 
+      "GNUNET_setup_datacache_mysql_config_file_filechooserbutton",
+      "selection-changed",
+      "datacache-mysql",
+      "CONFIG",
+      gettext_noop ("Configuration file for MySQL access"),
+      "http://dev.mysql.com/doc/refman/5.5/en/option-files.html";,
+      &load_filename,
+      &save_filename, NULL,
+      NULL
+    },
+
+    {
+      "GNUNET_setup_datacache_mysql_username_entry",
+      "changed",
+      "datacache-mysql",
+      "USER",
+      gettext_noop ("Username for MySQL access"),
+      "https://gnunet.org/configuration-datacache";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
+
+    {
+      "GNUNET_setup_datacache_mysql_password_entry",
+      "changed",
+      "datacache-mysql",
+      "PASSWORD",
+      gettext_noop ("Password for MySQL access"),
+      "https://gnunet.org/configuration-datacache";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
+
+    {
+      "GNUNET_setup_datacache_mysql_hostname_entry",
+      "changed",
+      "datacache-mysql",
+      "HOST",
+      gettext_noop ("Name of host running MySQL database"),
+      "https://gnunet.org/configuration-datacache";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
+
+    {
+      "GNUNET_setup_datacache_mysql_port_spinbutton",
+      "value-changed",
+      "datacache-mysql",
+      "PORT",
+      gettext_noop ("Port of MySQL database"),
+      "https://gnunet.org/configuration-datacache";,
+      &load_number,
+      &save_number, NULL,
+      NULL
+    },
+
+    {
+      "GNUNET_setup_datacache_postgres_config_entry",
+      "changed",
+      "datacache-postgres",
+      "CONFIG",
+      gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"),
+      "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT";,
+      &load_text,
+      &save_text, NULL,
+      NULL
+    },
     
     /* END of list */
 

Modified: gnunet-setup/src/gnunet-setup.c
===================================================================
--- gnunet-setup/src/gnunet-setup.c     2010-11-02 23:54:17 UTC (rev 13521)
+++ gnunet-setup/src/gnunet-setup.c     2010-11-02 23:55:15 UTC (rev 13522)
@@ -344,8 +344,8 @@
                                                     os->option,
                                                     &value))
            {
-             GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                         "No default value known for option `%s' in section 
`%s'\n",
+             GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                         _("No default value known for option `%s' in section 
`%s'\n"),
                          os->option,
                          os->section);
              i++;
@@ -359,7 +359,7 @@
                                 cfg)) 
            {
              GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                         "Failed to initialize widget `%s' with value `%s'\n",
+                         _("Failed to initialize widget `%s' with value 
`%s'\n"),
                          os->widget_name,
                          value);
              GNUNET_free (value);




reply via email to

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