~davidc3/unity-lens-video/checkbox-tests

« back to all changes in this revision

Viewing changes to scripts/launcher-ql.vala

  • Committer: Aurelien Gateau
  • Date: 2012-01-10 17:16:55 UTC
  • Revision ID: aurelien.gateau@canonical.com-20120110171655-l5fanjhz1lv6p95v
Provide a desktop file and a window for launcher-ql

This way users do not confuse it with checkbox launcher icon

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using Gtk;
 
2
 
1
3
public int main (string[] args)
2
4
{
 
5
   Gtk.init (ref args);
3
6
 
4
 
   var l = Unity.LauncherEntry.get_for_desktop_id ("checkbox-unity.desktop");
 
7
   var l = Unity.LauncherEntry.get_for_desktop_id ("checkbox-unity-helper.desktop");
5
8
 
6
9
   /* Set progress to 42% done */
7
10
   l.progress = 0.42;
21
24
   ql.child_append (item2);
22
25
   l.quicklist = ql;
23
26
 
24
 
   MainLoop loop = new MainLoop ();
25
 
   Timeout.add (30000, () => { loop.quit(); return false; });
26
 
   loop.run();
 
27
   var window = new Window ();
 
28
   window.set_default_size (200, 70);
 
29
   window.border_width = 12;
 
30
   window.destroy.connect (Gtk.main_quit);
 
31
 
 
32
   var button = new Button.with_label ("Quit");
 
33
   button.clicked.connect (Gtk.main_quit);
 
34
   window.add (button);
 
35
 
 
36
   window.show_all ();
 
37
 
 
38
   Gtk.main ();
27
39
   return 0;
28
40
}
29
41