aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-02-09 04:50:49 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-02-09 04:50:49 +0800
commit67336a8d362a3ddb78d3daa82375ab647d75f5e4 (patch)
tree960a83b5452aa68821e11432f6df60db03b64fe7
parent2ca1db97c9db0d22865b668bf0f3a1d03f77cdb6 (diff)
downloadgsoc2013-evolution-67336a8d362a3ddb78d3daa82375ab647d75f5e4.tar.gz
gsoc2013-evolution-67336a8d362a3ddb78d3daa82375ab647d75f5e4.tar.zst
gsoc2013-evolution-67336a8d362a3ddb78d3daa82375ab647d75f5e4.zip
Pull up from 0.9 branch
2001-02-08 JP Rosevear <jpr@ximian.com> * gui/event-editor.c: Remove assorted menu/bonobo stuff * gui/dialogs/task-editor.c: Remove assorted menu/bonobo stuff (task_editor_construct): no longer suck out the glade contents into a bonobo win, listen for apply and close signals (tedit_apply_event_cb): listen for apply signal and save object (tedit_close_event_cb): listen for close signal and prompt to save if need be (task_editor_focus): new function to bring the dialog to the front * gui/dialogs/task-editor.h: new prototype * gui/e-meeting-edit.c (schedule_button_clicked_cb): no need to update widgets in the event editor since the event editor won't be open (e_meeting_editor_new): don't need the event editor reference any more * gui/e-meeting-edit.h: Change prototype * gui/e-day-view.c (e_day_view_on_event_right_click): Make schedule meeting a new contextual menu item (e_day_view_on_schedule_meet): new routine to schedule a meeting from the contextual menu * gui/e-calendar-table.c (e_calendar_table_open_task): Call task_editor_focus * gui/event-editor-dialog.glade: Update to be a property box * gui/dialogs/task-editor-dialog.glade: Update to be a property box svn path=/trunk/; revision=8115
-rw-r--r--calendar/ChangeLog61
-rw-r--r--calendar/gui/dialogs/task-editor-dialog.glade1040
-rw-r--r--calendar/gui/dialogs/task-editor.c208
-rw-r--r--calendar/gui/dialogs/task-editor.h16
-rw-r--r--calendar/gui/dialogs/task-page.glade1040
-rw-r--r--calendar/gui/e-calendar-table.c2
-rw-r--r--calendar/gui/e-day-view.c41
-rw-r--r--calendar/gui/e-meeting-edit.c7
-rw-r--r--calendar/gui/e-meeting-edit.h5
-rw-r--r--calendar/gui/event-editor.c174
10 files changed, 1214 insertions, 1380 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 299d88078e..f4b252a734 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,38 @@
+2001-02-08 JP Rosevear <jpr@ximian.com>
+
+ * gui/event-editor.c: Remove assorted menu/bonobo stuff
+
+ * gui/dialogs/task-editor.c: Remove assorted menu/bonobo stuff
+ (task_editor_construct): no longer suck out the glade contents
+ into a bonobo win, listen for apply and close signals
+ (tedit_apply_event_cb): listen for apply signal and save object
+ (tedit_close_event_cb): listen for close signal and prompt to save
+ if need be
+ (task_editor_focus): new function to bring the dialog to the front
+
+ * gui/dialogs/task-editor.h: new prototype
+
+ * gui/e-meeting-edit.c (schedule_button_clicked_cb): no need to
+ update widgets in the event editor since the event editor won't be
+ open
+ (e_meeting_editor_new): don't need the event editor reference any
+ more
+
+ * gui/e-meeting-edit.h: Change prototype
+
+ * gui/e-day-view.c (e_day_view_on_event_right_click): Make
+ schedule meeting a new contextual menu item
+ (e_day_view_on_schedule_meet): new routine to schedule a meeting
+ from the contextual menu
+
+ * gui/e-calendar-table.c (e_calendar_table_open_task): Call
+ task_editor_focus
+
+ * gui/event-editor-dialog.glade: Update to be a property box
+
+ * gui/dialogs/task-editor-dialog.glade: Update to be a property
+ box
+
2001-02-07 Iain Holmes <iain@ximian.com>
* gui/calendar-summary.c (create_summary_view): Add a setter to the
@@ -7,14 +42,6 @@
2001-02-06 JP Rosevear <jpr@ximian.com>
- * cal-util/cal-component.c (cal_component_set_categories): If the
- categories string is empty, remove the property
- (get_period_list): Fixes from clahey to handle the new rdate
- format in libical
- (set_period_list): ditto
-
-2001-02-06 JP Rosevear <jpr@ximian.com>
-
* gui/event-editor.c (fill_reminder_widgets): Match new
append_alarm signature
(reminder_to_comp_object): only add alarms tagged as new, no
@@ -31,6 +58,16 @@
* gui/dialogs/task-editor-dialog.glade: ditto
+2001-02-07 JP Rosevear <jpr@ximian.com>
+
+ * gui/event-editor-dialog.glade: Fix spacing
+
+2001-02-06 JP Rosevear <jpr@ximian.com>
+
+ * gui/event-editor-dialog.glade: Gui tweaks for bugs 1248 and 1246
+
+ * gui/dialogs/task-editor-dialog.glade: ditto
+
2001-02-06 JP Rosevear <jpr@ximian.com>
* gui/e-week-view.c (e_week_view_show_popup_menu): Make the menus more
@@ -40,6 +77,14 @@
* gui/e-calendar-table.c: ditto
+2001-02-06 JP Rosevear <jpr@ximian.com>
+
+ * cal-util/cal-component.c (cal_component_set_categories): If the
+ categories string is empty, remove the property
+ (get_period_list): Fixes from clahey to handle the new rdate
+ format in libical
+ (set_period_list): ditto
+
2001-02-05 JP Rosevear <jpr@ximian.com>
* cal-util/cal-component.c (cal_component_alarm_set_trigger): Set
diff --git a/calendar/gui/dialogs/task-editor-dialog.glade b/calendar/gui/dialogs/task-editor-dialog.glade
index 000cb42cbd..98fc85ecf0 100644
--- a/calendar/gui/dialogs/task-editor-dialog.glade
+++ b/calendar/gui/dialogs/task-editor-dialog.glade
@@ -15,23 +15,28 @@
</project>
<widget>
- <class>GnomeApp</class>
+ <class>GnomePropertyBox</class>
<name>task-editor-dialog</name>
<visible>False</visible>
- <title>task-editor-dialog</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
+ <allow_grow>False</allow_grow>
<auto_shrink>False</auto_shrink>
- <enable_layout_config>True</enable_layout_config>
<widget>
- <class>GnomeDock</class>
- <child_name>GnomeApp:dock</child_name>
- <name>dock1</name>
- <allow_floating>True</allow_floating>
+ <class>GtkNotebook</class>
+ <child_name>GnomeDock:contents</child_name>
+ <name>notebook1</name>
+ <border_width>2</border_width>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
<child>
<padding>0</padding>
<expand>True</expand>
@@ -39,33 +44,106 @@
</child>
<widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
+ <class>GtkVBox</class>
+ <name>vbox1</name>
+ <border_width>4</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
<widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <border_width>4</border_width>
+ <class>GtkTable</class>
+ <name>table3</name>
+ <rows>1</rows>
+ <columns>2</columns>
<homogeneous>False</homogeneous>
- <spacing>4</spacing>
+ <row_spacing>4</row_spacing>
+ <column_spacing>4</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label3</name>
+ <label>Su_mmary</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>summary</default_focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>summary</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator1</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox4</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
<widget>
<class>GtkTable</class>
- <name>table3</name>
- <rows>1</rows>
- <columns>2</columns>
+ <name>table1</name>
+ <rows>2</rows>
+ <columns>4</columns>
<homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
+ <row_spacing>2</row_spacing>
<column_spacing>4</column_spacing>
<child>
<padding>0</padding>
@@ -75,47 +153,48 @@
<widget>
<class>GtkLabel</class>
- <name>label3</name>
- <label>Su_mmary</label>
+ <name>label6</name>
+ <label>Sta_rt Date:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0.5</xalign>
+ <xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
- <default_focus_target>summary</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
- <xfill>False</xfill>
+ <xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
- <class>GtkEntry</class>
- <name>summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
+ <class>GtkLabel</class>
+ <name>label5</name>
+ <label>_Due Date:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
- <xexpand>True</xexpand>
+ <xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
@@ -123,577 +202,488 @@
<yfill>False</yfill>
</child>
</widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <rows>2</rows>
- <columns>4</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>Sta_rt Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Due Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>% Comp_lete:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>percent-complete</default_focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>percent-complete</name>
- <width>60</width>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>0</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>10</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>due-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:32:18 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:33:31 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator2</name>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
<widget>
<class>GtkLabel</class>
- <name>label7</name>
- <label>_Status:</label>
+ <name>label9</name>
+ <label>% Comp_lete:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
- <default_focus_target>status</default_focus_target>
+ <default_focus_target>percent-complete</default_focus_target>
<child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
</child>
</widget>
<widget>
- <class>GtkOptionMenu</class>
- <name>status</name>
+ <class>GtkSpinButton</class>
+ <name>percent-complete</name>
+ <width>60</width>
<can_focus>True</can_focus>
- <items>Not Started
-In Progress
-Completed
-Cancelled
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>_Priority:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
+ <climb_rate>1</climb_rate>
+ <digits>0</digits>
+ <numeric>False</numeric>
+ <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+ <snap>False</snap>
<wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>priority</default_focus_target>
+ <value>0</value>
+ <lower>0</lower>
+ <upper>100</upper>
+ <step>10</step>
+ <page>10</page>
+ <page_size>10</page_size>
<child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>priority</name>
- <can_focus>True</can_focus>
- <items>High
-Normal
-Low
-Undefined
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
<widget>
- <class>GtkLabel</class>
- <name>label18</name>
- <label>C_lassification:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>classification</default_focus_target>
+ <class>Custom</class>
+ <name>due-date</name>
+ <creation_function>task_editor_create_date_edit</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Sun, 10 Sep 2000 17:32:18 GMT</last_modification_time>
<child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
<widget>
- <class>GtkOptionMenu</class>
- <name>classification</name>
- <can_focus>True</can_focus>
- <items>None
-Public
-Private
-Confidential
-</items>
- <initial_choice>0</initial_choice>
+ <class>Custom</class>
+ <name>start-date</name>
+ <creation_function>task_editor_create_date_edit</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Sun, 10 Sep 2000 17:33:31 GMT</last_modification_time>
<child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
</widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator2</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox3</name>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
<widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <height>150</height>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <class>GtkLabel</class>
+ <name>label7</name>
+ <label>_Status:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>status</default_focus_target>
<child>
<padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
-
- <widget>
- <class>GtkText</class>
- <name>description</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
</widget>
<widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
+ <class>GtkOptionMenu</class>
+ <name>status</name>
+ <can_focus>True</can_focus>
+ <items>Not Started
+In Progress
+Completed
+Cancelled
+</items>
+ <initial_choice>0</initial_choice>
<child>
<padding>0</padding>
<expand>False</expand>
- <fill>True</fill>
+ <fill>False</fill>
</child>
-
- <widget>
- <class>GtkButton</class>
- <name>contacts-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label>_Contacts...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>contacts</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>categories-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label17</name>
- <label>Ca_tegories...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>categories</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
</widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label1</name>
- <label>Task</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
<widget>
<class>GtkLabel</class>
- <name>label12</name>
- <label>Date Completed:</label>
+ <name>label8</name>
+ <label>_Priority:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0</xalign>
+ <xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>priority</default_focus_target>
<child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>priority</name>
+ <can_focus>True</can_focus>
+ <items>High
+Normal
+Low
+Undefined
+</items>
+ <initial_choice>0</initial_choice>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
- <name>label14</name>
- <label>URL:</label>
+ <name>label18</name>
+ <label>C_lassification:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0</xalign>
+ <xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>classification</default_focus_target>
<child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>classification</name>
+ <can_focus>True</can_focus>
+ <items>None
+Public
+Private
+Confidential
+</items>
+ <initial_choice>0</initial_choice>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow1</name>
+ <height>150</height>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkText</class>
+ <name>description</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox2</name>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>contacts-button</name>
+ <can_focus>True</can_focus>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label16</name>
+ <label>_Contacts...</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ </widget>
</widget>
<widget>
<class>GtkEntry</class>
- <name>url</name>
+ <name>contacts</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
<widget>
- <class>Custom</class>
- <name>completed-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:34:07 GMT</last_modification_time>
+ <class>GtkButton</class>
+ <name>categories-button</name>
+ <can_focus>True</can_focus>
<child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label17</name>
+ <label>Ca_tegories...</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
<ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>categories</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
</widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label1</name>
+ <label>Task</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table4</name>
+ <border_width>4</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>2</row_spacing>
+ <column_spacing>4</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label12</name>
+ <label>Date Completed:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
<widget>
<class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label2</name>
- <label>Details</label>
+ <name>label14</name>
+ <label>URL:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0.5</xalign>
+ <xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
</widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>url</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>Custom</class>
+ <name>completed-date</name>
+ <creation_function>task_editor_create_date_edit</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Sun, 10 Sep 2000 17:34:07 GMT</last_modification_time>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label2</name>
+ <label>Details</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
</widget>
</widget>
</widget>
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 45961ded2b..936da0f8db 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -49,9 +49,6 @@ typedef struct {
/* Glade XML data */
GladeXML *xml;
- /* UI handler */
- BonoboUIComponent *uic;
-
/* Client to use */
CalClient *client;
@@ -131,9 +128,9 @@ static const int classification_map[] = {
static void task_editor_class_init (TaskEditorClass *class);
static void task_editor_init (TaskEditor *tedit);
-static gint app_delete_event_cb (GtkWidget *widget,
- GdkEvent *event,
- gpointer data);
+static void tedit_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data);
+static gint tedit_close_event_cb (GtkWidget *widget, gpointer data);
+static gint tedit_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data);
static void close_dialog (TaskEditor *tedit);
static gboolean get_widgets (TaskEditor *tedit);
static void init_widgets (TaskEditor *tedit);
@@ -143,13 +140,6 @@ static void set_title_from_comp (TaskEditor *tedit, CalComponent *comp);
static void clear_widgets (TaskEditor *tedit);
static void fill_widgets (TaskEditor *tedit);
-static void file_save_cb (BonoboUIComponent *uic, gpointer data, const char *path);
-static void file_save_and_close_cb (BonoboUIComponent *uic, gpointer data, const char *path);
-static void file_delete_cb (BonoboUIComponent *uic, gpointer data, const char *path);
-static void file_close_cb (BonoboUIComponent *uic, gpointer data, const char *path);
-
-static void debug_xml_cb (BonoboUIComponent *uic, gpointer data, const char *path);
-
static void save_todo_object (TaskEditor *tedit);
static void dialog_to_comp_object (TaskEditor *tedit);
@@ -225,18 +215,6 @@ task_editor_new (void)
return task_editor_construct (tedit);
}
-static BonoboUIVerb verbs [] = {
-
- BONOBO_UI_VERB ("FileSave", file_save_cb),
- BONOBO_UI_VERB ("FileDelete", file_delete_cb),
- BONOBO_UI_VERB ("FileClose", file_close_cb),
- BONOBO_UI_VERB ("FileSaveAndClose", file_save_and_close_cb),
-
- BONOBO_UI_VERB ("DebugDumpXml", debug_xml_cb),
-
- BONOBO_UI_VERB_END
-};
-
/**
* task_editor_construct:
* @tedit: A #TaskEditor.
@@ -251,7 +229,6 @@ TaskEditor *
task_editor_construct (TaskEditor *tedit)
{
TaskEditorPrivate *priv;
- GtkWidget *bonobo_win;
g_return_val_if_fail (tedit != NULL, NULL);
g_return_val_if_fail (IS_TASK_EDITOR (tedit), NULL);
@@ -273,53 +250,17 @@ task_editor_construct (TaskEditor *tedit)
init_widgets (tedit);
- /* Construct the app */
-
- priv->uic = bonobo_ui_component_new ("task-editor-dialog");
- if (!priv->uic) {
- g_message ("task_editor_construct(): Could not create the UI component");
- goto error;
- }
-
- bonobo_win = bonobo_window_new ("event-editor-dialog", "Event Editor");
-
- /* FIXME: The sucking bit */
- {
- GtkWidget *contents;
-
- contents = gnome_dock_get_client_area (
- GNOME_DOCK (GNOME_APP (priv->app)->dock));
- if (!contents) {
- g_message ("event_editor_construct(): Could not get contents");
- goto error;
- }
- gtk_widget_ref (contents);
- gtk_container_remove (GTK_CONTAINER (contents->parent), contents);
- bonobo_window_set_contents (BONOBO_WINDOW (bonobo_win), contents);
- gtk_widget_destroy (priv->app);
- priv->app = GTK_WIDGET (bonobo_win);
- }
-
- {
- BonoboUIContainer *container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (priv->app));
- bonobo_ui_component_set_container (
- priv->uic, bonobo_object_corba_objref (BONOBO_OBJECT (container)));
- }
-
- bonobo_ui_component_add_verb_list_with_data (
- priv->uic, verbs, tedit);
-
- bonobo_ui_util_set_ui (priv->uic, EVOLUTION_DATADIR,
- "evolution-task-editor-dialog.xml",
- "evolution-task-editor");
-
/* Hook to destruction of the dialog */
+ gtk_signal_connect (GTK_OBJECT (priv->app), "apply",
+ GTK_SIGNAL_FUNC (tedit_apply_event_cb), tedit);
+ gtk_signal_connect (GTK_OBJECT (priv->app), "close",
+ GTK_SIGNAL_FUNC (tedit_close_event_cb), tedit);
gtk_signal_connect (GTK_OBJECT (priv->app), "delete_event",
- GTK_SIGNAL_FUNC (app_delete_event_cb), tedit);
+ GTK_SIGNAL_FUNC (tedit_delete_event_cb), tedit);
+
+ /* Add focus to the summary entry */
+ gtk_widget_grab_focus (GTK_WIDGET (priv->summary));
- /* Show the dialog */
- gtk_widget_show (priv->app);
return tedit;
@@ -342,10 +283,41 @@ task_editor_create_date_edit (void)
return dedit;
}
+/* Callback used when the dialog box is destroyed */
+static void
+tedit_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data)
+{
+ TaskEditor *tedit;
+
+ g_return_if_fail (IS_TASK_EDITOR (data));
+
+ tedit = TASK_EDITOR (data);
+
+ if (page_num != -1)
+ return;
+
+ save_todo_object (tedit);
+}
+
+/* Callback used when the dialog box is destroyed */
+static gint
+tedit_close_event_cb (GtkWidget *widget, gpointer data)
+{
+ TaskEditor *tedit;
+
+ g_return_val_if_fail (IS_TASK_EDITOR (data), TRUE);
+
+ tedit = TASK_EDITOR (data);
+
+ if (prompt_to_save_changes (tedit))
+ close_dialog (tedit);
+
+ return TRUE;
+}
/* Callback used when the dialog box is destroyed */
static gint
-app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
+tedit_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
{
TaskEditor *tedit;
@@ -490,11 +462,6 @@ task_editor_destroy (GtkObject *object)
tedit = TASK_EDITOR (object);
priv = tedit->priv;
- if (priv->uic) {
- bonobo_object_unref (BONOBO_OBJECT (priv->uic));
- priv->uic = NULL;
- }
-
if (priv->app) {
gtk_widget_destroy (priv->app);
priv->app = NULL;
@@ -680,6 +647,18 @@ task_editor_set_todo_object (TaskEditor *tedit,
fill_widgets (tedit);
}
+void
+task_editor_focus (TaskEditor *tedit)
+{
+ TaskEditorPrivate *priv;
+
+ g_return_if_fail (tedit != NULL);
+ g_return_if_fail (IS_TASK_EDITOR (tedit));
+
+ priv = tedit->priv;
+ gtk_widget_show_now (priv->app);
+ raise_and_focus (priv->app);
+}
/* Creates an appropriate title for the task editor dialog */
static char *
@@ -1019,80 +998,6 @@ dialog_to_comp_object (TaskEditor *tedit)
cal_component_commit_sequence (comp);
}
-static void
-debug_xml_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- TaskEditor *tedit = TASK_EDITOR (data);
- TaskEditorPrivate *priv = tedit->priv;
-
- bonobo_window_dump (BONOBO_WINDOW (priv->app), "on demand");
-}
-
-/* File/Save callback */
-static void
-file_save_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- TaskEditor *tedit;
-
- tedit = TASK_EDITOR (data);
- save_todo_object (tedit);
-}
-
-/* File/Save and Close callback */
-static void
-file_save_and_close_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- TaskEditor *tedit;
-
- tedit = TASK_EDITOR (data);
- save_todo_object (tedit);
- close_dialog (tedit);
-}
-
-/* File/Delete callback */
-static void
-file_delete_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- TaskEditor *tedit;
- TaskEditorPrivate *priv;
-
- tedit = TASK_EDITOR (data);
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- g_return_if_fail (priv->comp);
-
- if (delete_component_dialog (priv->comp, priv->app)) {
- const char *uid;
-
- cal_component_get_uid (priv->comp, &uid);
-
- /* We don't check the return value; FALSE can mean the object
- * was not in the server anyways.
- */
- cal_client_remove_object (priv->client, uid);
-
- close_dialog (tedit);
- }
-}
-
-/* File/Close callback */
-static void
-file_close_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- TaskEditor *tedit;
-
- g_return_if_fail (IS_TASK_EDITOR (data));
-
- tedit = TASK_EDITOR (data);
-
- if (prompt_to_save_changes (tedit))
- close_dialog (tedit);
-}
-
-
static TaskEditorPriority
priority_value_to_index (int priority_value)
{
@@ -1279,6 +1184,9 @@ task_editor_set_changed (TaskEditor *tedit,
#endif
priv->changed = changed;
+
+ if (priv->app)
+ gnome_property_box_set_state (GNOME_PROPERTY_BOX (priv->app), changed);
}
diff --git a/calendar/gui/dialogs/task-editor.h b/calendar/gui/dialogs/task-editor.h
index 69e3bd41d8..7327803a72 100644
--- a/calendar/gui/dialogs/task-editor.h
+++ b/calendar/gui/dialogs/task-editor.h
@@ -54,15 +54,15 @@ struct _TaskEditorClass
GtkObjectClass parent_class;
};
+GtkType task_editor_get_type (void);
+TaskEditor* task_editor_construct (TaskEditor *tedit);
+TaskEditor* task_editor_new (void);
+void task_editor_set_cal_client (TaskEditor *tedit,
+ CalClient *client);
+void task_editor_set_todo_object (TaskEditor *tedit,
+ CalComponent *comp);
+void task_editor_focus (TaskEditor *tedit);
-GtkType task_editor_get_type (void);
-TaskEditor* task_editor_construct (TaskEditor *tedit);
-TaskEditor* task_editor_new (void);
-
-void task_editor_set_cal_client (TaskEditor *tedit,
- CalClient *client);
-void task_editor_set_todo_object (TaskEditor *tedit,
- CalComponent *comp);
END_GNOME_DECLS
diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade
index 000cb42cbd..98fc85ecf0 100644
--- a/calendar/gui/dialogs/task-page.glade
+++ b/calendar/gui/dialogs/task-page.glade
@@ -15,23 +15,28 @@
</project>
<widget>
- <class>GnomeApp</class>
+ <class>GnomePropertyBox</class>
<name>task-editor-dialog</name>
<visible>False</visible>
- <title>task-editor-dialog</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
+ <allow_grow>False</allow_grow>
<auto_shrink>False</auto_shrink>
- <enable_layout_config>True</enable_layout_config>
<widget>
- <class>GnomeDock</class>
- <child_name>GnomeApp:dock</child_name>
- <name>dock1</name>
- <allow_floating>True</allow_floating>
+ <class>GtkNotebook</class>
+ <child_name>GnomeDock:contents</child_name>
+ <name>notebook1</name>
+ <border_width>2</border_width>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
<child>
<padding>0</padding>
<expand>True</expand>
@@ -39,33 +44,106 @@
</child>
<widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
+ <class>GtkVBox</class>
+ <name>vbox1</name>
+ <border_width>4</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
<widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <border_width>4</border_width>
+ <class>GtkTable</class>
+ <name>table3</name>
+ <rows>1</rows>
+ <columns>2</columns>
<homogeneous>False</homogeneous>
- <spacing>4</spacing>
+ <row_spacing>4</row_spacing>
+ <column_spacing>4</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label3</name>
+ <label>Su_mmary</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>summary</default_focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>summary</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator1</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox4</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
<widget>
<class>GtkTable</class>
- <name>table3</name>
- <rows>1</rows>
- <columns>2</columns>
+ <name>table1</name>
+ <rows>2</rows>
+ <columns>4</columns>
<homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
+ <row_spacing>2</row_spacing>
<column_spacing>4</column_spacing>
<child>
<padding>0</padding>
@@ -75,47 +153,48 @@
<widget>
<class>GtkLabel</class>
- <name>label3</name>
- <label>Su_mmary</label>
+ <name>label6</name>
+ <label>Sta_rt Date:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0.5</xalign>
+ <xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
- <default_focus_target>summary</default_focus_target>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
- <xfill>False</xfill>
+ <xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
- <class>GtkEntry</class>
- <name>summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
+ <class>GtkLabel</class>
+ <name>label5</name>
+ <label>_Due Date:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
- <xexpand>True</xexpand>
+ <xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
@@ -123,577 +202,488 @@
<yfill>False</yfill>
</child>
</widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <rows>2</rows>
- <columns>4</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>Sta_rt Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Due Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>% Comp_lete:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>percent-complete</default_focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>percent-complete</name>
- <width>60</width>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>0</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>10</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>due-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:32:18 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:33:31 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator2</name>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
<widget>
<class>GtkLabel</class>
- <name>label7</name>
- <label>_Status:</label>
+ <name>label9</name>
+ <label>% Comp_lete:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
- <default_focus_target>status</default_focus_target>
+ <default_focus_target>percent-complete</default_focus_target>
<child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
</child>
</widget>
<widget>
- <class>GtkOptionMenu</class>
- <name>status</name>
+ <class>GtkSpinButton</class>
+ <name>percent-complete</name>
+ <width>60</width>
<can_focus>True</can_focus>
- <items>Not Started
-In Progress
-Completed
-Cancelled
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>_Priority:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
+ <climb_rate>1</climb_rate>
+ <digits>0</digits>
+ <numeric>False</numeric>
+ <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+ <snap>False</snap>
<wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>priority</default_focus_target>
+ <value>0</value>
+ <lower>0</lower>
+ <upper>100</upper>
+ <step>10</step>
+ <page>10</page>
+ <page_size>10</page_size>
<child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>priority</name>
- <can_focus>True</can_focus>
- <items>High
-Normal
-Low
-Undefined
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
<widget>
- <class>GtkLabel</class>
- <name>label18</name>
- <label>C_lassification:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>classification</default_focus_target>
+ <class>Custom</class>
+ <name>due-date</name>
+ <creation_function>task_editor_create_date_edit</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Sun, 10 Sep 2000 17:32:18 GMT</last_modification_time>
<child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
<widget>
- <class>GtkOptionMenu</class>
- <name>classification</name>
- <can_focus>True</can_focus>
- <items>None
-Public
-Private
-Confidential
-</items>
- <initial_choice>0</initial_choice>
+ <class>Custom</class>
+ <name>start-date</name>
+ <creation_function>task_editor_create_date_edit</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Sun, 10 Sep 2000 17:33:31 GMT</last_modification_time>
<child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
</widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator2</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox3</name>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
<widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <height>150</height>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <class>GtkLabel</class>
+ <name>label7</name>
+ <label>_Status:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>status</default_focus_target>
<child>
<padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
-
- <widget>
- <class>GtkText</class>
- <name>description</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
</widget>
<widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
+ <class>GtkOptionMenu</class>
+ <name>status</name>
+ <can_focus>True</can_focus>
+ <items>Not Started
+In Progress
+Completed
+Cancelled
+</items>
+ <initial_choice>0</initial_choice>
<child>
<padding>0</padding>
<expand>False</expand>
- <fill>True</fill>
+ <fill>False</fill>
</child>
-
- <widget>
- <class>GtkButton</class>
- <name>contacts-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label>_Contacts...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>contacts</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>categories-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label17</name>
- <label>Ca_tegories...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>categories</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
</widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label1</name>
- <label>Task</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
<widget>
<class>GtkLabel</class>
- <name>label12</name>
- <label>Date Completed:</label>
+ <name>label8</name>
+ <label>_Priority:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0</xalign>
+ <xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>priority</default_focus_target>
<child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>priority</name>
+ <can_focus>True</can_focus>
+ <items>High
+Normal
+Low
+Undefined
+</items>
+ <initial_choice>0</initial_choice>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
- <name>label14</name>
- <label>URL:</label>
+ <name>label18</name>
+ <label>C_lassification:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0</xalign>
+ <xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <default_focus_target>classification</default_focus_target>
<child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>classification</name>
+ <can_focus>True</can_focus>
+ <items>None
+Public
+Private
+Confidential
+</items>
+ <initial_choice>0</initial_choice>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow1</name>
+ <height>150</height>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkText</class>
+ <name>description</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox2</name>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>contacts-button</name>
+ <can_focus>True</can_focus>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label16</name>
+ <label>_Contacts...</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
+ <ypad>0</ypad>
+ </widget>
</widget>
<widget>
<class>GtkEntry</class>
- <name>url</name>
+ <name>contacts</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
<widget>
- <class>Custom</class>
- <name>completed-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:34:07 GMT</last_modification_time>
+ <class>GtkButton</class>
+ <name>categories-button</name>
+ <can_focus>True</can_focus>
<child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label17</name>
+ <label>Ca_tegories...</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>4</xpad>
<ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>categories</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
</widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label1</name>
+ <label>Task</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table4</name>
+ <border_width>4</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>2</row_spacing>
+ <column_spacing>4</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label12</name>
+ <label>Date Completed:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
<widget>
<class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label2</name>
- <label>Details</label>
+ <name>label14</name>
+ <label>URL:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
- <xalign>0.5</xalign>
+ <xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
</widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>url</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>Custom</class>
+ <name>completed-date</name>
+ <creation_function>task_editor_create_date_edit</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Sun, 10 Sep 2000 17:34:07 GMT</last_modification_time>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label2</name>
+ <label>Details</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
</widget>
</widget>
</widget>
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index ab3db722b1..eb3bf5e2b4 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -524,6 +524,8 @@ e_calendar_table_open_task (ECalendarTable *cal_table,
comp = calendar_model_get_component (cal_table->model, row);
task_editor_set_todo_object (tedit, comp);
+
+ task_editor_focus (tedit);
}
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index b84ce99157..bbf0732122 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -42,6 +42,7 @@
#include <gal/widgets/e-canvas.h>
#include <gal/e-text/e-text.h>
#include <gal/widgets/e-canvas-utils.h>
+#include "e-meeting-edit.h"
/* Images */
#include "bell.xpm"
@@ -324,6 +325,8 @@ static void e_day_view_on_delete_occurrence (GtkWidget *widget,
gpointer data);
static void e_day_view_on_delete_appointment (GtkWidget *widget,
gpointer data);
+static void e_day_view_on_schedule_meet (GtkWidget *widget,
+ gpointer data);
static void e_day_view_on_unrecur_appointment (GtkWidget *widget,
gpointer data);
static EDayViewEvent* e_day_view_get_popup_menu_event (EDayView *day_view);
@@ -3008,6 +3011,10 @@ e_day_view_on_event_right_click (EDayView *day_view,
};
static struct menu_item child_items[] = {
+ { N_("Schedule meeting"), (GtkSignalFunc) e_day_view_on_schedule_meet, NULL, TRUE },
+
+ { NULL, NULL, NULL, TRUE},
+
{ N_("Edit this appointment..."), (GtkSignalFunc) e_day_view_on_edit_appointment, NULL, TRUE },
{ N_("Delete this appointment"), (GtkSignalFunc) e_day_view_on_delete_appointment, NULL, TRUE },
@@ -3018,6 +3025,7 @@ e_day_view_on_event_right_click (EDayView *day_view,
static struct menu_item recur_child_items[] = {
{ N_("Make this appointment movable"), (GtkSignalFunc) e_day_view_on_unrecur_appointment, NULL, TRUE },
+ { N_("Schedule meeting"), (GtkSignalFunc) e_day_view_on_schedule_meet, NULL, TRUE },
{ NULL, NULL, NULL, TRUE},
@@ -3051,19 +3059,21 @@ e_day_view_on_event_right_click (EDayView *day_view,
not_being_edited = TRUE;
if (cal_component_has_recurrences (event->comp)) {
- items = 7;
+ items = 8;
context_menu = &recur_child_items[0];
context_menu[0].sensitive = not_being_edited;
- context_menu[2].sensitive = not_being_edited;
+ context_menu[1].sensitive = not_being_edited;
context_menu[3].sensitive = not_being_edited;
context_menu[4].sensitive = not_being_edited;
- context_menu[6].sensitive = have_selection;
+ context_menu[5].sensitive = not_being_edited;
+ context_menu[7].sensitive = have_selection;
} else {
- items = 4;
+ items = 6;
context_menu = &child_items[0];
context_menu[0].sensitive = not_being_edited;
- context_menu[1].sensitive = not_being_edited;
- context_menu[3].sensitive = have_selection;
+ context_menu[2].sensitive = not_being_edited;
+ context_menu[3].sensitive = not_being_edited;
+ context_menu[5].sensitive = have_selection;
}
}
@@ -3184,6 +3194,25 @@ e_day_view_on_delete_appointment (GtkWidget *widget, gpointer data)
static void
+e_day_view_on_schedule_meet (GtkWidget *widget, gpointer data)
+{
+ EDayView *day_view;
+ EDayViewEvent *event;
+ EMeetingEditor *editor;
+
+ day_view = E_DAY_VIEW (data);
+
+ event = e_day_view_get_popup_menu_event (day_view);
+ if (event == NULL)
+ return;
+
+ editor = e_meeting_editor_new (event->comp, day_view->client);
+
+ e_meeting_edit (editor);
+ e_meeting_editor_free (editor);
+}
+
+static void
e_day_view_on_unrecur_appointment (GtkWidget *widget, gpointer data)
{
EDayView *day_view;
diff --git a/calendar/gui/e-meeting-edit.c b/calendar/gui/e-meeting-edit.c
index e8280a151e..934c284ae7 100644
--- a/calendar/gui/e-meeting-edit.c
+++ b/calendar/gui/e-meeting-edit.c
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <bonobo.h>
#include <glade/glade.h>
#include <ical.h>
#include <widgets/meeting-time-sel/e-meeting-time-sel.h>
@@ -54,7 +55,6 @@ struct _EMeetingEditorPrivate {
CalComponent *comp;
CalClient *client;
icalcomponent *icalcomp, *vevent;
- EventEditor *ee;
gint numentries; /* How many attendees are there? */
gboolean dirty; /* Has anything changed? */
@@ -454,8 +454,6 @@ schedule_button_clicked_cb (GtkWidget *widget, gpointer data)
cal_component_free_datetime (&cal_dtstart);
cal_component_free_datetime (&cal_dtend);
- event_editor_update_widgets (priv->ee);
-
priv->dirty = TRUE;
}
@@ -831,7 +829,7 @@ organizer_changed_cb (GtkWidget *widget, gpointer data)
/* ------------------------------------------------------------ */
EMeetingEditor *
-e_meeting_editor_new (CalComponent *comp, CalClient *client, EventEditor *ee)
+e_meeting_editor_new (CalComponent *comp, CalClient *client)
{
EMeetingEditor *object;
EMeetingEditorPrivate *priv;
@@ -843,7 +841,6 @@ e_meeting_editor_new (CalComponent *comp, CalClient *client, EventEditor *ee)
priv->comp = comp;
priv->client = client;
priv->icalcomp = cal_component_get_icalcomponent (comp);
- priv->ee = ee;
object->priv = priv;
diff --git a/calendar/gui/e-meeting-edit.h b/calendar/gui/e-meeting-edit.h
index 8d564b2a5e..e29453ecba 100644
--- a/calendar/gui/e-meeting-edit.h
+++ b/calendar/gui/e-meeting-edit.h
@@ -27,7 +27,6 @@
#include <glade/glade.h>
#include <cal-util/cal-component.h>
#include <cal-client/cal-client.h>
-#include "event-editor.h"
typedef struct _EMeetingEditor EMeetingEditor;
@@ -36,8 +35,8 @@ struct _EMeetingEditor {
};
-EMeetingEditor * e_meeting_editor_new (CalComponent *comp, CalClient *client,
- EventEditor *ee);
+EMeetingEditor * e_meeting_editor_new (CalComponent *comp, CalClient *client);
+
void e_meeting_edit (EMeetingEditor *editor);
void e_meeting_editor_free (EMeetingEditor *editor);
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c
index 420d8136ae..51dc50d90c 100644
--- a/calendar/gui/event-editor.c
+++ b/calendar/gui/event-editor.c
@@ -117,9 +117,6 @@ struct _EventEditorPrivate {
/* Glade XML data */
GladeXML *xml;
- /* UI handler */
- BonoboUIComponent *uic;
-
/* Client to use */
CalClient *client;
@@ -329,11 +326,6 @@ event_editor_destroy (GtkObject *object)
ee = EVENT_EDITOR (object);
priv = ee->priv;
- if (priv->uic) {
- bonobo_object_unref (BONOBO_OBJECT (priv->uic));
- priv->uic = NULL;
- }
-
free_exception_clist_data (GTK_CLIST (priv->recurrence_exception_list));
if (priv->app) {
@@ -1010,7 +1002,8 @@ get_widgets (EventEditor *ee)
#undef GW
- return (priv->general_summary
+ return (priv->app
+ && priv->general_summary
&& priv->start_time
&& priv->end_time
&& priv->all_day_event
@@ -2484,120 +2477,41 @@ close_dialog (EventEditor *ee)
+/* Callback used when the dialog box is "applied" */
static void
-debug_xml_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- EventEditor *ee = EVENT_EDITOR (data);
- EventEditorPrivate *priv = ee->priv;
-
- bonobo_window_dump (BONOBO_WINDOW (priv->app), "on demand");
-}
-
-/* File/Save callback */
-static void
-file_save_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- save_event_object (ee);
-}
-
-/* File/Save and Close callback */
-static void
-file_save_and_close_cb (BonoboUIComponent *uic, gpointer data, const char *path)
+ee_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data)
{
EventEditor *ee;
- ee = EVENT_EDITOR (data);
- save_event_object (ee);
- close_dialog (ee);
-}
-
-/* File/Delete callback */
-static void
-file_delete_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
+ g_return_if_fail (IS_EVENT_EDITOR (data));
ee = EVENT_EDITOR (data);
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- priv = ee->priv;
-
- g_return_if_fail (priv->comp);
-
- if (delete_component_dialog (priv->comp, priv->app)) {
- const char *uid;
-
- cal_component_get_uid (priv->comp, &uid);
-
- /* We don't check the return value; FALSE can mean the object
- * was not in the server anyways.
- */
- cal_client_remove_object (priv->client, uid);
-
- close_dialog (ee);
- }
+ if (page_num != -1)
+ return;
+
+ save_event_object (ee);
}
-/* File/Close callback */
-static void
-file_close_cb (BonoboUIComponent *uic, gpointer data, const char *path)
+/* Callback used when the dialog box is destroyed */
+static gint
+ee_close_event_cb (GtkWidget *widget, gpointer data)
{
EventEditor *ee;
- g_return_if_fail (IS_EVENT_EDITOR (data));
+ g_return_val_if_fail (IS_EVENT_EDITOR (data), TRUE);
ee = EVENT_EDITOR (data);
if (prompt_to_save_changes (ee))
close_dialog (ee);
+
+ return TRUE;
}
-static void
-schedule_meeting_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
- EMeetingEditor *editor;
-
- ee = EVENT_EDITOR (data);
-
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- priv = (EventEditorPrivate *)ee->priv;
-
- editor = e_meeting_editor_new (priv->comp, priv->client, ee);
- e_meeting_edit (editor);
- e_meeting_editor_free (editor);
-}
-
-
-/*
- * NB. there is an insane amount of replication here between
- * this and the task-editor.
- */
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("FileSave", file_save_cb),
- BONOBO_UI_VERB ("FileDelete", file_delete_cb),
- BONOBO_UI_VERB ("FileClose", file_close_cb),
- BONOBO_UI_VERB ("FileSaveAndClose", file_save_and_close_cb),
-
- BONOBO_UI_VERB ("ActionScheduleMeeting", schedule_meeting_cb),
-
- BONOBO_UI_VERB ("DebugDumpXml", debug_xml_cb),
-
- BONOBO_UI_VERB_END
-};
-
-
-
/* Callback used when the dialog box is destroyed */
static gint
-app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
+ee_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
{
EventEditor *ee;
@@ -2625,7 +2539,6 @@ EventEditor *
event_editor_construct (EventEditor *ee)
{
EventEditorPrivate *priv;
- GtkWidget *bonobo_win;
g_return_val_if_fail (ee != NULL, NULL);
g_return_val_if_fail (IS_EVENT_EDITOR (ee), NULL);
@@ -2647,59 +2560,17 @@ event_editor_construct (EventEditor *ee)
init_widgets (ee);
- priv->uic = bonobo_ui_component_new ("event-editor-dialog");
- if (!priv->uic) {
- g_message ("task_editor_construct(): Could not create the UI component");
- goto error;
- }
-
- /* Construct the app */
- bonobo_win = bonobo_window_new ("event-editor-dialog", "Event Editor");
-
- /* FIXME: The sucking bit */
- {
- GtkWidget *contents;
-
- contents = gnome_dock_get_client_area (
- GNOME_DOCK (GNOME_APP (priv->app)->dock));
- if (!contents) {
- g_message ("event_editor_construct(): Could not get contents");
- goto error;
- }
- gtk_widget_ref (contents);
- gtk_container_remove (GTK_CONTAINER (contents->parent), contents);
- bonobo_window_set_contents (BONOBO_WINDOW (bonobo_win), contents);
- gtk_widget_destroy (priv->app);
- priv->app = bonobo_win;
- }
-
- {
- BonoboUIContainer *container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (priv->app));
- bonobo_ui_component_set_container (
- priv->uic, bonobo_object_corba_objref (BONOBO_OBJECT (container)));
- }
-
- bonobo_ui_component_add_verb_list_with_data (priv->uic, verbs, ee);
-
- bonobo_ui_util_set_ui (priv->uic, EVOLUTION_DATADIR,
- "evolution-event-editor.xml",
- "evolution-event-editor");
-
/* Hook to destruction of the dialog */
-
+ gtk_signal_connect (GTK_OBJECT (priv->app), "apply",
+ GTK_SIGNAL_FUNC (ee_apply_event_cb), ee);
+ gtk_signal_connect (GTK_OBJECT (priv->app), "close",
+ GTK_SIGNAL_FUNC (ee_close_event_cb), ee);
gtk_signal_connect (GTK_OBJECT (priv->app), "delete_event",
- GTK_SIGNAL_FUNC (app_delete_event_cb), ee);
-
+ GTK_SIGNAL_FUNC (ee_delete_event_cb), ee);
/* Add focus to the summary entry */
-
gtk_widget_grab_focus (GTK_WIDGET (priv->general_summary));
- /* Show the dialog */
-
- gtk_widget_show (priv->app);
-
return ee;
error:
@@ -3408,6 +3279,9 @@ event_editor_set_changed (EventEditor *ee,
#endif
priv->changed = changed;
+
+ if (priv->app)
+ gnome_property_box_set_state (GNOME_PROPERTY_BOX (priv->app), changed);
}