diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-02-23 04:26:44 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-02-23 04:26:44 +0000 |
commit | f77a59a6035c7ca0950410a156aee92973b83874 (patch) | |
tree | 7e34c11980da37b9b282a37915eeafa9c7be8178 | |
parent | 2aad24335dba7ad1be68a523dd446ebf6c75e5b4 (diff) | |
download | gnunet-gtk-f77a59a6035c7ca0950410a156aee92973b83874.tar.gz gnunet-gtk-f77a59a6035c7ca0950410a156aee92973b83874.zip |
cleaner pause resume, hiding confusing abort button
-rw-r--r-- | TODO | 17 | ||||
-rw-r--r-- | gnunet-gtk.glade | 643 | ||||
-rw-r--r-- | src/common/helper.c | 117 | ||||
-rw-r--r-- | src/core/eggtrayicon.c | 37 | ||||
-rw-r--r-- | src/core/main.c | 4 | ||||
-rw-r--r-- | src/include/gnunetgtk_common.h | 3 | ||||
-rw-r--r-- | src/plugins/daemon/daemon.c | 119 | ||||
-rw-r--r-- | src/plugins/fs/extensions/musicinsert.c | 28 | ||||
-rw-r--r-- | src/plugins/fs/fs.c | 6 | ||||
-rw-r--r-- | src/plugins/fs/fs.h | 10 | ||||
-rw-r--r-- | src/plugins/fs/meta.c | 2 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 120 | ||||
-rw-r--r-- | src/plugins/fs/search.h | 12 | ||||
-rw-r--r-- | src/plugins/fs/upload.c | 12 | ||||
-rw-r--r-- | src/plugins/peers/peers.c | 2 | ||||
-rw-r--r-- | src/plugins/stats/functions.c | 178 | ||||
-rw-r--r-- | src/plugins/stats/statistics.c | 5 |
17 files changed, 677 insertions, 638 deletions
@@ -5,6 +5,23 @@ Annotations: | |||
5 | 5 | ||
6 | 6 | ||
7 | 0.7.4 (goal: polish): | 7 | 0.7.4 (goal: polish): |
8 | - CRASH: | ||
9 | (gdb) ba | ||
10 | #0 0xb73d3057 in adns__internal_check () from /usr/lib/libadns.so.1 | ||
11 | #1 0xb73d33a9 in adns_check () from /usr/lib/libadns.so.1 | ||
12 | #2 0xb78937ba in cache_resolve (cache=0x844bf90) at dns.c:89 | ||
13 | #3 0xb7893dc2 in GNUNET_get_ip_as_string (sav=0x84518b4, salen=16, do_resolve=1) at dns.c:256 | ||
14 | #4 0xb6ec3714 in collector (data=0x83e9640, identity=0x8451868, address=0x84518b4, | ||
15 | addr_len=16, last_message=0, trust=59, bpmFromPeer=0) at peers.c:115 | ||
16 | #5 0xb6e4c177 in GNUNET_IDENTITY_request_peer_infos (sock=0x844a478, | ||
17 | callback=0xb6ec34fc <collector>, cls=0x83e9640) at clientapi.c:216 | ||
18 | #6 0xb6ec3db1 in getPeerModel () at peers.c:227 | ||
19 | #7 0xb6ec3f02 in updatePeerInfo (dummy=0x0) at peers.c:268 | ||
20 | #8 0xb7884ec3 in runJob (cron=0x806cf08) at cron.c:529 | ||
21 | #9 0xb7884fad in cron_main_method (ctx=0x806cf08) at cron.c:569 | ||
22 | #10 0xb76b2383 in start_thread () from /lib/libpthread.so.0 | ||
23 | #11 0xb763673e in clone () from /lib/libc.so.6 | ||
24 | |||
8 | - #1045: ability to pause a search => requires FSUI changes! [RC] | 25 | - #1045: ability to pause a search => requires FSUI changes! [RC] |
9 | - improve collection handling [RC] | 26 | - improve collection handling [RC] |
10 | + show content of current collection somewhere | 27 | + show content of current collection somewhere |
diff --git a/gnunet-gtk.glade b/gnunet-gtk.glade index 5b685e76..008be30d 100644 --- a/gnunet-gtk.glade +++ b/gnunet-gtk.glade | |||
@@ -678,107 +678,6 @@ This release fixes downloads of files from directories. The previous version ha | |||
678 | <placeholder/> | 678 | <placeholder/> |
679 | </child> | 679 | </child> |
680 | <child> | 680 | <child> |
681 | <widget class="GtkVBox" id="vbox8"> | ||
682 | <property name="visible">True</property> | ||
683 | <property name="homogeneous">True</property> | ||
684 | <child> | ||
685 | <widget class="GtkButton" id="abortDownloadButton"> | ||
686 | <property name="visible">True</property> | ||
687 | <property name="sensitive">False</property> | ||
688 | <property name="can_focus">True</property> | ||
689 | <property name="tooltip" translatable="yes">Cancel the selected download (and all sub-downloads)</property> | ||
690 | <property name="label">gtk-cancel</property> | ||
691 | <property name="use_stock">True</property> | ||
692 | <property name="response_id">0</property> | ||
693 | <signal name="clicked" handler="on_abortDownloadButton_clicked_"/> | ||
694 | </widget> | ||
695 | <packing> | ||
696 | <property name="fill">False</property> | ||
697 | </packing> | ||
698 | </child> | ||
699 | <child> | ||
700 | <widget class="GtkButton" id="stopDownloadButton"> | ||
701 | <property name="visible">True</property> | ||
702 | <property name="sensitive">False</property> | ||
703 | <property name="can_focus">True</property> | ||
704 | <property name="tooltip" translatable="yes">Cancel the selected download (and all sub-downloads) and remove them from the list</property> | ||
705 | <property name="label">gtk-stop</property> | ||
706 | <property name="use_stock">True</property> | ||
707 | <property name="response_id">0</property> | ||
708 | <signal name="clicked" handler="on_stopDownloadButton_clicked_"/> | ||
709 | </widget> | ||
710 | <packing> | ||
711 | <property name="fill">False</property> | ||
712 | <property name="position">1</property> | ||
713 | </packing> | ||
714 | </child> | ||
715 | <child> | ||
716 | <widget class="GtkButton" id="clearCompletedDownloadsButton"> | ||
717 | <property name="visible">True</property> | ||
718 | <property name="can_focus">True</property> | ||
719 | <property name="tooltip" translatable="yes">Clear completed downloads from the download list</property> | ||
720 | <property name="response_id">0</property> | ||
721 | <signal name="clicked" handler="on_clearCompletedDownloadsButton_clicked_"/> | ||
722 | <child> | ||
723 | <widget class="GtkHBox" id="hbox26"> | ||
724 | <property name="visible">True</property> | ||
725 | <property name="spacing">2</property> | ||
726 | <child> | ||
727 | <widget class="GtkImage" id="image15"> | ||
728 | <property name="visible">True</property> | ||
729 | <property name="stock">gtk-clear</property> | ||
730 | </widget> | ||
731 | <packing> | ||
732 | <property name="expand">False</property> | ||
733 | <property name="fill">False</property> | ||
734 | </packing> | ||
735 | </child> | ||
736 | <child> | ||
737 | <widget class="GtkLabel" id="label14"> | ||
738 | <property name="visible">True</property> | ||
739 | <property name="label" translatable="yes">_Clean</property> | ||
740 | <property name="use_underline">True</property> | ||
741 | </widget> | ||
742 | <packing> | ||
743 | <property name="expand">False</property> | ||
744 | <property name="fill">False</property> | ||
745 | <property name="position">1</property> | ||
746 | </packing> | ||
747 | </child> | ||
748 | </widget> | ||
749 | </child> | ||
750 | </widget> | ||
751 | <packing> | ||
752 | <property name="fill">False</property> | ||
753 | <property name="position">2</property> | ||
754 | </packing> | ||
755 | </child> | ||
756 | </widget> | ||
757 | <packing> | ||
758 | <property name="left_attach">1</property> | ||
759 | <property name="right_attach">2</property> | ||
760 | <property name="x_options"></property> | ||
761 | <property name="x_padding">5</property> | ||
762 | </packing> | ||
763 | </child> | ||
764 | <child> | ||
765 | <widget class="GtkScrolledWindow" id="scrolledwindow10"> | ||
766 | <property name="visible">True</property> | ||
767 | <property name="can_focus">True</property> | ||
768 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
769 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
770 | <property name="shadow_type">GTK_SHADOW_IN</property> | ||
771 | <child> | ||
772 | <widget class="GtkTreeView" id="activeDownloadsList"> | ||
773 | <property name="visible">True</property> | ||
774 | <property name="can_focus">True</property> | ||
775 | <property name="reorderable">True</property> | ||
776 | <property name="rules_hint">True</property> | ||
777 | </widget> | ||
778 | </child> | ||
779 | </widget> | ||
780 | </child> | ||
781 | <child> | ||
782 | <widget class="GtkHBox" id="hbox24"> | 681 | <widget class="GtkHBox" id="hbox24"> |
783 | <property name="visible">True</property> | 682 | <property name="visible">True</property> |
784 | <child> | 683 | <child> |
@@ -893,6 +792,107 @@ This release fixes downloads of files from directories. The previous version ha | |||
893 | <property name="y_padding">5</property> | 792 | <property name="y_padding">5</property> |
894 | </packing> | 793 | </packing> |
895 | </child> | 794 | </child> |
795 | <child> | ||
796 | <widget class="GtkScrolledWindow" id="scrolledwindow10"> | ||
797 | <property name="visible">True</property> | ||
798 | <property name="can_focus">True</property> | ||
799 | <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
800 | <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> | ||
801 | <property name="shadow_type">GTK_SHADOW_IN</property> | ||
802 | <child> | ||
803 | <widget class="GtkTreeView" id="activeDownloadsList"> | ||
804 | <property name="visible">True</property> | ||
805 | <property name="can_focus">True</property> | ||
806 | <property name="reorderable">True</property> | ||
807 | <property name="rules_hint">True</property> | ||
808 | </widget> | ||
809 | </child> | ||
810 | </widget> | ||
811 | </child> | ||
812 | <child> | ||
813 | <widget class="GtkVBox" id="vbox8"> | ||
814 | <property name="visible">True</property> | ||
815 | <property name="homogeneous">True</property> | ||
816 | <child> | ||
817 | <widget class="GtkButton" id="abortDownloadButton"> | ||
818 | <property name="visible">True</property> | ||
819 | <property name="sensitive">False</property> | ||
820 | <property name="can_focus">True</property> | ||
821 | <property name="tooltip" translatable="yes">Cancel the selected download (and all sub-downloads)</property> | ||
822 | <property name="label">gtk-cancel</property> | ||
823 | <property name="use_stock">True</property> | ||
824 | <property name="response_id">0</property> | ||
825 | <signal name="clicked" handler="on_abortDownloadButton_clicked_"/> | ||
826 | </widget> | ||
827 | <packing> | ||
828 | <property name="fill">False</property> | ||
829 | </packing> | ||
830 | </child> | ||
831 | <child> | ||
832 | <widget class="GtkButton" id="stopDownloadButton"> | ||
833 | <property name="visible">True</property> | ||
834 | <property name="sensitive">False</property> | ||
835 | <property name="can_focus">True</property> | ||
836 | <property name="tooltip" translatable="yes">Cancel the selected download (and all sub-downloads) and remove them from the list</property> | ||
837 | <property name="label">gtk-stop</property> | ||
838 | <property name="use_stock">True</property> | ||
839 | <property name="response_id">0</property> | ||
840 | <signal name="clicked" handler="on_stopDownloadButton_clicked_"/> | ||
841 | </widget> | ||
842 | <packing> | ||
843 | <property name="fill">False</property> | ||
844 | <property name="position">1</property> | ||
845 | </packing> | ||
846 | </child> | ||
847 | <child> | ||
848 | <widget class="GtkButton" id="clearCompletedDownloadsButton"> | ||
849 | <property name="visible">True</property> | ||
850 | <property name="can_focus">True</property> | ||
851 | <property name="tooltip" translatable="yes">Clear completed downloads from the download list</property> | ||
852 | <property name="response_id">0</property> | ||
853 | <signal name="clicked" handler="on_clearCompletedDownloadsButton_clicked_"/> | ||
854 | <child> | ||
855 | <widget class="GtkHBox" id="hbox26"> | ||
856 | <property name="visible">True</property> | ||
857 | <property name="spacing">2</property> | ||
858 | <child> | ||
859 | <widget class="GtkImage" id="image15"> | ||
860 | <property name="visible">True</property> | ||
861 | <property name="stock">gtk-clear</property> | ||
862 | </widget> | ||
863 | <packing> | ||
864 | <property name="expand">False</property> | ||
865 | <property name="fill">False</property> | ||
866 | </packing> | ||
867 | </child> | ||
868 | <child> | ||
869 | <widget class="GtkLabel" id="label14"> | ||
870 | <property name="visible">True</property> | ||
871 | <property name="label" translatable="yes">_Clean</property> | ||
872 | <property name="use_underline">True</property> | ||
873 | </widget> | ||
874 | <packing> | ||
875 | <property name="expand">False</property> | ||
876 | <property name="fill">False</property> | ||
877 | <property name="position">1</property> | ||
878 | </packing> | ||
879 | </child> | ||
880 | </widget> | ||
881 | </child> | ||
882 | </widget> | ||
883 | <packing> | ||
884 | <property name="fill">False</property> | ||
885 | <property name="position">2</property> | ||
886 | </packing> | ||
887 | </child> | ||
888 | </widget> | ||
889 | <packing> | ||
890 | <property name="left_attach">1</property> | ||
891 | <property name="right_attach">2</property> | ||
892 | <property name="x_options"></property> | ||
893 | <property name="x_padding">5</property> | ||
894 | </packing> | ||
895 | </child> | ||
896 | </widget> | 896 | </widget> |
897 | </child> | 897 | </child> |
898 | <child> | 898 | <child> |
@@ -1329,121 +1329,241 @@ This release fixes downloads of files from directories. The previous version ha | |||
1329 | <placeholder/> | 1329 | <placeholder/> |
1330 | </child> | 1330 | </child> |
1331 | <child> | 1331 | <child> |
1332 | <widget class="GtkLabel" id="methodLabel"> | 1332 | <widget class="GtkCheckButton" id="doExtractCheckButton"> |
1333 | <property name="visible">True</property> | 1333 | <property name="visible">True</property> |
1334 | <property name="xalign">0</property> | 1334 | <property name="can_focus">True</property> |
1335 | <property name="xpad">5</property> | 1335 | <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> |
1336 | <property name="label" translatable="yes">Method:</property> | 1336 | <property name="response_id">0</property> |
1337 | <property name="use_underline">True</property> | 1337 | <property name="active">True</property> |
1338 | <property name="mnemonic_widget">indexbutton</property> | 1338 | <property name="draw_indicator">True</property> |
1339 | <child> | ||
1340 | <widget class="GtkAlignment" id="alignment24"> | ||
1341 | <property name="visible">True</property> | ||
1342 | <property name="xscale">0</property> | ||
1343 | <property name="yscale">0</property> | ||
1344 | <child> | ||
1345 | <widget class="GtkHBox" id="hbox66"> | ||
1346 | <property name="visible">True</property> | ||
1347 | <property name="spacing">2</property> | ||
1348 | <child> | ||
1349 | <widget class="GtkImage" id="image49"> | ||
1350 | <property name="visible">True</property> | ||
1351 | <property name="stock">gtk-index</property> | ||
1352 | </widget> | ||
1353 | <packing> | ||
1354 | <property name="expand">False</property> | ||
1355 | <property name="fill">False</property> | ||
1356 | </packing> | ||
1357 | </child> | ||
1358 | <child> | ||
1359 | <widget class="GtkLabel" id="label151"> | ||
1360 | <property name="visible">True</property> | ||
1361 | <property name="label" translatable="yes">Use libextractor for files in directories</property> | ||
1362 | <property name="use_underline">True</property> | ||
1363 | </widget> | ||
1364 | <packing> | ||
1365 | <property name="expand">False</property> | ||
1366 | <property name="fill">False</property> | ||
1367 | <property name="position">1</property> | ||
1368 | </packing> | ||
1369 | </child> | ||
1370 | </widget> | ||
1371 | </child> | ||
1372 | </widget> | ||
1373 | </child> | ||
1339 | </widget> | 1374 | </widget> |
1340 | <packing> | 1375 | <packing> |
1376 | <property name="left_attach">2</property> | ||
1377 | <property name="right_attach">3</property> | ||
1378 | <property name="top_attach">3</property> | ||
1379 | <property name="bottom_attach">4</property> | ||
1341 | <property name="x_options">GTK_FILL</property> | 1380 | <property name="x_options">GTK_FILL</property> |
1342 | <property name="y_options"></property> | 1381 | <property name="y_options"></property> |
1343 | </packing> | 1382 | </packing> |
1344 | </child> | 1383 | </child> |
1345 | <child> | 1384 | <child> |
1346 | <widget class="GtkRadioButton" id="indexbutton"> | 1385 | <widget class="GtkSpinButton" id="contentPrioritySpinButton"> |
1386 | <property name="width_request">94</property> | ||
1347 | <property name="visible">True</property> | 1387 | <property name="visible">True</property> |
1348 | <property name="can_focus">True</property> | 1388 | <property name="can_focus">True</property> |
1349 | <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> | 1389 | <property name="tooltip" translatable="yes">How important is the file (used to prioritize data in the local datastore).</property> |
1350 | <property name="label" translatable="yes">Inde_x</property> | 1390 | <property name="adjustment">1000 0 100000000 50 500 500</property> |
1391 | <property name="climb_rate">500</property> | ||
1392 | <property name="numeric">True</property> | ||
1393 | </widget> | ||
1394 | <packing> | ||
1395 | <property name="left_attach">1</property> | ||
1396 | <property name="right_attach">2</property> | ||
1397 | <property name="top_attach">3</property> | ||
1398 | <property name="bottom_attach">4</property> | ||
1399 | <property name="x_options">GTK_FILL</property> | ||
1400 | <property name="y_options"></property> | ||
1401 | </packing> | ||
1402 | </child> | ||
1403 | <child> | ||
1404 | <widget class="GtkRadioButton" id="scopeFileOnlyButton"> | ||
1405 | <property name="visible">True</property> | ||
1406 | <property name="can_focus">True</property> | ||
1407 | <property name="tooltip" translatable="yes">Only publish a single file</property> | ||
1408 | <property name="label" translatable="yes">File onl_y</property> | ||
1351 | <property name="use_underline">True</property> | 1409 | <property name="use_underline">True</property> |
1352 | <property name="response_id">0</property> | 1410 | <property name="response_id">0</property> |
1353 | <property name="active">True</property> | 1411 | <property name="active">True</property> |
1354 | <property name="draw_indicator">True</property> | 1412 | <property name="draw_indicator">True</property> |
1413 | <property name="group">scopeRecursiveButton</property> | ||
1355 | </widget> | 1414 | </widget> |
1356 | <packing> | 1415 | <packing> |
1357 | <property name="left_attach">1</property> | 1416 | <property name="left_attach">1</property> |
1358 | <property name="right_attach">2</property> | 1417 | <property name="right_attach">2</property> |
1418 | <property name="top_attach">1</property> | ||
1419 | <property name="bottom_attach">2</property> | ||
1359 | <property name="x_options">GTK_FILL</property> | 1420 | <property name="x_options">GTK_FILL</property> |
1360 | <property name="y_options"></property> | 1421 | <property name="y_options"></property> |
1361 | </packing> | 1422 | </packing> |
1362 | </child> | 1423 | </child> |
1363 | <child> | 1424 | <child> |
1364 | <widget class="GtkRadioButton" id="insertButton"> | 1425 | <widget class="GtkButton" id="mainFileSharingInsertBrowseButton"> |
1365 | <property name="visible">True</property> | 1426 | <property name="visible">True</property> |
1366 | <property name="can_focus">True</property> | 1427 | <property name="can_focus">True</property> |
1367 | <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> | 1428 | <property name="tooltip" translatable="yes">Browse local computer for files (or directories) to publish</property> |
1368 | <property name="label" translatable="yes">I_nsert</property> | ||
1369 | <property name="use_underline">True</property> | ||
1370 | <property name="response_id">0</property> | 1429 | <property name="response_id">0</property> |
1371 | <property name="draw_indicator">True</property> | 1430 | <signal name="clicked" handler="on_mainFileSharingInsertBrowseButton_clicked_" object="fsinsertfilenamecombo"/> |
1372 | <property name="group">indexbutton</property> | 1431 | <child> |
1432 | <widget class="GtkHBox" id="hbox60"> | ||
1433 | <property name="visible">True</property> | ||
1434 | <property name="spacing">2</property> | ||
1435 | <child> | ||
1436 | <widget class="GtkImage" id="image46"> | ||
1437 | <property name="visible">True</property> | ||
1438 | <property name="stock">gtk-open</property> | ||
1439 | </widget> | ||
1440 | <packing> | ||
1441 | <property name="expand">False</property> | ||
1442 | <property name="fill">False</property> | ||
1443 | </packing> | ||
1444 | </child> | ||
1445 | <child> | ||
1446 | <widget class="GtkLabel" id="label143"> | ||
1447 | <property name="visible">True</property> | ||
1448 | <property name="label" translatable="yes">_Browse</property> | ||
1449 | <property name="use_underline">True</property> | ||
1450 | </widget> | ||
1451 | <packing> | ||
1452 | <property name="expand">False</property> | ||
1453 | <property name="fill">False</property> | ||
1454 | <property name="position">1</property> | ||
1455 | </packing> | ||
1456 | </child> | ||
1457 | </widget> | ||
1458 | </child> | ||
1373 | </widget> | 1459 | </widget> |
1374 | <packing> | 1460 | <packing> |
1375 | <property name="left_attach">2</property> | 1461 | <property name="left_attach">2</property> |
1376 | <property name="right_attach">3</property> | 1462 | <property name="right_attach">3</property> |
1463 | <property name="top_attach">4</property> | ||
1464 | <property name="bottom_attach">5</property> | ||
1377 | <property name="x_options">GTK_FILL</property> | 1465 | <property name="x_options">GTK_FILL</property> |
1378 | <property name="y_options"></property> | 1466 | <property name="y_options"></property> |
1379 | </packing> | 1467 | </packing> |
1380 | </child> | 1468 | </child> |
1381 | <child> | 1469 | <child> |
1382 | <widget class="GtkLabel" id="scopeLabel"> | 1470 | <widget class="GtkAlignment" id="uploadFilenameAlignment"> |
1383 | <property name="visible">True</property> | 1471 | <property name="visible">True</property> |
1384 | <property name="xalign">0</property> | 1472 | <child> |
1385 | <property name="xpad">5</property> | 1473 | <widget class="GtkComboBoxEntry" id="uploadFilenameComboBoxEntry"> |
1386 | <property name="label" translatable="yes">Scope:</property> | 1474 | <property name="visible">True</property> |
1387 | <property name="use_underline">True</property> | 1475 | <property name="can_focus">True</property> |
1388 | <property name="mnemonic_widget">scopeFileOnlyButton</property> | 1476 | <signal name="changed" handler="on_uploadFilenameComboBoxEntry_changed_"/> |
1477 | <child internal-child="entry"> | ||
1478 | <widget class="GtkEntry" id="comboboxentry-entry3"> | ||
1479 | </widget> | ||
1480 | </child> | ||
1481 | </widget> | ||
1482 | </child> | ||
1389 | </widget> | 1483 | </widget> |
1390 | <packing> | 1484 | <packing> |
1391 | <property name="top_attach">1</property> | 1485 | <property name="left_attach">1</property> |
1392 | <property name="bottom_attach">2</property> | 1486 | <property name="right_attach">2</property> |
1393 | <property name="x_options">GTK_FILL</property> | 1487 | <property name="top_attach">4</property> |
1488 | <property name="bottom_attach">5</property> | ||
1394 | <property name="y_options"></property> | 1489 | <property name="y_options"></property> |
1395 | </packing> | 1490 | </packing> |
1396 | </child> | 1491 | </child> |
1397 | <child> | 1492 | <child> |
1398 | <widget class="GtkLabel" id="anonymityUploadLabel"> | 1493 | <widget class="GtkLabel" id="label150"> |
1399 | <property name="visible">True</property> | 1494 | <property name="visible">True</property> |
1400 | <property name="xalign">0</property> | 1495 | <property name="xalign">0</property> |
1401 | <property name="xpad">5</property> | 1496 | <property name="xpad">5</property> |
1402 | <property name="label" translatable="yes">_Anonymity:</property> | 1497 | <property name="label" translatable="yes">_Priority:</property> |
1403 | <property name="use_underline">True</property> | 1498 | <property name="use_underline">True</property> |
1404 | <property name="mnemonic_widget">uploadAnonymityLevelSpinButton</property> | 1499 | <property name="mnemonic_widget">contentPrioritySpinButton</property> |
1405 | </widget> | 1500 | </widget> |
1406 | <packing> | 1501 | <packing> |
1407 | <property name="top_attach">2</property> | 1502 | <property name="top_attach">3</property> |
1408 | <property name="bottom_attach">3</property> | 1503 | <property name="bottom_attach">4</property> |
1409 | <property name="x_options">GTK_FILL</property> | 1504 | <property name="x_options">GTK_FILL</property> |
1410 | <property name="y_options"></property> | 1505 | <property name="y_options"></property> |
1411 | </packing> | 1506 | </packing> |
1412 | </child> | 1507 | </child> |
1413 | <child> | 1508 | <child> |
1414 | <widget class="GtkRadioButton" id="scopeRecursiveButton"> | 1509 | <widget class="GtkLabel" id="uploadFilenameLabel"> |
1415 | <property name="visible">True</property> | 1510 | <property name="visible">True</property> |
1416 | <property name="can_focus">True</property> | 1511 | <property name="xalign">0</property> |
1417 | <property name="tooltip" translatable="yes">Recursively publish an entire directory tree</property> | 1512 | <property name="xpad">5</property> |
1418 | <property name="label" translatable="yes">_Recursive (for entire directories)</property> | 1513 | <property name="label" translatable="yes">_Filename:</property> |
1419 | <property name="use_underline">True</property> | 1514 | <property name="use_underline">True</property> |
1420 | <property name="response_id">0</property> | 1515 | <property name="justify">GTK_JUSTIFY_CENTER</property> |
1421 | <property name="draw_indicator">True</property> | 1516 | <property name="mnemonic_widget">uploadFilenameComboBoxEntry</property> |
1422 | </widget> | 1517 | </widget> |
1423 | <packing> | 1518 | <packing> |
1424 | <property name="left_attach">2</property> | 1519 | <property name="top_attach">4</property> |
1425 | <property name="right_attach">3</property> | 1520 | <property name="bottom_attach">5</property> |
1426 | <property name="top_attach">1</property> | ||
1427 | <property name="bottom_attach">2</property> | ||
1428 | <property name="x_options">GTK_FILL</property> | 1521 | <property name="x_options">GTK_FILL</property> |
1429 | <property name="y_options"></property> | 1522 | <property name="y_options"></property> |
1430 | </packing> | 1523 | </packing> |
1431 | </child> | 1524 | </child> |
1432 | <child> | 1525 | <child> |
1433 | <widget class="GtkSpinButton" id="uploadAnonymityLevelSpinButton"> | 1526 | <widget class="GtkButton" id="fsinsertuploadbutton"> |
1434 | <property name="visible">True</property> | 1527 | <property name="visible">True</property> |
1528 | <property name="sensitive">False</property> | ||
1435 | <property name="can_focus">True</property> | 1529 | <property name="can_focus">True</property> |
1436 | <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> | 1530 | <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> |
1437 | <property name="adjustment">1 0 10000 1 10 10</property> | 1531 | <property name="response_id">0</property> |
1438 | <property name="climb_rate">1</property> | 1532 | <signal name="clicked" handler="on_fsinsertuploadbutton_clicked_"/> |
1439 | <property name="numeric">True</property> | 1533 | <child> |
1440 | <signal name="value_changed" handler="on_anonymity_spin_changed_"/> | 1534 | <widget class="GtkHBox" id="hbox55"> |
1535 | <property name="visible">True</property> | ||
1536 | <property name="spacing">2</property> | ||
1537 | <child> | ||
1538 | <widget class="GtkImage" id="image42"> | ||
1539 | <property name="visible">True</property> | ||
1540 | <property name="stock">gtk-go-up</property> | ||
1541 | </widget> | ||
1542 | <packing> | ||
1543 | <property name="expand">False</property> | ||
1544 | <property name="fill">False</property> | ||
1545 | </packing> | ||
1546 | </child> | ||
1547 | <child> | ||
1548 | <widget class="GtkLabel" id="label137"> | ||
1549 | <property name="visible">True</property> | ||
1550 | <property name="label" translatable="yes">Pub_lish</property> | ||
1551 | <property name="use_underline">True</property> | ||
1552 | </widget> | ||
1553 | <packing> | ||
1554 | <property name="expand">False</property> | ||
1555 | <property name="fill">False</property> | ||
1556 | <property name="position">1</property> | ||
1557 | </packing> | ||
1558 | </child> | ||
1559 | </widget> | ||
1560 | </child> | ||
1441 | </widget> | 1561 | </widget> |
1442 | <packing> | 1562 | <packing> |
1443 | <property name="left_attach">1</property> | 1563 | <property name="left_attach">2</property> |
1444 | <property name="right_attach">2</property> | 1564 | <property name="right_attach">3</property> |
1445 | <property name="top_attach">2</property> | 1565 | <property name="top_attach">5</property> |
1446 | <property name="bottom_attach">3</property> | 1566 | <property name="bottom_attach">6</property> |
1447 | <property name="x_options">GTK_FILL</property> | 1567 | <property name="x_options">GTK_FILL</property> |
1448 | <property name="y_options"></property> | 1568 | <property name="y_options"></property> |
1449 | </packing> | 1569 | </packing> |
@@ -1502,241 +1622,121 @@ This release fixes downloads of files from directories. The previous version ha | |||
1502 | </packing> | 1622 | </packing> |
1503 | </child> | 1623 | </child> |
1504 | <child> | 1624 | <child> |
1505 | <widget class="GtkButton" id="fsinsertuploadbutton"> | 1625 | <widget class="GtkSpinButton" id="uploadAnonymityLevelSpinButton"> |
1506 | <property name="visible">True</property> | 1626 | <property name="visible">True</property> |
1507 | <property name="sensitive">False</property> | ||
1508 | <property name="can_focus">True</property> | 1627 | <property name="can_focus">True</property> |
1509 | <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> | 1628 | <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> |
1510 | <property name="response_id">0</property> | 1629 | <property name="adjustment">1 0 10000 1 10 10</property> |
1511 | <signal name="clicked" handler="on_fsinsertuploadbutton_clicked_"/> | 1630 | <property name="climb_rate">1</property> |
1512 | <child> | 1631 | <property name="numeric">True</property> |
1513 | <widget class="GtkHBox" id="hbox55"> | 1632 | <signal name="value_changed" handler="on_anonymity_spin_changed_"/> |
1514 | <property name="visible">True</property> | ||
1515 | <property name="spacing">2</property> | ||
1516 | <child> | ||
1517 | <widget class="GtkImage" id="image42"> | ||
1518 | <property name="visible">True</property> | ||
1519 | <property name="stock">gtk-go-up</property> | ||
1520 | </widget> | ||
1521 | <packing> | ||
1522 | <property name="expand">False</property> | ||
1523 | <property name="fill">False</property> | ||
1524 | </packing> | ||
1525 | </child> | ||
1526 | <child> | ||
1527 | <widget class="GtkLabel" id="label137"> | ||
1528 | <property name="visible">True</property> | ||
1529 | <property name="label" translatable="yes">Pub_lish</property> | ||
1530 | <property name="use_underline">True</property> | ||
1531 | </widget> | ||
1532 | <packing> | ||
1533 | <property name="expand">False</property> | ||
1534 | <property name="fill">False</property> | ||
1535 | <property name="position">1</property> | ||
1536 | </packing> | ||
1537 | </child> | ||
1538 | </widget> | ||
1539 | </child> | ||
1540 | </widget> | 1633 | </widget> |
1541 | <packing> | 1634 | <packing> |
1542 | <property name="left_attach">2</property> | 1635 | <property name="left_attach">1</property> |
1543 | <property name="right_attach">3</property> | 1636 | <property name="right_attach">2</property> |
1544 | <property name="top_attach">5</property> | 1637 | <property name="top_attach">2</property> |
1545 | <property name="bottom_attach">6</property> | 1638 | <property name="bottom_attach">3</property> |
1546 | <property name="x_options">GTK_FILL</property> | 1639 | <property name="x_options">GTK_FILL</property> |
1547 | <property name="y_options"></property> | 1640 | <property name="y_options"></property> |
1548 | </packing> | 1641 | </packing> |
1549 | </child> | 1642 | </child> |
1550 | <child> | 1643 | <child> |
1551 | <widget class="GtkLabel" id="uploadFilenameLabel"> | 1644 | <widget class="GtkRadioButton" id="scopeRecursiveButton"> |
1552 | <property name="visible">True</property> | 1645 | <property name="visible">True</property> |
1553 | <property name="xalign">0</property> | 1646 | <property name="can_focus">True</property> |
1554 | <property name="xpad">5</property> | 1647 | <property name="tooltip" translatable="yes">Recursively publish an entire directory tree</property> |
1555 | <property name="label" translatable="yes">_Filename:</property> | 1648 | <property name="label" translatable="yes">_Recursive (for entire directories)</property> |
1556 | <property name="use_underline">True</property> | 1649 | <property name="use_underline">True</property> |
1557 | <property name="justify">GTK_JUSTIFY_CENTER</property> | 1650 | <property name="response_id">0</property> |
1558 | <property name="mnemonic_widget">uploadFilenameComboBoxEntry</property> | 1651 | <property name="draw_indicator">True</property> |
1559 | </widget> | 1652 | </widget> |
1560 | <packing> | 1653 | <packing> |
1561 | <property name="top_attach">4</property> | 1654 | <property name="left_attach">2</property> |
1562 | <property name="bottom_attach">5</property> | 1655 | <property name="right_attach">3</property> |
1656 | <property name="top_attach">1</property> | ||
1657 | <property name="bottom_attach">2</property> | ||
1563 | <property name="x_options">GTK_FILL</property> | 1658 | <property name="x_options">GTK_FILL</property> |
1564 | <property name="y_options"></property> | 1659 | <property name="y_options"></property> |
1565 | </packing> | 1660 | </packing> |
1566 | </child> | 1661 | </child> |
1567 | <child> | 1662 | <child> |
1568 | <widget class="GtkLabel" id="label150"> | 1663 | <widget class="GtkLabel" id="anonymityUploadLabel"> |
1569 | <property name="visible">True</property> | 1664 | <property name="visible">True</property> |
1570 | <property name="xalign">0</property> | 1665 | <property name="xalign">0</property> |
1571 | <property name="xpad">5</property> | 1666 | <property name="xpad">5</property> |
1572 | <property name="label" translatable="yes">_Priority:</property> | 1667 | <property name="label" translatable="yes">_Anonymity:</property> |
1573 | <property name="use_underline">True</property> | 1668 | <property name="use_underline">True</property> |
1574 | <property name="mnemonic_widget">contentPrioritySpinButton</property> | 1669 | <property name="mnemonic_widget">uploadAnonymityLevelSpinButton</property> |
1575 | </widget> | 1670 | </widget> |
1576 | <packing> | 1671 | <packing> |
1577 | <property name="top_attach">3</property> | 1672 | <property name="top_attach">2</property> |
1578 | <property name="bottom_attach">4</property> | 1673 | <property name="bottom_attach">3</property> |
1579 | <property name="x_options">GTK_FILL</property> | 1674 | <property name="x_options">GTK_FILL</property> |
1580 | <property name="y_options"></property> | 1675 | <property name="y_options"></property> |
1581 | </packing> | 1676 | </packing> |
1582 | </child> | 1677 | </child> |
1583 | <child> | 1678 | <child> |
1584 | <widget class="GtkAlignment" id="uploadFilenameAlignment"> | 1679 | <widget class="GtkLabel" id="scopeLabel"> |
1585 | <property name="visible">True</property> | 1680 | <property name="visible">True</property> |
1586 | <child> | 1681 | <property name="xalign">0</property> |
1587 | <widget class="GtkComboBoxEntry" id="uploadFilenameComboBoxEntry"> | 1682 | <property name="xpad">5</property> |
1588 | <property name="visible">True</property> | 1683 | <property name="label" translatable="yes">Scope:</property> |
1589 | <property name="can_focus">True</property> | 1684 | <property name="use_underline">True</property> |
1590 | <signal name="changed" handler="on_uploadFilenameComboBoxEntry_changed_"/> | 1685 | <property name="mnemonic_widget">scopeFileOnlyButton</property> |
1591 | <child internal-child="entry"> | ||
1592 | <widget class="GtkEntry" id="comboboxentry-entry3"> | ||
1593 | </widget> | ||
1594 | </child> | ||
1595 | </widget> | ||
1596 | </child> | ||
1597 | </widget> | 1686 | </widget> |
1598 | <packing> | 1687 | <packing> |
1599 | <property name="left_attach">1</property> | 1688 | <property name="top_attach">1</property> |
1600 | <property name="right_attach">2</property> | 1689 | <property name="bottom_attach">2</property> |
1601 | <property name="top_attach">4</property> | 1690 | <property name="x_options">GTK_FILL</property> |
1602 | <property name="bottom_attach">5</property> | ||
1603 | <property name="y_options"></property> | 1691 | <property name="y_options"></property> |
1604 | </packing> | 1692 | </packing> |
1605 | </child> | 1693 | </child> |
1606 | <child> | 1694 | <child> |
1607 | <widget class="GtkButton" id="mainFileSharingInsertBrowseButton"> | 1695 | <widget class="GtkRadioButton" id="insertButton"> |
1608 | <property name="visible">True</property> | 1696 | <property name="visible">True</property> |
1609 | <property name="can_focus">True</property> | 1697 | <property name="can_focus">True</property> |
1610 | <property name="tooltip" translatable="yes">Browse local computer for files (or directories) to publish</property> | 1698 | <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> |
1699 | <property name="label" translatable="yes">I_nsert</property> | ||
1700 | <property name="use_underline">True</property> | ||
1611 | <property name="response_id">0</property> | 1701 | <property name="response_id">0</property> |
1612 | <signal name="clicked" handler="on_mainFileSharingInsertBrowseButton_clicked_" object="fsinsertfilenamecombo"/> | 1702 | <property name="draw_indicator">True</property> |
1613 | <child> | 1703 | <property name="group">indexbutton</property> |
1614 | <widget class="GtkHBox" id="hbox60"> | ||
1615 | <property name="visible">True</property> | ||
1616 | <property name="spacing">2</property> | ||
1617 | <child> | ||
1618 | <widget class="GtkImage" id="image46"> | ||
1619 | <property name="visible">True</property> | ||
1620 | <property name="stock">gtk-open</property> | ||
1621 | </widget> | ||
1622 | <packing> | ||
1623 | <property name="expand">False</property> | ||
1624 | <property name="fill">False</property> | ||
1625 | </packing> | ||
1626 | </child> | ||
1627 | <child> | ||
1628 | <widget class="GtkLabel" id="label143"> | ||
1629 | <property name="visible">True</property> | ||
1630 | <property name="label" translatable="yes">_Browse</property> | ||
1631 | <property name="use_underline">True</property> | ||
1632 | </widget> | ||
1633 | <packing> | ||
1634 | <property name="expand">False</property> | ||
1635 | <property name="fill">False</property> | ||
1636 | <property name="position">1</property> | ||
1637 | </packing> | ||
1638 | </child> | ||
1639 | </widget> | ||
1640 | </child> | ||
1641 | </widget> | 1704 | </widget> |
1642 | <packing> | 1705 | <packing> |
1643 | <property name="left_attach">2</property> | 1706 | <property name="left_attach">2</property> |
1644 | <property name="right_attach">3</property> | 1707 | <property name="right_attach">3</property> |
1645 | <property name="top_attach">4</property> | ||
1646 | <property name="bottom_attach">5</property> | ||
1647 | <property name="x_options">GTK_FILL</property> | 1708 | <property name="x_options">GTK_FILL</property> |
1648 | <property name="y_options"></property> | 1709 | <property name="y_options"></property> |
1649 | </packing> | 1710 | </packing> |
1650 | </child> | 1711 | </child> |
1651 | <child> | 1712 | <child> |
1652 | <widget class="GtkRadioButton" id="scopeFileOnlyButton"> | 1713 | <widget class="GtkRadioButton" id="indexbutton"> |
1653 | <property name="visible">True</property> | 1714 | <property name="visible">True</property> |
1654 | <property name="can_focus">True</property> | 1715 | <property name="can_focus">True</property> |
1655 | <property name="tooltip" translatable="yes">Only publish a single file</property> | 1716 | <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> |
1656 | <property name="label" translatable="yes">File onl_y</property> | 1717 | <property name="label" translatable="yes">Inde_x</property> |
1657 | <property name="use_underline">True</property> | 1718 | <property name="use_underline">True</property> |
1658 | <property name="response_id">0</property> | 1719 | <property name="response_id">0</property> |
1659 | <property name="active">True</property> | 1720 | <property name="active">True</property> |
1660 | <property name="draw_indicator">True</property> | 1721 | <property name="draw_indicator">True</property> |
1661 | <property name="group">scopeRecursiveButton</property> | ||
1662 | </widget> | ||
1663 | <packing> | ||
1664 | <property name="left_attach">1</property> | ||
1665 | <property name="right_attach">2</property> | ||
1666 | <property name="top_attach">1</property> | ||
1667 | <property name="bottom_attach">2</property> | ||
1668 | <property name="x_options">GTK_FILL</property> | ||
1669 | <property name="y_options"></property> | ||
1670 | </packing> | ||
1671 | </child> | ||
1672 | <child> | ||
1673 | <widget class="GtkSpinButton" id="contentPrioritySpinButton"> | ||
1674 | <property name="width_request">94</property> | ||
1675 | <property name="visible">True</property> | ||
1676 | <property name="can_focus">True</property> | ||
1677 | <property name="tooltip" translatable="yes">How important is the file (used to prioritize data in the local datastore).</property> | ||
1678 | <property name="adjustment">1000 0 100000000 50 500 500</property> | ||
1679 | <property name="climb_rate">500</property> | ||
1680 | <property name="numeric">True</property> | ||
1681 | </widget> | 1722 | </widget> |
1682 | <packing> | 1723 | <packing> |
1683 | <property name="left_attach">1</property> | 1724 | <property name="left_attach">1</property> |
1684 | <property name="right_attach">2</property> | 1725 | <property name="right_attach">2</property> |
1685 | <property name="top_attach">3</property> | ||
1686 | <property name="bottom_attach">4</property> | ||
1687 | <property name="x_options">GTK_FILL</property> | 1726 | <property name="x_options">GTK_FILL</property> |
1688 | <property name="y_options"></property> | 1727 | <property name="y_options"></property> |
1689 | </packing> | 1728 | </packing> |
1690 | </child> | 1729 | </child> |
1691 | <child> | 1730 | <child> |
1692 | <widget class="GtkCheckButton" id="doExtractCheckButton"> | 1731 | <widget class="GtkLabel" id="methodLabel"> |
1693 | <property name="visible">True</property> | 1732 | <property name="visible">True</property> |
1694 | <property name="can_focus">True</property> | 1733 | <property name="xalign">0</property> |
1695 | <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> | 1734 | <property name="xpad">5</property> |
1696 | <property name="response_id">0</property> | 1735 | <property name="label" translatable="yes">Method:</property> |
1697 | <property name="active">True</property> | 1736 | <property name="use_underline">True</property> |
1698 | <property name="draw_indicator">True</property> | 1737 | <property name="mnemonic_widget">indexbutton</property> |
1699 | <child> | ||
1700 | <widget class="GtkAlignment" id="alignment24"> | ||
1701 | <property name="visible">True</property> | ||
1702 | <property name="xscale">0</property> | ||
1703 | <property name="yscale">0</property> | ||
1704 | <child> | ||
1705 | <widget class="GtkHBox" id="hbox66"> | ||
1706 | <property name="visible">True</property> | ||
1707 | <property name="spacing">2</property> | ||
1708 | <child> | ||
1709 | <widget class="GtkImage" id="image49"> | ||
1710 | <property name="visible">True</property> | ||
1711 | <property name="stock">gtk-index</property> | ||
1712 | </widget> | ||
1713 | <packing> | ||
1714 | <property name="expand">False</property> | ||
1715 | <property name="fill">False</property> | ||
1716 | </packing> | ||
1717 | </child> | ||
1718 | <child> | ||
1719 | <widget class="GtkLabel" id="label151"> | ||
1720 | <property name="visible">True</property> | ||
1721 | <property name="label" translatable="yes">Use libextractor for files in directories</property> | ||
1722 | <property name="use_underline">True</property> | ||
1723 | </widget> | ||
1724 | <packing> | ||
1725 | <property name="expand">False</property> | ||
1726 | <property name="fill">False</property> | ||
1727 | <property name="position">1</property> | ||
1728 | </packing> | ||
1729 | </child> | ||
1730 | </widget> | ||
1731 | </child> | ||
1732 | </widget> | ||
1733 | </child> | ||
1734 | </widget> | 1738 | </widget> |
1735 | <packing> | 1739 | <packing> |
1736 | <property name="left_attach">2</property> | ||
1737 | <property name="right_attach">3</property> | ||
1738 | <property name="top_attach">3</property> | ||
1739 | <property name="bottom_attach">4</property> | ||
1740 | <property name="x_options">GTK_FILL</property> | 1740 | <property name="x_options">GTK_FILL</property> |
1741 | <property name="y_options"></property> | 1741 | <property name="y_options"></property> |
1742 | </packing> | 1742 | </packing> |
@@ -2796,8 +2796,8 @@ Press ENTER to add the data.</atkproperty> | |||
2796 | <property name="response_id">-5</property> | 2796 | <property name="response_id">-5</property> |
2797 | <signal name="clicked" handler="gtk_widget_destroy" object="metaDisplayDialog"/> | 2797 | <signal name="clicked" handler="gtk_widget_destroy" object="metaDisplayDialog"/> |
2798 | <signal name="activate" handler="gtk_widget_destroy" object="metaDisplayDialog"/> | 2798 | <signal name="activate" handler="gtk_widget_destroy" object="metaDisplayDialog"/> |
2799 | <accelerator key="Escape" modifiers="" signal="activate"/> | ||
2800 | <accelerator key="Return" modifiers="" signal="activate"/> | 2799 | <accelerator key="Return" modifiers="" signal="activate"/> |
2800 | <accelerator key="Escape" modifiers="" signal="activate"/> | ||
2801 | </widget> | 2801 | </widget> |
2802 | </child> | 2802 | </child> |
2803 | </widget> | 2803 | </widget> |
@@ -3026,7 +3026,6 @@ Press ENTER to add the data.</atkproperty> | |||
3026 | </child> | 3026 | </child> |
3027 | <child> | 3027 | <child> |
3028 | <widget class="GtkButton" id="searchCancelButton"> | 3028 | <widget class="GtkButton" id="searchCancelButton"> |
3029 | <property name="visible">True</property> | ||
3030 | <property name="can_focus">True</property> | 3029 | <property name="can_focus">True</property> |
3031 | <property name="tooltip" translatable="yes">Abort the search, but keep search tab open</property> | 3030 | <property name="tooltip" translatable="yes">Abort the search, but keep search tab open</property> |
3032 | <property name="label">gtk-stop</property> | 3031 | <property name="label">gtk-stop</property> |
@@ -4994,8 +4993,8 @@ Alex Jones <alexrjones@ntlworld.com></property> | |||
4994 | <property name="icon_name">gtk-save-as</property> | 4993 | <property name="icon_name">gtk-save-as</property> |
4995 | <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> | 4994 | <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> |
4996 | <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property> | 4995 | <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property> |
4997 | <property name="show_hidden">True</property> | ||
4998 | <property name="do_overwrite_confirmation">True</property> | 4996 | <property name="do_overwrite_confirmation">True</property> |
4997 | <property name="show_hidden">True</property> | ||
4999 | <child internal-child="vbox"> | 4998 | <child internal-child="vbox"> |
5000 | <widget class="GtkVBox" id="dialog-vbox7"> | 4999 | <widget class="GtkVBox" id="dialog-vbox7"> |
5001 | <property name="visible">True</property> | 5000 | <property name="visible">True</property> |
diff --git a/src/common/helper.c b/src/common/helper.c index 177ac952..66240ebb 100644 --- a/src/common/helper.c +++ b/src/common/helper.c | |||
@@ -42,9 +42,7 @@ | |||
42 | /* Not used because libgksu2 headers have broken depends in Debian | 42 | /* Not used because libgksu2 headers have broken depends in Debian |
43 | And this is not really needed | 43 | And this is not really needed |
44 | #include <libgksu/libgksu.h> */ | 44 | #include <libgksu/libgksu.h> */ |
45 | gboolean | 45 | gboolean gksu_run (gchar * command_line, GError ** error); |
46 | gksu_run (gchar *command_line, | ||
47 | GError **error); | ||
48 | #endif | 46 | #endif |
49 | 47 | ||
50 | typedef struct | 48 | typedef struct |
@@ -359,7 +357,7 @@ GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *e, | |||
359 | GNUNET_GE_FATAL | GNUNET_GE_USER | | 357 | GNUNET_GE_FATAL | GNUNET_GE_USER | |
360 | GNUNET_GE_IMMEDIATE, "glade_xml_new", | 358 | GNUNET_GE_IMMEDIATE, "glade_xml_new", |
361 | gladeFile); | 359 | gladeFile); |
362 | #if GTK_CHECK_VERSION (2,10,0) | 360 | #if GTK_CHECK_VERSION (2,10,0) |
363 | trayIcon = gtk_status_icon_new (); | 361 | trayIcon = gtk_status_icon_new (); |
364 | #endif | 362 | #endif |
365 | initTrayIcon (); | 363 | initTrayIcon (); |
@@ -465,8 +463,8 @@ GNUNET_GTK_run_with_save_calls (GNUNET_ThreadMainFunction cb, void *arg) | |||
465 | i = 0; | 463 | i = 0; |
466 | while (GNUNET_SYSERR == GNUNET_semaphore_down (cls.sig, GNUNET_NO)) | 464 | while (GNUNET_SYSERR == GNUNET_semaphore_down (cls.sig, GNUNET_NO)) |
467 | { | 465 | { |
468 | if (i == -1) | 466 | if (i == -1) |
469 | GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS); | 467 | GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS); |
470 | GNUNET_mutex_lock (sclock); | 468 | GNUNET_mutex_lock (sclock); |
471 | if (pscCount > 0) | 469 | if (pscCount > 0) |
472 | { | 470 | { |
@@ -609,78 +607,85 @@ GNUNET_GTK_get_main_window_state () | |||
609 | * Start gnunet-setup, asking for a password if needed | 607 | * Start gnunet-setup, asking for a password if needed |
610 | */ | 608 | */ |
611 | gboolean | 609 | gboolean |
612 | GNUNET_GTK_run_gnunet_setup (gchar *conffile, gboolean run_wizard) | 610 | GNUNET_GTK_run_gnunet_setup (gchar * conffile, gboolean run_wizard) |
613 | { | 611 | { |
614 | GtkWidget *mainWindow; | 612 | GtkWidget *mainWindow; |
615 | GtkWidget *messageDialog; | 613 | GtkWidget *messageDialog; |
616 | GError *gerror = NULL; | 614 | GError *gerror = NULL; |
617 | char *error_message = NULL; | 615 | char *error_message = NULL; |
618 | 616 | ||
619 | if (0 == ACCESS(conffile, W_OK)) | 617 | if (0 == ACCESS (conffile, W_OK)) |
620 | { | 618 | { |
621 | if (run_wizard) | 619 | if (run_wizard) |
622 | { | 620 | { |
623 | char *argv[] | 621 | char *argv[] |
624 | = {"gnunet-setup", "-d", "wizard-gtk", "-c", conffile, NULL}; | 622 | = { "gnunet-setup", "-d", "wizard-gtk", "-c", conffile, NULL }; |
625 | g_spawn_async (NULL, argv, NULL, | 623 | g_spawn_async (NULL, argv, NULL, |
626 | G_SPAWN_SEARCH_PATH|G_SPAWN_CHILD_INHERITS_STDIN, | 624 | G_SPAWN_SEARCH_PATH | G_SPAWN_CHILD_INHERITS_STDIN, |
627 | NULL, NULL, NULL, &gerror); | 625 | NULL, NULL, NULL, &gerror); |
628 | } | 626 | } |
629 | else | 627 | else |
630 | { | 628 | { |
631 | char *argv[] | 629 | char *argv[] |
632 | = {"gnunet-setup", "-d", "gconfig", "-c", conffile, NULL}; | 630 | = { "gnunet-setup", "-d", "gconfig", "-c", conffile, NULL }; |
633 | g_spawn_async (NULL, argv, NULL, | 631 | g_spawn_async (NULL, argv, NULL, |
634 | G_SPAWN_SEARCH_PATH|G_SPAWN_CHILD_INHERITS_STDIN, | 632 | G_SPAWN_SEARCH_PATH | G_SPAWN_CHILD_INHERITS_STDIN, |
635 | NULL, NULL, NULL, &gerror); | 633 | NULL, NULL, NULL, &gerror); |
636 | } | 634 | } |
637 | if (gerror) | 635 | if (gerror) |
638 | { | 636 | { |
639 | error_message = GNUNET_strdup(gerror->message); | 637 | error_message = GNUNET_strdup (gerror->message); |
640 | g_error_free (gerror); | 638 | g_error_free (gerror); |
641 | } | 639 | } |
642 | } | 640 | } |
643 | else | 641 | else |
644 | #ifndef WITH_LIBGKSU2 | 642 | #ifndef WITH_LIBGKSU2 |
645 | { | 643 | { |
646 | error_message = GNUNET_strdup(_("You don't have rights to write to the provided configuration file.")); | 644 | error_message = |
647 | } | 645 | GNUNET_strdup (_ |
646 | ("You don't have rights to write to the provided configuration file.")); | ||
647 | } | ||
648 | #else | 648 | #else |
649 | { | 649 | { |
650 | char *commandline; | 650 | char *commandline; |
651 | 651 | ||
652 | if (run_wizard) | 652 | if (run_wizard) |
653 | { | 653 | { |
654 | commandline = g_strconcat ("gnunet-setup -d wizard-gtk -c ", conffile, NULL); | 654 | commandline = |
655 | gksu_run (commandline, &gerror); | 655 | g_strconcat ("gnunet-setup -d wizard-gtk -c ", conffile, NULL); |
656 | } | 656 | gksu_run (commandline, &gerror); |
657 | else | 657 | } |
658 | { | 658 | else |
659 | commandline = g_strconcat ("gnunet-setup -d gconfig -c ", conffile, NULL); | 659 | { |
660 | gksu_run (commandline, &gerror); | 660 | commandline = |
661 | } | 661 | g_strconcat ("gnunet-setup -d gconfig -c ", conffile, NULL); |
662 | GNUNET_free (commandline); | 662 | gksu_run (commandline, &gerror); |
663 | if (gerror) | 663 | } |
664 | { | 664 | GNUNET_free (commandline); |
665 | error_message = GNUNET_strdup(gerror->message); | 665 | if (gerror) |
666 | g_error_free (gerror); | 666 | { |
667 | } | 667 | error_message = GNUNET_strdup (gerror->message); |
668 | } | 668 | g_error_free (gerror); |
669 | } | ||
670 | } | ||
669 | #endif | 671 | #endif |
670 | if(error_message) { | 672 | if (error_message) |
671 | mainWindow = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainWindow"); | 673 | { |
672 | messageDialog = gtk_message_dialog_new (GTK_WINDOW (mainWindow), | 674 | mainWindow = |
673 | GTK_DIALOG_MODAL | | 675 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainWindow"); |
674 | GTK_DIALOG_DESTROY_WITH_PARENT, | 676 | messageDialog = |
675 | GTK_MESSAGE_WARNING, | 677 | gtk_message_dialog_new (GTK_WINDOW (mainWindow), |
676 | GTK_BUTTONS_CLOSE, | 678 | GTK_DIALOG_MODAL | |
677 | _("Failed to run the configuration tool (gnunet-setup): %s"), | 679 | GTK_DIALOG_DESTROY_WITH_PARENT, |
678 | error_message); | 680 | GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, |
679 | gtk_dialog_run (GTK_DIALOG (messageDialog)); | 681 | _ |
680 | gtk_widget_destroy (messageDialog); | 682 | ("Failed to run the configuration tool (gnunet-setup): %s"), |
681 | GNUNET_free (error_message); | 683 | error_message); |
682 | return FALSE; | 684 | gtk_dialog_run (GTK_DIALOG (messageDialog)); |
683 | } | 685 | gtk_widget_destroy (messageDialog); |
686 | GNUNET_free (error_message); | ||
687 | return FALSE; | ||
688 | } | ||
684 | return TRUE; | 689 | return TRUE; |
685 | } | 690 | } |
686 | 691 | ||
diff --git a/src/core/eggtrayicon.c b/src/core/eggtrayicon.c index cc0fbc85..6a2708bb 100644 --- a/src/core/eggtrayicon.c +++ b/src/core/eggtrayicon.c | |||
@@ -602,19 +602,18 @@ static gboolean | |||
602 | tray_clicked (GtkWidget * widget, GdkEvent * event) | 602 | tray_clicked (GtkWidget * widget, GdkEvent * event) |
603 | { | 603 | { |
604 | #if GTK_CHECK_VERSION(2,10,0) | 604 | #if GTK_CHECK_VERSION(2,10,0) |
605 | GtkWidget *root; | 605 | GtkWidget *root; |
606 | root = | 606 | root = |
607 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 607 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainWindow"); |
608 | "mainWindow"); | 608 | GdkWindowState main_window_state; |
609 | GdkWindowState main_window_state; | 609 | if (gtk_window_is_active (GTK_WINDOW (root))) |
610 | if (gtk_window_is_active (GTK_WINDOW (root))) | 610 | gtk_widget_hide (root); |
611 | gtk_widget_hide (root); | 611 | else |
612 | else | 612 | gtk_window_present (GTK_WINDOW (root)); |
613 | gtk_window_present (GTK_WINDOW (root)); | 613 | main_window_state = GNUNET_GTK_get_main_window_state (); |
614 | main_window_state = GNUNET_GTK_get_main_window_state (); | 614 | if (main_window_state & GDK_WINDOW_STATE_MAXIMIZED) |
615 | if (main_window_state & GDK_WINDOW_STATE_MAXIMIZED) | 615 | gtk_window_maximize (GTK_WINDOW (root)); |
616 | gtk_window_maximize (GTK_WINDOW (root)); | 616 | return TRUE; |
617 | return TRUE; | ||
618 | #elif !defined (WINDOWS) | 617 | #elif !defined (WINDOWS) |
619 | if (event->type == GDK_BUTTON_PRESS) | 618 | if (event->type == GDK_BUTTON_PRESS) |
620 | { | 619 | { |
@@ -653,10 +652,10 @@ tray_clicked (GtkWidget * widget, GdkEvent * event) | |||
653 | #if GTK_CHECK_VERSION(2,10,0) | 652 | #if GTK_CHECK_VERSION(2,10,0) |
654 | /* Function activated when the user tries to popup the menu */ | 653 | /* Function activated when the user tries to popup the menu */ |
655 | static gboolean | 654 | static gboolean |
656 | on_tray_popup_menu (GtkStatusIcon *status_icon, guint button, | 655 | on_tray_popup_menu (GtkStatusIcon * status_icon, guint button, |
657 | guint activate_time, gpointer trayContextMenu) | 656 | guint activate_time, gpointer trayContextMenu) |
658 | { | 657 | { |
659 | gtk_menu_popup (GTK_MENU(trayContextMenu), NULL, NULL, NULL, NULL, | 658 | gtk_menu_popup (GTK_MENU (trayContextMenu), NULL, NULL, NULL, NULL, |
660 | button, activate_time); | 659 | button, activate_time); |
661 | return TRUE; | 660 | return TRUE; |
662 | } | 661 | } |
@@ -673,7 +672,7 @@ initTrayIcon () | |||
673 | GtkWidget *trayContextMenu; | 672 | GtkWidget *trayContextMenu; |
674 | GladeXML *trayContextMenuXML; | 673 | GladeXML *trayContextMenuXML; |
675 | GtkWidget *tray_quit; | 674 | GtkWidget *tray_quit; |
676 | 675 | ||
677 | trayContextMenuXML = | 676 | trayContextMenuXML = |
678 | glade_xml_new (GNUNET_GTK_get_glade_filename (), "trayContextMenu", | 677 | glade_xml_new (GNUNET_GTK_get_glade_filename (), "trayContextMenu", |
679 | PACKAGE_NAME); | 678 | PACKAGE_NAME); |
@@ -681,14 +680,16 @@ initTrayIcon () | |||
681 | "trayContextMenu"); | 680 | "trayContextMenu"); |
682 | trayIcon = GNUNET_GTK_get_trayIcon (); | 681 | trayIcon = GNUNET_GTK_get_trayIcon (); |
683 | instDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 682 | instDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); |
684 | iconPath = g_strconcat (instDir, "/../gnunet-gtk/gnunet-gtk-tray.png", NULL); | 683 | iconPath = |
684 | g_strconcat (instDir, "/../gnunet-gtk/gnunet-gtk-tray.png", NULL); | ||
685 | GNUNET_free (instDir); | 685 | GNUNET_free (instDir); |
686 | gtk_status_icon_set_from_file (trayIcon, iconPath); | 686 | gtk_status_icon_set_from_file (trayIcon, iconPath); |
687 | g_free (iconPath); | 687 | g_free (iconPath); |
688 | gtk_status_icon_set_tooltip (trayIcon, _("GNU's peer-to-peer network")); | 688 | gtk_status_icon_set_tooltip (trayIcon, _("GNU's peer-to-peer network")); |
689 | tray_quit = glade_xml_get_widget (trayContextMenuXML, "tray_quit"); | 689 | tray_quit = glade_xml_get_widget (trayContextMenuXML, "tray_quit"); |
690 | g_signal_connect_swapped (G_OBJECT (tray_quit), "activate", | 690 | g_signal_connect_swapped (G_OBJECT (tray_quit), "activate", |
691 | G_CALLBACK (on_tray_quit_activate), trayContextMenu); | 691 | G_CALLBACK (on_tray_quit_activate), |
692 | trayContextMenu); | ||
692 | g_signal_connect_swapped (G_OBJECT (trayIcon), "activate", | 693 | g_signal_connect_swapped (G_OBJECT (trayIcon), "activate", |
693 | G_CALLBACK (tray_clicked), trayContextMenu); | 694 | G_CALLBACK (tray_clicked), trayContextMenu); |
694 | g_signal_connect (G_OBJECT (trayIcon), "popup-menu", | 695 | g_signal_connect (G_OBJECT (trayIcon), "popup-menu", |
diff --git a/src/core/main.c b/src/core/main.c index 790f88d9..3fd82978 100644 --- a/src/core/main.c +++ b/src/core/main.c | |||
@@ -138,8 +138,8 @@ main (int argc, char *const *argv) | |||
138 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainWindow"); | 138 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainWindow"); |
139 | gtk_window_maximize (GTK_WINDOW (root)); | 139 | gtk_window_maximize (GTK_WINDOW (root)); |
140 | gtk_widget_show (root); | 140 | gtk_widget_show (root); |
141 | gtk_window_present(GTK_WINDOW(root)); | 141 | gtk_window_present (GTK_WINDOW (root)); |
142 | 142 | ||
143 | 143 | ||
144 | /* start the event loop */ | 144 | /* start the event loop */ |
145 | gdk_threads_enter (); | 145 | gdk_threads_enter (); |
diff --git a/src/include/gnunetgtk_common.h b/src/include/gnunetgtk_common.h index 3b01403b..ff35410b 100644 --- a/src/include/gnunetgtk_common.h +++ b/src/include/gnunetgtk_common.h | |||
@@ -66,8 +66,7 @@ GladeXML *GNUNET_GTK_get_main_glade_XML (void); | |||
66 | * Get the GtkStatusIcon for the tray icon (if GTK >= 2.10) | 66 | * Get the GtkStatusIcon for the tray icon (if GTK >= 2.10) |
67 | */ | 67 | */ |
68 | #if GTK_CHECK_VERSION(2,10,0) | 68 | #if GTK_CHECK_VERSION(2,10,0) |
69 | GtkStatusIcon * | 69 | GtkStatusIcon *GNUNET_GTK_get_trayIcon (void); |
70 | GNUNET_GTK_get_trayIcon (void); | ||
71 | #endif | 70 | #endif |
72 | 71 | ||
73 | /** | 72 | /** |
diff --git a/src/plugins/daemon/daemon.c b/src/plugins/daemon/daemon.c index 304a6cbb..1c3b4538 100644 --- a/src/plugins/daemon/daemon.c +++ b/src/plugins/daemon/daemon.c | |||
@@ -37,9 +37,7 @@ | |||
37 | /* Not used because libgksu2 headers have broken depends in Debian | 37 | /* Not used because libgksu2 headers have broken depends in Debian |
38 | And this is not really needed | 38 | And this is not really needed |
39 | #include <libgksu/libgksu.h> */ | 39 | #include <libgksu/libgksu.h> */ |
40 | gboolean | 40 | gboolean gksu_run (gchar * command_line, GError ** error); |
41 | gksu_run (gchar *command_line, | ||
42 | GError **error); | ||
43 | #endif | 41 | #endif |
44 | 42 | ||
45 | static struct GNUNET_CronManager *cron; | 43 | static struct GNUNET_CronManager *cron; |
@@ -172,12 +170,12 @@ doUpdateMenus (void *arg) | |||
172 | if (ret == 0) | 170 | if (ret == 0) |
173 | { | 171 | { |
174 | canStart = 0; | 172 | canStart = 0; |
175 | fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); | 173 | fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); |
176 | if (NULL == fn) | 174 | if (NULL == fn) |
177 | GNUNET_GC_get_configuration_value_filename (cfg, "DAEMON", | 175 | GNUNET_GC_get_configuration_value_filename (cfg, "DAEMON", |
178 | "CONFIGFILE", | 176 | "CONFIGFILE", |
179 | GNUNET_DEFAULT_DAEMON_CONFIG_FILE, | 177 | GNUNET_DEFAULT_DAEMON_CONFIG_FILE, |
180 | &fn); | 178 | &fn); |
181 | if (isLocal && fn) | 179 | if (isLocal && fn) |
182 | { | 180 | { |
183 | if (GNUNET_disk_file_test (ectx, fn) == GNUNET_YES) | 181 | if (GNUNET_disk_file_test (ectx, fn) == GNUNET_YES) |
@@ -195,7 +193,7 @@ doUpdateMenus (void *arg) | |||
195 | #if defined(WINDOWS) || defined(WITH_LIBGKSU2) | 193 | #if defined(WINDOWS) || defined(WITH_LIBGKSU2) |
196 | canStart = 1; | 194 | canStart = 1; |
197 | #else | 195 | #else |
198 | struct passwd *pws; | 196 | struct passwd *pws; |
199 | if (NULL == (pws = getpwnam (user))) | 197 | if (NULL == (pws = getpwnam (user))) |
200 | { | 198 | { |
201 | canStart = 0; | 199 | canStart = 0; |
@@ -246,9 +244,9 @@ cronCheckDaemon (void *dummy) | |||
246 | int ret; | 244 | int ret; |
247 | 245 | ||
248 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) | 246 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) |
249 | ret = 1; | 247 | ret = 1; |
250 | else | 248 | else |
251 | ret = 0; | 249 | ret = 0; |
252 | GNUNET_GTK_save_call (&doUpdateMenus, &ret); | 250 | GNUNET_GTK_save_call (&doUpdateMenus, &ret); |
253 | } | 251 | } |
254 | 252 | ||
@@ -287,42 +285,41 @@ on_startDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
287 | if (0 != GNUNET_GC_parse_configuration (dcfg, fn)) | 285 | if (0 != GNUNET_GC_parse_configuration (dcfg, fn)) |
288 | user = NULL; | 286 | user = NULL; |
289 | GNUNET_GC_get_configuration_value_string (dcfg, | 287 | GNUNET_GC_get_configuration_value_string (dcfg, |
290 | "GNUNETD", | 288 | "GNUNETD", "USER", "", &user); |
291 | "USER", "", &user); | ||
292 | #ifdef WITH_LIBGKSU2 | 289 | #ifdef WITH_LIBGKSU2 |
293 | char *command; | 290 | char *command; |
294 | GError *gerror = NULL; | 291 | GError *gerror = NULL; |
295 | struct passwd *pws; | 292 | struct passwd *pws; |
296 | if (strlen (user) > 0) | 293 | if (strlen (user) > 0) |
297 | { | 294 | { |
298 | pws = getpwnam (user); | 295 | pws = getpwnam (user); |
299 | if (pws->pw_uid != getuid ()) | 296 | if (pws->pw_uid != getuid ()) |
300 | { | 297 | { |
301 | command = g_strconcat ("gnunetd -c ", fn, NULL); | 298 | command = g_strconcat ("gnunetd -c ", fn, NULL); |
302 | code = gksu_run (command, &gerror); | 299 | code = gksu_run (command, &gerror); |
303 | GNUNET_free (command); | 300 | GNUNET_free (command); |
304 | if (gerror) | 301 | if (gerror) |
305 | { | 302 | { |
306 | GNUNET_GTK_add_log_entry (_("Launching gnunetd failed\n")); | 303 | GNUNET_GTK_add_log_entry (_("Launching gnunetd failed\n")); |
307 | 304 | ||
308 | g_error_free (gerror); | 305 | g_error_free (gerror); |
309 | } | 306 | } |
310 | else | 307 | else |
311 | { | 308 | { |
312 | GNUNET_GTK_add_log_entry (_("Launched gnunetd\n")); | 309 | GNUNET_GTK_add_log_entry (_("Launched gnunetd\n")); |
313 | } | 310 | } |
314 | g_free (fn); | 311 | g_free (fn); |
315 | cronCheckDaemon (NULL); | 312 | cronCheckDaemon (NULL); |
316 | return; | 313 | return; |
317 | } | 314 | } |
318 | else | 315 | else |
319 | code = GNUNET_daemon_start (ectx, cfg, fn, GNUNET_YES); | 316 | code = GNUNET_daemon_start (ectx, cfg, fn, GNUNET_YES); |
320 | } | 317 | } |
321 | #else | 318 | #else |
322 | code = GNUNET_daemon_start (ectx, cfg, fn, GNUNET_YES); | 319 | code = GNUNET_daemon_start (ectx, cfg, fn, GNUNET_YES); |
323 | #endif | 320 | #endif |
324 | 321 | ||
325 | if (GNUNET_SYSERR != code) | 322 | if (GNUNET_SYSERR != code) |
326 | { | 323 | { |
327 | GNUNET_GTK_add_log_entry (_("Launched gnunetd\n")); | 324 | GNUNET_GTK_add_log_entry (_("Launched gnunetd\n")); |
328 | } | 325 | } |
@@ -331,8 +328,8 @@ on_startDaemon_clicked_daemon (GtkWidget * widget, gpointer data) | |||
331 | GNUNET_GTK_add_log_entry (_("Launching gnunetd failed\n")); | 328 | GNUNET_GTK_add_log_entry (_("Launching gnunetd failed\n")); |
332 | } | 329 | } |
333 | if (fn != NULL) | 330 | if (fn != NULL) |
334 | g_free (fn); | 331 | g_free (fn); |
335 | cronCheckDaemon (NULL); | 332 | cronCheckDaemon (NULL); |
336 | } | 333 | } |
337 | } | 334 | } |
338 | 335 | ||
@@ -432,17 +429,17 @@ init_daemon (struct GNUNET_GE_Context *e, struct GNUNET_GC_Configuration *c) | |||
432 | ("Configuration file for GNUnet daemon `%s' does not exist! Run `gnunet-setup -d'.\n"), | 429 | ("Configuration file for GNUnet daemon `%s' does not exist! Run `gnunet-setup -d'.\n"), |
433 | daemon_config); | 430 | daemon_config); |
434 | } | 431 | } |
435 | 432 | ||
436 | #ifndef WITH_LIBGKSU2 | 433 | #ifndef WITH_LIBGKSU2 |
437 | GtkWidget *startDaemonConfWizard; | 434 | GtkWidget *startDaemonConfWizard; |
438 | GtkWidget *startDaemonConfTool; | 435 | GtkWidget *startDaemonConfTool; |
439 | 436 | ||
440 | startDaemonConfWizard | 437 | startDaemonConfWizard |
441 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 438 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
442 | "startDaemonConfWizard"); | 439 | "startDaemonConfWizard"); |
443 | startDaemonConfTool | 440 | startDaemonConfTool |
444 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 441 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
445 | "startDaemonConfTool"); | 442 | "startDaemonConfTool"); |
446 | if (0 != ACCESS (daemon_config, W_OK)) | 443 | if (0 != ACCESS (daemon_config, W_OK)) |
447 | { | 444 | { |
448 | gtk_widget_set_sensitive (startDaemonConfWizard, FALSE); | 445 | gtk_widget_set_sensitive (startDaemonConfWizard, FALSE); |
@@ -471,7 +468,9 @@ done_daemon () | |||
471 | "applicationList"); | 468 | "applicationList"); |
472 | gtk_tree_view_set_model (GTK_TREE_VIEW (w), NULL); | 469 | gtk_tree_view_set_model (GTK_TREE_VIEW (w), NULL); |
473 | 470 | ||
474 | w = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "applicationList"); | 471 | w = |
472 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
473 | "applicationList"); | ||
475 | gtk_tree_view_set_model (GTK_TREE_VIEW (w), NULL); | 474 | gtk_tree_view_set_model (GTK_TREE_VIEW (w), NULL); |
476 | 475 | ||
477 | } | 476 | } |
@@ -480,15 +479,16 @@ done_daemon () | |||
480 | * Launch 'gnunet-setup -d wizard-gtk' with needed rights | 479 | * Launch 'gnunet-setup -d wizard-gtk' with needed rights |
481 | */ | 480 | */ |
482 | void | 481 | void |
483 | on_startDaemonConfWizard_clicked_daemon (GtkWidget *widget, gpointer data) | 482 | on_startDaemonConfWizard_clicked_daemon (GtkWidget * widget, gpointer data) |
484 | { | 483 | { |
485 | GtkWidget *filechooserbutton; | 484 | GtkWidget *filechooserbutton; |
486 | char *conffile; | 485 | char *conffile; |
487 | 486 | ||
488 | filechooserbutton | 487 | filechooserbutton |
489 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 488 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
490 | "gnunetdconfigFileChooserButton"); | 489 | "gnunetdconfigFileChooserButton"); |
491 | conffile = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(filechooserbutton)); | 490 | conffile = |
491 | gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filechooserbutton)); | ||
492 | GNUNET_GTK_run_gnunet_setup (conffile, TRUE); | 492 | GNUNET_GTK_run_gnunet_setup (conffile, TRUE); |
493 | GNUNET_free (conffile); | 493 | GNUNET_free (conffile); |
494 | } | 494 | } |
@@ -497,15 +497,16 @@ on_startDaemonConfWizard_clicked_daemon (GtkWidget *widget, gpointer data) | |||
497 | * Launch 'gnunet-setup -d gconfig' with needed rights | 497 | * Launch 'gnunet-setup -d gconfig' with needed rights |
498 | */ | 498 | */ |
499 | void | 499 | void |
500 | on_startDaemonConfTool_clicked_daemon (GtkWidget *widget, gpointer data) | 500 | on_startDaemonConfTool_clicked_daemon (GtkWidget * widget, gpointer data) |
501 | { | 501 | { |
502 | GtkWidget *filechooserbutton; | 502 | GtkWidget *filechooserbutton; |
503 | char *conffile; | 503 | char *conffile; |
504 | 504 | ||
505 | filechooserbutton | 505 | filechooserbutton |
506 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 506 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
507 | "gnunetdconfigFileChooserButton"); | 507 | "gnunetdconfigFileChooserButton"); |
508 | conffile = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(filechooserbutton)); | 508 | conffile = |
509 | gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filechooserbutton)); | ||
509 | GNUNET_GTK_run_gnunet_setup (conffile, FALSE); | 510 | GNUNET_GTK_run_gnunet_setup (conffile, FALSE); |
510 | GNUNET_free (conffile); | 511 | GNUNET_free (conffile); |
511 | } | 512 | } |
@@ -514,8 +515,7 @@ on_startDaemonConfTool_clicked_daemon (GtkWidget *widget, gpointer data) | |||
514 | * Update sensitivity of daemon buttons | 515 | * Update sensitivity of daemon buttons |
515 | */ | 516 | */ |
516 | void | 517 | void |
517 | on_gnunetdconfigfile_set_daemon (GtkWidget *filechooserbutton, | 518 | on_gnunetdconfigfile_set_daemon (GtkWidget * filechooserbutton, gpointer data) |
518 | gpointer data) | ||
519 | { | 519 | { |
520 | #ifndef WITH_LIBGKSU2 | 520 | #ifndef WITH_LIBGKSU2 |
521 | GtkWidget *startDaemonConfWizard; | 521 | GtkWidget *startDaemonConfWizard; |
@@ -524,18 +524,19 @@ on_gnunetdconfigfile_set_daemon (GtkWidget *filechooserbutton, | |||
524 | int ret; | 524 | int ret; |
525 | 525 | ||
526 | startDaemonConfWizard | 526 | startDaemonConfWizard |
527 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 527 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
528 | "startDaemonConfWizard"); | 528 | "startDaemonConfWizard"); |
529 | startDaemonConfTool | 529 | startDaemonConfTool |
530 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 530 | = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
531 | "startDaemonConfTool"); | 531 | "startDaemonConfTool"); |
532 | conffile = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(filechooserbutton)); | 532 | conffile = |
533 | gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filechooserbutton)); | ||
533 | if (0 == ACCESS (conffile, W_OK)) | 534 | if (0 == ACCESS (conffile, W_OK)) |
534 | { | 535 | { |
535 | gtk_widget_set_sensitive (startDaemonConfWizard, TRUE); | 536 | gtk_widget_set_sensitive (startDaemonConfWizard, TRUE); |
536 | gtk_widget_set_sensitive (startDaemonConfTool, TRUE); | 537 | gtk_widget_set_sensitive (startDaemonConfTool, TRUE); |
537 | } | 538 | } |
538 | else | 539 | else |
539 | { | 540 | { |
540 | gtk_widget_set_sensitive (startDaemonConfWizard, FALSE); | 541 | gtk_widget_set_sensitive (startDaemonConfWizard, FALSE); |
541 | gtk_widget_set_sensitive (startDaemonConfTool, FALSE); | 542 | gtk_widget_set_sensitive (startDaemonConfTool, FALSE); |
diff --git a/src/plugins/fs/extensions/musicinsert.c b/src/plugins/fs/extensions/musicinsert.c index 20301d2f..5e373ca8 100644 --- a/src/plugins/fs/extensions/musicinsert.c +++ b/src/plugins/fs/extensions/musicinsert.c | |||
@@ -518,13 +518,13 @@ insertfiles () | |||
518 | while (dirkeywords[n]) | 518 | while (dirkeywords[n]) |
519 | { | 519 | { |
520 | GNUNET_ECRS_meta_data_insert (dirmetadata, EXTRACTOR_KEYWORDS, | 520 | GNUNET_ECRS_meta_data_insert (dirmetadata, EXTRACTOR_KEYWORDS, |
521 | dirkeywords[n]); | 521 | dirkeywords[n]); |
522 | n++; | 522 | n++; |
523 | } | 523 | } |
524 | /* Add a standard keyword to allow finding all available music albums | 524 | /* Add a standard keyword to allow finding all available music albums |
525 | * on AFS in one search */ | 525 | * on AFS in one search */ |
526 | GNUNET_ECRS_meta_data_insert (dirmetadata, EXTRACTOR_KEYWORDS, | 526 | GNUNET_ECRS_meta_data_insert (dirmetadata, EXTRACTOR_KEYWORDS, |
527 | "music album"); | 527 | "music album"); |
528 | 528 | ||
529 | 529 | ||
530 | /* Manage files metadatas */ | 530 | /* Manage files metadatas */ |
@@ -572,28 +572,28 @@ insertfiles () | |||
572 | 572 | ||
573 | if (tempmetas[1]) | 573 | if (tempmetas[1]) |
574 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_FILENAME, | 574 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_FILENAME, |
575 | tempmetas[1]); | 575 | tempmetas[1]); |
576 | if ((useforallflags & 0x1) && dirmetas[0]) | 576 | if ((useforallflags & 0x1) && dirmetas[0]) |
577 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_FILENAME, | 577 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_FILENAME, |
578 | dirmetas[0]); | 578 | dirmetas[0]); |
579 | else if (!(useforallflags & 0x1) && tempmetas[2]) | 579 | else if (!(useforallflags & 0x1) && tempmetas[2]) |
580 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_TITLE, | 580 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_TITLE, |
581 | tempmetas[2]); | 581 | tempmetas[2]); |
582 | if ((useforallflags & 0x2) && dirmetas[1]) | 582 | if ((useforallflags & 0x2) && dirmetas[1]) |
583 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_ARTIST, | 583 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_ARTIST, |
584 | dirmetas[1]); | 584 | dirmetas[1]); |
585 | else if (!(useforallflags & 0x2) && tempmetas[3]) | 585 | else if (!(useforallflags & 0x2) && tempmetas[3]) |
586 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_FILENAME, | 586 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_FILENAME, |
587 | tempmetas[3]); | 587 | tempmetas[3]); |
588 | if (tempmetas[4]) | 588 | if (tempmetas[4]) |
589 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_ALBUM, | 589 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_ALBUM, |
590 | tempmetas[4]); | 590 | tempmetas[4]); |
591 | if (tempmetas[5]) | 591 | if (tempmetas[5]) |
592 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_MIMETYPE, | 592 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_MIMETYPE, |
593 | tempmetas[5]); | 593 | tempmetas[5]); |
594 | if (tempmetas[6]) | 594 | if (tempmetas[6]) |
595 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_FORMAT, | 595 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_FORMAT, |
596 | tempmetas[6]); | 596 | tempmetas[6]); |
597 | 597 | ||
598 | if (!(useforallflags & 0x1)) | 598 | if (!(useforallflags & 0x1)) |
599 | { | 599 | { |
@@ -601,7 +601,7 @@ insertfiles () | |||
601 | while (dirkeywords[n]) | 601 | while (dirkeywords[n]) |
602 | { | 602 | { |
603 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_KEYWORDS, | 603 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_KEYWORDS, |
604 | dirkeywords[n]); | 604 | dirkeywords[n]); |
605 | n++; | 605 | n++; |
606 | } | 606 | } |
607 | } | 607 | } |
@@ -612,15 +612,15 @@ insertfiles () | |||
612 | while (tempkeywords[n]) | 612 | while (tempkeywords[n]) |
613 | { | 613 | { |
614 | GNUNET_ECRS_meta_data_insert (tempmetadata, | 614 | GNUNET_ECRS_meta_data_insert (tempmetadata, |
615 | EXTRACTOR_KEYWORDS, | 615 | EXTRACTOR_KEYWORDS, |
616 | tempkeywords[n]); | 616 | tempkeywords[n]); |
617 | n++; | 617 | n++; |
618 | } | 618 | } |
619 | g_strfreev (tempkeywords); | 619 | g_strfreev (tempkeywords); |
620 | /* Add a standard keyword to allow finding all available music files | 620 | /* Add a standard keyword to allow finding all available music files |
621 | * on AFS in one search */ | 621 | * on AFS in one search */ |
622 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_KEYWORDS, | 622 | GNUNET_ECRS_meta_data_insert (tempmetadata, EXTRACTOR_KEYWORDS, |
623 | "music"); | 623 | "music"); |
624 | } | 624 | } |
625 | 625 | ||
626 | GNUNET_free (tempmetas); | 626 | GNUNET_free (tempmetas); |
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index 4fea764b..b20994bc 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -144,6 +144,12 @@ saveEventProcessor (void *cls) | |||
144 | case GNUNET_FSUI_search_aborted: | 144 | case GNUNET_FSUI_search_aborted: |
145 | fs_search_aborted (event->data.SearchAborted.sc.cctx); | 145 | fs_search_aborted (event->data.SearchAborted.sc.cctx); |
146 | break; | 146 | break; |
147 | case GNUNET_FSUI_search_paused: | ||
148 | fs_search_paused (event->data.SearchPaused.sc.cctx); | ||
149 | break; | ||
150 | case GNUNET_FSUI_search_restarted: | ||
151 | fs_search_restarted (event->data.SearchRestarted.sc.cctx); | ||
152 | break; | ||
147 | case GNUNET_FSUI_search_completed: | 153 | case GNUNET_FSUI_search_completed: |
148 | fs_search_aborted (event->data.SearchCompleted.sc.cctx); | 154 | fs_search_aborted (event->data.SearchCompleted.sc.cctx); |
149 | break; | 155 | break; |
diff --git a/src/plugins/fs/fs.h b/src/plugins/fs/fs.h index 1bfadc42..8e089a8f 100644 --- a/src/plugins/fs/fs.h +++ b/src/plugins/fs/fs.h | |||
@@ -230,20 +230,10 @@ typedef struct SL | |||
230 | unsigned int last_y; | 230 | unsigned int last_y; |
231 | 231 | ||
232 | /** | 232 | /** |
233 | * Did the user just ask to pause the search? | ||
234 | */ | ||
235 | int is_paused; | ||
236 | |||
237 | /** | ||
238 | * Desired anonymity level. | 233 | * Desired anonymity level. |
239 | */ | 234 | */ |
240 | unsigned int anonymityLevel; | 235 | unsigned int anonymityLevel; |
241 | 236 | ||
242 | /** | ||
243 | * Maximum number of results. | ||
244 | */ | ||
245 | unsigned int max_results; | ||
246 | |||
247 | } SearchList; | 237 | } SearchList; |
248 | 238 | ||
249 | 239 | ||
diff --git a/src/plugins/fs/meta.c b/src/plugins/fs/meta.c index e9da23c8..3a865602 100644 --- a/src/plugins/fs/meta.c +++ b/src/plugins/fs/meta.c | |||
@@ -359,7 +359,7 @@ getMetaDataFromList (GladeXML * xml, | |||
359 | length); | 359 | length); |
360 | free (thumb); | 360 | free (thumb); |
361 | GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_THUMBNAIL_DATA, | 361 | GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_THUMBNAIL_DATA, |
362 | binary); | 362 | binary); |
363 | GNUNET_free (binary); | 363 | GNUNET_free (binary); |
364 | } | 364 | } |
365 | } | 365 | } |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index a78dd430..70c40aa7 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -164,7 +164,7 @@ fs_search_result_received (SearchList * searchContext, | |||
164 | GtkTreeStore *model; | 164 | GtkTreeStore *model; |
165 | GtkTreeIter iter; | 165 | GtkTreeIter iter; |
166 | enum GNUNET_URITRACK_STATE state; | 166 | enum GNUNET_URITRACK_STATE state; |
167 | struct GNUNET_ECRS_URI * have; | 167 | struct GNUNET_ECRS_URI *have; |
168 | 168 | ||
169 | state = GNUNET_URITRACK_get_state (ectx, cfg, info->uri); | 169 | state = GNUNET_URITRACK_get_state (ectx, cfg, info->uri); |
170 | if ((state & (GNUNET_URITRACK_INSERTED | | 170 | if ((state & (GNUNET_URITRACK_INSERTED | |
@@ -175,20 +175,19 @@ fs_search_result_received (SearchList * searchContext, | |||
175 | GNUNET_YES))) | 175 | GNUNET_YES))) |
176 | return; | 176 | return; |
177 | model = GTK_TREE_STORE (gtk_tree_view_get_model (searchContext->treeview)); | 177 | model = GTK_TREE_STORE (gtk_tree_view_get_model (searchContext->treeview)); |
178 | /* Check that the entry does not already exist (for resume!) */ | 178 | /* Check that the entry does not already exist (for resume!) */ |
179 | if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) | 179 | if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) |
180 | { | 180 | { |
181 | do | 181 | do |
182 | { | 182 | { |
183 | have = NULL; | 183 | have = NULL; |
184 | gtk_tree_model_get (GTK_TREE_MODEL(model), | 184 | gtk_tree_model_get (GTK_TREE_MODEL (model), |
185 | &iter, SEARCH_URI, &have, -1); | 185 | &iter, SEARCH_URI, &have, -1); |
186 | if ( (have != NULL) && | 186 | if ((have != NULL) && (GNUNET_ECRS_uri_test_equal (have, uri))) |
187 | (GNUNET_ECRS_uri_test_equal(have, uri)) ) | 187 | return; /* duplicate */ |
188 | return; /* duplicate */ | 188 | } |
189 | } | 189 | while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter)); |
190 | while (gtk_tree_model_iter_next (GTK_TREE_MODEL(model), &iter)); | 190 | } |
191 | } | ||
192 | gtk_tree_store_append (model, &iter, NULL); | 191 | gtk_tree_store_append (model, &iter, NULL); |
193 | addEntryToSearchTree (searchContext, NULL, info, &iter); | 192 | addEntryToSearchTree (searchContext, NULL, info, &iter); |
194 | searchContext->resultsReceived++; | 193 | searchContext->resultsReceived++; |
@@ -310,7 +309,7 @@ on_save_search_activate (void *cls, GtkWidget * searchEntry) | |||
310 | meta = GNUNET_ECRS_meta_data_create (); | 309 | meta = GNUNET_ECRS_meta_data_create (); |
311 | GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_KEYWORDS, list->searchString); | 310 | GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_KEYWORDS, list->searchString); |
312 | GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_DESCRIPTION, | 311 | GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_DESCRIPTION, |
313 | _("Saved search results")); | 312 | _("Saved search results")); |
314 | GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_SOFTWARE, "gnunet-gtk"); | 313 | GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_SOFTWARE, "gnunet-gtk"); |
315 | if (GNUNET_OK != GNUNET_ECRS_directory_create (NULL, | 314 | if (GNUNET_OK != GNUNET_ECRS_directory_create (NULL, |
316 | &directory, &dir_len, | 315 | &directory, &dir_len, |
@@ -405,18 +404,17 @@ fs_search_started (struct GNUNET_FSUI_SearchList * fsui_list, | |||
405 | list = search_head; | 404 | list = search_head; |
406 | while (list != NULL) | 405 | while (list != NULL) |
407 | { | 406 | { |
408 | if ( (list->fsui_list == NULL) && | 407 | if ((list->fsui_list == NULL) && |
409 | (list->uri != NULL) && | 408 | (list->uri != NULL) && |
410 | (GNUNET_ECRS_uri_test_equal(list->uri, | 409 | (GNUNET_ECRS_uri_test_equal (list->uri, uri))) |
411 | uri)) ) | 410 | { |
412 | { | 411 | list->fsui_list = fsui_list; |
413 | list->fsui_list = fsui_list; | 412 | for (i = 0; i < resultCount; i++) |
414 | for (i = 0; i < resultCount; i++) | 413 | fs_search_result_received (list, &results[i], uri); |
415 | fs_search_result_received (list, &results[i], uri); | 414 | if (resultCount == 0) /* otherwise already done! */ |
416 | if (resultCount == 0) /* otherwise already done! */ | 415 | updateSearchSummary (list); |
417 | updateSearchSummary (list); | 416 | return list; |
418 | return list; | 417 | } |
419 | } | ||
420 | list = list->next; | 418 | list = list->next; |
421 | } | 419 | } |
422 | 420 | ||
@@ -643,12 +641,24 @@ freeIterSubtree (GtkTreeModel * tree, GtkTreeIter * iter) | |||
643 | void | 641 | void |
644 | fs_search_aborted (SearchList * list) | 642 | fs_search_aborted (SearchList * list) |
645 | { | 643 | { |
646 | gtk_widget_show(glade_xml_get_widget(list->searchXML, | 644 | gtk_widget_show (glade_xml_get_widget (list->searchXML, |
647 | "searchResumeButton")); | 645 | "searchResumeButton")); |
648 | gtk_widget_show(glade_xml_get_widget(list->searchXML, | 646 | gtk_widget_show (glade_xml_get_widget (list->searchXML, |
649 | "searchAbortButton")); | 647 | "searchAbortButton")); |
650 | gtk_widget_show(glade_xml_get_widget(list->searchXML, | 648 | gtk_widget_show (glade_xml_get_widget (list->searchXML, |
651 | "searchPauseButton")); | 649 | "searchPauseButton")); |
650 | } | ||
651 | |||
652 | void | ||
653 | fs_search_paused (SearchList * list) | ||
654 | { | ||
655 | /* nothing to be done */ | ||
656 | } | ||
657 | |||
658 | void | ||
659 | fs_search_restarted (SearchList * list) | ||
660 | { | ||
661 | /* nothing to be done */ | ||
652 | } | 662 | } |
653 | 663 | ||
654 | /** | 664 | /** |
@@ -666,14 +676,6 @@ fs_search_stopped (SearchList * list) | |||
666 | int index; | 676 | int index; |
667 | int i; | 677 | int i; |
668 | 678 | ||
669 | if (list->is_paused == GNUNET_YES) | ||
670 | { | ||
671 | /* if this was just a request to pause, | ||
672 | then simply ignore the FS-stopped event */ | ||
673 | list->fsui_list = NULL; | ||
674 | list->is_paused = GNUNET_NO; | ||
675 | return; | ||
676 | } | ||
677 | /* remove from linked list */ | 679 | /* remove from linked list */ |
678 | if (search_head == list) | 680 | if (search_head == list) |
679 | { | 681 | { |
@@ -760,8 +762,7 @@ static void * | |||
760 | search_start_helper (void *cls) | 762 | search_start_helper (void *cls) |
761 | { | 763 | { |
762 | FSSS *fsss = cls; | 764 | FSSS *fsss = cls; |
763 | GNUNET_FSUI_search_start (ctx, fsss->anonymity, | 765 | GNUNET_FSUI_search_start (ctx, fsss->anonymity, fsss->uri); |
764 | fsss->uri); | ||
765 | return NULL; | 766 | return NULL; |
766 | } | 767 | } |
767 | 768 | ||
@@ -896,7 +897,7 @@ on_fssearchbutton_clicked_fs (gpointer dummy2, GtkWidget * searchButton) | |||
896 | list = list->next; | 897 | list = list->next; |
897 | } | 898 | } |
898 | fsss.anonymity = getSpinButtonValue (GNUNET_GTK_get_main_glade_XML (), | 899 | fsss.anonymity = getSpinButtonValue (GNUNET_GTK_get_main_glade_XML (), |
899 | "searchAnonymitySelectionSpinButton"); | 900 | "searchAnonymitySelectionSpinButton"); |
900 | GNUNET_GTK_run_with_save_calls (search_start_helper, &fsss); | 901 | GNUNET_GTK_run_with_save_calls (search_start_helper, &fsss); |
901 | GNUNET_ECRS_uri_destroy (fsss.uri); | 902 | GNUNET_ECRS_uri_destroy (fsss.uri); |
902 | } | 903 | } |
@@ -942,7 +943,7 @@ on_closeSearchButton_clicked_fs (GtkWidget * searchPage, | |||
942 | if (list->fsui_list == NULL) | 943 | if (list->fsui_list == NULL) |
943 | { | 944 | { |
944 | /* open directory or paused search; | 945 | /* open directory or paused search; |
945 | close directly */ | 946 | close directly */ |
946 | fs_search_stopped (list); | 947 | fs_search_stopped (list); |
947 | } | 948 | } |
948 | else | 949 | else |
@@ -962,7 +963,7 @@ on_closeSearchButton_clicked_fs (GtkWidget * searchPage, | |||
962 | */ | 963 | */ |
963 | void | 964 | void |
964 | on_searchPauseButton_clicked_fs (GtkWidget * searchPage, | 965 | on_searchPauseButton_clicked_fs (GtkWidget * searchPage, |
965 | GtkWidget * pauseButton) | 966 | GtkWidget * pauseButton) |
966 | { | 967 | { |
967 | SearchList *list; | 968 | SearchList *list; |
968 | struct FCBC fcbc; | 969 | struct FCBC fcbc; |
@@ -975,13 +976,12 @@ on_searchPauseButton_clicked_fs (GtkWidget * searchPage, | |||
975 | list = list->next; | 976 | list = list->next; |
976 | } | 977 | } |
977 | GNUNET_GE_ASSERT (ectx, list != NULL); | 978 | GNUNET_GE_ASSERT (ectx, list != NULL); |
978 | gtk_widget_hide(pauseButton); | 979 | gtk_widget_hide (pauseButton); |
979 | gtk_widget_show(glade_xml_get_widget(list->searchXML, | 980 | gtk_widget_show (glade_xml_get_widget (list->searchXML, |
980 | "searchResumeButton")); | 981 | "searchResumeButton")); |
981 | if (list->fsui_list != NULL) | 982 | if (list->fsui_list != NULL) |
982 | { | 983 | { |
983 | list->is_paused = GNUNET_YES; | 984 | fcbc.method = &GNUNET_FSUI_search_pause; |
984 | fcbc.method = &GNUNET_FSUI_search_stop; | ||
985 | fcbc.argument = list->fsui_list; | 985 | fcbc.argument = list->fsui_list; |
986 | GNUNET_GTK_run_with_save_calls (&fsui_callback, &fcbc); | 986 | GNUNET_GTK_run_with_save_calls (&fsui_callback, &fcbc); |
987 | } | 987 | } |
@@ -992,10 +992,10 @@ on_searchPauseButton_clicked_fs (GtkWidget * searchPage, | |||
992 | */ | 992 | */ |
993 | void | 993 | void |
994 | on_searchResumeButton_clicked_fs (GtkWidget * searchPage, | 994 | on_searchResumeButton_clicked_fs (GtkWidget * searchPage, |
995 | GtkWidget * resumeButton) | 995 | GtkWidget * resumeButton) |
996 | { | 996 | { |
997 | FSSS fsss; | ||
998 | SearchList *list; | 997 | SearchList *list; |
998 | struct FCBC fcbc; | ||
999 | 999 | ||
1000 | list = search_head; | 1000 | list = search_head; |
1001 | while (list != NULL) | 1001 | while (list != NULL) |
@@ -1005,13 +1005,15 @@ on_searchResumeButton_clicked_fs (GtkWidget * searchPage, | |||
1005 | list = list->next; | 1005 | list = list->next; |
1006 | } | 1006 | } |
1007 | GNUNET_GE_ASSERT (ectx, list != NULL); | 1007 | GNUNET_GE_ASSERT (ectx, list != NULL); |
1008 | gtk_widget_hide(resumeButton); | 1008 | gtk_widget_hide (resumeButton); |
1009 | gtk_widget_show(glade_xml_get_widget(list->searchXML, | 1009 | gtk_widget_show (glade_xml_get_widget (list->searchXML, |
1010 | "searchPauseButton")); | 1010 | "searchPauseButton")); |
1011 | fsss.anonymity = getSpinButtonValue (GNUNET_GTK_get_main_glade_XML (), | 1011 | if (list->fsui_list != NULL) |
1012 | "searchAnonymitySelectionSpinButton"); | 1012 | { |
1013 | fsss.uri = list->uri; | 1013 | fcbc.method = &GNUNET_FSUI_search_restart; |
1014 | GNUNET_GTK_run_with_save_calls (search_start_helper, &fsss); | 1014 | fcbc.argument = list->fsui_list; |
1015 | GNUNET_GTK_run_with_save_calls (&fsui_callback, &fcbc); | ||
1016 | } | ||
1015 | } | 1017 | } |
1016 | 1018 | ||
1017 | /** | 1019 | /** |
@@ -1032,7 +1034,7 @@ on_abortSearchButton_clicked_fs (GtkWidget * searchPage, | |||
1032 | list = list->next; | 1034 | list = list->next; |
1033 | } | 1035 | } |
1034 | GNUNET_GE_ASSERT (ectx, list != NULL); | 1036 | GNUNET_GE_ASSERT (ectx, list != NULL); |
1035 | gtk_widget_hide(abortButton); | 1037 | gtk_widget_hide (abortButton); |
1036 | if (list->fsui_list != NULL) | 1038 | if (list->fsui_list != NULL) |
1037 | { | 1039 | { |
1038 | fcbc.method = &GNUNET_FSUI_search_abort; | 1040 | fcbc.method = &GNUNET_FSUI_search_abort; |
diff --git a/src/plugins/fs/search.h b/src/plugins/fs/search.h index b0dcf719..37c51818 100644 --- a/src/plugins/fs/search.h +++ b/src/plugins/fs/search.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2005, 2006 Christian Grothoff (and other contributing authors) | 3 | (C) 2005, 2006, 2008 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 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 | 6 | it under the terms of the GNU General Public License as published |
@@ -71,6 +71,16 @@ SearchList *fs_search_started (struct GNUNET_FSUI_SearchList *list, | |||
71 | void fs_search_aborted (SearchList * searchContext); | 71 | void fs_search_aborted (SearchList * searchContext); |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * A search process has been aborted. Update display. | ||
75 | */ | ||
76 | void fs_search_paused (SearchList * searchContext); | ||
77 | |||
78 | /** | ||
79 | * A search process has been aborted. Update display. | ||
80 | */ | ||
81 | void fs_search_restarted (SearchList * searchContext); | ||
82 | |||
83 | /** | ||
74 | * A search process has stopped. Clean up. | 84 | * A search process has stopped. Clean up. |
75 | */ | 85 | */ |
76 | void fs_search_stopped (SearchList * searchContext); | 86 | void fs_search_stopped (SearchList * searchContext); |
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index a85660cd..65f9e6cb 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -342,12 +342,12 @@ start_upload_helper (void *cls) | |||
342 | FSUC *fsuc = cls; | 342 | FSUC *fsuc = cls; |
343 | 343 | ||
344 | GNUNET_FSUI_upload_start (ctx, | 344 | GNUNET_FSUI_upload_start (ctx, |
345 | fsuc->filename, | 345 | fsuc->filename, |
346 | (GNUNET_FSUI_DirectoryScanCallback) & | 346 | (GNUNET_FSUI_DirectoryScanCallback) & |
347 | GNUNET_disk_directory_scan, ectx, fsuc->anonymity, | 347 | GNUNET_disk_directory_scan, ectx, fsuc->anonymity, |
348 | fsuc->priority, fsuc->index, fsuc->extract, | 348 | fsuc->priority, fsuc->index, fsuc->extract, |
349 | fsuc->deep_index, fsuc->expire, fsuc->meta, | 349 | fsuc->deep_index, fsuc->expire, fsuc->meta, |
350 | fsuc->gkeywordURI, fsuc->keywordURI); | 350 | fsuc->gkeywordURI, fsuc->keywordURI); |
351 | return NULL; | 351 | return NULL; |
352 | } | 352 | } |
353 | 353 | ||
diff --git a/src/plugins/peers/peers.c b/src/plugins/peers/peers.c index f6e99288..3cddaf55 100644 --- a/src/plugins/peers/peers.c +++ b/src/plugins/peers/peers.c | |||
@@ -219,7 +219,7 @@ getPeerModel () | |||
219 | GDK_TYPE_PIXBUF, /* flag */ | 219 | GDK_TYPE_PIXBUF, /* flag */ |
220 | G_TYPE_STRING, /* country name */ | 220 | G_TYPE_STRING, /* country name */ |
221 | G_TYPE_UINT64); /* last time seen */ | 221 | G_TYPE_UINT64); /* last time seen */ |
222 | gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE(model), | 222 | gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), |
223 | 7, GTK_SORT_DESCENDING); | 223 | 7, GTK_SORT_DESCENDING); |
224 | sock = GNUNET_client_connection_create (ectx, cfg); | 224 | sock = GNUNET_client_connection_create (ectx, cfg); |
225 | if (sock != NULL) | 225 | if (sock != NULL) |
diff --git a/src/plugins/stats/functions.c b/src/plugins/stats/functions.c index f7faaf0e..06a9772c 100644 --- a/src/plugins/stats/functions.c +++ b/src/plugins/stats/functions.c | |||
@@ -121,7 +121,7 @@ static int | |||
121 | getConnectedNodesStat (const void *closure, gfloat ** data) | 121 | getConnectedNodesStat (const void *closure, gfloat ** data) |
122 | { | 122 | { |
123 | unsigned long long val; | 123 | unsigned long long val; |
124 | 124 | ||
125 | if (connectionGoal == 0) | 125 | if (connectionGoal == 0) |
126 | return GNUNET_SYSERR; | 126 | return GNUNET_SYSERR; |
127 | if (GNUNET_OK != | 127 | if (GNUNET_OK != |
@@ -483,124 +483,132 @@ updateDaemonStatus (void *delta) | |||
483 | static GdkPixbuf *iconDisconnected; | 483 | static GdkPixbuf *iconDisconnected; |
484 | static GdkPixbuf *iconConnected; | 484 | static GdkPixbuf *iconConnected; |
485 | #endif | 485 | #endif |
486 | 486 | ||
487 | if (once) | 487 | if (once) |
488 | { | 488 | { |
489 | statusConnexionsLabel = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 489 | statusConnexionsLabel = |
490 | "statusConnexionsLabel"); | 490 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
491 | statusConnexionsPic = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 491 | "statusConnexionsLabel"); |
492 | "statusConnexionsPic"); | 492 | statusConnexionsPic = |
493 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
494 | "statusConnexionsPic"); | ||
493 | #if GTK_CHECK_VERSION (2,10,0) | 495 | #if GTK_CHECK_VERSION (2,10,0) |
494 | char *iconFile; | 496 | char *iconFile; |
495 | char *finalPath; | 497 | char *finalPath; |
496 | char *instDir; | 498 | char *instDir; |
497 | char *dataDir; | 499 | char *dataDir; |
498 | 500 | ||
499 | instDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 501 | instDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); |
500 | dataDir = g_strconcat (instDir, "/../gnunet-gtk/", NULL); | 502 | dataDir = g_strconcat (instDir, "/../gnunet-gtk/", NULL); |
501 | #if MINGW | 503 | #if MINGW |
502 | finalPath = GNUNET_malloc (_MAX_PATH + 1); | 504 | finalPath = GNUNET_malloc (_MAX_PATH + 1); |
503 | plibc_conv_to_win_path (dataDir, finalPath); | 505 | plibc_conv_to_win_path (dataDir, finalPath); |
504 | #else | 506 | #else |
505 | finalPath = GNUNET_strdup (dataDir); | 507 | finalPath = GNUNET_strdup (dataDir); |
506 | #endif | 508 | #endif |
507 | GNUNET_free (instDir); | 509 | GNUNET_free (instDir); |
508 | g_free (dataDir); | 510 | g_free (dataDir); |
509 | iconFile = g_strconcat (finalPath, "tray-nodaemon.png", NULL); | 511 | iconFile = g_strconcat (finalPath, "tray-nodaemon.png", NULL); |
510 | iconNoDaemon = gdk_pixbuf_new_from_file (iconFile, NULL); | 512 | iconNoDaemon = gdk_pixbuf_new_from_file (iconFile, NULL); |
511 | g_free (iconFile); | 513 | g_free (iconFile); |
512 | iconFile = g_strconcat (finalPath, "tray-disconnected.png", NULL); | 514 | iconFile = g_strconcat (finalPath, "tray-disconnected.png", NULL); |
513 | iconDisconnected = gdk_pixbuf_new_from_file (iconFile, NULL); | 515 | iconDisconnected = gdk_pixbuf_new_from_file (iconFile, NULL); |
514 | g_free (iconFile); | 516 | g_free (iconFile); |
515 | iconFile = g_strconcat (finalPath, "tray-connected.png", NULL); | 517 | iconFile = g_strconcat (finalPath, "tray-connected.png", NULL); |
516 | iconConnected = gdk_pixbuf_new_from_file (iconFile, NULL); | 518 | iconConnected = gdk_pixbuf_new_from_file (iconFile, NULL); |
517 | g_free (iconFile); | 519 | g_free (iconFile); |
518 | GNUNET_free (finalPath); | 520 | GNUNET_free (finalPath); |
519 | #endif | 521 | #endif |
520 | 522 | ||
521 | once = FALSE; | 523 | once = FALSE; |
522 | } | 524 | } |
523 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) | 525 | if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg)) |
524 | { | 526 | { |
525 | if (GNUNET_OK != getStatValue (&connected_peers, (GNUNET_CronTime *) delta, | 527 | if (GNUNET_OK != |
526 | NULL, "# of connected peers", GNUNET_NO)) | 528 | getStatValue (&connected_peers, (GNUNET_CronTime *) delta, NULL, |
527 | { | 529 | "# of connected peers", GNUNET_NO)) |
528 | if (last_status != -1) | ||
529 | { | 530 | { |
530 | GNUNET_GTK_add_log_entry (_("WARNING: Failed to obtain connection statistics from gnunetd.\n")); | 531 | if (last_status != -1) |
531 | gtk_label_set_text (GTK_LABEL(statusConnexionsLabel), | 532 | { |
532 | _("Unknown status")); | 533 | GNUNET_GTK_add_log_entry (_ |
533 | gtk_image_set_from_stock (GTK_IMAGE(statusConnexionsPic), | 534 | ("WARNING: Failed to obtain connection statistics from gnunetd.\n")); |
534 | GTK_STOCK_DIALOG_ERROR, 1); | 535 | gtk_label_set_text (GTK_LABEL (statusConnexionsLabel), |
536 | _("Unknown status")); | ||
537 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), | ||
538 | GTK_STOCK_DIALOG_ERROR, 1); | ||
535 | #if GTK_CHECK_VERSION (2,10,0) | 539 | #if GTK_CHECK_VERSION (2,10,0) |
536 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), | 540 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), |
537 | _("Unknown status")); | 541 | _("Unknown status")); |
538 | gtk_status_icon_set_from_pixbuf (GNUNET_GTK_get_trayIcon(), | 542 | gtk_status_icon_set_from_pixbuf (GNUNET_GTK_get_trayIcon (), |
539 | iconNoDaemon); | 543 | iconNoDaemon); |
540 | #endif | 544 | #endif |
541 | last_status = -1; | 545 | last_status = -1; |
546 | } | ||
542 | } | 547 | } |
543 | } | ||
544 | else if (connected_peers > 0) | 548 | else if (connected_peers > 0) |
545 | { | 549 | { |
546 | if (last_status != connected_peers) | 550 | if (last_status != connected_peers) |
547 | { | 551 | { |
548 | if (connected_peers == 1) | 552 | if (connected_peers == 1) |
549 | { | 553 | { |
550 | gtk_label_set_text (GTK_LABEL(statusConnexionsLabel), | 554 | gtk_label_set_text (GTK_LABEL (statusConnexionsLabel), |
551 | _("Connected to 1 peer")); | 555 | _("Connected to 1 peer")); |
552 | #if GTK_CHECK_VERSION (2,10,0) | 556 | #if GTK_CHECK_VERSION (2,10,0) |
553 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), | 557 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), |
554 | _("GNUnet - Connected to 1 peer")); | 558 | _ |
559 | ("GNUnet - Connected to 1 peer")); | ||
555 | #endif | 560 | #endif |
556 | } | 561 | } |
557 | else | 562 | else |
558 | { | 563 | { |
559 | label = g_strdup_printf (_("Connected to %Lu peers"), | 564 | label = g_strdup_printf (_("Connected to %Lu peers"), |
560 | connected_peers); | 565 | connected_peers); |
561 | gtk_label_set_text (GTK_LABEL(statusConnexionsLabel), label); | 566 | gtk_label_set_text (GTK_LABEL (statusConnexionsLabel), |
562 | g_free (label); | 567 | label); |
568 | g_free (label); | ||
563 | #if GTK_CHECK_VERSION (2,10,0) | 569 | #if GTK_CHECK_VERSION (2,10,0) |
564 | label = g_strdup_printf (_("GNUnet - Connected to %Lu peers"), | 570 | label = |
571 | g_strdup_printf (_("GNUnet - Connected to %Lu peers"), | ||
565 | connected_peers); | 572 | connected_peers); |
566 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), label); | 573 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), |
567 | g_free (label); | 574 | label); |
575 | g_free (label); | ||
568 | #endif | 576 | #endif |
569 | } | 577 | } |
570 | #if GTK_CHECK_VERSION (2,10,0) | 578 | #if GTK_CHECK_VERSION (2,10,0) |
571 | gtk_status_icon_set_from_pixbuf (GNUNET_GTK_get_trayIcon(), | 579 | gtk_status_icon_set_from_pixbuf (GNUNET_GTK_get_trayIcon (), |
572 | iconConnected); | 580 | iconConnected); |
573 | #endif | 581 | #endif |
574 | gtk_image_set_from_stock (GTK_IMAGE(statusConnexionsPic), | 582 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), |
575 | GTK_STOCK_NETWORK, 1); | 583 | GTK_STOCK_NETWORK, 1); |
576 | last_status = connected_peers; | 584 | last_status = connected_peers; |
577 | } | 585 | } |
578 | } | 586 | } |
579 | else if (last_status != 0) | 587 | else if (last_status != 0) |
580 | { | 588 | { |
581 | gtk_label_set_markup (GTK_LABEL(statusConnexionsLabel), | 589 | gtk_label_set_markup (GTK_LABEL (statusConnexionsLabel), |
582 | _("<b>Disconnected</b>")); | 590 | _("<b>Disconnected</b>")); |
583 | gtk_image_set_from_stock (GTK_IMAGE(statusConnexionsPic), | 591 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), |
584 | GTK_STOCK_DISCONNECT, 1); | 592 | GTK_STOCK_DISCONNECT, 1); |
585 | #if GTK_CHECK_VERSION (2,10,0) | 593 | #if GTK_CHECK_VERSION (2,10,0) |
586 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), | 594 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), |
587 | _("GNUnet - Disconnected")); | 595 | _("GNUnet - Disconnected")); |
588 | gtk_status_icon_set_from_pixbuf (GNUNET_GTK_get_trayIcon(), | 596 | gtk_status_icon_set_from_pixbuf (GNUNET_GTK_get_trayIcon (), |
589 | iconDisconnected); | 597 | iconDisconnected); |
590 | #endif | 598 | #endif |
591 | last_status = 0; | 599 | last_status = 0; |
592 | } | 600 | } |
593 | } | 601 | } |
594 | else if (last_status != -2) | 602 | else if (last_status != -2) |
595 | { | 603 | { |
596 | gtk_label_set_markup (GTK_LABEL(statusConnexionsLabel), | 604 | gtk_label_set_markup (GTK_LABEL (statusConnexionsLabel), |
597 | _("<b>Daemon not running</b>")); | 605 | _("<b>Daemon not running</b>")); |
598 | gtk_image_set_from_stock (GTK_IMAGE(statusConnexionsPic), | 606 | gtk_image_set_from_stock (GTK_IMAGE (statusConnexionsPic), |
599 | GTK_STOCK_NO, 1); | 607 | GTK_STOCK_NO, 1); |
600 | #if GTK_CHECK_VERSION (2,10,0) | 608 | #if GTK_CHECK_VERSION (2,10,0) |
601 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), | 609 | gtk_status_icon_set_tooltip (GNUNET_GTK_get_trayIcon (), |
602 | _("GNUnet - Daemon not running")); | 610 | _("GNUnet - Daemon not running")); |
603 | gtk_status_icon_set_from_pixbuf (GNUNET_GTK_get_trayIcon(), | 611 | gtk_status_icon_set_from_pixbuf (GNUNET_GTK_get_trayIcon (), |
604 | iconNoDaemon); | 612 | iconNoDaemon); |
605 | #endif | 613 | #endif |
606 | last_status = -2; | 614 | last_status = -2; |
diff --git a/src/plugins/stats/statistics.c b/src/plugins/stats/statistics.c index 2ed6da3f..ace9615e 100644 --- a/src/plugins/stats/statistics.c +++ b/src/plugins/stats/statistics.c | |||
@@ -444,8 +444,9 @@ init_stats (struct GNUNET_GE_Context *ectx, | |||
444 | statusConnexionsLabel = | 444 | statusConnexionsLabel = |
445 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 445 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
446 | "statusConnexionsLabel"); | 446 | "statusConnexionsLabel"); |
447 | gtk_label_set_width_chars (GTK_LABEL(statusConnexionsLabel), | 447 | gtk_label_set_width_chars (GTK_LABEL (statusConnexionsLabel), |
448 | g_utf8_strlen (_("Connected to %Lu peers"), 40) - 1); | 448 | g_utf8_strlen (_("Connected to %Lu peers"), |
449 | 40) - 1); | ||
449 | statusConnexionsBox = | 450 | statusConnexionsBox = |
450 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 451 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
451 | "statusConnexionsBox"); | 452 | "statusConnexionsBox"); |