diff options
author | Jamie Murphy <hello@itsjamie.dev> | 2022-12-04 18:32:10 -0800 |
---|---|---|
committer | Jamie Murphy <hello@itsjamie.dev> | 2022-12-10 17:09:14 -0800 |
commit | 7e3ceb414e53fe4ce1f5402c9633cdcd8e1af709 (patch) | |
tree | c700f7ef013e633f771efdd15e5f044644551f80 | |
parent | 4d33279b33dc251f9a31a3fd19e400942e16d366 (diff) | |
download | gnome-todo-7e3ceb414e53fe4ce1f5402c9633cdcd8e1af709.tar.gz |
omni-area: Remove Omni Area
While the concept of the omni-area was good, the current implementation
caused a lot of bugs, and there was a lot of messages that appeared at
wrong times. I'd rather restructure the app to provide a better way to
edit these messages then try and hack around flaws.
27 files changed, 8 insertions, 1177 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in index 5525763b..b3ee9770 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -8,7 +8,6 @@ src/gui/gtd-edit-pane.ui src/gui/gtd-initial-setup-window.ui src/gui/gtd-new-task-row.c src/gui/gtd-new-task-row.ui -src/gui/gtd-omni-area.ui src/gui/gtd-provider-popover.c src/gui/gtd-provider-popover.ui src/gui/gtd-provider-row.ui @@ -29,7 +28,6 @@ src/plugins/eds/gtd-provider-local.c src/plugins/eds/gtd-task-list-eds.c src/plugins/inbox-panel/gtd-inbox-panel.c src/plugins/next-week-panel/gtd-next-week-panel.c -src/plugins/peace/gtd-peace-omni-area-addin.c src/plugins/scheduled-panel/gtd-panel-scheduled.c src/plugins/task-lists-workspace/gtd-sidebar.c src/plugins/task-lists-workspace/gtd-sidebar-provider-row.ui @@ -39,4 +37,3 @@ src/plugins/task-lists-workspace/gtd-task-list-panel.ui src/plugins/task-lists-workspace/gtd-task-lists-workspace.c src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui src/plugins/today-panel/gtd-panel-today.c -src/plugins/today-panel/gtd-today-omni-area-addin.c diff --git a/src/core/gtd-plugin-manager.c b/src/core/gtd-plugin-manager.c index e1599164..f0d1fab9 100644 --- a/src/core/gtd-plugin-manager.c +++ b/src/core/gtd-plugin-manager.c @@ -51,7 +51,6 @@ static const gchar * const default_plugins[] = { "today-panel", "inbox-panel", "next-week-panel", - "peace", }; static gboolean diff --git a/src/endeavour.h b/src/endeavour.h index aa93aa96..326756e4 100644 --- a/src/endeavour.h +++ b/src/endeavour.h @@ -23,6 +23,9 @@ #include "gtd-enum-types.h" +/* THIS FILE MUST BE INCLUDED FIRST, OTHERWISE THE WHOLE APP BREAKS */ +#include "gtd-widget.h" + #include "gtd-activatable.h" #include "gtd-bin-layout.h" #include "gtd-easing.h" @@ -35,8 +38,6 @@ #include "gtd-menu-button.h" #include "gtd-notification.h" #include "gtd-object.h" -#include "gtd-omni-area.h" -#include "gtd-omni-area-addin.h" #include "gtd-panel.h" #include "gtd-property-transition.h" #include "gtd-provider.h" @@ -49,8 +50,8 @@ #include "gtd-transition.h" #include "gtd-types.h" #include "gtd-utils.h" -#include "gtd-widget.h" #include "gtd-window.h" #include "gtd-workspace.h" #endif /* ENDEAVOUR_H */ + diff --git a/src/gtd-types.h b/src/gtd-types.h index a240cc9f..1f09d285 100644 --- a/src/gtd-types.h +++ b/src/gtd-types.h @@ -35,7 +35,6 @@ typedef struct _GtdManager GtdManager; typedef struct _GtdMarkdownRenderer GtdMarkdownRenderer; typedef struct _GtdNotification GtdNotification; typedef struct _GtdObject GtdObject; -typedef struct _GtdOmniArea GtdOmniArea; typedef struct _GtdPanel GtdPanel; typedef struct _GtdPluginManager GtdPluginManager; typedef struct _GtdProvider GtdProvider; @@ -55,3 +54,4 @@ typedef struct _GtdWorkspace GtdWorkspace; G_END_DECLS #endif /* GTD_TYPES_H */ + diff --git a/src/gui/gtd-omni-area-addin.c b/src/gui/gtd-omni-area-addin.c deleted file mode 100644 index 3ceec501..00000000 --- a/src/gui/gtd-omni-area-addin.c +++ /dev/null @@ -1,69 +0,0 @@ -/* gtd-omni-area-addin.c - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#include "gtd-omni-area-addin.h" - -#include "gtd-omni-area.h" - -G_DEFINE_INTERFACE (GtdOmniAreaAddin, gtd_omni_area_addin, G_TYPE_OBJECT) - -static void -gtd_omni_area_addin_default_init (GtdOmniAreaAddinInterface *iface) -{ -} - -/** - * gtd_omni_area_addin_load: - * @self: an #GtdOmniAreaAddin - * @omni_bar: an #GtdOmniArea - * - * Requests that the #GtdOmniAreaAddin initialize, possibly modifying - * @omni_bar as necessary. - */ -void -gtd_omni_area_addin_load (GtdOmniAreaAddin *self, - GtdOmniArea *omni_bar) -{ - g_return_if_fail (GTD_IS_OMNI_AREA_ADDIN (self)); - g_return_if_fail (GTD_IS_OMNI_AREA (omni_bar)); - - if (GTD_OMNI_AREA_ADDIN_GET_IFACE (self)->load) - GTD_OMNI_AREA_ADDIN_GET_IFACE (self)->load (self, omni_bar); -} - -/** - * gtd_omni_area_addin_unload: - * @self: an #GtdOmniAreaAddin - * @omni_bar: an #GtdOmniArea - * - * Requests that the #GtdOmniAreaAddin shutdown, possibly modifying - * @omni_bar as necessary to return it to the original state before - * the addin was loaded. - */ -void -gtd_omni_area_addin_unload (GtdOmniAreaAddin *self, - GtdOmniArea *omni_bar) -{ - g_return_if_fail (GTD_IS_OMNI_AREA_ADDIN (self)); - g_return_if_fail (GTD_IS_OMNI_AREA (omni_bar)); - - if (GTD_OMNI_AREA_ADDIN_GET_IFACE (self)->unload) - GTD_OMNI_AREA_ADDIN_GET_IFACE (self)->unload (self, omni_bar); -} diff --git a/src/gui/gtd-omni-area-addin.h b/src/gui/gtd-omni-area-addin.h deleted file mode 100644 index 28e3bd93..00000000 --- a/src/gui/gtd-omni-area-addin.h +++ /dev/null @@ -1,49 +0,0 @@ -/* gtd-omni-area-addin.h - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#pragma once - -#include <glib-object.h> - -#include "gtd-types.h" - -G_BEGIN_DECLS - -#define GTD_TYPE_OMNI_AREA_ADDIN (gtd_omni_area_addin_get_type ()) -G_DECLARE_INTERFACE (GtdOmniAreaAddin, gtd_omni_area_addin, GTD, OMNI_AREA_ADDIN, GObject) - -struct _GtdOmniAreaAddinInterface -{ - GTypeInterface parent; - - void (*load) (GtdOmniAreaAddin *self, - GtdOmniArea *omni_bar); - - void (*unload) (GtdOmniAreaAddin *self, - GtdOmniArea *omni_bar); -}; - -void gtd_omni_area_addin_load (GtdOmniAreaAddin *self, - GtdOmniArea *omni_bar); - -void gtd_omni_area_addin_unload (GtdOmniAreaAddin *self, - GtdOmniArea *omni_bar); - -G_END_DECLS diff --git a/src/gui/gtd-omni-area.c b/src/gui/gtd-omni-area.c deleted file mode 100644 index 828f36c0..00000000 --- a/src/gui/gtd-omni-area.c +++ /dev/null @@ -1,256 +0,0 @@ -/* gtd-omni-area.c - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#define G_LOG_DOMAIN "GtdOmniArea" - -#include "gtd-omni-area.h" - -#include "gtd-debug.h" -#include "gtd-max-size-layout.h" -#include "gtd-omni-area-addin.h" - -#include <libpeas/peas.h> - -struct _GtdOmniArea -{ - GtdWidget parent; - - GtkStack *main_stack; - GtkStack *status_stack; - - PeasExtensionSet *addins; - - GQueue *messages; - guint current; - - guint switch_messages_timeout_id; -}; - -G_DEFINE_TYPE (GtdOmniArea, gtd_omni_area, GTD_TYPE_WIDGET) - - -/* - * Auxiliary methods - */ - -static void -show_message (GtdOmniArea *self, - guint message_index) -{ - const gchar *message_id; - - message_id = g_queue_peek_nth (self->messages, message_index); - - gtk_stack_set_visible_child_name (self->status_stack, message_id); - self->current = message_index; -} - - - -/* - * Callbacks - */ - -static gboolean -switch_message_cb (gpointer user_data) -{ - GtdOmniArea *self = GTD_OMNI_AREA (user_data); - gint next_message_index; - guint n_messages; - - n_messages = g_queue_get_length (self->messages); - gtk_stack_set_visible_child_name (self->main_stack, n_messages > 0 ? "messages" : "placeholder"); - - next_message_index = (self->current + 1) % n_messages; - show_message (self, next_message_index); - - return G_SOURCE_CONTINUE; -} - -static void -on_omni_area_addin_added_cb (PeasExtensionSet *extension_set, - PeasPluginInfo *plugin_info, - GtdOmniAreaAddin *addin, - GtdOmniArea *self) -{ - gtd_omni_area_addin_load (addin, self); -} - -static void -on_omni_area_addin_removed_cb (PeasExtensionSet *extension_set, - PeasPluginInfo *plugin_info, - GtdOmniAreaAddin *addin, - GtdOmniArea *self) -{ - gtd_omni_area_addin_unload (addin, self); -} - - -/* - * GObject overrides - */ - -static void -gtd_omni_area_dispose (GObject *object) -{ - GtdOmniArea *self = GTD_OMNI_AREA (object); - - g_clear_object (&self->addins); - - G_OBJECT_CLASS (gtd_omni_area_parent_class)->dispose (object); -} - -static void -gtd_omni_area_finalize (GObject *object) -{ - GtdOmniArea *self = (GtdOmniArea *)object; - - g_clear_handle_id (&self->switch_messages_timeout_id, g_source_remove); - g_queue_free_full (self->messages, g_free); - - G_OBJECT_CLASS (gtd_omni_area_parent_class)->finalize (object); -} - -static void -gtd_omni_area_class_init (GtdOmniAreaClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - - object_class->dispose = gtd_omni_area_dispose; - object_class->finalize = gtd_omni_area_finalize; - - g_type_ensure (GTD_TYPE_MAX_SIZE_LAYOUT); - - gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/todo/ui/gtd-omni-area.ui"); - - gtk_widget_class_bind_template_child (widget_class, GtdOmniArea, main_stack); - gtk_widget_class_bind_template_child (widget_class, GtdOmniArea, status_stack); - - gtk_widget_class_set_css_name (widget_class, "omniarea"); -} - -static void -gtd_omni_area_init (GtdOmniArea *self) -{ - gtk_widget_init_template (GTK_WIDGET (self)); - - self->messages = g_queue_new (); - self->addins = peas_extension_set_new (peas_engine_get_default (), - GTD_TYPE_OMNI_AREA_ADDIN, - NULL); - - peas_extension_set_foreach (self->addins, - (PeasExtensionSetForeachFunc) on_omni_area_addin_added_cb, - self); - - g_signal_connect (self->addins, "extension-added", G_CALLBACK (on_omni_area_addin_added_cb), self); - g_signal_connect (self->addins, "extension-removed", G_CALLBACK (on_omni_area_addin_removed_cb), self); -} - -/** - * gtd_omni_area_push_message: - * @self: a #GtdOmniArea - * @id: an identifier for this notification - * @text: user visible text of the notification - * @icon: (nullable): a #GIcon - * - * Pushes a new message to @self. - * - */ -void -gtd_omni_area_push_message (GtdOmniArea *self, - const gchar *id, - const gchar *text, - GIcon *icon) -{ - GtkWidget *label; - GtkWidget *box; - - g_return_if_fail (GTD_IS_OMNI_AREA (self)); - g_return_if_fail (id != NULL); - g_return_if_fail (text != NULL); - - GTD_ENTRY; - - box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 18); - - label = gtk_label_new (text); - gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); - gtk_label_set_xalign (GTK_LABEL (label), 0.0); - gtk_box_append (GTK_BOX (box), label); - - if (icon) - { - GtkWidget *image = gtk_image_new_from_gicon (icon); - - gtk_widget_add_css_class (image, "dim-label"); - gtk_box_append (GTK_BOX (box), image); - } - - gtk_stack_add_named (self->status_stack, box, id); - - g_debug ("Adding message '%s' to Omni Area", id); - - g_queue_push_tail (self->messages, g_strdup (id)); - show_message (self, g_queue_get_length (self->messages) - 1); - - g_clear_handle_id (&self->switch_messages_timeout_id, g_source_remove); - self->switch_messages_timeout_id = g_timeout_add (7500, switch_message_cb, self); - - GTD_EXIT; -} - -/** - * gtd_omni_area_withdraw_message: - * @self: a #GtdOmniArea - * @id: an identifier for this notification - * - * Withdraws a message from @self. If a message with @id doesn't - * exist, nothing happens. - */ -void -gtd_omni_area_withdraw_message (GtdOmniArea *self, - const gchar *id) -{ - GtkWidget *widget; - GList *l; - - g_return_if_fail (GTD_IS_OMNI_AREA (self)); - g_return_if_fail (id != NULL); - - GTD_ENTRY; - - widget = gtk_stack_get_child_by_name (self->status_stack, id); - if (!widget) - return; - - g_debug ("Removing message '%s' from Omni Area", id); - - gtk_stack_remove (self->status_stack, widget); - - l = g_queue_find_custom (self->messages, id, (GCompareFunc) g_strcmp0); - g_queue_delete_link (self->messages, l); - - if (g_queue_get_length (self->messages) == 0) - gtk_stack_set_visible_child_name (self->main_stack, "placeholder"); - - GTD_EXIT; -} diff --git a/src/gui/gtd-omni-area.h b/src/gui/gtd-omni-area.h deleted file mode 100644 index 9d49c388..00000000 --- a/src/gui/gtd-omni-area.h +++ /dev/null @@ -1,41 +0,0 @@ -/* gtd-omni-area.h - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#pragma once - -#include <gtk/gtk.h> -#include <glib-object.h> - -#include "gtd-widget.h" - -G_BEGIN_DECLS - -#define GTD_TYPE_OMNI_AREA (gtd_omni_area_get_type()) -G_DECLARE_FINAL_TYPE (GtdOmniArea, gtd_omni_area, GTD, OMNI_AREA, GtdWidget) - -void gtd_omni_area_push_message (GtdOmniArea *self, - const gchar *id, - const gchar *text, - GIcon *icon); - -void gtd_omni_area_withdraw_message (GtdOmniArea *self, - const gchar *id); - -G_END_DECLS diff --git a/src/gui/gtd-omni-area.ui b/src/gui/gtd-omni-area.ui deleted file mode 100644 index b04b918f..00000000 --- a/src/gui/gtd-omni-area.ui +++ /dev/null @@ -1,85 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<interface> - <template class="GtdOmniArea" parent="GtdWidget"> - <property name="layout-manager"> - <object class="GtkBinLayout" /> - </property> - <child> - <object class="GtkCenterBox"> - - <child type="start"> - <object class="GtkBox" id="start_box"> - <property name="margin-end">12</property> - </object> - </child> - - <child type="center"> - <object class="GtkFrame"> - <property name="css-name"></property> - <property name="layout-manager"> - <object class="GtdMaxSizeLayout"> - <property name="width-chars">25</property> - <property name="max-width-chars">40</property> - </object> - </property> - - <child> - <object class="GtkBox"> - <property name="hexpand">true</property> - <property name="halign">center</property> - - <child> - <object class="GtkStack" id="main_stack"> - <property name="margin-start">6</property> - <property name="margin-end">6</property> - <property name="hhomogeneous">true</property> - <property name="transition-type">slide-up-down</property> - <property name="transition-duration">500</property> - - <child> - <object class="GtkStackPage"> - <property name="name">placeholder</property> - <property name="child"> - <object class="AdwWindowTitle"> - <property name="title" translatable="yes">Endeavour</property> - </object> - </property> - </object> - </child> - - <child> - <object class="GtkStackPage"> - <property name="name">messages</property> - <property name="child"> - <object class="GtkStack" id="status_stack"> - <property name="margin-start">6</property> - <property name="margin-end">6</property> - <property name="hhomogeneous">true</property> - <property name="transition-type">slide-up-down</property> - <property name="transition-duration">500</property> - </object> - </property> - </object> - </child> - - </object> - </child> - - - </object> - </child> - - </object> - </child> - - <child type="end"> - <object class="GtkBox" id="end_box"> - <property name="margin-start">12</property> - </object> - </child> - - </object> - </child> - - </template> -</interface> diff --git a/src/gui/gtd-window.c b/src/gui/gtd-window.c index 029280cc..85653a8f 100644 --- a/src/gui/gtd-window.c +++ b/src/gui/gtd-window.c @@ -28,7 +28,6 @@ #include "gtd-manager-protected.h" #include "gtd-menu-button.h" #include "gtd-notification.h" -#include "gtd-omni-area.h" #include "gtd-plugin-manager.h" #include "gtd-provider.h" #include "gtd-panel.h" @@ -358,7 +357,6 @@ gtd_window_class_init (GtdWindowClass *klass) g_object_class_install_properties (object_class, N_PROPS, properties); g_type_ensure (GTD_TYPE_MENU_BUTTON); - g_type_ensure (GTD_TYPE_OMNI_AREA); gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/todo/ui/gtd-window.ui"); diff --git a/src/gui/gui.gresource.xml b/src/gui/gui.gresource.xml index 746902c5..4b2808c6 100644 --- a/src/gui/gui.gresource.xml +++ b/src/gui/gui.gresource.xml @@ -4,7 +4,6 @@ <file compressed="true" preprocess="xml-stripblanks">gtd-edit-pane.ui</file> <file compressed="true" preprocess="xml-stripblanks">gtd-initial-setup-window.ui</file> <file compressed="true" preprocess="xml-stripblanks">gtd-new-task-row.ui</file> - <file compressed="true" preprocess="xml-stripblanks">gtd-omni-area.ui</file> <file compressed="true" preprocess="xml-stripblanks">gtd-provider-popover.ui</file> <file compressed="true" preprocess="xml-stripblanks">gtd-provider-row.ui</file> <file compressed="true" preprocess="xml-stripblanks">gtd-provider-selector.ui</file> diff --git a/src/meson.build b/src/meson.build index 57119c6c..08973cfc 100644 --- a/src/meson.build +++ b/src/meson.build @@ -84,8 +84,6 @@ headers = files( 'gui/gtd-bin-layout.h', 'gui/gtd-max-size-layout.h', 'gui/gtd-menu-button.h', - 'gui/gtd-omni-area.h', - 'gui/gtd-omni-area-addin.h', 'gui/gtd-panel.h', 'gui/gtd-provider-popover.h', 'gui/gtd-star-widget.h', @@ -144,8 +142,6 @@ sources += files( 'gui/gtd-application.c', 'gui/gtd-initial-setup-window.c', 'gui/gtd-max-size-layout.c', - 'gui/gtd-omni-area.c', - 'gui/gtd-omni-area-addin.c', 'gui/gtd-widget.c', 'gui/gtd-window.c', 'models/gtd-list-model-filter.c', @@ -286,10 +282,6 @@ if get_option('introspection') 'gui/gtd-max-size-layout.h', 'gui/gtd-menu-button.c', 'gui/gtd-menu-button.h', - 'gui/gtd-omni-area.c', - 'gui/gtd-omni-area.h', - 'gui/gtd-omni-area-addin.c', - 'gui/gtd-omni-area-addin.h', 'gui/gtd-panel.c', 'gui/gtd-panel.h', 'gui/gtd-provider-popover.c', diff --git a/src/plugins/meson.build b/src/plugins/meson.build index 01b37a2a..01c1ea5b 100644 --- a/src/plugins/meson.build +++ b/src/plugins/meson.build @@ -17,7 +17,6 @@ subdir('all-tasks-panel') subdir('eds') subdir('inbox-panel') subdir('next-week-panel') -subdir('peace') subdir('scheduled-panel') subdir('task-lists-workspace') subdir('today-panel') diff --git a/src/plugins/peace/gtd-peace-omni-area-addin.c b/src/plugins/peace/gtd-peace-omni-area-addin.c deleted file mode 100644 index 77c4e253..00000000 --- a/src/plugins/peace/gtd-peace-omni-area-addin.c +++ /dev/null @@ -1,209 +0,0 @@ -/* gtd-peace-omni-area-addin.c - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#include "gtd-peace-omni-area-addin.h" - -#include "config.h" - -#include <glib/gi18n.h> - -#define MESSAGE_ID "peace-message-id" - -#define SWITCH_MESSAGE_TIMEOUT 20 * 60 -#define REMOVE_MESSAGE_TIMEOUT 1 * 60 - -struct _GtdPeaceOmniAreaAddin -{ - GObject parent; - - GtdOmniArea *omni_area; - - guint timeout_id; -}; - -static gboolean switch_message_cb (gpointer user_data); - -static void gtd_omni_area_addin_iface_init (GtdOmniAreaAddinInterface *iface); - -G_DEFINE_TYPE_WITH_CODE (GtdPeaceOmniAreaAddin, gtd_peace_omni_area_addin, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (GTD_TYPE_OMNI_AREA_ADDIN, gtd_omni_area_addin_iface_init)) - -typedef struct -{ - const gchar *text; - const gchar *icon_name; -} str_pair; - -const str_pair mindful_questions[] = -{ - { N_("Did you drink some water today?"), NULL }, - { N_("What are your goals for today?"), NULL }, - { N_("Can you let your creativity flow?"), NULL }, - { N_("How are you feeling right now?"), NULL }, - { N_("At what point is it good enough?"), NULL }, -}; - -const str_pair reminders[] = -{ - { N_("Remember to breathe. Good. Don't stop."), NULL }, - { N_("Don't forget to drink some water"), NULL }, - { N_("Remember to take some time off"), NULL }, - { N_("Eat fruits if you can 🍐️"), NULL }, - { N_("Take care of yourself"), NULL }, - { N_("Remember to have some fun"), NULL }, - { N_("You're doing great"), NULL }, -}; - -const str_pair inspiring_quotes[] = -{ - { N_("Smile, breathe and go slowly"), NULL }, - { N_("Wherever you go, there you are"), NULL }, - { N_("Working hard is always rewarded"), NULL }, - { N_("Keep calm"), NULL }, - { N_("You can do it"), NULL }, - { N_("Meanwhile, spread the love ♥️"), NULL }, -}; - - -/* - * Callbacks - */ - -static gboolean -remove_message_cb (gpointer user_data) -{ - GtdPeaceOmniAreaAddin *self = GTD_PEACE_OMNI_AREA_ADDIN (user_data); - gint factor = g_random_int_range (2, 6); - - gtd_omni_area_withdraw_message (self->omni_area, MESSAGE_ID); - - self->timeout_id = g_timeout_add_seconds (SWITCH_MESSAGE_TIMEOUT * factor, switch_message_cb, self); - - return G_SOURCE_REMOVE; -} - -static gboolean -switch_message_cb (gpointer user_data) -{ - GtdPeaceOmniAreaAddin *self; - g_autoptr (GIcon) icon = NULL; - const gchar *message; - const gchar *icon_name; - gint source; - - self = GTD_PEACE_OMNI_AREA_ADDIN (user_data); - source = g_random_int_range (0, 3); - - if (source == 0) - { - gint i = g_random_int_range (0, G_N_ELEMENTS (mindful_questions)); - - message = gettext (mindful_questions[i].text); - icon_name = mindful_questions[i].icon_name; - } - else if (source == 1) - { - gint i = g_random_int_range (0, G_N_ELEMENTS (reminders)); - - message = gettext (reminders[i].text); - icon_name = reminders[i].icon_name; - } - else - { - gint i = g_random_int_range (0, G_N_ELEMENTS (inspiring_quotes)); - - message = gettext (inspiring_quotes[i].text); - icon_name = inspiring_quotes[i].icon_name; - } - - if (icon_name) - icon = g_themed_icon_new (icon_name); - - gtd_omni_area_withdraw_message (self->omni_area, MESSAGE_ID); - gtd_omni_area_push_message (self->omni_area, MESSAGE_ID, message, NULL); - - self->timeout_id = g_timeout_add_seconds (REMOVE_MESSAGE_TIMEOUT, remove_message_cb, self); - - return G_SOURCE_REMOVE; -} - - -/* - * GtdOmniAreaAddin iface - */ - -static void -gtd_today_omni_area_addin_omni_area_addin_load (GtdOmniAreaAddin *addin, - GtdOmniArea *omni_area) -{ - GtdPeaceOmniAreaAddin *self = GTD_PEACE_OMNI_AREA_ADDIN (addin); - - self->omni_area = omni_area; - - g_clear_handle_id (&self->timeout_id, g_source_remove); - self->timeout_id = g_timeout_add_seconds (SWITCH_MESSAGE_TIMEOUT, switch_message_cb, self); -} - -static void -gtd_today_omni_area_addin_omni_area_addin_unload (GtdOmniAreaAddin *addin, - GtdOmniArea *omni_area) -{ - GtdPeaceOmniAreaAddin *self = GTD_PEACE_OMNI_AREA_ADDIN (addin); - - gtd_omni_area_withdraw_message (omni_area, MESSAGE_ID); - - g_clear_handle_id (&self->timeout_id, g_source_remove); - self->omni_area = NULL; -} - -static void -gtd_omni_area_addin_iface_init (GtdOmniAreaAddinInterface *iface) -{ - iface->load = gtd_today_omni_area_addin_omni_area_addin_load; - iface->unload = gtd_today_omni_area_addin_omni_area_addin_unload; -} - - -/* - * GObject overrides - */ - -static void -gtd_peace_omni_area_addin_finalize (GObject *object) -{ - GtdPeaceOmniAreaAddin *self = (GtdPeaceOmniAreaAddin *)object; - - g_clear_handle_id (&self->timeout_id, g_source_remove); - - G_OBJECT_CLASS (gtd_peace_omni_area_addin_parent_class)->finalize (object); -} - -static void -gtd_peace_omni_area_addin_class_init (GtdPeaceOmniAreaAddinClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->finalize = gtd_peace_omni_area_addin_finalize; -} - -static void -gtd_peace_omni_area_addin_init (GtdPeaceOmniAreaAddin *self) -{ -} diff --git a/src/plugins/peace/gtd-peace-omni-area-addin.h b/src/plugins/peace/gtd-peace-omni-area-addin.h deleted file mode 100644 index 8b836536..00000000 --- a/src/plugins/peace/gtd-peace-omni-area-addin.h +++ /dev/null @@ -1,30 +0,0 @@ -/* gtd-peace-omni-area-addin.h - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#pragma once - -#include "endeavour.h" - -G_BEGIN_DECLS - -#define GTD_TYPE_PEACE_OMNI_AREA_ADDIN (gtd_peace_omni_area_addin_get_type()) -G_DECLARE_FINAL_TYPE (GtdPeaceOmniAreaAddin, gtd_peace_omni_area_addin, GTD, PEACE_OMNI_AREA_ADDIN, GObject) - -G_END_DECLS diff --git a/src/plugins/peace/meson.build b/src/plugins/peace/meson.build deleted file mode 100644 index 3cba81b8..00000000 --- a/src/plugins/peace/meson.build +++ /dev/null @@ -1,12 +0,0 @@ -plugins_ldflags += ['-Wl,--undefined=peace_plugin_register_types'] - -plugins_sources += files( - 'gtd-peace-omni-area-addin.c', - 'peace-plugin.c', -) - -plugins_sources += gnome.compile_resources( - 'peace-resources', - 'peace.gresource.xml', - c_name: 'peace_plugin', -) diff --git a/src/plugins/peace/peace-plugin.c b/src/plugins/peace/peace-plugin.c deleted file mode 100644 index 5ece6faa..00000000 --- a/src/plugins/peace/peace-plugin.c +++ /dev/null @@ -1,31 +0,0 @@ -/* zen-plugin.c - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#include <libpeas/peas.h> - -#include "gtd-peace-omni-area-addin.h" - -G_MODULE_EXPORT void -peace_plugin_register_types (PeasObjectModule *module) -{ - peas_object_module_register_extension_type (module, - GTD_TYPE_OMNI_AREA_ADDIN, - GTD_TYPE_PEACE_OMNI_AREA_ADDIN); -} diff --git a/src/plugins/peace/peace.gresource.xml b/src/plugins/peace/peace.gresource.xml deleted file mode 100644 index 13132ed1..00000000 --- a/src/plugins/peace/peace.gresource.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<gresources> - <gresource prefix="/org/gnome/todo/plugins/peace"> - <file>peace.plugin</file> - </gresource> -</gresources> diff --git a/src/plugins/peace/peace.plugin b/src/plugins/peace/peace.plugin deleted file mode 100644 index d7e85ea2..00000000 --- a/src/plugins/peace/peace.plugin +++ /dev/null @@ -1,12 +0,0 @@ -[Plugin] -Name = Peace -Module = peace -Description = Smile, breathe and go slowly -Authors = Georges Basile Stavracas Neto <georges.stavracas@gmail.com> -Copyright = Copyleft © The Endeavour maintainers -Website = https://wiki.gnome.org/Apps/Todo -Builtin = true -License = GPL -Loader = C -Embedded = peace_plugin_register_types -Depends = diff --git a/src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui b/src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui index 7d63d1dc..85b8e8e0 100644 --- a/src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui +++ b/src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui @@ -107,9 +107,10 @@ </object> </child> - <!-- Omni Area --> + <!-- Window Title --> <child type="title"> - <object class="GtdOmniArea" id="omni_area"> + <object class="AdwWindowTitle"> + <property name="title" translatable="yes">Endeavour</property> </object> </child> diff --git a/src/plugins/today-panel/gtd-today-omni-area-addin.c b/src/plugins/today-panel/gtd-today-omni-area-addin.c deleted file mode 100644 index d92979de..00000000 --- a/src/plugins/today-panel/gtd-today-omni-area-addin.c +++ /dev/null @@ -1,304 +0,0 @@ -/* gtd-today-omni-area-addin.c - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#include "gtd-today-omni-area-addin.h" - -#include "endeavour.h" -#include "config.h" - -#include <glib/gi18n.h> - -#define MESSAGE_ID "today-counter-message-id" - -struct _GtdTodayOmniAreaAddin -{ - GObject parent; - - GIcon *icon; - GtkFilterListModel *filter_model; - - GtdOmniArea *omni_area; - guint number_of_tasks; - - gboolean had_tasks; - gboolean finished_tasks; - - guint idle_update_message_timeout_id; -}; - -static void gtd_omni_area_addin_iface_init (GtdOmniAreaAddinInterface *iface); - -G_DEFINE_TYPE_WITH_CODE (GtdTodayOmniAreaAddin, gtd_today_omni_area_addin, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (GTD_TYPE_OMNI_AREA_ADDIN, gtd_omni_area_addin_iface_init)) - -const gchar *end_messages[] = -{ - N_("No more tasks left"), - N_("Nothing else to do here"), - N_("You made it!"), - N_("Looks like there’s nothing else left here") -}; - -static gboolean -can_show_omni_area_message (GtdTodayOmniAreaAddin *self) -{ - GtdWorkspace *current_workspace; - GtdWindow *window; - - window = GTD_WINDOW (gtk_widget_get_root (GTK_WIDGET (self->omni_area))); - current_workspace = gtd_window_get_current_workspace (window); - - if (current_workspace && - g_str_equal (gtd_workspace_get_id (current_workspace), "task-lists")) - { - return TRUE; - } - - return FALSE; -} - -static void -update_omni_area_message (GtdTodayOmniAreaAddin *self) -{ - - g_autofree gchar *message = NULL; - - g_assert (self->omni_area != NULL); - - if (!can_show_omni_area_message (self)) - { - gtd_omni_area_withdraw_message (self->omni_area, MESSAGE_ID); - return; - } - - if (self->number_of_tasks > 0) - { - message = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE, - "%d task for today", - "%d tasks for today", - self->number_of_tasks), - self->number_of_tasks); - } - else - { - if (self->finished_tasks) - { - gint message_index = g_random_int_range (0, G_N_ELEMENTS (end_messages)); - - message = g_strdup (gettext (end_messages[message_index])); - } - else - { - message = g_strdup (_("No tasks scheduled for today")); - } - } - - gtd_omni_area_withdraw_message (self->omni_area, MESSAGE_ID); - gtd_omni_area_push_message (self->omni_area, MESSAGE_ID, message, self->icon); -} - -static gboolean -is_today (GDateTime *today, - GDateTime *dt) -{ - if (!dt) - return FALSE; - - if (g_date_time_get_year (dt) == g_date_time_get_year (today) && - g_date_time_get_day_of_year (dt) == g_date_time_get_day_of_year (today)) - { - return TRUE; - } - - return FALSE; -} - - -/* - * Callbacks - */ - -static gboolean -idle_update_omni_area_message_cb (gpointer user_data) -{ - GtdTodayOmniAreaAddin *self = GTD_TODAY_OMNI_AREA_ADDIN (user_data); - - update_omni_area_message (self); - - self->idle_update_message_timeout_id = 0; - - return G_SOURCE_REMOVE; -} - -static gboolean -filter_func (gpointer item, - gpointer user_data) -{ - g_autoptr (GDateTime) task_dt = NULL; - g_autoptr (GDateTime) now = NULL; - GtdTask *task; - - task = (GtdTask*) item; - - if (gtd_task_get_complete (task)) - return FALSE; - - now = g_date_time_new_now_local (); - task_dt = gtd_task_get_due_date (task); - - return is_today (now, task_dt); -} - -static void -on_clock_day_changed_cb (GtdClock *clock, - GtdTodayOmniAreaAddin *self) -{ - GtkFilter *filter; - - self->had_tasks = FALSE; - self->finished_tasks = FALSE; - - filter = gtk_filter_list_model_get_filter (self->filter_model); - gtk_filter_changed (filter, GTK_FILTER_CHANGE_DIFFERENT); -} - -static void -on_model_items_changed_cb (GListModel *model, - guint position, - guint n_removed, - guint n_added, - GtdTodayOmniAreaAddin *self) -{ - guint number_of_tasks = g_list_model_get_n_items (model); - - if (self->number_of_tasks == number_of_tasks) - return; - - self->number_of_tasks = number_of_tasks; - - if (number_of_tasks != 0) - self->had_tasks = number_of_tasks != 0; - - self->finished_tasks = self->had_tasks && number_of_tasks == 0; - - g_clear_handle_id (&self->idle_update_message_timeout_id, g_source_remove); - self->idle_update_message_timeout_id = g_timeout_add_seconds (2, idle_update_omni_area_message_cb, self); -} - -static void -on_window_current_workspace_changed_cb (GtdWindow *window, - GParamSpec *pspec, - GtdTodayOmniAreaAddin *self) -{ - update_omni_area_message (self); -} - - -/* - * GtdOmniAreaAddin iface - */ - -static void -gtd_today_omni_area_addin_omni_area_addin_load (GtdOmniAreaAddin *addin, - GtdOmniArea *omni_area) -{ - GtdTodayOmniAreaAddin *self; - GtdWindow *window; - - self = GTD_TODAY_OMNI_AREA_ADDIN (addin); - window = GTD_WINDOW (gtk_widget_get_root (GTK_WIDGET (omni_area))); - - g_signal_connect_object (window, - "notify::current-workspace", - G_CALLBACK (on_window_current_workspace_changed_cb), - self, - 0); - - self->omni_area = omni_area; - update_omni_area_message (self); -} - -static void -gtd_today_omni_area_addin_omni_area_addin_unload (GtdOmniAreaAddin *addin, - GtdOmniArea *omni_area) -{ - GtdTodayOmniAreaAddin *self = GTD_TODAY_OMNI_AREA_ADDIN (addin); - - gtd_omni_area_withdraw_message (omni_area, MESSAGE_ID); - self->omni_area = NULL; -} - -static void -gtd_omni_area_addin_iface_init (GtdOmniAreaAddinInterface *iface) -{ - iface->load = gtd_today_omni_area_addin_omni_area_addin_load; - iface->unload = gtd_today_omni_area_addin_omni_area_addin_unload; -} - -/* - * GObject overrides - */ - -static void -gtd_today_omni_area_addin_finalize (GObject *object) -{ - GtdTodayOmniAreaAddin *self = (GtdTodayOmniAreaAddin *)object; - - g_clear_handle_id (&self->idle_update_message_timeout_id, g_source_remove); - g_clear_object (&self->icon); - g_clear_object (&self->filter_model); - - G_OBJECT_CLASS (gtd_today_omni_area_addin_parent_class)->finalize (object); -} - -static void -gtd_today_omni_area_addin_class_init (GtdTodayOmniAreaAddinClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->finalize = gtd_today_omni_area_addin_finalize; -} - -static void -gtd_today_omni_area_addin_init (GtdTodayOmniAreaAddin *self) -{ - GtkCustomFilter *filter; - GtdManager *manager; - - manager = gtd_manager_get_default (); - - self->icon = g_themed_icon_new ("view-tasks-today-symbolic"); - - filter = gtk_custom_filter_new (filter_func, self, NULL); - self->filter_model = gtk_filter_list_model_new (gtd_manager_get_tasks_model (manager), - GTK_FILTER (filter)); - - g_signal_connect_object (self->filter_model, - "items-changed", - G_CALLBACK (on_model_items_changed_cb), - self, - 0); - - g_signal_connect_object (gtd_manager_get_clock (manager), - "day-changed", - G_CALLBACK (on_clock_day_changed_cb), - self, - 0); -} diff --git a/src/plugins/today-panel/gtd-today-omni-area-addin.h b/src/plugins/today-panel/gtd-today-omni-area-addin.h deleted file mode 100644 index e0fc04ae..00000000 --- a/src/plugins/today-panel/gtd-today-omni-area-addin.h +++ /dev/null @@ -1,30 +0,0 @@ -/* gtd-today-omni-area-addin.h - * - * Copyright 2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -#pragma once - -#include <glib-object.h> - -G_BEGIN_DECLS - -#define GTD_TYPE_TODAY_OMNI_AREA_ADDIN (gtd_today_omni_area_addin_get_type()) -G_DECLARE_FINAL_TYPE (GtdTodayOmniAreaAddin, gtd_today_omni_area_addin, GTD, TODAY_OMNI_AREA_ADDIN, GObject) - -G_END_DECLS diff --git a/src/plugins/today-panel/meson.build b/src/plugins/today-panel/meson.build index baf173b7..6a50af37 100644 --- a/src/plugins/today-panel/meson.build +++ b/src/plugins/today-panel/meson.build @@ -2,7 +2,6 @@ plugins_ldflags += ['-Wl,--undefined=today_panel_plugin_register_types'] plugins_sources += files( 'gtd-panel-today.c', - 'gtd-today-omni-area-addin.c', 'today-panel-plugin.c' ) diff --git a/src/plugins/today-panel/today-panel-plugin.c b/src/plugins/today-panel/today-panel-plugin.c index 9dbc6ce5..86e05a6b 100644 --- a/src/plugins/today-panel/today-panel-plugin.c +++ b/src/plugins/today-panel/today-panel-plugin.c @@ -19,7 +19,6 @@ #include <endeavour.h> #include "gtd-panel-today.h" -#include "gtd-today-omni-area-addin.h" G_MODULE_EXPORT void today_panel_plugin_register_types (PeasObjectModule *module) @@ -27,8 +26,4 @@ today_panel_plugin_register_types (PeasObjectModule *module) peas_object_module_register_extension_type (module, GTD_TYPE_PANEL, GTD_TYPE_PANEL_TODAY); - - peas_object_module_register_extension_type (module, - GTD_TYPE_OMNI_AREA_ADDIN, - GTD_TYPE_TODAY_OMNI_AREA_ADDIN); } diff --git a/src/themes/_omniarea.css b/src/themes/_omniarea.css deleted file mode 100644 index 1b575d19..00000000 --- a/src/themes/_omniarea.css +++ /dev/null @@ -1,13 +0,0 @@ -omniarea entry { - background-color: mix(@theme_bg_color, @content_view_bg, 0.25); - color: @theme_fg_color; -} -omniarea:hover entry, -omniarea:active entry { - background-color: @content_view_bg; - color: @theme_fg_color; -} - -omniarea:backdrop entry { - background-color: @theme_bg_color; -} diff --git a/src/themes/style.css b/src/themes/style.css index a9096b3a..e10982d5 100644 --- a/src/themes/style.css +++ b/src/themes/style.css @@ -1,4 +1,3 @@ -@import url("resource:///org/gnome/todo/themes/_omniarea.css"); @import url("resource:///org/gnome/todo/themes/_taskrow.css"); @import url("resource:///org/gnome/todo/themes/_widgets.css"); diff --git a/src/todo.gresource.xml b/src/todo.gresource.xml index e9910f33..00c0283a 100644 --- a/src/todo.gresource.xml +++ b/src/todo.gresource.xml @@ -2,7 +2,6 @@ <gresources> <gresource prefix="/org/gnome/todo"> <file compressed="true" alias="style.css">themes/style.css</file> - <file compressed="true">themes/_omniarea.css</file> <file compressed="true">themes/_taskrow.css</file> <file compressed="true">themes/_widgets.css</file> </gresource> |