diff options
| author | Cyrille Bagard <nocbos@gmail.com> | 2017-12-29 15:18:34 (GMT) | 
|---|---|---|
| committer | Cyrille Bagard <nocbos@gmail.com> | 2017-12-29 15:18:34 (GMT) | 
| commit | e819784e1a9f2d997f5908af4c1c17962f96fc7c (patch) | |
| tree | 84e9b7bba9a47c0e45b78238397e27f15bcdcc49 /src/gtkext/gtkdockable.c | |
| parent | 5c4811a65eedda9dd95137337dc6304eb8cd051d (diff) | |
Removed remaining compilation warnings for GTK deprecated functions when defining regular expressions.
Diffstat (limited to 'src/gtkext/gtkdockable.c')
| -rw-r--r-- | src/gtkext/gtkdockable.c | 17 | 
1 files changed, 7 insertions, 10 deletions
| diff --git a/src/gtkext/gtkdockable.c b/src/gtkext/gtkdockable.c index 2280029..115549e 100644 --- a/src/gtkext/gtkdockable.c +++ b/src/gtkext/gtkdockable.c @@ -409,14 +409,16 @@ static void on_dockable_search_changed(GtkSearchEntry *entry, GtkDockable *docka  {      regex_t *filter;                        /* Expression régulière        */      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            */      GtkDockableIface *iface;                /* Interface utilisée          */      filter = g_object_get_data(G_OBJECT(entry), "preg_filter");      text = gtk_entry_get_text(GTK_ENTRY(entry)); +    context = gtk_widget_get_style_context(GTK_WIDGET(entry)); +      /* Mise en place d'une nouvelle règle */      if (strlen(text) > 0)      { @@ -439,14 +441,8 @@ static void on_dockable_search_changed(GtkSearchEntry *entry, GtkDockable *docka          if (ret != 0)          { -            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; -          }      } @@ -460,7 +456,7 @@ static void on_dockable_search_changed(GtkSearchEntry *entry, GtkDockable *docka      /* Mises à jour */ -    gtk_widget_override_color(GTK_WIDGET(entry), GTK_STATE_NORMAL, NULL); +    gtk_style_context_remove_class(context, "filter-error");      iface = GTK_DOCKABLE_GET_IFACE(dockable); @@ -722,7 +718,8 @@ static void update_drag_window_background(GtkWidget *dnd_window, gint width, gin      cairo_surface_destroy(surface); -    gdk_window_set_background_pattern(window, pattern); +    // Deprecated +    // gdk_window_set_background_pattern(window, pattern);      cairo_pattern_destroy(pattern);  } | 
