Documentation updates
[hildon] / examples / hildon-insensitive-example.c
index fedcc96..1e0f34b 100644 (file)
@@ -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
 #include                                        <stdlib.h>
 #include                                        <glib.h>
 #include                                        <gtk/gtk.h>
-#include                                        "hildon.h"
+#include                                        <hildon/hildon.h>
 
 int
-main                                            (int argc, 
-                                                 char **args)
+main                                            (int argc,
+                                                 char **argv)
 {
-    gtk_init (&argc, &args);
-    
-    GtkDialog *dialog = GTK_DIALOG (gtk_dialog_new ());
+    hildon_gtk_init (&argc, &argv);
+
+    HildonWindow *window = HILDON_WINDOW (hildon_window_new ());
     GtkWidget *button = gtk_button_new_with_label ("Click me");
 
     hildon_helper_set_insensitive_message (button, "Do not poke me!");
     gtk_widget_set_sensitive (button, FALSE);
-    
-    gtk_box_pack_start (GTK_BOX (dialog->vbox), button, TRUE, TRUE, 0);
+       
+    gtk_container_add (GTK_CONTAINER (window), button);
 
-    gtk_dialog_add_button (dialog, "Close", GTK_RESPONSE_CLOSE);
+    g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL);
 
-    gtk_widget_show_all (GTK_WIDGET (dialog));
-    gtk_dialog_run (dialog);
+    gtk_widget_show_all (GTK_WIDGET (window));
+    gtk_main ();
     
     return 0;
 }