aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-11 12:31:49 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-11 12:31:49 +0000
commitd47efb829ce86cf28c05df51452f2611cdc92c3c (patch)
treed669c7086e8ec415164e1ec2856b4ff9010028ed
parent9520082e85a60735dd0cea1776a49ef9682359d9 (diff)
downloadgnunet-gtk-d47efb829ce86cf28c05df51452f2611cdc92c3c.tar.gz
gnunet-gtk-d47efb829ce86cf28c05df51452f2611cdc92c3c.zip
-mionor code cleanup
-rw-r--r--src/fs/gnunet-fs-gtk_common.h22
-rw-r--r--src/fs/gnunet-fs-gtk_download-save-as.c2
-rw-r--r--src/fs/gnunet-fs-gtk_publish-edit-dialog.c10
3 files changed, 21 insertions, 13 deletions
diff --git a/src/fs/gnunet-fs-gtk_common.h b/src/fs/gnunet-fs-gtk_common.h
index 0a13e59d..9d8ba188 100644
--- a/src/fs/gnunet-fs-gtk_common.h
+++ b/src/fs/gnunet-fs-gtk_common.h
@@ -4,7 +4,7 @@
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
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
@@ -106,13 +106,13 @@ GNUNET_FS_GTK_add_meta_data_to_list_store (void *cls, const char *plugin_name,
106 106
107 107
108/** 108/**
109 * Converts metadata specified by @data of size @data_len 109 * Converts metadata specified by #data of size #data_len
110 * and saved in format @format to UTF-8 encoded string. 110 * and saved in format #format to UTF-8 encoded string.
111 * Works only for C-string and UTF8 metadata formats 111 * Works only for C-string and UTF8 metadata formats
112 * (returns NULL for everything else). 112 * (returns NULL for everything else).
113 * Verifies UTF-8 strings. 113 * Verifies UTF-8 strings.
114 * 114 *
115 * @param format format of the @data 115 * @param format format of the #data
116 * @param data data to convert 116 * @param data data to convert
117 * @param data_len length of the data buffer (in bytes) 117 * @param data_len length of the data buffer (in bytes)
118 * @return NULL if can't be converted, allocated string otherwise, 118 * @return NULL if can't be converted, allocated string otherwise,
@@ -174,6 +174,7 @@ GNUNET_GTK_find_largest_namespace_rating (void);
174void 174void
175GNUNET_GTK_set_largest_namespace_rating (int new_value); 175GNUNET_GTK_set_largest_namespace_rating (int new_value);
176 176
177
177/** 178/**
178 * Converts a GtkTreeRowReference to a GtkTreeIter. 179 * Converts a GtkTreeRowReference to a GtkTreeIter.
179 * 180 *
@@ -182,7 +183,9 @@ GNUNET_GTK_set_largest_namespace_rating (int new_value);
182 * @return GNUNET_OK if iter was filled, GNUNET_SYSERR otherwise 183 * @return GNUNET_OK if iter was filled, GNUNET_SYSERR otherwise
183 */ 184 */
184int 185int
185GNUNET_GTK_get_iter_from_reference (GtkTreeRowReference *rr, GtkTreeIter *iter); 186GNUNET_GTK_get_iter_from_reference (GtkTreeRowReference *rr,
187 GtkTreeIter *iter);
188
186 189
187/** 190/**
188 * Creates a GtkTreeRowReference from a GtkTreeIter. 191 * Creates a GtkTreeRowReference from a GtkTreeIter.
@@ -192,7 +195,9 @@ GNUNET_GTK_get_iter_from_reference (GtkTreeRowReference *rr, GtkTreeIter *iter);
192 * @return newly created reference or NULL in case of error 195 * @return newly created reference or NULL in case of error
193 */ 196 */
194GtkTreeRowReference * 197GtkTreeRowReference *
195GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model, GtkTreeIter *iter); 198GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model,
199 GtkTreeIter *iter);
200
196 201
197/** 202/**
198 * Fills "next_iter" with iterator for an item that comes next in the tree 203 * Fills "next_iter" with iterator for an item that comes next in the tree
@@ -213,7 +218,10 @@ GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model, GtkTreeIter *iter);
213 */ 218 */
214gboolean 219gboolean
215GNUNET_GTK_tree_model_get_next_flat_iter (GtkTreeModel *model, 220GNUNET_GTK_tree_model_get_next_flat_iter (GtkTreeModel *model,
216 GtkTreeIter *iter, gboolean allow_children, GtkTreeIter *next_iter); 221 GtkTreeIter *iter,
222 gboolean allow_children,
223 GtkTreeIter *next_iter);
224
217 225
218#endif 226#endif
219/* end of gnunet-fs-gtk-common.h */ 227/* end of gnunet-fs-gtk-common.h */
diff --git a/src/fs/gnunet-fs-gtk_download-save-as.c b/src/fs/gnunet-fs-gtk_download-save-as.c
index f33daa3a..84df8dc2 100644
--- a/src/fs/gnunet-fs-gtk_download-save-as.c
+++ b/src/fs/gnunet-fs-gtk_download-save-as.c
@@ -198,7 +198,7 @@ open_saveas_dialog (struct DownloadEntry *de, int download_directly)
198 GtkWidget *cb; 198 GtkWidget *cb;
199 GtkWidget *hb; 199 GtkWidget *hb;
200 200
201 dlc = GNUNET_malloc (sizeof (struct DownloadAsDialogContext)); 201 dlc = GNUNET_new (struct DownloadAsDialogContext);
202 dlc->de = de; 202 dlc->de = de;
203 dlc->download_directly = download_directly; 203 dlc->download_directly = download_directly;
204 dlc->builder = 204 dlc->builder =
diff --git a/src/fs/gnunet-fs-gtk_publish-edit-dialog.c b/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
index 786f0fe2..46ac1f63 100644
--- a/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
+++ b/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
@@ -1,10 +1,10 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 (C) 2005, 2006, 2010, 2012 Christian Grothoff (and other contributing authors) 3 (C) 2005-2013 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
7 by the Free Software Foundation; either version 2, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
@@ -84,7 +84,7 @@ enum PUBLISH_MetadataTypesModelColumns
84 /** 84 /**
85 * A gchararray. 85 * A gchararray.
86 */ 86 */
87 PUBLISH_METADATA_TYPES_MC_DESCRIPTION = 3, 87 PUBLISH_METADATA_TYPES_MC_DESCRIPTION = 3
88 }; 88 };
89 89
90 90
@@ -101,7 +101,7 @@ enum PUBLISH_TypesModelColumns
101 /** 101 /**
102 * A gchararray. 102 * A gchararray.
103 */ 103 */
104 PUBLISH_TYPES_MC_TYPE_NAME = 1, 104 PUBLISH_TYPES_MC_TYPE_NAME = 1
105 }; 105 };
106 106
107 107
@@ -118,7 +118,7 @@ enum PUBLISH_KeywordsModelColumns
118 /** 118 /**
119 * A gboolean. 119 * A gboolean.
120 */ 120 */
121 PUBLISH_TYPES_MC_ADDED = 1, 121 PUBLISH_TYPES_MC_ADDED = 1
122 }; 122 };
123 123
124 124