Commit 804e7e17 authored by Chris Lahey's avatar Chris Lahey

Finishing previous commit.

svn path=/trunk/; revision=1582
parent 4d4bcd89
2000-01-17 Chrsitopher James Lahey <clahey@helixcode.com>
* head.png, phone.png, email.png, web.png, snailmail.png: Images
for e-contact-editor.c.
* addressbook/contact-editor/text-editor.c: Test program
for contact editor widget.
* addressbook/contact-editor/e-contact-editor.c,
addressbook/contact-editor/e-contact-editor.h: Contact editor
widget files.
* addressbook/contact-editor/.cvsignore,
addressbook/contact-editor/Makefile.am: New directory for contact
editor files.
* addressbook/.cvsignore, addressbook/Makefile.am: New directory
for addressbook files.
* widgets/.cvsignore: Added reflow-test.
* Makefile.am (SUBDIRS): Added addressbook subdirectory.
* configure.in, widgets/Makefile.am: Removed widgets/toolbar from
SUBDIRS since the lack of content was preventing it from
compiling.
* widgets/shortcut-bar/Makefile.am: Added gnomecanvaspixbuf to the
list of libraries used.
* widgets/e-text.c, widgets/e-text.h: Fixed a crashing bug.
2000-01-17 bertrand <bertrand@helixcode.com>
* tests/test9.c (main): test for the mbox utils.
......
......@@ -5,7 +5,8 @@ SUBDIRS = \
e-util \
widgets \
composer \
tests
tests \
addressbook
dist-hook:
for subdir in intl ; do \
......
.deps
.libs
Makefile
Makefile.in
*.lo
*.la
SUBDIRS = \
contact-editor
......@@ -141,6 +141,7 @@ widgets/Makefile
widgets/meeting-time-sel/Makefile
widgets/shortcut-bar/Makefile
widgets/e-table/Makefile
widgets/toolbar/Makefile
addressbook/Makefile
addressbook/contact-editor/Makefile
shell/Makefile
])
......@@ -6,3 +6,4 @@ Makefile.in
*.la
minicard-test
minicard-label-test
reflow-test
SUBDIRS = \
meeting-time-sel shortcut-bar e-table toolbar
meeting-time-sel shortcut-bar e-table
INCLUDES = \
-I$(top_srcdir)/camel \
......
......@@ -112,6 +112,20 @@ static guint32 e_text_get_event_time (EText *text);
static void e_text_get_selection(EText *text, GdkAtom selection, guint32 time);
static void e_text_supply_selection (EText *text, guint time, GdkAtom selection, guchar *data, gint length);
static GtkWidget *e_text_get_invisible(EText *text);
static void _selection_clear_event (GtkInvisible *invisible,
GdkEventSelection *event,
EText *text);
static void _selection_get (GtkInvisible *invisible,
GtkSelectionData *selection_data,
guint info,
guint time_stamp,
EText *text);
static void _selection_received (GtkInvisible *invisible,
GtkSelectionData *selection_data,
guint time,
EText *text);
static ETextSuckFont *e_suck_font (GdkFont *font);
static void e_suck_font_free (ETextSuckFont *suckfont);
......@@ -290,9 +304,9 @@ e_text_init (EText *text)
text->tep = NULL;
text->invisible = NULL;
text->has_selection = FALSE;
text->invisible = NULL;
text->primary_selection = NULL;
text->primary_length = 0;
text->clipboard_selection = NULL;
......@@ -315,6 +329,9 @@ e_text_destroy (GtkObject *object)
if (text->tep)
gtk_object_unref (GTK_OBJECT(text->tep));
if (text->invisible)
gtk_object_unref (GTK_OBJECT(text->invisible));
if (text->lines)
g_free (text->lines);
......@@ -1985,6 +2002,47 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text));
}
static void _invisible_destroy (GtkInvisible *invisible,
EText *text)
{
text->invisible = NULL;
}
static GtkWidget *e_text_get_invisible(EText *text)
{
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_PRIMARY);
gtk_selection_add_target (invisible,
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_CLIPBOARD);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_get",
GTK_SIGNAL_FUNC (_selection_get),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_clear_event",
GTK_SIGNAL_FUNC (_selection_clear_event),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_received",
GTK_SIGNAL_FUNC (_selection_received),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "destroy",
GTK_SIGNAL_FUNC (_invisible_destroy),
text);
}
return invisible;
}
static void
_selection_clear_event (GtkInvisible *invisible,
GdkEventSelection *event,
......@@ -1994,7 +2052,6 @@ _selection_clear_event (GtkInvisible *invisible,
g_free (text->primary_selection);
text->primary_selection = NULL;
text->primary_length = 0;
gtk_object_unref (GTK_OBJECT(invisible));
text->has_selection = FALSE;
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text));
......@@ -2003,7 +2060,6 @@ _selection_clear_event (GtkInvisible *invisible,
g_free (text->clipboard_selection);
text->clipboard_selection = NULL;
text->clipboard_length = 0;
gtk_object_unref (GTK_OBJECT(invisible));
}
}
......@@ -2033,7 +2089,6 @@ _selection_received (GtkInvisible *invisible,
EText *text)
{
if (selection_data->length < 0 || selection_data->type != GDK_SELECTION_TYPE_STRING) {
gtk_object_unref (GTK_OBJECT(invisible));
return;
} else {
ETextEventProcessorCommand command;
......@@ -2043,62 +2098,24 @@ _selection_received (GtkInvisible *invisible,
command.value = selection_data->length;
command.time = time;
e_text_command(text->tep, &command, text);
gtk_object_unref (GTK_OBJECT(invisible));
}
}
static void _invisible_destroy (GtkInvisible *invisible,
EText *text)
{
text->invisible = NULL;
}
static void e_text_supply_selection (EText *text, guint time, GdkAtom selection, guchar *data, gint length)
{
gboolean successful;
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
gtk_object_ref (GTK_OBJECT(invisible));
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_PRIMARY);
gtk_selection_add_target (invisible,
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_CLIPBOARD);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_get",
GTK_SIGNAL_FUNC (_selection_get),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_clear_event",
GTK_SIGNAL_FUNC (_selection_clear_event),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_received",
GTK_SIGNAL_FUNC (_selection_received),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "destroy",
GTK_SIGNAL_FUNC (_invisible_destroy),
text);
}
invisible = e_text_get_invisible(text);
if (selection == GDK_SELECTION_PRIMARY ) {
if (text->primary_selection) {
gtk_object_unref (GTK_OBJECT(invisible));
g_free (text->primary_selection);
}
text->primary_selection = g_strndup(data, length);
text->primary_length = length;
} else if (selection == clipboard_atom) {
if (text->clipboard_selection) {
gtk_object_unref (GTK_OBJECT(invisible));
g_free (text->clipboard_selection);
}
text->clipboard_selection = g_strndup(data, length);
......@@ -2111,45 +2128,13 @@ static void e_text_supply_selection (EText *text, guint time, GdkAtom selection,
if (selection == GDK_SELECTION_PRIMARY)
text->has_selection = successful;
if (!successful)
gtk_object_unref(GTK_OBJECT(invisible));
}
static void
e_text_get_selection(EText *text, GdkAtom selection, guint32 time)
{
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
gtk_object_ref (GTK_OBJECT(invisible));
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_PRIMARY);
gtk_selection_add_target (invisible,
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_CLIPBOARD);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_get",
GTK_SIGNAL_FUNC (_selection_get),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_clear_event",
GTK_SIGNAL_FUNC (_selection_clear_event),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_received",
GTK_SIGNAL_FUNC (_selection_received),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "destroy",
GTK_SIGNAL_FUNC (_invisible_destroy),
text);
}
invisible = e_text_get_invisible(text);
gtk_selection_convert(invisible,
selection,
GDK_SELECTION_TYPE_STRING,
......
......@@ -59,7 +59,7 @@ BEGIN_GNOME_DECLS
* text_width double R Used to query the width of the rendered text
* text_height double R Used to query the rendered height of the text
*
* These are ignored in the AA version:
* These are currently ignored in the AA version:
* editable boolean RW Can this item be edited
* use_ellipsis boolean RW Whether to use ellipsises if text gets cut off. Meaningless if clip == false.
* ellipsis string RW The characters to use as ellipsis. NULL = "...".
......
......@@ -112,6 +112,20 @@ static guint32 e_text_get_event_time (EText *text);
static void e_text_get_selection(EText *text, GdkAtom selection, guint32 time);
static void e_text_supply_selection (EText *text, guint time, GdkAtom selection, guchar *data, gint length);
static GtkWidget *e_text_get_invisible(EText *text);
static void _selection_clear_event (GtkInvisible *invisible,
GdkEventSelection *event,
EText *text);
static void _selection_get (GtkInvisible *invisible,
GtkSelectionData *selection_data,
guint info,
guint time_stamp,
EText *text);
static void _selection_received (GtkInvisible *invisible,
GtkSelectionData *selection_data,
guint time,
EText *text);
static ETextSuckFont *e_suck_font (GdkFont *font);
static void e_suck_font_free (ETextSuckFont *suckfont);
......@@ -290,9 +304,9 @@ e_text_init (EText *text)
text->tep = NULL;
text->invisible = NULL;
text->has_selection = FALSE;
text->invisible = NULL;
text->primary_selection = NULL;
text->primary_length = 0;
text->clipboard_selection = NULL;
......@@ -315,6 +329,9 @@ e_text_destroy (GtkObject *object)
if (text->tep)
gtk_object_unref (GTK_OBJECT(text->tep));
if (text->invisible)
gtk_object_unref (GTK_OBJECT(text->invisible));
if (text->lines)
g_free (text->lines);
......@@ -1985,6 +2002,47 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text));
}
static void _invisible_destroy (GtkInvisible *invisible,
EText *text)
{
text->invisible = NULL;
}
static GtkWidget *e_text_get_invisible(EText *text)
{
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_PRIMARY);
gtk_selection_add_target (invisible,
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_CLIPBOARD);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_get",
GTK_SIGNAL_FUNC (_selection_get),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_clear_event",
GTK_SIGNAL_FUNC (_selection_clear_event),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_received",
GTK_SIGNAL_FUNC (_selection_received),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "destroy",
GTK_SIGNAL_FUNC (_invisible_destroy),
text);
}
return invisible;
}
static void
_selection_clear_event (GtkInvisible *invisible,
GdkEventSelection *event,
......@@ -1994,7 +2052,6 @@ _selection_clear_event (GtkInvisible *invisible,
g_free (text->primary_selection);
text->primary_selection = NULL;
text->primary_length = 0;
gtk_object_unref (GTK_OBJECT(invisible));
text->has_selection = FALSE;
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text));
......@@ -2003,7 +2060,6 @@ _selection_clear_event (GtkInvisible *invisible,
g_free (text->clipboard_selection);
text->clipboard_selection = NULL;
text->clipboard_length = 0;
gtk_object_unref (GTK_OBJECT(invisible));
}
}
......@@ -2033,7 +2089,6 @@ _selection_received (GtkInvisible *invisible,
EText *text)
{
if (selection_data->length < 0 || selection_data->type != GDK_SELECTION_TYPE_STRING) {
gtk_object_unref (GTK_OBJECT(invisible));
return;
} else {
ETextEventProcessorCommand command;
......@@ -2043,62 +2098,24 @@ _selection_received (GtkInvisible *invisible,
command.value = selection_data->length;
command.time = time;
e_text_command(text->tep, &command, text);
gtk_object_unref (GTK_OBJECT(invisible));
}
}
static void _invisible_destroy (GtkInvisible *invisible,
EText *text)
{
text->invisible = NULL;
}
static void e_text_supply_selection (EText *text, guint time, GdkAtom selection, guchar *data, gint length)
{
gboolean successful;
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
gtk_object_ref (GTK_OBJECT(invisible));
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_PRIMARY);
gtk_selection_add_target (invisible,
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_CLIPBOARD);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_get",
GTK_SIGNAL_FUNC (_selection_get),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_clear_event",
GTK_SIGNAL_FUNC (_selection_clear_event),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_received",
GTK_SIGNAL_FUNC (_selection_received),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "destroy",
GTK_SIGNAL_FUNC (_invisible_destroy),
text);
}
invisible = e_text_get_invisible(text);
if (selection == GDK_SELECTION_PRIMARY ) {
if (text->primary_selection) {
gtk_object_unref (GTK_OBJECT(invisible));
g_free (text->primary_selection);
}
text->primary_selection = g_strndup(data, length);
text->primary_length = length;
} else if (selection == clipboard_atom) {
if (text->clipboard_selection) {
gtk_object_unref (GTK_OBJECT(invisible));
g_free (text->clipboard_selection);
}
text->clipboard_selection = g_strndup(data, length);
......@@ -2111,45 +2128,13 @@ static void e_text_supply_selection (EText *text, guint time, GdkAtom selection,
if (selection == GDK_SELECTION_PRIMARY)
text->has_selection = successful;
if (!successful)
gtk_object_unref(GTK_OBJECT(invisible));
}
static void
e_text_get_selection(EText *text, GdkAtom selection, guint32 time)
{
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
gtk_object_ref (GTK_OBJECT(invisible));
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_PRIMARY);
gtk_selection_add_target (invisible,
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_CLIPBOARD);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_get",
GTK_SIGNAL_FUNC (_selection_get),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_clear_event",
GTK_SIGNAL_FUNC (_selection_clear_event),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_received",
GTK_SIGNAL_FUNC (_selection_received),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "destroy",
GTK_SIGNAL_FUNC (_invisible_destroy),
text);
}
invisible = e_text_get_invisible(text);
gtk_selection_convert(invisible,
selection,
GDK_SELECTION_TYPE_STRING,
......
......@@ -59,7 +59,7 @@ BEGIN_GNOME_DECLS
* text_width double R Used to query the width of the rendered text
* text_height double R Used to query the rendered height of the text
*
* These are ignored in the AA version:
* These are currently ignored in the AA version:
* editable boolean RW Can this item be edited
* use_ellipsis boolean RW Whether to use ellipsises if text gets cut off. Meaningless if clip == false.
* ellipsis string RW The characters to use as ellipsis. NULL = "...".
......
......@@ -30,4 +30,4 @@ test_shortcut_bar_LDADD = \
$(EXTRA_GNOME_LIBS)
test_shortcut_bar_LDFLAGS = \
`gnome-config --libs gdk_pixbuf`
`gnome-config --libs gdk_pixbuf gnomecanvaspixbuf`
......@@ -112,6 +112,20 @@ static guint32 e_text_get_event_time (EText *text);
static void e_text_get_selection(EText *text, GdkAtom selection, guint32 time);
static void e_text_supply_selection (EText *text, guint time, GdkAtom selection, guchar *data, gint length);
static GtkWidget *e_text_get_invisible(EText *text);
static void _selection_clear_event (GtkInvisible *invisible,
GdkEventSelection *event,
EText *text);
static void _selection_get (GtkInvisible *invisible,
GtkSelectionData *selection_data,
guint info,
guint time_stamp,
EText *text);
static void _selection_received (GtkInvisible *invisible,
GtkSelectionData *selection_data,
guint time,
EText *text);
static ETextSuckFont *e_suck_font (GdkFont *font);
static void e_suck_font_free (ETextSuckFont *suckfont);
......@@ -290,9 +304,9 @@ e_text_init (EText *text)
text->tep = NULL;
text->invisible = NULL;
text->has_selection = FALSE;
text->invisible = NULL;
text->primary_selection = NULL;
text->primary_length = 0;
text->clipboard_selection = NULL;
......@@ -315,6 +329,9 @@ e_text_destroy (GtkObject *object)
if (text->tep)
gtk_object_unref (GTK_OBJECT(text->tep));
if (text->invisible)
gtk_object_unref (GTK_OBJECT(text->invisible));
if (text->lines)
g_free (text->lines);
......@@ -1985,6 +2002,47 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text));
}
static void _invisible_destroy (GtkInvisible *invisible,
EText *text)
{
text->invisible = NULL;
}
static GtkWidget *e_text_get_invisible(EText *text)
{
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_PRIMARY);
gtk_selection_add_target (invisible,
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_CLIPBOARD);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_get",
GTK_SIGNAL_FUNC (_selection_get),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_clear_event",
GTK_SIGNAL_FUNC (_selection_clear_event),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_received",
GTK_SIGNAL_FUNC (_selection_received),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "destroy",
GTK_SIGNAL_FUNC (_invisible_destroy),
text);
}
return invisible;
}
static void
_selection_clear_event (GtkInvisible *invisible,
GdkEventSelection *event,
......@@ -1994,7 +2052,6 @@ _selection_clear_event (GtkInvisible *invisible,
g_free (text->primary_selection);
text->primary_selection = NULL;
text->primary_length = 0;
gtk_object_unref (GTK_OBJECT(invisible));
text->has_selection = FALSE;
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(text));
......@@ -2003,7 +2060,6 @@ _selection_clear_event (GtkInvisible *invisible,
g_free (text->clipboard_selection);
text->clipboard_selection = NULL;
text->clipboard_length = 0;
gtk_object_unref (GTK_OBJECT(invisible));
}
}
......@@ -2033,7 +2089,6 @@ _selection_received (GtkInvisible *invisible,
EText *text)
{
if (selection_data->length < 0 || selection_data->type != GDK_SELECTION_TYPE_STRING) {
gtk_object_unref (GTK_OBJECT(invisible));
return;
} else {
ETextEventProcessorCommand command;
......@@ -2043,62 +2098,24 @@ _selection_received (GtkInvisible *invisible,
command.value = selection_data->length;
command.time = time;
e_text_command(text->tep, &command, text);
gtk_object_unref (GTK_OBJECT(invisible));
}
}
static void _invisible_destroy (GtkInvisible *invisible,
EText *text)
{
text->invisible = NULL;
}
static void e_text_supply_selection (EText *text, guint time, GdkAtom selection, guchar *data, gint length)
{
gboolean successful;
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
gtk_object_ref (GTK_OBJECT(invisible));
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_PRIMARY);
gtk_selection_add_target (invisible,
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
E_SELECTION_CLIPBOARD);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_get",
GTK_SIGNAL_FUNC (_selection_get),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_clear_event",
GTK_SIGNAL_FUNC (_selection_clear_event),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "selection_received",
GTK_SIGNAL_FUNC (_selection_received),
text);
gtk_signal_connect (GTK_OBJECT(invisible), "destroy",
GTK_SIGNAL_FUNC (_invisible_destroy),
text);
}
invisible = e_text_get_invisible(text);
if (selection == GDK_SELECTION_PRIMARY ) {
if (text->primary_selection) {
gtk_object_unref (GTK_OBJECT(invisible));
g_free (text->primary_selection);
}
text->primary_selection = g_strndup(data, length);
text->primary_length = length;
} else if (selection == clipboard_atom) {
if (text->clipboard_selection) {
gtk_object_unref (GTK_OBJECT(invisible));
g_free (text->clipboard_selection);
}
text->clipboard_selection = g_strndup(data, length);
......@@ -2111,45 +2128,13 @@ static void e_text_supply_selection (EText *text, guint time, GdkAtom selection,
if (selection == GDK_SELECTION_PRIMARY)
text->has_selection = successful;
if (!successful)
gtk_object_unref(GTK_OBJECT(invisible));
}
static void
e_text_get_selection(EText *text, GdkAtom selection, guint32 time)
{
GtkWidget *invisible;
if (text->invisible) {
invisible = text->invisible;
gtk_object_ref (GTK_OBJECT(invisible));
} else {
invisible = gtk_invisible_new();
text->invisible = invisible;
gtk_selection_add_target (invisible