[gnome-todo] all-tasks-panel: Don't load non existant CSS
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] all-tasks-panel: Don't load non existant CSS
- Date: Sun, 31 Mar 2019 13:05:52 +0000 (UTC)
commit 5f85dfc1e279f0ed5cff016bf190166e27c4752b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Mar 30 21:24:01 2019 -0300
all-tasks-panel: Don't load non existant CSS
Avoids a warning.
.../all-tasks-panel/gtd-plugin-all-tasks-panel.c | 22 ----------------------
1 file changed, 22 deletions(-)
---
diff --git a/plugins/all-tasks-panel/gtd-plugin-all-tasks-panel.c
b/plugins/all-tasks-panel/gtd-plugin-all-tasks-panel.c
index 4f49579..760b926 100644
--- a/plugins/all-tasks-panel/gtd-plugin-all-tasks-panel.c
+++ b/plugins/all-tasks-panel/gtd-plugin-all-tasks-panel.c
@@ -33,7 +33,6 @@ struct _GtdPluginAllTasksPanel
PeasExtensionBase parent;
GList *panels;
- GtkCssProvider *css_provider;
};
static void gtd_activatable_iface_init (GtdActivatableInterface *iface);
@@ -141,27 +140,6 @@ gtd_plugin_all_tasks_panel_class_init (GtdPluginAllTasksPanelClass *klass)
static void
gtd_plugin_all_tasks_panel_init (GtdPluginAllTasksPanel *self)
{
- g_autoptr (GSettings) settings = NULL;
- g_autoptr (GFile) css_file = NULL;
- g_autofree gchar *theme_name = NULL;
- g_autofree gchar *theme_uri = NULL;
-
- /* Load CSS provider */
- settings = g_settings_new ("org.gnome.desktop.interface");
- theme_name = g_settings_get_string (settings, "gtk-theme");
- theme_uri = g_build_filename ("resource:///org/gnome/todo/theme/all-tasks-panel", theme_name, ".css",
NULL);
- css_file = g_file_new_for_uri (theme_uri);
-
- self->css_provider = gtk_css_provider_new ();
- gtk_style_context_add_provider_for_display (gdk_display_get_default (),
- GTK_STYLE_PROVIDER (self->css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-
- if (g_file_query_exists (css_file, NULL))
- gtk_css_provider_load_from_file (self->css_provider, css_file);
- else
- gtk_css_provider_load_from_resource (self->css_provider,
"/org/gnome/todo/theme/all-tasks-panel/Adwaita.css");
-
/* And then the panel */
self->panels = g_list_append (NULL, gtd_all_tasks_panel_new ());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]