aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-msg-composer-hdrs.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>1999-11-13 08:43:32 +0800
committerEttore Perazzoli <ettore@src.gnome.org>1999-11-13 08:43:32 +0800
commita68a98a29432ab8938a731486992ac35ba73af6c (patch)
tree95a4ea10dd2f57d003a142c168512ab550e7cf84 /widgets/e-msg-composer-hdrs.c
parentdded739f636bb8f75a6779bc31673e4f8b994225 (diff)
downloadgsoc2013-evolution-a68a98a29432ab8938a731486992ac35ba73af6c.tar
gsoc2013-evolution-a68a98a29432ab8938a731486992ac35ba73af6c.tar.gz
gsoc2013-evolution-a68a98a29432ab8938a731486992ac35ba73af6c.tar.bz2
gsoc2013-evolution-a68a98a29432ab8938a731486992ac35ba73af6c.tar.lz
gsoc2013-evolution-a68a98a29432ab8938a731486992ac35ba73af6c.tar.xz
gsoc2013-evolution-a68a98a29432ab8938a731486992ac35ba73af6c.tar.zst
gsoc2013-evolution-a68a98a29432ab8938a731486992ac35ba73af6c.zip
Added tooltips to the header area.
svn path=/trunk/; revision=1385
Diffstat (limited to 'widgets/e-msg-composer-hdrs.c')
-rw-r--r--widgets/e-msg-composer-hdrs.c62
1 files changed, 56 insertions, 6 deletions
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;