diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk-event_handler.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk-event_handler.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/fs/gnunet-fs-gtk-event_handler.c b/src/fs/gnunet-fs-gtk-event_handler.c index ac734af5..46ab20ea 100644 --- a/src/fs/gnunet-fs-gtk-event_handler.c +++ b/src/fs/gnunet-fs-gtk-event_handler.c | |||
@@ -546,7 +546,6 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde, | |||
546 | GtkTreeIter iter; | 546 | GtkTreeIter iter; |
547 | GtkTreePath *path; | 547 | GtkTreePath *path; |
548 | struct SearchResult *srp; | 548 | struct SearchResult *srp; |
549 | gchar *filename_utf8; | ||
550 | 549 | ||
551 | if (de == NULL) | 550 | if (de == NULL) |
552 | { | 551 | { |
@@ -586,15 +585,13 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde, | |||
586 | return de; | 585 | return de; |
587 | } | 586 | } |
588 | gtk_tree_path_free (path); | 587 | gtk_tree_path_free (path); |
589 | filename_utf8 = GNUNET_GTK_from_loc_to_utf8 ((char *) filename); | ||
590 | gtk_tree_store_set (de->ts, &iter, 4, | 588 | gtk_tree_store_set (de->ts, &iter, 4, |
591 | (guint) ((size > | 589 | (guint) ((size > |
592 | 0) ? (100 * completed / | 590 | 0) ? (100 * completed / |
593 | size) : 100) /* progress */ , | 591 | size) : 100) /* progress */ , |
594 | 6, filename_utf8 /* filename/description */ , | 592 | 6, filename /* filename/description */ , |
595 | 8, "blue" /* status colour: pending */ , | 593 | 8, "blue" /* status colour: pending */ , |
596 | -1); | 594 | -1); |
597 | GNUNET_free_non_null (filename_utf8); | ||
598 | return de; | 595 | return de; |
599 | } | 596 | } |
600 | 597 | ||
@@ -1637,7 +1634,6 @@ setup_publish (struct GNUNET_FS_PublishContext *pc, const char *fn, | |||
1637 | GtkWidget *close_button; | 1634 | GtkWidget *close_button; |
1638 | GtkNotebook *notebook; | 1635 | GtkNotebook *notebook; |
1639 | char *size_fancy; | 1636 | char *size_fancy; |
1640 | char *fn_utf8 = NULL; | ||
1641 | 1637 | ||
1642 | if (NULL == parent) | 1638 | if (NULL == parent) |
1643 | { | 1639 | { |
@@ -1705,12 +1701,10 @@ setup_publish (struct GNUNET_FS_PublishContext *pc, const char *fn, | |||
1705 | ent = GNUNET_malloc (sizeof (struct PublishEntry)); | 1701 | ent = GNUNET_malloc (sizeof (struct PublishEntry)); |
1706 | ent->is_top = (parent == NULL) ? GNUNET_YES : GNUNET_NO; | 1702 | ent->is_top = (parent == NULL) ? GNUNET_YES : GNUNET_NO; |
1707 | ent->tab = publish_tab; | 1703 | ent->tab = publish_tab; |
1708 | fn_utf8 = GNUNET_GTK_from_loc_to_utf8 ((char *) fn); | ||
1709 | gtk_tree_store_insert_with_values (publish_tab->ts, &iter, pitrptr, G_MAXINT, | 1704 | gtk_tree_store_insert_with_values (publish_tab->ts, &iter, pitrptr, G_MAXINT, |
1710 | 0, fn_utf8, 1, size_fancy, 2, "white", 3, | 1705 | 0, fn, 1, size_fancy, 2, "white", 3, |
1711 | (guint) 0 /* progress */ , | 1706 | (guint) 0 /* progress */ , |
1712 | 4, ent, -1); | 1707 | 4, ent, -1); |
1713 | GNUNET_free_non_null (fn_utf8); | ||
1714 | path = gtk_tree_model_get_path (GTK_TREE_MODEL (publish_tab->ts), &iter); | 1708 | path = gtk_tree_model_get_path (GTK_TREE_MODEL (publish_tab->ts), &iter); |
1715 | GNUNET_assert (NULL != path); | 1709 | GNUNET_assert (NULL != path); |
1716 | ent->rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (publish_tab->ts), path); | 1710 | ent->rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (publish_tab->ts), path); |