Hello community,
here is the log from the commit of package yast2-qt
checked in at Mon Feb 4 18:29:38 CET 2008.
--------
--- yast2-qt/yast2-qt.changes 2008-02-01 08:19:30.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-qt/yast2-qt.changes 2008-02-05 10:04:37.000000000 +0100
@@ -1,0 +2,25 @@
+Fri Feb 4 16:01:22 CET 2008 - tgoettlicher@suse.de
+
+- Adapted askForSaveFilename to qt4 api (bnc #357998)
+- V 2.16.24
+
+-------------------------------------------------------------------
+Fri Feb 4 13:48:16 CET 2008 - tgoettlicher@suse.de
+
+- Fixed Bug #340898: Selecting specific repository out of sync
+- V 2.16.23
+
+-------------------------------------------------------------------
+Fri Feb 1 15:48:55 CET 2008 - sh@suse.de
+
+- Moved event handling from Y(Q)UI to Y(Q)Dialog
+- V 2.16.22
+
+-------------------------------------------------------------------
+Fri Feb 1 11:38:13 CET 2008 - tgoettlicher@suse.de
+
+- Run solver on startup of PackageManager in online update mode
+ (bug #340898)
+- V 2.16.21
+
+-------------------------------------------------------------------
Old:
----
yast2-qt-2.16.20.tar.bz2
New:
----
yast2-qt-2.16.24.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-qt.spec ++++++
--- /var/tmp/diff_new_pack.Z21001/_old 2008-02-04 18:29:32.000000000 +0100
+++ /var/tmp/diff_new_pack.Z21001/_new 2008-02-04 18:29:32.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-qt (Version 2.16.20)
+# spec file for package yast2-qt (Version 2.16.24)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -10,17 +10,17 @@
Name: yast2-qt
-Version: 2.16.20
-Release: 2
+Version: 2.16.24
+Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-qt-2.16.20.tar.bz2
+Source0: yast2-qt-2.16.24.tar.bz2
BuildRequires: docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libqt4-devel libxcrypt-devel libxslt libzypp-devel perl-XML-Writer sgml-skel update-desktop-files
Summary: YaST2 - Graphical User Interface
BuildRequires: yast2-devtools >= 2.16.3
-BuildRequires: yast2-core-devel >= 2.16.25
-Requires: yast2-core >= 2.16.25
+BuildRequires: yast2-core-devel >= 2.16.27
+Requires: yast2-core >= 2.16.27
Requires: yast2_theme >= 2.16.1
Requires: libzypp >= 3.11.8
Provides: yast2_ui
@@ -79,6 +79,19 @@
%_prefix/share/YaST2/data/lang_fonts
%changelog
+* Mon Feb 04 2008 tgoettlicher@suse.de
+- Adapted askForSaveFilename to qt4 api (bnc #357998)
+- V 2.16.24
+* Mon Feb 04 2008 tgoettlicher@suse.de
+- Fixed Bug #340898: Selecting specific repository out of sync
+- V 2.16.23
+* Fri Feb 01 2008 sh@suse.de
+- Moved event handling from Y(Q)UI to Y(Q)Dialog
+- V 2.16.22
+* Fri Feb 01 2008 tgoettlicher@suse.de
+- Run solver on startup of PackageManager in online update mode
+ (bug #340898)
+- V 2.16.21
* Fri Feb 01 2008 coolo@suse.de
- fix file list
* Thu Jan 31 2008 sh@suse.de
++++++ yast2-qt-2.16.20.tar.bz2 -> yast2-qt-2.16.24.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/CMakeLists.txt new/yast2-qt-2.16.24/src/CMakeLists.txt
--- old/yast2-qt-2.16.20/src/CMakeLists.txt 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/CMakeLists.txt 2008-02-05 10:04:36.000000000 +0100
@@ -66,7 +66,6 @@
YQTree.cc
YQUI_builtins.cc
YQUI_core.cc
- YQUI_widgets.cc
YQUI_x11.cc
YQWidgetCaption.cc
YQWidgetFactory.cc
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/pkg/YQPackageSelector.cc new/yast2-qt-2.16.24/src/pkg/YQPackageSelector.cc
--- old/yast2-qt-2.16.20/src/pkg/YQPackageSelector.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/pkg/YQPackageSelector.cc 2008-02-05 10:04:36.000000000 +0100
@@ -202,7 +202,7 @@
#if CHECK_DEPENDENCIES_ON_STARTUP
- if ( ! testMode() && ! onlineUpdateMode() )
+ if ( ! testMode() )
{
// Fire up the first dependency check in the main loop.
// Don't do this right away - wait until all initializations are finished.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/pkg/YQPkgRepoList.cc new/yast2-qt-2.16.24/src/pkg/YQPkgRepoList.cc
--- old/yast2-qt-2.16.20/src/pkg/YQPkgRepoList.cc 2008-02-01 08:19:29.000000000 +0100
+++ new/yast2-qt-2.16.24/src/pkg/YQPkgRepoList.cc 2008-02-05 10:04:35.000000000 +0100
@@ -57,7 +57,7 @@
//setAllColumnsShowFocus( true );
//setSelectionMode( Q3ListView::Extended ); // allow multi-selection with Ctrl-mouse
- connect( this, SIGNAL( currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *) ),
+ connect( this, SIGNAL( itemSelectionChanged() ),
this, SLOT ( filterIfVisible()) );
fillList();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQApplication.cc new/yast2-qt-2.16.24/src/YQApplication.cc
--- old/yast2-qt-2.16.20/src/YQApplication.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQApplication.cc 2008-02-05 10:04:36.000000000 +0100
@@ -18,21 +18,25 @@
/-*/
+#include // access()
+
#include <QApplication>
#include <QLocale>
-#include // access()
-#include
-#include
-#include
+#include <QRegExp>
+#include <QFileDialog>
+#include <QDesktopWidget>
+#include <QMessageBox>
#define YUILogComponent "qt-ui"
#include "YUILog.h"
#include "YUISymbols.h"
+#include "YQUI.h"
#include "utf8.h"
#include "YQi18n.h"
#include "YQApplication.h"
+#include "YQPackageSelectorPlugin.h"
YQApplication::YQApplication()
@@ -46,6 +50,8 @@
, _autoFonts( false )
, _autoNormalFontSize( -1 )
, _autoHeadingFontSize( -1 )
+ , _leftHandedMouse( false )
+ , _askedForLeftHandedMouse( false )
{
yuiDebug() << "YQApplication constructor start" << endl;
@@ -410,9 +416,12 @@
#endif
QString dirName =
- QFileDialog::getExistingDirectory( 0,
- fromUTF8( startDir ),
- fromUTF8( headline ) ); // caption
+ QFileDialog::getExistingDirectory( 0, // parent
+ fromUTF8( headline ) , // caption
+ fromUTF8( startDir )); // dir
+
+
+
#if 0
busyCursor();
#endif
@@ -431,9 +440,10 @@
#endif
QString fileName =
- QFileDialog::getOpenFileName( 0, fromUTF8( startWith ),
- fromUTF8( filter ),
- fromUTF8( headline ) ); // caption
+ QFileDialog::getOpenFileName( 0, // parent
+ fromUTF8( headline ) , // caption
+ fromUTF8( startWith ), // dir
+ fromUTF8( filter )); // filter
#if 0
busyCursor();
@@ -477,9 +487,10 @@
// Leave the mouse cursor alone - this function might be called from
// some other widget, not only from UI::AskForSaveFileName().
- fileName = QFileDialog::getSaveFileName( 0, startWith,
- filter,
- headline ); // caption
+ fileName = QFileDialog::getSaveFileName( 0, // parent
+ headline, // caption
+ startWith, // dir
+ filter ); // filter
if ( fileName.isEmpty() ) // this includes fileName.isNull()
return QString::null;
@@ -515,4 +526,115 @@
}
+YQPackageSelectorPlugin *
+YQApplication::packageSelectorPlugin()
+{
+ static YQPackageSelectorPlugin * plugin = 0;
+
+ if ( ! plugin )
+ {
+ plugin = new YQPackageSelectorPlugin();
+
+ // This is a deliberate memory leak: If an application requires a
+ // PackageSelector, it is a package selection application by
+ // definition. In this case, the qt_pkg plugin is intentionally kept
+ // open to avoid repeated start-up cost of the plugin and libzypp.
+ }
+
+ return plugin;
+}
+
+
+int
+YQApplication::displayWidth()
+{
+ return qApp->desktop()->width();
+}
+
+
+int
+YQApplication::displayHeight()
+{
+ return qApp->desktop()->height();
+}
+
+
+int
+YQApplication::displayDepth()
+{
+ return qApp->desktop()->depth();
+}
+
+
+long
+YQApplication::displayColors()
+{
+ return 1L << qApp->desktop()->depth();
+}
+
+
+int
+YQApplication::defaultWidth()
+{
+ return YQUI::ui()->defaultSize( YD_HORIZ );
+}
+
+
+int
+YQApplication::defaultHeight()
+{
+ return YQUI::ui()->defaultSize( YD_VERT );
+}
+
+
+bool
+YQApplication::leftHandedMouse()
+{
+ return _leftHandedMouse;
+}
+
+
+void
+YQApplication::maybeLeftHandedUser()
+{
+ if ( _askedForLeftHandedMouse )
+ return;
+
+ QString message =
+ _( "You clicked the right mouse button "
+ "where a left-click was expected."
+ "\n"
+ "Switch left and right mouse buttons?"
+ );
+ int button = QMessageBox::question( 0,
+ // Popup dialog caption
+ _( "Unexpected Click" ),
+ message,
+ QMessageBox::Yes | QMessageBox::Default,
+ QMessageBox::No,
+ QMessageBox::Cancel | QMessageBox::Escape );
+
+ if ( button == QMessageBox::Yes )
+ {
+
+ const char * command =
+ _leftHandedMouse ?
+ "xmodmap -e \"pointer = 1 2 3\"": // switch back to right-handed mouse
+ "xmodmap -e \"pointer = 3 2 1\""; // switch to left-handed mouse
+
+ _leftHandedMouse = ! _leftHandedMouse; // might be set repeatedly!
+ _askedForLeftHandedMouse = false; // give the user a chance to switch back
+ yuiMilestone() << "Switching mouse buttons: " << command << endl;
+
+ system( command );
+ }
+ else if ( button == 1 ) // No
+ {
+ _askedForLeftHandedMouse = true;
+ }
+}
+
+
+
+
#include "YQApplication.moc"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQApplication.h new/yast2-qt-2.16.24/src/YQApplication.h
--- old/yast2-qt-2.16.20/src/YQApplication.h 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQApplication.h 2008-02-05 10:04:35.000000000 +0100
@@ -27,6 +27,8 @@
#include "QY2Settings.h"
#include "YApplication.h"
+class YQPackageSelectorPlugin;
+
class YQApplication: public QObject, public YApplication
{
@@ -199,7 +201,50 @@
const QString & filter,
const QString & headline );
+ /**
+ * Return the package selector plugin singleton or creates it
+ * (including loading the plugin lib) if it does not exist yet.
+ **/
+ static YQPackageSelectorPlugin * packageSelectorPlugin();
+
+ /**
+ * A mouse click with the wrong mouse button was detected - e.g., a right
+ * click on a push button. The user might be left-handed, but his mouse
+ * might not (yet) be configured for left-handed use - e.g., during
+ * installation. Ask him if he would like his mouse temporarily configured
+ * as a left-handed mouse.
+ *
+ * This status can be queried with YQApplication::leftHandedMouse().
+ **/
+ void maybeLeftHandedUser();
+
+ // Display information and UI capabilities.
+ //
+ // All implemented from YApplication.
+
+ virtual int displayWidth();
+ virtual int displayHeight();
+ virtual int displayDepth();
+ virtual long displayColors();
+
+ // Size of main dialogs
+ virtual int defaultWidth();
+ virtual int defaultHeight();
+
+ //
+ // UI capabilities
+ //
+
+ virtual bool isTextMode() { return false; }
+ virtual bool hasImageSupport() { return true; }
+ virtual bool hasIconSupport() { return true; }
+ virtual bool hasAnimationSupport() { return true; }
+ virtual bool hasFullUtf8Support() { return true; }
+ virtual bool richTextSupportsTable() { return true; }
+ virtual bool leftHandedMouse();
+
+
protected:
/**
@@ -239,13 +284,17 @@
**/
QTranslator * _qtTranslations;
- /**
- * For auto fonts
- **/
+ //
+ // Misc
+ //
+
bool _autoFonts;
int _autoNormalFontSize;
int _autoHeadingFontSize;
+ bool _leftHandedMouse;
+ bool _askedForLeftHandedMouse;
+
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQDialog.cc new/yast2-qt-2.16.24/src/YQDialog.cc
--- old/yast2-qt-2.16.20/src/YQDialog.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQDialog.cc 2008-02-05 10:04:36.000000000 +0100
@@ -81,6 +81,8 @@
{
setWindowFlags( YQPopupDialogWFlags );
}
+ if ( dialogType != YMainDialog )
+ setWindowModality( Qt::WindowModal );
if ( QWidget::parent() == YQMainWinDock::mainWinDock() )
{
@@ -228,18 +230,6 @@
void
-YQDialog::activate( bool active )
-{
-#if 0
- if ( active )
- {
- ensureOnlyOneDefaultButton();
- }
-#endif
-}
-
-
-void
YQDialog::resizeEvent( QResizeEvent * event )
{
if ( event )
@@ -272,7 +262,6 @@
YQGenericButton *
YQDialog::findDefaultButton( YWidgetListConstIterator begin,
YWidgetListConstIterator end ) const
-
{
for ( YWidgetListConstIterator it = begin; it != end; ++it )
{
@@ -679,6 +668,21 @@
}
+YEvent *
+YQDialog::waitForEventInternal( int timeout_millisec )
+{
+ return YQUI::ui()->userInput( timeout_millisec );
+}
+
+
+YEvent *
+YQDialog::pollEventInternal()
+{
+ return YQUI::ui()->pollInput();
+}
+
+
+
void
YQDialog::center( QWidget * dialog, QWidget * parent )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQDialog.h new/yast2-qt-2.16.24/src/YQDialog.h
--- old/yast2-qt-2.16.20/src/YQDialog.h 2008-02-01 08:19:29.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQDialog.h 2008-02-05 10:04:36.000000000 +0100
@@ -56,11 +56,6 @@
public:
/**
- * Makes this dialog active or inactive.
- **/
- void activate( bool active );
-
- /**
* Interited from QDialog: The window was closed via the window
* manager close button.
**/
@@ -213,6 +208,21 @@
virtual void openInternal();
/**
+ * Wait for a user event.
+ *
+ * Implemented from YDialog.
+ **/
+ virtual YEvent * waitForEventInternal( int timeout_millisec );
+
+ /**
+ * Check if a user event is pending. If there is one, return it.
+ * If there is none, do not wait for one - return 0.
+ *
+ * Implemented from YDialog.
+ **/
+ virtual YEvent * pollEventInternal();
+
+ /**
* Activate this dialog: Make sure that it is shown as the topmost dialog
* of this application and that it can receive input.
*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQGenericButton.cc new/yast2-qt-2.16.24/src/YQGenericButton.cc
--- old/yast2-qt-2.16.20/src/YQGenericButton.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQGenericButton.cc 2008-02-05 10:04:36.000000000 +0100
@@ -27,6 +27,7 @@
#include "utf8.h"
#include "YQUI.h"
+#include "YQApplication.h"
#include "YEvent.h"
#include "YQGenericButton.h"
#include "YQDialog.h"
@@ -203,7 +204,7 @@
if ( mouseEvent && mouseEvent->button() == Qt::RightButton )
{
yuiMilestone() << "Right click on button detected" << endl;
- YQUI::ui()->maybeLeftHandedUser();
+ YQUI::yqApp()->maybeLeftHandedUser();
}
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQOptionalWidgetFactory.cc new/yast2-qt-2.16.24/src/YQOptionalWidgetFactory.cc
--- old/yast2-qt-2.16.20/src/YQOptionalWidgetFactory.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQOptionalWidgetFactory.cc 2008-02-05 10:04:36.000000000 +0100
@@ -17,7 +17,7 @@
/-*/
#include "YQOptionalWidgetFactory.h"
-#include "YQUI.h"
+#include "YQApplication.h"
#include "YUIException.h"
#include "YQPackageSelectorPlugin.h"
#include "YQWizard.h"
@@ -158,7 +158,7 @@
YQPatternSelector *
YQOptionalWidgetFactory::createPatternSelector( YWidget * parent, long modeFlags )
{
- YQPackageSelectorPlugin * plugin = YQUI::ui()->packageSelectorPlugin();
+ YQPackageSelectorPlugin * plugin = YQApplication::packageSelectorPlugin();
if ( plugin )
return plugin->createPatternSelector( parent, modeFlags );
@@ -176,7 +176,7 @@
YQSimplePatchSelector *
YQOptionalWidgetFactory::createSimplePatchSelector( YWidget * parent, long modeFlags )
{
- YQPackageSelectorPlugin * plugin = YQUI::ui()->packageSelectorPlugin();
+ YQPackageSelectorPlugin * plugin = YQApplication::packageSelectorPlugin();
if ( plugin )
return plugin->createSimplePatchSelector( parent, modeFlags );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQRadioButton.cc new/yast2-qt-2.16.24/src/YQRadioButton.cc
--- old/yast2-qt-2.16.20/src/YQRadioButton.cc 2008-02-01 08:19:29.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQRadioButton.cc 2008-02-05 10:04:36.000000000 +0100
@@ -150,7 +150,7 @@
if ( mouseEvent && mouseEvent->button() == Qt::RightButton )
{
yuiMilestone() << "Right click on button detected" << endl;
- YQUI::ui()->maybeLeftHandedUser();
+ YQUI::yqApp()->maybeLeftHandedUser();
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQSelectionBox.cc new/yast2-qt-2.16.24/src/YQSelectionBox.cc
--- old/yast2-qt-2.16.20/src/YQSelectionBox.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQSelectionBox.cc 2008-02-05 10:04:36.000000000 +0100
@@ -31,6 +31,7 @@
#include "utf8.h"
#include "YEvent.h"
#include "YQUI.h"
+#include "YQApplication.h"
#include "YQSelectionBox.h"
#include "YQSignalBlocker.h"
#include "YQDialog.h"
@@ -253,7 +254,7 @@
if ( mouseEvent && mouseEvent->button() == Qt::RightButton )
{
yuiMilestone() << "Right click in selecton box detected" << endl;
- YQUI::ui()->maybeLeftHandedUser();
+ YQUI::yqApp()->maybeLeftHandedUser();
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQUI_builtins.cc new/yast2-qt-2.16.24/src/YQUI_builtins.cc
--- old/yast2-qt-2.16.20/src/YQUI_builtins.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQUI_builtins.cc 2008-02-05 10:04:36.000000000 +0100
@@ -55,16 +55,18 @@
YEvent * YQUI::runPkgSelection( YWidget * packageSelector )
{
+ YUI_CHECK_PTR( packageSelector );
YEvent * event = 0;
try
{
- do
- {
- event = filterInvalidEvents( userInput() );
- } while ( ! event );
+ event = packageSelector->findDialog()->waitForEvent();
+ }
+ catch ( YUIException & uiEx )
+ {
+ YUI_CAUGHT( uiEx );
}
- catch (const std::exception & e)
+ catch ( std::exception & e)
{
yuiError() << "Caught std::exception: " << e.what() << "\n"
<< "This is a libzypp problem. Do not file a bug against the UI!"
@@ -261,7 +263,7 @@
items << "Debug logging off"
<< "Debug logging on";
- QString result = QInputDialog::getItem( _main_win,
+ QString result = QInputDialog::getItem( 0,
_("YaST2 Logging"),
_("Configure YaST2 Logging:"),
items, 0,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQUI_core.cc new/yast2-qt-2.16.24/src/YQUI_core.cc
--- old/yast2-qt-2.16.20/src/YQUI_core.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQUI_core.cc 2008-02-05 10:04:35.000000000 +0100
@@ -56,7 +56,9 @@
YQUI::YQUI( int argc, char **argv, bool with_threads, const char * macro_file )
: YUI( with_threads )
+#if 0
, _main_win( NULL )
+#endif
, _do_exit_loop( false )
, _eventLoop( 0 )
{
@@ -66,8 +68,6 @@
_fatal_error = false;
_fullscreen = false;
_usingVisionImpairedPalette = false;
- _leftHandedMouse = false;
- _askedForLeftHandedMouse = false;
_noborder = false;
screenShotNameTemplate = "";
blocked_level = 0;
@@ -132,6 +132,7 @@
_eventLoop = new QEventLoop( qApp );
_do_exit_loop = false;
+#if 0
// Create main window for `opt(`defaultsize) dialogs.
//
// We have to use something else than QWidgetStack since QWidgetStack
@@ -145,6 +146,7 @@
if ( _fullscreen )
_main_win->move( 0, 0 );
+#endif
// Set window title
@@ -167,6 +169,7 @@
}
}
+#if 0
_main_win->setWindowTitle( title );
@@ -175,6 +178,7 @@
// the main window - there is nothing to display yet.
_main_win->hide();
+#endif
// Ugly hack as a workaround of bug #121872 (Segfault at program exit
@@ -381,25 +385,6 @@
}
-
-void YQUI::internalError( const char * msg )
-{
- normalCursor();
- int button = QMessageBox::critical( 0, "YaST2 Internal Error", msg,
- QMessageBox::Abort | QMessageBox::Default,
- 0 ); // button1
- busyCursor();
-
- if ( button == QMessageBox::Abort )
- {
- raiseFatalError();
- abort();
-
- // exit() leaves a process running (WFM?), so this really seems to be
- // the only way to make sure we are really going down.
- }
-}
-
void YQUI::idleLoop( int fd_ycp )
{
init_ui();
@@ -419,16 +404,19 @@
delete notifier;
}
+
void YQUI::leaveIdleLoop()
{
_leave_idle_loop = true;
}
+
void YQUI_Ui::slotLeaveIdleLoop()
{
YQUI::ui()->leaveIdleLoop();
}
+
void YQUI::sendEvent( YEvent * event )
{
if ( event )
@@ -441,7 +429,7 @@
}
-YEvent * YQUI::userInput( unsigned long timeout_millisec )
+YEvent * YQUI::userInput( int timeout_millisec )
{
init_ui();
@@ -456,7 +444,7 @@
#endif
YEvent * event = 0;
- YQDialog * dialog = dynamic_cast ( YDialog::currentDialog( false ) );
+ YDialog * dialog = YDialog::currentDialog( false );
_user_input_timer->stop();
@@ -476,7 +464,7 @@
event = _event_handler.consumePendingEvent();
// Display a busy cursor, but only if there is no other activity within
- // BUSY_CURSOR_TIMEOUT milliseconds (avoid cursor flicker)
+ // BUSY_CURSOR_TIMEOUT milliseconds: Avoid cursor flicker.
_busy_cursor_timer->start( BUSY_CURSOR_TIMEOUT ); // single shot
}
@@ -495,7 +483,7 @@
if ( ! pendingEvent() )
{
- YQDialog * dialog = dynamic_cast ( YDialog::currentDialog( false ) );
+ YDialog * dialog = YDialog::currentDialog( false );
if ( dialog )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQUI.h new/yast2-qt-2.16.24/src/YQUI.h
--- old/yast2-qt-2.16.20/src/YQUI.h 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQUI.h 2008-02-05 10:04:35.000000000 +0100
@@ -39,7 +39,6 @@
class QY2Settings;
class YEvent;
class YQOptionalWidgetFactory;
-class YQPackageSelectorPlugin;
class YQWidgetFactory;
class YQApplication;
class YQUI_Ui;
@@ -191,13 +190,6 @@
void askPlayMacro();
/**
- * Issue an internal error: Open popup with that message and wait.
- *
- * Reimplemented from YUI.
- **/
- void internalError( const char * msg );
-
- /**
* Block (or unblock) events. If events are blocked, any event sent
* should be ignored until events are unblocked again.
*
@@ -246,33 +238,11 @@
void askConfigureLogging();
/**
- * A mouse click with the wrong mouse button was detected - e.g., a right
- * click on a push button. The user might be left-handed, but his mouse
- * might not (yet) be configured for left-handed use - e.g., during
- * installation. Ask him if he would like his mouse temporarily configured
- * as a left-handed mouse.
- *
- * This status can be queried with UI::GetDisplayInfo() ("LeftHandedMouse").
- **/
- void maybeLeftHandedUser();
-
-
-protected:
-
- /**
- * Idle around until fd_ycp is readable and handle repaints.
- * This is only used when a separate ui thread is running.
- *
- * Reimplemented from YUI.
- **/
- virtual void idleLoop( int fd_ycp );
-
- /**
* Go into event loop until next user input is available.
*
* Reimplemented from YUI.
**/
- YEvent * userInput( unsigned long timeout_millisec = 0 );
+ YEvent * userInput( int timeout_millisec = 0 );
/**
* Check the event queue for user input. Don't wait.
@@ -282,23 +252,6 @@
YEvent * pollInput();
/**
- * Show and activate a dialog.
- *
- * Reimplemented from YUI.
- **/
- void showDialog( YDialog * dialog );
-
- /**
- * Decativate and close a dialog. This does not delete the dialog yet.
- *
- * Reimplemented from YUI.
- **/
- void closeDialog( YDialog * dialog );
-
-
-public:
-
- /**
* Initialize and set a textdomain for gettext()
**/
static void setTextdomain( const char * domain );
@@ -343,12 +296,6 @@
virtual float layoutUnits( YUIDimension dim, int device_units );
/**
- * Returns the package selector plugin singleton of this UI or creates it
- * (including loading the plugin lib) if it does not exist yet.
- **/
- YQPackageSelectorPlugin * packageSelectorPlugin();
-
- /**
* Show hourglass cursor.
*
* Reimplemented from YUI.
@@ -357,6 +304,9 @@
protected:
+
+protected:
+
/**
* Display capabilities.
* [Reimplemented from YUI]
@@ -378,16 +328,11 @@
bool leftHandedMouse() { return _leftHandedMouse; }
- QMap screenShotNo;
- QString screenShotNameTemplate;
-
/**
* Application shutdown
**/
bool close();
-protected:
-
/**
* Handle command line args
**/
@@ -401,32 +346,35 @@
void init_ui();
/**
+ * Idle around until fd_ycp is readable and handle repaints.
+ * This is only used when a separate ui thread is running.
+ *
+ * Reimplemented from YUI.
+ **/
+ virtual void idleLoop( int fd_ycp );
+
+ /**
* Timeout during TimeoutUserInput() / WaitForEvent()
**/
void userInputTimeout();
void leaveIdleLoop();
+
+
//
// Data members
//
- /**
- * Use the entire available screen
- **/
- bool _fullscreen;
+ QMap screenShotNo;
+ QString screenShotNameTemplate;
- /**
- * No window border for the main window
- **/
+ bool _fullscreen;
bool _noborder;
- /**
- * Container for the widget stack. QWidgetStack cannot handle a WFlags
- * argument, so this needs to be embedded into something else - and a QVBox
- * at least handles all the sizeHint and resize stuff.
- **/
+#if 0
QWidget * _main_win;
+#endif
/**
* Size for `opt(`defaultsize) dialogs.
@@ -434,9 +382,9 @@
QSize _default_size;
/**
- * This flag is set during @ref #userInput in order to tell
- * @ref #returnNow to call exit_loop, which only may be called
- * after enter_loop.
+ * This flag is set during userInput() in order to tell
+ * returnNow() to call exit_loop(), which only may be called
+ * after enter_loop().
**/
bool _do_exit_loop;
@@ -507,6 +455,8 @@
YQUI_Ui *_qobject;
};
+
+
class YQUI_Ui : public QObject
{
Q_OBJECT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQUI_widgets.cc new/yast2-qt-2.16.24/src/YQUI_widgets.cc
--- old/yast2-qt-2.16.20/src/YQUI_widgets.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQUI_widgets.cc 1970-01-01 01:00:00.000000000 +0100
@@ -1,50 +0,0 @@
-/*---------------------------------------------------------------------\
-| |
-| __ __ ____ _____ ____ |
-| \ \ / /_ _/ ___|_ _|___ \ |
-| \ V / _` \___ \ | | __) | |
-| | | (_| |___) || | / __/ |
-| |_|\__,_|____/ |_| |_____| |
-| |
-| core system |
-| (C) SuSE GmbH |
-\----------------------------------------------------------------------/
-
- File: YUIQt_widgets.cc
-
- Author: Stefan Hundhammer
-
-/-*/
-
-#define YUILogComponent "qt-ui"
-#include "YUILog.h"
-#include <QDesktopWidget>
-
-#include "YQUI.h"
-
-#include "YQDialog.h"
-#include "YQPackageSelectorPlugin.h"
-
-
-
-YQPackageSelectorPlugin * YQUI::packageSelectorPlugin()
-{
- static YQPackageSelectorPlugin * plugin = 0;
-
- if ( ! plugin )
- {
- plugin = new YQPackageSelectorPlugin();
-
- // This is a deliberate memory leak: If an application requires a
- // PackageSelector, it is a package selection application by
- // definition. In this case, the qt_pkg plugin is intentionally kept
- // open to avoid repeated start-up cost of the plugin and libzypp.
- }
-
- return plugin;
-}
-
-
-
-
-// EOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQUI_x11.cc new/yast2-qt-2.16.24/src/YQUI_x11.cc
--- old/yast2-qt-2.16.20/src/YQUI_x11.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQUI_x11.cc 2008-02-05 10:04:36.000000000 +0100
@@ -44,42 +44,6 @@
#include
-int YQUI::getDisplayWidth()
-{
- return qApp->desktop()->width();
-}
-
-
-int YQUI::getDisplayHeight()
-{
- return qApp->desktop()->height();
-}
-
-
-int YQUI::getDisplayDepth()
-{
- return qApp->desktop()->depth();
-}
-
-
-long YQUI::getDisplayColors()
-{
- return 1L << qApp->desktop()->depth();
-}
-
-
-int YQUI::getDefaultWidth()
-{
- return _default_size.width();
-}
-
-
-int YQUI::getDefaultHeight()
-{
- return _default_size.height();
-}
-
-
int YQUI::defaultSize(YUIDimension dim) const
{
return dim == YD_HORIZ ? _default_size.width() : _default_size.height();
@@ -205,46 +169,5 @@
}
-void YQUI::maybeLeftHandedUser()
-{
- if ( _askedForLeftHandedMouse )
- return;
-
-
- QString message =
- _( "You clicked the right mouse button "
- "where a left-click was expected."
- "\n"
- "Switch left and right mouse buttons?"
- );
- int button = QMessageBox::question( 0,
- // Popup dialog caption
- _( "Unexpected Click" ),
- message,
- QMessageBox::Yes | QMessageBox::Default,
- QMessageBox::No,
- QMessageBox::Cancel | QMessageBox::Escape );
-
- if ( button == QMessageBox::Yes )
- {
-
- const char * command =
- _leftHandedMouse ?
- "xmodmap -e \"pointer = 1 2 3\"": // switch back to right-handed mouse
- "xmodmap -e \"pointer = 3 2 1\""; // switch to left-handed mouse
-
- _leftHandedMouse = ! _leftHandedMouse; // might be set repeatedly!
- _askedForLeftHandedMouse = false; // give the user a chance to switch back
- yuiMilestone() << "Switching mouse buttons: " << command << endl;
-
- system( command );
- }
- else if ( button == 1 ) // No
- {
- _askedForLeftHandedMouse = true;
- }
-}
-
-
// EOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/src/YQWidgetFactory.cc new/yast2-qt-2.16.24/src/YQWidgetFactory.cc
--- old/yast2-qt-2.16.20/src/YQWidgetFactory.cc 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/src/YQWidgetFactory.cc 2008-02-05 10:04:35.000000000 +0100
@@ -21,7 +21,7 @@
#include "YUILog.h"
#include "YQWidgetFactory.h"
-#include "YQUI.h"
+#include "YQApplication.h"
#include "YUIException.h"
#include "YQPackageSelectorPlugin.h"
#include "YQMainWinDock.h"
@@ -30,12 +30,14 @@
using std::string;
+
YQWidgetFactory::YQWidgetFactory()
: YWidgetFactory()
{
// NOP
}
+
YQWidgetFactory::~YQWidgetFactory()
{
// NOP
@@ -292,7 +294,7 @@
YQPackageSelector *
YQWidgetFactory::createPackageSelector( YWidget * parent, long modeFlags )
{
- YQPackageSelectorPlugin * plugin = YQUI::ui()->packageSelectorPlugin();
+ YQPackageSelectorPlugin * plugin = YQApplication::packageSelectorPlugin();
if ( plugin )
return plugin->createPackageSelector( parent, modeFlags );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/VERSION.cmake new/yast2-qt-2.16.24/VERSION.cmake
--- old/yast2-qt-2.16.20/VERSION.cmake 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/VERSION.cmake 2008-02-05 10:04:36.000000000 +0100
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "16")
-SET(VERSION_PATCH "20")
+SET(VERSION_PATCH "24")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.20/yast2-qt.spec.in new/yast2-qt-2.16.24/yast2-qt.spec.in
--- old/yast2-qt-2.16.20/yast2-qt.spec.in 2008-02-01 08:19:28.000000000 +0100
+++ new/yast2-qt-2.16.24/yast2-qt.spec.in 2008-02-05 10:04:36.000000000 +0100
@@ -6,8 +6,8 @@
Summary: -
BuildRequires: yast2-devtools >= 2.16.3
-BuildRequires: yast2-core-devel >= 2.16.25
-Requires: yast2-core >= 2.16.25
+BuildRequires: yast2-core-devel >= 2.16.27
+Requires: yast2-core >= 2.16.27
Requires: yast2_theme >= 2.16.1
Requires: libzypp >= 3.11.8
Provides: yast2_ui
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org