From c68a7a3ab54be70c39cba417fd23a5641796dde1 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Sun, 4 Nov 2007 22:05:09 +0200 Subject: [PATCH] A bit larger info window. Small html change. --- src/poi-gui.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/poi-gui.c b/src/poi-gui.c index dcb1e1a..4d9ecd0 100644 --- a/src/poi-gui.c +++ b/src/poi-gui.c @@ -684,30 +684,34 @@ GtkWidget *info; GtkWidget *sw; poi_info *p; gchar *phtml; +gint ls; p=poi_get_by_id(poi_id); if (!p) return FALSE; +ls=strlen(p->label); + phtml=g_strdup_printf( "" - "%s
" - "
" - "Location: %f, %f
" - "Public: %s
" - "Source: %s
" - "
" - "
Category:
%s
" - "Description:
%s
" - "
URL:%s
Postal Code:%s
" - "", - strlen(p->label)>0 ? p->label : "Unnamed POI", + "%s%s
" + "Location:
%f, %f
" + "Public:%s
" + "Source:%s
" + "Category:
%s
" + "Description:
%s
" + "URL:%s
" + "Postal Code:%s
" + "
", + ls>0 ? p->label : p->cat_label, + ls==0 ? " (No name)" : "", p->lat, p->lon, p->public==1 ? "Yes" : "No", p->source==POI_SOURCE_OSM ? "OpenStreetMap" : "Other", p->cat_label ? p->cat_label : "", p->desc ? p->desc : "", p->url ? p->url : "", + p->url ? p->url : "", p->postal_code ? p->postal_code : ""); dialog=gtk_dialog_new_with_buttons(_("POI"), @@ -717,6 +721,8 @@ dialog=gtk_dialog_new_with_buttons(_("POI"), GTK_RESPONSE_ACCEPT, NULL); +/* XXX: Add edit button */ + info=gtk_html_new(); gtk_html_set_editable(GTK_HTML(info), FALSE); sw=gtk_scrolled_window_new(NULL, NULL); @@ -726,7 +732,7 @@ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), sw, TRUE, TRUE, 0); gtk_html_load_from_string(info, phtml, -1); -gtk_window_set_default_size(GTK_WINDOW(dialog), 400, 250); +gtk_window_set_default_size(GTK_WINDOW(dialog), 500, 250); gtk_widget_show_all(dialog); gtk_dialog_run(dialog); gtk_widget_destroy(dialog); -- 2.39.5