[libdazzle] suggestions: make dzl_suggestion_entry_hide_suggestions() public
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] suggestions: make dzl_suggestion_entry_hide_suggestions() public
- Date: Mon, 13 Aug 2018 19:20:16 +0000 (UTC)
commit e28f844f45075b5d537aa2fa31b78957d0bc010c
Author: Christian Hergert <chergert redhat com>
Date: Mon Aug 13 12:18:22 2018 -0700
suggestions: make dzl_suggestion_entry_hide_suggestions() public
This allows hiding the popup from handlers as might be useful when
overridding the default handler.
src/suggestions/dzl-suggestion-entry.c | 5 +++--
src/suggestions/dzl-suggestion-entry.h | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/suggestions/dzl-suggestion-entry.c b/src/suggestions/dzl-suggestion-entry.c
index 0f81773..cbec0ae 100644
--- a/src/suggestions/dzl-suggestion-entry.c
+++ b/src/suggestions/dzl-suggestion-entry.c
@@ -124,7 +124,7 @@ dzl_suggestion_entry_show_suggestions (DzlSuggestionEntry *self)
DZL_EXIT;
}
-static void
+void
dzl_suggestion_entry_hide_suggestions (DzlSuggestionEntry *self)
{
DzlSuggestionEntryPrivate *priv = dzl_suggestion_entry_get_instance_private (self);
@@ -133,7 +133,8 @@ dzl_suggestion_entry_hide_suggestions (DzlSuggestionEntry *self)
g_assert (DZL_IS_SUGGESTION_ENTRY (self));
- dzl_suggestion_popover_popdown (priv->popover);
+ if (priv->popover != NULL)
+ dzl_suggestion_popover_popdown (priv->popover);
DZL_EXIT;
}
diff --git a/src/suggestions/dzl-suggestion-entry.h b/src/suggestions/dzl-suggestion-entry.h
index 1af53dc..c69e6f5 100644
--- a/src/suggestions/dzl-suggestion-entry.h
+++ b/src/suggestions/dzl-suggestion-entry.h
@@ -92,6 +92,8 @@ gboolean dzl_suggestion_entry_get_activate_on_single_click (DzlSuggestionE
DZL_AVAILABLE_IN_3_30
void dzl_suggestion_entry_set_activate_on_single_click (DzlSuggestionEntry *self,
gboolean
activate_on_single_click);
+DZL_AVAILABLE_IN_3_30
+void dzl_suggestion_entry_hide_suggestions (DzlSuggestionEntry *self);
DZL_AVAILABLE_IN_ALL
void dzl_suggestion_entry_default_position_func (DzlSuggestionEntry *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]