Author: sh-sh-sh
Date: Fri Feb 1 16:10:17 2008
New Revision: 44106
URL: http://svn.opensuse.org/viewcvs/yast?rev=44106&view=rev
Log:
use widget pointers, not artificially introduced IDs
Modified:
trunk/ncurses/src/NCAskForDirectory.cc
Modified: trunk/ncurses/src/NCAskForDirectory.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCAskForDirectory.cc?rev=44106&r1=44105&r2=44106&view=diff
==============================================================================
--- trunk/ncurses/src/NCAskForDirectory.cc (original)
+++ trunk/ncurses/src/NCAskForDirectory.cc Fri Feb 1 16:10:17 2008
@@ -22,7 +22,6 @@
#include "NCAskForDirectory.h"
-#include "YWidgetID.h"
#include "YDialog.h"
#include "YTypes.h"
#include "NCLayoutBox.h"
@@ -39,14 +38,6 @@
Textdomain "packages"
*/
-namespace
-{
- const string idOk( "ok" );
- const string idCancel( "cancel" );
- const string idDirList( "dirlist" );
- const string idDirName( "dirname" );
- const string idDetails( "details" );
-}
///////////////////////////////////////////////////////////////////
//
@@ -107,18 +98,11 @@
dirName->setNotify( true );
dirName->setStretchable( YD_HORIZ, true );
-#warning is this widget ID really needed?
- YStringWidgetID * dirID = new YStringWidgetID( idDirName );
- dirName->setId( dirID );
-
// add the checkBox detailed
NCLayoutBox * hSplit = new NCLayoutBox( split, YD_HORIZ );
// label for checkbox
detailed = new NCCheckBox( hSplit, _( "&Detailed View" ), false );
-#warning is this widget ID really needed?
- YStringWidgetID * detailsID = new YStringWidgetID( idDetails );
- detailed->setId( detailsID );
detailed->setNotify( true );
// create table header for table type T_Overview
@@ -132,10 +116,6 @@
NCFileTable::T_Overview,
iniDir );
-#warning is this widget ID really needed?
- YStringWidgetID * dirListID = new YStringWidgetID( idDirList );
- dirList->setId( dirListID );
-
new NCSpacing( split, YD_VERT, false, 1.0 );
// HBox for the buttons
@@ -147,10 +127,6 @@
okButton = new NCPushButton( hSplit1, _( "&OK" ) );
okButton->setFunctionKey( 10 );
okButton->setStretchable( YD_HORIZ, true );
-
-#warning is this widget ID really needed?
- YStringWidgetID * okID = new YStringWidgetID ( idOk );
- okButton->setId( okID );
new NCSpacing( hSplit1, YD_HORIZ, true, 0.4 );
@@ -159,12 +135,7 @@
cancelButton->setFunctionKey( 9 );
cancelButton->setStretchable( YD_HORIZ, true);
-#warning is this widget ID really needed?
- YStringWidgetID * cancelID = new YStringWidgetID (idCancel );
- cancelButton->setId( cancelID );
-
new NCSpacing( hSplit1, YD_HORIZ, true, 0.2 );
-
}
///////////////////////////////////////////////////////////////////
@@ -238,60 +209,55 @@
postevent.detail = NCursesEvent::NODETAIL;
-#warning compare widget pointers here, not IDs
- YWidgetID * currentId = dynamic_cast