From a97dea0d4b8e1f2a7682bc7787e5b66143695070 Mon Sep 17 00:00:00 2001 From: monsta Date: Fri, 27 Jan 2017 15:05:00 +0300 Subject: [GTK+3] clock: fix runtime warning about invalid signal port of 02b7511302cef8b527cbc45c1ac674ab28f2dc01 to mixed GTK+2/3 code --- applets/clock/clock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/applets/clock/clock.c b/applets/clock/clock.c index 17aeb172..35720bdf 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -1330,6 +1330,7 @@ do_not_eat_button_press (GtkWidget *widget, return FALSE; } +#if !GTK_CHECK_VERSION (3, 0, 0) /* Don't request smaller size then the last one we did, this avoids jumping when proportional fonts are used. We must take care to call "unfix_size" whenever options are changed or such where @@ -1346,6 +1347,7 @@ clock_size_request (GtkWidget *clock, GtkRequisition *req, gpointer data) req->width = cd->fixed_width; req->height = cd->fixed_height; } +#endif static void clock_update_text_gravity (GtkWidget *label) @@ -1428,9 +1430,12 @@ create_main_clock_label (ClockData *cd) GtkWidget *label; label = gtk_label_new (NULL); + +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect (label, "size_request", G_CALLBACK (clock_size_request), cd); +#endif g_signal_connect_swapped (label, "style_set", G_CALLBACK (unfix_size), cd); -- cgit v1.2.1