diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-23 13:33:49 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-23 13:33:49 +0000 |
commit | db42fcb6a149eeb1e0368386d379395b6151abab (patch) | |
tree | 38df08f1978d2862456051eee8efea72089f5694 | |
parent | 0564f418e7027e9e1ddc230b9bac4322943bb3f9 (diff) | |
download | gnunet-gtk-db42fcb6a149eeb1e0368386d379395b6151abab.tar.gz gnunet-gtk-db42fcb6a149eeb1e0368386d379395b6151abab.zip |
- fix
-rw-r--r-- | src/gns/gnunet-gns-gtk_zone.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/gns/gnunet-gns-gtk_zone.c b/src/gns/gnunet-gns-gtk_zone.c index e17c8823..eb68f4a9 100644 --- a/src/gns/gnunet-gns-gtk_zone.c +++ b/src/gns/gnunet-gns-gtk_zone.c | |||
@@ -63,7 +63,7 @@ struct UpdateContext | |||
63 | char * name; | 63 | char * name; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | void | 66 | static void |
67 | check_name_validity_and_commit_remove_proc (void *cls, | 67 | check_name_validity_and_commit_remove_proc (void *cls, |
68 | int32_t success, | 68 | int32_t success, |
69 | const char *emsg) | 69 | const char *emsg) |
@@ -138,9 +138,8 @@ check_name_validity_and_commit (struct GNUNET_GNS_Context *gns, gchar *path) | |||
138 | struct GNUNET_NAMESTORE_RecordData *rd = GNUNET_malloc (children * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 138 | struct GNUNET_NAMESTORE_RecordData *rd = GNUNET_malloc (children * sizeof (struct GNUNET_NAMESTORE_RecordData)); |
139 | 139 | ||
140 | if (FALSE == gtk_tree_model_iter_children (gns->tm, &it, &parent)) | 140 | if (FALSE == gtk_tree_model_iter_children (gns->tm, &it, &parent)) |
141 | { | ||
142 | return; | 141 | return; |
143 | } | 142 | |
144 | for (c = 0; c < children; c++) | 143 | for (c = 0; c < children; c++) |
145 | { | 144 | { |
146 | gtk_tree_model_get(gns->tm, &it, | 145 | gtk_tree_model_get(gns->tm, &it, |
@@ -803,7 +802,8 @@ GNUNET_GNS_GTK_main_treeview_popup_menu_cb (GtkWidget *widget, | |||
803 | return TRUE; | 802 | return TRUE; |
804 | } | 803 | } |
805 | 804 | ||
806 | void set_relative_expiration_time (struct GNUNET_GNS_Context *gns, struct GNUNET_TIME_Relative reltime) | 805 | static void |
806 | set_relative_expiration_time (struct GNUNET_GNS_Context *gns, struct GNUNET_TIME_Relative reltime) | ||
807 | { | 807 | { |
808 | GtkTreeIter it; | 808 | GtkTreeIter it; |
809 | GtkTreeIter parent; | 809 | GtkTreeIter parent; |
@@ -815,28 +815,28 @@ void set_relative_expiration_time (struct GNUNET_GNS_Context *gns, struct GNUNET | |||
815 | char *path; | 815 | char *path; |
816 | int not_dummy; | 816 | int not_dummy; |
817 | 817 | ||
818 | if (TRUE == gtk_tree_selection_get_selected (ts, &tm, &it)) | 818 | if (FALSE == gtk_tree_selection_get_selected (ts, &tm, &it)) |
819 | { | 819 | return; |
820 | gtk_tree_model_get(tm, &it, TREE_COL_NOT_DUMMY_ROW, ¬_dummy, -1); | ||
821 | if (GNUNET_NO == not_dummy) | ||
822 | return; | ||
823 | 820 | ||
824 | /* Has parent? */ | 821 | gtk_tree_model_get(tm, &it, TREE_COL_NOT_DUMMY_ROW, ¬_dummy, -1); |
825 | has_parent = gtk_tree_model_iter_parent (tm, &parent, &it); | 822 | if (GNUNET_NO == not_dummy) |
823 | return; | ||
826 | 824 | ||
827 | if (FALSE == has_parent) | 825 | /* Has parent? */ |
828 | return; | 826 | has_parent = gtk_tree_model_iter_parent (tm, &parent, &it); |
829 | 827 | ||
830 | abstime = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), reltime); | 828 | if (FALSE == has_parent) |
829 | return; | ||
831 | 830 | ||
832 | /* this is a single record */ | 831 | abstime = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), reltime); |
833 | renderer = GTK_CELL_RENDERER_TEXT((gtk_builder_get_object (gns->builder, "GNUNET_GNS_GTK_name_cellrenderertext"))); | 832 | |
834 | path = gtk_tree_model_get_string_from_iter (tm, &it); | 833 | /* this is a single record */ |
835 | GNUNET_GNS_GTK_expiration_cellrenderertext_edited_cb (renderer, | 834 | renderer = GTK_CELL_RENDERER_TEXT((gtk_builder_get_object (gns->builder, "GNUNET_GNS_GTK_name_cellrenderertext"))); |
836 | path, | 835 | path = gtk_tree_model_get_string_from_iter (tm, &it); |
837 | convert_time_to_string (abstime), | 836 | GNUNET_GNS_GTK_expiration_cellrenderertext_edited_cb (renderer, |
838 | gns); | 837 | path, |
839 | } | 838 | convert_time_to_string (abstime), |
839 | gns); | ||
840 | } | 840 | } |
841 | 841 | ||
842 | 842 | ||
@@ -903,7 +903,8 @@ struct ZoneIteration_Context | |||
903 | char *label; | 903 | char *label; |
904 | }; | 904 | }; |
905 | 905 | ||
906 | void GNUNET_GNS_GTK_delete_popup_menu_delete_cb (GtkMenuItem *menuitem, | 906 | void |
907 | GNUNET_GNS_GTK_delete_popup_menu_delete_cb (GtkMenuItem *menuitem, | ||
907 | gpointer user_data) | 908 | gpointer user_data) |
908 | { | 909 | { |
909 | struct GNUNET_GNS_Context *gns = user_data; | 910 | struct GNUNET_GNS_Context *gns = user_data; |
@@ -916,7 +917,6 @@ void GNUNET_GNS_GTK_delete_popup_menu_delete_cb (GtkMenuItem *menuitem, | |||
916 | ts = gtk_tree_view_get_selection(gns->tv); | 917 | ts = gtk_tree_view_get_selection(gns->tv); |
917 | if (TRUE == gtk_tree_selection_get_selected (ts, &tm, &it)) | 918 | if (TRUE == gtk_tree_selection_get_selected (ts, &tm, &it)) |
918 | { | 919 | { |
919 | gtk_tree_selection_get_selected (ts, &tm, &it); | ||
920 | gtk_tree_model_get(tm, &it, TREE_COL_NOT_DUMMY_ROW, ¬_dummy, -1); | 920 | gtk_tree_model_get(tm, &it, TREE_COL_NOT_DUMMY_ROW, ¬_dummy, -1); |
921 | if (GNUNET_NO == not_dummy) | 921 | if (GNUNET_NO == not_dummy) |
922 | return; /* do not delete the dummy line */ | 922 | return; /* do not delete the dummy line */ |
@@ -927,7 +927,8 @@ void GNUNET_GNS_GTK_delete_popup_menu_delete_cb (GtkMenuItem *menuitem, | |||
927 | } | 927 | } |
928 | } | 928 | } |
929 | 929 | ||
930 | void zone_iteration_proc (void *cls, | 930 | static void |
931 | zone_iteration_proc (void *cls, | ||
931 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 932 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, |
932 | struct GNUNET_TIME_Absolute expire, | 933 | struct GNUNET_TIME_Absolute expire, |
933 | const char *name, | 934 | const char *name, |