diff options
author | Damon Chaplin <damon@ximian.com> | 2001-07-03 12:12:17 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-07-03 12:12:17 +0800 |
commit | bacd3a85a434032316b3e63b95282175ce2b0659 (patch) | |
tree | 00e6b5444efed4ad1ef742968c292d52f4ee6a78 /widgets/misc/e-dateedit.h | |
parent | 0e27010e0b193b787e93cbf50c08a6d477e33dee (diff) | |
download | gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.tar.gz gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.tar.zst gsoc2013-evolution-bacd3a85a434032316b3e63b95282175ce2b0659.zip |
added functions to set a callback to get the current time, which is used
2001-07-02 Damon Chaplin <damon@ximian.com>
* e-calendar-item.c:
* e-cell-date-edit.c:
* e-dateedit.c: added functions to set a callback to get the current
time, which is used instead of localtime(). We need this as we have to
use our own timezones.
svn path=/trunk/; revision=10728
Diffstat (limited to 'widgets/misc/e-dateedit.h')
-rw-r--r-- | widgets/misc/e-dateedit.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h index 87a40b8d10..022cf1fd5f 100644 --- a/widgets/misc/e-dateedit.h +++ b/widgets/misc/e-dateedit.h @@ -56,11 +56,15 @@ BEGIN_GNOME_DECLS #define E_IS_DATE_EDIT(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_DATE_EDIT)) #define E_IS_DATE_EDIT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_DATE_EDIT)) - typedef struct _EDateEdit EDateEdit; typedef struct _EDateEditPrivate EDateEditPrivate; typedef struct _EDateEditClass EDateEditClass; +/* The type of the callback function optionally used to get the current time. + */ +typedef struct tm (*EDateEditGetTimeCallback) (EDateEdit *dedit, + gpointer data); + struct _EDateEdit { GtkHBox hbox; @@ -91,7 +95,7 @@ void e_date_edit_set_time (EDateEdit *dedit, /* This returns the last valid date set, without the time. It returns TRUE if a date is set, or FALSE if the date is set to 'None' and this is - permitted via e_date_edit_set_allow_no_date_set. */ + permitted via e_date_edit_set_allow_no_date_set. (Month is 1 - 12). */ gboolean e_date_edit_get_date (EDateEdit *dedit, gint *year, gint *month, @@ -150,6 +154,14 @@ void e_date_edit_set_time_popup_range (EDateEdit *dedit, gint lower_hour, gint upper_hour); +/* Sets a callback to use to get the current time. This is useful if the + application needs to use its own timezone data rather than rely on the + Unix timezone. */ +void e_date_edit_set_get_time_callback (EDateEdit *dedit, + EDateEditGetTimeCallback cb, + gpointer data, + GtkDestroyNotify destroy); + END_GNOME_DECLS #endif |