diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-12-03 08:37:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-12-03 08:37:05 +0000 |
commit | fdafbeb7e24abf0b90d78ee989f3f6ec9718f11b (patch) | |
tree | e424d54cbeb7d67b1f9d55032e1ef115b90d136c | |
parent | 5bcfb85fd1c931322a9011f310544192ec6ce9d2 (diff) | |
download | gnunet-gtk-fdafbeb7e24abf0b90d78ee989f3f6ec9718f11b.tar.gz gnunet-gtk-fdafbeb7e24abf0b90d78ee989f3f6ec9718f11b.zip |
-fixing warnings
-rw-r--r-- | src/fs/gnunet-fs-gtk.c | 8 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk_event-handler.c | 42 |
2 files changed, 29 insertions, 21 deletions
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c index 2a5e4908..97d56f2a 100644 --- a/src/fs/gnunet-fs-gtk.c +++ b/src/fs/gnunet-fs-gtk.c | |||
@@ -227,8 +227,6 @@ void | |||
227 | GNUNET_FS_GTK_menu_quit_activate_cb (GtkMenuItem *object, | 227 | GNUNET_FS_GTK_menu_quit_activate_cb (GtkMenuItem *object, |
228 | gpointer user_data) | 228 | gpointer user_data) |
229 | { | 229 | { |
230 | struct GNUNET_GTK_MainWindowContext *main_context = user_data; | ||
231 | |||
232 | GNUNET_SCHEDULER_shutdown (); | 230 | GNUNET_SCHEDULER_shutdown (); |
233 | } | 231 | } |
234 | 232 | ||
@@ -241,11 +239,9 @@ GNUNET_FS_GTK_menu_quit_activate_cb (GtkMenuItem *object, | |||
241 | */ | 239 | */ |
242 | void | 240 | void |
243 | GNUNET_FS_GTK_delete_event_cb (GtkWidget *object, | 241 | GNUNET_FS_GTK_delete_event_cb (GtkWidget *object, |
244 | GdkEvent *event, | 242 | GdkEvent *event, |
245 | gpointer user_data) | 243 | gpointer user_data) |
246 | { | 244 | { |
247 | struct GNUNET_GTK_MainWindowContext *main_context = user_data; | ||
248 | |||
249 | /* GNUNET_FS_GTK_delete_event_cb will eventually be called if we shut down | 245 | /* GNUNET_FS_GTK_delete_event_cb will eventually be called if we shut down |
250 | * the scheduler, because shutting it down will make GTK delete the main | 246 | * the scheduler, because shutting it down will make GTK delete the main |
251 | * window. On the other hand, deleting the main window first (clicking on X | 247 | * window. On the other hand, deleting the main window first (clicking on X |
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c index 56bbbcb4..d5b4a9ad 100644 --- a/src/fs/gnunet-fs-gtk_event-handler.c +++ b/src/fs/gnunet-fs-gtk_event-handler.c | |||
@@ -499,8 +499,8 @@ get_suggested_filename_anonymity (GtkTreeModel *tm, | |||
499 | return NULL; | 499 | return NULL; |
500 | } | 500 | } |
501 | 501 | ||
502 | /* | 502 | |
503 | * | 503 | /** |
504 | * finished_chain - non-NULL for top-level call (for the item we're about to download), NULL otherwise | 504 | * finished_chain - non-NULL for top-level call (for the item we're about to download), NULL otherwise |
505 | * function sets it to GNUNET_YES if the item we're about to download was, in fact, already downloaded once, and thus we provide a name for it, | 505 | * function sets it to GNUNET_YES if the item we're about to download was, in fact, already downloaded once, and thus we provide a name for it, |
506 | * returning a finished relative filename that might only need .gnd appended to it, nothing else. | 506 | * returning a finished relative filename that might only need .gnd appended to it, nothing else. |
@@ -510,24 +510,24 @@ get_suggested_filename_anonymity (GtkTreeModel *tm, | |||
510 | * anonymity - anonymity level of one of the *parents. Initialize to -1. If none were downloaded, remains -1. | 510 | * anonymity - anonymity level of one of the *parents. Initialize to -1. If none were downloaded, remains -1. |
511 | * Returned strings should be freed with GNUNET_free() if not NULL. | 511 | * Returned strings should be freed with GNUNET_free() if not NULL. |
512 | */ | 512 | */ |
513 | void | 513 | static void |
514 | build_relative_name (GtkTreeModel *tm, | 514 | build_relative_name (GtkTreeModel *tm, |
515 | GtkTreeIter *iter, | 515 | GtkTreeIter *iter, |
516 | int *finished_chain, | 516 | int *finished_chain, |
517 | gchar **root_directory, | 517 | gchar **root_directory, |
518 | gchar **relative_directory, | 518 | gchar **relative_directory, |
519 | int *anonymity) | 519 | int *anonymity) |
520 | { | 520 | { |
521 | char *filename; | 521 | char *filename; |
522 | int downloaded_anonymity; | 522 | int downloaded_anonymity; |
523 | char *parent_filename; | ||
524 | GtkTreeIter parent; | 523 | GtkTreeIter parent; |
525 | 524 | ||
526 | gtk_tree_model_get (tm, iter, | 525 | gtk_tree_model_get (tm, iter, |
527 | SEARCH_TAB_MC_DOWNLOADED_FILENAME, &filename, | 526 | SEARCH_TAB_MC_DOWNLOADED_FILENAME, &filename, |
528 | SEARCH_TAB_MC_DOWNLOADED_ANONYMITY, &downloaded_anonymity, -1); | 527 | SEARCH_TAB_MC_DOWNLOADED_ANONYMITY, &downloaded_anonymity, |
528 | -1); | ||
529 | 529 | ||
530 | if (!gtk_tree_model_iter_parent (tm, &parent, iter)) | 530 | if (! gtk_tree_model_iter_parent (tm, &parent, iter)) |
531 | { | 531 | { |
532 | /* Ok, we're at the top item. | 532 | /* Ok, we're at the top item. |
533 | * bottom == GNUNET_YES is a corner case when we only have one | 533 | * bottom == GNUNET_YES is a corner case when we only have one |
@@ -624,6 +624,7 @@ build_relative_name (GtkTreeModel *tm, | |||
624 | g_free (filename); | 624 | g_free (filename); |
625 | } | 625 | } |
626 | 626 | ||
627 | |||
627 | static char * | 628 | static char * |
628 | get_suggested_filename_anonymity2 (GtkTreeModel *tm, | 629 | get_suggested_filename_anonymity2 (GtkTreeModel *tm, |
629 | GtkTreeIter *iter, | 630 | GtkTreeIter *iter, |
@@ -637,8 +638,6 @@ get_suggested_filename_anonymity2 (GtkTreeModel *tm, | |||
637 | char *tmp; | 638 | char *tmp; |
638 | int downloaded_anonymity; | 639 | int downloaded_anonymity; |
639 | struct GNUNET_CONTAINER_MetaData *meta; | 640 | struct GNUNET_CONTAINER_MetaData *meta; |
640 | GtkTreeIter parent; | ||
641 | char *dot; | ||
642 | size_t tmplen; | 641 | size_t tmplen; |
643 | int finished_chain; | 642 | int finished_chain; |
644 | 643 | ||
@@ -946,7 +945,20 @@ start_download_ctx_menu_helper (struct SearchListPopupContext *spc, | |||
946 | gtk_tree_path_free (path); | 945 | gtk_tree_path_free (path); |
947 | } | 946 | } |
948 | 947 | ||
948 | |||
949 | /** | ||
950 | * Selected row has changed in search result tree view, update preview | ||
951 | * and metadata areas. | ||
952 | * | ||
953 | * @param tv the tree view in a search tab where the selection changed | ||
954 | * @param user_data the 'struct SearchTab' that contains the tree view | ||
955 | */ | ||
949 | void | 956 | void |
957 | GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv, | ||
958 | gpointer user_data); | ||
959 | |||
960 | |||
961 | static void | ||
950 | start_download2 () | 962 | start_download2 () |
951 | { | 963 | { |
952 | struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context (); | 964 | struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context (); |
@@ -1023,6 +1035,7 @@ start_download2 () | |||
1023 | GNUNET_FS_GTK_search_treeview_cursor_changed (tv, st); | 1035 | GNUNET_FS_GTK_search_treeview_cursor_changed (tv, st); |
1024 | } | 1036 | } |
1025 | 1037 | ||
1038 | |||
1026 | /** | 1039 | /** |
1027 | * User clicked on "Download!" button at the download options panel. | 1040 | * User clicked on "Download!" button at the download options panel. |
1028 | * | 1041 | * |
@@ -1748,7 +1761,6 @@ GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv, | |||
1748 | GdkPixbuf *pixbuf; | 1761 | GdkPixbuf *pixbuf; |
1749 | struct SearchResult *sr; | 1762 | struct SearchResult *sr; |
1750 | struct GNUNET_FS_Uri *uri; | 1763 | struct GNUNET_FS_Uri *uri; |
1751 | gchar *filename; | ||
1752 | struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context (); | 1764 | struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context (); |
1753 | 1765 | ||
1754 | GNUNET_assert (tab->query_txt != NULL); | 1766 | GNUNET_assert (tab->query_txt != NULL); |