Guest User

Untitled

a guest
Oct 27th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.75 KB | None | 0 0
  1.         public void append (Widget widget) {
  2.  
  3.             if (current_col == n_columns) {
  4.                 current_col = 0;
  5.                 current_row += 1;
  6.             }
  7.             if (current_row == n_rows) {
  8.                 pages++;
  9.                 current_row = 0;
  10.                 new_page ((pages + 1).to_string ());
  11.             }
  12.  
  13.             debug (@"position: current_col: $current_col current_row: $current_row pages: $pages");
  14.  
  15.             attach (widget, current_col + (pages*n_columns - 1), current_col + (pages*n_columns - 1) + 1,
  16.                          current_row, current_row + 1, AttachOptions.EXPAND, AttachOptions.EXPAND,
  17.                          0, 0);
  18.             children.append (widget);
  19.             current_col++;
  20.  
  21.         }
Add Comment
Please, Sign In to add comment