[gtk+] file chooser: Simplify search entry callback
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] file chooser: Simplify search entry callback
- Date: Wed, 28 Jan 2015 21:32:41 +0000 (UTC)
commit 1d64175c4b0a83ca7e9535c5dbf4e6ba1e8dfda1
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 28 16:02:03 2015 -0500
file chooser: Simplify search entry callback
gtk/gtkfilechooserwidget.c | 9 +++------
gtk/ui/gtkfilechooserwidget.ui | 2 +-
2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index b4fde0a..9434081 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -526,8 +526,7 @@ static void search_clear_model (GtkFileChooserWidget *impl,
gboolean remove_from_treeview);
static gboolean search_should_respond (GtkFileChooserWidget *impl);
static GSList *search_get_selected_files (GtkFileChooserWidget *impl);
-static void search_entry_activate_cb (GtkEntry *entry,
- gpointer data);
+static void search_entry_activate_cb (GtkFileChooserWidget *impl);
static void settings_load (GtkFileChooserWidget *impl);
static void show_filters (GtkFileChooserWidget *impl,
@@ -5926,7 +5925,7 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserEmbed *chooser_embed)
}
else if (priv->operation_mode == OPERATION_MODE_SEARCH && priv->toplevel_last_focus_widget ==
priv->search_entry)
{
- search_entry_activate_cb (GTK_ENTRY (priv->search_entry), impl);
+ search_entry_activate_cb (impl);
return FALSE;
}
else if (priv->location_entry && priv->toplevel_last_focus_widget == priv->location_entry)
@@ -6238,10 +6237,8 @@ search_start_query (GtkFileChooserWidget *impl,
* entry; starts the query
*/
static void
-search_entry_activate_cb (GtkEntry *entry,
- gpointer data)
+search_entry_activate_cb (GtkFileChooserWidget *impl)
{
- GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (data);
GtkFileChooserWidgetPrivate *priv = impl->priv;
const char *text;
diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui
index 74eb287..d04346b 100644
--- a/gtk/ui/gtkfilechooserwidget.ui
+++ b/gtk/ui/gtkfilechooserwidget.ui
@@ -130,7 +130,7 @@
<object class="GtkSearchEntry" id="search_entry">
<property name="visible">True</property>
<property name="hexpand">True</property>
- <signal name="search-changed" handler="search_entry_activate_cb"
swapped="no"/>
+ <signal name="search-changed" handler="search_entry_activate_cb"
swapped="yes"/>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]