[gnome-taquin/arnaudb/wip/gtk4: 102/108] Small fix, 3.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-taquin/arnaudb/wip/gtk4: 102/108] Small fix, 3.
- Date: Tue, 29 Sep 2020 14:16:05 +0000 (UTC)
commit dd66d2c6ad8458097c655a4c754e389a47914272
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Apr 18 18:37:48 2020 +0200
Small fix, 3.
src/history-button.vala | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/history-button.vala b/src/history-button.vala
index ec7c5e0..7e3d847 100644
--- a/src/history-button.vala
+++ b/src/history-button.vala
@@ -24,6 +24,7 @@ using Gtk;
private class HistoryButton : ToggleButton
{
ulong toggled_handler = 0;
+ ulong close_handler = 0;
private PopoverMenu popover;
construct
@@ -69,10 +70,13 @@ private class HistoryButton : ToggleButton
if (toggled_handler != 0)
disconnect (toggled_handler);
+ if (close_handler != 0)
+ popover.disconnect (close_handler);
popover = new PopoverMenu.from_model (menu);
popover.set_parent (this);
popover.set_autohide (false);
toggled_handler = toggled.connect (() => { if (get_active ()) popover.popup (); else popover.popdown
(); }); // toggled is run-first
+ close_handler = popover.closed.connect (() => set_active (false));
}
private static inline void generate_undo_actions_section (ref GLib.Menu menu)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]