summaryrefslogtreecommitdiff
path: root/src/gui/panels
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels')
-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());