Author: sh-sh-sh
Date: Mon Jul 9 23:54:04 2007
New Revision: 39263
URL: http://svn.opensuse.org/viewcvs/yast?rev=39263&view=rev
Log:
removed obsolete embedding
Removed:
branches/tmp/sh/mod-ui/qt/src/qxembed.cc
branches/tmp/sh/mod-ui/qt/src/qxembed.h
Modified:
branches/tmp/sh/mod-ui/qt/src/Makefile.am
branches/tmp/sh/mod-ui/qt/src/YQUI.h
branches/tmp/sh/mod-ui/qt/src/YQUI_core.cc
branches/tmp/sh/mod-ui/qt/src/YQWizard.cc
branches/tmp/sh/mod-ui/qt/src/YQWizard.h
Modified: branches/tmp/sh/mod-ui/qt/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/Makefile.am?rev=39263&r1=39262&r2=39263&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/Makefile.am (original)
+++ branches/tmp/sh/mod-ui/qt/src/Makefile.am Mon Jul 9 23:54:04 2007
@@ -110,8 +110,7 @@
QY2CharValidator.cc \
QY2ListView.cc \
QY2Settings.cc \
- QY2LayoutUtils.cc \
- qxembed.cc
+ QY2LayoutUtils.cc
@@ -172,8 +171,7 @@
QY2DiskUsageList.moc \
QY2FloppyMountDialog.moc \
QY2CharValidator.moc \
- QY2ListView.moc \
- qxembed.moc
+ QY2ListView.moc
YQUI_core.o YQUI_core.lo: YQUI.moc
@@ -227,7 +225,6 @@
QY2FloppyMountDialog.o QY2FloppyMountDialog.lo: QY2FloppyMountDialog.cc
QY2CharValidator.o QY2CharValidator.lo: QY2CharValidator.moc
QY2ListView.o QY2ListView.lo: QY2ListView.moc
-qxembed.o qxembed.lo: qxembed.moc
@@ -278,8 +275,6 @@
QY2CharValidator.moc: QY2CharValidator.h
QY2ListView.moc: QY2ListView.h
-qxembed.moc: qxembed.h
-
%.moc: %.h
$(MOC) $< -o $@
Modified: branches/tmp/sh/mod-ui/qt/src/YQUI.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQUI.h?rev=39263&r1=39262&r2=39263&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQUI.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQUI.h Mon Jul 9 23:54:04 2007
@@ -98,12 +98,6 @@
public:
/**
- * Set the parent widget for embedding the UI into a KPart or KCMShell.
- * Used by kyast.
- **/
- static void setEmbeddingParent( QWidget * p );
-
- /**
* Returns the UI's default font.
**/
const QFont & currentFont();
@@ -236,18 +230,6 @@
{ _auto_activate_dialogs = activate; }
/**
- * Are we running embedded into another application, e.g., inside the KDE
- * control center?
- **/
- bool runningEmbedded() const;
-
- /**
- * Returns true if debugging embedding mode is on, i.e., when cmd line arg
- * --debug-embedding was given.
- **/
- bool debugEmbedding() const { return _debug_embedding; }
-
- /**
* Block (or unblock) events. If events are blocked, any event sent
* should be ignored until events are unblocked again.
*
@@ -728,11 +710,6 @@
bool _decorate_toplevel_window;
/**
- * Fake embedding mode (for layout debugging in embedding mode)
- **/
- bool _debug_embedding;
-
- /**
* 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.
@@ -850,17 +827,6 @@
**/
QTranslator _qtTranslations;
-
- /**
- * Parent widget for embedding in a KPart or KCMShell
- **/
- static QWidget * _embeddingParent;
-
- /**
- * Flag that indicates if we are running embedded
- **/
- bool _running_embedded;
-
/**
* Saved normal palette
**/
Modified: branches/tmp/sh/mod-ui/qt/src/YQUI_core.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQUI_core.cc?rev=39263&r1=39262&r2=39263&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQUI_core.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQUI_core.cc Mon Jul 9 23:54:04 2007
@@ -25,8 +25,6 @@
#include
#include
-#include "qxembed.h"
-
#include
#include
@@ -50,8 +48,7 @@
#define KYAST_EMBEDDING 0
-YQUI * YQUI::_ui = 0;
-QWidget * YQUI::_embeddingParent = 0;
+YQUI * YQUI::_ui = 0;
static void qMessageHandler( QtMsgType type, const char * msg );
@@ -78,8 +75,6 @@
_have_wm = true;
_fullscreen = false;
_decorate_toplevel_window = true;
- _debug_embedding = false;
- _running_embedded = false;
_usingVisionImpairedPalette = false;
_leftHandedMouse = false;
_askedForLeftHandedMouse = false;
@@ -87,14 +82,7 @@
qInstallMsgHandler( qMessageHandler );
-#if ! KYAST_EMBEDDING
- _running_embedded = ( getenv( "KCMYAST2_CALL" ) != 0 );
-#endif
-
-#if KYAST_EMBEDDING
- if ( ! runningEmbedded() )
-#endif
- new QApplication( argc, argv );
+ new QApplication( argc, argv );
loadPredefinedQtTranslations();
_normalPalette = qApp->palette();
@@ -123,10 +111,7 @@
if (_main_win)
delete _main_win;
- if ( _embeddingParent )
- _main_win = new QVBox( _embeddingParent );
- else
- _main_win = new QVBox( 0, 0, wflags ); // parent, name, wflags
+ _main_win = new QVBox( 0, 0, wflags ); // parent, name, wflags
// Create widget stack for `opt(`defaultsize) dialogs
@@ -153,8 +138,7 @@
if ( strlen( hostname ) > 0 )
{
if ( ( strcmp( hostname, "(none)" ) != 0 &&
- strcmp( hostname, "linux" ) != 0 )
- || runningEmbedded() )
+ strcmp( hostname, "linux" ) != 0 ) )
{
title += "@";
title += hostname;
@@ -165,25 +149,11 @@
_main_win->setCaption( title );
- // Hide the main window unless we are running embedded. The first call to
- // UI::OpenDialog() on an `opt(`defaultSize) dialog will trigger a
- // showDialog() call that shows the main window - there is nothing to
- // display yet.
- //
- // In embedded mode, keep the main window open so the embedding application
- // (kcontrol) catches the main window as YaST2's first window and not some
- // popup window that may appear before this. An empty grey area for the
- // main window (that will appear for a while) is a lot better than a
- // "please wait" popup zoomed to near full screen that may be embedded -
- // with a large main window that opens somewhere else on the screen.
-
- if ( ! runningEmbedded() )
- _main_win->hide();
- else
- {
- _main_win->show();
- y2milestone( "Running in embedded mode - leaving main window open" );
- }
+ // Hide the main window for now. The first call to UI::OpenDialog() on an
+ // `opt(`defaultSize) dialog will trigger a showDialog() call that shows
+ // the main window - there is nothing to display yet.
+
+ _main_win->hide();
// Ugly hack as a workaround of bug #121872 (Segfault at program exit
@@ -213,7 +183,6 @@
// Init other stuff
qApp->setFont( currentFont() );
- QXEmbed::initialize();
busyCursor();
connect( & _user_input_timer, SIGNAL( timeout() ),
@@ -247,7 +216,6 @@
if ( opt == QString( "-no-wm" ) ) _have_wm = false;
else if ( opt == QString( "-fullscreen" ) ) _fullscreen = true;
else if ( opt == QString( "-noborder" ) ) _decorate_toplevel_window = false;
- else if ( opt == QString( "-debug-embedding") ) _debug_embedding = true;
else if ( opt == QString( "-auto-font" ) ) _auto_fonts = true;
else if ( opt == QString( "-auto-fonts" ) ) _auto_fonts = true;
// --macro is handled by YUI_component
@@ -301,7 +269,7 @@
{
YQWidgetFactory * factory = new YQWidgetFactory();
YUI_CHECK_NEW( factory );
-
+
return factory;
}
@@ -312,7 +280,7 @@
{
YQOptionalWidgetFactory * factory = new YQOptionalWidgetFactory();
YUI_CHECK_NEW( factory );
-
+
return factory;
}
@@ -409,7 +377,9 @@
// process Qt events until fd_ycp is readable.
QSocketNotifier * notifier = new QSocketNotifier( fd_ycp, QSocketNotifier::Read );
- QObject::connect(notifier, SIGNAL( activated( int ) ), this, SLOT( leaveIdleLoop( int ) ) );
+ QObject::connect( notifier, SIGNAL( activated ( int ) ),
+ this, SLOT ( leaveIdleLoop( int ) ) );
+
notifier->setEnabled( true );
while ( !_leave_idle_loop )
@@ -519,7 +489,6 @@
bool has_defaultsize = opt.hasDefaultSize.value();
QWidget * qt_parent = _main_win;
-
// Popup dialogs get the topmost other popup dialog as their parent since
// some window managers (e.g., fvwm2 as used in the inst-sys) otherwise
// tend to confuse the stacking order of popup dialogs.
@@ -595,20 +564,13 @@
if ( --_main_dialog_id < 1 ) // nothing left on the stack
{
- if ( ! runningEmbedded() )
- {
- // y2milestone( "Hiding main window" );
- _main_win->hide();
- }
- else
- {
- y2milestone( "Running embedded - keeping (empty) main window open" );
- }
-
+ // y2milestone( "Hiding main window" );
+ _main_win->hide();
_main_dialog_id = 0; // this should not be necessary - but better be safe than sorry
}
else
{
+ // FIXME: This is anti-social behaviour - do this only in the inst-sys
_widget_stack->raiseWidget( _main_dialog_id );
}
}
@@ -649,22 +611,6 @@
}
-void YQUI::setEmbeddingParent( QWidget * p )
-{
- _embeddingParent = p;
-}
-
-
-bool YQUI::runningEmbedded() const
-{
-#if KYAST_EMBEDDING
- return _embeddingParent != 0;
-#else
- return _running_embedded;
-#endif
-}
-
-
void
YQUI::setTextdomain( const char * domain )
{
Modified: branches/tmp/sh/mod-ui/qt/src/YQWizard.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQWizard.cc?rev=39263&r1=39262&r2=39263&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQWizard.cc (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQWizard.cc Mon Jul 9 23:54:04 2007
@@ -144,10 +144,6 @@
_protectNextButton = false;
_stepsDirty = false;
_direction = YQWizard::Forward;
- _runningEmbedded = YQUI::ui()->runningEmbedded() || YQUI::ui()->debugEmbedding();
-
- if ( _treeEnabled )
- _runningEmbedded = false;
_sideBar = 0;
_stepsPanel = 0;
@@ -183,41 +179,33 @@
// Load graphics
//
- if ( ! runningEmbedded() )
- {
#if ENABLE_GRADIENTS
- loadGradientPixmaps();
+ loadGradientPixmaps();
#endif
- if ( _stepsEnabled )
- loadStepsIcons();
- }
+ if ( _stepsEnabled )
+ loadStepsIcons();
//
// Create widgets
//
- if ( ! runningEmbedded() )
- {
#if ENABLE_TITLEBAR
- layoutTitleBar( this );
+ layoutTitleBar( this );
#else
- QWidget * spacer = addVSpacing( this, WORK_AREA_TOP_MARGIN );
- YUI_CHECK_NEW( spacer );
+ QWidget * spacer = addVSpacing( this, WORK_AREA_TOP_MARGIN );
+ YUI_CHECK_NEW( spacer );
-# if ENABLE_GRADIENTS
- spacer->setPaletteBackgroundColor( _gradientCenterColor );
-# endif
+# if ENABLE_GRADIENTS
+ spacer->setPaletteBackgroundColor( _gradientCenterColor );
+# endif
#endif
- }
QHBox * hBox = new QHBox( this );
YUI_CHECK_NEW( hBox );
- if ( ! runningEmbedded() )
- layoutSideBar( hBox );
-
+ layoutSideBar( hBox );
layoutWorkArea( hBox );
y2debug( "Constructor finished." );
@@ -1074,14 +1062,11 @@
layoutButtonBox( workAreaVBox );
- if ( ! runningEmbedded() )
- {
- //
- // Spacer (purely decorative) at the right of the client area
- //
+ //
+ // Spacer (purely decorative) at the right of the client area
+ //
- addGradientColumn( parentHBox, WORK_AREA_RIGHT_MARGIN );
- }
+ addGradientColumn( parentHBox, WORK_AREA_RIGHT_MARGIN );
}
@@ -1227,8 +1212,7 @@
vbox->addSpacing( WORK_AREA_BOTTOM_MARGIN );
#if ENABLE_GRADIENTS
- if ( ! runningEmbedded() )
- setBottomCroppedGradient( buttonBox, _bottomGradientPixmap, buttonBox->sizeHint().height() );
+ setBottomCroppedGradient( buttonBox, _bottomGradientPixmap, buttonBox->sizeHint().height() );
#endif
buttonBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) ); // hor/vert
Modified: branches/tmp/sh/mod-ui/qt/src/YQWizard.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/qt/src/YQWizard.h?rev=39263&r1=39262&r2=39263&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/qt/src/YQWizard.h (original)
+++ branches/tmp/sh/mod-ui/qt/src/YQWizard.h Mon Jul 9 23:54:04 2007
@@ -441,14 +441,6 @@
void sendEvent( YCPValue id );
void sendEvent( YWidgetID * id );
-
- /**
- * Check if we are running embedded as a KCMShell or KPart or something
- * similar. This is really just a (chached) shortcut to
- * YQUI::runningEmbedded().
- **/
- bool runningEmbedded() const { return _runningEmbedded; }
-
/**
* Returns 'true' if the application is running on a high-color display,
* i.e., on an X visual with more than 8 bit depth.
@@ -579,7 +571,6 @@
bool _verboseCommands;
bool _protectNextButton;
bool _stepsDirty;
- bool _runningEmbedded;
bool _sendButtonEvents;
Direction _direction;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org