[gnome-control-center/wip/animated-notebook] shell: Add test app for the CcNotebook



commit 5a1084f410374df230fea342440b1bc9d357c10a
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Apr 30 19:36:54 2012 +0100

    shell: Add test app for the CcNotebook

 shell/Makefile.am     |    5 +++++
 shell/test-notebook.c |   27 +++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/shell/Makefile.am b/shell/Makefile.am
index b785b7e..d59ba3a 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -69,6 +69,11 @@ directory_in_files = gnomecc.directory.in
 directory_DATA = $(directory_in_files:.directory.in=.directory)
 @INTLTOOL_DIRECTORY_RULE@
 
+noinst_PROGRAMS = test-notebook
+test_notebook_SOURCES = test-notebook.c cc-notebook.c cc-notebook.h
+test_notebook_CFLAGS = $(SHELL_CFLAGS)
+test_notebook_LDADD = $(SHELL_LIBS)
+
 EXTRA_DIST =					\
 	$(ui_DATA)				\
 	gnome-control-center.desktop.in.in	\
diff --git a/shell/test-notebook.c b/shell/test-notebook.c
new file mode 100644
index 0000000..59ac151
--- /dev/null
+++ b/shell/test-notebook.c
@@ -0,0 +1,27 @@
+#include <gtk/gtk.h>
+#include <clutter-gtk/clutter-gtk.h>
+#include "cc-notebook.h"
+
+int main (int argc, char **argv)
+{
+	GtkWidget *window, *notebook;
+
+	if (gtk_clutter_init (&argc, &argv) == FALSE) {
+		g_warning ("ARGGGHH");
+		return 1;
+	}
+
+	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+	gtk_window_resize (GTK_WINDOW (window), 500, 500);
+
+	notebook = cc_notebook_new ();
+	gtk_container_add (GTK_CONTAINER (window), notebook);
+
+	gtk_container_add (GTK_CONTAINER (notebook), gtk_label_new ("fhdkhfjksdhkfjsdhk"));
+	gtk_container_add (GTK_CONTAINER (notebook), gtk_label_new ("fhdkhfjksdhkfjsdhk2"));
+
+	gtk_widget_show_all (window);
+	gtk_main ();
+
+	return 0;
+}



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