year-view: Use the new schema from gsettings-desktop-schemas
So that we don't have to depend on GNOME shell. https://bugzilla.gnome.org/show_bug.cgi?id=764001
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
1d7d91cd7c
commit
9b358eb0ba
+3
-1
@@ -100,6 +100,7 @@ EDATASERVER_REQUIRED=3.17.1
|
|||||||
EDATASERVERUI_REQUIRED=3.17.1
|
EDATASERVERUI_REQUIRED=3.17.1
|
||||||
LIBICAL_REQUIRED=1.0
|
LIBICAL_REQUIRED=1.0
|
||||||
GOA_MIN_VERSION=3.2.0
|
GOA_MIN_VERSION=3.2.0
|
||||||
|
GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=3.21.2
|
||||||
|
|
||||||
PKG_CHECK_MODULES(CALENDAR,
|
PKG_CHECK_MODULES(CALENDAR,
|
||||||
gmodule-export-2.0
|
gmodule-export-2.0
|
||||||
@@ -110,7 +111,8 @@ PKG_CHECK_MODULES(CALENDAR,
|
|||||||
libecal-1.2 >= $ECAL_REQUIRED
|
libecal-1.2 >= $ECAL_REQUIRED
|
||||||
libedataserver-1.2 >= $EDATASERVER_REQUIRED
|
libedataserver-1.2 >= $EDATASERVER_REQUIRED
|
||||||
libedataserverui-1.2 >= $EDATASERVERUI_REQUIRED
|
libedataserverui-1.2 >= $EDATASERVERUI_REQUIRED
|
||||||
libical >= $LIBICAL_REQUIRED)
|
libical >= $LIBICAL_REQUIRED
|
||||||
|
gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED)
|
||||||
|
|
||||||
AC_CHECK_LIB(ical, icaltime_days_in_year, [],
|
AC_CHECK_LIB(ical, icaltime_days_in_year, [],
|
||||||
AC_MSG_ERROR([Error: icaltime_days_in_year() not found in libical!. Upgrade your libical library.]))
|
AC_MSG_ERROR([Error: icaltime_days_in_year() not found in libical!. Upgrade your libical library.]))
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ struct _GcalYearView
|
|||||||
gboolean use_24h_format;
|
gboolean use_24h_format;
|
||||||
|
|
||||||
/* show week numbers from GNOME Shell settings */
|
/* show week numbers from GNOME Shell settings */
|
||||||
GSettings *shell_settings;
|
GSettings *calendar_settings;
|
||||||
gboolean show_week_numbers;
|
gboolean show_week_numbers;
|
||||||
|
|
||||||
/* text direction factors */
|
/* text direction factors */
|
||||||
@@ -1401,7 +1401,7 @@ gcal_year_view_finalize (GObject *object)
|
|||||||
|
|
||||||
g_clear_pointer (&year_view->date, g_free);
|
g_clear_pointer (&year_view->date, g_free);
|
||||||
|
|
||||||
g_clear_object (&year_view->shell_settings);
|
g_clear_object (&year_view->calendar_settings);
|
||||||
|
|
||||||
G_OBJECT_CLASS (gcal_year_view_parent_class)->finalize (object);
|
G_OBJECT_CLASS (gcal_year_view_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@@ -1811,9 +1811,9 @@ gcal_year_view_init (GcalYearView *self)
|
|||||||
self->end_selected_date->zone = e_cal_util_get_system_timezone ();
|
self->end_selected_date->zone = e_cal_util_get_system_timezone ();
|
||||||
|
|
||||||
/* bind GNOME Shell' show week numbers property to GNOME Calendar's one */
|
/* bind GNOME Shell' show week numbers property to GNOME Calendar's one */
|
||||||
self->shell_settings = g_settings_new ("org.gnome.shell.calendar");
|
self->calendar_settings = g_settings_new ("org.gnome.desktop.calendar");
|
||||||
g_settings_bind (self->shell_settings, "show-weekdate", self, "show-week-numbers", G_SETTINGS_BIND_DEFAULT);
|
g_settings_bind (self->calendar_settings, "show-weekdate", self, "show-week-numbers", G_SETTINGS_BIND_DEFAULT);
|
||||||
g_signal_connect_swapped (self->shell_settings, "changed::show-weekdate", G_CALLBACK (gtk_widget_queue_draw), self);
|
g_signal_connect_swapped (self->calendar_settings, "changed::show-weekdate", G_CALLBACK (gtk_widget_queue_draw), self);
|
||||||
|
|
||||||
/* layout */
|
/* layout */
|
||||||
self->number_of_columns = 4;
|
self->number_of_columns = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user