Merge lp:~elementary-apps/noise/Gtk.SearchEntry into lp:~elementary-apps/noise/trunk

Proposed by Sergey "Shnatsel" Davidoff
Status: Merged
Approved by: Sergey "Shnatsel" Davidoff
Approved revision: 1626
Merged at revision: 1627
Proposed branch: lp:~elementary-apps/noise/Gtk.SearchEntry
Merge into: lp:~elementary-apps/noise/trunk
Diff against target: 37 lines (+4/-6)
1 file modified
src/LibraryWindow.vala (+4/-6)
To merge this branch: bzr merge lp:~elementary-apps/noise/Gtk.SearchEntry
Reviewer Review Type Date Requested Status
Robert Roth (community) Approve
Review via email: mp+225408@code.launchpad.net

Commit message

Migrate from deprecated Granite.SearchBar to Gtk.SearchEntry (bug #1337291).

This introduces no change in functionality aside of search timeout bump from 80ms to 150ms.

Description of the change

Migrate from deprecated Granite.SearchBar to Gtk.SearchEntry.

This introduces no change in functionality aside of a welcome bump from 80ms to 150ms search timeout.

To post a comment you must log in.
Revision history for this message
Robert Roth (evfool) wrote :

Can't see the bump from 80ms to 150ms (only the removal of 80ms), is the 150ms a builting value in Gtk.SearchEntry?

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

150ms is built-in and only used when you connect to search_changed signal, according to http://valadoc.org/#!api=gtk+-3.0/Gtk.SearchEntry

Revision history for this message
Robert Roth (evfool) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/LibraryWindow.vala'
--- src/LibraryWindow.vala 2014-05-11 17:03:37 +0000
+++ src/LibraryWindow.vala 2014-07-02 22:28:42 +0000
@@ -56,7 +56,7 @@
56 public ViewContainer view_container { get; private set; }56 public ViewContainer view_container { get; private set; }
57 public TopDisplay topDisplay { get; private set; }57 public TopDisplay topDisplay { get; private set; }
58 public Widgets.ViewSelector viewSelector { get; private set; }58 public Widgets.ViewSelector viewSelector { get; private set; }
59 public Granite.Widgets.SearchBar searchField { get; private set; }59 public Gtk.SearchEntry searchField { get; private set; }
60 public Widgets.StatusBar statusbar { get; private set; }60 public Widgets.StatusBar statusbar { get; private set; }
61 private FixedBin topDisplayBin;61 private FixedBin topDisplayBin;
6262
@@ -268,14 +268,12 @@
268 topDisplay = new TopDisplay ();268 topDisplay = new TopDisplay ();
269 topDisplayBin = new FixedBin (200, -1, 600, -1);269 topDisplayBin = new FixedBin (200, -1, 600, -1);
270 viewSelector = new Widgets.ViewSelector ();270 viewSelector = new Widgets.ViewSelector ();
271 searchField = new Granite.Widgets.SearchBar (_("Search Music"));271 searchField = new Gtk.SearchEntry ();
272 searchField.placeholder_text = _("Search Music");
272273
273274
274 topDisplayBin.set_widget (topDisplay, true, false);275 topDisplayBin.set_widget (topDisplay, true, false);
275276
276 // Set search timeout in ms
277 searchField.pause_delay = 80;
278
279 // Tweak view selector's size277 // Tweak view selector's size
280 viewSelector.margin_left = 12;278 viewSelector.margin_left = 12;
281 viewSelector.margin_right = 6;279 viewSelector.margin_right = 6;
@@ -531,7 +529,7 @@
531 nextButton.clicked.connect (() => {play_next_media ();});529 nextButton.clicked.connect (() => {play_next_media ();});
532530
533 searchField.activate.connect (searchFieldActivate);531 searchField.activate.connect (searchFieldActivate);
534 searchField.text_changed_pause.connect ((text) => {if (text.length != 1) libraries_manager.search_for_string (text);});532 searchField.search_changed.connect (() => {if (searchField.text_length != 1) libraries_manager.search_for_string (searchField.get_text ());});
535 searchField.text = main_settings.search_string;533 searchField.text = main_settings.search_string;
536 libraries_manager.search_for_string (main_settings.search_string);534 libraries_manager.search_for_string (main_settings.search_string);
537535

Subscribers

People subscribed via source and target branches