"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/pathjumpop.cc" between
worker-4.0.1.tar.bz2 and worker-4.1.0.tar.bz2

About: Worker is a file manager for the X Window System with the classical two panel interface.

pathjumpop.cc  (worker-4.0.1.tar.bz2):pathjumpop.cc  (worker-4.1.0.tar.bz2)
skipping to change at line 105 skipping to change at line 105
if ( (*sellist.begin()).entry() != NULL ) { if ( (*sellist.begin()).entry() != NULL ) {
basename = (*sellist.begin()).entry()->name; basename = (*sellist.begin()).entry()->name;
dirname = NWC::Path::dirname( sellist.begin()->entry()->fullname ); dirname = NWC::Path::dirname( sellist.begin()->entry()->fullname );
} }
} }
ui.setCurrentDirname( dirname ); ui.setCurrentDirname( dirname );
ui.setCurrentBasename( basename ); ui.setCurrentBasename( basename );
} }
int res = ui.mainLoop( m_initial_tab == SHOW_BY_FILTER ? true : false ); PathJumpUI::initial_tab_t show_tab = PathJumpUI::SHOW_BY_TIME;
if ( m_initial_tab == SHOW_BY_FILTER ) {
show_tab = PathJumpUI::SHOW_BY_FILTER;
} else if ( m_initial_tab == SHOW_BY_PROGRAM ) {
show_tab = PathJumpUI::SHOW_BY_PROGRAM;
}
int res = ui.mainLoop( show_tab );
if ( res == 1 ) { if ( res == 1 ) {
std::string sel_path = ui.getSelectedPath(); bool stored = false;
std::string sel_path = ui.getSelectedPath( stored );
std::list< RefCount< ArgClass > > args; std::list< RefCount< ArgClass > > args;
if ( lm1 ) { if ( lm1 ) {
args.push_back( new StringArg( sel_path ) ); args.push_back( new StringArg( sel_path ) );
args.push_back( new KeyValueArg( "pathDBStored",
std::make_shared< BoolArg >( stored
) ) );
lm1->runCommand( "enter_dir", args ); lm1->runCommand( "enter_dir", args );
// if ( highlight_entry.empty() == false ) { // if ( highlight_entry.empty() == false ) {
// nm1->activateEntry( highlight_entry ); // nm1->activateEntry( highlight_entry );
// } // }
} }
} else if ( res == 2 ) { } else if ( res == 2 ) {
std::unique_ptr< NWC::Dir > resdir = ui.getResultsAsDir(); std::unique_ptr< NWC::Dir > resdir = ui.getResultsAsDir();
l1->switch2Mode( 0 ); l1->switch2Mode( 0 );
skipping to change at line 155 skipping to change at line 165
} }
bool bool
PathJumpOp::save( Datei *fh ) PathJumpOp::save( Datei *fh )
{ {
if ( fh == NULL ) return false; if ( fh == NULL ) return false;
switch ( m_initial_tab ) { switch ( m_initial_tab ) {
case SHOW_BY_FILTER: case SHOW_BY_FILTER:
fh->configPutPair( "initialtab", "showbyfilter" ); fh->configPutPair( "initialtab", "showbyfilter" );
break; break;
case SHOW_BY_PROGRAM:
fh->configPutPair( "initialtab", "showbyprogram" );
break;
default: default:
// don't save default value to be backward compatible // don't save default value to be backward compatible
break; break;
} }
return true; return true;
} }
int int
PathJumpOp::configure() PathJumpOp::configure()
{ {
skipping to change at line 189 skipping to change at line 202
AContainer *ac1_1 = ac1->add( new AContainer( win, 2, 1 ), 0, 0 ); AContainer *ac1_1 = ac1->add( new AContainer( win, 2, 1 ), 0, 0 );
ac1_1->setMinSpace( 5 ); ac1_1->setMinSpace( 5 );
ac1_1->setMaxSpace( 5 ); ac1_1->setMaxSpace( 5 );
ac1_1->setBorderWidth( 0 ); ac1_1->setBorderWidth( 0 );
ac1_1->add( new Text( aguix, 0, 0, catalog.getLocale( 1224 ) ), 0, 0, AConta iner::CO_FIX ); ac1_1->add( new Text( aguix, 0, 0, catalog.getLocale( 1224 ) ), 0, 0, AConta iner::CO_FIX );
rcyb = (CycleButton*)ac1_1->add( new CycleButton( aguix, 0, 0, 100, 0 ), 1, 0, AContainer::CO_INCWNR ); rcyb = (CycleButton*)ac1_1->add( new CycleButton( aguix, 0, 0, 100, 0 ), 1, 0, AContainer::CO_INCWNR );
rcyb->addOption( catalog.getLocale( 1225 ) ); rcyb->addOption( catalog.getLocale( 1225 ) );
rcyb->addOption( catalog.getLocale( 1226 ) ); rcyb->addOption( catalog.getLocale( 1226 ) );
rcyb->addOption( catalog.getLocale( 1327 ) );
rcyb->resize( rcyb->getMaxSize(), rcyb->getHeight() ); rcyb->resize( rcyb->getMaxSize(), rcyb->getHeight() );
ac1_1->readLimits(); ac1_1->readLimits();
switch ( m_initial_tab ) { switch ( m_initial_tab ) {
case SHOW_BY_FILTER: case SHOW_BY_FILTER:
rcyb->setOption( 1 ); rcyb->setOption( 1 );
break; break;
case SHOW_BY_PROGRAM:
rcyb->setOption( 2 );
break;
default: default:
rcyb->setOption( 0 ); rcyb->setOption( 0 );
break; break;
} }
AContainer *ac1_2 = ac1->add( new AContainer( win, 2, 1 ), 0, 1 ); AContainer *ac1_2 = ac1->add( new AContainer( win, 2, 1 ), 0, 1 );
ac1_2->setMinSpace( 5 ); ac1_2->setMinSpace( 5 );
ac1_2->setMaxSpace( -1 ); ac1_2->setMaxSpace( -1 );
ac1_2->setBorderWidth( 0 ); ac1_2->setBorderWidth( 0 );
Button *okb =(Button*)ac1_2->add( new Button( aguix, Button *okb =(Button*)ac1_2->add( new Button( aguix,
skipping to change at line 241 skipping to change at line 258
aguix->ReplyMessage( msg ); aguix->ReplyMessage( msg );
} }
} }
if ( endmode == 0 ) { if ( endmode == 0 ) {
// ok // ok
switch ( rcyb->getSelectedOption() ) { switch ( rcyb->getSelectedOption() ) {
case 1: case 1:
m_initial_tab = SHOW_BY_FILTER; m_initial_tab = SHOW_BY_FILTER;
break; break;
case 2:
m_initial_tab = SHOW_BY_PROGRAM;
break;
default: default:
m_initial_tab = SHOW_BY_TIME; m_initial_tab = SHOW_BY_TIME;
break; break;
} }
} }
delete win; delete win;
return endmode; return endmode;
} }
 End of changes. 7 change blocks. 
2 lines changed or deleted 23 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)