xtree-mode / dynamic static - tree view patch



Hi,

Today I was using Tree view a little bit, because directory
structure in my project got too large. And I had to browse it somehow.

And so, I found out that the Dynamic / Static toggle is totally
useless for me. But the xtree-mode toggle was extremely useful.

I would remove dynamic/static completely and put xtree-mode toggle
there, but this could offend someone, so instead I added an option to
toggle xtree-mode.

So now, the F4 toggles two boolean variables. 00 → 01 → 10 → 11 → 00

see attached patch.

In fact, at first I wanted to use the empty F7 label for that, but I
just couldn't get it to work. Despite my best efforts the function to
toggle the boolean, linked to F7 was never called. If you are curious
what I have done here, see the second, “WTF” patch.

best regards
-- 
Janek Kozicki                               http://janek.kozicki.pl/  |
Only in TEN-mc-toggle__xtree-mode: Makefile
Only in TEN-mc-toggle__xtree-mode/config: config.guess.cdbs-orig
Only in TEN-mc-toggle__xtree-mode/config: config.sub.cdbs-orig
Only in TEN-mc-toggle__xtree-mode: config.h
Only in TEN-mc-toggle__xtree-mode: config.log
Only in TEN-mc-toggle__xtree-mode: config.status
Only in TEN-mc-toggle__xtree-mode/contrib: Makefile
Only in TEN-mc-toggle__xtree-mode/contrib/dist: Makefile
Only in TEN-mc-toggle__xtree-mode/contrib/dist/debian: Makefile
Only in TEN-mc-toggle__xtree-mode/contrib/dist/gentoo: Makefile
Only in TEN-mc-toggle__xtree-mode/contrib/dist: mc.qpg
Only in TEN-mc-toggle__xtree-mode/contrib/dist: pkginfo
Only in TEN-mc-toggle__xtree-mode/contrib/dist: prototype
Only in TEN-mc-toggle__xtree-mode/contrib/dist/redhat: Makefile
Only in TEN-mc-toggle__xtree-mode/contrib/dist/redhat: mc.spec
Only in TEN-mc-toggle__xtree-mode/contrib: mc-wrapper.csh
Only in TEN-mc-toggle__xtree-mode/contrib: mc-wrapper.sh
Only in TEN-mc-toggle__xtree-mode/contrib: mc.csh
Only in TEN-mc-toggle__xtree-mode/contrib: mc.sh
Only in TEN-mc-toggle__xtree-mode/debian: files
Only in TEN-mc-toggle__xtree-mode/debian: mc
Only in TEN-mc-toggle__xtree-mode/debian: mc-dbg
Only in TEN-mc-toggle__xtree-mode/debian: mc-dbg.debhelper.log
Only in TEN-mc-toggle__xtree-mode/debian: mc-dbg.substvars
Only in TEN-mc-toggle__xtree-mode/debian: mc.debhelper.log
Only in TEN-mc-toggle__xtree-mode/debian: mc.postinst.debhelper
Only in TEN-mc-toggle__xtree-mode/debian: mc.postrm.debhelper
Only in TEN-mc-toggle__xtree-mode/debian: mc.substvars
Only in TEN-mc-toggle__xtree-mode/debian: stamp-autotools
Only in TEN-mc-toggle__xtree-mode/debian: stamp-autotools-files
Only in TEN-mc-toggle__xtree-mode/debian: stamp-makefile-build
Only in TEN-mc-toggle__xtree-mode/debian: stamp-makefile-install
Only in TEN-mc-toggle__xtree-mode/debian: tmp
Only in TEN-mc-toggle__xtree-mode/doc: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hints: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hlp: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hlp/es: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hlp/es: mc.hlp.es
Only in TEN-mc-toggle__xtree-mode/doc/hlp/hu: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hlp/hu: mc.hlp.hu
Only in TEN-mc-toggle__xtree-mode/doc/hlp/it: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hlp/it: mc.hlp.it
Only in TEN-mc-toggle__xtree-mode/doc/hlp: mc.hlp
Only in TEN-mc-toggle__xtree-mode/doc/hlp/pl: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hlp/pl: mc.hlp.pl
Only in TEN-mc-toggle__xtree-mode/doc/hlp/ru: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hlp/ru: mc.hlp.ru
Only in TEN-mc-toggle__xtree-mode/doc/hlp/sr: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/hlp/sr: mc.hlp.sr
Only in TEN-mc-toggle__xtree-mode/doc/man: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/man/es: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/man/es: mc.1
Only in TEN-mc-toggle__xtree-mode/doc/man/hu: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/man/hu: mc.1
Only in TEN-mc-toggle__xtree-mode/doc/man/it: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/man/it: mc.1
Only in TEN-mc-toggle__xtree-mode/doc/man: mc.1
Only in TEN-mc-toggle__xtree-mode/doc/man: mcedit.1
Only in TEN-mc-toggle__xtree-mode/doc/man: mcserv.8
Only in TEN-mc-toggle__xtree-mode/doc/man: mcview.1
Only in TEN-mc-toggle__xtree-mode/doc/man/pl: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/man/pl: mc.1
Only in TEN-mc-toggle__xtree-mode/doc/man/ru: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/man/ru: mc.1
Only in TEN-mc-toggle__xtree-mode/doc/man/sr: Makefile
Only in TEN-mc-toggle__xtree-mode/doc/man/sr: mc.1
Only in TEN-mc-toggle__xtree-mode/doc/man/sr: mcserv.8
Only in TEN-mc-toggle__xtree-mode/edit: Makefile
Only in TEN-mc-toggle__xtree-mode/edit: bookmark.o
Only in TEN-mc-toggle__xtree-mode/edit: choosesyntax.o
Only in TEN-mc-toggle__xtree-mode/edit: edit.o
Only in TEN-mc-toggle__xtree-mode/edit: editcmd.o
Only in TEN-mc-toggle__xtree-mode/edit: editcmd_dialogs.o
Only in TEN-mc-toggle__xtree-mode/edit: editdraw.o
Only in TEN-mc-toggle__xtree-mode/edit: editkeys.o
Only in TEN-mc-toggle__xtree-mode/edit: editlock.o
Only in TEN-mc-toggle__xtree-mode/edit: editmenu.o
Only in TEN-mc-toggle__xtree-mode/edit: editoptions.o
Only in TEN-mc-toggle__xtree-mode/edit: editwidget.o
Only in TEN-mc-toggle__xtree-mode/edit: etags.o
Only in TEN-mc-toggle__xtree-mode/edit: libedit.a
Only in TEN-mc-toggle__xtree-mode/edit: syntax.o
Only in TEN-mc-toggle__xtree-mode/edit: wordproc.o
Only in TEN-mc-toggle__xtree-mode/intl: Makefile
Only in TEN-mc-toggle__xtree-mode: libtool
Only in TEN-mc-toggle__xtree-mode/misc: Makefile
Only in TEN-mc-toggle__xtree-mode/misc: mc.ext
Only in TEN-mc-toggle__xtree-mode/misc/skins: Makefile
Only in TEN-mc-toggle__xtree-mode/po: Makefile
Only in TEN-mc-toggle__xtree-mode/po: Makefile.in
Only in TEN-mc-toggle__xtree-mode/po: POTFILES
Only in TEN-mc-toggle__xtree-mode/po: az.gmo
Only in TEN-mc-toggle__xtree-mode/po: be-tarask.gmo
Only in TEN-mc-toggle__xtree-mode/po: be.gmo
Only in TEN-mc-toggle__xtree-mode/po: bg.gmo
Only in TEN-mc-toggle__xtree-mode/po: ca.gmo
Only in TEN-mc-toggle__xtree-mode/po: cs.gmo
Only in TEN-mc-toggle__xtree-mode/po: da.gmo
Only in TEN-mc-toggle__xtree-mode/po: de.gmo
Only in TEN-mc-toggle__xtree-mode/po: el.gmo
Only in TEN-mc-toggle__xtree-mode/po: es.gmo
Only in TEN-mc-toggle__xtree-mode/po: eu.gmo
Only in TEN-mc-toggle__xtree-mode/po: fi.gmo
Only in TEN-mc-toggle__xtree-mode/po: fr.gmo
Only in TEN-mc-toggle__xtree-mode/po: hu.gmo
Only in TEN-mc-toggle__xtree-mode/po: it.gmo
Only in TEN-mc-toggle__xtree-mode/po: ja.gmo
Only in TEN-mc-toggle__xtree-mode/po: ko.gmo
Only in TEN-mc-toggle__xtree-mode/po: lt.gmo
Only in TEN-mc-toggle__xtree-mode/po: lv.gmo
Only in TEN-mc-toggle__xtree-mode/po: mn.gmo
Only in TEN-mc-toggle__xtree-mode/po: nb.gmo
Only in TEN-mc-toggle__xtree-mode/po: nl.gmo
Only in TEN-mc-toggle__xtree-mode/po: pl.gmo
Only in TEN-mc-toggle__xtree-mode/po: pt.gmo
Only in TEN-mc-toggle__xtree-mode/po: pt_BR.gmo
Only in TEN-mc-toggle__xtree-mode/po: ro.gmo
Only in TEN-mc-toggle__xtree-mode/po: ru.gmo
Only in TEN-mc-toggle__xtree-mode/po: sk.gmo
Only in TEN-mc-toggle__xtree-mode/po: sl.gmo
Only in TEN-mc-toggle__xtree-mode/po: sr.gmo
Only in TEN-mc-toggle__xtree-mode/po: stamp-po
Only in TEN-mc-toggle__xtree-mode/po: sv.gmo
Only in TEN-mc-toggle__xtree-mode/po: ta.gmo
Only in TEN-mc-toggle__xtree-mode/po: tr.gmo
Only in TEN-mc-toggle__xtree-mode/po: uk.gmo
Only in TEN-mc-toggle__xtree-mode/po: vi.gmo
Only in TEN-mc-toggle__xtree-mode/po: wa.gmo
Only in TEN-mc-toggle__xtree-mode/po: zh_CN.gmo
Only in TEN-mc-toggle__xtree-mode/po: zh_TW.gmo
Only in TEN-mc-toggle__xtree-mode/src: .libs
Only in TEN-mc-toggle__xtree-mode/src: Makefile
Only in TEN-mc-toggle__xtree-mode/src: achown.o
Only in TEN-mc-toggle__xtree-mode/src: args.o
Only in TEN-mc-toggle__xtree-mode/src: background.o
Only in TEN-mc-toggle__xtree-mode/src: boxes.o
Only in TEN-mc-toggle__xtree-mode/src: charsets.o
Only in TEN-mc-toggle__xtree-mode/src: chmod.o
Only in TEN-mc-toggle__xtree-mode/src: chown.o
Only in TEN-mc-toggle__xtree-mode/src: cmd.o
Only in TEN-mc-toggle__xtree-mode/src: command.o
Only in TEN-mc-toggle__xtree-mode/src: complete.o
Only in TEN-mc-toggle__xtree-mode/src: cons.handler.o
Only in TEN-mc-toggle__xtree-mode/src: cons.saver
Only in TEN-mc-toggle__xtree-mode/src: cons.saver.o
Only in TEN-mc-toggle__xtree-mode/src: dialog.o
Only in TEN-mc-toggle__xtree-mode/src: dir.o
Only in TEN-mc-toggle__xtree-mode/src: ecs.o
Only in TEN-mc-toggle__xtree-mode/src: execute.o
Only in TEN-mc-toggle__xtree-mode/src: ext.o
Only in TEN-mc-toggle__xtree-mode/src: file.o
Only in TEN-mc-toggle__xtree-mode/src: filegui.o
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: .libs
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: Makefile
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: libmcfilehighlight.la
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: libmcfilehighlight_la-common.lo
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: libmcfilehighlight_la-common.o
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: libmcfilehighlight_la-get-color.lo
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: libmcfilehighlight_la-get-color.o
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: libmcfilehighlight_la-ini-file-read.lo
Only in TEN-mc-toggle__xtree-mode/src/filehighlight: libmcfilehighlight_la-ini-file-read.o
Only in TEN-mc-toggle__xtree-mode/src: filenot.o
Only in TEN-mc-toggle__xtree-mode/src: fileopctx.o
Only in TEN-mc-toggle__xtree-mode/src: find.o
Only in TEN-mc-toggle__xtree-mode/src: glibcompat.o
Only in TEN-mc-toggle__xtree-mode/src: help.o
Only in TEN-mc-toggle__xtree-mode/src: hotlist.o
Only in TEN-mc-toggle__xtree-mode/src: info.o
Only in TEN-mc-toggle__xtree-mode/src: keybind.o
Only in TEN-mc-toggle__xtree-mode/src: layout.o
Only in TEN-mc-toggle__xtree-mode/src: learn.o
Only in TEN-mc-toggle__xtree-mode/src: listmode.o
Only in TEN-mc-toggle__xtree-mode/src: main.o
Only in TEN-mc-toggle__xtree-mode/src: man2hlp
Only in TEN-mc-toggle__xtree-mode/src: man2hlp.o
Only in TEN-mc-toggle__xtree-mode/src: mc
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: .libs
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: Makefile
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: libmcconfig.la
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: libmcconfig_la-common.lo
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: libmcconfig_la-common.o
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: libmcconfig_la-get.lo
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: libmcconfig_la-get.o
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: libmcconfig_la-set.lo
Only in TEN-mc-toggle__xtree-mode/src/mcconfig: libmcconfig_la-set.o
Only in TEN-mc-toggle__xtree-mode/src: mcmfmt
Only in TEN-mc-toggle__xtree-mode/src: menu.o
Only in TEN-mc-toggle__xtree-mode/src: mfmt.o
Only in TEN-mc-toggle__xtree-mode/src: mountlist.o
Only in TEN-mc-toggle__xtree-mode/src: option.o
Only in TEN-mc-toggle__xtree-mode/src: panelize.o
Only in TEN-mc-toggle__xtree-mode/src: screen.o
Only in TEN-mc-toggle__xtree-mode/src/search: .libs
Only in TEN-mc-toggle__xtree-mode/src/search: Makefile
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch.la
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-glob.lo
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-glob.o
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-hex.lo
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-hex.o
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-lib.lo
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-lib.o
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-normal.lo
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-normal.o
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-regex.lo
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-regex.o
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-search.lo
Only in TEN-mc-toggle__xtree-mode/src/search: libsearch_la-search.o
Only in TEN-mc-toggle__xtree-mode/src: selcodepage.o
Only in TEN-mc-toggle__xtree-mode/src: setup.o
Only in TEN-mc-toggle__xtree-mode/src/skin: .libs
Only in TEN-mc-toggle__xtree-mode/src/skin: Makefile
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin.la
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-colors-old.lo
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-colors-old.o
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-colors.lo
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-colors.o
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-common.lo
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-common.o
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-hc-skins.lo
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-hc-skins.o
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-ini-file.lo
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-ini-file.o
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-lines.lo
Only in TEN-mc-toggle__xtree-mode/src/skin: libmcskin_la-lines.o
Only in TEN-mc-toggle__xtree-mode/src: strescape.o
Only in TEN-mc-toggle__xtree-mode/src: strutil.o
Only in TEN-mc-toggle__xtree-mode/src: strutil8bit.o
Only in TEN-mc-toggle__xtree-mode/src: strutilascii.o
Only in TEN-mc-toggle__xtree-mode/src: strutilutf8.o
Only in TEN-mc-toggle__xtree-mode/src: subshell.o
Only in TEN-mc-toggle__xtree-mode/src: textconf.o
diff -ur mc/src/tree.c TEN-mc-toggle__xtree-mode/src/tree.c
--- mc/src/tree.c	2010-01-10 15:19:51.000000000 +0100
+++ TEN-mc-toggle__xtree-mode/src/tree.c	2010-04-28 21:34:25.000000000 +0200
@@ -856,10 +856,22 @@
 static void
 tree_toggle_navig (WTree *tree)
 {
-    tree_navigation_flag = !tree_navigation_flag;
+/* Toggle two booleans at the same time:
+         Static   Dynamc
+XTree    St/XTr   Dyn/Xt
+MCTree   St/MTr   Dn/MTr
+*/
+
+         if(!xtree_mode && !tree_navigation_flag)                          tree_navigation_flag = !tree_navigation_flag; /* 00 -> 01 */
+    else if(!xtree_mode &&  tree_navigation_flag) xtree_mode = !xtree_mode,tree_navigation_flag = !tree_navigation_flag; /* 01 -> 10 */
+    else if( xtree_mode && !tree_navigation_flag)                          tree_navigation_flag = !tree_navigation_flag; /* 10 -> 11 */
+    else if( xtree_mode &&  tree_navigation_flag) xtree_mode = !xtree_mode,tree_navigation_flag = !tree_navigation_flag; /* 11 -> 00 */
+
     buttonbar_set_label (find_buttonbar (tree->widget.parent), 4,
-			tree_navigation_flag ? Q_("ButtonBar|Static")
-						: Q_("ButtonBar|Dynamc"),
+			xtree_mode ?
+			( tree_navigation_flag ? Q_("ButtonBar|St/XTr") : Q_("ButtonBar|Dyn/Xt") ) 
+			:
+			( tree_navigation_flag ? Q_("ButtonBar|St/MTr") : Q_("ButtonBar|Dn/MTr") ),
 			tree_map, (Widget *) tree);
 }
 
@@ -1007,9 +1019,12 @@
 	buttonbar_set_label (b, 1, Q_("ButtonBar|Help"), tree_map, (Widget *) tree);
 	buttonbar_set_label (b, 2, Q_("ButtonBar|Rescan"), tree_map, (Widget *) tree);
 	buttonbar_set_label (b, 3, Q_("ButtonBar|Forget"), tree_map, (Widget *) tree);
-	buttonbar_set_label (b, 4, tree_navigation_flag ? Q_("ButtonBar|Static")
-								: Q_("ButtonBar|Dynamc"),
-			    tree_map, (Widget *) tree);
+	buttonbar_set_label (find_buttonbar (tree->widget.parent), 4,
+			xtree_mode ?
+			( tree_navigation_flag ? Q_("ButtonBar|St/XTr") : Q_("ButtonBar|Dyn/Xt") ) 
+			:
+			( tree_navigation_flag ? Q_("ButtonBar|St/MTr") : Q_("ButtonBar|Dn/MTr") ),
+			tree_map, (Widget *) tree);
 	buttonbar_set_label (b, 5, Q_("ButtonBar|Copy"), tree_map, (Widget *) tree);
 	buttonbar_set_label (b, 6, Q_("ButtonBar|RenMov"), tree_map, (Widget *) tree);
 #if 0
Only in TEN-mc-toggle__xtree-mode/src: tree.o
Only in TEN-mc-toggle__xtree-mode/src: treestore.o
Only in TEN-mc-toggle__xtree-mode/src/tty: .libs
Only in TEN-mc-toggle__xtree-mode/src/tty: Makefile
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty.la
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-color-internal.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-color-internal.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-color-slang.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-color-slang.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-color.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-color.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-key.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-key.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-keyxdef.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-keyxdef.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-mouse.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-mouse.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-tty-slang.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-tty-slang.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-tty.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-tty.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-win.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-win.o
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-x11conn.lo
Only in TEN-mc-toggle__xtree-mode/src/tty: libmctty_la-x11conn.o
Only in TEN-mc-toggle__xtree-mode/src: user.o
Only in TEN-mc-toggle__xtree-mode/src: util.o
Only in TEN-mc-toggle__xtree-mode/src: utilunix.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: .libs
Only in TEN-mc-toggle__xtree-mode/src/viewer: Makefile
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer.la
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-actions_cmd.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-actions_cmd.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-coord_cache.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-coord_cache.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-datasource.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-datasource.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-dialogs.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-dialogs.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-display.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-display.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-growbuf.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-growbuf.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-hex.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-hex.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-lib.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-lib.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-mcviewer.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-mcviewer.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-move.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-move.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-nroff.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-nroff.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-plain.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-plain.o
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-search.lo
Only in TEN-mc-toggle__xtree-mode/src/viewer: libmcviewer_la-search.o
Only in TEN-mc-toggle__xtree-mode/src: widget.o
Only in TEN-mc-toggle__xtree-mode/src: wtools.o
Only in TEN-mc-toggle__xtree-mode: stamp-h1
Only in TEN-mc-toggle__xtree-mode/syntax: Makefile
Only in TEN-mc-toggle__xtree-mode/vfs: Makefile
Only in TEN-mc-toggle__xtree-mode/vfs: cpio.o
Only in TEN-mc-toggle__xtree-mode/vfs: direntry.o
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: Makefile
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: a
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: apt
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: audio
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: deb
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: deba
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: debd
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: dpkg
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: hp48
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: iso9660
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: lslR
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: mailfs
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: patchfs
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: rpms
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: s3
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: uace
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: ualz
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: uar
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: uarc
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: uarj
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: uc1541
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: uha
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: ulha
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: urar
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: uzip
Only in TEN-mc-toggle__xtree-mode/vfs/extfs: uzoo
Only in TEN-mc-toggle__xtree-mode/vfs: extfs.o
Only in TEN-mc-toggle__xtree-mode/vfs: fish.o
Only in TEN-mc-toggle__xtree-mode/vfs: ftpfs.o
Only in TEN-mc-toggle__xtree-mode/vfs: gc.o
Only in TEN-mc-toggle__xtree-mode/vfs: libvfs-mc.a
Only in TEN-mc-toggle__xtree-mode/vfs: local.o
Only in TEN-mc-toggle__xtree-mode/vfs: mcfs.o
Only in TEN-mc-toggle__xtree-mode/vfs: mcfsutil.o
Only in TEN-mc-toggle__xtree-mode/vfs: sfs.o
Only in TEN-mc-toggle__xtree-mode/vfs: tar.o
Only in TEN-mc-toggle__xtree-mode/vfs: tcputil.o
Only in TEN-mc-toggle__xtree-mode/vfs: utilvfs.o
Only in TEN-mc-toggle__xtree-mode/vfs: vfs.o
diff -ur mc/src/cmddef.h mc-proba__xtree-mode/src/cmddef.h
--- mc/src/cmddef.h	2010-01-10 15:19:51.000000000 +0100
+++ mc-proba__xtree-mode/src/cmddef.h	2010-04-28 21:07:55.000000000 +0200
@@ -280,7 +280,7 @@
 #define CK_TreeToggleNav                6004
 #define CK_TreeCopy                     6005
 #define CK_TreeMove                     6006
-#define CK_TreeMake                     6007
+//#define CK_TreeMake                     6007
 #define CK_TreeMoveUp                   6011
 #define CK_TreeMoveDown                 6012
 #define CK_TreeMoveLeft                 6013
@@ -293,6 +293,7 @@
 #define CK_TreeRescan                   6020
 #define CK_TreeStartSearch              6021
 #define CK_TreeRemove                   6022
+#define CK_TreeToggleXTree              6007
 
 /* main commands */
 #define CK_AddHotlist                   7001
diff -ur mc/src/keybind.c mc-proba__xtree-mode/src/keybind.c
--- mc/src/keybind.c	2010-01-10 15:19:51.000000000 +0100
+++ mc-proba__xtree-mode/src/keybind.c	2010-04-28 21:09:20.000000000 +0200
@@ -266,9 +266,10 @@
     { "TreeHelp",                        CK_TreeHelp },
     { "TreeForget",                      CK_TreeForget },
     { "TreeToggleNav",                   CK_TreeToggleNav },
+    { "TreeToggleXTree",                 CK_TreeToggleXTree },
     { "TreeCopy",                        CK_TreeCopy },
     { "TreeMove",                        CK_TreeMove },
-    { "TreeMake",                        CK_TreeMake },
+/*    { "TreeMake",                        CK_TreeMake },*/
     { "TreeMoveUp",                      CK_TreeMoveUp },
     { "TreeMoveDown",                    CK_TreeMoveDown },
     { "TreeMoveLeft",                    CK_TreeMoveLeft },
@@ -703,6 +704,7 @@
     { KEY_F (4),   CK_TreeToggleNav,   "F4" },
     { KEY_F (5),   CK_TreeCopy,        "F5" },
     { KEY_F (6),   CK_TreeMove,        "F6" },
+    { KEY_F (7),   CK_TreeToggleXTree, "F7" },
 #if 0
     { KEY_F (7),   CK_TreeMake,        "F7" },
 #endif
diff -ur mc/src/tree.c mc-proba__xtree-mode/src/tree.c
--- mc/src/tree.c	2010-01-10 15:19:51.000000000 +0100
+++ mc-proba__xtree-mode/src/tree.c	2010-04-28 21:08:15.000000000 +0200
@@ -854,13 +854,33 @@
 }
 
 static void
+tree_toggle_xtree (WTree *tree)
+{
+	if(xtree_mode)
+		fprintf (stderr,"XTree mode TRUE" );
+	else
+		fprintf (stderr, "XTree mode FALSE" );
+    xtree_mode = !xtree_mode;
+    buttonbar_set_label (find_buttonbar (tree->widget.parent), 7,
+			xtree_mode ? Q_("ButtonBar|XTree")
+						: Q_("ButtonBar|MCTree"),
+			tree_map, (Widget *) tree);
+}
+
+static void
 tree_toggle_navig (WTree *tree)
 {
-    tree_navigation_flag = !tree_navigation_flag;
+/*    tree_navigation_flag = !tree_navigation_flag;
     buttonbar_set_label (find_buttonbar (tree->widget.parent), 4,
 			tree_navigation_flag ? Q_("ButtonBar|Static")
 						: Q_("ButtonBar|Dynamc"),
 			tree_map, (Widget *) tree);
+*/  
+    xtree_mode = !xtree_mode;
+    buttonbar_set_label (find_buttonbar (tree->widget.parent), 7,
+			xtree_mode ? Q_("ButtonBar|XTree")
+						: Q_("ButtonBar|MCTree"),
+			tree_map, (Widget *) tree);
 }
 
 static cb_ret_t
@@ -878,6 +898,9 @@
     case CK_TreeForget:
 	tree_forget (tree);
 	break;
+    case CK_TreeToggleXTree:
+	tree_toggle_xtree (tree);
+	break;
     case CK_TreeToggleNav:
 	tree_toggle_navig (tree);
 	break;
@@ -938,6 +961,8 @@
 		return tree_move_left (tree) ? MSG_HANDLED : MSG_NOT_HANDLED;
 	    case CK_TreeMoveRight:
 		return tree_move_right (tree) ? MSG_HANDLED : MSG_NOT_HANDLED;
+	/*    case CK_TreeToggleXTree:
+		return (xtree_mode = !xtree_mode); */
 	    default:
 		tree_execute_cmd (tree, tree_map [i].command);
 		return MSG_HANDLED;
@@ -1016,7 +1041,10 @@
 	/* FIXME: mkdir is currently defunct */
 	buttonbar_set_label (b, 7, Q_("ButtonBar|Mkdir"), tree_map, (Widget *) tree);
 #else
-	buttonbar_clear_label (b, 7, (Widget *) tree);
+	buttonbar_set_label (b, 7, xtree_mode ? Q_("ButtonBar|XTree")
+								: Q_("ButtonBar|MCTree"),
+			    tree_map, (Widget *) tree);
+	/* buttonbar_clear_label (b, 7, (Widget *) tree); */
 #endif
 	buttonbar_set_label (b, 8, Q_("ButtonBar|Rmdir"), tree_map, (Widget *) tree);
 	buttonbar_redraw (b);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]