Ticket #3453: patch01-find.c-find-file-title-content.diff

File patch01-find.c-find-file-title-content.diff, 1.4 KB (added by Miven, 4 years ago)

Find file search results dialog patch

  • src/filemanager/find.c

    old new find_do_edit_file (WButton * button, int 
    15051505/* --------------------------------------------------------------------------------------------- */ 
    15061506 
    15071507static void 
    1508 setup_gui (void) 
     1508setup_gui (const char *pattern, const char *content) 
    15091509{ 
    15101510    size_t i; 
    15111511    int lines, cols; 
    15121512    int y; 
    15131513 
    15141514    static gboolean i18n_flag = FALSE; 
     1515     
     1516    char title[BUF_MEDIUM]; 
    15151517 
    15161518    if (!i18n_flag) 
    15171519    { 
    setup_gui (void) 
    15311533    lines = LINES - 4; 
    15321534    cols = COLS - 16; 
    15331535 
     1536    if ( content && *content ) 
     1537        snprintf (title, BUF_MEDIUM, _("Find File: '%s' Content: '%s'"), pattern, content); 
     1538    else 
     1539        snprintf (title, BUF_MEDIUM, _("Find File: '%s'"), pattern); 
    15341540    find_dlg = 
    15351541        dlg_create (TRUE, 0, 0, lines, cols, dialog_colors, find_callback, NULL, "[Find File]", 
    1536                     _("Find File"), DLG_CENTER); 
     1542                    title, DLG_CENTER); 
    15371543 
    15381544    find_calc_button_locations (find_dlg, TRUE); 
    15391545 
    do_find (const char *start_dir, ssize_t  
    16291635    int return_value = 0; 
    16301636    char *dir_tmp = NULL, *file_tmp = NULL; 
    16311637 
    1632     setup_gui (); 
     1638    setup_gui (pattern, content); 
    16331639 
    16341640    /* FIXME: Need to cleanup this, this ought to be passed non-globaly */ 
    16351641    find_pattern = (char *) pattern;