[gq-commit] gq/src browse.c,1.90,1.91 browse.h,1.35,1.36 dn-browse.c,1.7,1.8
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2003-10-28 19:25:15
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv10386 Modified Files: browse.c browse.h dn-browse.c Log Message: * releasing an inputform within a browse tab is now done correctly. This is important for saving the persistent state even if there is no inputform in the right pane (the case for server and ref browse entries) Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** browse.c 27 Oct 2003 22:16:19 -0000 1.90 --- browse.c 28 Oct 2003 19:23:52 -0000 1.91 *************** *** 295,298 **** --- 295,299 ---- { browse_entry *entry; + struct inputform *iform; /* avoid recursive calls to this handler - this causes crashes!!! */ *************** *** 322,325 **** --- 323,337 ---- entry = (browse_entry *) gtk_ctree_node_get_row_data(ctree, node); + /* delete old struct inputform (if any) */ + iform = BROWSETAB(tab)->inputform; + if(iform) { + /* but first get current hide status */ + /* HACK: store hide status it in the browse-tab data-structure */ + BROWSETAB(tab)->hidden = iform->hide_status; + + inputform_free(iform); + BROWSETAB(tab)->inputform = NULL; + } + if (entry) { assert(entry->base_methods); Index: browse.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** browse.h 21 Oct 2003 20:58:28 -0000 1.35 --- browse.h 28 Oct 2003 19:23:52 -0000 1.36 *************** *** 49,52 **** --- 49,55 ---- /* lock used to suppress flickering during d'n'd */ int update_lock; + + /* used to store old hide-button state - Hack */ + int hidden; }; Index: dn-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dn-browse.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dn-browse.c 28 Oct 2003 19:16:01 -0000 1.7 --- dn-browse.c 28 Oct 2003 19:23:52 -0000 1.8 *************** *** 557,561 **** struct inputform *iform; char *dn; ! int hidden = 0; assert(IS_DN_ENTRY(entry)); --- 557,561 ---- struct inputform *iform; char *dn; ! /* int hidden = 0; */ assert(IS_DN_ENTRY(entry)); *************** *** 571,575 **** ctreeroot = BROWSETAB(tab)->ctreeroot; ! /* delete old struct inputform (if any) */ iform = BROWSETAB(tab)->inputform; --- 571,575 ---- ctreeroot = BROWSETAB(tab)->ctreeroot; ! #if 0 /* delete old struct inputform (if any) */ iform = BROWSETAB(tab)->inputform; *************** *** 580,584 **** inputform_free(iform); } ! iform = new_inputform(); BROWSETAB(tab)->inputform = iform; --- 580,584 ---- inputform_free(iform); } ! #endif iform = new_inputform(); BROWSETAB(tab)->inputform = iform; *************** *** 589,594 **** iform->edit = 1; ! /* pass on "hide" status */ ! iform->hide_status = hidden; tmplist = NULL; --- 589,594 ---- iform->edit = 1; ! /* pass on old "hide" status */ ! iform->hide_status = BROWSETAB(tab)->hidden; tmplist = NULL; |