Ticket #1517: 9541-added-info-whether-enter-was-pressed-on-an-entry.patch

File 9541-added-info-whether-enter-was-pressed-on-an-entry.patch, 1.5 KB (added by Janek Kozicki, 15 years ago)

first commit: pass down information whether Enter was pressed

  • src/tree.c

    From 898fcc91b30347f0d3daf8b7d0d6f23a9ede6ffe Mon Sep 17 00:00:00 2001
    From: Janek Kozicki <janek_listy@wp.pl>
    Date: Fri, 21 May 2010 23:57:47 +0200
    Subject: [PATCH 9541/9542] added info whether enter was pressed on an entry
    
    ---
     src/tree.c |    9 ++++-----
     1 files changed, 4 insertions(+), 5 deletions(-)
    
    diff --git a/src/tree.c b/src/tree.c
    index e99b669..6055b41 100644
    a b tree_event (WTree * tree, int y) 
    534534} 
    535535 
    536536static void 
    537 tree_chdir_sel (WTree * tree) 
     537tree_chdir_sel (WTree * tree, gboolean enter_key_was_pressed) 
    538538{ 
    539539    if (!tree->is_panel) 
    540540        return; 
    static void 
    555555maybe_chdir (WTree * tree) 
    556556{ 
    557557    if (xtree_mode && tree->is_panel && is_idle ()) 
    558         tree_chdir_sel (tree); 
     558        tree_chdir_sel (tree, FALSE); 
    559559} 
    560560 
    561561/* Mouse callback */ 
    event_callback (Gpm_Event * event, void *data) 
    597597        tree_event (tree, event->y); 
    598598        if ((event->type & (GPM_UP | GPM_DOUBLE)) == (GPM_UP | GPM_DOUBLE)) 
    599599        { 
    600             tree_chdir_sel (tree); 
     600            tree_chdir_sel (tree, TRUE); 
    601601        } 
    602602    } 
    603603    return MOU_NORMAL; 
    tree_execute_cmd (WTree * tree, unsigned long command) 
    973973        tree_move_pgdn (tree); 
    974974        break; 
    975975    case CK_TreeOpen: 
    976         tree_chdir_sel (tree); 
     976        tree_chdir_sel (tree, TRUE); 
    977977        break; 
    978978    case CK_TreeRescan: 
    979979        tree_rescan (tree); 
    find_tree (struct Dlg_head *h) 
    11771177{ 
    11781178    return (WTree *) find_widget_type (h, tree_callback); 
    11791179} 
    1180