diff options
Diffstat (limited to 'src/plugins/fs/namespace.c')
-rw-r--r-- | src/plugins/fs/namespace.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c index cd8238d4..b0749096 100644 --- a/src/plugins/fs/namespace.c +++ b/src/plugins/fs/namespace.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunetgtk_common.h" | 28 | #include "gnunetgtk_common.h" |
29 | #include "fs.h" | 29 | #include "fs.h" |
30 | #include "helper.h" | ||
30 | #include "meta.h" | 31 | #include "meta.h" |
31 | #include "namespace.h" | 32 | #include "namespace.h" |
32 | #include <extractor.h> | 33 | #include <extractor.h> |
@@ -632,6 +633,7 @@ static void initiateUpload(GtkTreeModel * model, | |||
632 | void on_namespaceInsertButton_clicked(GtkWidget * dummy1, | 633 | void on_namespaceInsertButton_clicked(GtkWidget * dummy1, |
633 | GtkWidget * dummy2) { | 634 | GtkWidget * dummy2) { |
634 | const char * identifierName; | 635 | const char * identifierName; |
636 | const char * timeSpec; | ||
635 | NamespaceList * list; | 637 | NamespaceList * list; |
636 | GtkWidget * nameLine; | 638 | GtkWidget * nameLine; |
637 | GtkWidget * page; | 639 | GtkWidget * page; |
@@ -721,6 +723,28 @@ void on_namespaceInsertButton_clicked(GtkWidget * dummy1, | |||
721 | gtk_dialog_set_default_response(GTK_DIALOG(dialog), | 723 | gtk_dialog_set_default_response(GTK_DIALOG(dialog), |
722 | GTK_RESPONSE_OK); | 724 | GTK_RESPONSE_OK); |
723 | if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) { | 725 | if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) { |
726 | update = glade_xml_get_widget(metaXML, | ||
727 | "updateIntervalComboBoxEntry"); | ||
728 | timeSpec = gtk_entry_get_text(GTK_ENTRY(update)); | ||
729 | if (0 == strcmp(_("--sporadic update--"), | ||
730 | timeSpec)) | ||
731 | cls.updateInterval = ECRS_SBLOCK_UPDATE_SPORADIC; | ||
732 | else if (0 == strcmp(_("--no update--"), | ||
733 | timeSpec)) | ||
734 | cls.updateInterval = ECRS_SBLOCK_UPDATE_NONE; | ||
735 | else if (OK != parseTime(timeSpec, | ||
736 | &cls.updateInterval)) { | ||
737 | dialog = gtk_message_dialog_new | ||
738 | (NULL, | ||
739 | GTK_DIALOG_MODAL, | ||
740 | GTK_MESSAGE_ERROR, | ||
741 | GTK_BUTTONS_CLOSE, | ||
742 | _("Failed to parse given time interval!")); | ||
743 | gtk_dialog_run(GTK_DIALOG(dialog)); | ||
744 | gtk_widget_destroy(dialog); | ||
745 | return; | ||
746 | } | ||
747 | |||
724 | meta = ECRS_createMetaData(); | 748 | meta = ECRS_createMetaData(); |
725 | if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(metamodel), | 749 | if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(metamodel), |
726 | &iter)) { | 750 | &iter)) { |
@@ -763,9 +787,6 @@ void on_namespaceInsertButton_clicked(GtkWidget * dummy1, | |||
763 | cls.nextId = &nextId; | 787 | cls.nextId = &nextId; |
764 | } | 788 | } |
765 | cls.meta = meta; | 789 | cls.meta = meta; |
766 | update = glade_xml_get_widget(metaXML, | ||
767 | "updateIntervalComboBoxEntry"); | ||
768 | cls.updateInterval = 0; /* FIXME */ | ||
769 | 790 | ||
770 | gtk_tree_selection_selected_foreach | 791 | gtk_tree_selection_selected_foreach |
771 | (selection, | 792 | (selection, |