Skip to content
Draft
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions data/cartero.gresource.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/es/danirod/Cartero/">
<file alias="collection_pane.ui" compressed="true" preprocess="xml-stripblanks">ui/collection_pane.ui</file>
<file alias="sidebar.ui" compressed="true" preprocess="xml-stripblanks">ui/sidebar.ui</file>
<file alias="sidebar_row.ui" compressed="true" preprocess="xml-stripblanks">ui/sidebar_row.ui</file>
<file alias="style.css" compressed="true">style.css</file>
<file alias="gtk/help-overlay.ui" compressed="true" preprocess="xml-stripblanks">gtk/help_overlay.ui</file>

<file alias="endpoint_pane.ui" compressed="true" preprocess="xml-stripblanks">ui/endpoint_pane.ui</file>
<file alias="formdata_payload_pane.ui" compressed="true" preprocess="xml-stripblanks">ui/formdata_payload_pane.ui</file>
<file alias="key_value_pane.ui" compressed="true" preprocess="xml-stripblanks">ui/key_value_pane.ui</file>
<file alias="new_collection_window.ui" compressed="true" preprocess="xml-stripblanks">ui/new_collection_window.ui</file>
<file alias="key_value_row.ui" compressed="true" preprocess="xml-stripblanks">ui/key_value_row.ui</file>
<file alias="main_window_no_csd.ui" compressed="true" preprocess="xml-stripblanks">ui/main_window_no_csd.ui</file>
<file alias="main_window.ui" compressed="true" preprocess="xml-stripblanks">ui/main_window.ui</file>
Expand All @@ -20,6 +24,7 @@

<file compressed="true" preprocess="xml-stripblanks">icons/scalable/actions/horizontal-arrows-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/scalable/actions/tab-new-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/scalable/actions/tab-new-filled-symbolic.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/scalable/apps/es.danirod.Cartero.Devel.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/scalable/apps/es.danirod.Cartero.svg</file>
<file compressed="true" preprocess="xml-stripblanks">icons/symbolic/apps/es.danirod.Cartero-symbolic.svg</file>
Expand Down
12 changes: 12 additions & 0 deletions data/es.danirod.Cartero.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
<default>500</default>
<summary>The position of the split between two windows</summary>
</key>
<key name="open-collections" type="as">
<default>[]</default>
<summary>The collections that will be visible in the sidebar</summary>
</key>
<key name="last-directory-new-collection" type="ms">
<default>nothing</default>
<summary>The default directory to present when creating a new collection</summary>
</key>
<key name="last-directory-open-collection" type="ms">
<default>nothing</default>
<summary>The default directory to present when opening a new collection</summary>
</key>
<key name="open-files" type="as">
<default>[]</default>
<summary>The current list of opened files</summary>
Expand Down
2 changes: 2 additions & 0 deletions data/icons/scalable/actions/tab-new-filled-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later

blueprint_files = [
'ui/collection_pane.blp',
'gtk/help_overlay.blp',
'ui/endpoint_pane.blp',
'ui/formdata_payload_pane.blp',
Expand All @@ -28,6 +29,9 @@ blueprint_files = [
'ui/raw_payload_pane.blp',
'ui/response_headers.blp',
'ui/response_panel.blp',
'ui/new_collection_window.blp',
'ui/sidebar.blp',
'ui/sidebar_row.blp',
'ui/save_dialog.blp',
'ui/urlencoded_payload_pane.blp',
]
Expand Down
56 changes: 56 additions & 0 deletions data/ui/collection_pane.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright 2024 the Cartero authors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-License-Identifier: GPL-3.0-or-later
using Gtk 4.0;

template $CarteroCollectionPane: Gtk.Box {
orientation: vertical;

Box {
orientation: horizontal;
spacing: 10;

Entry collection_name {
placeholder-text: _("Collection name");
hexpand: true;
}

Button {
label: _("Save");
clicked => $on_save() swapped;

styles [
'suggested-action'
]
}
}

Notebook {
NotebookPage {
tab: Label {
label: _("Variables");
};

child: ScrolledWindow {
hexpand: true;
vexpand: true;

$CarteroKeyValuePane variables {}
};
}
}
}
Loading