[gnome-packagekit] Nuke the 'Find' button in gpk-application
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Nuke the 'Find' button in gpk-application
- Date: Fri, 11 May 2012 16:15:41 +0000 (UTC)
commit 3d8e1f21970cedfe11d4ad1e46fec814a3bafb24
Author: Richard Hughes <richard hughsie com>
Date: Thu May 10 17:13:25 2012 +0100
Nuke the 'Find' button in gpk-application
data/gpk-application.ui | 16 ----------------
src/gpk-application.c | 18 ++----------------
2 files changed, 2 insertions(+), 32 deletions(-)
---
diff --git a/data/gpk-application.ui b/data/gpk-application.ui
index 77ca80c..eefb403 100644
--- a/data/gpk-application.ui
+++ b/data/gpk-application.ui
@@ -462,22 +462,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="button_find">
- <property name="label" translatable="yes">Fi_nd</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 8ab9638..a807618 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -1477,18 +1477,11 @@ gpk_application_cancel_cb (GtkWidget *button_widget, GpkApplicationPrivate *priv
static void
gpk_application_set_button_find_sensitivity (GpkApplicationPrivate *priv)
{
- gboolean sensitive;
GtkWidget *widget;
- const gchar *search;
- /* get the text in the search bar */
+ /* only sensitive if not in the middle of a search */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "entry_text"));
- search = gtk_entry_get_text (GTK_ENTRY (widget));
-
- /* only sensitive if not in the middle of a search and has valid text */
- sensitive = !priv->search_in_progress && !egg_strzero (search);
- widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_find"));
- gtk_widget_set_sensitive (widget, sensitive);
+ gtk_widget_set_sensitive (widget, !priv->search_in_progress);
}
/**
@@ -3895,13 +3888,6 @@ gpk_application_startup_cb (GtkApplication *application, GpkApplicationPrivate *
g_signal_connect (widget, "toggled",
G_CALLBACK (gpk_application_menu_filter_supported_cb), priv);
- /* simple find button */
- widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_find"));
- g_signal_connect (widget, "clicked",
- G_CALLBACK (gpk_application_find_cb), priv);
- /* TRANSLATORS: tooltip on the find button */
- gtk_widget_set_tooltip_text (widget, _("Find packages"));
-
/* search cancel button */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_cancel"));
g_signal_connect (widget, "clicked",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]