aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-dateedit.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-09-17 10:58:58 +0800
committerChris Toshok <toshok@src.gnome.org>2001-09-17 10:58:58 +0800
commit6d1f104d1e22eff69151ef4a3a0b25863c392fdb (patch)
tree9c5a29080a3395a3d147e717b4de7728360170d6 /widgets/misc/e-dateedit.c
parent04b1bded1c8809e85950d6b08ccafcedca8213fb (diff)
downloadgsoc2013-evolution-6d1f104d1e22eff69151ef4a3a0b25863c392fdb.tar
gsoc2013-evolution-6d1f104d1e22eff69151ef4a3a0b25863c392fdb.tar.gz
gsoc2013-evolution-6d1f104d1e22eff69151ef4a3a0b25863c392fdb.tar.bz2
gsoc2013-evolution-6d1f104d1e22eff69151ef4a3a0b25863c392fdb.tar.lz
gsoc2013-evolution-6d1f104d1e22eff69151ef4a3a0b25863c392fdb.tar.xz
gsoc2013-evolution-6d1f104d1e22eff69151ef4a3a0b25863c392fdb.tar.zst
gsoc2013-evolution-6d1f104d1e22eff69151ef4a3a0b25863c392fdb.zip
add prototype for e_date_edit_set_editable.
2001-09-16 Chris Toshok <toshok@ximian.com> * e-dateedit.h: add prototype for e_date_edit_set_editable. * e-dateedit.c (e_date_edit_set_editable): new function, analogous to gtk_entry_set_editable: let's the user select but not edit (or in this case, bring up the calendar view.) svn path=/trunk/; revision=12867
Diffstat (limited to 'widgets/misc/e-dateedit.c')
-rw-r--r--widgets/misc/e-dateedit.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index e046b65517..32e5aa194d 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -472,6 +472,27 @@ e_date_edit_destroy (GtkObject *object)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
+/**
+ * e_date_edit_set_editable:
+ * @dedit: an #EDateEdit widget.
+ * @editable: whether or not the widget should accept edits.
+ *
+ * Allows the programmer to disallow editing (and the popping up of
+ * the calendar widget), while still allowing the user to select the
+ * date from the GtkEntry.
+ */
+void
+e_date_edit_set_editable (EDateEdit *dedit, gboolean editable)
+{
+ EDateEditPrivate *priv;
+
+ g_return_if_fail (E_IS_DATE_EDIT (dedit));
+
+ priv = dedit->priv;
+
+ gtk_entry_set_editable (GTK_ENTRY (priv->date_entry), editable);
+ gtk_widget_set_sensitive (priv->date_button, editable);
+}
static void
e_date_edit_forall (GtkContainer *container,