aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-11-24 07:26:12 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-11-24 07:26:12 +0800
commite0cc63b07902740a58e399dd07c91a9a5a1c52bb (patch)
treea35e9c6196e40c41e10c9b603c370e8b5457b9d7 /calendar/gui/calendar-component.c
parent515d9aaeb26d164dacc3fe0450b3b51fa1c04054 (diff)
downloadgsoc2013-evolution-e0cc63b07902740a58e399dd07c91a9a5a1c52bb.tar.gz
gsoc2013-evolution-e0cc63b07902740a58e399dd07c91a9a5a1c52bb.tar.zst
gsoc2013-evolution-e0cc63b07902740a58e399dd07c91a9a5a1c52bb.zip
fixed copyright notices.
2003-11-23 Rodrigo Moya <rodrigo@ximian.com> * gui/dialogs/new-calendar.[ch]: fixed copyright notices. * gui/dialogs/copy-source-dialog.[ch]: implementation of the Copy command for sources. * gui/dialogs/Makefile.am: added new files. * gui/calendar-component.c (fill_popup_menu_cb, copy_calendar_cb): added Copy command. * gui/tasks-component.c (fill_popup_menu_cb, copy_task_list_cb): added Copy command. svn path=/trunk/; revision=23471
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 97e6b2654b..0968b9372f 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -39,6 +39,7 @@
#include "comp-util.h"
#include "dialogs/new-calendar.h"
#include "dialogs/comp-editor.h"
+#include "dialogs/copy-source-dialog.h"
#include "dialogs/event-editor.h"
#include "widgets/misc/e-source-selector.h"
@@ -327,6 +328,21 @@ add_popup_menu_item (GtkMenu *menu, const char *label, const char *pixmap,
}
static void
+copy_calendar_cb (GtkWidget *widget, CalendarComponent *comp)
+{
+ ESource *selected_source;
+ CalendarComponentPrivate *priv;
+
+ priv = comp->priv;
+
+ selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->source_selector));
+ if (!selected_source)
+ return;
+
+ copy_source_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)), selected_source, CALOBJ_TYPE_EVENT);
+}
+
+static void
delete_calendar_cb (GtkWidget *widget, CalendarComponent *comp)
{
ESource *selected_source;
@@ -406,8 +422,9 @@ fill_popup_menu_cb (ESourceSelector *selector, GtkMenu *menu, CalendarComponent
TRUE : FALSE;
add_popup_menu_item (menu, _("New Calendar"), GTK_STOCK_NEW, G_CALLBACK (new_calendar_cb), comp, TRUE);
- add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_calendar_cb), comp, sensitive);
+ add_popup_menu_item (menu, _("Copy"), NULL, G_CALLBACK (copy_calendar_cb), comp, sensitive);
add_popup_menu_item (menu, _("Rename"), NULL, G_CALLBACK (rename_calendar_cb), comp, sensitive);
+ add_popup_menu_item (menu, _("Delete"), GTK_STOCK_DELETE, G_CALLBACK (delete_calendar_cb), comp, sensitive);
}
static void