aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk_common.c')
-rw-r--r--src/fs/gnunet-fs-gtk_common.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/fs/gnunet-fs-gtk_common.c b/src/fs/gnunet-fs-gtk_common.c
index 288a334b..f2f0d07c 100644
--- a/src/fs/gnunet-fs-gtk_common.c
+++ b/src/fs/gnunet-fs-gtk_common.c
@@ -123,49 +123,6 @@ GNUNET_FS_GTK_add_meta_data_to_list_store (void *cls, const char *plugin_name,
123 123
124 124
125/** 125/**
126 * Convert the year from the spin button to an expiration
127 * time (on midnight, January 1st of that year).
128 *
129 * @param spin button with an expiration year
130 * @return expiration time in the usual GNUnet format
131 */
132struct GNUNET_TIME_Absolute
133GNUNET_FS_GTK_get_expiration_time (GtkSpinButton * spin)
134{
135 struct GNUNET_TIME_Absolute ret;
136 int year;
137
138 year = gtk_spin_button_get_value_as_int (spin);
139 GNUNET_assert (year >= 0);
140 ret = GNUNET_FS_year_to_time ((unsigned int) year);
141 GNUNET_break (GNUNET_TIME_absolute_get ().abs_value_us < ret.abs_value_us);
142 return ret;
143}
144
145
146/**
147 * Initialize the 'expiration_year_adjustment' of the given
148 * builder to have a lower range of current-year+1 and a
149 * default of current-year+2.
150 *
151 * @param builder builder object for which we should manipulate
152 * the adjustment
153 */
154void
155GNUNET_FS_GTK_setup_expiration_year_adjustment (GtkBuilder * builder)
156{
157 GtkAdjustment *aj;
158 unsigned int year;
159
160 year = GNUNET_FS_get_current_year ();
161 aj = GTK_ADJUSTMENT (gtk_builder_get_object
162 (builder, "expiration_year_adjustment"));
163 gtk_adjustment_set_value (aj, year + 2);
164 gtk_adjustment_set_lower (aj, year + 1);
165}
166
167
168/**
169 * Obtain pixbuf from thumbnail data in meta data. 126 * Obtain pixbuf from thumbnail data in meta data.
170 * 127 *
171 * @param meta input meta data 128 * @param meta input meta data