From b621d63e03a40db76dc7f3f94c01e743c550ebd8 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 7 Apr 2018 23:27:25 +0000 Subject: tlcockpit 0.9 git-svn-id: svn://tug.org/texlive/trunk@47366 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/support/tlcockpit/NEWS | 5 ++ Master/texmf-dist/doc/support/tlcockpit/README.md | 2 +- Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar | Bin 13032016 -> 13031610 bytes .../texmf-dist/source/support/tlcockpit/build.sbt | 2 +- .../src/main/scala/TLCockpit/ApplicationMain.scala | 4 ++ .../src/main/scala/TLCockpit/PkgInfoDialog.scala | 51 +++++++++++++++------ 6 files changed, 48 insertions(+), 16 deletions(-) diff --git a/Master/texmf-dist/doc/support/tlcockpit/NEWS b/Master/texmf-dist/doc/support/tlcockpit/NEWS index d6a45e5ef2b..1be72691ded 100644 --- a/Master/texmf-dist/doc/support/tlcockpit/NEWS +++ b/Master/texmf-dist/doc/support/tlcockpit/NEWS @@ -1,5 +1,10 @@ NEWS for tlcockpit +version 0.9 (20180408) +---------------------- +- make package info dialog content copyable (as far as possible) +- add placeholder for empty backup table + version 0.8 (20180120) ---------------------- - add debug facility (-d and -dd) diff --git a/Master/texmf-dist/doc/support/tlcockpit/README.md b/Master/texmf-dist/doc/support/tlcockpit/README.md index 801744cc447..d4a767c1ed2 100644 --- a/Master/texmf-dist/doc/support/tlcockpit/README.md +++ b/Master/texmf-dist/doc/support/tlcockpit/README.md @@ -15,7 +15,7 @@ Since TLCockpit is included in TeX Live, it will be probably already installed on your system. In case it isn't, a simple call to `tlmgr install tlcockpit` should suffice. -We are providing new jar files on a daily bases in the github page, but update +We are providing new jar files on the github page, but update the copy in TeX Live only at certain intervals. If you want to try out the latest and greatest, get [tlcockpit.jar](jar/tlcockpit.jar) and put it into `TEXLIVEROOT/texmf-dist/scripts/tlcockpit` replacing the current `tlcockpit.jar`. diff --git a/Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar b/Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar index a7eedc0380e..8cc6fce91cf 100644 Binary files a/Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar and b/Master/texmf-dist/scripts/tlcockpit/tlcockpit.jar differ diff --git a/Master/texmf-dist/source/support/tlcockpit/build.sbt b/Master/texmf-dist/source/support/tlcockpit/build.sbt index 5f3770f7930..8de4ff3e483 100644 --- a/Master/texmf-dist/source/support/tlcockpit/build.sbt +++ b/Master/texmf-dist/source/support/tlcockpit/build.sbt @@ -1,6 +1,6 @@ name := "tlcockpit" -version := "0.8" +version := "0.9" scalaVersion := "2.12.3" diff --git a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala index 67b60576944..dadb8c516df 100644 --- a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala +++ b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/ApplicationMain.scala @@ -1212,6 +1212,10 @@ tlmgr> table.prefHeight = 300 table.showRoot = false table.vgrow = Priority.Always + table.placeholder = new Label("No backups available") { + opacity = 0.4f + font = msgFont + } table.rowFactory = { _ => val row = new TreeTableRow[TLBackupDisplay] {} val ctm = new ContextMenu( diff --git a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala index 82585aa7591..cc417b68f97 100644 --- a/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala +++ b/Master/texmf-dist/source/support/tlcockpit/src/main/scala/TLCockpit/PkgInfoDialog.scala @@ -34,11 +34,23 @@ class PkgInfoDialog(tlp: TLPackage) extends Dialog { padding = Insets(20) } + def copyableTextfield(k: String): TextField = { + new TextField() { + text = k + editable = false + style = "-fx-background-color: rgba(0, 0, 0, 0);" + margin = Insets(0) + padding = Insets(0) + } + } + def do_one(k: String, v: String, row: Int): Int = { - grid.add(new Label(k), 0, row) - grid.add(new Label(v) { - wrapText = true - }, 1, row) + grid.add(copyableTextfield(k), 0, row) + grid.add(copyableTextfield(v), 1, row) + // grid.add(new Label(k), 0, row) + // grid.add(new Label(v) { + // wrapText = true + // }, 1, row) row + 1 } @@ -75,25 +87,29 @@ class PkgInfoDialog(tlp: TLPackage) extends Dialog { //println(tlpkgs(pkg)) val docFiles = tlp.docfiles if (docFiles.nonEmpty) { - grid.add(new Label("doc files"), 0, crow) + // grid.add(new Label("doc files"), 0, crow) + grid.add(copyableTextfield("doc files"), 0, crow) grid.add(doListView(docFiles.map(s => s.file.replaceFirst("RELOC", "texmf-dist")), isInstalled), 1, crow) crow += 1 } val runFiles = tlp.runfiles if (runFiles.nonEmpty) { - grid.add(new Label("run files"), 0, crow) + // grid.add(new Label("run files"), 0, crow) + grid.add(copyableTextfield("run files"), 0, crow) grid.add(doListView(runFiles.map(s => s.replaceFirst("RELOC", "texmf-dist")), false), 1, crow) crow += 1 } val srcFiles = tlp.srcfiles if (srcFiles.nonEmpty) { - grid.add(new Label("src files"), 0, crow) + // grid.add(new Label("src files"), 0, crow) + grid.add(copyableTextfield("src files"), 0, crow) grid.add(doListView(srcFiles.map(s => s.replaceFirst("RELOC", "texmf-dist")), false), 1, crow) crow += 1 } val binFiles = tlp.binfiles if (binFiles.nonEmpty) { - grid.add(new Label("bin files"), 0, crow) + // grid.add(new Label("bin files"), 0, crow) + grid.add(copyableTextfield("bin files"), 0, crow) grid.add(doListView(binFiles.flatMap(_._2).toSeq.map(s => s.replaceFirst("RELOC", "texmf-dist")), false), 1, crow) crow += 1 } @@ -110,13 +126,20 @@ class PkgInfoDialog(tlp: TLPackage) extends Dialog { val vb = new VBox() vb.children = files.map { f => val fields = f.split(" ") - new Label(fields(0)) { - if (clickable) { - textFill = Color.Blue - onMouseClicked = { me: MouseEvent => OsTools.openFile(tlmgr.tlroot + "/" + fields(0)) } - cursor = Cursor.Hand - } + val foo = copyableTextfield(fields(0)) + if (clickable) { + foo.style = foo.getStyle + "-fx-text-fill: blue;" + foo.onMouseClicked = { me: MouseEvent => OsTools.openFile(tlmgr.tlroot + "/" + fields(0)) } + foo.cursor = Cursor.Hand } + foo + // new Label(fields(0)) { + // if (clickable) { + // textFill = Color.Blue + // onMouseClicked = { me: MouseEvent => OsTools.openFile(tlmgr.tlroot + "/" + fields(0)) } + // cursor = Cursor.Hand + // } + // } } vb } else { -- cgit v1.2.3