Skip to content

Commit 87e833f

Browse files
committed
Merge branch 'master' into kaixoo/gtksourceview-5
# Conflicts fixed: # src/Widgets/ChooseProjectButton.vala # src/Widgets/DocumentView.vala
2 parents 8f11b6c + 15393be commit 87e833f

File tree

619 files changed

+30246
-16335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

619 files changed

+30246
-16335
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,35 @@ jobs:
3333
3434
flatpak:
3535
name: Flatpak
36-
runs-on: ubuntu-latest
36+
runs-on: ${{ matrix.configuration.runs-on }}
3737

3838
strategy:
3939
matrix:
40-
arch: [x86_64, aarch64]
40+
configuration:
41+
- arch: x86_64
42+
runs-on: ubuntu-latest
43+
- arch: aarch64
44+
runs-on: ubuntu-24.04-arm
4145
# Don't fail the whole workflow if one architecture fails
4246
fail-fast: false
4347

4448
container:
45-
image: ghcr.io/elementary/flatpak-platform/runtime:7.1-${{ matrix.arch }}
49+
image: ghcr.io/elementary/flatpak-platform/runtime:8-${{ matrix.configuration.arch }}
4650
options: --privileged
4751

4852
steps:
4953
- name: Checkout
5054
uses: actions/checkout@v4
5155

52-
- name: Set up QEMU for aarch64 emulation
53-
if: ${{ matrix.arch != 'x86_64' }}
54-
uses: docker/setup-qemu-action@v3
55-
with:
56-
platforms: arm64
57-
5856
- name: Build
59-
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
57+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.4
6058
with:
6159
bundle: code.flatpak
6260
manifest-path: io.elementary.code.yml
6361
repository-name: appcenter
6462
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
6563
cache-key: "flatpak-builder-${{ github.sha }}"
66-
arch: ${{ matrix.arch }}
64+
arch: ${{ matrix.configuration.arch }}
6765

6866
lint:
6967
name: Lint

data/icons/48/open-project.svg

Lines changed: 354 additions & 0 deletions
Loading

data/io.elementary.code.gresource.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<file alias="scalable/actions/panel-right-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/panel-right-symbolic.svg</file>
3131
</gresource>
3232
<gresource prefix="/io/elementary/code/icons">
33+
<file alias="48x48/actions/open-project.svg" compressed="true" preprocess="xml-stripblanks">icons/48/open-project.svg</file>
3334
<file alias="scalable/actions/filter-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/filter-symbolic.svg</file>
3435
<file alias="scalable/emblems/emblem-git-modified-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/emblem-git-modified-symbolic.svg</file>
3536
<file alias="scalable/emblems/emblem-git-new-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/emblem-git-new-symbolic.svg</file>

data/io.elementary.code.gschema.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@
152152
<summary>Remember the last focused document.</summary>
153153
<description>Restore the focused document from a previous session when opening Code.</description>
154154
</key>
155+
<key name="active-project-path" type="s">
156+
<default>''</default>
157+
<summary>The active project path.</summary>
158+
<description>The path to the folder containing the active project.</description>
159+
</key>
155160
<key name="default-build-directory" type="s">
156161
<default>''</default>
157162
<summary>The default build directory's relative path.</summary>

plugins/word-completion/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module_name = 'word-completion'
22

33
module_files = [
44
'prefix-tree.vala',
5+
'prefix-tree-node.vala',
56
'completion-provider.vala',
67
'engine.vala',
78
'plugin.vala'
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Copyright 2024 elementary, Inc. <https://elementary.io>
3+
* 2011 Lucas Baudin <xapantu@gmail.com>
4+
* *
5+
* This is a free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* This is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public
16+
* License along with this program; see the file COPYING. If not,
17+
* write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18+
* Boston, MA 02110-1301 USA.
19+
*
20+
*/
21+
22+
public class Scratch.Plugins.PrefixNode : Object {
23+
public enum NodeType {
24+
ROOT,
25+
CHAR,
26+
WORD_END
27+
}
28+
29+
private const unichar WORD_END_CHAR = '\0';
30+
private uint occurrences; // Only used for WORD_END nodes
31+
32+
public unichar uc { get; construct; }
33+
public NodeType node_type { get; construct; }
34+
public PrefixNode? parent { get; construct; }
35+
public unichar value { get; construct; }
36+
37+
public Gee.ArrayList<PrefixNode> children;
38+
39+
public PrefixNode.from_unichar (unichar c, PrefixNode? _parent) requires (c != WORD_END_CHAR) {
40+
Object (
41+
value: c,
42+
parent: _parent,
43+
uc: c,
44+
node_type: NodeType.CHAR
45+
);
46+
}
47+
48+
public PrefixNode.root () {
49+
Object (
50+
parent: null,
51+
uc: WORD_END_CHAR,
52+
node_type: NodeType.ROOT
53+
);
54+
}
55+
56+
public PrefixNode.word_end (PrefixNode _parent) {
57+
Object (
58+
parent: _parent,
59+
uc: WORD_END_CHAR,
60+
node_type: NodeType.WORD_END
61+
);
62+
63+
occurrences = 1;
64+
}
65+
66+
construct {
67+
children = new Gee.ArrayList<PrefixNode> ();
68+
}
69+
}

plugins/word-completion/prefix-tree.vala

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11

22
namespace Scratch.Plugins {
3-
private class PrefixNode : Object {
4-
public GLib.List<PrefixNode> children;
5-
public unichar value { get; set; }
6-
7-
construct {
8-
children = new List<PrefixNode> ();
9-
}
10-
}
11-
123
public class PrefixTree : Object {
134
private PrefixNode root;
145

@@ -17,9 +8,7 @@ namespace Scratch.Plugins {
178
}
189

1910
public void clear () {
20-
root = new PrefixNode () {
21-
value = '\0'
22-
};
11+
root = new PrefixNode ();
2312
}
2413

2514
public void insert (string word) {
@@ -47,10 +36,9 @@ namespace Scratch.Plugins {
4736
}
4837
}
4938

50-
var new_child = new PrefixNode () {
51-
value = curr
52-
};
53-
node.children.insert_sorted (new_child, (c1, c2) => {
39+
var new_child = new PrefixNode.from_unichar (curr, null);
40+
node.children.insert (0, new_child);
41+
node.children.sort ((c1, c2) => {
5442
if (c1.value > c2.value) {
5543
return 1;
5644
} else if (c1.value == c2.value) {

po/POTFILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ src/Dialogs/GlobalSearchDialog.vala
55
src/Dialogs/NewBranchDialog.vala
66
src/Dialogs/PreferencesDialog.vala
77
src/Dialogs/RestoreConfirmationDialog.vala
8+
src/Dialogs/CloseProjectsConfirmationDialog.vala
9+
src/Dialogs/OverwriteUncommittedConfirmationDialog.vala
810
src/FolderManager/File.vala
911
src/FolderManager/FileItem.vala
1012
src/FolderManager/FileView.vala

0 commit comments

Comments
 (0)