File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,8 +216,7 @@ public class Grid : Gtk.Grid {
216216 public void add_event (ECal .Component event ) {
217217 foreach (var grid_day in data. values) {
218218 if (Calendar . Util . ecalcomponent_is_on_day (event, grid_day. date)) {
219- var button = new EventButton (event);
220- grid_day. add_event_button (button);
219+ grid_day. add_event (event);
221220 }
222221 }
223222 }
@@ -239,8 +238,7 @@ public class Grid : Gtk.Grid {
239238 foreach (var grid_day in data. values) {
240239 if (Calendar . Util . ecalcomponent_is_on_day (event, grid_day. date)) {
241240 if (! grid_day. update_event (event)) {
242- var button = new EventButton (event);
243- grid_day. add_event_button (button);
241+ grid_day. add_event (event);
244242 }
245243 } else {
246244 grid_day. remove_event (event);
Original file line number Diff line number Diff line change @@ -109,7 +109,9 @@ public class Maya.View.GridDay : Gtk.EventBox {
109109 calmodel. update_event (src, comp, ECal . ObjModType . ALL );
110110 }
111111
112- public void add_event_button (EventButton button) {
112+ public void add_event (ECal . Component component) {
113+ var button = new EventButton (component);
114+
113115 string uid = button. get_uid ();
114116 lock (event_buttons) {
115117 event_buttons. remove (uid);
You can’t perform that action at this time.
0 commit comments