summaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk.c')
-rw-r--r--src/fs/gnunet-fs-gtk.c82
1 files changed, 42 insertions, 40 deletions
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index aa87f262..e1c5a955 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -172,7 +172,7 @@ main_window_save_position (GtkWidget *main_window)
struct GNUNET_CONFIGURATION_Handle *cfgDefault;
cfg = (struct GNUNET_CONFIGURATION_Handle *)
- GNUNET_GTK_main_loop_get_configuration (ml);
+ GNUNET_GTK_main_loop_get_configuration (ml);
main_window_gdk = gtk_widget_get_window (main_window);
maximized = GNUNET_YES;
if (NULL != main_window_gdk)
@@ -205,7 +205,7 @@ main_window_save_position (GtkWidget *main_window)
"gnunet-fs-gtk",
"MAIN_WINDOW_MAXIMIZED",
(maximized == GNUNET_YES) ? "YES"
- : "NO");
+ : "NO");
cfgDefault = GNUNET_CONFIGURATION_create ();
(void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */
@@ -432,21 +432,21 @@ unique_app_message_cb (UniqueApp *app,
GNUNET_break (0);
break;
case UNIQUE_OPEN: {
- gchar **uris;
- gint n_uris;
- gint i;
+ gchar **uris;
+ gint n_uris;
+ gint i;
- uris = unique_message_data_get_uris (message_data);
- n_uris = g_strv_length (uris);
- for (i = 0; i < n_uris; i++)
- {
- if (GNUNET_OK !=
- GNUNET_FS_GTK_handle_uri_string (uris[i], 1 /* anonymity level */))
- return UNIQUE_RESPONSE_PASSTHROUGH;
+ uris = unique_message_data_get_uris (message_data);
+ n_uris = g_strv_length (uris);
+ for (i = 0; i < n_uris; i++)
+ {
+ if (GNUNET_OK !=
+ GNUNET_FS_GTK_handle_uri_string (uris[i], 1 /* anonymity level */))
+ return UNIQUE_RESPONSE_PASSTHROUGH;
+ }
+ g_strfreev (uris);
}
- g_strfreev (uris);
- }
- break;
+ break;
case UNIQUE_ACTIVATE:
break;
default:
@@ -458,7 +458,8 @@ unique_app_message_cb (UniqueApp *app,
static char *
-format_service_list (unsigned int count, const char *const *list)
+format_service_list (unsigned int count,
+ const struct GNUNET_ARM_ServiceInfo *list)
{
size_t len = 0;
int i;
@@ -473,7 +474,7 @@ format_service_list (unsigned int count, const char *const *list)
{
len += strlen (listheader);
for (i = 0; i < count; i++)
- len += strlen (list[i]) + 1;
+ len += strlen (list[i].name) + 1;
}
len += 1;
result = p = GNUNET_malloc (len * sizeof (char));
@@ -495,8 +496,8 @@ format_service_list (unsigned int count, const char *const *list)
p += r;
for (i = 0; i < count; i++)
{
- size_t l = strlen (list[i]);
- memcpy (p, list[i], l);
+ size_t l = strlen (list[i].name);
+ memcpy (p, list[i].name, l);
p += l;
if (i + 1 < count)
{
@@ -514,7 +515,7 @@ static void
service_list_callback (void *cls,
enum GNUNET_ARM_RequestStatus rs,
unsigned int count,
- const char *const *list)
+ const struct GNUNET_ARM_ServiceInfo *list)
{
char *service_list;
@@ -549,7 +550,7 @@ arm_connection_state_change (void *cls, int connected)
static void
service_status_change (void *cls,
const char *service,
- enum GNUNET_ARM_ServiceStatus status)
+ enum GNUNET_ARM_ServiceMonitorStatus status)
{
/* Very crude, we can probably do better.
* Maybe keep a list of running services, and modify it in response
@@ -569,7 +570,7 @@ monitor_zone_error (void *cls)
GNUNET_FS_GTK_get_main_window_object ("namespace_label_liststore"));
gtk_list_store_clear (ls);
gtk_widget_hide (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object (
- "main_window_search_namespace_combobox")));
+ "main_window_search_namespace_combobox")));
}
@@ -577,7 +578,7 @@ static void
monitor_zone_sync (void *cls)
{
gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object (
- "main_window_search_namespace_combobox")));
+ "main_window_search_namespace_combobox")));
}
@@ -665,9 +666,9 @@ handle_sks_zone_identity (void *cls,
main_context.sks_zone = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
*main_context.sks_zone = *GNUNET_IDENTITY_ego_get_private_key (ego);
gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object (
- "main_window_search_namespace_label")));
+ "main_window_search_namespace_label")));
gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object (
- "main_window_search_namespace_combobox")));
+ "main_window_search_namespace_combobox")));
main_context.zm = GNUNET_NAMESTORE_zone_monitor_start (main_context.cfg,
main_context.sks_zone,
GNUNET_YES,
@@ -731,7 +732,7 @@ run (void *cls)
main_context.cfg = GNUNET_GTK_main_loop_get_configuration (ml);
main_context.search_ns_treestore =
GTK_TREE_STORE (GNUNET_FS_GTK_get_main_window_object (
- "main_window_search_namespace_treestore"));
+ "main_window_search_namespace_treestore"));
main_context.main_window = GTK_WIDGET (
GNUNET_FS_GTK_get_main_window_object ("GNUNET_GTK_main_window"));
main_context.main_window =
@@ -742,55 +743,55 @@ run (void *cls)
GNUNET_FS_GTK_get_main_window_object ("namespace_selector_window"));
main_context.ns_dropdown_button =
GTK_TOGGLE_BUTTON (GNUNET_FS_GTK_get_main_window_object (
- "main_window_search_namespace_dropdown_button"));
+ "main_window_search_namespace_dropdown_button"));
main_context.search_ns_label =
GTK_LABEL (GNUNET_FS_GTK_get_main_window_object (
- "main_window_search_selected_namespace_label"));
+ "main_window_search_selected_namespace_label"));
main_context.search_entry = GTK_ENTRY (
GNUNET_FS_GTK_get_main_window_object ("main_window_search_entry"));
downloads_treestore = GTK_TREE_STORE (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_GTK_file_sharing_downloads_tree_store"));
+ "GNUNET_GTK_file_sharing_downloads_tree_store"));
main_context.anonymity_combo =
GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object (
- "main_window_search_anonymity_combobox"));
+ "main_window_search_anonymity_combobox"));
main_context.anonymity_level_liststore = GTK_LIST_STORE (
GNUNET_FS_GTK_get_main_window_object ("anonymity_level_liststore"));
main_context.preview_image = GTK_IMAGE (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_GTK_main_window_preview_image"));
+ "GNUNET_GTK_main_window_preview_image"));
main_context.md_liststore = GTK_LIST_STORE (
GNUNET_FS_GTK_get_main_window_object ("GNUNET_GTK_meta_data_list_store"));
main_context.md_treeview =
GTK_TREE_VIEW (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_GTK_main_window_metadata_treeview"));
+ "GNUNET_GTK_main_window_metadata_treeview"));
main_context.ns_discovery_handle = NULL;
main_context.download_location_chooser =
GTK_FILE_CHOOSER (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_GTK_search_frame_download_location_chooser"));
+ "GNUNET_GTK_search_frame_download_location_chooser"));
main_context.download_name_entry =
GTK_ENTRY (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_GTK_search_frame_download_filename_entry"));
+ "GNUNET_GTK_search_frame_download_filename_entry"));
main_context.download_anonymity_combo =
GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object (
- "main_window_download_anonymity_combobox"));
+ "main_window_download_anonymity_combobox"));
main_context.download_recursive_checkbutton =
GTK_CHECK_BUTTON (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_GTK_search_frame_download_recursive_checkbox"));
+ "GNUNET_GTK_search_frame_download_recursive_checkbox"));
main_context.download_download_button =
GTK_BUTTON (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_GTK_search_frame_download_download_button"));
+ "GNUNET_GTK_search_frame_download_download_button"));
main_context.download_panel = GTK_BOX (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_GTK_search_frame_download_vbox"));
+ "GNUNET_GTK_search_frame_download_vbox"));
main_context.notebook = GTK_NOTEBOOK (
GNUNET_FS_GTK_get_main_window_object ("GNUNET_GTK_main_window_notebook"));
main_context.connection_indicator =
GTK_IMAGE (GNUNET_FS_GTK_get_main_window_object (
- "GNUNET_FS_GTK_main_window_connection_indicator"));
+ "GNUNET_FS_GTK_main_window_connection_indicator"));
GNUNET_GTK_set_icon_search_path ();
GNUNET_GTK_setup_nls ();
@@ -922,7 +923,8 @@ int
main (int argc, char **argv)
{
static struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_END};
+ GNUNET_GETOPT_OPTION_END
+ };
#if HAVE_LIBUNIQUE
int arge;