← Back to team overview

elementary-dev-community team mailing list archive

Re: Dropping Granite.Widgets.HintedEntry

 

We'll need to rewrite search bar to be based on the standard entry.
On Jan 15, 2012 3:06 PM, "Avi Romanoff" <avi@xxxxxxxxxxxxxxxx> wrote:

> I've committed that change to my branch:
> http://bazaar.launchpad.net/~aroman/granite/entries-redux/revision/159
>
> Avi
>
> On Sun, Jan 15, 2012 at 4:31 PM, Daniel Foré <daniel@xxxxxxxxxxxxxxxx>wrote:
>
>> Hey Avi,
>>
>> For the primary icon we should probably be using "edit-find-symbolic"
>> with the fallback.
>>
>> Best Regards,
>> Daniel Foré
>>
>> www.elementaryos.org
>>
>> On Jan 15, 2012, at 12:37 PM, Avi Romanoff <avi@xxxxxxxxxxxxxxxx> wrote:
>>
>> Hi all,
>>
>> After some discussion in IRC yesterday (and previously) there was a
>> consensus that we should use GtkEntry's placeholder-text property that
>> exists in 3.0.
>> Granite.Widgets.HintedEntry did basically what placeholder-text does,
>> with the addition of italics, which Dan agreed aren't really
>> helpful/necessary.
>>
>> Therefore it makes sense to drop HintedEntry entirely from Granite.
>> However, Granite.Widgets.SearchBar -- the only child of HintedEntry --
>> should be retained.
>> This is because it adds a number of useful features the the standard
>> entry:
>>
>> - 'gtk-find' as primary icon
>> - 'edit-clear-symbolic' as secondary icon (with fallback)
>> - intelligently showing/hiding the secondary icon
>> - click the secondary icon to clear the entry
>> - new signal and configurable delay when the user has stopped typing --
>> useful for a search callback
>>
>> So, it would make sense to keep SearchBar around and simply have it
>> inherit from HintedEntry, and keep the API exactly the same.
>>
>> I have done this in a feature-branch here:
>> https://code.launchpad.net/~aroman/granite/entries-redux
>>
>> The only really significant thing here is that we're dropping a widget
>> entirely. If there is support for it, I could add the HintedEntry back in
>> and simply use the placeholder-text property, and give it a deprecation
>> warning.
>>
>> There are no public API changes to SearchBar (or HintedEntry if the above
>> is implemented)
>>
>> Oh, and fwiw here's what it would look like to replacate what HintedEntry
>> does with Gtk.Entry in your code:
>>
>> search_box = new Gtk.Entry ();
>> search_box.placeholder_text = _("Search Plugs");
>>
>> So just one more line.
>>
>> (Also note the wording -- the "Labeling" section has been added to the
>> HIG. Please look it over and make any changes that are appropriate:
>> http://elementaryos.org/docs/human-interface-guidelines/ui-toolkit-elements/search-fields
>> )
>>
>> Thanks,
>> Avi
>>
>> --
>> Mailing list: https://launchpad.net/~elementary-dev-community
>> Post to     : elementary-dev-community@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~elementary-dev-community
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> --
> Mailing list: https://launchpad.net/~elementary-dev-community
> Post to     : elementary-dev-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~elementary-dev-community
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References