Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Update UI definitions to Blueprint 0.8.0 syntax (#807)
Browse files Browse the repository at this point in the history
Updates Blueprint UI definitions to 0.8.0 syntax, to get rid off those deprecation warnings.
  • Loading branch information
tfuxu authored Aug 16, 2023
2 parents 2751d85 + 0028a15 commit 7d2c082
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion build-aux/flatpak/com.github.GradienceTeam.Gradience.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
{
"type" : "git",
"url" : "https://gitlab.gnome.org/jwestman/blueprint-compiler.git",
"tag" : "v0.8.1"
"tag" : "v0.10.0"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion data/ui/app_type_dialog.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceAppTypeDialog : Adw.MessageDialog {
template $GradienceAppTypeDialog : Adw.MessageDialog {
[extra-child]
Box {
orientation: vertical;
Expand Down
4 changes: 2 additions & 2 deletions data/ui/builtin_preset_row.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceBuiltinPresetRow : Adw.ActionRow {
template $GradienceBuiltinPresetRow : Adw.ActionRow {
subtitle: _("Made by @GradienceTeam");
activatable-widget: apply_button;

Expand All @@ -10,7 +10,7 @@ template GradienceBuiltinPresetRow : Adw.ActionRow {
valign: center;
icon-name: "checkmark-large-symbolic";
tooltip-text: _("Apply Preset");
clicked => on_apply_button_clicked();
clicked => $on_apply_button_clicked();
styles [
"flat",
]
Expand Down
6 changes: 3 additions & 3 deletions data/ui/custom_css_group.blp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using Gtk 4.0;
using Adw 1;

template GradienceCustomCSSGroup : Adw.PreferencesGroup {
template $GradienceCustomCSSGroup : Adw.PreferencesGroup {
title: _("Custom CSS");
description: _("Changing this may break some programs. Libadwaita allows applications to hardcode values like padding and margins, and using custom CSS may cause unintended breakage.");

[header-suffix]
DropDown app_type_dropdown {
valign: start;
model: app_type_list;
notify => on_dropdown_notify();
notify => $on_dropdown_notify();
}

ScrolledWindow {
Expand All @@ -23,7 +23,7 @@ template GradienceCustomCSSGroup : Adw.PreferencesGroup {
bottom-margin: 10;
monospace: true;
buffer: TextBuffer {
changed => on_custom_css_changed();
changed => $on_custom_css_changed();
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion data/ui/error_list_row.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceErrorListRow : ListBoxRow {
template $GradienceErrorListRow : ListBoxRow {
Box {
orientation: vertical;
margin-top: 6;
Expand Down
6 changes: 3 additions & 3 deletions data/ui/explore_preset_row.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceExplorePresetRow : Adw.ActionRow {
template $GradienceExplorePresetRow : Adw.ActionRow {
activatable-widget: apply_button;

Box {
Expand All @@ -21,7 +21,7 @@ template GradienceExplorePresetRow : Adw.ActionRow {
valign: center;
icon-name: "checkmark-large-symbolic";
tooltip-text: _("Download and Apply");
clicked => on_apply_button_clicked();
clicked => $on_apply_button_clicked();

styles [
"flat",
Expand All @@ -32,7 +32,7 @@ template GradienceExplorePresetRow : Adw.ActionRow {
valign: center;
icon-name: "folder-download-symbolic";
tooltip-text: _("Download Only");
clicked => on_download_button_clicked();
clicked => $on_download_button_clicked();

styles [
"flat",
Expand Down
2 changes: 1 addition & 1 deletion data/ui/log_out_dialog.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceLogOutDialog : Adw.MessageDialog {
template $GradienceLogOutDialog : Adw.MessageDialog {
heading: _("Log out"); // TODO: redundant? how can we not repeat ourselves?
body: _("Log out to allow changes to take effect.");
}
6 changes: 3 additions & 3 deletions data/ui/monet_theming_group.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceMonetThemingGroup : Adw.PreferencesGroup {
template $GradienceMonetThemingGroup : Adw.PreferencesGroup {
title: _("Monet Engine");
description: _("Monet Engine generates a Material You color palette from an image.");

Expand All @@ -15,7 +15,7 @@ template GradienceMonetThemingGroup : Adw.PreferencesGroup {
valign: center;
label: _("Apply");
tooltip-text: _("Apply a palette");
clicked => on_apply_button_clicked();
clicked => $on_apply_button_clicked();
styles ["suggested-action"]
}

Expand All @@ -26,7 +26,7 @@ template GradienceMonetThemingGroup : Adw.PreferencesGroup {
[suffix]
Button file-chooser-button {
valign: center;
clicked => on_file_chooser_button_clicked();
clicked => $on_file_chooser_button_clicked();

Adw.ButtonContent {
icon-name: "folder-pictures-symbolic";
Expand Down
2 changes: 1 addition & 1 deletion data/ui/no_plugin_window.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceNoPluginPrefWindow : Adw.PreferencesWindow {
template $GradienceNoPluginPrefWindow : Adw.PreferencesWindow {
title: _("Plugin Preferences");
search-enabled: false;
default-height: 400;
Expand Down
4 changes: 2 additions & 2 deletions data/ui/option_row.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceOptionRow : Adw.ActionRow {
template $GradienceOptionRow : Adw.ActionRow {
activatable-widget: color-value;

[suffix]
Expand Down Expand Up @@ -45,7 +45,7 @@ template GradienceOptionRow : Adw.ActionRow {
tooltip-text: _("Show Hex");
styles ["flat"]

toggled => on_text_value_toggled();
toggled => $on_text_value_toggled();
}
}

Expand Down
2 changes: 1 addition & 1 deletion data/ui/palette_shades.blp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Gtk 4.0;
using Adw 1;

template GradiencePaletteShades : Adw.ActionRow {}
template $GradiencePaletteShades : Adw.ActionRow {}
8 changes: 4 additions & 4 deletions data/ui/plugin_row.blp
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
using Gtk 4.0;
using Adw 1;

template GradiencePluginRow : Adw.ActionRow {
template $GradiencePluginRow : Adw.ActionRow {
activatable-widget: switch;

[suffix]
Switch switch {
valign: center;
tooltip-text: _("Toggle Plugin");
state-set => on_switch_toggled();
state-set => $on_switch_toggled();
}

[suffix]
Button settings-button {
valign: center;
icon-name: "settings-symbolic";
tooltip-text: _("Preferences");
clicked => on_settings_plugin_clicked();
clicked => $on_settings_plugin_clicked();

styles [
"flat",
Expand All @@ -28,6 +28,6 @@ template GradiencePluginRow : Adw.ActionRow {
valign: center;
icon-name: "user-trash-symbolic";
tooltip-text: _("Remove Plugin");
clicked => on_remove_plugin_clicked();
clicked => $on_remove_plugin_clicked();
}
}
4 changes: 2 additions & 2 deletions data/ui/preferences_window.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradiencePreferencesWindow : Adw.PreferencesWindow {
template $GradiencePreferencesWindow : Adw.PreferencesWindow {
title: _("Preferences");
default-height: 400;
default-width: 600;
Expand Down Expand Up @@ -66,7 +66,7 @@ template GradiencePreferencesWindow : Adw.PreferencesWindow {
}
}


// NOTE: This group is disabled as there isn't yet any implementation of custom repositories in Gradience
Adw.PreferencesGroup custom_repository_group {
visible: false;
Expand Down
14 changes: 7 additions & 7 deletions data/ui/preset_row.blp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ using Adw 1;
// }
// }

template GradiencePresetRow : Adw.ExpanderRow {
template $GradiencePresetRow : Adw.ExpanderRow {
[action]
Button star_button {
valign: center;
clicked => on_star_button_clicked();
clicked => $on_star_button_clicked();
styles ["flat"]
}

Expand All @@ -48,13 +48,13 @@ template GradiencePresetRow : Adw.ExpanderRow {
valign: center;
icon-name: "checkmark-large-symbolic";
tooltip-text: _("Apply Preset");
clicked => on_apply_button_clicked();
clicked => $on_apply_button_clicked();
styles ["flat"]
}

Entry name_entry {
text: "Name";
changed => on_name_entry_changed();
changed => $on_name_entry_changed();
}
}

Expand All @@ -63,7 +63,7 @@ template GradiencePresetRow : Adw.ExpanderRow {
valign: center;
icon-name: "document-edit-symbolic";
tooltip-text: _("Rename Preset");
toggled => on_name_entry_toggled();
toggled => $on_name_entry_toggled();
styles ["flat"]
}

Expand Down Expand Up @@ -100,15 +100,15 @@ template GradiencePresetRow : Adw.ExpanderRow {
valign: center;
icon-name: "bug-symbolic";
tooltip-text: _("Report Preset Issue");
clicked => on_report_button_clicked();
clicked => $on_report_button_clicked();
}

[suffix]
Button remove_button {
valign: center;
label: _("Remove preset");
tooltip-text: _("Remove Preset");
clicked => on_remove_button_clicked();
clicked => $on_remove_button_clicked();
styles ["destructive-action"]
}
}
Expand Down
6 changes: 3 additions & 3 deletions data/ui/presets_manager_window.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradiencePresetWindow : Adw.Window {
template $GradiencePresetWindow : Adw.Window {
title: _("Presets");
default-width: 650;
default-height: 500;
Expand Down Expand Up @@ -30,7 +30,7 @@ template GradiencePresetWindow : Adw.Window {
styles ["suggested-action"]
label: _("Import");
tooltip-text: _("Import Preset File");
clicked => on_import_button_clicked();
clicked => $on_import_button_clicked();
}

Button remove_button {
Expand All @@ -53,7 +53,7 @@ template GradiencePresetWindow : Adw.Window {
[end]
Button file_manager_button {
tooltip-text: _("Open in File Manager");
clicked => on_file_manager_button_clicked();
clicked => $on_file_manager_button_clicked();
Adw.ButtonContent {
icon-name: "folder-symbolic";
}
Expand Down
4 changes: 2 additions & 2 deletions data/ui/repo_row.blp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Gtk 4.0;
using Adw 1;

template GradienceRepoRow : Adw.ActionRow {
template $GradienceRepoRow : Adw.ActionRow {
[suffix]
Button remove_button {
valign: center;
icon-name: "user-trash-symbolic";
tooltip-text: _("Remove Preset");
clicked => on_remove_button_clicked();
clicked => $on_remove_button_clicked();
}
}
10 changes: 5 additions & 5 deletions data/ui/reset_preset_group.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceResetPresetGroup : Adw.PreferencesGroup {
template $GradienceResetPresetGroup : Adw.PreferencesGroup {
title: _("Reset and Restore Presets");
description: _("Reset a currently applied preset or restore the previous one.");

Expand All @@ -12,15 +12,15 @@ template GradienceResetPresetGroup : Adw.PreferencesGroup {
valign: center;
icon-name: "edit-undo-symbolic";
tooltip-text: _("Restore Previous Preset");
clicked => on_libadw_restore_button_clicked();
clicked => $on_libadw_restore_button_clicked();
styles ["flat"]
}

Button reset_libadw_button {
valign: center;
label: _("Reset");
tooltip-text: _("Reset Applied Preset");
clicked => on_libadw_reset_button_clicked();
clicked => $on_libadw_reset_button_clicked();
styles ["destructive-action"]
}
}
Expand All @@ -32,15 +32,15 @@ template GradienceResetPresetGroup : Adw.PreferencesGroup {
valign: center;
icon-name: "edit-undo-symbolic";
tooltip-text: _("Restore Previous Preset");
clicked => on_gtk3_restore_button_clicked();
clicked => $on_gtk3_restore_button_clicked();
styles ["flat"]
}

Button reset_gtk3_button {
valign: center;
label: _("Reset");
tooltip-text: _("Reset Applied Preset");
clicked => on_gtk3_reset_button_clicked();
clicked => $on_gtk3_reset_button_clicked();
styles ["destructive-action"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion data/ui/save_dialog.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceSaveDialog : Adw.MessageDialog {
template $GradienceSaveDialog : Adw.MessageDialog {
heading: _("Save preset as…");
body-use-markup: true;

Expand Down
2 changes: 1 addition & 1 deletion data/ui/share_window.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceShareWindow: Adw.Window {
template $GradienceShareWindow: Adw.Window {
title: _("Share Preset");
resizable: true;
deletable: true;
Expand Down
2 changes: 1 addition & 1 deletion data/ui/shell_prefs_window.blp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceShellPrefsWindow : Adw.PreferencesWindow {
template $GradienceShellPrefsWindow : Adw.PreferencesWindow {
title: _("Shell Engine Preferences");
search-enabled: false;
default-height: 620;
Expand Down
Loading

0 comments on commit 7d2c082

Please sign in to comment.