~ubuntu-branches/ubuntu/jaunty/beagle/jaunty-security

« back to all changes in this revision

Viewing changes to search/Tiles/ActionMenuItem.cs

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2008-05-04 00:31:32 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20080504003132-2tkm5o8moo5952ri
Tags: 0.3.7-2ubuntu1
 * Merge from Debian unstable. (LP: #225746) Remaining Ubuntu changes:
  - debian/control:
    + Rename ice{weasel,dove}-beagle to {mozilla,thunderbird}-beagle and
      and update the dependencies accordingly.
    + Change Maintainer to Ubuntu Mono Team.
  - debian/rules:
    + Install the mozilla-beagle and thunderbird-beagle extensions.
  - ice{dove,weasel}.dirs:
    + Renamed to {mozilla,thunderbird}-beagle.dirs.
    + Fixed paths to point to usr/lib/{firefox,thunderbird}

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
using System;
2
 
using Gtk;
3
 
 
4
 
namespace Search.Tiles {
5
 
 
6
 
        public class ActionMenuItem : ImageMenuItem
7
 
        {
8
 
                private TileActionDelegate action_delegate;
9
 
                
10
 
                public ActionMenuItem (TileAction action) : base (action.Name)
11
 
                {
12
 
                        this.action_delegate = action.Action;
13
 
 
14
 
                        if (action.Stock != null) {
15
 
                                Gtk.Image image = new Gtk.Image ();
16
 
                                image.SetFromStock (action.Stock, IconSize.Menu);
17
 
                                image.Show ();
18
 
                                this.Image = image;
19
 
                        }
20
 
                }
21
 
 
22
 
                protected override void OnActivated ()
23
 
                {
24
 
                        if (action_delegate != null)
25
 
                                action_delegate ();
26
 
                }
27
 
        }
28
 
}