Hello Vladimir
Please look at bar_comment.c
Replacing the text widget with libchamplain widget should be enough for the
beginning.
Vladimir
I have made an attempt to do something with libchamplain. The patch and
files are attached.
Beware that I don't know the C language, nor the gnu make system, nor
gnome/gtk, nor geeqie! In many places things will be wrong, and there
are places where to get something to work I have simply made a
quick-and-dirty hack. This is just to let you - and anyone else - know
where I'm at so far with this.
You will need the libchamplain-0.2.9 and libchamplain-gtk-0.2.9 from
http://projects.gnome.org/libchamplain/download. Run autogen.sh with
--enable-gps. The .png file goes in trunk/src/icons. And of course you
have to enable the gps map from the newly designed sidebar.
Right-click on the map shows the available maps. Middle-click cycles
through the layers (unfortunately the thumbnail view only works if
thumbnails are currently being shown). Multiple file selection is a
total mess.
Unless someone else comes up with another solution, I'll just keep
hacking away to try to improve things.
Colin Clark...
Index: configure.in
===
--- configure.in (revision 1600)
+++ configure.in (working copy)
@@ -328,6 +328,45 @@
AC_SUBST(LDFLAGS)
+# Libchamplain support - used for GPS map facility
+# --
+
+AC_ARG_ENABLE([gps],
+ AC_HELP_STRING([--enable-gps], [enable GPS map support]),
+[libgps=$enableval], [libgps=auto])
+
+if test x${libgps} == xyes; then
+ PKG_CHECK_MODULES(LIBCHAMPLAIN, [champlain-0.2 = 0.2.9],
+[
+ HAVE_LIBCHAMPLAIN=yes
+ AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [define to enable use of GPS maps])
+],
+[
+ HAVE_LIBCHAMPLAIN=no
+ AC_MSG_WARN([$LIBCHAMPLAIN_PKG_ERRORS])
+])
+else
+ HAVE_LIBCHAMPLAIN=disabled
+fi
+
+if test x${libgps} == xyes; then
+ PKG_CHECK_MODULES(LIBCHAMPLAIN_GTK, [champlain-gtk-0.2 = 0.2.9],
+[
+ HAVE_LIBCHAMPLAIN_GTK=yes
+ AC_DEFINE(HAVE_LIBCHAMPLAIN_GTK, 1, [define to enable use of GPS maps])
+],
+[
+ HAVE_LIBCHAMPLAIN_GTK=no
+ AC_MSG_WARN([$LIBCHAMPLAIN_GTK_PKG_ERRORS])
+])
+else
+ HAVE_LIBCHAMPLAIN_GTK=disabled
+fi
+
+AM_CONDITIONAL(HAVE_LIBCHAMPLAIN_GTK, [test x$HAVE_LIBCHAMPLAIN_GTK = xyes])
+AC_SUBST(LIBCHAMPLAIN_GTK_CFLAGS)
+AC_SUBST(LIBCHAMPLAIN_GTK_LIBS)
+
AH_TOP([
/** @file config.h
* autogenerated definition by autoheader.
@@ -398,7 +437,7 @@
Gtk: $GTK_CFLAGS
Glib: $GLIB_CFLAGS
Thread:$GTHREAD_LIBS
- Others: $LCMS_LIBS $EXIV2_LIBS
+ Others: $LCMS_LIBS $EXIV2_LIBS $LIBCHAMPLAIN_LIBS $LIBCHAMPLAIN_GTK_LIBS
Localization:
NLS support: $USE_NLS
@@ -414,6 +453,8 @@
LCMS: $HAVE_LCMS
Exiv2: $HAVE_EXIV2
Lirc: $HAVE_LIRC
+ Libchamplain: $HAVE_LIBCHAMPLAIN
+ Libchamplain-gtk: $HAVE_LIBCHAMPLAIN_GTK
Documentation:
Doxygen: $DOXYGEN
Index: src/bar.c
===
--- src/bar.c (revision 1600)
+++ src/bar.c (working copy)
@@ -24,11 +24,13 @@
#include ui_menu.h
#include bar_comment.h
+#include bar_gps.h
#include bar_keywords.h
#include bar_exif.h
#include bar_histogram.h
#include histogram.h
#include rcfile.h
+#include bar_gps.h
typedef struct _KnownPanes KnownPanes;
struct _KnownPanes
@@ -144,6 +146,21 @@
/layout
/gq;
+static const gchar default_config_gps[] =
+gq
+layout id = '_current_'
+bar
+pane_gps id = 'gps' expanded = 'true'
+map-source = 'Open Street Map - Mapnik'
+zoom-level = '11'
+latitude = '0.00'
+longitude = '0.00'
+marker-icon = './src/icons/red-dot.png'
+/
+/bar
+/layout
+/gq;
+
static const KnownPanes known_panes[] = {
/* default sidebar */
{PANE_HISTOGRAM, histogram, N_(Histogram), default_config_histogram},
@@ -155,6 +172,7 @@
{PANE_EXIF, file_info, N_(File info), default_config_file_info},
{PANE_EXIF, location, N_(Location), default_config_location},
{PANE_EXIF, copyright, N_(Copyright), default_config_copyright},
+ {PANE_GPS, gps, N_(GPS Map), default_config_gps},
{PANE_UNDEF, NULL, NULL, NULL}
};
Index: src/bar.h
===
--- src/bar.h (revision 1600)
+++ src/bar.h (working copy)
@@ -17,6 +17,7 @@
typedef enum {
PANE_UNDEF = 0,
PANE_COMMENT,
+ PANE_GPS,
PANE_EXIF,
PANE_HISTOGRAM,
PANE_KEYWORDS
Index: src/main.c
===
--- src/main.c (revision 1600)
+++ src/main.c (working copy)
@@ -748,7 +748,8 @@
file_data_register_notify_func(collect_manager_notify_cb, NULL, NOTIFY_PRIORITY_LOW);
gtkrc_load();
- gtk_init(argc, argv);
+// gtk_init(argc,