merge from default

This commit is contained in:
cemycc 2011-07-08 18:28:58 +03:00
parent b38e17f80f
commit 28bb59314f
14 changed files with 202 additions and 27 deletions

View file

@ -171,6 +171,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_STATIC "With static libraries." OFF)
ENDIF(WIN32)
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
###
# GUI toolkits
@ -522,6 +523,14 @@ MACRO(SETUP_EXTERNAL)
STRING(REGEX REPLACE "VC/bin/.+" "VC" VC_DIR ${CMAKE_CXX_COMPILER})
ENDIF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7")
ENDIF(MSVC10)
ELSE(WIN32)
IF(CMAKE_FIND_LIBRARY_SUFFIXES AND NOT APPLE)
IF(WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
ELSE(WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
ENDIF(WITH_STATIC_EXTERNAL AND NOT APPLE)
ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES)
ENDIF(WIN32)
IF(WITH_STLPORT)

View file

@ -0,0 +1,118 @@
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited
// Copyright (C) 2010 Dzmitry Kamiahin <dnk-88@tut.by>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CORE_CONSTANTS_H
#define CORE_CONSTANTS_H
namespace Core
{
namespace Constants
{
const char * const OVQT_VERSION_LONG = "0.1";
const char * const OVQT_VENDOR = "Ryzom Core";
const char * const OVQT_YEAR = "2010, 2011";
const char * const OVQT_CORE_PLUGIN = "Core";
//mainwindow
const char * const MAIN_WINDOW = "ObjectViewerQt.MainWindow";
//menubar
const char * const MENU_BAR = "ObjectViewerQt.MenuBar";
//menus
const char * const M_FILE = "ObjectViewerQt.Menu.File";
const char * const M_EDIT = "ObjectViewerQt.Menu.Edit";
const char * const M_VIEW = "ObjectViewerQt.Menu.View";
const char * const M_SCENE = "ObjectViewerQt.Menu.Scene";
const char * const M_TOOLS = "ObjectViewerQt.Menu.Tools";
const char * const M_WINDOW = "ObjectViewerQt.Menu.Window";
const char * const M_HELP = "ObjectViewerQt.Menu.Help";
const char * const M_FILE_RECENTFILES = "ObjectViewerQt.Menu.File.RecentFiles";
const char * const M_SHEET = "ObjectViewerQt.Menu.Sheet";
//actions
const char * const NEW = "ObjectViewerQt.New";
const char * const OPEN = "ObjectViewerQt.Open";
const char * const SAVE = "ObjectViewerQt.Save";
const char * const SAVE_AS = "ObjectViewerQt.SaveAs";
const char * const SAVE_ALL = "ObjectViewerQt.SaveAll";
const char * const EXIT = "ObjectViewerQt.Exit";
const char * const UNDO = "ObjectViewerQt.Undo";
const char * const REDO = "ObjectViewerQt.Redo";
const char * const CUT = "ObjectViewerQt.Cut";
const char * const COPY = "ObjectViewerQt.Copy";
const char * const PASTE = "ObjectViewerQt.Paste";
const char * const DEL = "ObjectViewerQt.Del";
const char * const FIND = "ObjectViewerQt.Find";
const char * const SELECT_ALL = "ObjectViewerQt.SelectAll";
const char * const GOTO_POS = "ObjectViewerQt.Goto";
const char * const SETTINGS = "ObjectViewerQt.Settings";
const char * const TOGGLE_FULLSCREEN = "ObjectViewerQt.ToggleFullScreen";
const char * const CLOSE = "ObjectViewerQt.Close";
const char * const CLOSEALL = "ObjectViewerQt.CloseAll";
const char * const CLOSEOTHERS = "ObjectViewerQt.CloseOthers";
const char * const ABOUT = "ObjectViewerQt.About";
const char * const ABOUT_PLUGINS = "ObjectViewerQt.AboutPlugins";
const char * const ABOUT_QT = "ObjectViewerQt.AboutQt";
//settings
const char * const SETTINGS_CATEGORY_GENERAL = "general";
const char * const SETTINGS_CATEGORY_GENERAL_ICON = ":/icons/ic_nel_generic_settings.png";
const char * const SETTINGS_TR_CATEGORY_GENERAL = QT_TR_NOOP("General");
const char * const MAIN_WINDOW_SECTION = "MainWindow";
const char * const MAIN_WINDOW_STATE = "WindowState";
const char * const MAIN_WINDOW_GEOMETRY = "WindowGeometry";
const char * const QT_STYLE = "QtStyle";
const char * const QT_PALETTE = "QtPalette";
const char * const LANGUAGE = "Language";
const char * const PLUGINS_PATH = "PluginPath";
const char * const DATA_PATH_SECTION = "DataPath";
const char * const SEARCH_PATHS = "SearchPaths";
const char * const RECURSIVE_SEARCH_PATHS = "RecursiveSearchPathes";
const char * const LEVELDESIGN_PATH = "LevelDesignPath";
const char * const PRIMITIVES_PATH = "/home/cemycc/Ryzom/work/ryzom/code/ryzom/common/data_leveldesign/primitives";
const char * const ASSETS_PATH = "AssetsPath";
const char * const REMAP_EXTENSIONS = "RemapExtensions";
const char * const LOG_SECTION = "LogSettings";
const char * const LOG_ERROR = "LogError";
const char * const LOG_WARNING = "LogWarning";
const char * const LOG_DEBUG = "LogDebug";
const char * const LOG_ASSERT = "LogAssert";
const char * const LOG_INFO = "LogInfo";
//resources
const char * const ICON_NEL = ":/core/images/nel.png";
const char * const ICON_SETTINGS = ":/core/images/preferences.png";
const char * const ICON_PILL = ":/core/icons/ic_nel_pill.png";
const char * const ICON_OPEN = ":/core/icons/ic_nel_open.png";
const char * const ICON_NEW = ":/core/icons/ic_nel_new.png";
const char * const ICON_SAVE = ":/core/icons/ic_nel_save.png";
const char * const ICON_SAVE_AS = ":/core/icons/ic_nel_save_as.png";
const char * const ICON_CRASH = ":/core/icons/ic_nel_crash.png";
} // namespace Constants
} // namespace Core
#endif // CORE_CONSTANTS_H

View file

@ -30,6 +30,7 @@
// Qt includes
#include <QtCore/QCoreApplication>
#include <QtGui/QUndoView>
#include <QtGui/QtGui>
namespace Core
@ -382,8 +383,13 @@ void MainWindow::createMenus()
m_fileMenu->addAction(m_exitAction);
m_editMenu = m_menuBar->addMenu(tr("&Edit"));
m_editMenu->addAction(m_undoGroup->createUndoAction(this));
m_editMenu->addAction(m_undoGroup->createRedoAction(this));
QAction *undoAction = m_undoGroup->createUndoAction(this);
undoAction->setShortcut(QKeySequence::Undo);
QAction *redoAction = m_undoGroup->createRedoAction(this);
redoAction->setShortcut(QKeySequence::Redo);
m_editMenu->addAction(undoAction);
m_editMenu->addAction(redoAction);
m_editMenu->addSeparator();
m_editMenu->addAction(m_cutAction);
m_editMenu->addAction(m_copyAction);
@ -398,6 +404,7 @@ void MainWindow::createMenus()
m_viewMenu = m_menuBar->addMenu(tr("&View"));
m_viewMenu->addAction(m_fullscreenAction);
m_viewMenu->addAction(m_dockWidget->toggleViewAction());
menuManager()->registerMenu(m_viewMenu, Constants::M_VIEW);
m_toolsMenu = m_menuBar->addMenu(tr("&Tools"));
@ -427,6 +434,13 @@ void MainWindow::createStatusBar()
void MainWindow::createDialogs()
{
m_pluginView = new ExtensionSystem::CPluginView(m_pluginManager, this);
// Create undo/redo command list
m_dockWidget = new QDockWidget("Command List", this);
m_dockWidget->setObjectName(QString::fromUtf8("UndoRedoCommandDockWidget"));
QUndoView *undoView = new QUndoView(m_undoGroup, m_dockWidget);
m_dockWidget->setWidget(undoView);
addDockWidget(Qt::RightDockWidgetArea, m_dockWidget);
}
void MainWindow::readSettings()

View file

@ -101,6 +101,7 @@ private:
QPalette m_originalPalette;
QString m_lastDir;
QDockWidget *m_dockWidget;
QUndoGroup *m_undoGroup;
QSettings *m_settings;

View file

@ -385,21 +385,21 @@ SystemInfoColors =
};
PrintfCommands = {
"52", "15", "55 55 0 255", "28", "uiChapterIV", "624",
"52", "15", "55 55 0 255", "28", "uiChapterV", "624",
"428", "0 0 0 255", "18", "", "624", "378",
"0 0 0 255", "14", "", "644", "278", "0 0 0 255",
"18", "", "52", "17", "255 255 255 255", "28",
"uiChapterIV", "622", "430", "255 255 255 255", "18", "",
"uiChapterV", "622", "430", "255 255 255 255", "18", "",
"622", "380", "255 255 255 255", "14", "", "642",
"280", "255 255 255 255", "18", ""
};
PrintfCommandsFreeTrial = {
"52", "15", "55 55 0 255", "28", "uiChapterIV", "624",
"52", "15", "55 55 0 255", "28", "uiChapterV", "624",
"428", "0 0 0 255", "18", "", "624", "378",
"0 0 0 255", "14", "", "644", "278", "0 0 0 255",
"18", "", "52", "17", "255 255 255 255", "28",
"uiChapterIV", "622", "430", "255 255 255 255", "18", "",
"uiChapterV", "622", "430", "255 255 255 255", "18", "",
"622", "380", "255 255 255 255", "14", "", "642",
"280", "255 255 255 255", "18", ""
};

View file

@ -239,14 +239,14 @@ SkinNbMaxPoly_ps1 = 70000;
SkinNbMaxPoly_ps2 = 100000;
SkinNbMaxPoly_ps3 = 200000;
NbMaxSkeletonNotCLod = 50;
NbMaxSkeletonNotCLod = 125;
NbMaxSkeletonNotCLod_min = 5;
NbMaxSkeletonNotCLod_max = 100;
NbMaxSkeletonNotCLod_max = 255;
NbMaxSkeletonNotCLod_step = 5;
NbMaxSkeletonNotCLod_ps0 = 10;
NbMaxSkeletonNotCLod_ps1 = 25;
NbMaxSkeletonNotCLod_ps2 = 50;
NbMaxSkeletonNotCLod_ps3 = 100;
NbMaxSkeletonNotCLod_ps1 = 50;
NbMaxSkeletonNotCLod_ps2 = 125;
NbMaxSkeletonNotCLod_ps3 = 255;
CharacterFarClip = 200.0;
CharacterFarClip_min = 50.0;
@ -386,21 +386,21 @@ SystemInfoColors =
};
PrintfCommands = {
"52", "15", "55 55 0 255", "28", "uiChapterIV", "624",
"52", "15", "55 55 0 255", "28", "uiChapterV", "624",
"428", "0 0 0 255", "18", "", "624", "378",
"0 0 0 255", "14", "", "644", "278", "0 0 0 255",
"18", "", "52", "17", "255 255 255 255", "28",
"uiChapterIV", "622", "430", "255 255 255 255", "18", "",
"uiChapterV", "622", "430", "255 255 255 255", "18", "",
"622", "380", "255 255 255 255", "14", "", "642",
"280", "255 255 255 255", "18", ""
};
PrintfCommandsFreeTrial = {
"52", "15", "55 55 0 255", "28", "uiChapterIV", "624",
"52", "15", "55 55 0 255", "28", "uiChapterV", "624",
"428", "0 0 0 255", "18", "", "624", "378",
"0 0 0 255", "14", "", "644", "278", "0 0 0 255",
"18", "", "52", "17", "255 255 255 255", "28",
"uiChapterIV", "622", "430", "255 255 255 255", "18", "",
"uiChapterV", "622", "430", "255 255 255 255", "18", "",
"622", "380", "255 255 255 255", "14", "", "642",
"280", "255 255 255 255", "18", ""
};

View file

@ -4484,8 +4484,9 @@ bool CCharacterCL::isCurrentBehaviourAttackEnd() const
case MBEHAV::AREA_ATTACK:
return true;
default:
return false;
break;
}
return false;
}

View file

@ -48,6 +48,7 @@
#include "view_bitmap.h"
#include "action_handler_tools.h"
#include "../connection.h"
#include "../client_chat_manager.h"
// Game specific includes
#include "../motion/user_controls.h"
@ -99,6 +100,8 @@ extern bool IsInRingSession;
// Context help
extern void contextHelp (const std::string &help);
extern CClientChatManager ChatMngr;
void beastOrder (const std::string &orderStr, const std::string &beastIndexStr, bool confirmFree = true);
@ -973,6 +976,9 @@ public:
// Create the message for the server to execute a phrase.
sendMsgToServer("GUILD:QUIT");
CGuildManager::getInstance()->closeAllInterfaces();
if (PeopleInterraction.TheUserChat.Filter.getTargetGroup() == CChatGroup::guild)
ChatMngr.updateChatModeAndButton(CChatGroup::say);
}
};
REGISTER_ACTION_HANDLER( CHandlerDoQuitGuild, "do_quit_guild");

View file

@ -92,7 +92,7 @@ bool CCtrlBase::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
prop = (char*) xmlGetProp( cur, (xmlChar*)"on_tooltip" );
if (prop)
{
_OnContextHelp= NLMISC::toLower(std::string((const char*)prop));
_OnContextHelp= (const char*)prop;
}
prop = (char*) xmlGetProp( cur, (xmlChar*)"on_tooltip_params" );
if (prop)

View file

@ -79,6 +79,10 @@ bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
if (ptr) _Positive = convertBool(ptr);
else _Positive = false;
ptr = xmlGetProp (cur, (xmlChar*)"format");
if (ptr) _Format = convertBool(ptr);
else _Format = false;
ptr = xmlGetProp (cur, (xmlChar*)"divisor");
if (ptr) fromString((const char*)ptr, _Divisor);
@ -98,6 +102,30 @@ bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
return true;
}
// ***************************************************************************
// Helper function
ucstring formatThousands(const ucstring& s, const ucstring& separator)
{
int j;
int k;
int topI = s.length() - 1;
if (topI < 4) return s;
ucstring ns;
do
{
for (j = topI, k = 0; j >= 0 && k < 3; --j, ++k )
{
ns = s[j] + ns; // new char is added to front of ns
if( j > 0 && k == 2) ns = separator + ns; // j > 0 means still more digits
}
topI -= 3;
} while(topI >= 0);
return ns;
}
// ***************************************************************************
void CDBViewNumber::checkCoords()
{
@ -106,8 +134,10 @@ void CDBViewNumber::checkCoords()
if (_Cache != val)
{
_Cache= val;
if (_Positive) setText(val >= 0 ? ((string)_Prefix)+toString(val)+(string)_Suffix : "?");
else setText( ((string)_Prefix)+toString(val)+(string)_Suffix );
static ucstring separator = NLMISC::CI18N::get("uiThousandsSeparator");
ucstring value = _Format ? formatThousands(toString(val), separator) : toString(val);
if (_Positive) setText(val >= 0 ? ( ucstring(_Prefix) + value + ucstring(_Suffix) ) : ucstring("?"));
else setText( ucstring(_Prefix) + value + ucstring(_Suffix) );
}
}

View file

@ -57,6 +57,7 @@ protected:
CInterfaceProperty _Number;
sint64 _Cache;
bool _Positive; // only positive values are displayed
bool _Format; // the number will be formatted (like "1,000,000") if >= 10k
sint64 _Divisor, _Modulo;
// string to append to the value (eg: meters)
CStringShared _Suffix;

View file

@ -3540,7 +3540,8 @@ int CGroupHTML::luaShowDiv(CLuaState &ls)
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TBOOLEAN);
if (!_Groups.empty()) {
if (!_Groups.empty())
{
for (uint i=0; i<_Groups.size(); i++)
{
CInterfaceGroup *group = _Groups[i];

View file

@ -29,7 +29,6 @@
#include "group_html.h"
#include "../init_main_loop.h"
#include "inventory_manager.h"
#include "../client_chat_manager.h"
#include "../connection.h"
#include "../entity_cl.h"
@ -49,7 +48,6 @@ using namespace std;
using namespace NLMISC;
extern CPeopleInterraction PeopleInterraction;
extern CClientChatManager ChatMngr;
NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupListAscensor, std::string, "list_sheet_guild");
@ -541,10 +539,6 @@ void CGuildManager::closeAllInterfaces()
CGroupContainer *pGuildChat = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_GUILD_CHAT));
if (pGuildChat != NULL)
pGuildChat->setActive(false);
if (PeopleInterraction.TheUserChat.Filter.getTargetGroup() == CChatGroup::guild)
ChatMngr.updateChatModeAndButton(CChatGroup::say);
}
// ***************************************************************************

View file

@ -1390,7 +1390,7 @@ void CInterfaceManager::runActionHandler (const string &ahCmdLine, CCtrlBase *pC
if(!ahUserParams.empty())
ahParams= ahUserParams;
// Execute the action hanlder
// Execute the action handler
CActionHandlerFactoryManager *pAHFM = CActionHandlerFactoryManager::getInstance();
map<string, IActionHandler*>::iterator it = pAHFM->FactoryMap.find (ahName);
if (it == pAHFM->FactoryMap.end())