[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15493 - in gnunet-setup: contrib src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15493 - in gnunet-setup: contrib src |
Date: |
Thu, 9 Jun 2011 15:34:52 +0200 |
Author: grothoff
Date: 2011-06-09 15:34:52 +0200 (Thu, 09 Jun 2011)
New Revision: 15493
Modified:
gnunet-setup/contrib/gnunet-setup.glade
gnunet-setup/src/gnunet-setup-options.c
Log:
removing altnames
Modified: gnunet-setup/contrib/gnunet-setup.glade
===================================================================
--- gnunet-setup/contrib/gnunet-setup.glade 2011-06-09 13:26:47 UTC (rev
15492)
+++ gnunet-setup/contrib/gnunet-setup.glade 2011-06-09 13:34:52 UTC (rev
15493)
@@ -3483,7 +3483,7 @@
<property
name="editable">True</property>
</object>
<attributes>
- <attribute
name="text">5</attribute>
+ <attribute
name="text">4</attribute>
</attributes>
</child>
</object>
@@ -3532,21 +3532,6 @@
</child>
</object>
</child>
- <child>
- <object class="GtkTreeViewColumn"
id="GNUNET_setup_vpn_dns_service_altnames_treeviewcolumn">
- <property
name="sizing">autosize</property>
- <property name="title"
translatable="yes">Alt. Names</property>
- <child>
- <object class="GtkCellRendererText"
id="GNUNET_setup_vpn_dns_service_altnames_cellrenderertext">
- <property
name="editable">True</property>
- <property
name="wrap_mode">word</property>
- </object>
- <attributes>
- <attribute
name="text">4</attribute>
- </attributes>
- </child>
- </object>
- </child>
</object>
</child>
</object>
@@ -3774,8 +3759,6 @@
<column type="guint"/>
<!-- column-name targethostname -->
<column type="gchararray"/>
- <!-- column-name altnames -->
- <column type="gchararray"/>
<!-- column-name isudp -->
<column type="gchararray"/>
</columns>
Modified: gnunet-setup/src/gnunet-setup-options.c
===================================================================
--- gnunet-setup/src/gnunet-setup-options.c 2011-06-09 13:26:47 UTC (rev
15492)
+++ gnunet-setup/src/gnunet-setup-options.c 2011-06-09 13:34:52 UTC (rev
15493)
@@ -609,7 +609,6 @@
GtkListStore *ls = cls;
GtkTreeIter iter;
char *sld;
- char *altnames;
char *hostname;
char *hostport;
char *redirect;
@@ -625,8 +624,7 @@
1, (guint) 80,
2, (guint) 8080,
3, "localhost",
- 4, "www",
- 5, "tcp",
+ 4, "tcp",
-1);
return;
}
@@ -636,10 +634,6 @@
return;
sld = GNUNET_strdup (section);
sld[strlen (section) - 8] = '\0';
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg, section,
- "ALTERNATIVE_NAMES", &altnames))
- altnames = GNUNET_strdup (""); /* empty */
udp = FALSE;
do
{
@@ -695,8 +689,7 @@
1, (guint) local_port,
2, (guint) host_port,
3, hostname,
- 4, altnames,
- 5, (TRUE == udp) ? "udp" :
"tcp",
+ 4, (TRUE == udp) ? "udp" :
"tcp",
-1);
}
GNUNET_free (cpy);
@@ -705,7 +698,6 @@
}
while (udp != FALSE);
GNUNET_free (sld);
- GNUNET_free (altnames);
}
@@ -761,7 +753,6 @@
guint srcport;
guint targetport;
gchar *targethost;
- gchar *altnames;
gchar *tcpudp;
/* FIXME: remove all existing DNS-related entries from cfg */
@@ -776,18 +767,13 @@
1, &srcport,
2, &targetport,
3, &targethost,
- 4, &altnames,
- 5, &tcpudp,
+ 4, &tcpudp,
-1);
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "[%s]: %u:%s:%u, %s %s\n",
hostname, srcport, targethost, targetport, altnames, tcpudp);
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "[%s]: %u:%s:%u, %s\n", hostname,
srcport, targethost, targetport, tcpudp);
- if (NULL != altnames)
- GNUNET_CONFIGURATION_set_value_string(cfg, hostname,
"ALTERNATIVE_NAMES", altnames);
-
g_free (hostname);
g_free (targethost);
- g_free (altnames);
}
while (TRUE == gtk_tree_model_iter_next (tm, &iter));
}
@@ -943,7 +929,7 @@
}
/* update model */
gtk_list_store_set (ls, &iter,
- 5, new_text,
+ 4, new_text,
-1);
/* update configuration */
update_vpn_dns_configuration (tm);
@@ -1206,7 +1192,7 @@
}
/* update model */
gtk_list_store_set (ls, &iter,
- 3, (guint) port,
+ 2, (guint) port,
-1);
/* update configuration */
update_vpn_dns_configuration (tm);
@@ -1247,90 +1233,6 @@
/**
- * The user has edited the DNS name of a service we're offering.
- * Update the GtkTreeModel (at the given path) and update the
- * respective service entry in the configuration file. Finally,
- * if the edited path is for a "fresh" entry, create another empty
- * one at the bottom. If the hostname was set to empty, remove
- * the entire entry from the configuration and the model.
- *
- * @param renderer GtkCellRendererText that changed
- * @param path GtkTreePath identifying where in the Model the change is
- * @param new_text the new text that was stored in the line
- * @param user_data NULL
- */
-static void
-save_vpn_dns_service_altnames (GtkCellRendererText *renderer,
- gchar *path,
- gchar *new_text,
- gpointer user_data)
-{
- GtkTreeModel *tm;
- GtkListStore *ls;
- GtkTreeIter iter;
-
- tm = GTK_TREE_MODEL (gtk_builder_get_object (builder,
- "vpn_dns_config_liststore"));
- if (NULL == tm)
- {
- GNUNET_break (0);
- return;
- }
- ls = GTK_LIST_STORE (tm);
- if (NULL == ls)
- {
- GNUNET_break (0);
- return;
- }
- if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path))
- {
- GNUNET_break (0);
- return;
- }
- /* update model */
- gtk_list_store_set (ls, &iter,
- 4, new_text,
- -1);
- /* update configuration */
- update_vpn_dns_configuration (tm);
-}
-
-
-/**
- * Initialize the GtkListModel with the VPN's DNS service specification.
- *
- * @param cls NULL
- * @param section section with the value (NULL)
- * @param option option name (NULL)
- * @param widget widget to initialize (the GtkTreeView)
- * @param cfg configuration handle
- * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
- */
-static int
-vpn_dns_service_altnames_install_edited_handler (const void *cls,
- const char *section,
- const char *option,
- GObject *widget,
- struct
GNUNET_CONFIGURATION_Handle *cfg)
-{
- static int once;
- GtkCellRendererText *rt;
-
- rt = GTK_CELL_RENDERER_TEXT(widget);
- if (NULL == rt)
- return GNUNET_SYSERR;
- if (0 != once++)
- return GNUNET_OK;
- g_signal_connect (rt,
- "edited",
- G_CALLBACK (&save_vpn_dns_service_altnames),
- NULL);
- return GNUNET_OK;
-}
-
-
-
-/**
* Hide "min connected friends" option if in F2F-only mode.
*/
static struct GNUNET_SETUP_VisibilitySpecification
hide_min_connected_friends[] =
@@ -2528,18 +2430,6 @@
NULL,
NULL
},
- {
- "GNUNET_setup_vpn_dns_service_altnames_cellrenderertext",
- "editing-started",
- NULL,
- NULL,
- NULL,
- "https://gnunet.org/configuration-dns",
- NULL,
- &vpn_dns_service_altnames_install_edited_handler,
- NULL,
- NULL
- },
/* END of list */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15493 - in gnunet-setup: contrib src,
gnunet <=