X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fhildon-code-dialog-example.c;h=a43ac09c6f6344335fc7c1168e544ad8fb891e06;hb=a6a438fefa4f44520b42921abe02f3c78df1b2e7;hp=4af5d45ba65b90a2a0b900817818059566b4d055;hpb=c8e3f98569b02869492eb25481726a5cb6538ad4;p=hildon diff --git a/examples/hildon-code-dialog-example.c b/examples/hildon-code-dialog-example.c index 4af5d45..a43ac09 100644 --- a/examples/hildon-code-dialog-example.c +++ b/examples/hildon-code-dialog-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,26 @@ #include #include #include -#include "hildon.h" +#include + +static gboolean +on_input (void); + +gboolean +on_input (void) +{ + g_debug ("Input in the code dialog!"); + return TRUE; +} int -main (int argc, char **args) +main (int argc, + char **argv) { - gtk_init (&argc, &args); - + hildon_gtk_init (&argc, &argv); + GtkDialog *dialog = GTK_DIALOG (hildon_code_dialog_new ()); + g_signal_connect (G_OBJECT (dialog), "input", G_CALLBACK (on_input), NULL); gtk_widget_show_all (GTK_WIDGET (dialog)); gtk_dialog_run (dialog);