[banshee] [UI] Make the search entry's EmptyMessage more informative
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [UI] Make the search entry's EmptyMessage more informative
- Date: Fri, 13 Aug 2010 00:03:30 +0000 (UTC)
commit 3a1d86ff171446e5c46127ae6443d8327f4ddd3d
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Aug 12 16:31:43 2010 -0700
[UI] Make the search entry's EmptyMessage more informative
When in the Music library, it'll say "Search your music", etc. Should
make it clear to users what it is they'll be searching.
po/POTFILES.in | 1 +
src/Clients/Nereid/Nereid/PlayerInterface.cs | 5 +++++
src/Clients/Nereid/Nereid/ViewContainer.cs | 2 --
.../Banshee.Library/MusicLibrarySource.cs | 2 ++
.../Banshee.Library/VideoLibrarySource.cs | 1 +
.../Banshee.Playlist/AbstractPlaylistSource.cs | 1 +
.../Banshee.Widgets/Banshee.Widgets/SearchEntry.cs | 1 +
.../Banshee.Audiobook/AudiobookLibrarySource.cs | 1 +
.../Banshee.InternetRadio/InternetRadioSource.cs | 1 +
.../Banshee.Podcasting.Data/PodcastSource.cs | 1 +
10 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 68316f8..e964ffb 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -147,6 +147,7 @@ src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView_DragAndDrop.cs
src/Core/Banshee.WebBrowser/Banshee.WebSource/WebBrowserShell.cs
src/Core/Banshee.Widgets/Banshee.Widgets/DiscUsageDisplay.cs
+src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
src/Core/Banshee.Widgets/Banshee.Widgets/SeekSlider.cs
src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
src/Core/Banshee.Widgets/Banshee.Widgets/VolumeButton.cs
diff --git a/src/Clients/Nereid/Nereid/PlayerInterface.cs b/src/Clients/Nereid/Nereid/PlayerInterface.cs
index 1948c8c..a3dd1ff 100644
--- a/src/Clients/Nereid/Nereid/PlayerInterface.cs
+++ b/src/Clients/Nereid/Nereid/PlayerInterface.cs
@@ -429,6 +429,11 @@ namespace Nereid
view_container.SearchEntry.Ready = false;
view_container.SearchEntry.CancelSearch ();
+ /* Translators: this is a verb (command), not a noun (things) */
+ var msg = source.Properties.Get<string> ("SearchEntryDescription") ?? Catalog.GetString ("Search");
+ view_container.SearchEntry.EmptyMessage = msg;
+ view_container.SearchEntry.TooltipText = msg;
+
if (source.FilterQuery != null) {
view_container.SearchEntry.Query = source.FilterQuery;
view_container.SearchEntry.ActivateFilter ((int)source.FilterType);
diff --git a/src/Clients/Nereid/Nereid/ViewContainer.cs b/src/Clients/Nereid/Nereid/ViewContainer.cs
index f73173e..5c59915 100644
--- a/src/Clients/Nereid/Nereid/ViewContainer.cs
+++ b/src/Clients/Nereid/Nereid/ViewContainer.cs
@@ -183,8 +183,6 @@ namespace Nereid
private void OnSearchEntryFilterChanged (object o, EventArgs args)
{
- /* Translators: this is a verb (command), not a noun (things) */
- search_entry.EmptyMessage = String.Format (Catalog.GetString ("Search"));
/*search_entry.EmptyMessage = String.Format (Catalog.GetString ("Filter on {0}"),
search_entry.GetLabelForFilterID (search_entry.ActiveFilterID));*/
diff --git a/src/Core/Banshee.Services/Banshee.Library/MusicLibrarySource.cs b/src/Core/Banshee.Services/Banshee.Library/MusicLibrarySource.cs
index f549c27..5ce5bca 100644
--- a/src/Core/Banshee.Services/Banshee.Library/MusicLibrarySource.cs
+++ b/src/Core/Banshee.Services/Banshee.Library/MusicLibrarySource.cs
@@ -62,6 +62,8 @@ namespace Banshee.Library
NotMediaTypes = TrackMediaAttributes.Podcast | TrackMediaAttributes.VideoStream | TrackMediaAttributes.AudioBook;
Properties.SetStringList ("Icon.Name", "audio-x-generic", "source-library");
+ Properties.Set<string> ("SearchEntryDescription", Catalog.GetString ("Search your music"));
+
// Migrate the old library-location schema, if necessary
if (DatabaseConfigurationClient.Client.Get<int> ("MusicLibraryLocationMigrated", 0) != 1) {
string old_location = OldLocationSchema.Get ();
diff --git a/src/Core/Banshee.Services/Banshee.Library/VideoLibrarySource.cs b/src/Core/Banshee.Services/Banshee.Library/VideoLibrarySource.cs
index 0df8de3..daf00f8 100644
--- a/src/Core/Banshee.Services/Banshee.Library/VideoLibrarySource.cs
+++ b/src/Core/Banshee.Services/Banshee.Library/VideoLibrarySource.cs
@@ -45,6 +45,7 @@ namespace Banshee.Library
MediaTypes = TrackMediaAttributes.VideoStream;
NotMediaTypes = TrackMediaAttributes.Podcast;
Properties.SetStringList ("Icon.Name", "video-x-generic", "video", "source-library");
+ Properties.Set<string> ("SearchEntryDescription", Catalog.GetString ("Search your videos"));
Properties.SetString ("TrackView.ColumnControllerXml", String.Format (@"
<column-controller>
<add-all-defaults />
diff --git a/src/Core/Banshee.Services/Banshee.Playlist/AbstractPlaylistSource.cs b/src/Core/Banshee.Services/Banshee.Playlist/AbstractPlaylistSource.cs
index 5ed6749..eed0e4c 100644
--- a/src/Core/Banshee.Services/Banshee.Playlist/AbstractPlaylistSource.cs
+++ b/src/Core/Banshee.Services/Banshee.Playlist/AbstractPlaylistSource.cs
@@ -157,6 +157,7 @@ namespace Banshee.Playlist
DatabaseTrackModel.JoinColumn = "TrackID";
DatabaseTrackModel.CachesJoinTableEntries = CachesJoinTableEntries;
DatabaseTrackModel.AddCondition (String.Format (TrackCondition, dbid));
+ Properties.Set<string> ("SearchEntryDescription", Catalog.GetString ("Search this playlist"));
base.AfterInitialized ();
}
diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
index 7d34c4d..cc5b826 100644
--- a/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
+++ b/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
@@ -92,6 +92,7 @@ namespace Banshee.Widgets
entry = new FramelessEntry(this);
filter_button = new HoverImageButton(IconSize.Menu, new string [] { "edit-find", Stock.Find });
clear_button = new HoverImageButton(IconSize.Menu, new string [] { "edit-clear", Stock.Clear });
+ clear_button.TooltipText = Mono.Unix.Catalog.GetString ("Clear search");
box.PackStart(filter_button, false, false, 0);
box.PackStart(entry, true, true, 0);
diff --git a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
index 451add6..1929aac 100644
--- a/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
+++ b/src/Extensions/Banshee.Audiobook/Banshee.Audiobook/AudiobookLibrarySource.cs
@@ -72,6 +72,7 @@ namespace Banshee.Audiobook
SupportsPlaylists = false;
Properties.SetStringList ("Icon.Name", "audiobook", "source-library");
+ Properties.Set<string> ("SearchEntryDescription", Catalog.GetString ("Search your audiobooks"));
Properties.SetString ("TrackView.ColumnControllerXml", String.Format (@"
<column-controller>
<add-all-defaults />
diff --git a/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs b/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
index 3ea56e5..5738b0c 100644
--- a/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
+++ b/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
@@ -78,6 +78,7 @@ namespace Banshee.InternetRadio
Properties.Set<bool> ("Nereid.SourceContentsPropagate", true);
Properties.Set<ISourceContents> ("Nereid.SourceContents", new LazyLoadSourceContents<InternetRadioSourceContents> ());
+ Properties.Set<string> ("SearchEntryDescription", Catalog.GetString ("Search your stations"));
Properties.SetString ("TrackEditorActionLabel", Catalog.GetString ("Edit Station"));
Properties.Set<InvokeHandler> ("TrackEditorActionHandler", delegate {
ITrackModelSource active_track_model_source =
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
index 13335a0..8a7c21e 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Data/PodcastSource.cs
@@ -106,6 +106,7 @@ namespace Banshee.Podcasting.Gui
TrackModel.Reloaded += OnReloaded;
Properties.SetString ("Icon.Name", "podcast");
+ Properties.Set<string> ("SearchEntryDescription", Catalog.GetString ("Search your podcasts"));
Properties.SetString ("ActiveSourceUIResource", "ActiveSourceUI.xml");
Properties.Set<bool> ("ActiveSourceUIResourcePropagate", true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]