Get rid of deprecated functions to customize widget colors

Since commit cc455b7f916110d7cfae6b7af753349e070c9494, the background
color has not been set correctly for Gtk+ 3.18 (Fedora 23), while it was
working fine for more recent version 3.20 (Fedora 24). Tracked down to
some changes in GtkNotebook code which can not be easily backported.

Instead of customizing background and foreground colors, let's just
stick with the default colors provided by theme.

Related https://bugs.freedesktop.org/show_bug.cgi?id=94276

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit is contained in:
Eduardo Lima (Etrunko) 2016-06-23 16:04:34 -03:00
parent f212c5a358
commit 8a32e0bfee
2 changed files with 0 additions and 20 deletions

View File

@ -71,7 +71,6 @@ static void
virt_viewer_notebook_init (VirtViewerNotebook *self)
{
VirtViewerNotebookPrivate *priv;
GdkRGBA color;
self->priv = GET_PRIVATE(self);
priv = self->priv;
@ -81,15 +80,6 @@ virt_viewer_notebook_init (VirtViewerNotebook *self)
gtk_notebook_set_show_border(GTK_NOTEBOOK(self), FALSE);
gtk_widget_show_all(priv->status);
gtk_notebook_append_page(GTK_NOTEBOOK(self), priv->status, NULL);
gdk_rgba_parse(&color, "white");
/* FIXME:
* This method has been deprecated in 3.16.
* For more details on how to deal with this in the future, please, see:
* https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-override-color
* For the bug report about this deprecated function, please, see:
* https://bugs.freedesktop.org/show_bug.cgi?id=94276
*/
gtk_widget_override_color(priv->status, GTK_STATE_FLAG_NORMAL, &color);
}
void

View File

@ -297,7 +297,6 @@ virt_viewer_window_init (VirtViewerWindow *self)
{
VirtViewerWindowPrivate *priv;
GtkWidget *vbox;
GdkRGBA color;
GSList *accels;
self->priv = GET_PRIVATE(self);
@ -340,15 +339,6 @@ virt_viewer_window_init (VirtViewerWindow *self)
virt_viewer_window_toolbar_setup(self);
gtk_box_pack_end(GTK_BOX(vbox), GTK_WIDGET(priv->notebook), TRUE, TRUE, 0);
gdk_rgba_parse(&color, "black");
/* FIXME:
* This method has been deprecated in 3.16.
* For more details on how to deal with this in the future, please, see:
* https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-override-background-color
* For the bug report about this deprecated function, please, see:
* https://bugs.freedesktop.org/show_bug.cgi?id=94276
*/
gtk_widget_override_background_color(GTK_WIDGET(priv->notebook), GTK_STATE_FLAG_NORMAL, &color);
priv->window = GTK_WIDGET(gtk_builder_get_object(priv->builder, "viewer"));
gtk_window_add_accel_group(GTK_WINDOW(priv->window), priv->accel_group);