diff options
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/task-editor-dialog.glade | 561 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor-dialog.glade.h | 11 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 69 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.glade | 561 |
4 files changed, 662 insertions, 540 deletions
diff --git a/calendar/gui/dialogs/task-editor-dialog.glade b/calendar/gui/dialogs/task-editor-dialog.glade index 98fc85ecf0..03ab29c376 100644 --- a/calendar/gui/dialogs/task-editor-dialog.glade +++ b/calendar/gui/dialogs/task-editor-dialog.glade @@ -37,11 +37,6 @@ <tab_hborder>2</tab_hborder> <tab_vborder>2</tab_vborder> <popup_enable>False</popup_enable> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> <widget> <class>GtkVBox</class> @@ -67,7 +62,7 @@ <widget> <class>GtkLabel</class> <name>label3</name> - <label>Su_mmary</label> + <label>Su_mmary:</label> <justify>GTK_JUSTIFY_CENTER</justify> <wrap>False</wrap> <xalign>0.5</xalign> @@ -117,20 +112,146 @@ </widget> <widget> - <class>GtkHSeparator</class> - <name>hseparator1</name> + <class>GtkFrame</class> + <name>frame2</name> + <label>Date & Time</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> <child> <padding>0</padding> <expand>False</expand> <fill>True</fill> </child> + + <widget> + <class>GtkHBox</class> + <name>hbox4</name> + <border_width>4</border_width> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkTable</class> + <name>table1</name> + <rows>2</rows> + <columns>2</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>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> <widget> - <class>GtkHBox</class> - <name>hbox4</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> + <class>GtkScrolledWindow</class> + <name>scrolledwindow1</name> + <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy> + <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy> + <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> + <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> <child> <padding>0</padding> <expand>False</expand> @@ -138,68 +259,136 @@ </child> <widget> - <class>GtkTable</class> - <name>table1</name> - <rows>2</rows> - <columns>4</columns> + <class>GtkText</class> + <name>description</name> + <height>80</height> + <can_focus>True</can_focus> + <editable>True</editable> + <text></text> + </widget> + </widget> + + <widget> + <class>GtkFrame</class> + <name>frame23</name> + <label>Progress</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox3</name> + <border_width>4</border_width> <homogeneous>False</homogeneous> - <row_spacing>2</row_spacing> - <column_spacing>4</column_spacing> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>True</fill> - </child> + <spacing>4</spacing> <widget> <class>GtkLabel</class> - <name>label6</name> - <label>Sta_rt Date:</label> + <name>label7</name> + <label>_Status:</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>status</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>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>False</fill> </child> </widget> <widget> <class>GtkLabel</class> - <name>label5</name> - <label>_Due Date:</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>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> + <child> + <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> @@ -215,18 +404,9 @@ <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> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> </child> </widget> @@ -248,84 +428,20 @@ <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> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> </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> + <class>GtkFrame</class> + <name>frame24</name> + <label>Classification</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> <child> <padding>0</padding> <expand>False</expand> @@ -333,131 +449,56 @@ </child> <widget> - <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>False</expand> - <fill>False</fill> - </child> - </widget> - - <widget> - <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>False</fill> - </child> - </widget> - - <widget> - <class>GtkLabel</class> - <name>label8</name> - <label>_Priority:</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>priority</default_focus_target> - <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> - </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> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> + <class>GtkHBox</class> + <name>hbox6</name> + <border_width>2</border_width> + <homogeneous>False</homogeneous> + <spacing>4</spacing> - <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>GtkRadioButton</class> + <name>classification-public</name> + <can_focus>True</can_focus> + <label>Pu_blic</label> + <active>True</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </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>GtkRadioButton</class> + <name>classification-private</name> + <can_focus>True</can_focus> + <label>Pri_vate</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> - <widget> - <class>GtkText</class> - <name>description</name> - <can_focus>True</can_focus> - <editable>True</editable> - <text></text> + <widget> + <class>GtkRadioButton</class> + <name>classification-confidential</name> + <can_focus>True</can_focus> + <label>_Confidential</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> </widget> </widget> @@ -468,7 +509,7 @@ Confidential <spacing>2</spacing> <child> <padding>0</padding> - <expand>False</expand> + <expand>True</expand> <fill>True</fill> </child> diff --git a/calendar/gui/dialogs/task-editor-dialog.glade.h b/calendar/gui/dialogs/task-editor-dialog.glade.h index bf568eb358..83a555473c 100644 --- a/calendar/gui/dialogs/task-editor-dialog.glade.h +++ b/calendar/gui/dialogs/task-editor-dialog.glade.h @@ -4,11 +4,11 @@ * DO NOT compile it as part of your application. */ -gchar *s = N_("task-editor-dialog"); -gchar *s = N_("Su_mmary"); +gchar *s = N_("Su_mmary:"); +gchar *s = N_("Date & Time"); gchar *s = N_("Sta_rt Date:"); gchar *s = N_("_Due Date:"); -gchar *s = N_("% Comp_lete:"); +gchar *s = N_("Progress"); gchar *s = N_("_Status:"); gchar *s = N_("Not Started\n" "In Progress\n" @@ -27,6 +27,11 @@ gchar *s = N_("None\n" "Private\n" "Confidential\n" ""); +gchar *s = N_("% Comp_lete:"); +gchar *s = N_("Classification"); +gchar *s = N_("Pu_blic"); +gchar *s = N_("Pri_vate"); +gchar *s = N_("_Confidential"); gchar *s = N_("_Contacts..."); gchar *s = N_("Ca_tegories..."); gchar *s = N_("Task"); diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 936da0f8db..64e73e30f5 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -75,10 +75,13 @@ typedef struct { GtkWidget *status; GtkWidget *priority; - GtkWidget *classification; GtkWidget *description; + GtkWidget *classification_public; + GtkWidget *classification_private; + GtkWidget *classification_confidential; + GtkWidget *contacts; GtkWidget *categories_btn; GtkWidget *categories; @@ -118,14 +121,12 @@ static const int priority_map[] = { }; static const int classification_map[] = { - CAL_COMPONENT_CLASS_NONE, CAL_COMPONENT_CLASS_PUBLIC, CAL_COMPONENT_CLASS_PRIVATE, CAL_COMPONENT_CLASS_CONFIDENTIAL, -1 }; - static void task_editor_class_init (TaskEditorClass *class); static void task_editor_init (TaskEditor *tedit); static void tedit_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data); @@ -161,6 +162,7 @@ static void field_changed (GtkWidget *widget, static void task_editor_set_changed (TaskEditor *tedit, gboolean changed); static gboolean prompt_to_save_changes (TaskEditor *tedit); +static CalComponentClassification classification_get (GtkWidget *widget); static void categories_clicked (GtkWidget *button, TaskEditor *editor); @@ -370,10 +372,13 @@ get_widgets (TaskEditor *tedit) priv->status = GW ("status"); priv->priority = GW ("priority"); - priv->classification = GW ("classification"); priv->description = GW ("description"); + priv->classification_public = GW ("classification-public"); + priv->classification_private = GW ("classification-private"); + priv->classification_confidential = GW ("classification-confidential"); + priv->contacts = GW ("contacts"); priv->categories_btn = GW ("categories-button"); priv->categories = GW ("categories"); @@ -390,12 +395,14 @@ get_widgets (TaskEditor *tedit) && priv->percent_complete && priv->status && priv->priority - && priv->classification + && priv->classification_public + && priv->classification_private + && priv->classification_confidential && priv->description && priv->contacts && priv->categories_btn && priv->categories - && priv->completed_date + && priv->completed_date && priv->url); } @@ -422,6 +429,19 @@ init_widgets (TaskEditor *tedit) "value_changed", GTK_SIGNAL_FUNC (percent_complete_changed), tedit); + /* Classification */ + gtk_signal_connect (GTK_OBJECT (priv->description), "changed", + GTK_SIGNAL_FUNC (field_changed), tedit); + gtk_signal_connect (GTK_OBJECT (priv->classification_public), + "toggled", + GTK_SIGNAL_FUNC (field_changed), tedit); + gtk_signal_connect (GTK_OBJECT (priv->classification_private), + "toggled", + GTK_SIGNAL_FUNC (field_changed), tedit); + gtk_signal_connect (GTK_OBJECT (priv->classification_confidential), + "toggled", + GTK_SIGNAL_FUNC (field_changed), tedit); + /* Connect the default signal handler to use to make sure the "changed" field gets set whenever a field is changed. */ gtk_signal_connect (GTK_OBJECT (priv->summary), "changed", @@ -433,9 +453,6 @@ init_widgets (TaskEditor *tedit) gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (priv->priority)->menu), "deactivate", GTK_SIGNAL_FUNC (field_changed), tedit); - gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (priv->classification)->menu), - "deactivate", - GTK_SIGNAL_FUNC (field_changed), tedit); gtk_signal_connect (GTK_OBJECT (priv->description), "changed", GTK_SIGNAL_FUNC (field_changed), tedit); gtk_signal_connect (GTK_OBJECT (priv->contacts), "changed", @@ -735,8 +752,8 @@ fill_widgets (TaskEditor *tedit) TaskEditorPrivate *priv; CalComponentText text; CalComponentDateTime d; + CalComponentClassification cl; struct icaltimetype *completed; - CalComponentClassification classification; GSList *l; time_t t; int *priority_value, *percent; @@ -836,9 +853,23 @@ fill_widgets (TaskEditor *tedit) /* Classification. */ - cal_component_get_classification (priv->comp, &classification); - e_dialog_option_menu_set (priv->classification, classification, - classification_map); + cal_component_get_classification (priv->comp, &cl); + + switch (cl) { + case CAL_COMPONENT_CLASS_PUBLIC: + e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_PUBLIC, + classification_map); + case CAL_COMPONENT_CLASS_PRIVATE: + e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_PRIVATE, + classification_map); + case CAL_COMPONENT_CLASS_CONFIDENTIAL: + e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_CONFIDENTIAL, + classification_map); + default: + /* What do do? We can't g_assert_not_reached() since it is a + * value from an external file. + */ + } /* Categories */ cal_component_get_categories (priv->comp, &categories); @@ -885,7 +916,6 @@ dialog_to_comp_object (TaskEditor *tedit) icalproperty_status status; TaskEditorPriority priority; int priority_value, percent; - CalComponentClassification classification; char *url, *cat; char *str; @@ -977,9 +1007,7 @@ dialog_to_comp_object (TaskEditor *tedit) cal_component_set_priority (comp, &priority_value); /* Classification. */ - classification = e_dialog_option_menu_get (priv->classification, - classification_map); - cal_component_set_classification (comp, classification); + cal_component_set_classification (comp, classification_get (priv->classification_public)); /* Categories */ cat = e_dialog_editable_get (priv->categories); @@ -1150,6 +1178,13 @@ percent_complete_changed (GtkAdjustment *adj, priv->ignore_callbacks = FALSE; } +/* Decode the radio button group for classifications */ +static CalComponentClassification +classification_get (GtkWidget *widget) +{ + return e_dialog_radio_get (widget, classification_map); +} + /* This is called when all fields except those handled above (status, percent complete & completed date) are changed. It just sets the "changed" flag. */ diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade index 98fc85ecf0..03ab29c376 100644 --- a/calendar/gui/dialogs/task-page.glade +++ b/calendar/gui/dialogs/task-page.glade @@ -37,11 +37,6 @@ <tab_hborder>2</tab_hborder> <tab_vborder>2</tab_vborder> <popup_enable>False</popup_enable> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> <widget> <class>GtkVBox</class> @@ -67,7 +62,7 @@ <widget> <class>GtkLabel</class> <name>label3</name> - <label>Su_mmary</label> + <label>Su_mmary:</label> <justify>GTK_JUSTIFY_CENTER</justify> <wrap>False</wrap> <xalign>0.5</xalign> @@ -117,20 +112,146 @@ </widget> <widget> - <class>GtkHSeparator</class> - <name>hseparator1</name> + <class>GtkFrame</class> + <name>frame2</name> + <label>Date & Time</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> <child> <padding>0</padding> <expand>False</expand> <fill>True</fill> </child> + + <widget> + <class>GtkHBox</class> + <name>hbox4</name> + <border_width>4</border_width> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkTable</class> + <name>table1</name> + <rows>2</rows> + <columns>2</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>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> <widget> - <class>GtkHBox</class> - <name>hbox4</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> + <class>GtkScrolledWindow</class> + <name>scrolledwindow1</name> + <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy> + <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy> + <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> + <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> <child> <padding>0</padding> <expand>False</expand> @@ -138,68 +259,136 @@ </child> <widget> - <class>GtkTable</class> - <name>table1</name> - <rows>2</rows> - <columns>4</columns> + <class>GtkText</class> + <name>description</name> + <height>80</height> + <can_focus>True</can_focus> + <editable>True</editable> + <text></text> + </widget> + </widget> + + <widget> + <class>GtkFrame</class> + <name>frame23</name> + <label>Progress</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hbox3</name> + <border_width>4</border_width> <homogeneous>False</homogeneous> - <row_spacing>2</row_spacing> - <column_spacing>4</column_spacing> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>True</fill> - </child> + <spacing>4</spacing> <widget> <class>GtkLabel</class> - <name>label6</name> - <label>Sta_rt Date:</label> + <name>label7</name> + <label>_Status:</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>status</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>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>False</fill> </child> </widget> <widget> <class>GtkLabel</class> - <name>label5</name> - <label>_Due Date:</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>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> + <child> + <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> @@ -215,18 +404,9 @@ <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> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> </child> </widget> @@ -248,84 +428,20 @@ <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> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> </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> + <class>GtkFrame</class> + <name>frame24</name> + <label>Classification</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> <child> <padding>0</padding> <expand>False</expand> @@ -333,131 +449,56 @@ </child> <widget> - <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>False</expand> - <fill>False</fill> - </child> - </widget> - - <widget> - <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>False</fill> - </child> - </widget> - - <widget> - <class>GtkLabel</class> - <name>label8</name> - <label>_Priority:</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>priority</default_focus_target> - <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> - </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> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> + <class>GtkHBox</class> + <name>hbox6</name> + <border_width>2</border_width> + <homogeneous>False</homogeneous> + <spacing>4</spacing> - <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>GtkRadioButton</class> + <name>classification-public</name> + <can_focus>True</can_focus> + <label>Pu_blic</label> + <active>True</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </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>GtkRadioButton</class> + <name>classification-private</name> + <can_focus>True</can_focus> + <label>Pri_vate</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> - <widget> - <class>GtkText</class> - <name>description</name> - <can_focus>True</can_focus> - <editable>True</editable> - <text></text> + <widget> + <class>GtkRadioButton</class> + <name>classification-confidential</name> + <can_focus>True</can_focus> + <label>_Confidential</label> + <active>False</active> + <draw_indicator>True</draw_indicator> + <group>classification_radio_group</group> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> </widget> </widget> @@ -468,7 +509,7 @@ Confidential <spacing>2</spacing> <child> <padding>0</padding> - <expand>False</expand> + <expand>True</expand> <fill>True</fill> </child> |