Advertisement
rotrevrep

test soup

May 3rd, 2013
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.57 KB | None | 0 0
  1. using Gtk;
  2.  
  3. public static void main(string[] args){
  4.     Gtk.init(ref args);
  5.     Win w = new Win();
  6.     w.show_all();
  7.     Gtk.main();
  8. }
  9.  
  10. public class Win : Window
  11. {
  12.     ProgressBar pb;
  13.    
  14.     public Win(){
  15.         destroy.connect(Gtk.main_quit);
  16.         Box b = new Box(Orientation.VERTICAL,0);
  17.         pb = new ProgressBar();
  18.         b.pack_start(pb);
  19.         Button button = new Button.with_label("go");
  20.         button.clicked.connect(on_button_clicked);
  21.         b.pack_start(button);
  22.         add(b);
  23.     }
  24.    
  25.     void on_button_clicked(){
  26.             Soup.Session s = new Soup.Session();
  27.             s.request("http://www.google.fr");
  28.        
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement