Skip to content

Commit

Permalink
Merge pull request #97 from joseivanlopez/ivan-menu-01
Browse files Browse the repository at this point in the history
Add MenuBar
  • Loading branch information
joseivanlopez authored Aug 12, 2020
2 parents 975f2e4 + cc7ccf4 commit 5acb147
Show file tree
Hide file tree
Showing 81 changed files with 1,122 additions and 409 deletions.
2 changes: 2 additions & 0 deletions SOURCECONF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ SET( ${TARGETLIB}_SOURCES
NCLabel.cc
NCProgressBar.cc
NCBusyIndicator.cc
NCMenuBar.cc
NCMenuButton.cc
NCPushButton.cc
NCDumbTab.cc
Expand Down Expand Up @@ -119,6 +120,7 @@ SET( ${TARGETLIB}_HEADERS
NCLabel.h
NCProgressBar.h
NCBusyIndicator.h
NCMenuBar.h
NCMenuButton.h
NCPushButton.h
NCDumbTab.h
Expand Down
6 changes: 3 additions & 3 deletions VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
SET( VERSION_MAJOR "2" )
SET( VERSION_MINOR "55" )
SET( VERSION_PATCH "1" )
SET( VERSION_MINOR "56" )
SET( VERSION_PATCH "0" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" )

##### This is needed for the libyui core ONLY.
##### These will be overridden from exports in LibyuiConfig.cmake
SET( SONAME_MAJOR "12" )
SET( SONAME_MAJOR "13" )
SET( SONAME_MINOR "0" )
SET( SONAME_PATCH "0" )
SET( SONAME "${SONAME_MAJOR}.${SONAME_MINOR}.${SONAME_PATCH}" )
4 changes: 2 additions & 2 deletions package/libyui-ncurses-doc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
#

%define parent libyui-ncurses
%define so_version 12
%define so_version 13

Name: %{parent}-doc
Version: 2.55.1
Version: 2.56.0
Release: 0
Source: %{parent}-%{version}.tar.bz2

Expand Down
7 changes: 7 additions & 0 deletions package/libyui-ncurses.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Aug 11 22:15:17 UTC 2020 - José Iván López González <jlopez@suse.com>

- Add MenuBar widget (bsc#1175115).
- Bump SO version to 13.
- 2.56.0

-------------------------------------------------------------------
Fri Jul 31 13:33:27 UTC 2020 - Martin Vidner <mvidner@suse.com>

Expand Down
4 changes: 2 additions & 2 deletions package/libyui-ncurses.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@


Name: libyui-ncurses
Version: 2.55.1
Version: 2.56.0
Release: 0
Source: %{name}-%{version}.tar.bz2

%define so_version 12
%define so_version 13
%define bin_name %{name}%{so_version}

%if 0%{?suse_version} > 1325
Expand Down
4 changes: 2 additions & 2 deletions src/NCAlignment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ NCAlignment::NCAlignment( YWidget * parent,
: YAlignment( parent, halign, valign )
, NCWidget( parent )
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
wstate = NC::WSdumb;
}


NCAlignment::~NCAlignment()
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
}


Expand Down
6 changes: 3 additions & 3 deletions src/NCApplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ NCApplication::askForSaveFileName( const std::string & startDir,
NCAskForSaveFileName * filePopup = new NCAskForSaveFileName( wpos( 1, 1 ), startDir, filter, headline );
YUI_CHECK_NEW( filePopup );

NCursesEvent retEvent = filePopup->showDirPopup( );
NCursesEvent retEvent = filePopup->showDirPopup();
YDialog::deleteTopmostDialog();

yuiMilestone() << "Returning: " << retEvent.result << std::endl;
Expand All @@ -85,7 +85,7 @@ NCApplication::askForExistingFile( const std::string & startDir,
NCAskForExistingFile * filePopup = new NCAskForExistingFile( wpos( 1, 1 ), startDir, filter, headline );
YUI_CHECK_NEW( filePopup );

NCursesEvent retEvent = filePopup->showDirPopup( );
NCursesEvent retEvent = filePopup->showDirPopup();
YDialog::deleteTopmostDialog();

yuiMilestone() << "Returning: " << retEvent.result << std::endl;
Expand All @@ -100,7 +100,7 @@ NCApplication::askForExistingDirectory( const std::string & startDir,
NCAskForExistingDirectory * dirPopup = new NCAskForExistingDirectory( wpos( 1, 1 ), startDir, headline );
YUI_CHECK_NEW( dirPopup );

NCursesEvent retEvent = dirPopup->showDirPopup( );
NCursesEvent retEvent = dirPopup->showDirPopup();
YDialog::deleteTopmostDialog();

yuiMilestone() << "Returning: " << retEvent.result << std::endl;
Expand Down
6 changes: 3 additions & 3 deletions src/NCAskForDirectory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ void NCAskForExistingDirectory::createLayout( const std::string & iniDir,
}


NCursesEvent & NCAskForExistingDirectory::showDirPopup( )
NCursesEvent & NCAskForExistingDirectory::showDirPopup()
{
postevent = NCursesEvent();

if ( !dirList || !dirName )
return postevent;

dirList->fillList( );
dirList->fillList();

dirList->setKeyboardFocus();

Expand Down Expand Up @@ -177,7 +177,7 @@ NCursesEvent NCAskForExistingDirectory::wHandleInput( wint_t ch )
}


bool NCAskForExistingDirectory::postAgain( )
bool NCAskForExistingDirectory::postAgain()
{
if ( !postevent.widget )
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/NCAskForDirectory.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class NCAskForExistingDirectory : public NCPopup
/**
* Shows the popup with the std::list of directories.
*/
NCursesEvent & showDirPopup( );
NCursesEvent & showDirPopup();

};

Expand Down
8 changes: 4 additions & 4 deletions src/NCAskForFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ NCAskForFile::NCAskForFile( const wpos & at,
}


NCAskForFile::~NCAskForFile( )
NCAskForFile::~NCAskForFile()
{

}
Expand Down Expand Up @@ -209,7 +209,7 @@ void NCAskForFile::createLayout( const std::string & iniDir,
}


NCursesEvent & NCAskForFile::showDirPopup( )
NCursesEvent & NCAskForFile::showDirPopup()
{
postevent = NCursesEvent();

Expand Down Expand Up @@ -264,15 +264,15 @@ void NCAskForFile::updateFileList()
{
// set new start dir and show the file list
fileList->setStartDir( dirList->getCurrentDir() );
fileList->fillList( );
fileList->fillList();

if ( iniFileName == "" )
// show the currently selected file
fileName->setValue( fileList->getCurrentFile() );
}


bool NCAskForFile::postAgain( )
bool NCAskForFile::postAgain()
{
if ( !postevent.widget )
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/NCAskForFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class NCAskForFile : public NCPopup
/**
* Shows the popup with the std::list of directories.
*/
NCursesEvent & showDirPopup( );
NCursesEvent & showDirPopup();

/**
* Show new file information
Expand Down
4 changes: 2 additions & 2 deletions src/NCBusyIndicator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ NCBusyIndicator::NCBusyIndicator( YWidget * parent,
, _rightwards( true )
, _alive( true )
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;

if ( timeout <= 0 )
timeout = 1;
Expand All @@ -103,7 +103,7 @@ NCBusyIndicator::~NCBusyIndicator()
NCBusyIndicatorObject = NULL;
delete _lwin;
delete _twin;
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
}


Expand Down
4 changes: 2 additions & 2 deletions src/NCButtonBox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ NCButtonBox::NCButtonBox( YWidget * parent )
: YButtonBox( parent )
, NCWidget( parent )
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
wstate = NC::WSdumb;
}


NCButtonBox::~NCButtonBox()
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
}


Expand Down
4 changes: 2 additions & 2 deletions src/NCCheckBox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ NCCheckBox::NCCheckBox( YWidget * parent,
, tristate( false )
, checkstate( checked ? S_ON : S_OFF )
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
setLabel( nlabel );
hotlabel = &label;
}


NCCheckBox::~NCCheckBox()
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
}


Expand Down
10 changes: 5 additions & 5 deletions src/NCCheckBoxFrame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NCCheckBoxFrame::NCCheckBoxFrame( YWidget * parent, const std::string & nlabel,
: YCheckBoxFrame( parent, nlabel, checked )
, NCWidget( parent )
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
wstate = NC::WSnormal;
framedim.Pos = wpos( 1 );
framedim.Sze = wsze( 2 );
Expand All @@ -49,7 +49,7 @@ NCCheckBoxFrame::NCCheckBoxFrame( YWidget * parent, const std::string & nlabel,

NCCheckBoxFrame::~NCCheckBoxFrame()
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
}


Expand Down Expand Up @@ -114,8 +114,8 @@ bool NCCheckBoxFrame::getParentValue( NCWidget * widget, bool initial )
enabled = !enabled;

// despite of frame->getValue(), don't enable child widgets if state
// of frame is NC::WSdisabeled
if ( frame->GetState() == NC::WSdisabeled )
// of frame is NC::WSdisabled
if ( frame->GetState() == NC::WSdisabled )
enabled = false;

break;
Expand All @@ -139,7 +139,7 @@ void NCCheckBoxFrame::setEnabled( bool do_bv )

c->Value()->setEnabled( do_it );
// explicitely set the state (needed for first run - bug #268352)
c->Value()->SetState( do_it ? NC::WSnormal : NC::WSdisabeled, true );
c->Value()->SetState( do_it ? NC::WSnormal : NC::WSdisabled, true );
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/NCComboBox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ NCComboBox::NCComboBox( YWidget * parent, const std::string & nlabel,
, index( -1 )
, InputMaxLength( -1 )
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
setLabel( nlabel );
hotlabel = &label;
setText( "" );
Expand All @@ -57,7 +57,7 @@ NCComboBox::~NCComboBox()
{
delete lwin;
delete twin;
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
}


Expand Down Expand Up @@ -407,7 +407,7 @@ void NCComboBox::tUpdate()
twin->bkgdset( wStyle().cursor );

if ( curpos < buffer.length() )
twin->add_attr_char( );
twin->add_attr_char();
else
twin->addch( ACS_CKBOARD );
}
Expand Down
2 changes: 1 addition & 1 deletion src/NCComboBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class NCComboBox : public YComboBox, public NCWidget
return true;
}

unsigned int getListSize( ) { return deflist.size(); }
unsigned int getListSize() { return deflist.size(); }

void deleteAllItems();

Expand Down
4 changes: 2 additions & 2 deletions src/NCCustomStatusItemSelector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ NCCustomStatusItemSelector::NCCustomStatusItemSelector( YWidget * parent,
const YItemCustomStatusVector & customStates )
: NCItemSelectorBase( parent, customStates )
{
yuiDebug() << endl;
// yuiDebug() << endl;
}


NCCustomStatusItemSelector::~NCCustomStatusItemSelector()
{
yuiDebug() << endl;
// yuiDebug() << endl;
}


Expand Down
2 changes: 1 addition & 1 deletion src/NCCustomStatusItemSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class NCCustomStatusItemSelector : public NCItemSelectorBase

private:

// Disable assignement operator and copy constructor
// Disable assignment operator and copy constructor

NCCustomStatusItemSelector & operator=( const NCCustomStatusItemSelector & );
NCCustomStatusItemSelector( const NCCustomStatusItemSelector & );
Expand Down
6 changes: 3 additions & 3 deletions src/NCDateField.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ NCDateField::NCDateField ( YWidget * parent,
: YDateField ( parent, nlabel )
, NCInputTextBase ( parent, false, fieldLength, fieldLength )
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;

setLabel ( nlabel );

Expand All @@ -54,7 +54,7 @@ NCDateField::NCDateField ( YWidget * parent,

NCDateField::~NCDateField()
{
yuiDebug() << std::endl;
// yuiDebug() << std::endl;
}

int NCDateField::preferredHeight()
Expand Down Expand Up @@ -121,7 +121,7 @@ void NCDateField::setValue ( const std::string & ntext )
}


std::string NCDateField::value( )
std::string NCDateField::value()
{
NCstring text ( buffer );

Expand Down
Loading

0 comments on commit 5acb147

Please sign in to comment.