[libegg/spread-table-dnd: 5/78] Updated testspreadtable simply to use a EggSpreadTableDnd
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libegg/spread-table-dnd: 5/78] Updated testspreadtable simply to use a EggSpreadTableDnd
- Date: Sun, 10 Apr 2011 07:00:01 +0000 (UTC)
commit 95081528263d102469962a99b2bf7bd3a972c30d
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Fri Mar 11 00:12:33 2011 +0900
Updated testspreadtable simply to use a EggSpreadTableDnd
libegg/spreadtable/testspreadtable.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libegg/spreadtable/testspreadtable.c b/libegg/spreadtable/testspreadtable.c
index 2da5073..bd4ab20 100644
--- a/libegg/spreadtable/testspreadtable.c
+++ b/libegg/spreadtable/testspreadtable.c
@@ -21,6 +21,7 @@
*/
#include <eggspreadtable.h>
+#include <eggspreadtablednd.h>
enum {
IMAGE_NONE,
@@ -45,7 +46,7 @@ static void
populate_spread_table_wrappy (EggSpreadTable *spread_table)
{
GList *children, *l;
- GtkWidget *widget, *frame;
+ GtkWidget *widget, *frame, *eventbox;
gsize i;
const gchar *strings[] = {
@@ -71,10 +72,13 @@ populate_spread_table_wrappy (EggSpreadTable *spread_table)
{
widget = gtk_label_new (strings[i]);
frame = gtk_frame_new (NULL);
+ eventbox = gtk_event_box_new ();
gtk_widget_show (widget);
gtk_widget_show (frame);
+ gtk_widget_show (eventbox);
gtk_container_add (GTK_CONTAINER (frame), widget);
+ gtk_container_add (GTK_CONTAINER (eventbox), frame);
gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (widget), PANGO_WRAP_WORD);
@@ -82,7 +86,7 @@ populate_spread_table_wrappy (EggSpreadTable *spread_table)
gtk_widget_set_halign (frame, child_halign);
- egg_spread_table_insert_child (EGG_SPREAD_TABLE (spread_table), frame, -1);
+ egg_spread_table_insert_child (EGG_SPREAD_TABLE (spread_table), eventbox, -1);
}
/* Insert an image into the mix */
@@ -207,7 +211,7 @@ create_window (void)
gtk_widget_show (swindow);
gtk_container_add (GTK_CONTAINER (frame), swindow);
- paper = egg_spread_table_new (GTK_ORIENTATION_VERTICAL, INITIAL_LINES);
+ paper = egg_spread_table_dnd_new (GTK_ORIENTATION_VERTICAL, INITIAL_LINES);
egg_spread_table_set_vertical_spacing (EGG_SPREAD_TABLE (paper), INITIAL_VSPACING);
egg_spread_table_set_horizontal_spacing (EGG_SPREAD_TABLE (paper), INITIAL_HSPACING);
gtk_widget_show (paper);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]