Hello community, here is the log from the commit of package yast2-control-center for openSUSE:Factory checked in at Tue Jul 21 12:38:26 CEST 2009. -------- --- yast2-control-center/yast2-control-center.changes 2009-07-07 13:06:48.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-control-center/yast2-control-center.changes 2009-07-17 13:51:21.000000000 +0200 @@ -1,0 +2,10 @@ +Fri Jul 17 13:38:07 CEST 2009 - kmachalkova@suse.cz + +- Show warning (user is not root) at startup +- Process CLI options +- Put $YAST_DESKTOP_DIR support back again +- Enable translating strings in 'control-center' textdomain + + generating pot files by y2tools +- 2.18.6 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-control-center-2.18.5.tar.bz2 New: ---- yast2-control-center-2.18.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-control-center.spec ++++++ --- /var/tmp/diff_new_pack.XSx46W/_old 2009-07-21 12:38:06.000000000 +0200 +++ /var/tmp/diff_new_pack.XSx46W/_new 2009-07-21 12:38:06.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-control-center (Version 2.18.5) +# spec file for package yast2-control-center (Version 2.18.6) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -18,10 +18,10 @@ Name: yast2-control-center -Version: 2.18.5 +Version: 2.18.6 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-control-center-2.18.5.tar.bz2 +Source0: yast2-control-center-2.18.6.tar.bz2 Group: System/YaST License: GPL v2 or later BuildRequires: libdrm-devel libjpeg-devel libqt4-devel pkgconfig update-desktop-files yast2-devtools ++++++ yast2-control-center-2.18.5.tar.bz2 -> yast2-control-center-2.18.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/POTFILES new/yast2-control-center-2.18.6/POTFILES --- old/yast2-control-center-2.18.5/POTFILES 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-control-center-2.18.6/POTFILES 2009-07-17 13:47:41.000000000 +0200 @@ -0,0 +1 @@ +./src/main_window.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/VERSION.cmake new/yast2-control-center-2.18.6/VERSION.cmake --- old/yast2-control-center-2.18.5/VERSION.cmake 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/VERSION.cmake 2009-07-17 13:47:41.000000000 +0200 @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "2") SET(VERSION_MINOR "18") -SET(VERSION_PATCH "5") +SET(VERSION_PATCH "6") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/package/yast2-control-center.changes new/yast2-control-center-2.18.6/package/yast2-control-center.changes --- old/yast2-control-center-2.18.5/package/yast2-control-center.changes 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/package/yast2-control-center.changes 2009-07-17 13:47:41.000000000 +0200 @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Fri Jul 17 13:38:07 CEST 2009 - kmachalkova@suse.cz + +- Show warning (user is not root) at startup +- Process CLI options +- Put $YAST_DESKTOP_DIR support back again +- Enable translating strings in 'control-center' textdomain + + generating pot files by y2tools +- 2.18.6 + +------------------------------------------------------------------- Tue Jul 7 12:43:23 CEST 2009 - kmachalkova@suse.cz - Replaced not expanding @ybindir@ in spec.in by something sensible diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/src/main.cpp new/yast2-control-center-2.18.6/src/main.cpp --- old/yast2-control-center-2.18.5/src/main.cpp 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/src/main.cpp 2009-07-17 13:47:42.000000000 +0200 @@ -1,15 +1,77 @@ #include <QApplication> +#include <QDesktopWidget> +#include <QRect> +#include <QTimer> + +#include <iostream> + +using std::cout; +using std::cerr; +using std::endl; #include "main_window.h" +#include "i18n.h" +void printhelpandexit() +{ + cout << "Usage:" + << "\n y2controlcenter [OPTIONS]" + << "\n" + << "\nOPTIONS:" + << "\n" + << "\n --help -h this message" + << "\n --fullscreen use full screen" + << "\n --noborder no window manager border for main window" + << endl; + exit (0); +} int main(int argc, char **argv) { -QApplication app(argc, argv); + QApplication app(argc, argv); + set_textdomain("control-center"); -MainWindow mainWin; + bool fullscreen = false; + bool noborder = false; -mainWin.show(); -return app.exec(); + for ( int i=0 ;i < argc ;i++ ) + { + QString opt = argv[i]; + + // Normalize command line option - accept "--xy" as well as "-xy" + + if ( opt.startsWith( "--" ) ) + opt.remove(0, 1); + + if ( opt == "-h" || opt == "-help" ) + printhelpandexit(); + else if ( opt == "-fullscreen" ) + fullscreen = true; + else if ( opt == "-noborder" ) + noborder = true; + } + + Qt::WFlags wflags = Qt::Window; + + if ( noborder ) + wflags |= Qt::FramelessWindowHint; + + MainWindow mainWin ( wflags ); + + mainWin.setFullScreen ( fullscreen ); + mainWin.setNoBorder( noborder ); + + if ( fullscreen ) + { + QRect available = app.desktop()->availableGeometry(); + mainWin.resize( available.width(), available.height() ); + mainWin.move( available.topLeft() ); + } + + mainWin.show(); + + QTimer::singleShot(60, &mainWin, SLOT( initialMsg() )); + + return app.exec(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/src/main_window.cpp new/yast2-control-center-2.18.6/src/main_window.cpp --- old/yast2-control-center-2.18.5/src/main_window.cpp 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/src/main_window.cpp 2009-07-17 13:47:42.000000000 +0200 @@ -27,6 +27,7 @@ #include <QQueue> #include <QSettings> #include <QStatusBar> +#include <QMessageBox> #include "kcategorizedsortfilterproxymodel.h" #include "kcategorizedview.h" @@ -41,6 +42,11 @@ #define APP_NAME "y2controlcenter-qt" #define USED_QUEUE_SIZE 5 + +/* + Textdomain "control-center" +*/ + class MainWindow::Private { public: @@ -67,10 +73,14 @@ QLineEdit *searchField; QQueue <QString> recentlyUsed; + + bool noBorder; + bool fullScreen; + }; -MainWindow::MainWindow() - : QMainWindow() +MainWindow::MainWindow( Qt::WindowFlags wflags ) + : QMainWindow( 0, wflags ) , d(new Private) { qDebug(); @@ -113,9 +123,10 @@ QHBoxLayout *searchLayout = new QHBoxLayout(); QLabel *searchLabel = new QLabel(); - searchLabel->setText( _("Search") ); - searchLayout->addWidget(searchLabel); d->searchField = new QLineEdit(); + searchLabel->setText( _("&Search") ); + searchLabel->setBuddy( d->searchField ); + searchLayout->addWidget(searchLabel); searchLayout->addWidget(d->searchField); leftPanelLayout->addLayout( searchLayout ); @@ -158,6 +169,16 @@ } +void MainWindow::setFullScreen( bool fs ) +{ + d->fullScreen = fs; +} + +void MainWindow::setNoBorder( bool nb ) +{ + d->noBorder = nb ; +} + void MainWindow::initActions() { addToF = new QAction( "Add to Favourites", this ); @@ -204,6 +225,11 @@ QString cmd = QString("/sbin/yast2 "); cmd += client; + if ( d->noBorder ) + cmd += " --noborder "; + if ( d->fullScreen ) + cmd += " --fullscreen "; + if (!argument.isEmpty() ) { cmd +=" '"; @@ -235,6 +261,14 @@ d->gcsfpm->setFilterRegExp ( gr_filter ); } +void MainWindow::initialMsg() +{ + if ( !d->modmodel->isRoot() ) + QMessageBox::information(this, _("YaST2 Control Center"), + _("YaST2 Control Center is not running as root.\n" + "You will only see modules which do not require root privileges.")); +} + void MainWindow::readSettings() { QSettings settings(ORG_NAME, APP_NAME); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/src/main_window.h new/yast2-control-center-2.18.6/src/main_window.h --- old/yast2-control-center-2.18.5/src/main_window.h 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/src/main_window.h 2009-07-17 13:47:42.000000000 +0200 @@ -31,14 +31,19 @@ Q_OBJECT public: - MainWindow(); + MainWindow( Qt::WindowFlags wflags = Qt::Window ); ~MainWindow(); + void setFullScreen( bool fs); + void setNoBorder( bool nb ); + protected slots: void slotGroupPressed( const QModelIndex &index ); void slotModulePressed( const QModelIndex &index ); void slotLaunchModule( const QModelIndex &index ); void slotFilterChanged(); + void initialMsg(); + protected: void initActions(); void closeEvent( QCloseEvent *event); @@ -51,6 +56,7 @@ void writeSettings(); void readSettings(); void setWinTitle(); + }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/src/yqdesktopfilesmodel.cpp new/yast2-control-center-2.18.6/src/yqdesktopfilesmodel.cpp --- old/yast2-control-center-2.18.5/src/yqdesktopfilesmodel.cpp 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/src/yqdesktopfilesmodel.cpp 2009-07-17 13:47:41.000000000 +0200 @@ -195,6 +195,8 @@ d->desktop_files.removeAt( row ); d->cache.remove( key ); + + return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/src/yqmodulegroupsmodel.cpp new/yast2-control-center-2.18.6/src/yqmodulegroupsmodel.cpp --- old/yast2-control-center-2.18.5/src/yqmodulegroupsmodel.cpp 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/src/yqmodulegroupsmodel.cpp 2009-07-17 13:47:42.000000000 +0200 @@ -32,7 +32,11 @@ YQModuleGroupsModel::YQModuleGroupsModel( QObject * parent ) : YQDesktopFilesModel(parent) { - addDesktopFilesPath( GROUPS_DESKTOP_DIR ); + + QString default_dir( GROUPS_DESKTOP_DIR ); + QString alt_dir = QString( getenv( "YAST2_DESKTOP_DIR") ); + + addDesktopFilesPath( alt_dir.isEmpty() ? default_dir : alt_dir + "/groups/"); addIconPath( ICON_DIR ); addIconPath( FALLBACK_ICON_DIR ); reindex(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/src/yqmodulesmodel.cpp new/yast2-control-center-2.18.6/src/yqmodulesmodel.cpp --- old/yast2-control-center-2.18.5/src/yqmodulesmodel.cpp 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/src/yqmodulesmodel.cpp 2009-07-17 13:47:42.000000000 +0200 @@ -49,7 +49,10 @@ : YQDesktopFilesModel(parent) , priv(new Private) { - addDesktopFilesPath( MODULES_DESKTOP_DIR ); + QString default_dir( MODULES_DESKTOP_DIR ); + QString alt_dir = QString( getenv( "YAST2_DESKTOP_DIR") ); + + addDesktopFilesPath( alt_dir.isEmpty() ? default_dir : alt_dir ); addIconPath( ICON_DIR ); addIconPath( FALLBACK_ICON_DIR ); removeEmptyGroups(); @@ -178,6 +181,11 @@ } } +bool YQModulesModel::isRoot() +{ + return priv->userIsRoot; +} + void YQModulesModel::removeEmptyGroups() { QStringList groups; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-control-center-2.18.5/src/yqmodulesmodel.h new/yast2-control-center-2.18.6/src/yqmodulesmodel.h --- old/yast2-control-center-2.18.5/src/yqmodulesmodel.h 2009-07-07 12:59:38.000000000 +0200 +++ new/yast2-control-center-2.18.6/src/yqmodulesmodel.h 2009-07-17 13:47:42.000000000 +0200 @@ -69,6 +69,8 @@ */ YQModuleGroupsModel * groupsModel() const; + bool isRoot(); + private: class Private; Private *const priv; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org