diff options
-rw-r--r-- | gnunet-gtk.glade | 951 | ||||
-rw-r--r-- | src/common/helper.c | 22 | ||||
-rw-r--r-- | src/common/logging.c | 88 | ||||
-rw-r--r-- | src/core/main.c | 3 | ||||
-rw-r--r-- | src/include/gnunetgtk_common.h | 8 | ||||
-rw-r--r-- | src/plugins/daemon/daemon.c | 75 | ||||
-rw-r--r-- | src/plugins/fs/Makefile.am | 1 | ||||
-rw-r--r-- | src/plugins/fs/collection.c | 6 | ||||
-rw-r--r-- | src/plugins/fs/download.c | 1 | ||||
-rw-r--r-- | src/plugins/fs/fs.c | 97 | ||||
-rw-r--r-- | src/plugins/fs/fs.h | 7 | ||||
-rw-r--r-- | src/plugins/fs/namespace.c | 3 | ||||
-rw-r--r-- | src/plugins/fs/namespace_search.c | 65 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 33 | ||||
-rw-r--r-- | src/plugins/fs/status.c | 79 | ||||
-rw-r--r-- | src/plugins/fs/status.h | 38 | ||||
-rw-r--r-- | src/plugins/stats/functions.c | 21 |
17 files changed, 769 insertions, 729 deletions
diff --git a/gnunet-gtk.glade b/gnunet-gtk.glade index ea5ba5ce..86604556 100644 --- a/gnunet-gtk.glade +++ b/gnunet-gtk.glade | |||
@@ -4,7 +4,6 @@ | |||
4 | <glade-interface> | 4 | <glade-interface> |
5 | <widget class="GtkWindow" id="mainWindow"> | 5 | <widget class="GtkWindow" id="mainWindow"> |
6 | <property name="can_focus">True</property> | 6 | <property name="can_focus">True</property> |
7 | <property name="has_focus">True</property> | ||
8 | <property name="can_default">True</property> | 7 | <property name="can_default">True</property> |
9 | <property name="has_default">True</property> | 8 | <property name="has_default">True</property> |
10 | <property name="title" translatable="yes">GNUnet, GNU's Peer-to-Peer Network</property> | 9 | <property name="title" translatable="yes">GNUnet, GNU's Peer-to-Peer Network</property> |
@@ -25,7 +24,6 @@ | |||
25 | <widget class="GtkScrolledWindow" id="welcomeScrolledWindow"> | 24 | <widget class="GtkScrolledWindow" id="welcomeScrolledWindow"> |
26 | <property name="visible">True</property> | 25 | <property name="visible">True</property> |
27 | <property name="can_focus">True</property> | 26 | <property name="can_focus">True</property> |
28 | <property name="has_focus">True</property> | ||
29 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | 27 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> |
30 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | 28 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> |
31 | <child> | 29 | <child> |
@@ -577,43 +575,115 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
577 | <placeholder/> | 575 | <placeholder/> |
578 | </child> | 576 | </child> |
579 | <child> | 577 | <child> |
580 | <widget class="GtkVBox" id="vbox21"> | 578 | <widget class="GtkScrolledWindow" id="scrolledwindow9"> |
579 | <property name="visible">True</property> | ||
580 | <property name="can_focus">False</property> | ||
581 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
582 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
583 | <property name="shadow_type">GTK_SHADOW_IN</property> | ||
584 | <child> | ||
585 | <widget class="GtkTreeView" id="activeSearchesSummary"> | ||
586 | <property name="visible">True</property> | ||
587 | <property name="can_focus">True</property> | ||
588 | <property name="reorderable">True</property> | ||
589 | <property name="rules_hint">True</property> | ||
590 | </widget> | ||
591 | </child> | ||
592 | </widget> | ||
593 | <packing> | ||
594 | <property name="top_attach">1</property> | ||
595 | <property name="bottom_attach">2</property> | ||
596 | </packing> | ||
597 | </child> | ||
598 | <child> | ||
599 | <widget class="GtkLabel" id="label16"> | ||
600 | <property name="visible">True</property> | ||
601 | <property name="xalign">0</property> | ||
602 | <property name="yalign">1</property> | ||
603 | <property name="xpad">5</property> | ||
604 | <property name="ypad">5</property> | ||
605 | <property name="label" translatable="yes"><b>Search Overview</b></property> | ||
606 | <property name="use_markup">True</property> | ||
607 | </widget> | ||
608 | <packing> | ||
609 | <property name="right_attach">2</property> | ||
610 | <property name="y_options">GTK_FILL</property> | ||
611 | </packing> | ||
612 | </child> | ||
613 | <child> | ||
614 | <widget class="GtkScrolledWindow" id="scrolledwindow10"> | ||
615 | <property name="visible">True</property> | ||
616 | <property name="can_focus">True</property> | ||
617 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
618 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
619 | <property name="shadow_type">GTK_SHADOW_IN</property> | ||
620 | <child> | ||
621 | <widget class="GtkTreeView" id="activeDownloadsList"> | ||
622 | <property name="visible">True</property> | ||
623 | <property name="can_focus">True</property> | ||
624 | <property name="reorderable">True</property> | ||
625 | <property name="rules_hint">True</property> | ||
626 | </widget> | ||
627 | </child> | ||
628 | </widget> | ||
629 | <packing> | ||
630 | <property name="top_attach">3</property> | ||
631 | <property name="bottom_attach">4</property> | ||
632 | </packing> | ||
633 | </child> | ||
634 | <child> | ||
635 | <widget class="GtkVBox" id="vbox8"> | ||
581 | <property name="visible">True</property> | 636 | <property name="visible">True</property> |
582 | <property name="homogeneous">True</property> | 637 | <property name="homogeneous">True</property> |
583 | <child> | 638 | <child> |
584 | <widget class="GtkButton" id="stopUploadButton"> | 639 | <widget class="GtkButton" id="abortDownloadButton"> |
585 | <property name="visible">True</property> | 640 | <property name="visible">True</property> |
586 | <property name="sensitive">False</property> | 641 | <property name="sensitive">False</property> |
587 | <property name="can_focus">True</property> | 642 | <property name="can_focus">True</property> |
588 | <property name="tooltip" translatable="yes">Cancel the selected upload (and all sub-uploads) and remove them from the list</property> | 643 | <property name="tooltip" translatable="yes">Cancel the selected download (and all sub-downloads) and delete incomplete downloads</property> |
644 | <property name="label">gtk-delete</property> | ||
645 | <property name="use_stock">True</property> | ||
646 | <property name="response_id">0</property> | ||
647 | <signal name="clicked" handler="on_abortDownloadButton_clicked_"/> | ||
648 | </widget> | ||
649 | <packing> | ||
650 | <property name="fill">False</property> | ||
651 | </packing> | ||
652 | </child> | ||
653 | <child> | ||
654 | <widget class="GtkButton" id="stopDownloadButton"> | ||
655 | <property name="visible">True</property> | ||
656 | <property name="sensitive">False</property> | ||
657 | <property name="can_focus">True</property> | ||
658 | <property name="tooltip" translatable="yes">Stop the selected download (and all sub-downloads) and remove them from the list. This will NOT cause the deletion of files from incomplete downloads.</property> | ||
589 | <property name="label">gtk-stop</property> | 659 | <property name="label">gtk-stop</property> |
590 | <property name="use_stock">True</property> | 660 | <property name="use_stock">True</property> |
591 | <property name="response_id">0</property> | 661 | <property name="response_id">0</property> |
592 | <signal name="clicked" handler="on_stopUploadButton_clicked_" object="activeUploadsList"/> | 662 | <signal name="clicked" handler="on_stopDownloadButton_clicked_"/> |
593 | </widget> | 663 | </widget> |
594 | <packing> | 664 | <packing> |
595 | <property name="expand">False</property> | ||
596 | <property name="fill">False</property> | 665 | <property name="fill">False</property> |
666 | <property name="position">1</property> | ||
597 | </packing> | 667 | </packing> |
598 | </child> | 668 | </child> |
599 | <child> | 669 | <child> |
600 | <widget class="GtkButton" id="clearCompletedUploadsButton"> | 670 | <widget class="GtkButton" id="clearCompletedDownloadsButton"> |
601 | <property name="visible">True</property> | 671 | <property name="visible">True</property> |
602 | <property name="can_focus">True</property> | 672 | <property name="can_focus">True</property> |
603 | <property name="tooltip" translatable="yes">Clear completed uploads from the list</property> | 673 | <property name="tooltip" translatable="yes">Clear completed downloads from the list</property> |
604 | <property name="response_id">0</property> | 674 | <property name="response_id">0</property> |
605 | <signal name="clicked" handler="on_clearCompletedUploadsButton_clicked_"/> | 675 | <signal name="clicked" handler="on_clearCompletedDownloadsButton_clicked_"/> |
606 | <child> | 676 | <child> |
607 | <widget class="GtkAlignment" id="alignment4"> | 677 | <widget class="GtkAlignment" id="alignment3"> |
608 | <property name="visible">True</property> | 678 | <property name="visible">True</property> |
609 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | 679 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
610 | <property name="xscale">0</property> | 680 | <property name="xscale">0</property> |
611 | <child> | 681 | <child> |
612 | <widget class="GtkHBox" id="hbox5"> | 682 | <widget class="GtkHBox" id="hbox4"> |
613 | <property name="visible">True</property> | 683 | <property name="visible">True</property> |
614 | <property name="spacing">2</property> | 684 | <property name="spacing">2</property> |
615 | <child> | 685 | <child> |
616 | <widget class="GtkImage" id="image4"> | 686 | <widget class="GtkImage" id="image3"> |
617 | <property name="visible">True</property> | 687 | <property name="visible">True</property> |
618 | <property name="stock">gtk-clear</property> | 688 | <property name="stock">gtk-clear</property> |
619 | </widget> | 689 | </widget> |
@@ -623,7 +693,7 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
623 | </packing> | 693 | </packing> |
624 | </child> | 694 | </child> |
625 | <child> | 695 | <child> |
626 | <widget class="GtkLabel" id="label2"> | 696 | <widget class="GtkLabel" id="label5"> |
627 | <property name="visible">True</property> | 697 | <property name="visible">True</property> |
628 | <property name="label" translatable="yes">_Clean</property> | 698 | <property name="label" translatable="yes">_Clean</property> |
629 | <property name="use_underline">True</property> | 699 | <property name="use_underline">True</property> |
@@ -640,107 +710,22 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
640 | </child> | 710 | </child> |
641 | </widget> | 711 | </widget> |
642 | <packing> | 712 | <packing> |
713 | <property name="expand">False</property> | ||
643 | <property name="fill">False</property> | 714 | <property name="fill">False</property> |
644 | <property name="position">1</property> | 715 | <property name="position">2</property> |
645 | </packing> | 716 | </packing> |
646 | </child> | 717 | </child> |
647 | </widget> | 718 | </widget> |
648 | <packing> | 719 | <packing> |
649 | <property name="left_attach">1</property> | 720 | <property name="left_attach">1</property> |
650 | <property name="right_attach">2</property> | 721 | <property name="right_attach">2</property> |
651 | <property name="top_attach">6</property> | 722 | <property name="top_attach">3</property> |
652 | <property name="bottom_attach">7</property> | 723 | <property name="bottom_attach">4</property> |
653 | <property name="x_options">GTK_FILL</property> | 724 | <property name="x_options">GTK_FILL</property> |
654 | <property name="x_padding">5</property> | 725 | <property name="x_padding">5</property> |
655 | </packing> | 726 | </packing> |
656 | </child> | 727 | </child> |
657 | <child> | 728 | <child> |
658 | <widget class="GtkButton" id="stopSearchButton"> | ||
659 | <property name="visible">True</property> | ||
660 | <property name="sensitive">False</property> | ||
661 | <property name="can_focus">True</property> | ||
662 | <property name="tooltip" translatable="yes">Cancel the selected search and remove it from the list</property> | ||
663 | <property name="border_width">4</property> | ||
664 | <property name="label">gtk-stop</property> | ||
665 | <property name="use_stock">True</property> | ||
666 | <property name="response_id">0</property> | ||
667 | <signal name="clicked" handler="on_closeSearchSummaryButton_clicked_" object="activeSearchesSummary"/> | ||
668 | </widget> | ||
669 | <packing> | ||
670 | <property name="left_attach">1</property> | ||
671 | <property name="right_attach">2</property> | ||
672 | <property name="top_attach">1</property> | ||
673 | <property name="bottom_attach">2</property> | ||
674 | <property name="x_options">GTK_FILL</property> | ||
675 | <property name="y_options"></property> | ||
676 | </packing> | ||
677 | </child> | ||
678 | <child> | ||
679 | <widget class="GtkAlignment" id="alignment14"> | ||
680 | <property name="visible">True</property> | ||
681 | <property name="top_padding">5</property> | ||
682 | <child> | ||
683 | <widget class="GtkLabel" id="label46"> | ||
684 | <property name="visible">True</property> | ||
685 | <property name="xalign">0</property> | ||
686 | <property name="xpad">5</property> | ||
687 | <property name="ypad">5</property> | ||
688 | <property name="label" translatable="yes"><b>Publications</b></property> | ||
689 | <property name="use_markup">True</property> | ||
690 | </widget> | ||
691 | </child> | ||
692 | </widget> | ||
693 | <packing> | ||
694 | <property name="right_attach">2</property> | ||
695 | <property name="top_attach">5</property> | ||
696 | <property name="bottom_attach">6</property> | ||
697 | <property name="y_options">GTK_FILL</property> | ||
698 | </packing> | ||
699 | </child> | ||
700 | <child> | ||
701 | <widget class="GtkAlignment" id="alignment11"> | ||
702 | <property name="visible">True</property> | ||
703 | <property name="top_padding">5</property> | ||
704 | <child> | ||
705 | <widget class="GtkLabel" id="label45"> | ||
706 | <property name="visible">True</property> | ||
707 | <property name="xalign">0</property> | ||
708 | <property name="xpad">5</property> | ||
709 | <property name="ypad">5</property> | ||
710 | <property name="label" translatable="yes"><b>Downloads</b></property> | ||
711 | <property name="use_markup">True</property> | ||
712 | </widget> | ||
713 | </child> | ||
714 | </widget> | ||
715 | <packing> | ||
716 | <property name="right_attach">2</property> | ||
717 | <property name="top_attach">2</property> | ||
718 | <property name="bottom_attach">3</property> | ||
719 | <property name="y_options">GTK_FILL</property> | ||
720 | </packing> | ||
721 | </child> | ||
722 | <child> | ||
723 | <widget class="GtkScrolledWindow" id="scrolledwindow8"> | ||
724 | <property name="visible">True</property> | ||
725 | <property name="can_focus">False</property> | ||
726 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
727 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
728 | <property name="shadow_type">GTK_SHADOW_IN</property> | ||
729 | <child> | ||
730 | <widget class="GtkTreeView" id="activeUploadsList"> | ||
731 | <property name="visible">True</property> | ||
732 | <property name="can_focus">True</property> | ||
733 | <property name="reorderable">True</property> | ||
734 | <property name="rules_hint">True</property> | ||
735 | </widget> | ||
736 | </child> | ||
737 | </widget> | ||
738 | <packing> | ||
739 | <property name="top_attach">6</property> | ||
740 | <property name="bottom_attach">7</property> | ||
741 | </packing> | ||
742 | </child> | ||
743 | <child> | ||
744 | <widget class="GtkHBox" id="hbox1"> | 729 | <widget class="GtkHBox" id="hbox1"> |
745 | <property name="visible">True</property> | 730 | <property name="visible">True</property> |
746 | <child> | 731 | <child> |
@@ -762,7 +747,6 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
762 | <widget class="GtkEntry" id="statusDownloadURIEntry"> | 747 | <widget class="GtkEntry" id="statusDownloadURIEntry"> |
763 | <property name="visible">True</property> | 748 | <property name="visible">True</property> |
764 | <property name="can_focus">True</property> | 749 | <property name="can_focus">True</property> |
765 | <property name="has_focus">True</property> | ||
766 | <property name="activates_default">True</property> | 750 | <property name="activates_default">True</property> |
767 | <property name="text">gnunet://ecrs/</property> | 751 | <property name="text">gnunet://ecrs/</property> |
768 | </widget> | 752 | </widget> |
@@ -856,58 +840,129 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
856 | </packing> | 840 | </packing> |
857 | </child> | 841 | </child> |
858 | <child> | 842 | <child> |
859 | <widget class="GtkVBox" id="vbox8"> | 843 | <widget class="GtkScrolledWindow" id="scrolledwindow8"> |
860 | <property name="visible">True</property> | 844 | <property name="visible">True</property> |
861 | <property name="homogeneous">True</property> | 845 | <property name="can_focus">False</property> |
846 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
847 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
848 | <property name="shadow_type">GTK_SHADOW_IN</property> | ||
862 | <child> | 849 | <child> |
863 | <widget class="GtkButton" id="abortDownloadButton"> | 850 | <widget class="GtkTreeView" id="activeUploadsList"> |
864 | <property name="visible">True</property> | 851 | <property name="visible">True</property> |
865 | <property name="sensitive">False</property> | ||
866 | <property name="can_focus">True</property> | 852 | <property name="can_focus">True</property> |
867 | <property name="tooltip" translatable="yes">Cancel the selected download (and all sub-downloads) and delete incomplete downloads</property> | 853 | <property name="reorderable">True</property> |
868 | <property name="label">gtk-delete</property> | 854 | <property name="rules_hint">True</property> |
869 | <property name="use_stock">True</property> | ||
870 | <property name="response_id">0</property> | ||
871 | <signal name="clicked" handler="on_abortDownloadButton_clicked_"/> | ||
872 | </widget> | 855 | </widget> |
873 | <packing> | ||
874 | <property name="fill">False</property> | ||
875 | </packing> | ||
876 | </child> | 856 | </child> |
857 | </widget> | ||
858 | <packing> | ||
859 | <property name="top_attach">6</property> | ||
860 | <property name="bottom_attach">7</property> | ||
861 | </packing> | ||
862 | </child> | ||
863 | <child> | ||
864 | <widget class="GtkAlignment" id="alignment11"> | ||
865 | <property name="visible">True</property> | ||
866 | <property name="top_padding">5</property> | ||
877 | <child> | 867 | <child> |
878 | <widget class="GtkButton" id="stopDownloadButton"> | 868 | <widget class="GtkLabel" id="label45"> |
869 | <property name="visible">True</property> | ||
870 | <property name="xalign">0</property> | ||
871 | <property name="xpad">5</property> | ||
872 | <property name="ypad">5</property> | ||
873 | <property name="label" translatable="yes"><b>Downloads</b></property> | ||
874 | <property name="use_markup">True</property> | ||
875 | </widget> | ||
876 | </child> | ||
877 | </widget> | ||
878 | <packing> | ||
879 | <property name="right_attach">2</property> | ||
880 | <property name="top_attach">2</property> | ||
881 | <property name="bottom_attach">3</property> | ||
882 | <property name="y_options">GTK_FILL</property> | ||
883 | </packing> | ||
884 | </child> | ||
885 | <child> | ||
886 | <widget class="GtkAlignment" id="alignment14"> | ||
887 | <property name="visible">True</property> | ||
888 | <property name="top_padding">5</property> | ||
889 | <child> | ||
890 | <widget class="GtkLabel" id="label46"> | ||
891 | <property name="visible">True</property> | ||
892 | <property name="xalign">0</property> | ||
893 | <property name="xpad">5</property> | ||
894 | <property name="ypad">5</property> | ||
895 | <property name="label" translatable="yes"><b>Publications</b></property> | ||
896 | <property name="use_markup">True</property> | ||
897 | </widget> | ||
898 | </child> | ||
899 | </widget> | ||
900 | <packing> | ||
901 | <property name="right_attach">2</property> | ||
902 | <property name="top_attach">5</property> | ||
903 | <property name="bottom_attach">6</property> | ||
904 | <property name="y_options">GTK_FILL</property> | ||
905 | </packing> | ||
906 | </child> | ||
907 | <child> | ||
908 | <widget class="GtkButton" id="stopSearchButton"> | ||
909 | <property name="visible">True</property> | ||
910 | <property name="sensitive">False</property> | ||
911 | <property name="can_focus">True</property> | ||
912 | <property name="tooltip" translatable="yes">Cancel the selected search and remove it from the list</property> | ||
913 | <property name="border_width">4</property> | ||
914 | <property name="label">gtk-stop</property> | ||
915 | <property name="use_stock">True</property> | ||
916 | <property name="response_id">0</property> | ||
917 | <signal name="clicked" handler="on_closeSearchSummaryButton_clicked_" object="activeSearchesSummary"/> | ||
918 | </widget> | ||
919 | <packing> | ||
920 | <property name="left_attach">1</property> | ||
921 | <property name="right_attach">2</property> | ||
922 | <property name="top_attach">1</property> | ||
923 | <property name="bottom_attach">2</property> | ||
924 | <property name="x_options">GTK_FILL</property> | ||
925 | <property name="y_options"></property> | ||
926 | </packing> | ||
927 | </child> | ||
928 | <child> | ||
929 | <widget class="GtkVBox" id="vbox21"> | ||
930 | <property name="visible">True</property> | ||
931 | <property name="homogeneous">True</property> | ||
932 | <child> | ||
933 | <widget class="GtkButton" id="stopUploadButton"> | ||
879 | <property name="visible">True</property> | 934 | <property name="visible">True</property> |
880 | <property name="sensitive">False</property> | 935 | <property name="sensitive">False</property> |
881 | <property name="can_focus">True</property> | 936 | <property name="can_focus">True</property> |
882 | <property name="tooltip" translatable="yes">Stop the selected download (and all sub-downloads) and remove them from the list. This will NOT cause the deletion of files from incomplete downloads.</property> | 937 | <property name="tooltip" translatable="yes">Cancel the selected upload (and all sub-uploads) and remove them from the list</property> |
883 | <property name="label">gtk-stop</property> | 938 | <property name="label">gtk-stop</property> |
884 | <property name="use_stock">True</property> | 939 | <property name="use_stock">True</property> |
885 | <property name="response_id">0</property> | 940 | <property name="response_id">0</property> |
886 | <signal name="clicked" handler="on_stopDownloadButton_clicked_"/> | 941 | <signal name="clicked" handler="on_stopUploadButton_clicked_" object="activeUploadsList"/> |
887 | </widget> | 942 | </widget> |
888 | <packing> | 943 | <packing> |
944 | <property name="expand">False</property> | ||
889 | <property name="fill">False</property> | 945 | <property name="fill">False</property> |
890 | <property name="position">1</property> | ||
891 | </packing> | 946 | </packing> |
892 | </child> | 947 | </child> |
893 | <child> | 948 | <child> |
894 | <widget class="GtkButton" id="clearCompletedDownloadsButton"> | 949 | <widget class="GtkButton" id="clearCompletedUploadsButton"> |
895 | <property name="visible">True</property> | 950 | <property name="visible">True</property> |
896 | <property name="can_focus">True</property> | 951 | <property name="can_focus">True</property> |
897 | <property name="tooltip" translatable="yes">Clear completed downloads from the list</property> | 952 | <property name="tooltip" translatable="yes">Clear completed uploads from the list</property> |
898 | <property name="response_id">0</property> | 953 | <property name="response_id">0</property> |
899 | <signal name="clicked" handler="on_clearCompletedDownloadsButton_clicked_"/> | 954 | <signal name="clicked" handler="on_clearCompletedUploadsButton_clicked_"/> |
900 | <child> | 955 | <child> |
901 | <widget class="GtkAlignment" id="alignment3"> | 956 | <widget class="GtkAlignment" id="alignment4"> |
902 | <property name="visible">True</property> | 957 | <property name="visible">True</property> |
903 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | 958 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> |
904 | <property name="xscale">0</property> | 959 | <property name="xscale">0</property> |
905 | <child> | 960 | <child> |
906 | <widget class="GtkHBox" id="hbox4"> | 961 | <widget class="GtkHBox" id="hbox5"> |
907 | <property name="visible">True</property> | 962 | <property name="visible">True</property> |
908 | <property name="spacing">2</property> | 963 | <property name="spacing">2</property> |
909 | <child> | 964 | <child> |
910 | <widget class="GtkImage" id="image3"> | 965 | <widget class="GtkImage" id="image4"> |
911 | <property name="visible">True</property> | 966 | <property name="visible">True</property> |
912 | <property name="stock">gtk-clear</property> | 967 | <property name="stock">gtk-clear</property> |
913 | </widget> | 968 | </widget> |
@@ -917,7 +972,7 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
917 | </packing> | 972 | </packing> |
918 | </child> | 973 | </child> |
919 | <child> | 974 | <child> |
920 | <widget class="GtkLabel" id="label5"> | 975 | <widget class="GtkLabel" id="label2"> |
921 | <property name="visible">True</property> | 976 | <property name="visible">True</property> |
922 | <property name="label" translatable="yes">_Clean</property> | 977 | <property name="label" translatable="yes">_Clean</property> |
923 | <property name="use_underline">True</property> | 978 | <property name="use_underline">True</property> |
@@ -934,85 +989,26 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
934 | </child> | 989 | </child> |
935 | </widget> | 990 | </widget> |
936 | <packing> | 991 | <packing> |
937 | <property name="expand">False</property> | ||
938 | <property name="fill">False</property> | 992 | <property name="fill">False</property> |
939 | <property name="position">2</property> | 993 | <property name="position">1</property> |
940 | </packing> | 994 | </packing> |
941 | </child> | 995 | </child> |
942 | </widget> | 996 | </widget> |
943 | <packing> | 997 | <packing> |
944 | <property name="left_attach">1</property> | 998 | <property name="left_attach">1</property> |
945 | <property name="right_attach">2</property> | 999 | <property name="right_attach">2</property> |
946 | <property name="top_attach">3</property> | 1000 | <property name="top_attach">6</property> |
947 | <property name="bottom_attach">4</property> | 1001 | <property name="bottom_attach">7</property> |
948 | <property name="x_options">GTK_FILL</property> | 1002 | <property name="x_options">GTK_FILL</property> |
949 | <property name="x_padding">5</property> | 1003 | <property name="x_padding">5</property> |
950 | </packing> | 1004 | </packing> |
951 | </child> | 1005 | </child> |
952 | <child> | ||
953 | <widget class="GtkScrolledWindow" id="scrolledwindow10"> | ||
954 | <property name="visible">True</property> | ||
955 | <property name="can_focus">True</property> | ||
956 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
957 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
958 | <property name="shadow_type">GTK_SHADOW_IN</property> | ||
959 | <child> | ||
960 | <widget class="GtkTreeView" id="activeDownloadsList"> | ||
961 | <property name="visible">True</property> | ||
962 | <property name="can_focus">True</property> | ||
963 | <property name="reorderable">True</property> | ||
964 | <property name="rules_hint">True</property> | ||
965 | </widget> | ||
966 | </child> | ||
967 | </widget> | ||
968 | <packing> | ||
969 | <property name="top_attach">3</property> | ||
970 | <property name="bottom_attach">4</property> | ||
971 | </packing> | ||
972 | </child> | ||
973 | <child> | ||
974 | <widget class="GtkLabel" id="label16"> | ||
975 | <property name="visible">True</property> | ||
976 | <property name="xalign">0</property> | ||
977 | <property name="yalign">1</property> | ||
978 | <property name="xpad">5</property> | ||
979 | <property name="ypad">5</property> | ||
980 | <property name="label" translatable="yes"><b>Search Overview</b></property> | ||
981 | <property name="use_markup">True</property> | ||
982 | </widget> | ||
983 | <packing> | ||
984 | <property name="right_attach">2</property> | ||
985 | <property name="y_options">GTK_FILL</property> | ||
986 | </packing> | ||
987 | </child> | ||
988 | <child> | ||
989 | <widget class="GtkScrolledWindow" id="scrolledwindow9"> | ||
990 | <property name="visible">True</property> | ||
991 | <property name="can_focus">False</property> | ||
992 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
993 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
994 | <property name="shadow_type">GTK_SHADOW_IN</property> | ||
995 | <child> | ||
996 | <widget class="GtkTreeView" id="activeSearchesSummary"> | ||
997 | <property name="visible">True</property> | ||
998 | <property name="can_focus">True</property> | ||
999 | <property name="reorderable">True</property> | ||
1000 | <property name="rules_hint">True</property> | ||
1001 | </widget> | ||
1002 | </child> | ||
1003 | </widget> | ||
1004 | <packing> | ||
1005 | <property name="top_attach">1</property> | ||
1006 | <property name="bottom_attach">2</property> | ||
1007 | </packing> | ||
1008 | </child> | ||
1009 | </widget> | 1006 | </widget> |
1010 | </child> | 1007 | </child> |
1011 | <child> | 1008 | <child> |
1012 | <widget class="GtkHBox" id="hbox44"> | 1009 | <widget class="GtkHBox" id="hbox44"> |
1013 | <property name="visible">True</property> | 1010 | <property name="visible">True</property> |
1014 | <property name="can_focus">True</property> | 1011 | <property name="can_focus">True</property> |
1015 | <property name="has_focus">True</property> | ||
1016 | <child> | 1012 | <child> |
1017 | <widget class="GtkImage" id="image27"> | 1013 | <widget class="GtkImage" id="image27"> |
1018 | <property name="visible">True</property> | 1014 | <property name="visible">True</property> |
@@ -1293,52 +1289,80 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1293 | <placeholder/> | 1289 | <placeholder/> |
1294 | </child> | 1290 | </child> |
1295 | <child> | 1291 | <child> |
1296 | <widget class="GtkAlignment" id="alignment8"> | 1292 | <widget class="GtkLabel" id="methodLabel"> |
1297 | <property name="visible">True</property> | 1293 | <property name="visible">True</property> |
1298 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
1299 | <property name="xalign">0</property> | 1294 | <property name="xalign">0</property> |
1300 | <property name="xscale">0</property> | 1295 | <property name="xpad">5</property> |
1301 | <child> | 1296 | <property name="label" translatable="yes">Method:</property> |
1302 | <widget class="GtkSpinButton" id="contentPrioritySpinButton"> | 1297 | <property name="use_underline">True</property> |
1303 | <property name="width_request">94</property> | 1298 | <property name="mnemonic_widget">indexbutton</property> |
1304 | <property name="visible">True</property> | 1299 | </widget> |
1305 | <property name="can_focus">True</property> | 1300 | <packing> |
1306 | <property name="tooltip" translatable="yes">How important is the file (used to prioritize data in the local datastore).</property> | 1301 | <property name="x_options">GTK_FILL</property> |
1307 | <property name="adjustment">950 0 100000000 50 500 500</property> | 1302 | <property name="y_options"></property> |
1308 | <property name="climb_rate">500</property> | 1303 | </packing> |
1309 | <property name="numeric">True</property> | 1304 | </child> |
1310 | </widget> | 1305 | <child> |
1311 | </child> | 1306 | <widget class="GtkRadioButton" id="indexbutton"> |
1307 | <property name="visible">True</property> | ||
1308 | <property name="can_focus">True</property> | ||
1309 | <property name="tooltip" translatable="yes">Indexing will avoid copying the file into the GNUnet database. Instead, GNUnet will try to add a symbolic link to the specified file. If that fails, a copy of the file will be created. Indexing should be used if the local machine is unlikely to ever be compromised by an adversary and if the uploaded file will not be modified or moved in the future. Indexing is more efficient than insertion.</property> | ||
1310 | <property name="label" translatable="yes">Inde_x</property> | ||
1311 | <property name="use_underline">True</property> | ||
1312 | <property name="response_id">0</property> | ||
1313 | <property name="active">True</property> | ||
1314 | <property name="draw_indicator">True</property> | ||
1312 | </widget> | 1315 | </widget> |
1313 | <packing> | 1316 | <packing> |
1314 | <property name="left_attach">1</property> | 1317 | <property name="left_attach">1</property> |
1315 | <property name="right_attach">2</property> | 1318 | <property name="right_attach">2</property> |
1316 | <property name="top_attach">3</property> | ||
1317 | <property name="bottom_attach">4</property> | ||
1318 | <property name="x_options">GTK_FILL</property> | 1319 | <property name="x_options">GTK_FILL</property> |
1319 | <property name="y_options"></property> | 1320 | <property name="y_options"></property> |
1320 | </packing> | 1321 | </packing> |
1321 | </child> | 1322 | </child> |
1322 | <child> | 1323 | <child> |
1323 | <widget class="GtkAlignment" id="alignment7"> | 1324 | <widget class="GtkRadioButton" id="insertButton"> |
1325 | <property name="visible">True</property> | ||
1326 | <property name="can_focus">True</property> | ||
1327 | <property name="tooltip" translatable="yes">Inserting a file means that an encrypted copy will be added to the GNUnet database. Without the proper key (which is not stored in plaintext anywhere) the file cannot be decrypted. Use this option for small files, files that will be modified soon, files that maybe moved or if you are afraid that an adversary may detect the file in plaintext on your machine (after compromising your machine).</property> | ||
1328 | <property name="label" translatable="yes">I_nsert</property> | ||
1329 | <property name="use_underline">True</property> | ||
1330 | <property name="response_id">0</property> | ||
1331 | <property name="draw_indicator">True</property> | ||
1332 | <property name="group">indexbutton</property> | ||
1333 | </widget> | ||
1334 | <packing> | ||
1335 | <property name="left_attach">2</property> | ||
1336 | <property name="right_attach">3</property> | ||
1337 | <property name="x_options">GTK_FILL</property> | ||
1338 | <property name="y_options"></property> | ||
1339 | </packing> | ||
1340 | </child> | ||
1341 | <child> | ||
1342 | <widget class="GtkLabel" id="scopeLabel"> | ||
1324 | <property name="visible">True</property> | 1343 | <property name="visible">True</property> |
1325 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
1326 | <property name="xalign">0</property> | 1344 | <property name="xalign">0</property> |
1327 | <property name="xscale">0</property> | 1345 | <property name="xpad">5</property> |
1328 | <child> | 1346 | <property name="label" translatable="yes">Scope:</property> |
1329 | <widget class="GtkSpinButton" id="uploadAnonymityLevelSpinButton"> | 1347 | <property name="use_underline">True</property> |
1330 | <property name="visible">True</property> | 1348 | <property name="mnemonic_widget">scopeFileOnlyButton</property> |
1331 | <property name="can_focus">True</property> | 1349 | </widget> |
1332 | <property name="tooltip" translatable="yes">What level of sender-anonymity is desired when sharing this particular file? 0 allows direct connections (no anonymity). Higher levels require increasing amounts of cover traffic per shared block, increasing your privacy at the expense of efficiency.</property> | 1350 | <packing> |
1333 | <property name="adjustment">1 0 10000 1 10 10</property> | 1351 | <property name="top_attach">1</property> |
1334 | <property name="climb_rate">1</property> | 1352 | <property name="bottom_attach">2</property> |
1335 | <property name="numeric">True</property> | 1353 | <property name="x_options">GTK_FILL</property> |
1336 | </widget> | 1354 | <property name="y_options"></property> |
1337 | </child> | 1355 | </packing> |
1356 | </child> | ||
1357 | <child> | ||
1358 | <widget class="GtkLabel" id="anonymityUploadLabel"> | ||
1359 | <property name="visible">True</property> | ||
1360 | <property name="xalign">0</property> | ||
1361 | <property name="xpad">5</property> | ||
1362 | <property name="label" translatable="yes">_Anonymity:</property> | ||
1363 | <property name="use_underline">True</property> | ||
1338 | </widget> | 1364 | </widget> |
1339 | <packing> | 1365 | <packing> |
1340 | <property name="left_attach">1</property> | ||
1341 | <property name="right_attach">2</property> | ||
1342 | <property name="top_attach">2</property> | 1366 | <property name="top_attach">2</property> |
1343 | <property name="bottom_attach">3</property> | 1367 | <property name="bottom_attach">3</property> |
1344 | <property name="x_options">GTK_FILL</property> | 1368 | <property name="x_options">GTK_FILL</property> |
@@ -1346,24 +1370,43 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1346 | </packing> | 1370 | </packing> |
1347 | </child> | 1371 | </child> |
1348 | <child> | 1372 | <child> |
1349 | <widget class="GtkCheckButton" id="doExtractCheckButton"> | 1373 | <widget class="GtkRadioButton" id="scopeRecursiveButton"> |
1350 | <property name="visible">True</property> | 1374 | <property name="visible">True</property> |
1351 | <property name="can_focus">True</property> | 1375 | <property name="can_focus">True</property> |
1352 | <property name="tooltip" translatable="yes">Controls if GNUnet should (automatically) extract metadata for files. If unchecked, the default metadata for the upload will only contain the filename. If checked, GNU libextractor will be used to provide additional metadata (such as thumbnails). The option only applies when a directory is uploaded. For individual files, GNU libextractor is always used (you will have a chance to edit the extracted metadata in a dialog).</property> | 1376 | <property name="tooltip" translatable="yes">Recursively publish an entire directory tree</property> |
1377 | <property name="label" translatable="yes">_Recursive (for entire directories)</property> | ||
1378 | <property name="use_underline">True</property> | ||
1379 | <property name="response_id">0</property> | ||
1380 | <property name="draw_indicator">True</property> | ||
1381 | </widget> | ||
1382 | <packing> | ||
1383 | <property name="left_attach">2</property> | ||
1384 | <property name="right_attach">3</property> | ||
1385 | <property name="top_attach">1</property> | ||
1386 | <property name="bottom_attach">2</property> | ||
1387 | <property name="x_options">GTK_FILL</property> | ||
1388 | <property name="y_options"></property> | ||
1389 | </packing> | ||
1390 | </child> | ||
1391 | <child> | ||
1392 | <widget class="GtkCheckButton" id="deepIndexCheckButton"> | ||
1393 | <property name="visible">True</property> | ||
1394 | <property name="can_focus">True</property> | ||
1395 | <property name="tooltip" translatable="yes">Should it be possible to directly find files in the directory? If unchecked, it will only be possible for the directory itself to be found with a normal keyword search. This option only really makes a difference for uploads of directories.</property> | ||
1353 | <property name="response_id">0</property> | 1396 | <property name="response_id">0</property> |
1354 | <property name="active">True</property> | 1397 | <property name="active">True</property> |
1355 | <property name="draw_indicator">True</property> | 1398 | <property name="draw_indicator">True</property> |
1356 | <child> | 1399 | <child> |
1357 | <widget class="GtkAlignment" id="alignment24"> | 1400 | <widget class="GtkAlignment" id="alignment15"> |
1358 | <property name="visible">True</property> | 1401 | <property name="visible">True</property> |
1359 | <property name="xscale">0</property> | 1402 | <property name="xscale">0</property> |
1360 | <property name="yscale">0</property> | 1403 | <property name="yscale">0</property> |
1361 | <child> | 1404 | <child> |
1362 | <widget class="GtkHBox" id="hbox66"> | 1405 | <widget class="GtkHBox" id="hbox52"> |
1363 | <property name="visible">True</property> | 1406 | <property name="visible">True</property> |
1364 | <property name="spacing">2</property> | 1407 | <property name="spacing">2</property> |
1365 | <child> | 1408 | <child> |
1366 | <widget class="GtkImage" id="image49"> | 1409 | <widget class="GtkImage" id="image40"> |
1367 | <property name="visible">True</property> | 1410 | <property name="visible">True</property> |
1368 | <property name="stock">gtk-index</property> | 1411 | <property name="stock">gtk-index</property> |
1369 | </widget> | 1412 | </widget> |
@@ -1373,9 +1416,9 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1373 | </packing> | 1416 | </packing> |
1374 | </child> | 1417 | </child> |
1375 | <child> | 1418 | <child> |
1376 | <widget class="GtkLabel" id="label151"> | 1419 | <widget class="GtkLabel" id="label128"> |
1377 | <property name="visible">True</property> | 1420 | <property name="visible">True</property> |
1378 | <property name="label" translatable="yes">Use libextractor for files in directories</property> | 1421 | <property name="label" translatable="yes">Add keywords for files in directories</property> |
1379 | <property name="use_underline">True</property> | 1422 | <property name="use_underline">True</property> |
1380 | </widget> | 1423 | </widget> |
1381 | <packing> | 1424 | <packing> |
@@ -1392,48 +1435,28 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1392 | <packing> | 1435 | <packing> |
1393 | <property name="left_attach">2</property> | 1436 | <property name="left_attach">2</property> |
1394 | <property name="right_attach">3</property> | 1437 | <property name="right_attach">3</property> |
1395 | <property name="top_attach">3</property> | 1438 | <property name="top_attach">2</property> |
1396 | <property name="bottom_attach">4</property> | 1439 | <property name="bottom_attach">3</property> |
1397 | <property name="x_options">GTK_FILL</property> | ||
1398 | <property name="y_options"></property> | ||
1399 | </packing> | ||
1400 | </child> | ||
1401 | <child> | ||
1402 | <widget class="GtkRadioButton" id="scopeFileOnlyButton"> | ||
1403 | <property name="visible">True</property> | ||
1404 | <property name="can_focus">True</property> | ||
1405 | <property name="tooltip" translatable="yes">Only publish a single file</property> | ||
1406 | <property name="label" translatable="yes">File onl_y</property> | ||
1407 | <property name="use_underline">True</property> | ||
1408 | <property name="response_id">0</property> | ||
1409 | <property name="active">True</property> | ||
1410 | <property name="draw_indicator">True</property> | ||
1411 | <property name="group">scopeRecursiveButton</property> | ||
1412 | </widget> | ||
1413 | <packing> | ||
1414 | <property name="left_attach">1</property> | ||
1415 | <property name="right_attach">2</property> | ||
1416 | <property name="top_attach">1</property> | ||
1417 | <property name="bottom_attach">2</property> | ||
1418 | <property name="x_options">GTK_FILL</property> | 1440 | <property name="x_options">GTK_FILL</property> |
1419 | <property name="y_options"></property> | 1441 | <property name="y_options"></property> |
1420 | </packing> | 1442 | </packing> |
1421 | </child> | 1443 | </child> |
1422 | <child> | 1444 | <child> |
1423 | <widget class="GtkButton" id="mainFileSharingInsertBrowseButton"> | 1445 | <widget class="GtkButton" id="fsinsertuploadbutton"> |
1424 | <property name="visible">True</property> | 1446 | <property name="visible">True</property> |
1447 | <property name="sensitive">False</property> | ||
1425 | <property name="can_focus">True</property> | 1448 | <property name="can_focus">True</property> |
1426 | <property name="tooltip" translatable="yes">Browse local computer for files (or directories) to publish</property> | 1449 | <property name="tooltip" translatable="yes">Share the specified file with the selected options (you will then be prompted to enter meta-data and keywords)</property> |
1427 | <property name="response_id">0</property> | 1450 | <property name="response_id">0</property> |
1428 | <signal name="clicked" handler="on_mainFileSharingInsertBrowseButton_clicked_" object="fsinsertfilenamecombo"/> | 1451 | <signal name="clicked" handler="on_fsinsertuploadbutton_clicked_"/> |
1429 | <child> | 1452 | <child> |
1430 | <widget class="GtkHBox" id="hbox60"> | 1453 | <widget class="GtkHBox" id="hbox55"> |
1431 | <property name="visible">True</property> | 1454 | <property name="visible">True</property> |
1432 | <property name="spacing">2</property> | 1455 | <property name="spacing">2</property> |
1433 | <child> | 1456 | <child> |
1434 | <widget class="GtkImage" id="image46"> | 1457 | <widget class="GtkImage" id="image42"> |
1435 | <property name="visible">True</property> | 1458 | <property name="visible">True</property> |
1436 | <property name="stock">gtk-open</property> | 1459 | <property name="stock">gtk-go-up</property> |
1437 | </widget> | 1460 | </widget> |
1438 | <packing> | 1461 | <packing> |
1439 | <property name="expand">False</property> | 1462 | <property name="expand">False</property> |
@@ -1441,9 +1464,9 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1441 | </packing> | 1464 | </packing> |
1442 | </child> | 1465 | </child> |
1443 | <child> | 1466 | <child> |
1444 | <widget class="GtkLabel" id="label143"> | 1467 | <widget class="GtkLabel" id="label137"> |
1445 | <property name="visible">True</property> | 1468 | <property name="visible">True</property> |
1446 | <property name="label" translatable="yes">_Browse</property> | 1469 | <property name="label" translatable="yes">Pub_lish</property> |
1447 | <property name="use_underline">True</property> | 1470 | <property name="use_underline">True</property> |
1448 | </widget> | 1471 | </widget> |
1449 | <packing> | 1472 | <packing> |
@@ -1458,32 +1481,26 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1458 | <packing> | 1481 | <packing> |
1459 | <property name="left_attach">2</property> | 1482 | <property name="left_attach">2</property> |
1460 | <property name="right_attach">3</property> | 1483 | <property name="right_attach">3</property> |
1461 | <property name="top_attach">4</property> | 1484 | <property name="top_attach">5</property> |
1462 | <property name="bottom_attach">5</property> | 1485 | <property name="bottom_attach">6</property> |
1463 | <property name="x_options">GTK_FILL</property> | 1486 | <property name="x_options">GTK_FILL</property> |
1464 | <property name="y_options"></property> | 1487 | <property name="y_options"></property> |
1465 | </packing> | 1488 | </packing> |
1466 | </child> | 1489 | </child> |
1467 | <child> | 1490 | <child> |
1468 | <widget class="GtkAlignment" id="uploadFilenameAlignment"> | 1491 | <widget class="GtkLabel" id="uploadFilenameLabel"> |
1469 | <property name="visible">True</property> | 1492 | <property name="visible">True</property> |
1470 | <child> | 1493 | <property name="xalign">0</property> |
1471 | <widget class="GtkComboBoxEntry" id="uploadFilenameComboBoxEntry"> | 1494 | <property name="xpad">5</property> |
1472 | <property name="visible">True</property> | 1495 | <property name="label" translatable="yes">_Filename:</property> |
1473 | <property name="can_focus">True</property> | 1496 | <property name="use_underline">True</property> |
1474 | <signal name="changed" handler="on_uploadFilenameComboBoxEntry_changed_"/> | 1497 | <property name="justify">GTK_JUSTIFY_CENTER</property> |
1475 | <child internal-child="entry"> | 1498 | <property name="mnemonic_widget">uploadFilenameComboBoxEntry</property> |
1476 | <widget class="GtkEntry" id="comboboxentry-entry3"> | ||
1477 | </widget> | ||
1478 | </child> | ||
1479 | </widget> | ||
1480 | </child> | ||
1481 | </widget> | 1499 | </widget> |
1482 | <packing> | 1500 | <packing> |
1483 | <property name="left_attach">1</property> | ||
1484 | <property name="right_attach">2</property> | ||
1485 | <property name="top_attach">4</property> | 1501 | <property name="top_attach">4</property> |
1486 | <property name="bottom_attach">5</property> | 1502 | <property name="bottom_attach">5</property> |
1503 | <property name="x_options">GTK_FILL</property> | ||
1487 | <property name="y_options"></property> | 1504 | <property name="y_options"></property> |
1488 | </packing> | 1505 | </packing> |
1489 | </child> | 1506 | </child> |
@@ -1503,38 +1520,43 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1503 | </packing> | 1520 | </packing> |
1504 | </child> | 1521 | </child> |
1505 | <child> | 1522 | <child> |
1506 | <widget class="GtkLabel" id="uploadFilenameLabel"> | 1523 | <widget class="GtkAlignment" id="uploadFilenameAlignment"> |
1507 | <property name="visible">True</property> | 1524 | <property name="visible">True</property> |
1508 | <property name="xalign">0</property> | 1525 | <child> |
1509 | <property name="xpad">5</property> | 1526 | <widget class="GtkComboBoxEntry" id="uploadFilenameComboBoxEntry"> |
1510 | <property name="label" translatable="yes">_Filename:</property> | 1527 | <property name="visible">True</property> |
1511 | <property name="use_underline">True</property> | 1528 | <property name="can_focus">True</property> |
1512 | <property name="justify">GTK_JUSTIFY_CENTER</property> | 1529 | <signal name="changed" handler="on_uploadFilenameComboBoxEntry_changed_"/> |
1513 | <property name="mnemonic_widget">uploadFilenameComboBoxEntry</property> | 1530 | <child internal-child="entry"> |
1531 | <widget class="GtkEntry" id="comboboxentry-entry3"> | ||
1532 | </widget> | ||
1533 | </child> | ||
1534 | </widget> | ||
1535 | </child> | ||
1514 | </widget> | 1536 | </widget> |
1515 | <packing> | 1537 | <packing> |
1538 | <property name="left_attach">1</property> | ||
1539 | <property name="right_attach">2</property> | ||
1516 | <property name="top_attach">4</property> | 1540 | <property name="top_attach">4</property> |
1517 | <property name="bottom_attach">5</property> | 1541 | <property name="bottom_attach">5</property> |
1518 | <property name="x_options">GTK_FILL</property> | ||
1519 | <property name="y_options"></property> | 1542 | <property name="y_options"></property> |
1520 | </packing> | 1543 | </packing> |
1521 | </child> | 1544 | </child> |
1522 | <child> | 1545 | <child> |
1523 | <widget class="GtkButton" id="fsinsertuploadbutton"> | 1546 | <widget class="GtkButton" id="mainFileSharingInsertBrowseButton"> |
1524 | <property name="visible">True</property> | 1547 | <property name="visible">True</property> |
1525 | <property name="sensitive">False</property> | ||
1526 | <property name="can_focus">True</property> | 1548 | <property name="can_focus">True</property> |
1527 | <property name="tooltip" translatable="yes">Share the specified file with the selected options (you will then be prompted to enter meta-data and keywords)</property> | 1549 | <property name="tooltip" translatable="yes">Browse local computer for files (or directories) to publish</property> |
1528 | <property name="response_id">0</property> | 1550 | <property name="response_id">0</property> |
1529 | <signal name="clicked" handler="on_fsinsertuploadbutton_clicked_"/> | 1551 | <signal name="clicked" handler="on_mainFileSharingInsertBrowseButton_clicked_" object="fsinsertfilenamecombo"/> |
1530 | <child> | 1552 | <child> |
1531 | <widget class="GtkHBox" id="hbox55"> | 1553 | <widget class="GtkHBox" id="hbox60"> |
1532 | <property name="visible">True</property> | 1554 | <property name="visible">True</property> |
1533 | <property name="spacing">2</property> | 1555 | <property name="spacing">2</property> |
1534 | <child> | 1556 | <child> |
1535 | <widget class="GtkImage" id="image42"> | 1557 | <widget class="GtkImage" id="image46"> |
1536 | <property name="visible">True</property> | 1558 | <property name="visible">True</property> |
1537 | <property name="stock">gtk-go-up</property> | 1559 | <property name="stock">gtk-open</property> |
1538 | </widget> | 1560 | </widget> |
1539 | <packing> | 1561 | <packing> |
1540 | <property name="expand">False</property> | 1562 | <property name="expand">False</property> |
@@ -1542,9 +1564,9 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1542 | </packing> | 1564 | </packing> |
1543 | </child> | 1565 | </child> |
1544 | <child> | 1566 | <child> |
1545 | <widget class="GtkLabel" id="label137"> | 1567 | <widget class="GtkLabel" id="label143"> |
1546 | <property name="visible">True</property> | 1568 | <property name="visible">True</property> |
1547 | <property name="label" translatable="yes">Pub_lish</property> | 1569 | <property name="label" translatable="yes">_Browse</property> |
1548 | <property name="use_underline">True</property> | 1570 | <property name="use_underline">True</property> |
1549 | </widget> | 1571 | </widget> |
1550 | <packing> | 1572 | <packing> |
@@ -1559,31 +1581,52 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1559 | <packing> | 1581 | <packing> |
1560 | <property name="left_attach">2</property> | 1582 | <property name="left_attach">2</property> |
1561 | <property name="right_attach">3</property> | 1583 | <property name="right_attach">3</property> |
1562 | <property name="top_attach">5</property> | 1584 | <property name="top_attach">4</property> |
1563 | <property name="bottom_attach">6</property> | 1585 | <property name="bottom_attach">5</property> |
1564 | <property name="x_options">GTK_FILL</property> | 1586 | <property name="x_options">GTK_FILL</property> |
1565 | <property name="y_options"></property> | 1587 | <property name="y_options"></property> |
1566 | </packing> | 1588 | </packing> |
1567 | </child> | 1589 | </child> |
1568 | <child> | 1590 | <child> |
1569 | <widget class="GtkCheckButton" id="deepIndexCheckButton"> | 1591 | <widget class="GtkRadioButton" id="scopeFileOnlyButton"> |
1570 | <property name="visible">True</property> | 1592 | <property name="visible">True</property> |
1571 | <property name="can_focus">True</property> | 1593 | <property name="can_focus">True</property> |
1572 | <property name="tooltip" translatable="yes">Should it be possible to directly find files in the directory? If unchecked, it will only be possible for the directory itself to be found with a normal keyword search. This option only really makes a difference for uploads of directories.</property> | 1594 | <property name="tooltip" translatable="yes">Only publish a single file</property> |
1595 | <property name="label" translatable="yes">File onl_y</property> | ||
1596 | <property name="use_underline">True</property> | ||
1597 | <property name="response_id">0</property> | ||
1598 | <property name="active">True</property> | ||
1599 | <property name="draw_indicator">True</property> | ||
1600 | <property name="group">scopeRecursiveButton</property> | ||
1601 | </widget> | ||
1602 | <packing> | ||
1603 | <property name="left_attach">1</property> | ||
1604 | <property name="right_attach">2</property> | ||
1605 | <property name="top_attach">1</property> | ||
1606 | <property name="bottom_attach">2</property> | ||
1607 | <property name="x_options">GTK_FILL</property> | ||
1608 | <property name="y_options"></property> | ||
1609 | </packing> | ||
1610 | </child> | ||
1611 | <child> | ||
1612 | <widget class="GtkCheckButton" id="doExtractCheckButton"> | ||
1613 | <property name="visible">True</property> | ||
1614 | <property name="can_focus">True</property> | ||
1615 | <property name="tooltip" translatable="yes">Controls if GNUnet should (automatically) extract metadata for files. If unchecked, the default metadata for the upload will only contain the filename. If checked, GNU libextractor will be used to provide additional metadata (such as thumbnails). The option only applies when a directory is uploaded. For individual files, GNU libextractor is always used (you will have a chance to edit the extracted metadata in a dialog).</property> | ||
1573 | <property name="response_id">0</property> | 1616 | <property name="response_id">0</property> |
1574 | <property name="active">True</property> | 1617 | <property name="active">True</property> |
1575 | <property name="draw_indicator">True</property> | 1618 | <property name="draw_indicator">True</property> |
1576 | <child> | 1619 | <child> |
1577 | <widget class="GtkAlignment" id="alignment15"> | 1620 | <widget class="GtkAlignment" id="alignment24"> |
1578 | <property name="visible">True</property> | 1621 | <property name="visible">True</property> |
1579 | <property name="xscale">0</property> | 1622 | <property name="xscale">0</property> |
1580 | <property name="yscale">0</property> | 1623 | <property name="yscale">0</property> |
1581 | <child> | 1624 | <child> |
1582 | <widget class="GtkHBox" id="hbox52"> | 1625 | <widget class="GtkHBox" id="hbox66"> |
1583 | <property name="visible">True</property> | 1626 | <property name="visible">True</property> |
1584 | <property name="spacing">2</property> | 1627 | <property name="spacing">2</property> |
1585 | <child> | 1628 | <child> |
1586 | <widget class="GtkImage" id="image40"> | 1629 | <widget class="GtkImage" id="image49"> |
1587 | <property name="visible">True</property> | 1630 | <property name="visible">True</property> |
1588 | <property name="stock">gtk-index</property> | 1631 | <property name="stock">gtk-index</property> |
1589 | </widget> | 1632 | </widget> |
@@ -1593,9 +1636,9 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1593 | </packing> | 1636 | </packing> |
1594 | </child> | 1637 | </child> |
1595 | <child> | 1638 | <child> |
1596 | <widget class="GtkLabel" id="label128"> | 1639 | <widget class="GtkLabel" id="label151"> |
1597 | <property name="visible">True</property> | 1640 | <property name="visible">True</property> |
1598 | <property name="label" translatable="yes">Add keywords for files in directories</property> | 1641 | <property name="label" translatable="yes">Use libextractor for files in directories</property> |
1599 | <property name="use_underline">True</property> | 1642 | <property name="use_underline">True</property> |
1600 | </widget> | 1643 | </widget> |
1601 | <packing> | 1644 | <packing> |
@@ -1612,40 +1655,32 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1612 | <packing> | 1655 | <packing> |
1613 | <property name="left_attach">2</property> | 1656 | <property name="left_attach">2</property> |
1614 | <property name="right_attach">3</property> | 1657 | <property name="right_attach">3</property> |
1615 | <property name="top_attach">2</property> | 1658 | <property name="top_attach">3</property> |
1616 | <property name="bottom_attach">3</property> | 1659 | <property name="bottom_attach">4</property> |
1617 | <property name="x_options">GTK_FILL</property> | ||
1618 | <property name="y_options"></property> | ||
1619 | </packing> | ||
1620 | </child> | ||
1621 | <child> | ||
1622 | <widget class="GtkRadioButton" id="scopeRecursiveButton"> | ||
1623 | <property name="visible">True</property> | ||
1624 | <property name="can_focus">True</property> | ||
1625 | <property name="tooltip" translatable="yes">Recursively publish an entire directory tree</property> | ||
1626 | <property name="label" translatable="yes">_Recursive (for entire directories)</property> | ||
1627 | <property name="use_underline">True</property> | ||
1628 | <property name="response_id">0</property> | ||
1629 | <property name="draw_indicator">True</property> | ||
1630 | </widget> | ||
1631 | <packing> | ||
1632 | <property name="left_attach">2</property> | ||
1633 | <property name="right_attach">3</property> | ||
1634 | <property name="top_attach">1</property> | ||
1635 | <property name="bottom_attach">2</property> | ||
1636 | <property name="x_options">GTK_FILL</property> | 1660 | <property name="x_options">GTK_FILL</property> |
1637 | <property name="y_options"></property> | 1661 | <property name="y_options"></property> |
1638 | </packing> | 1662 | </packing> |
1639 | </child> | 1663 | </child> |
1640 | <child> | 1664 | <child> |
1641 | <widget class="GtkLabel" id="anonymityUploadLabel"> | 1665 | <widget class="GtkAlignment" id="alignment7"> |
1642 | <property name="visible">True</property> | 1666 | <property name="visible">True</property> |
1667 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
1643 | <property name="xalign">0</property> | 1668 | <property name="xalign">0</property> |
1644 | <property name="xpad">5</property> | 1669 | <property name="xscale">0</property> |
1645 | <property name="label" translatable="yes">_Anonymity:</property> | 1670 | <child> |
1646 | <property name="use_underline">True</property> | 1671 | <widget class="GtkSpinButton" id="uploadAnonymityLevelSpinButton"> |
1672 | <property name="visible">True</property> | ||
1673 | <property name="can_focus">True</property> | ||
1674 | <property name="tooltip" translatable="yes">What level of sender-anonymity is desired when sharing this particular file? 0 allows direct connections (no anonymity). Higher levels require increasing amounts of cover traffic per shared block, increasing your privacy at the expense of efficiency.</property> | ||
1675 | <property name="adjustment">1 0 10000 1 10 10</property> | ||
1676 | <property name="climb_rate">1</property> | ||
1677 | <property name="numeric">True</property> | ||
1678 | </widget> | ||
1679 | </child> | ||
1647 | </widget> | 1680 | </widget> |
1648 | <packing> | 1681 | <packing> |
1682 | <property name="left_attach">1</property> | ||
1683 | <property name="right_attach">2</property> | ||
1649 | <property name="top_attach">2</property> | 1684 | <property name="top_attach">2</property> |
1650 | <property name="bottom_attach">3</property> | 1685 | <property name="bottom_attach">3</property> |
1651 | <property name="x_options">GTK_FILL</property> | 1686 | <property name="x_options">GTK_FILL</property> |
@@ -1653,67 +1688,28 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
1653 | </packing> | 1688 | </packing> |
1654 | </child> | 1689 | </child> |
1655 | <child> | 1690 | <child> |
1656 | <widget class="GtkLabel" id="scopeLabel"> | 1691 | <widget class="GtkAlignment" id="alignment8"> |
1657 | <property name="visible">True</property> | 1692 | <property name="visible">True</property> |
1693 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
1658 | <property name="xalign">0</property> | 1694 | <property name="xalign">0</property> |
1659 | <property name="xpad">5</property> | 1695 | <property name="xscale">0</property> |
1660 | <property name="label" translatable="yes">Scope:</property> | 1696 | <child> |
1661 | <property name="use_underline">True</property> | 1697 | <widget class="GtkSpinButton" id="contentPrioritySpinButton"> |
1662 | <property name="mnemonic_widget">scopeFileOnlyButton</property> | 1698 | <property name="width_request">94</property> |
1663 | </widget> | 1699 | <property name="visible">True</property> |
1664 | <packing> | 1700 | <property name="can_focus">True</property> |
1665 | <property name="top_attach">1</property> | 1701 | <property name="tooltip" translatable="yes">How important is the file (used to prioritize data in the local datastore).</property> |
1666 | <property name="bottom_attach">2</property> | 1702 | <property name="adjustment">950 0 100000000 50 500 500</property> |
1667 | <property name="x_options">GTK_FILL</property> | 1703 | <property name="climb_rate">500</property> |
1668 | <property name="y_options"></property> | 1704 | <property name="numeric">True</property> |
1669 | </packing> | 1705 | </widget> |
1670 | </child> | 1706 | </child> |
1671 | <child> | ||
1672 | <widget class="GtkRadioButton" id="insertButton"> | ||
1673 | <property name="visible">True</property> | ||
1674 | <property name="can_focus">True</property> | ||
1675 | <property name="tooltip" translatable="yes">Inserting a file means that an encrypted copy will be added to the GNUnet database. Without the proper key (which is not stored in plaintext anywhere) the file cannot be decrypted. Use this option for small files, files that will be modified soon, files that maybe moved or if you are afraid that an adversary may detect the file in plaintext on your machine (after compromising your machine).</property> | ||
1676 | <property name="label" translatable="yes">I_nsert</property> | ||
1677 | <property name="use_underline">True</property> | ||
1678 | <property name="response_id">0</property> | ||
1679 | <property name="draw_indicator">True</property> | ||
1680 | <property name="group">indexbutton</property> | ||
1681 | </widget> | ||
1682 | <packing> | ||
1683 | <property name="left_attach">2</property> | ||
1684 | <property name="right_attach">3</property> | ||
1685 | <property name="x_options">GTK_FILL</property> | ||
1686 | <property name="y_options"></property> | ||
1687 | </packing> | ||
1688 | </child> | ||
1689 | <child> | ||
1690 | <widget class="GtkRadioButton" id="indexbutton"> | ||
1691 | <property name="visible">True</property> | ||
1692 | <property name="can_focus">True</property> | ||
1693 | <property name="tooltip" translatable="yes">Indexing will avoid copying the file into the GNUnet database. Instead, GNUnet will try to add a symbolic link to the specified file. If that fails, a copy of the file will be created. Indexing should be used if the local machine is unlikely to ever be compromised by an adversary and if the uploaded file will not be modified or moved in the future. Indexing is more efficient than insertion.</property> | ||
1694 | <property name="label" translatable="yes">Inde_x</property> | ||
1695 | <property name="use_underline">True</property> | ||
1696 | <property name="response_id">0</property> | ||
1697 | <property name="active">True</property> | ||
1698 | <property name="draw_indicator">True</property> | ||
1699 | </widget> | 1707 | </widget> |
1700 | <packing> | 1708 | <packing> |
1701 | <property name="left_attach">1</property> | 1709 | <property name="left_attach">1</property> |
1702 | <property name="right_attach">2</property> | 1710 | <property name="right_attach">2</property> |
1703 | <property name="x_options">GTK_FILL</property> | 1711 | <property name="top_attach">3</property> |
1704 | <property name="y_options"></property> | 1712 | <property name="bottom_attach">4</property> |
1705 | </packing> | ||
1706 | </child> | ||
1707 | <child> | ||
1708 | <widget class="GtkLabel" id="methodLabel"> | ||
1709 | <property name="visible">True</property> | ||
1710 | <property name="xalign">0</property> | ||
1711 | <property name="xpad">5</property> | ||
1712 | <property name="label" translatable="yes">Method:</property> | ||
1713 | <property name="use_underline">True</property> | ||
1714 | <property name="mnemonic_widget">indexbutton</property> | ||
1715 | </widget> | ||
1716 | <packing> | ||
1717 | <property name="x_options">GTK_FILL</property> | 1713 | <property name="x_options">GTK_FILL</property> |
1718 | <property name="y_options"></property> | 1714 | <property name="y_options"></property> |
1719 | </packing> | 1715 | </packing> |
@@ -2111,51 +2107,6 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
2111 | <placeholder/> | 2107 | <placeholder/> |
2112 | </child> | 2108 | </child> |
2113 | <child> | 2109 | <child> |
2114 | <widget class="GtkLabel" id="label1"> | ||
2115 | <property name="visible">True</property> | ||
2116 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
2117 | <property name="label" translatable="yes">_Room Name</property> | ||
2118 | <property name="use_underline">True</property> | ||
2119 | <property name="mnemonic_widget">chatRoomNameEntry</property> | ||
2120 | </widget> | ||
2121 | </child> | ||
2122 | <child> | ||
2123 | <widget class="GtkLabel" id="label4"> | ||
2124 | <property name="visible">True</property> | ||
2125 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
2126 | <property name="label" translatable="yes">_Moniker</property> | ||
2127 | <property name="use_underline">True</property> | ||
2128 | </widget> | ||
2129 | <packing> | ||
2130 | <property name="left_attach">1</property> | ||
2131 | <property name="right_attach">2</property> | ||
2132 | </packing> | ||
2133 | </child> | ||
2134 | <child> | ||
2135 | <widget class="GtkEntry" id="chatRoomNameEntry"> | ||
2136 | <property name="visible">True</property> | ||
2137 | <property name="can_focus">True</property> | ||
2138 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
2139 | </widget> | ||
2140 | <packing> | ||
2141 | <property name="top_attach">1</property> | ||
2142 | <property name="bottom_attach">2</property> | ||
2143 | </packing> | ||
2144 | </child> | ||
2145 | <child> | ||
2146 | <widget class="GtkEntry" id="chatRoomMonikerEntry"> | ||
2147 | <property name="visible">True</property> | ||
2148 | <property name="can_focus">True</property> | ||
2149 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
2150 | </widget> | ||
2151 | <packing> | ||
2152 | <property name="left_attach">1</property> | ||
2153 | <property name="right_attach">2</property> | ||
2154 | <property name="top_attach">1</property> | ||
2155 | <property name="bottom_attach">2</property> | ||
2156 | </packing> | ||
2157 | </child> | ||
2158 | <child> | ||
2159 | <widget class="GtkButton" id="on_chat_room_name_button"> | 2110 | <widget class="GtkButton" id="on_chat_room_name_button"> |
2160 | <property name="visible">True</property> | 2111 | <property name="visible">True</property> |
2161 | <property name="can_focus">True</property> | 2112 | <property name="can_focus">True</property> |
@@ -2202,6 +2153,51 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
2202 | <property name="y_options"></property> | 2153 | <property name="y_options"></property> |
2203 | </packing> | 2154 | </packing> |
2204 | </child> | 2155 | </child> |
2156 | <child> | ||
2157 | <widget class="GtkEntry" id="chatRoomMonikerEntry"> | ||
2158 | <property name="visible">True</property> | ||
2159 | <property name="can_focus">True</property> | ||
2160 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
2161 | </widget> | ||
2162 | <packing> | ||
2163 | <property name="left_attach">1</property> | ||
2164 | <property name="right_attach">2</property> | ||
2165 | <property name="top_attach">1</property> | ||
2166 | <property name="bottom_attach">2</property> | ||
2167 | </packing> | ||
2168 | </child> | ||
2169 | <child> | ||
2170 | <widget class="GtkEntry" id="chatRoomNameEntry"> | ||
2171 | <property name="visible">True</property> | ||
2172 | <property name="can_focus">True</property> | ||
2173 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
2174 | </widget> | ||
2175 | <packing> | ||
2176 | <property name="top_attach">1</property> | ||
2177 | <property name="bottom_attach">2</property> | ||
2178 | </packing> | ||
2179 | </child> | ||
2180 | <child> | ||
2181 | <widget class="GtkLabel" id="label4"> | ||
2182 | <property name="visible">True</property> | ||
2183 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
2184 | <property name="label" translatable="yes">_Moniker</property> | ||
2185 | <property name="use_underline">True</property> | ||
2186 | </widget> | ||
2187 | <packing> | ||
2188 | <property name="left_attach">1</property> | ||
2189 | <property name="right_attach">2</property> | ||
2190 | </packing> | ||
2191 | </child> | ||
2192 | <child> | ||
2193 | <widget class="GtkLabel" id="label1"> | ||
2194 | <property name="visible">True</property> | ||
2195 | <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> | ||
2196 | <property name="label" translatable="yes">_Room Name</property> | ||
2197 | <property name="use_underline">True</property> | ||
2198 | <property name="mnemonic_widget">chatRoomNameEntry</property> | ||
2199 | </widget> | ||
2200 | </child> | ||
2205 | </widget> | 2201 | </widget> |
2206 | <packing> | 2202 | <packing> |
2207 | <property name="expand">False</property> | 2203 | <property name="expand">False</property> |
@@ -2356,6 +2352,57 @@ This release adds context-menus (right-click) which allow copying the URI of sea | |||
2356 | <property name="tab_fill">False</property> | 2352 | <property name="tab_fill">False</property> |
2357 | </packing> | 2353 | </packing> |
2358 | </child> | 2354 | </child> |
2355 | <child> | ||
2356 | <widget class="GtkScrolledWindow" id="messageWindowScrolledWindow"> | ||
2357 | <property name="visible">True</property> | ||
2358 | <property name="can_focus">True</property> | ||
2359 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
2360 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
2361 | <child> | ||
2362 | <widget class="GtkTextView" id="messageWindowTextView"> | ||
2363 | <property name="visible">True</property> | ||
2364 | <property name="can_focus">True</property> | ||
2365 | <property name="editable">False</property> | ||
2366 | <property name="wrap_mode">GTK_WRAP_WORD</property> | ||
2367 | <property name="cursor_visible">False</property> | ||
2368 | <property name="accepts_tab">False</property> | ||
2369 | </widget> | ||
2370 | </child> | ||
2371 | </widget> | ||
2372 | <packing> | ||
2373 | <property name="position">6</property> | ||
2374 | </packing> | ||
2375 | </child> | ||
2376 | <child> | ||
2377 | <widget class="GtkHBox" id="hbox9"> | ||
2378 | <property name="visible">True</property> | ||
2379 | <child> | ||
2380 | <widget class="GtkImage" id="image8"> | ||
2381 | <property name="visible">True</property> | ||
2382 | <property name="stock">gtk-dialog-info</property> | ||
2383 | </widget> | ||
2384 | </child> | ||
2385 | <child> | ||
2386 | <widget class="GtkLabel" id="labelPeers1"> | ||
2387 | <property name="visible">True</property> | ||
2388 | <property name="xpad">5</property> | ||
2389 | <property name="label" translatable="yes">_Logs</property> | ||
2390 | <property name="use_underline">True</property> | ||
2391 | <property name="justify">GTK_JUSTIFY_CENTER</property> | ||
2392 | </widget> | ||
2393 | <packing> | ||
2394 | <property name="expand">False</property> | ||
2395 | <property name="fill">False</property> | ||
2396 | <property name="position">1</property> | ||
2397 | </packing> | ||
2398 | </child> | ||
2399 | </widget> | ||
2400 | <packing> | ||
2401 | <property name="type">tab</property> | ||
2402 | <property name="position">6</property> | ||
2403 | <property name="tab_fill">False</property> | ||
2404 | </packing> | ||
2405 | </child> | ||
2359 | </widget> | 2406 | </widget> |
2360 | </child> | 2407 | </child> |
2361 | <child> | 2408 | <child> |
@@ -2877,8 +2924,8 @@ Press ENTER to add the data.</atkproperty> | |||
2877 | <property name="response_id">-5</property> | 2924 | <property name="response_id">-5</property> |
2878 | <signal name="clicked" handler="gtk_widget_destroy" object="metaDisplayDialog"/> | 2925 | <signal name="clicked" handler="gtk_widget_destroy" object="metaDisplayDialog"/> |
2879 | <signal name="activate" handler="gtk_widget_destroy" object="metaDisplayDialog"/> | 2926 | <signal name="activate" handler="gtk_widget_destroy" object="metaDisplayDialog"/> |
2880 | <accelerator key="Return" modifiers="" signal="activate"/> | ||
2881 | <accelerator key="Escape" modifiers="" signal="activate"/> | 2927 | <accelerator key="Escape" modifiers="" signal="activate"/> |
2928 | <accelerator key="Return" modifiers="" signal="activate"/> | ||
2882 | </widget> | 2929 | </widget> |
2883 | </child> | 2930 | </child> |
2884 | </widget> | 2931 | </widget> |
@@ -4205,54 +4252,6 @@ Alex Jones <alexrjones@ntlworld.com></property> | |||
4205 | </widget> | 4252 | </widget> |
4206 | </child> | 4253 | </child> |
4207 | </widget> | 4254 | </widget> |
4208 | <widget class="GtkWindow" id="statusWindow"> | ||
4209 | <property name="width_request">780</property> | ||
4210 | <property name="height_request">300</property> | ||
4211 | <property name="border_width">5</property> | ||
4212 | <property name="type">GTK_WINDOW_POPUP</property> | ||
4213 | <property name="title" translatable="yes">Messages</property> | ||
4214 | <property name="window_position">GTK_WIN_POS_CENTER</property> | ||
4215 | <property name="icon_name">gtk-dialog-info</property> | ||
4216 | <property name="type_hint">GDK_WINDOW_TYPE_HINT_NOTIFICATION</property> | ||
4217 | <property name="focus_on_map">False</property> | ||
4218 | <child> | ||
4219 | <widget class="GtkVBox" id="vbox16"> | ||
4220 | <property name="visible">True</property> | ||
4221 | <child> | ||
4222 | <widget class="GtkScrolledWindow" id="messageWindowScrolledWindow"> | ||
4223 | <property name="visible">True</property> | ||
4224 | <property name="can_focus">True</property> | ||
4225 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
4226 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
4227 | <child> | ||
4228 | <widget class="GtkTextView" id="messageWindowTextView"> | ||
4229 | <property name="visible">True</property> | ||
4230 | <property name="can_focus">True</property> | ||
4231 | <property name="editable">False</property> | ||
4232 | <property name="wrap_mode">GTK_WRAP_WORD</property> | ||
4233 | <property name="cursor_visible">False</property> | ||
4234 | <property name="accepts_tab">False</property> | ||
4235 | </widget> | ||
4236 | </child> | ||
4237 | </widget> | ||
4238 | </child> | ||
4239 | <child> | ||
4240 | <widget class="GtkButton" id="messageWindowCloseButton"> | ||
4241 | <property name="visible">True</property> | ||
4242 | <property name="can_focus">True</property> | ||
4243 | <property name="label">gtk-close</property> | ||
4244 | <property name="use_stock">True</property> | ||
4245 | <property name="response_id">0</property> | ||
4246 | </widget> | ||
4247 | <packing> | ||
4248 | <property name="expand">False</property> | ||
4249 | <property name="fill">False</property> | ||
4250 | <property name="position">1</property> | ||
4251 | </packing> | ||
4252 | </child> | ||
4253 | </widget> | ||
4254 | </child> | ||
4255 | </widget> | ||
4256 | <widget class="GtkDialog" id="namespaceInsertDialog"> | 4255 | <widget class="GtkDialog" id="namespaceInsertDialog"> |
4257 | <property name="border_width">5</property> | 4256 | <property name="border_width">5</property> |
4258 | <property name="title" translatable="yes">Add File to Namespace</property> | 4257 | <property name="title" translatable="yes">Add File to Namespace</property> |
@@ -4913,9 +4912,9 @@ Alex Jones <alexrjones@ntlworld.com></property> | |||
4913 | <property name="modal">True</property> | 4912 | <property name="modal">True</property> |
4914 | <property name="icon_name">gtk-save-as</property> | 4913 | <property name="icon_name">gtk-save-as</property> |
4915 | <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> | 4914 | <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> |
4916 | <property name="show_hidden">True</property> | ||
4917 | <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property> | ||
4918 | <property name="do_overwrite_confirmation">True</property> | 4915 | <property name="do_overwrite_confirmation">True</property> |
4916 | <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property> | ||
4917 | <property name="show_hidden">True</property> | ||
4919 | <child internal-child="vbox"> | 4918 | <child internal-child="vbox"> |
4920 | <widget class="GtkVBox" id="dialog-vbox7"> | 4919 | <widget class="GtkVBox" id="dialog-vbox7"> |
4921 | <property name="visible">True</property> | 4920 | <property name="visible">True</property> |
diff --git a/src/common/helper.c b/src/common/helper.c index 28518fae..01a26825 100644 --- a/src/common/helper.c +++ b/src/common/helper.c | |||
@@ -90,8 +90,6 @@ static Plugin *plugin; | |||
90 | 90 | ||
91 | static void *shutdown_function; | 91 | static void *shutdown_function; |
92 | 92 | ||
93 | static struct GNUNET_GE_Context *ectx; | ||
94 | |||
95 | static struct GNUNET_GC_Configuration *cfg; | 93 | static struct GNUNET_GC_Configuration *cfg; |
96 | 94 | ||
97 | static struct GNUNET_CronManager *cron; | 95 | static struct GNUNET_CronManager *cron; |
@@ -234,7 +232,7 @@ connector (const gchar * handler_name, | |||
234 | if ((module == NULL) || | 232 | if ((module == NULL) || |
235 | (TRUE != g_module_symbol (module, handler_name, &method))) | 233 | (TRUE != g_module_symbol (module, handler_name, &method))) |
236 | { | 234 | { |
237 | GNUNET_GE_LOG (ectx, | 235 | GNUNET_GE_LOG (NULL, |
238 | GNUNET_GE_WARNING | GNUNET_GE_DEVELOPER | | 236 | GNUNET_GE_WARNING | GNUNET_GE_DEVELOPER | |
239 | GNUNET_GE_IMMEDIATE, | 237 | GNUNET_GE_IMMEDIATE, |
240 | _("Failed to find handler for `%s'\n"), | 238 | _("Failed to find handler for `%s'\n"), |
@@ -265,7 +263,7 @@ loadPlugin (const char *name) | |||
265 | struct GNUNET_PluginHandle *lib; | 263 | struct GNUNET_PluginHandle *lib; |
266 | InitCall init; | 264 | InitCall init; |
267 | 265 | ||
268 | lib = GNUNET_plugin_load (ectx, "libgnunetgtkmodule_", name); | 266 | lib = GNUNET_plugin_load (NULL, "libgnunetgtkmodule_", name); |
269 | if (lib == NULL) | 267 | if (lib == NULL) |
270 | return; | 268 | return; |
271 | p = GNUNET_malloc (sizeof (Plugin)); | 269 | p = GNUNET_malloc (sizeof (Plugin)); |
@@ -275,7 +273,7 @@ loadPlugin (const char *name) | |||
275 | plugin = p; | 273 | plugin = p; |
276 | init = GNUNET_plugin_resolve_function (lib, "init_", GNUNET_NO); | 274 | init = GNUNET_plugin_resolve_function (lib, "init_", GNUNET_NO); |
277 | if (init != NULL) | 275 | if (init != NULL) |
278 | init (ectx, cfg); | 276 | init (NULL, cfg); |
279 | } | 277 | } |
280 | 278 | ||
281 | static void | 279 | static void |
@@ -330,21 +328,19 @@ unloadPlugin (void *p) | |||
330 | } | 328 | } |
331 | 329 | ||
332 | void | 330 | void |
333 | GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *e, | 331 | GNUNET_GTK_initialize_common_library (struct GNUNET_GC_Configuration *c, |
334 | struct GNUNET_GC_Configuration *c, | ||
335 | void *callback) | 332 | void *callback) |
336 | { | 333 | { |
337 | char *load; | 334 | char *load; |
338 | char *path; | 335 | char *path; |
339 | char *filename; | 336 | char *filename; |
340 | 337 | ||
341 | ectx = e; | ||
342 | cfg = c; | 338 | cfg = c; |
343 | shutdown_function = callback; | 339 | shutdown_function = callback; |
344 | sclock = GNUNET_mutex_create (GNUNET_YES); | 340 | sclock = GNUNET_mutex_create (GNUNET_YES); |
345 | mainThread = GNUNET_thread_get_self (); | 341 | mainThread = GNUNET_thread_get_self (); |
346 | saveCallsUp = GNUNET_YES; | 342 | saveCallsUp = GNUNET_YES; |
347 | cron = GNUNET_cron_create (ectx); | 343 | cron = GNUNET_cron_create (NULL); |
348 | 344 | ||
349 | /* load the interface */ | 345 | /* load the interface */ |
350 | path = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 346 | path = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); |
@@ -364,7 +360,7 @@ GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *e, | |||
364 | 360 | ||
365 | mainXML = glade_xml_new (gladeFile, "mainWindow", PACKAGE_NAME); | 361 | mainXML = glade_xml_new (gladeFile, "mainWindow", PACKAGE_NAME); |
366 | if (mainXML == NULL) | 362 | if (mainXML == NULL) |
367 | GNUNET_GE_DIE_STRERROR_FILE (ectx, | 363 | GNUNET_GE_DIE_STRERROR_FILE (NULL, |
368 | GNUNET_GE_FATAL | GNUNET_GE_USER | | 364 | GNUNET_GE_FATAL | GNUNET_GE_USER | |
369 | GNUNET_GE_IMMEDIATE, "glade_xml_new", | 365 | GNUNET_GE_IMMEDIATE, "glade_xml_new", |
370 | gladeFile); | 366 | gladeFile); |
@@ -463,7 +459,7 @@ GNUNET_GTK_run_with_save_calls (GNUNET_ThreadMainFunction cb, void *arg) | |||
463 | cls.arg = arg; | 459 | cls.arg = arg; |
464 | doneThread = GNUNET_thread_create (&shutdownCode, &cls, 64 * 1024); | 460 | doneThread = GNUNET_thread_create (&shutdownCode, &cls, 64 * 1024); |
465 | if (doneThread == NULL) | 461 | if (doneThread == NULL) |
466 | GNUNET_GE_DIE_STRERROR (ectx, | 462 | GNUNET_GE_DIE_STRERROR (NULL, |
467 | GNUNET_GE_FATAL | GNUNET_GE_ADMIN | | 463 | GNUNET_GE_FATAL | GNUNET_GE_ADMIN | |
468 | GNUNET_GE_BULK, "pthread_create"); | 464 | GNUNET_GE_BULK, "pthread_create"); |
469 | if (!GNUNET_thread_test_self (mainThread)) | 465 | if (!GNUNET_thread_test_self (mainThread)) |
@@ -521,7 +517,7 @@ GNUNET_GTK_notify (int type, const char *message, ...) | |||
521 | if (!notify_init ("gnunet-gtk")) | 517 | if (!notify_init ("gnunet-gtk")) |
522 | { | 518 | { |
523 | once = 1; | 519 | once = 1; |
524 | GNUNET_GE_LOG (ectx, | 520 | GNUNET_GE_LOG (NULL, |
525 | GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER | | 521 | GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER | |
526 | GNUNET_GE_ADMIN, | 522 | GNUNET_GE_ADMIN, |
527 | _("Could not initialize libnotify\n")); | 523 | _("Could not initialize libnotify\n")); |
@@ -557,7 +553,7 @@ GNUNET_GTK_notify (int type, const char *message, ...) | |||
557 | if (!notify_notification_show (libnotify, NULL)) | 553 | if (!notify_notification_show (libnotify, NULL)) |
558 | { | 554 | { |
559 | once = 1; | 555 | once = 1; |
560 | GNUNET_GE_LOG (ectx, | 556 | GNUNET_GE_LOG (NULL, |
561 | GNUNET_GE_WARNING | GNUNET_GE_USER | GNUNET_GE_ADMIN | 557 | GNUNET_GE_WARNING | GNUNET_GE_USER | GNUNET_GE_ADMIN |
562 | | GNUNET_GE_BULK, | 558 | | GNUNET_GE_BULK, |
563 | _("Could not send notification via libnotify\n")); | 559 | _("Could not send notification via libnotify\n")); |
diff --git a/src/common/logging.c b/src/common/logging.c index 1777e45d..355b4f3b 100644 --- a/src/common/logging.c +++ b/src/common/logging.c | |||
@@ -30,48 +30,17 @@ | |||
30 | #include <glib.h> | 30 | #include <glib.h> |
31 | #include <gmodule.h> | 31 | #include <gmodule.h> |
32 | 32 | ||
33 | static GtkWidget *infoWindow; | ||
34 | |||
35 | static GtkWidget *infoWindowTextView; | 33 | static GtkWidget *infoWindowTextView; |
36 | 34 | ||
37 | static GladeXML *statusXML; | ||
38 | |||
39 | static void | 35 | static void |
40 | init () | 36 | init () |
41 | { | 37 | { |
42 | GtkWidget *button; | 38 | if (infoWindowTextView != NULL) |
43 | |||
44 | if (statusXML != NULL) | ||
45 | return; | 39 | return; |
46 | statusXML | ||
47 | = | ||
48 | glade_xml_new (GNUNET_GTK_get_glade_filename (), "statusWindow", | ||
49 | PACKAGE_NAME); | ||
50 | infoWindow = glade_xml_get_widget (statusXML, "statusWindow"); | ||
51 | infoWindowTextView | 40 | infoWindowTextView |
52 | = glade_xml_get_widget (statusXML, "messageWindowTextView"); | 41 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML(), |
53 | button = glade_xml_get_widget (statusXML, "messageWindowCloseButton"); | 42 | "messageWindowTextView"); |
54 | GNUNET_GTK_connect_glade_with_plugins (statusXML); | ||
55 | |||
56 | g_signal_connect_data (infoWindow, | ||
57 | "delete-event", | ||
58 | G_CALLBACK (>k_widget_hide_on_delete), | ||
59 | NULL, NULL, 0); | ||
60 | g_signal_connect_data (button, | ||
61 | "clicked", | ||
62 | G_CALLBACK (>k_widget_hide_on_delete), | ||
63 | infoWindow, NULL, G_CONNECT_SWAPPED); | ||
64 | } | 43 | } |
65 | |||
66 | /** | ||
67 | * Closure for doInfoMessage. | ||
68 | */ | ||
69 | typedef struct | ||
70 | { | ||
71 | int doPopup; | ||
72 | char *note; | ||
73 | } InfoMessage; | ||
74 | |||
75 | /** | 44 | /** |
76 | * Do not track more than MAX messages | 45 | * Do not track more than MAX messages |
77 | */ | 46 | */ |
@@ -83,49 +52,40 @@ typedef struct | |||
83 | static void * | 52 | static void * |
84 | doInfoMessage (void *args) | 53 | doInfoMessage (void *args) |
85 | { | 54 | { |
86 | const InfoMessage *info = args; | 55 | char * note = args; |
87 | GtkTextIter iter; | 56 | GtkTextIter iter; |
88 | GtkTextBuffer *buffer; | 57 | GtkTextBuffer *buffer; |
89 | GtkTextIter end; | 58 | GtkTextIter end; |
90 | 59 | ||
91 | init (); | 60 | init (); |
92 | if (info->doPopup == GNUNET_YES) | ||
93 | gtk_widget_show (infoWindow); | ||
94 | buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (infoWindowTextView)); | 61 | buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (infoWindowTextView)); |
95 | gtk_text_buffer_get_iter_at_offset (buffer, &iter, -1); | 62 | gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0); |
96 | gtk_text_buffer_insert (buffer, &iter, info->note, -1); | 63 | gtk_text_buffer_insert (buffer, &iter, note, -1); |
97 | if (gtk_text_buffer_get_line_count (buffer) >= MAX_LINES) | 64 | if (gtk_text_buffer_get_line_count (buffer) >= MAX_LINES) |
98 | { | 65 | { |
99 | gtk_text_buffer_get_iter_at_line (buffer, &iter, MAX_LINES - 1); | 66 | gtk_text_buffer_get_iter_at_line (buffer, &iter, MAX_LINES-1); |
100 | gtk_text_buffer_get_iter_at_line (buffer, &end, MAX_LINES); | 67 | gtk_text_buffer_get_iter_at_line (buffer, &end, -1); |
101 | gtk_text_buffer_delete (buffer, &iter, &end); | 68 | gtk_text_buffer_delete (buffer, &iter, &end); |
102 | } | 69 | } |
103 | return NULL; | 70 | return NULL; |
104 | } | 71 | } |
105 | 72 | ||
106 | void | ||
107 | GNUNET_GTK_hide_info_window() | ||
108 | { | ||
109 | gtk_widget_hide (infoWindow); | ||
110 | } | ||
111 | |||
112 | /** | 73 | /** |
113 | * Appends a message to the info window | 74 | * Appends a message to the info window |
114 | * | 75 | * |
115 | * @param doPopup do we open the window, GNUNET_YES or GNUNET_NO | 76 | * @param doPopup do we open the window, GNUNET_YES or GNUNET_NO |
116 | */ | 77 | */ |
117 | void | 78 | void |
118 | GNUNET_GTK_show_info_message (int doPopup, const char *format, ...) | 79 | GNUNET_GTK_show_info_message (const char *format, ...) |
119 | { | 80 | { |
120 | va_list args; | 81 | va_list args; |
121 | InfoMessage info; | 82 | gchar * note; |
122 | 83 | ||
123 | va_start (args, format); | 84 | va_start (args, format); |
124 | info.note = g_strdup_vprintf (format, args); | 85 | note = g_strdup_vprintf (format, args); |
125 | va_end (args); | 86 | va_end (args); |
126 | info.doPopup = doPopup; | 87 | GNUNET_GTK_save_call (&doInfoMessage, note); |
127 | GNUNET_GTK_save_call (&doInfoMessage, &info); | 88 | g_free (note); |
128 | g_free (info.note); | ||
129 | } | 89 | } |
130 | 90 | ||
131 | static void * | 91 | static void * |
@@ -169,8 +129,8 @@ GNUNET_GTK_add_log_entry (const char *txt, ...) | |||
169 | va_start (args, txt); | 129 | va_start (args, txt); |
170 | note = g_strdup_vprintf (txt, args); | 130 | note = g_strdup_vprintf (txt, args); |
171 | va_end (args); | 131 | va_end (args); |
172 | GNUNET_GTK_show_info_message (GNUNET_NO, note); | 132 | GNUNET_GTK_save_call (&doInfoMessage, note); |
173 | GNUNET_GTK_save_call (&saveAddLogEntry, (void *) note); | 133 | GNUNET_GTK_save_call (&saveAddLogEntry, note); |
174 | g_free (note); | 134 | g_free (note); |
175 | } | 135 | } |
176 | 136 | ||
@@ -178,12 +138,7 @@ static void | |||
178 | ge_gtk_log_handler (void *ctx, | 138 | ge_gtk_log_handler (void *ctx, |
179 | GNUNET_GE_KIND kind, const char *date, const char *msg) | 139 | GNUNET_GE_KIND kind, const char *date, const char *msg) |
180 | { | 140 | { |
181 | int popUp; | 141 | GNUNET_GTK_show_info_message ("%s: %s", date, msg); |
182 | |||
183 | popUp = GNUNET_NO; | ||
184 | if ((kind & (GNUNET_GE_FATAL | GNUNET_GE_ERROR | GNUNET_GE_WARNING)) > 0) | ||
185 | popUp = GNUNET_YES; | ||
186 | GNUNET_GTK_show_info_message (popUp, "%s: %s", date, msg); | ||
187 | } | 142 | } |
188 | 143 | ||
189 | struct GNUNET_GE_Context * | 144 | struct GNUNET_GE_Context * |
@@ -197,13 +152,4 @@ GNUNET_GTK_create_gtk_logger (GNUNET_GE_KIND mask) | |||
197 | return myLog; | 152 | return myLog; |
198 | } | 153 | } |
199 | 154 | ||
200 | void __attribute__ ((destructor)) GNUNET_GTK_common_ltdl_fini () | 155 | /* end of logging.c */ |
201 | { | ||
202 | if (statusXML != NULL) | ||
203 | { | ||
204 | gtk_widget_destroy (infoWindow); | ||
205 | infoWindow = NULL; | ||
206 | UNREF (statusXML); | ||
207 | statusXML = NULL; | ||
208 | } | ||
209 | } | ||
diff --git a/src/core/main.c b/src/core/main.c index 5eedb1e8..78e29adf 100644 --- a/src/core/main.c +++ b/src/core/main.c | |||
@@ -119,7 +119,7 @@ main (int argc, char *const *argv) | |||
119 | bind_textdomain_codeset ("GNUnet", "UTF-8"); | 119 | bind_textdomain_codeset ("GNUnet", "UTF-8"); |
120 | bind_textdomain_codeset ("gnunet-gtk", "UTF-8"); | 120 | bind_textdomain_codeset ("gnunet-gtk", "UTF-8"); |
121 | #endif | 121 | #endif |
122 | GNUNET_GTK_initialize_common_library (ectx, cfg, &GNUNET_GTK_main_quit); | 122 | GNUNET_GTK_initialize_common_library (cfg, &GNUNET_GTK_main_quit); |
123 | /* configure GTK logging */ | 123 | /* configure GTK logging */ |
124 | GNUNET_GC_get_configuration_value_string (cfg, | 124 | GNUNET_GC_get_configuration_value_string (cfg, |
125 | "LOGGING", | 125 | "LOGGING", |
@@ -140,7 +140,6 @@ main (int argc, char *const *argv) | |||
140 | dataDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 140 | dataDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); |
141 | gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), dataDir); | 141 | gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), dataDir); |
142 | GNUNET_free (dataDir); | 142 | GNUNET_free (dataDir); |
143 | GNUNET_GTK_hide_info_window(); | ||
144 | gtk_window_maximize (GTK_WINDOW (root)); | 143 | gtk_window_maximize (GTK_WINDOW (root)); |
145 | gtk_widget_show (root); | 144 | gtk_widget_show (root); |
146 | gtk_window_present (GTK_WINDOW (root)); | 145 | gtk_window_present (GTK_WINDOW (root)); |
diff --git a/src/include/gnunetgtk_common.h b/src/include/gnunetgtk_common.h index d95f8cec..d70009f6 100644 --- a/src/include/gnunetgtk_common.h +++ b/src/include/gnunetgtk_common.h | |||
@@ -44,8 +44,7 @@ | |||
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | 46 | ||
47 | void GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *ectx, | 47 | void GNUNET_GTK_initialize_common_library (struct GNUNET_GC_Configuration |
48 | struct GNUNET_GC_Configuration | ||
49 | *cfg, void *callback); | 48 | *cfg, void *callback); |
50 | 49 | ||
51 | void GNUNET_GTK_shutdown_plugins (void); | 50 | void GNUNET_GTK_shutdown_plugins (void); |
@@ -79,7 +78,7 @@ GtkStatusIcon *GNUNET_GTK_get_trayIcon (void); | |||
79 | * @param doPopup if GNUNET_YES, the info window will | 78 | * @param doPopup if GNUNET_YES, the info window will |
80 | * be opened | 79 | * be opened |
81 | */ | 80 | */ |
82 | void GNUNET_GTK_show_info_message (int doPopup, const char *format, ...); | 81 | void GNUNET_GTK_show_info_message (const char *format, ...); |
83 | 82 | ||
84 | /** | 83 | /** |
85 | * Appends a log entry to the info window | 84 | * Appends a log entry to the info window |
@@ -90,9 +89,6 @@ void GNUNET_GTK_show_info_message (int doPopup, const char *format, ...); | |||
90 | */ | 89 | */ |
91 | void GNUNET_GTK_add_log_entry (const char *txt, ...); | 90 | void GNUNET_GTK_add_log_entry (const char *txt, ...); |
92 | 91 | ||
93 | void | ||
94 | GNUNET_GTK_hide_info_window(void); | ||
95 | |||
96 | struct GNUNET_GE_Context *GNUNET_GTK_create_gtk_logger (GNUNET_GE_KIND mask); | 92 | struct GNUNET_GE_Context *GNUNET_GTK_create_gtk_logger (GNUNET_GE_KIND mask); |
97 | 93 | ||
98 | #define GNUNET_GTK_NOTIFY_LEVEL_LOW 0 | 94 | #define GNUNET_GTK_NOTIFY_LEVEL_LOW 0 |
diff --git a/src/plugins/daemon/daemon.c b/src/plugins/daemon/daemon.c index 1c3b4538..0cab7e52 100644 --- a/src/plugins/daemon/daemon.c +++ b/src/plugins/daemon/daemon.c | |||
@@ -47,21 +47,38 @@ static struct GNUNET_GE_Context *ectx; | |||
47 | static struct GNUNET_GC_Configuration *cfg; | 47 | static struct GNUNET_GC_Configuration *cfg; |
48 | 48 | ||
49 | /** | 49 | /** |
50 | * Do the actual update (in event thread). | ||
51 | */ | ||
52 | static void * | ||
53 | updateAppModelSafe (void *arg) | ||
54 | { | ||
55 | GtkWidget *w; | ||
56 | GtkListStore *model = arg; | ||
57 | |||
58 | w = | ||
59 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
60 | "applicationList"); | ||
61 | gtk_tree_view_set_model (GTK_TREE_VIEW (w), GTK_TREE_MODEL (model)); | ||
62 | gtk_tree_selection_set_mode (gtk_tree_view_get_selection | ||
63 | (GTK_TREE_VIEW (w)), GTK_SELECTION_NONE); | ||
64 | return NULL; | ||
65 | } | ||
66 | |||
67 | /** | ||
50 | * cron job that periodically updates the model for the | 68 | * cron job that periodically updates the model for the |
51 | * application list. | 69 | * application list. |
52 | */ | 70 | */ |
53 | static void * | 71 | static void |
54 | updateAppModelSafe (void *unused) | 72 | updateAppModel (void *dummy) |
55 | { | 73 | { |
56 | struct GNUNET_ClientServerConnection *sock; | 74 | struct GNUNET_ClientServerConnection *sock; |
57 | GtkWidget *w; | ||
58 | GtkListStore *model; | ||
59 | GtkTreeIter iter; | 75 | GtkTreeIter iter; |
60 | char *apps; | 76 | char *apps; |
61 | char *next; | 77 | char *next; |
62 | char *pos; | 78 | char *pos; |
63 | char *desc; | 79 | char *desc; |
64 | 80 | GtkListStore *model; | |
81 | |||
65 | model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); | 82 | model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); |
66 | apps = NULL; | 83 | apps = NULL; |
67 | sock = GNUNET_client_connection_create (ectx, cfg); | 84 | sock = GNUNET_client_connection_create (ectx, cfg); |
@@ -102,21 +119,9 @@ updateAppModelSafe (void *unused) | |||
102 | while (next != NULL); | 119 | while (next != NULL); |
103 | GNUNET_free (apps); | 120 | GNUNET_free (apps); |
104 | } | 121 | } |
105 | w = | ||
106 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
107 | "applicationList"); | ||
108 | gtk_tree_view_set_model (GTK_TREE_VIEW (w), GTK_TREE_MODEL (model)); | ||
109 | gtk_tree_selection_set_mode (gtk_tree_view_get_selection | ||
110 | (GTK_TREE_VIEW (w)), GTK_SELECTION_NONE); | ||
111 | g_object_unref (model); | ||
112 | GNUNET_client_connection_destroy (sock); | 122 | GNUNET_client_connection_destroy (sock); |
113 | return NULL; | 123 | GNUNET_GTK_save_call (&updateAppModelSafe, model); |
114 | } | 124 | g_object_unref (model); |
115 | |||
116 | static void | ||
117 | updateAppModel (void *dummy) | ||
118 | { | ||
119 | GNUNET_GTK_save_call (&updateAppModelSafe, NULL); | ||
120 | } | 125 | } |
121 | 126 | ||
122 | 127 | ||
@@ -166,7 +171,6 @@ doUpdateMenus (void *arg) | |||
166 | isLocal = FALSE; | 171 | isLocal = FALSE; |
167 | GNUNET_free (host); | 172 | GNUNET_free (host); |
168 | } | 173 | } |
169 | updateAppModelSafe (NULL); | ||
170 | if (ret == 0) | 174 | if (ret == 0) |
171 | { | 175 | { |
172 | canStart = 0; | 176 | canStart = 0; |
@@ -238,15 +242,24 @@ doUpdateMenus (void *arg) | |||
238 | return NULL; | 242 | return NULL; |
239 | } | 243 | } |
240 | 244 | ||
245 | /** | ||
246 | * Cron job that checks if the daemon is running. | ||
247 | */ | ||
241 | static void | 248 | static void |
242 | cronCheckDaemon (void *dummy) | 249 | cronCheckDaemon (void *dummy) |
243 | { | 250 | { |
251 | static int last = -1; | ||
244 | int ret; | 252 | int ret; |
245 | 253 | ||
246 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) | 254 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) |
247 | ret = 1; | 255 | ret = 1; |
248 | else | 256 | else |
249 | ret = 0; | 257 | ret = 0; |
258 | if (last != ret) | ||
259 | { | ||
260 | updateAppModel(NULL); | ||
261 | last = ret; | ||
262 | } | ||
250 | GNUNET_GTK_save_call (&doUpdateMenus, &ret); | 263 | GNUNET_GTK_save_call (&doUpdateMenus, &ret); |
251 | } | 264 | } |
252 | 265 | ||
@@ -269,7 +282,10 @@ on_startDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
269 | gtk_widget_set_sensitive (launchEntry, FALSE); | 282 | gtk_widget_set_sensitive (launchEntry, FALSE); |
270 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) | 283 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) |
271 | { | 284 | { |
272 | cronCheckDaemon (NULL); | 285 | GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (), |
286 | &cronCheckDaemon, | ||
287 | 15 * GNUNET_CRON_SECONDS, | ||
288 | NULL); | ||
273 | return; | 289 | return; |
274 | } | 290 | } |
275 | else | 291 | else |
@@ -309,7 +325,10 @@ on_startDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
309 | GNUNET_GTK_add_log_entry (_("Launched gnunetd\n")); | 325 | GNUNET_GTK_add_log_entry (_("Launched gnunetd\n")); |
310 | } | 326 | } |
311 | g_free (fn); | 327 | g_free (fn); |
312 | cronCheckDaemon (NULL); | 328 | GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (), |
329 | &cronCheckDaemon, | ||
330 | 15 * GNUNET_CRON_SECONDS, | ||
331 | NULL); | ||
313 | return; | 332 | return; |
314 | } | 333 | } |
315 | else | 334 | else |
@@ -329,7 +348,10 @@ on_startDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
329 | } | 348 | } |
330 | if (fn != NULL) | 349 | if (fn != NULL) |
331 | g_free (fn); | 350 | g_free (fn); |
332 | cronCheckDaemon (NULL); | 351 | GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (), |
352 | &cronCheckDaemon, | ||
353 | 15 * GNUNET_CRON_SECONDS, | ||
354 | NULL); | ||
333 | } | 355 | } |
334 | } | 356 | } |
335 | 357 | ||
@@ -368,7 +390,10 @@ on_stopDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
368 | } | 390 | } |
369 | GNUNET_client_connection_destroy (sock); | 391 | GNUNET_client_connection_destroy (sock); |
370 | } | 392 | } |
371 | cronCheckDaemon (NULL); | 393 | GNUNET_cron_advance_job(GNUNET_GTK_get_cron_manager (), |
394 | &cronCheckDaemon, | ||
395 | 15 * GNUNET_CRON_SECONDS, | ||
396 | NULL); | ||
372 | } | 397 | } |
373 | 398 | ||
374 | void | 399 | void |
@@ -449,7 +474,7 @@ init_daemon (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) | |||
449 | GNUNET_free (daemon_config); | 474 | GNUNET_free (daemon_config); |
450 | 475 | ||
451 | cron = GNUNET_GTK_get_cron_manager (); | 476 | cron = GNUNET_GTK_get_cron_manager (); |
452 | GNUNET_cron_add_job (cron, &cronCheckDaemon, 0, 15 * GNUNET_CRON_SECONDS, | 477 | GNUNET_cron_add_job (cron, &cronCheckDaemon, 2 * GNUNET_CRON_SECONDS, 15 * GNUNET_CRON_SECONDS, |
453 | NULL); | 478 | NULL); |
454 | GNUNET_cron_add_job (cron, &updateAppModel, 5 * GNUNET_CRON_MINUTES, | 479 | GNUNET_cron_add_job (cron, &updateAppModel, 5 * GNUNET_CRON_MINUTES, |
455 | 5 * GNUNET_CRON_MINUTES, NULL); | 480 | 5 * GNUNET_CRON_MINUTES, NULL); |
diff --git a/src/plugins/fs/Makefile.am b/src/plugins/fs/Makefile.am index b00f8dcf..c8050b53 100644 --- a/src/plugins/fs/Makefile.am +++ b/src/plugins/fs/Makefile.am | |||
@@ -21,6 +21,7 @@ libgnunetgtkmodule_fs_la_SOURCES = \ | |||
21 | namespace_create.c \ | 21 | namespace_create.c \ |
22 | namespace_search.c namespace_search.h \ | 22 | namespace_search.c namespace_search.h \ |
23 | search.c search.h \ | 23 | search.c search.h \ |
24 | status.c status.h \ | ||
24 | download.c download.h \ | 25 | download.c download.h \ |
25 | upload.c upload.h | 26 | upload.c upload.h |
26 | libgnunetgtkmodule_fs_la_LIBADD = \ | 27 | libgnunetgtkmodule_fs_la_LIBADD = \ |
diff --git a/src/plugins/fs/collection.c b/src/plugins/fs/collection.c index 838d7644..067dce3c 100644 --- a/src/plugins/fs/collection.c +++ b/src/plugins/fs/collection.c | |||
@@ -133,13 +133,11 @@ deleteCollection_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
133 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 133 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
134 | "deleteCollection"); | 134 | "deleteCollection"); |
135 | gtk_widget_set_sensitive (w, FALSE); | 135 | gtk_widget_set_sensitive (w, FALSE); |
136 | GNUNET_GTK_show_info_message (GNUNET_NO, _("Collection stopped.\n")); | 136 | GNUNET_GTK_show_info_message (_("Collection stopped.\n")); |
137 | } | 137 | } |
138 | else | 138 | else |
139 | { | 139 | { |
140 | GNUNET_GTK_show_info_message (GNUNET_YES, | 140 | GNUNET_GTK_show_info_message (_("Failed to stop collection (consult logs).\n")); |
141 | _ | ||
142 | ("Failed to stop collection (consult logs).\n")); | ||
143 | } | 141 | } |
144 | } | 142 | } |
145 | 143 | ||
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index aa32c8f8..b60578bb 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "fs.h" | 29 | #include "fs.h" |
30 | #include "search.h" | 30 | #include "search.h" |
31 | #include "status.h" | ||
31 | #include "meta.h" | 32 | #include "meta.h" |
32 | 33 | ||
33 | /* ****************** FSUI download events ****************** */ | 34 | /* ****************** FSUI download events ****************** */ |
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index 163d103c..e00668a0 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -676,102 +676,59 @@ fs_summary_stop () | |||
676 | 676 | ||
677 | } | 677 | } |
678 | 678 | ||
679 | static void | ||
680 | init_cron_job(void * arg) | ||
681 | { | ||
682 | GtkWidget * tab = arg; | ||
683 | |||
684 | ctx = GNUNET_FSUI_start (ectx, cfg, "gnunet-gtk", | ||
685 | 8, /* FIXME: allow user to configure download parallelism */ | ||
686 | GNUNET_YES, &eventProcessor, NULL); | ||
687 | GNUNET_GTK_save_call((GNUNET_ThreadMainFunction) >k_widget_show, | ||
688 | tab); | ||
689 | } | ||
690 | |||
679 | void | 691 | void |
680 | init_fs (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) | 692 | init_fs (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) |
681 | { | 693 | { |
682 | GtkWidget *tab; | 694 | GtkWidget *tab; |
683 | GtkWidget *book; | 695 | struct GNUNET_CronManager * cron; |
684 | gint num; | ||
685 | 696 | ||
686 | ectx = e; | 697 | ectx = e; |
687 | cfg = c; | 698 | cfg = c; |
688 | GNUNET_CO_init (ectx, cfg); | 699 | GNUNET_CO_init (ectx, cfg); |
689 | tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook"); | ||
690 | gtk_widget_show (tab); | ||
691 | book = | ||
692 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainnotebook"); | ||
693 | num = gtk_notebook_get_current_page (GTK_NOTEBOOK (book)); | ||
694 | gtk_notebook_set_current_page (GTK_NOTEBOOK (book), 1); | ||
695 | gtk_notebook_set_current_page (GTK_NOTEBOOK (book), num); | ||
696 | fs_summary_start (); | 700 | fs_summary_start (); |
697 | fs_collection_start (); | 701 | fs_collection_start (); |
698 | fs_namespace_start (); | 702 | fs_namespace_start (); |
699 | ctx = GNUNET_FSUI_start (ectx, cfg, "gnunet-gtk", 8, /* FIXME: allow user to configure download parallelism */ | ||
700 | GNUNET_YES, &eventProcessor, NULL); | ||
701 | } | ||
702 | |||
703 | static void * | ||
704 | hide_save_call (void *arg) | ||
705 | { | ||
706 | GtkWidget *tab; | ||
707 | |||
708 | tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook"); | 703 | tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook"); |
709 | gtk_widget_hide (tab); | 704 | cron = GNUNET_GTK_get_cron_manager(); |
710 | return NULL; | 705 | GNUNET_cron_add_job(cron, &init_cron_job, 0, 0, tab); |
711 | } | 706 | } |
712 | 707 | ||
713 | static void * | 708 | static void * |
714 | cleanup_save_call (void *arg) | 709 | cleanup_save_call (void *arg) |
715 | { | 710 | { |
711 | GtkWidget *tab = arg; | ||
712 | |||
716 | fs_summary_stop (); | 713 | fs_summary_stop (); |
717 | fs_namespace_stop (); | 714 | fs_namespace_stop (); |
715 | gtk_widget_hide(tab); | ||
718 | return NULL; | 716 | return NULL; |
719 | } | 717 | } |
720 | 718 | ||
721 | void | 719 | void |
722 | done_fs () | 720 | done_fs () |
723 | { | 721 | { |
724 | GNUNET_GTK_save_call (&hide_save_call, NULL); | 722 | struct GNUNET_CronManager * cron; |
725 | GNUNET_FSUI_stop (ctx); | 723 | GtkWidget *tab; |
726 | GNUNET_GTK_save_call (&cleanup_save_call, NULL); | ||
727 | GNUNET_CO_done (); | ||
728 | } | ||
729 | |||
730 | |||
731 | const char * | ||
732 | getColorCode (enum GNUNET_URITRACK_STATE state) | ||
733 | { | ||
734 | if (state & (GNUNET_URITRACK_DIRECTORY_ADDED)) | ||
735 | return "blue"; | ||
736 | if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED)) | ||
737 | return "cyan"; | ||
738 | if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) && | ||
739 | (0 == (state & | ||
740 | (GNUNET_URITRACK_DOWNLOAD_COMPLETED | | ||
741 | GNUNET_URITRACK_DOWNLOAD_ABORTED)))) | ||
742 | return "yellow"; | ||
743 | if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED) | ||
744 | return "springgreen"; | ||
745 | if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED) | ||
746 | return "red"; | ||
747 | if (state & | ||
748 | (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND)) | ||
749 | return "gray"; | ||
750 | return NULL; | ||
751 | } | ||
752 | |||
753 | 724 | ||
754 | const char * | 725 | tab = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook"); |
755 | getStatusName (enum GNUNET_URITRACK_STATE state) | 726 | cron = GNUNET_GTK_get_cron_manager(); |
756 | { | 727 | GNUNET_cron_del_job(cron, &init_cron_job, 0, tab); |
757 | if (state & (GNUNET_URITRACK_DIRECTORY_ADDED)) | 728 | if (ctx != NULL) |
758 | return _("added"); | 729 | GNUNET_FSUI_stop (ctx); |
759 | if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED)) | 730 | GNUNET_GTK_save_call (&cleanup_save_call, tab); |
760 | return _("shared"); | 731 | GNUNET_CO_done (); |
761 | if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) && | ||
762 | (0 == (state & | ||
763 | (GNUNET_URITRACK_DOWNLOAD_COMPLETED | | ||
764 | GNUNET_URITRACK_DOWNLOAD_ABORTED)))) | ||
765 | return _("started"); | ||
766 | if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED) | ||
767 | return _("completed"); | ||
768 | if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED) | ||
769 | return _("aborted"); | ||
770 | if (state & | ||
771 | (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND)) | ||
772 | return ""; | ||
773 | return ""; | ||
774 | } | 732 | } |
775 | 733 | ||
776 | |||
777 | /* end of fs.c */ | 734 | /* end of fs.c */ |
diff --git a/src/plugins/fs/fs.h b/src/plugins/fs/fs.h index 2c38246d..3c978ff3 100644 --- a/src/plugins/fs/fs.h +++ b/src/plugins/fs/fs.h | |||
@@ -40,7 +40,7 @@ | |||
40 | enum | 40 | enum |
41 | { | 41 | { |
42 | NS_SEARCH_DESCRIPTION = 0, | 42 | NS_SEARCH_DESCRIPTION = 0, |
43 | NS_SEARCH_ENCNAME, | 43 | NS_SEARCH_NAME, |
44 | NS_SEARCH_METADATA, | 44 | NS_SEARCH_METADATA, |
45 | NS_SEARCH_RATING, | 45 | NS_SEARCH_RATING, |
46 | NS_SEARCH_NUM, | 46 | NS_SEARCH_NUM, |
@@ -348,9 +348,4 @@ extern GtkTreeStore *download_summary; | |||
348 | 348 | ||
349 | extern GtkTreeStore *upload_summary; | 349 | extern GtkTreeStore *upload_summary; |
350 | 350 | ||
351 | const char *getColorCode (enum GNUNET_URITRACK_STATE state); | ||
352 | |||
353 | const char *getStatusName (enum GNUNET_URITRACK_STATE state); | ||
354 | |||
355 | |||
356 | #endif | 351 | #endif |
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c index ad04505d..9aec5622 100644 --- a/src/plugins/fs/namespace.c +++ b/src/plugins/fs/namespace.c | |||
@@ -566,8 +566,7 @@ addToNamespaceCB (GtkTreeModel * model, | |||
566 | } | 566 | } |
567 | else | 567 | else |
568 | { | 568 | { |
569 | GNUNET_GTK_show_info_message (GNUNET_YES, | 569 | GNUNET_GTK_show_info_message (_ |
570 | _ | ||
571 | ("Failed to insert content into namespace " | 570 | ("Failed to insert content into namespace " |
572 | "(consult logs).\n")); | 571 | "(consult logs).\n")); |
573 | } | 572 | } |
diff --git a/src/plugins/fs/namespace_search.c b/src/plugins/fs/namespace_search.c index d81b27c5..ed134192 100644 --- a/src/plugins/fs/namespace_search.c +++ b/src/plugins/fs/namespace_search.c | |||
@@ -48,7 +48,7 @@ on_namespaceRatingSpinButton_changed_fs (GtkWidget * dummy, | |||
48 | GtkWidget *ncbe; | 48 | GtkWidget *ncbe; |
49 | GtkTreeModel *model; | 49 | GtkTreeModel *model; |
50 | GtkTreeIter iter; | 50 | GtkTreeIter iter; |
51 | char *encStr; | 51 | char *nsName; |
52 | char *description; | 52 | char *description; |
53 | int rating; | 53 | int rating; |
54 | int newrating; | 54 | int newrating; |
@@ -63,24 +63,27 @@ on_namespaceRatingSpinButton_changed_fs (GtkWidget * dummy, | |||
63 | "searchNamespaceComboBoxEntry"); | 63 | "searchNamespaceComboBoxEntry"); |
64 | model = gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe)); | 64 | model = gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe)); |
65 | description = NULL; | 65 | description = NULL; |
66 | encStr = NULL; | 66 | nsName = NULL; |
67 | if (TRUE == gtk_combo_box_get_active_iter (GTK_COMBO_BOX (ncbe), &iter)) | 67 | if (TRUE == gtk_combo_box_get_active_iter (GTK_COMBO_BOX (ncbe), &iter)) |
68 | { | 68 | { |
69 | gtk_tree_model_get (model, | 69 | gtk_tree_model_get (model, |
70 | &iter, | 70 | &iter, |
71 | NS_SEARCH_DESCRIPTION, &description, | 71 | NS_SEARCH_DESCRIPTION, &description, |
72 | NS_SEARCH_ENCNAME, &encStr, | 72 | NS_SEARCH_NAME, &nsName, |
73 | NS_SEARCH_RATING, &rating, -1); | 73 | NS_SEARCH_RATING, &rating, -1); |
74 | if ((description != NULL) && (0 == strcmp (description, _("globally")))) | 74 | if ((description != NULL) && (0 == strcmp (description, ""))) |
75 | { | 75 | { |
76 | /* just to be sure */ | 76 | /* just to be sure */ |
77 | gtk_widget_set_sensitive (spin, FALSE); | 77 | gtk_widget_set_sensitive (spin, FALSE); |
78 | } | 78 | } |
79 | else | 79 | else |
80 | { | 80 | { |
81 | if (encStr != NULL) | 81 | if (nsName != NULL) |
82 | { | 82 | { |
83 | GNUNET_enc_to_hash (encStr, &nsid); | 83 | GNUNET_GE_ASSERT(NULL, |
84 | GNUNET_OK == | ||
85 | GNUNET_pseudonym_name_to_id(ectx, cfg, | ||
86 | nsName, &nsid)); | ||
84 | newrating = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); | 87 | newrating = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); |
85 | rating = GNUNET_pseudonym_rank (ectx, | 88 | rating = GNUNET_pseudonym_rank (ectx, |
86 | cfg, &nsid, newrating - rating); | 89 | cfg, &nsid, newrating - rating); |
@@ -104,8 +107,8 @@ on_namespaceRatingSpinButton_changed_fs (GtkWidget * dummy, | |||
104 | } | 107 | } |
105 | if (description != NULL) | 108 | if (description != NULL) |
106 | free (description); | 109 | free (description); |
107 | if (encStr != NULL) | 110 | if (nsName != NULL) |
108 | free (encStr); | 111 | free (nsName); |
109 | GNUNET_GTK_DEBUG_END (); | 112 | GNUNET_GTK_DEBUG_END (); |
110 | } | 113 | } |
111 | 114 | ||
@@ -125,7 +128,7 @@ on_searchNamespaceComboBoxEntry_changed_fs (GtkWidget * dummy, | |||
125 | GtkTreeModel *model; | 128 | GtkTreeModel *model; |
126 | GtkTreeIter iter; | 129 | GtkTreeIter iter; |
127 | int rating; | 130 | int rating; |
128 | char *encStr; | 131 | char *nsName; |
129 | char *descStr; | 132 | char *descStr; |
130 | GNUNET_HashCode ns; | 133 | GNUNET_HashCode ns; |
131 | char *root; | 134 | char *root; |
@@ -139,22 +142,25 @@ on_searchNamespaceComboBoxEntry_changed_fs (GtkWidget * dummy, | |||
139 | "searchNamespaceComboBoxEntry"); | 142 | "searchNamespaceComboBoxEntry"); |
140 | model = gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe)); | 143 | model = gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe)); |
141 | descStr = NULL; | 144 | descStr = NULL; |
142 | encStr = NULL; | 145 | nsName = NULL; |
143 | if (TRUE == gtk_combo_box_get_active_iter (GTK_COMBO_BOX (ncbe), &iter)) | 146 | if (TRUE == gtk_combo_box_get_active_iter (GTK_COMBO_BOX (ncbe), &iter)) |
144 | { | 147 | { |
145 | gtk_tree_model_get (model, | 148 | gtk_tree_model_get (model, |
146 | &iter, | 149 | &iter, |
147 | NS_SEARCH_DESCRIPTION, &descStr, | 150 | NS_SEARCH_DESCRIPTION, &descStr, |
148 | NS_SEARCH_ENCNAME, &encStr, | 151 | NS_SEARCH_NAME, &nsName, |
149 | NS_SEARCH_RATING, &rating, -1); | 152 | NS_SEARCH_RATING, &rating, -1); |
150 | if ((descStr != NULL) && (0 == strcmp (descStr, _("globally")))) | 153 | if ((descStr != NULL) && (0 == strcmp (descStr, ""))) |
151 | { | 154 | { |
152 | gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 0); | 155 | gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 0); |
153 | gtk_widget_set_sensitive (spin, FALSE); | 156 | gtk_widget_set_sensitive (spin, FALSE); |
154 | } | 157 | } |
155 | else if (encStr != NULL) | 158 | else if (nsName != NULL) |
156 | { | 159 | { |
157 | GNUNET_enc_to_hash (encStr, &ns); | 160 | GNUNET_GE_ASSERT(NULL, |
161 | GNUNET_OK == | ||
162 | GNUNET_pseudonym_name_to_id(ectx, cfg, | ||
163 | nsName, &ns)); | ||
158 | gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), rating); | 164 | gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), rating); |
159 | gtk_widget_set_sensitive (spin, TRUE); | 165 | gtk_widget_set_sensitive (spin, TRUE); |
160 | keyword | 166 | keyword |
@@ -183,8 +189,8 @@ on_searchNamespaceComboBoxEntry_changed_fs (GtkWidget * dummy, | |||
183 | } | 189 | } |
184 | if (descStr != NULL) | 190 | if (descStr != NULL) |
185 | free (descStr); | 191 | free (descStr); |
186 | if (encStr != NULL) | 192 | if (nsName != NULL) |
187 | free (encStr); | 193 | free (nsName); |
188 | GNUNET_GTK_DEBUG_END (); | 194 | GNUNET_GTK_DEBUG_END (); |
189 | } | 195 | } |
190 | 196 | ||
@@ -200,24 +206,19 @@ static void * | |||
200 | saveDiscovery (void *cls) | 206 | saveDiscovery (void *cls) |
201 | { | 207 | { |
202 | struct NewNamespaceInfo *nni = cls; | 208 | struct NewNamespaceInfo *nni = cls; |
203 | |||
204 | GtkListStore *model; | 209 | GtkListStore *model; |
205 | GtkTreeIter iter; | 210 | GtkTreeIter iter; |
206 | GNUNET_EncName enc; | ||
207 | char *name; | ||
208 | struct GNUNET_MetaData *dmd; | 211 | struct GNUNET_MetaData *dmd; |
209 | GtkWidget *ncbe; | 212 | GtkWidget *ncbe; |
210 | char *desc; | 213 | char *desc; |
211 | size_t n; | 214 | char *haveName; |
212 | int found; | 215 | int found; |
213 | char *encName; | ||
214 | 216 | ||
215 | GNUNET_GTK_DEBUG_BEGIN (); | 217 | GNUNET_GTK_DEBUG_BEGIN (); |
216 | ncbe = | 218 | ncbe = |
217 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 219 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
218 | "searchNamespaceComboBoxEntry"); | 220 | "searchNamespaceComboBoxEntry"); |
219 | model = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe))); | 221 | model = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe))); |
220 | GNUNET_hash_to_enc (nni->namespaceId, &enc); | ||
221 | if (nni->md == NULL) | 222 | if (nni->md == NULL) |
222 | { | 223 | { |
223 | dmd = NULL; | 224 | dmd = NULL; |
@@ -242,9 +243,6 @@ saveDiscovery (void *cls) | |||
242 | desc = GNUNET_strdup (""); | 243 | desc = GNUNET_strdup (""); |
243 | } | 244 | } |
244 | 245 | ||
245 | n = strlen (desc) + 64; | ||
246 | name = GNUNET_malloc (n); | ||
247 | GNUNET_snprintf (name, n, "%s: %.*s", desc, 20, &enc); | ||
248 | /* check if present! */ | 246 | /* check if present! */ |
249 | found = GNUNET_NO; | 247 | found = GNUNET_NO; |
250 | if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) | 248 | if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) |
@@ -252,30 +250,27 @@ saveDiscovery (void *cls) | |||
252 | do | 250 | do |
253 | { | 251 | { |
254 | gtk_tree_model_get (GTK_TREE_MODEL (model), | 252 | gtk_tree_model_get (GTK_TREE_MODEL (model), |
255 | &iter, NS_SEARCH_ENCNAME, &encName, -1); | 253 | &iter, NS_SEARCH_NAME, &haveName, -1); |
256 | if ((encName != NULL) && | 254 | if ((haveName != NULL) && |
257 | (0 == strcmp (encName, (const char *) &enc))) | 255 | (0 == strcmp (haveName, nni->namespaceName))) |
258 | found = GNUNET_YES; | 256 | found = GNUNET_YES; |
259 | GNUNET_free_non_null (encName); | 257 | GNUNET_free_non_null (haveName); |
260 | } | 258 | } |
261 | while ((found == GNUNET_NO) && | 259 | while ((found == GNUNET_NO) && |
262 | (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter))); | 260 | (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter))); |
263 | } | 261 | } |
264 | if (found == GNUNET_NO) | 262 | if (found == GNUNET_NO) |
265 | { | 263 | { |
266 | GNUNET_GTK_show_info_message (GNUNET_YES, | 264 | GNUNET_GTK_show_info_message (_("Namespace `%s' found: %s.\n"), nni->namespaceName, desc); |
267 | _("Namespace found: %s - %.*s\n"), desc, | ||
268 | 20, &enc); | ||
269 | gtk_list_store_append (model, &iter); | 265 | gtk_list_store_append (model, &iter); |
270 | gtk_list_store_set (model, | 266 | gtk_list_store_set (model, |
271 | &iter, | 267 | &iter, |
272 | NS_SEARCH_DESCRIPTION, name, | 268 | NS_SEARCH_DESCRIPTION, desc, |
273 | NS_SEARCH_ENCNAME, &enc, | 269 | NS_SEARCH_NAME, nni->namespaceName, |
274 | NS_SEARCH_METADATA, dmd, | 270 | NS_SEARCH_METADATA, dmd, |
275 | NS_SEARCH_RATING, nni->rating, -1); | 271 | NS_SEARCH_RATING, nni->rating, -1); |
276 | } | 272 | } |
277 | GNUNET_free (desc); | 273 | GNUNET_free (desc); |
278 | GNUNET_free (name); | ||
279 | GNUNET_GTK_DEBUG_END (); | 274 | GNUNET_GTK_DEBUG_END (); |
280 | 275 | ||
281 | return NULL; | 276 | return NULL; |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index 26e3844a..92329cb9 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunetgtk_common.h" | 28 | #include "gnunetgtk_common.h" |
29 | #include "search.h" | 29 | #include "search.h" |
30 | #include "status.h" | ||
30 | #include "helper.h" | 31 | #include "helper.h" |
31 | #include "fs.h" | 32 | #include "fs.h" |
32 | #include "meta.h" | 33 | #include "meta.h" |
@@ -1164,27 +1165,35 @@ on_fssearchbutton_clicked_fs (gpointer dummy2, GtkWidget * searchButton) | |||
1164 | &iter)) | 1165 | &iter)) |
1165 | { | 1166 | { |
1166 | char *descStr; | 1167 | char *descStr; |
1167 | char *ns; | 1168 | char *nsName; |
1168 | 1169 | ||
1169 | ns = NULL; | 1170 | nsName = NULL; |
1170 | descStr = NULL; | 1171 | descStr = NULL; |
1171 | gtk_tree_model_get (gtk_combo_box_get_model | 1172 | gtk_tree_model_get (gtk_combo_box_get_model |
1172 | (GTK_COMBO_BOX (searchNamespaceGtkCB)), &iter, | 1173 | (GTK_COMBO_BOX (searchNamespaceGtkCB)), &iter, |
1173 | NS_SEARCH_DESCRIPTION, &descStr, NS_SEARCH_ENCNAME, | 1174 | NS_SEARCH_DESCRIPTION, &descStr, NS_SEARCH_NAME, |
1174 | &ns, -1); | 1175 | &nsName, -1); |
1175 | 1176 | ||
1176 | if ((descStr != NULL) && (0 == strcmp (descStr, _("globally")))) | 1177 | if ((descStr != NULL) && (0 == strcmp (descStr, ""))) |
1177 | { | 1178 | { |
1178 | ns = NULL; | 1179 | nsName = NULL; |
1179 | } | 1180 | } |
1180 | else | 1181 | else |
1181 | { | 1182 | { |
1182 | if ((descStr == NULL) && (ns != NULL)) | 1183 | if ((descStr == NULL) && (nsName != NULL)) |
1183 | descStr = GNUNET_strdup (ns); | 1184 | descStr = GNUNET_strdup (nsName); |
1184 | } | 1185 | } |
1185 | if (ns != NULL) | 1186 | if (nsName != NULL) |
1186 | { | 1187 | { |
1187 | char *ustring; | 1188 | char *ustring; |
1189 | GNUNET_EncName enc; | ||
1190 | GNUNET_HashCode nsid; | ||
1191 | |||
1192 | GNUNET_GE_ASSERT(NULL, | ||
1193 | GNUNET_OK == | ||
1194 | GNUNET_pseudonym_name_to_id(ectx, cfg, | ||
1195 | nsName, &nsid)); | ||
1196 | GNUNET_hash_to_enc(&nsid, &enc); | ||
1188 | 1197 | ||
1189 | ustring = | 1198 | ustring = |
1190 | GNUNET_malloc (strlen (searchString) + sizeof (GNUNET_EncName) + | 1199 | GNUNET_malloc (strlen (searchString) + sizeof (GNUNET_EncName) + |
@@ -1192,7 +1201,7 @@ on_fssearchbutton_clicked_fs (gpointer dummy2, GtkWidget * searchButton) | |||
1192 | strlen (GNUNET_ECRS_SUBSPACE_INFIX) + 10); | 1201 | strlen (GNUNET_ECRS_SUBSPACE_INFIX) + 10); |
1193 | strcpy (ustring, GNUNET_ECRS_URI_PREFIX); | 1202 | strcpy (ustring, GNUNET_ECRS_URI_PREFIX); |
1194 | strcat (ustring, GNUNET_ECRS_SUBSPACE_INFIX); | 1203 | strcat (ustring, GNUNET_ECRS_SUBSPACE_INFIX); |
1195 | strcat (ustring, ns); | 1204 | strcat (ustring, (const char*)&enc); |
1196 | strcat (ustring, "/"); | 1205 | strcat (ustring, "/"); |
1197 | strcat (ustring, searchString); | 1206 | strcat (ustring, searchString); |
1198 | fsss.uri = GNUNET_ECRS_string_to_uri (ectx, ustring); | 1207 | fsss.uri = GNUNET_ECRS_string_to_uri (ectx, ustring); |
@@ -1208,8 +1217,8 @@ on_fssearchbutton_clicked_fs (gpointer dummy2, GtkWidget * searchButton) | |||
1208 | } | 1217 | } |
1209 | if (descStr != NULL) | 1218 | if (descStr != NULL) |
1210 | free (descStr); | 1219 | free (descStr); |
1211 | if (ns != NULL) | 1220 | if (nsName != NULL) |
1212 | free (ns); | 1221 | free (nsName); |
1213 | } | 1222 | } |
1214 | if (fsss.uri == NULL) | 1223 | if (fsss.uri == NULL) |
1215 | fsss.uri = GNUNET_ECRS_keyword_string_to_uri (ectx, searchString); | 1224 | fsss.uri = GNUNET_ECRS_keyword_string_to_uri (ectx, searchString); |
diff --git a/src/plugins/fs/status.c b/src/plugins/fs/status.c new file mode 100644 index 00000000..1ce858d3 --- /dev/null +++ b/src/plugins/fs/status.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2007, 2008 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 2, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file src/plugins/fs/status.c | ||
23 | * @brief status codes for files | ||
24 | * @author Christian Grothoff | ||
25 | */ | ||
26 | |||
27 | #include "platform.h" | ||
28 | #include <GNUnet/gnunet_uritrack_lib.h> | ||
29 | #include "status.h" | ||
30 | |||
31 | |||
32 | |||
33 | const char * | ||
34 | getColorCode (enum GNUNET_URITRACK_STATE state) | ||
35 | { | ||
36 | if (state & (GNUNET_URITRACK_DIRECTORY_ADDED)) | ||
37 | return "blue"; | ||
38 | if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED)) | ||
39 | return "cyan"; | ||
40 | if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) && | ||
41 | (0 == (state & | ||
42 | (GNUNET_URITRACK_DOWNLOAD_COMPLETED | | ||
43 | GNUNET_URITRACK_DOWNLOAD_ABORTED)))) | ||
44 | return "yellow"; | ||
45 | if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED) | ||
46 | return "springgreen"; | ||
47 | if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED) | ||
48 | return "red"; | ||
49 | if (state & | ||
50 | (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND)) | ||
51 | return "gray"; | ||
52 | return NULL; | ||
53 | } | ||
54 | |||
55 | |||
56 | const char * | ||
57 | getStatusName (enum GNUNET_URITRACK_STATE state) | ||
58 | { | ||
59 | if (state & (GNUNET_URITRACK_DIRECTORY_ADDED)) | ||
60 | return _("added"); | ||
61 | if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED)) | ||
62 | return _("shared"); | ||
63 | if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) && | ||
64 | (0 == (state & | ||
65 | (GNUNET_URITRACK_DOWNLOAD_COMPLETED | | ||
66 | GNUNET_URITRACK_DOWNLOAD_ABORTED)))) | ||
67 | return _("started"); | ||
68 | if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED) | ||
69 | return _("completed"); | ||
70 | if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED) | ||
71 | return _("aborted"); | ||
72 | if (state & | ||
73 | (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND)) | ||
74 | return ""; | ||
75 | return ""; | ||
76 | } | ||
77 | |||
78 | |||
79 | /* end of status.c */ | ||
diff --git a/src/plugins/fs/status.h b/src/plugins/fs/status.h new file mode 100644 index 00000000..b2db5f4f --- /dev/null +++ b/src/plugins/fs/status.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2007, 2008 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 2, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file src/plugins/fs/status.h | ||
23 | * @brief status codes for files | ||
24 | * @author Christian Grothoff | ||
25 | */ | ||
26 | |||
27 | #ifndef FS_STATUS_H | ||
28 | #define FS_STATUS_H | ||
29 | |||
30 | #include "platform.h" | ||
31 | #include <GNUnet/gnunet_uritrack_lib.h> | ||
32 | #include "status.h" | ||
33 | |||
34 | const char *getColorCode (enum GNUNET_URITRACK_STATE state); | ||
35 | |||
36 | const char *getStatusName (enum GNUNET_URITRACK_STATE state); | ||
37 | |||
38 | #endif | ||
diff --git a/src/plugins/stats/functions.c b/src/plugins/stats/functions.c index 79145fb6..4c179dd0 100644 --- a/src/plugins/stats/functions.c +++ b/src/plugins/stats/functions.c | |||
@@ -478,12 +478,18 @@ statsProcessor (const char *optName, unsigned long long value, void *data) | |||
478 | return GNUNET_OK; | 478 | return GNUNET_OK; |
479 | } | 479 | } |
480 | 480 | ||
481 | struct UpdateClosure { | ||
482 | GNUNET_CronTime delta; | ||
483 | int is_running; | ||
484 | }; | ||
485 | |||
481 | /* | 486 | /* |
482 | * Update the status bar indicator about daemon and connexions status | 487 | * Update the status bar indicator about daemon and connexions status |
483 | */ | 488 | */ |
484 | static void * | 489 | static void * |
485 | updateDaemonStatus (void *delta) | 490 | updateDaemonStatus (void *cls) |
486 | { | 491 | { |
492 | struct UpdateClosure * uc = cls; | ||
487 | static gboolean once = TRUE; | 493 | static gboolean once = TRUE; |
488 | static int last_status = -5; | 494 | static int last_status = -5; |
489 | unsigned long long connected_peers; | 495 | unsigned long long connected_peers; |
@@ -567,10 +573,10 @@ updateDaemonStatus (void *delta) | |||
567 | 573 | ||
568 | once = FALSE; | 574 | once = FALSE; |
569 | } | 575 | } |
570 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) | 576 | if (uc->is_running) |
571 | { | 577 | { |
572 | if (GNUNET_OK != | 578 | if (GNUNET_OK != |
573 | getStatValue (&connected_peers, (GNUNET_CronTime *) delta, NULL, | 579 | getStatValue (&connected_peers, NULL, NULL, |
574 | "# of connected peers", GNUNET_NO)) | 580 | "# of connected peers", GNUNET_NO)) |
575 | { | 581 | { |
576 | if (last_status != -1) | 582 | if (last_status != -1) |
@@ -665,15 +671,16 @@ updateStatValues (void *unused) | |||
665 | { | 671 | { |
666 | static GNUNET_CronTime lastUpdate; | 672 | static GNUNET_CronTime lastUpdate; |
667 | GNUNET_CronTime now; | 673 | GNUNET_CronTime now; |
668 | GNUNET_CronTime delta; | 674 | struct UpdateClosure uc; |
669 | 675 | ||
670 | now = GNUNET_get_time (); | 676 | now = GNUNET_get_time (); |
671 | delta = now - lastUpdate; | 677 | uc.delta = now - lastUpdate; |
678 | uc.is_running = GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg); | ||
672 | GNUNET_mutex_lock (lock); | 679 | GNUNET_mutex_lock (lock); |
673 | if (GNUNET_OK == | 680 | if (GNUNET_OK == |
674 | GNUNET_STATS_get_statistics (ectx, sock, &statsProcessor, &delta)) | 681 | GNUNET_STATS_get_statistics (ectx, sock, &statsProcessor, &uc.delta)) |
675 | lastUpdate = now; | 682 | lastUpdate = now; |
676 | GNUNET_GTK_save_call (&updateDaemonStatus, (void *) &delta); | 683 | GNUNET_GTK_save_call (&updateDaemonStatus, (void *) &uc); |
677 | GNUNET_mutex_unlock (lock); | 684 | GNUNET_mutex_unlock (lock); |
678 | } | 685 | } |
679 | 686 | ||