[libadwaita/wip/exalm/static-strings] entry-row: Add equality checks to accessors
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/static-strings] entry-row: Add equality checks to accessors
- Date: Mon, 11 Jul 2022 14:50:19 +0000 (UTC)
commit 5c44e1a5b9784c64ddb64178b951833a11658188
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Jul 11 18:49:53 2022 +0400
entry-row: Add equality checks to accessors
src/adw-entry-row.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/src/adw-entry-row.c b/src/adw-entry-row.c
index a41b25f4..a3b15e76 100644
--- a/src/adw-entry-row.c
+++ b/src/adw-entry-row.c
@@ -18,6 +18,9 @@
#define EMPTY_ANIMATION_DURATION 150
#define TITLE_SPACING 3
+ * Gets whether the activating the embedded entry can activate the default widget.
+ * Returns whether pressing Enter will activate
+ *
/**
* AdwEntryRow:
*
@@ -808,6 +811,9 @@ adw_entry_row_set_input_hints (AdwEntryRow *self,
priv = adw_entry_row_get_instance_private (self);
+ if (hints == adw_entry_row_set_input_hints (self))
+ return;
+
gtk_text_set_input_hints (GTK_TEXT (priv->text), hints);
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_INPUT_HINTS]);
@@ -856,6 +862,9 @@ adw_entry_row_set_input_purpose (AdwEntryRow *self,
priv = adw_entry_row_get_instance_private (self);
+ if (purpose == adw_entry_row_get_input_purpose (self))
+ return;
+
gtk_text_set_input_purpose (GTK_TEXT (priv->text), purpose);
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_INPUT_PURPOSE]);
@@ -908,6 +917,11 @@ adw_entry_row_set_enable_emoji_completion (AdwEntryRow *self,
priv = adw_entry_row_get_instance_private (self);
+ enable_emoji_completion = !!enable_emoji_completion;
+
+ if (enale_emoji_completion == adw_entry_row_get_enable_emoji_completion (self))
+ return;
+
gtk_text_set_enable_emoji_completion (GTK_TEXT (priv->text), enable_emoji_completion);
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ENABLE_EMOJI_COMPLETION]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]