Skip to content

Commit

Permalink
Merge branch 'master' into fix-projectchooser-update
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypw authored Jan 19, 2024
2 parents cbfb8c5 + 30b66b8 commit 7bd93cf
Show file tree
Hide file tree
Showing 636 changed files with 45,902 additions and 33,836 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
image: ghcr.io/elementary/docker:${{ matrix.version }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
apt update
Expand Down Expand Up @@ -46,11 +46,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU for aarch64 emulation
if: ${{ matrix.arch != 'x86_64' }}
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

Expand All @@ -73,7 +73,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Lint
run: io.elementary.vala-lint -d .
2 changes: 1 addition & 1 deletion .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
apt-get install git -y
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_USER_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && true == contains(join(github.event.pull_request.labels.*.name), 'Release')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: elementary/actions/release@master
env:
GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}"
Expand Down
49 changes: 49 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,52 @@ textview.scrubber {
border: 0;
}

.fuzzy-popover {
padding-top: 0.5rem;
padding-bottom: 1rem;
}

.fuzzy-popover entry {
margin-left: 1rem;
margin-right: 1rem;
}

.fuzzy-popover scrolledwindow {
margin-top: 1rem;
}

.fuzzy-list {
background-color: transparent;
}

.fuzzy-item {
padding: 0.5rem;
margin-left: 10px;
margin-right: 10px;
background-color: transparent;
}

.fuzzy-item.preselect-fuzzy,
.fuzzy-item:hover {
border-radius: 0.5rem;
}

.fuzzy-item:hover {
background-color: @theme_unfocused_selected_bg_color;
}

.fuzzy-item.preselect-fuzzy {
background-color: @selected_bg_color;
}

.fuzzy-item .fuzzy-file-icon {
margin-right: 0.5rem;
}

.fuzzy-item label:nth-child(1) {
font-weight: 700;
}

.fuzzy-item.preselect-fuzzy label {
opacity: 0.7;
}
43 changes: 41 additions & 2 deletions data/code.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/elementary/code/7.1.0/data/screenshot.png</image>
<image>https://raw.githubusercontent.com/elementary/code/7.2.0/data/screenshot.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/elementary/code/7.1.0/data/screenshot-dark.png</image>
<image>https://raw.githubusercontent.com/elementary/code/7.2.0/data/screenshot-dark.png</image>
</screenshot>
</screenshots>

Expand Down Expand Up @@ -66,6 +66,45 @@
<update_contact>contact_AT_elementary.io</update_contact>

<releases>
<release version="7.2.0" date="2024-01-18" urgency="medium">
<description>
<p>Improvements:</p>
<ul>
<li>When opening a file in Code from the commandline or another app, a line/char position or selection range may be specified</li>
<li>Add a fuzzy-find plugin which finds files in all open projects</li>
<li>Save and restore the state of the terminal pane</li>
</ul>
<p>Minor updates:</p>
<ul>
<li>"Find in Folder" now works for all folders and text files, not only ".vala" files</li>
<li>"Follow System Style" is now fully respected</li>
<li>The "--new-tab" commandline option now works</li>
<li>The symbol pane width is now synchronised and saved</li>
<li>Project folders are automatically closed if they are externally renamed, moved or deleted</li>
<li>Fixed temporary backup files persisting under some circumstances</li>
<li>The Show-Replace action has been improved</li>
<li>Updated translations</li>
</ul>
</description>
<issues>
<issue url="https://github.com/elementary/code/issues/58">Terminal extension open in current directory</issue>
<issue url="https://github.com/elementary/code/issues/134">Add fuzzy-finder-like way of opening documents within the active project </issue>
<issue url="https://github.com/elementary/code/issues/283">Leave terminal open when all tabs are closed </issue>
<issue url="https://github.com/elementary/code/issues/415">Expose "Go To Line" feature externally</issue>
<issue url="https://github.com/elementary/code/issues/600">Terminal automatically "cd" to project folder in the sidebar</issue>
<issue url="https://github.com/elementary/code/issues/818">Sidebar may show incorrect project structure</issue>
<issue url="https://github.com/elementary/code/issues/1189">Searching within a folder should ignore global filters</issue>
<issue url="https://github.com/elementary/code/issues/1198">New Document tab label changes when another tab is closed </issue>
<issue url="https://github.com/elementary/code/issues/1329">Synchronise and save symbol outline width</issue>
<issue url="https://github.com/elementary/code/issues/1343">A backup file remains after closing a document that has trailing spaces</issue>
<issue url="https://github.com/elementary/code/issues/1364">System theme change not fully respected if Code already running</issue>
<issue url="https://github.com/elementary/code/issues/1371">Highlighted text isn't used with Ctrl-R shortcut</issue>
<issue url="https://github.com/elementary/code/issues/1380">"new-tab" command line option not working</issue>
<issue url="https://github.com/elementary/code/issues/1387">Text view not refocused after pressing Escape in Search bar</issue>
<issue url="https://github.com/elementary/code/issues/1406">Open Folder Button in Welcome View doesn't work</issue>
</issues>
</release>

<release version="7.1.0" date="2023-07-28" urgency="medium">
<description>
<p>Improvements:</p>
Expand Down
15 changes: 10 additions & 5 deletions data/io.elementary.code.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
<summary>The saved state of the window.</summary>
<description>The saved state of the window.</description>
</key>
<key name="window-position" type="(ii)">
<default>(-1, -1)</default>
<summary>Window position</summary>
<description>Most recent window position (x, y)</description>
</key>
<key name="window-size" type="(ii)">
<default>(850, 550)</default>
<summary>Most recent window size</summary>
Expand All @@ -52,6 +47,16 @@
<summary>Symbol outline visibility</summary>
<description>Whether or not the symbol outline is visible</description>
</key>
<key name="outline-width" type="i">
<default>160</default>
<summary>Symbol outline width</summary>
<description>Width of the symbol outline sidebar</description>
</key>
<key name="terminal-visible" type="b">
<default>false</default>
<summary>Terminal visibility</summary>
<description>Whether or not the terminal pane is visible</description>
</key>
<key name="last-opened-path" type="s">
<default>''</default>
<summary>Last opened path</summary>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(
'io.elementary.code',
'vala', 'c',
meson_version: '>= 0.58.0',
version: '7.1.0'
version: '7.2.0'
)

add_project_arguments([
Expand Down
58 changes: 58 additions & 0 deletions plugins/fuzzy-search/file-item.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2023 elementary, Inc. <https://elementary.io>
*
* Authored by: Marvin Ahlgrimm
* Colin Kiama <[email protected]>
*/

public class FileItem : Gtk.ListBoxRow {
private SearchResult result;

public string filepath {
get {
return result.full_path;
}
}
public FileItem (SearchResult res, bool should_distinguish_project = false) {
this.get_style_context ().add_class ("fuzzy-item");
this.get_style_context ().add_class ("flat");

result = res;
Icon icon;
var path_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 1);
path_box.valign = Gtk.Align.CENTER;

var path_label = new Gtk.Label (
@"$(should_distinguish_project ? result.project + "" : "")$(result.relative_path)"
);

path_label.halign = Gtk.Align.START;

var filename_label = new Gtk.Label (Path.get_basename (result.relative_path));
filename_label.halign = Gtk.Align.START;

try {
var fi = File.new_for_path (result.full_path);
var info = fi.query_info ("standard::*", 0);
icon = ContentType.get_icon (info.get_content_type ());
} catch (Error e) {
icon = ContentType.get_icon ("text/plain");
}

var image = new Gtk.Image.from_gicon (icon, Gtk.IconSize.DND);
image.get_style_context ().add_class ("fuzzy-file-icon");

path_box.add (filename_label);
path_box.add (path_label);

var container_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 1) {
valign = Gtk.Align.CENTER
};

container_box.add (image);
container_box.add (path_box);

this.child = container_box;
}
}
Loading

0 comments on commit 7bd93cf

Please sign in to comment.