Skip to content

Instantly share code, notes, and snippets.

@jaapz
Created November 23, 2012 15:10
Show Gist options
  • Save jaapz/4136062 to your computer and use it in GitHub Desktop.
Save jaapz/4136062 to your computer and use it in GitHub Desktop.
void update_libunity_quicklist () {
var launcher = Unity.LauncherEntry.get_for_desktop_id (app_launcher);
var quicklist = new Dbusmenu.Menuitem ();
foreach (var plug in plugs) {
var item = new Dbusmenu.Menuitem ();
item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, plug["title"]);
item.item_activated.connect (() => {
load_plug (plug["title"], plug["exec"], plug["extern"] == "1");
});
quicklist.child_append (item);
}
launcher.quicklist = quicklist;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment