Skip to content

Commit d6b02f0

Browse files
authored
Merge branch 'master' into allow-different-valac
2 parents 0d18caa + 4187089 commit d6b02f0

File tree

15 files changed

+5265
-18101
lines changed

15 files changed

+5265
-18101
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/valadoc-example-tester
2323
/node_modules/
2424
/yarn.lock
25+
/valadoc.org/
2526

2627
!.babelrc
2728
!.editorconfig

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
node-version: [10.x, 12.x]
17+
node-version: [16.x, 18.x]
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121

2222
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
23+
uses: actions/setup-node@v3
2424
with:
2525
node-version: ${{ matrix.node-version }}
2626

@@ -44,12 +44,12 @@ jobs:
4444

4545
steps:
4646
- name: Checkout
47-
uses: actions/checkout@v2
47+
uses: actions/checkout@v3
4848

4949
- name: Install the dependencies
5050
run: |
5151
export DEBIAN_FRONTEND=noninteractive
52-
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
52+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
5353
sudo apt-get update -y
5454
sudo apt-get install -y --no-install-recommends software-properties-common
5555
sudo add-apt-repository -y ppa:vala-team/daily
@@ -61,7 +61,7 @@ jobs:
6161
libgee-0.8-dev \
6262
git \
6363
libguestfs-gobject-dev \
64-
libvaladoc-0.56-dev \
64+
libvaladoc-0.58-dev \
6565
php \
6666
php-curl \
6767
sphinxsearch \

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install the dependencies
2020
run: |
2121
export DEBIAN_FRONTEND=noninteractive
22-
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
22+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
2323
sudo apt-get update -y
2424
sudo apt-get install -y --no-install-recommends software-properties-common
2525
sudo add-apt-repository -y ppa:vala-team/daily
@@ -31,7 +31,7 @@ jobs:
3131
libgee-0.8-dev \
3232
git \
3333
libguestfs-gobject-dev \
34-
libvaladoc-0.56-dev \
34+
libvaladoc-0.58-dev \
3535
php \
3636
php-curl \
3737
sphinxsearch \

Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ VALAC_VERSION := $(shell $(VALAC) --api-version | awk -F. '{ print "0."$$2 }')
55
VAPIDIRS := --vapidir $(shell pkg-config --variable vapidir libvala-$(VALAC_VERSION)) --vapidir $(shell pkg-config --variable vapidir valadoc-$(VALAC_VERSION))
66
VALAFLAGS = -g -X -w $(VAPIDIRS)
77
PREFIX = "stable"
8+
INSTALL_DIR ?= /usr/local/share/devhelp/books
9+
10+
.PHONY: install
811

912
default: generator libdoclet.so update-girs configgen valadoc-example-gen valadoc-example-tester
1013

@@ -133,6 +136,17 @@ serve-mini: build-docs-mini build-data
133136

134137
serve-search: configgen
135138
./configgen ./valadoc.org/
136-
mkdir ./sphinx/storage
139+
mkdir -p ./sphinx/storage
137140
indexer --config ./sphinx.conf --all
138141
searchd --config sphinx.conf
142+
143+
.PHONY: install
144+
install:
145+
$(shell mkdir -p $(INSTALL_DIR));
146+
$(foreach package, $(shell ls ./valadoc.org/*/*.tar.bz2), $(shell tar -xf $(package) -C $(INSTALL_DIR));)
147+
148+
#for package in `ls ./valadoc.org/*/*.tar.bz2`; do \
149+
# echo $package; \
150+
# tar -xf $package -C $INSTALL_DIR; \
151+
# done; \
152+

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,26 @@ Using a different version of Vala
5858
You may want or need to test Valadoc with a different version of Vala, for example to pick up fixes in Vala that are necessary to build example code. You can do this with a chroot or jhbuild; or if your valac’s API version is different from other versions you have installed, just set `VALAC=valac-X.YY` in your environment when running `make`.
5959

6060

61+
Install locally
62+
===============
63+
64+
To install valadoc documentation as devhelp books, first build the pages with either
65+
```bash
66+
make build-docs-mini build-data GENERATOR_OPTS=--skip-existing
67+
```
68+
for just glib, gio and gobject, or
69+
```bash
70+
make build-docs build-data GENERATOR_OPTS=--skip-existing
71+
```
72+
for all packages. This can take a bit longer.
73+
74+
After that you can run
75+
```bash
76+
sudo make install
77+
```
78+
to install the devhelp books in your system. Now launch Devhelp and use them!
79+
80+
6181
Searching
6282
=========
6383

data/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function get_title ($page) {
7979
</form>
8080
<a class="title" href="/index.htm"><img alt="Valadoc" src="/images/logo.svg"/></a>
8181
<ul>
82-
<li><a href="https://planet.vala-project.org/" target="_blank" title="Planet Vala"><i class="fa fa-globe"></i></a>
82+
<li><a href="https://vala.dev/" target="_blank" title="Vala Official Website"><i class="fa fa-home"></i></a>
8383
<li><a href="https://www.reddit.com/r/vala/" target="_blank" title="reddit"><i class="fa fa-reddit"></i></a>
8484
<li><a href="/markup.htm" title="Markup Info"><i class="fa fa-info-circle"></i></a>
8585
</ul>

data/scripts/valadoc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,19 @@ function initTooltip() {
7171

7272

7373
function setupLink (link) {
74+
let shouldTrackLink = false;
75+
76+
const xlinkPath = link.getAttribute('xlink:href');
77+
78+
// Force tooltip to show up over `<a>` element nodes in SVGs.
79+
if (xlinkPath && !link.getAttribute('href')) {
80+
link.setAttribute('href', xlinkPath);
81+
link.hostname = location.hostname;
82+
// An SVGAnimatedString is returned when getting attributes from inside an SVG.
83+
// We need to use the "baseVal` field to get the actual value we need for the pathaname.
84+
link.pathname = link.href.baseVal;
85+
}
86+
7487
if (link.hostname !== location.hostname
7588
|| link.pathname.endsWith('index.htm')
7689
|| link.pathname.endsWith('.tar.bz2')) {

data/styles/main.css

Lines changed: 111 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ p {
2727
}
2828

2929
/***********
30-
* Nav Bar *
31-
***********/
30+
* Nav Bar *
31+
***********/
3232

3333
nav {
3434
align-items: center;
@@ -115,8 +115,8 @@ nav .title img {
115115
}
116116

117117
/***********
118-
* Sidebar *
119-
***********/
118+
* Sidebar *
119+
***********/
120120

121121
#sidebar {
122122
background-color: #f7f6f8;
@@ -138,7 +138,7 @@ nav .title img {
138138
}
139139

140140
#sidebar .site_navigation a::before {
141-
content: '';
141+
content: "";
142142
display: inline-block;
143143
height: 16px;
144144
width: 16px;
@@ -183,7 +183,7 @@ nav .title img {
183183

184184
#sidebar .external-link::after {
185185
background-image: url(/images/external_link.svg);
186-
content: '';
186+
content: "";
187187
display: inline-block;
188188
height: 12px;
189189
width: 12px;
@@ -249,7 +249,7 @@ nav .title img {
249249

250250
.navi_inline li::before,
251251
.navi_main li::before {
252-
content: '';
252+
content: "";
253253
display: inline-block;
254254
height: 16px;
255255
width: 16px;
@@ -263,8 +263,8 @@ nav .title img {
263263
}
264264

265265
/***********
266-
* Content *
267-
***********/
266+
* Content *
267+
***********/
268268

269269
#content-wrapper {
270270
display: flex;
@@ -315,7 +315,7 @@ nav .title img {
315315
.highlight .package::before,
316316
.document::before,
317317
.video::before {
318-
content: '';
318+
content: "";
319319
display: inline-block;
320320
height: 16px;
321321
width: 16px;
@@ -358,6 +358,19 @@ nav .title img {
358358
border-style: none;
359359
display: block;
360360
margin: 0 auto;
361+
text-align: center;
362+
}
363+
364+
.graph .node text {
365+
font-size: 14px;
366+
}
367+
368+
.graph > polygon {
369+
fill: none;
370+
}
371+
372+
.graph .node polygon {
373+
fill: transparent;
361374
}
362375

363376
.site_navi {
@@ -421,6 +434,7 @@ nav .title img {
421434
padding: 12px;
422435
text-align: left;
423436
z-index: 1000;
437+
top: -200px;
424438
}
425439

426440
.tooltip * {
@@ -634,8 +648,8 @@ code {
634648
}
635649

636650
/*********
637-
* Icons *
638-
*********/
651+
* Icons *
652+
*********/
639653

640654
.abstract_class::before,
641655
a.abstract_class,
@@ -792,3 +806,88 @@ a.abstract_class,
792806
.brief_description a.virtual_property {
793807
background-image: url(/images/virtualproperty.svg);
794808
}
809+
810+
@media (prefers-color-scheme: dark) {
811+
body {
812+
background-color: #22222a;
813+
color: #eee;
814+
}
815+
816+
nav {
817+
background-color: #38304c;
818+
}
819+
820+
#sidebar {
821+
background-color: #22222a;
822+
border-right-color: #111;
823+
}
824+
825+
#sidebar li:hover {
826+
background-color: rgba(0, 0, 0, 0.5);
827+
}
828+
.search-selected {
829+
background-color: #524a66 !important;
830+
}
831+
832+
li.namespace::before,
833+
li.package_index::before {
834+
filter: brightness(200%);
835+
}
836+
837+
#sidebar a {
838+
color: #eee;
839+
}
840+
841+
.highlight:hover {
842+
background-color: #111;
843+
}
844+
845+
#sidebar hr {
846+
border-top-color: #222;
847+
border-bottom-color: #000;
848+
}
849+
850+
.main_code_definition {
851+
background-color: #111;
852+
}
853+
854+
.box .headline {
855+
background-color: #112;
856+
border-color: #446;
857+
}
858+
859+
footer {
860+
background-color: #1a1a1a;
861+
color: #eee;
862+
}
863+
864+
.graph .node polygon {
865+
stroke: white;
866+
}
867+
868+
.graph .node text {
869+
fill: white;
870+
}
871+
872+
.graph .edge path {
873+
stroke: white;
874+
}
875+
876+
.graph .edge polygon {
877+
stroke: white;
878+
fill: white;
879+
}
880+
881+
.tooltip {
882+
background-color: #111;
883+
}
884+
885+
.main_parameter_table_unknown_parameter {
886+
color: #999;
887+
}
888+
889+
.main_table {
890+
background: #335;
891+
border: 1px solid #77c;
892+
}
893+
}

documentation/glib-2.0/glib-2.0.valadoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,10 +2569,11 @@ string.valid_char
25692569
string.get
25702570

25712571
/**
2572-
* Replace all occurrences of the search string with the replacement string
2572+
* Replace occurrences of the search string with the replacement string at a maximum of max_tokens
25732573
*
25742574
* @param old The value being searched for
25752575
* @param replacement The replacement value that replaces ``old`` values.
2576+
* @param max_tokens The maximum number. If this is less than 0, the string will be replaced completely.
25762577
* @return a string with the replaced values.
25772578
*/
25782579
string.replace
@@ -3212,17 +3213,17 @@ GLib.FileStream.clearerr
32123213
/**
32133214
* Reads specified number of objects in the array buffer from the given input stream stream.
32143215
*
3215-
* @param buffer pointer to the first object object in the array to be read
3216-
* @param size the number of the objects to be read
3216+
* @param buf pointer to the first object object in the array to be read
3217+
* @param size the element's size, this is always sizeof(uint8) or 1
32173218
* @return number of objects read successfully
32183219
*/
32193220
GLib.FileStream.read
32203221

32213222
/**
32223223
* Writes count of objects in the given array buffer to the output stream stream.
32233224
*
3224-
* @param buffer pointer to the first object object in the array to be written
3225-
* @param size the number of the objects to be written
3225+
* @param buf pointer to the first object object in the array to be written
3226+
* @param size the element's size, this is always sizeof(uint8) or 1
32263227
* @return number of objects written successfully
32273228
*/
32283229
GLib.FileStream.write

0 commit comments

Comments
 (0)