* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <config.h>
+#include "bar-gps.h"
-#ifdef HAVE_LIBCHAMPLAIN
-#ifdef HAVE_LIBCHAMPLAIN_GTK
+#include <cstring>
-#include "bar-gps.h"
+#include <cairo.h>
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+#include <champlain-gtk/champlain-gtk.h>
+G_GNUC_END_IGNORE_DEPRECATIONS
+#include <champlain/champlain.h>
+#include <clutter-gtk/clutter-gtk.h>
+#include <clutter/clutter.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <pango/pango.h>
+
+#include <config.h>
#include "bar.h"
#include "compat.h"
#include "intl.h"
#include "layout.h"
#include "main-defines.h"
-#include "menu.h"
#include "metadata.h"
#include "misc.h"
#include "rcfile.h"
#include "thumb.h"
+#include "typedefs.h"
#include "ui-menu.h"
#include "ui-utildlg.h"
#include "uri-utils.h"
-#include <champlain-gtk/champlain-gtk.h>
-#include <champlain/champlain.h>
-#include <clutter-gtk/clutter-gtk.h>
+namespace
+{
+
+constexpr gint THUMB_SIZE = 100;
+constexpr int DIRECTION_SIZE = 300;
+
+} // namespace
#define MARKER_COLOUR 0x00, 0x00, 0xff, 0xff
#define TEXT_COLOUR 0x00, 0x00, 0x00, 0xff
#define THUMB_COLOUR 0xff, 0xff, 0xff, 0xff
-#define THUMB_SIZE 100
-
-#define DIRECTION_SIZE 300
/*
*-------------------------------------------------------------------
g_list_free(pgd->geocode_list);
}
- static void bar_pane_gps_dnd_receive(GtkWidget *pane, GdkDragContext *,
+static void bar_pane_gps_dnd_receive(GtkWidget *pane, GdkDragContext *,
gint x, gint y,
GtkSelectionData *selection_data, guint info,
guint, gpointer)
longitude = metadata_read_GPS_coord(fd, "Xmp.exif.GPSLongitude", 0);
compass = metadata_read_GPS_direction(fd, "Xmp.exif.GPSImgDirection", 1000);
- if (!(latitude == 0 && longitude == 0))
+ if (latitude != 0 || longitude != 0)
{
pgd->num_added++;
gd = generic_dialog_new(_("Map centering"),
"map_centering", nullptr, TRUE, nullptr, pgd);
- generic_dialog_add_message(gd, GQ_ICON_DIALOG_INFO,
- "Map Centering", message->str, TRUE);
+ generic_dialog_add_message(gd, GQ_ICON_DIALOG_INFO, _("Map Centering"), message->str, TRUE);
generic_dialog_add_button(gd, GQ_ICON_OK, "OK", nullptr, TRUE);
gtk_widget_show(gd->dialog);
g_string_free(message, TRUE);
}
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
static gboolean bar_pane_gps_map_keypress_cb(GtkWidget *, GdkEventButton *bevent, gpointer data)
{
/* @FIXME GTK4 stub */
gtk_container_add(GTK_CONTAINER(frame), vbox);
status = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
-#ifdef HAVE_GTK4
+#if HAVE_GTK4
slider = gtk_scale_button_new(1, 17, 1, slider_icons);
#else
slider = gtk_scale_button_new(GTK_ICON_SIZE_SMALL_TOOLBAR, 1, 17, 1, slider_icons);
bar_update_expander(pane);
}
-#endif
-#endif
-
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */