[gitg: 4/36] Add selection on-start testcase from #689060
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg: 4/36] Add selection on-start testcase from #689060
- Date: Tue, 19 Feb 2013 21:54:58 +0000 (UTC)
commit 83bdd9a3a274092801388288cfb6e74a40ea0199
Author: Alexander Larsson <alexl redhat com>
Date: Mon Dec 10 16:46:37 2012 +0100
Add selection on-start testcase from #689060
Makefile.am | 11 ++++++++++-
test-sel.c | 22 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4d3570d..92bd0a3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,16 @@ noinst_LTLIBRARIES = libegglistbox.la
libegglistbox_la_SOURCES = egg-list-box.c egg-list-box.h
libegglistbox_la_LIBADD = $(LISTBOX_LIBS)
-noinst_PROGRAMS = test-list test-scrolled test-focus
+noinst_PROGRAMS = test-list test-scrolled test-focus test-sel
+
+test_sel_SOURCES = \
+ test-sel.c \
+ $(NULL)
+
+test_sel_LDADD = \
+ $(LISTBOX_LIBS) \
+ libegglistbox.la \
+ $(NULL)
test_list_SOURCES = \
test-list.vala \
diff --git a/test-sel.c b/test-sel.c
new file mode 100644
index 0000000..ee2577b
--- /dev/null
+++ b/test-sel.c
@@ -0,0 +1,22 @@
+
+#include <gtk/gtk.h>
+#include <egg-list-box.h>
+
+GtkWidget *window;
+GtkWidget *box;
+
+int main() {
+ GtkWidget *s;
+ gtk_init (0, NULL);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ box = GTK_WIDGET (egg_list_box_new ());
+ gtk_container_add (GTK_CONTAINER (box), gtk_label_new ("one"));
+ s = gtk_label_new ("two");
+ gtk_container_add (GTK_CONTAINER (box), s);
+ egg_list_box_select_child (EGG_LIST_BOX (box), s);
+ gtk_container_add (GTK_CONTAINER (box), gtk_label_new ("three"));
+ gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_widget_show_all (window);
+ gtk_main ();
+ return 0;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]