aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2012-11-13 02:06:47 +0000
committerLRN <lrn1986@gmail.com>2012-11-13 02:06:47 +0000
commitf47d8ddb1757d063bc26ddf0650687f937e3fbcb (patch)
tree84ed7d7b244dfa6df8d74c9584e6235b57f9672f
parentf83763e1fd3082128e22a407fb4255c35487d747 (diff)
downloadgnunet-gtk-f47d8ddb1757d063bc26ddf0650687f937e3fbcb.tar.gz
gnunet-gtk-f47d8ddb1757d063bc26ddf0650687f937e3fbcb.zip
Fix the problem with the preview image, also clean up code
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c
index 7c3d55bf..96d88698 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.c
+++ b/src/fs/gnunet-fs-gtk_event-handler.c
@@ -1748,7 +1748,6 @@ GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv,
1748 struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context (); 1748 struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context ();
1749 1749
1750 GNUNET_assert (tab->query_txt != NULL); 1750 GNUNET_assert (tab->query_txt != NULL);
1751 sel = gtk_tree_view_get_selection (tv);
1752 gtk_list_store_clear (mctx->md_liststore); 1751 gtk_list_store_clear (mctx->md_liststore);
1753 sel = gtk_tree_view_get_selection (tv); 1752 sel = gtk_tree_view_get_selection (tv);
1754 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) 1753 if (! gtk_tree_selection_get_selected (sel, &model, &iter))
@@ -1793,7 +1792,6 @@ GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv,
1793 1792
1794 gtk_entry_set_text (mctx->download_name_entry, filename != NULL ? filename : NULL); 1793 gtk_entry_set_text (mctx->download_name_entry, filename != NULL ? filename : NULL);
1795 gtk_file_chooser_set_current_folder (mctx->download_location_chooser, download_directory); 1794 gtk_file_chooser_set_current_folder (mctx->download_location_chooser, download_directory);
1796 /*gtk_file_chooser_set_current_name (mctx->download_location_chooser, download_directory);*/
1797 1795
1798 gtk_widget_show_all (GTK_WIDGET (mctx->download_panel)); 1796 gtk_widget_show_all (GTK_WIDGET (mctx->download_panel));
1799 GNUNET_free (filename); 1797 GNUNET_free (filename);
@@ -1807,7 +1805,10 @@ GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv,
1807 gtk_image_set_from_pixbuf (mctx->preview_image, pixbuf); 1805 gtk_image_set_from_pixbuf (mctx->preview_image, pixbuf);
1808 g_object_unref (G_OBJECT (pixbuf)); 1806 g_object_unref (G_OBJECT (pixbuf));
1809 } 1807 }
1810 if (NULL != meta) 1808 else
1809 gtk_image_clear (mctx->preview_image);
1810
1811 if (NULL != meta)
1811 GNUNET_CONTAINER_meta_data_iterate (meta, 1812 GNUNET_CONTAINER_meta_data_iterate (meta,
1812 &GNUNET_FS_GTK_add_meta_data_to_list_store, 1813 &GNUNET_FS_GTK_add_meta_data_to_list_store,
1813 mctx->md_liststore); 1814 mctx->md_liststore);