[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19315 - in gnunet-gtk: contrib src/setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19315 - in gnunet-gtk: contrib src/setup |
Date: |
Sun, 22 Jan 2012 21:02:48 +0100 |
Author: grothoff
Date: 2012-01-22 21:02:48 +0100 (Sun, 22 Jan 2012)
New Revision: 19315
Modified:
gnunet-gtk/contrib/gnunet_setup_gtk_main_window.glade
gnunet-gtk/src/setup/gnunet-setup-options.c
Log:
-updating C code for setup tool to reflect changes in glade file for new VPN/PT
code
Modified: gnunet-gtk/contrib/gnunet_setup_gtk_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_setup_gtk_main_window.glade 2012-01-22
19:42:43 UTC (rev 19314)
+++ gnunet-gtk/contrib/gnunet_setup_gtk_main_window.glade 2012-01-22
20:02:48 UTC (rev 19315)
@@ -3098,7 +3098,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton"
id="GNUNET_setup_pt_dns_checkbutton1">
+ <object class="GtkCheckButton"
id="GNUNET_setup_pt_dns_checkbutton">
<property name="label"
translatable="yes">Tunnel DNS Traffic</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -3805,7 +3805,7 @@
</object>
</child>
<child>
- <object class="GtkTreeViewColumn"
id="GNUNET_setup_gns_typ_treeviewcolumn">
+ <object class="GtkTreeViewColumn"
id="GNUNET_setup_gns_type_treeviewcolumn">
<property
name="resizable">True</property>
<property
name="sizing">autosize</property>
<property
name="title">Type</property>
Modified: gnunet-gtk/src/setup/gnunet-setup-options.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-options.c 2012-01-22 19:42:43 UTC (rev
19314)
+++ gnunet-gtk/src/setup/gnunet-setup-options.c 2012-01-22 20:02:48 UTC (rev
19315)
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- (C) 2010, 2011 Christian Grothoff (and other contributing authors)
+ (C) 2010, 2011, 2012 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
@@ -1060,13 +1060,13 @@
* @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
*/
static int
-vpn_dns_service_dnsname_install_edited_handler (const void *cls,
- const char *section,
- const char *option,
- GObject * widget,
- struct
- GNUNET_CONFIGURATION_Handle
- *cfg)
+gns_name_install_edited_handler (const void *cls,
+ const char *section,
+ const char *option,
+ GObject * widget,
+ struct
+ GNUNET_CONFIGURATION_Handle
+ *cfg)
{
static int once;
GtkCellRendererText *rt;
@@ -1144,11 +1144,11 @@
* @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
*/
static int
-vpn_dns_service_tcpudp_install_edited_handler (const void *cls,
- const char *section,
- const char *option,
- GObject * widget,
- struct
+gns_type_install_edited_handler (const void *cls,
+ const char *section,
+ const char *option,
+ GObject * widget,
+ struct
GNUNET_CONFIGURATION_Handle
*cfg)
{
static int once;
@@ -1228,13 +1228,13 @@
* @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
*/
static int
-vpn_dns_service_sourceport_install_edited_handler (const void *cls,
- const char *section,
- const char *option,
- GObject * widget,
- struct
- GNUNET_CONFIGURATION_Handle
- *cfg)
+gns_ttl_install_edited_handler (const void *cls,
+ const char *section,
+ const char *option,
+ GObject * widget,
+ struct
+ GNUNET_CONFIGURATION_Handle
+ *cfg)
{
static int once;
GtkCellRendererText *rt;
@@ -1307,13 +1307,13 @@
* @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
*/
static int
-vpn_dns_service_targethostname_install_edited_handler (const void *cls,
- const char *section,
- const char *option,
- GObject * widget,
- struct
-
GNUNET_CONFIGURATION_Handle
- *cfg)
+gns_value_install_edited_handler (const void *cls,
+ const char *section,
+ const char *option,
+ GObject * widget,
+ struct
+ GNUNET_CONFIGURATION_Handle
+ *cfg)
{
static int once;
GtkCellRendererText *rt;
@@ -1329,92 +1329,8 @@
}
-/**
- * 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_targetport (GtkCellRendererText * renderer, gchar * path,
- gchar * new_text, gpointer user_data)
-{
- GtkTreeModel *tm;
- GtkListStore *ls;
- GtkTreeIter iter;
- int port;
- port = atoi (new_text);
- if ((port < 1) || (port > UINT16_MAX))
- {
- /* invalid port, FIXME: warn */
- return;
- }
- tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("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, 2, (guint) port, -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_targetport_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_targetport),
- NULL);
- return GNUNET_OK;
-}
-
-
-/**
* Hide "min connected friends" option if in F2F-only mode.
*/
static struct GNUNET_SETUP_VisibilitySpecification hide_min_connected_friends[]
@@ -1443,8 +1359,8 @@
* Hide "exit" options if VPN exit is not in use.
*/
static struct GNUNET_SETUP_VisibilitySpecification hide_exit_options[] = {
- {"GNUNET_setup_vpn_exit_frame", "(^| )exit($| )", NULL},
- {"GNUNET_setup_vpn_service_configuration_frame", "(^| )exit($| )", NULL},
+ {"GNUNET_setup_exit_label", "(^| )exit($| )", NULL},
+ {"GNUNET_setup_exit_vbox", "(^| )exit($| )", NULL},
{NULL, NULL, NULL}
};
@@ -1476,7 +1392,7 @@
* Hide "vpn tab" if VPN not active.
*/
static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_tab[] = {
- {"GNUNET_setup_vpn_vbox", "(^| )vpn($| )", NULL},
+ {"GNUNET_setup_vpn_vbox", "(^| )pt($| )", NULL},
{NULL, NULL, NULL}
};
@@ -1714,18 +1630,6 @@
hide_fs_tab},
{
- "GNUNET_setup_general_services_vpn_checkbutton",
- "toggled",
- "arm",
- "DEFAULTSERVICES",
- gettext_noop ("Should the VPN be started automatically on startup?"),
- "https://gnunet.org/configuration-vpn",
- &load_option_list,
- &save_option_list, "vpn",
- NULL, NULL,
- hide_vpn_tab},
-
- {
"GNUNET_setup_hostlist_client_enable_checkbutton",
"toggled",
"hostlist",
@@ -2341,8 +2245,63 @@
NULL, NULL,
NULL},
+ /* VPN/PT service */
+
{
- "GNUNET_setup_vpn_master_interface_entry",
+ "GNUNET_setup_general_services_vpn_checkbutton",
+ "toggled",
+ "arm",
+ "DEFAULTSERVICES",
+ gettext_noop ("Should the VPN/PT be started automatically on startup?"),
+ "https://gnunet.org/configuration-vpn",
+ &load_option_list,
+ &save_option_list, "pt",
+ NULL, NULL,
+ hide_vpn_tab},
+
+
+ {
+ "GNUNET_setup_pt_ipv4_checkbutton",
+ "toggled",
+ "pt",
+ "TUNNEL_IPV4",
+ gettext_noop
+ ("Tunnel IPv4 traffic over GNUnet"),
+ "https://gnunet.org/configuration-vpn",
+ &load_yes_no,
+ &save_yes_no, NULL,
+ NULL, NULL,
+ NULL },
+
+
+ {
+ "GNUNET_setup_pt_ipv6_checkbutton",
+ "toggled",
+ "pt",
+ "TUNNEL_IPV6",
+ gettext_noop
+ ("Tunnel IPv6 traffic over GNUnet"),
+ "https://gnunet.org/configuration-vpn",
+ &load_yes_no,
+ &save_yes_no, NULL,
+ NULL, NULL,
+ NULL },
+
+ {
+ "GNUNET_setup_pt_dns_checkbutton",
+ "toggled",
+ "pt",
+ "TUNNEL_DNS",
+ gettext_noop
+ ("Tunnel DNS traffic over GNUnet"),
+ "https://gnunet.org/configuration-vpn",
+ &load_yes_no,
+ &save_yes_no, NULL,
+ NULL, NULL,
+ NULL },
+
+ {
+ "GNUNET_setup_vpn_interface_entry",
"changed",
"vpn",
"IFNAME",
@@ -2354,7 +2313,7 @@
NULL},
{
- "GNUNET_setup_vpn_master_interface_v4_ip_entry",
+ "GNUNET_setup_vpn_interface_v4_ip_entry",
"changed",
"vpn",
"IPV4ADDR",
@@ -2366,7 +2325,7 @@
NULL},
{
- "GNUNET_setup_vpn_master_interface_v4_mask_entry",
+ "GNUNET_setup_vpn_interface_v4_mask_entry",
"changed",
"vpn",
"IPV4MASK",
@@ -2378,7 +2337,7 @@
NULL},
{
- "GNUNET_setup_vpn_master_interface_v6_ip_entry",
+ "GNUNET_setup_vpn_interface_v6_ip_entry",
"changed",
"vpn",
"IPV6ADDR",
@@ -2390,7 +2349,7 @@
NULL},
{
- "GNUNET_setup_vpn_master_interface_v6_mask_spinbutton",
+ "GNUNET_setup_vpn_interface_v6_mask_spinbutton",
"value-changed",
"vpn",
"IPV6MASK",
@@ -2401,21 +2360,11 @@
NULL, NULL,
NULL},
- {
- "GNUNET_setup_vpn_master_vdns_server_entry",
- "changed",
- "vpn",
- "VIRTDNS",
- gettext_noop
- ("IP address of the virtual DNS server that resolves through GNUnet (use in
resolve.conf if you want to resolve through some GNUnet DNS Exit)"),
- "https://gnunet.org/configuration-vpn",
- &load_text,
- &save_text, NULL,
- NULL, NULL,
- NULL},
+ /* exit daemon */
+
{
- "GNUNET_setup_vpn_enable_vpn_exit_checkbutton",
+ "GNUNET_setup_general_services_exit_checkbutton",
"toggled",
"arm",
"DEFAULTSERVICES",
@@ -2428,7 +2377,20 @@
hide_exit_options},
{
- "GNUNET_setup_vpn_enable_dns_exit_checkbutton",
+ "GNUNET_setup_dns_resolver_ip_entry",
+ "changed",
+ "dns",
+ "DNS_EXIT",
+ gettext_noop
+ ("IP address of the external DNS resolver to use (values from your
resolve.conf are usually appropriate))"),
+ "https://gnunet.org/configuration-exit",
+ &load_text,
+ &save_text, NULL,
+ NULL, NULL,
+ NULL},
+
+ {
+ "GNUNET_setup_dns_enable_exit_checkbutton",
"toggled",
"dns",
"PROVIDE_EXIT",
@@ -2441,7 +2403,7 @@
NULL},
{
- "GNUNET_setup_vpn_exit_interface_name_entry",
+ "GNUNET_setup_exit_interface_name_entry",
"changed",
"exit",
"IFNAME",
@@ -2454,11 +2416,11 @@
NULL},
{
- "GNUNET_setup_vpn_exit_interface_v4_ip_entry",
+ "GNUNET_setup_exit_interface_v4_ip_entry",
"changed",
"exit",
"IPV4ADDR",
- gettext_noop ("IPv4 address to use for the VPN Exit interface"),
+ gettext_noop ("IPv4 address to use for the Exit interface"),
"https://gnunet.org/configuration-exit",
&load_text,
&save_text, NULL,
@@ -2466,11 +2428,11 @@
NULL},
{
- "GNUNET_setup_vpn_exit_interface_v4_mask_entry",
+ "GNUNET_setup_exit_interface_v4_mask_entry",
"changed",
"exit",
"IPV4MASK",
- gettext_noop ("IPv4 network mask to use for the VPN Exit interface"),
+ gettext_noop ("IPv4 network mask to use for the Exit interface"),
"https://gnunet.org/configuration-exit",
&load_text,
&save_text, NULL,
@@ -2478,11 +2440,11 @@
NULL},
{
- "GNUNET_setup_vpn_exit_interface_v6_ip_entry",
+ "GNUNET_setup_exit_interface_v6_ip_entry",
"changed",
"exit",
"IPV6ADDR",
- gettext_noop ("IPv6 address to use for the VPN Exit interface"),
+ gettext_noop ("IPv6 address to use for the Exit interface"),
"https://gnunet.org/configuration-exit",
&load_text,
&save_text, NULL,
@@ -2490,12 +2452,12 @@
NULL},
{
- "GNUNET_setup_vpn_exit_interface_v6_mask_spinbutton",
+ "GNUNET_setup_exit_interface_v6_mask_spinbutton",
"value-changed",
"exit",
"IPV6MASK",
gettext_noop
- ("IPv6 network prefix length to use for the VPN Exit interface"),
+ ("IPv6 network prefix length to use for the Exit interface"),
"https://gnunet.org/configuration-exit",
&load_number,
&save_number, NULL,
@@ -2504,10 +2466,10 @@
{
- "GNUNET_setup_vpn_exit_enable_udp_checkbutton",
+ "GNUNET_setup_exit_enable_ipv4_exit_checkbutton",
"toggled",
"exit",
- "ENABLE_UDP",
+ "EXIT_IPV4",
gettext_noop
("Allow other users to use your Internet connection for UDP traffic (via
the Exit interface)"),
"https://gnunet.org/configuration-exit",
@@ -2517,10 +2479,10 @@
NULL},
{
- "GNUNET_setup_vpn_exit_enable_tcp_checkbutton",
+ "GNUNET_setup_exit_enable_ipv6_exit_checkbutton",
"toggled",
"exit",
- "ENABLE_TCP",
+ "EXIT_IPV6",
gettext_noop
("Allow other users to use your Internet connection for TCP traffic (via
the Exit interface)"),
"https://gnunet.org/configuration-exit",
@@ -2532,12 +2494,12 @@
/* DNS treeview */
{
- "GNUNET_setup_vpn_dns_service_treeview",
+ "GNUNET_setup_gns_treeview",
NULL,
NULL,
NULL,
gettext_noop
- ("Specification of .gnunet hostnames and services offered by this peer"),
+ ("Specification of .gnunet TLD"),
"https://gnunet.org/configuration-dns",
&load_vpn_dns_configuration,
NULL, NULL,
@@ -2545,75 +2507,61 @@
NULL},
{
- "GNUNET_setup_vpn_dns_service_dnsname_cellrenderertext",
+ "GNUNET_setup_gns_name_cellrenderertext",
"editing-started",
NULL,
NULL,
NULL,
"https://gnunet.org/configuration-dns",
NULL,
- &vpn_dns_service_dnsname_install_edited_handler,
+ &gns_name_install_edited_handler,
NULL,
NULL,
NULL,
NULL},
{
- "GNUNET_setup_vpn_dns_service_tcpudp_cellrenderertext",
+ "GNUNET_setup_gns_type_cellrenderertext",
"editing-started",
NULL,
NULL,
NULL,
"https://gnunet.org/configuration-dns",
NULL,
- &vpn_dns_service_tcpudp_install_edited_handler,
+ &gns_type_install_edited_handler,
NULL,
NULL,
NULL,
NULL},
{
- "GNUNET_setup_vpn_dns_service_sourceport_cellrenderertext",
+ "GNUNET_setup_gns_ttl_cellrenderertext",
"editing-started",
NULL,
NULL,
NULL,
"https://gnunet.org/configuration-dns",
NULL,
- &vpn_dns_service_sourceport_install_edited_handler,
+ &gns_ttl_install_edited_handler,
NULL,
NULL,
NULL,
NULL},
{
- "GNUNET_setup_vpn_dns_service_targethostname_cellrenderertext",
+ "GNUNET_setup_gns_value_cellrenderertext",
"editing-started",
NULL,
NULL,
NULL,
"https://gnunet.org/configuration-dns",
NULL,
- &vpn_dns_service_targethostname_install_edited_handler,
+ &gns_value_install_edited_handler,
NULL,
NULL,
NULL,
NULL},
- {
- "GNUNET_setup_vpn_dns_service_targetport_cellrenderertext",
- "editing-started",
- NULL,
- NULL,
- NULL,
- "https://gnunet.org/configuration-dns",
- NULL,
- &vpn_dns_service_targetport_install_edited_handler,
- NULL,
- NULL,
- NULL,
- NULL},
-
/* END of list */
{NULL, NULL, NULL, NULL, NULL,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19315 - in gnunet-gtk: contrib src/setup,
gnunet <=