static void gui_input_searchnext ( void   )  [static]

Ask the user to enter a search string when none was given and search for the next item matching the search string.

Definition at line 222 of file gui_input.c.

00223 {
00224         int nfocus = GUI_FOCUS_PLAYQ;
00225 
00226         if (cursearch == NULL) {
00227                 /* No search string yet */
00228                 if (gui_input_asksearch() != 0)
00229                         return;
00230         }
00231 
00232         /*
00233          * We want to change our search order depending on which dialog
00234          * is currently focused. This code is quite awful, but does the
00235          * thing. When the playq is focused, it only performs the first
00236          * two searches. If the browser is focused, it only performs the
00237          * last two.
00238          */
00239         if (gui_input_curfocus == GUI_FOCUS_PLAYQ &&
00240             gui_playq_searchnext(cursearch) == 0) {
00241                 goto found;
00242         } else if (gui_browser_searchnext(cursearch) == 0) {
00243                 nfocus = GUI_FOCUS_BROWSER;
00244                 goto found;
00245         } else if (gui_input_curfocus != GUI_FOCUS_PLAYQ &&
00246             gui_playq_searchnext(cursearch) == 0) {
00247                 goto found;
00248         }
00249 
00250         /* Bad luck. */
00251         gui_msgbar_warn(_("Not found."));
00252         return;
00253 
00254 found:  /* Focus the window with the match and redraw them. */
00255         gui_input_curfocus = nfocus;
00256         gui_playq_setfocus(gui_input_curfocus == GUI_FOCUS_PLAYQ);
00257         gui_browser_setfocus(gui_input_curfocus == GUI_FOCUS_BROWSER);
00258 }

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Files Functions Variables Defines
Generated on Mon Mar 15 04:45:18 2010 for herrie by  doxygen 1.6.3