~voluntatefaber/beat-box/bug952329

« back to all changes in this revision

Viewing changes to AppMenu.vala

  • Committer: Scott Ringwelski
  • Date: 2011-02-10 21:30:53 UTC
  • Revision ID: sgringwe@mtu.edu-20110210213053-d3c7mnexeref3cwj
sexy icons, sexy waf

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
namespace ElementaryWidgets {
2
 
 
3
 
    using Gtk;
4
 
 
5
 
    public class AppMenu : ToolButtonWithMenu
6
 
    {
7
 
        public AppMenu.from_stock (string stock_image, IconSize size, string label, Menu menu)
8
 
        {
9
 
            Image image = new Image.from_stock(stock_image, size);
10
 
 
11
 
            this(image, label, menu);
12
 
        }
13
 
 
14
 
        public AppMenu (Image image, string label, Menu menu)
15
 
        {
16
 
            base(image, label, menu);
17
 
 
18
 
            clicked.connect(on_clicked);
19
 
        }
20
 
 
21
 
        private void on_clicked ()
22
 
        {
23
 
            menu.select_first (true);
24
 
            popup_menu (null);
25
 
        }
26
 
    }
27
 
}