Commit db81a5e6 authored by Cosimo Cecchi's avatar Cosimo Cecchi
Browse files

filter-manager: don't use deprecated GdkColor

parent e2cb67b7
......@@ -211,20 +211,20 @@ on_dialog_add_edit_reponse (GtkWidget *dialog, int response_id,
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_color))) {
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_foreground))) {
GdkColor foreground_color;
gtk_color_button_get_color (GTK_COLOR_BUTTON (color_foreground),
GdkRGBA foreground_color;
gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (color_foreground),
&foreground_color);
g_object_set (G_OBJECT (tag),
"foreground-gdk", &foreground_color,
"foreground-rgba", &foreground_color,
"foreground-set", TRUE, NULL);
}
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_background))) {
GdkColor background_color;
gtk_color_button_get_color (GTK_COLOR_BUTTON (color_background),
GdkRGBA background_color;
gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (color_background),
&background_color);
g_object_set (tag,
"paragraph-background-gdk", &background_color,
"paragraph-background-rgba", &background_color,
"paragraph-background-set", TRUE, NULL);
}
......@@ -347,27 +347,27 @@ run_add_edit_dialog (LogviewFilterManager *manager, LogviewFilter *filter)
gtk_entry_set_text (GTK_ENTRY(entry_regex), regex);
if (foreground_set) {
GdkColor *foreground;
GdkRGBA *foreground;
g_object_get (tag, "foreground-gdk", &foreground, NULL);
gtk_color_button_set_color (GTK_COLOR_BUTTON (color_foreground),
g_object_get (tag, "foreground-rgba", &foreground, NULL);
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (color_foreground),
foreground);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_foreground),
TRUE);
gdk_color_free (foreground);
gdk_rgba_free (foreground);
}
if (background_set) {
GdkColor *background;
GdkRGBA *background;
g_object_get (tag, "paragraph-background-gdk", &background, NULL);
gtk_color_button_set_color (GTK_COLOR_BUTTON (color_background),
g_object_get (tag, "paragraph-background-rgba", &background, NULL);
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (color_background),
background);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_background),
TRUE);
gdk_color_free (background);
gdk_rgba_free (background);
}
if (background_set || foreground_set) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment