Commit f00d4c8d authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

bump libhandy to 0.83.0

Fixes #23
parent 6122fc62
Pipeline #195816 failed with stage
in 1 minute and 32 seconds
...@@ -460,7 +460,7 @@ dependencies = [ ...@@ -460,7 +460,7 @@ dependencies = [
"glib 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gtk 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "gtk 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gtk-macros 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "gtk-macros 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libhandy 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "libhandy 1.0.0 (git+https://gitlab.gnome.org/World/Rust/libhandy-rs.git)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"search-provider 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "search-provider 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
...@@ -503,8 +503,8 @@ dependencies = [ ...@@ -503,8 +503,8 @@ dependencies = [
[[package]] [[package]]
name = "libhandy" name = "libhandy"
version = "0.6.0" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://gitlab.gnome.org/World/Rust/libhandy-rs.git#8e83a51344d981f0cdb6a643ae3b6fc63b328d96"
dependencies = [ dependencies = [
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gdk 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gdk 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
...@@ -518,16 +518,17 @@ dependencies = [ ...@@ -518,16 +518,17 @@ dependencies = [
"gtk-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "gtk-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)",
"libhandy-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "libhandy-sys 1.0.0 (git+https://gitlab.gnome.org/World/Rust/libhandy-rs.git)",
"pango 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "pango 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "libhandy-sys" name = "libhandy-sys"
version = "0.6.0" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://gitlab.gnome.org/World/Rust/libhandy-rs.git#8e83a51344d981f0cdb6a643ae3b6fc63b328d96"
dependencies = [ dependencies = [
"gdk 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gdk 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gdk-pixbuf-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gdk-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "gdk-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gio 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "gio 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gio-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "gio-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
...@@ -537,6 +538,7 @@ dependencies = [ ...@@ -537,6 +538,7 @@ dependencies = [
"libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)",
"pango-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "pango-sys 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
"system-deps 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
...@@ -1017,8 +1019,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" ...@@ -1017,8 +1019,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
"checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" "checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"
"checksum libdbus-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc12a3bc971424edbbf7edaf6e5740483444db63aa8e23d3751ff12a30f306f0" "checksum libdbus-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc12a3bc971424edbbf7edaf6e5740483444db63aa8e23d3751ff12a30f306f0"
"checksum libhandy 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d2aae364d9dc15598dbf1b3b5c1ac7857034bad622f8817002439125c9869a7" "checksum libhandy 1.0.0 (git+https://gitlab.gnome.org/World/Rust/libhandy-rs.git)" = "<none>"
"checksum libhandy-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01bb81849945cacdf8f8f0db8e4be16d5bd72a8d673d9b9691cbe0b7c5364412" "checksum libhandy-sys 1.0.0 (git+https://gitlab.gnome.org/World/Rust/libhandy-rs.git)" = "<none>"
"checksum locale_config 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "73ac19ebe45489e5d53b4346d8b90bb3dd03275c5fdf2ce22a982516d86b535c" "checksum locale_config 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "73ac19ebe45489e5d53b4346d8b90bb3dd03275c5fdf2ce22a982516d86b535c"
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
......
...@@ -12,7 +12,7 @@ gdk = "0.13" ...@@ -12,7 +12,7 @@ gdk = "0.13"
gdk-pixbuf = {version = "0.9", features = ["v2_32"] } gdk-pixbuf = {version = "0.9", features = ["v2_32"] }
log = "0.4" log = "0.4"
gettext-rs= { version = "0.4", features = ["gettext-system"] } gettext-rs= { version = "0.4", features = ["gettext-system"] }
libhandy = "0.6" libhandy = { git = "https://gitlab.gnome.org/World/Rust/libhandy-rs.git" }
serde = "1.0" serde = "1.0"
serde_json = "1.0" serde_json = "1.0"
serde_derive = "1.0" serde_derive = "1.0"
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
"--share=network" "--share=network"
], ],
"env": { "env": {
"RUSTFLAGS": "--remap-path-prefix =../",
"CARGO_HOME": "/run/build/icon-library/cargo", "CARGO_HOME": "/run/build/icon-library/cargo",
"RUST_BACKTRACE": "1", "RUST_BACKTRACE": "1",
"RUST_LOG": "icon_library=info" "RUST_LOG": "icon_library=info"
...@@ -51,8 +50,8 @@ ...@@ -51,8 +50,8 @@
], ],
"sources": [{ "sources": [{
"type": "git", "type": "git",
"url": "https://source.puri.sm/Librem5/libhandy.git", "url": "https://gitlab.gnome.org/GNOME/libhandy.git",
"branch": "libhandy-0-0" "branch": "0.83.0"
}] }]
}, },
{ {
......
/* Don't recolor the icons. */ /* Don't recolor the icons. */
.icon, .icon:backdrop { color: @theme_fg_color; } .icon, .icon:backdrop { color: @theme_fg_color; }
.frame {
border-radius: 8px;
}
.sourceview { .sourceview {
padding: 4px 8px; padding: 4px 8px;
} }
.semi-flat:not(:active):not(:checked):not(:hover) {
background: none;
border: 1px solid alpha(#cdc7c2, 0.5);
box-shadow: none;
}
...@@ -121,11 +121,10 @@ ...@@ -121,11 +121,10 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="transition_type">slide-left-right</property> <property name="transition_type">slide-left-right</property>
<child> <child>
<object class="HdyColumn"> <object class="HdyClamp">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="maximum_width">400</property> <property name="maximum_size">400</property>
<property name="linear_growth_width">400</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -332,7 +331,7 @@ ...@@ -332,7 +331,7 @@
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="activatable_widget">copy_icon_btn</property> <property name="activatable_widget">copy_icon_btn</property>
<property name="title" translatable="yes">Use in a Mockup</property> <property name="title" translatable="yes">Use in a Mockup</property>
<child type="action"> <child>
<object class="GtkButton" id="copy_icon_btn"> <object class="GtkButton" id="copy_icon_btn">
<property name="label" translatable="yes">Copy to Clipboard</property> <property name="label" translatable="yes">Copy to Clipboard</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -341,38 +340,21 @@ ...@@ -341,38 +340,21 @@
<property name="halign">center</property> <property name="halign">center</property>
<property name="valign">center</property> <property name="valign">center</property>
<property name="action_name">export.copy-clipboard</property> <property name="action_name">export.copy-clipboard</property>
<style>
<class name="semi-flat" />
</style>
</object> </object>
</child> </child>
</object> </object>
</child> </child>
<child> <child>
<object class="HdyActionRow"> <object class="HdyActionRow" id="in_app_row">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="activatable_widget">button1</property> <property name="activatable">True</property>
<property name="title" translatable="yes">Include in an App</property> <property name="title" translatable="yes">Include in an App</property>
<child type="action"> <child>
<object class="GtkButton" id="button1"> <object class="GtkImage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">False</property>
<property name="receives_default">True</property> <property name="icon_name">go-next-symbolic</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="action_name">export.include-in-app</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">go-next-symbolic</property>
</object>
</child>
<style>
<class name="flat-btn"/>
<class name="dim-label"/>
</style>
</object> </object>
</child> </child>
</object> </object>
...@@ -381,33 +363,19 @@ ...@@ -381,33 +363,19 @@
<object class="HdyActionRow" id="as_system_row"> <object class="HdyActionRow" id="as_system_row">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="activatable_widget">button2</property> <property name="activatable">True</property>
<property name="title" translatable="yes">Use as a System Icon</property> <property name="title" translatable="yes">Use as a System Icon</property>
<child type="action"> <child>
<object class="GtkButton" id="button2"> <object class="GtkImage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">False</property>
<property name="receives_default">True</property> <property name="icon_name">go-next-symbolic</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="action_name">export.use-as-system</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">go-next-symbolic</property>
</object>
</child>
<style>
<class name="flat-btn"/>
<class name="dim-label"/>
</style>
</object> </object>
</child> </child>
</object> </object>
</child> </child>
<style> <style>
<class name="frame"/> <class name="preferences"/>
</style> </style>
</object> </object>
<packing> <packing>
...@@ -424,11 +392,11 @@ ...@@ -424,11 +392,11 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="HdyColumn"> <object class="HdyClamp">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="maximum_width">700</property> <property name="maximum_size">700</property>
<property name="linear_growth_width">700</property> <property name="tightening_threshold">700</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -509,15 +477,15 @@ ...@@ -509,15 +477,15 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
<child> <child>
<object class="HdyColumn"> <object class="HdyClamp">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="margin_left">24</property> <property name="margin_left">24</property>
<property name="margin_right">24</property> <property name="margin_right">24</property>
<property name="margin_top">24</property> <property name="margin_top">24</property>
<property name="margin_bottom">24</property> <property name="margin_bottom">24</property>
<property name="maximum_width">700</property> <property name="maximum_size">700</property>
<property name="linear_growth_width">700</property> <property name="tightening_threshold">700</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
<child> <child>
<object class="HdyColumn"> <object class="HdyClamp">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="margin_left">12</property> <property name="margin_left">12</property>
<property name="margin_right">12</property> <property name="margin_right">12</property>
<property name="maximum_width">900</property> <property name="maximum_size">900</property>
<property name="linear_growth_width">900</property> <property name="tightening_threshold">900</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
......
...@@ -59,11 +59,10 @@ ...@@ -59,11 +59,10 @@
<property name="show_close_button">True</property> <property name="show_close_button">True</property>
<property name="centering_policy">HDY_CENTERING_POLICY_STRICT</property> <property name="centering_policy">HDY_CENTERING_POLICY_STRICT</property>
<child type="title"> <child type="title">
<object class="HdyColumn"> <object class="HdyClamp">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="maximum_width">400</property> <property name="tightening_threshold">400</property>
<property name="linear_growth_width">400</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<child> <child>
<object class="GtkSearchEntry" id="search_entry"> <object class="GtkSearchEntry" id="search_entry">
......
...@@ -25,7 +25,7 @@ fn main() { ...@@ -25,7 +25,7 @@ fn main() {
pretty_env_logger::init(); pretty_env_logger::init();
gtk::init().expect("Failed to initalize gtk3"); gtk::init().expect("Failed to initalize gtk3");
libhandy::init().expect("Failed to initialize libhandy"); libhandy::init();
glib::set_application_name(&format!("{}Icon Library", NAME_PREFIX)); glib::set_application_name(&format!("{}Icon Library", NAME_PREFIX));
glib::set_prgname(Some("icon-library")); glib::set_prgname(Some("icon-library"));
......
...@@ -10,7 +10,7 @@ pub(crate) fn init() -> Result<(), Error> { ...@@ -10,7 +10,7 @@ pub(crate) fn init() -> Result<(), Error> {
// Create Resource it will live as long the value lives. // Create Resource it will live as long the value lives.
let gbytes = Bytes::from_static(res_bytes.as_ref()); let gbytes = Bytes::from_static(res_bytes.as_ref());
let resource = Resource::new_from_data(&gbytes)?; let resource = Resource::from_data(&gbytes)?;
// Register the resource so it won't be dropped and will continue to live in // Register the resource so it won't be dropped and will continue to live in
// memory. // memory.
......
...@@ -6,6 +6,7 @@ use gio::prelude::*; ...@@ -6,6 +6,7 @@ use gio::prelude::*;
use gtk::prelude::*; use gtk::prelude::*;
use gtk::prelude::{SettingsExt, TextBufferExt}; use gtk::prelude::{SettingsExt, TextBufferExt};
use gtk::Inhibit; use gtk::Inhibit;
use libhandy::ActionRowExt;
use sourceview4::prelude::*; use sourceview4::prelude::*;
use std::path::Path; use std::path::Path;
...@@ -60,15 +61,6 @@ impl ExportDialog { ...@@ -60,15 +61,6 @@ impl ExportDialog {
get_widget!(self.builder, gtk::HeaderBar, headerbar); get_widget!(self.builder, gtk::HeaderBar, headerbar);
headerbar.set_title(Some(&self.icon.name.replace("-symbolic", ""))); headerbar.set_title(Some(&self.icon.name.replace("-symbolic", "")));
get_widget!(self.builder, gtk::ListBox, actions_list);
actions_list.set_header_func(Some(Box::new(move |row1: &gtk::ListBoxRow, row2: Option<&gtk::ListBoxRow>| {
if row2.is_some() {
let sep = gtk::Separator::new(gtk::Orientation::Horizontal);
sep.show();
row1.set_header(Some(&sep));
}
})));
get_widget!(self.builder, gtk::Label, include_label); get_widget!(self.builder, gtk::Label, include_label);
include_label.connect_activate_link(clone!(@strong self.builder as builder => @default-return Inhibit(false), move |_, _| { include_label.connect_activate_link(clone!(@strong self.builder as builder => @default-return Inhibit(false), move |_, _| {
get_widget!(builder, gtk::Stack, headerbar_stack); get_widget!(builder, gtk::Stack, headerbar_stack);
...@@ -145,16 +137,13 @@ impl ExportDialog { ...@@ -145,16 +137,13 @@ impl ExportDialog {
}) })
); );
// Switch view to: Include the icon in an App // Switch view to: Include the icon in an App
action!( get_widget!(self.builder, libhandy::ActionRow, in_app_row);
actions, in_app_row.connect_activated(clone!(@strong self.builder as builder => move |_| {
"include-in-app", get_widget!(builder, gtk::Stack, headerbar_stack);
clone!(@strong self.builder as builder => move |_, _| { get_widget!(builder, gtk::Stack, main_stack);
get_widget!(builder, gtk::Stack, headerbar_stack); main_stack.set_visible_child_name("in-app");
get_widget!(builder, gtk::Stack, main_stack); headerbar_stack.set_visible_child_name("in-app");
main_stack.set_visible_child_name("in-app"); }));
headerbar_stack.set_visible_child_name("in-app");
})
);
// Switch the view to Icon details // Switch the view to Icon details
action!( action!(
actions, actions,
...@@ -167,16 +156,13 @@ impl ExportDialog { ...@@ -167,16 +156,13 @@ impl ExportDialog {
}) })
); );
// Switch view to in-platform related stuff // Switch view to in-platform related stuff
action!( get_widget!(self.builder, libhandy::ActionRow, as_system_row);
actions, as_system_row.connect_activated(clone!(@strong self.builder as builder => move |_| {
"use-as-system", get_widget!(builder, gtk::Stack, headerbar_stack);
clone!(@strong self.builder as builder => move |_, _| { get_widget!(builder, gtk::Stack, main_stack);
get_widget!(builder, gtk::Stack, headerbar_stack); main_stack.set_visible_child_name("in-platform");
get_widget!(builder, gtk::Stack, main_stack); headerbar_stack.set_visible_child_name("in-platform");
main_stack.set_visible_child_name("in-platform"); }));
headerbar_stack.set_visible_child_name("in-platform");
})
);
// Save GResource sample // Save GResource sample
action!( action!(
actions, actions,
......
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