mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-06-18 11:56:55 +00:00
UI: disable preset preview MenuButton
This also incudes removing some leftover code that was used for this MenuButton. Fixes #670
This commit is contained in:
parent
8df722ef1a
commit
caacb24fae
|
@ -30,11 +30,12 @@ template GradienceMainWindow : Adw.ApplicationWindow {
|
|||
tooltip-text: _("Apply Preset");
|
||||
action-name: "app.apply_color_scheme";
|
||||
}
|
||||
|
||||
[start]
|
||||
Gtk.MenuButton {
|
||||
Button {
|
||||
icon-name: "applications-science-symbolic";
|
||||
menu-model: preview-menu;
|
||||
tooltip-text: _("Preview Theme in…");
|
||||
tooltip-text: _("Show Preview Window");
|
||||
visible: false;
|
||||
}
|
||||
|
||||
[title]
|
||||
|
@ -143,25 +144,6 @@ menu main-menu {
|
|||
}
|
||||
}
|
||||
|
||||
menu preview-menu {
|
||||
section {
|
||||
item {
|
||||
label: _("Adwaita Demo");
|
||||
action: "app.show_adwaita_demo";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("GTK 4 Demo");
|
||||
action: "app.show_gtk4_demo";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("GTK 4 Widget Factory");
|
||||
action: "app.show_gtk4_widget_factory";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
menu presets-menu {
|
||||
section {
|
||||
label: _("Built-In Presets");
|
||||
|
|
|
@ -127,15 +127,6 @@ class GradienceApplication(Adw.Application):
|
|||
self.actions.create_action("apply_color_scheme",
|
||||
self.show_apply_color_scheme_dialog)
|
||||
|
||||
self.actions.create_action("show_adwaita_demo",
|
||||
self.show_adwaita_demo)
|
||||
|
||||
self.actions.create_action("show_gtk4_widget_factory",
|
||||
self.show_gtk4_widget_factory)
|
||||
|
||||
self.actions.create_action("show_gtk4_demo",
|
||||
self.show_gtk4_demo)
|
||||
|
||||
self.actions.create_action("restore_color_scheme",
|
||||
self.show_restore_color_scheme_dialog)
|
||||
|
||||
|
@ -719,33 +710,6 @@ class GradienceApplication(Adw.Application):
|
|||
self.props.active_window.update_errors(
|
||||
self.global_errors + plugins_errors)
|
||||
|
||||
@staticmethod
|
||||
def show_adwaita_demo(*_args):
|
||||
try:
|
||||
GLib.spawn_command_line_async(
|
||||
"/bin/adwaita-1-demo > /dev/null 2>&1"
|
||||
)
|
||||
except GLib.GError as e:
|
||||
logging.error("An error occurred while trying to execute external program.", exc=e)
|
||||
|
||||
@staticmethod
|
||||
def show_gtk4_demo(*_args):
|
||||
try:
|
||||
GLib.spawn_command_line_async(
|
||||
"/bin/gtk4-demo > /dev/null 2>&1"
|
||||
)
|
||||
except GLib.GError as e:
|
||||
logging.error("An error occurred while trying to execute external program.", exc=e)
|
||||
|
||||
@staticmethod
|
||||
def show_gtk4_widget_factory(*_args):
|
||||
try:
|
||||
GLib.spawn_command_line_async(
|
||||
"/bin/gtk4-widget-factory > /dev/null 2>&1"
|
||||
)
|
||||
except GLib.GError as e:
|
||||
logging.error("An error occurred while trying to execute external program.", exc=e)
|
||||
|
||||
|
||||
def main():
|
||||
"""The application's entry point."""
|
||||
|
|
Loading…
Reference in a new issue