Merge lp:~voluntatefaber/granite/stock-menu into lp:~elementary-pantheon/granite/granite

Proposed by Andrea Basso
Status: Merged
Merged at revision: 237
Proposed branch: lp:~voluntatefaber/granite/stock-menu
Merge into: lp:~elementary-pantheon/granite/granite
Diff against target: 15 lines (+2/-1)
1 file modified
lib/Widgets/ContractorMenu.vala (+2/-1)
To merge this branch: bzr merge lp:~voluntatefaber/granite/stock-menu
Reviewer Review Type Date Requested Status
Victor Martinez (community) Approve
Review via email: mp+105555@code.launchpad.net

Commit message

[API] Granite.Widgets.ContractorMenu: Added Stock Menu Item support to add_item(), with option do disable it

To post a comment you must log in.
Revision history for this message
Victor Martinez (victored) wrote :

Please merge using:

bzr merge --author="Andrea Basso <email address hidden>" -m "[API] Granite.Widgets.ContractorMenu: Added Stock Menu Item support to add_item(), with option do disable it"

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/Widgets/ContractorMenu.vala'
2--- lib/Widgets/ContractorMenu.vala 2012-04-10 19:44:48 +0000
3+++ lib/Widgets/ContractorMenu.vala 2012-05-12 12:44:23 +0000
4@@ -32,9 +32,10 @@
5 load_items (filename, mime);
6 }
7
8- public void add_item (string name, string icon_name, int position, ContractCallback method) {
9+ public void add_item (string name, string icon_name, int position, ContractCallback method, bool use_stock = true) {
10 var item = new Gtk.ImageMenuItem ();
11 item.set_always_show_image (true);
12+ item.set_use_stock (use_stock);
13 var image = new Gtk.Image.from_icon_name (icon_name, Gtk.IconSize.MENU);
14 item.set_label (name);
15 item.set_image (image);

Subscribers

People subscribed via source and target branches