diff console/libgnt/test/focus.c @ 13960:a06f7495af6f

[gaim-migrate @ 16513] It is possible to have multiple gnt-applications sharing the same screen. To try this, 'make WM' in console/libgnt/test. It will have a small 'Command' entry. You can give a command like './focus.so' (or one of the other examples). The applications can also be executed standalone. This required some tinkering to the Makefile. I am not sure whether there is an easier way of doing it. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 17 Jul 2006 22:27:26 +0000
parents 8b2306c64efa
children 0a0d2a1fd2bc
line wrap: on
line diff
--- a/console/libgnt/test/focus.c	Mon Jul 17 21:33:50 2006 +0000
+++ b/console/libgnt/test/focus.c	Mon Jul 17 22:27:26 2006 +0000
@@ -20,16 +20,15 @@
 
 int main()
 {
+#ifdef STANDALONE
 	freopen(".error", "w", stderr);
 	gnt_init();
-
+#endif
+	
 	GntWidget *label = gnt_label_new("So wassup dudes and dudettes!!\nSo this is, like,\nthe third line!! \\o/");
 	GntWidget *vbox, *hbox, *tree, *box, *button;
 	WINDOW *test;
 
-	box(stdscr, 0, 0);
-	wrefresh(stdscr);
-
 	vbox = gnt_box_new(FALSE, FALSE);
 	hbox = gnt_box_new(FALSE, TRUE);
 	gnt_box_set_alignment(GNT_BOX(hbox), GNT_ALIGN_MID);
@@ -58,7 +57,6 @@
 	GNT_WIDGET_UNSET_FLAGS(hbox, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW);
 	gnt_box_set_title(GNT_BOX(hbox), "This is the title …");
 
-
 	g_signal_connect(G_OBJECT(tree), "toggled", G_CALLBACK(toggled), NULL);
 
 	button = gnt_button_new("one");
@@ -77,9 +75,11 @@
 	
 	gnt_widget_show(hbox);
 
+#ifdef STANDALONE
 	gnt_main();
 
 	gnt_quit();
+#endif
 
 	return 0;
 }