Mailinglist Archive: opensuse-bugs (4369 mails)

< Previous Next >
[Bug 207653] New: Make space for yast-gtk
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Fri, 22 Sep 2006 08:17:06 -0600 (MDT)
  • Message-id: <bug-207653-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>
https://bugzilla.novell.com/show_bug.cgi?id=207653

Summary: Make space for yast-gtk
Product: openSUSE 10.2
Version: Alpha 4 plus
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: P5 - None
Component: YaST2
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: c0416111@xxxxxxxxxxxxxxxxxxx
QAContact: jsrain@xxxxxxxxxx


While the GTK+ frontend for Yast (yast-gtk) won't be shipped by default, it
would be nice to add the necessary code to the /sbin/yast2 launching script to
detect if it is installed and make use of it on the desktops where it makes
sense, so that users could install yast-gtk if they choose to and have it being
used.

The needed changes follow. Add the following check_gtk function to
/usr/lib/YaST2/bin/yast2-funcs to detect if yast-gtk is installed:
--- 8< ------------------------
#
# check if the gtk plugin and all necessary libaries are present
#
function check_gtk()
{
get_plugindir
Y2_GTK=$plugindir/libpy2gtk.so.2

if [ -e "$Y2_GTK" ] ; then
if ! `/usr/bin/ldd "$Y2_GTK" | grep --quiet "=> not found"` ; then
return 0 # success
fi
echo "warning: the gtk frontend is installed but does not work"
sleep 1
fi

return 1 # failure
}
------------------------ >8 ---

Then make the following changes to /sbin/yast2:

- if [ -z "$DISPLAY" ] || ! check_qt ; then
+ if [ -z "$DISPLAY" ] || (! check_qt && ! check_gtk); then


- $ybindir/y2base $module "$@" qt "$Y2_GEOMETRY" $Y2QT_ARGS
+ FRONTEND="qt"
+ if check_gtk && (echo $WINDOWMANAGER | grep -qi "gnome" || \
+ echo $WINDOWMANAGER | grep -qi "xfce" || \
+ ! check_qt) ; then
+ FRONTEND="gtk"
+ fi
+ $ybindir/y2base $module "$@" $FRONTEND "$Y2_GEOMETRY" $Y2QT_ARGS



Since OpenSuse 10.2 seems to be going to ship the Novell's Gnome menu, it
would also be nice to open a menu window with the Yast entries rather than
using y2controlcenter (I believe this is possible). This requires a bit
knowledge of that Gnome menu, so that's out of my scope... But it should be
trivial to add.


--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

< Previous Next >