aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-10-28 06:13:20 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-10-28 06:13:20 +0800
commit54634a1357884543f64d00aa135bf8bc9a525880 (patch)
tree44d33eb65ea05b6dba7fff9877948f5967d0fa22 /calendar/gui/dialogs
parent18f549eefbc0922c33de0e57095229413ef951f3 (diff)
downloadgsoc2013-evolution-54634a1357884543f64d00aa135bf8bc9a525880.tar
gsoc2013-evolution-54634a1357884543f64d00aa135bf8bc9a525880.tar.gz
gsoc2013-evolution-54634a1357884543f64d00aa135bf8bc9a525880.tar.bz2
gsoc2013-evolution-54634a1357884543f64d00aa135bf8bc9a525880.tar.lz
gsoc2013-evolution-54634a1357884543f64d00aa135bf8bc9a525880.tar.xz
gsoc2013-evolution-54634a1357884543f64d00aa135bf8bc9a525880.tar.zst
gsoc2013-evolution-54634a1357884543f64d00aa135bf8bc9a525880.zip
Delete appointments with empty summaries. Fixes Ximian bug #780.
2001-10-27 Federico Mena Quintero <federico@ximian.com> * gui/e-day-view.c (e_day_view_on_editing_stopped): Delete appointments with empty summaries. Fixes Ximian bug #780. * gui/e-week-view.c (e_week_view_on_editing_stopped): Likewise. * gui/dialogs/delete-comp.c (delete_component_dialog): Added an argument to specify whether we unconditionally want single components to be considered as not having a summary. * gui/comp-util.c (cal_comp_confirm_delete_empty_comp): New function. * gui/misc.[ch]: New files with miscellaneous utility functions; moved string_is_empty() over from calendar-model.c. * gui/calendar-model.c: Use the string_is_empty() function from misc.c. * gui/Makefile.am (evolution_calendar_SOURCES): Added misc.[ch] to the list of sources. svn path=/trunk/; revision=14233
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/comp-editor.c2
-rw-r--r--calendar/gui/dialogs/delete-comp.c11
-rw-r--r--calendar/gui/dialogs/delete-comp.h1
3 files changed, 11 insertions, 3 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 8d16df97f9..dc7d01cbde 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1121,7 +1121,7 @@ delete_cmd (GtkWidget *widget, gpointer data)
vtype = cal_component_get_vtype (priv->comp);
- if (delete_component_dialog (priv->comp, 1, vtype, priv->window))
+ if (delete_component_dialog (priv->comp, FALSE, 1, vtype, priv->window))
delete_comp (editor);
}
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index 2dcfc5c47a..1fc757c38c 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -38,6 +38,9 @@
* delete_component_dialog:
* @comp: A calendar component if a single component is to be deleted, or NULL
* if more that one component is to be deleted.
+ * @consider_as_untitled: If deleting more than one component, this is ignored.
+ * Otherwise, whether to consider the component as not having a summary; if
+ * FALSE then the component's summary string will be used.
* @n_comps: Number of components that are to be deleted.
* @vtype: Type of the components that are to be deleted. This is ignored
* if only one component is to be deleted, and the vtype is extracted from
@@ -55,6 +58,7 @@
**/
gboolean
delete_component_dialog (CalComponent *comp,
+ gboolean consider_as_untitled,
int n_comps, CalComponentVType vtype,
GtkWidget *widget)
{
@@ -80,9 +84,12 @@ delete_component_dialog (CalComponent *comp,
char *tmp;
vtype = cal_component_get_vtype (comp);
- cal_component_get_summary (comp, &summary);
- tmp = e_utf8_to_gtk_string (widget, summary.value);
+ if (!consider_as_untitled) {
+ cal_component_get_summary (comp, &summary);
+ tmp = e_utf8_to_gtk_string (widget, summary.value);
+ } else
+ tmp = NULL;
switch (vtype) {
case CAL_COMPONENT_EVENT:
diff --git a/calendar/gui/dialogs/delete-comp.h b/calendar/gui/dialogs/delete-comp.h
index 3c352a9bc8..64945b5bee 100644
--- a/calendar/gui/dialogs/delete-comp.h
+++ b/calendar/gui/dialogs/delete-comp.h
@@ -25,6 +25,7 @@
#include <cal-util/cal-component.h>
gboolean delete_component_dialog (CalComponent *comp,
+ gboolean consider_as_untitled,
int n_comps, CalComponentVType vtype,
GtkWidget *widget);