Public Member Functions | |
gServerFavoriteMenuEntries (gServerFavorite &fav, uMenu &edit_menu) | |
~gServerFavoriteMenuEntries () | |
Private Attributes | |
uMenu * | edit_ |
uMenuItem * | editmenu_ |
Definition at line 300 of file gServerFavorites.cpp.
gServerFavoriteMenuEntries::gServerFavoriteMenuEntries | ( | gServerFavorite & | fav, | |
uMenu & | edit_menu | |||
) | [inline] |
Definition at line 303 of file gServerFavorites.cpp.
References edit_, editmenu_, gCustomConnectEntries::Generate(), gServerFavorite::GetIndex(), gServerFavorite::name_, tOutput::SetTemplateParameter(), sg_AddBookmarkString(), sg_GetBookmarkString(), and tNEW.
00304 { 00305 // prepare output reading "Edit <server name>" 00306 tString serverName = tColoredString::RemoveColors(fav.name_); 00307 if ( serverName == "" || serverName == "Empty" ) 00308 { 00309 std::stringstream s; 00310 s << "Server " << fav.GetIndex()+1; 00311 00312 serverName = s.str().c_str(); 00313 } 00314 00315 tOutput fe; 00316 fe.SetTemplateParameter(1, serverName); 00317 sg_AddBookmarkString( "menu_edit_slot", fe ); 00318 00319 // create edit menu 00320 edit_ = tNEW(uMenu) (fe); 00321 editmenu_ = tNEW(gMenuItemEditSubmenu) ( &edit_menu, edit_, fe); 00322 00323 Generate( fav, edit_ ); 00324 00325 tNEW(uMenuItemString) ( edit_,sg_GetBookmarkString( "menu_name" ),sg_GetBookmarkString( "menu_name_help" ),fav.name_); 00326 }
gServerFavoriteMenuEntries::~gServerFavoriteMenuEntries | ( | ) | [inline] |
uMenu* gServerFavoriteMenuEntries::edit_ [private] |
Definition at line 335 of file gServerFavorites.cpp.
Referenced by gServerFavoriteMenuEntries(), and ~gServerFavoriteMenuEntries().
uMenuItem* gServerFavoriteMenuEntries::editmenu_ [private] |
Definition at line 336 of file gServerFavorites.cpp.
Referenced by gServerFavoriteMenuEntries(), and ~gServerFavoriteMenuEntries().