aboutsummaryrefslogtreecommitdiff
path: root/libmap
diff options
context:
space:
mode:
Diffstat (limited to 'libmap')
-rw-r--r--libmap/Makefile.in4
-rw-r--r--libmap/cc-timezone-map.c52
2 files changed, 12 insertions, 44 deletions
diff --git a/libmap/Makefile.in b/libmap/Makefile.in
index e1ca444..44d6f90 100644
--- a/libmap/Makefile.in
+++ b/libmap/Makefile.in
@@ -142,6 +142,7 @@ DATADIRNAME = @DATADIRNAME@
DBUSSERVICEDIR = @DBUSSERVICEDIR@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -187,6 +188,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
@@ -229,6 +231,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -262,7 +265,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
diff --git a/libmap/cc-timezone-map.c b/libmap/cc-timezone-map.c
index 7b7d704..5ce1354 100644
--- a/libmap/cc-timezone-map.c
+++ b/libmap/cc-timezone-map.c
@@ -601,7 +601,6 @@ cc_timezone_map_finalize (GObject *object)
}
/* GtkWidget functions */
-#ifdef CCGTK3
static void
cc_timezone_map_get_preferred_width (GtkWidget *widget,
gint *minimum,
@@ -634,25 +633,6 @@ cc_timezone_map_get_preferred_height (GtkWidget *widget,
*natural = size;
}
-#else
-
-static void
-cc_timezone_map_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- CcTimezoneMapPrivate *priv = CC_TIMEZONE_MAP (widget)->priv;
-
- if (!requisition)
- return;
-
- /* The + 20 here is a slight tweak to make the map fill the
- * panel better without causing horizontal growing
- */
- requisition->height = 300 * gdk_pixbuf_get_height (priv->orig_background) / gdk_pixbuf_get_width (priv->orig_background) + 20;
- requisition->width = 300;
-}
-#endif
-
static void
cc_timezone_map_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
@@ -853,21 +833,6 @@ cc_timezone_map_draw (GtkWidget *widget,
return TRUE;
}
-#ifndef CCGTK3
-static gboolean
-cc_timezone_map_expose_event (GtkWidget *widget,
- GdkEventExpose *event)
-{
- gboolean rv;
- cairo_t *cr;
- cr = gdk_cairo_create (widget->window);
- rv = cc_timezone_map_draw (widget, cr);
- cairo_destroy (cr);
- return rv;
-}
-#endif
-
-
static void
cc_timezone_map_class_init (CcTimezoneMapClass *klass)
{
@@ -881,19 +846,11 @@ cc_timezone_map_class_init (CcTimezoneMapClass *klass)
object_class->dispose = cc_timezone_map_dispose;
object_class->finalize = cc_timezone_map_finalize;
-#ifdef CCGTK3
widget_class->get_preferred_width = cc_timezone_map_get_preferred_width;
widget_class->get_preferred_height = cc_timezone_map_get_preferred_height;
-#else
- widget_class->size_request = cc_timezone_map_size_request;
-#endif
widget_class->size_allocate = cc_timezone_map_size_allocate;
widget_class->realize = cc_timezone_map_realize;
-#ifdef CCGTK3
widget_class->draw = cc_timezone_map_draw;
-#else
- widget_class->expose_event = cc_timezone_map_expose_event;
-#endif
signals[LOCATION_CHANGED] = g_signal_new ("location-changed",
CC_TYPE_TIMEZONE_MAP,
@@ -1015,6 +972,13 @@ button_press_event (GtkWidget *widget,
}
static void
+state_flags_changed (GtkWidget *widget)
+{
+ // To catch sensitivity changes
+ gtk_widget_queue_draw (widget);
+}
+
+static void
load_backward_tz (CcTimezoneMap *self)
{
GError *error = NULL;
@@ -1108,6 +1072,8 @@ cc_timezone_map_init (CcTimezoneMap *self)
g_signal_connect (self, "button-press-event", G_CALLBACK (button_press_event),
NULL);
+ g_signal_connect (self, "state-flags-changed", G_CALLBACK (state_flags_changed),
+ NULL);
load_backward_tz (self);
}