diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-07-02 12:03:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-07-02 12:03:43 +0000 |
commit | fba7c87e289f1e5a026e99d22ebb75d9e5340533 (patch) | |
tree | 9a11841b4783e8d2ba72d634e56adf887775659e | |
parent | 71ded2dbb125f11d42058fc706044542ac18aeb8 (diff) | |
download | gnunet-gtk-fba7c87e289f1e5a026e99d22ebb75d9e5340533.tar.gz gnunet-gtk-fba7c87e289f1e5a026e99d22ebb75d9e5340533.zip |
-expression cleanup
-rw-r--r-- | src/setup/gnunet-setup-gns.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/setup/gnunet-setup-gns.c b/src/setup/gnunet-setup-gns.c index 9348bfab..c9fed3b9 100644 --- a/src/setup/gnunet-setup-gns.c +++ b/src/setup/gnunet-setup-gns.c | |||
@@ -810,7 +810,7 @@ GNUNET_setup_gns_type_cellrenderercombo_edited_cb (GtkCellRendererCombo *combo, | |||
810 | is_valid = GNUNET_YES; | 810 | is_valid = GNUNET_YES; |
811 | GNUNET_free_non_null (data); | 811 | GNUNET_free_non_null (data); |
812 | } | 812 | } |
813 | if (not_dummy_row == TRUE) | 813 | if (not_dummy_row) |
814 | { | 814 | { |
815 | /* Updating an existing record */ | 815 | /* Updating an existing record */ |
816 | gtk_tree_store_set(ts, &it, | 816 | gtk_tree_store_set(ts, &it, |
@@ -978,7 +978,6 @@ GNUNET_setup_gns_value_cellrenderertext_edited_cb (GtkCellRendererText *renderer | |||
978 | } | 978 | } |
979 | GNUNET_free (old_value); | 979 | GNUNET_free (old_value); |
980 | } | 980 | } |
981 | |||
982 | if (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (type, | 981 | if (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (type, |
983 | new_text, | 982 | new_text, |
984 | &data, | 983 | &data, |
@@ -1022,12 +1021,14 @@ GNUNET_setup_gns_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer, | |||
1022 | return; | 1021 | return; |
1023 | 1022 | ||
1024 | gtk_tree_model_get_iter_from_string(tm, &it, path); | 1023 | gtk_tree_model_get_iter_from_string(tm, &it, path); |
1025 | gtk_tree_model_get(tm, &it, GNS_TREESTORE_COL_NOT_DUMMY_ROW, ¬_dummy, -1); | 1024 | gtk_tree_model_get(tm, &it, |
1026 | gtk_tree_model_get(tm, &it, GNS_TREESTORE_COL_NAME, &name, -1); | 1025 | GNS_TREESTORE_COL_NOT_DUMMY_ROW, ¬_dummy, |
1026 | GNS_TREESTORE_COL_NAME, &name, | ||
1027 | -1); | ||
1027 | 1028 | ||
1028 | if (not_dummy == FALSE) | 1029 | if (! not_dummy) |
1029 | { | 1030 | { |
1030 | /* update name */ | 1031 | /* change dummy line to new name, then add new dummy */ |
1031 | gtk_tree_store_set (ts, &it, | 1032 | gtk_tree_store_set (ts, &it, |
1032 | GNS_TREESTORE_COL_NAME, new_text, | 1033 | GNS_TREESTORE_COL_NAME, new_text, |
1033 | GNS_TREESTORE_COL_NAME_IS_VISIBLE, TRUE, | 1034 | GNS_TREESTORE_COL_NAME_IS_VISIBLE, TRUE, |
@@ -1045,8 +1046,8 @@ GNUNET_setup_gns_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer, | |||
1045 | GNS_TREESTORE_COL_NAME_IS_VISIBLE, TRUE, | 1046 | GNS_TREESTORE_COL_NAME_IS_VISIBLE, TRUE, |
1046 | GNS_TREESTORE_COL_RECORD_TYPE, GNUNET_DNSPARSER_TYPE_A, | 1047 | GNS_TREESTORE_COL_RECORD_TYPE, GNUNET_DNSPARSER_TYPE_A, |
1047 | GNS_TREESTORE_COL_NOT_DUMMY_ROW, FALSE, | 1048 | GNS_TREESTORE_COL_NOT_DUMMY_ROW, FALSE, |
1048 | GNS_TREESTORE_COL_IS_RECORD_ROW, FALSE, | 1049 | GNS_TREESTORE_COL_IS_RECORD_ROW, FALSE, |
1049 | -1); | 1050 | -1); |
1050 | } | 1051 | } |
1051 | } | 1052 | } |
1052 | else | 1053 | else |
@@ -1054,7 +1055,7 @@ GNUNET_setup_gns_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer, | |||
1054 | /* update name */ | 1055 | /* update name */ |
1055 | gtk_tree_store_set (ts, &it, GNS_TREESTORE_COL_NAME, new_text, -1); | 1056 | gtk_tree_store_set (ts, &it, GNS_TREESTORE_COL_NAME, new_text, -1); |
1056 | 1057 | ||
1057 | if (TRUE == gtk_tree_model_iter_children (tm, &child, &it)) | 1058 | if (gtk_tree_model_iter_children (tm, &child, &it)) |
1058 | { | 1059 | { |
1059 | do | 1060 | do |
1060 | { | 1061 | { |
@@ -1063,7 +1064,7 @@ GNUNET_setup_gns_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer, | |||
1063 | -1); | 1064 | -1); |
1064 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "New text for `%s' is `%s'\n", path, new_text); | 1065 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "New text for `%s' is `%s'\n", path, new_text); |
1065 | } | 1066 | } |
1066 | while (TRUE == gtk_tree_model_iter_next (tm, &child)); | 1067 | while (gtk_tree_model_iter_next (tm, &child)); |
1067 | } | 1068 | } |
1068 | 1069 | ||
1069 | check_name_validity_and_commit (gtk_tree_model_get_string_from_iter(tm, &it), name); | 1070 | check_name_validity_and_commit (gtk_tree_model_get_string_from_iter(tm, &it), name); |