161 |
gtk_table_attach(GTK_TABLE(table), ivbox, 1,2,1,2, FALSE,FALSE,0,0); |
gtk_table_attach(GTK_TABLE(table), ivbox, 1,2,1,2, FALSE,FALSE,0,0); |
162 |
} |
} |
163 |
|
|
164 |
|
/* ----------- vbox containing all ratings ---------- */ |
165 |
|
GtkWidget *ratebox = gtk_vbox_new(FALSE, 0); |
166 |
|
|
167 |
/* ----------- box containing difficulty rating ---------- */ |
/* ----------- box containing difficulty rating ---------- */ |
168 |
if(cache->difficulty != 0) { |
if(cache->difficulty != 0) { |
169 |
ivbox = gtk_vbox_new(FALSE, 0); |
ivbox = gtk_vbox_new(FALSE, 0); |
173 |
gtk_box_pack_start(GTK_BOX(ivbox), |
gtk_box_pack_start(GTK_BOX(ivbox), |
174 |
icon_get_widget(ICON_STARS, (int)(cache->difficulty*2-2)), |
icon_get_widget(ICON_STARS, (int)(cache->difficulty*2-2)), |
175 |
FALSE, FALSE, 0); |
FALSE, FALSE, 0); |
176 |
gtk_table_attach(GTK_TABLE(table), ivbox, 2,3,0,1, |
|
177 |
GTK_EXPAND | GTK_FILL, 0, GTK_FILL, 0); |
GtkWidget *align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0); |
178 |
|
gtk_container_add(GTK_CONTAINER(align), ivbox); |
179 |
|
gtk_box_pack_start_defaults(GTK_BOX(ratebox), align); |
180 |
#ifndef USE_MAEMO |
#ifndef USE_MAEMO |
181 |
sprintf(str, _("Difficulty: %.1f"), cache->difficulty); |
sprintf(str, _("Difficulty: %.1f"), cache->difficulty); |
182 |
gtk_tooltips_set_tip(tips, ivbox, str, NULL); |
gtk_tooltips_set_tip(tips, ivbox, str, NULL); |
191 |
gtk_box_pack_start(GTK_BOX(ivbox), |
gtk_box_pack_start(GTK_BOX(ivbox), |
192 |
icon_get_widget(ICON_STARS, (int)(cache->terrain*2-2)), |
icon_get_widget(ICON_STARS, (int)(cache->terrain*2-2)), |
193 |
FALSE, FALSE, 0); |
FALSE, FALSE, 0); |
194 |
gtk_table_attach(GTK_TABLE(table), ivbox, 2,3,1,2, |
GtkWidget *align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0); |
195 |
GTK_EXPAND | GTK_FILL, 0, GTK_FILL, 0); |
gtk_container_add(GTK_CONTAINER(align), ivbox); |
196 |
|
gtk_box_pack_start_defaults(GTK_BOX(ratebox), align); |
197 |
#ifndef USE_MAEMO |
#ifndef USE_MAEMO |
198 |
sprintf(str, _("Terrain: %.1f"), cache->terrain); |
sprintf(str, _("Terrain: %.1f"), cache->terrain); |
199 |
gtk_tooltips_set_tip(tips, ivbox, str, NULL); |
gtk_tooltips_set_tip(tips, ivbox, str, NULL); |
200 |
#endif |
#endif |
201 |
} |
} |
202 |
|
|
203 |
|
/* --------------------- GCVote ------------------------ */ |
204 |
|
if(1) { |
205 |
|
float quality = 2.5; |
206 |
|
int votes = 2; |
207 |
|
|
208 |
|
ivbox = gtk_vbox_new(FALSE, 0); |
209 |
|
|
210 |
|
char *votes_str = g_strdup_printf(_("Quality (%d votes):"), votes); |
211 |
|
gtk_box_pack_start(GTK_BOX(ivbox), GTK_LABEL_SMALL(votes_str), |
212 |
|
FALSE, FALSE, 0); |
213 |
|
g_free(votes_str); |
214 |
|
gtk_box_pack_start(GTK_BOX(ivbox), |
215 |
|
icon_get_widget(ICON_STARS, (int)(quality*2-2)), FALSE, FALSE, 0); |
216 |
|
|
217 |
|
GtkWidget *align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0); |
218 |
|
gtk_container_add(GTK_CONTAINER(align), ivbox); |
219 |
|
gtk_box_pack_start_defaults(GTK_BOX(ratebox), align); |
220 |
|
#ifndef USE_MAEMO |
221 |
|
sprintf(str, _("Quality: %.1f"), quality); |
222 |
|
gtk_tooltips_set_tip(tips, ivbox, str, NULL); |
223 |
|
#endif |
224 |
|
} |
225 |
|
|
226 |
|
gtk_table_attach_defaults(GTK_TABLE(table), ratebox, 2,3,0,2); |
227 |
|
|
228 |
|
/* ----------------------------------------------------- */ |
229 |
|
|
230 |
|
|
231 |
/* ----------------- the two coordinates ----------------- */ |
/* ----------------- the two coordinates ----------------- */ |
232 |
/* ----------------- and the heading/distance ------------ */ |
/* ----------------- and the heading/distance ------------ */ |
233 |
pos_t *refpos = get_pos(appdata); |
pos_t *refpos = get_pos(appdata); |
252 |
|
|
253 |
gtk_table_attach_defaults(GTK_TABLE(table), ivbox, 3,4,0,2); |
gtk_table_attach_defaults(GTK_TABLE(table), ivbox, 3,4,0,2); |
254 |
|
|
|
/* ----------------------------------------------------- */ |
|
|
|
|
255 |
gtk_box_pack_start(GTK_BOX(vbox), table, 0,0,0); |
gtk_box_pack_start(GTK_BOX(vbox), table, 0,0,0); |
256 |
gtk_box_pack_start(GTK_BOX(vbox), gtk_hseparator_new(),FALSE,FALSE,0); |
gtk_box_pack_start(GTK_BOX(vbox), gtk_hseparator_new(),FALSE,FALSE,0); |
257 |
|
|
258 |
|
/* ----------------------------------------------------- */ |
259 |
|
|
260 |
if(cache->short_description) |
if(cache->short_description) |
261 |
gtk_box_pack_start_defaults(GTK_BOX(vbox), |
gtk_box_pack_start_defaults(GTK_BOX(vbox), |
262 |
html_view(appdata, cache->short_description, |
html_view(appdata, cache->short_description, |