Use GSourceFunc instead of GtkFunction, gtk_widget_get_realized instead of GTK_WIDGET_REALIZED

This commit is contained in:
Andre Miranda 2016-05-26 00:27:22 -03:00
parent f5ddcf2feb
commit 2d8830bd01

View file

@ -167,7 +167,7 @@ timer_cb(EyesPlugin *eyes)
for (i = 0; i < eyes->num_eyes; i++) for (i = 0; i < eyes->num_eyes; i++)
{ {
if (GTK_WIDGET_REALIZED(eyes->eyes[i])) if (gtk_widget_get_realized (eyes->eyes[i]))
{ {
gdk_window_get_pointer(eyes->eyes[i]->window, &x, &y, NULL); gdk_window_get_pointer(eyes->eyes[i]->window, &x, &y, NULL);
@ -278,7 +278,7 @@ eyes_applet_fill(EyesPlugin *eyes)
if (eyes->timeout_id == 0) if (eyes->timeout_id == 0)
{ {
eyes->timeout_id = g_timeout_add (UPDATE_TIMEOUT, eyes->timeout_id = g_timeout_add (UPDATE_TIMEOUT,
(GtkFunction)timer_cb, eyes); (GSourceFunc)timer_cb, eyes);
} }
return TRUE; return TRUE;