[gtranslator: 5/20] search-bar: Use GtkSearchEntry
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator: 5/20] search-bar: Use GtkSearchEntry
- Date: Sun, 6 Mar 2022 12:34:49 +0000 (UTC)
commit 69def704a578d990acfde5cd7fd8245b92fb2090
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Sat Mar 5 13:33:32 2022 +0100
search-bar: Use GtkSearchEntry
Rather than a GtkEntry, also removed CB that did nothing.
src/gtr-search-bar.c | 18 +-----------------
src/gtr-search-bar.ui | 5 +----
2 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/src/gtr-search-bar.c b/src/gtr-search-bar.c
index f42fd7ea..8d8fc6dd 100644
--- a/src/gtr-search-bar.c
+++ b/src/gtr-search-bar.c
@@ -46,7 +46,7 @@ struct _GtrSearchBar
GtkButton *previous_button;
GtkButton *next_button;
GtrHistoryEntry *replace_entry;
- GtkEntry *search_entry;
+ GtkSearchEntry *search_entry;
GtkGrid *search_options;
GtkCheckButton *whole_word;
GtkCheckButton *wrap_around_button;
@@ -536,16 +536,6 @@ search_entry_stop_search (GtrSearchBar *self,
g_signal_emit (self, signals [STOP_SEARCH], 0);
}
-static void
-search_entry_changed (GtrSearchBar *dialog,
- GtkEntry *entry)
-{
- const gchar *search_string;
-
- search_string = gtk_entry_get_text (GTK_ENTRY (entry));
- g_return_if_fail (search_string != NULL);
-}
-
static void
gtr_search_bar_destroy (GtkWidget *widget)
{
@@ -775,12 +765,6 @@ gtr_search_bar_init (GtrSearchBar *self)
G_CALLBACK (gtr_search_bar_find_next),
self);
- g_signal_connect_data (self->search_entry,
- "changed",
- G_CALLBACK (search_entry_changed),
- self, NULL,
- G_CONNECT_SWAPPED | G_CONNECT_AFTER);
-
g_signal_connect_swapped (self->search_entry,
"populate-popup",
G_CALLBACK (search_entry_populate_popup),
diff --git a/src/gtr-search-bar.ui b/src/gtr-search-bar.ui
index bc9fbf1d..f507187d 100644
--- a/src/gtr-search-bar.ui
+++ b/src/gtr-search-bar.ui
@@ -16,13 +16,10 @@
<property name="row_spacing">8</property>
<property name="column_spacing">8</property>
<child>
- <object class="GtkEntry" id="search_entry">
+ <object class="GtkSearchEntry" 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]