summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-12-29 16:37:40 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-12-29 16:37:40 (GMT)
commit8d4ec01c81c7f4ccad89ed53d2f34acabec4f595 (patch)
tree7d9072d8086b8a8dbf1cbf5dc18ab489db0ea0af /src
parente819784e1a9f2d997f5908af4c1c17962f96fc7c (diff)
Killed the last uses of the deprecated gtk_widget_override_color() function.
Diffstat (limited to 'src')
-rw-r--r--src/gui/panels/regedit.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/panels/regedit.c b/src/gui/panels/regedit.c
index 0975c9e..bc19009 100644
--- a/src/gui/panels/regedit.c
+++ b/src/gui/panels/regedit.c
@@ -817,8 +817,8 @@ static void on_param_value_edited(GtkCellRendererText *renderer, gchar *path, gc
static void on_param_search_changed(GtkSearchEntry *entry, GRegeditPanel *panel)
{
const gchar *text; /* Texte de l'utilisateur */
+ GtkStyleContext *context; /* Contexte du thème actuel */
int ret; /* Bilan de mise en place */
- GdkRGBA error; /* Couleur d'erreur */
if (panel->filter != NULL)
{
@@ -829,6 +829,8 @@ static void on_param_search_changed(GtkSearchEntry *entry, GRegeditPanel *panel)
text = gtk_entry_get_text(GTK_ENTRY(entry));
+ context = gtk_widget_get_style_context(GTK_WIDGET(entry));
+
if (strlen(text) > 0)
{
panel->filter = (regex_t *)calloc(1, sizeof(regex_t));
@@ -839,19 +841,14 @@ static void on_param_search_changed(GtkSearchEntry *entry, GRegeditPanel *panel)
free(panel->filter);
panel->filter = NULL;
- error.red = 1.0;
- error.green = 0.0;
- error.blue = 0.0;
- error.alpha = 1.0;
- gtk_widget_override_color(GTK_WIDGET(entry), GTK_STATE_NORMAL, &error);
-
+ gtk_style_context_add_class(context, "filter-error");
return;
}
}
- gtk_widget_override_color(GTK_WIDGET(entry), GTK_STATE_NORMAL, NULL);
+ gtk_style_context_remove_class(context, "filter-error");
reload_config_into_treeview(panel, get_main_configuration());