diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2001-06-28 19:57:29 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2001-06-28 19:57:29 +0800 |
commit | 8808041831b8b9b5a12243f938ac65b6496392a6 (patch) | |
tree | 84676c5246271bcf16eb97eceb61441028cd5d60 | |
parent | d77b63aa3c2d2ecdf60ec3fbe86df2d6f5b9b667 (diff) | |
download | gsoc2013-evolution-8808041831b8b9b5a12243f938ac65b6496392a6.tar.gz gsoc2013-evolution-8808041831b8b9b5a12243f938ac65b6496392a6.tar.zst gsoc2013-evolution-8808041831b8b9b5a12243f938ac65b6496392a6.zip |
removed not-uses-anymore parameter in call to
2001-06-28 Rodrigo Moya <rodrigo@ximian.com>
* gui/component-factory.c: removed not-uses-anymore parameter in
call to evolution_shell_component_new
* gui/gnome-cal.[ch] (gnome_calendar_cut_clipboard),
(gnome_calendar_copy_clipboard), (gnome_calendar_paste_clipboard):
new functions for allowing execution of clipboard-related commands
* gui/e-day-view.[ch] (e_day_view_cut_clipboard),
(e_day_view_copy_clipboard), (e_day_view_paste_clipboard): ditto
* gui/e-week-view.[ch] (e_week_view_cut_clipboard),
(e_week_view_copy_clipboard), (e_week_view_paste_clipboard): ditto
2001-06-27 Rodrigo Moya <rodrigo@ximian.com>
* gui/calendar-commands.c (cut_event_cmd),
(copy_event_cmd), (paste_event_cmd): added callbacks for the new
clipboard-related menu entries
svn path=/trunk/; revision=10557
-rw-r--r-- | calendar/ChangeLog | 21 | ||||
-rw-r--r-- | calendar/gui/calendar-commands.c | 39 | ||||
-rw-r--r-- | calendar/gui/calendar-component.c | 1 | ||||
-rw-r--r-- | calendar/gui/component-factory.c | 1 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 20 | ||||
-rw-r--r-- | calendar/gui/e-day-view.h | 5 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 21 | ||||
-rw-r--r-- | calendar/gui/e-week-view.h | 4 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 69 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.h | 5 |
10 files changed, 184 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index ddea870151..5f0e57392f 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,24 @@ +2001-06-28 Rodrigo Moya <rodrigo@ximian.com> + + * gui/component-factory.c: removed not-uses-anymore parameter in + call to evolution_shell_component_new + + * gui/gnome-cal.[ch] (gnome_calendar_cut_clipboard), + (gnome_calendar_copy_clipboard), (gnome_calendar_paste_clipboard): + new functions for allowing execution of clipboard-related commands + + * gui/e-day-view.[ch] (e_day_view_cut_clipboard), + (e_day_view_copy_clipboard), (e_day_view_paste_clipboard): ditto + + * gui/e-week-view.[ch] (e_week_view_cut_clipboard), + (e_week_view_copy_clipboard), (e_week_view_paste_clipboard): ditto + +2001-06-27 Rodrigo Moya <rodrigo@ximian.com> + + * gui/calendar-commands.c (cut_event_cmd), + (copy_event_cmd), (paste_event_cmd): added callbacks for the new + clipboard-related menu entries + 2001-06-27 Ettore Perazzoli <ettore@ximian.com> * gui/component-factory.c (factory_fn): Pass NULL as the diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 3167e002f6..a16b280a13 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -365,6 +365,41 @@ properties_cmd (BonoboUIComponent *uic, gpointer data, const char *path) cal_prefs_dialog_show (preferences_dialog); } +static void +cut_event_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) +{ + GnomeCalendar *gcal; + + gcal = GNOME_CALENDAR (data); + set_clock_cursor (gcal); + gnome_calendar_cut_clipboard (gcal); + set_normal_cursor (gcal); +} + +static void +copy_event_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) +{ + GnomeCalendar *gcal; + + gcal = GNOME_CALENDAR (data); + + set_clock_cursor (gcal); + gnome_calendar_copy_clipboard (gcal); + set_normal_cursor (gcal); +} + +static void +paste_event_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) +{ + GnomeCalendar *gcal; + + gcal = GNOME_CALENDAR (data); + + set_clock_cursor (gcal); + gnome_calendar_paste_clipboard (gcal); + set_normal_cursor (gcal); +} + static BonoboUIVerb verbs [] = { BONOBO_UI_VERB ("CalendarNew", new_calendar_cmd), @@ -376,6 +411,10 @@ static BonoboUIVerb verbs [] = { BONOBO_UI_VERB ("EditNewEvent", new_event_cb), BONOBO_UI_VERB ("CalendarPreferences", properties_cmd), + BONOBO_UI_VERB ("CutEvent", cut_event_cmd), + BONOBO_UI_VERB ("CopyEvent", copy_event_cmd), + BONOBO_UI_VERB ("PasteEvent", paste_event_cmd), + BONOBO_UI_VERB ("CalendarPrev", previous_clicked), BONOBO_UI_VERB ("CalendarToday", today_clicked), BONOBO_UI_VERB ("CalendarNext", next_clicked), diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index d29f3bbc5d..bd11244f85 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -310,7 +310,6 @@ factory_fn (BonoboGenericFactory *factory, EvolutionShellComponent *shell_component; shell_component = evolution_shell_component_new (folder_types, - NULL, create_view, create_folder, remove_folder, diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c index d29f3bbc5d..bd11244f85 100644 --- a/calendar/gui/component-factory.c +++ b/calendar/gui/component-factory.c @@ -310,7 +310,6 @@ factory_fn (BonoboGenericFactory *factory, EvolutionShellComponent *shell_component; shell_component = evolution_shell_component_new (folder_types, - NULL, create_view, create_folder, remove_folder, diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 682e2df9c1..155506f516 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -2538,6 +2538,26 @@ e_day_view_set_week_start_day (EDayView *day_view, e_day_view_recalc_work_week (day_view); } +void +e_day_view_cut_clipboard (EDayView *day_view) +{ + g_return_if_fail (E_IS_DAY_VIEW (day_view)); + e_day_view_on_cut (NULL, day_view); +} + +void +e_day_view_copy_clipboard (EDayView *day_view) +{ + g_return_if_fail (E_IS_DAY_VIEW (day_view)); + e_day_view_on_copy (NULL, day_view); +} + +void +e_day_view_paste_clipboard (EDayView *day_view) +{ + g_return_if_fail (E_IS_DAY_VIEW (day_view)); + e_day_view_on_paste (NULL, day_view); +} static void e_day_view_recalc_work_week (EDayView *day_view) diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h index 6f34b590ec..2d3f5104fb 100644 --- a/calendar/gui/e-day-view.h +++ b/calendar/gui/e-day-view.h @@ -561,6 +561,11 @@ gint e_day_view_get_week_start_day (EDayView *day_view); void e_day_view_set_week_start_day (EDayView *day_view, gint week_start_day); +/* Clipboard-related functions */ +void e_day_view_cut_clipboard (EDayView *day_view); +void e_day_view_copy_clipboard (EDayView *day_view); +void e_day_view_paste_clipboard (EDayView *day_view); + /* * Internal functions called by the associated canvas items. */ diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 70fc937437..7d0f2e1641 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -1643,6 +1643,27 @@ e_week_view_set_24_hour_format (EWeekView *week_view, gtk_widget_queue_draw (week_view->main_canvas); } +void +e_week_view_cut_clipboard (EWeekView *week_view) +{ + g_return_if_fail (E_IS_WEEK_VIEW (week_view)); + e_week_view_on_cut (NULL, week_view); +} + +void +e_week_view_copy_clipboard (EWeekView *week_view) +{ + g_return_if_fail (E_IS_WEEK_VIEW (week_view)); + e_week_view_on_copy (NULL, week_view); +} + +void +e_week_view_paste_clipboard (EWeekView *week_view) +{ + g_return_if_fail (E_IS_WEEK_VIEW (week_view)); + e_week_view_on_paste (NULL, week_view); +} + static gboolean e_week_view_recalc_display_start_day (EWeekView *week_view) diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h index 059cedb18c..cf1986b3bb 100644 --- a/calendar/gui/e-week-view.h +++ b/calendar/gui/e-week-view.h @@ -418,6 +418,10 @@ gboolean e_week_view_get_24_hour_format (EWeekView *week_view); void e_week_view_set_24_hour_format (EWeekView *week_view, gboolean use_24_hour); +/* Clipboard related functions */ +void e_week_view_cut_clipboard (EWeekView *week_view); +void e_week_view_copy_clipboard (EWeekView *week_view); +void e_week_view_paste_clipboard (EWeekView *week_view); /* diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 16afc47bd1..3aade08afa 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1960,3 +1960,72 @@ gnome_calendar_update_view_buttons (GnomeCalendar *gcal) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); gtk_signal_handler_unblock_by_data (GTK_OBJECT (button), gcal); } + +void +gnome_calendar_cut_clipboard (GnomeCalendar *gcal) +{ + GnomeCalendarPrivate *priv; + + priv = gcal->priv; + + switch (priv->current_view_type) { + case GNOME_CAL_DAY_VIEW : + e_day_view_cut_clipboard (priv->day_view); + break; + case GNOME_CAL_WORK_WEEK_VIEW : + e_day_view_cut_clipboard (priv->work_week_view); + break; + case GNOME_CAL_WEEK_VIEW : + e_week_view_cut_clipboard (priv->week_view); + break; + case GNOME_CAL_MONTH_VIEW : + e_week_view_cut_clipboard (priv->month_view); + break; + } +} + +void +gnome_calendar_copy_clipboard (GnomeCalendar *gcal) +{ + GnomeCalendarPrivate *priv; + + priv = gcal->priv; + + switch (priv->current_view_type) { + case GNOME_CAL_DAY_VIEW : + e_day_view_copy_clipboard (priv->day_view); + break; + case GNOME_CAL_WORK_WEEK_VIEW : + e_day_view_copy_clipboard (priv->work_week_view); + break; + case GNOME_CAL_WEEK_VIEW : + e_week_view_copy_clipboard (priv->week_view); + break; + case GNOME_CAL_MONTH_VIEW : + e_week_view_copy_clipboard (priv->month_view); + break; + } +} + +void +gnome_calendar_paste_clipboard (GnomeCalendar *gcal) +{ + GnomeCalendarPrivate *priv; + + priv = gcal->priv; + + switch (priv->current_view_type) { + case GNOME_CAL_DAY_VIEW : + e_day_view_paste_clipboard (priv->day_view); + break; + case GNOME_CAL_WORK_WEEK_VIEW : + e_day_view_paste_clipboard (priv->work_week_view); + break; + case GNOME_CAL_WEEK_VIEW : + e_week_view_paste_clipboard (priv->week_view); + break; + case GNOME_CAL_MONTH_VIEW : + e_week_view_paste_clipboard (priv->month_view); + break; + } +} diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h index 308095e2f7..d7721acec4 100644 --- a/calendar/gui/gnome-cal.h +++ b/calendar/gui/gnome-cal.h @@ -134,6 +134,11 @@ void gnome_calendar_set_view_buttons (GnomeCalendar *gcal, just return without doing anything. */ void gnome_calendar_update_view_buttons (GnomeCalendar *gcal); +/* Clipboard operations */ +void gnome_calendar_cut_clibpoard (GnomeCalendar *gcal); +void gnome_calendar_copy_clipboard (GnomeCalendar *gcal); +void gnome_calendar_paste_clipboard (GnomeCalendar *gcal); + END_GNOME_DECLS |