[mythtv-commits] mythtv/master commit: a796d8b39 by Paul Harrison (paul-h)

MythTV noreply at mythtv.org
Wed Jan 19 11:44:00 UTC 2011


      Author:  Paul Harrison <pharrison at mythtv.org>
 Change Date:  2011-01-19T03:42:26-08:00
   Push Date:  2011/01/19 03:43:56 -0800
  Repository:  mythtv
      Branch:  master
New Revision:  a796d8b394fb6ff246a6edd9844616c9754e7cc0
   Changeset:  https://github.com/MythTV/mythtv/commit/a796d8b39

Log:

Add a generic search to button lists.

This adds back the incremental search in the lists that was lost during the switch to MythUI. While the old search was only available in MythMusic and MythGame this is available in all button lists including those used in the buttontree.

You access the search dialog using the new SEARCH (CTRL+S) keybinding while a buttonlist has the focus. The dialog allows you to enter a search string and also has find next and previous buttons. By default the search will search all text areas in a button item which works OK in most cases but some of the more complex button items like the ones in the playback recording screen require that the search be narrowed down to one or two text areas so there is a new MythButtonList::SetSearchFields(QString) function that takes a comma separated list of fields that should be searched. For example on the recording play back screen you want to search the "titlesubtitle" text area so you would call m_playbackList->SetSearchFields("titlesubtitle").

By default the popup will be displayed at the position set in the popups window definition which on some screens may obscure the list you are trying to search. I think the best people to decide where the popup should be displayed are the theme creators so there is a new optional <searchposition> element that can be added to the buttonlist definition that overrides the default popup position -  for example <searchposition>-1,400</searchposition> will display the popup horizontally centered and 400 down when the search dialog is shown for a button list with that in its definition.

Bumps the api version so a full recompile is required.

Modified:

   mythtv/libs/libmythdb/mythversion.h
   mythtv/libs/libmythui/mythmainwindow.cpp
   mythtv/libs/libmythui/mythuibuttonlist.cpp
   mythtv/libs/libmythui/mythuibuttonlist.h
   mythtv/themes/default/base.xml



More information about the mythtv-commits mailing list