http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=49169
User: jmayer
Date: 2013/05/05 02:07 AM
Log:
Revert 49166: It breaks compilation:
[ 82%] Building C object ui/gtk/CMakeFiles/gtkui.dir/filter_dlg.c.o
/home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c: In function ‘color_filter_te’:
/home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:1258:5: error: enum conversion when passing argument 2 of ‘gtk_widget_modify_bg’ is invalid in C++ [-Werror=c++-compat]
gtk_widget_modify_bg(w, GTK_STATE_FLAG_NORMAL, &bg);
^
In file included from /usr/include/gtk-3.0/gtk/gtkaction.h:38:0,
from /usr/include/gtk-3.0/gtk/gtkactiongroup.h:38,
from /usr/include/gtk-3.0/gtk/gtkapplication.h:29,
from /usr/include/gtk-3.0/gtk/gtkwindow.h:35,
from /usr/include/gtk-3.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-3.0/gtk/gtk.h:33,
from /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:29:
/usr/include/gtk-3.0/gtk/gtkwidget.h:813:13: note: expected ‘GtkStateType’ but argument is of type ‘int’
void gtk_widget_modify_bg (GtkWidget *widget,
^
/home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:1258:5: error: passing argument 3 of ‘gtk_widget_modify_bg’ from incompatible pointer type [-Werror]
gtk_widget_modify_bg(w, GTK_STATE_FLAG_NORMAL, &bg);
^
In file included from /usr/include/gtk-3.0/gtk/gtkaction.h:38:0,
from /usr/include/gtk-3.0/gtk/gtkactiongroup.h:38,
from /usr/include/gtk-3.0/gtk/gtkapplication.h:29,
from /usr/include/gtk-3.0/gtk/gtkwindow.h:35,
from /usr/include/gtk-3.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-3.0/gtk/gtk.h:33,
from /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:29:
/usr/include/gtk-3.0/gtk/gtkwidget.h:813:13: note: expected ‘const struct GdkColor *’ but argument is of type ‘struct GdkRGBA *’
void gtk_widget_modify_bg (GtkWidget *widget,
^
cc1: all warnings being treated as errors
make[2]: *** [ui/gtk/CMakeFiles/gtkui.dir/filter_dlg.c.o] Error 1
Also note that
https://developer.gnome.org/gtk3/3.6/GtkWidget.html#gtk-widget-modify-bg
states:
gtk_widget_modify_bg has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead
Of course we are not the only ones who have problems with that replacement:
http://gtk.10911.n7.nabble.com/button-background-color-in-gtk3-td14268.html
which ends with a sort of ugly solution without the deprecated function.
Directory: /trunk/ui/gtk/
Changes Path Action
+1 -1 filter_dlg.c Modified