Adiciona subpasta aos favoritos do vinagre 3.18.2

0

Eu quero organizar minhas conexões VNC usando o recurso de favoritos integrado no vinagre 3.18.2. Como a GUI obviamente não suporta a adição de subpastas, examinei o arquivo de marcadores em ~/.local/share/vinagre/vinagre-bookmarks.xml . No entanto, devido à falta de documentação, não consegui descobrir qual é a sintaxe correta para adicionar subpastas à estrutura XML. Daí eu dei uma olhada no código-fonte do vinagre e encontrei o uso da variável VINAGRE_BOOKMARKS_ENTRY_NODE_FOLDER em vários arquivos C e C-header relacionados a bookmarks. Mas, infelizmente, também não consegui descobrir a sintaxe correta para editar o arquivo XML de marcadores do código do analisador.

Aqui estão os arquivos que eu pesquisei: ./vinagre/vinagre-window.c ./vinagre/vinagre-bookmarks.c ./vinagre/vinagre-bookmarks-entry.h ./vinagre/vinagre-bookmarks-migration.c ./vinagre/vinagre-bookmarks-tree.c ./vinagre/vinagre-bookmarks-entry.c ./vinagre/vinagre-bookmarks-ui.c

Como posso adicionar subpastas aos marcadores de qualquer maneira?

    
por Richard Neumann 14.12.2015 / 13:01

1 resposta

1

Encontrei a resposta em vinagre-bookmarks-migration

Para introduzir uma subpasta, faça

<folder name="folder name">[..]</folder>

Em que [..] pode ser itens ou outras subpastas.

Atualização:

Eu criei um arquivo XSD simples para analisar os marcadores:

<?xml version="1.0" encoding="utf-8"?>

<!--
Vinagre bookmarks XML Schema Description

Maintainer: Richard Neumann <r dot neumann at homeinfo fullstop de>

XXX: Use Venetian Blind Design
-->

<!--<xs:schema
    xmlns="https://wiki.gnome.org/Apps/Vinagre/vinagre-bookmarks.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0"
    targetNamespace="https://wiki.gnome.org/Apps/Vinagre/vinagre-bookmarks.xsd">-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">

    <xs:element name="vinagre-bookmarks" type="VinagreBookmarksRoot">
        <xs:annotation>
            <xs:documentation xml:lang="en">
                Root element for vinagre bookmarks
            </xs:documentation>
        </xs:annotation>
    </xs:element>


    <xs:complexType name="VinagreBookmarksRoot">
        <xs:annotation>
            <xs:documentation xml:lang="en">
                Vinagre bookmarks root folder type
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="folder" type="Folder" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Sub-folders
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="item" type="Item" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Connection items
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>


    <xs:complexType name="Folder">
        <xs:annotation>
            <xs:documentation xml:lang="en">
                Folder type
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="VinagreBookmarksRoot">
                <xs:attribute name="name" type="xs:string" use="required"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>


    <xs:complexType name="Item">
        <xs:annotation>
            <xs:documentation xml:lang="en">
                A connection item
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="protocol" type="xs:string"/>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="host" type="xs:string"/>
            <xs:element name="username" type="xs:string"/>
            <xs:element name="port" type="xs:unsignedShort"/>
            <xs:element name="fullscreen" type="xs:boolean"/>
            <xs:element name="width" type="xs:unsignedInt"/>
            <xs:element name="height" type="xs:unsignedInt"/>
            <xs:element name="view_only" type="xs:boolean"/>
            <xs:element name="scaling" type="xs:boolean"/>
            <xs:element name="keep_ratio" type="xs:boolean"/>
            <xs:element name="depth_profile" type="xs:unsignedByte"/>
            <xs:element name="lossy_encoding" type="xs:boolean"/>
        </xs:sequence>
    </xs:complexType>

</xs:schema>
    
por 14.12.2015 / 13:30

Tags