Implement a 3-column layout with a collapsible sidebar for organizing and managing HTTP requests within projects. Requests are stored in ~/.roster/requests.json for easy git versioning. Features: - Create, rename, and delete projects - Save current request to a project with custom name - Load saved requests with direct click (no confirmation dialog) - Delete saved requests with confirmation - Expandable/collapsible project folders - Context menu for project actions Technical changes: - Add SavedRequest and Project data models with JSON serialization - Implement ProjectManager for persistence to ~/.roster/requests.json - Create RequestItem and ProjectItem widgets with GTK templates - Restructure main window UI to nested GtkPaned (3-column layout) - Add project management dialogs using AdwAlertDialog - Update build system with new source files and UI resources
42 lines
1.2 KiB
XML
42 lines
1.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<requires lib="gtk" version="4.0"/>
|
|
<template class="RequestItem" parent="GtkBox">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">6</property>
|
|
<property name="margin-start">6</property>
|
|
<property name="margin-end">6</property>
|
|
<property name="margin-top">3</property>
|
|
<property name="margin-bottom">3</property>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="method_label">
|
|
<property name="width-chars">6</property>
|
|
<style>
|
|
<class name="caption"/>
|
|
<class name="dim-label"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="name_label">
|
|
<property name="xalign">0</property>
|
|
<property name="ellipsize">end</property>
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkButton" id="delete_button">
|
|
<property name="icon-name">edit-delete-symbolic</property>
|
|
<property name="tooltip-text">Delete request</property>
|
|
<signal name="clicked" handler="on_delete_clicked"/>
|
|
<style>
|
|
<class name="flat"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|