Commit e52ec852 authored by Carson Black's avatar Carson Black

Tidy up the repository and the program

parent 9b10b804
install_data('me.appadeia.ikona.desktop', install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications'))
install_data('me.appadeia.ikona.svg', install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'icons/hicolor/scalable/apps'))
template_files = ['templates/svg-22-monochrome.desktop',
'templates/svg-32-monochrome.desktop',
'templates/svg-48-color.desktop',
'templates/svg-64-color.desktop',
'templates/svg-16-monochrome.desktop',
'templates/svg-32-color.desktop',
'templates/.source/svg-32-monochrome.svg',
'templates/.source/svg-64-color.svg',
'templates/.source/svg-48-color.svg',
'templates/.source/svg-16-monochrome.svg',
'templates/.source/svg-22-monochrome.svg',
'templates/.source/svg-32-color.svg']
install_data(template_files, install_dir: join_paths(get_option('prefix'), 'templates'))
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="32" height="32" version="1.1" id="svg2" sodipodi:docname="svg-32-color.svg" inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6" />
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" id="namedview4" showgrid="true" showguides="true" inkscape:guide-bbox="true" inkscape:current-layer="svg2">
<inkscape:grid type="xygrid" id="grid10" />
<sodipodi:guide position="-2,30" orientation="0,1" id="guide12" inkscape:locked="false" />
<sodipodi:guide position="30,34" orientation="1,0" id="guide14" inkscape:locked="false" />
<sodipodi:guide position="34,2" orientation="0,1" id="guide16" inkscape:locked="false" />
<sodipodi:guide position="2,-2" orientation="1,0" id="guide18" inkscape:locked="false" />
</sodipodi:namedview>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="32" height="32" version="1.1" id="svg2" sodipodi:docname="svg-32.svg" inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6" />
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" id="namedview4" showgrid="true" showguides="true" inkscape:guide-bbox="true" inkscape:current-layer="svg2">
<inkscape:grid type="xygrid" id="grid10" />
<sodipodi:guide position="-4,28" orientation="0,1" id="guide12" inkscape:locked="false" />
<sodipodi:guide position="28,36" orientation="1,0" id="guide14" inkscape:locked="false" />
<sodipodi:guide position="36,4" orientation="0,1" id="guide16" inkscape:locked="false" />
<sodipodi:guide position="4,-4" orientation="1,0" id="guide18" inkscape:locked="false" />
</sodipodi:namedview>
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#232629;
}
</style>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="48" height="48" version="1.1" id="svg2" sodipodi:docname="svg-48-color.svg" inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6" />
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" id="namedview4" showgrid="true" showguides="true" inkscape:guide-bbox="true" inkscape:current-layer="svg2">
<inkscape:grid type="xygrid" id="grid10" />
<sodipodi:guide position="-4,44" orientation="0,1" id="guide12" inkscape:locked="false" />
<sodipodi:guide position="44,52" orientation="1,0" id="guide14" inkscape:locked="false" />
<sodipodi:guide position="52,4" orientation="0,1" id="guide16" inkscape:locked="false" />
<sodipodi:guide position="4,-4" orientation="1,0" id="guide18" inkscape:locked="false" />
</sodipodi:namedview>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="64" height="64" version="1.1" id="svg2" sodipodi:docname="svg-64-color.svg" inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<metadata id="metadata8">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs6" />
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" id="namedview4" showgrid="true" showguides="true" inkscape:guide-bbox="true" inkscape:current-layer="svg2">
<inkscape:grid type="xygrid" id="grid10" />
<sodipodi:guide position="-6,58" orientation="0,1" id="guide12" inkscape:locked="false" />
<sodipodi:guide position="6,70" orientation="1,0" id="guide14" inkscape:locked="false" />
<sodipodi:guide position="70,6" orientation="0,1" id="guide16" inkscape:locked="false" />
<sodipodi:guide position="58,-6" orientation="1,0" id="guide18" inkscape:locked="false" />
</sodipodi:namedview>
</svg>
[Desktop Entry]
Name=SVG Icon (16x16, mono)...
Comment=Enter SVG filename:
Type=Link
URL=.source/svg-16-monochrome.svg
Icon=image-svg+xml
[Desktop Entry]
Name=SVG Icon (22x22, mono)...
Comment=Enter SVG filename:
Type=Link
URL=.source/svg-22-monochrome.svg
Icon=image-svg+xml
[Desktop Entry]
Name=SVG Icon (32x32, color)...
Comment=Enter SVG filename:
Type=Link
URL=.source/svg-32-color.svg
Icon=image-svg+xml
[Desktop Entry]
Name=SVG Icon (32x32, mono)...
Comment=Enter SVG filename:
Type=Link
URL=.source/svg-32-monochrome.svg
Icon=image-svg+xml
[Desktop Entry]
Name=SVG Icon (48x48, color)...
Comment=Enter SVG filename:
Type=Link
URL=.source/svg-48-color.svg
Icon=image-svg+xml
[Desktop Entry]
Name=SVG Icon (64x64, color)...
Comment=Enter SVG filename:
Type=Link
URL=.source/svg-64-color.svg
Icon=image-svg+xml
......@@ -3,5 +3,8 @@
<file>bg.jpg</file>
<file>bg-dark.jpg</file>
<file>ikona.svg</file>
<file>templates/colorful.svg</file>
<file>templates/mono-16.svg</file>
<file>templates/mono-22.svg</file>
</qresource>
</RCC>
......@@ -81,44 +81,23 @@ Kirigami.ApplicationWindow {
iconName: "document-new-symbolic"
title: "New Icon from Breeze Templates"
QNative.MenuItem {
text: "16px Monochrome"
text: "16px Action/Status/Filetype"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-16-monochrome.svg"
root.fromIconTemplate = ":templates/mono-16.svg"
savePicker.open()
}
}
QNative.MenuItem {
text: "22px Monochrome"
text: "22px Action/Status/Filetype"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-22-monochrome.svg"
root.fromIconTemplate = ":templates/mono-22.svg"
savePicker.open()
}
}
QNative.MenuItem {
text: "32px Monochrome"
text: "Application/Large Filetype"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-32-monochrome.svg"
savePicker.open()
}
}
QNative.MenuItem {
text: "32px Color"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-32-color.svg"
savePicker.open()
}
}
QNative.MenuItem {
text: "48px Color"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-48-color.svg"
savePicker.open()
}
}
QNative.MenuItem {
text: "64px Color"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-64-color.svg"
root.fromIconTemplate = ":/templates/colorful.svg"
savePicker.open()
}
}
......@@ -232,44 +211,23 @@ Kirigami.ApplicationWindow {
iconSource: "document-new-symbolic"
text: "New Icon from Breeze Templates"
Kirigami.Action {
text: "16px Monochrome Icon"
text: "16px Action/Status/Filetype"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-16-monochrome.svg"
root.fromIconTemplate = ":templates/mono-16.svg"
savePicker.open()
}
}
Kirigami.Action {
text: "22px Monochrome Icon"
text: "22px Action/Status/Filetype"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-22-monochrome.svg"
root.fromIconTemplate = ":templates/mono-22.svg"
savePicker.open()
}
}
Kirigami.Action {
text: "32px Monochrome Icon"
text: "48px Application/Large Filetype"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-32-monochrome.svg"
savePicker.open()
}
}
Kirigami.Action {
text: "32px Colour Icon"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-32-color.svg"
savePicker.open()
}
}
Kirigami.Action {
text: "48px Colour Icon"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-48-color.svg"
savePicker.open()
}
}
Kirigami.Action {
text: "64px Colour Icon"
onTriggered: {
root.fromIconTemplate = "/usr/share/templates/.source/svg-64-color.svg"
root.fromIconTemplate = ":/templates/colorful.svg"
savePicker.open()
}
}
......@@ -656,8 +614,10 @@ Kirigami.ApplicationWindow {
var stdout = data["stdout"]
if (exitCode == 0) {
print(stdout.trim())
setter.copy(root.fromIconTemplate, stdout.trim())
root.imageSource = "file:/" + stdout.trim()
root.imageSource = "file:" + stdout.trim()
print(root.imageSource)
setter.xdgOpen(stdout.trim())
} else {
......
This diff is collapsed.
......@@ -36,11 +36,12 @@ void IconSetter::setIconTheme(QString themeName)
}
void IconSetter::copy(QString from, QString to)
{
QFile fromfile(from);
if (QFile::exists(to))
{
QFile::remove(to);
}
QFile::copy(from, to);
fromfile.copy(to);
}
void IconSetter::linkIcon(QString from)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment