Only allow one select-names dialog for each composer.

svn path=/trunk/; revision=5909
This commit is contained in:
Iain Holmes
2000-10-14 00:46:08 +00:00
parent 0849561219
commit 0cca35f2ed
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2000-10-14 Iain Holmes <iain@helixcode.com>
* e-msg-composer-hdrs.c (init): Create a unique-ish id for this set
of headers, so that only one select-names dialog will be created for
a given set of headers.
(address_button_clicked_cb): Pass the unique-ish id to the activate
dialog command.
2000-10-13 Larry Ewing <lewing@helixcode.com>
* e-msg-composer.c (build_message): stop using format_text,

View File

@ -59,6 +59,9 @@ struct _EMsgComposerHdrsPrivate {
GtkWidget *cc_entry;
GtkWidget *bcc_entry;
GtkWidget *subject_entry;
/* Unique section ID */
char *section_id;
};
@ -119,8 +122,7 @@ address_button_clicked_cb (GtkButton *button,
CORBA_exception_init (&ev);
/* FIXME section. */
Evolution_Addressbook_SelectNames_activate_dialog (priv->corba_select_names, "", &ev);
Evolution_Addressbook_SelectNames_activate_dialog (priv->corba_select_names, priv->section_id, &ev);
CORBA_exception_free (&ev);
}
@ -342,6 +344,7 @@ destroy (GtkObject *object)
CORBA_exception_free (&ev);
}
g_free (priv->section_id);
gtk_object_destroy (GTK_OBJECT (priv->tooltips));
if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
@ -390,6 +393,10 @@ init (EMsgComposerHdrs *hdrs)
priv->num_hdrs = 0;
/* Make a unique id from the addresses various things
This only needs to be unique as long as hdrs exists */
priv->section_id = g_strdup_printf ("%p-%p", hdrs, priv);
hdrs->priv = priv;
}