#include "util.h"
#include "globals.h"
-static void webtool_center_class_init ( VikWebtoolCenterClass *klass );
-static void webtool_center_init ( VikWebtoolCenter *vwd );
-
static GObjectClass *parent_class;
static void webtool_center_finalize ( GObject *gob );
VIK_WEBTOOL_CENTER_TYPE, \
VikWebtoolCenterPrivate))
-GType vik_webtool_center_get_type()
-{
- static GType w_type = 0;
-
- if (!w_type)
- {
- static const GTypeInfo w_info =
- {
- sizeof (VikWebtoolCenterClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) webtool_center_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (VikWebtoolCenter),
- 0,
- (GInstanceInitFunc) webtool_center_init,
- };
- w_type = g_type_register_static ( VIK_WEBTOOL_TYPE, "VikWebtoolCenter", &w_info, 0 );
- }
-
- return w_type;
-}
+G_DEFINE_TYPE (VikWebtoolCenter, vik_webtool_center, VIK_WEBTOOL_TYPE)
enum
{
}
}
-static void webtool_center_class_init ( VikWebtoolCenterClass *klass )
+static void
+vik_webtool_center_class_init ( VikWebtoolCenterClass *klass )
{
GObjectClass *gobject_class;
VikWebtoolClass *base_class;
return result;
}
-static void webtool_center_init ( VikWebtoolCenter *self )
+static void
+vik_webtool_center_init ( VikWebtoolCenter *self )
{
VikWebtoolCenterPrivate *priv = WEBTOOL_CENTER_GET_PRIVATE (self);
priv->url = NULL;
return i;
}
}
- return 255;
+ // Handle mpp smaller than 1
+ // return a useful value such that '17 - this number' gives a natural number.
+ // Ideally should return '-1' or '0.5' but that's tricky with an unsigned int type!
+ // (i.e. should rework to support zoom levels of 18 or 19)
+ return 0;
}
static gchar *webtool_center_get_url ( VikWebtool *self, VikWindow *vwindow )