Skip to content

Commit

Permalink
PartitionBar: make sure we get click events
Browse files Browse the repository at this point in the history
Put the gesture in the constructor
  • Loading branch information
danirabbit committed May 8, 2024
1 parent 93df033 commit eb6d96a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Widgets/PartitionBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Authored by: Michael Aaron Murphy <[email protected]>
*/

public class Installer.PartitionBar : Gtk.Box {
public class Installer.PartitionBar : Gtk.EventBox {
public signal void decrypted (InstallerDaemon.LuksCredentials credential);

public Icon? icon { get; set; default = null; }
Expand Down Expand Up @@ -43,6 +43,9 @@ public class Installer.PartitionBar : Gtk.Box {

menu.relative_to = this;
menu.position = BOTTOM;

click_gesture = new Gtk.GestureMultiPress (this);
click_gesture.released.connect (menu.popup);
}

class construct {
Expand All @@ -64,9 +67,6 @@ public class Installer.PartitionBar : Gtk.Box {

get_style_context ().add_class (Distinst.strfilesys (partition.filesystem));

click_gesture = new Gtk.GestureMultiPress (this);
click_gesture.released.connect (menu.popup);

bind_property ("icon", image, "gicon", SYNC_CREATE);
}

Expand Down

0 comments on commit eb6d96a

Please sign in to comment.