[gtranslator: 6/10] search-bar: Use GtkEntry again
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator: 6/10] search-bar: Use GtkEntry again
- Date: Mon, 21 Mar 2022 07:03:15 +0000 (UTC)
commit 639fc19a02453561141f12363feb3e1e4b3e6343
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Tue Mar 15 23:07:18 2022 +0100
search-bar: Use GtkEntry again
The only feature from the GtkSearchEntry that is needed is the
::search-entry signal. This change allows to set
the entry popup again.
src/gtr-search-bar.c | 8 ++++----
src/gtr-search-bar.ui | 7 +++++--
2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/gtr-search-bar.c b/src/gtr-search-bar.c
index 42f4ad69..f490ac19 100644
--- a/src/gtr-search-bar.c
+++ b/src/gtr-search-bar.c
@@ -41,8 +41,8 @@ struct _GtrSearchBar
GtkButton *replace_button;
GtkButton *previous_button;
GtkButton *next_button;
- GtkSearchEntry *replace_entry;
- GtkSearchEntry *search_entry;
+ GtkEntry *replace_entry;
+ GtkEntry *search_entry;
GtkGrid *search_options;
GtkCheckButton *whole_word;
GtkCheckButton *wrap_around_button;
@@ -441,10 +441,10 @@ gtr_search_bar_real_stop_search (GtrSearchBar *self)
static void
search_entry_stop_search (GtrSearchBar *self,
- GtkSearchEntry *entry)
+ GtkEntry *entry)
{
g_assert (GTR_IS_SEARCH_BAR (self));
- g_assert (GTK_IS_SEARCH_ENTRY (entry));
+ g_assert (GTK_IS_ENTRY (entry));
g_signal_emit (self, signals [STOP_SEARCH], 0);
}
diff --git a/src/gtr-search-bar.ui b/src/gtr-search-bar.ui
index 52adbbb4..447c6d68 100644
--- a/src/gtr-search-bar.ui
+++ b/src/gtr-search-bar.ui
@@ -16,10 +16,13 @@
<property name="row_spacing">8</property>
<property name="column_spacing">8</property>
<child>
- <object class="GtkSearchEntry" id="search_entry">
+ <object class="GtkEntry" id="search_entry">
<property name="visible">true</property>
<property name="can-focus">true</property>
<property name="hexpand">true</property>
+ <property name="primary_icon_name">edit-find-symbolic</property>
+ <property name="primary_icon_activatable">false</property>
+ <property name="primary_icon_sensitive">false</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -44,7 +47,7 @@
</packing>
</child>
<child>
- <object class="GtkSearchEntry" id="replace_entry">
+ <object class="GtkEntry" id="replace_entry">
<property name="visible">false</property>
<property name="can-focus">true</property>
<property name="width-chars">20</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]