comparison src/bar.c @ 1602:6bfe8fc7a403

added GPS map support - patch by Colin Clark
author nadvornik
date Tue, 12 May 2009 18:25:18 +0000
parents c776b1310ca6
children 2ef885dfa3a7
comparison
equal deleted inserted replaced
1601:2b70f2a4adbf 1602:6bfe8fc7a403
27 #include "bar_keywords.h" 27 #include "bar_keywords.h"
28 #include "bar_exif.h" 28 #include "bar_exif.h"
29 #include "bar_histogram.h" 29 #include "bar_histogram.h"
30 #include "histogram.h" 30 #include "histogram.h"
31 #include "rcfile.h" 31 #include "rcfile.h"
32 #include "bar_gps.h"
32 33
33 typedef struct _KnownPanes KnownPanes; 34 typedef struct _KnownPanes KnownPanes;
34 struct _KnownPanes 35 struct _KnownPanes
35 { 36 {
36 PaneType type; 37 PaneType type;
142 " </pane_exif>" 143 " </pane_exif>"
143 " </bar>" 144 " </bar>"
144 " </layout>" 145 " </layout>"
145 "</gq>"; 146 "</gq>";
146 147
148 #ifdef HAVE_LIBCHAMPLAIN
149 #ifdef HAVE_LIBCHAMPLAIN_GTK
150 static const gchar default_config_gps[] =
151 "<gq>"
152 " <layout id = '_current_'>"
153 " <bar>"
154 " <pane_gps id = 'gps' expanded = 'true'"
155 " map-id = 'osm::mapnik'"
156 " zoom-level = '8'"
157 " latitude = '50116666'"
158 " longitude = '8683333' />"
159 " </bar>"
160 " </layout>"
161 "</gq>";
162 #endif
163 #endif
164
147 static const KnownPanes known_panes[] = { 165 static const KnownPanes known_panes[] = {
148 /* default sidebar */ 166 /* default sidebar */
149 {PANE_HISTOGRAM, "histogram", N_("Histogram"), default_config_histogram}, 167 {PANE_HISTOGRAM, "histogram", N_("Histogram"), default_config_histogram},
150 {PANE_COMMENT, "title", N_("Title"), default_config_title}, 168 {PANE_COMMENT, "title", N_("Title"), default_config_title},
151 {PANE_KEYWORDS, "keywords", N_("Keywords"), default_config_keywords}, 169 {PANE_KEYWORDS, "keywords", N_("Keywords"), default_config_keywords},
153 {PANE_EXIF, "exif", N_("Exif"), default_config_exif}, 171 {PANE_EXIF, "exif", N_("Exif"), default_config_exif},
154 /* other pre-configured panes */ 172 /* other pre-configured panes */
155 {PANE_EXIF, "file_info", N_("File info"), default_config_file_info}, 173 {PANE_EXIF, "file_info", N_("File info"), default_config_file_info},
156 {PANE_EXIF, "location", N_("Location and GPS"), default_config_location}, 174 {PANE_EXIF, "location", N_("Location and GPS"), default_config_location},
157 {PANE_EXIF, "copyright", N_("Copyright"), default_config_copyright}, 175 {PANE_EXIF, "copyright", N_("Copyright"), default_config_copyright},
158 176 #ifdef HAVE_LIBCHAMPLAIN
177 #ifdef HAVE_LIBCHAMPLAIN_GTK
178 {PANE_GPS, "gps", N_("GPS Map"), default_config_gps},
179 #endif
180 #endif
159 {PANE_UNDEF, NULL, NULL, NULL} 181 {PANE_UNDEF, NULL, NULL, NULL}
160 }; 182 };
161 183
162 typedef struct _BarData BarData; 184 typedef struct _BarData BarData;
163 struct _BarData 185 struct _BarData