diff --git a/data/ui/menus.ui b/data/ui/menus.ui index 7c9f167e..a1fd8f36 100644 --- a/data/ui/menus.ui +++ b/data/ui/menus.ui @@ -1,13 +1,6 @@ -
- - Add Eve_nt… - app.new - <Primary>n - -
_Calendars diff --git a/data/ui/window.ui b/data/ui/window.ui index 171134da..b3448c80 100644 --- a/data/ui/window.ui +++ b/data/ui/window.ui @@ -386,13 +386,6 @@ 12 True vertical - - - Add Eve_nt - app.new - True - - diff --git a/doc/reference/gnome-calendar-decl-list.txt b/doc/reference/gnome-calendar-decl-list.txt index fdf0fe86..393afce2 100644 --- a/doc/reference/gnome-calendar-decl-list.txt +++ b/doc/reference/gnome-calendar-decl-list.txt @@ -542,7 +542,6 @@ GcalWeekView gcal-window GCAL_TYPE_WINDOW gcal_window_new_with_view_and_date -gcal_window_new_event gcal_window_set_search_mode gcal_window_set_search_query gcal_window_open_event_by_uuid diff --git a/doc/reference/gnome-calendar-decl.txt b/doc/reference/gnome-calendar-decl.txt index 05e28682..77d0ee19 100644 --- a/doc/reference/gnome-calendar-decl.txt +++ b/doc/reference/gnome-calendar-decl.txt @@ -722,11 +722,6 @@ GcalShellSearchProvider *search_provider, GcalManager *manager GcalApplication *app, GcalWindowViewType view_type, icaltimetype *date -gcal_window_new_event -void -GcalWindow *self - - gcal_window_set_search_mode void GcalWindow *self, gboolean enabled diff --git a/doc/reference/gnome-calendar-sections.txt b/doc/reference/gnome-calendar-sections.txt index ed99d871..8b273956 100644 --- a/doc/reference/gnome-calendar-sections.txt +++ b/doc/reference/gnome-calendar-sections.txt @@ -561,7 +561,6 @@ GcalWeekView GcalWindow GCAL_TYPE_WINDOW gcal_window_new_with_view_and_date -gcal_window_new_event gcal_window_set_search_mode gcal_window_set_search_query gcal_window_open_event_by_uuid diff --git a/src/gcal-application.c b/src/gcal-application.c index 31d95513..4040fcec 100644 --- a/src/gcal-application.c +++ b/src/gcal-application.c @@ -59,10 +59,6 @@ struct _GcalApplication GcalClock *clock; }; -static void gcal_application_create_new_event (GSimpleAction *new_event, - GVariant *parameter, - gpointer app); - static void gcal_application_launch_search (GSimpleAction *search, GVariant *parameter, gpointer app); @@ -113,7 +109,6 @@ static GOptionEntry gcal_application_goptions[] = { }; static const GActionEntry gcal_app_entries[] = { - { "new", gcal_application_create_new_event }, { "sync", gcal_application_sync }, { "search", gcal_application_launch_search }, { "about", gcal_application_show_about }, @@ -555,15 +550,6 @@ gcal_application_init (GcalApplication *self) self->search_provider = gcal_shell_search_provider_new (self->manager); } -static void -gcal_application_create_new_event (GSimpleAction *new_event, - GVariant *parameter, - gpointer app) -{ - GcalApplication *self = GCAL_APPLICATION (app); - gcal_window_new_event (GCAL_WINDOW (self->window)); -} - static void gcal_application_sync (GSimpleAction *sync, GVariant *parameter, diff --git a/src/gcal-window.c b/src/gcal-window.c index 8ea7fa62..5f2830fc 100644 --- a/src/gcal-window.c +++ b/src/gcal-window.c @@ -1604,46 +1604,6 @@ gcal_window_new_with_date (GcalApplication *app, NULL); } -/* new-event interaction: first variant */ -/** - * gcal_window_new_event: - * @self: a #GcalWindow - * - * Makes #GcalWindow create a new event. - */ -void -gcal_window_new_event (GcalWindow *self) -{ - g_autoptr (GDateTime) start_date, end_date; - - /* 1st and 2nd steps */ - set_new_event_mode (self, TRUE); - - start_date = g_date_time_new_now_local (); - - /* adjusting dates according to the actual view */ - switch (self->active_view) - { - case GCAL_WINDOW_VIEW_DAY: - case GCAL_WINDOW_VIEW_WEEK: - end_date = g_date_time_add_hours (start_date, 1); - break; - - case GCAL_WINDOW_VIEW_MONTH: - case GCAL_WINDOW_VIEW_YEAR: - end_date = g_date_time_add_days (start_date, 1); - break; - - case GCAL_WINDOW_VIEW_LIST: - case GCAL_WINDOW_VIEW_SEARCH: - default: - end_date = g_date_time_add_days (start_date, 1); - break; - } - - create_event_detailed_cb (NULL, start_date, end_date, self); -} - /** * gcal_window_set_search_mode: * @self: a #GcalWindow diff --git a/src/gcal-window.h b/src/gcal-window.h index e4a52767..8b7c55f9 100644 --- a/src/gcal-window.h +++ b/src/gcal-window.h @@ -35,8 +35,6 @@ G_DECLARE_FINAL_TYPE (GcalWindow, gcal_window, GCAL, WINDOW, GtkApplicationWindo GtkWidget* gcal_window_new_with_date (GcalApplication *app, icaltimetype *date); -void gcal_window_new_event (GcalWindow *self); - void gcal_window_set_search_mode (GcalWindow *self, gboolean enabled);