diff options
-rw-r--r-- | widgets/ChangeLog | 11 | ||||
-rw-r--r-- | widgets/e-msg-composer-hdrs.c | 62 | ||||
-rw-r--r-- | widgets/e-table/ChangeLog | 11 |
3 files changed, 78 insertions, 6 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog index 48c797c007..7a3bb5ce5e 100644 --- a/widgets/ChangeLog +++ b/widgets/ChangeLog @@ -1,3 +1,14 @@ +1999-11-12 Ettore Perazzoli <ettore@gnu.org> + + * e-msg-composer-hdrs.c: New member `tooltips' in `struct + _EMsgComposerHdrsPrivate'. + (init): Initialize it. + (destroy): New function. + (class_init): Install it as the `destroy' GtkObject method. + (add_header): New parameters `tip', `tip_private'. Setup a + tooltip for the entry with them. + (setup_headers): Updated accordingly. + 1999-11-11 Miguel de Icaza <miguel@gnu.org> * e-table-header.c (e_table_header_add_column): Update offsets. diff --git a/widgets/e-msg-composer-hdrs.c b/widgets/e-msg-composer-hdrs.c index cc5b892ffa..f686580fc5 100644 --- a/widgets/e-msg-composer-hdrs.c +++ b/widgets/e-msg-composer-hdrs.c @@ -36,6 +36,9 @@ struct _EMsgComposerHdrsPrivate { /* Total number of headers that we have. */ guint num_hdrs; + /* The tooltips. */ + GtkTooltips *tooltips; + /* Standard headers. */ GtkWidget *to_entry; GtkWidget *cc_entry; @@ -64,6 +67,8 @@ address_button_clicked_cb (GtkButton *button, static GtkWidget * add_header (EMsgComposerHdrs *hdrs, const gchar *name, + const gchar *tip, + const gchar *tip_private, gboolean addrbook_button) { EMsgComposerHdrsPrivate *priv; @@ -79,6 +84,9 @@ add_header (EMsgComposerHdrs *hdrs, GTK_SIGNAL_FUNC (address_button_clicked_cb), hdrs); pad = 2; + gtk_tooltips_set_tip (hdrs->priv->tooltips, label, + _("Click here for the address book"), + NULL); } else { label = gtk_label_new (name); pad = GNOME_PAD; @@ -97,6 +105,8 @@ add_header (EMsgComposerHdrs *hdrs, 2, 2); gtk_widget_show (entry); + gtk_tooltips_set_tip (hdrs->priv->tooltips, entry, tip, tip_private); + priv->num_hdrs++; return entry; @@ -109,19 +119,57 @@ setup_headers (EMsgComposerHdrs *hdrs) priv = hdrs->priv; - priv->to_entry = add_header (hdrs, _("To:"), TRUE); - priv->cc_entry = add_header (hdrs, _("Cc:"), TRUE); - priv->bcc_entry = add_header (hdrs, _("Bcc:"), TRUE); - priv->subject_entry = add_header (hdrs, _("Subject:"), FALSE); + priv->to_entry = add_header + (hdrs, _("To:"), + _("Enter the recipients of the message"), + NULL, + TRUE); + priv->cc_entry = add_header + (hdrs, _("Cc:"), + _("Enter the addresses that will receive a carbon copy of " + "the message"), + NULL, + TRUE); + priv->bcc_entry = add_header + (hdrs, _("Bcc:"), + _("Enter the addresses that will receive a carbon copy of " + "the message without appearing in the recipient list of " + "the message."), + NULL, + TRUE); + priv->subject_entry = add_header + (hdrs, _("Subject:"), + _("Enter the subject of the mail"), + NULL, + FALSE); +} + + +/* GtkObject methods. */ + +static void +destroy (GtkObject *object) +{ + EMsgComposerHdrs *hdrs; + EMsgComposerHdrsPrivate *priv; + + hdrs = E_MSG_COMPOSER_HDRS (object); + priv = hdrs->priv; + + gtk_object_destroy (GTK_OBJECT (priv->tooltips)); + + if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void -class_init (EMsgComposerHdrsClass *klass) +class_init (EMsgComposerHdrsClass *class) { GtkObjectClass *object_class; - object_class = (GtkObjectClass*) klass; + object_class = GTK_OBJECT_CLASS (class); + object_class->destroy = destroy; parent_class = gtk_type_class (gtk_table_get_type ()); @@ -149,6 +197,8 @@ init (EMsgComposerHdrs *hdrs) priv->bcc_entry = NULL; priv->subject_entry = NULL; + priv->tooltips = gtk_tooltips_new (); + priv->num_hdrs = 0; hdrs->priv = priv; diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index 48c797c007..7a3bb5ce5e 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,3 +1,14 @@ +1999-11-12 Ettore Perazzoli <ettore@gnu.org> + + * e-msg-composer-hdrs.c: New member `tooltips' in `struct + _EMsgComposerHdrsPrivate'. + (init): Initialize it. + (destroy): New function. + (class_init): Install it as the `destroy' GtkObject method. + (add_header): New parameters `tip', `tip_private'. Setup a + tooltip for the entry with them. + (setup_headers): Updated accordingly. + 1999-11-11 Miguel de Icaza <miguel@gnu.org> * e-table-header.c (e_table_header_add_column): Update offsets. |