Commit ca048000 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui
Browse files

Icon Library: init

parent f4519d57
......@@ -4,16 +4,16 @@ stages:
- review
variables:
BUNDLE: "icons-finder-nightly.flatpak"
BUNDLE: "icon-library-nightly.flatpak"
flatpak:
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
stage: "test"
variables:
MANIFEST_PATH: "build-aux/com.bilelmoussaoui.IconsFinderDevel.json"
FLATPAK_MODULE: "icons-finder"
MANIFEST_PATH: "build-aux/com.bilelmoussaoui.IconLibraryDevel.json"
FLATPAK_MODULE: "icon-library"
MESON_ARGS: "-Dprofile=development"
APP_ID: "com.bilelmoussaoui.IconsFinderDevel"
APP_ID: "com.bilelmoussaoui.IconLibraryDevel"
script:
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
......
......@@ -262,6 +262,7 @@ dependencies = [
"gio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gtk 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libhandy 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -275,6 +276,42 @@ name = "libc"
version = "0.2.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libhandy"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gdk 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gdk-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gio-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gtk 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gtk-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
"libhandy-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libhandy-sys"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gdk 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gdk-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gio 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gio-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gtk-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "locale_config"
version = "0.2.3"
......@@ -410,6 +447,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum gtk-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "849835f05d46f605b00ee9fefb6d5921238c570af406f35ee7426ed01cd6795c"
"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
"checksum libc 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "3262021842bf00fe07dbd6cf34ff25c99d7a7ebef8deea84db72be3ea3bb0aff"
"checksum libhandy 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f1fd41f2216fc3894257f4b4405dec7255977ff3a292df1ec1a74bc1700178d"
"checksum libhandy-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d1a46914f15afb94df8efddd8d451f60764da95a63dc4f7f3526ce71e1ef775"
"checksum locale_config 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "73ac19ebe45489e5d53b4346d8b90bb3dd03275c5fdf2ce22a982516d86b535c"
"checksum log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c275b6ad54070ac2d665eef9197db647b32239c9d244bfb6f041a766d00da5b3"
"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
......
[package]
name = "icons-finder"
name = "icon-library"
version = "0.1.0"
authors = ["Bilal Elmoussaoui <bil.elmoussaoui@gmail.com>"]
edition = "2018"
......@@ -7,7 +7,8 @@ edition = "2018"
[dependencies]
gtk = { version = "0.6.0", features = ["v3_22"] }
glib = "0.7"
gio = { version = "0.6.0", features = ["v2_46"] }
gio = { version = "0.6.0", features = ["v2_56"] }
gdk = "0.10.0"
log = "0.4"
gettext-rs= { version = "0.4.1", features = ["gettext-system"] }
libhandy = "0.3.0"
......@@ -11,11 +11,11 @@ then
echo "DEBUG MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --verbose && \
cp "$CARGO_TARGET_DIR"/debug/icons-finder $3
cp "$CARGO_TARGET_DIR"/debug/icon-library $3
else
echo "RELEASE MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --release && \
cp "$CARGO_TARGET_DIR"/release/icons-finder $3
cp "$CARGO_TARGET_DIR"/release/icon-library $3
fi
......@@ -6,7 +6,7 @@
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command" : "icons-finder",
"command" : "icon-library",
"finish-args" : [
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
......@@ -25,19 +25,41 @@
],
"env" : {
"RUSTFLAGS" : "--remap-path-prefix =../ --error-format=short",
"CARGO_HOME" : "/run/build/icons-finder/cargo",
"CARGO_HOME" : "/run/build/icon-library/cargo",
"RUST_BACKTRACE" : "1",
"RUST_LOG" : "icons-finder=debug"
"RUST_LOG" : "icon-library=debug"
}
},
"modules" : [
{
"name" : "icons-finder",
"name" : "libhandy",
"buildsystem" : "meson",
"config-opts" : [
"-Dintrospection=enabled",
"-Dgtk_doc=false",
"-Dtests=false",
"-Dexamples=false",
"-Dvapi=false",
"-Dglade_catalog=disabled"
],
"cleanup" : [
"/include",
"/lib/pkgconfig"
],
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/bilelmoussaoui/icons-finder.git"
"url" : "https://source.puri.sm/Librem5/libhandy.git"
}
]
},
{
"name" : "icon-library",
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/bilelmoussaoui/icon-library.git"
}
]
}
......
{
"app-id": "com.bilelmoussaoui.IconsFinderDevel",
"app-id": "com.bilelmoussaoui.IconLibraryDevel",
"runtime" : "org.gnome.Platform",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command" : "icons-finder",
"command" : "icon-library",
"tags" : [
"nightly"
],
......@@ -29,14 +29,36 @@
],
"env" : {
"RUSTFLAGS" : "--remap-path-prefix =../ --error-format=human",
"CARGO_HOME" : "/run/build/icons-finder/cargo",
"CARGO_HOME" : "/run/build/icon-library/cargo",
"RUST_BACKTRACE" : "1",
"RUST_LOG" : "icons-finder=debug"
"RUST_LOG" : "icon-library=debug"
}
},
"modules" : [
{
"name" : "gtk-rust-template",
"name" : "libhandy",
"buildsystem" : "meson",
"config-opts" : [
"-Dintrospection=enabled",
"-Dgtk_doc=false",
"-Dtests=false",
"-Dexamples=false",
"-Dvapi=false",
"-Dglade_catalog=disabled"
],
"cleanup" : [
"/include",
"/lib/pkgconfig"
],
"sources" : [
{
"type" : "git",
"url" : "https://source.puri.sm/Librem5/libhandy.git"
}
]
},
{
"name" : "icon-library",
"buildsystem" : "meson",
"config-opts" : [
"-Dprofile=development"
......
......@@ -11,13 +11,13 @@
</description>
<screenshots>
<screenshot type="default">
<image>https://gitlab.gnome.org/bilelmoussaoui/icons-finder/raw/master/data/resources/screenshots/screenshot1.png</image>
<image>https://gitlab.gnome.org/bilelmoussaoui/icon-library/raw/master/data/resources/screenshots/screenshot1.png</image>
<caption>Main Window</caption>
</screenshot>
</screenshots>
<url type="homepage">https://gitlab.gnome.org/bilelmoussaoui/icons-finder</url>
<url type="bugtracker">https://gitlab.gnome.org/bilelmoussaoui/icons-finder/issues</url>
<url type="homepage">https://gitlab.gnome.org/bilelmoussaoui/icon-library</url>
<url type="bugtracker">https://gitlab.gnome.org/bilelmoussaoui/icon-library/issues</url>
<url type="donation">https://liberapay.com/bielmoussaoui</url>
<content_rating type="oars-1.0" />
<releases>
......
[Desktop Entry]
Name=GTK Rust Template
Name=Icon Library
GenericName=GTK Rust Template
Comment=A GTK + Rust application boilerplate template
Type=Application
Exec=icons-finder
Exec=icon-library
Terminal=false
Categories=GNOME;GTK;
Keywords=Gnome;GTK;
......
<?xml version="1.0" encoding="utf-8"?>
<schemalist>
<schema path="/com/bilelmoussaoui/IconsFinder/" id="@app-id@" gettext-domain="@gettext-package@">
<schema path="/com/bilelmoussaoui/IconLibrary/" id="@app-id@" gettext-domain="@gettext-package@">
<key name="window-width" type="i">
<default>-1</default>
<summary>Default window width</summary>
......
install_data(
'com.bilelmoussaoui.IconsFinder.svg',
'com.bilelmoussaoui.IconLibrary.svg',
install_dir: iconsdir / 'hicolor' / 'scalable' / 'apps',
rename: '@0@.svg'.format(application_id)
)
install_data(
'com.bilelmoussaoui.IconsFinder-symbolic.svg',
'com.bilelmoussaoui.IconLibrary-symbolic.svg',
install_dir: iconsdir / 'hicolor' / 'symbolic' / 'apps',
rename: '@0@-symbolic.svg'.format(application_id)
)
......@@ -5,7 +5,7 @@ desktop_conf.set('icon', application_id)
desktop_file = i18n.merge_file (
type: 'desktop',
input: configure_file(
input: 'com.bilelmoussaoui.IconsFinder.desktop.in.in',
input: 'com.bilelmoussaoui.IconLibrary.desktop.in.in',
output: '@BASENAME@',
configuration: desktop_conf
),
......@@ -32,7 +32,7 @@ appdata_conf.set('app-id', application_id)
appdata_conf.set('gettext-package', gettext_package)
appdata_file = i18n.merge_file (
input: configure_file(
input: 'com.bilelmoussaoui.IconsFinder.appdata.xml.in.in',
input: 'com.bilelmoussaoui.IconLibrary.appdata.xml.in.in',
output: '@BASENAME@',
configuration: appdata_conf
),
......@@ -57,7 +57,7 @@ gschema_conf = configuration_data()
gschema_conf.set('app-id', application_id)
gschema_conf.set('gettext-package', gettext_package)
configure_file(
input: 'com.bilelmoussaoui.IconsFinder.gschema.xml.in',
input: 'com.bilelmoussaoui.IconLibrary.gschema.xml.in',
output: '@0@.gschema.xml'.format(application_id),
configuration: gschema_conf,
install: true,
......
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/bilelmoussaoui/GtkRustTemplate/">
<gresource prefix="/com/bilelmoussaoui/IconLibrary/">
<file compressed="true" preprocess="xml-stripblanks">about_dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="export_window.ui">resources/ui/export_window.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="shortcuts.ui">resources/ui/shortcuts.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="menu.ui">resources/ui/menu.ui</file>
<file compressed="true" preprocess="xml-stripblanks">window.ui</file>
......
.title-header{
font-size: 36px;
.icons-view-title {
font-size: 16px;
font-weight: bold;
padding: 6px;
}
......@@ -6,13 +6,14 @@
<property name="can_focus">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="program_name">GTK Rust Template</property>
<property name="program_name">Icon Library</property>
<property name="version">@version@</property>
<property name="website">https://gitlab.gnome.org/bilelmoussaoui/gtk-rust-template/</property>
<property name="website">https://gitlab.gnome.org/bilelmoussaoui/icon-library</property>
<property name="authors">Bilal Elmoussaoui</property>
<property name="translator_credits" translatable="yes">translator-credits</property>
<property name="artists">Tobias Bernard</property>
<property name="logo_icon_name">@app-id@</property>
<property name="license_type">mit-x11</property>
<property name="license_type">gpl-3-0-only</property>
<child type="titlebar">
<placeholder/>
</child>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow" id="export_window">
<property name="can_focus">False</property>
<property name="modal">True</property>
<property name="default_width">400</property>
<property name="default_height">260</property>
<child type="titlebar">
<object class="GtkHeaderBar" id="headerbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="show_close_button">True</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkInfoBar" id="is_system_infobar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can_focus">False</property>
<property name="spacing">6</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="copy_name_btn">
<property name="label" translatable="yes">Copy Icon Name</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">export.copy-icon-name</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child internal-child="content_area">
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="spacing">16</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">This is a system icon. It does not need to be shipped with apps.</property>
<property name="wrap">True</property>
<property name="wrap_mode">word-char</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">18</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">0</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">end</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkImage" id="icon_size_16">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">16</property>
<property name="icon_name">image-missing-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">12</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">16</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">12</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">end</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkImage" id="icon_size_32">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">32</property>
<property name="icon_name">image-missing-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">12</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">32</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">12</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">end</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkImage" id="icon_size_64">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">64</property>
<property name="icon_name">image-missing-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">12</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">64</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">12</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="hexpand">True</property>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Copy to Clipboard</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">export.copy-clipboard</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="position">0</property>
</packing>