[totem] grilo: Remove drop-down source selection
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] grilo: Remove drop-down source selection
- Date: Fri, 22 Jun 2012 18:02:15 +0000 (UTC)
commit e3a96021c46bcdeab2ceb3ca1e289a1df8ac906b
Author: Bastien Nocera <hadess hadess net>
Date: Mon May 28 16:03:29 2012 +0100
grilo: Remove drop-down source selection
We'll use a tagged entry in the future. This also adds
support for a generic "all" search.
src/plugins/grilo/grilo.ui | 30 ++++++------------------------
src/plugins/grilo/totem-grilo.c | 29 ++++++++++++++++-------------
2 files changed, 22 insertions(+), 37 deletions(-)
---
diff --git a/src/plugins/grilo/grilo.ui b/src/plugins/grilo/grilo.ui
index 0bbd660..fffab38 100644
--- a/src/plugins/grilo/grilo.ui
+++ b/src/plugins/grilo/grilo.ui
@@ -100,16 +100,13 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="gw_search_select_source">
+ <object class="GtkEntry" id="gw_search_text">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">gw_search_store_sources</property>
- <child>
- <object class="GtkCellRendererText" id="gw_search_source_col_name"/>
- <attributes>
- <attribute name="text">1</attribute>
- </attributes>
- </child>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â</property>
+ <property name="activates_default">True</property>
+ <property name="shadow_type">etched-out</property>
+ <property name="caps_lock_warning">False</property>
</object>
<packing>
<property name="expand">True</property>
@@ -125,21 +122,6 @@
</packing>
</child>
<child>
- <object class="GtkEntry" id="gw_search_text">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">â</property>
- <property name="activates_default">True</property>
- <property name="shadow_type">etched-out</property>
- <property name="caps_lock_warning">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkScrolledWindow" id="gw_search_results_window">
<property name="visible">True</property>
<property name="can_focus">True</property>
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index 57bf4a0..69f4515 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -654,12 +654,21 @@ search_more (TotemGriloPlugin *self)
gtk_widget_set_sensitive (self->priv->search_entry, FALSE);
self->priv->search_page++;
self->priv->search_remaining = PAGE_SIZE;
- self->priv->search_id = grl_media_source_search (self->priv->search_source,
- self->priv->search_text,
- search_keys (),
- default_options,
- search_cb,
- self);
+ if (self->priv->search_source != NULL) {
+ self->priv->search_id = grl_media_source_search (self->priv->search_source,
+ self->priv->search_text,
+ search_keys (),
+ default_options,
+ search_cb,
+ self);
+ } else {
+ self->priv->search_id = grl_multiple_search (NULL,
+ self->priv->search_text,
+ search_keys (),
+ default_options,
+ search_cb,
+ self);
+ }
g_object_unref (default_options);
if (self->priv->search_id == 0) {
@@ -882,11 +891,7 @@ source_added_cb (GrlPluginRegistry *registry,
SEARCH_MODEL_SOURCES_SOURCE, source,
SEARCH_MODEL_SOURCES_NAME, name,
-1);
- /* Select one of them */
- if (gtk_combo_box_get_active (GTK_COMBO_BOX (self->priv->search_sources_list)) == -1) {
- gtk_combo_box_set_active (GTK_COMBO_BOX (self->priv->search_sources_list), 0);
- gtk_widget_set_sensitive (self->priv->search_entry, TRUE);
- }
+ /* FIXME: We could set the last used source here */
}
if (icon != NULL) {
@@ -1250,8 +1255,6 @@ setup_sidebar_search (TotemGriloPlugin *self,
SEARCH_MODEL_SOURCES_NAME,
GTK_SORT_ASCENDING);
- gtk_widget_set_sensitive (self->priv->search_entry, FALSE);
-
g_signal_connect (self->priv->search_sources_list,
"changed",
G_CALLBACK (search_source_changed_cb), self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]