[gnome-calendar] project: Cleanup code for unused views
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] project: Cleanup code for unused views
- Date: Wed, 16 Sep 2020 15:32:39 +0000 (UTC)
commit 2d5b1aa9d15a61c82519bd7f5cd6608999679a15
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Sat Aug 29 23:18:01 2020 +0200
project: Cleanup code for unused views
Got rid of the unused views in the GcalWindowView enum
and associated code in gcal-window.
src/gcal-enums.h | 3 ---
src/gui/gcal-window.c | 11 -----------
2 files changed, 14 deletions(-)
---
diff --git a/src/gcal-enums.h b/src/gcal-enums.h
index 36ad059d..2692f2cc 100644
--- a/src/gcal-enums.h
+++ b/src/gcal-enums.h
@@ -44,12 +44,9 @@ typedef enum
*/
typedef enum
{
- GCAL_WINDOW_VIEW_DAY,
GCAL_WINDOW_VIEW_WEEK,
GCAL_WINDOW_VIEW_MONTH,
GCAL_WINDOW_VIEW_YEAR,
- GCAL_WINDOW_VIEW_LIST,
- GCAL_WINDOW_VIEW_SEARCH,
} GcalWindowView;
typedef enum
diff --git a/src/gui/gcal-window.c b/src/gui/gcal-window.c
index 1bca64dd..fbbb6aa2 100644
--- a/src/gui/gcal-window.c
+++ b/src/gui/gcal-window.c
@@ -200,12 +200,6 @@ update_today_button_sensitive (GcalWindow *window)
switch (window->active_view)
{
- case GCAL_WINDOW_VIEW_DAY:
- sensitive = g_date_time_get_year (window->active_date) != g_date_time_get_year (now) ||
- g_date_time_get_month (window->active_date) != g_date_time_get_month (now) ||
- g_date_time_get_day_of_month (window->active_date) != g_date_time_get_day_of_month (now);
- break;
-
case GCAL_WINDOW_VIEW_WEEK:
sensitive = g_date_time_get_year (window->active_date) != g_date_time_get_year (now) ||
g_date_time_get_week_of_year (window->active_date) != g_date_time_get_week_of_year (now);
@@ -224,8 +218,6 @@ update_today_button_sensitive (GcalWindow *window)
sensitive = g_date_time_get_year (window->active_date) != g_date_time_get_year (now);
break;
- case GCAL_WINDOW_VIEW_LIST:
- case GCAL_WINDOW_VIEW_SEARCH:
default:
sensitive = TRUE;
break;
@@ -469,9 +461,6 @@ view_changed (GObject *object,
g_type_class_unref (eklass);
- if (view_type == GCAL_WINDOW_VIEW_SEARCH)
- return;
-
window->active_view = view_type;
update_today_button_sensitive (window);
g_object_notify_by_pspec (G_OBJECT (user_data), properties[PROP_ACTIVE_VIEW]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]