Commit 2929f25d authored by Richard Hult's avatar Richard Hult Committed by Richard Hult

Add new glade file for a task date editor. Change the task and project

2005-02-20  Richard Hult  <richard@imendio.com>

	* data/glade/Makefile.am:
	* data/glade/project-properties.glade:
	* data/glade/task-date-widget.glade:
	* data/glade/task-dialog.glade: Add new glade file for a task date
	editor. Change the task and project properties interfaces to use a
	common popup button.

	* libplanner/mrp-time.c: (mrp_time_format_locale): Add.

	* src/planner-cell-renderer-date.c (mcrd_today_clicked)
	(mcrd_init): Implement "today" button.
	(mcrd_selected_double_click): Select on double-click.

	* src/planner-marshal.list: Clean up.

 	* src/planner-popup-button.c: New widget for popping up stuff.

	* src/planner-project-properties.c: Use the popup button to popup
	the calendar widget.

	* src/planner-task-date-widget.c: New widget for editing the task
	constraint.

	* src/planner-task-dialog.c: Add constraint editor, using the
	popup button and task date widget. Fixes bug #134359.
parent 4523af48
2005-02-20 Richard Hult <richard@imendio.com>
* data/glade/Makefile.am:
* data/glade/project-properties.glade:
* data/glade/task-date-widget.glade:
* data/glade/task-dialog.glade: Add new glade file for a task date
editor. Change the task and project properties interfaces to use a
common popup button.
* libplanner/mrp-time.c: (mrp_time_format_locale): Add.
* src/planner-cell-renderer-date.c (mcrd_today_clicked)
(mcrd_init): Implement "today" button.
(mcrd_selected_double_click): Select on double-click.
* src/planner-marshal.list: Clean up.
* src/planner-popup-button.c: New widget for popping up stuff.
* src/planner-project-properties.c: Use the popup button to popup
the calendar widget.
* src/planner-task-date-widget.c: New widget for editing the task
constraint.
* src/planner-task-dialog.c: Add constraint editor, using the
popup button and task date widget. Fixes bug #134359.
2005-02-20 Richard Hult <richard@imendio.com> 2005-02-20 Richard Hult <richard@imendio.com>
* Release 0.12.92. * Release 0.12.92.
......
...@@ -13,6 +13,7 @@ glade_DATA = \ ...@@ -13,6 +13,7 @@ glade_DATA = \
sql.glade \ sql.glade \
task-dialog.glade \ task-dialog.glade \
task-input-dialog.glade \ task-input-dialog.glade \
task-date-widget.glade \
eds.glade eds.glade
EXTRA_DIST = $(glade_DATA) EXTRA_DIST = $(glade_DATA)
......
...@@ -385,7 +385,7 @@ ...@@ -385,7 +385,7 @@
</child> </child>
<child> <child>
<widget class="GtkHBox" id="start_hbox"> <widget class="GtkHBox" id="hbox_start">
<property name="visible">True</property> <property name="visible">True</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="spacing">6</property> <property name="spacing">6</property>
...@@ -408,24 +408,6 @@ ...@@ -408,24 +408,6 @@
<property name="fill">True</property> <property name="fill">True</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkToggleButton" id="calendar_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Select...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
......
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<requires lib="gnome"/>
<widget class="GtkWindow" id="placeholder_window">
<property name="visible">True</property>
<property name="title" translatable="yes">window</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="root_vbox">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkCalendar" id="schedule_calendar">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="display_options">GTK_CALENDAR_SHOW_HEADING|GTK_CALENDAR_SHOW_DAY_NAMES|GTK_CALENDAR_SHOW_WEEK_NUMBERS</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox75">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label114">
<property name="visible">True</property>
<property name="label" translatable="yes" comments="The verb &quot;schedule&quot;.">Schedule:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="schedule_combo">
<property name="visible">True</property>
<property name="items" translatable="yes">As soon as possible
No earlier than
On fixed date</property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">6</property>
<child>
<widget class="GtkButton" id="today_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Today</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="cancel_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Cancel</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="select_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Select</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<widget class="GtkDialog" id="task_dialog"> <widget class="GtkDialog" id="task_dialog">
<property name="border_width">5</property> <property name="border_width">5</property>
<property name="visible">True</property>
<property name="title" translatable="yes"></property> <property name="title" translatable="yes"></property>
<property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property> <property name="window_position">GTK_WIN_POS_NONE</property>
...@@ -35,6 +34,7 @@ ...@@ -35,6 +34,7 @@
<widget class="GtkButton" id="close_button"> <widget class="GtkButton" id="close_button">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_default">True</property> <property name="can_default">True</property>
<property name="has_default">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label">gtk-close</property> <property name="label">gtk-close</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
...@@ -73,11 +73,11 @@ ...@@ -73,11 +73,11 @@
<widget class="GtkTable" id="table1"> <widget class="GtkTable" id="table1">
<property name="border_width">8</property> <property name="border_width">8</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">6</property> <property name="n_rows">7</property>
<property name="n_columns">3</property> <property name="n_columns">3</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">6</property>
<child> <child>
<widget class="GtkLabel" id="label104"> <widget class="GtkLabel" id="label104">
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="mnemonic_widget">work_entry</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property> <property name="width_chars">-1</property>
<property name="single_line_mode">False</property> <property name="single_line_mode">False</property>
...@@ -149,6 +150,7 @@ ...@@ -149,6 +150,7 @@
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="mnemonic_widget">duration_entry</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property> <property name="width_chars">-1</property>
<property name="single_line_mode">False</property> <property name="single_line_mode">False</property>
...@@ -186,8 +188,8 @@ ...@@ -186,8 +188,8 @@
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="right_attach">1</property> <property name="right_attach">1</property>
<property name="top_attach">4</property> <property name="top_attach">5</property>
<property name="bottom_attach">5</property> <property name="bottom_attach">6</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
...@@ -215,8 +217,8 @@ ...@@ -215,8 +217,8 @@
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="right_attach">1</property> <property name="right_attach">1</property>
<property name="top_attach">5</property> <property name="top_attach">6</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">7</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
...@@ -237,8 +239,8 @@ ...@@ -237,8 +239,8 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">4</property> <property name="top_attach">5</property>
<property name="bottom_attach">5</property> <property name="bottom_attach">6</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
...@@ -258,8 +260,8 @@ ...@@ -258,8 +260,8 @@
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">5</property> <property name="top_attach">6</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">7</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
...@@ -285,8 +287,8 @@ ...@@ -285,8 +287,8 @@
<packing> <packing>
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="top_attach">4</property> <property name="top_attach">5</property>
<property name="bottom_attach">5</property> <property name="bottom_attach">6</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
...@@ -295,7 +297,7 @@ ...@@ -295,7 +297,7 @@
<child> <child>
<widget class="GtkLabel" id="priority_pad"> <widget class="GtkLabel" id="priority_pad">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes"> </property> <property name="label" translatable="yes"> </property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
...@@ -313,8 +315,8 @@ ...@@ -313,8 +315,8 @@
<packing> <packing>
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="top_attach">5</property> <property name="top_attach">6</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">7</property>
<property name="x_options">fill</property> <property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
...@@ -405,7 +407,7 @@ ...@@ -405,7 +407,7 @@
<child> <child>
<widget class="GtkLabel" id="milestone_pad"> <widget class="GtkLabel" id="milestone_pad">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes"> </property> <property name="label" translatable="yes"> </property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
...@@ -440,7 +442,7 @@ ...@@ -440,7 +442,7 @@
<property name="text" translatable="yes"></property> <property name="text" translatable="yes"></property>
<property name="has_frame">True</property> <property name="has_frame">True</property>
<property name="invisible_char">*</property> <property name="invisible_char">*</property>
<property name="activates_default">False</property> <property name="activates_default">True</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
...@@ -454,7 +456,7 @@ ...@@ -454,7 +456,7 @@
<child> <child>
<widget class="GtkLabel" id="name_pad"> <widget class="GtkLabel" id="name_pad">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes"> </property> <property name="label" translatable="yes"> </property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
...@@ -482,7 +484,7 @@ ...@@ -482,7 +484,7 @@
<child> <child>
<widget class="GtkLabel" id="label115"> <widget class="GtkLabel" id="label115">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes"> </property> <property name="label" translatable="yes"> </property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
...@@ -510,7 +512,7 @@ ...@@ -510,7 +512,7 @@
<child> <child>
<widget class="GtkLabel" id="label116"> <widget class="GtkLabel" id="label116">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes"> </property> <property name="label" translatable="yes"> </property>
<property name="use_underline">False</property> <property name="use_underline">False</property>
<property name="use_markup">False</property> <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property> <property name="justify">GTK_JUSTIFY_LEFT</property>
...@@ -545,7 +547,7 @@ ...@@ -545,7 +547,7 @@
<property name="text" translatable="yes"></property> <property name="text" translatable="yes"></property>
<property name="has_frame">True</property> <property name="has_frame">True</property>
<property name="invisible_char">*</property> <property name="invisible_char">*</property>
<property name="activates_default">False</property> <property name="activates_default">True</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
...@@ -576,6 +578,107 @@ ...@@ -576,6 +578,107 @@
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkLabel" id="label117">
<property name="visible">True</property>
<property name="label" translatable="yes" comments="This is the verb &quot;schedule&quot;">Schedule:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="schedule_hbox">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="schedule_label">
<property name="visible">True</property>
<property name="label">As soon as possible</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label118">
<property name="visible">True</property>
<property name="label" translatable="yes"> </property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* /*
* Copyright (C) 2005 Imendio AB
* Copyright (C) 2002-2003 CodeFactory AB * Copyright (C) 2002-2003 CodeFactory AB
* Copyright (C) 2002-2003 Richard Hult <richard@imendio.com> * Copyright (C) 2002-2003 Richard Hult <richard@imendio.com>
* Copyright (C) 2002 Mikael Hallendal <micke@imendio.com> * Copyright (C) 2002 Mikael Hallendal <micke@imendio.com>
...@@ -1067,31 +1068,30 @@ mrp_time_format (const gchar *format, mrptime t) ...@@ -1067,31 +1068,30 @@ mrp_time_format (const gchar *format, mrptime t)
return buffer; return buffer;
} }
/* /**
%a The abbreviated weekday name (Mon, Tue, ...) * mrp_time_format_locale:
%A The full weekday name (Monday, Tuesday, ...) * @t: an #mrptime value
%b The abbreviated month name (Jan, Feb, ...) *
%B The full month name (January, February, ...) * Formats a string with time values. For format is the preferred for the
%d The day of the month (01 - 31). * current locale.
%e The day of the month (1 - 31). *
%H The hour using a 24-hour clock (00 - 23). * Return value: Newly created string that needs to be freed.
%I The hour using a 12-hour clock (01 - 12). **/
%j The day of the year (001 - 366). gchar *
%k The hour using a 24-hour clock (0 to 23). mrp_time_format_locale (mrptime t)
%l The hour using a 12-hour clock (1 - 12). {
%m The month number (01 to 12). struct tm *tm;
%M The minute (00 - 59). gchar buffer[256];
%p Either 'AM' or 'PM' according to the given time value. const gchar *format = "%x"; /* Keep in variable get rid of warning. */
%P Like %p but in lowercase.
%R The time in 24 hour notation (%H:%M). tm = mrp_time_to_tm (t);
%S The second (00 - 61).
%U The week number, (1 - 53), starting with the first if (!strftime (buffer, sizeof (buffer), format, tm)) {
Sunday as the first day of week 1. return g_strup ("");
%W The week number, (1 - 53), starting with the first }
Monday as the first day of week 1.
%y The year without a century (range 00 to 99). return g_strdup (buffer);
%Y The year including the century. }
*/
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* /*
* Copyright (C) 2005 Imendio AB
* Copyright (C) 2002 CodeFactory AB * Copyright (C) 2002 CodeFactory AB
* Copyright (C) 2002 Richard Hult <richard@imendio.com> * Copyright (C) 2002 Richard Hult <richard@imendio.com>
* Copyright (C) 2002 Mikael Hallendal <micke@imendio.com> * Copyright (C) 2002 Mikael Hallendal <micke@imendio.com>
...@@ -35,18 +36,14 @@ typedef long mrptime; ...@@ -35,18 +36,14 @@ typedef long mrptime;
#define MRP_TIME_MAX 2147483647 #define MRP_TIME_MAX 2147483647
mrptime mrp_time_current_time (void); mrptime mrp_time_current_time (void);
struct tm * mrp_time_to_tm (mrptime t); struct tm * mrp_time_to_tm (mrptime t);
mrptime mrp_time_from_tm (struct tm *tm); mrptime mrp_time_from_tm (struct tm *tm);
mrptime mrp_time_compose (gint year, mrptime mrp_time_compose (gint year,
gint month, gint month,
gint day, gint day,
gint hour, gint hour,
gint minute, gint minute,
gint second); gint second);
gboolean mrp_time_decompose (mrptime t, gboolean mrp_time_decompose (mrptime t,
gint *year, gint *year,
gint *month, gint *month,
...@@ -54,35 +51,23 @@ gboolean mrp_time_decompose (mrptime t, ...@@ -54,35 +51,23 @@ gboolean mrp_time_decompose (mrptime t,
gint *hour, gint *hour,
gint *minute, gint *minute,
gint *second); gint *second);
mrptime mrp_time_from_string (const gchar *str, mrptime mrp_time_from_string (const gchar *str,
GError **err); GError **err);
gchar * mrp_time_to_string (mrptime t); gchar * mrp_time_to_string (mrptime t);
mrptime mrp_time_from_msdate_string (const gchar *str); mrptime mrp_time_from_msdate_string (const gchar *str);
mrptime mrp_time_align_day (mrptime t); mrptime mrp_time_align_day (mrptime t);
gint mrp_time_day_of_week (mrptime t); gint mrp_time_day_of_week (mrptime t);
gint mrp_time_week_number (mrptime t); gint mrp_time_week_number (mrptime t);