aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-08-02 11:40:17 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-08-02 11:40:17 +0800
commitef025c689be33a54883b5e8b77e58916d1c8002d (patch)
tree8abbb29457c28208bfa599c444bcb82b92fafba7
parent342880e798defc90709e5e7cf97f89be71eab188 (diff)
downloadgsoc2013-evolution-ef025c689be33a54883b5e8b77e58916d1c8002d.tar
gsoc2013-evolution-ef025c689be33a54883b5e8b77e58916d1c8002d.tar.gz
gsoc2013-evolution-ef025c689be33a54883b5e8b77e58916d1c8002d.tar.bz2
gsoc2013-evolution-ef025c689be33a54883b5e8b77e58916d1c8002d.tar.lz
gsoc2013-evolution-ef025c689be33a54883b5e8b77e58916d1c8002d.tar.xz
gsoc2013-evolution-ef025c689be33a54883b5e8b77e58916d1c8002d.tar.zst
gsoc2013-evolution-ef025c689be33a54883b5e8b77e58916d1c8002d.zip
If the default category is the same as the value passed in to this
2001-08-01 Federico Mena Quintero <federico@ximian.com> * gui/calendar-model.c (calendar_model_value_is_empty): If the default category is the same as the value passed in to this function, return TRUE. This could be a hack or not, but it prevents two items from being added to the table if a category is selected. * gui/e-tasks.c (setup_widgets): Allow the search bar to shrink horizontally. * gui/dialogs/task-page.c (clear_widgets): Pass valid values to e_dialog_option_menu_set(); these need to come from the status map. svn path=/trunk/; revision=11565
-rw-r--r--calendar/ChangeLog14
-rw-r--r--calendar/gui/calendar-model.c17
-rw-r--r--calendar/gui/dialogs/task-page.c4
-rw-r--r--calendar/gui/e-tasks.c2
4 files changed, 34 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index be19f93e64..3681d760b4 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,17 @@
+2001-08-01 Federico Mena Quintero <federico@ximian.com>
+
+ * gui/calendar-model.c (calendar_model_value_is_empty): If the
+ default category is the same as the value passed in to this
+ function, return TRUE. This could be a hack or not, but it
+ prevents two items from being added to the table if a category is
+ selected.
+
+ * gui/e-tasks.c (setup_widgets): Allow the search bar to shrink
+ horizontally.
+
+ * gui/dialogs/task-page.c (clear_widgets): Pass valid values to
+ e_dialog_option_menu_set(); these need to come from the status map.
+
2001-08-01 Damon Chaplin <damon@ximian.com>
* cal-client/cal-client.c: removed debugging messages.
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
index b41c0d2519..94221fdd61 100644
--- a/calendar/gui/calendar-model.c
+++ b/calendar/gui/calendar-model.c
@@ -1612,10 +1612,27 @@ calendar_model_initialize_value (ETableModel *etm, int col)
static gboolean
calendar_model_value_is_empty (ETableModel *etm, int col, const void *value)
{
+ CalendarModel *model;
+ CalendarModelPrivate *priv;
+
g_return_val_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS, TRUE);
+ model = CALENDAR_MODEL (etm);
+ priv = model->priv;
+
switch (col) {
case CAL_COMPONENT_FIELD_CATEGORIES:
+ /* This could be a hack or not. If the categories field only
+ * contains the default category, then it possibly means that
+ * the user has not entered anything at all in the click-to-add;
+ * the category is in the value because we put it there in
+ * calendar_model_initialize_value().
+ */
+ if (priv->default_category && value && strcmp (priv->default_category, value) == 0)
+ return TRUE;
+ else
+ return string_is_empty (value);
+
case CAL_COMPONENT_FIELD_CLASSIFICATION: /* actually goes here, not by itself */
case CAL_COMPONENT_FIELD_COMPLETED:
case CAL_COMPONENT_FIELD_DTEND:
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index e50f9f9681..4410fbddf3 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -286,8 +286,8 @@ clear_widgets (TaskPage *tpage)
/* Status, priority, complete percent */
e_dialog_spin_set (priv->percent_complete, 0.0);
- e_dialog_option_menu_set (priv->status, 0, status_map);
- e_dialog_option_menu_set (priv->priority, 0, priority_map);
+ e_dialog_option_menu_set (priv->status, ICAL_STATUS_NEEDSACTION, status_map);
+ e_dialog_option_menu_set (priv->priority, PRIORITY_UNDEFINED, priority_map);
/* Categories */
e_dialog_editable_set (priv->categories, NULL);
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 9ea9bc6e2d..ab59d80273 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -197,7 +197,7 @@ setup_widgets (ETasks *tasks)
GTK_SIGNAL_FUNC (search_bar_category_changed_cb), tasks);
gtk_table_attach (GTK_TABLE (tasks), priv->search_bar, 0, 1, 0, 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0);
gtk_widget_show (priv->search_bar);
priv->tasks_view = e_calendar_table_new ();