Author: gs
Date: Tue May 12 11:02:25 2009
New Revision: 57125
URL: http://svn.opensuse.org/viewcvs/yast?rev=57125&view=rev
Log:
use YUI::widgetFactory() in createLayout()
Modified:
trunk/ncurses/src/NCAskForFile.cc
trunk/ncurses/src/NCAskForFile.h
Modified: trunk/ncurses/src/NCAskForFile.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCAskForFile.cc?rev=57125&r1=57124&r2=57125&view=diff
==============================================================================
--- trunk/ncurses/src/NCAskForFile.cc (original)
+++ trunk/ncurses/src/NCAskForFile.cc Tue May 12 11:02:25 2009
@@ -21,11 +21,10 @@
#include "NCAskForFile.h"
+#include "NCWidgetFactory.h"
#include "YDialog.h"
-#include "NCLayoutBox.h"
-#include "NCSpacing.h"
-#include "NCFrame.h"
+
#include "NCi18n.h"
#include
@@ -109,11 +108,14 @@
startDir = checkIniDir( iniDir );
// the vertical split is the (only) child of the dialog
- NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
+ YLayoutBox * split = YUI::widgetFactory()->createVBox( this );
- new NCLabel( split, headline, true, false ); // isHeading = true
+ YUI::widgetFactory()->createLabel( split,
+ headline,
+ true, // isHeading = true
+ false );
- NCFrame * frame = new NCFrame( split, "" );
+ YFrame * frame = YUI::widgetFactory()->createFrame( split, "" );
// label for text field showing the selected dir
dirName = new NCComboBox( frame, _( "Selected Directory:" ), false ); // editable = false;
@@ -121,14 +123,14 @@
dirName->setStretchable( YD_HORIZ, true );
// add the checkBox detailed
- NCLayoutBox * hSplit = new NCLayoutBox( split, YD_HORIZ );
+ YLayoutBox * hSplit = YUI::widgetFactory()->createHBox( split );
// label for checkbox
- detailed = new NCCheckBox( hSplit, _( "&Detailed View" ), false );
+ detailed = YUI::widgetFactory()->createCheckBox( hSplit, _( "&Detailed View" ), false );
detailed->setNotify( true );
// HBox for the lists
- NCLayoutBox * hSplit1 = new NCLayoutBox( split, YD_HORIZ );
+ YLayoutBox * hSplit1 = YUI::widgetFactory()->createHBox( split );
// create table header for table type T_Overview
YTableHeader * dirHeader = new YTableHeader();
@@ -156,7 +158,7 @@
fileList->setSendKeyEvents( true );
- NCLayoutBox * hSplit2 = new NCLayoutBox( split, YD_HORIZ );
+ YLayoutBox * hSplit2 = YUI::widgetFactory()->createHBox( split );
// opt.isEditable.setValue( edit );
// NCInputField doesn't support mode 'not editable' any longer
@@ -172,31 +174,32 @@
fileName->setValue( iniFileName );
// label for text field showing the filter (e.g. *.bak)
- NCComboBox * extension = new NCComboBox( hSplit2, _( "Filter:" ), false ); // editable = false
+ YComboBox * extension = YUI::widgetFactory()->createComboBox( hSplit2, _( "Filter:" ),
+ false ); // editable = false
extension->setStretchable( YD_HORIZ, true );
extension->addItem( filter,
true ); // selected
- new NCSpacing( split, YD_VERT, false, 1.0 );
+ YUI::widgetFactory()->createSpacing( split, YD_VERT, false, 1.0 );
// HBox for the buttons
- NCLayoutBox * hSplit3 = new NCLayoutBox( split, YD_HORIZ );
+ YLayoutBox * hSplit3 = YUI::widgetFactory()->createHBox( split );
- new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ); // stretchable = true
+ YUI::widgetFactory()->createSpacing( hSplit3, YD_HORIZ, true, 0.2 ); // stretchable = true
// add the OK button
- okButton = new NCPushButton( hSplit3, _( "&OK" ) );
+ okButton = YUI::widgetFactory()->createPushButton( hSplit3, _( "&OK" ) );
okButton->setFunctionKey( 10 );
okButton->setStretchable( YD_HORIZ, true );
- new NCSpacing( hSplit3, YD_HORIZ, true, 0.4 );
+ YUI::widgetFactory()->createSpacing( hSplit3, YD_HORIZ, true, 0.4 );
// add the Cancel button
- cancelButton = new NCPushButton( hSplit3, _( "&Cancel" ) );
+ cancelButton = YUI::widgetFactory()->createPushButton( hSplit3, _( "&Cancel" ) );
cancelButton->setFunctionKey( 9 );
cancelButton->setStretchable( YD_HORIZ, true );
- new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 );
+ YUI::widgetFactory()->createSpacing( hSplit3, YD_HORIZ, true, 0.2 );
// restore former text domain
setTextdomain( old_textdomain.c_str() );
}
@@ -351,7 +354,7 @@
}
-bool NCAskForFile::getCheckBoxValue( NCCheckBox * checkBox )
+bool NCAskForFile::getCheckBoxValue( YCheckBox * checkBox )
{
if ( checkBox )
{
Modified: trunk/ncurses/src/NCAskForFile.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCAskForFile.h?rev=57125&r1=57124&r2=57125&view=diff
==============================================================================
--- trunk/ncurses/src/NCAskForFile.h (original)
+++ trunk/ncurses/src/NCAskForFile.h Tue May 12 11:02:25 2009
@@ -42,13 +42,13 @@
NCAskForFile( const NCAskForFile & );
- NCPushButton * okButton;
- NCPushButton * cancelButton;
+ YPushButton * okButton;
+ YPushButton * cancelButton;
NCComboBox * dirName; // the selected directory
NCDirectoryTable *dirList; // the directory list
- NCCheckBox *detailed; // the 'Details' checkbox
+ YCheckBox *detailed; // the 'Details' checkbox
- bool getCheckBoxValue( NCCheckBox * detailed );
+ bool getCheckBoxValue( YCheckBox * detailed );
string iniFileName; // initial file name
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org