X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=examples%2Fhildon-color-button-example.c;h=42a17bbd4eab2b3506b627951ffa67594a9bce95;hb=51cf0ca0231449cbd5055627c1cb9f5f344be283;hp=e53493434b9e5f2145cb1666e1a8896a99c06845;hpb=141ec6aaade8f6bb96efe3e7049947e170773881;p=hildon diff --git a/examples/hildon-color-button-example.c b/examples/hildon-color-button-example.c index e534934..42a17bb 100644 --- a/examples/hildon-color-button-example.c +++ b/examples/hildon-color-button-example.c @@ -8,7 +8,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; version 2.1 of - * the License. + * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,14 +26,14 @@ #include #include #include -#include "hildon.h" +#include int -main (int argc, - char **args) +main (int argc, + char **argv) { - gtk_init (&argc, &args); - + hildon_gtk_init (&argc, &argv); + GtkDialog *dialog = GTK_DIALOG (gtk_dialog_new ()); GtkWidget *button = hildon_color_button_new (); GtkWidget *label = gtk_label_new ("Pick the color:"); @@ -47,6 +47,11 @@ main (int argc, gtk_widget_show_all (GTK_WIDGET (dialog)); gtk_dialog_run (dialog); + + GdkColor *color; + g_object_get (G_OBJECT (button), "color", &color, NULL); + + g_debug ("Color is: %d %d %d", color->red, color->green, color->blue); return 0; }