Hi All, This review request is to fix gnome-panel bug: bugster: 6450431 - Right click on workspace switcher to change label does not function.
The root cause of this bug is that the Xtsol.h header file causes AC_HEADERS_CHECK to fail because one of it's function prototypes defines a Bool return type. The type is defined in Xlib.h which it doesn not #include. Hence the failure of AC_HEADERS_CHECK. The check fails and causes the wnck-applet to be built without any trusted extensions support. The reason why the label appears in the workspace applet's right click menu is because the GNOME_WorkspaceSwitcherApplet.xml file that defines the menu has to specify it unconditionally. Normally, the wnck-applet would do a runtime initialisation check for a trusted extensions session and hide this menu item in the absence of a trusted session. But of course, this can't happen when the trusted extensions functionality isn't compiled in. The check for this header file to determine the presence of a trusted extensions build environment is no longer valid anyway since the Xtsol.h header file is delivered in the SUNWxwinc package as part of a default Solaris installation. The appropriate check for a trusted build environment should now be to check for the presence of libgnometsol using the PKG_CHECK_EXISTS macro in gnome-panel's configure.in script. The old configure.in check looked like this: diff -urN gnome-panel-2.14.1/configure.in ../SUNWgnome-panel-2.14.1.hacked/gnome-panel-2.14.1/configure.in --- gnome-panel-2.14.1/configure.in 2006-06-09 11:44:37.213632000 +0100 +++ ../SUNWgnome-panel-2.14.1.hacked/gnome-panel-2.14.1/configure.in 2006-06-09 13:10:34.313733000 +0100 @@ -70,6 +70,21 @@ AC_SUBST(LIBPANEL_APPLET_CFLAGS) AC_SUBST(LIBPANEL_APPLET_LIBS) +### tsol and Xtsol lingnometsol headers + +found_headers=no +case "$host" in + *-*-solaris*) + dnl Only define HAVE_LIBGNOMETSOL when all header files are found. + AC_CHECK_HEADERS(X11/extensions/Xtsol.h, AC_CHECK_HEADERS( sys/tsol/label_macro.h, AC_CHECK_HEADERS( libgnometsol/userattr.h, AC_CHECK_HEADERS( libgnometsol/lab el_builder.h, AC_DEFINE(HAVE_LIBGNOMETSOL, ,[Building with XTSOL support]) , [], [] ), [], [] ), [], [] ), [], [] ) + ;; + *) + ;; +esac + +AM_CONDITIONAL(HAVE_LIBGNOMETSOL, test x$found_headers = xyes) + + PKG_CHECK_MODULES(WNCKLET, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED l ibglade-2.0 >= $LIBGLADE_REQUIRED) AC_SUBST(WNCKLET_CFLAGS) AC_SUBST(WNCKLET_LIBS) The proposed fix can now simplify this down to: --- gnome-panel-2.16.1.old/configure.in 2006-11-15 14:03:40.825150000 +0000 +++ gnome-panel-2.16.1/configure.in 2006-11-15 14:02:08.492268000 +0000 @@ -70,6 +70,8 @@ AC_SUBST(LIBPANEL_APPLET_CFLAGS) AC_SUBST(LIBPANEL_APPLET_LIBS) +PKG_CHECK_EXISTS(libgnometsol >= 0.5, AC_DEFINE(HAVE_LIBGNOMETSOL,,[Building with GNOMETSOL support]),,) + PKG_CHECK_MODULES(WNCKLET, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk +-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED l ibglade-2.0 >= $LIBGLADE_REQUIRED) AC_SUBST(WNCKLET_CFLAGS) AC_SUBST(WNCKLET_LIBS) I also noticed that in gnome-panel-2.16.1/config.h.in, that "#undef HAVE_LIBGNOMETSOL" was declared twice. I have removed the duplicate declaration. I have attached the entire patch, gnome-panel-11-trusted-extension.diff. Only configure.in and config.h.in are modified from the previous version of the patch as outlined above. Cheers, Niall. -- ------------------------------------------- <O Niall Power ( \ Sun Microsystems Ltd - Ireland X Desktop Engineer. +353-1-8199097 8===D niall.power at sun.com ------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: gnome-panel-11-trusted-extensions.diff Type: text/x-patch Size: 25947 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/jds-review/attachments/20061115/d393878e/attachment.bin>
