Compare commits
41 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46c0cf7ae9 | ||
|
|
be4bcd0d9e | ||
|
|
ecf354c0b6 | ||
|
|
535d70749e | ||
|
|
f6696f7717 |
||
|
|
221402d1d7 | ||
|
|
614064ad01 |
||
|
|
e4adc6ae32 | ||
|
|
21daca92e4 |
||
|
|
2e252cb6f0 | ||
|
|
3fa8cfa1ae | ||
|
|
8f32f8e8a4 | ||
|
|
e989a7f1bf |
||
|
|
bfc53ff337 |
||
|
|
08e176fabf | ||
|
|
f780e02ebd |
||
|
|
16f6a3e695 |
||
|
|
bd9e7f9990 |
||
|
|
d9b13e90e4 |
||
|
|
0116286a08 | ||
|
|
bbedba23a8 | ||
|
|
4be1e19a59 |
||
|
|
5ace5740ea |
||
|
|
4e63d83138 |
||
|
|
e58bcc96db |
||
|
|
2b902f4889 | ||
|
|
45e139fda6 |
||
|
|
3f83d508cb |
||
|
|
2e86a0fb8a |
||
|
|
2e1f1c1ce1 | ||
|
|
71a87a209a |
||
|
|
b3e3064c5a | ||
|
|
c8d515b76a |
||
|
|
48fe425a61 |
||
|
|
e0e63f9638 |
||
|
|
01670ba826 |
||
|
|
324ea25ad4 |
||
|
|
d797909ac9 | ||
|
|
798c8ab75f |
||
|
|
03dbb61c9f |
||
|
|
e8733be45d |
6 changed files with 1 additions and 348 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
/wingpanel-indicator-datetime-2.0.1.tar.xz
|
||||
/wingpanel-indicator-datetime-2.0.2.tar.gz
|
||||
|
|
@ -1,221 +0,0 @@
|
|||
diff --git a/src/Widgets/calendar/CalendarModel.vala b/src/Widgets/calendar/CalendarModel.vala
|
||||
index 9dc0438..9ff1755 100644
|
||||
--- a/src/Widgets/calendar/CalendarModel.vala
|
||||
+++ b/src/Widgets/calendar/CalendarModel.vala
|
||||
@@ -61,7 +61,7 @@ namespace DateTime.Widgets {
|
||||
return summary;
|
||||
} else if (alarm) {
|
||||
return "%s - %s".printf (start_time.format (Util.TimeFormat ()), summary);
|
||||
- } else if (range.days > 0 && date.compare (range.first) != 0) {
|
||||
+ } else if (range.days > 0 && date.compare (range.first_dt) != 0) {
|
||||
return summary;
|
||||
}
|
||||
return "%s - %s".printf (summary, start_time.format (Util.TimeFormat ()));
|
||||
@@ -365,8 +365,8 @@ namespace DateTime.Widgets {
|
||||
(Gee.EqualDataFunc<E.CalComponent>? )Util.calcomponent_equal_func);
|
||||
source_events.set (source, events);
|
||||
/* query client view */
|
||||
- var iso_first = E.Util.isodate_from_time_t ((time_t)data_range.first.to_unix ());
|
||||
- var iso_last = E.Util.isodate_from_time_t ((time_t)data_range.last.add_days (1).to_unix ());
|
||||
+ var iso_first = E.Util.isodate_from_time_t ((time_t)data_range.first_dt.to_unix ());
|
||||
+ var iso_last = E.Util.isodate_from_time_t ((time_t)data_range.last_dt.add_days (1).to_unix ());
|
||||
var query = @"(occur-in-time-range? (make-time \"$iso_first\") (make-time \"$iso_last\"))";
|
||||
|
||||
E.CalClient client;
|
||||
@@ -488,4 +488,4 @@ namespace DateTime.Widgets {
|
||||
events_removed (source, removed_events.read_only_view);
|
||||
}
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/src/Widgets/calendar/CalendarView.vala b/src/Widgets/calendar/CalendarView.vala
|
||||
index 4615782..4ede210 100644
|
||||
--- a/src/Widgets/calendar/CalendarView.vala
|
||||
+++ b/src/Widgets/calendar/CalendarView.vala
|
||||
@@ -102,7 +102,7 @@ public class DateTime.Widgets.CalendarView : Gtk.Grid {
|
||||
|
||||
void on_show_weeks_changed () {
|
||||
var model = CalendarModel.get_default ();
|
||||
- weeks.update (model.data_range.first, model.num_weeks);
|
||||
+ weeks.update (model.data_range.first_dt, model.num_weeks);
|
||||
}
|
||||
|
||||
/* Indicates the month has changed */
|
||||
@@ -122,18 +122,18 @@ public class DateTime.Widgets.CalendarView : Gtk.Grid {
|
||||
/* Sets the calendar widgets to the date range of the model */
|
||||
void sync_with_model () {
|
||||
var model = CalendarModel.get_default ();
|
||||
- if (grid.grid_range != null && (model.data_range.equals (grid.grid_range) || grid.grid_range.first.compare (model.data_range.first) == 0))
|
||||
+ if (grid.grid_range != null && (model.data_range.equals (grid.grid_range) || grid.grid_range.first_dt.compare (model.data_range.first_dt) == 0))
|
||||
return; // nothing to do
|
||||
|
||||
GLib.DateTime previous_first = null;
|
||||
if (grid.grid_range != null)
|
||||
- previous_first = grid.grid_range.first;
|
||||
+ previous_first = grid.grid_range.first_dt;
|
||||
var previous_big_grid = big_grid;
|
||||
big_grid = create_big_grid ();
|
||||
stack.add (big_grid);
|
||||
|
||||
header.update_columns (model.week_starts_on);
|
||||
- weeks.update (model.data_range.first, model.num_weeks);
|
||||
+ weeks.update (model.data_range.first_dt, model.num_weeks);
|
||||
grid.set_range (model.data_range, model.month_start);
|
||||
|
||||
// keep focus date on the same day of the month
|
||||
@@ -151,7 +151,7 @@ public class DateTime.Widgets.CalendarView : Gtk.Grid {
|
||||
}
|
||||
|
||||
if (previous_first != null) {
|
||||
- if (previous_first.compare (grid.grid_range.first) == -1) {
|
||||
+ if (previous_first.compare (grid.grid_range.first_dt) == -1) {
|
||||
stack.transition_type = Gtk.StackTransitionType.SLIDE_LEFT;
|
||||
} else {
|
||||
stack.transition_type = Gtk.StackTransitionType.SLIDE_RIGHT;
|
||||
diff --git a/src/Widgets/calendar/Util.vala b/src/Widgets/calendar/Util.vala
|
||||
index f0ffa08..e3fcb69 100644
|
||||
--- a/src/Widgets/calendar/Util.vala
|
||||
+++ b/src/Widgets/calendar/Util.vala
|
||||
@@ -22,8 +22,8 @@
|
||||
namespace Util {
|
||||
/* Represents date range from 'first' to 'last' inclusive */
|
||||
public class DateRange : Object, Gee.Traversable<GLib.DateTime>, Gee.Iterable<GLib.DateTime> {
|
||||
- public GLib.DateTime first { get; private set; }
|
||||
- public GLib.DateTime last { get; private set; }
|
||||
+ public GLib.DateTime first_dt { get; private set; }
|
||||
+ public GLib.DateTime last_dt { get; private set; }
|
||||
public bool @foreach (Gee.ForallFunc<GLib.DateTime> f) {
|
||||
foreach (var date in this) {
|
||||
if (f (date) == false) {
|
||||
@@ -36,22 +36,22 @@ namespace Util {
|
||||
|
||||
public int64 days {
|
||||
get {
|
||||
- return last.difference (first) / GLib.TimeSpan.DAY;
|
||||
+ return last_dt.difference (first_dt) / GLib.TimeSpan.DAY;
|
||||
}
|
||||
}
|
||||
|
||||
public DateRange (GLib.DateTime first, GLib.DateTime last) {
|
||||
assert (first.compare (last) <= 0);
|
||||
- this.first = first;
|
||||
- this.last = last;
|
||||
+ first_dt = first;
|
||||
+ last_dt = last;
|
||||
}
|
||||
|
||||
public DateRange.copy (DateRange date_range) {
|
||||
- this(date_range.first, date_range.last);
|
||||
+ this(date_range.first_dt, date_range.last_dt);
|
||||
}
|
||||
|
||||
public bool equals (DateRange other) {
|
||||
- return (first == other.first && last == other.last);
|
||||
+ return (first_dt == other.first_dt && last_dt == other.last_dt);
|
||||
}
|
||||
|
||||
public Type element_type {
|
||||
@@ -65,7 +65,7 @@ namespace Util {
|
||||
}
|
||||
|
||||
public bool contains (GLib.DateTime time) {
|
||||
- return (first.compare (time) < 1) && (last.compare (time) > -1);
|
||||
+ return (first_dt.compare (time) < 1) && (last_dt.compare (time) > -1);
|
||||
}
|
||||
|
||||
public Gee.SortedSet<GLib.DateTime> to_set () {
|
||||
@@ -107,13 +107,13 @@ namespace Util {
|
||||
|
||||
public DateIterator (DateRange range) {
|
||||
this.range = range;
|
||||
- this.current = range.first.add_days (-1);
|
||||
+ this.current = range.first_dt.add_days (-1);
|
||||
}
|
||||
|
||||
public bool @foreach (Gee.ForallFunc<GLib.DateTime> f) {
|
||||
- var element = range.first;
|
||||
+ var element = range.first_dt;
|
||||
|
||||
- while (element.compare (range.last) < 0) {
|
||||
+ while (element.compare (range.last_dt) < 0) {
|
||||
if (f (element) == false) {
|
||||
return false;
|
||||
}
|
||||
@@ -135,11 +135,11 @@ namespace Util {
|
||||
}
|
||||
|
||||
public bool has_next () {
|
||||
- return current.compare (range.last) < 0;
|
||||
+ return current.compare (range.last_dt) < 0;
|
||||
}
|
||||
|
||||
public bool first () {
|
||||
- current = range.first;
|
||||
+ current = range.first_dt;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -384,8 +384,8 @@ namespace Util {
|
||||
var exdate = property.get_exdate ();
|
||||
var date = ical_to_date_time (exdate);
|
||||
dateranges.@foreach ((daterange) => {
|
||||
- var first = daterange.first;
|
||||
- var last = daterange.last;
|
||||
+ var first = daterange.first_dt;
|
||||
+ var last = daterange.last_dt;
|
||||
|
||||
if (first.get_year () <= date.get_year () && last.get_year () >= date.get_year ()) {
|
||||
if (first.get_day_of_year () <= date.get_day_of_year () && last.get_day_of_year () >= date.get_day_of_year ()) {
|
||||
@@ -426,7 +426,7 @@ namespace Util {
|
||||
int i = 1;
|
||||
int n = i * rrule.interval;
|
||||
|
||||
- while (view_range.last.compare (start.add_days (n)) > 0) {
|
||||
+ while (view_range.last_dt.compare (start.add_days (n)) > 0) {
|
||||
dateranges.add (new Util.DateRange (start.add_days (n), end.add_days (n)));
|
||||
i++;
|
||||
n = i * rrule.interval;
|
||||
@@ -456,7 +456,7 @@ namespace Util {
|
||||
bool is_null_time = rrule.until.is_null_time () == 1;
|
||||
var temp_start = start.add_years (n);
|
||||
|
||||
- while (view_range.last.compare (temp_start) > 0) {
|
||||
+ while (view_range.last_dt.compare (temp_start) > 0) {
|
||||
if (is_null_time == false) {
|
||||
if (temp_start.get_year () > rrule.until.year) {
|
||||
break;
|
||||
@@ -494,7 +494,7 @@ namespace Util {
|
||||
var start_ical_day = get_date_from_ical_day (start.add_months (n), rrule.by_day[k]);
|
||||
int week_of_month = (int)GLib.Math.ceil ((double)start.get_day_of_month () / 7);
|
||||
|
||||
- while (view_range.last.compare (start_ical_day) > 0) {
|
||||
+ while (view_range.last_dt.compare (start_ical_day) > 0) {
|
||||
if (is_null_time == false) {
|
||||
if (start_ical_day.get_year () > rrule.until.year) {
|
||||
break;
|
||||
@@ -541,7 +541,7 @@ namespace Util {
|
||||
bool is_null_time = rrule.until.is_null_time () == 1;
|
||||
var temp_start = start.add_months (n);
|
||||
|
||||
- while (view_range.last.compare (temp_start) > 0) {
|
||||
+ while (view_range.last_dt.compare (temp_start) > 0) {
|
||||
if (is_null_time == false) {
|
||||
if (temp_start.get_year () > rrule.until.year) {
|
||||
break;
|
||||
@@ -618,7 +618,7 @@ namespace Util {
|
||||
bool is_null_time = rrule.until.is_null_time () == 1;
|
||||
var temp_start = start.add_days (n);
|
||||
|
||||
- while (view_range.last.compare (temp_start) > 0) {
|
||||
+ while (view_range.last_dt.compare (temp_start) > 0) {
|
||||
if (is_null_time == false) {
|
||||
if (temp_start.get_year () > rrule.until.year) {
|
||||
break;
|
||||
@@ -810,4 +810,4 @@ namespace Util {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 80eb477..e7ae0a1 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -44,7 +44,7 @@ OPTIONS
|
||||
)
|
||||
|
||||
add_library (${CMAKE_PROJECT_NAME} MODULE ${VALA_C})
|
||||
-target_link_libraries(${CMAKE_PROJECT_NAME} ${DEPS_LIBRARIES})
|
||||
+target_link_libraries(${CMAKE_PROJECT_NAME} ${DEPS_LIBRARIES} m)
|
||||
|
||||
# Installation
|
||||
install (TARGETS ${CMAKE_PROJECT_NAME} DESTINATION ${PKGDATADIR})
|
||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
|||
Orphaned for 6+ weeks
|
||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
|||
SHA512 (wingpanel-indicator-datetime-2.0.2.tar.gz) = d9723ccc6dc8d346ff7caad7defb01a9b7dae2d4958fd1576a23a25813431c47ee8edb3aa636f88a81ce099c2bc0107b11c2cb94e83eb665adf90694a8f8aecb
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
%global __provides_exclude_from ^%{_libdir}/wingpanel/.*\\.so$
|
||||
|
||||
Name: wingpanel-indicator-datetime
|
||||
Summary: Datetime Indicator for wingpanel
|
||||
Version: 2.0.2
|
||||
Release: 7%{?dist}
|
||||
License: GPLv3+
|
||||
|
||||
URL: https://github.com/elementary/%{name}
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# Upstream patch to fix compilation with vala 0.36+
|
||||
# https://github.com/elementary/wingpanel-indicator-datetime/commit/834f0ff2c6aacc6f6453e22986a4d1e7e058d75e
|
||||
Patch0: 00-fix-vala-0.36.patch
|
||||
|
||||
# Patch to fix undefined symbols
|
||||
Patch1: 01-fix-linker-flags.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gettext
|
||||
BuildRequires: vala >= 0.22.0
|
||||
BuildRequires: vala-tools
|
||||
|
||||
BuildRequires: pkgconfig(glib-2.0) >= 2.32
|
||||
BuildRequires: pkgconfig(granite)
|
||||
BuildRequires: pkgconfig(gtk+-3.0)
|
||||
BuildRequires: pkgconfig(libecal-1.2)
|
||||
BuildRequires: pkgconfig(libedataserver-1.2)
|
||||
BuildRequires: pkgconfig(libical)
|
||||
BuildRequires: pkgconfig(libsoup-2.4)
|
||||
BuildRequires: pkgconfig(wingpanel-2.0)
|
||||
|
||||
Supplements: wingpanel%{?_isa}
|
||||
|
||||
|
||||
%description
|
||||
A datetime indicator for wingpanel.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
|
||||
%build
|
||||
mkdir build && pushd build
|
||||
%cmake ..
|
||||
%make_build
|
||||
popd
|
||||
|
||||
|
||||
%install
|
||||
pushd build
|
||||
%make_install
|
||||
popd
|
||||
|
||||
%find_lang datetime-indicator
|
||||
|
||||
|
||||
%files -f datetime-indicator.lang
|
||||
%doc README.md
|
||||
%license COPYING
|
||||
|
||||
%{_libdir}/wingpanel/libdatetime.so
|
||||
|
||||
%{_datadir}/glib-2.0/schemas/org.pantheon.desktop.wingpanel.indicators.datetime.gschema.xml
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 07 2018 Kalev Lember <klember@redhat.com> - 2.0.2-7
|
||||
- Rebuilt for evolution-data-server soname bump
|
||||
|
||||
* Wed Jan 24 2018 Fabio Valentini <decathorpe@gmail.com> - 2.0.2-6
|
||||
- Add patch to fix undefined symbols.
|
||||
|
||||
* Wed Nov 08 2017 Fabio Valentini <decathorpe@gmail.com> - 2.0.2-5
|
||||
- Rebuild for libical soname bump.
|
||||
|
||||
* Sat Nov 04 2017 Fabio Valentini <decathorpe@gmail.com> - 2.0.2-4
|
||||
- Rebuild for granite soname bump.
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Jul 01 2017 Fabio Valentini <decathorpe@gmail.com> - 2.0.2-1
|
||||
- Update to version 2.0.2.
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Tue Jan 24 2017 Fabio Valentini <decathorpe@gmail.com> - 2.0.1-3
|
||||
- Remove explicit BR: pkgconfig.
|
||||
|
||||
* Tue Jan 17 2017 Fabio Valentini <decathorpe@gmail.com> - 2.0.1-2
|
||||
- Clean up spec file.
|
||||
|
||||
* Mon Oct 31 2016 Fabio Valentini <decathorpe@gmail.com> - 2.0.1-1
|
||||
- Update to version 2.0.1.
|
||||
|
||||
* Thu Sep 29 2016 Fabio Valentini <decathorpe@gmail.com> - 2.0-3
|
||||
- Mass rebuild.
|
||||
|
||||
* Wed Sep 28 2016 Fabio Valentini <decathorpe@gmail.com> - 2.0-2
|
||||
- Spec file cleanups.
|
||||
|
||||
* Sun Aug 21 2016 Fabio Valentini <decathorpe@gmail.com> - 2.0-1
|
||||
- Update to version 2.0.
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue