X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=zouba%2Fuicontroller.cpp;h=2f823d2c03511ff4ab55fc4463c1c44cfc20e4fe;hb=4397917b7035735b4e9adf5df1a8e79ccf5e9ab9;hp=f1a32cf59e173c9722cbfe28a17f9e65473b1236;hpb=1813f83c17c45d31039487a7612db00e5870008c;p=ptas diff --git a/zouba/uicontroller.cpp b/zouba/uicontroller.cpp index f1a32cf..2f823d2 100644 --- a/zouba/uicontroller.cpp +++ b/zouba/uicontroller.cpp @@ -19,6 +19,20 @@ UiController::UiController( Ui *ui ) : Location *homeLocation = locations->location( "home" ); Location *workLocation = locations->location( "work" ); + if ( homeLocation==0 ) { + homeLocation = new Location( "home" ); + locations->addLocation( homeLocation ); + } else if ( homeLocation->isValid() ) { + setHomeButtonValid(); + } + + if ( workLocation==0 ) { + workLocation = new Location( "work" ); + locations->addLocation( workLocation ); + } else if ( workLocation->isValid() ) { + setWorkButtonValid(); + } + connect( homeLocation, SIGNAL( becomeValid() ), this, SLOT( setHomeButtonValid() ) @@ -37,9 +51,6 @@ UiController::UiController( Ui *ui ) : locations, SLOT( saveLocation() ) ); - homeLocation->resolveAddress( Ytv::Home ); - workLocation->resolveAddress( Ytv::Work ); - destination.append( homeLocation ); destination.append( workLocation );