X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fplugins%2Ftest.c;h=8d12dc1172faec9fe1736cc3b919af511077c821;hp=8a7e8a6588c39877bb4605ae46985f883384f3c1;hb=67a63167629adc48ff31530dd58ece577f3d7460;hpb=8594927c0cd07daea95e8b99dc36ffef4f12da8a diff --git a/src/plugins/test.c b/src/plugins/test.c index 8a7e8a6..8d12dc1 100644 --- a/src/plugins/test.c +++ b/src/plugins/test.c @@ -65,9 +65,9 @@ static gboolean on_poly_key(GritsPoly *poly, GdkEventKey *event) { g_debug("GritsPluginTest: on_poly_key - %d", event->keyval); gdouble colors[0xff][3] = { - [GDK_r] {1, 0, 0}, - [GDK_g] {0, 1, 0}, - [GDK_b] {0, 0, 1}, + [GDK_KEY_r] {1, 0, 0}, + [GDK_KEY_g] {0, 1, 0}, + [GDK_KEY_b] {0, 0, 1}, }; if (event->keyval >= G_N_ELEMENTS(colors)) return FALSE; @@ -177,9 +177,9 @@ static void grits_plugin_test_dispose(GObject *_test) if (test->viewer) { GritsViewer *viewer = test->viewer; test->viewer = NULL; - grits_viewer_remove(viewer, GRITS_OBJECT(test->marker)); - grits_viewer_remove(viewer, GRITS_OBJECT(test->poly)); - grits_viewer_remove(viewer, GRITS_OBJECT(test->line)); + grits_object_destroy_pointer(&test->marker); + grits_object_destroy_pointer(&test->poly); + grits_object_destroy_pointer(&test->line); g_object_unref(viewer); } G_OBJECT_CLASS(grits_plugin_test_parent_class)->dispose(_test);