diff options
author | Brendan Taylor <whateley@gmail.com> | 2011-02-14 21:30:52 -0700 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2011-02-14 21:30:52 -0700 |
commit | 5c424bff24380ad92f8dce16146483bc511620b0 (patch) | |
tree | 9a56f1551a9d11c144bbfed838b2804f89380683 /src | |
parent | 9157a5aecfe16edfc1b238e43f50a61c1a174ee3 (diff) | |
parent | fc33a2fc3c27da78edb3db5c437e72537f718315 (diff) |
Merge remote-tracking branch 'keis/gtk3' into experimental
Diffstat (limited to 'src')
-rw-r--r-- | src/callbacks.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/callbacks.c b/src/callbacks.c index fa2ed1f..8cfb073 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -47,15 +47,20 @@ set_authentication_handler() { void set_status_background() { - GdkColor color; - gdk_color_parse (uzbl.behave.status_background, &color); /* labels and hboxes do not draw their own background. applying this * on the vbox/main_window is ok as the statusbar is the only affected * widget. (if not, we could also use GtkEventBox) */ - if (uzbl.gui.main_window) - gtk_widget_modify_bg (uzbl.gui.main_window, GTK_STATE_NORMAL, &color); - else if (uzbl.gui.plug) - gtk_widget_modify_bg (GTK_WIDGET(uzbl.gui.plug), GTK_STATE_NORMAL, &color); + GtkWidget* widget = uzbl.gui.main_window ? uzbl.gui.main_window : GTK_WIDGET (uzbl.gui.plug); + +#if GTK_CHECK_VERSION(2,91,0) + GdkRGBA color; + gdk_rgba_parse (&color, uzbl.behave.status_background); + gtk_widget_override_background_color (widget, GTK_STATE_NORMAL, &color); +#else + GdkColor color; + gdk_color_parse (uzbl.behave.status_background, &color); + gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color); +#endif } void |