[dconf-editor] Fix previous commit.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Fix previous commit.
- Date: Mon, 11 Dec 2017 07:25:14 +0000 (UTC)
commit 1449a288b179a077819b202d0ca4733e79ae3f9b
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Dec 11 08:25:00 2017 +0100
Fix previous commit.
editor/key-list-box-row.vala | 2 ++
editor/registry-search.vala | 11 +++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/editor/key-list-box-row.vala b/editor/key-list-box-row.vala
index 9420b48..7d56aaa 100644
--- a/editor/key-list-box-row.vala
+++ b/editor/key-list-box-row.vala
@@ -70,7 +70,9 @@ private abstract class ClickableListBoxRow : EventBox
public signal void on_row_clicked ();
public signal void on_open_parent ();
public signal void on_delete_call ();
+
public signal void on_popover_disappear ();
+ public ulong on_popover_disappear_handler = 0;
public abstract string get_text ();
diff --git a/editor/registry-search.vala b/editor/registry-search.vala
index b2404a4..cb1971a 100644
--- a/editor/registry-search.vala
+++ b/editor/registry-search.vala
@@ -218,7 +218,8 @@ class RegistrySearch : Grid, PathElement, BrowsableView
}
row.show_right_click_popover (modifications_handler, event_x);
- row.on_popover_disappear.connect (window.select_search_entry);
+ if (row.on_popover_disappear_handler == 0)
+ row.on_popover_disappear_handler = row.on_popover_disappear.connect
(window.select_search_entry);
rows_possibly_with_popover.append (row);
}
@@ -279,6 +280,11 @@ class RegistrySearch : Grid, PathElement, BrowsableView
ClickableListBoxRow? row = (ClickableListBoxRow?) rows_possibly_with_popover.get_item (0);
while (row != null)
{
+ if (((!) row).on_popover_disappear_handler != 0)
+ {
+ disconnect (((!) row).on_popover_disappear_handler);
+ ((!) row).on_popover_disappear_handler = 0;
+ }
((!) row).destroy_popover ();
position++;
row = (ClickableListBoxRow?) rows_possibly_with_popover.get_item (position);
@@ -310,7 +316,8 @@ class RegistrySearch : Grid, PathElement, BrowsableView
ClickableListBoxRow row = (ClickableListBoxRow) ((!) selected_row).get_child ();
row.show_right_click_popover (modifications_handler);
- row.on_popover_disappear.connect (window.select_search_entry);
+ if (row.on_popover_disappear_handler == 0)
+ row.on_popover_disappear_handler = row.on_popover_disappear.connect (window.select_search_entry);
rows_possibly_with_popover.append (row);
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]