[gnome-devel-docs] Python samples: Xincluded window.c into window.c.page



commit 2d2c89170c116da38a91a86f4915da2a6d0f1687
Author: Tiffany Antopolski <tiffany antopolski gmail com>
Date:   Sat Apr 28 01:17:41 2012 -0400

    Python samples: Xincluded window.c into window.c.page
    
    - updated Makefile.am

 platform-demos/C/window.c.page |   34 ++++------------------------------
 platform-demos/Makefile.am     |    1 +
 2 files changed, 5 insertions(+), 30 deletions(-)
---
diff --git a/platform-demos/C/window.c.page b/platform-demos/C/window.c.page
index 6bf1d4b..304b54c 100644
--- a/platform-demos/C/window.c.page
+++ b/platform-demos/C/window.c.page
@@ -1,4 +1,5 @@
 <page xmlns="http://projectmallard.org/1.0/";
+      xmlns:xi="http://www.w3.org/2001/XInclude";
       type="guide" style="task"
       id="window.c">
   <info>
@@ -18,36 +19,9 @@
   <media type="image" mime="image/png" src="media/window.png"/>
   <p>A minimal GtkApplication.</p>
 
-      <code mime="text/x-csrc" style="numbered"><![CDATA[
-#include <gtk/gtk.h>
-
-static void
-activate (GtkApplication *app,
-          gpointer        user_data)
-{
-  GtkWidget *window;
-
-  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
-  gtk_window_set_application (GTK_WINDOW (window), GTK_APPLICATION (app));
-  gtk_window_set_title (GTK_WINDOW (window), "Hello GNOME");
-
-  gtk_widget_show_all (GTK_WIDGET (window));
-}
-
-int
-main (int argc, char **argv)
-{
-  GtkApplication *app;
-  int status;
-
-  app = gtk_application_new ("org.gtk.example",G_APPLICATION_FLAGS_NONE);
-  g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
-  status = g_application_run (G_APPLICATION (app), argc, argv);
-  g_object_unref (app);
-  return status;
-}
-]]></code>
+      <code mime="text/x-csrc" style="numbered">
+<xi:include href="samples/window.c" parse="text"><xi:fallback/></xi:include>
+</code>
 <p>
   In this sample we used the following:
 </p>
diff --git a/platform-demos/Makefile.am b/platform-demos/Makefile.am
index 85c3d0d..926f47c 100644
--- a/platform-demos/Makefile.am
+++ b/platform-demos/Makefile.am
@@ -26,6 +26,7 @@ demo_sources = \
 	samples/dialog.vala			\
 	samples/grid.py				\
 	samples/GtkApplicationWindow.vala	\
+	samples/window.c			\
 	samples/window.py			\
 	samples/window.vala			\
 	media/gnome-devtools.catalog



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]