[libgd] tagged-entry: Use the entry-tag CSS style class from Adwaita
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd] tagged-entry: Use the entry-tag CSS style class from Adwaita
- Date: Tue, 25 Apr 2017 09:13:47 +0000 (UTC)
commit cc90107531640bcba6c3c58e5cf6aec94d498763
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Apr 7 18:34:08 2017 +0200
tagged-entry: Use the entry-tag CSS style class from Adwaita
The dark and light variants of the CSS for GdTaggedEntryTag were still
scattered across applications and libgd as the photos-entry-tag and
documents-entry-tag style classes. It has been decided to consolidate
all that in Adwaita, like we do for the other libgd style classes, as
the "entry-tag" style class.
https://bugzilla.gnome.org/show_bug.cgi?id=781671
.gitignore | 1 -
Makefile.am | 18 +-----------------
libgd/gd-tagged-entry-default.css | 34 ----------------------------------
libgd/gd-tagged-entry.c | 23 +----------------------
libgd/gd-tagged-entry.gresource.xml | 6 ------
libgd/meson.build | 6 ------
6 files changed, 2 insertions(+), 86 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1cd56b4..ee79f34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,6 @@ Gd-1.0.gir
Gd-1.0.typelib
gd.gresource.xml
gd-resources.*
-gd-tagged-entry-resources.*
test-tagged-entry
Makefile
Makefile.in
diff --git a/Makefile.am b/Makefile.am
index f85a538..22ea01d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -152,29 +152,13 @@ EXTRA_DIST += $(notification_sources)
endif
if LIBGD_TAGGED_ENTRY
-tagged_entry_resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir)/libgd
--generate-dependencies $(srcdir)/libgd/gd-tagged-entry.gresource.xml)
-libgd/gd-tagged-entry-resources.c: libgd/gd-tagged-entry.gresource.xml $(tagged_entry_resource_files)
libgd/gd-tagged-entry-resources.h
- glib-compile-resources --target=$@ --sourcedir=$(srcdir)/libgd --generate-source --c-name
gd_tagged_entry $(srcdir)/libgd/gd-tagged-entry.gresource.xml
-libgd/gd-tagged-entry-resources.h: libgd/gd-tagged-entry.gresource.xml $(tagged_entry_resource_files)
- glib-compile-resources --target=$@ --sourcedir=$(srcdir)/libgd --generate-header --c-name
gd_tagged_entry $(srcdir)/libgd/gd-tagged-entry.gresource.xml
-
tagged_entry_sources = \
- libgd/gd-tagged-entry-resources.c \
- libgd/gd-tagged-entry-resources.h \
libgd/gd-tagged-entry.c \
libgd/gd-tagged-entry.h \
$(NULL)
nodist_libgd_la_SOURCES += $(tagged_entry_sources)
-EXTRA_DIST += \
- $(tagged_entry_sources) \
- libgd/gd-tagged-entry.gresource.xml \
- libgd/gd-tagged-entry-default.css \
- $(NULL)
-CLEANFILES += \
- libgd/gd-tagged-entry-resources.c \
- libgd/gd-tagged-entry-resources.h \
- $(NULL)
+EXTRA_DIST += $(tagged_entry_sources)
noinst_PROGRAMS += test-tagged-entry
test_tagged_entry_SOURCES = \
diff --git a/libgd/gd-tagged-entry.c b/libgd/gd-tagged-entry.c
index 7dd92f4..380962c 100644
--- a/libgd/gd-tagged-entry.c
+++ b/libgd/gd-tagged-entry.c
@@ -23,7 +23,6 @@
#include "gd-tagged-entry.h"
#include <math.h>
-#include <libgd/gd-tagged-entry-resources.h>
#define BUTTON_INTERNAL_SPACING 6
@@ -913,24 +912,6 @@ gd_tagged_entry_set_property (GObject *object,
}
static void
-gd_tagged_entry_add_default_style (void)
-{
- GtkCssProvider *provider;
- GResource *do_not_optimize_away_get_resource G_GNUC_UNUSED;
-
- provider = gtk_css_provider_new ();
- do_not_optimize_away_get_resource = gd_tagged_entry_get_resource ();
- gtk_css_provider_load_from_resource
- (provider, "/org/gnome/libgd/tagged-entry/default.css");
-
- gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
- GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_THEME);
-
- g_object_unref (provider);
-}
-
-static void
gd_tagged_entry_class_init (GdTaggedEntryClass *klass)
{
GtkWidgetClass *wclass = GTK_WIDGET_CLASS (klass);
@@ -976,8 +957,6 @@ gd_tagged_entry_class_init (GdTaggedEntryClass *klass)
"Whether the close button should be shown in tags.", TRUE,
G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
- gd_tagged_entry_add_default_style ();
-
g_type_class_add_private (klass, sizeof (GdTaggedEntryPrivate));
g_object_class_install_properties (oclass, NUM_PROPERTIES, properties);
}
@@ -1077,7 +1056,7 @@ gd_tagged_entry_tag_class_init (GdTaggedEntryTagClass *klass)
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
tag_properties[PROP_TAG_STYLE] =
g_param_spec_string ("style", "Style",
- "Style of the tag.", "documents-entry-tag",
+ "Style of the tag.", "entry-tag",
G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_type_class_add_private (klass, sizeof (GdTaggedEntryTagPrivate));
diff --git a/libgd/meson.build b/libgd/meson.build
index a050b17..abe8985 100644
--- a/libgd/meson.build
+++ b/libgd/meson.build
@@ -105,13 +105,7 @@ if get_option('with-margin-container')
endif
if get_option('with-tagged-entry')
- gdres = gnome.compile_resources(
- 'gd-tagged-entry-resources',
- 'gd-tagged-entry.gresource.xml'
- )
- built_sources += gdres[1]
sources += [
- gdres,
'gd-tagged-entry.c',
'gd-tagged-entry.h',
]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]