Guest User

Untitled

a guest
Jan 23rd, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.65 KB | None | 0 0
  1. private bool on_draw () {
  2.  
  3.             // empty container
  4.             int available_size = get_available_size ();
  5.  
  6.             int i = 0;
  7.             foreach (Event e in list) {
  8.                 GLib.List<Gtk.Widget> children = get_children();
  9.  
  10.                 if (i < available_size) {
  11.                     if (children.find(e) == null)
  12.                         pack_start (e, false, false, 0);
  13.  
  14.                     e.show ();
  15.                 } else {
  16.                     //if (children.find((Gtk.Widget) e) != null)
  17.                     //    e.hide ();
  18.                 }
  19.  
  20.                 i++;
  21.             }
  22.  
  23.             return true;
  24.         }
Add Comment
Please, Sign In to add comment