summaryrefslogtreecommitdiff
path: root/test/test-eel-editable-label.c
diff options
context:
space:
mode:
authorPerberos <perberos@gmail.com>2011-12-01 22:24:23 -0300
committerPerberos <perberos@gmail.com>2011-12-01 22:24:23 -0300
commit0e004c696b0e68b2cff37a4c3315b022a35eaf43 (patch)
tree43261e815529cb9518ed7be37af13b846af8b26b /test/test-eel-editable-label.c
downloadcaja-0e004c696b0e68b2cff37a4c3315b022a35eaf43.tar.bz2
caja-0e004c696b0e68b2cff37a4c3315b022a35eaf43.tar.xz
moving from https://github.com/perberos/mate-desktop-environment
Diffstat (limited to 'test/test-eel-editable-label.c')
-rw-r--r--test/test-eel-editable-label.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/test-eel-editable-label.c b/test/test-eel-editable-label.c
new file mode 100644
index 00000000..f2ba6961
--- /dev/null
+++ b/test/test-eel-editable-label.c
@@ -0,0 +1,58 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+#include <config.h>
+
+#include <gtk/gtk.h>
+
+#include <eel/eel-editable-label.h>
+
+
+static void
+quit (GtkWidget *widget, gpointer data)
+{
+ gtk_main_quit ();
+}
+
+int
+main (int argc, char* argv[])
+{
+ GtkWidget *window;
+ GtkWidget *label;
+ GtkWidget *vbox;
+
+ gtk_init (&argc, &argv);
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit), NULL);
+
+ vbox = gtk_vbox_new (FALSE, 0);
+
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+
+ label = eel_editable_label_new ("Centered dsau dsfgsdfgoydsfiugy oiusdyfg iouysdf goiuys dfioguy siodufgy iusdyfgiu ydsf giusydf gouiysdfgoiuysdfg oiudyfsg Label");
+
+ gtk_widget_set_size_request (label, 200, -1);
+ eel_editable_label_set_line_wrap (EEL_EDITABLE_LABEL (label), TRUE);
+
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
+
+ label = eel_editable_label_new ("Left aligned label");
+
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
+
+ label = eel_editable_label_new ("Right aligned label");
+
+ gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
+
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
+
+ gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
+
+ gtk_widget_show_all (window);
+
+ gtk_main ();
+
+ return 0;
+}