Mercurial > pidgin
comparison console/libgnt/test/focus.c @ 14420:c4a32405af68
[gaim-migrate @ 17128]
Keep things neat and clean in gnt_util_onscreen_width_to_pointer.
The only use of this function currently is to truncate a string to
make sure it fits in the drawing area, eg, the title of a window,
or in the combobox. The function is called on a newly allocated
string, which is truncated (if necessary), printed, and freed.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 02 Sep 2006 18:55:27 +0000 |
parents | eaf7f35635bc |
children | 62bb53609a36 |
comparison
equal
deleted
inserted
replaced
14419:b50aa149e09d | 14420:c4a32405af68 |
---|---|
23 #ifdef STANDALONE | 23 #ifdef STANDALONE |
24 freopen(".error", "w", stderr); | 24 freopen(".error", "w", stderr); |
25 gnt_init(); | 25 gnt_init(); |
26 #endif | 26 #endif |
27 | 27 |
28 GntWidget *label = gnt_label_new("So wassup dudes and dudettes!!\nSo this is, like,\nthe third line!! \\o/"); | 28 GntWidget *label = gnt_label_new("So wassup dudes and dudettes!!\u4e0a1\u6d772\u67003\u4f4e4\u67085\nSo this is, like,\nthe third line!! \\o/"); |
29 GntWidget *vbox, *hbox, *tree, *box, *button; | 29 GntWidget *vbox, *hbox, *tree, *box, *button; |
30 WINDOW *test; | 30 WINDOW *test; |
31 | 31 |
32 vbox = gnt_box_new(FALSE, FALSE); | 32 vbox = gnt_box_new(FALSE, FALSE); |
33 hbox = gnt_box_new(FALSE, TRUE); | 33 hbox = gnt_box_new(FALSE, TRUE); |
59 gnt_tree_add_row_after(GNT_TREE(tree), "k", gnt_tree_create_row(GNT_TREE(tree), "k"), "a", NULL); | 59 gnt_tree_add_row_after(GNT_TREE(tree), "k", gnt_tree_create_row(GNT_TREE(tree), "k"), "a", NULL); |
60 gnt_tree_add_row_after(GNT_TREE(tree), "e", gnt_tree_create_row(GNT_TREE(tree), "e"), "a", NULL); | 60 gnt_tree_add_row_after(GNT_TREE(tree), "e", gnt_tree_create_row(GNT_TREE(tree), "e"), "a", NULL); |
61 gnt_tree_add_choice(GNT_TREE(tree), "b", gnt_tree_create_row(GNT_TREE(tree), "b"), "d", NULL); | 61 gnt_tree_add_choice(GNT_TREE(tree), "b", gnt_tree_create_row(GNT_TREE(tree), "b"), "d", NULL); |
62 | 62 |
63 GNT_WIDGET_UNSET_FLAGS(hbox, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); | 63 GNT_WIDGET_UNSET_FLAGS(hbox, GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW); |
64 gnt_box_set_title(GNT_BOX(hbox), "This is the title …"); | 64 gnt_box_set_title(GNT_BOX(hbox), "\u4e0a\u6d77\u6700\u4f4e\u6708\u5de5 …"); |
65 | 65 |
66 g_signal_connect(G_OBJECT(tree), "toggled", G_CALLBACK(toggled), NULL); | 66 g_signal_connect(G_OBJECT(tree), "toggled", G_CALLBACK(toggled), NULL); |
67 | 67 |
68 button = gnt_button_new("one"); | 68 button = gnt_button_new("one"); |
69 gnt_widget_set_name(button, "one"); | 69 gnt_widget_set_name(button, "one"); |