Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/AppSystem/Launcher.vala
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public class Dock.Launcher : BaseItem {
popover_menu.set_offset (0, -1);
popover_menu.set_parent (this);

tooltip_text = app.app_info.get_display_name ();
update_tooltip ();
notify["current-pos"].connect (update_tooltip);

image = new Gtk.Image ();

Expand Down Expand Up @@ -377,6 +378,19 @@ public class Dock.Launcher : BaseItem {
});
}

private void update_tooltip () {
string[] accels = {};
var index = (int) current_pos / ItemManager.get_launcher_size ();
if (index < 9) {
accels = {"<Super>%i".printf (index + 1)};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shortcuts are configurable so we probably should make sure to use the actually configured one here

}

tooltip_text = Granite.markup_accel_tooltip (
accels,
app.app_info.get_display_name ()
);
}

protected override bool drag_cancelled (Gdk.Drag drag, Gdk.DragCancelReason reason) {
if (app.pinned && reason == NO_TARGET) {
var popover = new PoofPopover ();
Expand Down